add isl_map_from_multi_aff
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 19 Mar 2012 15:01:25 +0000 (16:01 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 6 May 2012 12:33:04 +0000 (14:33 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/map.h
isl_map.c

index e2c2ce4..219c7ec 100644 (file)
@@ -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(
index b99b73c..ba756c6 100644 (file)
@@ -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)
index 3a94000..ba046f5 100644 (file)
--- 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