add isl_map_has_tuple_name
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 3 Aug 2012 13:23:57 +0000 (15:23 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 7 Aug 2012 09:36:19 +0000 (11:36 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/map.h
isl_map.c

index 37de989..0f6c29c 100644 (file)
@@ -1631,6 +1631,8 @@ or relation can be read off or set using the following functions.
        __isl_give isl_basic_map *isl_basic_map_set_tuple_name(
                __isl_take isl_basic_map *bmap,
                enum isl_dim_type type, const char *s);
+       int isl_map_has_tuple_name(__isl_keep isl_map *map,
+               enum isl_dim_type type);
        const char *isl_map_get_tuple_name(
                __isl_keep isl_map *map,
                enum isl_dim_type type);
index 7613b06..093fe8d 100644 (file)
@@ -70,6 +70,7 @@ __isl_give isl_basic_map *isl_basic_map_set_tuple_name(
        __isl_take isl_basic_map *bmap, enum isl_dim_type type, const char *s);
 const char *isl_basic_map_get_tuple_name(__isl_keep isl_basic_map *bmap,
        enum isl_dim_type type);
+int isl_map_has_tuple_name(__isl_keep isl_map *map, enum isl_dim_type type);
 const char *isl_map_get_tuple_name(__isl_keep isl_map *map,
        enum isl_dim_type type);
 __isl_give isl_map *isl_map_set_tuple_name(__isl_take isl_map *map,
index 290ee4e..56b99d8 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -408,6 +408,13 @@ error:
        return NULL;
 }
 
+/* Does the input or output tuple have a name?
+ */
+int isl_map_has_tuple_name(__isl_keep isl_map *map, enum isl_dim_type type)
+{
+       return map ? isl_space_has_tuple_name(map->dim, type) : -1;
+}
+
 const char *isl_map_get_tuple_name(__isl_keep isl_map *map,
        enum isl_dim_type type)
 {