From cb24a33145807860ec57fda53f4117be95b34ab3 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Wed, 12 May 2010 11:27:14 +0200 Subject: [PATCH] add isl_dim_offset --- Makefile.am | 1 + isl_dim.c | 7 +++++++ isl_dim_private.h | 3 +++ 3 files changed, 11 insertions(+) create mode 100644 isl_dim_private.h diff --git a/Makefile.am b/Makefile.am index 6e41a20f..4c932d33 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/isl_dim.c b/isl_dim.c index ea772336..de53db23 100644 --- 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 index 00000000..713ee875 --- /dev/null +++ b/isl_dim_private.h @@ -0,0 +1,3 @@ +#include + +unsigned isl_dim_offset(__isl_keep isl_dim *dim, enum isl_dim_type type); -- 2.11.4.GIT