mpi::mpi_reduce_in_place

#include <mpi.hpp>

Synopsis

  1. template<typename T>
    void mpi_reduce_in_place (T & x,
    communicator c = {},
    int root = 0,
    bool all = false,
    MPI_Op op = MPI_SUM)
  2. template<typename T>
    void mpi_reduce_in_place (std::vector<T> & v,
    communicator c = {},
    int root = 0,
    bool all = false,
    MPI_Op op = MPI_SUM)

Documentation

Template parameters

  • T Type to be reduced.

Parameters

  • x Object to be reduced.

  • c mpi::communicator.

  • root Rank of the root process.

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

  • op MPI_Op used in the reduction.

  • v std::vector to reduce.