6.28. Module Management [DEPRECATED]
This section describes the deprecated module management functions of the low-level CUDA driver application programming interface.
Functions
- CUresult cuModuleGetSurfRef(CUsurfref *pSurfRef, CUmodule hmod, const char *name)
Returns a handle to a surface reference.
- CUresult cuModuleGetTexRef(CUtexref *pTexRef, CUmodule hmod, const char *name)
Returns a handle to a texture reference.
6.28.1. Functions
-
CUresult cuModuleGetSurfRef(CUsurfref *pSurfRef, CUmodule hmod, const char *name)
Returns a handle to a surface reference.
Returns in
*pSurfRefthe handle of the surface reference of namenamein the modulehmod. If no surface reference of that name exists, cuModuleGetSurfRef() returns CUDA_ERROR_NOT_FOUND.See also
cuModuleGetFunction, cuModuleGetGlobal, cuModuleGetTexRef, cuModuleLoad, cuModuleLoadData, cuModuleLoadDataEx, cuModuleLoadFatBinary, cuModuleUnload
Note
Note that this function may also return error codes from previous, asynchronous launches.
- Parameters
pSurfRef – - Returned surface reference
hmod – - Module to retrieve surface reference from
name – - Name of surface reference to retrieve
- Returns
CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_FOUND
-
CUresult cuModuleGetTexRef(CUtexref *pTexRef, CUmodule hmod, const char *name)
Returns a handle to a texture reference.
Returns in
*pTexRefthe handle of the texture reference of namenamein the modulehmod. If no texture reference of that name exists, cuModuleGetTexRef() returns CUDA_ERROR_NOT_FOUND. This texture reference handle should not be destroyed, since it will be destroyed when the module is unloaded.See also
cuModuleGetFunction, cuModuleGetGlobal, cuModuleGetSurfRef, cuModuleLoad, cuModuleLoadData, cuModuleLoadDataEx, cuModuleLoadFatBinary, cuModuleUnload
Note
Note that this function may also return error codes from previous, asynchronous launches.
- Parameters
pTexRef – - Returned texture reference
hmod – - Module to retrieve texture reference from
name – - Name of texture reference to retrieve
- Returns
CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_FOUND