Skip to main content

cuModuleGetGlobal_v2

Function cuModuleGetGlobal_v2 

Source
pub unsafe extern "C" fn cuModuleGetGlobal_v2(
    dptr: *mut CUdeviceptr,
    bytes: *mut size_t,
    hmod: CUmodule,
    name: *const c_char,
) -> CUresult
Expand description

Returns a global pointer from a module.

Returns in *dptr and *bytes the base pointer and size of the global of name name located in module hmod. If no variable of that name exists, cuModuleGetGlobal() returns cudaError_enum::CUDA_ERROR_NOT_FOUND. One of the parameters dptr or bytes (not both) can be NULL in which case it is ignored.

Note that this function may also return error codes from previous, asynchronous launches.

§Parameters

  • dptr: Returned global device pointer.
  • bytes: Returned global size in bytes.
  • hmod: Module to retrieve global from.
  • name: Name of global to retrieve.

§Return value

See also: cuModuleGetFunction, cuModuleGetTexRef, cuModuleLoad, cuModuleLoadData, cuModuleLoadDataEx, cuModuleLoadFatBinary, cuModuleUnload, cudaGetSymbolAddress, cudaGetSymbolSize.