TRIQS/mpi 1.3.0
C++ interface to MPI
Loading...
Searching...
No Matches
vector.hpp File Reference
#include "./communicator.hpp"
#include "./generic_communication.hpp"
#include "./ranges.hpp"
#include "./utils.hpp"
#include <mpi.h>
#include <type_traits>
#include <utility>
#include <vector>

Detailed Description

Provides an MPI broadcast, reduce, scatter and gather for std::vector.

Definition in file vector.hpp.

Go to the source code of this file.

Functions

template<typename T>
void mpi::mpi_broadcast (std::vector< T > &v, communicator c={}, int root=0)
 Implementation of an MPI broadcast for a std::vector.
 
template<typename T>
void mpi::mpi_gather_into (std::vector< T > const &v_in, std::vector< T > &v_out, communicator c={}, int root=0, bool all=false)
 Implementation of an MPI gather for a std::vector that gathers directly into an existing output vector.
 
template<typename T>
auto mpi::mpi_reduce (std::vector< T > const &v, communicator c={}, int root=0, bool all=false, MPI_Op op=MPI_SUM)
 Implementation of an MPI reduce for a std::vector.
 
template<typename T1, typename T2>
void mpi::mpi_reduce_into (std::vector< T1 > const &v_in, std::vector< T2 > &v_out, communicator c={}, int root=0, bool all=false, MPI_Op op=MPI_SUM)
 Implementation of an MPI reduce for a std::vector that reduces directly into a given output vector.
 
template<typename T>
void mpi::mpi_scatter_into (std::vector< T > const &v_in, std::vector< T > &v_out, communicator c={}, int root=0)
 Implementation of an MPI scatter for a std::vector that scatters directly into an existing output vector.