LongBuffers not supported?

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

LongBuffers not supported?

Wibowit
I am trying to push a LongBuffer to GPU. IntBuffer or ByteBuffer works smoothly, but when I use LongBuffer then I experience an exception:


run:
Exception in thread "main" java.lang.RuntimeException: Unexpected buffer type java.nio.DirectLongBufferU
        at com.jogamp.opencl.CLMemory.sizeOfBufferElem(CLMemory.java:100)
        at com.jogamp.opencl.CLBuffer.create(CLBuffer.java:85)
        at com.jogamp.opencl.CLContext.createBuffer(CLContext.java:367)
        at com.jogamp.opencl.CLContext.createBuffer(CLContext.java:360)
        at streampacker.Main.main(Main.java:42)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

File Main.java: http://pastebin.com/7w5d7HaK
File CLSetup.java: http://pastebin.com/RmpUG9xY

Sorry, that I haven't reduced the sample to minimum. I'll download and try fresh devbuild now.

Edit:
The same exception on newest build, JOCL b328 from 5'th April 2011.
Reply | Threaded
Open this post in threaded view
|

Re: LongBuffers not supported?

Michael Bien
Hi Wibowit,
i'll fix that tomorrow when i am back at my workstation.

thanks for the report,
michael
Reply | Threaded
Open this post in threaded view
|

Re: LongBuffers not supported?

Michael Bien
In reply to this post by Wibowit
  fixed in:
https://github.com/mbien/jocl/commit/8a313c3240994d802af08673d095b0ec8ed69eac
builds should be available soon on the usual places.

-michael

On 04/09/2011 10:09 PM, Wibowit [via jogamp] wrote:

>
> I am trying to push a LongBuffer to GPU. IntBuffer or ByteBuffer works
> smoothly, but when I use LongBuffer then I experience an exception:
>
>
> run:
> Exception in thread "main" java.lang.RuntimeException: Unexpected buffer
> type java.nio.DirectLongBufferU
>          at com.jogamp.opencl.CLMemory.sizeOfBufferElem(CLMemory.java:100)
>          at com.jogamp.opencl.CLBuffer.create(CLBuffer.java:85)
>          at com.jogamp.opencl.CLContext.createBuffer(CLContext.java:367)
>          at com.jogamp.opencl.CLContext.createBuffer(CLContext.java:360)
>          at streampacker.Main.main(Main.java:42)
> Java Result: 1
> BUILD SUCCESSFUL (total time: 0 seconds)
>
> File Main.java: http://pastebin.com/7w5d7HaK
> File CLSetup.java: http://pastebin.com/RmpUG9xY
>
> Sorry, that I haven't reduced the sample to minimum. I'll download and try
> fresh devbuild now.