hide isl_vec internals
[isl.git] / isl_aff_private.h
blobe89b36caad19b2c1f583b2570534ad93aa3ee1e0
1 #ifndef ISL_AFF_PRIVATE_H
2 #define ISL_AFF_PRIVATE_H
4 #include <isl/aff.h>
5 #include <isl/vec.h>
6 #include <isl/mat.h>
7 #include <isl/local_space.h>
8 #include <isl_reordering.h>
10 /* ls represents the domain space.
12 struct isl_aff {
13 int ref;
15 isl_local_space *ls;
16 isl_vec *v;
19 #undef EL
20 #define EL isl_aff
22 #include <isl_list_templ.h>
24 struct isl_pw_aff_piece {
25 struct isl_set *set;
26 struct isl_aff *aff;
29 struct isl_pw_aff {
30 int ref;
32 isl_space *dim;
34 int n;
36 size_t size;
37 struct isl_pw_aff_piece p[1];
40 #undef EL
41 #define EL isl_pw_aff
43 #include <isl_list_templ.h>
45 struct isl_pw_multi_aff_piece {
46 isl_set *set;
47 isl_multi_aff *maff;
50 struct isl_pw_multi_aff {
51 int ref;
53 isl_space *dim;
55 int n;
57 size_t size;
58 struct isl_pw_multi_aff_piece p[1];
61 __isl_give isl_aff *isl_aff_alloc(__isl_take isl_local_space *ls);
63 __isl_give isl_aff *isl_aff_reset_space_and_domain(__isl_take isl_aff *aff,
64 __isl_take isl_space *space, __isl_take isl_space *domain);
65 __isl_give isl_aff *isl_aff_reset_domain_space(__isl_take isl_aff *aff,
66 __isl_take isl_space *dim);
67 __isl_give isl_aff *isl_aff_realign_domain(__isl_take isl_aff *aff,
68 __isl_take isl_reordering *r);
70 __isl_give isl_aff *isl_aff_normalize(__isl_take isl_aff *aff);
72 __isl_give isl_aff *isl_aff_expand_divs( __isl_take isl_aff *aff,
73 __isl_take isl_mat *div, int *exp);
75 __isl_give isl_pw_aff *isl_pw_aff_alloc_size(__isl_take isl_space *space,
76 int n);
77 __isl_give isl_pw_aff *isl_pw_aff_reset_space(__isl_take isl_pw_aff *pwaff,
78 __isl_take isl_space *dim);
79 __isl_give isl_pw_aff *isl_pw_aff_reset_domain_space(
80 __isl_take isl_pw_aff *pwaff, __isl_take isl_space *space);
81 __isl_give isl_pw_aff *isl_pw_aff_add_disjoint(
82 __isl_take isl_pw_aff *pwaff1, __isl_take isl_pw_aff *pwaff2);
84 __isl_give isl_pw_aff *isl_pw_aff_union_opt(__isl_take isl_pw_aff *pwaff1,
85 __isl_take isl_pw_aff *pwaff2, int max);
87 __isl_give isl_pw_aff *isl_pw_aff_set_rational(__isl_take isl_pw_aff *pwaff);
88 __isl_give isl_pw_aff_list *isl_pw_aff_list_set_rational(
89 __isl_take isl_pw_aff_list *list);
91 int isl_aff_check_match_domain_space(__isl_keep isl_aff *aff,
92 __isl_keep isl_space *space);
94 #undef BASE
95 #define BASE aff
97 #include <isl_multi_templ.h>
99 __isl_give isl_multi_aff *isl_multi_aff_dup(__isl_keep isl_multi_aff *multi);
101 __isl_give isl_multi_aff *isl_multi_aff_align_divs(
102 __isl_take isl_multi_aff *maff);
104 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_reset_domain_space(
105 __isl_take isl_pw_multi_aff *pwmaff, __isl_take isl_space *space);
106 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_reset_space(
107 __isl_take isl_pw_multi_aff *pwmaff, __isl_take isl_space *space);
108 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_add_disjoint(
109 __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2);
111 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_project_out(
112 __isl_take isl_pw_multi_aff *pma,
113 enum isl_dim_type type, unsigned first, unsigned n);
115 void isl_seq_substitute(isl_int *p, int pos, isl_int *subs,
116 int p_len, int subs_len, isl_int v);
117 void isl_seq_preimage(isl_int *dst, isl_int *src,
118 __isl_keep isl_multi_aff *ma, int n_before, int n_after,
119 int n_div_ma, int n_div_bmap,
120 isl_int f, isl_int c1, isl_int c2, isl_int g, int has_denom);
122 __isl_give isl_pw_multi_aff *isl_pw_multi_aff_substitute(
123 __isl_take isl_pw_multi_aff *pma, enum isl_dim_type type, unsigned pos,
124 __isl_keep isl_pw_aff *subs);
126 int isl_pw_aff_check_match_domain_space(__isl_keep isl_pw_aff *pa,
127 __isl_keep isl_space *space);
129 #undef BASE
130 #define BASE pw_aff
132 #include <isl_multi_templ.h>
134 #endif