Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move the surf log categories elsewhere
[simgrid.git] / src / kernel / routing / ClusterZone.cpp
index b3abab4..72f6dca 100644 (file)
@@ -1,14 +1,13 @@
-/* Copyright (c) 2009-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-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. */
 
 #include "simgrid/kernel/routing/ClusterZone.hpp"
 #include "simgrid/kernel/routing/NetPoint.hpp"
-#include "simgrid/kernel/routing/RoutedZone.hpp"
 #include "src/kernel/resource/StandardLinkImpl.hpp"
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_cluster, ker_routing, "Kernel Cluster Routing");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_routing_cluster, ker_platform, "Kernel Cluster Routing");
 
 /* This routing is specifically setup to represent clusters, aka homogeneous sets of machines
  * Note that a router is created, easing the interconnection with the rest of the world. */
@@ -71,9 +70,8 @@ void ClusterBase::fill_leaf_from_cb(unsigned long position, const std::vector<un
   auto index_to_dims = [&dimensions](unsigned long index) {
     std::vector<unsigned long> dims_array(dimensions.size());
     for (auto i = static_cast<int>(dimensions.size() - 1); i >= 0; --i) {
-      if (index <= 0) {
+      if (index == 0)
         break;
-      }
       unsigned long value = index % dimensions[i];
       dims_array[i]      = value;
       index              = (index / dimensions[i]);