From fac21fbdd6de71f08ff45e3e9c76f8ee785e995d Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 26 Sep 2011 13:49:33 +0200 Subject: [PATCH] add isl_pw_*_get_dim_id Signed-off-by: Sven Verdoolaege --- doc/user.pod | 3 +++ include/isl/aff.h | 2 ++ isl_pw_templ.c | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index 4d3b10c..1c79aca 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -2612,6 +2612,9 @@ The expression can be inspected using const char *isl_pw_aff_get_dim_name( __isl_keep isl_pw_aff *pa, enum isl_dim_type type, unsigned pos); + __isl_give isl_id *isl_pw_aff_get_dim_id( + __isl_keep isl_pw_aff *pa, + enum isl_dim_type type, unsigned pos); int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v); int isl_aff_get_coefficient(__isl_keep isl_aff *aff, diff --git a/include/isl/aff.h b/include/isl/aff.h index 509b408..08f6ae9 100644 --- a/include/isl/aff.h +++ b/include/isl/aff.h @@ -107,6 +107,8 @@ __isl_give isl_pw_aff *isl_pw_aff_alloc(__isl_take isl_set *set, const char *isl_pw_aff_get_dim_name(__isl_keep isl_pw_aff *pa, enum isl_dim_type type, unsigned pos); +__isl_give isl_id *isl_pw_aff_get_dim_id(__isl_keep isl_pw_aff *pa, + enum isl_dim_type type, unsigned pos); __isl_give isl_pw_aff *isl_pw_aff_set_dim_id(__isl_take isl_pw_aff *pma, enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); diff --git a/isl_pw_templ.c b/isl_pw_templ.c index 489a4ac..03d64cc 100644 --- a/isl_pw_templ.c +++ b/isl_pw_templ.c @@ -179,6 +179,12 @@ const char *FN(PW,get_dim_name)(__isl_keep PW *pw, enum isl_dim_type type, return pw ? isl_space_get_dim_name(pw->dim, type, pos) : NULL; } +__isl_give isl_id *FN(PW,get_dim_id)(__isl_keep PW *pw, enum isl_dim_type type, + unsigned pos) +{ + return pw ? isl_space_get_dim_id(pw->dim, type, pos) : NULL; +} + const char *FN(PW,get_tuple_name)(__isl_keep PW *pw, enum isl_dim_type type) { return pw ? isl_space_get_tuple_name(pw->dim, type) : NULL; -- 2.7.4