mpi::mpi_gather

#include <mpi.hpp>

Synopsis

template<typename T>
std::vector<T> mpi_gather (std::vector<T> const & v, communicator c = {}, int root = 0, bool all = false)

Template parameters

  • T Value type of the vector.

Parameters

  • v std::vector to gather.

  • c mpi::communicator.

  • root Rank of the root process.

  • all Should all processes receive the result of the reduction.

Returns

std::vector containing the result of the gather operation.