summaryrefslogtreecommitdiff
path: root/kernels/compiler_array2.cl
blob: ae73932a2e12f5c93ae8e68a07226ae0fb7eaae1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
__kernel void
compiler_array2(__global int *src, __global int *dst)
{
  int final[16];
  int array[16];
  for (int j = 0; j < 16; ++j) array[j] = j;
  for (int j = 0; j < 16; ++j) final[j] = j+1;
  if (get_global_id(0) == 15)
    dst[get_global_id(0)] = final[get_global_id(0)];
  else
    dst[get_global_id(0)] = array[15 - get_global_id(0)];
}