Celeritas 0.7.0-dev.127+develop.e63889793
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
celeritas::StatusChecker Class Referencefinal

Verify a consistent simulation state after performing an action. More...

#include <StatusChecker.hh>

Inheritance diagram for celeritas::StatusChecker:
Inheritance graph
[legend]

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 consthost_ref () const final
 Access data on host.
 
DeviceRef constdevice_ref () const final
 Access data on device.
 
- Public Member Functions inherited from celeritas::AuxParamsInterface
virtual ~AuxParamsInterface ()
 Default destructor.
 
- Public Member Functions inherited from celeritas::BeginRunActionInterface< P, S >
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.
 
- Public Member Functions inherited from celeritas::ActionInterface
virtual ~ActionInterface () noexcept=0
 Default destructor.
 
- Public Member Functions inherited from celeritas::ParamsDataInterface< StatusCheckParamsData >
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< StatusCheckermake_and_insert (CoreParams const &core)
 Construct and add to core params.
 

Additional Inherited Members

- Public Types inherited from celeritas::AuxParamsInterface
using UPState = std::unique_ptr< AuxStateInterface >
 Default destructor.
 
- Public Types inherited from celeritas::ActionTypeTraits< P, S >
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 >
 
- Public Types inherited from celeritas::ParamsDataInterface< StatusCheckParamsData >
using HostRef = HostCRef< StatusCheckParamsData >
 
using DeviceRef = DeviceCRef< StatusCheckParamsData >
 
- Protected Member Functions inherited from celeritas::AuxParamsInterface
 AuxParamsInterface ()=default
 
 CELER_DEFAULT_COPY_MOVE (AuxParamsInterface)
 Default destructor.
 
- Protected Member Functions inherited from celeritas::ActionInterface
 CELER_DEFAULT_COPY_MOVE (ActionInterface)
 
- Protected Member Functions inherited from celeritas::ParamsDataInterface< StatusCheckParamsData >
 CELER_DEFAULT_COPY_MOVE (ParamsDataInterface)
 

Detailed Description

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.

Member Function Documentation

◆ action_id()

ActionId celeritas::StatusChecker::action_id ( ) const
inlinefinalvirtual

Index of this class instance in its registry.

Implements celeritas::ActionInterface.

◆ aux_id()

AuxId celeritas::StatusChecker::aux_id ( ) const
inlinefinalvirtual

Index of this class instance in its registry.

Implements celeritas::AuxParamsInterface.

◆ create_state()

auto celeritas::StatusChecker::create_state ( MemSpace  m,
StreamId  id,
size_type  size 
) const
finalvirtual

Build state data for a stream.

Implements celeritas::AuxParamsInterface.

◆ description()

std::string_view celeritas::StatusChecker::description ( ) const
finalvirtual

Description of the action.

Implements celeritas::ActionInterface.

◆ device_ref()

DeviceRef const & celeritas::StatusChecker::device_ref ( ) const
inlinefinalvirtual

Access data on device.

Implements celeritas::ParamsDataInterface< StatusCheckParamsData >.

◆ host_ref()

HostRef const & celeritas::StatusChecker::host_ref ( ) const
inlinefinalvirtual

◆ label()

std::string_view celeritas::StatusChecker::label ( ) const
inlinefinalvirtual

Label for the auxiliary data and action.

Implements celeritas::AuxParamsInterface.

◆ step()

template<MemSpace M>
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 .


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