How can I map data objects to device? Something like ‘enqueueMapBuffer’ and ‘enqueueUnmapMemObject’ on OpenCL API.
For example, if I have something like this on OpenCL:
m_ngrid = cl::Buffer(OCL->context(), CL_MEM_READ_ONLY|CL_MEM_USE_HOST_PTR, m_nlength_bytes,ngrid); void *ngrid_map = queue.enqueueMapBuffer(m_ngrid,CL_TRUE,CL_MAP_READ,0,m_nlength_bytes); queue.enqueueUnmapMemObject(m_ngrid,ngrid_map);
How could I do the same with CUDA?