...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::scatter — Scatter the values stored at the root to all processes within the communicator.
template<typename T> void scatter(const communicator & comm, const std::vector< T > & in_values, T & out_value, int root); template<typename T> void scatter(const communicator & comm, const T * in_values, T & out_value, int root); template<typename T> void scatter(const communicator & comm, T & out_value, int root); template<typename T> void scatter(const communicator & comm, const std::vector< T > & in_values, T * out_values, int n, int root); template<typename T> void scatter(const communicator & comm, const T * in_values, T * out_values, int n, int root); template<typename T> void scatter(const communicator & comm, T * out_values, int n, int root);
scatter
is a collective algorithm that scatters the values stored in the root
process (inside a vector) to all of the processes in the communicator. The vector out_values
(only significant at the root
) is indexed by the process number to which the corresponding value will be sent. 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_Scatter
to scatter the values.
Parameters: 
