Hello,
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 queue.putUnmapMemory(cmPinnedData, h_data); according to the OpenCL Spec and the Nvidia examples its not necessary to unmap the buffer before copy it to the device and use it. 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, or is just the OpenCL buffer Object stored in the DMA region and some copy magic happens within the driver? I am a bite confused now. best regards Matthias |
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. best regards, michael On 03/16/2012 05:04 PM, Matthias [via jogamp] wrote: Hello, -- - - - - http://michael-bien.com |
Free forum by Nabble | Edit this page |