summaryrefslogtreecommitdiff
path: root/global_id2d.cl
blob: b5519c61c5156130bad294c039fbb8003aa2d70a (plain)
1
2
3
4
5
6
7
8
__kernel void global_id2d(__global int * out)
{
   unsigned x = get_global_id(0);
   unsigned y = get_global_id(1);
   unsigned id = (y * get_global_size(1)) + x;

   out[id] = id;
}