View Full Version : reg workitems

04-23-2011, 11:56 AM
how to set the number of local work groups
what we have to set for globalworksize parameter
and local work size parameter.

i want to creat a local workgroup size =9;
wat i have set the above mentioned parameters

04-23-2011, 02:25 PM
If you want N work-groups and each work-group has M work-items,

size_t local_size = M;
size_t global_size = N * M;
errcode = clEnqueueNDrangeKernel(myCommandQueue, myKernel, 1, NULL /* offset */, &global_size, &local_size, 0, NULL, NULL);

Notice that a work-group size of 9 is very small and it will likely impact performance.