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