Login  Register

Re: HelloJOCL Problems on MacOSX

Posted by Giovanni Idili on Dec 17, 2011; 5:03pm
URL: https://forum.jogamp.org/HelloJOCL-Problems-on-MacOSX-tp2456996p3594244.html

I experienced this as well when moving from Snow Leopard to Lion (and the problem was actually the CPU not the GPu because the localWorkSize was smaller then 256).

I can confirm changing the code to the following works OK:

int elementCount = ELEM_COUNT;                                  // Length of arrays to process
int localWorkSize = min((int)kernel.getWorkGroupSize(device), 256);  // Local work size dimensions
int globalWorkSize = roundUp(localWorkSize, elementCount);   // rounded up to the nearest multiple of the localWorkSize


I agree this should probably become the default code in the examples :)