|
Uni20
Asynchronous tensor and runtime library.
|
Reverse-order epoch queue used by reverse-mode gradient accumulation. More...
#include <epoch_queue.hpp>
Public Member Functions | |
| template<typename T > | |
| EpochContextReader< T > | create_read_context (shared_storage< T > storage) |
| Create a read context from the earliest active reverse epoch. | |
| template<typename T > | |
| EpochContextWriter< T > | create_write_context (shared_storage< T > storage) |
| Create a write context from the earliest active reverse epoch. | |
| bool | is_started () const |
| Reports whether the reverse queue has already started. | |
| ReverseEpochQueue & | operator= (ReverseEpochQueue &&)=default |
| Move assignment. | |
| ReverseEpochQueue & | operator= (ReverseEpochQueue &)=delete |
| Non-copyable. | |
| ReverseEpochQueue () | |
| Construct a reverse queue with one initial epoch. | |
| ReverseEpochQueue (ReverseEpochQueue &&)=default | |
| Move constructor. | |
| ReverseEpochQueue (ReverseEpochQueue &)=delete | |
| Non-copyable. | |
| ReverseEpochQueue (std::shared_ptr< EpochContext > first) | |
| Construct a ReverseEpochQueue from a given EpochContext. | |
| void | start () |
| Start running the reverse queue. | |
| ~ReverseEpochQueue ()=default | |
| Destructor. | |
Reverse-order epoch queue used by reverse-mode gradient accumulation.
|
inline |
Construct a reverse queue with one initial epoch.
|
delete |
Non-copyable.
|
default |
Move constructor.
|
default |
Destructor.
|
inlineexplicit |
Construct a ReverseEpochQueue from a given EpochContext.
|
inline |
Create a read context from the earliest active reverse epoch.
| T | Stored value type. |
| storage | Shared value storage. |
|
inline |
Create a write context from the earliest active reverse epoch.
| T | Stored value type. |
| storage | Shared value storage. |
|
inline |
Reports whether the reverse queue has already started.
true once start() has consumed the initial epoch.
|
default |
Move assignment.
|
delete |
Non-copyable.
|
inline |
Start running the reverse queue.
After start, the initial epoch is consumed and cannot be accessed again.