Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
further energy interface cleanups (see changelog)
[simgrid.git] / src / surf / cpu_cas01.cpp
index 98ad19a..f5182c3 100644 (file)
@@ -6,7 +6,6 @@
 
 #include "cpu_cas01.hpp"
 #include "cpu_ti.hpp"
-#include "plugins/energy.hpp"
 #include "maxmin_private.hpp"
 #include "simgrid/sg_config.h"
 
@@ -231,11 +230,9 @@ void CpuCas01::updateState(tmgr_trace_event_t event_type, double value, double d
     lmm_update_constraint_bound(getModel()->getMaxminSystem(), getConstraint(),
                                 m_core * m_powerScale *
                                 m_powerPeak);
-#ifdef HAVE_TRACING
     TRACE_surf_host_set_power(date, getName(),
                               m_core * m_powerScale *
                               m_powerPeak);
-#endif
     while ((var = lmm_get_var_from_cnst
             (getModel()->getMaxminSystem(), getConstraint(), &elem))) {
       CpuCas01ActionPtr action = static_cast<CpuCas01ActionPtr>(lmm_variable_id(var));
@@ -344,14 +341,14 @@ int CpuCas01::getNbPstates()
   return xbt_dynar_length(p_powerPeakList);
 }
 
-void CpuCas01::setPowerPeakAt(int pstate_index)
+void CpuCas01::setPstate(int pstate_index)
 {
   xbt_dynar_t plist = p_powerPeakList;
   xbt_assert((pstate_index <= (int)xbt_dynar_length(plist)), "Invalid parameters (pstate index out of bounds)");
 
-  double new_power_peak = xbt_dynar_get_as(plist, pstate_index, double);
+  double new_pstate = xbt_dynar_get_as(plist, pstate_index, double);
   m_pstate = pstate_index;
-  m_powerPeak = new_power_peak;
+  m_powerPeak = new_pstate;
 }
 
 /**********