From d28c84c1bbe0db8f538370a66caf6c67b9719b91 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 26 May 2012 15:29:52 +0200 Subject: [PATCH] add isl_local_space_has_dim_id and isl_local_space_get_dim_id Signed-off-by: Sven Verdoolaege --- doc/user.pod | 6 ++++++ include/isl/local_space.h | 4 ++++ isl_local_space.c | 12 ++++++++++++ 3 files changed, 22 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index 49df206c..7f501efe 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -845,6 +845,12 @@ They can be inspected, modified, copied and freed using the following functions. int isl_local_space_is_set(__isl_keep isl_local_space *ls); int isl_local_space_dim(__isl_keep isl_local_space *ls, enum isl_dim_type type); + int isl_local_space_has_dim_id( + __isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos); + __isl_give isl_id *isl_local_space_get_dim_id( + __isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos); int isl_local_space_has_dim_name( __isl_keep isl_local_space *ls, enum isl_dim_type type, unsigned pos) diff --git a/include/isl/local_space.h b/include/isl/local_space.h index cfb1be5e..59552603 100644 --- a/include/isl/local_space.h +++ b/include/isl/local_space.h @@ -32,6 +32,10 @@ const char *isl_local_space_get_dim_name(__isl_keep isl_local_space *ls, __isl_give isl_local_space *isl_local_space_set_dim_name( __isl_take isl_local_space *ls, enum isl_dim_type type, unsigned pos, const char *s); +int isl_local_space_has_dim_id(__isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos); +__isl_give isl_id *isl_local_space_get_dim_id(__isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos); __isl_give isl_local_space *isl_local_space_set_dim_id( __isl_take isl_local_space *ls, enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); diff --git a/isl_local_space.c b/isl_local_space.c index 4a14cf55..fa29e659 100644 --- a/isl_local_space.c +++ b/isl_local_space.c @@ -192,6 +192,18 @@ const char *isl_local_space_get_dim_name(__isl_keep isl_local_space *ls, return ls ? isl_space_get_dim_name(ls->dim, type, pos) : NULL; } +int isl_local_space_has_dim_id(__isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos) +{ + return ls ? isl_space_has_dim_id(ls->dim, type, pos) : -1; +} + +__isl_give isl_id *isl_local_space_get_dim_id(__isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos) +{ + return ls ? isl_space_get_dim_id(ls->dim, type, pos) : NULL; +} + __isl_give isl_aff *isl_local_space_get_div(__isl_keep isl_local_space *ls, int pos) { -- 2.11.4.GIT