X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/79ef316bb2a1188e46d1a7984e3b868dac416b75..93bc0226e3b100b84273204a75a5bbd203ebc880:/src/surf/cpu_cas01.c diff --git a/src/surf/cpu_cas01.c b/src/surf/cpu_cas01.c index 8c18d28c86..dcc738c293 100644 --- a/src/surf/cpu_cas01.c +++ b/src/surf/cpu_cas01.c @@ -667,19 +667,14 @@ static void surf_cpu_model_init_internal(const char* name) surf_cpu_model->model_private->resource_used = cpu_resource_used; - if(cpu_update_mechanism == UM_LAZY) + if(cpu_update_mechanism == UM_LAZY) { surf_cpu_model->model_private->share_resources = cpu_share_resources_lazy; - else if (cpu_update_mechanism == UM_FULL) - surf_cpu_model->model_private->share_resources = cpu_share_resources_full; - else - xbt_die("Invalide update mechanism!"); - - if(cpu_update_mechanism == UM_LAZY) surf_cpu_model->model_private->update_actions_state = cpu_update_actions_state_lazy; - else if(cpu_update_mechanism == UM_FULL) + } else if (cpu_update_mechanism == UM_FULL) { + surf_cpu_model->model_private->share_resources = cpu_share_resources_full; surf_cpu_model->model_private->update_actions_state = cpu_update_actions_state_full; - else - xbt_die("Incompatible optimization mode"); + } else + xbt_die("Invalid update mechanism!"); surf_cpu_model->model_private->update_resource_state = cpu_update_resource_state;