From f566a20b6f493c79de2541d17452a28ce9ec51f6 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 24 Feb 2016 19:10:19 +0100 Subject: [PATCH] get ride of a stupid header file --- src/surf/surf_routing.cpp | 7 ++- src/surf/surf_routing.hpp | 4 ++ src/surf/surf_routing_RoutedGraph.cpp | 1 - src/surf/surf_routing_cluster.cpp | 1 - src/surf/surf_routing_cluster_fat_tree.cpp | 1 - src/surf/surf_routing_cluster_torus.cpp | 1 - src/surf/surf_routing_dijkstra.cpp | 1 - src/surf/surf_routing_floyd.cpp | 1 - src/surf/surf_routing_full.cpp | 1 - src/surf/surf_routing_none.cpp | 1 - src/surf/surf_routing_private.hpp | 63 ---------------------- tools/cmake/DefinePackages.cmake | 1 - 12 files changed, 7 insertions(+), 76 deletions(-) delete mode 100644 src/surf/surf_routing_private.hpp diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index d57974577f..073de7043f 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -5,7 +5,6 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "surf_routing.hpp" -#include "surf_routing_private.hpp" #include "surf_routing_cluster.hpp" #include "simgrid/sg_config.h" @@ -666,9 +665,9 @@ void sg_platf_new_peer(sg_platf_peer_cbarg_t peer) char *router_id = NULL; XBT_DEBUG(" "); - host_id = HOST_PEER(peer->id); - link_id = LINK_PEER(peer->id); - router_id = ROUTER_PEER(peer->id); + host_id = bprintf("peer_%s", peer->id); + link_id = bprintf("link_%s", peer->id); + router_id = bprintf("router_%s", peer->id); XBT_DEBUG("", peer->id); s_sg_platf_AS_cbarg_t AS = SG_PLATF_AS_INITIALIZER; diff --git a/src/surf/surf_routing.hpp b/src/surf/surf_routing.hpp index 6d851bee4d..c3b614bdd8 100644 --- a/src/surf/surf_routing.hpp +++ b/src/surf/surf_routing.hpp @@ -17,7 +17,11 @@ #include #include +SG_BEGIN_DECL() XBT_PUBLIC(void) routing_model_create( void *loopback); +XBT_PRIVATE xbt_node_t new_xbt_graph_node (xbt_graph_t graph, const char *name, xbt_dict_t nodes); +XBT_PRIVATE xbt_edge_t new_xbt_graph_edge (xbt_graph_t graph, xbt_node_t s, xbt_node_t d, xbt_dict_t edges); +SG_END_DECL() namespace simgrid { namespace surf { diff --git a/src/surf/surf_routing_RoutedGraph.cpp b/src/surf/surf_routing_RoutedGraph.cpp index c5e1d634d7..6af5f560a9 100644 --- a/src/surf/surf_routing_RoutedGraph.cpp +++ b/src/surf/surf_routing_RoutedGraph.cpp @@ -16,7 +16,6 @@ #include "xbt/dynar.h" #include "xbt/graph.h" -#include "surf_routing_private.hpp" #include "network_interface.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_routing_generic, surf_route, "Generic implementation of the surf routing"); diff --git a/src/surf/surf_routing_cluster.cpp b/src/surf/surf_routing_cluster.cpp index b5732dc5b5..be5d60692b 100644 --- a/src/surf/surf_routing_cluster.cpp +++ b/src/surf/surf_routing_cluster.cpp @@ -5,7 +5,6 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "surf_routing_cluster.hpp" -#include "surf_routing_private.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster, surf, "Routing part of surf"); diff --git a/src/surf/surf_routing_cluster_fat_tree.cpp b/src/surf/surf_routing_cluster_fat_tree.cpp index 7f56f1f39c..93ba4eba94 100644 --- a/src/surf/surf_routing_cluster_fat_tree.cpp +++ b/src/surf/surf_routing_cluster_fat_tree.cpp @@ -6,7 +6,6 @@ #include #include -#include "src/surf/surf_routing_private.hpp" #include "src/surf/surf_routing_cluster_fat_tree.hpp" #include "xbt/lib.h" diff --git a/src/surf/surf_routing_cluster_torus.cpp b/src/surf/surf_routing_cluster_torus.cpp index a3f38c3fda..8cd9b740aa 100644 --- a/src/surf/surf_routing_cluster_torus.cpp +++ b/src/surf/surf_routing_cluster_torus.cpp @@ -4,7 +4,6 @@ /* 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 "src/surf/surf_routing_private.hpp" #include "src/surf/surf_routing_cluster_torus.hpp" #include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area diff --git a/src/surf/surf_routing_dijkstra.cpp b/src/surf/surf_routing_dijkstra.cpp index c0ae31a736..0d2108d4d7 100644 --- a/src/surf/surf_routing_dijkstra.cpp +++ b/src/surf/surf_routing_dijkstra.cpp @@ -4,7 +4,6 @@ /* 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 "src/surf/surf_routing_private.hpp" #include "src/surf/surf_routing_dijkstra.hpp" #include "src/surf/network_interface.hpp" diff --git a/src/surf/surf_routing_floyd.cpp b/src/surf/surf_routing_floyd.cpp index 9601c1b8f5..2f297fd65a 100644 --- a/src/surf/surf_routing_floyd.cpp +++ b/src/surf/surf_routing_floyd.cpp @@ -4,7 +4,6 @@ /* 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 "src/surf/surf_routing_private.hpp" #include "src/surf/surf_routing_floyd.hpp" #include "src/surf/network_interface.hpp" diff --git a/src/surf/surf_routing_full.cpp b/src/surf/surf_routing_full.cpp index f23626aecc..9a000f4731 100644 --- a/src/surf/surf_routing_full.cpp +++ b/src/surf/surf_routing_full.cpp @@ -4,7 +4,6 @@ /* 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 "src/surf/surf_routing_private.hpp" #include "src/surf/surf_routing_full.hpp" #include "src/surf/network_interface.hpp" diff --git a/src/surf/surf_routing_none.cpp b/src/surf/surf_routing_none.cpp index 887e9aca37..1e9014f7ed 100644 --- a/src/surf/surf_routing_none.cpp +++ b/src/surf/surf_routing_none.cpp @@ -4,7 +4,6 @@ /* 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 "src/surf/surf_routing_private.hpp" #include "src/surf/surf_routing_none.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf"); diff --git a/src/surf/surf_routing_private.hpp b/src/surf/surf_routing_private.hpp deleted file mode 100644 index 4f16393947..0000000000 --- a/src/surf/surf_routing_private.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (c) 2009-2011, 2013-2015. The SimGrid Team. - * All rights reserved. */ - -/* 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. */ - -#ifndef _SURF_SURF_ROUTING_PRIVATE_H -#define _SURF_SURF_ROUTING_PRIVATE_H - -#include -#include "src/internal_config.h" - -#include "surf_interface.hpp" -#include "xbt/base.h" -#include "xbt/dynar.h" -#include "xbt/str.h" -#include "xbt/config.h" -#include "xbt/graph.h" - -/* ************************************************************************** */ -/* ******************************* NO ROUTING ******************************* */ -/* Only save the AS tree, and forward calls to child ASes */ -XBT_PRIVATE AS_t model_none_create(void); -XBT_PRIVATE AS_t model_none_create_sized(size_t childsize); -XBT_PRIVATE void model_none_finalize(AS_t as); -/* ************************************************************************** */ -/* ***************** GENERIC PARSE FUNCTIONS (declarations) ***************** */ -XBT_PRIVATE AS_t model_generic_create_sized(size_t childsize); -XBT_PRIVATE void model_generic_finalize(AS_t as); - -XBT_PRIVATE int generic_parse_PU(AS_t rc, sg_netcard_t elm); -XBT_PRIVATE int generic_parse_AS(AS_t rc, sg_netcard_t elm); - -/* ************************************************************************** */ -/* *************** GENERIC BUSINESS METHODS (declarations) ****************** */ - -XBT_PRIVATE xbt_dynar_t generic_get_onelink_routes(AS_t rc); - -/* ************************************************************************** */ -/* ****************** GENERIC AUX FUNCTIONS (declarations) ****************** */ - -/* change a route containing link names into a route containing link entities. - * If change_order is true, the links are put in reverse order in the - * produced route */ -XBT_PRIVATE AS_t generic_autonomous_system_exist(AS_t rc, char *element); -XBT_PRIVATE AS_t generic_processing_units_exist(AS_t rc, char *element); -void generic_src_dst_check(AS_t rc, sg_netcard_t src, sg_netcard_t dst); - -/* ************************************************************************** */ -/* *************************** FLOYD ROUTING ******************************** */ -//XBT_PRIVATE void model_floyd_parse_route(AS_t rc, sg_platf_route_cbarg_t route); - -#define HOST_PEER(peername) bprintf("peer_%s", peername) -#define ROUTER_PEER(peername) bprintf("router_%s", peername) -#define LINK_PEER(peername) bprintf("link_%s", peername) - -/* ************************************************************************** */ -/* ************************* GRAPH EXPORTING FUNCTIONS ********************** */ -XBT_PRIVATE xbt_node_t new_xbt_graph_node (xbt_graph_t graph, const char *name, xbt_dict_t nodes); -XBT_PRIVATE xbt_edge_t new_xbt_graph_edge (xbt_graph_t graph, xbt_node_t s, xbt_node_t d, xbt_dict_t edges); - - -#endif /* _SURF_SURF_ROUTING_PRIVATE_H */ diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index c5b6a6d267..4fe036a375 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -76,7 +76,6 @@ set(EXTRA_DIST src/surf/surf_routing_full.hpp src/surf/surf_routing_RoutedGraph.hpp src/surf/surf_routing_none.hpp - src/surf/surf_routing_private.hpp src/surf/surf_routing_vivaldi.hpp src/surf/vm_hl13.hpp src/surf/PropertyHolder.hpp -- 2.20.1