Returns in *devPtr
the address of symbol symbol
on the device. 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. 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:
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cudaGetSymbolAddress (C++ API) cudaGetSymbolSize (C API)