isl_map.c: parameter_compute_divs: check result of isl_basic_set_gauss call
[isl.git] / polyhedron_sample.c
bloba8c340636ca296e332e2be0a4913371ffc313512
1 /*
2 * Copyright 2008-2009 Katholieke Universiteit Leuven
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege, K.U.Leuven, Departement
7 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
8 */
10 #include <assert.h>
11 #include <isl_map_private.h>
12 #include "isl_sample.h"
13 #include <isl/vec.h>
15 int main(int argc, char **argv)
17 struct isl_ctx *ctx = isl_ctx_alloc();
18 struct isl_basic_set *bset;
19 struct isl_vec *sample;
20 isl_printer *p;
22 bset = isl_basic_set_read_from_file(ctx, stdin);
23 sample = isl_basic_set_sample_vec(isl_basic_set_copy(bset));
24 p = isl_printer_to_file(ctx, stdout);
25 p = isl_printer_print_vec(p, sample);
26 p = isl_printer_end_line(p);
27 isl_printer_free(p);
28 assert(sample);
29 if (sample->size > 0)
30 assert(isl_basic_set_contains(bset, sample));
31 isl_basic_set_free(bset);
32 isl_vec_free(sample);
33 isl_ctx_free(ctx);
35 return 0;