__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; } }