From fc991a5e8c5a1574e7a2055e696bd93aac3c73c0 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 24 May 2012 12:28:06 +0200 Subject: [PATCH] add isl_map_order_lt Signed-off-by: Sven Verdoolaege --- doc/user.pod | 3 +++ include/isl/map.h | 2 ++ isl_map.c | 9 +++++++++ 3 files changed, 14 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index 0c74ee7..c67301e 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -1972,6 +1972,9 @@ dimensions are equal to each other. Intersect the relation with the hyperplane where the given dimensions have opposite values. + __isl_give isl_map *isl_map_order_lt(__isl_take isl_map *map, + enum isl_dim_type type1, int pos1, + enum isl_dim_type type2, int pos2); __isl_give isl_map *isl_map_order_gt(__isl_take isl_map *map, enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); diff --git a/include/isl/map.h b/include/isl/map.h index 0c6142f..795eff5 100644 --- a/include/isl/map.h +++ b/include/isl/map.h @@ -421,6 +421,8 @@ __isl_give isl_map *isl_map_equate(__isl_take isl_map *map, enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); __isl_give isl_map *isl_map_oppose(__isl_take isl_map *map, enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); +__isl_give isl_map *isl_map_order_lt(__isl_take isl_map *map, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); __isl_give isl_map *isl_map_order_gt(__isl_take isl_map *map, enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); diff --git a/isl_map.c b/isl_map.c index 036f4d5..8e26ac0 100644 --- a/isl_map.c +++ b/isl_map.c @@ -10229,6 +10229,15 @@ error: return NULL; } +/* Add a constraint imposing that the value of the first dimension is + * smaller than that of the second. + */ +__isl_give isl_map *isl_map_order_lt(__isl_take isl_map *map, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2) +{ + return isl_map_order_gt(map, type2, pos2, type1, pos1); +} + __isl_give isl_aff *isl_basic_map_get_div(__isl_keep isl_basic_map *bmap, int pos) { -- 2.7.4