|
cudaError_t cudaMemcpy2DToArray |
( |
struct cudaArray * |
dst, |
|
|
size_t |
wOffset, |
|
|
size_t |
hOffset, |
|
|
const void * |
src, |
|
|
size_t |
spitch, |
|
|
size_t |
width, |
|
|
size_t |
height, |
|
|
enum cudaMemcpyKind |
kind | |
|
) |
| | |
Copies a matrix (height rows of width bytes each) from the memory area pointed to by src to the CUDA array dst starting at the upper left corner (wOffset , hOffset ) where kind is one of cudaMemcpyHostToHost, cudaMemcpyHostToDevice, cudaMemcpyDeviceToHost, or cudaMemcpyDeviceToDevice, and specifies the direction of the copy. 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. cudaMemcpy2DToArray() returns an error if spitch is greater than the maximum allowed.
- Parameters:
-
| dst | - Destination memory address |
| wOffset | - Destination starting X offset |
| hOffset | - Destination starting Y offset |
| 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 |
- 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, cudaMemcpyFromArray, cudaMemcpy2DFromArray, cudaMemcpyArrayToArray, cudaMemcpy2DArrayToArray, cudaMemcpyToSymbol, cudaMemcpyFromSymbol, cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpyToArrayAsync, cudaMemcpy2DToArrayAsync, cudaMemcpyFromArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync
|