cpp-common
Public Member Functions | Private Attributes | Friends | List of all members
nvsl::StatsScalar Class Reference

Represents a single stat with a name and a description. More...

#include <stats.hh>

Inheritance diagram for nvsl::StatsScalar:
Inheritance graph
[legend]
Collaboration diagram for nvsl::StatsScalar:
Collaboration graph
[legend]

Public Member Functions

 StatsScalar (bool reg=true)
 
void init (const std::string &name, const std::string &desc, bool is_time=false, time_unit unit=time_unit::any_unit)
 
StatsScalaroperator+= (const auto rhs)
 
double avg () const override
 Get the average value per operation.
 
std::string str () const override
 Get the string representation of the stat.
 
std::string latex (const std::string &prefix="") const override
 
 StatsScalar (bool reg=true)
 
void init (const std::string &name, const std::string &desc, bool is_time=false, time_unit unit=time_unit::any_unit)
 
StatsScalaroperator+= (const auto rhs)
 
double avg () const override
 Get the average value per operation.
 
std::string str () const override
 Get the string representation of the stat.
 
std::string latex (const std::string &prefix="") const override
 
- Public Member Functions inherited from nvsl::StatsBase
 StatsBase (bool reg)
 
void init (const std::string &name, const std::string &desc)
 
 StatsBase (bool reg)
 
void init (const std::string &name, const std::string &desc)
 

Private Attributes

double total
 
size_t count
 
bool is_time
 
time_unit unit
 

Friends

StatsScalar operator+ (StatsScalar lhs, const auto rhs)
 
StatsScalar operator+ (StatsScalar lhs, const auto rhs)
 

Additional Inherited Members

- Protected Attributes inherited from nvsl::StatsBase
std::string stat_name
 
std::string stat_desc
 

Detailed Description

Represents a single stat with a name and a description.

Definition at line 229 of file stats.hh.


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