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
make Model::update_algo a constant field, set at initialization only
[simgrid.git]
/
src
/
kernel
/
resource
/
Model.cpp
diff --git
a/src/kernel/resource/Model.cpp
b/src/kernel/resource/Model.cpp
index
e463d99
..
ee43169
100644
(file)
--- a/
src/kernel/resource/Model.cpp
+++ b/
src/kernel/resource/Model.cpp
@@
-12,8
+12,7
@@
namespace simgrid {
namespace kernel {
namespace resource {
namespace kernel {
namespace resource {
-Model::Model() = default;
-Model::Model(Model::UpdateAlgo algo) : update_mechanism_(algo) {}
+Model::Model(Model::UpdateAlgo algo) : update_algorithm_(algo) {}
Model::~Model()
{
Model::~Model()
{
@@
-40,9
+39,9
@@
Action::ModifiedSet* Model::get_modified_set() const
double Model::next_occuring_event(double now)
{
// FIXME: set the good function once and for all
double Model::next_occuring_event(double now)
{
// FIXME: set the good function once and for all
- if (update_
mechanis
m_ == Model::UpdateAlgo::Lazy)
+ if (update_
algorith
m_ == Model::UpdateAlgo::Lazy)
return next_occuring_event_lazy(now);
return next_occuring_event_lazy(now);
- else if (update_
mechanis
m_ == Model::UpdateAlgo::Full)
+ else if (update_
algorith
m_ == Model::UpdateAlgo::Full)
return next_occuring_event_full(now);
else
xbt_die("Invalid cpu update mechanism!");
return next_occuring_event_full(now);
else
xbt_die("Invalid cpu update mechanism!");
@@
-141,9
+140,9
@@
double Model::next_occuring_event_full(double /*now*/)
void Model::update_actions_state(double now, double delta)
{
void Model::update_actions_state(double now, double delta)
{
- if (update_
mechanis
m_ == Model::UpdateAlgo::Full)
+ if (update_
algorith
m_ == Model::UpdateAlgo::Full)
update_actions_state_full(now, delta);
update_actions_state_full(now, delta);
- else if (update_
mechanis
m_ == Model::UpdateAlgo::Lazy)
+ else if (update_
algorith
m_ == Model::UpdateAlgo::Lazy)
update_actions_state_lazy(now, delta);
else
xbt_die("Invalid cpu update mechanism!");
update_actions_state_lazy(now, delta);
else
xbt_die("Invalid cpu update mechanism!");