add isl_dim_range
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 18 Feb 2009 12:02:41 +0000 (13:02 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Sun, 22 Feb 2009 17:01:13 +0000 (18:01 +0100)
include/isl_dim.h
isl_dim.c

index 2543a84..288927a 100644 (file)
@@ -57,6 +57,7 @@ struct isl_dim *isl_dim_drop_inputs(struct isl_dim *dim,
 struct isl_dim *isl_dim_drop_outputs(struct isl_dim *dim,
                unsigned first, unsigned n);
 struct isl_dim *isl_dim_domain(struct isl_dim *dim);
+struct isl_dim *isl_dim_range(struct isl_dim *dim);
 struct isl_dim *isl_dim_underlying(struct isl_dim *dim, unsigned n_div);
 
 int isl_dim_equal(struct isl_dim *dim1, struct isl_dim *dim2);
index a5381dd..73783ca 100644 (file)
--- a/isl_dim.c
+++ b/isl_dim.c
@@ -520,6 +520,13 @@ struct isl_dim *isl_dim_domain(struct isl_dim *dim)
        return isl_dim_reverse(dim);
 }
 
+struct isl_dim *isl_dim_range(struct isl_dim *dim)
+{
+       if (!dim)
+               return NULL;
+       return isl_dim_drop_inputs(dim, 0, dim->n_in);
+}
+
 struct isl_dim *isl_dim_underlying(struct isl_dim *dim, unsigned n_div)
 {
        int i;