1 #ifndef ISL_SCHEDULE_NODE_H
2 #define ISL_SCHEDULE_NODE_H
4 #include <isl/schedule_type.h>
5 #include <isl/union_set_type.h>
6 #include <isl/aff_type.h>
7 #include <isl/ast_type.h>
11 #if defined(__cplusplus)
15 __isl_give isl_schedule_node
*isl_schedule_node_from_domain(
16 __isl_take isl_union_set
*domain
);
17 __isl_give isl_schedule_node
*isl_schedule_node_from_extension(
18 __isl_take isl_union_map
*extension
);
19 __isl_give isl_schedule_node
*isl_schedule_node_copy(
20 __isl_keep isl_schedule_node
*node
);
21 __isl_null isl_schedule_node
*isl_schedule_node_free(
22 __isl_take isl_schedule_node
*node
);
24 isl_bool
isl_schedule_node_is_equal(__isl_keep isl_schedule_node
*node1
,
25 __isl_keep isl_schedule_node
*node2
);
27 isl_ctx
*isl_schedule_node_get_ctx(__isl_keep isl_schedule_node
*node
);
28 enum isl_schedule_node_type
isl_schedule_node_get_type(
29 __isl_keep isl_schedule_node
*node
);
30 enum isl_schedule_node_type
isl_schedule_node_get_parent_type(
31 __isl_keep isl_schedule_node
*node
);
33 __isl_give isl_schedule
*isl_schedule_node_get_schedule(
34 __isl_keep isl_schedule_node
*node
);
36 isl_stat
isl_schedule_node_foreach_descendant_top_down(
37 __isl_keep isl_schedule_node
*node
,
38 isl_bool (*fn
)(__isl_keep isl_schedule_node
*node
, void *user
),
40 isl_stat
isl_schedule_node_foreach_ancestor_top_down(
41 __isl_keep isl_schedule_node
*node
,
42 isl_stat (*fn
)(__isl_keep isl_schedule_node
*node
, void *user
),
44 __isl_give isl_schedule_node
*isl_schedule_node_map_descendant_bottom_up(
45 __isl_take isl_schedule_node
*node
,
46 __isl_give isl_schedule_node
*(*fn
)(__isl_take isl_schedule_node
*node
,
47 void *user
), void *user
);
49 int isl_schedule_node_get_tree_depth(__isl_keep isl_schedule_node
*node
);
50 isl_bool
isl_schedule_node_has_parent(__isl_keep isl_schedule_node
*node
);
51 isl_bool
isl_schedule_node_has_children(__isl_keep isl_schedule_node
*node
);
52 isl_bool
isl_schedule_node_has_previous_sibling(
53 __isl_keep isl_schedule_node
*node
);
54 isl_bool
isl_schedule_node_has_next_sibling(__isl_keep isl_schedule_node
*node
);
55 int isl_schedule_node_n_children(__isl_keep isl_schedule_node
*node
);
56 int isl_schedule_node_get_child_position(__isl_keep isl_schedule_node
*node
);
57 int isl_schedule_node_get_ancestor_child_position(
58 __isl_keep isl_schedule_node
*node
,
59 __isl_keep isl_schedule_node
*ancestor
);
60 __isl_give isl_schedule_node
*isl_schedule_node_get_child(
61 __isl_keep isl_schedule_node
*node
, int pos
);
62 __isl_give isl_schedule_node
*isl_schedule_node_get_shared_ancestor(
63 __isl_keep isl_schedule_node
*node1
,
64 __isl_keep isl_schedule_node
*node2
);
66 __isl_give isl_schedule_node
*isl_schedule_node_root(
67 __isl_take isl_schedule_node
*node
);
69 __isl_give isl_schedule_node
*isl_schedule_node_parent(
70 __isl_take isl_schedule_node
*node
);
71 __isl_give isl_schedule_node
*isl_schedule_node_ancestor(
72 __isl_take isl_schedule_node
*node
, int generation
);
74 __isl_give isl_schedule_node
*isl_schedule_node_child(
75 __isl_take isl_schedule_node
*node
, int pos
);
76 __isl_give isl_schedule_node
*isl_schedule_node_first_child(
77 __isl_take isl_schedule_node
*node
);
78 __isl_give isl_schedule_node
*isl_schedule_node_previous_sibling(
79 __isl_take isl_schedule_node
*node
);
80 __isl_give isl_schedule_node
*isl_schedule_node_next_sibling(
81 __isl_take isl_schedule_node
*node
);
83 isl_bool
isl_schedule_node_is_subtree_anchored(
84 __isl_keep isl_schedule_node
*node
);
86 __isl_give isl_schedule_node
*isl_schedule_node_group(
87 __isl_take isl_schedule_node
*node
, __isl_take isl_id
*group_id
);
89 __isl_give isl_schedule_node
*isl_schedule_node_sequence_splice_child(
90 __isl_take isl_schedule_node
*node
, int pos
);
92 __isl_give isl_space
*isl_schedule_node_band_get_space(
93 __isl_keep isl_schedule_node
*node
);
94 __isl_give isl_multi_union_pw_aff
*isl_schedule_node_band_get_partial_schedule(
95 __isl_keep isl_schedule_node
*node
);
96 __isl_give isl_union_map
*isl_schedule_node_band_get_partial_schedule_union_map(
97 __isl_keep isl_schedule_node
*node
);
98 enum isl_ast_loop_type
isl_schedule_node_band_member_get_ast_loop_type(
99 __isl_keep isl_schedule_node
*node
, int pos
);
100 __isl_give isl_schedule_node
*isl_schedule_node_band_member_set_ast_loop_type(
101 __isl_take isl_schedule_node
*node
, int pos
,
102 enum isl_ast_loop_type type
);
103 enum isl_ast_loop_type
isl_schedule_node_band_member_get_isolate_ast_loop_type(
104 __isl_keep isl_schedule_node
*node
, int pos
);
105 __isl_give isl_schedule_node
*
106 isl_schedule_node_band_member_set_isolate_ast_loop_type(
107 __isl_take isl_schedule_node
*node
, int pos
,
108 enum isl_ast_loop_type type
);
109 __isl_give isl_union_set
*isl_schedule_node_band_get_ast_build_options(
110 __isl_keep isl_schedule_node
*node
);
111 __isl_give isl_schedule_node
*isl_schedule_node_band_set_ast_build_options(
112 __isl_take isl_schedule_node
*node
, __isl_take isl_union_set
*options
);
113 __isl_give isl_set
*isl_schedule_node_band_get_ast_isolate_option(
114 __isl_keep isl_schedule_node
*node
);
115 unsigned isl_schedule_node_band_n_member(__isl_keep isl_schedule_node
*node
);
117 isl_bool
isl_schedule_node_band_member_get_coincident(
118 __isl_keep isl_schedule_node
*node
, int pos
);
120 __isl_give isl_schedule_node
*isl_schedule_node_band_member_set_coincident(
121 __isl_take isl_schedule_node
*node
, int pos
, int coincident
);
122 isl_bool
isl_schedule_node_band_get_permutable(
123 __isl_keep isl_schedule_node
*node
);
124 __isl_give isl_schedule_node
*isl_schedule_node_band_set_permutable(
125 __isl_take isl_schedule_node
*node
, int permutable
);
127 isl_stat
isl_options_set_tile_scale_tile_loops(isl_ctx
*ctx
, int val
);
128 int isl_options_get_tile_scale_tile_loops(isl_ctx
*ctx
);
129 isl_stat
isl_options_set_tile_shift_point_loops(isl_ctx
*ctx
, int val
);
130 int isl_options_get_tile_shift_point_loops(isl_ctx
*ctx
);
132 __isl_give isl_schedule_node
*isl_schedule_node_band_scale(
133 __isl_take isl_schedule_node
*node
, __isl_take isl_multi_val
*mv
);
134 __isl_give isl_schedule_node
*isl_schedule_node_band_scale_down(
135 __isl_take isl_schedule_node
*node
, __isl_take isl_multi_val
*mv
);
136 __isl_give isl_schedule_node
*isl_schedule_node_band_mod(
137 __isl_take isl_schedule_node
*node
, __isl_take isl_multi_val
*mv
);
138 __isl_give isl_schedule_node
*isl_schedule_node_band_shift(
139 __isl_take isl_schedule_node
*node
,
140 __isl_take isl_multi_union_pw_aff
*shift
);
141 __isl_give isl_schedule_node
*isl_schedule_node_band_tile(
142 __isl_take isl_schedule_node
*node
, __isl_take isl_multi_val
*sizes
);
143 __isl_give isl_schedule_node
*isl_schedule_node_band_sink(
144 __isl_take isl_schedule_node
*node
);
145 __isl_give isl_schedule_node
*isl_schedule_node_band_split(
146 __isl_take isl_schedule_node
*node
, int pos
);
148 __isl_give isl_set
*isl_schedule_node_context_get_context(
149 __isl_keep isl_schedule_node
*node
);
150 __isl_give isl_union_set
*isl_schedule_node_domain_get_domain(
151 __isl_keep isl_schedule_node
*node
);
152 __isl_give isl_union_map
*isl_schedule_node_expansion_get_expansion(
153 __isl_keep isl_schedule_node
*node
);
154 __isl_give isl_union_pw_multi_aff
*isl_schedule_node_expansion_get_contraction(
155 __isl_keep isl_schedule_node
*node
);
156 __isl_give isl_union_map
*isl_schedule_node_extension_get_extension(
157 __isl_keep isl_schedule_node
*node
);
158 __isl_give isl_union_set
*isl_schedule_node_filter_get_filter(
159 __isl_keep isl_schedule_node
*node
);
160 __isl_give isl_set
*isl_schedule_node_guard_get_guard(
161 __isl_keep isl_schedule_node
*node
);
162 __isl_give isl_id
*isl_schedule_node_mark_get_id(
163 __isl_keep isl_schedule_node
*node
);
165 int isl_schedule_node_get_schedule_depth(__isl_keep isl_schedule_node
*node
);
166 __isl_give isl_union_set
*isl_schedule_node_get_domain(
167 __isl_keep isl_schedule_node
*node
);
168 __isl_give isl_union_set
*isl_schedule_node_get_universe_domain(
169 __isl_keep isl_schedule_node
*node
);
171 __isl_give isl_multi_union_pw_aff
*
172 isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(
173 __isl_keep isl_schedule_node
*node
);
175 __isl_give isl_union_pw_multi_aff
*
176 isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(
177 __isl_keep isl_schedule_node
*node
);
179 __isl_give isl_union_map
*isl_schedule_node_get_prefix_schedule_union_map(
180 __isl_keep isl_schedule_node
*node
);
181 __isl_give isl_union_map
*isl_schedule_node_get_prefix_schedule_relation(
182 __isl_keep isl_schedule_node
*node
);
183 __isl_give isl_union_map
*isl_schedule_node_get_subtree_schedule_union_map(
184 __isl_keep isl_schedule_node
*node
);
185 __isl_give isl_union_map
*isl_schedule_node_get_subtree_expansion(
186 __isl_keep isl_schedule_node
*node
);
187 __isl_give isl_union_pw_multi_aff
*isl_schedule_node_get_subtree_contraction(
188 __isl_keep isl_schedule_node
*node
);
190 __isl_give isl_schedule_node
*isl_schedule_node_insert_context(
191 __isl_take isl_schedule_node
*node
, __isl_take isl_set
*context
);
192 __isl_give isl_schedule_node
*isl_schedule_node_insert_partial_schedule(
193 __isl_take isl_schedule_node
*node
,
194 __isl_take isl_multi_union_pw_aff
*schedule
);
195 __isl_give isl_schedule_node
*isl_schedule_node_insert_filter(
196 __isl_take isl_schedule_node
*node
, __isl_take isl_union_set
*filter
);
197 __isl_give isl_schedule_node
*isl_schedule_node_insert_guard(
198 __isl_take isl_schedule_node
*node
, __isl_take isl_set
*context
);
199 __isl_give isl_schedule_node
*isl_schedule_node_insert_mark(
200 __isl_take isl_schedule_node
*node
, __isl_take isl_id
*mark
);
201 __isl_give isl_schedule_node
*isl_schedule_node_insert_sequence(
202 __isl_take isl_schedule_node
*node
,
203 __isl_take isl_union_set_list
*filters
);
204 __isl_give isl_schedule_node
*isl_schedule_node_insert_set(
205 __isl_take isl_schedule_node
*node
,
206 __isl_take isl_union_set_list
*filters
);
208 __isl_give isl_schedule_node
*isl_schedule_node_cut(
209 __isl_take isl_schedule_node
*node
);
210 __isl_give isl_schedule_node
*isl_schedule_node_delete(
211 __isl_take isl_schedule_node
*node
);
213 __isl_give isl_schedule_node
*isl_schedule_node_order_before(
214 __isl_take isl_schedule_node
*node
, __isl_take isl_union_set
*filter
);
215 __isl_give isl_schedule_node
*isl_schedule_node_order_after(
216 __isl_take isl_schedule_node
*node
, __isl_take isl_union_set
*filter
);
218 __isl_give isl_schedule_node
*isl_schedule_node_graft_before(
219 __isl_take isl_schedule_node
*node
,
220 __isl_take isl_schedule_node
*graft
);
221 __isl_give isl_schedule_node
*isl_schedule_node_graft_after(
222 __isl_take isl_schedule_node
*node
,
223 __isl_take isl_schedule_node
*graft
);
225 __isl_give isl_schedule_node
*isl_schedule_node_reset_user(
226 __isl_take isl_schedule_node
*node
);
227 __isl_give isl_schedule_node
*isl_schedule_node_align_params(
228 __isl_take isl_schedule_node
*node
, __isl_take isl_space
*space
);
230 __isl_give isl_printer
*isl_printer_print_schedule_node(
231 __isl_take isl_printer
*p
, __isl_keep isl_schedule_node
*node
);
232 void isl_schedule_node_dump(__isl_keep isl_schedule_node
*node
);
233 __isl_give
char *isl_schedule_node_to_str(__isl_keep isl_schedule_node
*node
);
235 #if defined(__cplusplus)