11 #ifndef PANZER_MEMUTILS_HPP
12 #define PANZER_MEMUTILS_HPP
14 #include <Teuchos_Comm.hpp>
23 MemUsage(
size_t inCurrMin = 0,
size_t inCurrMax = 0,
size_t inCurrTot = 0,
24 size_t inPeakMin = 0,
size_t inPeakMax = 0,
size_t inPeakTot = 0)
63 void pretty(std::ostream& s,
size_t num);
81 #endif // PANZER_MEMUTILS_HPP
MemUsage(size_t inCurrMin=0, size_t inCurrMax=0, size_t inCurrTot=0, size_t inPeakMin=0, size_t inPeakMax=0, size_t inPeakTot=0)
The memory usage information.
MemUsage getCurrentRSS(const Teuchos::Comm< int > &comm)
MemUsage getMemoryUsage(const Teuchos::Comm< int > &comm)
Get memory usage in B.
MemUsage & operator*=(const size_t &that)
MemUsage operator+(const MemUsage &that) const
MemUsage getPeakRSS(const Teuchos::Comm< int > &comm)
void pretty(std::ostream &s, size_t num)
MemUsage operator-(const MemUsage &that) const
MemUsage & operator/=(const size_t &that)
void printMemoryUsage(std::ostream &s, const Teuchos::Comm< int > &comm)
Print memory usage to stream.
MemUsage reduceMemUsage(size_t &mem, const Teuchos::Comm< int > &comm, const MemUsageType &type)
Reduce the memory usage over all the processors.