43 #ifndef PANZER_MEMUTILS_HPP
44 #define PANZER_MEMUTILS_HPP
46 #include <Teuchos_Comm.hpp>
55 MemUsage(
size_t inCurrMin = 0,
size_t inCurrMax = 0,
size_t inCurrTot = 0,
56 size_t inPeakMin = 0,
size_t inPeakMax = 0,
size_t inPeakTot = 0)
95 void pretty(std::ostream& s,
size_t num);
113 #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.