add isl_map_find_dim_by_name
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 24 Sep 2011 09:42:30 +0000 (11:42 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 27 Sep 2011 11:16:47 +0000 (13:16 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/map.h
isl_map.c

index 675d8a9..04954a5 100644 (file)
@@ -1476,6 +1476,8 @@ read off using the following functions.
                enum isl_dim_type type, __isl_keep isl_id *id);
        int isl_map_find_dim_by_id(__isl_keep isl_map *map,
                enum isl_dim_type type, __isl_keep isl_id *id);
+       int isl_map_find_dim_by_name(__isl_keep isl_map *map,
+               enum isl_dim_type type, const char *name);
 
        const char *isl_constraint_get_dim_name(
                __isl_keep isl_constraint *constraint,
index bf73e05..44c455d 100644 (file)
@@ -100,6 +100,8 @@ __isl_give isl_id *isl_map_get_tuple_id(__isl_keep isl_map *map,
 
 int isl_map_find_dim_by_id(__isl_keep isl_map *map, enum isl_dim_type type,
        __isl_keep isl_id *id);
+int isl_map_find_dim_by_name(__isl_keep isl_map *map, enum isl_dim_type type,
+       const char *name);
 
 int isl_basic_map_is_rational(__isl_keep isl_basic_map *bmap);
 
index 571125b..bcf09b5 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -597,6 +597,14 @@ int isl_set_find_dim_by_id(__isl_keep isl_set *set, enum isl_dim_type type,
        return isl_map_find_dim_by_id(set, type, id);
 }
 
+int isl_map_find_dim_by_name(__isl_keep isl_map *map, enum isl_dim_type type,
+       const char *name)
+{
+       if (!map)
+               return -1;
+       return isl_space_find_dim_by_name(map->dim, type, name);
+}
+
 int isl_basic_map_is_rational(__isl_keep isl_basic_map *bmap)
 {
        if (!bmap)