A network Group is a collection of enumerated communication links, which provides point-to-point communication and MPI-like collective primitives.
Each communication link in the Group has a specific rank and a representative class Connection can be accessed via connection().
The Group class is abstract, and subclasses must exist for every network implementation.
Definition at line 47 of file group.hpp.
|
| 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...
|
|
virtual size_t | num_hosts () const =0 |
| Return number of connections in this group (= number computing hosts) More...
|
|
virtual Connection & | connection (size_t id)=0 |
| Return Connection to client id. More...
|
|
virtual void | Close ()=0 |
| Close. More...
|
|
virtual size_t | num_parallel_async () const |
|
virtual std::unique_ptr< class Dispatcher > | ConstructDispatcher () const =0 |
|
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...
|
|
|
|
virtual void | PrefixSumPlusInt (int &value, const int &initial) |
|
virtual void | ExPrefixSumPlusInt (int &value, const int &initial) |
|
virtual void | BroadcastInt (int &value, size_t origin) |
|
virtual void | AllReducePlusInt (int &value) |
|
virtual void | AllReduceMinimumInt (int &value) |
|
virtual void | AllReduceMaximumInt (int &value) |
|
virtual void | PrefixSumPlusUnsignedInt (unsigned int &value, const unsigned int &initial) |
|
virtual void | ExPrefixSumPlusUnsignedInt (unsigned int &value, const unsigned int &initial) |
|
virtual void | BroadcastUnsignedInt (unsigned int &value, size_t origin) |
|
virtual void | AllReducePlusUnsignedInt (unsigned int &value) |
|
virtual void | AllReduceMinimumUnsignedInt (unsigned int &value) |
|
virtual void | AllReduceMaximumUnsignedInt (unsigned int &value) |
|
virtual void | PrefixSumPlusLong (long &value, const long &initial) |
|
virtual void | ExPrefixSumPlusLong (long &value, const long &initial) |
|
virtual void | BroadcastLong (long &value, size_t origin) |
|
virtual void | AllReducePlusLong (long &value) |
|
virtual void | AllReduceMinimumLong (long &value) |
|
virtual void | AllReduceMaximumLong (long &value) |
|
virtual void | PrefixSumPlusUnsignedLong (unsigned long &value, const unsigned long &initial) |
|
virtual void | ExPrefixSumPlusUnsignedLong (unsigned long &value, const unsigned long &initial) |
|
virtual void | BroadcastUnsignedLong (unsigned long &value, size_t origin) |
|
virtual void | AllReducePlusUnsignedLong (unsigned long &value) |
|
virtual void | AllReduceMinimumUnsignedLong (unsigned long &value) |
|
virtual void | AllReduceMaximumUnsignedLong (unsigned long &value) |
|
virtual void | PrefixSumPlusLongLong (long long &value, const long long &initial) |
|
virtual void | ExPrefixSumPlusLongLong (long long &value, const long long &initial) |
|
virtual void | BroadcastLongLong (long long &value, size_t origin) |
|
virtual void | AllReducePlusLongLong (long long &value) |
|
virtual void | AllReduceMinimumLongLong (long long &value) |
|
virtual void | AllReduceMaximumLongLong (long long &value) |
|
virtual void | PrefixSumPlusUnsignedLongLong (unsigned long long &value, const unsigned long long &initial) |
|
virtual void | ExPrefixSumPlusUnsignedLongLong (unsigned long long &value, const unsigned long long &initial) |
|
virtual void | BroadcastUnsignedLongLong (unsigned long long &value, size_t origin) |
|
virtual void | AllReducePlusUnsignedLongLong (unsigned long long &value) |
|
virtual void | AllReduceMinimumUnsignedLongLong (unsigned long long &value) |
|
virtual void | AllReduceMaximumUnsignedLongLong (unsigned long long &value) |
|
|
Do not use these directly in user code.
|
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 T , typename BinarySumOp > |
T | SendReceiveReduce (size_t peer, const T &value, BinarySumOp sum_op) |
| Helper method for AllReduce(). More...
|
|
template<typename T , typename BinarySumOp > |
void | AllReduceEliminationProcess (size_t host_id, size_t group_size, size_t remaining_hosts, size_t send_to, T &value, BinarySumOp sum_op) |
| Helper method for AllReduce(). More...
|
|