Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
routing cleanup: symbol renaming
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 19 Feb 2016 21:23:52 +0000 (22:23 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 19 Feb 2016 22:41:43 +0000 (23:41 +0100)
12 files changed:
include/simgrid/platf.h
src/surf/sg_platf.cpp
src/surf/surf_routing.cpp
src/surf/surf_routing.hpp
src/surf/surf_routing_dijkstra.cpp
src/surf/surf_routing_dijkstra.hpp
src/surf/surf_routing_floyd.cpp
src/surf/surf_routing_floyd.hpp
src/surf/surf_routing_full.cpp
src/surf/surf_routing_full.hpp
src/surf/surf_routing_generic.cpp
src/surf/surf_routing_generic.hpp

index bc195bc..401864e 100644 (file)
@@ -257,7 +257,7 @@ XBT_PUBLIC(void) sg_platf_begin(void);  // Start a new platform
 XBT_PUBLIC(void) sg_platf_end(void); // Finish the creation of the platform
 
 XBT_PUBLIC(void) sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS); // Begin description of new AS
 XBT_PUBLIC(void) sg_platf_end(void); // Finish the creation of the platform
 
 XBT_PUBLIC(void) sg_platf_new_AS_begin(sg_platf_AS_cbarg_t AS); // Begin description of new AS
-XBT_PUBLIC(void) sg_platf_new_AS_end(void);                            // That AS is fully described
+XBT_PUBLIC(void) sg_platf_new_AS_end(void);                     // That AS is fully described
 
 XBT_PUBLIC(void) sg_platf_new_host   (sg_platf_host_cbarg_t   host);   // Add an host   to the currently described AS
 XBT_PUBLIC(void) sg_platf_new_hostlink(sg_platf_host_link_cbarg_t h); // Add an host_link to the currently described AS
 
 XBT_PUBLIC(void) sg_platf_new_host   (sg_platf_host_cbarg_t   host);   // Add an host   to the currently described AS
 XBT_PUBLIC(void) sg_platf_new_hostlink(sg_platf_host_link_cbarg_t h); // Add an host_link to the currently described AS
index be65755..2e0adca 100644 (file)
@@ -510,7 +510,7 @@ void sg_platf_new_mount(sg_platf_mount_cbarg_t mount){
 
 void sg_platf_new_route(sg_platf_route_cbarg_t route)
 {
 
 void sg_platf_new_route(sg_platf_route_cbarg_t route)
 {
-  routing_get_current()->parseRoute(route);
+  routing_get_current()->addRoute(route);
 }
 
 void sg_platf_new_bypassRoute(sg_platf_route_cbarg_t bypassRoute)
 }
 
 void sg_platf_new_bypassRoute(sg_platf_route_cbarg_t bypassRoute)
index 7cee152..ad2a748 100644 (file)
@@ -54,7 +54,7 @@ namespace surf {
     return xbt_dynar_length(vertices_)-1;
   }
 
     return xbt_dynar_length(vertices_)-1;
   }
 
-  void As::parseRoute(sg_platf_route_cbarg_t /*route*/){
+  void As::addRoute(sg_platf_route_cbarg_t /*route*/){
     THROW_IMPOSSIBLE; /* No. */
   }
   void As::parseBypassroute(sg_platf_route_cbarg_t /*e_route*/){
     THROW_IMPOSSIBLE; /* No. */
   }
   void As::parseBypassroute(sg_platf_route_cbarg_t /*e_route*/){
index 0f398c5..077b435 100644 (file)
@@ -99,7 +99,7 @@ public:
 
   /* Add content to the AS, at parsing time. It should be sealed afterward. */
   virtual int addComponent(NetCard *elm); /* A host, a router or an AS, whatever */
 
   /* Add content to the AS, at parsing time. It should be sealed afterward. */
   virtual int addComponent(NetCard *elm); /* A host, a router or an AS, whatever */
-  virtual void parseRoute(sg_platf_route_cbarg_t route);
+  virtual void addRoute(sg_platf_route_cbarg_t route);
   virtual void parseBypassroute(sg_platf_route_cbarg_t e_route);
 };
 
   virtual void parseBypassroute(sg_platf_route_cbarg_t e_route);
 };
 
index 36e615d..12f3eea 100644 (file)
@@ -349,14 +349,14 @@ AsDijkstra::AsDijkstra(const char*name, bool cached)
     routeCache_ = xbt_dict_new_homogeneous(&route_cache_elem_free);
 }
 
     routeCache_ = xbt_dict_new_homogeneous(&route_cache_elem_free);
 }
 
-void AsDijkstra::parseRoute(sg_platf_route_cbarg_t route)
+void AsDijkstra::addRoute(sg_platf_route_cbarg_t route)
 {
   const char *srcName = route->src;
   const char *dstName = route->dst;
   NetCard *src = sg_netcard_by_name_or_null(srcName);
   NetCard *dst = sg_netcard_by_name_or_null(dstName);
 
 {
   const char *srcName = route->src;
   const char *dstName = route->dst;
   NetCard *src = sg_netcard_by_name_or_null(srcName);
   NetCard *dst = sg_netcard_by_name_or_null(dstName);
 
-  parseRouteCheckParams(route);
+  addRouteCheckParams(route);
 
   /* Create the topology graph */
   if(!routeGraph_)
 
   /* Create the topology graph */
   if(!routeGraph_)
index dd1523b..b745657 100644 (file)
@@ -59,7 +59,7 @@ public:
   void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat) override;
   void getRouteAndLatency(sg_platf_route_cbarg_t route, double *lat); // FIXME: this function is dangerously not overriding because of diverging prototype
   xbt_dynar_t getOneLinkRoutes() override;
   void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat) override;
   void getRouteAndLatency(sg_platf_route_cbarg_t route, double *lat); // FIXME: this function is dangerously not overriding because of diverging prototype
   xbt_dynar_t getOneLinkRoutes() override;
-  void parseRoute(sg_platf_route_cbarg_t route) override;
+  void addRoute(sg_platf_route_cbarg_t route) override;
 
   xbt_graph_t routeGraph_ = nullptr;     /* xbt_graph */
   xbt_dict_t graphNodeMap_ = nullptr;    /* map */
 
   xbt_graph_t routeGraph_ = nullptr;     /* xbt_graph */
   xbt_dict_t graphNodeMap_ = nullptr;    /* map */
index 487460c..9a51912 100644 (file)
@@ -129,7 +129,7 @@ static int floyd_pointer_resource_cmp(const void *a, const void *b) {
   return a != b;
 }
 
   return a != b;
 }
 
-void AsFloyd::parseRoute(sg_platf_route_cbarg_t route)
+void AsFloyd::addRoute(sg_platf_route_cbarg_t route)
 {
   /* set the size of table routing */
   int table_size = (int)xbt_dynar_length(vertices_);
 {
   /* set the size of table routing */
   int table_size = (int)xbt_dynar_length(vertices_);
@@ -137,7 +137,7 @@ void AsFloyd::parseRoute(sg_platf_route_cbarg_t route)
   NetCard *src = sg_netcard_by_name_or_null(route->src);
   NetCard *dst = sg_netcard_by_name_or_null(route->dst);
 
   NetCard *src = sg_netcard_by_name_or_null(route->src);
   NetCard *dst = sg_netcard_by_name_or_null(route->dst);
 
-  parseRouteCheckParams(route);
+  addRouteCheckParams(route);
 
   if(!linkTable_) {
     /* Create Cost, Predecessor and Link tables */
 
   if(!linkTable_) {
     /* Create Cost, Predecessor and Link tables */
index 9e3d722..50bd652 100644 (file)
@@ -28,7 +28,7 @@ public:
 
   void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
   xbt_dynar_t getOneLinkRoutes() override;
 
   void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
   xbt_dynar_t getOneLinkRoutes() override;
-  void parseRoute(sg_platf_route_cbarg_t route) override;
+  void addRoute(sg_platf_route_cbarg_t route) override;
   void Seal() override;
 
 private:
   void Seal() override;
 
 private:
index 427af14..d452c3e 100644 (file)
@@ -130,14 +130,14 @@ static int full_pointer_resource_cmp(const void *a, const void *b)
   return a != b;
 }
 
   return a != b;
 }
 
-void AsFull::parseRoute(sg_platf_route_cbarg_t route)
+void AsFull::addRoute(sg_platf_route_cbarg_t route)
 {
   const char *src = route->src;
   const char *dst = route->dst;
   NetCard *src_net_elm = sg_netcard_by_name_or_null(src);
   NetCard *dst_net_elm = sg_netcard_by_name_or_null(dst);
 
 {
   const char *src = route->src;
   const char *dst = route->dst;
   NetCard *src_net_elm = sg_netcard_by_name_or_null(src);
   NetCard *dst_net_elm = sg_netcard_by_name_or_null(dst);
 
-  parseRouteCheckParams(route);
+  addRouteCheckParams(route);
 
   size_t table_size = xbt_dynar_length(vertices_);
 
 
   size_t table_size = xbt_dynar_length(vertices_);
 
index da84f71..9dfc1e2 100644 (file)
@@ -29,7 +29,7 @@ public:
 
   void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
   xbt_dynar_t getOneLinkRoutes() override;
 
   void getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t into, double *latency) override;
   xbt_dynar_t getOneLinkRoutes() override;
-  void parseRoute(sg_platf_route_cbarg_t route) override;
+  void addRoute(sg_platf_route_cbarg_t route) override;
 
   sg_platf_route_cbarg_t *routingTable_ = nullptr;
 };
 
   sg_platf_route_cbarg_t *routingTable_ = nullptr;
 };
index 031f460..a83fb94 100644 (file)
@@ -387,7 +387,7 @@ void AsGeneric::getRouteCheckParams(NetCard *src, NetCard *dst)
       "Internal error: route destination %s@%s is not in AS %s as expected (route source: %s@%s). Please report that bug.",
         src->name(), dst->name(),  src_as->name_, dst_as->name_,  name_);
 }
       "Internal error: route destination %s@%s is not in AS %s as expected (route source: %s@%s). Please report that bug.",
         src->name(), dst->name(),  src_as->name_, dst_as->name_,  name_);
 }
-void AsGeneric::parseRouteCheckParams(sg_platf_route_cbarg_t route) {
+void AsGeneric::addRouteCheckParams(sg_platf_route_cbarg_t route) {
   const char *srcName = route->src;
   const char *dstName = route->dst;
   NetCard *src = sg_netcard_by_name_or_null(srcName);
   const char *srcName = route->src;
   const char *dstName = route->dst;
   NetCard *src = sg_netcard_by_name_or_null(srcName);
index 6587ace..9f4d275 100644 (file)
@@ -30,7 +30,7 @@ public:
   virtual sg_platf_route_cbarg_t newExtendedRoute(e_surf_routing_hierarchy_t hierarchy, sg_platf_route_cbarg_t routearg, int change_order);
 protected:
   void getRouteCheckParams(NetCard *src, NetCard *dst);
   virtual sg_platf_route_cbarg_t newExtendedRoute(e_surf_routing_hierarchy_t hierarchy, sg_platf_route_cbarg_t routearg, int change_order);
 protected:
   void getRouteCheckParams(NetCard *src, NetCard *dst);
-  void parseRouteCheckParams(sg_platf_route_cbarg_t route);
+  void addRouteCheckParams(sg_platf_route_cbarg_t route);
 };
 
 }
 };
 
 }