pub unsafe extern "C" fn cudaStreamGetId(
hStream: cudaStream_t,
streamId: *mut c_ulonglong,
) -> cudaError_t
Expand description
\brief Query the Id of a stream
Query the Id of a stream. The Id is returned in \p streamId. The Id is unique for the life of the program.
The stream handle \p hStream can refer to any of the following:
- a stream created via any of the CUDA runtime APIs such as ::cudaStreamCreate, ::cudaStreamCreateWithFlags and ::cudaStreamCreateWithPriority, or their driver API equivalents such as ::cuStreamCreate or ::cuStreamCreateWithPriority. Passing an invalid handle will result in undefined behavior.
- any of the special streams such as the NULL stream, ::cudaStreamLegacy and ::cudaStreamPerThread respectively. The driver API equivalents of these are also accepted which are NULL, ::CU_STREAM_LEGACY and ::CU_STREAM_PER_THREAD.
\param hStream - Handle to the stream to be queried \param streamId - Pointer to an unsigned long long in which the stream Id is returned
\return ::cudaSuccess, ::cudaErrorInvalidValue, ::cudaErrorInvalidResourceHandle \note_null_stream \notefnerr \note_init_rt \note_callback
\sa ::cudaStreamCreateWithPriority, ::cudaStreamCreateWithFlags, ::cudaStreamGetPriority, ::cudaStreamGetFlags, ::cuStreamGetId