Public Types | |
enum | Unchecked { UNCHECKED } |
Public Member Functions | |
CUDAStream (Stream stream) | |
Construct a CUDAStream from a Stream. More... | |
CUDAStream (Unchecked, Stream stream) | |
Construct a CUDAStream from a Stream with no error checking. More... | |
bool | operator== (const CUDAStream &other) const noexcept |
bool | operator!= (const CUDAStream &other) const noexcept |
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). More... | |
DeviceIndex | device_index () const |
Get the CUDA device index that this stream is associated with. | |
Device | device () const |
Get the full Device that this stream is associated with. More... | |
StreamId | id () const |
Return the stream ID corresponding to this particular stream. | |
bool | query () const |
void | synchronize () const |
int | priority () const |
cudaStream_t | stream () const |
Explicit conversion to cudaStream_t. | |
Stream | unwrap () const |
Explicit conversion to Stream. | |
uint64_t | pack () const noexcept |
Reversibly pack a CUDAStream into a uint64_t representation. More... | |
Static Public Member Functions | |
static CUDAStream | unpack (uint64_t bits) |
static std::tuple< int, int > | priority_range () |
Definition at line 63 of file CUDAStream.h.
|
inlineexplicit |
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.
Definition at line 70 of file CUDAStream.h.
|
inlineexplicit |
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)
Definition at line 77 of file CUDAStream.h.
|
inline |
Get the full Device that this stream is associated with.
The Device is guaranteed to be a CUDA device.
Definition at line 99 of file CUDAStream.h.
|
inline |
Implicit conversion to Stream (a.k.a., forget that the stream is a CUDA stream).
Definition at line 92 of file CUDAStream.h.
|
inlinenoexcept |
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.)
The CUDAStream can be unpacked using unpack(). The format of the uint64_t is unspecified and may be changed.
Definition at line 147 of file CUDAStream.h.