Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
one more class in platform creation
[simgrid.git] / src / kernel / routing / DijkstraZone.hpp
index 5720cd6..001eb42 100644 (file)
@@ -14,12 +14,6 @@ struct s_graph_node_data_t {
 };
 typedef s_graph_node_data_t* graph_node_data_t;
 
-struct s_route_cache_element_t {
-  int* pred_arr;
-  int size;
-};
-typedef s_route_cache_element_t* route_cache_element_t;
-
 namespace simgrid {
 namespace kernel {
 namespace routing {
@@ -44,7 +38,7 @@ public:
   ~DijkstraZone() override;
   xbt_node_t routeGraphNewNode(int id, int graph_id);
   xbt_node_t nodeMapSearch(int id);
-  void newRoute(int src_id, int dst_id, sg_platf_route_cbarg_t e_route);
+  void newRoute(int src_id, int dst_id, RouteCreationArgs* e_route);
   /* For each vertex (node) already in the graph,
    * make sure it also has a loopback link; this loopback
    * can potentially already be in the graph, and in that
@@ -56,12 +50,14 @@ public:
    * After this function returns, any node in the graph
    * will have a loopback attached to it.
    */
-  void getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat) override;
-  void addRoute(sg_platf_route_cbarg_t route) override;
+  void getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat) override;
+  void addRoute(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
+                std::vector<simgrid::surf::LinkImpl*>& link_list, bool symmetrical) override;
 
   xbt_graph_t routeGraph_  = nullptr; /* xbt_graph */
-  std::map<int, xbt_node_t> graphNodeMap_;               /* map */
-  std::map<int, route_cache_element_t> routeCache_;      /* use in cache mode */
+  std::map<int, xbt_node_t> graphNodeMap_;     /* map */
+  bool cached_;                                /* cache mode */
+  std::map<int, std::vector<int>> routeCache_; /* use in cache mode */
 };
 }
 }