offset in shared memory of OpenCL

Hi

Sorry the title is wrong. It’s about device memory.

On CUDA, with a pointer to a device memory block, p, an offset of p can be used in say cublas function, like p+m where m is an integer.

I wonder how to do this with device memory on opencl type cl_mem, a direct add like the above doesn’t seem to work.

thanks.

You should be able to do simple offsets into device memory, although OpenCL does have restrictions on pointer traversals, see our OpenCL jumpstart guide, page 2:
http://developer.download.nvidia.com/OpenC…Start_Guide.pdf