xerus
a general purpose tensor library
xerus::PerformanceData Class Reference

Storage class for the performance data collected during an algorithm (typically iteration count, time and residual) More...

#include <performanceData.h>

Collaboration diagram for xerus::PerformanceData:

Classes

struct  DataPoint
 

Public Types

using ErrorFunction = std::function< double(const TTTensor &)>
 

Public Member Functions

 PerformanceData (const bool _printProgress=false, const bool _active=true)
 
 PerformanceData (const ErrorFunction &_errorFunction, const bool _printProgress=false, const bool _active=true)
 
void add (const size_t _itrCount, const value_t _residual, const TensorNetwork::RankTuple _ranks=TensorNetwork::RankTuple(), const size_t _flags=0)
 
void add (const size_t _itrCount, const value_t _residual, const TTTensor &_x, const size_t _flags=0)
 
void add (const value_t _residual, const TensorNetwork::RankTuple _ranks=TensorNetwork::RankTuple(), const size_t _flags=0)
 
void add (const value_t _residual, const TTTensor &_x, const size_t _flags=0)
 
void continue_timer ()
 
void dump_to_file (const std::string &_fileName) const
 
size_t get_elapsed_time () const
 
misc::LogHistogram get_histogram (const value_t _base, bool _assumeConvergence=false) const
 
size_t get_runtime () const
 
 operator bool () const
 
template<class T >
PerformanceDataoperator<< (const T &_info)
 The pipe operator allows to add everything that can be converted to string to the additional information in the header. More...
 
void reset ()
 
void start ()
 
void stop_timer ()
 

Public Attributes

const bool active
 
std::string additionalInformation
 
std::vector< DataPointdata
 
ErrorFunction errorFunction
 
bool printProgress
 
size_t startTime
 
size_t stopTime
 

Detailed Description

Storage class for the performance data collected during an algorithm (typically iteration count, time and residual)

Definition at line 43 of file performanceData.h.

Member Typedef Documentation

◆ ErrorFunction

using xerus::PerformanceData::ErrorFunction = std::function<double(const TTTensor&)>

Definition at line 61 of file performanceData.h.

Constructor & Destructor Documentation

◆ PerformanceData() [1/2]

xerus::PerformanceData::PerformanceData ( const bool  _printProgress = false,
const bool  _active = true 
)
inlineexplicit

Definition at line 71 of file performanceData.h.

◆ PerformanceData() [2/2]

xerus::PerformanceData::PerformanceData ( const ErrorFunction _errorFunction,
const bool  _printProgress = false,
const bool  _active = true 
)
inlineexplicit

Definition at line 74 of file performanceData.h.

Member Function Documentation

◆ add() [1/4]

void xerus::PerformanceData::add ( const size_t  _itrCount,
const value_t  _residual,
const TensorNetwork::RankTuple  _ranks = TensorNetwork::RankTuple(),
const size_t  _flags = 0 
)

Definition at line 34 of file performanceData.cpp.

◆ add() [2/4]

void xerus::PerformanceData::add ( const size_t  _itrCount,
const value_t  _residual,
const TTTensor _x,
const size_t  _flags = 0 
)

Definition at line 50 of file performanceData.cpp.

◆ add() [3/4]

void xerus::PerformanceData::add ( const value_t  _residual,
const TensorNetwork::RankTuple  _ranks = TensorNetwork::RankTuple(),
const size_t  _flags = 0 
)

Definition at line 72 of file performanceData.cpp.

◆ add() [4/4]

void xerus::PerformanceData::add ( const value_t  _residual,
const TTTensor _x,
const size_t  _flags = 0 
)

Definition at line 82 of file performanceData.cpp.

◆ continue_timer()

void xerus::PerformanceData::continue_timer ( )
inline

Definition at line 98 of file performanceData.h.

◆ dump_to_file()

void xerus::PerformanceData::dump_to_file ( const std::string &  _fileName) const

Definition at line 92 of file performanceData.cpp.

◆ get_elapsed_time()

size_t xerus::PerformanceData::get_elapsed_time ( ) const
inline

Definition at line 115 of file performanceData.h.

◆ get_histogram()

misc::LogHistogram xerus::PerformanceData::get_histogram ( const value_t  _base,
bool  _assumeConvergence = false 
) const

Definition at line 110 of file performanceData.cpp.

◆ get_runtime()

size_t xerus::PerformanceData::get_runtime ( ) const
inline

Definition at line 119 of file performanceData.h.

◆ operator bool()

xerus::PerformanceData::operator bool ( ) const
inline

Definition at line 135 of file performanceData.h.

◆ operator<<()

template<class T >
PerformanceData& xerus::PerformanceData::operator<< ( const T &  _info)
inline

The pipe operator allows to add everything that can be converted to string to the additional information in the header.

Definition at line 141 of file performanceData.h.

◆ reset()

void xerus::PerformanceData::reset ( )
inline

Definition at line 106 of file performanceData.h.

◆ start()

void xerus::PerformanceData::start ( )
inline

Definition at line 77 of file performanceData.h.

◆ stop_timer()

void xerus::PerformanceData::stop_timer ( )
inline

Definition at line 92 of file performanceData.h.

Member Data Documentation

◆ active

const bool xerus::PerformanceData::active

Definition at line 57 of file performanceData.h.

◆ additionalInformation

std::string xerus::PerformanceData::additionalInformation

Definition at line 68 of file performanceData.h.

◆ data

std::vector<DataPoint> xerus::PerformanceData::data

Definition at line 66 of file performanceData.h.

◆ errorFunction

ErrorFunction xerus::PerformanceData::errorFunction

Definition at line 62 of file performanceData.h.

◆ printProgress

bool xerus::PerformanceData::printProgress

Definition at line 59 of file performanceData.h.

◆ startTime

size_t xerus::PerformanceData::startTime

Definition at line 64 of file performanceData.h.

◆ stopTime

size_t xerus::PerformanceData::stopTime

Definition at line 65 of file performanceData.h.


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