|
|
| cudaError_t cudaMemcpyToSymbol |
( |
const char * |
symbol, |
|
|
const void * |
src, |
|
|
size_t |
count, |
|
|
size_t |
offset = 0, |
|
|
enum cudaMemcpyKind |
kind = cudaMemcpyHostToDevice | |
|
) |
| | |
Copies count bytes from the memory area pointed to by src to the memory area pointed to by offset bytes from the start of symbol symbol. The memory areas may not overlap. symbol can either be a variable that resides in global or constant memory space, or it can be a character string, naming a variable that resides in global or constant memory space. kind can be either cudaMemcpyHostToDevice or cudaMemcpyDeviceToDevice.
- Parameters:
-
| symbol | - Symbol destination on device |
| src | - Source memory address |
| count | - Size in bytes to copy |
| offset | - Offset from start of symbol in bytes |
| kind | - Type of transfer |
- Returns:
- cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidSymbol, cudaErrorInvalidDevicePointer, cudaErrorInvalidMemcpyDirection
- Note:
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cudaMemcpy, cudaMemcpy2D, cudaMemcpyToArray, cudaMemcpy2DToArray, cudaMemcpyFromArray, cudaMemcpy2DFromArray, cudaMemcpyArrayToArray, cudaMemcpy2DArrayToArray, cudaMemcpyFromSymbol, cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpyToArrayAsync, cudaMemcpy2DToArrayAsync, cudaMemcpyFromArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync
|