DriverAPI: How to set the data to an pinned memory.


in the documentation it says that you can allocate pinned memory with cuMemAllocHost.
To copy data you should use the cuMemcpy method to copy unpinned data to the pinned memory, but I cannot find such a method.

Is it possible to use the regular methods, like memcpy or memset or is it better to use the CUDA methods?


You can modify pinned memory however you’d like, with memcpy, memset, or standard C. Pinned memory is a memory region locked to a particular physical region so the card can DMA safely; it can’t be paged out by the OS, so don’t try to allocate all of your RAM as pinned.