From d5e71eb78025f3aecf7001bd50516fd6f3553648 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 19 Mar 2012 16:01:25 +0100 Subject: [PATCH] add isl_map_from_multi_aff Signed-off-by: Sven Verdoolaege --- doc/user.pod | 2 ++ include/isl/map.h | 2 ++ isl_map.c | 12 ++++++++++++ 3 files changed, 16 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index e2c2ce4a..219c7ec8 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -1293,6 +1293,8 @@ L<"Piecewise Multiple Quasi Affine Expressions">). __isl_take isl_aff_list *list); __isl_give isl_basic_map *isl_basic_map_from_multi_aff( __isl_take isl_multi_aff *maff) + __isl_give isl_map *isl_map_from_multi_aff( + __isl_take isl_multi_aff *maff) __isl_give isl_set *isl_set_from_pw_multi_aff( __isl_take isl_pw_multi_aff *pma); __isl_give isl_map *isl_map_from_pw_multi_aff( diff --git a/include/isl/map.h b/include/isl/map.h index b99b73c9..ba756c62 100644 --- a/include/isl/map.h +++ b/include/isl/map.h @@ -588,6 +588,8 @@ __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_multi_aff(__isl_take isl_multi_aff *maff); + __isl_give isl_pw_aff *isl_map_dim_max(__isl_take isl_map *map, int pos); #if defined(__cplusplus) diff --git a/isl_map.c b/isl_map.c index 3a940004..ba046f58 100644 --- a/isl_map.c +++ b/isl_map.c @@ -9890,6 +9890,18 @@ __isl_give isl_basic_map *isl_basic_map_from_multi_aff( return bmap; } +/* Construct a map mapping the domain the multi-affine expression + * to its range, with each dimension in the range equated to the + * corresponding affine expression. + */ +__isl_give isl_map *isl_map_from_multi_aff(__isl_take isl_multi_aff *maff) +{ + isl_basic_map *bmap; + + bmap = isl_basic_map_from_multi_aff(maff); + return isl_map_from_basic_map(bmap); +} + /* Construct a basic map mapping a domain in the given space to * to an n-dimensional range, with n the number of elements in the list, * where each coordinate in the range is prescribed by the -- 2.11.4.GIT