LBANN  0.103.0
LivermoreBigArtificialNeuralNetworkToolkit
lbann::TimerMap Class Reference

A nesting inclusive-timer. More...

#include <timer_map.hpp>

Collaboration diagram for lbann::TimerMap:
[legend]

Public Member Functions

 TimerMap (std::string const &key)
 
std::string const & key () const noexcept
 
AccumulatingTimertimer () noexcept
 
AccumulatingTimer const & timer () const noexcept
 
TimerMapscope (std::string const &key)
 
TimerMap const & scope (std::string const &key) const
 
void print (std::ostream &os) const
 

Private Member Functions

void print_impl (std::ostream &os, unsigned width, unsigned indent) const
 

Private Attributes

std::string m_key
 
AccumulatingTimer m_timer
 
std::list< TimerMapm_subscopes
 

Detailed Description

A nesting inclusive-timer.

This is useful for timing subsections of an algorithm, for example. The timing information can be summarized in a visually structured format. The inclusive time is explicit, and the exclusive time is easily inferred by subtracting sub-timers' inclusive time from this inclusive time.

More documentation goes here.

Definition at line 51 of file timer_map.hpp.

Constructor & Destructor Documentation

◆ TimerMap()

lbann::TimerMap::TimerMap ( std::string const &  key)
inline

Definition at line 93 of file timer_map.hpp.

Member Function Documentation

◆ key()

std::string const & lbann::TimerMap::key ( ) const
inlinenoexcept

Definition at line 95 of file timer_map.hpp.

Here is the caller graph for this function:

◆ print()

void lbann::TimerMap::print ( std::ostream &  os) const

◆ print_impl()

void lbann::TimerMap::print_impl ( std::ostream &  os,
unsigned  width,
unsigned  indent 
) const
private

◆ scope() [1/2]

auto lbann::TimerMap::scope ( std::string const &  key)
inline

Definition at line 102 of file timer_map.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scope() [2/2]

TimerMap const& lbann::TimerMap::scope ( std::string const &  key) const

◆ timer() [1/2]

AccumulatingTimer & lbann::TimerMap::timer ( )
inlinenoexcept

Definition at line 96 of file timer_map.hpp.

Here is the caller graph for this function:

◆ timer() [2/2]

AccumulatingTimer const & lbann::TimerMap::timer ( ) const
inlinenoexcept

Definition at line 97 of file timer_map.hpp.

Member Data Documentation

◆ m_key

std::string lbann::TimerMap::m_key
private

Definition at line 69 of file timer_map.hpp.

◆ m_subscopes

std::list<TimerMap> lbann::TimerMap::m_subscopes
private

Definition at line 71 of file timer_map.hpp.

◆ m_timer

AccumulatingTimer lbann::TimerMap::m_timer
private

Definition at line 70 of file timer_map.hpp.


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