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
/
surf
/
network_cm02.cpp
diff --git
a/src/surf/network_cm02.cpp
b/src/surf/network_cm02.cpp
index
41a9f4b
..
aa9df6d
100644
(file)
--- a/
src/surf/network_cm02.cpp
+++ b/
src/surf/network_cm02.cpp
@@
-134,20
+134,17
@@
void surf_network_model_init_Vegas()
namespace simgrid {
namespace surf {
namespace simgrid {
namespace surf {
-NetworkCm02Model::NetworkCm02Model(kernel::lmm::System* (*make_new_lmm_system)(bool)) : NetworkModel()
+NetworkCm02Model::NetworkCm02Model(kernel::lmm::System* (*make_new_lmm_system)(bool))
+ : NetworkModel(xbt_cfg_get_string("network/optim") == "Full" ? kernel::resource::Model::UpdateAlgo::Full
+ : kernel::resource::Model::UpdateAlgo::Lazy)
{
std::string optim = xbt_cfg_get_string("network/optim");
bool select = xbt_cfg_get_boolean("network/maxmin-selective-update");
{
std::string optim = xbt_cfg_get_string("network/optim");
bool select = xbt_cfg_get_boolean("network/maxmin-selective-update");
- if (optim == "Full") {
- setUpdateMechanism(kernel::resource::Model::UpdateAlgo::Full);
- } else if (optim == "Lazy") {
+ if (optim == "Lazy") {
xbt_assert(select || xbt_cfg_is_default_value("network/maxmin-selective-update"),
"You cannot disable network selective update when using the lazy update mechanism");
select = true;
xbt_assert(select || xbt_cfg_is_default_value("network/maxmin-selective-update"),
"You cannot disable network selective update when using the lazy update mechanism");
select = true;
- setUpdateMechanism(kernel::resource::Model::UpdateAlgo::Lazy);
- } else {
- xbt_die("Unsupported optimization (%s) for this model. Accepted: Full, Lazy.", optim.c_str());
}
set_maxmin_system(make_new_lmm_system(select));
}
set_maxmin_system(make_new_lmm_system(select));