add isl_pw_aff_non_zero_set
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 25 Jul 2011 13:02:21 +0000 (15:02 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 25 Jul 2011 13:02:21 +0000 (15:02 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/aff.h
isl_aff.c

index 43105f2..6605fe3 100644 (file)
@@ -2582,6 +2582,8 @@ of C<pwaff1> and C<pwaff2> where C<pwaff1> is greater than or equal to C<pwaff2>
                __isl_take isl_pw_aff *pwaff);
        __isl_give isl_set *isl_pw_aff_zero_set(
                __isl_take isl_pw_aff *pwaff);
+       __isl_give isl_set *isl_pw_aff_non_zero_set(
+               __isl_take isl_pw_aff *pwaff);
 
 The function C<isl_pw_aff_nonneg_set> returns a set
 containing those elements in the domain
index b5362c9..96b994d 100644 (file)
@@ -153,6 +153,7 @@ __isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff);
 
 __isl_give isl_set *isl_pw_aff_nonneg_set(__isl_take isl_pw_aff *pwaff);
 __isl_give isl_set *isl_pw_aff_zero_set(__isl_take isl_pw_aff *pwaff);
+__isl_give isl_set *isl_pw_aff_non_zero_set(__isl_take isl_pw_aff *pwaff);
 
 __isl_give isl_set *isl_pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1,
        __isl_take isl_pw_aff *pwaff2);
index 6d66733..2fde6f0 100644 (file)
--- a/isl_aff.c
+++ b/isl_aff.c
@@ -1252,6 +1252,14 @@ __isl_give isl_set *isl_pw_aff_zero_set(__isl_take isl_pw_aff *pwaff)
        return set;
 }
 
+/* Return a set containing those elements in the domain
+ * of pwaff where it is not zero.
+ */
+__isl_give isl_set *isl_pw_aff_non_zero_set(__isl_take isl_pw_aff *pwaff)
+{
+       return isl_set_complement(isl_pw_aff_zero_set(pwaff));
+}
+
 /* Return a set containing those elements in the shared domain
  * of pwaff1 and pwaff2 where pwaff1 is greater than (or equal) to pwaff2.
  *