OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Member Functions | Private Types | Private Attributes | List of all members
Statistics< T > Class Template Reference

#include <Statistics.h>

Public Member Functions

 Statistics (std::string name)
 
 ~Statistics ()
 
void registerStatistic (std::string name, T initial_value=0)
 
void changeStatisticBy (std::string name, T change_by_value)
 
getStatisticValue (std::string name)
 
void dumpStatistics ()
 
void dumpStatistics (std::ostringstream &stream)
 

Private Types

typedef std::map< std::string, T > statistics_t
 
typedef std::map< std::string, T >::iterator statistics_iterator_t
 

Private Attributes

statistics_t statistics_
 
std::string stat_name_
 

Detailed Description

template<typename T>
class Statistics< T >

Definition at line 29 of file Statistics.h.

Member Typedef Documentation

◆ statistics_iterator_t

template<typename T >
typedef std::map<std::string, T>::iterator Statistics< T >::statistics_iterator_t
private

Definition at line 88 of file Statistics.h.

◆ statistics_t

template<typename T >
typedef std::map<std::string, T> Statistics< T >::statistics_t
private

Definition at line 87 of file Statistics.h.

Constructor & Destructor Documentation

◆ Statistics()

template<typename T >
Statistics< T >::Statistics ( std::string  name)
inline

Definition at line 33 of file Statistics.h.

◆ ~Statistics()

template<typename T >
Statistics< T >::~Statistics ( )
inline

Definition at line 34 of file Statistics.h.

Member Function Documentation

◆ changeStatisticBy()

template<typename T >
void Statistics< T >::changeStatisticBy ( std::string  name,
change_by_value 
)
inline

Definition at line 44 of file Statistics.h.

References endl(), name, and Statistics< T >::statistics_.

Here is the call graph for this function:

◆ dumpStatistics() [1/2]

template<typename T >
void Statistics< T >::dumpStatistics ( )
inline

Definition at line 58 of file Statistics.h.

References endl(), Statistics< T >::stat_name_, Statistics< T >::statistics_, sum(), and Attrib::Legacy::Distribution::T.

Here is the call graph for this function:

◆ dumpStatistics() [2/2]

template<typename T >
void Statistics< T >::dumpStatistics ( std::ostringstream &  stream)
inline

Definition at line 71 of file Statistics.h.

References endl(), Statistics< T >::stat_name_, Statistics< T >::statistics_, sum(), and Attrib::Legacy::Distribution::T.

Here is the call graph for this function:

◆ getStatisticValue()

template<typename T >
T Statistics< T >::getStatisticValue ( std::string  name)
inline

Definition at line 54 of file Statistics.h.

References name, and Statistics< T >::statistics_.

◆ registerStatistic()

template<typename T >
void Statistics< T >::registerStatistic ( std::string  name,
initial_value = 0 
)
inline

Definition at line 36 of file Statistics.h.

References endl(), name, and Statistics< T >::statistics_.

Here is the call graph for this function:

Member Data Documentation

◆ stat_name_

template<typename T >
std::string Statistics< T >::stat_name_
private

Definition at line 91 of file Statistics.h.

Referenced by Statistics< T >::dumpStatistics().

◆ statistics_

template<typename T >
statistics_t Statistics< T >::statistics_
private

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