Skip to main content

cudaDeviceGetMemPool

Function cudaDeviceGetMemPool 

Source
pub unsafe extern "C" fn cudaDeviceGetMemPool(
    memPool: *mut cudaMemPool_t,
    device: c_int,
) -> cudaError_t
Expand description

Gets the current mempool for a device.

Returns the last pool provided to cudaDeviceSetMemPool for this device or the device’s default memory pool if cudaDeviceSetMemPool has never been called. By default the current mempool is the default mempool for a device, otherwise the returned pool must have been set with cuDeviceSetMemPool or cudaDeviceSetMemPool.

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

Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.

Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.

§Return value

See also: cuDeviceGetMemPool, cudaDeviceGetDefaultMemPool, cudaDeviceSetMemPool.