|
FEAT 3
Finite Element Analysis Toolbox
|
Memory usage info object. More...
#include <memory_usage.hpp>
Public Member Functions | |
| std::size_t | get_current_physical () const |
| Returns current (last stamp call) physical memory. More... | |
| std::size_t | get_current_swap () const |
| Returns current (last stamp call) swap memory. More... | |
| std::size_t | get_current_virtual () const |
| Returns current (last stamp call) virtual memory. More... | |
| String | get_formatted_memory_usage () const |
| Retrieve formatted memory usage string. More... | |
| std::size_t | get_peak_physical () const |
| Returns peak physical memory. More... | |
| std::size_t | get_peak_virtual () const |
| Returns peak virtual memory. More... | |
| void | stamp () |
| update the memory usage statistics with current data More... | |
Static Public Member Functions | |
| static String | format_peak_physical_usage (const Dist::Comm &comm) |
| Returns the formatted peak physical memory usage over an entire communicator. More... | |
Private Attributes | |
| std::size_t | _current_physical |
| std::size_t | _current_swap |
| std::size_t | _current_virtual |
| std::size_t | _peak_physical |
| std::size_t | _peak_virtual |
Memory usage info object.
This class is used to store and report memory usage statistics.
Definition at line 42 of file memory_usage.hpp.
|
inline |
Definition at line 52 of file memory_usage.hpp.
|
inlinestatic |
Returns the formatted peak physical memory usage over an entire communicator.
This function formats the sum of the peak memory usage over all ranks in the communicator as well as the maximum and the minimum peak memory usage.
Definition at line 227 of file memory_usage.hpp.
References FEAT::Dist::Comm::allreduce(), get_peak_physical(), FEAT::Dist::op_max, FEAT::Dist::op_min, FEAT::Dist::op_sum, and FEAT::stringify_bytes().
|
inline |
Returns current (last stamp call) physical memory.
Definition at line 179 of file memory_usage.hpp.
|
inline |
Returns current (last stamp call) swap memory.
Definition at line 203 of file memory_usage.hpp.
|
inline |
Returns current (last stamp call) virtual memory.
Definition at line 191 of file memory_usage.hpp.
|
inline |
Retrieve formatted memory usage string.
Definition at line 209 of file memory_usage.hpp.
References FEAT::String::pad_back(), and FEAT::stringify().
Referenced by FEAT::Control::Statistics::report().
|
inline |
Returns peak physical memory.
Definition at line 185 of file memory_usage.hpp.
Referenced by format_peak_physical_usage().
|
inline |
Returns peak virtual memory.
Definition at line 197 of file memory_usage.hpp.
|
inline |
update the memory usage statistics with current data
Definition at line 63 of file memory_usage.hpp.
References FEAT::Windows::query_memory_usage(), FEAT::String::split_by_whitespaces(), FEAT::String::starts_with(), XABORTM, and XASSERTM.
|
private |
Definition at line 45 of file memory_usage.hpp.
|
private |
Definition at line 49 of file memory_usage.hpp.
|
private |
Definition at line 47 of file memory_usage.hpp.
|
private |
Definition at line 46 of file memory_usage.hpp.
|
private |
Definition at line 48 of file memory_usage.hpp.