Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
empty Cpu factories
[simgrid.git] / src / surf / cpu_ti.cpp
index d094a12..39c4b5c 100644 (file)
@@ -414,12 +414,9 @@ CpuTiModel::~CpuTiModel()
   xbt_heap_free(tiActionHeap_);
 }
 
-Cpu *CpuTiModel::createCpu(simgrid::s4u::Host *host, xbt_dynar_t speeds, int core)
+Cpu *CpuTiModel::createCpu(simgrid::s4u::Host *host, xbt_dynar_t speedPerPstate, int core)
 {
-  xbt_assert(core==1,"Multi-core not handled with this model yet");
-  xbt_assert(xbt_dynar_getfirst_as(speeds, double) > 0.0,
-      "Speed has to be >0.0. Did you forget to specify the mandatory speed attribute?");
-  return new CpuTi(this, host, speeds, core);
+  return new CpuTi(this, host, speedPerPstate, core);
 }
 
 double CpuTiModel::next_occuring_event(double now)
@@ -462,7 +459,7 @@ void CpuTiModel::updateActionsState(double now, double /*delta*/)
  * Resource *
  ************/
 CpuTi::CpuTi(CpuTiModel *model, simgrid::s4u::Host *host, xbt_dynar_t speedPerPstate, int core)
-  : Cpu(model, host, NULL, core, 0)
+  : Cpu(model, host, speedPerPstate, core)
 {
   xbt_assert(core==1,"Multi-core not handled by this model yet");
   coresAmount_ = core;