pub unsafe extern "C" fn cudaMemcpy2DFromArray(
dst: *mut c_void,
dpitch: size_t,
src: cudaArray_const_t,
wOffset: size_t,
hOffset: 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 hOffset rows and wOffset bytes from the upper left corner to the memory area pointed to by dst, 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. dpitch is the width in memory in bytes of the 2D array pointed to by dst, including any padding added to the end of each row. wOffset + width must not exceed the width of the CUDA array src. width must not exceed dpitch. cudaMemcpy2DFromArray returns an error if dpitch exceeds the maximum allowed.
ยงParameters
dst: Destination memory address.dpitch: Pitch of destination memory.src: Source memory address.wOffset: Source starting X offset (columns in bytes).hOffset: Source starting Y offset (rows).width: Width of matrix transfer (columns in bytes).height: Height of matrix transfer (rows).kind: Type of transfer.