2 * Copyright 2017 Sven Verdoolaege
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege.
9 /* These versions of the explicit domain functions are used
10 * when the multi expression cannot have an explicit domain.
13 #include <isl_multi_macro.h>
15 /* Does "multi" have an explicit domain?
19 static int FN(MULTI(BASE
),has_explicit_domain
)(__isl_keep
MULTI(BASE
) *multi
)
24 /* Initialize the explicit domain of "multi".
25 * "multi" cannot have an explicit domain, so this function is never called.
27 static __isl_give
MULTI(BASE
) *FN(MULTI(BASE
),init_explicit_domain
)(
28 __isl_take
MULTI(BASE
) *multi
)
33 /* Intersect the domain of "dst" with the explicit domain of "src".
34 * "src" cannot have an explicit domain, so this function is never called.
36 static __isl_give
MULTI(BASE
) *FN(MULTI(BASE
),intersect_explicit_domain
)(
37 __isl_take
MULTI(BASE
) *dst
, __isl_keep
MULTI(BASE
) *src
)
42 /* Set the explicit domain of "dst" to that of "src".
43 * "src" and "dst" cannot have an explicit domain,
44 * so this function is never called.
46 static __isl_give
MULTI(BASE
) *FN(MULTI(BASE
),copy_explicit_domain
)(
47 __isl_take
MULTI(BASE
) *dst
, __isl_keep
MULTI(BASE
) *src
)
52 /* Intersect the domain of "dst" with the domain product
53 * of the explicit domains of "src1" and "src2".
54 * This function is only called if at least one of "src1" or "src2"
55 * has an explicit domain.
56 * "src1", "src2" and "dst" cannot have an explicit domain,
57 * so this function is never called.
59 static __isl_give
MULTI(BASE
) *
60 FN(MULTI(BASE
),intersect_explicit_domain_product
)(
61 __isl_take
MULTI(BASE
) *dst
, __isl_keep
MULTI(BASE
) *src1
,
62 __isl_keep
MULTI(BASE
) *src2
)
67 /* Align the parameters of the explicit domain of "multi" to those of "space".
68 * "multi" cannot have an explicit domain, so this function is never called.
70 static __isl_give
MULTI(BASE
) *FN(MULTI(BASE
),align_explicit_domain_params
)(
71 __isl_take
MULTI(BASE
) *multi
, __isl_take isl_space
*space
)
73 isl_space_free(space
);
77 /* Replace the space of the explicit domain of "multi" by "space",
78 * without modifying its dimension.
79 * "multi" cannot have an explicit domain, so this function is never called.
81 static __isl_give
MULTI(BASE
) *FN(MULTI(BASE
),reset_explicit_domain_space
)(
82 __isl_take
MULTI(BASE
) *multi
, __isl_take isl_space
*space
)
84 isl_space_free(space
);
88 /* Check whether the explicit domain of "multi" has non-zero coefficients
89 * for any dimension in the given range or if any of these dimensions appear
90 * with non-zero coefficients in any of the integer divisions involved.
91 * "multi" cannot have an explicit domain, so this function is never called.
93 isl_bool
FN(MULTI(BASE
),involves_explicit_domain_dims
)(
94 __isl_keep
MULTI(BASE
) *multi
,
95 enum isl_dim_type type
, unsigned pos
, unsigned n
)
97 return isl_bool_false
;
100 /* Insert "n" dimensions of type "type" at position "pos"
101 * of the explicit domain of "multi".
102 * "multi" cannot have an explicit domain, so this function is never called.
104 __isl_give
MULTI(BASE
) *FN(MULTI(BASE
),insert_explicit_domain_dims
)(
105 __isl_take
MULTI(BASE
) *multi
,
106 enum isl_dim_type type
, unsigned pos
, unsigned n
)
111 /* Drop the "n" dimensions of type "type" starting at position "pos"
112 * of the explicit domain of "multi".
113 * "multi" cannot have an explicit domain, so this function is never called.
115 __isl_give
MULTI(BASE
) *FN(MULTI(BASE
),drop_explicit_domain_dims
)(
116 __isl_take
MULTI(BASE
) *multi
,
117 enum isl_dim_type type
, unsigned pos
, unsigned n
)
122 /* Move the "n" dimensions of "src_type" starting at "src_pos" of
123 * of the explicit domain of "multi" to dimensions of "dst_type" at "dst_pos".
124 * "multi" cannot have an explicit domain, so this function is never called.
126 __isl_give
MULTI(BASE
) *FN(MULTI(BASE
),move_explicit_domain_dims
)(
127 __isl_take
MULTI(BASE
) *multi
,
128 enum isl_dim_type dst_type
, unsigned dst_pos
,
129 enum isl_dim_type src_type
, unsigned src_pos
, unsigned n
)
134 /* Free the explicit domain of "multi".
135 * "multi" cannot have an explicit domain, so this function is never called.
137 static void FN(MULTI(BASE
),free_explicit_domain
)(__isl_keep
MULTI(BASE
) *multi
)
141 /* Do "multi1" and "multi2" have the same explicit domain?
142 * "multi1" and "multi2" cannot have an explicit domain,
143 * so this function is never called.
145 static isl_bool
FN(MULTI(BASE
),equal_explicit_domain
)(
146 __isl_keep
MULTI(BASE
) *multi1
, __isl_keep
MULTI(BASE
) *multi2
)
148 return isl_bool_true
;
151 static isl_stat
FN(MULTI(BASE
),check_explicit_domain
)(
152 __isl_keep
MULTI(BASE
) *multi
) __attribute__ ((unused
));
154 /* Debugging function to check that the explicit domain of "multi"
155 * has the correct space.
156 * "multi" cannot have an explicit domain,
157 * so this function should never be called.
159 static isl_stat
FN(MULTI(BASE
),check_explicit_domain
)(
160 __isl_keep
MULTI(BASE
) *multi
)