Login  Register

Re: JOCL code working under Snow Leopard but not on Lion

Posted by Michael Bien on Nov 21, 2011; 8:36pm
URL: https://forum.jogamp.org/Code-working-under-Snow-Leopard-but-not-on-Lion-tp3296875p3525980.html


On 11/19/2011 05:30 AM, Giovanni Idili [via jogamp] wrote:
Thanks for the explanation.

I changed this line on code:
int localWorkSize = min(device.getMaxWorkGroupSize(), 256);

Into:
int localWorkSize = min((int)kernel.getWorkGroupSize(device), 256);

and now it's working fine.

One last question though: what's the difference between CLKernel.getWorkGroupSize and CLKernel.getCompileWorkGroupSize?
compile WG size is the unintuitive name for the (optional) size you declared in your kernel.
https://github.com/mbien/jocl/blob/master/test/com/jogamp/opencl/CLProgramTest.java#L280
http://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clGetKernelWorkGroupInfo.html

regards,
michael

-- 
http://michael-bien.com/