Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
change e_surf_link_sharing_policy_t into a proper enum class
[simgrid.git] / include / simgrid / kernel / routing / DragonflyZone.hpp
index bf389a4..2db8af0 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** blueLinks_  = nullptr;
-  surf::LinkImpl** blackLinks_ = nullptr;
-  surf::LinkImpl** greenLinks_ = nullptr;
-  surf::LinkImpl** myNodes_    = 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();
 };
@@ -63,25 +64,28 @@ public:
   explicit DragonflyZone(NetZone* 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 createLink(const std::string& id, int numlinks, resource::LinkImpl** linkup, resource::LinkImpl** linkdown);
 
   void rankId_to_coords(int rankId, unsigned int (*coords)[4]);
 
 private:
-  ClusterCreationArgs* cluster_     = nullptr;
-  unsigned int numNodesPerBlade_    = 0;
-  unsigned int numBladesPerChassis_ = 0;
-  unsigned int numChassisPerGroup_  = 0;
-  unsigned int numGroups_           = 0;
-  unsigned int numLinksGreen_       = 0;
-  unsigned int numLinksBlack_       = 0;
-  unsigned int numLinksBlue_        = 0;
-  unsigned int numLinksperLink_     = 1; // splitduplex -> 2, only for local link
+  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;
+  unsigned int num_groups_             = 0;
+  unsigned int num_links_green_        = 0;
+  unsigned int num_links_black_        = 0;
+  unsigned int num_links_blue_         = 0;
+  unsigned int num_links_per_link_     = 1; // splitduplex -> 2, only for local link
   DragonflyRouter** routers_        = nullptr;
 };
 } // namespace routing