Merge branch 'master' of https://github.com/tqchen/allreduce
This commit is contained in:
commit
771891491c
@ -43,11 +43,12 @@ inline void TestBcast(size_t n, int root) {
|
|||||||
s[i] = char(i % 126 + 1);
|
s[i] = char(i % 126 + 1);
|
||||||
}
|
}
|
||||||
std::string res;
|
std::string res;
|
||||||
|
res.resize(n);
|
||||||
if (root == rank) {
|
if (root == rank) {
|
||||||
res = s;
|
res = s;
|
||||||
}
|
}
|
||||||
double tstart = utils::GetTime();
|
double tstart = utils::GetTime();
|
||||||
rabit::Broadcast(&res, root);
|
rabit::Broadcast(&res[0], res.length(), root);
|
||||||
bcast_tdiff += utils::GetTime() - tstart;
|
bcast_tdiff += utils::GetTime() - tstart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user