pub unsafe extern "C" fn cuStreamGetGreenCtx(
hStream: CUstream,
phCtx: *mut CUgreenCtx,
) -> CUresult
Expand description
\brief Query the green context associated with a stream
Returns the CUDA green context that the stream is associated with, or NULL if the stream is not associated with any green context.
The stream handle \p hStream can refer to any of the following:
- a stream created via any of the CUDA driver APIs such as ::cuStreamCreate, ::cuStreamCreateWithPriority and ::cuGreenCtxStreamCreate, or their runtime API equivalents such as ::cudaStreamCreate, ::cudaStreamCreateWithFlags and ::cudaStreamCreateWithPriority. If during stream creation the context that was active in the calling thread was obtained with cuCtxFromGreenCtx, that green context is returned in \p phCtx. Otherwise, \p *phCtx is set to NULL instead.
- special stream such as the NULL stream or ::CU_STREAM_LEGACY. In that case if context that is active in the calling thread was obtained with cuCtxFromGreenCtx, that green context is returned. Otherwise, \p *phCtx is set to NULL instead.
\param hStream - Handle to the stream to be queried \param phCtx - Returned green context associated with the stream
\return ::CUDA_SUCCESS, ::CUDA_ERROR_DEINITIALIZED, ::CUDA_ERROR_NOT_INITIALIZED, ::CUDA_ERROR_INVALID_CONTEXT, ::CUDA_ERROR_INVALID_HANDLE, \notefnerr
\sa ::cuStreamDestroy, ::cuStreamCreate, ::cuStreamCreateWithPriority, ::cuStreamGetCtx_v2, ::cuGreenCtxStreamCreate, ::cuStreamGetPriority, ::cuStreamGetFlags, ::cuStreamWaitEvent, ::cuStreamQuery, ::cuStreamSynchronize, ::cuStreamAddCallback, ::cudaStreamCreate, ::cudaStreamCreateWithFlags