..
   Generated automatically by cpp2rst

.. highlight:: c
.. role:: red
.. role:: green
.. role:: param


.. _mpi__mpi_reduce_in_place:

mpi::mpi_reduce_in_place
========================

*#include <mpi.hpp>*



**Synopsis**

 .. rst-class:: cppsynopsis

    1. | :green:`template<typename T>`
       | void :red:`mpi_reduce_in_place` (T & :param:`x`,
       |                      :ref:`communicator <mpi__communicator>` :param:`c` = {},
       |                      int :param:`root` = 0,
       |                      bool :param:`all` = false,
       |                      MPI_Op :param:`op` = MPI_SUM)

    2. | :green:`template<typename T>`
       | void :red:`mpi_reduce_in_place` (std::vector<T> & :param:`v`,
       |                      :ref:`communicator <mpi__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.