Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplify a bit the CPU creation API
[simgrid.git] / src / surf / ptask_L07.cpp
index 77bba92..685709b 100644 (file)
@@ -13,7 +13,6 @@
 #include "cpu_interface.hpp"
 #include "surf_routing.hpp"
 #include "xbt/lib.h"
-#include "src/surf/platform.hpp"
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_host);
 XBT_LOG_EXTERNAL_CATEGORY(xbt_cfg);
@@ -287,8 +286,8 @@ Action *NetworkL07Model::communicate(NetCard *src, NetCard *dst,
   double *bytes_amount = xbt_new0(double, 4);
   Action *res = NULL;
 
-  host_list[0] = sg_host_by_name(src->getName());
-  host_list[1] = sg_host_by_name(dst->getName());
+  host_list[0] = sg_host_by_name(src->name());
+  host_list[1] = sg_host_by_name(dst->name());
   bytes_amount[1] = size;
 
   res = p_hostModel->executeParallelTask(2, host_list, flops_amount, bytes_amount, rate);
@@ -297,13 +296,11 @@ Action *NetworkL07Model::communicate(NetCard *src, NetCard *dst,
 }
 
 Cpu *CpuL07Model::createCpu(simgrid::s4u::Host *host,  xbt_dynar_t powerPeakList,
-                          int pstate, double power_scale,
+                          double power_scale,
                           tmgr_trace_t power_trace, int core,
-                          int initiallyOn,
                           tmgr_trace_t state_trace)
 {
-  CpuL07 *cpu = new CpuL07(this, host, powerPeakList, pstate, power_scale, power_trace,
-                         core, initiallyOn, state_trace);
+  CpuL07 *cpu = new CpuL07(this, host, powerPeakList, power_scale, power_trace, core, state_trace);
   return cpu;
 }
 
@@ -334,13 +331,12 @@ Link* NetworkL07Model::createLink(const char *name,
  ************/
 
 CpuL07::CpuL07(CpuL07Model *model, simgrid::s4u::Host *host,
-               xbt_dynar_t speedPeakList, int pstate,
-         double speedScale, tmgr_trace_t speedTrace,
-             int core, int initiallyOn, tmgr_trace_t state_trace)
- : Cpu(model, host, speedPeakList, pstate,
-     core, xbt_dynar_get_as(speedPeakList,pstate,double), speedScale, initiallyOn)
+    xbt_dynar_t speedPeakList,
+    double speedScale, tmgr_trace_t speedTrace,
+    int core, tmgr_trace_t state_trace)
+ : Cpu(model, host, speedPeakList, core, xbt_dynar_get_as(speedPeakList,0,double), speedScale)
 {
-  p_constraint = lmm_constraint_new(model->getMaxminSystem(), this, xbt_dynar_get_as(speedPeakList,pstate,double) * speedScale);
+  p_constraint = lmm_constraint_new(model->getMaxminSystem(), this, xbt_dynar_get_as(speedPeakList,0,double) * speedScale);
 
   if (speedTrace)
     p_speed.event = future_evt_set->add_trace(speedTrace, 0.0, this);