add isl_dim_offset
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 12 May 2010 09:27:14 +0000 (11:27 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 13 May 2010 16:53:54 +0000 (18:53 +0200)
Makefile.am
isl_dim.c
isl_dim_private.h [new file with mode: 0644]

index 6e41a20..4c932d3 100644 (file)
@@ -41,6 +41,7 @@ libisl_la_SOURCES = \
        isl_convex_hull.c \
        isl_ctx.c \
        isl_dim.c \
+       isl_dim_private.h \
        isl_div.c \
        isl_equalities.c \
        isl_equalities.h \
index ea77233..de53db2 100644 (file)
--- a/isl_dim.c
+++ b/isl_dim.c
@@ -161,6 +161,13 @@ unsigned isl_dim_size(struct isl_dim *dim, enum isl_dim_type type)
        return n(dim, type);
 }
 
+unsigned isl_dim_offset(__isl_keep isl_dim *dim, enum isl_dim_type type)
+{
+       if (!dim)
+               return 0;
+       return offset(dim, type);
+}
+
 static struct isl_dim *copy_names(struct isl_dim *dst,
        enum isl_dim_type dst_type, unsigned offset, struct isl_dim *src,
        enum isl_dim_type src_type)
diff --git a/isl_dim_private.h b/isl_dim_private.h
new file mode 100644 (file)
index 0000000..713ee87
--- /dev/null
@@ -0,0 +1,3 @@
+#include <isl_dim.h>
+
+unsigned isl_dim_offset(__isl_keep isl_dim *dim, enum isl_dim_type type);