add isl_map_get_dim
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 2 Aug 2009 17:11:15 +0000 (19:11 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 7 Aug 2009 09:19:21 +0000 (11:19 +0200)
include/isl_map.h
isl_map.c

index b86efad..6533eb9 100644 (file)
@@ -108,6 +108,7 @@ unsigned isl_map_n_param(const struct isl_map *map);
 unsigned isl_map_dim(const struct isl_map *map, enum isl_dim_type type);
 
 struct isl_dim *isl_basic_map_get_dim(struct isl_basic_map *bmap);
+struct isl_dim *isl_map_get_dim(struct isl_map *map);
 
 struct isl_basic_map *isl_basic_map_alloc(struct isl_ctx *ctx,
                unsigned nparam, unsigned in, unsigned out, unsigned extra,
index 0306875..b38030c 100644 (file)
--- a/isl_map.c
+++ b/isl_map.c
@@ -234,6 +234,13 @@ struct isl_dim *isl_basic_set_get_dim(struct isl_basic_set *bset)
        return isl_dim_copy(bset->dim);
 }
 
+struct isl_dim *isl_map_get_dim(struct isl_map *map)
+{
+       if (!map)
+               return NULL;
+       return isl_dim_copy(map->dim);
+}
+
 struct isl_dim *isl_set_get_dim(struct isl_set *set)
 {
        if (!set)