Celeritas 0.7.0-dev.194+develop.0df4cab59
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
celeritas::ActionTimes Class Reference

Manage state data for accumulating action times. More...

#include <ActionTimes.hh>

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

Public Types

Type aliases
using SPActionRegistry = std::shared_ptr< ActionRegistry >
 
using SPAuxParamsRegistry = std::shared_ptr< AuxParamsRegistry >
 
using MapStrDbl = std::unordered_map< std::string, double >
 
- Public Types inherited from celeritas::AuxParamsInterface
using UPState = std::unique_ptr< AuxStateInterface >
 Default destructor.
 

Public Member Functions

 ActionTimes (AuxId, SPActionRegistry const &, std::string label)
 Construct from ID, actions and label.
 
ActionTimesState conststate (AuxStateVec const &) const
 Access the state.
 
ActionTimesStatestate (AuxStateVec &) const
 Access the state (mutable).
 
MapStrDbl get_action_times (AuxStateVec const &) const
 Create a map of action label tp accumulated time.
 
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< ActionTimesmake_and_insert (SPActionRegistry const &, SPAuxParamsRegistry const &, std::string label)
 Construct and add to the aux registry.
 

Additional Inherited Members

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

Detailed Description

Manage state data for accumulating action times.

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

Todo:
Add an end-gather action to merge across states?

Member Function Documentation

◆ aux_id()

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

Index of this class instance in its registry.

Implements celeritas::AuxParamsInterface.

◆ create_state()

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

Build core state data for a stream.

Implements celeritas::AuxParamsInterface.

◆ label()

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

Short name for the aux data.

Implements celeritas::AuxParamsInterface.


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