* under the terms of the license (GNU LGPL) which comes with this package. */
#include "surf_routing_floyd.hpp"
-#include "network.hpp"
+#include "network_interface.hpp"
-extern "C" {
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_floyd, surf, "Routing part of surf");
-}
#define TO_FLOYD_COST(i,j) (p_costTable)[(i)+(j)*table_size]
#define TO_FLOYD_PRED(i,j) (p_predecessorTable)[(i)+(j)*table_size]
}
AsFloyd::AsFloyd(): AsGeneric() {
+ p_predecessorTable = NULL;
+ p_costTable = NULL;
+ p_linkTable = NULL;
}
AsFloyd::~AsFloyd(){
int i, j;
- size_t table_size;
- table_size = xbt_dynar_length(p_indexNetworkElm);
+ int table_size;
+ table_size = (int)xbt_dynar_length(p_indexNetworkElm);
/* Delete link_table */
for (i = 0; i < table_size; i++)
for (j = 0; j < table_size; j++)
xbt_dynar_foreach(links, cpt, link) {
xbt_dynar_push_as(res->link_list, sg_routing_link_t, link);
if (lat)
- *lat += dynamic_cast<NetworkCm02LinkPtr>(static_cast<ResourcePtr>(link))->getLatency();
+ *lat += static_cast<NetworkLinkPtr>(link)->getLatency();
}
prev_dst_gw = e_route->gw_dst;
int as_route = 0;
/* set the size of table routing */
- size_t table_size = xbt_dynar_length(p_indexNetworkElm);
+ int table_size = (int)xbt_dynar_length(p_indexNetworkElm);
RoutingEdgePtr src_net_elm, dst_net_elm;
src_net_elm = sg_routing_edge_by_name_or_null(src);