X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7b4d2c4a1c1c667a0a5676dff5dffe6cb6b8aced..5f4329821ed097d617ccb739e1dd1b22caaadf92:/include/simgrid/kernel/routing/DragonflyZone.hpp diff --git a/include/simgrid/kernel/routing/DragonflyZone.hpp b/include/simgrid/kernel/routing/DragonflyZone.hpp index 9144e16a61..83a7b9623a 100644 --- a/include/simgrid/kernel/routing/DragonflyZone.hpp +++ b/include/simgrid/kernel/routing/DragonflyZone.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2014-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. */ @@ -60,20 +60,29 @@ public: */ class XBT_PUBLIC DragonflyZone : public ClusterZone { public: - explicit DragonflyZone(NetZoneImpl* father, const std::string& name, resource::NetworkModel* netmodel); - // void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position) override; + struct Coords { + unsigned group; + unsigned chassis; + unsigned blade; + unsigned node; + }; + + explicit DragonflyZone(const std::string& name); void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override; void parse_specific_arguments(ClusterCreationArgs* cluster) override; - void seal() override; - void rankId_to_coords(int rank_id, unsigned int coords[4]); + Coords rankId_to_coords(int rank_id) const; + XBT_ATTRIB_DEPRECATED_v330("Please use rankId_to_coords(int)") void rankId_to_coords(int rank_id, + unsigned int coords[4]) const; private: + void do_seal() override; void generate_routers(); void generate_links(); - void create_link(const std::string& id, int numlinks, resource::LinkImpl** linkup, resource::LinkImpl** linkdown); + void generate_link(const std::string& id, int numlinks, resource::LinkImpl** linkup, + resource::LinkImpl** linkdown) const; - simgrid::s4u::Link::SharingPolicy sharing_policy_; + simgrid::s4u::Link::SharingPolicy sharing_policy_ = simgrid::s4u::Link::SharingPolicy::SHARED; double bw_ = 0; double lat_ = 0;