12.07.2015 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

106 Module DocumentationNote:See also:Note that this function may also return error codes from previous, asynchronous launches.cuCtxAttach, cuCtxCreate, cuCtxDestroy, cuCtxGetDevice, cuCtxPopCurrent, cuCtxPushCurrent, cuCtxSynchronize3.20.2.5 CUresult cuCtxGetDevice (CUdevice ∗ device)Returns in ∗device the ordinal of the current context’s device.Parameters:device - Returned device ID for the current contextReturns:Note:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_CONTEXT, <strong>CUDA</strong>_ERROR_INVALID_VALUE,See also:Note that this function may also return error codes from previous, asynchronous launches.cuCtxAttach, cuCtxCreate, cuCtxDestroy, cuCtxDetach, cuCtxPopCurrent, cuCtxPushCurrent, cuCtxSynchronize3.20.2.6 CUresult cuCtxPopCurrent (CUcontext ∗ pCtx)Pops the current <strong>CUDA</strong> context from the CPU thread. The <strong>CUDA</strong> context must have a usage count of 1. <strong>CUDA</strong> contextshave a usage count of 1 upon creation; the usage count may be incremented with cuCtxAttach() and decrementedwith cuCtxDetach().If successful, cuCtxPopCurrent() passes back the new context handle in ∗pCtx. The old context may then be madecurrent to a different CPU thread by calling cuCtxPushCurrent().Floating contexts may be destroyed by calling cuCtxDestroy().If a context was current to the CPU thread before cuCtxCreate() or cuCtxPushCurrent() was called, this function makesthat context current to the CPU thread again.Parameters:pCtx - Returned new context handleReturns:Note:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_CONTEXTSee also:Note that this function may also return error codes from previous, asynchronous launches.cuCtxAttach, cuCtxCreate, cuCtxDestroy, cuCtxDetach, cuCtxGetDevice, cuCtxPushCurrent, cuCtxSynchronizeGenerated on Wed Apr 1 16:11:42 2009 for <strong>NVIDIA</strong> <strong>CUDA</strong> Library by Doxygen

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!