From 2be7cba12155686cac99e19aaa2deaf4c6d62eb6 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 19 Aug 2012 12:28:51 +0200 Subject: [PATCH] add isl_basic_map_upper_bound_si Signed-off-by: Sven Verdoolaege --- doc/user.pod | 3 +++ include/isl/map.h | 3 +++ isl_map.c | 9 +++++++++ 3 files changed, 15 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index 1f27e60..c91cdf6 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -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, diff --git a/include/isl/map.h b/include/isl/map.h index 621e2d1..4d7a598 100644 --- a/include/isl/map.h +++ b/include/isl/map.h @@ -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); diff --git a/isl_map.c b/isl_map.c index 9a5f5ea..cfde9b2 100644 --- 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) { -- 2.7.4