ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::MPIMailbox< Msg, false > Class Template Reference

the mailbox of the processes of a communicator for the messages that are not trivially copyable, each the record of the bytes that MPICodec< Msg > gives, on an MPIByteMailbox (the same waves, the same stop and the same leftovers()) More...

#include <ADS/distributed/MPIMailbox.h>

Inheritance diagram for ADS::MPIMailbox< Msg, false >:

Public types

using Message = Msg
 the type of the messages

Public member functions

 MPIMailbox (MPI_Comm comm=MPI_COMM_WORLD, std::size_t batch=65536)
 the mailbox of the processes of comm, which sends an outbox when it holds batch bytes; a collective operation
std::size_t rank (void) const
 the rank of this process
std::size_t size (void) const
 the number of the processes
void send (std::size_t to, const Msg &x)
 the bytes of \( x \) appended to the outbox for to, as MPIByteMailbox::send()
void flush (void)
 the outboxes sent, unless stopped
template<class F>
std::size_t poll (F &&f)
 the calls f( x ) on the messages received, rebuilt, and their number
bool quiescent (void)
 as MPIByteMailbox::quiescent()
template<class F>
std::size_t leftovers (F &&f)
 as MPIByteMailbox::leftovers(), the messages rebuilt
void stop (void)
 as MPIByteMailbox::stop()
bool stopped (void) const
 true once this process has stopped
bool terminated (void) const
 true once quiescent() has seen the end
std::uint64_t sent (void) const
 the messages sent by this process so far
std::uint64_t batches (void) const
 the batches sent by MPI so far
std::uint64_t received (void) const
 the messages received by this process so far
std::uint64_t waves (void) const
 the waves completed so far
MPI_Comm comm (void) const
 the communicator of the mailbox
 ~MPIMailbox ()
 the closing, if leftovers() did not do it, its messages dropped; a collective operation

Detailed description

template<class Msg>
class ADS::MPIMailbox< Msg, false >

the mailbox of the processes of a communicator for the messages that are not trivially copyable, each the record of the bytes that MPICodec< Msg > gives, on an MPIByteMailbox (the same waves, the same stop and the same leftovers())

Member typedef documentation

◆ Message

template<class Msg>
using ADS::MPIMailbox< Msg, false >::Message = Msg

the type of the messages

Constructor and destructor documentation

◆ MPIMailbox()

template<class Msg>
ADS::MPIMailbox< Msg, false >::MPIMailbox ( MPI_Comm comm = MPI_COMM_WORLD,
std::size_t batch = 65536 )
inlineexplicit

the mailbox of the processes of comm, which sends an outbox when it holds batch bytes; a collective operation

Precondition
MPI is initialized, \( \mathit{batch} \ge 1 \)

◆ ~MPIMailbox()

ADS::MPIMailbox< Msg, bool >::~MPIMailbox ( )
inline

the closing, if leftovers() did not do it, its messages dropped; a collective operation

Member function documentation

◆ batches()

template<class Msg>
std::uint64_t ADS::MPIMailbox< Msg, false >::batches ( void ) const
inlinenodiscard

the batches sent by MPI so far

◆ comm()

template<class Msg>
MPI_Comm ADS::MPIMailbox< Msg, false >::comm ( void ) const
inlinenodiscard

the communicator of the mailbox

◆ flush()

template<class Msg>
void ADS::MPIMailbox< Msg, false >::flush ( void )
inline

the outboxes sent, unless stopped

◆ leftovers()

template<class Msg>
template<class F>
std::size_t ADS::MPIMailbox< Msg, false >::leftovers ( F && f)
inline

as MPIByteMailbox::leftovers(), the messages rebuilt

Precondition
terminated()

◆ poll()

template<class Msg>
template<class F>
std::size_t ADS::MPIMailbox< Msg, false >::poll ( F && f)
inline

the calls f( x ) on the messages received, rebuilt, and their number

◆ quiescent()

template<class Msg>
bool ADS::MPIMailbox< Msg, false >::quiescent ( void )
inline

◆ rank()

template<class Msg>
std::size_t ADS::MPIMailbox< Msg, false >::rank ( void ) const
inlinenodiscard

the rank of this process

◆ received()

template<class Msg>
std::uint64_t ADS::MPIMailbox< Msg, false >::received ( void ) const
inlinenodiscard

the messages received by this process so far

◆ send()

template<class Msg>
void ADS::MPIMailbox< Msg, false >::send ( std::size_t to,
const Msg & x )
inline

the bytes of \( x \) appended to the outbox for to, as MPIByteMailbox::send()

Precondition
to is a rank

◆ sent()

template<class Msg>
std::uint64_t ADS::MPIMailbox< Msg, false >::sent ( void ) const
inlinenodiscard

the messages sent by this process so far

◆ size()

template<class Msg>
std::size_t ADS::MPIMailbox< Msg, false >::size ( void ) const
inlinenodiscard

the number of the processes

◆ stop()

template<class Msg>
void ADS::MPIMailbox< Msg, false >::stop ( void )
inline

as MPIByteMailbox::stop()

◆ stopped()

template<class Msg>
bool ADS::MPIMailbox< Msg, false >::stopped ( void ) const
inlinenodiscard

true once this process has stopped

◆ terminated()

template<class Msg>
bool ADS::MPIMailbox< Msg, false >::terminated ( void ) const
inlinenodiscard

true once quiescent() has seen the end

◆ waves()

template<class Msg>
std::uint64_t ADS::MPIMailbox< Msg, false >::waves ( void ) const
inlinenodiscard

the waves completed so far


The documentation for this class was generated from the following file: