Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill all horizontal tabs
[simgrid.git] / src / smpi / colls / allreduce / allreduce-lr.cpp
index ab847ee..1b9f5af 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 <star-reduction.c>
-
+namespace simgrid{
+namespace smpi{
 int
-smpi_coll_tuned_allreduce_lr(void *sbuf, void *rbuf, int rcount,
+Coll_allreduce_lr::allreduce(void *sbuf, void *rbuf, int rcount,
                              MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)
 {
   int tag = COLL_TAG_ALLREDUCE;
@@ -38,8 +39,8 @@ smpi_coll_tuned_allreduce_lr(void *sbuf, void *rbuf, int rcount,
 
   /* when communication size is smaller than number of process (not support) */
   if (rcount < size) {
-    XBT_WARN("MPI_allreduce_lr use default MPI_allreduce.");     
-    smpi_mpi_allreduce(sbuf, rbuf, rcount, dtype, op, comm);
+    XBT_WARN("MPI_allreduce_lr use default MPI_allreduce.");
+    Coll_allreduce_default::allreduce(sbuf, rbuf, rcount, dtype, op, comm);
     return MPI_SUCCESS; 
   }
 
@@ -97,10 +98,12 @@ smpi_coll_tuned_allreduce_lr(void *sbuf, void *rbuf, int rcount,
   /* when communication size is not divisible by number of process: 
      call the native implementation for the remain chunk at the end of the operation */
   if (remainder_flag) {
-    return mpi_coll_allreduce_fun((char *) sbuf + remainder_offset,
+    return Colls::allreduce((char *) sbuf + remainder_offset,
                          (char *) rbuf + remainder_offset, remainder, dtype, op,
                          comm);
   }
 
   return 0;
 }
+}
+}