pub unsafe extern "C" fn cudaMemcpy2DToArrayAsync(
dst: cudaArray_t,
wOffset: size_t,
hOffset: size_t,
src: *const c_void,
spitch: size_t,
width: size_t,
height: size_t,
kind: cudaMemcpyKind,
stream: cudaStream_t,
) -> cudaError_tExpand description
Copies data between host and device.
Copies a matrix (height rows of width bytes each) from the memory area pointed to by src to the CUDA array dst starting at hOffset rows and wOffset bytes from the upper left corner, where kind specifies the direction of the copy, and must be one of cudaMemcpyKind::cudaMemcpyHostToHost, cudaMemcpyKind::cudaMemcpyHostToDevice, cudaMemcpyKind::cudaMemcpyDeviceToHost, cudaMemcpyKind::cudaMemcpyDeviceToDevice, or cudaMemcpyKind::cudaMemcpyDefault. Passing cudaMemcpyKind::cudaMemcpyDefault is recommended, in which case the type of transfer is inferred from the pointer values. However, cudaMemcpyKind::cudaMemcpyDefault is only allowed on systems that support unified virtual addressing. spitch is the width in memory in bytes of the 2D array pointed to by src, including any padding added to the end of each row. wOffset + width must not exceed the width of the CUDA array dst. width must not exceed spitch. cudaMemcpy2DToArrayAsync returns an error if spitch exceeds the maximum allowed.
cudaMemcpy2DToArrayAsync is asynchronous with respect to the host, so the call may return before the copy is complete. The copy can optionally be associated to a stream by passing a non-zero stream argument. If kind is cudaMemcpyKind::cudaMemcpyHostToDevice or cudaMemcpyKind::cudaMemcpyDeviceToHost and stream is non-zero, the copy may overlap with operations in other streams.
cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync, ::cuMemcpy2DAsync.
ยงParameters
dst: Destination memory address.wOffset: Destination starting X offset (columns in bytes).hOffset: Destination starting Y offset (rows).src: Source memory address.spitch: Pitch of source memory.width: Width of matrix transfer (columns in bytes).height: Height of matrix transfer (rows).kind: Type of transfer.stream: Stream identifier.