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