.. Generated automatically by cpp2rst .. highlight:: c .. role:: red .. role:: green .. role:: param .. _mpi__mpi_reduce: mpi::mpi_reduce =============== *#include * **Synopsis** .. rst-class:: cppsynopsis 1. | :green:`template` | T :red:`mpi_reduce` (T const & :param:`x`, :ref:`communicator ` :param:`c` = {}, int :param:`root` = 0, bool :param:`all` = false, MPI_Op :param:`op` = MPI_SUM) 2. | :green:`template` | std::vector> :red:`mpi_reduce` (std::vector const & :param:`v`, | :ref:`communicator ` :param:`c` = {}, | int :param:`root` = 0, | bool :param:`all` = false, | MPI_Op :param:`op` = MPI_SUM) Documentation Template parameters ^^^^^^^^^^^^^^^^^^^ * :param:`T` Type to be reduced. Parameters ^^^^^^^^^^ * :param:`x` Object to be reduced. * :param:`c` mpi::communicator. * :param:`root` Rank of the root process. * :param:`all` Should all processes receive the result of the reduction. * :param:`op` `MPI_Op` used in the reduction. * :param:`v` std::vector to reduce. Returns ^^^^^^^ std::vector containing the result of each individual reduction.