From: Sven Verdoolaege Date: Sat, 26 May 2012 13:29:52 +0000 (+0200) Subject: add isl_local_space_has_dim_id and isl_local_space_get_dim_id X-Git-Tag: isl-0.11~269 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d28c84c1bbe0db8f538370a66caf6c67b9719b91;p=platform%2Fupstream%2Fisl.git add isl_local_space_has_dim_id and isl_local_space_get_dim_id Signed-off-by: Sven Verdoolaege --- diff --git a/doc/user.pod b/doc/user.pod index 49df206..7f501ef 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 cfb1be5..5955260 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 4a14cf5..fa29e65 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) {