5 #include <isl/local_space.h>
6 #include <isl/printer.h>
7 #include <isl/set_type.h>
9 #if defined(__cplusplus)
14 typedef struct isl_aff isl_aff;
16 __isl_give isl_aff *isl_aff_zero(__isl_take isl_local_space *ls);
18 __isl_give isl_aff *isl_aff_copy(__isl_keep isl_aff *aff);
19 void *isl_aff_free(__isl_take isl_aff *aff);
21 isl_ctx *isl_aff_get_ctx(__isl_keep isl_aff *aff);
23 int isl_aff_dim(__isl_keep isl_aff *aff, enum isl_dim_type type);
24 int isl_aff_involves_dims(__isl_keep isl_aff *aff,
25 enum isl_dim_type type, unsigned first, unsigned n);
27 __isl_give isl_dim *isl_aff_get_dim(__isl_keep isl_aff *aff);
28 __isl_give isl_local_space *isl_aff_get_local_space(__isl_keep isl_aff *aff);
30 const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff,
31 enum isl_dim_type type, unsigned pos);
32 int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v);
33 int isl_aff_get_coefficient(__isl_keep isl_aff *aff,
34 enum isl_dim_type type, int pos, isl_int *v);
35 int isl_aff_get_denominator(__isl_keep isl_aff *aff, isl_int *v);
36 __isl_give isl_aff *isl_aff_set_constant(__isl_take isl_aff *aff, isl_int v);
37 __isl_give isl_aff *isl_aff_set_constant_si(__isl_take isl_aff *aff, int v);
38 __isl_give isl_aff *isl_aff_set_coefficient(__isl_take isl_aff *aff,
39 enum isl_dim_type type, int pos, isl_int v);
40 __isl_give isl_aff *isl_aff_set_coefficient_si(__isl_take isl_aff *aff,
41 enum isl_dim_type type, int pos, int v);
42 __isl_give isl_aff *isl_aff_set_denominator(__isl_take isl_aff *aff, isl_int v);
43 __isl_give isl_aff *isl_aff_add_constant(__isl_take isl_aff *aff, isl_int v);
44 __isl_give isl_aff *isl_aff_add_constant_si(__isl_take isl_aff *aff, int v);
45 __isl_give isl_aff *isl_aff_add_coefficient(__isl_take isl_aff *aff,
46 enum isl_dim_type type, int pos, isl_int v);
47 __isl_give isl_aff *isl_aff_add_coefficient_si(__isl_take isl_aff *aff,
48 enum isl_dim_type type, int pos, int v);
50 __isl_give isl_aff *isl_aff_set_dim_name(__isl_take isl_aff *aff,
51 enum isl_dim_type type, unsigned pos, const char *s);
53 int isl_aff_plain_is_equal(__isl_keep isl_aff *aff1, __isl_keep isl_aff *aff2);
54 int isl_aff_plain_is_zero(__isl_keep isl_aff *aff);
56 __isl_give isl_div *isl_aff_get_div(__isl_keep isl_aff *aff, int pos);
58 __isl_give isl_aff *isl_aff_neg(__isl_take isl_aff *aff);
59 __isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff);
60 __isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff);
62 __isl_give isl_aff *isl_aff_add(__isl_take isl_aff *aff1,
63 __isl_take isl_aff *aff2);
64 __isl_give isl_aff *isl_aff_sub(__isl_take isl_aff *aff1,
65 __isl_take isl_aff *aff2);
67 __isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff, isl_int f);
68 __isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, isl_int f);
69 __isl_give isl_aff *isl_aff_scale_down_ui(__isl_take isl_aff *aff, unsigned f);
71 __isl_give isl_aff *isl_aff_insert_dims(__isl_take isl_aff *aff,
72 enum isl_dim_type type, unsigned first, unsigned n);
73 __isl_give isl_aff *isl_aff_add_dims(__isl_take isl_aff *aff,
74 enum isl_dim_type type, unsigned n);
75 __isl_give isl_aff *isl_aff_drop_dims(__isl_take isl_aff *aff,
76 enum isl_dim_type type, unsigned first, unsigned n);
78 __isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff,
79 __isl_take isl_set *context);
81 __isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1,
82 __isl_take isl_aff *aff2);
84 __isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p,
85 __isl_keep isl_aff *aff);
86 void isl_aff_dump(__isl_keep isl_aff *aff);
89 typedef struct isl_pw_aff isl_pw_aff;
91 isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff);
92 __isl_give isl_dim *isl_pw_aff_get_dim(__isl_keep isl_pw_aff *pwaff);
94 __isl_give isl_pw_aff *isl_pw_aff_empty(__isl_take isl_dim *dim);
95 __isl_give isl_pw_aff *isl_pw_aff_alloc(__isl_take isl_set *set,
96 __isl_take isl_aff *aff);
98 int isl_pw_aff_is_empty(__isl_keep isl_pw_aff *pwaff);
100 __isl_give isl_pw_aff *isl_pw_aff_max(__isl_take isl_pw_aff *pwaff1,
101 __isl_take isl_pw_aff *pwaff2);
103 __isl_give isl_pw_aff *isl_pw_aff_copy(__isl_keep isl_pw_aff *pwaff);
104 void *isl_pw_aff_free(__isl_take isl_pw_aff *pwaff);
106 unsigned isl_pw_aff_dim(__isl_keep isl_pw_aff *pwaff, enum isl_dim_type type);
107 int isl_pw_aff_involves_dims(__isl_keep isl_pw_aff *pwaff,
108 enum isl_dim_type type, unsigned first, unsigned n);
110 __isl_give isl_set *isl_pw_aff_domain(__isl_take isl_pw_aff *pwaff);
112 __isl_give isl_pw_aff *isl_pw_aff_add(__isl_take isl_pw_aff *pwaff1,
113 __isl_take isl_pw_aff *pwaff2);
114 __isl_give isl_pw_aff *isl_pw_aff_neg(__isl_take isl_pw_aff *pwaff);
116 __isl_give isl_pw_aff *isl_pw_aff_insert_dims(__isl_take isl_pw_aff *pwaff,
117 enum isl_dim_type type, unsigned first, unsigned n);
118 __isl_give isl_pw_aff *isl_pw_aff_add_dims(__isl_take isl_pw_aff *pwaff,
119 enum isl_dim_type type, unsigned n);
120 __isl_give isl_pw_aff *isl_pw_aff_drop_dims(__isl_take isl_pw_aff *pwaff,
121 enum isl_dim_type type, unsigned first, unsigned n);
123 __isl_give isl_pw_aff *isl_pw_aff_coalesce(__isl_take isl_pw_aff *pwqp);
124 __isl_give isl_pw_aff *isl_pw_aff_gist(__isl_take isl_pw_aff *pwaff,
125 __isl_take isl_set *context);
127 __isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff);
129 __isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1,
130 __isl_take isl_pw_aff *pwaff2);
132 __isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p,
133 __isl_keep isl_pw_aff *pwaff);
134 void isl_pw_aff_dump(__isl_keep isl_pw_aff *pwaff);
136 #if defined(__cplusplus)