X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ebd85a35bf79b36fecadb1ccd526f6fb73a3ad7a..51f7d61cb232ea7e32eebd6fb0e0a11ca7f5b391:/src/surf/cpu_ti.hpp diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index 4d6cd178bd..122122e00f 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -25,15 +25,18 @@ class XBT_PRIVATE CpuTi; * Trace * *********/ class CpuTiProfile { + std::vector time_points_; + std::vector integral_; + public: explicit CpuTiProfile(const profile::Profile* profile); + const std::vector& get_time_points() const { return time_points_; } + double integrate_simple(double a, double b) const; double integrate_simple_point(double a) const; double solve_simple(double a, double amount) const; - std::vector time_points_; - std::vector integral_; static long binary_search(const std::vector& array, double a); }; @@ -42,6 +45,15 @@ class CpuTiTmgr { FIXED, /*< Trace fixed, no availability file */ DYNAMIC /*< Dynamic, have an availability file */ }; + 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 point */ + + std::unique_ptr profile_ = nullptr; + profile::Profile* speed_profile_ = nullptr; public: explicit CpuTiTmgr(double value) : value_(value){}; @@ -52,17 +64,6 @@ public: double integrate(double a, double b) const; double solve(double a, double amount) const; double get_power_scale(double a) const; - -private: - 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 point */ - - std::unique_ptr profile_ = nullptr; - profile::Profile* speed_profile_ = nullptr; }; /**********