- * @param model The CpuModel associated to this Cpu
- * @param host The host in which this Cpu should be plugged
- * @param speedPerPstate Processor speed (in flop per second) for each pstate
- * @param core The number of core of this Cpu
+ * The provided load should encompasses both the application's activities and the external load that come from a
+ * trace.
+ *
+ * Use a load of 1.0 to compute the amount of flops that the Cpu would deliver with one CPU-bound task.
+ * If you use a load of 0, this function will return 0: when nobody is using the Cpu, it delivers nothing.
+ *
+ * If you want to know the amount of flops currently delivered, use load = get_load()*get_speed_ratio()
+ */
+ virtual double get_speed(double load) const { return load * speed_.peak; }
+
+ /** @brief Get the available speed ratio, in [0:1]. This accounts for external load (see @ref set_speed_profile()). */
+ virtual double get_speed_ratio() { return speed_.scale; }
+
+ /** @brief Get the peak processor speed (in flops/s), at the specified pstate */
+ virtual double get_pstate_peak_speed(int pstate_index) const;
+
+ virtual int get_pstate_count() const { return speed_per_pstate_.size(); }
+
+ virtual int get_pstate() const { return pstate_; }
+ virtual CpuImpl* set_pstate(int pstate_index);
+
+ /*< @brief Setup the profile file with availability events (peak speed changes due to external load).
+ * Profile must contain relative values (ratio between 0 and 1)