summaryrefslogtreecommitdiff
path: root/kernels/compiler_popcount.cl
blob: 163611874f8689b6f72af4d627e6fc9f8c114e68 (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 *src, global TYPE *dst) { \
  int i = get_global_id(0);                                   \
  dst[i] = popcount(src[i]);                                  \
}

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