From 97d5106768ad7edb30b1c958c98d1a0e6643292c Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 29 Mar 2012 14:37:35 +0200 Subject: [PATCH] add isl_map_from_aff Signed-off-by: Sven Verdoolaege --- doc/user.pod | 2 ++ include/isl/map.h | 1 + isl_map.c | 11 +++++++++++ 3 files changed, 14 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index de7eac4..e1bc06d 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -1286,6 +1286,8 @@ L<"Piecewise Multiple Quasi Affine Expressions">). __isl_give isl_basic_map *isl_basic_map_from_aff( __isl_take isl_aff *aff); + __isl_give isl_map *isl_map_from_aff( + __isl_take isl_aff *aff); __isl_give isl_set *isl_set_from_pw_aff( __isl_take isl_pw_aff *pwaff); __isl_give isl_map *isl_map_from_pw_aff( diff --git a/include/isl/map.h b/include/isl/map.h index ba756c6..b33a9fd 100644 --- a/include/isl/map.h +++ b/include/isl/map.h @@ -588,6 +588,7 @@ __isl_give isl_basic_map *isl_basic_map_from_multi_aff( __isl_give isl_basic_map *isl_basic_map_from_aff_list( __isl_take isl_space *domain_dim, __isl_take isl_aff_list *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_max(__isl_take isl_map *map, int pos); diff --git a/isl_map.c b/isl_map.c index ba046f5..878519d 100644 --- a/isl_map.c +++ b/isl_map.c @@ -9853,6 +9853,17 @@ error: return NULL; } +/* Construct a map mapping the domain of the affine expression + * to a one-dimensional range prescribed by the affine expression. + */ +__isl_give isl_map *isl_map_from_aff(__isl_take isl_aff *aff) +{ + isl_basic_map *bmap; + + bmap = isl_basic_map_from_aff(aff); + return isl_map_from_basic_map(bmap); +} + /* Construct a basic map mapping the domain the multi-affine expression * to its range, with each dimension in the range equated to the * corresponding affine expression. -- 2.7.4