A net group backed by virtual MPI connection.
As MPI already sets up communication, not much is done. Each Group communicates using a unique MPI tag, the group id. Each host's rank within the group is plaining its MPI rank.
Definition at line 137 of file group.hpp.
|
|
| Group (size_t my_rank, int group_tag, size_t group_size, DispatcherThread &dispatcher) |
| Initialize a Group for the given size and rank. More...
|
|
int | group_tag () const |
| return MPI tag used to communicate More...
|
|
size_t | num_hosts () const final |
| number of hosts configured. More...
|
|
DispatcherThread & | dispatcher () |
| reference to the main MPI dispatcher thread More...
|
|
net::Connection & | connection (size_t peer) final |
| Return Connection to client id. More...
|
|
void | Close () final |
| Close. More...
|
|
size_t | num_parallel_async () const final |
| Number of parallel sends or recvs requests supported by net backend. More...
|
|
std::unique_ptr< net::Dispatcher > | ConstructDispatcher () const final |
|
void | Barrier () |
| run a MPI_Barrier() for synchronization. More...
|
|
| Group (size_t my_rank) |
| initializing constructor More...
|
|
| Group (const Group &)=delete |
| non-copyable: delete copy-constructor More...
|
|
| Group (Group &&)=default |
| move-constructor: default More...
|
|
virtual | ~Group () |
| virtual destructor More...
|
|
template<> |
void | AllReduce (int &value, std::plus< int >) |
|
template<> |
void | AllReduce (int &value, common::minimum< int >) |
|
template<> |
void | AllReduce (int &value, common::maximum< int >) |
|
template<> |
void | AllReduce (unsigned int &value, std::plus< unsigned int >) |
|
template<> |
void | AllReduce (unsigned int &value, common::minimum< unsigned int >) |
|
template<> |
void | AllReduce (unsigned int &value, common::maximum< unsigned int >) |
|
template<> |
void | AllReduce (long &value, std::plus< long >) |
|
template<> |
void | AllReduce (long &value, common::minimum< long >) |
|
template<> |
void | AllReduce (long &value, common::maximum< long >) |
|
template<> |
void | AllReduce (unsigned long &value, std::plus< unsigned long >) |
|
template<> |
void | AllReduce (unsigned long &value, common::minimum< unsigned long >) |
|
template<> |
void | AllReduce (unsigned long &value, common::maximum< unsigned long >) |
|
template<> |
void | AllReduce (long long &value, std::plus< long long >) |
|
template<> |
void | AllReduce (long long &value, common::minimum< long long >) |
|
template<> |
void | AllReduce (long long &value, common::maximum< long long >) |
|
template<> |
void | AllReduce (unsigned long long &value, std::plus< unsigned long long >) |
|
template<> |
void | AllReduce (unsigned long long &value, common::minimum< unsigned long long >) |
|
template<> |
void | AllReduce (unsigned long long &value, common::maximum< unsigned long long >) |
|
template<> |
void | Broadcast (int &value, size_t origin) |
|
template<> |
void | Broadcast (unsigned int &value, size_t origin) |
|
template<> |
void | Broadcast (long &value, size_t origin) |
|
template<> |
void | Broadcast (unsigned long &value, size_t origin) |
|
template<> |
void | Broadcast (long long &value, size_t origin) |
|
template<> |
void | Broadcast (unsigned long long &value, size_t origin) |
|
template<> |
void | ExPrefixSum (int &value, std::plus< int >, const int &initial) |
|
template<> |
void | ExPrefixSum (unsigned int &value, std::plus< unsigned int >, const unsigned int &initial) |
|
template<> |
void | ExPrefixSum (long &value, std::plus< long >, const long &initial) |
|
template<> |
void | ExPrefixSum (unsigned long &value, std::plus< unsigned long >, const unsigned long &initial) |
|
template<> |
void | ExPrefixSum (long long &value, std::plus< long long >, const long long &initial) |
|
template<> |
void | ExPrefixSum (unsigned long long &value, std::plus< unsigned long long >, const unsigned long long &initial) |
|
Group & | operator= (const Group &)=delete |
| non-copyable: delete assignment operator More...
|
|
Group & | operator= (Group &&)=default |
| move-assignment operator: default More...
|
|
template<> |
void | PrefixSum (int &value, std::plus< int >, const int &initial) |
|
template<> |
void | PrefixSum (unsigned int &value, std::plus< unsigned int >, const unsigned int &initial) |
|
template<> |
void | PrefixSum (long &value, std::plus< long >, const long &initial) |
|
template<> |
void | PrefixSum (unsigned long &value, std::plus< unsigned long >, const unsigned long &initial) |
|
template<> |
void | PrefixSum (long long &value, std::plus< long long >, const long long &initial) |
|
template<> |
void | PrefixSum (unsigned long long &value, std::plus< unsigned long long >, const unsigned long long &initial) |
|
size_t | my_host_rank () const |
| Return our rank among hosts in this group. More...
|
|
size_t | OneFactorSize () const |
| Number of of 1-factor iterations. More...
|
|
size_t | OneFactorPeer (size_t round) const |
|
template<typename T > |
void | SendTo (size_t dest, const T &data) |
| Sends a serializable type to the given peer. More...
|
|
template<typename T > |
void | ReceiveFrom (size_t src, T *data) |
| Receives a serializable type from the given peer. More...
|
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | PrefixSum (T &value, BinarySumOp sum_op=BinarySumOp(), const T &initial=T()) |
| Calculate inclusive prefix sum. More...
|
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | ExPrefixSum (T &value, BinarySumOp sum_op=BinarySumOp(), const T &initial=T()) |
| Calculate exclusive prefix sum. More...
|
|
template<typename T > |
void | Broadcast (T &value, size_t origin=0) |
| Broadcast a value from the worker "origin". More...
|
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | Reduce (T &value, size_t root=0, BinarySumOp sum_op=BinarySumOp()) |
| Reduce a value from all workers to the worker 0. More...
|
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | AllReduce (T &value, BinarySumOp sum_op=BinarySumOp()) |
| Reduce a value from all workers to all workers. More...
|
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | PrefixSumSelect (T &value, BinarySumOp sum_op=BinarySumOp(), const T &initial=T(), bool inclusive=true) |
| select prefixsum implementation (often due to total number of processors) More...
|
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | PrefixSumDoubling (T &value, BinarySumOp sum_op=BinarySumOp(), const T &initial=T(), bool inclusive=true) |
| Calculate for every worker his prefix sum. More...
|
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | PrefixSumHypercube (T &value, BinarySumOp sum_op=BinarySumOp()) |
| Calculate for every worker his prefix sum. More...
|
|
template<typename T > |
void | BroadcastSelect (T &value, size_t origin=0) |
| select broadcast implementation (often due to total number of processors) More...
|
|
template<typename T > |
void | BroadcastTrivial (T &value, size_t origin=0) |
| Broadcasts the value of the peer with index 0 to all the others. More...
|
|
template<typename T > |
void | BroadcastBinomialTree (T &value, size_t origin=0) |
| Broadcasts the value of the worker with index "origin" to all the others. More...
|
|
template<typename T > |
void | AllGatherRecursiveDoublingPowerOfTwo (T *values, size_t n) |
|
template<typename T > |
void | AllGatherBruck (T *values, size_t n) |
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | AllReduceSelect (T &value, BinarySumOp sum_op=BinarySumOp()) |
| select allreduce implementation (often due to total number of processors) More...
|
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | AllReduceSimple (T &value, BinarySumOp sum_op=BinarySumOp()) |
| Perform an All-Reduce on the workers. More...
|
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | AllReduceAtRoot (T &value, BinarySumOp sum_op=BinarySumOp()) |
| Broadcasts the value of the peer with index 0 to all the others. More...
|
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | AllReduceHypercube (T &value, BinarySumOp sum_op=BinarySumOp()) |
| Perform an All-Reduce for powers of two. More...
|
|
template<typename T , typename BinarySumOp = std::plus<T>> |
void | AllReduceElimination (T &value, BinarySumOp sum_op=BinarySumOp()) |
| Perform an All-Reduce using the elimination protocol described in R. More...
|
|
|
template<typename MpiCall > |
void | WaitForRequest (MpiCall call) |
|
|
void | PrefixSumPlusInt (int &value, const int &initial) final |
|
void | ExPrefixSumPlusInt (int &value, const int &initial) final |
|
void | BroadcastInt (int &value, size_t origin) final |
|
void | AllReducePlusInt (int &value) final |
|
void | AllReduceMinimumInt (int &value) final |
|
void | AllReduceMaximumInt (int &value) final |
|
void | PrefixSumPlusUnsignedInt (unsigned int &value, const unsigned int &initial) final |
|
void | ExPrefixSumPlusUnsignedInt (unsigned int &value, const unsigned int &initial) final |
|
void | BroadcastUnsignedInt (unsigned int &value, size_t origin) final |
|
void | AllReducePlusUnsignedInt (unsigned int &value) final |
|
void | AllReduceMinimumUnsignedInt (unsigned int &value) final |
|
void | AllReduceMaximumUnsignedInt (unsigned int &value) final |
|
void | PrefixSumPlusLong (long &value, const long &initial) final |
|
void | ExPrefixSumPlusLong (long &value, const long &initial) final |
|
void | BroadcastLong (long &value, size_t origin) final |
|
void | AllReducePlusLong (long &value) final |
|
void | AllReduceMinimumLong (long &value) final |
|
void | AllReduceMaximumLong (long &value) final |
|
void | PrefixSumPlusUnsignedLong (unsigned long &value, const unsigned long &initial) final |
|
void | ExPrefixSumPlusUnsignedLong (unsigned long &value, const unsigned long &initial) final |
|
void | BroadcastUnsignedLong (unsigned long &value, size_t origin) final |
|
void | AllReducePlusUnsignedLong (unsigned long &value) final |
|
void | AllReduceMinimumUnsignedLong (unsigned long &value) final |
|
void | AllReduceMaximumUnsignedLong (unsigned long &value) final |
|
void | PrefixSumPlusLongLong (long long &value, const long long &initial) final |
|
void | ExPrefixSumPlusLongLong (long long &value, const long long &initial) final |
|
void | BroadcastLongLong (long long &value, size_t origin) final |
|
void | AllReducePlusLongLong (long long &value) final |
|
void | AllReduceMinimumLongLong (long long &value) final |
|
void | AllReduceMaximumLongLong (long long &value) final |
|
void | PrefixSumPlusUnsignedLongLong (unsigned long long &value, const unsigned long long &initial) final |
|
void | ExPrefixSumPlusUnsignedLongLong (unsigned long long &value, const unsigned long long &initial) final |
|
void | BroadcastUnsignedLongLong (unsigned long long &value, size_t origin) final |
|
void | AllReducePlusUnsignedLongLong (unsigned long long &value) final |
|
void | AllReduceMinimumUnsignedLongLong (unsigned long long &value) final |
|
void | AllReduceMaximumUnsignedLongLong (unsigned long long &value) final |
|