X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d6ee04bb4b77788c1f17220a2117f41573c9dcde..88fad0aaff9eb463f048bfdfe4ad6218aba44ddb:/src/kernel/routing/VivaldiZone.cpp diff --git a/src/kernel/routing/VivaldiZone.cpp b/src/kernel/routing/VivaldiZone.cpp index 3d78b3a4ed..4c9a331e59 100644 --- a/src/kernel/routing/VivaldiZone.cpp +++ b/src/kernel/routing/VivaldiZone.cpp @@ -1,16 +1,16 @@ -/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2018. 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 "simgrid/kernel/routing/VivaldiZone.hpp" +#include "simgrid/kernel/routing/NetPoint.hpp" #include "simgrid/s4u/Engine.hpp" #include "simgrid/s4u/Host.hpp" - -#include "src/kernel/routing/NetPoint.hpp" -#include "src/kernel/routing/VivaldiZone.hpp" #include "src/surf/network_interface.hpp" +#include "src/surf/xml/platf_private.hpp" + +#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_vivaldi, surf, "Routing part of surf"); @@ -72,10 +72,10 @@ void VivaldiZone::setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, s std::string link_down = "link_" + netpoint->getName() + "_DOWN"; surf::LinkImpl* linkUp = surf_network_model->createLink(link_up, bw_out, 0, SURF_LINK_SHARED); surf::LinkImpl* linkDown = surf_network_model->createLink(link_down, bw_in, 0, SURF_LINK_SHARED); - privateLinks_.insert({netpoint->id(), {linkUp, linkDown}}); + private_links_.insert({netpoint->id(), {linkUp, linkDown}}); } -void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_t route, double* lat) +void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat) { XBT_DEBUG("vivaldi getLocalRoute from '%s'[%u] '%s'[%u]", src->getCname(), src->id(), dst->getCname(), dst->id()); @@ -87,8 +87,8 @@ void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cba } /* Retrieve the private links */ - auto src_link = privateLinks_.find(src->id()); - if (src_link != privateLinks_.end()) { + auto src_link = private_links_.find(src->id()); + if (src_link != private_links_.end()) { std::pair info = src_link->second; if (info.first) { route->link_list.push_back(info.first); @@ -99,8 +99,8 @@ void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cba XBT_DEBUG("Source of private link (%u) doesn't exist", src->id()); } - auto dst_link = privateLinks_.find(dst->id()); - if (dst_link != privateLinks_.end()) { + auto dst_link = private_links_.find(dst->id()); + if (dst_link != private_links_.end()) { std::pair info = dst_link->second; if (info.second) { route->link_list.push_back(info.second);