Kernel Profiling

Hi,

I’m using the clGetEventProfilingInfo() function in my OpenCL code to get the kernel execution time on the GPU. The function requires a pointer to a cl_ulong variable as an argument. But when I tried to create a cl_ulong variable in JOCL, I got an error which says “Can not find symbol cl_ulong”. Another argument is “Sizeof.cl_ulong” and it works fine. Kindly let me know if it is possible to create variables like cl_ulong in JOCL.

I see that you have a “cl_mem.java” file in the source code. Is it possible to use cl_ulong if I create a similar java file?

Kind Regards,
Iype

Hello

An example of how the clGetEventProfilingInfo method may be used can be found in this sample: http://www.jocl.org/samples/JOCLEventSample.java

There is no such datatype like cl_long in Java. In general, a ‘long’ can be used instead. But in cases where the C-API required a pointer to cl_long, a Pointer to a ‘long’ array must be used.

bye

Thank You Marco,
It really helped.

-Iype