...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::mpi::gather — Gather the values stored at every process into a vector at the root process.
// In header: <boost/mpi/collectives.hpp> template<typename T> void gather(const communicator & comm, const T & in_value, std::vector< T > & out_values, int root); template<typename T> void gather(const communicator & comm, const T & in_value, T * out_values, int root); template<typename T> void gather(const communicator & comm, const T & in_value, int root); template<typename T> void gather(const communicator & comm, const T * in_values, int n, std::vector< T > & out_values, int root); template<typename T> void gather(const communicator & comm, const T * in_values, int n, T * out_values, int root); template<typename T> void gather(const communicator & comm, const T * in_values, int n, int root);
gather
is a collective algorithm that collects the values stored at each process into a vector of values at the root
process. This vector is indexed by the process number that the value came from. The type T
of the values may be any type that is serializable or has an associated MPI data type.
When the type T
has an associated MPI data type, this routine invokes MPI_Gather
to gather the values.
Parameters: |
|