*/
#include <assert.h>
+#include <isl_map_private.h>
#include "isl_equalities.h"
-#include "isl_seq.h"
+#include <isl/seq.h>
#include "isl_scan.h"
+#include <isl_mat_private.h>
/* The input of this program is the same as that of the "polytope_scan"
* program from the barvinok distribution.
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;
struct isl_basic_set *bset;
struct isl_mat *samples;
- bset = isl_basic_set_read_from_file(ctx, stdin, 0);
+ bset = isl_basic_set_read_from_file(ctx, stdin);
samples = isl_basic_set_samples(bset);
- isl_mat_dump(samples, stdout, 0);
+ isl_mat_print_internal(samples, stdout, 0);
isl_mat_free(samples);
isl_ctx_free(ctx);