Take base address of Memory Object

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 but it does not work.

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.