Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branches 'master' and 'master' of github.com:simgrid/simgrid
[simgrid.git] / src / smpi / colls / allgather / allgather-ompi-neighborexchange.cpp
index d8f9e8d..cb350c6 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
  */
  
  #include "../colls_private.h"
+
+namespace simgrid{
+namespace smpi{
+
 int 
-smpi_coll_tuned_allgather_ompi_neighborexchange(void *sbuf, int scount,
+Coll_allgather_ompi_neighborexchange::allgather(void *sbuf, int scount,
                                                  MPI_Datatype sdtype,
                                                  void* rbuf, int rcount,
                                                  MPI_Datatype rdtype,
@@ -86,7 +90,7 @@ smpi_coll_tuned_allgather_ompi_neighborexchange(void *sbuf, int scount,
       XBT_DEBUG(
                    "coll:tuned:allgather_intra_neighborexchange WARNING: odd size %d, switching to ring algorithm", 
                    size);
-      return smpi_coll_tuned_allgather_ring(sbuf, scount, sdtype,
+      return Coll_allgather_ring::allgather(sbuf, scount, sdtype,
                                                   rbuf, rcount, rdtype,
                                                   comm);
    }
@@ -111,7 +115,7 @@ smpi_coll_tuned_allgather_ompi_neighborexchange(void *sbuf, int scount,
    } 
 
    /* Determine neighbors, order in which blocks will arrive, etc. */
-   even_rank = !(rank % 2);
+   even_rank = not(rank % 2);
    if (even_rank) {
       neighbor[0] = (rank + 1) % size;
       neighbor[1] = (rank - 1 + size) % size;
@@ -178,3 +182,7 @@ smpi_coll_tuned_allgather_ompi_neighborexchange(void *sbuf, int scount,
                 __FILE__, line, err, rank);
    return err;
 }
+
+
+}
+}