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

source code of polly/lib/External/isl/polyhedron_sample.c