split off declarations for isl_aff and isl_pw_aff to separate file
[isl.git] / include / isl / aff.h
blob613bcb31d3ae5255d223c0935e5daf35c05aad4f
1 #ifndef ISL_AFF_H
2 #define ISL_AFF_H
4 #include <isl/div.h>
5 #include <isl/local_space.h>
6 #include <isl/printer.h>
7 #include <isl/set_type.h>
8 #include <isl/aff_type.h>
10 #if defined(__cplusplus)
11 extern "C" {
12 #endif
14 __isl_give isl_aff *isl_aff_zero(__isl_take isl_local_space *ls);
16 __isl_give isl_aff *isl_aff_copy(__isl_keep isl_aff *aff);
17 void *isl_aff_free(__isl_take isl_aff *aff);
19 isl_ctx *isl_aff_get_ctx(__isl_keep isl_aff *aff);
21 int isl_aff_dim(__isl_keep isl_aff *aff, enum isl_dim_type type);
22 int isl_aff_involves_dims(__isl_keep isl_aff *aff,
23 enum isl_dim_type type, unsigned first, unsigned n);
25 __isl_give isl_dim *isl_aff_get_dim(__isl_keep isl_aff *aff);
26 __isl_give isl_local_space *isl_aff_get_local_space(__isl_keep isl_aff *aff);
28 const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff,
29 enum isl_dim_type type, unsigned pos);
30 int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v);
31 int isl_aff_get_coefficient(__isl_keep isl_aff *aff,
32 enum isl_dim_type type, int pos, isl_int *v);
33 int isl_aff_get_denominator(__isl_keep isl_aff *aff, isl_int *v);
34 __isl_give isl_aff *isl_aff_set_constant(__isl_take isl_aff *aff, isl_int v);
35 __isl_give isl_aff *isl_aff_set_constant_si(__isl_take isl_aff *aff, int v);
36 __isl_give isl_aff *isl_aff_set_coefficient(__isl_take isl_aff *aff,
37 enum isl_dim_type type, int pos, isl_int v);
38 __isl_give isl_aff *isl_aff_set_coefficient_si(__isl_take isl_aff *aff,
39 enum isl_dim_type type, int pos, int v);
40 __isl_give isl_aff *isl_aff_set_denominator(__isl_take isl_aff *aff, isl_int v);
41 __isl_give isl_aff *isl_aff_add_constant(__isl_take isl_aff *aff, isl_int v);
42 __isl_give isl_aff *isl_aff_add_constant_si(__isl_take isl_aff *aff, int v);
43 __isl_give isl_aff *isl_aff_add_coefficient(__isl_take isl_aff *aff,
44 enum isl_dim_type type, int pos, isl_int v);
45 __isl_give isl_aff *isl_aff_add_coefficient_si(__isl_take isl_aff *aff,
46 enum isl_dim_type type, int pos, int v);
48 __isl_give isl_aff *isl_aff_set_dim_name(__isl_take isl_aff *aff,
49 enum isl_dim_type type, unsigned pos, const char *s);
51 int isl_aff_plain_is_equal(__isl_keep isl_aff *aff1, __isl_keep isl_aff *aff2);
52 int isl_aff_plain_is_zero(__isl_keep isl_aff *aff);
54 __isl_give isl_div *isl_aff_get_div(__isl_keep isl_aff *aff, int pos);
56 __isl_give isl_aff *isl_aff_neg(__isl_take isl_aff *aff);
57 __isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff);
58 __isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff);
60 __isl_give isl_aff *isl_aff_add(__isl_take isl_aff *aff1,
61 __isl_take isl_aff *aff2);
62 __isl_give isl_aff *isl_aff_sub(__isl_take isl_aff *aff1,
63 __isl_take isl_aff *aff2);
65 __isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff, isl_int f);
66 __isl_give isl_aff *isl_aff_scale_down(__isl_take isl_aff *aff, isl_int f);
67 __isl_give isl_aff *isl_aff_scale_down_ui(__isl_take isl_aff *aff, unsigned f);
69 __isl_give isl_aff *isl_aff_insert_dims(__isl_take isl_aff *aff,
70 enum isl_dim_type type, unsigned first, unsigned n);
71 __isl_give isl_aff *isl_aff_add_dims(__isl_take isl_aff *aff,
72 enum isl_dim_type type, unsigned n);
73 __isl_give isl_aff *isl_aff_drop_dims(__isl_take isl_aff *aff,
74 enum isl_dim_type type, unsigned first, unsigned n);
76 __isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff,
77 __isl_take isl_set *context);
79 __isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1,
80 __isl_take isl_aff *aff2);
82 __isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p,
83 __isl_keep isl_aff *aff);
84 void isl_aff_dump(__isl_keep isl_aff *aff);
86 isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff);
87 __isl_give isl_dim *isl_pw_aff_get_dim(__isl_keep isl_pw_aff *pwaff);
89 __isl_give isl_pw_aff *isl_pw_aff_empty(__isl_take isl_dim *dim);
90 __isl_give isl_pw_aff *isl_pw_aff_alloc(__isl_take isl_set *set,
91 __isl_take isl_aff *aff);
93 int isl_pw_aff_is_empty(__isl_keep isl_pw_aff *pwaff);
95 __isl_give isl_pw_aff *isl_pw_aff_max(__isl_take isl_pw_aff *pwaff1,
96 __isl_take isl_pw_aff *pwaff2);
98 __isl_give isl_pw_aff *isl_pw_aff_copy(__isl_keep isl_pw_aff *pwaff);
99 void *isl_pw_aff_free(__isl_take isl_pw_aff *pwaff);
101 unsigned isl_pw_aff_dim(__isl_keep isl_pw_aff *pwaff, enum isl_dim_type type);
102 int isl_pw_aff_involves_dims(__isl_keep isl_pw_aff *pwaff,
103 enum isl_dim_type type, unsigned first, unsigned n);
105 __isl_give isl_set *isl_pw_aff_domain(__isl_take isl_pw_aff *pwaff);
107 __isl_give isl_pw_aff *isl_pw_aff_add(__isl_take isl_pw_aff *pwaff1,
108 __isl_take isl_pw_aff *pwaff2);
109 __isl_give isl_pw_aff *isl_pw_aff_neg(__isl_take isl_pw_aff *pwaff);
111 __isl_give isl_pw_aff *isl_pw_aff_insert_dims(__isl_take isl_pw_aff *pwaff,
112 enum isl_dim_type type, unsigned first, unsigned n);
113 __isl_give isl_pw_aff *isl_pw_aff_add_dims(__isl_take isl_pw_aff *pwaff,
114 enum isl_dim_type type, unsigned n);
115 __isl_give isl_pw_aff *isl_pw_aff_drop_dims(__isl_take isl_pw_aff *pwaff,
116 enum isl_dim_type type, unsigned first, unsigned n);
118 __isl_give isl_pw_aff *isl_pw_aff_coalesce(__isl_take isl_pw_aff *pwqp);
119 __isl_give isl_pw_aff *isl_pw_aff_gist(__isl_take isl_pw_aff *pwaff,
120 __isl_take isl_set *context);
122 __isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff);
124 __isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1,
125 __isl_take isl_pw_aff *pwaff2);
127 __isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p,
128 __isl_keep isl_pw_aff *pwaff);
129 void isl_pw_aff_dump(__isl_keep isl_pw_aff *pwaff);
131 #if defined(__cplusplus)
133 #endif
135 #endif