summaryrefslogtreecommitdiff
path: root/kernels/compiler_if_else.cl
blob: c8b2cb82cb48d8e437887b75c1290b46a49b8251 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
__kernel void
compiler_if_else(__global int *src, __global int *dst)
{
  int id = (int)get_global_id(0);
  dst[id] = src[id];
  if (dst[id] >= 0) {
    dst[id] = src[id+1];
  } else {
    dst[id]--;
  }
}