fpmas 1.6
List of all members
fpmas::communication::TypedMpi< T > Struct Template Reference

#include <communication.h>

Inheritance diagram for fpmas::communication::TypedMpi< T >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::communication::TypedMpi< T >:
Collaboration graph
[legend]

Additional Inherited Members

- Public Types inherited from fpmas::communication::detail::TypedMpi< T, io::datapack::ObjectPack >
typedef io::datapack::ObjectPack pack_type
 
- Public Member Functions inherited from fpmas::communication::detail::TypedMpi< T, io::datapack::ObjectPack >
 TypedMpi (api::communication::MpiCommunicator &comm)
 
std::unordered_map< int, std::vector< T > > migrate (std::unordered_map< int, std::vector< T > > export_map) override
 
std::unordered_map< int, T > allToAll (std::unordered_map< int, T > export_map) override
 
std::vector< T > gather (const T &, int root) override
 
std::vector< T > allGather (const T &) override
 
bcast (const T &, int root) override
 
void send (const T &, int, int) override
 
void Isend (const T &, int, int, Request &) override
 
void Issend (const T &, int, int, Request &) override
 
void probe (int source, int tag, Status &status) override
 
bool Iprobe (int source, int tag, Status &status) override
 
recv (int source, int tag, Status &status=Status::IGNORE) override
 
virtual std::unordered_map< int, std::vector< T > > migrate (std::unordered_map< int, std::vector< T > > export_map)=0
 
virtual std::unordered_map< int, T > allToAll (std::unordered_map< int, T > export_map)=0
 
virtual std::vector< T > gather (const T &data, int root)=0
 
virtual std::vector< T > allGather (const T &data)=0
 
virtual T bcast (const T &data, int root)=0
 
virtual void send (const T &data, int destination, int tag)=0
 
virtual void Isend (const T &data, int destination, int tag, Request &req)=0
 
virtual void Issend (const T &data, int destination, int tag, Request &req)=0
 
virtual void probe (int source, int tag, Status &status)=0
 
virtual bool Iprobe (int source, int tag, Status &status)=0
 
virtual T recv (int source, int tag, Status &status=Status::IGNORE)=0
 

Detailed Description

template<typename T>
struct fpmas::communication::TypedMpi< T >

The default fpmas::communication::detail::TypedMpi specialization, based on io::datapack::ObjectPack.

Since ObjectPack serialization rules are predefined for fundamental types and std containers, sending such structure through MPI is made trivial, without any additionnal user defined code:

// Used to transmit integers: predefined
TypedMpi<int> int_mpi;
// Used to transmit vectors of integers: predefined
TypedMpi<std::vector<int>> int_vector_mpi;

If a CustomType is serializable in an ObjectPack, containers of this type can trivially be transmitted, without any additionnal code:

TypedMpi<std::vector<CustomType>> custom_type_vector_mpi;
Template Parameters
Ttype to transmit, serializable into an fpmas::io::datapack::ObjectPack

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