Destroys the CUDA context specified by
ctx. The context
ctx will be destroyed regardless of how many threads it is current to. It is the caller's responsibility to ensure that no API call is issued to
ctx while cuCtxDestroy() is executing.
ctx is current to the calling thread then
ctx will also be popped from the current thread's context stack (as though cuCtxPopCurrent() were called). If
ctx is current to other threads, then
ctx will remain current to those threads, and attempting to access
ctx from those threads will result in the error CUDA_ERROR_CONTEXT_IS_DESTROYED.
- CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cuCtxCreate, cuCtxGetApiVersion, cuCtxGetCacheConfig, cuCtxGetDevice, cuCtxGetLimit, cuCtxPopCurrent, cuCtxPushCurrent, cuCtxSetCacheConfig, cuCtxSetLimit, cuCtxSynchronize