add isl_basic_map_get_tuple_name
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 24 Sep 2010 20:29:10 +0000 (22:29 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 25 Sep 2010 16:49:48 +0000 (18:49 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl_map.h
isl_map.c

index 54aebca..e09149c 100644 (file)
@@ -988,6 +988,16 @@ different kinds of variables appear in the resulting matrix
 and should be a permutation of C<isl_dim_cst>, C<isl_dim_param>,
 C<isl_dim_in>, C<isl_dim_out> and C<isl_dim_div>.
 
+The names of the domain and range spaces of a relation can be
+read off using the following function.
+
+       const char *isl_basic_map_get_tuple_name(
+               __isl_keep isl_basic_map *bmap,
+               enum isl_dim_type type);
+
+As with C<isl_dim_get_tuple_name>, the value returned points to
+an internal data structure.
+
 =head2 Properties
 
 =head3 Unary Properties
index 229de7c..ce8ffee 100644 (file)
@@ -129,6 +129,8 @@ __isl_give isl_dim *isl_map_get_dim(__isl_keep isl_map *map);
 
 __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);
 __isl_give isl_map *isl_map_set_tuple_name(__isl_take isl_map *map,
        enum isl_dim_type type, const char *s);
 __isl_give isl_basic_map *isl_basic_map_set_dim_name(
index 9ec7e58..77279b0 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -329,6 +329,12 @@ error:
        return NULL;
 }
 
+const char *isl_basic_map_get_tuple_name(__isl_keep isl_basic_map *bmap,
+       enum isl_dim_type type)
+{
+       return bmap ? isl_dim_get_tuple_name(bmap->dim, type) : NULL;
+}
+
 __isl_give isl_map *isl_map_set_tuple_name(__isl_take isl_map *map,
        enum isl_dim_type type, const char *s)
 {