|
FEAT 3
Finite Element Analysis Toolbox
|
Memory usage info object. More...
#include <memory_usage.hpp>
Public Types | |
| enum | memory_type : std::uint8_t { peak_physical = 0 , cur_physical = 1 , peak_virtual = 2 , cur_virtual = 3 , cur_swap = 4 , size = 5 } |
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... | |
| String | get_formatted_memory_usage (const Dist::Comm &comm, memory_type mem_type) const |
| 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 const char * | format (memory_type type) |
| 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::array< std::size_t, memory_type::size > | _memory |
Memory usage info object.
This class is used to store and report memory usage statistics.
Definition at line 43 of file memory_usage.hpp.
| enum FEAT::MemoryUsage::memory_type : std::uint8_t |
Definition at line 46 of file memory_usage.hpp.
|
inline |
Definition at line 78 of file memory_usage.hpp.
|
inlinestatic |
Definition at line 56 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 260 of file memory_usage.hpp.
References get_formatted_memory_usage().
|
inline |
Returns current (last stamp call) physical memory.
Definition at line 202 of file memory_usage.hpp.
|
inline |
Returns current (last stamp call) swap memory.
Definition at line 226 of file memory_usage.hpp.
|
inline |
Returns current (last stamp call) virtual memory.
Definition at line 214 of file memory_usage.hpp.
|
inline |
Retrieve formatted memory usage string.
Definition at line 232 of file memory_usage.hpp.
References FEAT::stringify().
Referenced by format_peak_physical_usage(), and FEAT::Control::Statistics::report().
|
inline |
Definition at line 244 of file memory_usage.hpp.
|
inline |
Returns peak physical memory.
Definition at line 208 of file memory_usage.hpp.
|
inline |
Returns peak virtual memory.
Definition at line 220 of file memory_usage.hpp.
|
inline |
update the memory usage statistics with current data
Definition at line 85 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 75 of file memory_usage.hpp.