|
Celeritas 0.7+dc90c550f
|
Interface class for stepper classes. More...
#include <Stepper.hh>

Public Types | |
Type aliases | |
| using | Input = StepperInput |
| using | SpanConstPrimary = Span< Primary const > |
| using | result_type = StepperResult |
| using | SPState = std::shared_ptr< CoreStateInterface > |
Public Member Functions | |
| virtual void | warm_up ()=0 |
| virtual void | async ()=0 |
| virtual void | async (SpanConstPrimary primaries)=0 |
| virtual bool | valid () const noexcept=0 |
| Whether an asynchronous step result can be retrieved. | |
| virtual bool | ready () const =0 |
| virtual void | wait () const =0 |
| virtual StepperResult | get ()=0 |
| virtual StepperResult | operator() ()=0 |
| virtual StepperResult | operator() (SpanConstPrimary primaries)=0 |
| virtual void | kill_active ()=0 |
| virtual void | reseed (UniqueEventId event_id)=0 |
| virtual ActionSequence const & | actions () const =0 |
| Get action sequence for timing diagnostics. | |
| virtual CoreStateInterface const & | state () const =0 |
| Get the core state interface. | |
| virtual SPState | sp_state ()=0 |
| Get a shared pointer to the state (TEMPORARY) | |
Protected Member Functions | |
| StepperInterface (StepperInterface const &)=default | |
| StepperInterface & | operator= (StepperInterface const &)=default |
| StepperInterface (StepperInterface &&)=default | |
| StepperInterface & | operator= (StepperInterface &&)=default |
Interface class for stepper classes.
This allows higher-level classes not to care whether the stepper operates on host or device.
A stepper initially has no asynchronous result, so valid returns false. Calling async, with or without primaries, starts one step and makes the result valid. No other step can be started until get returns the result and restores the initial state. The ready function queries completion without blocking, wait blocks without consuming the result, and get waits if necessary before consuming it. All three require a valid result. A valid result can be ready: valid describes whether the result can be retrieved, rather than whether device execution is still underway.
Host steps execute synchronously and are immediately ready. The deprecated call operators preserve synchronous behavior by calling async followed by get.
Before destroying a device Stepper, the caller must ensure that any valid asynchronous operation has completed by calling wait or get.
|
pure virtual |
Get action sequence for timing diagnostics.
Implemented in celeritas::Stepper< M >.
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Implemented in celeritas::Stepper< M >.
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Implemented in celeritas::Stepper< M >.
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Get a shared pointer to the state (TEMPORARY)
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Get the core state interface.
Implemented in celeritas::Stepper< M >.
Whether an asynchronous step result can be retrieved.
Implemented in celeritas::Stepper< M >.
Implemented in celeritas::Stepper< M >.
Implemented in celeritas::Stepper< M >.