Skip to main content

cudaLibraryGetManaged

Function cudaLibraryGetManaged 

Source
pub unsafe extern "C" fn cudaLibraryGetManaged(
    dptr: *mut *mut c_void,
    bytes: *mut size_t,
    library: cudaLibrary_t,
    name: *const c_char,
) -> cudaError_t
Expand description

Returns a pointer to managed memory.

Returns in *dptr and *bytes the base pointer and size of the managed memory with name name for the requested library library. If no managed memory with the requested name name exists, the call returns cudaError_t::CUDA_ERROR_NOT_FOUND. One of the parameters dptr or bytes (not both) can be NULL in which case it is ignored. Note that managed memory for library library is shared across devices and is registered when the library is loaded. The returned dptr cannot be passed to the Symbol APIs such as cudaMemcpyToSymbol, cudaMemcpyFromSymbol, cudaGetSymbolAddress, or cudaGetSymbolSize.

§Parameters

  • dptr: Returned pointer to the managed memory.
  • bytes: Returned memory size in bytes.
  • library: Library to retrieve managed memory from.
  • name: Name of managed memory to retrieve.

§Return value

See also: cudaLibraryLoadData, cudaLibraryLoadFromFile, cudaLibraryUnload, cudaLibraryGetGlobal, cuLibraryGetManaged.