TRIQS/mpi 1.3.0
C++ interface to MPI
|
#include "./datatypes.hpp"
#include "./lazy.hpp"
#include "./utils.hpp"
#include <mpi.h>
#include <type_traits>
#include <utility>
#include <vector>
Provides generic implementations for a subset of collective MPI communications (broadcast, reduce, gather, scatter).
The generic functions (mpi::broadcast, mpi::reduce, mpi::scatter, ...) call their more specialized counterparts (e.g. mpi::mpi_broadcast, mpi::mpi_reduce, mpi::mpi_scatter, ...). They depend on ADL.
Definition in file generic_communication.hpp.
Go to the source code of this file.
Functions | |
template<typename T > | |
bool | mpi::all_equal (T const &x, communicator c={}) |
Checks if a given object is equal across all ranks in the given communicator. | |
template<typename T > | |
decltype(auto) | mpi::all_gather (T &&x, communicator c={}) |
Generic MPI all-gather. | |
template<typename T > | |
decltype(auto) | mpi::all_reduce (T &&x, communicator c={}, MPI_Op op=MPI_SUM) |
Generic MPI all-reduce. | |
template<typename T > | |
void | mpi::all_reduce_in_place (T &&x, communicator c={}, MPI_Op op=MPI_SUM) |
Generic MPI all-reduce in-place. | |
template<typename T > | |
void | mpi::broadcast (T &&x, communicator c={}, int root=0) |
Generic MPI broadcast. | |
template<typename T > | |
decltype(auto) | mpi::gather (T &&x, mpi::communicator c={}, int root=0, bool all=false) |
Generic MPI gather. | |
template<typename T > requires (has_mpi_type<T>) | |
void | mpi::mpi_broadcast (T &x, communicator c={}, int root=0) |
Implementation of an MPI broadcast for types that have a corresponding MPI datatype, i.e. for which a specialization of mpi::mpi_type has been defined. | |
template<typename T > requires (has_mpi_type<T>) | |
T | mpi::mpi_reduce (T const &x, communicator c={}, int root=0, bool all=false, MPI_Op op=MPI_SUM) |
Implementation of an MPI reduce for types that have a corresponding MPI datatype, i.e. for which a specialization of mpi::mpi_type has been defined. | |
template<typename T > requires (has_mpi_type<T>) | |
void | mpi::mpi_reduce_in_place (T &x, communicator c={}, int root=0, bool all=false, MPI_Op op=MPI_SUM) |
Implementation of an in-place MPI reduce for types that have a corresponding MPI datatype, i.e. for which a specialization of mpi::mpi_type has been defined. | |
template<typename T > | |
decltype(auto) | mpi::reduce (T &&x, communicator c={}, int root=0, bool all=false, MPI_Op op=MPI_SUM) |
Generic MPI reduce. | |
template<typename T > | |
void | mpi::reduce_in_place (T &&x, communicator c={}, int root=0, bool all=false, MPI_Op op=MPI_SUM) |
Generic in-place MPI reduce. | |
template<typename T > | |
decltype(auto) | mpi::scatter (T &&x, mpi::communicator c={}, int root=0) |
Generic MPI scatter. | |