Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / src / smpi / colls / allreduce / allreduce-mvapich-two-level.cpp
index 23d0267..841db60 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2020. 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
@@ -53,9 +53,7 @@ extern int (*MV2_Allreduce_intra_function)(const void *sendbuf,
     MPI_Datatype datatype,
     MPI_Op op, MPI_Comm comm);
 
-
-namespace simgrid{
-namespace smpi{
+namespace simgrid::smpi {
 static  int MPIR_Allreduce_reduce_p2p_MV2(const void *sendbuf,
     void *recvbuf,
     int count,
@@ -91,9 +89,9 @@ int allreduce__mvapich2_two_level(const void *sendbuf,
     int local_rank = -1, local_size = 0;
 
     //if not set (use of the algo directly, without mvapich2 selector)
-    if(MV2_Allreduce_intra_function==NULL)
+    if (MV2_Allreduce_intra_function == nullptr)
       MV2_Allreduce_intra_function = allreduce__mpich;
-    if(MV2_Allreducection==NULL)
+    if (MV2_Allreducection == nullptr)
       MV2_Allreducection = allreduce__rdb;
 
     if(comm->get_leaders_comm()==MPI_COMM_NULL){
@@ -171,5 +169,4 @@ int allreduce__mvapich2_two_level(const void *sendbuf,
     return (mpi_errno);
 
 }
-}
-}
+} // namespace simgrid::smpi