CUresult cuCtxPushCurrent ( CUcontext  ctx  ) 

Pushes the given context ctx onto the CPU thread's stack of current contexts. The specified context becomes the CPU thread's current context, so all CUDA functions that operate on the current context are affected.

The previous current context may be made current again by calling cuCtxDestroy() or cuCtxPopCurrent().

The context must be "floating," i.e. not attached to any thread. Contexts are made to float by calling cuCtxPopCurrent().

Parameters:
ctx - Floating context to attach
Returns:
CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE
Note:
Note that this function may also return error codes from previous, asynchronous launches.
See also:
cuCtxAttach, cuCtxCreate, cuCtxDestroy, cuCtxDetach, cuCtxGetApiVersion, cuCtxGetCacheConfig, cuCtxGetDevice, cuCtxGetLimit, cuCtxPopCurrent, cuCtxSetCacheConfig, cuCtxSetLimit, cuCtxSynchronize


Generated by Doxygen for NVIDIA CUDA Library  NVIDIA