export isl_aff_add_coefficient
[isl.git] / include / isl / aff.h
blob685e656c46641752ded7bd803251fff8ef2d9889
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>
9 #if defined(__cplusplus)
10 extern "C" {
11 #endif
13 struct isl_aff;
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);
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_gist(__isl_take isl_aff *aff,
70 __isl_take isl_set *context);
72 __isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1,
73 __isl_take isl_aff *aff2);
75 __isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p,
76 __isl_keep isl_aff *aff);
77 void isl_aff_dump(__isl_keep isl_aff *aff);
79 struct isl_pw_aff;
80 typedef struct isl_pw_aff isl_pw_aff;
82 isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff);
83 __isl_give isl_dim *isl_pw_aff_get_dim(__isl_keep isl_pw_aff *pwaff);
85 __isl_give isl_pw_aff *isl_pw_aff_empty(__isl_take isl_dim *dim);
86 __isl_give isl_pw_aff *isl_pw_aff_alloc(__isl_take isl_set *set,
87 __isl_take isl_aff *aff);
89 int isl_pw_aff_is_empty(__isl_keep isl_pw_aff *pwaff);
91 __isl_give isl_pw_aff *isl_pw_aff_max(__isl_take isl_pw_aff *pwaff1,
92 __isl_take isl_pw_aff *pwaff2);
94 __isl_give isl_pw_aff *isl_pw_aff_copy(__isl_keep isl_pw_aff *pwaff);
95 void *isl_pw_aff_free(__isl_take isl_pw_aff *pwaff);
97 unsigned isl_pw_aff_dim(__isl_keep isl_pw_aff *pwaff, enum isl_dim_type type);
99 __isl_give isl_set *isl_pw_aff_domain(__isl_take isl_pw_aff *pwaff);
101 __isl_give isl_pw_aff *isl_pw_aff_add(__isl_take isl_pw_aff *pwaff1,
102 __isl_take isl_pw_aff *pwaff2);
104 __isl_give isl_pw_aff *isl_pw_aff_coalesce(__isl_take isl_pw_aff *pwqp);
105 __isl_give isl_pw_aff *isl_pw_aff_gist(__isl_take isl_pw_aff *pwaff,
106 __isl_take isl_set *context);
108 __isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff);
110 __isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p,
111 __isl_keep isl_pw_aff *pwaff);
112 void isl_pw_aff_dump(__isl_keep isl_pw_aff *pwaff);
114 #if defined(__cplusplus)
116 #endif
118 #endif