pub fn copy_htod_async<T: Copy>(
dst: &mut DeviceBuffer<T>,
src: &PinnedBuffer<T>,
stream: &Stream,
) -> CudaResult<()>Expand description
Asynchronously copies data from a pinned host buffer into a device buffer.
The copy is enqueued on stream and may not be complete when this
function returns. The caller must not modify src or read dst until
the stream has been synchronised.
Using a PinnedBuffer as the source guarantees that the host memory
is page-locked, which is required for correct async DMA transfers.
ยงErrors
CudaError::InvalidValueifsrc.len() != dst.len().- Other driver errors from
cuMemcpyHtoDAsync_v2.