X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6badbbf58554a35b03f58509b0b18cf606c38f5e..6c6e9129b8c8a2404310f460327314afa3fb9b8b:/src/surf/cpu_ti.cpp diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index 8490a1ee3f..564cd84e71 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -7,6 +7,7 @@ #include "cpu_ti.hpp" #include "trace_mgr_private.h" #include "xbt/heap.h" +#include "src/surf/platform.hpp" #ifndef SURF_MODEL_CPUTI_H_ #define SURF_MODEL_CPUTI_H_ @@ -390,7 +391,7 @@ int CpuTiTrace::binarySearch(double *array, double a, int low, int high) static void cpu_ti_define_callbacks() { - sg_platf_postparse_add_cb(simgrid::surf::cpu_add_traces); + simgrid::surf::on_postparse.connect(simgrid::surf::cpu_add_traces); } /********* @@ -434,7 +435,7 @@ CpuTiModel::~CpuTiModel() xbt_heap_free(p_tiActionHeap); } -Cpu *CpuTiModel::createCpu(simgrid::Host *host, +Cpu *CpuTiModel::createCpu(simgrid::s4u::Host *host, xbt_dynar_t speedPeak, int pstate, double speedScale, @@ -501,7 +502,7 @@ void CpuTiModel::addTraces() /* connect all traces relative to hosts */ xbt_dict_foreach(trace_connect_list_host_avail, cursor, trace_name, elm) { tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name); - CpuTi *cpu = static_cast(sg_host_by_name(elm)->p_cpu); + CpuTi *cpu = static_cast(sg_host_by_name(elm)->pimpl_cpu); xbt_assert(cpu, "Host %s undefined", elm); xbt_assert(trace, "Trace %s undefined", trace_name); @@ -517,7 +518,7 @@ void CpuTiModel::addTraces() xbt_dict_foreach(trace_connect_list_power, cursor, trace_name, elm) { tmgr_trace_t trace = (tmgr_trace_t) xbt_dict_get_or_null(traces_set_list, trace_name); - CpuTi *cpu = static_cast(sg_host_by_name(elm)->p_cpu); + CpuTi *cpu = static_cast(sg_host_by_name(elm)->pimpl_cpu); xbt_assert(cpu, "Host %s undefined", elm); xbt_assert(trace, "Trace %s undefined", trace_name); @@ -547,7 +548,7 @@ void CpuTiModel::addTraces() /************ * Resource * ************/ -CpuTi::CpuTi(CpuTiModel *model, simgrid::Host *host, xbt_dynar_t speedPeak, +CpuTi::CpuTi(CpuTiModel *model, simgrid::s4u::Host *host, xbt_dynar_t speedPeak, int pstate, double speedScale, tmgr_trace_t speedTrace, int core, int initiallyOn, tmgr_trace_t stateTrace) : Cpu(model, host, NULL, pstate, core, 0, speedScale, initiallyOn)