File: test_convert_sat_regression.cl

package info (click to toggle)
pocl 7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 29,768 kB
  • sloc: lisp: 151,669; ansic: 135,425; cpp: 65,801; python: 1,846; sh: 1,084; ruby: 255; pascal: 231; tcl: 180; makefile: 174; asm: 81; java: 72; xml: 49
file content (11 lines) | stat: -rw-r--r-- 270 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
kernel 
void test_convert_sat_regression() {
#ifdef cl_khr_int64
    volatile long2 input = (long2)(0, 1);
    uint2 res = convert_uint2_sat(input);
    if (res[0] != 0 || res[1] != 1) {
        printf("expected (0, 1), got (%x, %x)\n", res[0], res[1]);
    }
#endif
}