double speedScale, int initiallyOn)
: Resource(model, host->name().c_str(), constraint, initiallyOn)
, m_core(core)
double speedScale, int initiallyOn)
: Resource(model, host->name().c_str(), constraint, initiallyOn)
, m_core(core)
// Copy the power peak array:
p_speedPeakList = xbt_dynar_new(sizeof(double), nullptr);
// Copy the power peak array:
p_speedPeakList = xbt_dynar_new(sizeof(double), nullptr);
for (i = 0; i < core; i++) {
/* just for a unique id, never used as a string. */
p_constraintCoreId[i] = bprintf("%s:%i", host->name().c_str(), i);
for (i = 0; i < core; i++) {
/* just for a unique id, never used as a string. */
p_constraintCoreId[i] = bprintf("%s:%i", host->name().c_str(), i);
- p_constraintCore[i] = lmm_constraint_new(model->getMaxminSystem(), p_constraintCoreId[i], m_speedScale * m_speedPeak);
+ p_constraintCore[i] = lmm_constraint_new(model->getMaxminSystem(), p_constraintCoreId[i], p_speed.scale * p_speed.peak);
}
void Cpu::onSpeedChange() {
TRACE_surf_host_set_speed(surf_get_clock(), getName(),
}
void Cpu::onSpeedChange() {
TRACE_surf_host_set_speed(surf_get_clock(), getName(),
- xbt_assert(p_speedEvent==NULL,"Cannot set a second speed trace to Host %s", m_host->name().c_str());
+ xbt_assert(p_speed.event==NULL,"Cannot set a second speed trace to Host %s", m_host->name().c_str());