Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
uni20::async::EpochQueue Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ EpochQueue() [1/3]

uni20::async::EpochQueue::EpochQueue ( )
inline

Construct a queue with one initial epoch.

◆ EpochQueue() [2/3]

uni20::async::EpochQueue::EpochQueue ( EpochQueue const &  )
delete

Queue identity is shared by handle, never copied.

◆ EpochQueue() [3/3]

uni20::async::EpochQueue::EpochQueue ( EpochQueue &&  )
delete

Queue identity is stable and is not transferred by value.

◆ ~EpochQueue()

uni20::async::EpochQueue::~EpochQueue ( )
inline

Destroy the epoch queue.

Member Function Documentation

◆ create_read_context()

template<typename T >
EpochContextReader< T > uni20::async::EpochQueue::create_read_context ( shared_storage< T >  storage) const
inline

Create a read context bound to the current epoch.

Template Parameters
TStored value type.
Parameters
storageShared value storage.
Returns
Reader handle for the current epoch.

◆ create_write_context()

template<typename T >
EpochContextWriter< T > uni20::async::EpochQueue::create_write_context ( shared_storage< T >  storage)
inline

Create a write context, advancing to a new epoch when needed.

Template Parameters
TStored value type.
Parameters
storageShared value storage.
Returns
Writer handle for the selected epoch.

◆ has_pending_writers()

bool uni20::async::EpochQueue::has_pending_writers ( ) const
inlinenoexcept

Reports whether the latest epoch already has a writer.

Returns
true when a writer is pending in the current epoch.

◆ latest()

std::shared_ptr< EpochContext > uni20::async::EpochQueue::latest ( ) const
inlinenoexcept

Returns the latest epoch context.

Returns
Shared pointer to the current epoch.

◆ operator=() [1/2]

EpochQueue & uni20::async::EpochQueue::operator= ( EpochQueue &&  )
delete

Queue identity is stable and is not move-assigned by value.

◆ operator=() [2/2]

EpochQueue & uni20::async::EpochQueue::operator= ( EpochQueue const &  )
delete

Queue identity is shared by handle, never copy-assigned.


The documentation for this class was generated from the following file: