1 2 3 4 5 6 7 8 9
__kernel void global_id2d(__global int * out) { unsigned x = get_global_id(0); unsigned y = get_global_id(1); unsigned id = (y * 10) + x; out[id] = id; }