Function cuDevicePrimaryCtxReset_v2

Source
pub unsafe extern "C" fn cuDevicePrimaryCtxReset_v2(
    dev: CUdevice,
) -> CUresult
Expand description

\brief Destroy all allocations and reset all state on the primary context

Explicitly destroys and cleans up all resources associated with the current device in the current process.

Note that it is responsibility of the calling function to ensure that no other module in the process is using the device any more. For that reason it is recommended to use ::cuDevicePrimaryCtxRelease() in most cases. However it is safe for other modules to call ::cuDevicePrimaryCtxRelease() even after resetting the device. Resetting the primary context does not release it, an application that has retained the primary context should explicitly release its usage.

\param dev - Device for which primary context is destroyed

\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_DEVICE, ::CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE \notefnerr

\sa ::cuDevicePrimaryCtxRetain, ::cuDevicePrimaryCtxRelease, ::cuCtxGetApiVersion, ::cuCtxGetCacheConfig, ::cuCtxGetDevice, ::cuCtxGetFlags, ::cuCtxGetLimit, ::cuCtxPopCurrent, ::cuCtxPushCurrent, ::cuCtxSetCacheConfig, ::cuCtxSetLimit, ::cuCtxSynchronize, ::cudaDeviceReset