|
Celeritas 0.7+be44d7947
|
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 > |
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.
Primary input is accumulated in a fixed-capacity producer buffer owned by the stepper. Calling stage_primaries transfers that batch into the core state and makes it available to the next call to async. The producer can then accept another batch, including while a previous step result is valid. At most one unsubmitted batch can be staged. The span overload copies its input into stepper-owned storage, so the caller's span need not remain valid after the call returns. The span returned by staged_primaries represents only the current unsubmitted batch and should not be retained after a call that changes the staging state.
Calling async submits staged primaries, if present, and otherwise advances existing tracks without changing the producer buffer. This allows prior transport to be drained while a later primary batch remains buffered. Primaries can be pushed and staged while a previous result is valid, but the next step cannot start until get consumes that result. Thus result completion and primary production have independent lifecycles.
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, and that any staged primary batch has been submitted with async. Destruction does not add hidden synchronization.
|
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 >.
Fixed capacity of the track initializer queue.
Implemented in celeritas::Stepper< M >.
Implemented in celeritas::Stepper< M >.
|
pure virtualnoexcept |
Number of primaries accumulated in the producer buffer.
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Implemented in celeritas::Stepper< M >.
Fixed capacity of each stepper-owned primary buffer.
Implemented in celeritas::Stepper< M >.
Implemented in celeritas::Stepper< M >.
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Implemented in celeritas::Stepper< M >.
Fixed capacity of the per-step secondary stack.
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Get a shared pointer to the state (TEMPORARY)
Implemented in celeritas::Stepper< M >.
Implemented in celeritas::Stepper< M >.
|
pure virtual |
Implemented in celeritas::Stepper< M >.
|
pure virtualnoexcept |
Access the unsubmitted primary batch staged for the next step.
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 >.