Kokkos Node API and Local Linear Algebra Kernels Version of the Day
Public Member Functions
TSQR::TimeStats Class Reference

Collect running statistics. More...

#include <Tsqr_TimeStats.hpp>

List of all members.

Public Member Functions

void init ()
void update (const double curTime)
void print (std::ostream &out, const bool humanReadable, const std::string &label, const std::string &labelLabel, const bool printHeaders) const
double min () const
double max () const
double mean () const
double total () const
int count () const
 TimeStats (const int newCount, const double newMin, const double newMax, const double newMean, const double newTotal)

Detailed Description

Collect running statistics.

TimeStats collects running statistics on a particular timing, which is collected count() times. When you get a new timing, call update().

Definition at line 18 of file Tsqr_TimeStats.hpp.

Constructor & Destructor Documentation

TSQR::TimeStats::TimeStats ( const int  newCount,
const double  newMin,
const double  newMax,
const double  newMean,
const double  newTotal 
) [inline]

Construct a TimeStats object from its constituent data. This is useful for computing global statistics over many MPI processes, or for otherwise combining different TimeStats objects.

This design is suboptimal, because it makes it hard for new statistics to be added to the class.

Definition at line 77 of file Tsqr_TimeStats.hpp.

Member Function Documentation

void TSQR::TimeStats::init ( )

Reset the statistics

Definition at line 12 of file Tsqr_TimeStats.cpp.

void TSQR::TimeStats::update ( const double  curTime)

Add a new data point and update the running statistics

Definition at line 21 of file Tsqr_TimeStats.cpp.

void TSQR::TimeStats::print ( std::ostream &  out,
const bool  humanReadable,
const std::string &  label,
const std::string &  labelLabel,
const bool  printHeaders 
) const

Print to out

out[in/out] Output stream to which to print
humanReadable[in] Whether to print in a format easy for humans to read, or easy for automatic parsing
label[in] If not humanReadable, then print this string as a row identifier at the beginning of the row
labelLabel[in] If not humanReadable, then use this as the column header for the "label" (first) column
printHeaders[in] If not humanReadable, then print column headers, preceded by a "%" so that the parser will ignore the line

Definition at line 38 of file Tsqr_TimeStats.cpp.

double TSQR::TimeStats::min ( ) const [inline]

Minimum value seen thus far (+Inf if no data has been collected)

Definition at line 52 of file Tsqr_TimeStats.hpp.

double TSQR::TimeStats::max ( ) const [inline]

Maximum value seen thus far (-Inf if no data has been collected)

Definition at line 56 of file Tsqr_TimeStats.hpp.

double TSQR::TimeStats::mean ( ) const [inline]

Arithmetic mean thus far (0 if no data has been collected)

Definition at line 60 of file Tsqr_TimeStats.hpp.

double TSQR::TimeStats::total ( ) const [inline]

Total thus far (0 if no data has been collected)

Definition at line 64 of file Tsqr_TimeStats.hpp.

int TSQR::TimeStats::count ( ) const [inline]

Count of data points collected thus far

Definition at line 68 of file Tsqr_TimeStats.hpp.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends