X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9caf173e476622d309cc5653a83d224d05787cc7..5e22c862d29ac2455672f2bc7f50bbcc9ade21c2:/src/kernel/routing/VivaldiZone.cpp diff --git a/src/kernel/routing/VivaldiZone.cpp b/src/kernel/routing/VivaldiZone.cpp index fc77a23aaf..b424a4738a 100644 --- a/src/kernel/routing/VivaldiZone.cpp +++ b/src/kernel/routing/VivaldiZone.cpp @@ -9,6 +9,7 @@ #include "simgrid/s4u/Host.hpp" #include "src/surf/network_interface.hpp" #include "src/surf/xml/platf_private.hpp" +#include "surf/surf.hpp" #include @@ -54,7 +55,7 @@ static std::vector* getCoordsFromNetpoint(NetPoint* np) { simgrid::kernel::routing::vivaldi::Coords* coords = np->extension(); xbt_assert(coords, "Please specify the Vivaldi coordinates of %s %s (%p)", - (np->isNetZone() ? "Netzone" : (np->isHost() ? "Host" : "Router")), np->get_cname(), np); + (np->is_netzone() ? "Netzone" : (np->is_host() ? "Host" : "Router")), np->get_cname(), np); return &coords->coords; } @@ -64,22 +65,23 @@ VivaldiZone::VivaldiZone(NetZone* father, std::string name) : ClusterZone(father void VivaldiZone::setPeerLink(NetPoint* netpoint, double bw_in, double bw_out, std::string coord) { - xbt_assert(netpoint->netzone() == this, "Cannot add a peer link to a netpoint that is not in this netzone"); + xbt_assert(netpoint->get_englobing_zone() == this, + "Cannot add a peer link to a netpoint that is not in this netzone"); new simgrid::kernel::routing::vivaldi::Coords(netpoint, coord); std::string link_up = "link_" + netpoint->get_name() + "_UP"; std::string link_down = "link_" + netpoint->get_name() + "_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); + resource::LinkImpl* linkUp = surf_network_model->createLink(link_up, bw_out, 0, s4u::Link::SharingPolicy::SHARED); + resource::LinkImpl* linkDown = surf_network_model->createLink(link_down, bw_in, 0, s4u::Link::SharingPolicy::SHARED); private_links_.insert({netpoint->id(), {linkUp, linkDown}}); } -void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat) +void VivaldiZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat) { XBT_DEBUG("vivaldi getLocalRoute from '%s'[%u] '%s'[%u]", src->get_cname(), src->id(), dst->get_cname(), dst->id()); - if (src->isNetZone()) { + if (src->is_netzone()) { std::string srcName = "router_" + src->get_name(); std::string dstName = "router_" + dst->get_name(); route->gw_src = simgrid::s4u::Engine::getInstance()->getNetpointByNameOrNull(srcName.c_str()); @@ -89,7 +91,7 @@ void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* /* Retrieve the private links */ auto src_link = private_links_.find(src->id()); if (src_link != private_links_.end()) { - std::pair info = src_link->second; + std::pair info = src_link->second; if (info.first) { route->link_list.push_back(info.first); if (lat) @@ -101,7 +103,7 @@ void VivaldiZone::getLocalRoute(NetPoint* src, NetPoint* dst, RouteCreationArgs* auto dst_link = private_links_.find(dst->id()); if (dst_link != private_links_.end()) { - std::pair info = dst_link->second; + std::pair info = dst_link->second; if (info.second) { route->link_list.push_back(info.second); if (lat)