From: Martin Quinson Date: Tue, 22 Dec 2015 08:55:05 +0000 (+0100) Subject: pull up two more methods in the surf::Host hierarchy X-Git-Tag: v3_13~1412 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ea31ec0e5a9d8c016194492e5c943188281950ea pull up two more methods in the surf::Host hierarchy --- diff --git a/src/surf/host_clm03.cpp b/src/surf/host_clm03.cpp index f0c3459de9..1dc8e21791 100644 --- a/src/surf/host_clm03.cpp +++ b/src/surf/host_clm03.cpp @@ -139,14 +139,6 @@ void HostCLM03::updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, THROW_IMPOSSIBLE; /* This model does not implement parallel tasks */ } -Action *HostCLM03::execute(double size) { - return p_cpu->execute(size); -} - -Action *HostCLM03::sleep(double duration) { - return p_cpu->sleep(duration); -} - /********** * Action * **********/ diff --git a/src/surf/host_clm03.hpp b/src/surf/host_clm03.hpp index 8f4cffe1fb..0a4d47e1b2 100644 --- a/src/surf/host_clm03.hpp +++ b/src/surf/host_clm03.hpp @@ -55,9 +55,6 @@ public: ~HostCLM03(); void updateState(tmgr_trace_event_t event_type, double value, double date) override; - virtual Action *execute(double size) override; - virtual Action *sleep(double duration) override; - bool isUsed() override; xbt_dynar_t getVms(); diff --git a/src/surf/host_interface.cpp b/src/surf/host_interface.cpp index 38676b8677..2c403954f6 100644 --- a/src/surf/host_interface.cpp +++ b/src/surf/host_interface.cpp @@ -146,6 +146,14 @@ void Host::setState(e_surf_resource_state_t state){ p_cpu->setState(state); } +Action *Host::execute(double size) { + return p_cpu->execute(size); +} +Action *Host::sleep(double duration) { + return p_cpu->sleep(duration); +} + + simgrid::surf::Storage *Host::findStorageOnMountList(const char* mount) { simgrid::surf::Storage *st = NULL; diff --git a/src/surf/host_interface.hpp b/src/surf/host_interface.hpp index 42a31e912c..793e99d821 100644 --- a/src/surf/host_interface.hpp +++ b/src/surf/host_interface.hpp @@ -135,7 +135,7 @@ public: * @return The CpuAction corresponding to the processing * @see Cpu */ - virtual Action *execute(double flops_amount)=0; + Action *execute(double flops_amount); /** * @brief Make a process sleep for duration seconds @@ -144,7 +144,7 @@ public: * @return The CpuAction corresponding to the sleeping * @see Cpu */ - virtual Action *sleep(double duration)=0; + Action *sleep(double duration); /** @brief Return the storage of corresponding mount point */ virtual simgrid::surf::Storage *findStorageOnMountList(const char* storage); diff --git a/src/surf/host_ptask_L07.cpp b/src/surf/host_ptask_L07.cpp index 15dab6d015..3fb1fa68be 100644 --- a/src/surf/host_ptask_L07.cpp +++ b/src/surf/host_ptask_L07.cpp @@ -392,16 +392,6 @@ void HostL07Model::addTraces() /************ * Resource * ************/ - -HostL07::HostL07(HostModel *model, const char* name, xbt_dict_t props, RoutingEdge *netElm, Cpu *cpu) - : Host(model, name, props, NULL, netElm, cpu) -{ -} - -HostL07::~HostL07() -{ -} - CpuL07::CpuL07(CpuL07Model *model, const char* name, double speedInitial, double speedScale, tmgr_trace_t speedTrace, int core, e_surf_resource_state_t state_initial, tmgr_trace_t state_trace) diff --git a/src/surf/host_ptask_L07.hpp b/src/surf/host_ptask_L07.hpp index 55645be226..bc37f536cb 100644 --- a/src/surf/host_ptask_L07.hpp +++ b/src/surf/host_ptask_L07.hpp @@ -96,12 +96,13 @@ public: class HostL07 : public Host { public: - HostL07(HostModel *model, const char* name, xbt_dict_t props, RoutingEdge *netElm, Cpu *cpu); - ~HostL07(); + HostL07(HostModel *model, const char* name, xbt_dict_t props, RoutingEdge *netElm, Cpu *cpu) + : Host(model, name, props, NULL, netElm, cpu) + {} + ~HostL07() + {} bool isUsed() override {DIE_IMPOSSIBLE;}; void updateState(tmgr_trace_event_t /*event_type*/, double /*value*/, double /*date*/) override {DIE_IMPOSSIBLE;}; - Action *execute(double size) override {return p_cpu->execute(size);}; - Action *sleep(double duration) override {return p_cpu->sleep(duration);}; }; class CpuL07 : public Cpu {