X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cdf6a962eb4e88efbed3df9c41343adabcf09e6c..dd0a1723b46a215a7b8e1eff8ce77cc603e9d601:/src/surf/cpu_ti.hpp?ds=sidebyside diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index 7ad6573b60..4ce90e2881 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2013-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2013-2020. 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. */ @@ -27,7 +27,7 @@ class XBT_PRIVATE CpuTi; *********/ class CpuTiProfile { public: - explicit CpuTiProfile(profile::Profile* profile); + explicit CpuTiProfile(const profile::Profile* profile); double integrate_simple(double a, double b); double integrate_simple_point(double a); @@ -45,7 +45,7 @@ class CpuTiTmgr { }; public: - explicit CpuTiTmgr(double value) : type_(Type::FIXED), value_(value){}; + explicit CpuTiTmgr(double value) : value_(value){}; CpuTiTmgr(profile::Profile* speed_profile, double value); CpuTiTmgr(const CpuTiTmgr&) = delete; CpuTiTmgr& operator=(const CpuTiTmgr&) = delete; @@ -55,12 +55,12 @@ public: double get_power_scale(double a); private: - Type type_; + Type type_ = Type::FIXED; double value_; /*< Percentage of cpu speed available. Value fixed between 0 and 1 */ /* Dynamic */ double last_time_ = 0.0; /*< Integral interval last point (discrete time) */ - double total_ = 0.0; /*< Integral total between 0 and last_pointn */ + double total_ = 0.0; /*< Integral total between 0 and last point */ std::unique_ptr profile_ = nullptr; profile::Profile* speed_profile_ = nullptr; @@ -145,7 +145,7 @@ public: CpuTiModel& operator=(const CpuTiModel&) = delete; ~CpuTiModel() override; Cpu* create_cpu(s4u::Host* host, const std::vector& speed_per_pstate, int core) override; - double next_occuring_event(double now) override; + double next_occurring_event(double now) override; void update_actions_state(double now, double delta) override; CpuTiList modified_cpus_;