From: Sven Verdoolaege Date: Wed, 22 Aug 2012 18:11:12 +0000 (+0200) Subject: add isl_pw_aff_list_set_rational X-Git-Tag: isl-0.11~129 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ec3dc94a8443c4dd056d7e64a7fde28eeb97098;p=platform%2Fupstream%2Fisl.git add isl_pw_aff_list_set_rational Signed-off-by: Sven Verdoolaege --- diff --git a/isl_aff.c b/isl_aff.c index 41bee5c..3338a3a 100644 --- a/isl_aff.c +++ b/isl_aff.c @@ -2530,6 +2530,29 @@ __isl_give isl_pw_aff *isl_pw_aff_set_rational(__isl_take isl_pw_aff *pwaff) return pwaff; } +/* Mark the domains of the elements of "list" as rational. + */ +__isl_give isl_pw_aff_list *isl_pw_aff_list_set_rational( + __isl_take isl_pw_aff_list *list) +{ + int i; + + if (!list) + return NULL; + if (list->n == 0) + return list; + + for (i = 0; i < list->n; ++i) { + isl_pw_aff *pa; + + pa = isl_pw_aff_list_get_pw_aff(list, i); + pa = isl_pw_aff_set_rational(pa); + list = isl_pw_aff_list_set_pw_aff(list, i, pa); + } + + return list; +} + #undef BASE #define BASE aff diff --git a/isl_aff_private.h b/isl_aff_private.h index 546a368..8c1e3d4 100644 --- a/isl_aff_private.h +++ b/isl_aff_private.h @@ -75,6 +75,8 @@ __isl_give isl_pw_aff *isl_pw_aff_union_opt(__isl_take isl_pw_aff *pwaff1, __isl_take isl_pw_aff *pwaff2, int max); __isl_give isl_pw_aff *isl_pw_aff_set_rational(__isl_take isl_pw_aff *pwaff); +__isl_give isl_pw_aff_list *isl_pw_aff_list_set_rational( + __isl_take isl_pw_aff_list *list); #undef BASE #define BASE aff