/* Epsilon */
#define EPSILON 0.000000001
+namespace simgrid {
+namespace surf {
+
/***********
* Classes *
***********/
CpuTi *p_cpu;
int m_indexHeap;
- int m_suspended;
+ int m_suspended = 0;
public:
boost::intrusive::list_member_hook<> action_ti_hook;
};
************/
class CpuTi : public Cpu {
public:
- CpuTi() {};
- CpuTi(CpuTiModel *model, const char *name, xbt_dynar_t speedPeak,
+ CpuTi(CpuTiModel *model, simgrid::Host *host, xbt_dynar_t speedPeak,
int pstate, double speedScale, tmgr_trace_t speedTrace, int core,
- e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace,
- xbt_dict_t properties) ;
+ e_surf_resource_state_t stateInitial, tmgr_trace_t stateTrace) ;
~CpuTi();
void updateState(tmgr_trace_event_t event_type, double value, double date);
CpuAction *sleep(double duration);
double getAvailableSpeed();
- double getCurrentPowerPeak() {THROW_UNIMPLEMENTED;};
- double getPowerPeakAt(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
- int getNbPstates() {THROW_UNIMPLEMENTED;};
- void setPstate(int /*pstate_index*/) {THROW_UNIMPLEMENTED;};
- int getPstate() { THROW_UNIMPLEMENTED;}
void modified(bool modified);
CpuTiTgmr *p_availTrace; /*< Structure with data needed to integrate trace file */
public:
CpuTiModel();
~CpuTiModel();
- Cpu *createCpu(const char *name, xbt_dynar_t speedPeak,
+ Cpu *createCpu(simgrid::Host *host, xbt_dynar_t speedPeak,
int pstate, double speedScale,
tmgr_trace_t speedTrace, int core,
e_surf_resource_state_t state_initial,
- tmgr_trace_t state_trace,
- xbt_dict_t cpu_properties);
+ tmgr_trace_t state_trace);
double shareResources(double now);
void updateActionsState(double now, double delta);
void addTraces();
xbt_heap_t p_tiActionHeap;
protected:
- void NotifyResourceTurnedOn(Resource*){};
- void NotifyResourceTurnedOff(Resource*){};
+ void NotifyResourceTurnedOn(simgrid::surf::Resource*){};
+ void NotifyResourceTurnedOff(simgrid::surf::Resource*){};
void NotifyActionCancel(Action*){};
void NotifyActionResume(Action*){};
void NotifyActionSuspend(Action*){};
};
+
+}
+}