Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / src / smpi / colls / barrier / barrier-mvapich2-pair.cpp
index 0a9b3b4..9a9f861 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2017. The SimGrid Team.
+/* Copyright (c) 2013-2021. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -43,7 +43,7 @@
 #include "../colls_private.hpp"
 namespace simgrid{
 namespace smpi{
-int Coll_barrier_mvapich2_pair::barrier(MPI_Comm comm)
+int barrier__mvapich2_pair(MPI_Comm comm)
 {
 
     int size, rank;
@@ -68,30 +68,26 @@ int Coll_barrier_mvapich2_pair::barrier(MPI_Comm comm)
         if (rank < surfeit) {
             /* get the fanin letter from the upper "half" process: */
             dst = N2_prev + rank;
-            Request::recv(NULL, 0, MPI_BYTE, dst, COLL_TAG_BARRIER,
-                                     comm, MPI_STATUS_IGNORE);
+            Request::recv(nullptr, 0, MPI_BYTE, dst, COLL_TAG_BARRIER, comm, MPI_STATUS_IGNORE);
         }
 
         /* combine on embedded N2_prev power-of-two processes */
         for (d = 1; d < N2_prev; d <<= 1) {
             dst = (rank ^ d);
-            Request::sendrecv(NULL, 0, MPI_BYTE, dst, COLL_TAG_BARRIER, NULL,
-                                 0, MPI_BYTE, dst, COLL_TAG_BARRIER, comm,
-                                 MPI_STATUS_IGNORE);
+            Request::sendrecv(nullptr, 0, MPI_BYTE, dst, COLL_TAG_BARRIER, nullptr, 0, MPI_BYTE, dst, COLL_TAG_BARRIER,
+                              comm, MPI_STATUS_IGNORE);
         }
 
         /* fanout data to nodes above N2_prev... */
         if (rank < surfeit) {
             dst = N2_prev + rank;
-            Request::send(NULL, 0, MPI_BYTE, dst, COLL_TAG_BARRIER,
-                                     comm);
+            Request::send(nullptr, 0, MPI_BYTE, dst, COLL_TAG_BARRIER, comm);
         }
     } else {
         /* fanin data to power of 2 subset */
         src = rank - N2_prev;
-        Request::sendrecv(NULL, 0, MPI_BYTE, src, COLL_TAG_BARRIER,
-                                     NULL, 0, MPI_BYTE, src, COLL_TAG_BARRIER,
-                                     comm, MPI_STATUS_IGNORE);
+        Request::sendrecv(nullptr, 0, MPI_BYTE, src, COLL_TAG_BARRIER, nullptr, 0, MPI_BYTE, src, COLL_TAG_BARRIER,
+                          comm, MPI_STATUS_IGNORE);
     }
 
     return mpi_errno;