1 #ifndef ISL_AFF_PRIVATE_H
2 #define ISL_AFF_PRIVATE_H
7 #include <isl/local_space.h>
9 #include <isl_reordering.h>
11 /* ls represents the domain space.
13 * If the first two elements of "v" (the denominator and the constant term)
14 * are zero, then the isl_aff represents NaN.
26 #include <isl_list_templ.h>
28 struct isl_pw_aff_piece
{
41 struct isl_pw_aff_piece p
[1];
47 #include <isl_list_templ.h>
49 struct isl_pw_multi_aff_piece
{
54 struct isl_pw_multi_aff
{
62 struct isl_pw_multi_aff_piece p
[1];
65 __isl_give isl_aff
*isl_aff_alloc_vec(__isl_take isl_local_space
*ls
,
66 __isl_take isl_vec
*v
);
67 __isl_give isl_aff
*isl_aff_alloc(__isl_take isl_local_space
*ls
);
69 __isl_give isl_aff
*isl_aff_reset_space_and_domain(__isl_take isl_aff
*aff
,
70 __isl_take isl_space
*space
, __isl_take isl_space
*domain
);
71 __isl_give isl_aff
*isl_aff_reset_domain_space(__isl_take isl_aff
*aff
,
72 __isl_take isl_space
*dim
);
73 __isl_give isl_aff
*isl_aff_realign_domain(__isl_take isl_aff
*aff
,
74 __isl_take isl_reordering
*r
);
76 int isl_aff_get_constant(__isl_keep isl_aff
*aff
, isl_int
*v
);
77 __isl_give isl_aff
*isl_aff_set_constant(__isl_take isl_aff
*aff
, isl_int v
);
78 __isl_give isl_aff
*isl_aff_set_coefficient(__isl_take isl_aff
*aff
,
79 enum isl_dim_type type
, int pos
, isl_int v
);
80 __isl_give isl_aff
*isl_aff_add_constant(__isl_take isl_aff
*aff
, isl_int v
);
82 __isl_give isl_aff
*isl_aff_normalize(__isl_take isl_aff
*aff
);
84 __isl_give isl_aff
*isl_aff_expand_divs( __isl_take isl_aff
*aff
,
85 __isl_take isl_mat
*div
, int *exp
);
87 __isl_give isl_pw_aff
*isl_pw_aff_alloc_size(__isl_take isl_space
*space
,
89 __isl_give isl_pw_aff
*isl_pw_aff_reset_space(__isl_take isl_pw_aff
*pwaff
,
90 __isl_take isl_space
*dim
);
91 __isl_give isl_pw_aff
*isl_pw_aff_reset_domain_space(
92 __isl_take isl_pw_aff
*pwaff
, __isl_take isl_space
*space
);
93 __isl_give isl_pw_aff
*isl_pw_aff_add_disjoint(
94 __isl_take isl_pw_aff
*pwaff1
, __isl_take isl_pw_aff
*pwaff2
);
96 __isl_give isl_pw_aff
*isl_pw_aff_union_opt(__isl_take isl_pw_aff
*pwaff1
,
97 __isl_take isl_pw_aff
*pwaff2
, int max
);
99 __isl_give isl_pw_aff
*isl_pw_aff_set_rational(__isl_take isl_pw_aff
*pwaff
);
100 __isl_give isl_pw_aff_list
*isl_pw_aff_list_set_rational(
101 __isl_take isl_pw_aff_list
*list
);
103 __isl_give isl_pw_aff
*isl_pw_aff_scale(__isl_take isl_pw_aff
*pwaff
,
105 __isl_give isl_pw_aff
*isl_pw_aff_scale_down(__isl_take isl_pw_aff
*pwaff
,
108 int isl_aff_matching_params(__isl_keep isl_aff
*aff
,
109 __isl_keep isl_space
*space
);
110 int isl_aff_check_match_domain_space(__isl_keep isl_aff
*aff
,
111 __isl_keep isl_space
*space
);
116 #include <isl_multi_templ.h>
118 __isl_give isl_multi_aff
*isl_multi_aff_dup(__isl_keep isl_multi_aff
*multi
);
120 __isl_give isl_multi_aff
*isl_multi_aff_align_divs(
121 __isl_take isl_multi_aff
*maff
);
123 __isl_give isl_multi_aff
*isl_multi_aff_from_basic_set_equalities(
124 __isl_take isl_basic_set
*bset
);
126 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_reset_domain_space(
127 __isl_take isl_pw_multi_aff
*pwmaff
, __isl_take isl_space
*space
);
128 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_reset_space(
129 __isl_take isl_pw_multi_aff
*pwmaff
, __isl_take isl_space
*space
);
130 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_add_disjoint(
131 __isl_take isl_pw_multi_aff
*pma1
, __isl_take isl_pw_multi_aff
*pma2
);
133 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_project_out(
134 __isl_take isl_pw_multi_aff
*pma
,
135 enum isl_dim_type type
, unsigned first
, unsigned n
);
137 void isl_seq_substitute(isl_int
*p
, int pos
, isl_int
*subs
,
138 int p_len
, int subs_len
, isl_int v
);
139 void isl_seq_preimage(isl_int
*dst
, isl_int
*src
,
140 __isl_keep isl_multi_aff
*ma
, int n_before
, int n_after
,
141 int n_div_ma
, int n_div_bmap
,
142 isl_int f
, isl_int c1
, isl_int c2
, isl_int g
, int has_denom
);
144 __isl_give isl_aff
*isl_aff_substitute_equalities(__isl_take isl_aff
*aff
,
145 __isl_take isl_basic_set
*eq
);
146 __isl_give isl_pw_multi_aff
*isl_pw_multi_aff_substitute(
147 __isl_take isl_pw_multi_aff
*pma
, enum isl_dim_type type
, unsigned pos
,
148 __isl_keep isl_pw_aff
*subs
);
150 int isl_pw_aff_matching_params(__isl_keep isl_pw_aff
*pa
,
151 __isl_keep isl_space
*space
);
152 int isl_pw_aff_check_match_domain_space(__isl_keep isl_pw_aff
*pa
,
153 __isl_keep isl_space
*space
);
158 #include <isl_multi_templ.h>
161 #define EL isl_union_pw_multi_aff
163 #include <isl_list_templ.h>