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
document generic configuration variables (and fix MC one)
[simgrid.git]
/
src
/
surf
/
maxmin.c
diff --git
a/src/surf/maxmin.c
b/src/surf/maxmin.c
index
b5a261e
..
c7f2d8e
100644
(file)
--- a/
src/surf/maxmin.c
+++ b/
src/surf/maxmin.c
@@
-23,12
+23,11
@@
static void lmm_variable_mallocator_free_f(void *var);
static void lmm_update_modified_set(lmm_system_t sys,
lmm_constraint_t cnst);
static void lmm_remove_all_modified_set(lmm_system_t sys);
static void lmm_update_modified_set(lmm_system_t sys,
lmm_constraint_t cnst);
static void lmm_remove_all_modified_set(lmm_system_t sys);
-int sg_maxmin_selective_update = 1;
static int Global_debug_id = 1;
static int Global_const_debug_id = 1;
extern xbt_swag_t keep_track;
static int Global_debug_id = 1;
static int Global_const_debug_id = 1;
extern xbt_swag_t keep_track;
-lmm_system_t lmm_system_new(
void
)
+lmm_system_t lmm_system_new(
int selective_update
)
{
lmm_system_t l = NULL;
s_lmm_variable_t var;
{
lmm_system_t l = NULL;
s_lmm_variable_t var;
@@
-37,7
+36,7
@@
lmm_system_t lmm_system_new(void)
l = xbt_new0(s_lmm_system_t, 1);
l->modified = 0;
l = xbt_new0(s_lmm_system_t, 1);
l->modified = 0;
- l->selective_update_active = s
g_maxmin_s
elective_update;
+ l->selective_update_active = selective_update;
XBT_DEBUG("Setting selective_update_active flag to %d\n",
l->selective_update_active);
XBT_DEBUG("Setting selective_update_active flag to %d\n",
l->selective_update_active);
@@
-117,7
+116,7
@@
static XBT_INLINE void lmm_cnst_free(lmm_system_t sys,
{
/* xbt_assert(xbt_swag_size(&(cnst->element_set)), */
/* "This list should be empty!"); */
{
/* xbt_assert(xbt_swag_size(&(cnst->element_set)), */
/* "This list should be empty!"); */
-
remove_active_constraint
(sys, cnst);
+
make_constraint_inactive
(sys, cnst);
free(cnst);
}
free(cnst);
}
@@
-624,9
+623,6
@@
void lmm_solve(lmm_system_t sys)
}
/* Find out which variables reach the maximum */
}
/* Find out which variables reach the maximum */
- cnst_list =
- sys->selective_update_active ? &(sys->modified_constraint_set) :
- &(sys->active_constraint_set);
min_usage = -1;
min_bound = -1;
xbt_swag_foreach(cnst, cnst_list) {
min_usage = -1;
min_bound = -1;
xbt_swag_foreach(cnst, cnst_list) {
@@
-811,11
+807,5
@@
static void lmm_update_modified_set(lmm_system_t sys,
*/
static void lmm_remove_all_modified_set(lmm_system_t sys)
{
*/
static void lmm_remove_all_modified_set(lmm_system_t sys)
{
- xbt_swag_t modified_constraint_set = &sys->modified_constraint_set;
- lmm_constraint_t cnst;
- lmm_constraint_t cnst_next;
-
- xbt_swag_foreach_safe(cnst, cnst_next, modified_constraint_set) {
- xbt_swag_remove(cnst, modified_constraint_set);
- }
+ xbt_swag_reset(&sys->modified_constraint_set);
}
}