Skip to main content

cudaStreamGetId

Function cudaStreamGetId 

Source
pub unsafe extern "C" fn cudaStreamGetId(
    hStream: cudaStream_t,
    streamId: *mut c_ulonglong,
) -> cudaError_t
Expand description

Query the Id of a stream.

Query the Id of a stream. The Id is returned in streamId. The Id is unique for the life of the program.

The stream handle hStream can refer to any of the following:

Note: This function uses standard default stream semantics.

Note that this function may also return error codes from previous, asynchronous launches.

Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.

Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.

§Parameters

  • hStream: Handle to the stream to be queried.
  • streamId: Pointer to an unsigned long long in which the stream Id is returned.

§Return value

See also: cudaStreamCreateWithPriority, cudaStreamCreateWithFlags, cudaStreamGetPriority, cudaStreamGetFlags, cuStreamGetId.