Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
and now, blow up the routing_models table \o/
[simgrid.git] / src / surf / surf_routing_none.cpp
1 /* Copyright (c) 2009-2011, 2013-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "src/surf/surf_routing_private.hpp"
8 #include "src/surf/surf_routing_none.hpp"
9
10 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_none, surf, "Routing part of surf");
11
12 namespace simgrid {
13 namespace surf {
14
15 xbt_dynar_t AsNone::getOneLinkRoutes() {
16   return NULL;
17 }
18
19 void AsNone::getRouteAndLatency(NetCard * /*src*/, NetCard * /*dst*/,
20                                 sg_platf_route_cbarg_t /*res*/, double *lat)
21 {
22   *lat = 0.0;
23 }
24
25 void AsNone::getGraph(xbt_graph_t /*graph*/, xbt_dict_t /*nodes*/, xbt_dict_t /*edges*/)
26 {
27   XBT_INFO("No routing no graph");
28 }
29
30 sg_platf_route_cbarg_t AsNone::getBypassRoute(NetCard * /*src*/, NetCard * /*dst*/, double * /*lat*/) {
31   return NULL;
32 }
33
34 int AsNone::parsePU(NetCard *elm) {
35   XBT_DEBUG("Load process unit \"%s\"", elm->getName());
36   xbt_dynar_push_as(p_indexNetworkElm, NetCard*, elm);
37   /* don't care about PUs */
38   return -1;
39 }
40
41 int AsNone::parseAS(NetCard *elm) {
42   XBT_DEBUG("Load Autonomous system \"%s\"", elm->getName());
43   xbt_dynar_push_as(p_indexNetworkElm, NetCard*, elm);
44   /* even don't care about sub-ASes -- I'm as nihilist as an old punk*/
45   return -1;
46 }
47
48 void AsNone::parseRoute(sg_platf_route_cbarg_t /*route*/){
49   THROW_IMPOSSIBLE; /* No. */
50 }
51
52 void AsNone::parseASroute(sg_platf_route_cbarg_t /*route*/){
53   THROW_IMPOSSIBLE;
54 }
55 void AsNone::parseBypassroute(sg_platf_route_cbarg_t /*e_route*/){
56   THROW_IMPOSSIBLE;
57 }
58
59 }
60 }