View Full Version : Take base address of Memory Object

01-14-2013, 06:10 PM
How can I get back a pointer to device memory when creating buffers?
There is a solution here http://www.proxya.net/browse.php?u=%3A% ... D2900&b=28 (http://www.proxya.net/browse.php?u=%3A%2F%2Fwww.khronos.org%2Fmessage_bo ards%2Fviewtopic.php%3Ff%3D37%26amp%3Bt%3D2900&b=28) but it does not work.

01-19-2013, 11:21 AM
A host-side pointer to device-side memory? You can't do that in OpenCL. The closest would be using clEnqueueMapBuffer to get a host-side pointer to a buffer that the device can access. Note: This will incur PCIe bus transfers to make the data host-accessible and then get it back on the device during the unmap operation.