Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / src / smpi / include / smpi_topo.hpp
index 507606f..24efab5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2021. 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. */
@@ -8,8 +8,9 @@
 
 #include "smpi_comm.hpp"
 #include "smpi_status.hpp"
+#include <memory>
 
-typedef SMPI_Topology *MPI_Topology;
+using MPI_Topology = std::shared_ptr<SMPI_Topology>;
 
 namespace simgrid{
 namespace smpi{
@@ -38,7 +39,7 @@ public:
   int get(int maxdims, int* dims, int* periods, int* coords);
   int rank(const int* coords, int* rank);
   int shift(int direction, int disp, int* rank_source, int* rank_dest);
-  int dim_get(int* ndims);
+  int dim_get(int* ndims) const;
   static int Dims_create(int nnodes, int ndims, int dims[]);
 };