X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/15f804cfddebc4fe4b305acd1c66487f2405420d..916cc08a5243e265e7900010e68ffff4e916e345:/src/smpi/include/smpi_topo.hpp diff --git a/src/smpi/include/smpi_topo.hpp b/src/smpi/include/smpi_topo.hpp index fe58401bb6..f1b652417d 100644 --- a/src/smpi/include/smpi_topo.hpp +++ b/src/smpi/include/smpi_topo.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2010-2023. 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,11 +8,11 @@ #include "smpi_comm.hpp" #include "smpi_status.hpp" +#include -typedef SMPI_Topology *MPI_Topology; +using MPI_Topology = std::shared_ptr; -namespace simgrid{ -namespace smpi{ +namespace simgrid::smpi { class Topo { MPI_Comm comm_ = MPI_COMM_NULL; @@ -38,7 +38,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[]); }; @@ -55,8 +55,6 @@ class Topo_Dist_Graph: public Topo { std::vector out_weights_; }; -} -} - +} // namespace simgrid::smpi #endif