-/* Copyright (c) 2013-2022. The SimGrid Team.
+/* Copyright (c) 2013-2023. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* Returns: - MPI_SUCCESS or error code
* Limitation: - Works only for commutative operations.
*/
-namespace simgrid {
-namespace smpi {
+namespace simgrid::smpi {
int reduce_scatter__ompi_basic_recursivehalving(const void *sbuf,
void *rbuf,
const int *rcounts,
precv = tmpbuf[1] - gap;
if (sbuf != MPI_IN_PLACE) {
- err = Datatype::copy(sbuf, totalcount, dtype, psend, totalcount, dtype);
- if (MPI_SUCCESS != err) { goto cleanup_and_return; }
+ err = Datatype::copy(sbuf, totalcount, dtype, psend, totalcount, dtype);
+ if (MPI_SUCCESS != err) { goto cleanup_and_return; }
} else {
- err = Datatype::copy(rbuf, totalcount, dtype, psend, totalcount, dtype);
+ err = Datatype::copy(rbuf, totalcount, dtype, psend, totalcount, dtype);
if (MPI_SUCCESS != err) { goto cleanup_and_return; }
}
/* Odd process */
Request::recv(precv, totalcount, dtype, rank - 1,
COLL_TAG_REDUCE_SCATTER, comm, MPI_STATUS_IGNORE);
- op->apply(precv, psend, (int*)&totalcount, dtype);
+ op->apply(precv, psend, (int*)&totalcount, dtype);
/* Adjust rank to be the bottom "remain" ranks */
vrank = rank / 2;
}
free(tmpbuf[1]);
return err;
}
-}
-}
+} // namespace simgrid::smpi