combine isl_pip_basic_map_lex{min,max} into isl_pip_basic_map_lexopt
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 2 Aug 2009 17:46:30 +0000 (19:46 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 7 Aug 2009 09:20:34 +0000 (11:20 +0200)
isl_map.c
isl_map_no_piplib.c
isl_map_piplib.c
isl_map_piplib.h

index ef64139..0f2f804 100644 (file)
--- 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(
index b5cd491..bd8eb1c 100644 (file)
@@ -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);
index 6fbecb7..b38a7c1 100644 (file)
@@ -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.
index 70533fc..b28aadd 100644 (file)
@@ -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)