OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Statistics< T > Class Template Reference

#include <Statistics.h>

Inheritance diagram for Statistics< T >:
Collaboration diagram for Statistics< T >:

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.

References name, and stat_name_.

◆ ~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,
T change_by_value )
inline

Definition at line 44 of file Statistics.h.

References name, and statistics_.

◆ dumpStatistics() [1/2]

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

Definition at line 58 of file Statistics.h.

References stat_name_, statistics_, and sum().

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 stat_name_, statistics_, and sum().

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_.

◆ registerStatistic()

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

Definition at line 36 of file Statistics.h.

References name, and statistics_.

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 dumpStatistics(), dumpStatistics(), and Statistics().

◆ statistics_

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

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