WarpX
|
#include <MsgLogger.H>
Public Member Functions | |
std::vector< char > | serialize () const |
This function returns a byte representation of the struct. More... | |
Static Public Member Functions | |
static MsgWithCounterAndRanks | deserialize (std::vector< char >::const_iterator &it) |
This function generates a MsgWithCounterAndRanks struct from a byte vector. More... | |
static MsgWithCounterAndRanks | deserialize (std::vector< char >::const_iterator &&it) |
Same as static Msg MsgWithCounterAndRanks(std::vector<char>::const_iterator& it) but accepting an rvalue as an argument. More... | |
Public Attributes | |
MsgWithCounter | msg_with_counter |
bool | all_ranks |
std::vector< int > | ranks |
This struct represents a message with counter and ranks, which is composed by a message with counter, a bool flag and a std::vector<int>. The bool flag is used to store if a message is emitted by all the ranks. The std::vector<int> is used to store the affected ranks (note: when we switch to C++17, should we consider variants?). The struct also provides methods for serialization and deserialization.
|
static |
Same as static Msg MsgWithCounterAndRanks(std::vector<char>::const_iterator& it) but accepting an rvalue as an argument.
[in] | it | iterator of a byte array |
|
static |
This function generates a MsgWithCounterAndRanks struct from a byte vector.
[in] | it | iterator of a byte array |
std::vector< char > MsgWithCounterAndRanks::serialize | ( | ) | const |
This function returns a byte representation of the struct.
bool ablastr::utils::msg_logger::MsgWithCounterAndRanks::all_ranks |
Flag to store if message is emitted by all ranks
MsgWithCounter ablastr::utils::msg_logger::MsgWithCounterAndRanks::msg_with_counter |
A message with counter
std::vector<int> ablastr::utils::msg_logger::MsgWithCounterAndRanks::ranks |
Affected ranks