pub unsafe extern "C" fn cudaStreamIsCapturing(
stream: cudaStream_t,
pCaptureStatus: *mut cudaStreamCaptureStatus,
) -> cudaError_tExpand description
Returns a stream’s capture status.
Return the capture status of stream via pCaptureStatus. After a successful call, *pCaptureStatus will contain one of the following:
cudaStreamCaptureStatus::CU_STREAM_CAPTURE_STATUS_NONE: The stream is not capturing.cudaStreamCaptureStatus::CU_STREAM_CAPTURE_STATUS_ACTIVE: The stream is capturing.cudaStreamCaptureStatus::CU_STREAM_CAPTURE_STATUS_INVALIDATED: The stream was capturing but an error has invalidated the capture sequence. The capture sequence must be terminated withcudaStreamEndCaptureon the stream where it was initiated in order to continue usingstream.
Note that, if this is called on cudaStreamLegacy (the “null stream”) while a blocking stream on the same device is capturing, it will return cudaError_t::CUDA_ERROR_STREAM_CAPTURE_IMPLICIT and *pCaptureStatus is unspecified after the call. The blocking stream capture is not invalidated.
When a blocking stream is capturing, the legacy stream is in an unusable state until the blocking stream capture is terminated. The legacy stream is not supported for stream capture, but attempted use would have an implicit dependency on the capturing stream(s).
Note that this function may also return error codes from previous, asynchronous launches.
§Parameters
stream: Stream to query.pCaptureStatus: Returns the stream’s capture status.
§Return value
cudaError_t::CUDA_SUCCESScudaError_t::CUDA_ERROR_INVALID_VALUEcudaError_t::CUDA_ERROR_STREAM_CAPTURE_IMPLICIT
See also: cudaStreamCreate, cudaStreamBeginCapture, cudaStreamEndCapture.