__kernel void loop(__global int * out) { unsigned i; for (i = 0; i < 10; i++) { unsigned id = get_global_id(0) + i; out[id] = id; } }