![]() |
fpmas 1.6
|
Classes | |
class | MpiCommunicator |
class | MpiCommunicatorBase |
class | MpiCommWorld |
struct | TypedMpi |
struct | TypedMpi< fpmas::graph::EdgePtrWrapper< T > > |
Functions | |
template<typename T , typename BinaryOp = std::plus<T>> | |
T | reduce (api::communication::TypedMpi< T > &mpi, int root, const T &data, BinaryOp binary_op=BinaryOp()) |
template<typename T , typename BinaryOp = std::plus<T>> | |
T | all_reduce (api::communication::TypedMpi< T > &mpi, const T &data, BinaryOp binary_op=BinaryOp()) |
Variables | |
MpiCommWorld | WORLD {} |
fpmas::api::communication implementations.
T fpmas::communication::reduce | ( | api::communication::TypedMpi< T > & | mpi, |
int | root, | ||
const T & | data, | ||
BinaryOp | binary_op = BinaryOp() |
||
) |
Gathers data
at root
using the provided mpi
instance, and returns the accumulated result.
binary_op
is the operation used to accumulate data of the vector returned by the gather operation.
On processes other that root
, data
is returned.
mpi | mpi instance used to perform the gather operation |
root | rank of the processes on which data should be gathered and accumulated |
data | local data instance to gather |
binary_op | operation used to accumulate data |
T fpmas::communication::all_reduce | ( | api::communication::TypedMpi< T > & | mpi, |
const T & | data, | ||
BinaryOp | binary_op = BinaryOp() |
||
) |
Gathers data
using the provided mpi
instance, and returns the accumulated result on all processes (using an fpmas::api::communication::TypedMpi::allGather() operation).
binary_op
is the operation used to accumulate data of the vector returned by the gather operation.
mpi | mpi instance used to perform the allGather() operation |
data | local data instance to gather |
binary_op | operation used to accumulate data |
MpiCommWorld fpmas::communication::WORLD {} |
MpiCommWorld instance, initialized by fpmas::init().