source: Daodan/MSYS2/mingw32/include/isl/constraint.h@ 1186

Last change on this file since 1186 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 5.9 KB
Line 
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#ifndef ISL_CONSTRAINT_H
11#define ISL_CONSTRAINT_H
12
13#include <isl/local_space.h>
14#include <isl/space_type.h>
15#include <isl/aff_type.h>
16#include <isl/set_type.h>
17#include <isl/list.h>
18#include <isl/val_type.h>
19#include <isl/printer.h>
20
21#if defined(__cplusplus)
22extern "C" {
23#endif
24
25struct isl_constraint;
26typedef struct isl_constraint isl_constraint;
27
28ISL_DECLARE_LIST(constraint)
29
30isl_ctx *isl_constraint_get_ctx(__isl_keep isl_constraint *c);
31
32__isl_give isl_constraint *isl_constraint_alloc_equality(
33 __isl_take isl_local_space *ls);
34__isl_give isl_constraint *isl_constraint_alloc_inequality(
35 __isl_take isl_local_space *ls);
36__isl_give isl_constraint *isl_equality_alloc(__isl_take isl_local_space *ls);
37__isl_give isl_constraint *isl_inequality_alloc(__isl_take isl_local_space *ls);
38
39__isl_give isl_constraint *isl_constraint_copy(__isl_keep isl_constraint *c);
40__isl_null isl_constraint *isl_constraint_free(__isl_take isl_constraint *c);
41
42isl_size isl_basic_map_n_constraint(__isl_keep isl_basic_map *bmap);
43isl_size isl_basic_set_n_constraint(__isl_keep isl_basic_set *bset);
44isl_stat isl_basic_map_foreach_constraint(__isl_keep isl_basic_map *bmap,
45 isl_stat (*fn)(__isl_take isl_constraint *c, void *user), void *user);
46isl_stat isl_basic_set_foreach_constraint(__isl_keep isl_basic_set *bset,
47 isl_stat (*fn)(__isl_take isl_constraint *c, void *user), void *user);
48__isl_give isl_constraint_list *isl_basic_map_get_constraint_list(
49 __isl_keep isl_basic_map *bmap);
50__isl_give isl_constraint_list *isl_basic_set_get_constraint_list(
51 __isl_keep isl_basic_set *bset);
52int isl_constraint_is_equal(__isl_keep isl_constraint *constraint1,
53 __isl_keep isl_constraint *constraint2);
54
55isl_stat isl_basic_set_foreach_bound_pair(__isl_keep isl_basic_set *bset,
56 enum isl_dim_type type, unsigned pos,
57 isl_stat (*fn)(__isl_take isl_constraint *lower,
58 __isl_take isl_constraint *upper,
59 __isl_take isl_basic_set *bset, void *user), void *user);
60
61__isl_give isl_basic_map *isl_basic_map_add_constraint(
62 __isl_take isl_basic_map *bmap, __isl_take isl_constraint *constraint);
63__isl_give isl_basic_set *isl_basic_set_add_constraint(
64 __isl_take isl_basic_set *bset, __isl_take isl_constraint *constraint);
65__isl_give isl_map *isl_map_add_constraint(__isl_take isl_map *map,
66 __isl_take isl_constraint *constraint);
67__isl_give isl_set *isl_set_add_constraint(__isl_take isl_set *set,
68 __isl_take isl_constraint *constraint);
69
70isl_bool isl_basic_map_has_defining_equality(
71 __isl_keep isl_basic_map *bmap, enum isl_dim_type type, int pos,
72 __isl_give isl_constraint **c);
73isl_bool isl_basic_set_has_defining_equality(
74 struct isl_basic_set *bset, enum isl_dim_type type, int pos,
75 struct isl_constraint **constraint);
76isl_bool isl_basic_set_has_defining_inequalities(
77 struct isl_basic_set *bset, enum isl_dim_type type, int pos,
78 struct isl_constraint **lower,
79 struct isl_constraint **upper);
80
81__isl_give isl_space *isl_constraint_get_space(
82 __isl_keep isl_constraint *constraint);
83__isl_give isl_local_space *isl_constraint_get_local_space(
84 __isl_keep isl_constraint *constraint);
85isl_size isl_constraint_dim(__isl_keep isl_constraint *constraint,
86 enum isl_dim_type type);
87
88isl_bool isl_constraint_involves_dims(__isl_keep isl_constraint *constraint,
89 enum isl_dim_type type, unsigned first, unsigned n);
90
91const char *isl_constraint_get_dim_name(__isl_keep isl_constraint *constraint,
92 enum isl_dim_type type, unsigned pos);
93__isl_give isl_val *isl_constraint_get_constant_val(
94 __isl_keep isl_constraint *constraint);
95__isl_give isl_val *isl_constraint_get_coefficient_val(
96 __isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos);
97__isl_give isl_constraint *isl_constraint_set_constant_si(
98 __isl_take isl_constraint *constraint, int v);
99__isl_give isl_constraint *isl_constraint_set_constant_val(
100 __isl_take isl_constraint *constraint, __isl_take isl_val *v);
101__isl_give isl_constraint *isl_constraint_set_coefficient_si(
102 __isl_take isl_constraint *constraint,
103 enum isl_dim_type type, int pos, int v);
104__isl_give isl_constraint *isl_constraint_set_coefficient_val(
105 __isl_take isl_constraint *constraint,
106 enum isl_dim_type type, int pos, __isl_take isl_val *v);
107
108__isl_give isl_aff *isl_constraint_get_div(__isl_keep isl_constraint *constraint,
109 int pos);
110
111__isl_give isl_constraint *isl_constraint_negate(
112 __isl_take isl_constraint *constraint);
113
114isl_bool isl_constraint_is_equality(__isl_keep isl_constraint *constraint);
115isl_bool isl_constraint_is_div_constraint(
116 __isl_keep isl_constraint *constraint);
117
118isl_bool isl_constraint_is_lower_bound(__isl_keep isl_constraint *constraint,
119 enum isl_dim_type type, unsigned pos);
120isl_bool isl_constraint_is_upper_bound(__isl_keep isl_constraint *constraint,
121 enum isl_dim_type type, unsigned pos);
122
123__isl_give isl_basic_map *isl_basic_map_from_constraint(
124 __isl_take isl_constraint *constraint);
125__isl_give isl_basic_set *isl_basic_set_from_constraint(
126 __isl_take isl_constraint *constraint);
127
128__isl_give isl_aff *isl_constraint_get_bound(
129 __isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos);
130__isl_give isl_aff *isl_constraint_get_aff(
131 __isl_keep isl_constraint *constraint);
132__isl_give isl_constraint *isl_equality_from_aff(__isl_take isl_aff *aff);
133__isl_give isl_constraint *isl_inequality_from_aff(__isl_take isl_aff *aff);
134
135int isl_constraint_plain_cmp(__isl_keep isl_constraint *c1,
136 __isl_keep isl_constraint *c2);
137int isl_constraint_cmp_last_non_zero(__isl_keep isl_constraint *c1,
138 __isl_keep isl_constraint *c2);
139
140__isl_give isl_printer *isl_printer_print_constraint(__isl_take isl_printer *p,
141 __isl_keep isl_constraint *c);
142void isl_constraint_dump(__isl_keep isl_constraint *c);
143
144#if defined(__cplusplus)
145}
146#endif
147
148#endif
Note: See TracBrowser for help on using the repository browser.