From 4924538ccbe8b8147eb665f29ffd0ad47c2ffc37 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 2 Aug 2009 19:46:30 +0200 Subject: [PATCH] combine isl_pip_basic_map_lex{min,max} into isl_pip_basic_map_lexopt --- isl_map.c | 11 +++++++++-- isl_map_no_piplib.c | 13 ++----------- isl_map_piplib.c | 16 +--------------- isl_map_piplib.h | 7 ++----- 4 files changed, 14 insertions(+), 33 deletions(-) diff --git a/isl_map.c b/isl_map.c index ef64139d..0f2f8040 100644 --- a/isl_map.c +++ b/isl_map.c @@ -2963,18 +2963,25 @@ error: return NULL; } +static struct isl_map *isl_basic_map_partial_lexopt( + struct isl_basic_map *bmap, struct isl_basic_set *dom, + struct isl_set **empty, int max) +{ + return isl_pip_basic_map_lexopt(bmap, dom, empty, max); +} + struct isl_map *isl_basic_map_partial_lexmax( struct isl_basic_map *bmap, struct isl_basic_set *dom, struct isl_set **empty) { - return isl_pip_basic_map_lexmax(bmap, dom, empty); + return isl_basic_map_partial_lexopt(bmap, dom, empty, 1); } struct isl_map *isl_basic_map_partial_lexmin( struct isl_basic_map *bmap, struct isl_basic_set *dom, struct isl_set **empty) { - return isl_pip_basic_map_lexmin(bmap, dom, empty); + return isl_basic_map_partial_lexopt(bmap, dom, empty, 0); } struct isl_set *isl_basic_set_partial_lexmin( diff --git a/isl_map_no_piplib.c b/isl_map_no_piplib.c index b5cd4913..bd8eb1c0 100644 --- a/isl_map_no_piplib.c +++ b/isl_map_no_piplib.c @@ -1,17 +1,8 @@ #include "isl_map_piplib.h" -struct isl_map *isl_pip_basic_map_lexmax( +struct isl_map *isl_pip_basic_map_lexopt( struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty) -{ - isl_basic_map_free(bmap); - isl_basic_set_free(dom); - return NULL; -} - -struct isl_map *isl_pip_basic_map_lexmin( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty) + struct isl_set **empty, int max) { isl_basic_map_free(bmap); isl_basic_set_free(dom); diff --git a/isl_map_piplib.c b/isl_map_piplib.c index 6fbecb7b..b38a7c1d 100644 --- a/isl_map_piplib.c +++ b/isl_map_piplib.c @@ -396,7 +396,7 @@ PipMatrix *isl_basic_set_to_pip(struct isl_basic_set *bset, unsigned pip_param, pip_param, extra_front, extra_back); } -static struct isl_map *extremum_on( +struct isl_map *isl_pip_basic_map_lexopt( struct isl_basic_map *bmap, struct isl_basic_set *dom, struct isl_set **empty, int max) { @@ -466,20 +466,6 @@ error: return NULL; } -struct isl_map *isl_pip_basic_map_lexmax( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty) -{ - return extremum_on(bmap, dom, empty, 1); -} - -struct isl_map *isl_pip_basic_map_lexmin( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty) -{ - return extremum_on(bmap, dom, empty, 0); -} - /* Project the given basic set onto its parameter domain, possibly introducing * new, explicit, existential variables in the constraints. * The input has parameters and output variables. diff --git a/isl_map_piplib.h b/isl_map_piplib.h index 70533fc9..b28aaddd 100644 --- a/isl_map_piplib.h +++ b/isl_map_piplib.h @@ -7,12 +7,9 @@ extern "C" { #endif -struct isl_map *isl_pip_basic_map_lexmax( +struct isl_map *isl_pip_basic_map_lexopt( struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty); -struct isl_map *isl_pip_basic_map_lexmin( - struct isl_basic_map *bmap, struct isl_basic_set *dom, - struct isl_set **empty); + struct isl_set **empty, int max); struct isl_map *isl_pip_basic_map_compute_divs(struct isl_basic_map *bmap); #if defined(__cplusplus) -- 2.11.4.GIT