|
cudaError_t cudaMemcpy2DFromArray |
( |
void * |
dst, |
|
|
size_t |
dpitch, |
|
|
const struct cudaArray * |
src, |
|
|
size_t |
wOffset, |
|
|
size_t |
hOffset, |
|
|
size_t |
width, |
|
|
size_t |
height, |
|
|
enum cudaMemcpyKind |
kind | |
|
) |
| | |
Copies a matrix (height rows of width bytes each) from the CUDA array srcArray starting at the upper left corner (wOffset , hOffset ) to the memory area pointed to by dst , where kind is one of cudaMemcpyHostToHost, cudaMemcpyHostToDevice, cudaMemcpyDeviceToHost, or cudaMemcpyDeviceToDevice, and specifies the direction of the copy. 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 |
| hOffset | - Source starting Y offset |
| width | - Width of matrix transfer (columns in bytes) |
| height | - Height of matrix transfer (rows) |
| kind | - Type of transfer |
- Returns:
- cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevicePointer, cudaErrorInvalidPitchValue, cudaErrorInvalidMemcpyDirection
- Note:
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cudaMemcpy, cudaMemcpy2D, cudaMemcpyToArray, cudaMemcpy2DToArray, cudaMemcpyFromArray, cudaMemcpyArrayToArray, cudaMemcpy2DArrayToArray, cudaMemcpyToSymbol, cudaMemcpyFromSymbol, cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpyToArrayAsync, cudaMemcpy2DToArrayAsync, cudaMemcpyFromArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync
|