hide isl_basic_set internals
authorSven Verdoolaege <skimo@kotnet.org>
Tue, 30 Nov 2010 13:53:13 +0000 (14:53 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Wed, 1 Dec 2010 22:41:34 +0000 (23:41 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
basis_reduction_templ.c
include/isl/set.h
isl_bernstein.c
isl_bound.c
isl_factorization.c
isl_map_private.h
isl_range.c
isl_test.c
polytope_scan.c

index fcb04ec..81b86f0 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <stdlib.h>
 #include "isl_basis_reduction.h"
+#include "isl_map_private.h"
 
 static void save_alpha(GBR_LP *lp, int first, int n, GBR_type *alpha)
 {
index bb1c1a9..50914c2 100644 (file)
 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.
index 9b8571a..38bf916 100644 (file)
@@ -20,6 +20,7 @@
 #include <isl_vertices_private.h>
 #include <isl_polynomial_private.h>
 #include <isl_bernstein.h>
+#include <isl_map_private.h>
 
 struct bernstein_data {
        enum isl_fold type;
index 10c70bc..c67fcbf 100644 (file)
@@ -12,6 +12,7 @@
 #include <isl_bernstein.h>
 #include <isl_range.h>
 #include <isl_polynomial_private.h>
+#include <isl_map_private.h>
 
 /* Compute a bound on the polynomial defined over the parametric polytope
  * using either range propagation or bernstein expansion and
index 3b32e19..5ca1487 100644 (file)
@@ -16,6 +16,7 @@
 #include <isl_factorization.h>
 #include <isl_dim_private.h>
 #include <isl_mat_private.h>
+#include <isl_map_private.h>
 
 static __isl_give isl_factorizer *isl_factorizer_alloc(
        __isl_take isl_morph *morph, int n_group)
index c1a98d1..5130bc4 100644 (file)
 #include <isl_reordering.h>
 #include <isl/vec.h>
 
+/* 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,
index bd831c8..a98c7c4 100644 (file)
@@ -1,5 +1,6 @@
 #include <isl/constraint.h>
 #include <isl/set.h>
+#include <isl_map_private.h>
 #include <isl_polynomial_private.h>
 #include <isl_morph.h>
 #include <isl_range.h>
index a5f9072..e64ef43 100644 (file)
@@ -16,6 +16,7 @@
 #include <isl/constraint.h>
 #include <isl/polynomial.h>
 #include <isl/union_map.h>
+#include <isl_map_private.h>
 
 static char *srcdir;
 
index ca2d9e8..ac87655 100644 (file)
@@ -12,6 +12,7 @@
 #include <isl/seq.h>
 #include "isl_scan.h"
 #include <isl_mat_private.h>
+#include <isl_map_private.h>
 
 /* 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;