X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/97b7c2c06ad7a973844e0b10ad31d88babfb1cf6..b2852b7c61948f495d7437ffaa7fd9aced12849c:/src/kernel/routing/TorusZone.cpp diff --git a/src/kernel/routing/TorusZone.cpp b/src/kernel/routing/TorusZone.cpp index fe93efd1c4..8019943766 100644 --- a/src/kernel/routing/TorusZone.cpp +++ b/src/kernel/routing/TorusZone.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2014-2023. 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. */ @@ -6,7 +6,7 @@ #include "simgrid/kernel/routing/TorusZone.hpp" #include "simgrid/kernel/routing/NetPoint.hpp" #include "simgrid/s4u/Host.hpp" -#include "src/surf/network_interface.hpp" +#include "src/kernel/resource/NetworkModel.hpp" #include #include @@ -14,16 +14,15 @@ #include #include -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_cluster_torus, surf_route_cluster, "Torus Routing part of surf"); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_torus, ker_platform, "Kernel Torus Routing"); namespace simgrid { -namespace kernel { -namespace routing { +namespace kernel::routing { void TorusZone::create_torus_links(unsigned long id, int rank, unsigned long position) { /* Create all links that exist in the torus. Each rank creates @a dimensions-1 links */ - int dim_product = 1; // Needed to calculate the next neighbor_id + unsigned long dim_product = 1; // Needed to calculate the next neighbor_id for (unsigned long j = 0; j < dimensions_.size(); j++) { unsigned long current_dimension = @@ -86,7 +85,7 @@ void TorusZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* return; if (src->id() == dst->id() && has_loopback()) { - resource::LinkImpl* uplink = get_uplink_from(node_pos(src->id())); + resource::StandardLinkImpl* uplink = get_uplink_from(node_pos(src->id())); add_link_latency(route->link_list_, uplink, lat); return; @@ -162,7 +161,7 @@ void TorusZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* route->link_list_.push_back(get_uplink_from(node_pos_with_loopback(current_node))); } - resource::LinkImpl* lnk; + resource::StandardLinkImpl* lnk; if (use_lnk_up) lnk = get_uplink_from(linkOffset); else @@ -180,8 +179,7 @@ void TorusZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* route->gw_dst_ = get_gateway(dst->id()); } -} // namespace routing -} // namespace kernel +} // namespace kernel::routing namespace s4u {