X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/96cedde3cdbc0b8ffc3f096a1b65d021b0226f99..3dd753cd9e46d794e00629d03183250aec4a17e4:/include/simgrid/kernel/routing/TorusZone.hpp diff --git a/include/simgrid/kernel/routing/TorusZone.hpp b/include/simgrid/kernel/routing/TorusZone.hpp index bd88b6874d..22f2511202 100644 --- a/include/simgrid/kernel/routing/TorusZone.hpp +++ b/include/simgrid/kernel/routing/TorusZone.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2014-2022. 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. */ @@ -19,16 +19,19 @@ namespace routing { * */ -class XBT_PRIVATE TorusZone : public ClusterZone { +class XBT_PRIVATE TorusZone : public ClusterBase { + std::vector dimensions_; + public: - explicit TorusZone(NetZoneImpl* father, std::string name, resource::NetworkModel* netmodel); - void create_links_for_node(ClusterCreationArgs* cluster, int id, int rank, unsigned int position) override; - void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override; - void parse_specific_arguments(ClusterCreationArgs* cluster) override; + explicit TorusZone(const std::string& name) : ClusterBase(name){}; + void create_torus_links(unsigned long id, int rank, unsigned long position); + void get_local_route(const NetPoint* src, const NetPoint* dst, Route* into, double* latency) override; + void set_topology(const std::vector& dimensions); -private: - std::vector dimensions_; + /** @brief Convert topology parameters from string to vector of uint */ + static std::vector parse_topo_parameters(const std::string& topo_parameters); }; + } // namespace routing } // namespace kernel } // namespace simgrid