-CpuCas01::CpuCas01(CpuCas01Model *model, simgrid::s4u::Host *host, xbt_dynar_t speedPeak,
- int pstate, double speedScale, tmgr_trace_t speedTrace, int core,
- int initiallyOn, tmgr_trace_t stateTrace)
-: Cpu(model, host,
- lmm_constraint_new(model->getMaxminSystem(), this, core * speedScale * xbt_dynar_get_as(speedPeak, pstate, double)),
- speedPeak, pstate,
- core, xbt_dynar_get_as(speedPeak, pstate, double), speedScale,
- initiallyOn) {
-
- XBT_DEBUG("CPU create: peak=%f, pstate=%d", p_speed.peak, m_pstate);
-
- m_core = core;
- if (speedTrace)
- p_speed.event = future_evt_set->add_trace(speedTrace, 0.0, this);
-
- if (stateTrace)
- p_stateEvent = future_evt_set->add_trace(stateTrace, 0.0, this);
+CpuCas01::CpuCas01(CpuCas01Model* model, simgrid::s4u::Host* host, std::vector<double>* speedPerPstate, int core)
+ : Cpu(model, host, model->getMaxminSystem()->constraint_new(this, core * speedPerPstate->front()), speedPerPstate,
+ core)
+{