add isl_pw_multi_aff_identity
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 25 Aug 2012 10:34:40 +0000 (12:34 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 6 Sep 2012 13:45:21 +0000 (15:45 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/aff.h
isl_aff.c

index 62c196b..7eb13e4 100644 (file)
@@ -3500,6 +3500,8 @@ can be created using the following functions.
                __isl_take isl_space *space);
        __isl_give isl_multi_aff *isl_multi_aff_identity(
                __isl_take isl_space *space);
+       __isl_give isl_pw_multi_aff *isl_pw_multi_aff_identity(
+               __isl_take isl_space *space);
        __isl_give isl_pw_multi_aff *
        isl_pw_multi_aff_from_multi_aff(
                __isl_take isl_multi_aff *ma);
index 3711e81..2e0df89 100644 (file)
@@ -311,6 +311,8 @@ __isl_give isl_multi_aff *isl_multi_aff_read_from_str(isl_ctx *ctx,
                const char *str);
 void isl_multi_aff_dump(__isl_keep isl_multi_aff *maff);
 
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_identity(
+       __isl_take isl_space *space);
 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_multi_aff(
        __isl_take isl_multi_aff *ma);
 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_alloc(__isl_take isl_set *set,
index e47cad9..7c6b8fb 100644 (file)
--- a/isl_aff.c
+++ b/isl_aff.c
@@ -2245,6 +2245,15 @@ __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_multi_aff(
        return isl_pw_multi_aff_alloc(dom, ma);
 }
 
+/* Create a piecewise multi-affine expression in the given space that maps each
+ * input dimension to the corresponding output dimension.
+ */
+__isl_give isl_pw_multi_aff *isl_pw_multi_aff_identity(
+       __isl_take isl_space *space)
+{
+       return isl_pw_multi_aff_from_multi_aff(isl_multi_aff_identity(space));
+}
+
 __isl_give isl_multi_aff *isl_multi_aff_add(__isl_take isl_multi_aff *maff1,
        __isl_take isl_multi_aff *maff2)
 {