+ * @param speed_per_pstate Processor speed (in flop per second) for each pstate
+ */
+ CpuImpl(s4u::Host* host, const std::vector<double>& speed_per_pstate);
+
+ CpuImpl(const CpuImpl&) = delete;
+ CpuImpl& operator=(const CpuImpl&) = delete;
+
+ /** @brief Public interface */
+ s4u::Host* get_iface() { return piface_; }
+
+ CpuImpl* set_core_count(int core_count);
+ virtual int get_core_count();
+
+ void seal() override;
+
+ /** @brief Get a forecast of the speed (in flops/s) if the load were as provided.
+ *
+ * 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(unsigned long pstate_index) const;
+
+ virtual unsigned long get_pstate_count() const { return speed_per_pstate_.size(); }
+
+ virtual unsigned long get_pstate() const { return pstate_; }
+ virtual CpuImpl* set_pstate(unsigned long 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)