Reply – Re: JOCL code working under Snow Leopard but not on Lion
Your Name
Subject
Message
or Cancel
In Reply To
Re: JOCL code working under Snow Leopard but not on Lion
— by Michael Bien Michael Bien

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/