Line data Source code
1 0 : // Distributed under the MIT License. 2 : // See LICENSE.txt for details. 3 : 4 : #pragma once 5 : 6 : #include <cstddef> 7 : #include <string> 8 : #include <unordered_map> 9 : 10 : #include "DataStructures/DataBox/Tag.hpp" 11 : #include "Utilities/PrettyType.hpp" 12 : 13 : namespace mem_monitor { 14 : /*! 15 : * Gives full subfile path to the dat file for the memory monitor of a 16 : * parallel component 17 : */ 18 : template <typename ParallelComponent> 19 1 : std::string subfile_name() { 20 : return "/MemoryMonitors/" + pretty_type::name<ParallelComponent>(); 21 : } 22 : 23 0 : namespace Tags { 24 : /*! 25 : * \brief Tag to hold memory usage of parallel components before it is written 26 : * to disk. 27 : * 28 : * \details The types in the unordered_map are as follows: 29 : * 30 : * \code 31 : * std::unordered_map<ComponentName, std::unordered_map<%Time, 32 : * std::unordered_map<Node/Proc, Memory in MB>>> 33 : * \endcode 34 : */ 35 1 : struct MemoryHolder : db::SimpleTag { 36 0 : using type = std::unordered_map< 37 : std::string, std::unordered_map<double, std::unordered_map<int, double>>>; 38 : }; 39 : } // namespace Tags 40 : } // namespace mem_monitor