|
static void | Init (Config config) |
| Initialize.
|
|
static void | Init (int num_machines, int rank, ReduceScatterFunction reduce_scatter_ext_fun, AllgatherFunction allgather_ext_fun) |
| Initialize.
|
|
static void | Dispose () |
| Free this static class.
|
|
static int | rank () |
| Get rank of this machine.
|
|
static int | num_machines () |
| Get total number of machines.
|
|
static void | Allreduce (char *input, comm_size_t input_size, int type_size, char *output, const ReduceFunction &reducer) |
| Perform all_reduce. if data size is small, will perform AllreduceByAllGather, else with call ReduceScatter followed allgather.
|
|
static void | AllreduceByAllGather (char *input, comm_size_t input_size, int type_size, char *output, const ReduceFunction &reducer) |
| Perform all_reduce by using all_gather. it can be use to reduce communication time when data is small.
|
|
static void | Allgather (char *input, comm_size_t send_size, char *output) |
| Performing all_gather by using bruck algorithm. Communication times is O(log(n)), and communication cost is O(send_size * number_machine) It can be used when all nodes have same input size.
|
|
static void | Allgather (char *input, const comm_size_t *block_start, const comm_size_t *block_len, char *output, comm_size_t all_size) |
| Performing all_gather by using bruck algorithm. Communication times is O(log(n)), and communication cost is O(all_size) It can be used when nodes have different input size.
|
|
static void | ReduceScatter (char *input, comm_size_t input_size, int type_size, const comm_size_t *block_start, const comm_size_t *block_len, char *output, comm_size_t output_size, const ReduceFunction &reducer) |
| Perform reduce scatter by using recursive halving algorithm. Communication times is O(log(n)), and communication cost is O(input_size)
|
|
template<class T > |
static T | GlobalSyncUpByMin (T &local) |
|
template<class T > |
static T | GlobalSyncUpByMax (T &local) |
|
template<class T > |
static T | GlobalSyncUpByMean (T &local) |
|
template<class T > |
static void | GlobalSum (std::vector< T > &local) |
|
A static class that contains some collective communication algorithm.