diff options
-rw-r--r-- | loop.cl | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,8 +1,9 @@ __kernel void loop(__global int * out, int iterations) { unsigned i; + unsigned base = get_global_id(0) * iterations; for (i = 0; i < iterations; i++) { - unsigned id = (get_global_id(0) * iterations) + i; + unsigned id = (base + i); out[id] = id; } } |