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