Function cudarc::driver::result::memcpy_htod_async
source · pub unsafe fn memcpy_htod_async<T>(
dst: CUdeviceptr,
src: &[T],
stream: CUstream
) -> Result<(), DriverError>
Expand description
Copies memory from Host to Device with stream ordered semantics.
See cuda docs
Safety
This function is asynchronous in most cases, so the data from src
will be copied at a later point after this function returns.
T
must be the type that device pointer was allocated with.- The device pointer should not have been freed already (double free)
- The stream should be the stream the memory was allocated on.
src
must not be moved