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.

  1. T must be the type that device pointer was allocated with.
  2. The device pointer should not have been freed already (double free)
  3. The stream should be the stream the memory was allocated on.
  4. src must not be moved