From 4dbc84f53aac793fc159d833090e421ec0025905 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 8 Mar 2016 16:47:47 +0100 Subject: [PATCH] Move the surf::As* classes into their own files --- ...surf_routing_cluster.cpp => AsCluster.cpp} | 6 +-- ...surf_routing_cluster.hpp => AsCluster.hpp} | 19 +-------- ...ster_fat_tree.cpp => AsClusterFatTree.cpp} | 14 +++---- ...ster_fat_tree.hpp => AsClusterFatTree.hpp} | 20 +++------- ...g_cluster_torus.cpp => AsClusterTorus.cpp} | 7 ++-- ...g_cluster_torus.hpp => AsClusterTorus.hpp} | 12 ++---- ...rf_routing_dijkstra.cpp => AsDijkstra.cpp} | 5 +-- ...rf_routing_dijkstra.hpp => AsDijkstra.hpp} | 13 ++----- .../{surf_routing_floyd.cpp => AsFloyd.cpp} | 7 ++-- .../{surf_routing_floyd.hpp => AsFloyd.hpp} | 15 ++----- .../{surf_routing_full.cpp => AsFull.cpp} | 5 +-- .../{surf_routing_full.hpp => AsFull.hpp} | 14 ++----- src/surf/AsImpl.cpp | 4 +- src/surf/AsImpl.hpp | 3 -- .../{surf_routing_none.cpp => AsNone.cpp} | 5 +-- .../{surf_routing_none.hpp => AsNone.hpp} | 7 ++-- ...ting_RoutedGraph.cpp => AsRoutedGraph.cpp} | 12 ++---- ...ting_RoutedGraph.hpp => AsRoutedGraph.hpp} | 12 ++---- ...surf_routing_vivaldi.cpp => AsVivaldi.cpp} | 7 ++-- ...surf_routing_vivaldi.hpp => AsVivaldi.hpp} | 18 ++------- src/surf/sg_platf.cpp | 17 ++++---- src/surf/surf_c_bindings.cpp | 1 - src/surf/surf_routing.cpp | 7 ---- tools/cmake/DefinePackages.cmake | 39 ++++++++++--------- 24 files changed, 89 insertions(+), 180 deletions(-) rename src/surf/{surf_routing_cluster.cpp => AsCluster.cpp} (96%) rename src/surf/{surf_routing_cluster.hpp => AsCluster.hpp} (68%) rename src/surf/{surf_routing_cluster_fat_tree.cpp => AsClusterFatTree.cpp} (98%) rename src/surf/{surf_routing_cluster_fat_tree.hpp => AsClusterFatTree.hpp} (93%) rename src/surf/{surf_routing_cluster_torus.cpp => AsClusterTorus.cpp} (98%) rename src/surf/{surf_routing_cluster_torus.hpp => AsClusterTorus.hpp} (72%) rename src/surf/{surf_routing_dijkstra.cpp => AsDijkstra.cpp} (98%) rename src/surf/{surf_routing_dijkstra.hpp => AsDijkstra.hpp} (88%) rename src/surf/{surf_routing_floyd.cpp => AsFloyd.cpp} (97%) rename src/surf/{surf_routing_floyd.hpp => AsFloyd.hpp} (73%) rename src/surf/{surf_routing_full.cpp => AsFull.cpp} (96%) rename src/surf/{surf_routing_full.hpp => AsFull.hpp} (69%) rename src/surf/{surf_routing_none.cpp => AsNone.cpp} (78%) rename src/surf/{surf_routing_none.hpp => AsNone.hpp} (84%) rename src/surf/{surf_routing_RoutedGraph.cpp => AsRoutedGraph.cpp} (97%) rename src/surf/{surf_routing_RoutedGraph.hpp => AsRoutedGraph.hpp} (79%) rename src/surf/{surf_routing_vivaldi.cpp => AsVivaldi.cpp} (95%) rename src/surf/{surf_routing_vivaldi.hpp => AsVivaldi.hpp} (51%) diff --git a/src/surf/surf_routing_cluster.cpp b/src/surf/AsCluster.cpp similarity index 96% rename from src/surf/surf_routing_cluster.cpp rename to src/surf/AsCluster.cpp index c6a21e1fc5..a297300881 100644 --- a/src/surf/surf_routing_cluster.cpp +++ b/src/surf/AsCluster.cpp @@ -1,10 +1,10 @@ -/* Copyright (c) 2009-2011, 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2009-2016. 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. */ -#include "surf_routing_cluster.hpp" +#include "src/surf/AsCluster.hpp" +#include "src/surf/network_interface.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster, surf, "Routing part of surf"); diff --git a/src/surf/surf_routing_cluster.hpp b/src/surf/AsCluster.hpp similarity index 68% rename from src/surf/surf_routing_cluster.hpp rename to src/surf/AsCluster.hpp index ef11fa9459..d0e3819239 100644 --- a/src/surf/surf_routing_cluster.hpp +++ b/src/surf/AsCluster.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2016. 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. */ @@ -7,25 +6,12 @@ #ifndef SURF_ROUTING_CLUSTER_HPP_ #define SURF_ROUTING_CLUSTER_HPP_ -#include - -#include "surf_routing.hpp" -#include "network_interface.hpp" #include "src/surf/AsImpl.hpp" namespace simgrid { namespace surf { -/*********** - * Classes * - ***********/ - -class XBT_PRIVATE AsCluster; - -/* ************************************************** */ -/* ************** Cluster ROUTING **************** */ - -class AsCluster: public AsImpl { +class XBT_PRIVATE AsCluster: public AsImpl { public: AsCluster(const char*name); @@ -35,7 +21,6 @@ public: virtual void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position); virtual void parse_specific_arguments(sg_platf_cluster_cbarg_t cluster) {} - Link* backbone_ = nullptr; void *loopback_ = nullptr; NetCard *router_ = nullptr; diff --git a/src/surf/surf_routing_cluster_fat_tree.cpp b/src/surf/AsClusterFatTree.cpp similarity index 98% rename from src/surf/surf_routing_cluster_fat_tree.cpp rename to src/surf/AsClusterFatTree.cpp index 579e1e3475..7dc11a2647 100644 --- a/src/surf/surf_routing_cluster_fat_tree.cpp +++ b/src/surf/AsClusterFatTree.cpp @@ -1,16 +1,16 @@ -#include +/* Copyright (c) 2014-2016. The SimGrid Team. All rights reserved. */ -#include -#include -#include -#include -#include +/* 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/AsClusterFatTree.hpp" +#include "src/surf/network_interface.hpp" -#include "src/surf/surf_routing_cluster_fat_tree.hpp" #include "xbt/lib.h" #include #include + #include #include #include diff --git a/src/surf/surf_routing_cluster_fat_tree.hpp b/src/surf/AsClusterFatTree.hpp similarity index 93% rename from src/surf/surf_routing_cluster_fat_tree.hpp rename to src/surf/AsClusterFatTree.hpp index 410479f93b..cb3ac2465d 100644 --- a/src/surf/surf_routing_cluster_fat_tree.hpp +++ b/src/surf/AsClusterFatTree.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2014-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2014-2016. 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. */ @@ -7,13 +6,7 @@ #ifndef SURF_ROUTING_CLUSTER_FAT_TREE_HPP_ #define SURF_ROUTING_CLUSTER_FAT_TREE_HPP_ -#include -#include -#include - -#include - -#include "surf_routing_cluster.hpp" +#include "src/surf/AsCluster.hpp" namespace simgrid { namespace surf { @@ -25,14 +18,13 @@ namespace surf { * address real world constraints, which are not currently enforced. */ -class XBT_PRIVATE FatTreeNode; class XBT_PRIVATE FatTreeLink; /** \brief A node in a fat tree. * A FatTreeNode can either be a switch or a processing node. Switches are * identified by a negative ID. This class is closely related to fat */ -class FatTreeNode { +class XBT_PRIVATE FatTreeNode { public: /** Unique ID which identifies every node. */ int id; @@ -65,8 +57,7 @@ public: * instead of passing by an upper level switch. */ Link* loopback; - FatTreeNode(sg_platf_cluster_cbarg_t cluster, int id, int level, - int position); + FatTreeNode(sg_platf_cluster_cbarg_t cluster, int id, int level, int position); }; @@ -78,8 +69,7 @@ public: */ class FatTreeLink { public: - FatTreeLink(sg_platf_cluster_cbarg_t cluster, FatTreeNode *source, - FatTreeNode *destination); + FatTreeLink(sg_platf_cluster_cbarg_t cluster, FatTreeNode *source, FatTreeNode *destination); /** Link going up in the tree */ Link *upLink; /** Link going down in the tree */ diff --git a/src/surf/surf_routing_cluster_torus.cpp b/src/surf/AsClusterTorus.cpp similarity index 98% rename from src/surf/surf_routing_cluster_torus.cpp rename to src/surf/AsClusterTorus.cpp index 294c12718a..346361f3b1 100644 --- a/src/surf/surf_routing_cluster_torus.cpp +++ b/src/surf/AsClusterTorus.cpp @@ -1,15 +1,14 @@ -/* Copyright (c) 2014-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2014-2016. 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. */ -#include "src/surf/surf_routing_cluster_torus.hpp" +#include "src/surf/AsClusterTorus.hpp" +#include "src/surf/network_interface.hpp" #include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster_torus, surf_route_cluster, "Torus Routing part of surf"); - inline unsigned int *rankId_to_coords(int rankId, xbt_dynar_t dimensions) { diff --git a/src/surf/surf_routing_cluster_torus.hpp b/src/surf/AsClusterTorus.hpp similarity index 72% rename from src/surf/surf_routing_cluster_torus.hpp rename to src/surf/AsClusterTorus.hpp index ecb674e570..58f747897d 100644 --- a/src/surf/surf_routing_cluster_torus.hpp +++ b/src/surf/AsClusterTorus.hpp @@ -1,18 +1,12 @@ -/* Copyright (c) 2014-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2014-2016. 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_ROUTING_CLUSTER_TORUS_HPP_ #define SURF_ROUTING_CLUSTER_TORUS_HPP_ -#include - -#include "surf_routing_none.hpp" -#include "network_interface.hpp" -#include "surf_routing_cluster.hpp" +#include "src/surf/AsCluster.hpp" namespace simgrid { namespace surf { @@ -25,7 +19,7 @@ namespace simgrid { void getRouteAndLatency(NetCard * src, NetCard * dst, sg_platf_route_cbarg_t into, double *latency) override; void parse_specific_arguments(sg_platf_cluster_cbarg_t cluster) override; private: - xbt_dynar_t dimensions_ = NULL; + xbt_dynar_t dimensions_ = nullptr; }; }} diff --git a/src/surf/surf_routing_dijkstra.cpp b/src/surf/AsDijkstra.cpp similarity index 98% rename from src/surf/surf_routing_dijkstra.cpp rename to src/surf/AsDijkstra.cpp index 6ee469cd04..bcdb23b448 100644 --- a/src/surf/surf_routing_dijkstra.cpp +++ b/src/surf/AsDijkstra.cpp @@ -1,10 +1,9 @@ -/* Copyright (c) 2009-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2009-2016. 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. */ -#include "src/surf/surf_routing_dijkstra.hpp" +#include "src/surf/AsDijkstra.hpp" #include "src/surf/network_interface.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_dijkstra, surf, "Routing part of surf -- dijkstra routing logic"); diff --git a/src/surf/surf_routing_dijkstra.hpp b/src/surf/AsDijkstra.hpp similarity index 88% rename from src/surf/surf_routing_dijkstra.hpp rename to src/surf/AsDijkstra.hpp index 849c682382..346e20aa0c 100644 --- a/src/surf/surf_routing_dijkstra.hpp +++ b/src/surf/AsDijkstra.hpp @@ -1,16 +1,13 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2016. 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. */ -#include - -#include "surf_routing_RoutedGraph.hpp" - #ifndef SURF_ROUTING_DIJKSTRA_HPP_ #define SURF_ROUTING_DIJKSTRA_HPP_ +#include "src/surf/AsRoutedGraph.hpp" + typedef struct graph_node_data { int id; int graph_id; /* used for caching internal graph id's */ @@ -32,10 +29,8 @@ namespace surf { * Classes * ***********/ -class XBT_PRIVATE AsDijkstra; - /** Dijkstra routing data: fast initialization, slow lookup, small memory requirements, shortest path routing only */ -class AsDijkstra : public AsRoutedGraph { +class XBT_PRIVATE AsDijkstra : public AsRoutedGraph { public: AsDijkstra(const char*name, bool cached); void Seal() override; diff --git a/src/surf/surf_routing_floyd.cpp b/src/surf/AsFloyd.cpp similarity index 97% rename from src/surf/surf_routing_floyd.cpp rename to src/surf/AsFloyd.cpp index fbf29d548d..ec45a1c4ca 100644 --- a/src/surf/surf_routing_floyd.cpp +++ b/src/surf/AsFloyd.cpp @@ -1,10 +1,11 @@ -/* Copyright (c) 2009-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2009-2016. 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. */ -#include "src/surf/surf_routing_floyd.hpp" +#include "xbt/log.h" +#include "xbt/dynar.h" +#include "src/surf/AsFloyd.hpp" #include "src/surf/network_interface.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_floyd, surf, "Routing part of surf"); diff --git a/src/surf/surf_routing_floyd.hpp b/src/surf/AsFloyd.hpp similarity index 73% rename from src/surf/surf_routing_floyd.hpp rename to src/surf/AsFloyd.hpp index e5258f83bd..39ba4371ec 100644 --- a/src/surf/surf_routing_floyd.hpp +++ b/src/surf/AsFloyd.hpp @@ -1,27 +1,18 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2016. 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_ROUTING_FLOYD_HPP_ #define SURF_ROUTING_FLOYD_HPP_ -#include - -#include "surf_routing_RoutedGraph.hpp" +#include "src/surf/AsRoutedGraph.hpp" namespace simgrid { namespace surf { -/*********** - * Classes * - ***********/ -class XBT_PRIVATE AsFloyd; - /** Floyd routing data: slow initialization, fast lookup, lesser memory requirements, shortest path routing only */ -class AsFloyd: public AsRoutedGraph { +class XBT_PRIVATE AsFloyd: public AsRoutedGraph { public: AsFloyd(const char *name); ~AsFloyd(); diff --git a/src/surf/surf_routing_full.cpp b/src/surf/AsFull.cpp similarity index 96% rename from src/surf/surf_routing_full.cpp rename to src/surf/AsFull.cpp index 4262bc9bdf..dbe966e4f5 100644 --- a/src/surf/surf_routing_full.cpp +++ b/src/surf/AsFull.cpp @@ -1,10 +1,9 @@ -/* Copyright (c) 2009-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2009-2016. 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. */ -#include "src/surf/surf_routing_full.hpp" +#include "src/surf/AsFull.hpp" #include "src/surf/network_interface.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf"); diff --git a/src/surf/surf_routing_full.hpp b/src/surf/AsFull.hpp similarity index 69% rename from src/surf/surf_routing_full.hpp rename to src/surf/AsFull.hpp index 0abbae3fa7..df5fee55ba 100644 --- a/src/surf/surf_routing_full.hpp +++ b/src/surf/AsFull.hpp @@ -1,5 +1,4 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2016. 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. */ @@ -7,20 +6,13 @@ #ifndef SURF_ROUTING_FULL_HPP_ #define SURF_ROUTING_FULL_HPP_ -#include - -#include "surf_routing_RoutedGraph.hpp" +#include "src/surf/AsRoutedGraph.hpp" namespace simgrid { namespace surf { -/*********** - * Classes * - ***********/ -class XBT_PRIVATE AsFull; - /** Full routing: fast, large memory requirements, fully expressive */ -class AsFull: public AsRoutedGraph { +class XBT_PRIVATE AsFull: public AsRoutedGraph { public: AsFull(const char*name); diff --git a/src/surf/AsImpl.cpp b/src/surf/AsImpl.cpp index 36666af8cc..5979392d00 100644 --- a/src/surf/AsImpl.cpp +++ b/src/surf/AsImpl.cpp @@ -1,12 +1,10 @@ -/* Copyright (c) 2006-2014. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2006-2016. 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. */ #include "xbt/log.h" -#include "simgrid/s4u/As.hpp" #include "src/surf/AsImpl.hpp" #include "src/surf/network_interface.hpp" // Link FIXME: move to proper header diff --git a/src/surf/AsImpl.hpp b/src/surf/AsImpl.hpp index 50da4a232a..332335c75e 100644 --- a/src/surf/AsImpl.hpp +++ b/src/surf/AsImpl.hpp @@ -6,13 +6,10 @@ #ifndef SIMGRID_SURF_AS_HPP #define SIMGRID_SURF_AS_HPP -#include "xbt/base.h" #include "xbt/graph.h" #include "simgrid/s4u/forward.hpp" #include "simgrid/s4u/As.hpp" -#include -#include #include "src/surf/xml/platf_private.hpp" // FIXME: kill sg_platf_route_cbarg_t to remove that UGLY include diff --git a/src/surf/surf_routing_none.cpp b/src/surf/AsNone.cpp similarity index 78% rename from src/surf/surf_routing_none.cpp rename to src/surf/AsNone.cpp index 3ef381f845..396a9fcd81 100644 --- a/src/surf/surf_routing_none.cpp +++ b/src/surf/AsNone.cpp @@ -1,10 +1,9 @@ -/* Copyright (c) 2009-2011, 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2009-2016. 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. */ -#include "src/surf/surf_routing_none.hpp" +#include "src/surf/AsNone.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf"); diff --git a/src/surf/surf_routing_none.hpp b/src/surf/AsNone.hpp similarity index 84% rename from src/surf/surf_routing_none.hpp rename to src/surf/AsNone.hpp index 82fdd856eb..9976d1b5c3 100644 --- a/src/surf/surf_routing_none.hpp +++ b/src/surf/AsNone.hpp @@ -1,14 +1,13 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2016. 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. */ -#include "src/surf/AsImpl.hpp" - #ifndef SURF_ROUTING_NONE_HPP_ #define SURF_ROUTING_NONE_HPP_ +#include "src/surf/AsImpl.hpp" + namespace simgrid { namespace surf { diff --git a/src/surf/surf_routing_RoutedGraph.cpp b/src/surf/AsRoutedGraph.cpp similarity index 97% rename from src/surf/surf_routing_RoutedGraph.cpp rename to src/surf/AsRoutedGraph.cpp index f40ee1c2e2..e58e1979d2 100644 --- a/src/surf/surf_routing_RoutedGraph.cpp +++ b/src/surf/AsRoutedGraph.cpp @@ -1,22 +1,16 @@ -/* Copyright (c) 2009-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2009-2016. 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. */ -#include "surf_routing_RoutedGraph.hpp" - -#include - -#include - #include "xbt/dict.h" #include "xbt/log.h" #include "xbt/sysdep.h" #include "xbt/dynar.h" #include "xbt/graph.h" -#include "network_interface.hpp" +#include "src/surf/AsRoutedGraph.hpp" +#include "src/surf/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_RoutedGraph.hpp b/src/surf/AsRoutedGraph.hpp similarity index 79% rename from src/surf/surf_routing_RoutedGraph.hpp rename to src/surf/AsRoutedGraph.hpp index 1eea4f9273..4079e8f14f 100644 --- a/src/surf/surf_routing_RoutedGraph.hpp +++ b/src/surf/AsRoutedGraph.hpp @@ -1,22 +1,16 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2016. 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. */ -#include - -#include "surf_routing.hpp" -#include "src/surf/AsImpl.hpp" - #ifndef SURF_ROUTING_GENERIC_HPP_ #define SURF_ROUTING_GENERIC_HPP_ +#include "src/surf/AsImpl.hpp" + namespace simgrid { namespace surf { -class XBT_PRIVATE AsRoutedGraph; - class XBT_PRIVATE AsRoutedGraph : public AsImpl { public: AsRoutedGraph(const char*name); diff --git a/src/surf/surf_routing_vivaldi.cpp b/src/surf/AsVivaldi.cpp similarity index 95% rename from src/surf/surf_routing_vivaldi.cpp rename to src/surf/AsVivaldi.cpp index 9ac925abf4..c935f6cc74 100644 --- a/src/surf/surf_routing_vivaldi.cpp +++ b/src/surf/AsVivaldi.cpp @@ -1,11 +1,10 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2016. 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. */ -#include "surf_routing_vivaldi.hpp" -#include "network_interface.hpp" +#include "src/surf/AsVivaldi.hpp" +#include "src/surf/network_interface.hpp" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_vivaldi, surf, "Routing part of surf"); diff --git a/src/surf/surf_routing_vivaldi.hpp b/src/surf/AsVivaldi.hpp similarity index 51% rename from src/surf/surf_routing_vivaldi.hpp rename to src/surf/AsVivaldi.hpp index 3795d69681..1e9c632dd2 100644 --- a/src/surf/surf_routing_vivaldi.hpp +++ b/src/surf/AsVivaldi.hpp @@ -1,29 +1,17 @@ -/* Copyright (c) 2013-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2013-2016. 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. */ -#include "surf_routing_RoutedGraph.hpp" -#include "xbt/swag.h" - - #ifndef SURF_ROUTING_VIVALDI_HPP_ #define SURF_ROUTING_VIVALDI_HPP_ -/* ************************************************** */ -/* ************** Vivaldi ROUTING **************** */ -XBT_PRIVATE AS_t model_vivaldi_create(void); /* create structures for vivaldi routing model */ +#include "src/surf/AsRoutedGraph.hpp" namespace simgrid { namespace surf { -/*********** - * Classes * - ***********/ -class XBT_PRIVATE AsVivaldi; - -class AsVivaldi: public AsRoutedGraph { +class XBT_PRIVATE AsVivaldi: public AsRoutedGraph { public: AsVivaldi(const char *name); ~AsVivaldi() {}; diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index 4cbed66922..fbf5989d5c 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -21,15 +21,16 @@ #include "src/surf/cpu_interface.hpp" #include "src/surf/network_interface.hpp" #include "surf/surf_routing.h" // FIXME: brain dead public header -#include "src/surf/AsImpl.hpp" -#include "src/surf/surf_routing_cluster.hpp" -#include "src/surf/surf_routing_cluster_torus.hpp" -#include "src/surf/surf_routing_cluster_fat_tree.hpp" -#include "src/surf/surf_routing_dijkstra.hpp" -#include "src/surf/surf_routing_floyd.hpp" -#include "src/surf/surf_routing_full.hpp" -#include "src/surf/surf_routing_vivaldi.hpp" +#include "src/surf/AsImpl.hpp" +#include "src/surf/AsCluster.hpp" +#include "src/surf/AsClusterTorus.hpp" +#include "src/surf/AsClusterFatTree.hpp" +#include "src/surf/AsDijkstra.hpp" +#include "src/surf/AsFloyd.hpp" +#include "src/surf/AsFull.hpp" +#include "src/surf/AsNone.hpp" +#include "src/surf/AsVivaldi.hpp" XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_parse); diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index fb652db524..2dbe05f5fb 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -7,7 +7,6 @@ #include "src/surf/HostImpl.hpp" #include "surf_interface.hpp" #include "network_interface.hpp" -#include "surf_routing_cluster.hpp" #include "src/instr/instr_private.h" #include "plugins/energy.hpp" #include "virtual_machine.hpp" diff --git a/src/surf/surf_routing.cpp b/src/surf/surf_routing.cpp index d9847e293e..4dba6f1a63 100644 --- a/src/surf/surf_routing.cpp +++ b/src/surf/surf_routing.cpp @@ -5,18 +5,11 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "surf_routing.hpp" -#include "surf_routing_cluster.hpp" #include "simgrid/sg_config.h" #include "storage_interface.hpp" #include "src/surf/AsImpl.hpp" -#include "src/surf/surf_routing_cluster_torus.hpp" -#include "src/surf/surf_routing_cluster_fat_tree.hpp" -#include "src/surf/surf_routing_dijkstra.hpp" -#include "src/surf/surf_routing_floyd.hpp" -#include "src/surf/surf_routing_full.hpp" -#include "src/surf/surf_routing_vivaldi.hpp" #include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area #include diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index e421078593..7148f45d2f 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -60,21 +60,23 @@ set(EXTRA_DIST src/surf/xml/simgrid_dtd.h src/surf/xml/simgrid_dtd.c src/surf/xml/surfxml_sax_cb.cpp + src/surf/AsImpl.hpp + src/surf/AsCluster.hpp + src/surf/AsClusterFatTree.hpp + src/surf/AsClusterTorus.hpp + src/surf/AsDijkstra.hpp + src/surf/AsFloyd.hpp + src/surf/AsFull.hpp + src/surf/AsRoutedGraph.hpp + src/surf/AsNone.hpp + src/surf/AsVivaldi.hpp + src/surf/storage_interface.hpp src/surf/storage_n11.hpp src/surf/surf_interface.hpp src/surf/surf_private.h src/surf/surf_routing.hpp - src/surf/surf_routing_cluster.hpp - src/surf/surf_routing_cluster_fat_tree.hpp - src/surf/surf_routing_cluster_torus.hpp - src/surf/surf_routing_dijkstra.hpp - src/surf/surf_routing_floyd.hpp - src/surf/surf_routing_full.hpp - src/surf/surf_routing_RoutedGraph.hpp - src/surf/surf_routing_none.hpp - src/surf/surf_routing_vivaldi.hpp src/surf/vm_hl13.hpp src/surf/PropertyHolder.hpp src/surf/virtual_machine.hpp @@ -293,6 +295,16 @@ set(NS3_SRC set(SURF_SRC src/surf/AsImpl.cpp + src/surf/AsCluster.cpp + src/surf/AsClusterFatTree.cpp + src/surf/AsClusterTorus.cpp + src/surf/AsDijkstra.cpp + src/surf/AsFloyd.cpp + src/surf/AsFull.cpp + src/surf/AsRoutedGraph.cpp + src/surf/AsNone.cpp + src/surf/AsVivaldi.cpp + src/surf/cpu_cas01.cpp src/surf/cpu_interface.cpp src/surf/cpu_ti.cpp @@ -314,15 +326,6 @@ set(SURF_SRC src/surf/surf_c_bindings.cpp src/surf/surf_interface.cpp src/surf/surf_routing.cpp - src/surf/surf_routing_cluster.cpp - src/surf/surf_routing_cluster_fat_tree.cpp - src/surf/surf_routing_cluster_torus.cpp - src/surf/surf_routing_dijkstra.cpp - src/surf/surf_routing_floyd.cpp - src/surf/surf_routing_full.cpp - src/surf/surf_routing_RoutedGraph.cpp - src/surf/surf_routing_none.cpp - src/surf/surf_routing_vivaldi.cpp src/surf/xml/platf.hpp src/surf/xml/platf_private.hpp src/surf/xml/surfxml_sax_cb.cpp -- 2.20.1