Returns in *devPtr
the address of symbol symbol
on the device. symbol
is a variable that resides in global or constant memory space. If symbol
cannot be found, or if symbol
is not declared in the global or constant memory space, *devPtr
is unchanged and the error cudaErrorInvalidSymbol is returned. If there are multiple global or constant variables with the same string name (from separate files) and the lookup is done via character string, cudaErrorDuplicateVariableName is returned.
- Parameters:
-
| devPtr | - Return device pointer associated with symbol |
| symbol | - Global variable or string symbol to search for |
- Returns:
- cudaSuccess, cudaErrorInvalidSymbol, cudaErrorDuplicateVariableName
- Note:
- The
symbol
paramater may also be a character string, naming a variable that resides in global or constant memory space, however this usage is deprecated as of CUDA 4.1.
Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cudaGetSymbolAddress (C++ API) cudaGetSymbolSize (C API)