add isl_basic_map_upper_bound_si
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 19 Aug 2012 10:28:51 +0000 (12:28 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 6 Sep 2012 13:45:20 +0000 (15:45 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/map.h
isl_map.c

index 1f27e60..c91cdf6 100644 (file)
@@ -2044,6 +2044,9 @@ dimension has the fixed given value.
        __isl_give isl_basic_map *isl_basic_map_lower_bound_si(
                __isl_take isl_basic_map *bmap,
                enum isl_dim_type type, unsigned pos, int value);
+       __isl_give isl_basic_map *isl_basic_map_upper_bound_si(
+               __isl_take isl_basic_map *bmap,
+               enum isl_dim_type type, unsigned pos, int value);
        __isl_give isl_set *isl_set_lower_bound(
                __isl_take isl_set *set,
                enum isl_dim_type type, unsigned pos,
index 621e2d1..4d7a598 100644 (file)
@@ -214,6 +214,9 @@ __isl_give isl_basic_map *isl_basic_map_fix_si(__isl_take isl_basic_map *bmap,
 __isl_give isl_basic_map *isl_basic_map_lower_bound_si(
                __isl_take isl_basic_map *bmap,
                enum isl_dim_type type, unsigned pos, int value);
+__isl_give isl_basic_map *isl_basic_map_upper_bound_si(
+       __isl_take isl_basic_map *bmap,
+       enum isl_dim_type type, unsigned pos, int value);
 
 struct isl_basic_map *isl_basic_map_sum(
                struct isl_basic_map *bmap1, struct isl_basic_map *bmap2);
index 9a5f5ea..cfde9b2 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -5330,6 +5330,15 @@ __isl_give isl_basic_map *isl_basic_map_lower_bound_si(
        return basic_map_bound_si(bmap, type, pos, value, 0);
 }
 
+/* Constrain the values of the given dimension to be no greater than "value".
+ */
+__isl_give isl_basic_map *isl_basic_map_upper_bound_si(
+       __isl_take isl_basic_map *bmap,
+       enum isl_dim_type type, unsigned pos, int value)
+{
+       return basic_map_bound_si(bmap, type, pos, value, 1);
+}
+
 struct isl_basic_set *isl_basic_set_lower_bound_dim(struct isl_basic_set *bset,
        unsigned dim, isl_int value)
 {