-
-Cpu::Cpu(Model *model, simgrid::Host *host,
- xbt_dynar_t speedPeakList, int pstate,
- int core, double speedPeak, double speedScale,
- e_surf_resource_state_t stateInitial)
- : Resource(model, host->getName().c_str(), stateInitial)
- , m_core(core)
- , m_speedPeak(speedPeak)
- , m_speedScale(speedScale)
- , m_host(host)
-{
- host->p_cpu = this;
-
- // Copy the power peak array:
- p_speedPeakList = xbt_dynar_new(sizeof(double), nullptr);
- unsigned long n = xbt_dynar_length(speedPeakList);
- for (unsigned long i = 0; i != n; ++i) {
- double value = xbt_dynar_get_as(speedPeakList, i, double);
- xbt_dynar_push(p_speedPeakList, &value);
- }
-
- m_pstate = pstate;
-}
-
-Cpu::Cpu(Model *model, simgrid::Host *host, lmm_constraint_t constraint,
- xbt_dynar_t speedPeakList, int pstate,
- int core, double speedPeak,
- double speedScale, e_surf_resource_state_t stateInitial)
- : Resource(model, host->getName().c_str(), constraint, stateInitial)
+Cpu::Cpu(Model *model, simgrid::s4u::Host *host, lmm_constraint_t constraint,
+ xbt_dynar_t speedPeakList, int pstate,
+ int core, double speedPeak,
+ double speedScale, int initiallyOn)
+ : Resource(model, host->name().c_str(), constraint, initiallyOn)