8 #ifndef ABLASTR_MSG_LOGGER_H_ 9 #define ABLASTR_MSG_LOGGER_H_ 68 std::vector<char> serialize()
const;
76 static Msg deserialize(std::vector<char>::const_iterator& it);
85 static Msg deserialize(std::vector<char>::const_iterator&& it);
97 std::int64_t counter ;
104 std::vector<char> serialize()
const;
112 static MsgWithCounter deserialize(std::vector<char>::const_iterator& it);
121 static MsgWithCounter deserialize(std::vector<char>::const_iterator&& it);
136 std::vector<int> ranks ;
143 std::vector<char> serialize()
const;
199 void record_msg(
Msg msg);
206 std::vector<Msg> get_msgs()
const;
214 std::vector<MsgWithCounter> get_msgs_with_counter()
const;
223 std::vector<MsgWithCounterAndRanks>
224 collective_gather_msgs_with_counter_and_ranks()
const;
234 std::vector<MsgWithCounterAndRanks>
235 one_rank_gather_msgs_with_counter_and_ranks()
const;
246 std::pair<int, int> find_gather_rank_and_its_msgs(
247 int how_many_msgs)
const;
259 std::vector<MsgWithCounterAndRanks>
260 compute_msgs_with_counter_and_ranks(
261 const std::map<Msg,std::int64_t>& my_msg_map,
262 const std::vector<char>& all_data,
263 const std::vector<int>& displacements,
264 const int gather_rank
277 std::vector<MsgWithCounterAndRanks>& msgs_with_counter_and_ranks,
278 int gather_rank)
const;
283 const int m_num_procs ;
284 const int m_io_rank ;
286 std::map<Msg, std::int64_t> m_messages ;
290 #endif //ABLASTR_MSG_LOGGER_H_ Priority priority
Definition: MsgLogger.H:61
std::string PriorityToString(const Priority &priority)
This function converts a Priority into the corresponding string (e.g, Priority::low –> "low") ...
Definition: MsgLogger.cpp:102
std::string text
Definition: MsgLogger.H:60
Priority
Definition: MsgLogger.H:24
constexpr bool operator<(const Msg &l, const Msg &r)
This implements the < operator for Msg. Warning messages are first ordered by priority (warning: high...
Definition: MsgLogger.H:173
Priority StringToPriority(const std::string &priority_string)
This function converts a string into the corresponding priority (e.g, "low" –> Priority::low) ...
Definition: MsgLogger.cpp:112
std::string topic
Definition: MsgLogger.H:59
Definition: MsgLogger.H:132
Definition: MsgLogger.H:57
Definition: MsgLogger.H:185
Definition: MsgLogger.H:19
Definition: MsgLogger.H:94