Device-local pool whose streams become available only after their queued work completes.
More...
#include <runtime.hpp>
|
| Stream | acquire () |
| | Block until one actually idle stream can be leased.
|
| |
| std::optional< Stream > | acquire_or_enqueue (detail::StreamWaiter &waiter) noexcept |
| | Register an internal awaiter unless a stream is immediately available.
|
| |
| int | device () const noexcept |
| | Return the device served by this pool.
|
| |
| std::size_t | idle_stream_count () const noexcept |
| | Return the number of streams whose prior work has completed.
|
| |
| std::size_t | leased_stream_count () const noexcept |
| | Return the number of streams currently held by submitters.
|
| |
| StreamPool & | operator= (StreamPool const &)=delete |
| |
| std::size_t | pending_stream_count () const noexcept |
| | Return the number of streams awaiting device completion.
|
| |
| std::size_t | size () const noexcept |
| | Return the total number of stream slots.
|
| |
| | StreamPool (Config config) |
| | Create stream_count streams for one CUDA device.
|
| |
| | StreamPool (StreamPool const &)=delete |
| |
| void | synchronize () |
| | Synchronize every stream and process all queued pool-return callbacks.
|
| |
| std::optional< Stream > | try_acquire () |
| | Try to lease one actually idle stream without waiting.
|
| |
| | ~StreamPool () |
| |
Device-local pool whose streams become available only after their queued work completes.
The pool must outlive every Stream handle acquired from it.
◆ StreamPool() [1/2]
| uni20::cuda::StreamPool::StreamPool |
( |
Config |
config | ) |
|
|
explicit |
Create stream_count streams for one CUDA device.
◆ StreamPool() [2/2]
| uni20::cuda::StreamPool::StreamPool |
( |
StreamPool const & |
| ) |
|
|
delete |
◆ ~StreamPool()
| uni20::cuda::StreamPool::~StreamPool |
( |
| ) |
|
|
default |
◆ acquire()
| Stream uni20::cuda::StreamPool::acquire |
( |
| ) |
|
Block until one actually idle stream can be leased.
Pool-return CUDA callbacks notify blocked callers directly; no scheduler participation is required.
◆ acquire_or_enqueue()
| std::optional< Stream > uni20::cuda::StreamPool::acquire_or_enqueue |
( |
detail::StreamWaiter & |
waiter | ) |
|
|
noexcept |
Register an internal awaiter unless a stream is immediately available.
◆ device()
| int uni20::cuda::StreamPool::device |
( |
| ) |
const |
|
noexcept |
Return the device served by this pool.
◆ idle_stream_count()
| std::size_t uni20::cuda::StreamPool::idle_stream_count |
( |
| ) |
const |
|
noexcept |
Return the number of streams whose prior work has completed.
◆ leased_stream_count()
| std::size_t uni20::cuda::StreamPool::leased_stream_count |
( |
| ) |
const |
|
noexcept |
Return the number of streams currently held by submitters.
◆ operator=()
◆ pending_stream_count()
| std::size_t uni20::cuda::StreamPool::pending_stream_count |
( |
| ) |
const |
|
noexcept |
Return the number of streams awaiting device completion.
◆ size()
| std::size_t uni20::cuda::StreamPool::size |
( |
| ) |
const |
|
noexcept |
Return the total number of stream slots.
◆ synchronize()
| void uni20::cuda::StreamPool::synchronize |
( |
| ) |
|
Synchronize every stream and process all queued pool-return callbacks.
◆ try_acquire()
| std::optional< Stream > uni20::cuda::StreamPool::try_acquire |
( |
| ) |
|
Try to lease one actually idle stream without waiting.
◆ Stream::State
The documentation for this class was generated from the following files: