Celeritas 0.6.0-rc.2.10+develop.de0a3a05
Loading...
Searching...
No Matches
Public Member Functions | List of all members
celeritas::TimeOutput Class Referencefinal

Collect timing results and output at the end of a run. More...

#include <TimeOutput.hh>

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

Public Types

Type aliases
using MapStrReal = std::unordered_map< std::string, real_type >
 
- Public Types inherited from celeritas::OutputInterface
enum class  Category {
  input , result , system , internal ,
  size_
}
 Output category (TODO: could replace with string/cstring?)
 

Public Member Functions

 TimeOutput (size_type num_threads)
 Construct with number of threads.
 
void RecordActionTime (MapStrReal &&time)
 Record the accumulated action times.
 
void RecordEventTime (real_type time)
 Record the time for the event.
 
void RecordSetupTime (real_type time)
 Record the time for setting up Celeritas.
 
void RecordTotalTime (real_type time)
 Record the total time spent in transport and hit I/O (excluding setup).
 
Output interface
Category category () const final
 Category of data to write.
 
std::string_view label () const final
 Key for the entry inside the category.
 
void output (JsonPimpl *) const final
 Write output to the given JSON object.
 

Detailed Description

Collect timing results and output at the end of a run.

Setup time and total time are always recorded. Event time is recorded if BeginOfEventAction and EndOfEventAction are called. The accumulated action times are recorded when running on the host or on the device with synchronization enabled.

All results are in units of seconds.

Member Function Documentation

◆ category()

Category celeritas::TimeOutput::category ( ) const
inlinefinalvirtual

Category of data to write.

Implements celeritas::OutputInterface.

◆ label()

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

Key for the entry inside the category.

Implements celeritas::OutputInterface.

◆ output()

void celeritas::TimeOutput::output ( JsonPimpl j) const
finalvirtual

Write output to the given JSON object.

Implements celeritas::OutputInterface.

◆ RecordSetupTime()

void celeritas::TimeOutput::RecordSetupTime ( real_type  time)

Record the time for setting up Celeritas.

This should be called once by the master thread.

◆ RecordTotalTime()

void celeritas::TimeOutput::RecordTotalTime ( real_type  time)

Record the total time spent in transport and hit I/O (excluding setup).

This should be called once by the master thread.


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