/* 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. */
/* 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. */
- explicit CpuTiTrace(tmgr_trace_t speedTrace);
- CpuTiTrace(const CpuTiTrace&) = delete;
- CpuTiTrace& operator=(const CpuTiTrace&) = delete;
- ~CpuTiTrace();
+ explicit CpuTiProfile(kernel::profile::Profile* profile);
+ CpuTiProfile(const CpuTiProfile&) = delete;
+ CpuTiProfile& operator=(const CpuTiProfile&) = delete;
+ ~CpuTiProfile();
double integrate_simple(double a, double b);
double integrate_simple_point(double a);
double integrate_simple(double a, double b);
double integrate_simple_point(double a);
int binary_search(double* array, double a, int low, int high);
};
int binary_search(double* array, double a, int low, int high);
};
- CpuTiTmgr(trace_type type, double value) : type_(type), value_(value){};
- CpuTiTmgr(tmgr_trace_t speedTrace, double value);
+ explicit CpuTiTmgr(double value) : type_(Type::FIXED), value_(value){};
+ CpuTiTmgr(kernel::profile::Profile* speed_profile, double value);
double solve(double a, double amount);
double get_power_scale(double a);
double solve(double a, double amount);
double get_power_scale(double a);
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 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 */
class CpuTi : public Cpu {
public:
CpuTi(CpuTiModel* model, simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core);
class CpuTi : public Cpu {
public:
CpuTi(CpuTiModel* model, simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core);
void update_actions_finish_time(double now);
void update_remaining_amount(double now);
bool is_used() override;
CpuAction *execution_start(double size) override;
void update_actions_finish_time(double now);
void update_remaining_amount(double now);
bool is_used() override;
CpuAction *execution_start(double size) override;
- CpuTiModel() : CpuModel(Model::UpdateAlgo::Full){};
+ static void create_pm_vm_models(); // Make both models be TI models
+
+ CpuTiModel();
+ CpuTiModel(const CpuTiModel&) = delete;
+ CpuTiModel& operator=(const CpuTiModel&) = delete;
- Cpu* createCpu(simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core) override;
+ Cpu* create_cpu(simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core) override;
double next_occuring_event(double now) override;
void update_actions_state(double now, double delta) override;
double next_occuring_event(double now) override;
void update_actions_state(double now, double delta) override;