PDA

View Full Version : reg workitems



paviraj_1989
04-23-2011, 10: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

david.garcia
04-23-2011, 01: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.