Celeritas 0.7.0-dev.127+develop.e63889793
|
Verify a consistent simulation state after performing an action. More...
#include <StatusChecker.hh>
Public Member Functions | |
StatusChecker (ActionId action_id, AuxId aux_id) | |
Construct with action and aux IDs. | |
template<MemSpace M> | |
void | step (ActionId prev_action, CoreParams const &, CoreState< M > &state) const |
Execute with with the last action's ID and the state. | |
Aux/action metadata interface | |
std::string_view | label () const final |
Label for the auxiliary data and action. | |
std::string_view | description () const final |
Description of the action. | |
Aux params interface | |
AuxId | aux_id () const final |
Index of this class instance in its registry. | |
UPState | create_state (MemSpace m, StreamId id, size_type size) const final |
Build state data for a stream. | |
Begin run interface | |
ActionId | action_id () const final |
Index of this class instance in its registry. | |
void | begin_run (CoreParams const &, CoreStateHost &) final |
Set host data at the beginning of a run. | |
void | begin_run (CoreParams const &, CoreStateDevice &) final |
Set device data at the beginning of a run. | |
Data interface | |
HostRef const & | host_ref () const final |
Access data on host. | |
DeviceRef const & | device_ref () const final |
Access data on device. | |
![]() | |
virtual | ~AuxParamsInterface () |
Default destructor. | |
![]() | |
virtual void | begin_run (P const &, S< MemSpace::host > &)=0 |
Set host data at the beginning of a run. | |
virtual void | begin_run (P const &, S< MemSpace::device > &)=0 |
Set device data at the beginning of a run. | |
![]() | |
virtual | ~ActionInterface () noexcept=0 |
Default destructor. | |
![]() | |
StatusCheckParamsData< Ownership::const_reference, M > const & | ref () const |
StatusCheckParamsData< Ownership::const_reference, M > const & | ref () const |
Dispatch a "ref" call to host or device data. | |
Static Public Member Functions | |
static std::shared_ptr< StatusChecker > | make_and_insert (CoreParams const &core) |
Construct and add to core params. | |
Additional Inherited Members | |
![]() | |
using | UPState = std::unique_ptr< AuxStateInterface > |
Default destructor. | |
![]() | |
using | CoreParams = P |
using | CoreStateHost = S< MemSpace::host > |
using | CoreStateDevice = S< MemSpace::device > |
using | SpanCoreStateHost = Span< S< MemSpace::host > *const > |
using | SpanCoreStateDevice = Span< S< MemSpace::device > *const > |
![]() | |
using | HostRef = HostCRef< StatusCheckParamsData > |
using | DeviceRef = DeviceCRef< StatusCheckParamsData > |
![]() | |
AuxParamsInterface ()=default | |
CELER_DEFAULT_COPY_MOVE (AuxParamsInterface) | |
Default destructor. | |
![]() | |
CELER_DEFAULT_COPY_MOVE (ActionInterface) | |
![]() | |
CELER_DEFAULT_COPY_MOVE (ParamsDataInterface) | |
Verify a consistent simulation state after performing an action.
This is used as a debug option in the step executor to check that actions and simulation state are consistent.
Since this is called manually by the stepper, multiple times per step, it is not a CoreStepAction. It's meant to be used inside the ActionSequence
itself, called after every action.
|
inlinefinalvirtual |
Index of this class instance in its registry.
Implements celeritas::ActionInterface.
|
inlinefinalvirtual |
Index of this class instance in its registry.
Implements celeritas::AuxParamsInterface.
|
finalvirtual |
Build state data for a stream.
Implements celeritas::AuxParamsInterface.
|
finalvirtual |
Description of the action.
Implements celeritas::ActionInterface.
|
inlinefinalvirtual |
Access data on device.
Implements celeritas::ParamsDataInterface< StatusCheckParamsData >.
|
inlinefinalvirtual |
Access data on host.
Implements celeritas::ParamsDataInterface< StatusCheckParamsData >.
|
inlinefinalvirtual |
Label for the auxiliary data and action.
Implements celeritas::AuxParamsInterface.
template void celeritas::StatusChecker::step | ( | ActionId | prev_action, |
CoreParams const & | , | ||
CoreState< M > & | state | ||
) | const |
Execute with with the last action's ID and the state.
This must be called after both create_state
and begin_run
.