X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a9cf1ace2a16e19685da841d70c401adb448c83d..f9dd39e26289f9ba2d4ef96fbbed1709bff22043:/src/surf/host_ptask_L07.hpp diff --git a/src/surf/host_ptask_L07.hpp b/src/surf/host_ptask_L07.hpp index e21dc4471b..3754b67fac 100644 --- a/src/surf/host_ptask_L07.hpp +++ b/src/surf/host_ptask_L07.hpp @@ -57,10 +57,10 @@ public: CpuL07Model(HostL07Model *hmodel,lmm_system_t sys); ~CpuL07Model(); - Cpu *createCpu(simgrid::Host *host, xbt_dynar_t speedPeakList, + Cpu *createCpu(simgrid::s4u::Host *host, xbt_dynar_t speedPeakList, int pstate, double speedScale, tmgr_trace_t speedTrace, int core, - e_surf_resource_state_t state_initial, + int initiallyOn, tmgr_trace_t state_trace) override; void addTraces() override {DIE_IMPOSSIBLE;}; @@ -76,12 +76,12 @@ public: tmgr_trace_t bw_trace, double lat_initial, tmgr_trace_t lat_trace, - e_surf_resource_state_t state_initial, + int initiallyOn, tmgr_trace_t state_trace, e_surf_link_sharing_policy_t policy, xbt_dict_t properties) override; - Action *communicate(RoutingEdge *src, RoutingEdge *dst, double size, double rate) override; + Action *communicate(NetCard *src, NetCard *dst, double size, double rate) override; void addTraces() override {DIE_IMPOSSIBLE;}; bool shareResourcesIsIdempotent() override {return true;} @@ -94,17 +94,19 @@ public: class CpuL07 : public Cpu { friend void HostL07Model::addTraces(); - tmgr_trace_event_t p_stateEvent; - tmgr_trace_event_t p_speedEvent; + tmgr_trace_iterator_t p_stateEvent = nullptr; + tmgr_trace_iterator_t p_speedEvent = nullptr; public: - CpuL07(CpuL07Model *model, simgrid::Host *host, xbt_dynar_t speedPeakList, int pstate, + CpuL07(CpuL07Model *model, simgrid::s4u::Host *host, xbt_dynar_t speedPeakList, int pstate, double power_scale, tmgr_trace_t power_trace, - int core, e_surf_resource_state_t state_initial, tmgr_trace_t state_trace); + int core, int initiallyOn, tmgr_trace_t state_trace); ~CpuL07(); bool isUsed() override; - void updateState(tmgr_trace_event_t event_type, double value, double date) override; - Action *execute(double size) override; + void updateState(tmgr_trace_iterator_t event_type, double value, double date) override; + Action *execution_start(double size) override; Action *sleep(double duration) override; +protected: + void onSpeedChange() override; }; class LinkL07 : public Link { @@ -114,31 +116,30 @@ public: tmgr_trace_t bw_trace, double lat_initial, tmgr_trace_t lat_trace, - e_surf_resource_state_t - state_initial, + int initiallyOn, tmgr_trace_t state_trace, e_surf_link_sharing_policy_t policy); ~LinkL07(){ }; bool isUsed() override; - void updateState(tmgr_trace_event_t event_type, double value, double date) override; + void updateState(tmgr_trace_iterator_t event_type, double value, double date) override; double getBandwidth() override; void updateBandwidth(double value, double date=surf_get_clock()) override; void updateLatency(double value, double date=surf_get_clock()) override; double m_bwCurrent; - tmgr_trace_event_t p_bwEvent; + tmgr_trace_iterator_t p_bwEvent; }; /********** * Action * **********/ class L07Action : public CpuAction { - friend Action *CpuL07::execute(double size); + friend Action *CpuL07::execution_start(double size); friend Action *CpuL07::sleep(double duration); friend Action *HostL07Model::executeParallelTask(int host_nb, sg_host_t*host_list, double *flops_amount, - double *bytes_amount, + double *bytes_amount, double rate); public: L07Action(Model *model, int host_nb, @@ -151,13 +152,8 @@ public: void updateBound(); int unref() override; - void suspend() override; - void resume() override; - void setMaxDuration(double duration) override; - void setPriority(double priority) override; - double getRemains() override; - std::vector * p_edgeList = new std::vector(); + std::vector * p_netcardList = new std::vector(); double *p_computationAmount; double *p_communicationAmount; double m_latency;