Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cleanup: rename a symbol
[simgrid.git] / src / surf / surf_routing_floyd.cpp
index b8674c0a421d42bb615f6715c4bc26cd10a0aff4..831b4d372297b7b3b3855d8e046b9887cfc057e1 100644 (file)
@@ -21,7 +21,7 @@ AS_t model_floyd_create(void)
 
 void model_floyd_end(AS_t current_routing)
 {
-  static_cast<simgrid::surf::AsFloyd*>(current_routing)->end();
+  current_routing->Seal();
 }
 
 namespace simgrid {
@@ -38,12 +38,12 @@ AsFloyd::~AsFloyd(){
   int table_size;
   table_size = (int)xbt_dynar_length(p_indexNetworkElm);
   if (p_linkTable == NULL) // Dealing with a parse error in the file?
-         return;
+    return;
   /* Delete link_table */
   for (i = 0; i < table_size; i++)
-         for (j = 0; j < table_size; j++) {
-                 generic_free_route(TO_FLOYD_LINK(i, j));
-         }
+    for (j = 0; j < table_size; j++) {
+      routing_route_free(TO_FLOYD_LINK(i, j));
+    }
   xbt_free(p_linkTable);
   /* Delete bypass dict */
   xbt_dict_free(&p_bypassRoutes);
@@ -120,7 +120,7 @@ void AsFloyd::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbar
 
     if (p_hierarchy == SURF_ROUTING_RECURSIVE && prev_dst_gw != NULL
         && strcmp(prev_dst_gw->getName(), e_route->gw_src->getName())) {
-      routing_get_route_and_latency(prev_dst_gw, e_route->gw_src,
+      routing_platf->getRouteAndLatency(prev_dst_gw, e_route->gw_src,
                                     &res->link_list, lat);
     }
 
@@ -260,7 +260,7 @@ void AsFloyd::parseRoute(sg_platf_route_cbarg_t route)
             route->gw_src->getName(), src, route->gw_dst->getName());
 
       TO_FLOYD_LINK(dst_net_elm->getId(), src_net_elm->getId()) =
-                newExtendedRoute(p_hierarchy, route, 0);
+         newExtendedRoute(p_hierarchy, route, 0);
       TO_FLOYD_PRED(dst_net_elm->getId(), src_net_elm->getId()) = dst_net_elm->getId();
       TO_FLOYD_COST(dst_net_elm->getId(), src_net_elm->getId()) =
           ((TO_FLOYD_LINK(dst_net_elm->getId(), src_net_elm->getId()))->link_list)->used;   /* count of links, old model assume 1 */
@@ -269,7 +269,7 @@ void AsFloyd::parseRoute(sg_platf_route_cbarg_t route)
   xbt_dynar_free(&route->link_list);
 }
 
-void AsFloyd::end(){
+void AsFloyd::Seal(){
   unsigned int i, j, a, b, c;
 
   /* set the size of table routing */