Defined in File CUDAStream.h
Construct a CUDAStream from a Stream.
This construction is checked, and will raise an error if the Stream is not, in fact, a CUDA stream.
CUDAStream(Unchecked, Stream stream)¶
Construct a CUDAStream from a Stream with no error checking.
This constructor uses the “named” constructor idiom, and can be invoked as: CUDAStream(CUDAStream::UNCHECKED, stream)
operator cudaStream_t() const¶
Implicit conversion to cudaStream_t.
operator Stream() const¶
Implicit conversion to Stream (a.k.a., forget that the stream is a CUDA stream).
Get the full Device that this stream is associated with.
The Device is guaranteed to be a CUDA device.
Return the stream ID corresponding to this particular stream.
Explicit conversion to cudaStream_t.
Explicit conversion to Stream.
pack() const noexcept¶
Reversibly pack a CUDAStream into a uint64_t representation.
This may be helpful when storing a CUDAStream in a C struct, where you cannot conveniently place the CUDAStream object itself (which is morally equivalent, but unfortunately is not POD due to the fact that it has constructors.)