On 11/08/2011 06:32 PM, Giovanni Idili [via jogamp] wrote:
> Following some issues I talked about in a previous post [
> http://forum.jogamp.org/Code-working-under-Snow-Leopard-but-not-on-Lion-td3296875.html ]
> I am trying to integrate the CLWork utility in my code, so that I
> don't have to manually take care fo LWS vs GWS optimizations.
> I am looking at the sample code on your blog post here [
> http://michael-bien.com/mbien/entry/many_little_improvements_made_it ]
> but as I try to integrate those changes it is not fully clear to me
> the context in which that code fits.
> In particular I am not sure if I have to change the way I create the
> buffers etc. since in order to figure out the buffer size I am doing
> all sorts of rounding up etc. and it is my understanding that the
> CLWork utility will get rid of that kind of prestidigitation :)
well it depends. If you do a bounds check in the kernel the buffer size
does not matter much. In this case you can just allocate the buffer as
needed and round the work size up. Manually or using CLWork. The other
option is to create a larger buffer (rounded up once again) and use it
in a kernel without boundschecks.