Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
split NetZone and NetZoneImpl as it should in s4u realm
[simgrid.git] / include / simgrid / kernel / routing / DragonflyZone.hpp
index f5063d9..c300f7a 100644 (file)
@@ -7,6 +7,7 @@
 #define SURF_ROUTING_CLUSTER_DRAGONFLY_HPP_
 
 #include <simgrid/kernel/routing/ClusterZone.hpp>
+#include <simgrid/s4u/Link.hpp>
 
 namespace simgrid {
 namespace kernel {
@@ -17,10 +18,10 @@ public:
   unsigned int group_;
   unsigned int chassis_;
   unsigned int blade_;
-  surf::LinkImpl** blue_links_  = nullptr;
-  surf::LinkImpl** black_links_ = nullptr;
-  surf::LinkImpl** green_links_ = nullptr;
-  surf::LinkImpl** my_nodes_    = nullptr;
+  resource::LinkImpl** blue_links_  = nullptr;
+  resource::LinkImpl** black_links_ = nullptr;
+  resource::LinkImpl** green_links_ = nullptr;
+  resource::LinkImpl** my_nodes_    = nullptr;
   DragonflyRouter(int i, int j, int k);
   ~DragonflyRouter();
 };
@@ -60,20 +61,24 @@ public:
  */
 class XBT_PUBLIC DragonflyZone : public ClusterZone {
 public:
-  explicit DragonflyZone(NetZone* father, std::string name);
+  explicit DragonflyZone(NetZoneImpl* father, std::string name);
   ~DragonflyZone() override;
   //      void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position) override;
-  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
+  void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
   void parse_specific_arguments(ClusterCreationArgs* cluster) override;
   void seal() override;
-  void generateRouters();
-  void generateLinks();
-  void createLink(const std::string& id, int numlinks, surf::LinkImpl** linkup, surf::LinkImpl** linkdown);
 
-  void rankId_to_coords(int rankId, unsigned int (*coords)[4]);
+  void rankId_to_coords(int rank_id, unsigned int coords[4]);
 
 private:
-  ClusterCreationArgs* cluster_     = nullptr;
+  void generate_routers();
+  void generate_links();
+  void create_link(const std::string& id, int numlinks, resource::LinkImpl** linkup, resource::LinkImpl** linkdown);
+
+  simgrid::s4u::Link::SharingPolicy sharing_policy_;
+  double bw_  = 0;
+  double lat_ = 0;
+
   unsigned int num_nodes_per_blade_    = 0;
   unsigned int num_blades_per_chassis_ = 0;
   unsigned int num_chassis_per_group_  = 0;