A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix some more doc bugs
[simgrid.git]
/
src
/
smpi
/
colls
/
smpi_mpich_selector.cpp
diff --git
a/src/smpi/colls/smpi_mpich_selector.cpp
b/src/smpi/colls/smpi_mpich_selector.cpp
index f2c5af319df675678aeda9e01047f0f8263d3f5a..d01a1a87141420335ca51b3ccfdddc8655fb88d9 100644
(file)
--- a/
src/smpi/colls/smpi_mpich_selector.cpp
+++ b/
src/smpi/colls/smpi_mpich_selector.cpp
@@
-1,6
+1,6
@@
/* selector for collective algorithms based on mpich decision logic */
/* selector for collective algorithms based on mpich decision logic */
-/* Copyright (c) 2009-20
19
. The SimGrid Team.
+/* Copyright (c) 2009-20
23
. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
@@
-8,6
+8,8
@@
#include "colls_private.hpp"
#include "colls_private.hpp"
+#include <memory>
+
/* This is the default implementation of allreduce. The algorithm is:
Algorithm: MPI_Allreduce
/* This is the default implementation of allreduce. The algorithm is:
Algorithm: MPI_Allreduce
@@
-56,8
+58,7
@@
End Algorithm: MPI_Allreduce
*/
End Algorithm: MPI_Allreduce
*/
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
int allreduce__mpich(const void *sbuf, void *rbuf, int count,
MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
{
int allreduce__mpich(const void *sbuf, void *rbuf, int count,
MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
{
@@
-695,13
+696,11
@@
int scatter__mpich(const void *sbuf, int scount,
{
std::unique_ptr<unsigned char[]> tmp_buf;
if(comm->rank()!=root){
{
std::unique_ptr<unsigned char[]> tmp_buf;
if(comm->rank()!=root){
- tmp_buf
.reset(new unsigned char[rcount * rdtype->get_extent()]
);
+ tmp_buf
= std::make_unique<unsigned char[]>(rcount * rdtype->get_extent()
);
sbuf = tmp_buf.get();
scount = rcount;
sdtype = rdtype;
}
return scatter__ompi_binomial(sbuf, scount, sdtype, rbuf, rcount, rdtype, root, comm);
}
sbuf = tmp_buf.get();
scount = rcount;
sdtype = rdtype;
}
return scatter__ompi_binomial(sbuf, scount, sdtype, rbuf, rcount, rdtype, root, comm);
}
-}
-}
-
+} // namespace simgrid::smpi