Zoltan2 Version of the Day
Public Member Functions
Zoltan2::MetricOutputManager< T > Class Template Reference

MetricOutputManager handles output of profiling messages. More...

#include <Zoltan2_MetricOutputManager.hpp>

List of all members.

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

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 74 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 90 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 107 of file Zoltan2_MetricOutputManager.hpp.

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

Destructor.

Definition at line 115 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 119 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 123 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 129 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 150 of file Zoltan2_MetricOutputManager.hpp.


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