/* 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 <cstdlib>
#include <algorithm>
#include "simgrid/platf_interface.h" // platform creation API internal interface
-#include "surf_routing_generic.hpp"
#include "surf_routing_private.hpp"
#include "network_interface.hpp"
namespace simgrid {
namespace surf {
-AsGeneric::AsGeneric(const char*name)
+AsRoutedGraph::AsRoutedGraph(const char*name)
: As(name)
{
}
-AsGeneric::~AsGeneric()
+AsRoutedGraph::~AsRoutedGraph()
{
xbt_dict_free(&bypassRoutes_);
}
-void AsGeneric::parseBypassroute(sg_platf_route_cbarg_t e_route)
+void AsRoutedGraph::parseBypassroute(sg_platf_route_cbarg_t e_route)
{
char *src = (char*)(e_route->src);
char *dst = (char*)(e_route->dst);
namespace simgrid {
namespace surf {
-void AsGeneric::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)
+void AsRoutedGraph::getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges)
{
int src, dst;
int table_size = xbt_dynar_length(vertices_);
}
}
-sg_platf_route_cbarg_t AsGeneric::getBypassRoute(NetCard *src,
+sg_platf_route_cbarg_t AsRoutedGraph::getBypassRoute(NetCard *src,
NetCard *dst,
double *lat)
{
/* ************************************************************************** */
/* ************************* GENERIC AUX FUNCTIONS ************************** */
/* change a route containing link names into a route containing link entities */
-sg_platf_route_cbarg_t AsGeneric::newExtendedRoute(e_surf_routing_hierarchy_t hierarchy,
+sg_platf_route_cbarg_t AsRoutedGraph::newExtendedRoute(e_surf_routing_hierarchy_t hierarchy,
sg_platf_route_cbarg_t routearg, int change_order) {
sg_platf_route_cbarg_t result;
return result;
}
-void AsGeneric::getRouteCheckParams(NetCard *src, NetCard *dst)
+void AsRoutedGraph::getRouteCheckParams(NetCard *src, NetCard *dst)
{
xbt_assert(src,"Cannot find a route from NULL to %s", dst->name());
xbt_assert(dst,"Cannot find a route from %s to NULL", src->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::addRouteCheckParams(sg_platf_route_cbarg_t route) {
+void AsRoutedGraph::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);
namespace simgrid {
namespace surf {
-class XBT_PRIVATE AsGeneric;
+class XBT_PRIVATE AsRoutedGraph;
-class XBT_PRIVATE AsGeneric : public As {
+class XBT_PRIVATE AsRoutedGraph : public As {
public:
- AsGeneric(const char*name);
- ~AsGeneric();
+ AsRoutedGraph(const char*name);
+ ~AsRoutedGraph();
virtual void getGraph(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges) override;
virtual sg_platf_route_cbarg_t getBypassRoute(NetCard *src, NetCard *dst, double *lat) override;
/* Creation routing model functions */
AsDijkstra::AsDijkstra(const char*name, bool cached)
- : AsGeneric(name)
+ : AsRoutedGraph(name)
{
if (cached)
routeCache_ = xbt_dict_new_homogeneous(&route_cache_elem_free);
#include <xbt/base.h>
-#include "surf_routing_generic.hpp"
+#include "surf_routing_RoutedGraph.hpp"
#ifndef SURF_ROUTING_DIJKSTRA_HPP_
#define SURF_ROUTING_DIJKSTRA_HPP_
class XBT_PRIVATE AsDijkstra;
/** Dijkstra routing data: fast initialization, slow lookup, small memory requirements, shortest path routing only */
-class AsDijkstra : public AsGeneric {
+class AsDijkstra : public AsRoutedGraph {
public:
AsDijkstra(const char*name, bool cached);
void Seal() override;
namespace surf {
AsFloyd::AsFloyd(const char*name)
- : AsGeneric(name)
+ : AsRoutedGraph(name)
{
predecessorTable_ = NULL;
costTable_ = NULL;
#include <xbt/base.h>
-#include "surf_routing_generic.hpp"
+#include "surf_routing_RoutedGraph.hpp"
namespace simgrid {
namespace surf {
class XBT_PRIVATE AsFloyd;
/** Floyd routing data: slow initialization, fast lookup, lesser memory requirements, shortest path routing only */
-class AsFloyd: public AsGeneric {
+class AsFloyd: public AsRoutedGraph {
public:
AsFloyd(const char *name);
~AsFloyd();
namespace simgrid {
namespace surf {
AsFull::AsFull(const char*name)
- : AsGeneric(name)
+ : AsRoutedGraph(name)
{
}
#include <xbt/base.h>
-#include "surf_routing_generic.hpp"
+#include "surf_routing_RoutedGraph.hpp"
namespace simgrid {
namespace surf {
class XBT_PRIVATE AsFull;
/** Full routing: fast, large memory requirements, fully expressive */
-class AsFull: public AsGeneric {
+class AsFull: public AsRoutedGraph {
public:
AsFull(const char*name);
namespace simgrid {
namespace surf {
AsVivaldi::AsVivaldi(const char *name)
- : AsGeneric(name)
+ : AsRoutedGraph(name)
{}
void AsVivaldi::getRouteAndLatency(NetCard *src, NetCard *dst, sg_platf_route_cbarg_t route, double *lat)
/* 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"
-#include "surf_routing_generic.hpp"
#ifndef SURF_ROUTING_VIVALDI_HPP_
#define SURF_ROUTING_VIVALDI_HPP_
***********/
class XBT_PRIVATE AsVivaldi;
-class AsVivaldi: public AsGeneric {
+class AsVivaldi: public AsRoutedGraph {
public:
AsVivaldi(const char *name);
~AsVivaldi() {};
src/surf/surf_routing_dijkstra.hpp
src/surf/surf_routing_floyd.hpp
src/surf/surf_routing_full.hpp
- src/surf/surf_routing_generic.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/surf_routing_dijkstra.cpp
src/surf/surf_routing_floyd.cpp
src/surf/surf_routing_full.cpp
- src/surf/surf_routing_generic.cpp
+ src/surf/surf_routing_RoutedGraph.cpp
src/surf/surf_routing_none.cpp
src/surf/surf_routing_vivaldi.cpp
src/surf/surfxml_parse.cpp