namespace simgrid {
namespace surf {
-simgrid::xbt::Extension<simgrid::Host, Cpu> Cpu::EXTENSION_ID;
-
-void Cpu::classInit()
-{
- if (!EXTENSION_ID.valid())
- EXTENSION_ID = simgrid::Host::extension_create<simgrid::surf::Cpu>();
-}
-
/*************
* Callbacks *
*************/
, m_speedScale(speedScale)
, m_host(host)
{
- host->extension_set(Cpu::EXTENSION_ID, this);
+ host->p_cpu = this;
// Copy the power peak array:
p_speedPeakList = xbt_dynar_new(sizeof(double), nullptr);
, m_speedScale(speedScale)
, m_host(host)
{
- host->extension_set(Cpu::EXTENSION_ID, this);
+ host->p_cpu = this;
// Copy the power peak array:
p_speedPeakList = xbt_dynar_new(sizeof(double), nullptr);