summaryrefslogtreecommitdiff
path: root/kernels/compiler_saturate_sub.cl
blob: e20a76ff9b95cb3bb529ad8d7a80e1da313886e1 (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] = sub_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