Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplify how cpus are plugged into hosts at creation
[simgrid.git] / src / surf / cpu_ti.cpp
index 90447fb..a72268a 100644 (file)
@@ -435,7 +435,7 @@ CpuTiModel::~CpuTiModel()
   xbt_heap_free(p_tiActionHeap);
 }
 
-Cpu *CpuTiModel::createCpu(const char *name,
+Cpu *CpuTiModel::createCpu(simgrid::Host *host,
                               xbt_dynar_t speedPeak,
                               int pstate,
                            double speedScale,
@@ -447,7 +447,7 @@ Cpu *CpuTiModel::createCpu(const char *name,
   xbt_assert(core==1,"Multi-core not handled with this model yet");
   xbt_assert(xbt_dynar_getfirst_as(speedPeak, double) > 0.0,
       "Speed has to be >0.0. Did you forget to specify the mandatory speed attribute?");
-  CpuTi *cpu = new CpuTi(this, name, speedPeak, pstate, speedScale, speedTrace,
+  CpuTi *cpu = new CpuTi(this, host, speedPeak, pstate, speedScale, speedTrace,
                           core, stateInitial, stateTrace);
   return cpu;
 }
@@ -548,10 +548,10 @@ void CpuTiModel::addTraces()
 /************
  * Resource *
  ************/
-CpuTi::CpuTi(CpuTiModel *model, const char *name, xbt_dynar_t speedPeak,
+CpuTi::CpuTi(CpuTiModel *model, simgrid::Host *host, xbt_dynar_t speedPeak,
         int pstate, double speedScale, tmgr_trace_t speedTrace, int core,
         e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace)
-  : Cpu(model, name, core, 0, speedScale, stateInitial)
+  : Cpu(model, host, core, 0, speedScale, stateInitial)
 {
   p_speedEvent = NULL;
   m_speedScale = speedScale;