Celeritas 0.7+972e6cd
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
celeritas::StepTimes Class Reference

Manage state data for recording step times. More...

#include <StepTimes.hh>

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

Public Types

Type aliases
using SPAuxParamsRegistry = std::shared_ptr< AuxParamsRegistry >
 
using VecDbl = std::vector< double >
 
- Public Types inherited from celeritas::AuxParamsInterface
using UPState = std::unique_ptr< AuxStateInterface >
 Default destructor.
 

Public Member Functions

 StepTimes (AuxId, std::string label)
 Construct from ID and label.
 
StepTimesState conststate (AuxStateVec const &) const
 Access the state.
 
StepTimesStatestate (AuxStateVec &) const
 Access the state (mutable).
 
Aux interface
std::string_view label () const final
 Short name for the aux data.
 
AuxId aux_id () const final
 Index of this class instance in its registry.
 
UPState create_state (MemSpace, StreamId, size_type) const final
 Build core state data for a stream.
 
- Public Member Functions inherited from celeritas::AuxParamsInterface
virtual ~AuxParamsInterface ()
 Default destructor.
 

Static Public Member Functions

static std::shared_ptr< StepTimesmake_and_insert (SPAuxParamsRegistry const &, std::string label)
 Construct and add to the aux registry.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::AuxParamsInterface
 AuxParamsInterface ()=default
 
 AuxParamsInterface (AuxParamsInterface const &)=default
 Default destructor.
 
AuxParamsInterfaceoperator= (AuxParamsInterface const &)=default
 Default destructor.
 
 AuxParamsInterface (AuxParamsInterface &&)=default
 Default destructor.
 
AuxParamsInterfaceoperator= (AuxParamsInterface &&)=default
 Default destructor.
 

Detailed Description

Manage state data for recording step times.

This class allocates thread-local state data that can be used to record the time of each step on each stream over the run. Because the class that invokes the sequence of steps should be shared across threads, the step times are stored as auxiliary data rather than locally in that class.

Member Function Documentation

◆ aux_id()

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

Index of this class instance in its registry.

Implements celeritas::AuxParamsInterface.

◆ create_state()

auto celeritas::StepTimes::create_state ( MemSpace  ,
StreamId  ,
size_type   
) const
finalvirtual

Build core state data for a stream.

Todo:
Construct with limits.step_iters to limit capacity?

Implements celeritas::AuxParamsInterface.

◆ label()

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

Short name for the aux data.

Implements celeritas::AuxParamsInterface.


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