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
fix SimGrid-FMI
[simgrid.git]
/
src
/
kernel
/
resource
/
Model.cpp
diff --git
a/src/kernel/resource/Model.cpp
b/src/kernel/resource/Model.cpp
index
635f0b9
..
956cb32
100644
(file)
--- a/
src/kernel/resource/Model.cpp
+++ b/
src/kernel/resource/Model.cpp
@@
-13,7
+13,7
@@
namespace kernel {
namespace resource {
Model::Model(Model::UpdateAlgo algo) : update_algorithm_(algo) {}
namespace resource {
Model::Model(Model::UpdateAlgo algo) : update_algorithm_(algo) {}
-Model::~Model() = default;
+Model::~Model() = default;
// Don't move this declaration to the header, or it will break external projects such as SimGrid-FMI
Action::ModifiedSet* Model::get_modified_set() const
{
Action::ModifiedSet* Model::get_modified_set() const
{
@@
-26,18
+26,18
@@
void Model::set_maxmin_system(lmm::System* system)
maxmin_system_.reset(system);
}
maxmin_system_.reset(system);
}
-double Model::next_occuring_event(double now)
+double Model::next_occur
r
ing_event(double now)
{
// FIXME: set the good function once and for all
if (update_algorithm_ == Model::UpdateAlgo::LAZY)
{
// FIXME: set the good function once and for all
if (update_algorithm_ == Model::UpdateAlgo::LAZY)
- return next_occuring_event_lazy(now);
+ return next_occur
r
ing_event_lazy(now);
else if (update_algorithm_ == Model::UpdateAlgo::FULL)
else if (update_algorithm_ == Model::UpdateAlgo::FULL)
- return next_occuring_event_full(now);
+ return next_occur
r
ing_event_full(now);
else
xbt_die("Invalid cpu update mechanism!");
}
else
xbt_die("Invalid cpu update mechanism!");
}
-double Model::next_occuring_event_lazy(double now)
+double Model::next_occur
r
ing_event_lazy(double now)
{
XBT_DEBUG("Before share resources, the size of modified actions set is %zu", maxmin_system_->modified_set_->size());
maxmin_system_->lmm_solve();
{
XBT_DEBUG("Before share resources, the size of modified actions set is %zu", maxmin_system_->modified_set_->size());
maxmin_system_->lmm_solve();
@@
-52,7
+52,7
@@
double Model::next_occuring_event_lazy(double now)
continue;
/* bogus priority, skip it */
continue;
/* bogus priority, skip it */
- if (action->get_
priori
ty() <= 0 || action->get_type() == ActionHeap::Type::latency)
+ if (action->get_
sharing_penal
ty() <= 0 || action->get_type() == ActionHeap::Type::latency)
continue;
action->update_remains_lazy(now);
continue;
action->update_remains_lazy(now);
@@
-100,7
+100,7
@@
double Model::next_occuring_event_lazy(double now)
}
}
}
}
-double Model::next_occuring_event_full(double /*now*/)
+double Model::next_occur
r
ing_event_full(double /*now*/)
{
maxmin_system_->solve();
{
maxmin_system_->solve();
@@
-143,7
+143,7
@@
Action* Model::extract_action(Action::StateSet* list)
{
if (list->empty())
return nullptr;
{
if (list->empty())
return nullptr;
-
simgrid::kernel::resource::
Action* res = &list->front();
+ Action* res = &list->front();
list->pop_front();
return res;
}
list->pop_front();
return res;
}
@@
-170,6
+170,6
@@
void Model::update_actions_state_full(double /*now*/, double /*delta*/)
THROW_UNIMPLEMENTED;
}
THROW_UNIMPLEMENTED;
}
-} // namespace
surf
+} // namespace
resource
} // namespace kernel
} // namespace simgrid
} // namespace kernel
} // namespace simgrid