! \brief The network structure for all_gather */
| 20 | |
| 21 | /*! \brief The network structure for all_gather */ |
| 22 | class BruckMap { |
| 23 | public: |
| 24 | /*! \brief The communication times for one all gather operation */ |
| 25 | int k; |
| 26 | /*! \brief in_ranks[i] means the incoming rank on i-th communication */ |
| 27 | std::vector<int> in_ranks; |
| 28 | /*! \brief out_ranks[i] means the out rank on i-th communication */ |
| 29 | std::vector<int> out_ranks; |
| 30 | BruckMap(); |
| 31 | explicit BruckMap(int n); |
| 32 | /*! |
| 33 | * \brief Create the object of bruck map |
| 34 | * \param rank Rank of this machine |
| 35 | * \param num_machines The total number of machines |
| 36 | * \return The object of bruck map |
| 37 | */ |
| 38 | static BruckMap Construct(int rank, int num_machines); |
| 39 | }; |
| 40 | |
| 41 | /*! |
| 42 | * \brief node type on recursive halving algorithm |
nothing calls this directly
no outgoing calls
no test coverage detected