Skip to main content

cudaStreamIsCapturing

Function cudaStreamIsCapturing 

Source
pub unsafe extern "C" fn cudaStreamIsCapturing(
    stream: cudaStream_t,
    pCaptureStatus: *mut cudaStreamCaptureStatus,
) -> cudaError_t
Expand 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:

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

See also: cudaStreamCreate, cudaStreamBeginCapture, cudaStreamEndCapture.