@@ -90,7 +90,7 @@ namespace mpi {
90
90
* @param c mpi::communicator.
91
91
* @param root Rank of the root process.
92
92
*/
93
- template <contiguous_sized_range R> void broadcast_range (R &&rg, communicator c = {}, int root = 0 ) {
93
+ template <contiguous_sized_range R> void broadcast_range (R &&rg, communicator c = {}, int root = 0 ) { // NOLINT (ranges need not be forwarded)
94
94
// check the sizes of all ranges
95
95
using value_t = std::ranges::range_value_t <R>;
96
96
auto const size = std::ranges::size (rg);
@@ -151,7 +151,9 @@ namespace mpi {
151
151
* @param all Should all processes receive the result of the reduction.
152
152
* @param op `MPI_Op` used in the reduction.
153
153
*/
154
- template <contiguous_sized_range R> void reduce_in_place_range (R &&rg, communicator c = {}, int root = 0 , bool all = false , MPI_Op op = MPI_SUM) {
154
+ template <contiguous_sized_range R>
155
+ void reduce_in_place_range (R &&rg, communicator c = {}, int root = 0 , bool all = false , // NOLINT (ranges need not be forwarded)
156
+ MPI_Op op = MPI_SUM) {
155
157
// check the sizes of all ranges
156
158
using value_t = std::ranges::range_value_t <R>;
157
159
auto const size = std::ranges::size (rg);
@@ -221,7 +223,8 @@ namespace mpi {
221
223
* @param op `MPI_Op` used in the reduction.
222
224
*/
223
225
template <contiguous_sized_range R1, contiguous_sized_range R2>
224
- void reduce_range (R1 &&in_rg, R2 &&out_rg, communicator c = {}, int root = 0 , bool all = false , MPI_Op op = MPI_SUM) {
226
+ void reduce_range (R1 &&in_rg, R2 &&out_rg, communicator c = {}, int root = 0 , bool all = false , // NOLINT (ranges need not be forwarded)
227
+ MPI_Op op = MPI_SUM) {
225
228
// check input and output ranges
226
229
auto const in_size = std::ranges::size (in_rg);
227
230
EXPECTS_WITH_MESSAGE (all_equal (in_size, c), " Input range sizes are not equal across all processes in mpi::reduce_range" );
@@ -311,7 +314,8 @@ namespace mpi {
311
314
*/
312
315
template <contiguous_sized_range R1, contiguous_sized_range R2>
313
316
requires (std::same_as<std::ranges::range_value_t <R1>, std::ranges::range_value_t <R2>>)
314
- void scatter_range (R1 &&in_rg, R2 &&out_rg, long in_size, communicator c = {}, int root = 0 , long chunk_size = 1 ) {
317
+ void scatter_range (R1 &&in_rg, R2 &&out_rg, long in_size, communicator c = {}, int root = 0 , // NOLINT (ranges need not be forwarded)
318
+ long chunk_size = 1 ) {
315
319
// check the sizes of the input and output ranges
316
320
if (c.rank () == root) {
317
321
EXPECTS_WITH_MESSAGE (in_size == std::ranges::size (in_rg), " Input range size not equal to provided size in mpi::scatter_range" );
@@ -405,7 +409,8 @@ namespace mpi {
405
409
* @param all Should all processes receive the result of the reduction.
406
410
*/
407
411
template <contiguous_sized_range R1, contiguous_sized_range R2>
408
- void gather_range (R1 &&in_rg, R2 &&out_rg, long out_size, communicator c = {}, int root = 0 , bool all = false ) {
412
+ void gather_range (R1 &&in_rg, R2 &&out_rg, long out_size, communicator c = {}, int root = 0 , // NOLINT (ranges need not be forwarded)
413
+ bool all = false ) {
409
414
// check the sizes of the input and output ranges
410
415
auto const in_size = std::ranges::size (in_rg);
411
416
EXPECTS_WITH_MESSAGE (out_size = all_reduce (in_size, c), " Input range sizes don't add up to output range size in mpi::gather_range" );
0 commit comments