X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/eda8761162ea40271daf72d84c25b8c030f510e9..1c8c73ef7e2f1307c815cd11071f8c584436f9d5:/src/smpi/smpi_topo.hpp diff --git a/src/smpi/smpi_topo.hpp b/src/smpi/smpi_topo.hpp index 6e421b4de0..a884931201 100644 --- a/src/smpi/smpi_topo.hpp +++ b/src/smpi/smpi_topo.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2010-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-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. */ @@ -7,13 +6,17 @@ #ifndef SMPI_TOPO_HPP_INCLUDED #define SMPI_TOPO_HPP_INCLUDED -#include "private.h" +#include "src/smpi/smpi_comm.hpp" +#include "src/smpi/smpi_status.hpp" +typedef SMPI_Topology *MPI_Topology; namespace simgrid{ namespace smpi{ class Topo { + public: + virtual ~Topo()=default; protected: MPI_Comm comm_; }; @@ -27,7 +30,7 @@ class Topo_Cart: public Topo { int *periodic_; int *position_; public: - Topo_Cart(int ndims); + explicit Topo_Cart(int ndims); ~Topo_Cart(); Topo_Cart(MPI_Comm comm_old, int ndims, int dims[], int periods[], int reorder, MPI_Comm *comm_cart); Topo_Cart* sub(const int remain_dims[], MPI_Comm *newcomm) ; @@ -36,6 +39,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[]); }; @@ -64,11 +68,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[]); - } }