16 #ifndef GEOS_COMMON_MEMORYINFO_HPP_
17 #define GEOS_COMMON_MEMORYINFO_HPP_
19 #include "umpire/util/MemoryResourceTraits.hpp"
25 #if defined( GEOS_USE_CUDA )
44 MemoryInfos( umpire::MemoryResourceTraits::resource_type resourceType );
68 size_t m_availableMemory;
70 bool m_physicalMemoryHandled;
90 {
return m_umpireStatsLogReport; }
97 {
return m_umpireStatsCsvReport; }
103 {
return m_currentCycle; }
110 { m_umpireStatsLogReport = enable; }
126 { m_currentCycle = currentCycle; }
133 { m_currentTime = currentTime; }
145 std::unique_ptr< TableTextFormatter > m_memoryStatLogFormatter;
148 std::unique_ptr< TableCSVFormatter > m_memoryStatCsvFormatter;
151 bool m_umpireStatsLogReport;
154 bool m_umpireStatsCsvReport;
157 string m_umpireStatsCsvReportFilename;
Class to fetch and store memory information for different resource types.
MemoryInfos(umpire::MemoryResourceTraits::resource_type resourceType)
Constructor for MemoryInfos.
size_t getAvailableMemory() const
Get the available memory for the resource type.
bool isPhysicalMemoryHandled() const
Check if physical memory is handled.
size_t getTotalMemory() const
Get the total memory available for the resource type.
Singleton class keeping the application memory logging settings & features.
void memoryStatsReport() const
Output the umpire statistics according to settings set by enableUmpireStatsLogReport() and enableUmpi...
void setCurrentTime(real64 currentTime)
Set the Current Time, to identify each CSV entry.
bool isUmpireStatsCsvOutputEnabled() const
void setCurrentCycle(integer currentCycle)
Set the Current Cycle, to identify each CSV entry.
bool isUmpireStatsLogOutputEnabled() const
static MemoryLogging & getInstance()
integer getCurrentCycle() const
void enableUmpireStatsLogReport(bool enable)
void enableUmpireStatsCsvReport(bool enable, string_view filename="")
double real64
64-bit floating point type.
std::int32_t integer
Signed integer type.
std::string_view string_view
String type.