TRIQS/mpi 1.3.0
C++ interface to MPI
|
#include "./communicator.hpp"
#include <itertools/itertools.hpp>
#include <iterator>
#include <stdexcept>
#include <utility>
Provides utilities to distribute a range across MPI processes.
Definition in file chunk.hpp.
Go to the source code of this file.
Functions | |
template<typename R > | |
auto | mpi::chunk (R &&rg, communicator c={}) |
Divide a given range as evenly as possible across the MPI processes in a communicator and get the subrange assigned to the calling process. | |
long | mpi::chunk_length (long end, int nranges, int i, long min_size=1) |
Get the length of the ith subrange after splitting the integer range [0, end) as evenly as possible across n subranges. | |