summaryrefslogtreecommitdiff
path: root/kernels/compiler_saturate.cl
blob: e9ffc4b04085489cc9c5824d00886f099b6cfff1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#define TEST_TYPE(TYPE)                                                           \
__kernel void test_##TYPE(__global TYPE *C, __global TYPE *A, __global TYPE *B) { \
  int id = get_global_id(0);                                                      \
  C[id] = add_sat(A[id], B[id]);                                                  \
}

TEST_TYPE(char)
TEST_TYPE(uchar)
TEST_TYPE(short)
TEST_TYPE(ushort)
TEST_TYPE(int)
TEST_TYPE(uint)
//TEST_TYPE(long)
//TEST_TYPE(ulong)

#undef TEST_TYPE