X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/23a00833ef66ff4383394e3cac558a5232d4bd62..8d777265e12b0b9c5f13fecfc719474cdd214e9e:/src/surf/surf_routing_dijkstra.cpp diff --git a/src/surf/surf_routing_dijkstra.cpp b/src/surf/surf_routing_dijkstra.cpp index 31d603f11f..be44ced9af 100644 --- a/src/surf/surf_routing_dijkstra.cpp +++ b/src/surf/surf_routing_dijkstra.cpp @@ -4,8 +4,9 @@ /* 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. */ -#include "surf_routing_dijkstra.hpp" -#include "network_interface.hpp" +#include "src/surf/surf_routing_private.hpp" +#include "src/surf/surf_routing_dijkstra.hpp" +#include "src/surf/network_interface.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_dijkstra, surf, "Routing part of surf -- dijkstra routing logic"); @@ -92,7 +93,7 @@ xbt_node_t AsDijkstra::routeGraphNewNode(int id, int graph_id) elm = xbt_new0(struct graph_node_map_element, 1); elm->node = node; xbt_dict_set_ext(p_graphNodeMap, (char *) (&id), sizeof(int), - (xbt_set_elm_t) elm, NULL); + (xbt_dictelm_t) elm, NULL); return node; } @@ -175,7 +176,7 @@ void AsDijkstra::addLoopback() { } } -xbt_dynar_t AsDijkstra::getOnelinkRoutes() +xbt_dynar_t AsDijkstra::getOneLinkRoutes() { xbt_dynar_t ret = xbt_dynar_new(sizeof(Onelink*), xbt_free_f); sg_platf_route_cbarg_t route = xbt_new0(s_sg_platf_route_cbarg_t,1); @@ -390,7 +391,7 @@ void AsDijkstra::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_c elm->pred_arr = pred_arr; elm->size = size; xbt_dict_set_ext(p_routeCache, (char *) (&src_id), sizeof(int), - (xbt_set_elm_t) elm, NULL); + (xbt_dictelm_t) elm, NULL); } if (!m_cached) @@ -408,13 +409,10 @@ AsDijkstra::~AsDijkstra() /* Creation routing model functions */ -AsDijkstra::AsDijkstra() : AsGeneric(), m_cached(0) { - p_routeGraph = NULL; - p_graphNodeMap = NULL; - p_routeCache = NULL; +AsDijkstra::AsDijkstra() : AsGeneric() { } -AsDijkstra::AsDijkstra(int cached) : AsGeneric(), m_cached(cached) +AsDijkstra::AsDijkstra(bool cached) : AsGeneric(), m_cached(cached) { p_routeGraph = NULL; p_graphNodeMap = NULL;