Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Function scatterv

boost::mpi::scatterv — Similar to boost::mpi::scatter with the difference that the number of values stored at the root process does not need to be a multiple of the communicator's size.

Synopsis

// In header: <boost/mpi/collectives.hpp>


template<typename T> 
  void scatterv(const communicator & comm, const std::vector< T > & in_values, 
                const std::vector< int > & sizes, 
                const std::vector< int > & displs, T * out_values, 
                int out_size, int root);
template<typename T> 
  void scatterv(const communicator & comm, const T * in_values, 
                const std::vector< int > & sizes, 
                const std::vector< int > & displs, T * out_values, 
                int out_size, int root);
template<typename T> 
  void scatterv(const communicator & comm, T * out_values, int out_size, 
                int root);
template<typename T> 
  void scatterv(const communicator & comm, const T * in_values, 
                const std::vector< int > & sizes, T * out_values, int root);
template<typename T> 
  void scatterv(const communicator & comm, const std::vector< T > & in_values, 
                const std::vector< int > & sizes, T * out_values, int root);

Description

Parameters:

comm

The communicator over which the scatter will occur.

in_values

A vector or pointer to storage that will contain the values to send to each process, indexed by the process rank. For non-root processes, this parameter may be omitted. If it is still provided, however, it will be unchanged.

sizes

A vector containing the number of elements each non-root process will receive.

displs

A vector such that the i-th entry specifies the displacement (relative to in_values) from which to take the outgoing data to process i. Overloaded versions for which displs is omitted assume that the data is contiguous at the root process.

out_values

The array of values received by each process.

out_size

For each non-root process this will contain the size of out_values.

root

The process ID number that will scatter the values. This value must be the same on all processes.


PrevUpHomeNext