Re: Why CLEventList has fixed size?
Posted by Wibowit on Mar 30, 2011; 4:46pm
URL: https://forum.jogamp.org/Why-CLEventList-has-fixed-size-tp2705613p2754482.html
Sorry for late reply.
I think I'll end up with my own Collection wrappers that will create lots of CLEventLists or I'll fork JOCL (much less probable). Event objects are so small (on client side they're just pointers) that copying them is essentially free. If I were you then I'll just create a 10 kB (or 100 kB) ThreadLocal direct ByteBuffer and use if for receiving/ sending events from/ to OpenCL driver (if there is more data then I'll just allocate temporary another buffer). I would store Events in usual collection implementing standard List interface. I would also integrate Events with Garbage Collector, ie. automatic clReleaseEvent.