Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
reduce the scope of some #include, and cut useless ones
[simgrid.git] / src / surf / ptask_L07.cpp
index 0e41e56..9e2bfe1 100644 (file)
@@ -3,15 +3,11 @@
 /* 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 <cstdlib>
-
-#include <algorithm>
-#include <unordered_set>
-
 #include "ptask_L07.hpp"
+#include "surf/surf.hpp"
+#include "xbt/config.hpp"
 
-#include "cpu_interface.hpp"
-#include "xbt/utility.hpp"
+#include <unordered_set>
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host);
 XBT_LOG_EXTERNAL_CATEGORY(xbt_cfg);
@@ -290,7 +286,7 @@ bool CpuL07::is_used()
 /** @brief take into account changes of speed (either load or max) */
 void CpuL07::onSpeedChange() {
   kernel::lmm::Variable* var = nullptr;
-  const_lmm_element_t elem = nullptr;
+  const kernel::lmm::Element* elem = nullptr;
 
   get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(), speed_.peak * speed_.scale);
   while ((var = get_constraint()->get_variable(&elem))) {
@@ -360,7 +356,7 @@ void LinkL07::setLatency(double value)
 {
   kernel::lmm::Variable* var = nullptr;
   L07Action *action;
-  const_lmm_element_t elem = nullptr;
+  const kernel::lmm::Element* elem = nullptr;
 
   latency_.peak = value;
   while ((var = get_constraint()->get_variable(&elem))) {
@@ -400,7 +396,7 @@ void L07Action::updateBound()
       }
     }
   }
-  double lat_bound = sg_tcp_gamma / (2.0 * lat_current);
+  double lat_bound = NetworkModel::cfg_tcp_gamma / (2.0 * lat_current);
   XBT_DEBUG("action (%p) : lat_bound = %g", this, lat_bound);
   if ((latency_ <= 0.0) && (suspended_ == Action::SuspendStates::not_suspended)) {
     if (rate_ < 0)