Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
do not use unsigned there, -1 is used to indicate there is no route between hosts
authorSUTER Frederic <frederic.suter@cc.in2p3.fr>
Mon, 6 Sep 2021 11:55:51 +0000 (13:55 +0200)
committerSUTER Frederic <frederic.suter@cc.in2p3.fr>
Mon, 6 Sep 2021 11:55:51 +0000 (13:55 +0200)
include/simgrid/kernel/routing/FloydZone.hpp
src/kernel/routing/FloydZone.cpp

index 46f1208..990071a 100644 (file)
@@ -23,7 +23,7 @@ namespace routing {
  */
 class XBT_PRIVATE FloydZone : public RoutedZone {
   /* vars to compute the Floyd algorithm. */
-  std::vector<std::vector<unsigned long>> predecessor_table_;
+  std::vector<std::vector<long>> predecessor_table_;
   std::vector<std::vector<unsigned long>> cost_table_;
   std::vector<std::vector<std::unique_ptr<Route>>> link_table_;
 
index feda4ac..8de2e8c 100644 (file)
@@ -41,7 +41,7 @@ void FloydZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route*
   std::vector<Route*> route_stack;
   unsigned long cur = dst->id();
   do {
-    int pred = predecessor_table_[src->id()][cur];
+    long pred = predecessor_table_[src->id()][cur];
     if (pred == -1)
       throw std::invalid_argument(xbt::string_printf("No route from '%s' to '%s'", src->get_cname(), dst->get_cname()));
     route_stack.push_back(link_table_[pred][cur].get());