X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ba9a4cfeba4eb00e84cd17603fc9654e81445655..6cb7d1fc585d47d6dbad8c288e8f275448f8025c:/src/surf/cpu_cas01.hpp diff --git a/src/surf/cpu_cas01.hpp b/src/surf/cpu_cas01.hpp index 3a5a2b9dbf..938c39e0ba 100644 --- a/src/surf/cpu_cas01.hpp +++ b/src/surf/cpu_cas01.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2016. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -25,12 +25,10 @@ class XBT_PRIVATE CpuCas01Action; class CpuCas01Model : public simgrid::surf::CpuModel { public: CpuCas01Model(); - ~CpuCas01Model(); + ~CpuCas01Model() override; - Cpu *createCpu(simgrid::s4u::Host *host, xbt_dynar_t speedPeak, - tmgr_trace_t speedTrace, int core, tmgr_trace_t state_trace) override; - double next_occuring_event_full(double now) override; - ActionList *p_cpuRunningActionSetThatDoesNotNeedBeingChecked; + Cpu *createCpu(simgrid::s4u::Host *host, std::vector *speedPerPstate, int core) override; + ActionList p_cpuRunningActionSetThatDoesNotNeedBeingChecked; }; /************ @@ -39,16 +37,16 @@ public: class CpuCas01 : public Cpu { public: - CpuCas01(CpuCas01Model *model, simgrid::s4u::Host *host, xbt_dynar_t speedPeak, - tmgr_trace_t speedTrace, int core, tmgr_trace_t stateTrace) ; - ~CpuCas01(); - void apply_event(tmgr_trace_iterator_t event, double value) override; - CpuAction *execution_start(double size) override; - CpuAction *sleep(double duration) override; + CpuCas01(CpuCas01Model *model, simgrid::s4u::Host *host, std::vector *speedPerPstate, int core); + ~CpuCas01() override; + void apply_event(tmgr_trace_event_t event, double value) override; + CpuAction* execution_start(double size) override; + CpuAction* execution_start(double size, int requestedCore) override; + CpuAction* sleep(double duration) override; bool isUsed() override; - xbt_dynar_t getSpeedPeakList(); // FIXME: killme to hide our internals + std::vector * getSpeedPeakList(); // FIXME: killme to hide our internals protected: void onSpeedChange() override; @@ -61,10 +59,13 @@ class CpuCas01Action: public CpuAction { friend CpuAction *CpuCas01::execution_start(double size); friend CpuAction *CpuCas01::sleep(double duration); public: - CpuCas01Action(Model *model, double cost, bool failed, double speed, - lmm_constraint_t constraint); + CpuCas01Action(Model* model, double cost, bool failed, double speed, lmm_constraint_t constraint, int coreAmount); + CpuCas01Action(Model* model, double cost, bool failed, double speed, lmm_constraint_t constraint); + ~CpuCas01Action() override; + int requestedCore(); - ~CpuCas01Action() {}; +private: + int requestedCore_ = 1; }; }