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
further snake_casing in resource::Action
[simgrid.git]
/
src
/
kernel
/
resource
/
Action.cpp
diff --git
a/src/kernel/resource/Action.cpp
b/src/kernel/resource/Action.cpp
index
3fd917c
..
99e9ddf
100644
(file)
--- a/
src/kernel/resource/Action.cpp
+++ b/
src/kernel/resource/Action.cpp
@@
-34,8
+34,8
@@
Action::~Action()
{
if (state_set_hook_.is_linked())
simgrid::xbt::intrusive_erase(*state_set_, *this);
- if (get
V
ariable())
- get_model()->getMaxminSystem()->variable_free(get
V
ariable());
+ if (get
_v
ariable())
+ get_model()->getMaxminSystem()->variable_free(get
_v
ariable());
if (get_model()->getUpdateMechanism() == UM_LAZY) {
/* remove from heap */
heapRemove(get_model()->getActionHeap());
@@
-101,7
+101,7
@@
void Action::set_bound(double bound)
if (variable_)
get_model()->getMaxminSystem()->update_variable_bound(variable_, bound);
- if (get_model()->getUpdateMechanism() == UM_LAZY && get
LastU
pdate() != surf_get_clock())
+ if (get_model()->getUpdateMechanism() == UM_LAZY && get
_last_u
pdate() != surf_get_clock())
heapRemove(get_model()->getActionHeap());
XBT_OUT();
}
@@
-127,7
+127,7
@@
void Action::set_priority(double weight)
{
XBT_IN("(%p,%g)", this, weight);
sharing_priority_ = weight;
- get_model()->getMaxminSystem()->update_variable_weight(get
V
ariable(), weight);
+ get_model()->getMaxminSystem()->update_variable_weight(get
_v
ariable(), weight);
if (get_model()->getUpdateMechanism() == UM_LAZY)
heapRemove(get_model()->getActionHeap());
@@
-158,7
+158,7
@@
void Action::suspend()
{
XBT_IN("(%p)", this);
if (suspended_ != SuspendStates::sleeping) {
- get_model()->getMaxminSystem()->update_variable_weight(get
V
ariable(), 0.0);
+ get_model()->getMaxminSystem()->update_variable_weight(get
_v
ariable(), 0.0);
if (get_model()->getUpdateMechanism() == UM_LAZY) {
heapRemove(get_model()->getActionHeap());
if (get_model()->getUpdateMechanism() == UM_LAZY && state_set_ == get_model()->getRunningActionSet() &&
@@
-176,7
+176,7
@@
void Action::resume()
{
XBT_IN("(%p)", this);
if (suspended_ != SuspendStates::sleeping) {
- get_model()->getMaxminSystem()->update_variable_weight(get
V
ariable(), get_priority());
+ get_model()->getMaxminSystem()->update_variable_weight(get
_v
ariable(), get_priority());
suspended_ = SuspendStates::not_suspended;
if (get_model()->getUpdateMechanism() == UM_LAZY)
heapRemove(get_model()->getActionHeap());
@@
-198,14
+198,14
@@
bool Action::is_suspended()
void Action::heapInsert(heap_type& heap, double key, Action::Type hat)
{
type_ = hat;
- heap_h
andle_
= heap.emplace(std::make_pair(key, this));
+ heap_h
ook_
= heap.emplace(std::make_pair(key, this));
}
void Action::heapRemove(heap_type& heap)
{
type_ = Action::Type::NOTSET;
- if (heap_h
andle
_) {
- heap.erase(*heap_h
andle
_);
+ if (heap_h
ook
_) {
+ heap.erase(*heap_h
ook
_);
clearHeapHandle();
}
}
@@
-213,10
+213,10
@@
void Action::heapRemove(heap_type& heap)
void Action::heapUpdate(heap_type& heap, double key, Action::Type hat)
{
type_ = hat;
- if (heap_h
andle
_) {
- heap.update(*heap_h
andle
_, std::make_pair(key, this));
+ if (heap_h
ook
_) {
+ heap.update(*heap_h
ook
_, std::make_pair(key, this));
} else {
- heap_h
andle
_ = heap.emplace(std::make_pair(key, this));
+ heap_h
ook
_ = heap.emplace(std::make_pair(key, this));
}
}
@@
-239,7
+239,7
@@
void Action::update_remains(double delta)
double_update(&remains_, delta, sg_maxmin_precision * sg_surf_precision);
}
-void Action::
refreshLastU
pdate()
+void Action::
set_last_u
pdate()
{
last_update_ = surf_get_clock();
}