Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please codacy: use long form of negation in C++
[simgrid.git] / src / smpi / colls / reduce_scatter / reduce_scatter-ompi.cpp
index 0afa9b7..84fd737 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
@@ -21,8 +21,8 @@
  * Additional copyrights may follow
  */
 
-#include "colls_private.h"
-#include "coll_tuned_topo.h"
+#include "../colls_private.h"
+#include "../coll_tuned_topo.h"
 
 /*
  * Recursive-halving function is (*mostly*) copied from the BASIC coll module.
  *  Returns:    - MPI_SUCCESS or error code
  *  Limitation: - Works only for commutative operations.
  */
+namespace simgrid{
+namespace smpi{
 int
-smpi_coll_tuned_reduce_scatter_ompi_basic_recursivehalving(void *sbuf, 
+Coll_reduce_scatter_ompi_basic_recursivehalving::reduce_scatter(void *sbuf, 
                                                             void *rbuf, 
                                                             int *rcounts,
                                                             MPI_Datatype dtype,
@@ -61,7 +63,7 @@ smpi_coll_tuned_reduce_scatter_ompi_basic_recursivehalving(void *sbuf,
     size = comm->size();
    
     XBT_DEBUG("coll:tuned:reduce_scatter_ompi_basic_recursivehalving, rank %d", rank);
-    if( (op!=MPI_OP_NULL && !op->is_commutative()))
+    if ((op != MPI_OP_NULL && not op->is_commutative()))
       THROWF(arg_error,0, " reduce_scatter ompi_basic_recursivehalving can only be used for commutative operations! ");
 
     /* Find displacements and the like */
@@ -301,7 +303,7 @@ smpi_coll_tuned_reduce_scatter_ompi_basic_recursivehalving(void *sbuf,
 
 
 /*
- *   smpi_coll_tuned_reduce_scatter_ompi_ring
+ *   Coll_reduce_scatter_ompi_ring::reduce_scatter
  *
  *   Function:       Ring algorithm for reduce_scatter operation
  *   Accepts:        Same as MPI_Reduce_scatter()
@@ -360,7 +362,7 @@ smpi_coll_tuned_reduce_scatter_ompi_basic_recursivehalving(void *sbuf,
  *
  */
 int 
-smpi_coll_tuned_reduce_scatter_ompi_ring(void *sbuf, void *rbuf, int *rcounts,
+Coll_reduce_scatter_ompi_ring::reduce_scatter(void *sbuf, void *rbuf, int *rcounts,
                                           MPI_Datatype dtype,
                                           MPI_Op op,
                                           MPI_Comm comm
@@ -517,4 +519,6 @@ smpi_coll_tuned_reduce_scatter_ompi_ring(void *sbuf, void *rbuf, int *rcounts,
     if (NULL != inbuf_free[1]) smpi_free_tmp_buffer(inbuf_free[1]);
     return ret;
 }
+}
+}