Boost C++ Libraries Home Libraries People FAQ More

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> 
   (communicator & comm,  in_values, 
                 sizes, 
                 displs,  out_values, 
                 out_size,  root);
template<typename T> 
   (communicator & comm,  in_values, 
                 sizes, 
                 displs,  out_values, 
                 out_size,  root);
template<typename T> 
   (communicator & comm,  out_values,  out_size, 
                 root);
template<typename T> 
   (communicator & comm,  in_values, 
                 sizes,  out_values,  root);
template<typename T> 
   (communicator & comm,  in_values, 
                 sizes,  out_values,  root);

Description

Parameters:

comm

The communicator over which the scatter will occur.

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.

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.

out_size

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

out_values

The array of values received by each process.

root

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

sizes

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


PrevUpHomeNext