Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / smpi / colls / alltoall / alltoall-3dmesh.cpp
index 8541551..e8c5347 100644 (file)
@@ -1,11 +1,11 @@
-/* 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
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "../colls_private.h"
-#include <math.h>
+#include "../colls_private.hpp"
+#include <cmath>
 
 /*****************************************************************************
 
@@ -45,7 +45,8 @@ static int alltoall_check_is_3dmesh(int num, int *i, int *j, int *k)
   }
   return 0;
 }
-
+namespace simgrid{
+namespace smpi{
 int Coll_alltoall_3dmesh::alltoall(void *send_buff, int send_count,
                                     MPI_Datatype send_type,
                                     void *recv_buff, int recv_count,
@@ -64,7 +65,7 @@ int Coll_alltoall_3dmesh::alltoall(void *send_buff, int send_count,
   num_procs = comm->size();
   extent = send_type->get_extent();
 
-  if (!alltoall_check_is_3dmesh(num_procs, &X, &Y, &Z))
+  if (not alltoall_check_is_3dmesh(num_procs, &X, &Y, &Z))
     return MPI_ERR_OTHER;
 
   num_reqs = X;
@@ -184,3 +185,5 @@ int Coll_alltoall_3dmesh::alltoall(void *send_buff, int send_count,
   smpi_free_tmp_buffer(tmp_buff2);
   return MPI_SUCCESS;
 }
+}
+}