Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'actor-yield' of github.com:Takishipp/simgrid into actor-yield
[simgrid.git] / src / smpi / colls / reduce / reduce-scatter-gather.cpp
index 105a490..fc55a39 100644 (file)
@@ -1,17 +1,18 @@
-/* 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
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "../colls_private.h"
+#include "../colls_private.hpp"
 
 /*
   reduce
   Author: MPICH
  */
-
-int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf,
+namespace simgrid{
+namespace smpi{
+int Coll_reduce_scatter_gather::reduce(void *sendbuf, void *recvbuf,
                                           int count, MPI_Datatype datatype,
                                           MPI_Op op, int root, MPI_Comm comm)
 {
@@ -33,13 +34,13 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf,
     return 0;
   rank = comm->rank();
   comm_size = comm->size();
-  
+
 
 
   extent = datatype->get_extent();
   /* If I'm not the root, then my recvbuf may not be valid, therefore
   I have to allocate a temporary one */
-  if (rank != root && !recvbuf) {
+  if (rank != root && not recvbuf) {
     temporary_buffer=1;
     recvbuf = (void *)smpi_get_tmp_recvbuffer(count * extent);
   }
@@ -410,3 +411,5 @@ int smpi_coll_tuned_reduce_scatter_gather(void *sendbuf, void *recvbuf,
 
   return 0;
 }
+}
+}