projects
/
platform
/
upstream
/
isl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed3b444
)
isl_tab_solve_lp: invert optimal value back when computing maximum
author
Sven Verdoolaege
<sven@cs.kuleuven.be>
Wed, 16 Dec 2009 12:53:03 +0000
(12:53 +0000)
committer
Sven Verdoolaege
<sven@cs.kuleuven.be>
Wed, 16 Dec 2009 12:53:03 +0000
(12:53 +0000)
A maximum is computed by computing the minimum of the opposite objective
function. The maximal value is then the opposite of the computed value.
isl_lp.c
patch
|
blob
|
history
diff --git
a/isl_lp.c
b/isl_lp.c
index
533f20f
..
c6feca4
100644
(file)
--- a/
isl_lp.c
+++ b/
isl_lp.c
@@
-29,6
+29,8
@@
enum isl_lp_result isl_tab_solve_lp(struct isl_basic_map *bmap, int maximize,
if (maximize)
isl_seq_neg(f, f, 1 + dim);
+ if (maximize && opt)
+ isl_int_neg(*opt, *opt);
return res;
}