const kernel::lmm::Element* elem = nullptr;
get_model()->get_maxmin_system()->update_constraint_bound(get_constraint(),
- cores_count_ * speed_.scale * speed_.peak);
+ get_cores_count() * speed_.scale * speed_.peak);
while ((var = get_constraint()->get_variable(&elem))) {
CpuCas01Action* action = static_cast<CpuCas01Action*>(var->get_id());
{
if (event == speed_.event) {
/* TODO (Hypervisor): do the same thing for constraint_core[i] */
- xbt_assert(cores_count_ == 1, "FIXME: add speed scaling code also for constraint_core[i]");
+ xbt_assert(get_cores_count() == 1, "FIXME: add speed scaling code also for constraint_core[i]");
speed_.scale = value;
onSpeedChange();
tmgr_trace_event_unref(&speed_.event);
} else if (event == state_event_) {
/* TODO (Hypervisor): do the same thing for constraint_core[i] */
- xbt_assert(cores_count_ == 1, "FIXME: add state change code also for constraint_core[i]");
+ xbt_assert(get_cores_count() == 1, "FIXME: add state change code also for constraint_core[i]");
if (value > 0) {
if (is_off())
simgrid::s4u::Host* get_host() { return host_; }
+private:
int cores_count_ = 1;
simgrid::s4u::Host* host_;
- std::vector<double> speed_per_pstate_; /*< List of supported CPU capacities (pstate related) */
int pstate_ = 0; /*< Current pstate (index in the speedPeakList)*/
+protected:
+ std::vector<double> speed_per_pstate_; /*< List of supported CPU capacities (pstate related) */
+public:
virtual void setStateTrace(tmgr_trace_t trace); /*< setup the trace file with states events (ON or OFF). Trace must contain boolean values (0 or 1). */
virtual void
set_speed_trace(tmgr_trace_t trace); /*< setup the trace file with availability events (peak speed changes due to