i translated the demo from the nv samples (or AMD sample?) in the
early stages of jocl development to have something to test the
binding and compare the results to the C version (there where not
many samples out there before the spec was final ;) ). It is
probably best to take a look at the original C sample. It wasn't a
line-by-line port, so its possible that i made some translation
mistakes back than.
On 03/16/2012 05:04 PM, Matthias [via jogamp] wrote:
i have a question related to pinned memory / mapping buffers.
The jocl-demo bandwidth source code is as follows:
// unmap and make data in the host buffer valid
according to the OpenCL Spec and the Nvidia examples its not
necessary to unmap the buffer before copy it to the device and use
and later before performance measurement you remap it:
h_data = queue.putMapBuffer(cmPinnedData, WRITE, true);
... assuming that the pinned data is mapped again to the same
virtual address (in underlying c code)?
Is it guaranteed that the data is still "there", i thougt there is
DMA used and the data is not stored in your memory?
I am a bite confused now.
- - - -