A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
start snake_casing resource::Model
[simgrid.git]
/
src
/
kernel
/
resource
/
Model.cpp
diff --git
a/src/kernel/resource/Model.cpp
b/src/kernel/resource/Model.cpp
index
c257fff
..
25a3ee6
100644
(file)
--- a/
src/kernel/resource/Model.cpp
+++ b/
src/kernel/resource/Model.cpp
@@
-31,23
+31,23
@@
Action* Model::actionHeapPop()
return action;
}
return action;
}
-Action::ModifiedSet* Model::get
ModifiedS
et() const
+Action::ModifiedSet* Model::get
_modified_s
et() const
{
return maxmin_system_->modified_set_;
}
{
return maxmin_system_->modified_set_;
}
-double Model::next
OccuringE
vent(double now)
+double Model::next
_occuring_e
vent(double now)
{
// FIXME: set the good function once and for all
if (update_mechanism_ == UM_LAZY)
{
// FIXME: set the good function once and for all
if (update_mechanism_ == UM_LAZY)
- return next
OccuringEventL
azy(now);
+ return next
_occuring_event_l
azy(now);
else if (update_mechanism_ == UM_FULL)
else if (update_mechanism_ == UM_FULL)
- return next
OccuringEventF
ull(now);
+ return next
_occuring_event_f
ull(now);
else
xbt_die("Invalid cpu update mechanism!");
}
else
xbt_die("Invalid cpu update mechanism!");
}
-double Model::next
OccuringEventL
azy(double now)
+double Model::next
_occuring_event_l
azy(double now)
{
XBT_DEBUG("Before share resources, the size of modified actions set is %zu", maxmin_system_->modified_set_->size());
lmm_solve(maxmin_system_);
{
XBT_DEBUG("Before share resources, the size of modified actions set is %zu", maxmin_system_->modified_set_->size());
lmm_solve(maxmin_system_);
@@
-56,7
+56,7
@@
double Model::nextOccuringEventLazy(double now)
while (not maxmin_system_->modified_set_->empty()) {
Action* action = &(maxmin_system_->modified_set_->front());
maxmin_system_->modified_set_->pop_front();
while (not maxmin_system_->modified_set_->empty()) {
Action* action = &(maxmin_system_->modified_set_->front());
maxmin_system_->modified_set_->pop_front();
- bool max_dur_flag = false;
+ bool max_dur
ation
_flag = false;
if (action->get_state_set() != running_action_set_)
continue;
if (action->get_state_set() != running_action_set_)
continue;
@@
-84,7
+84,7
@@
double Model::nextOccuringEventLazy(double now)
(min <= -1 || action->get_start_time() + action->get_max_duration() < min)) {
// when the task will complete anyway because of the deadline if any
min = action->get_start_time() + action->get_max_duration();
(min <= -1 || action->get_start_time() + action->get_max_duration() < min)) {
// when the task will complete anyway because of the deadline if any
min = action->get_start_time() + action->get_max_duration();
- max_dur_flag = true;
+ max_dur
ation
_flag = true;
}
XBT_DEBUG("Action(%p) corresponds to variable %d", action, action->get_variable()->id_int);
}
XBT_DEBUG("Action(%p) corresponds to variable %d", action, action->get_variable()->id_int);
@@
-93,7
+93,7
@@
double Model::nextOccuringEventLazy(double now)
action->get_start_time(), min, share, action->get_max_duration());
if (min > -1) {
action->get_start_time(), min, share, action->get_max_duration());
if (min > -1) {
- action->heapUpdate(min, max_dur_flag ? Action::Type::MAX_DURATION : Action::Type::NORMAL);
+ action->heapUpdate(min, max_dur
ation
_flag ? Action::Type::MAX_DURATION : Action::Type::NORMAL);
XBT_DEBUG("Insert at heap action(%p) min %f now %f", action, min, now);
} else
DIE_IMPOSSIBLE;
XBT_DEBUG("Insert at heap action(%p) min %f now %f", action, min, now);
} else
DIE_IMPOSSIBLE;
@@
-110,13
+110,13
@@
double Model::nextOccuringEventLazy(double now)
}
}
}
}
-double Model::next
OccuringEventF
ull(double /*now*/)
+double Model::next
_occuring_event_f
ull(double /*now*/)
{
maxmin_system_->solve_fun(maxmin_system_);
double min = -1;
{
maxmin_system_->solve_fun(maxmin_system_);
double min = -1;
- for (Action& action : *get
RunningActionS
et()) {
+ for (Action& action : *get
_running_action_s
et()) {
double value = action.get_variable()->get_value();
if (value > 0) {
if (action.get_remains() > 0)
double value = action.get_variable()->get_value();
if (value > 0) {
if (action.get_remains() > 0)
@@
-138,22
+138,22
@@
double Model::nextOccuringEventFull(double /*now*/)
return min;
}
return min;
}
-void Model::update
ActionsS
tate(double now, double delta)
+void Model::update
_actions_s
tate(double now, double delta)
{
if (update_mechanism_ == UM_FULL)
{
if (update_mechanism_ == UM_FULL)
- update
ActionsStateF
ull(now, delta);
+ update
_actions_state_f
ull(now, delta);
else if (update_mechanism_ == UM_LAZY)
else if (update_mechanism_ == UM_LAZY)
- update
ActionsStateL
azy(now, delta);
+ update
_actions_state_l
azy(now, delta);
else
xbt_die("Invalid cpu update mechanism!");
}
else
xbt_die("Invalid cpu update mechanism!");
}
-void Model::update
ActionsStateL
azy(double /*now*/, double /*delta*/)
+void Model::update
_actions_state_l
azy(double /*now*/, double /*delta*/)
{
THROW_UNIMPLEMENTED;
}
{
THROW_UNIMPLEMENTED;
}
-void Model::update
ActionsStateF
ull(double /*now*/, double /*delta*/)
+void Model::update
_actions_state_f
ull(double /*now*/, double /*delta*/)
{
THROW_UNIMPLEMENTED;
}
{
THROW_UNIMPLEMENTED;
}