Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill all horizontal tabs
[simgrid.git] / src / smpi / colls / reduce / reduce-binomial.cpp
index ac0b789..e0cdc0c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2014. The SimGrid Team.
+/* Copyright (c) 2013-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,7 +7,8 @@
 #include "../colls_private.h"
 
 //#include <star-reduction.c>
-
+namespace simgrid{
+namespace smpi{
 int Coll_reduce_binomial::reduce(void *sendbuf, void *recvbuf, int count,
                                     MPI_Datatype datatype, MPI_Op op, int root,
                                     MPI_Comm comm)
@@ -76,7 +77,7 @@ int Coll_reduce_binomial::reduce(void *sendbuf, void *recvbuf, int count,
     mask <<= 1;
   }
 
-  if (!is_commutative && (root != 0)){
+  if (not is_commutative && (root != 0)) {
     if (rank == 0){
       Request::send(recvbuf, count, datatype, root,tag, comm);
     }else if (rank == root){
@@ -85,9 +86,11 @@ int Coll_reduce_binomial::reduce(void *sendbuf, void *recvbuf, int count,
   }
 
   if (rank != root) {
-         smpi_free_tmp_buffer(recvbuf);
+    smpi_free_tmp_buffer(recvbuf);
   }
   smpi_free_tmp_buffer(tmp_buf);
 
   return 0;
 }
+}
+}