SimGrid  3.14.159
Versatile Simulation of Distributed Systems
simgrid::surf::CpuTiAction Class Reference

#include <cpu_ti.hpp>

Inheritance diagram for simgrid::surf::CpuTiAction:
simgrid::surf::CpuAction simgrid::surf::Action

Public Member Functions

 CpuTiAction (CpuTiModel *model, double cost, bool failed, CpuTi *cpu)
 
void setState (simgrid::surf::Action::State state) override
 Set the state of the current Action. More...
 
int unref () override
 Unref that action (and destroy it if refcount reaches 0) More...
 
void cancel () override
 Cancel the current Action if running. More...
 
void updateIndexHeap (int i)
 
void suspend () override
 Suspend the current Action. More...
 
void resume () override
 Resume the current Action. More...
 
void setMaxDuration (double duration) override
 Set the maximum duration of the current Action. More...
 
void setPriority (double priority) override
 Set the priority of the current Action. More...
 
double getRemains () override
 Get the remaining time of the current action after updating the resource. More...
 
- Public Member Functions inherited from simgrid::surf::CpuAction
 CpuAction (simgrid::surf::Model *model, double cost, bool failed)
 
 CpuAction (simgrid::surf::Model *model, double cost, bool failed, lmm_variable_t var)
 
void updateRemainingLazy (double now) override
 
std::list< Cpu * > cpus ()
 
- Public Member Functions inherited from simgrid::surf::Action
 Action (simgrid::surf::Model *model, double cost, bool failed)
 Action constructor. More...
 
 Action (simgrid::surf::Model *model, double cost, bool failed, lmm_variable_t var)
 Action constructor. More...
 
virtual ~Action ()
 Destructor. More...
 
void finish ()
 Mark that the action is now finished. More...
 
Action::State getState ()
 Get the state of the current Action. More...
 
double getBound ()
 Get the bound of the current Action. More...
 
void setBound (double bound)
 Set the bound of the current Action. More...
 
double getStartTime ()
 Get the start time of the current action. More...
 
double getFinishTime ()
 Get the finish time of the current action. More...
 
voidgetData ()
 Get the user data associated to the current action. More...
 
void setData (void *data)
 Set the user data associated to the current action. More...
 
double getCost ()
 Get the cost of the current action. More...
 
void setCost (double cost)
 Set the cost of the current action. More...
 
void updateMaxDuration (double delta)
 Update the maximum duration of the current action. More...
 
void updateRemains (double delta)
 Update the remaining time of the current action. More...
 
void setRemains (double value)
 Set the remaining time of the current action. More...
 
double getRemainsNoUpdate ()
 Get the remaining time of the current action without updating the resource. More...
 
void setFinishTime (double value)
 Set the finish time of the current action. More...
 
void ref ()
 Add a reference to the current action (refcounting) More...
 
virtual bool isSuspended ()
 Returns true if the current action is running. More...
 
double getMaxDuration ()
 Get the maximum duration of the current action. More...
 
char * getCategory ()
 Get the tracing category associated to the current action. More...
 
void setCategory (const char *category)
 Set the tracing category of the current Action. More...
 
double getPriority ()
 Get the priority of the current Action. More...
 
ActionListgetStateSet ()
 Get the state set in which the action is. More...
 
simgrid::surf::ModelgetModel ()
 
void heapInsert (xbt_heap_t heap, double key, enum heap_action_type hat)
 
void heapRemove (xbt_heap_t heap)
 
void heapUpdate (xbt_heap_t heap, double key, enum heap_action_type hat)
 
void updateIndexHeap (int i)
 
lmm_variable_t getVariable ()
 
double getLastUpdate ()
 
void refreshLastUpdate ()
 
enum heap_action_type getHat ()
 
bool is_linked ()
 
void gapRemove ()
 

Public Attributes

CpuTicpu_
 
int indexHeap_ = -1
 
int suspended_ = 0
 
boost::intrusive::list_member_hook action_ti_hook
 
- Public Attributes inherited from simgrid::surf::Action
boost::intrusive::list_member_hook action_hook
 
boost::intrusive::list_member_hook action_lmm_hook
 
s_xbt_swag_hookup_t stateHookup_ = {nullptr,nullptr}
 

Additional Inherited Members

- Public Types inherited from simgrid::surf::Action
enum  State {
  State::ready = 0, State::running, State::failed, State::done,
  State::to_free, State::not_in_the_system
}
 
typedef boost::intrusive::member_hook< Action, boost::intrusive::list_member_hook<>, &Action::action_hookActionOptions
 
typedef boost::intrusive::list< Action, ActionOptionsActionList
 
- Static Public Attributes inherited from simgrid::surf::CpuAction
static simgrid::xbt::signal< void(simgrid::surf::CpuAction *, simgrid::surf::Action::State)> onStateChange
 Signal emitted when the action state changes (ready/running/done, etc) Signature: void(CpuAction *action, simgrid::surf::Action::State previous) More...
 
static simgrid::xbt::signal< void(simgrid::surf::CpuAction *)> onShareChange
 Signal emitted when the action share changes (amount of flops it gets) Signature: void(CpuAction *action) More...
 
- Protected Attributes inherited from simgrid::surf::Action
ActionListstateSet_
 
double priority_ = 1.0
 priority (1.0 by default) More...
 
int refcount_ = 1
 
double remains_
 How much of that cost remains to be done in the currently running task. More...
 
double maxDuration_ = NO_MAX_DURATION
 
double finishTime_ = -1
 finish time : this is modified during the run and fluctuates until the task is completed More...
 
lmm_variable_t variable_ = nullptr
 
double lastValue_ = 0
 
double lastUpdate_ = 0
 
int suspended_ = 0
 
int indexHeap_
 
enum heap_action_type hat_ = NOTSET
 

Constructor & Destructor Documentation

◆ CpuTiAction()

simgrid::surf::CpuTiAction::CpuTiAction ( CpuTiModel model,
double  cost,
bool  failed,
CpuTi cpu 
)

Member Function Documentation

◆ setState()

void simgrid::surf::CpuTiAction::setState ( simgrid::surf::Action::State  state)
overridevirtual

Set the state of the current Action.

Reimplemented from simgrid::surf::CpuAction.

◆ unref()

int simgrid::surf::CpuTiAction::unref ( )
overridevirtual

Unref that action (and destroy it if refcount reaches 0)

Returns
true if the action was destroyed and false if someone still has references on it

Reimplemented from simgrid::surf::Action.

◆ cancel()

void simgrid::surf::CpuTiAction::cancel ( )
overridevirtual

Cancel the current Action if running.

Reimplemented from simgrid::surf::Action.

◆ updateIndexHeap()

void simgrid::surf::CpuTiAction::updateIndexHeap ( int  i)

◆ suspend()

void simgrid::surf::CpuTiAction::suspend ( )
overridevirtual

Suspend the current Action.

Reimplemented from simgrid::surf::Action.

◆ resume()

void simgrid::surf::CpuTiAction::resume ( )
overridevirtual

Resume the current Action.

Reimplemented from simgrid::surf::Action.

◆ setMaxDuration()

void simgrid::surf::CpuTiAction::setMaxDuration ( double  duration)
overridevirtual

Set the maximum duration of the current Action.

Reimplemented from simgrid::surf::Action.

◆ setPriority()

void simgrid::surf::CpuTiAction::setPriority ( double  priority)
overridevirtual

Set the priority of the current Action.

Reimplemented from simgrid::surf::Action.

◆ getRemains()

double simgrid::surf::CpuTiAction::getRemains ( )
overridevirtual

Get the remaining time of the current action after updating the resource.

Reimplemented from simgrid::surf::Action.

Member Data Documentation

◆ cpu_

CpuTi* simgrid::surf::CpuTiAction::cpu_

◆ indexHeap_

int simgrid::surf::CpuTiAction::indexHeap_ = -1

◆ suspended_

int simgrid::surf::CpuTiAction::suspended_ = 0

◆ action_ti_hook

boost::intrusive::list_member_hook simgrid::surf::CpuTiAction::action_ti_hook

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