add isl_local_space_has_dim_name
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 28 Feb 2012 19:20:27 +0000 (20:20 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 6 May 2012 12:33:06 +0000 (14:33 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/local_space.h
isl_local_space.c

index 8fefa70..93c96e2 100644 (file)
@@ -830,6 +830,9 @@ 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_name(
+               __isl_keep isl_local_space *ls,
+               enum isl_dim_type type, unsigned pos)
        const char *isl_local_space_get_dim_name(
                __isl_keep isl_local_space *ls,
                enum isl_dim_type type, unsigned pos);
index 1f6108d..cfb1be5 100644 (file)
@@ -25,6 +25,8 @@ 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_name(__isl_keep isl_local_space *ls,
+       enum isl_dim_type type, unsigned pos);
 const char *isl_local_space_get_dim_name(__isl_keep isl_local_space *ls,
        enum isl_dim_type type, unsigned pos);
 __isl_give isl_local_space *isl_local_space_set_dim_name(
index 6f24205..4a14cf5 100644 (file)
@@ -178,6 +178,14 @@ unsigned isl_local_space_offset(__isl_keep isl_local_space *ls,
        }
 }
 
+/* Does the given dimension have a name?
+ */
+int isl_local_space_has_dim_name(__isl_keep isl_local_space *ls,
+       enum isl_dim_type type, unsigned pos)
+{
+       return ls ? isl_space_has_dim_name(ls->dim, type, pos) : -1;
+}
+
 const char *isl_local_space_get_dim_name(__isl_keep isl_local_space *ls,
        enum isl_dim_type type, unsigned pos)
 {