Cpu::Cpu(){
surf_callback_emit(cpuCreatedCallbacks, this);
- physCpu = NULL;
}
Cpu::Cpu(Model *model, const char *name, xbt_dict_t props,
, p_constraintCoreId(NULL)
{
surf_callback_emit(cpuCreatedCallbacks, this);
- physCpu = NULL;
}
Cpu::Cpu(Model *model, const char *name, xbt_dict_t props,
p_constraintCore[i] = lmm_constraint_new(model->getMaxminSystem(), p_constraintCoreId[i], m_powerScale * m_powerPeak);
}
}
- physCpu = NULL;
}
Cpu::~Cpu(){
surf_callback_emit(cpuStateChangedCallbacks, this, old, state);
}
-void Cpu::setPhysicalCPU(Cpu *physCpu)
-{
- if (!surf_energy)
- return;
- this->physCpu = physCpu;
- XBT_DEBUG("The CPU is virtual so associate the cpu energy to the physical cpu instead of creating a new one");
- std::map<Cpu*, CpuEnergy*>::iterator cpu_energy_it = surf_energy->find(physCpu);
- xbt_assert(cpu_energy_it != surf_energy->end(), "The cpu is not in surf_energy.");
- (*surf_energy)[this] = cpu_energy_it->second;
-}
-
-Cpu* Cpu::getPhysicalCPU(void)
-{
- return physCpu;
-}
-
/**********
* Action *
**********/