SimGrid  3.13
Versatile Simulation of Distributed Systems
simgrid::surf::CpuTi Class Reference

#include <cpu_ti.hpp>

Inheritance diagram for simgrid::surf::CpuTi:
simgrid::surf::Cpu simgrid::surf::Resource

Public Member Functions

 CpuTi (CpuTiModel *model, simgrid::s4u::Host *host, xbt_dynar_t speedPerPstate, int core)
 
 ~CpuTi ()
 
void setSpeedTrace (tmgr_trace_t trace) override
 
void apply_event (tmgr_trace_iterator_t event, double value) override
 Apply an event of external load event to that resource. More...
 
void updateActionsFinishTime (double now)
 
void updateRemainingAmount (double now)
 Update the remaining amount of actions. More...
 
bool isUsed () override
 Check if the current Resource is used (if it currently serves an action) More...
 
CpuActionexecution_start (double size) override
 Execute some quantity of computation. More...
 
CpuActionsleep (double duration) override
 Make a process sleep for duration (in seconds) More...
 
double getAvailableSpeed () override
 Get the available speed of the current Cpu. More...
 
void modified (bool modified)
 
- Public Member Functions inherited from simgrid::surf::Cpu
 Cpu (simgrid::surf::Model *model, simgrid::s4u::Host *host, lmm_constraint_t constraint, xbt_dynar_t speedPerPstate, int core)
 Cpu constructor. More...
 
 Cpu (simgrid::surf::Model *model, simgrid::s4u::Host *host, xbt_dynar_t speedPerPstate, int core)
 Cpu constructor. More...
 
 ~Cpu ()
 
virtual int getCore ()
 Get the amount of cores. More...
 
virtual double getSpeed (double load)
 Get the speed, accounting for the trace load and provided process load instead of the real current one. More...
 
virtual double getCurrentPowerPeak ()
 Get the current Cpu power peak. More...
 
virtual double getPowerPeakAt (int pstate_index)
 
virtual int getNbPStates ()
 
virtual void setPState (int pstate_index)
 
virtual int getPState ()
 
simgrid::s4u::Host * getHost ()
 
virtual void setStateTrace (tmgr_trace_t trace)
 
- Public Member Functions inherited from simgrid::surf::Resource
 Resource (Model *model, const char *name)
 Constructor of non-LMM Resources. More...
 
 Resource (Model *model, const char *name, lmm_constraint_t constraint)
 Constructor of LMM Resources. More...
 
virtual ~Resource ()
 
ModelgetModel () const
 Get the Model of the current Resource. More...
 
const char * getName () const
 Get the name of the current Resource. More...
 
bool operator== (const Resource &other) const
 
virtual bool isOn () const
 Check if the current Resource is active. More...
 
virtual bool isOff () const
 Check if the current Resource is shut down. More...
 
virtual void turnOn ()
 Turn on the current Resource. More...
 
virtual void turnOff ()
 Turn off the current Resource. More...
 
lmm_constraint_t getConstraint () const
 Get the lmm constraint associated to this Resource if it is part of a LMM component (or null if none) More...
 

Public Attributes

CpuTiTgmrspeedIntegratedTrace_ = NULL
 
ActionTiListactionSet_ = NULL
 
double sumPriority_ = 0
 
double lastUpdate_ = 0
 
double currentFrequency_
 
boost::intrusive::list_member_hook cpu_ti_hook
 
- Public Attributes inherited from simgrid::surf::Cpu
int coresAmount_ = 1
 
simgrid::s4u::Host * host_
 
xbt_dynar_t speedPerPstate_ = NULL
 
int pstate_ = 0
 
lmm_constraint_tp_constraintCore =NULL
 
void ** p_constraintCoreId =NULL
 
tmgr_trace_iterator_t stateEvent_ = nullptr
 
s_surf_metric_t speed_ = {1.0, 0, nullptr}
 

Additional Inherited Members

- Protected Member Functions inherited from simgrid::surf::Cpu
virtual void onSpeedChange ()
 Take speed changes (either load or max) into account. More...
 
- Protected Attributes inherited from simgrid::surf::Resource
lmm_constraint_t constraint_ = nullptr
 

Constructor & Destructor Documentation

simgrid::surf::CpuTi::CpuTi ( CpuTiModel model,
simgrid::s4u::Host *  host,
xbt_dynar_t  speedPerPstate,
int  core 
)
simgrid::surf::CpuTi::~CpuTi ( )

Member Function Documentation

void simgrid::surf::CpuTi::setSpeedTrace ( tmgr_trace_t  trace)
overridevirtual

Reimplemented from simgrid::surf::Cpu.

void simgrid::surf::CpuTi::apply_event ( tmgr_trace_iterator_t  event,
double  value 
)
overridevirtual

Apply an event of external load event to that resource.

Parameters
eventWhat happened
value[TODO]

Implements simgrid::surf::Resource.

void simgrid::surf::CpuTi::updateActionsFinishTime ( double  now)
void simgrid::surf::CpuTi::updateRemainingAmount ( double  now)

Update the remaining amount of actions.

bool simgrid::surf::CpuTi::isUsed ( )
overridevirtual

Check if the current Resource is used (if it currently serves an action)

Implements simgrid::surf::Resource.

CpuAction * simgrid::surf::CpuTi::execution_start ( double  size)
overridevirtual

Execute some quantity of computation.

Parameters
sizeThe value of the processing amount (in flop) needed to process
Returns
The CpuAction corresponding to the processing

Implements simgrid::surf::Cpu.

CpuAction * simgrid::surf::CpuTi::sleep ( double  duration)
overridevirtual

Make a process sleep for duration (in seconds)

Parameters
durationThe number of seconds to sleep
Returns
The CpuAction corresponding to the sleeping

Implements simgrid::surf::Cpu.

double simgrid::surf::CpuTi::getAvailableSpeed ( )
overridevirtual

Get the available speed of the current Cpu.

Reimplemented from simgrid::surf::Cpu.

void simgrid::surf::CpuTi::modified ( bool  modified)

Member Data Documentation

CpuTiTgmr* simgrid::surf::CpuTi::speedIntegratedTrace_ = NULL
ActionTiList* simgrid::surf::CpuTi::actionSet_ = NULL
double simgrid::surf::CpuTi::sumPriority_ = 0
double simgrid::surf::CpuTi::lastUpdate_ = 0
double simgrid::surf::CpuTi::currentFrequency_
boost::intrusive::list_member_hook simgrid::surf::CpuTi::cpu_ti_hook

The documentation for this class was generated from the following files: