Re: Starting with JOCL
Posted by
Michael Bien on
Feb 12, 2011; 5:40pm
URL: https://forum.jogamp.org/Starting-with-JOCL-tp2481173p2481259.html
Hi,
i got almost the same mail a few days ago :)
http://forum.jogamp.org/HelloJOCL-Problems-on-MacOSX-tp2456996p2456996.html
please reduce the buffer length or increase the direct memory size
as mentioned in my answer. I will reduce the hardcoded value in the
demo... which should make it compatible with more machines.
best regards,
and sorry for the inconveniences,
michael
On 02/12/2011 06:26 PM, John_Idol [via jogamp] wrote:
HI All,
I am getting started with JOCL, trying to run the HolleJOCL demo.
Here's my problem:
When creating buffers I get an error on buffer C, the only only
created as WRITE_ONLY
CLBuffer<FloatBuffer> clBufferA =
context.createFloatBuffer(globalWorkSize, READ_ONLY);
CLBuffer<FloatBuffer> clBufferB =
context.createFloatBuffer(globalWorkSize, READ_ONLY);
CLBuffer<FloatBuffer> clBufferC =
context.createFloatBuffer(globalWorkSize, WRITE_ONLY);
Error message:
Exception in thread "main" java.lang.OutOfMemoryError: Direct
buffer memory
at java.nio.Bits.reserveMemory(Bits.java:633)
at
java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:98)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
at
com.jogamp.common.nio.Buffers.newDirectByteBuffer(Buffers.java:67)
at
com.jogamp.common.nio.Buffers.newDirectFloatBuffer(Buffers.java:109)
at
com.jogamp.opencl.CLContext.createFloatBuffer(CLContext.java:316)
at HelloJOCL.main(HelloJOCL.java:35)
Any idea what this is and how can I get past it?
Thanks!
--
- - - -
http://michael-bien.com