X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/35a389f7c71363e88bc1d4537390305fc24a959b..e3a1cf8d29cef5eaf730b485da389cff9319fa56:/src/surf/ptask_L07.hpp diff --git a/src/surf/ptask_L07.hpp b/src/surf/ptask_L07.hpp index 70efcaa82d..76bb0bb039 100644 --- a/src/surf/ptask_L07.hpp +++ b/src/surf/ptask_L07.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2019. 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. */ @@ -36,17 +36,21 @@ class XBT_PRIVATE L07Action; class HostL07Model : public HostModel { public: HostL07Model(); - ~HostL07Model(); + HostL07Model(const HostL07Model&) = delete; + HostL07Model& operator=(const HostL07Model&) = delete; + ~HostL07Model() override; double next_occuring_event(double now) override; void update_actions_state(double now, double delta) override; - kernel::resource::Action* execute_parallel(int host_nb, sg_host_t* host_list, double* flops_amount, - double* bytes_amount, double rate) override; + kernel::resource::Action* execute_parallel(const std::vector& host_list, const double* flops_amount, + const double* bytes_amount, double rate) override; }; class CpuL07Model : public CpuModel { public: CpuL07Model(HostL07Model* hmodel, kernel::lmm::System* sys); + CpuL07Model(const CpuL07Model&) = delete; + CpuL07Model& operator=(const CpuL07Model&) = delete; ~CpuL07Model(); Cpu* create_cpu(simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core) override; @@ -56,6 +60,8 @@ public: class NetworkL07Model : public kernel::resource::NetworkModel { public: NetworkL07Model(HostL07Model* hmodel, kernel::lmm::System* sys); + NetworkL07Model(const NetworkL07Model&) = delete; + NetworkL07Model& operator=(const NetworkL07Model&) = delete; ~NetworkL07Model(); kernel::resource::LinkImpl* create_link(const std::string& name, double bandwidth, double latency, s4u::Link::SharingPolicy policy) override; @@ -71,12 +77,14 @@ public: class CpuL07 : public Cpu { public: - CpuL07(CpuL07Model* model, simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core); + CpuL07(CpuL07Model* model, s4u::Host* host, std::vector* speed_per_pstate, int core); + CpuL07(const CpuL07&) = delete; + CpuL07& operator=(const CpuL07&) = delete; ~CpuL07() override; bool is_used() override; - void apply_event(tmgr_trace_event_t event, double value) override; + void apply_event(kernel::profile::Event* event, double value) override; kernel::resource::Action* execution_start(double size) override; - simgrid::kernel::resource::Action* execution_start(double size, int requested_cores) override + kernel::resource::Action* execution_start(double, int) override { THROW_UNIMPLEMENTED; return nullptr; @@ -91,9 +99,11 @@ class LinkL07 : public kernel::resource::LinkImpl { public: LinkL07(NetworkL07Model* model, const std::string& name, double bandwidth, double latency, s4u::Link::SharingPolicy policy); + LinkL07(const LinkL07&) = delete; + LinkL07& operator=(const LinkL07&) = delete; ~LinkL07() override; bool is_used() override; - void apply_event(tmgr_trace_event_t event, double value) override; + void apply_event(kernel::profile::Event* event, double value) override; void set_bandwidth(double value) override; void set_latency(double value) override; }; @@ -104,20 +114,24 @@ public: class L07Action : public CpuAction { friend Action *CpuL07::execution_start(double size); friend Action *CpuL07::sleep(double duration); - friend Action* HostL07Model::execute_parallel(int host_nb, sg_host_t* host_list, double* flops_amount, - double* bytes_amount, double rate); + friend Action* HostL07Model::execute_parallel(const std::vector& host_list, const double* flops_amount, + const double* bytes_amount, double rate); friend Action* NetworkL07Model::communicate(s4u::Host* src, s4u::Host* dst, double size, double rate); public: - L07Action(kernel::resource::Model* model, int host_nb, sg_host_t* host_list, double* flops_amount, - double* bytes_amount, double rate); + L07Action(kernel::resource::Model* model, const std::vector& host_list, const double* flops_amount, + const double* bytes_amount, double rate); + L07Action(const L07Action&) = delete; + L07Action& operator=(const L07Action&) = delete; ~L07Action(); void updateBound(); std::vector hostList_; - double* computationAmount_; /* pointer to the data that lives in s4u action -- do not free unless if free_arrays */ - double* communicationAmount_; /* pointer to the data that lives in s4u action -- do not free unless if free_arrays */ + const double* computationAmount_; /* pointer to the data that lives in s4u action -- do not free unless if + * free_arrays */ + const double* communicationAmount_; /* pointer to the data that lives in s4u action -- do not free unless if + * free_arrays */ double latency_; double rate_;