Skip to main content

memcpy_device_to_host

Function memcpy_device_to_host 

Source
pub unsafe fn memcpy_device_to_host(
    host: *mut c_void,
    device: *const c_void,
    count: usize,
) -> bool
Expand description

Copy count bytes from a CUDA device pointer to host. Returns false on failure or if libcudart is unavailable.

ยงSafety

The caller must ensure:

  • host points to at least count bytes of writable memory.
  • device points to at least count bytes of valid CUDA device memory (i.e. obtained from a CudaMap::device_ptr() while the map is live).