From what I know about JOCL, the context.create****Buffer function always allocate 2 version of buffers, one in host, and one in device. However, in some cases, I need to create the device one only; to use it as a temporary buffer, for instance. Is it possible to do so ?
// asynchronous write of data to GPU device, blocking read later to get the computed results back.
queue.putWriteBuffer(clBufferA, false) // write A
.putCopyBuffer(clBufferA, clBufferB, clBufferA.buffer.capacity()) // copy A -> B
.putReadBuffer(clBufferB, true) // read B
If you don't need this nio buffer but only the on-device counterpart use
one of the create methods with the question mark in it: