- if (not modified)
- return;
-
- XBT_IN("(sys=%p)", this);
-
- /* Compute Usage and store the variables that reach the maximum. If selective_update_active is true, only constraints
- * that changed are considered. Otherwise all constraints with active actions are considered.
- */
- xbt_swag_t cnst_list = selective_update_active ? &modified_constraint_set : &active_constraint_set;
-
- XBT_DEBUG("Active constraints : %d", xbt_swag_size(cnst_list));
- /* Init: Only modified code portions: reset the value of active variables */
- xbt_swag_foreach(_cnst, cnst_list)
- {
- lmm_constraint_t cnst = (lmm_constraint_t)_cnst;
- xbt_swag_t elem_list = &(cnst->enabled_element_set);
- xbt_swag_foreach(_elem, elem_list)
- {
- lmm_variable_t var = ((lmm_element_t)_elem)->variable;
- xbt_assert(var->sharing_weight > 0.0);
- var->value = 0.0;
- }
- }
-
- s_lmm_constraint_light_t* cnst_light_tab = new s_lmm_constraint_light_t[xbt_swag_size(cnst_list)]();
- int cnst_light_num = 0;
- dyn_light_t saturated_constraints;
+ XBT_DEBUG("Active constraints : %zu", cnst_list.size());
+ cnst_light_vec.reserve(cnst_list.size());
+ ConstraintLight* cnst_light_tab = cnst_light_vec.data();
+ int cnst_light_num = 0;