add isl_local_space_set_dim_id
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 24 Sep 2011 16:07:52 +0000 (18:07 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 27 Sep 2011 11:32:33 +0000 (13:32 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/local_space.h
isl_local_space.c

index 04954a5..63058ac 100644 (file)
@@ -739,7 +739,7 @@ A new local space can be created from a space using
        __isl_give isl_local_space *isl_local_space_from_space(
                __isl_take isl_space *space);
 
-They can be inspected, copied and freed using the following functions.
+They can be inspected, modified, copied and freed using the following functions.
 
        #include <isl/local_space.h>
        isl_ctx *isl_local_space_get_ctx(
@@ -753,6 +753,10 @@ They can be inspected, copied and freed using the following functions.
        __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);
+       __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);
        __isl_give isl_space *isl_local_space_get_space(
                __isl_keep isl_local_space *ls);
        __isl_give isl_aff *isl_local_space_get_div(
index 13d4944..bde4ddf 100644 (file)
@@ -29,6 +29,9 @@ 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);
+__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);
 __isl_give isl_space *isl_local_space_get_space(__isl_keep isl_local_space *ls);
 __isl_give isl_aff *isl_local_space_get_div(__isl_keep isl_local_space *ls,
        int pos);
index ebf222c..42527c7 100644 (file)
@@ -226,6 +226,20 @@ __isl_give isl_local_space *isl_local_space_set_dim_name(
        return ls;
 }
 
+__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)
+{
+       ls = isl_local_space_cow(ls);
+       if (!ls)
+               return isl_id_free(id);
+       ls->dim = isl_space_set_dim_id(ls->dim, type, pos, id);
+       if (!ls->dim)
+               return isl_local_space_free(ls);
+
+       return ls;
+}
+
 __isl_give isl_local_space *isl_local_space_reset_space(
        __isl_take isl_local_space *ls, __isl_take isl_space *dim)
 {