From c73441ef11ea8fe5037bbc71ca5af647237bcb1b Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 25 Nov 2014 17:00:59 +0100 Subject: [PATCH] add isl_union_map_lex_lt_at_multi_union_pw_aff The motivation is similar to that for isl_union_map_eq_at_multi_union_pw_aff. Signed-off-by: Sven Verdoolaege --- doc/user.pod | 8 ++++++-- include/isl/union_map.h | 3 +++ isl_union_map.c | 11 +++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/user.pod b/doc/user.pod index e7122747..f53a3d19 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -5906,9 +5906,13 @@ where the function values satisfy the given relation. isl_union_map_eq_at_multi_union_pw_aff( __isl_take isl_union_map *umap, __isl_take isl_multi_union_pw_aff *mupa); + __isl_give isl_union_map * + isl_union_map_lex_lt_at_multi_union_pw_aff( + __isl_take isl_union_map *umap, + __isl_take isl_multi_union_pw_aff *mupa); -This function selects the subset of elements in the union map -that have an equal function value. +These functions select the subset of elements in the union map +that have an equal or lexicographically smaller function value. =item * Cartesian Product diff --git a/include/isl/union_map.h b/include/isl/union_map.h index 913192dd..ec34dd71 100644 --- a/include/isl/union_map.h +++ b/include/isl/union_map.h @@ -229,6 +229,9 @@ __isl_give isl_union_map *isl_union_map_lex_ge_union_map( __isl_give isl_union_map *isl_union_map_eq_at_multi_union_pw_aff( __isl_take isl_union_map *umap, __isl_take isl_multi_union_pw_aff *mupa); +__isl_give isl_union_map *isl_union_map_lex_lt_at_multi_union_pw_aff( + __isl_take isl_union_map *umap, + __isl_take isl_multi_union_pw_aff *mupa); __isl_give isl_union_map *isl_union_map_read_from_file(isl_ctx *ctx, FILE *input); diff --git a/isl_union_map.c b/isl_union_map.c index 4cc1d2f2..c4ced39c 100644 --- a/isl_union_map.c +++ b/isl_union_map.c @@ -3691,6 +3691,17 @@ __isl_give isl_union_map *isl_union_map_eq_at_multi_union_pw_aff( &isl_multi_pw_aff_eq_map); } +/* Return the subset of "umap" where the domain has a lexicographically + * smaller "mupa" value than the range. + */ +__isl_give isl_union_map *isl_union_map_lex_lt_at_multi_union_pw_aff( + __isl_take isl_union_map *umap, + __isl_take isl_multi_union_pw_aff *mupa) +{ + return isl_union_map_order_at_multi_union_pw_aff(umap, mupa, + &isl_multi_pw_aff_lex_lt_map); +} + /* Return the union of the elements in the list "list". */ __isl_give isl_union_set *isl_union_set_list_union( -- 2.11.4.GIT