Polly 20.0.0git
polyhedron_sample.c
Go to the documentation of this file.
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;
21
22 bset = isl_basic_set_read_from_file(ctx, stdin);
24 p = isl_printer_to_file(ctx, stdout);
25 p = isl_printer_print_vec(p, sample);
28 assert(sample);
29 if (isl_vec_size(sample) > 0)
30 assert(isl_basic_set_contains(bset, sample));
32 isl_vec_free(sample);
34
35 return 0;
36}
isl_ctx * isl_ctx_alloc(void)
Definition: isl_ctx.c:261
void isl_ctx_free(isl_ctx *ctx)
Definition: isl_ctx.c:288
isl_bool isl_basic_set_contains(__isl_keep isl_basic_set *bset, __isl_keep isl_vec *vec)
Definition: isl_map.c:3698
__isl_give isl_vec * isl_basic_set_sample_vec(__isl_take isl_basic_set *bset)
Definition: isl_sample.c:1196
const char * p
Definition: isl_test.c:8643
#define assert(exp)
struct isl_basic_set isl_basic_set
Definition: map_type.h:20
__isl_null isl_printer * isl_printer_free(__isl_take isl_printer *printer)
Definition: isl_printer.c:269
__isl_give isl_printer * isl_printer_to_file(isl_ctx *ctx, FILE *file)
Definition: isl_printer.c:217
__isl_give isl_printer * isl_printer_end_line(__isl_take isl_printer *p)
Definition: isl_printer.c:667
__isl_give isl_basic_set * isl_basic_set_read_from_file(isl_ctx *ctx, FILE *input)
Definition: isl_input.c:3296
__isl_null isl_basic_set * isl_basic_set_free(__isl_take isl_basic_set *bset)
Definition: isl_map.c:1523
__isl_give isl_basic_set * isl_basic_set_copy(__isl_keep isl_basic_set *bset)
Definition: isl_map.c:1465
struct isl_ctx * ctx
isl_size isl_vec_size(__isl_keep isl_vec *vec)
Definition: isl_vec.c:249
__isl_null isl_vec * isl_vec_free(__isl_take isl_vec *vec)
Definition: isl_vec.c:234
__isl_give isl_printer * isl_printer_print_vec(__isl_take isl_printer *printer, __isl_keep isl_vec *vec)
Definition: isl_vec.c:352