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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user