12.07.2015 Views

NVIDIA CUDA

NVIDIA CUDA

NVIDIA CUDA

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.20 Context Management 105Flags - Context creation flagsdev - Device to create context onReturns: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_DEVICE, <strong>CUDA</strong>_ERROR_INVALID_VALUE,<strong>CUDA</strong>_ERROR_OUT_OF_MEMORY, <strong>CUDA</strong>_ERROR_UNKNOWNSee also:Note that this function may also return error codes from previous, asynchronous launches.cuCtxAttach, cuCtxDestroy, cuCtxDetach, cuCtxGetDevice, cuCtxPopCurrent, cuCtxPushCurrent, cuCtxSynchronize3.20.2.3 CUresult cuCtxDestroy (CUcontext ctx)Destroys the <strong>CUDA</strong> context specified by ctx. If the context usage count is not equal to 1, or the context is currentto any CPU thread other than the current one, this function fails. Floating contexts (detached from a CPU thread viacuCtxPopCurrent()) may be destroyed by this function.Parameters:ctx - Context to destroyReturns: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_VALUESee also:Note that this function may also return error codes from previous, asynchronous launches.cuCtxAttach, cuCtxCreate, cuCtxDetach, cuCtxGetDevice, cuCtxPopCurrent, cuCtxPushCurrent, cuCtxSynchronize3.20.2.4 CUresult cuCtxDetach (CUcontext pCtx)Decrements the usage count of the context pCtx, and destroys the context if the usage count goes to 0. The contextmust be a handle that was passed back by cuCtxCreate() or cuCtxAttach(), and must be current to the calling thread.Parameters:pCtx - Context to destroyReturns:<strong>CUDA</strong>_SUCCESS, <strong>CUDA</strong>_ERROR_DEINITIALIZED, <strong>CUDA</strong>_ERROR_NOT_INITIALIZED, <strong>CUDA</strong>_-ERROR_INVALID_CONTEXTGenerated 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!