CpuCas01::CpuCas01(CpuCas01Model *model, simgrid::s4u::Host *host, xbt_dynar_t speedPerPstate, int core)
: Cpu(model, host,
lmm_constraint_new(model->getMaxminSystem(), this, core * xbt_dynar_get_as(speedPerPstate, 0/*pstate*/, double)),
- speedPerPstate, core, xbt_dynar_get_as(speedPerPstate, 0/*pstate*/, double))
+ speedPerPstate, core)
{
XBT_DEBUG("CPU create: peak=%f, pstate=%d", speed_.peak, pstate_);
* Resource *
************/
Cpu::Cpu(Model *model, simgrid::s4u::Host *host,
- xbt_dynar_t speedPerPstate, int core, double speedPeak)
- : Cpu(model, host, NULL/*constraint*/, speedPerPstate, core, speedPeak)
+ xbt_dynar_t speedPerPstate, int core)
+ : Cpu(model, host, NULL/*constraint*/, speedPerPstate, core)
{
}
Cpu::Cpu(Model *model, simgrid::s4u::Host *host, lmm_constraint_t constraint,
- xbt_dynar_t speedPerPstate, int core, double speedPeak)
+ xbt_dynar_t speedPerPstate, int core)
: Resource(model, host->name().c_str(), constraint)
, coresAmount_(core)
, host_(host)
{
- speed_.peak = speedPeak;
+ speed_.peak = xbt_dynar_get_as(speedPerPstate, 0/*pstate*/, double);
speed_.scale = 1;
host->pimpl_cpu = this;
xbt_assert(speed_.scale > 0, "Available speed has to be >0");
* @param model The CpuModel associated to this Cpu
* @param host The host in which this Cpu should be plugged
* @param constraint The lmm constraint associated to this Cpu if it is part of a LMM component
- * @param speedList [TODO]
+ * @param speedPerPstate Processor speed (in flop per second) for each pstate
* @param core The number of core of this Cpu
- * @param speedPeak The speed peak of this Cpu in flops (max speed)
*/
- Cpu(simgrid::surf::Model *model, simgrid::s4u::Host *host,
- lmm_constraint_t constraint, xbt_dynar_t speedPeakList, int core, double speedPeak);
+ Cpu(simgrid::surf::Model *model, simgrid::s4u::Host *host, lmm_constraint_t constraint, xbt_dynar_t speedPerPstate, int core);
/**
* @brief Cpu constructor
* @param host The host in which this Cpu should be plugged
* @param speedPerPstate Processor speed (in flop per second) for each pstate
* @param core The number of core of this Cpu
- * @param speedPeak The speed peak of this Cpu in flops (max speed)
*/
- Cpu(simgrid::surf::Model *model, simgrid::s4u::Host *host,
- xbt_dynar_t speedPerPstate, int core, double speedPeak);
+ Cpu(simgrid::surf::Model *model, simgrid::s4u::Host *host, xbt_dynar_t speedPerPstate, int core);
~Cpu();
* Resource *
************/
CpuTi::CpuTi(CpuTiModel *model, simgrid::s4u::Host *host, xbt_dynar_t speedPerPstate, int core)
- : Cpu(model, host, NULL, core, 0)
+ : Cpu(model, host, speedPerPstate, core)
{
xbt_assert(core==1,"Multi-core not handled by this model yet");
coresAmount_ = core;
************/
CpuL07::CpuL07(CpuL07Model *model, simgrid::s4u::Host *host, xbt_dynar_t speedPerPstate, int core)
- : Cpu(model, host, speedPerPstate, core, xbt_dynar_get_as(speedPerPstate,0,double))
+ : Cpu(model, host, speedPerPstate, core)
{
p_constraint = lmm_constraint_new(model->getMaxminSystem(), this, xbt_dynar_get_as(speedPerPstate,0,double));
}