From: Sven Verdoolaege Date: Mon, 25 Jul 2011 13:02:21 +0000 (+0200) Subject: add isl_pw_aff_non_zero_set X-Git-Tag: isl-0.08~195 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f6d9154795e12cecdb0e055c8fdc227658df53e;p=platform%2Fupstream%2Fisl.git add isl_pw_aff_non_zero_set Signed-off-by: Sven Verdoolaege --- diff --git a/doc/user.pod b/doc/user.pod index 43105f2..6605fe3 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -2582,6 +2582,8 @@ of C and C where C is greater than or equal to C __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 returns a set containing those elements in the domain diff --git a/include/isl/aff.h b/include/isl/aff.h index b5362c9..96b994d 100644 --- a/include/isl/aff.h +++ b/include/isl/aff.h @@ -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); diff --git a/isl_aff.c b/isl_aff.c index 6d66733..2fde6f0 100644 --- 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. *