Login  Register

Re: using shared memory using jocl

Posted by Michael Bien on Oct 01, 2010; 2:16pm
URL: https://forum.jogamp.org/Re-using-shared-memory-using-jocl-tp1614904.html

Hello Harish,

do you have a self contained testcase? I would like to take a look this weekend.

regards,
michael


On 10/01/2010 06:15 AM, harishd [via jogamp] wrote:
Hi,

I'm trying to get the hang of jocl, and I seem to be unable to find a way to use local variables in the kernel.
This is done by the cl call clSetKernelArg(kernel, index, size, NULL) in c, but I'm unable to find the corresponding api call in jocl to do this.

when I try it by calling kernel.setArg(index, clBuffer), where clBuffer has the given size, but not initialized, I get the following exception
Exception in thread "main" com.jogamp.opencl.CLException$CLInvalidArgValueException: error setting arg 6 to value java.nio.DirectByteBuffer[pos=0 lim=24 cap=24] of size 4 of CLKernel [id: 160042672 name: init]
error: CL_INVALID_ARG_VALUE

Am I missing out something?

thanks,
Harish.


View message @ http://jogamp.762907.n3.nabble.com/using-shared-memory-using-jocl-tp1612561p1612561.html
To start a new topic under jogamp, email [hidden email]
To unsubscribe from jogamp, click here.


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