Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of github.com:simgrid/simgrid into dev_10
[simgrid.git] / src / surf / network_cm02.cpp
index d3c96bb..cffaa2e 100644 (file)
@@ -71,7 +71,7 @@ namespace simgrid {
 namespace kernel {
 namespace resource {
 
-NetworkCm02Model::NetworkCm02Model(kernel::lmm::System* (*make_new_lmm_system)(bool))
+NetworkCm02Model::NetworkCm02Model()
     : NetworkModel(simgrid::config::get_value<std::string>("network/optim") == "Full" ? Model::UpdateAlgo::FULL
                                                                                       : Model::UpdateAlgo::LAZY)
 {
@@ -86,7 +86,7 @@ NetworkCm02Model::NetworkCm02Model(kernel::lmm::System* (*make_new_lmm_system)(b
     select = true;
   }
 
-  set_maxmin_system(make_new_lmm_system(select));
+  set_maxmin_system(new lmm::System(select));
   loopback_ = NetworkCm02Model::create_link("__loopback__", 
                                             std::vector<double>{simgrid::config::get_value<double>("network/loopback-bw")},
                                             simgrid::config::get_value<double>("network/loopback-lat"),
@@ -273,7 +273,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
     get_maxmin_system()->expand(dst_wifi_link->get_constraint(), action->get_variable(),
                                 1.0 / dst_wifi_link->get_host_rate(dst));
 
-  for (auto const& link : route) {
+  for (auto const* link : route) {
     // WIFI links are handled manually just above, so skip them now
     if (link->get_sharing_policy() == s4u::Link::SharingPolicy::WIFI) {
       xbt_assert(link == src_wifi_link || link == dst_wifi_link,
@@ -292,7 +292,7 @@ Action* NetworkCm02Model::communicate(s4u::Host* src, s4u::Host* dst, double siz
     if (src_wifi_link != nullptr)
       get_maxmin_system()->expand(src_wifi_link->get_constraint(), action->get_variable(),
                                   .05 / src_wifi_link->get_host_rate(src));
-    for (auto const& link : back_route)
+    for (auto const* link : back_route)
       if (link->get_sharing_policy() != s4u::Link::SharingPolicy::WIFI)
         get_maxmin_system()->expand(link->get_constraint(), action->get_variable(), .05);
     // Change concurrency_share here, if you want that cross-traffic is included in the SURF concurrency