File: output-file-suffix.ispc

package info (click to toggle)
ispc 1.28.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 97,620 kB
  • sloc: cpp: 77,067; python: 8,303; yacc: 3,337; lex: 1,126; ansic: 631; sh: 475; makefile: 17
file content (19 lines) | stat: -rw-r--r-- 690 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// This test ensures that the target suffix is appended to the output file name.

// RUN: %{ispc} %s -h %t.h --nostdlib --target=sse4-i32x4,avx2-i32x8,avx512skx-x16 -o %t.obj
// RUN: ls %t_sse4.obj %t_avx2.obj %t_avx512skx.obj
// RUN: %{ispc} %s -h %t.h --nostdlib --target=sse4-i32x4,avx2-i32x8,avx512skx-x16 -o ispc-obj
// RUN: ls ispc-obj_sse4 ispc-obj_avx2 ispc-obj_avx512skx

// REQUIRES: !WINDOWS_ENABLED && X86_ENABLED

#define NUM 1024

export void foo(uniform int * uniform _in, uniform int * uniform _out, uniform int k)
{
    uniform int array[NUM];
    for (uniform int i = 0; i < NUM; i++) {
        array[i] = _in[i] * k;
    }
    _out[programIndex] = array[programIndex];
}