]> AND Public Git Repository - simgrid.git/blobdiff - examples/cpp/comm-serialize/s4u-comm-serialize.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Introduce class simgrid::smpi::utils::FactorSet to reduce code dupplication
[simgrid.git] / examples / cpp / comm-serialize / s4u-comm-serialize.cpp
index 81a52d9da5073c451199235cd3ec32743f77f3c1..4c81a75aea2a31d8f40699eddd988e630f42ce18 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2022. 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. */
@@ -104,11 +104,12 @@ int main(int argc, char* argv[])
   auto* receiver = zone->create_host("receiver", 1)->seal();
 
   /* create split-duplex link1 (UP/DOWN), limiting the number of concurrent flows in it for 2 */
-  auto* link = zone->create_split_duplex_link("link1", 10e9)->set_latency(10e-6)->set_concurrency_limit(2)->seal();
+  const auto* link =
+      zone->create_split_duplex_link("link1", 10e9)->set_latency(10e-6)->set_concurrency_limit(2)->seal();
 
   /* create routes between nodes */
   zone->add_route(sender->get_netpoint(), receiver->get_netpoint(), nullptr, nullptr,
-                  std::vector<sg4::LinkInRoute>{{link, sg4::LinkInRoute::Direction::UP}}, true);
+                  {{link, sg4::LinkInRoute::Direction::UP}}, true);
   zone->seal();
 
   /* create actors Sender/Receiver */