From 88353521e66f28bf0c4a5afd9772a1ebb3a71963 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 20 Feb 2016 20:53:26 +0100 Subject: [PATCH] kill some unused or dupplicated functions --- src/include/surf/surf.h | 5 +---- src/surf/instr_routing.cpp | 4 ++-- src/surf/surf_routing.cpp | 8 -------- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/include/surf/surf.h b/src/include/surf/surf.h index a8fcd8e279..e2dcd5b4b5 100644 --- a/src/include/surf/surf.h +++ b/src/include/surf/surf.h @@ -35,8 +35,7 @@ extern XBT_PRIVATE int sg_network_crosstraffic; extern XBT_PRIVATE xbt_dynar_t surf_path; typedef enum { - SURF_NETWORK_ELEMENT_NULL = 0, /* NULL */ - SURF_NETWORK_ELEMENT_HOST, /* host type */ + SURF_NETWORK_ELEMENT_HOST=1, /* host type */ SURF_NETWORK_ELEMENT_ROUTER, /* router type */ SURF_NETWORK_ELEMENT_AS /* AS type */ } e_surf_network_element_type_t; @@ -903,8 +902,6 @@ XBT_PUBLIC_DATA(AS_t) surf_AS_get_by_name(const char * name); XBT_PUBLIC_DATA(xbt_dict_t) surf_AS_get_routing_sons(AS_t as); XBT_PUBLIC_DATA(xbt_dynar_t) surf_AS_get_hosts(AS_t as); XBT_PUBLIC_DATA(void) surf_AS_get_graph(AS_t as, xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges); -XBT_PUBLIC_DATA(AS_t) surf_platf_get_root(routing_platf_t platf); -XBT_PUBLIC_DATA(e_surf_network_element_type_t) surf_routing_edge_get_rc_type(sg_netcard_t edge); /*******************************************/ /*** SURF Globals **************************/ diff --git a/src/surf/instr_routing.cpp b/src/surf/instr_routing.cpp index 9f992f3314..ce605c04f5 100644 --- a/src/surf/instr_routing.cpp +++ b/src/surf/instr_routing.cpp @@ -331,7 +331,7 @@ static void instr_routing_parse_end_platform () currentContainer = NULL; xbt_dict_t filter = xbt_dict_new_homogeneous(xbt_free_f); XBT_DEBUG ("Starting graph extraction."); - recursiveGraphExtraction (surf_platf_get_root(routing_platf), PJ_container_get_root(), filter); + recursiveGraphExtraction (surf_AS_get_routing_root(), PJ_container_get_root(), filter); XBT_DEBUG ("Graph extraction finished."); xbt_dict_free(&filter); platform_created = 1; @@ -466,7 +466,7 @@ xbt_graph_t instr_routing_platform_graph (void) xbt_graph_t ret = xbt_graph_new_graph (0, NULL); xbt_dict_t nodes = xbt_dict_new_homogeneous(NULL); xbt_dict_t edges = xbt_dict_new_homogeneous(NULL); - recursiveXBTGraphExtraction (ret, nodes, edges, surf_platf_get_root(routing_platf), PJ_container_get_root()); + recursiveXBTGraphExtraction (ret, nodes, edges, surf_AS_get_routing_root(), PJ_container_get_root()); xbt_dict_free (&nodes); xbt_dict_free (&edges); return ret; diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index 4c8b00f9ef..d0e9f2e91f 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -514,14 +514,6 @@ static void _get_route_and_latency(simgrid::surf::NetCard *src, simgrid::surf::N } -AS_t surf_platf_get_root(routing_platf_t platf){ - return platf->root_; -} - -e_surf_network_element_type_t surf_routing_edge_get_rc_type(sg_netcard_t netcard){ - return netcard->getRcType(); -} - namespace simgrid { namespace surf { -- 2.20.1