|
Uni20
Asynchronous tensor and runtime library.
|
Coordinates multiple epochs of read/write gates. More...
#include <epoch_queue.hpp>
Public Member Functions | |
| template<typename T > | |
| EpochContextReader< T > | create_read_context (shared_storage< T > storage) const |
| Create a read context bound to the current epoch. | |
| template<typename T > | |
| EpochContextWriter< T > | create_write_context (shared_storage< T > storage) |
| Create a write context, advancing to a new epoch when needed. | |
| EpochQueue () | |
| Construct a queue with one initial epoch. | |
| EpochQueue (EpochQueue &&)=delete | |
| Queue identity is stable and is not transferred by value. | |
| EpochQueue (EpochQueue const &)=delete | |
| Queue identity is shared by handle, never copied. | |
| bool | has_pending_writers () const noexcept |
| Reports whether the latest epoch already has a writer. | |
| std::shared_ptr< EpochContext > | latest () const noexcept |
| Returns the latest epoch context. | |
| EpochQueue & | operator= (EpochQueue &&)=delete |
| Queue identity is stable and is not move-assigned by value. | |
| EpochQueue & | operator= (EpochQueue const &)=delete |
| Queue identity is shared by handle, never copy-assigned. | |
| ~EpochQueue () | |
| Destroy the epoch queue. | |
Coordinates multiple epochs of read/write gates.
Queue-head operations enroll accesses in one causal timeline and must be externally serialized across every Async handle sharing this queue. Once created, epoch contexts provide synchronization for concurrent task execution.
|
inline |
Construct a queue with one initial epoch.
|
delete |
Queue identity is shared by handle, never copied.
|
delete |
Queue identity is stable and is not transferred by value.
|
inline |
Destroy the epoch queue.
|
inline |
Create a read context bound to the current epoch.
| T | Stored value type. |
| storage | Shared value storage. |
|
inline |
Create a write context, advancing to a new epoch when needed.
| T | Stored value type. |
| storage | Shared value storage. |
|
inlinenoexcept |
Reports whether the latest epoch already has a writer.
true when a writer is pending in the current epoch.
|
inlinenoexcept |
Returns the latest epoch context.
|
delete |
Queue identity is stable and is not move-assigned by value.
|
delete |
Queue identity is shared by handle, never copy-assigned.