Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / src / smpi / colls / allgather / allgather-spreading-simple.cpp
index 539358f..e500907 100644 (file)
@@ -1,10 +1,10 @@
-/* Copyright (c) 2013-2014. The SimGrid Team.
+/* Copyright (c) 2013-2019. 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"
 
 /*****************************************************************************
 
@@ -66,8 +66,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * Auther: Ahmad Faraj
  ****************************************************************************/
+
+namespace simgrid{
+namespace smpi{
+
+
 int
-smpi_coll_tuned_allgather_spreading_simple(void *send_buff, int send_count,
+Coll_allgather_spreading_simple::allgather(void *send_buff, int send_count,
                                            MPI_Datatype send_type,
                                            void *recv_buff, int recv_count,
                                            MPI_Datatype recv_type,
@@ -86,7 +91,7 @@ smpi_coll_tuned_allgather_spreading_simple(void *send_buff, int send_count,
 
   num_reqs = (2 * num_procs) - 2;
   reqs = (MPI_Request *) xbt_malloc(num_reqs * sizeof(MPI_Request));
-  if (!reqs) {
+  if (not reqs) {
     printf("allgather-spreading-simple.c:40: cannot allocate memory\n");
     MPI_Finalize();
     exit(0);
@@ -117,3 +122,6 @@ smpi_coll_tuned_allgather_spreading_simple(void *send_buff, int send_count,
 
   return MPI_SUCCESS;
 }
+
+}
+}