Reply – Re: putMapBuffer on CPU-based OpenCL devices
Your Name
or Cancel
In Reply To
Re: putMapBuffer on CPU-based OpenCL devices
— by Michael Bien Michael Bien

On 06/27/2011 06:04 PM, suleman [via jogamp] wrote:

> Hi,
> I have two questions.
> (1) Is putMapBuffer (CLCommandQueue class) used on CPU based OpenCL devices
> results in no-copy on CPU devices?
> (2) "putMapBuffer"  method always returns a ByteBuffer?  am i required to
> cast this bytebuffer to other types or not? Any example will be great. e.g.
> i have a flot buffer and i want to map this instead of using putReadBuffer
> and putWriteBuffer buffers on CPUs
> Thanks
1) yes probably. Same as putRead/WriteBuffer - but thats implementation
2.) bytebuffer.asFooBuffer(). You are not required to change the view of
the buffer, you can just use the ByteBuffer view, it exposes the
functionality of all specific buffers.