| 72 | } |
| 73 | |
| 74 | Maybe<Symbol<SbpParallel>> GetSbpFromState(const std::pair<std::string, int>& state) { |
| 75 | if (state.first == "B") { |
| 76 | return GetBroadcastSbpParallel(); |
| 77 | } else if (state.first == "P") { |
| 78 | return GetPartialSumSbpParallel(); |
| 79 | } else if (state.first == "S") { |
| 80 | return GetSplitSbpParallel(state.second); |
| 81 | } else { |
| 82 | return Error::RuntimeError() << "Invalid sbp signature state: (" << state.first << ", " |
| 83 | << state.second << ");"; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | } // namespace |
| 88 |
no test coverage detected