From cbba1b658e35b610f2c28a4591099d0eff06aa04 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Thu, 30 Jun 2016 23:45:12 +0200 Subject: [PATCH] add isl_map_dim_min This complements the already existing isl_map_dim_max similarly to how isl_set already supports both isl_set_dim_min and isl_set_dim_max. Signed-off-by: Tobias Grosser Signed-off-by: Sven Verdoolaege --- doc/user.pod | 2 ++ include/isl/map.h | 1 + isl_map.c | 9 +++++++++ 3 files changed, 12 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index 9be4a143..e1bdffc5 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -5044,6 +5044,8 @@ NaN if the problem is empty. __isl_take isl_set *set, int pos); __isl_give isl_pw_aff *isl_set_dim_max( __isl_take isl_set *set, int pos); + __isl_give isl_pw_aff *isl_map_dim_min( + __isl_take isl_map *map, int pos); __isl_give isl_pw_aff *isl_map_dim_max( __isl_take isl_map *map, int pos); diff --git a/include/isl/map.h b/include/isl/map.h index de2e84ce..dd1e37ee 100644 --- a/include/isl/map.h +++ b/include/isl/map.h @@ -672,6 +672,7 @@ __isl_give isl_basic_map *isl_basic_map_from_aff_list( __isl_give isl_map *isl_map_from_aff(__isl_take isl_aff *aff); __isl_give isl_map *isl_map_from_multi_aff(__isl_take isl_multi_aff *maff); +__isl_give isl_pw_aff *isl_map_dim_min(__isl_take isl_map *map, int pos); __isl_give isl_pw_aff *isl_map_dim_max(__isl_take isl_map *map, int pos); ISL_DECLARE_LIST_FN(basic_map) diff --git a/isl_map.c b/isl_map.c index de80fba4..a1358d3a 100644 --- a/isl_map.c +++ b/isl_map.c @@ -6387,6 +6387,15 @@ static __isl_give isl_pw_aff *map_dim_opt(__isl_take isl_map *map, int pos, return pwaff; } +/* Compute the minimum of the given output dimension as a function of the + * parameters and input dimensions, but independently of + * the other output dimensions. + */ +__isl_give isl_pw_aff *isl_map_dim_min(__isl_take isl_map *map, int pos) +{ + return map_dim_opt(map, pos, 0); +} + /* Compute the maximum of the given output dimension as a function of the * parameters and input dimensions, but independently of * the other output dimensions. -- 2.11.4.GIT