gem5  v21.1.0.2
Public Member Functions | Private Attributes | List of all members
gem5::statistics::ValueBase< Derived > Class Template Reference

#include <statistics.hh>

Inheritance diagram for gem5::statistics::ValueBase< Derived >:
gem5::statistics::DataWrap< Derived, ScalarInfoProxy > gem5::statistics::InfoAccess

Public Member Functions

 ValueBase (Group *parent, const char *name, const units::Base *unit, const char *desc)
 
 ~ValueBase ()
 
template<class T >
Derived & scalar (T &value)
 
template<class T >
Derived & functor (const T &func)
 
template<class T >
Derived & functor (T &func)
 
template<class T , class V >
Derived & method (T *obj, V(T::*method)() const)
 Extended functor that calls the specified method of the provided object. More...
 
Counter value ()
 
Result result () const
 
Result total () const
 
size_type size () const
 
std::string str () const
 
bool zero () const
 
bool check () const
 
void prepare ()
 
void reset ()
 
- Public Member Functions inherited from gem5::statistics::DataWrap< Derived, ScalarInfoProxy >
const Infoinfo () const
 
 DataWrap ()=delete
 
 DataWrap (const DataWrap &)=delete
 
 DataWrap (Group *parent, const char *name, const units::Base *unit, const char *desc)
 
DataWrapoperator= (const DataWrap &)=delete
 
Derived & name (const std::string &name)
 Set the name and marks this stat to print at the end of simulation. More...
 
const std::string & name () const
 
Derived & setSeparator (const std::string &_sep)
 Set the character(s) used between the name and vector number on vectors, dist, etc. More...
 
const std::string & setSeparator () const
 
Derived & unit (const units::Base *_unit)
 Set the unit of the stat. More...
 
Derived & desc (const std::string &_desc)
 Set the description and marks this stat to print at the end of simulation. More...
 
Derived & precision (int _precision)
 Set the precision and marks this stat to print at the end of simulation. More...
 
Derived & flags (Flags _flags)
 Set the flags and marks this stat to print at the end of simulation. More...
 
Derived & prereq (const Stat &prereq)
 Set the prerequisite stat and marks this stat to print at the end of simulation. More...
 
- Public Member Functions inherited from gem5::statistics::InfoAccess
 InfoAccess ()
 
void reset ()
 Reset the stat to the default state. More...
 
bool zero () const
 
bool check () const
 Check that this stat has been set up properly and is ready for use. More...
 

Private Attributes

ProxyInfoproxy
 

Additional Inherited Members

- Public Types inherited from gem5::statistics::DataWrap< Derived, ScalarInfoProxy >
typedef ScalarInfoProxy< Derived > Info
 
- Protected Member Functions inherited from gem5::statistics::DataWrap< Derived, ScalarInfoProxy >
Derived & self ()
 
Infoinfo ()
 
- Protected Member Functions inherited from gem5::statistics::InfoAccess
void setInfo (Group *parent, Info *info)
 Set up an info class for this statistic. More...
 
void setParams (const StorageParams *params)
 Save Storage class parameters if any. More...
 
void setInit ()
 Save Storage class parameters if any. More...
 
Infoinfo ()
 Grab the information class for this statistic. More...
 
const Infoinfo () const
 Grab the information class for this statistic. More...
 

Detailed Description

template<class Derived>
class gem5::statistics::ValueBase< Derived >

Definition at line 711 of file statistics.hh.

Constructor & Destructor Documentation

◆ ValueBase()

template<class Derived >
gem5::statistics::ValueBase< Derived >::ValueBase ( Group parent,
const char *  name,
const units::Base unit,
const char *  desc 
)
inline

Definition at line 717 of file statistics.hh.

◆ ~ValueBase()

template<class Derived >
gem5::statistics::ValueBase< Derived >::~ValueBase ( )
inline

Definition at line 725 of file statistics.hh.

Member Function Documentation

◆ check()

template<class Derived >
bool gem5::statistics::ValueBase< Derived >::check ( ) const
inline

Definition at line 777 of file statistics.hh.

◆ functor() [1/2]

template<class Derived >
template<class T >
Derived& gem5::statistics::ValueBase< Derived >::functor ( const T &  func)
inline

◆ functor() [2/2]

template<class Derived >
template<class T >
Derived& gem5::statistics::ValueBase< Derived >::functor ( T &  func)
inline

Definition at line 747 of file statistics.hh.

◆ method()

template<class Derived >
template<class T , class V >
Derived& gem5::statistics::ValueBase< Derived >::method ( T *  obj,
V(T::*)() const  method 
)
inline

Extended functor that calls the specified method of the provided object.

Parameters
objPointer to the object whose method should be called.
methodPointer of the function / method of the object.
Returns
Updated stats item.

Definition at line 763 of file statistics.hh.

Referenced by gem5::statistics::ValueBase< Value >::method(), gem5::PowerModel::PowerModel(), gem5::PowerModelState::PowerModelState(), and gem5::VoltageDomain::VoltageDomainStats::VoltageDomainStats().

◆ prepare()

template<class Derived >
void gem5::statistics::ValueBase< Derived >::prepare ( )
inline

Definition at line 778 of file statistics.hh.

◆ reset()

template<class Derived >
void gem5::statistics::ValueBase< Derived >::reset ( )
inline

Definition at line 779 of file statistics.hh.

◆ result()

template<class Derived >
Result gem5::statistics::ValueBase< Derived >::result ( ) const
inline

Definition at line 771 of file statistics.hh.

◆ scalar()

template<class Derived >
template<class T >
Derived& gem5::statistics::ValueBase< Derived >::scalar ( T &  value)
inline

◆ size()

template<class Derived >
size_type gem5::statistics::ValueBase< Derived >::size ( ) const
inline

Definition at line 773 of file statistics.hh.

◆ str()

template<class Derived >
std::string gem5::statistics::ValueBase< Derived >::str ( ) const
inline

Definition at line 775 of file statistics.hh.

◆ total()

template<class Derived >
Result gem5::statistics::ValueBase< Derived >::total ( ) const
inline

Definition at line 772 of file statistics.hh.

◆ value()

template<class Derived >
Counter gem5::statistics::ValueBase< Derived >::value ( )
inline

◆ zero()

template<class Derived >
bool gem5::statistics::ValueBase< Derived >::zero ( ) const
inline

Definition at line 776 of file statistics.hh.

Member Data Documentation

◆ proxy

template<class Derived >
ProxyInfo* gem5::statistics::ValueBase< Derived >::proxy
private

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

Generated on Tue Sep 21 2021 12:32:31 for gem5 by doxygen 1.8.17