From 44931387560de15195a590ee2bace392562b6317 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 18 Sep 2012 14:51:11 +0200 Subject: [PATCH] add isl_pw_aff_zero_on_domain Signed-off-by: Sven Verdoolaege --- doc/user.pod | 2 ++ include/isl/aff.h | 2 ++ isl_aff.c | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index 8acb32be..688507aa 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -3152,6 +3152,8 @@ that is equal to a specified dimension on a given domain can be created using __isl_give isl_aff *isl_aff_zero_on_domain( __isl_take isl_local_space *ls); + __isl_give isl_pw_aff *isl_pw_aff_zero_on_domain( + __isl_take isl_local_space *ls); __isl_give isl_aff *isl_aff_var_on_domain( __isl_take isl_local_space *ls, enum isl_dim_type type, unsigned pos); diff --git a/include/isl/aff.h b/include/isl/aff.h index f799a086..be075508 100644 --- a/include/isl/aff.h +++ b/include/isl/aff.h @@ -122,6 +122,8 @@ __isl_give isl_pw_aff *isl_pw_aff_from_aff(__isl_take isl_aff *aff); __isl_give isl_pw_aff *isl_pw_aff_empty(__isl_take isl_space *dim); __isl_give isl_pw_aff *isl_pw_aff_alloc(__isl_take isl_set *set, __isl_take isl_aff *aff); +__isl_give isl_pw_aff *isl_pw_aff_zero_on_domain( + __isl_take isl_local_space *ls); __isl_give isl_pw_aff *isl_pw_aff_var_on_domain(__isl_take isl_local_space *ls, enum isl_dim_type type, unsigned pos); diff --git a/isl_aff.c b/isl_aff.c index f9896c3b..9939b93b 100644 --- a/isl_aff.c +++ b/isl_aff.c @@ -88,6 +88,14 @@ __isl_give isl_aff *isl_aff_zero_on_domain(__isl_take isl_local_space *ls) return aff; } +/* Return a piecewise affine expression defined on the specified domain + * that is equal to zero. + */ +__isl_give isl_pw_aff *isl_pw_aff_zero_on_domain(__isl_take isl_local_space *ls) +{ + return isl_pw_aff_from_aff(isl_aff_zero_on_domain(ls)); +} + /* Return an affine expression that is equal to the specified dimension * in "ls". */ -- 2.11.4.GIT