|
51 | 51 | * @brief Generic and specialized implementations for a subset of collective MPI communications (broadcast, reduce,
|
52 | 52 | * gather, scatter).
|
53 | 53 | *
|
54 |
| - * @details The generic functions (mpi::broadcast, mpi::reduce, mpi::scatter, ...) call their more specialized |
55 |
| - * counterparts (e.g. mpi::mpi_broadcast, mpi::mpi_reduce, mpi::mpi_scatter, ...). |
56 |
| - * |
57 |
| - * **mpi** provides (some) implementations for |
58 |
| - * - scalar types that have a corresponding mpi::mpi_type, |
59 |
| - * - `std::vector` and `std::array` types with MPI compatible value types, |
60 |
| - * - `std::string` and |
61 |
| - * - `std::pair`. |
62 |
| - * |
63 |
| - * Furthermore, there are several functions to simplify communicating generic, contiguous ranges: mpi::broadcast_range, |
64 |
| - * mpi::gather_range, mpi::reduce_in_place_range, mpi::reduce_range and mpi::scatter_range. |
| 54 | + * @details **mpi** provides several generic collective communications routines as well as specializations for certain |
| 55 | + * common types. The generic functions usually simply forward the call to one of the specializations (`mpi_broadcast`, |
| 56 | + * `mpi_gather`, `mpi_gather_into`, `mpi_reduce`, `mpi_reduce_into`, `mpi_scatter` or `mpi_scatter_into`) using ADL but |
| 57 | + * can also perform some additional checks. It is therefore recommended to always use the generic versions when |
| 58 | + * possible. |
| 59 | + * |
| 60 | + * Here is a short overview of the available generic functions: |
| 61 | + * - mpi::broadcast: Calls the specialization `mpi_broadcast`. |
| 62 | + * - mpi::gather: Calls the specialization `mpi_gather` if it is implemented. Otherwise, it calls mpi::gather_into with |
| 63 | + * a default constructed output object. |
| 64 | + * - mpi::gather_into: Calls the specialization `mpi_gather_into`. |
| 65 | + * - mpi::reduce: Calls the specialization `mpi_reduce` if it is implemented. Otherwise, it calls mpi::reduce_into with |
| 66 | + * a default constructed output object. |
| 67 | + * - mpi::reduce_in_place: Calls the specialization `mpi_reduce_into` with the same input and output object. |
| 68 | + * - mpi::reduce_into: Calls the specialization `mpi_reduce_into`. |
| 69 | + * - mpi::scatter: Calls the specialization `mpi_scatter` if it is implemented. Otherwise, it calls mpi::scatter_into |
| 70 | + * with a default constructed output object. |
| 71 | + * - mpi::scatter_into: Calls the specialization `mpi_scatter_into`. |
| 72 | + * |
| 73 | + * In case, all processes should receive the result of the MPI operation, one can use the convenience functions |
| 74 | + * mpi::all_gather, mpi::all_gather_into, mpi::all_reduce, mpi::all_reduce_in_place or mpi::all_reduce_into. They |
| 75 | + * forward the given arguments to their "non-all" counterparts with the `all` argument set to true. |
| 76 | + * |
| 77 | + * **mpi** provides various specializations for several types. For example, |
| 78 | + * - for MPI compatible types, i.e. for types that have a corresponding mpi::mpi_type, it provides an |
| 79 | + * @ref "mpi::mpi_broadcast(T &x, mpi::communicator, int)" "mpi_broadcast", |
| 80 | + * @ref "mpi::mpi_reduce(T const &, mpi::communicator, int, bool, MPI_Op)" "mpi_reduce", |
| 81 | + * @ref "mpi::mpi_reduce_into(T const &, T &, mpi::communicator, int, bool, MPI_Op)" "mpi_reduce_into", |
| 82 | + * @ref "mpi::mpi_gather(T const &, mpi::communicator, int, bool)" "mpi_gather" and an |
| 83 | + * @ref "mpi::mpi_gather_into(T const &, R &&, mpi::communicator, int, bool)" "mpi_gather_into". |
| 84 | + * - for strings, it provides an @ref "mpi::mpi_broadcast(std::string &, mpi::communicator, int)" "mpi_broadcast" |
| 85 | + * and an @ref "mpi::mpi_gather_into(std::string const &, std::string &, mpi::communicator, int, bool)" |
| 86 | + * "mpi_gather_into". |
| 87 | + * |
| 88 | + * Users are encouraged to implement their own specializations for their custom types or in case a specialization is |
| 89 | + * missing (see e.g. @ref ex4). |
| 90 | + * |
| 91 | + * Furthermore, there are several functions to simplify communicating (contiguous) ranges: mpi::broadcast_range, |
| 92 | + * mpi::gather_range, mpi::reduce_range and mpi::scatter_range. Some of these range functions are more generic than |
| 93 | + * others. Please check the documentation of the specific function for more details. |
65 | 94 | */
|
66 | 95 |
|
67 | 96 | /**
|
|
0 commit comments