chombo-discharge
CD_MemoryReport.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2021 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_MemoryReport_H
13 #define CD_MemoryReport_H
14 
15 // Chombo includes
16 #include <REAL.H>
17 #include <Vector.H>
18 
19 // Our includes
20 #include <CD_NamespaceHeader.H>
21 
25 namespace MemoryReport {
26 
30  void
32 
40  void
41  getMaxMinMemoryUsage(Real& a_maxPeak, Real& a_minPeak, Real& a_maxUnfreed, Real& a_minUnfreed);
42 
49  void
50  getMemoryUsage(Vector<Real>& a_peak, Vector<Real>& a_unfreed);
51 } // namespace MemoryReport
52 
53 #include <CD_NamespaceFooter.H>
54 
55 #endif
Namespace containing utility functions for reporting memory usage in various formats.
Definition: CD_MemoryReport.H:25
void getMemoryUsage(Vector< Real > &a_peak, Vector< Real > &a_unfreed)
Get peak and unfreed memory usage per rank.
Definition: CD_MemoryReport.cpp:83
void getMaxMinMemoryUsage()
Print the global maximum and minimum memory usage. This includes peak memory and unfreed memory.
Definition: CD_MemoryReport.cpp:23