Zoltan2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
Zoltan2::MetricOutputManager< T > Class Template Reference

MetricOutputManager handles output of profiling messages. More...

#include <Zoltan2_MetricOutputManager.hpp>

Public Member Functions

 MetricOutputManager (int rank, bool doPrinting, std::ofstream &Os, bool metricsOn, std::string units=std::string(""), int width=10)
 Constructor for output to a file. More...
 
 MetricOutputManager (int rank, bool doPrinting, std::ostream &Os, bool metricsOn, std::string units=std::string(""), int width=10)
 Constructor for output to a stream. More...
 
 ~MetricOutputManager ()
 Destructor. More...
 
std::ostream * getOStream () const
 Return the output stream for messages. More...
 
bool getMetricsOn () const
 Return true if any process outputs metrics. More...
 
void print (const std::string &msg, const T val)
 Print a line of information. More...
 
void print (const char *msg, T val)
 A version of print that takes char to avoid the cost of converting char * to string. More...
 

Detailed Description

template<typename T>
class Zoltan2::MetricOutputManager< T >

MetricOutputManager handles output of profiling messages.

The template parameter is the data type of the value that is being measured. An Environment has a MetricOutputManager for memory profiling.

Parameters governing memory output:

For more information see at their definitions in createAllParameters() in Zoltan2_Parameters.cpp.

Definition at line 38 of file Zoltan2_MetricOutputManager.hpp.

Constructor & Destructor Documentation

template<typename T>
Zoltan2::MetricOutputManager< T >::MetricOutputManager ( int  rank,
bool  doPrinting,
std::ofstream &  Os,
bool  metricsOn,
std::string  units = std::string(""),
int  width = 10 
)
inline

Constructor for output to a file.

Parameters
rankthe MPI rank of this process.
doPrintingtrue if this process outputs messages.
messageOsthe output stream for messages.
metricsOntrue if any process outputs messages.
unitsname of units for metrics printed
widthfield width for metric value

It is the caller's responsibility to close and free the ofstream.

Definition at line 54 of file Zoltan2_MetricOutputManager.hpp.

template<typename T>
Zoltan2::MetricOutputManager< T >::MetricOutputManager ( int  rank,
bool  doPrinting,
std::ostream &  Os,
bool  metricsOn,
std::string  units = std::string(""),
int  width = 10 
)
inline

Constructor for output to a stream.

Parameters
rankthe MPI rank of this process.
doPrintingtrue if this process outputs messages.
messageOsthe output stream for messages.
metricsOntrue if any process outputs messages.
unitsname of units for metrics printed
widthfield width for metric value

Definition at line 71 of file Zoltan2_MetricOutputManager.hpp.

template<typename T>
Zoltan2::MetricOutputManager< T >::~MetricOutputManager ( )
inline

Destructor.

Definition at line 79 of file Zoltan2_MetricOutputManager.hpp.

Member Function Documentation

template<typename T>
std::ostream* Zoltan2::MetricOutputManager< T >::getOStream ( ) const
inline

Return the output stream for messages.

Definition at line 83 of file Zoltan2_MetricOutputManager.hpp.

template<typename T>
bool Zoltan2::MetricOutputManager< T >::getMetricsOn ( ) const
inline

Return true if any process outputs metrics.

Definition at line 87 of file Zoltan2_MetricOutputManager.hpp.

template<typename T>
void Zoltan2::MetricOutputManager< T >::print ( const std::string &  msg,
const T  val 
)
inline

Print a line of information.

Parameters
msga message to go with the information
valthe value to print

Definition at line 93 of file Zoltan2_MetricOutputManager.hpp.

template<typename T>
void Zoltan2::MetricOutputManager< T >::print ( const char *  msg,
val 
)
inline

A version of print that takes char to avoid the cost of converting char * to string.

Parameters
msga message to go with the information
unitsthe units in which the value is measured
valthe value to print

Definition at line 114 of file Zoltan2_MetricOutputManager.hpp.


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