From: Sven Verdoolaege Date: Tue, 30 Nov 2010 13:53:13 +0000 (+0100) Subject: hide isl_basic_set internals X-Git-Tag: isl-0.05~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d03f7b1e7d2a2c890b01acb4e771456bcc51dbbd;p=platform%2Fupstream%2Fisl.git hide isl_basic_set internals Signed-off-by: Sven Verdoolaege --- diff --git a/basis_reduction_templ.c b/basis_reduction_templ.c index fcb04ec..81b86f0 100644 --- a/basis_reduction_templ.c +++ b/basis_reduction_templ.c @@ -12,6 +12,7 @@ #include #include "isl_basis_reduction.h" +#include "isl_map_private.h" static void save_alpha(GBR_LP *lp, int first, int n, GBR_type *alpha) { diff --git a/include/isl/set.h b/include/isl/set.h index bb1c1a9..50914c2 100644 --- a/include/isl/set.h +++ b/include/isl/set.h @@ -18,43 +18,6 @@ extern "C" { #endif -/* A "basic set" is a basic map with a zero-dimensional - * domain. - */ -struct isl_basic_set { - int ref; -#define ISL_BASIC_SET_FINAL (1 << 0) -#define ISL_BASIC_SET_EMPTY (1 << 1) -#define ISL_BASIC_SET_NO_IMPLICIT (1 << 2) -#define ISL_BASIC_SET_NO_REDUNDANT (1 << 3) -#define ISL_BASIC_SET_RATIONAL (1 << 4) -#define ISL_BASIC_SET_NORMALIZED (1 << 5) -#define ISL_BASIC_SET_NORMALIZED_DIVS (1 << 6) -#define ISL_BASIC_SET_ALL_EQUALITIES (1 << 7) - unsigned flags; - - struct isl_ctx *ctx; - - struct isl_dim *dim; - unsigned extra; - - unsigned n_eq; - unsigned n_ineq; - - size_t c_size; - isl_int **eq; - isl_int **ineq; - - unsigned n_div; - - isl_int **div; - - struct isl_vec *sample; - - struct isl_blk block; - struct isl_blk block2; -}; - /* A "set" is a (possibly disjoint) union of basic sets. * * See the documentation of isl_map. diff --git a/isl_bernstein.c b/isl_bernstein.c index 9b8571a..38bf916 100644 --- a/isl_bernstein.c +++ b/isl_bernstein.c @@ -20,6 +20,7 @@ #include #include #include +#include struct bernstein_data { enum isl_fold type; diff --git a/isl_bound.c b/isl_bound.c index 10c70bc..c67fcbf 100644 --- a/isl_bound.c +++ b/isl_bound.c @@ -12,6 +12,7 @@ #include #include #include +#include /* Compute a bound on the polynomial defined over the parametric polytope * using either range propagation or bernstein expansion and diff --git a/isl_factorization.c b/isl_factorization.c index 3b32e19..5ca1487 100644 --- a/isl_factorization.c +++ b/isl_factorization.c @@ -16,6 +16,7 @@ #include #include #include +#include static __isl_give isl_factorizer *isl_factorizer_alloc( __isl_take isl_morph *morph, int n_group) diff --git a/isl_map_private.h b/isl_map_private.h index c1a98d1..5130bc4 100644 --- a/isl_map_private.h +++ b/isl_map_private.h @@ -15,6 +15,43 @@ #include #include +/* A "basic set" is a basic map with a zero-dimensional + * domain. + */ +struct isl_basic_set { + int ref; +#define ISL_BASIC_SET_FINAL (1 << 0) +#define ISL_BASIC_SET_EMPTY (1 << 1) +#define ISL_BASIC_SET_NO_IMPLICIT (1 << 2) +#define ISL_BASIC_SET_NO_REDUNDANT (1 << 3) +#define ISL_BASIC_SET_RATIONAL (1 << 4) +#define ISL_BASIC_SET_NORMALIZED (1 << 5) +#define ISL_BASIC_SET_NORMALIZED_DIVS (1 << 6) +#define ISL_BASIC_SET_ALL_EQUALITIES (1 << 7) + unsigned flags; + + struct isl_ctx *ctx; + + struct isl_dim *dim; + unsigned extra; + + unsigned n_eq; + unsigned n_ineq; + + size_t c_size; + isl_int **eq; + isl_int **ineq; + + unsigned n_div; + + isl_int **div; + + struct isl_vec *sample; + + struct isl_blk block; + struct isl_blk block2; +}; + __isl_give isl_map *isl_map_realign(__isl_take isl_map *map, __isl_take isl_reordering *r); __isl_give isl_set *isl_set_realign(__isl_take isl_set *set, diff --git a/isl_range.c b/isl_range.c index bd831c8..a98c7c4 100644 --- a/isl_range.c +++ b/isl_range.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/isl_test.c b/isl_test.c index a5f9072..e64ef43 100644 --- a/isl_test.c +++ b/isl_test.c @@ -16,6 +16,7 @@ #include #include #include +#include static char *srcdir; diff --git a/polytope_scan.c b/polytope_scan.c index ca2d9e8..ac87655 100644 --- a/polytope_scan.c +++ b/polytope_scan.c @@ -12,6 +12,7 @@ #include #include "isl_scan.h" #include +#include /* The input of this program is the same as that of the "polytope_scan" * program from the barvinok distribution. @@ -48,12 +49,14 @@ error: static struct isl_mat *isl_basic_set_scan_samples(struct isl_basic_set *bset) { + isl_ctx *ctx; unsigned dim; struct scan_samples ss; + ctx = isl_basic_set_get_ctx(bset); dim = isl_basic_set_total_dim(bset); ss.callback.add = scan_samples_add_sample; - ss.samples = isl_mat_alloc(bset->ctx, 0, 1 + dim); + ss.samples = isl_mat_alloc(ctx, 0, 1 + dim); if (!ss.samples) goto error;