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