Returns in *size
the size of symbol symbol
. 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 global or constant memory space, *size
is unchanged and the error cudaErrorInvalidSymbol is returned. If there are multiple global variables with the same string name (from separate files) and the lookup is done via character string, cudaErrorDuplicateVariableName is returned.
- Parameters:
-
| size | - Size of object associated with symbol |
| symbol | - Global variable or string symbol to find size of |
- 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)