Does jocl work in multidimensional mode ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Does jocl work in multidimensional mode ?

Abimael
Hi

I am trying to run a small program that uses 2D in jocl.
However, it seems that it does not work ..
I 'm tring to figure out what is wrong.. looking in the demos, but I didn't find any program (cl program) that runs in 2D .
I mean, I did not find any get_global_id(1) , only get_global_id(0) .

I 'm tring use queue.put2DRangeKernel on the java side .

Does somebody else use 2D  in JOCL / OpenCl ?

Thanks in advance

Reply | Threaded
Open this post in threaded view
|

Re: Does jocl work in multidimensional mode ?

notzed
All the time, and 3d as well.  socles has a pile of code that uses 2D.

Simplest is probably the sobel filter.

Host code: http://code.google.com/p/socles/source/browse/trunk/socles/src/au/notzed/socle/filter/Sobel.java
Kernel: http://code.google.com/p/socles/source/browse/trunk/socles/src/au/notzed/socle/filter/sobel.cl

I don't have any demo code which uses it, but the arguments are pretty obvious.

(note it has a bug and only processes images whose size is a multiple of 16).

Still I find it pretty hard to believe you haven't found any examples with 2d kernels.
Reply | Threaded
Open this post in threaded view
|

Re: Does jocl work in multidimensional mode ?

Abimael

Hi Notezd

I did a code by myself and realized that it works in 2D as we would expect.

For some kind a reason, I also noticed that there are situations that the OPENCL code finishs without any message, but it did not finish properly .
Let me try to clarify : I realized that there are situations, for instance, if I put a comment with some latin characters in the code (as in Brazilian Portuguese) that the code really did not run , but it finished without any error message.

So, it makes me wonder several times  trying to figure out what happened in the code.

By the way, sorry by the weird questions.. Most probably I would must go check the code previous put a question here (maybe a stupid one) .