2
0
mirror of https://github.com/boostorg/mpi.git synced 2026-02-26 16:52:28 +00:00

Added missing resize of vector, to become compatible with documentation

[SVN r76186]
This commit is contained in:
Matthias Troyer
2011-12-26 17:29:36 +00:00
parent 040a3a9654
commit 967114eb31

View File

@@ -131,7 +131,12 @@ void
gather(const communicator& comm, const T* in_values, int n,
std::vector<T>& out_values, int root)
{
::boost::mpi::gather(comm, in_values, n, &out_values[0], root);
if (comm.rank() == root) {
out_values.resize(comm.size() * n);
::boost::mpi::gather(comm, in_values, n, &out_values[0], root);
}
else
::boost::mpi::gather(comm, in_values, n, root);
}
template<typename T>