Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement VM::all() as a native, and use it in tests
[simgrid.git] / src / smpi / smpi_topo.hpp
index 472b927..7dd16ce 100644 (file)
@@ -16,10 +16,14 @@ typedef enum MPIR_Topo_type {
   MPI_INVALID_TOPO=-1
 } MPIR_Topo_type;
 
+typedef SMPI_Topology *MPI_Topology;
+
 namespace simgrid{
 namespace smpi{
 
 class Topo {
+  public:
+    virtual ~Topo()=default;
   protected:
   MPI_Comm comm_;
 };
@@ -42,6 +46,7 @@ class Topo_Cart: public Topo {
     int rank(int* coords, int* rank);
     int shift(int direction, int disp, int *rank_source, int *rank_dest) ;
     int dim_get(int *ndims);
+    static int Dims_create(int nnodes, int ndims, int dims[]);
 };
 
 
@@ -70,11 +75,6 @@ class Topo_Dist_Graph: public Topo {
     ~Topo_Dist_Graph();
 };
 
-/*
- * This is a utility function, no need to have anything in the lower layer for this at all
- */
-extern int Dims_create(int nnodes, int ndims, int dims[]);
-
 }
 }