WarpX
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ablastr::utils::msg_logger::MsgWithCounterAndRanks Struct Reference

#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< intranks
 

Detailed Description

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.

Member Function Documentation

◆ deserialize() [1/2]

MsgWithCounterAndRanks MsgWithCounterAndRanks::deserialize ( std::vector< char >::const_iterator &&  it)
static

Same as static Msg MsgWithCounterAndRanks(std::vector<char>::const_iterator& it) but accepting an rvalue as an argument.

Parameters
[in]ititerator of a byte array
Returns
a MsgWithCounterAndRanks struct

◆ deserialize() [2/2]

MsgWithCounterAndRanks MsgWithCounterAndRanks::deserialize ( std::vector< char >::const_iterator &  it)
static

This function generates a MsgWithCounterAndRanks struct from a byte vector.

Parameters
[in]ititerator of a byte array
Returns
a MsgWithCounterAndRanks struct

◆ serialize()

std::vector< char > MsgWithCounterAndRanks::serialize ( ) const

This function returns a byte representation of the struct.

Returns
a byte vector

Member Data Documentation

◆ all_ranks

bool ablastr::utils::msg_logger::MsgWithCounterAndRanks::all_ranks

Flag to store if message is emitted by all ranks

◆ msg_with_counter

MsgWithCounter ablastr::utils::msg_logger::MsgWithCounterAndRanks::msg_with_counter

A message with counter

◆ ranks

std::vector<int> ablastr::utils::msg_logger::MsgWithCounterAndRanks::ranks

Affected ranks


The documentation for this struct was generated from the following files: