summaryrefslogtreecommitdiff
path: root/loop_ge.cl
blob: 119d7beaa48b3dfa7f9d2d2182c2ec56b195f0cd (plain)
1
2
3
4
5
6
7
8
9
__kernel void loop_ge(__global int * out, unsigned iterations)
{
  unsigned i;
  unsigned base = get_global_id(0) * iterations;
  for (i = iterations; i >= 1; i--) {
    unsigned id = (base + i);
    out[id] = id;
  }
}