MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / Allgather

Method Allgather

src/network/network.cpp:121–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121void Network::Allgather(char* input, comm_size_t send_size, char* output) {
122 if (num_machines_ <= 1) {
123 Log::Fatal("Please initilize the network interface first");
124 return;
125 }
126 // assign blocks
127 block_start_[0] = 0;
128 block_len_[0] = send_size;
129 for (int i = 1; i < num_machines_; ++i) {
130 block_start_[i] = block_start_[i - 1] + block_len_[i - 1];
131 block_len_[i] = send_size;
132 }
133 // start all gather
134 Allgather(input, block_start_.data(), block_len_.data(), output, send_size * num_machines_);
135}
136
137void Network::Allgather(char* input, const comm_size_t* block_start, const comm_size_t* block_len, char* output, comm_size_t all_size) {
138 if (num_machines_ <= 1) {

Callers

nothing calls this directly

Calls 1

dataMethod · 0.80

Tested by

no test coverage detected