Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Leak-- (seen in maestro-set).
[simgrid.git] / src / smpi / colls / allgather / allgather-smp-simple.cpp
index 8d7f190..42dad10 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
@@ -6,7 +6,11 @@
 
 #include "../colls_private.h"
 
-int smpi_coll_tuned_allgather_smp_simple(void *send_buf, int scount,
+namespace simgrid{
+namespace smpi{
+
+
+int Coll_allgather_smp_simple::allgather(void *send_buf, int scount,
                                          MPI_Datatype stype, void *recv_buf,
                                          int rcount, MPI_Datatype rtype,
                                          MPI_Comm comm)
@@ -63,7 +67,7 @@ int smpi_coll_tuned_allgather_smp_simple(void *send_buf, int scount,
 
   }
 
-  // INTER-SMP-ALLGATHER 
+  // INTER-SMP-ALLGATHER
   // Every root of each SMP node post INTER-Sendrecv, then do INTRA-Bcast for each receiving message
 
 
@@ -82,7 +86,7 @@ int smpi_coll_tuned_allgather_smp_simple(void *send_buf, int scount,
       src = ((inter_rank - i + inter_comm_size) % inter_comm_size) * num_core;
       //send_offset = (rank * sextent * scount);
       recv_offset = (src * sextent * scount);
-      //      Request::sendrecv((recv_buf+send_offset), (scount * num_core), stype, dst, tag, 
+      //      Request::sendrecv((recv_buf+send_offset), (scount * num_core), stype, dst, tag,
       //             (recv_buf+recv_offset), (rcount * num_core), rtype, src, tag, comm, &status);
       //MPIC_Isend((recv_buf+send_offset), (scount * num_core), stype, dst, tag, comm, req_ptr++);
       *(req_ptr++) = Request::irecv(((char *) recv_buf + recv_offset), (rcount * num_core), rtype,
@@ -94,7 +98,7 @@ int smpi_coll_tuned_allgather_smp_simple(void *send_buf, int scount,
       //src = ((inter_rank-i+inter_comm_size)%inter_comm_size) * num_core;
       send_offset = (rank * sextent * scount);
       //recv_offset = (src * sextent * scount);
-      //      Request::sendrecv((recv_buf+send_offset), (scount * num_core), stype, dst, tag, 
+      //      Request::sendrecv((recv_buf+send_offset), (scount * num_core), stype, dst, tag,
       //             (recv_buf+recv_offset), (rcount * num_core), rtype, src, tag, comm, &status);
       *(req_ptr++) = Request::isend(((char *) recv_buf + send_offset), (scount * num_core), stype,
                 dst, tag, comm);
@@ -121,3 +125,7 @@ int smpi_coll_tuned_allgather_smp_simple(void *send_buf, int scount,
 
   return MPI_SUCCESS;
 }
+
+
+}
+}