pub unsafe extern "C" fn cuCtxSetCurrent(ctx: CUcontext) -> CUresult
Expand description
\brief Binds the specified CUDA context to the calling CPU thread
Binds the specified CUDA context to the calling CPU thread. If \p ctx is NULL then the CUDA context previously bound to the calling CPU thread is unbound and ::CUDA_SUCCESS is returned.
If there exists a CUDA context stack on the calling CPU thread, this will replace the top of that stack with \p ctx. If \p ctx is NULL then this will be equivalent to popping the top of the calling CPU thread’s CUDA context stack (or a no-op if the calling CPU thread’s CUDA context stack is empty).
\param ctx - Context to bind to the calling CPU thread
\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT \notefnerr
\sa ::cuCtxGetCurrent, ::cuCtxCreate, ::cuCtxDestroy, ::cudaSetDevice