|
Uni20
Asynchronous tensor and runtime library.
|
Reference-counted lease of one CUDA stream-pool slot. More...
#include <runtime.hpp>
Classes | |
| class | State |
Public Member Functions | |
| int | device () const noexcept |
| Return the device that owns this stream. | |
| cudaStream_t | native_handle () const noexcept |
| Return the CUDA runtime stream handle. | |
| operator bool () const noexcept | |
| Return whether this handle refers to a leased CUDA stream. | |
| Stream & | operator= (Stream &&other) noexcept=default |
| Stream & | operator= (Stream const &) noexcept=default |
| Completion | record_completion () const |
| Record and return an immutable completion for the current stream tail. | |
| Stream ()=default | |
| Stream (Stream &&other) noexcept=default | |
| Stream (Stream const &) noexcept=default | |
| void | synchronize () const |
| Wait on all work currently queued in this stream. | |
| void | wait_on (Completion const &completion) const |
Make this stream wait for completion before executing subsequent work. | |
| ~Stream ()=default | |
Friends | |
| class | StreamPool |
Reference-counted lease of one CUDA stream-pool slot.
Streams are acquired from StreamPool. Copies share the same lease; the stream is returned to the pool only after the last reference is destroyed and all queued CUDA work has completed.
|
default |
|
defaultnoexcept |
|
defaultnoexcept |
|
default |
|
noexcept |
Return the device that owns this stream.
|
noexcept |
Return the CUDA runtime stream handle.
|
inlineexplicitnoexcept |
Return whether this handle refers to a leased CUDA stream.
| Completion uni20::cuda::Stream::record_completion | ( | ) | const |
Record and return an immutable completion for the current stream tail.
| void uni20::cuda::Stream::synchronize | ( | ) | const |
Wait on all work currently queued in this stream.
| void uni20::cuda::Stream::wait_on | ( | Completion const & | completion | ) | const |
Make this stream wait for completion before executing subsequent work.
The producer completion may belong to a different CUDA device.
|
friend |