pub unsafe extern "C" fn cudaMemcpy2DArrayToArray(
dst: cudaArray_t,
wOffsetDst: size_t,
hOffsetDst: size_t,
src: cudaArray_const_t,
wOffsetSrc: size_t,
hOffsetSrc: size_t,
width: size_t,
height: size_t,
kind: cudaMemcpyKind,
) -> cudaError_tExpand description
Copies data between host and device.
Copies a matrix (height rows of width bytes each) from the CUDA array src starting at hOffsetSrc rows and wOffsetSrc bytes from the upper left corner to the CUDA array dst starting at hOffsetDst rows and wOffsetDst 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. wOffsetDst + width must not exceed the width of the CUDA array dst. wOffsetSrc + width must not exceed the width of the CUDA array src.
Note that this function may also return error codes from previous, asynchronous launches.
Note: This function exhibits synchronous behavior for most use cases.
Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.
Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.
§Parameters
dst: Destination memory address.wOffsetDst: Destination starting X offset (columns in bytes).hOffsetDst: Destination starting Y offset (rows).src: Source memory address.wOffsetSrc: Source starting X offset (columns in bytes).hOffsetSrc: Source starting Y offset (rows).width: Width of matrix transfer (columns in bytes).height: Height of matrix transfer (rows).kind: Type of transfer.
§Return value
See also: cudaMemcpy, cudaMemcpy2D, cudaMemcpy2DToArray, cudaMemcpy2DFromArray, cudaMemcpyToSymbol, cudaMemcpyFromSymbol, cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpy2DToArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync, cuMemcpy2D, cuMemcpy2DUnaligned.