Celeritas  0.5.0-86+4a8eea4
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. More...
 
Aux/action metadata interface
std::string_view label () const final
 Description of the action.
 
std::string_view description () const final
 Description of the action.
 
Aux params interface
AuxId aux_id () const final
 Build state data for a stream.
 
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
 Set host data at the beginning of a run.
 
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

Access data on host

HostRef const & host_ref () const final
 Access data on device.
 
DeviceRef const & device_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
 Dispatch a "ref" call to host or device data.
 

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
 ActionInterface ()=default
 
 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 an "explicit" action. It's meant to be used inside the ActionSequence itself, called after every action.

Member Function Documentation

◆ 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: