Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
changelog update
[simgrid.git] / src / kernel / resource / models / network_cm02.cpp
index 117f661e85277bb9f7b3ad0d6ddb8081bd3620c2..1a3f926feb4d1cd8ab4dea9e39ecf12037f8abb2 100644 (file)
@@ -5,15 +5,15 @@
 
 #include "src/kernel/resource/models/network_cm02.hpp"
 #include "simgrid/kernel/routing/NetZoneImpl.hpp"
-#include "simgrid/math_utils.h"
 #include "simgrid/s4u/Engine.hpp"
 #include "simgrid/s4u/Host.hpp"
-#include "simgrid/sg_config.hpp"
 #include "src/kernel/EngineImpl.hpp"
 #include "src/kernel/resource/StandardLinkImpl.hpp"
 #include "src/kernel/resource/WifiLinkImpl.hpp"
 #include "src/kernel/resource/profile/Event.hpp"
+#include "src/simgrid/math_utils.h"
 #include "src/simgrid/module.hpp"
+#include "src/simgrid/sg_config.hpp"
 
 #include <algorithm>
 #include <numeric>
@@ -149,14 +149,14 @@ NetworkCm02Model::NetworkCm02Model(const std::string& name) : NetworkModel(name)
 StandardLinkImpl* NetworkCm02Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
 {
   xbt_assert(bandwidths.size() == 1, "Non-WIFI links must use only 1 bandwidth.");
-  auto link = new NetworkCm02Link(name, bandwidths[0], get_maxmin_system());
+  auto* link = new NetworkCm02Link(name, bandwidths[0], get_maxmin_system());
   link->set_model(this);
   return link;
 }
 
 StandardLinkImpl* NetworkCm02Model::create_wifi_link(const std::string& name, const std::vector<double>& bandwidths)
 {
-  auto link = new WifiLinkImpl(name, bandwidths, get_maxmin_system());
+  auto* link = new WifiLinkImpl(name, bandwidths, get_maxmin_system());
   link->set_model(this);
   return link;
 }
@@ -445,7 +445,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
 
   if (cfg_weight_S_parameter > 0) {
     action->sharing_penalty_ = std::accumulate(route.begin(), route.end(), action->sharing_penalty_,
-                                               [](double total, StandardLinkImpl* const& link) {
+                                               [](double total, StandardLinkImpl const* link) {
                                                  return total + cfg_weight_S_parameter / link->get_bandwidth();
                                                });
   }