TRIQS/mpi 1.3.0
C++ interface to MPI
Loading...
Searching...
No Matches
ranges.hpp File Reference
#include "./chunk.hpp"
#include "./communicator.hpp"
#include "./datatypes.hpp"
#include "./environment.hpp"
#include "./generic_communication.hpp"
#include "./macros.hpp"
#include "./utils.hpp"
#include <itertools/itertools.hpp>
#include <mpi.h>
#include <algorithm>
#include <ranges>
#include <stdexcept>
#include <vector>

Detailed Description

Provides an MPI broadcast, reduce, scatter and gather for contiguous ranges.

Definition in file ranges.hpp.

Go to the source code of this file.

Functions

template<contiguous_sized_range R>
void mpi::broadcast_range (R &&rg, communicator c={}, int root=0)
 Implementation of an MPI broadcast for an mpi::contiguous_sized_range object.
 
template<contiguous_sized_range R1, contiguous_sized_range R2>
void mpi::gather_range (R1 &&in_rg, R2 &&out_rg, long out_size, communicator c={}, int root=0, bool all=false)
 Implementation of an MPI gather for an mpi::contiguous_sized_range.
 
template<contiguous_sized_range R>
void mpi::reduce_in_place_range (R &&rg, communicator c={}, int root=0, bool all=false, MPI_Op op=MPI_SUM)
 Implementation of an in-place MPI reduce for an mpi::contiguous_sized_range object.
 
template<contiguous_sized_range R1, contiguous_sized_range R2>
void mpi::reduce_range (R1 &&in_rg, R2 &&out_rg, communicator c={}, int root=0, bool all=false, MPI_Op op=MPI_SUM)
 Implementation of an MPI reduce for an mpi::contiguous_sized_range.
 
template<contiguous_sized_range R1, contiguous_sized_range R2>
requires (std::same_as<std::ranges::range_value_t<R1>, std::ranges::range_value_t<R2>>)
void mpi::scatter_range (R1 &&in_rg, R2 &&out_rg, long in_size, communicator c={}, int root=0, long chunk_size=1)
 Implementation of an MPI scatter for an mpi::contiguous_sized_range.