Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Replace surf by surf++ and make it compile
[simgrid.git] / src / surf / surf_routing_dijkstra.hpp
1 #include "surf_routing_generic.hpp"
2
3 #ifndef SURF_ROUTING_DIJKSTRA_HPP_
4 #define SURF_ROUTING_DIJKSTRA_HPP_
5
6 typedef struct graph_node_data {
7   int id;
8   int graph_id;                 /* used for caching internal graph id's */
9 } s_graph_node_data_t, *graph_node_data_t;
10
11 typedef struct graph_node_map_element {
12   xbt_node_t node;
13 } s_graph_node_map_element_t, *graph_node_map_element_t;
14
15 typedef struct route_cache_element {
16   int *pred_arr;
17   int size;
18 } s_route_cache_element_t, *route_cache_element_t;
19
20 class AsDijkstra : public AsGeneric {
21 public:
22   AsDijkstra();
23   AsDijkstra(int cached);
24   ~AsDijkstra();
25         xbt_node_t routeGraphNewNode(int id, int graph_id);
26         graph_node_map_element_t nodeMapSearch(int id);
27         void newRoute(int src_id, int dst_id, sg_platf_route_cbarg_t e_route);
28         void addLoopback();
29         void getRouteAndLatency(RoutingEdgePtr src, RoutingEdgePtr dst, sg_platf_route_cbarg_t route, double *lat);
30         xbt_dynar_t getOnelinkRoutes();
31         void getRouteAndLatency(sg_platf_route_cbarg_t route, double *lat);
32         void parseRoute(sg_platf_route_cbarg_t route);
33         void end();
34
35   xbt_graph_t p_routeGraph;      /* xbt_graph */
36   xbt_dict_t p_graphNodeMap;    /* map */
37   xbt_dict_t p_routeCache;       /* use in cache mode */
38   int m_cached;
39 };
40
41 #endif /* SURF_ROUTING_DIJKSTRA_HPP_ */