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
);
32 __isl_give isl_schedule
*isl_schedule_node_get_schedule(
33 __isl_keep isl_schedule_node
*node
);
35 isl_stat
isl_schedule_node_foreach_descendant(
36 __isl_keep isl_schedule_node
*node
,
37 isl_bool (*fn
)(__isl_keep isl_schedule_node
*node
, void *user
),
39 isl_stat
isl_schedule_node_foreach_ancestor_top_down(
40 __isl_keep isl_schedule_node
*node
,
41 isl_stat (*fn
)(__isl_keep isl_schedule_node
*node
, void *user
),
43 __isl_give isl_schedule_node
*isl_schedule_node_map_descendant(
44 __isl_take isl_schedule_node
*node
,
45 __isl_give isl_schedule_node
*(*fn
)(__isl_take isl_schedule_node
*node
,
46 void *user
), void *user
);
48 int isl_schedule_node_get_tree_depth(__isl_keep isl_schedule_node
*node
);
49 isl_bool
isl_schedule_node_has_parent(__isl_keep isl_schedule_node
*node
);
50 isl_bool
isl_schedule_node_has_children(__isl_keep isl_schedule_node
*node
);
51 isl_bool
isl_schedule_node_has_previous_sibling(
52 __isl_keep isl_schedule_node
*node
);
53 isl_bool
isl_schedule_node_has_next_sibling(__isl_keep isl_schedule_node
*node
);
54 int isl_schedule_node_n_children(__isl_keep isl_schedule_node
*node
);
55 int isl_schedule_node_get_child_position(__isl_keep isl_schedule_node
*node
);
56 int isl_schedule_node_get_ancestor_child_position(
57 __isl_keep isl_schedule_node
*node
,
58 __isl_keep isl_schedule_node
*ancestor
);
59 __isl_give isl_schedule_node
*isl_schedule_node_get_child(
60 __isl_keep isl_schedule_node
*node
, int pos
);
61 __isl_give isl_schedule_node
*isl_schedule_node_get_shared_ancestor(
62 __isl_keep isl_schedule_node
*node1
,
63 __isl_keep isl_schedule_node
*node2
);
65 __isl_give isl_schedule_node
*isl_schedule_node_root(
66 __isl_take isl_schedule_node
*node
);
67 __isl_give isl_schedule_node
*isl_schedule_node_parent(
68 __isl_take isl_schedule_node
*node
);
69 __isl_give isl_schedule_node
*isl_schedule_node_ancestor(
70 __isl_take isl_schedule_node
*node
, int generation
);
71 __isl_give isl_schedule_node
*isl_schedule_node_child(
72 __isl_take isl_schedule_node
*node
, int pos
);
73 __isl_give isl_schedule_node
*isl_schedule_node_first_child(
74 __isl_take isl_schedule_node
*node
);
75 __isl_give isl_schedule_node
*isl_schedule_node_previous_sibling(
76 __isl_take isl_schedule_node
*node
);
77 __isl_give isl_schedule_node
*isl_schedule_node_next_sibling(
78 __isl_take isl_schedule_node
*node
);
80 isl_bool
isl_schedule_node_is_subtree_anchored(
81 __isl_keep isl_schedule_node
*node
);
83 __isl_give isl_schedule_node
*isl_schedule_node_group(
84 __isl_take isl_schedule_node
*node
, __isl_take isl_id
*group_id
);
86 __isl_give isl_space
*isl_schedule_node_band_get_space(
87 __isl_keep isl_schedule_node
*node
);
88 __isl_give isl_multi_union_pw_aff
*isl_schedule_node_band_get_partial_schedule(
89 __isl_keep isl_schedule_node
*node
);
90 __isl_give isl_union_map
*isl_schedule_node_band_get_partial_schedule_union_map(
91 __isl_keep isl_schedule_node
*node
);
92 enum isl_ast_loop_type
isl_schedule_node_band_member_get_ast_loop_type(
93 __isl_keep isl_schedule_node
*node
, int pos
);
94 __isl_give isl_schedule_node
*isl_schedule_node_band_member_set_ast_loop_type(
95 __isl_take isl_schedule_node
*node
, int pos
,
96 enum isl_ast_loop_type type
);
97 enum isl_ast_loop_type
isl_schedule_node_band_member_get_isolate_ast_loop_type(
98 __isl_keep isl_schedule_node
*node
, int pos
);
99 __isl_give isl_schedule_node
*
100 isl_schedule_node_band_member_set_isolate_ast_loop_type(
101 __isl_take isl_schedule_node
*node
, int pos
,
102 enum isl_ast_loop_type type
);
103 __isl_give isl_union_set
*isl_schedule_node_band_get_ast_build_options(
104 __isl_keep isl_schedule_node
*node
);
105 __isl_give isl_schedule_node
*isl_schedule_node_band_set_ast_build_options(
106 __isl_take isl_schedule_node
*node
, __isl_take isl_union_set
*options
);
107 unsigned isl_schedule_node_band_n_member(__isl_keep isl_schedule_node
*node
);
108 isl_bool
isl_schedule_node_band_member_get_coincident(
109 __isl_keep isl_schedule_node
*node
, int pos
);
110 __isl_give isl_schedule_node
*isl_schedule_node_band_member_set_coincident(
111 __isl_take isl_schedule_node
*node
, int pos
, int coincident
);
112 isl_bool
isl_schedule_node_band_get_permutable(
113 __isl_keep isl_schedule_node
*node
);
114 __isl_give isl_schedule_node
*isl_schedule_node_band_set_permutable(
115 __isl_take isl_schedule_node
*node
, int permutable
);
117 isl_stat
isl_options_set_tile_scale_tile_loops(isl_ctx
*ctx
, int val
);
118 int isl_options_get_tile_scale_tile_loops(isl_ctx
*ctx
);
119 isl_stat
isl_options_set_tile_shift_point_loops(isl_ctx
*ctx
, int val
);
120 int isl_options_get_tile_shift_point_loops(isl_ctx
*ctx
);
122 __isl_give isl_schedule_node
*isl_schedule_node_band_scale(
123 __isl_take isl_schedule_node
*node
, __isl_take isl_multi_val
*mv
);
124 __isl_give isl_schedule_node
*isl_schedule_node_band_scale_down(
125 __isl_take isl_schedule_node
*node
, __isl_take isl_multi_val
*mv
);
126 __isl_give isl_schedule_node
*isl_schedule_node_band_tile(
127 __isl_take isl_schedule_node
*node
, __isl_take isl_multi_val
*sizes
);
128 __isl_give isl_schedule_node
*isl_schedule_node_band_sink(
129 __isl_take isl_schedule_node
*node
);
130 __isl_give isl_schedule_node
*isl_schedule_node_band_split(
131 __isl_take isl_schedule_node
*node
, int pos
);
133 __isl_give isl_set
*isl_schedule_node_context_get_context(
134 __isl_keep isl_schedule_node
*node
);
135 __isl_give isl_union_set
*isl_schedule_node_domain_get_domain(
136 __isl_keep isl_schedule_node
*node
);
137 __isl_give isl_union_map
*isl_schedule_node_expansion_get_expansion(
138 __isl_keep isl_schedule_node
*node
);
139 __isl_give isl_union_pw_multi_aff
*isl_schedule_node_expansion_get_contraction(
140 __isl_keep isl_schedule_node
*node
);
141 __isl_give isl_union_map
*isl_schedule_node_extension_get_extension(
142 __isl_keep isl_schedule_node
*node
);
143 __isl_give isl_union_set
*isl_schedule_node_filter_get_filter(
144 __isl_keep isl_schedule_node
*node
);
145 __isl_give isl_set
*isl_schedule_node_guard_get_guard(
146 __isl_keep isl_schedule_node
*node
);
147 __isl_give isl_id
*isl_schedule_node_mark_get_id(
148 __isl_keep isl_schedule_node
*node
);
150 int isl_schedule_node_get_schedule_depth(__isl_keep isl_schedule_node
*node
);
151 __isl_give isl_union_set
*isl_schedule_node_get_domain(
152 __isl_keep isl_schedule_node
*node
);
153 __isl_give isl_union_set
*isl_schedule_node_get_universe_domain(
154 __isl_keep isl_schedule_node
*node
);
155 __isl_give isl_multi_union_pw_aff
*
156 isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(
157 __isl_keep isl_schedule_node
*node
);
158 __isl_give isl_union_pw_multi_aff
*
159 isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(
160 __isl_keep isl_schedule_node
*node
);
161 __isl_give isl_union_map
*isl_schedule_node_get_prefix_schedule_union_map(
162 __isl_keep isl_schedule_node
*node
);
163 __isl_give isl_union_map
*isl_schedule_node_get_prefix_schedule_relation(
164 __isl_keep isl_schedule_node
*node
);
165 __isl_give isl_union_map
*isl_schedule_node_get_subtree_schedule_union_map(
166 __isl_keep isl_schedule_node
*node
);
167 __isl_give isl_union_map
*isl_schedule_node_get_subtree_expansion(
168 __isl_keep isl_schedule_node
*node
);
169 __isl_give isl_union_pw_multi_aff
*isl_schedule_node_get_subtree_contraction(
170 __isl_keep isl_schedule_node
*node
);
172 __isl_give isl_schedule_node
*isl_schedule_node_insert_context(
173 __isl_take isl_schedule_node
*node
, __isl_take isl_set
*context
);
174 __isl_give isl_schedule_node
*isl_schedule_node_insert_partial_schedule(
175 __isl_take isl_schedule_node
*node
,
176 __isl_take isl_multi_union_pw_aff
*schedule
);
177 __isl_give isl_schedule_node
*isl_schedule_node_insert_filter(
178 __isl_take isl_schedule_node
*node
, __isl_take isl_union_set
*filter
);
179 __isl_give isl_schedule_node
*isl_schedule_node_insert_guard(
180 __isl_take isl_schedule_node
*node
, __isl_take isl_set
*context
);
181 __isl_give isl_schedule_node
*isl_schedule_node_insert_mark(
182 __isl_take isl_schedule_node
*node
, __isl_take isl_id
*mark
);
183 __isl_give isl_schedule_node
*isl_schedule_node_insert_sequence(
184 __isl_take isl_schedule_node
*node
,
185 __isl_take isl_union_set_list
*filters
);
186 __isl_give isl_schedule_node
*isl_schedule_node_insert_set(
187 __isl_take isl_schedule_node
*node
,
188 __isl_take isl_union_set_list
*filters
);
190 __isl_give isl_schedule_node
*isl_schedule_node_cut(
191 __isl_take isl_schedule_node
*node
);
192 __isl_give isl_schedule_node
*isl_schedule_node_delete(
193 __isl_take isl_schedule_node
*node
);
195 __isl_give isl_schedule_node
*isl_schedule_node_order_after(
196 __isl_take isl_schedule_node
*node
, __isl_take isl_union_set
*filter
);
198 __isl_give isl_schedule_node
*isl_schedule_node_graft_before(
199 __isl_take isl_schedule_node
*node
,
200 __isl_take isl_schedule_node
*graft
);
201 __isl_give isl_schedule_node
*isl_schedule_node_graft_after(
202 __isl_take isl_schedule_node
*node
,
203 __isl_take isl_schedule_node
*graft
);
205 __isl_give isl_schedule_node
*isl_schedule_node_reset_user(
206 __isl_take isl_schedule_node
*node
);
207 __isl_give isl_schedule_node
*isl_schedule_node_align_params(
208 __isl_take isl_schedule_node
*node
, __isl_take isl_space
*space
);
210 __isl_give isl_printer
*isl_printer_print_schedule_node(
211 __isl_take isl_printer
*p
, __isl_keep isl_schedule_node
*node
);
212 void isl_schedule_node_dump(__isl_keep isl_schedule_node
*node
);
214 #if defined(__cplusplus)