1 #ifndef ISL_SCHEDULE_NODE_H 2 #define ISL_SCHEDULE_NODE_H 3 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> 8 #include <isl/val_type.h> 9 #include <isl/space_type.h> 10 #include <isl/id_type.h> 11 12 #if defined(__cplusplus) 13 extern "C" { 14 #endif 15 16 __isl_export 17 __isl_give isl_schedule_node *isl_schedule_node_from_domain( 18 __isl_take isl_union_set *domain); 19 __isl_export 20 __isl_give isl_schedule_node *isl_schedule_node_from_extension( 21 __isl_take isl_union_map *extension); 22 __isl_give isl_schedule_node *isl_schedule_node_copy( 23 __isl_keep isl_schedule_node *node); 24 __isl_null isl_schedule_node *isl_schedule_node_free( 25 __isl_take isl_schedule_node *node); 26 27 __isl_export 28 isl_bool isl_schedule_node_is_equal(__isl_keep isl_schedule_node *node1, 29 __isl_keep isl_schedule_node *node2); 30 31 isl_ctx *isl_schedule_node_get_ctx(__isl_keep isl_schedule_node *node); 32 __isl_subclass(isl_schedule_node) 33 enum isl_schedule_node_type isl_schedule_node_get_type( 34 __isl_keep isl_schedule_node *node); 35 enum isl_schedule_node_type isl_schedule_node_get_parent_type( 36 __isl_keep isl_schedule_node *node); 37 __isl_export 38 __isl_give isl_schedule *isl_schedule_node_get_schedule( 39 __isl_keep isl_schedule_node *node); 40 41 __isl_export 42 isl_stat isl_schedule_node_foreach_descendant_top_down( 43 __isl_keep isl_schedule_node *node, 44 isl_bool (*fn)(__isl_keep isl_schedule_node *node, void *user), 45 void *user); 46 __isl_export 47 isl_bool isl_schedule_node_every_descendant(__isl_keep isl_schedule_node *node, 48 isl_bool (*test)(__isl_keep isl_schedule_node *node, void *user), 49 void *user); 50 __isl_export 51 isl_stat isl_schedule_node_foreach_ancestor_top_down( 52 __isl_keep isl_schedule_node *node, 53 isl_stat (*fn)(__isl_keep isl_schedule_node *node, void *user), 54 void *user); 55 __isl_export 56 __isl_give isl_schedule_node *isl_schedule_node_map_descendant_bottom_up( 57 __isl_take isl_schedule_node *node, 58 __isl_give isl_schedule_node *(*fn)(__isl_take isl_schedule_node *node, 59 void *user), void *user); 60 61 __isl_export 62 isl_size isl_schedule_node_get_tree_depth(__isl_keep isl_schedule_node *node); 63 __isl_export 64 isl_bool isl_schedule_node_has_parent(__isl_keep isl_schedule_node *node); 65 __isl_export 66 isl_bool isl_schedule_node_has_children(__isl_keep isl_schedule_node *node); 67 __isl_export 68 isl_bool isl_schedule_node_has_previous_sibling( 69 __isl_keep isl_schedule_node *node); 70 __isl_export 71 isl_bool isl_schedule_node_has_next_sibling(__isl_keep isl_schedule_node *node); 72 __isl_export 73 isl_size isl_schedule_node_n_children(__isl_keep isl_schedule_node *node); 74 __isl_export 75 isl_size isl_schedule_node_get_child_position( 76 __isl_keep isl_schedule_node *node); 77 __isl_export 78 isl_size isl_schedule_node_get_ancestor_child_position( 79 __isl_keep isl_schedule_node *node, 80 __isl_keep isl_schedule_node *ancestor); 81 __isl_give isl_schedule_node *isl_schedule_node_get_child( 82 __isl_keep isl_schedule_node *node, int pos); 83 __isl_export 84 __isl_give isl_schedule_node *isl_schedule_node_get_shared_ancestor( 85 __isl_keep isl_schedule_node *node1, 86 __isl_keep isl_schedule_node *node2); 87 88 __isl_export 89 __isl_give isl_schedule_node *isl_schedule_node_root( 90 __isl_take isl_schedule_node *node); 91 __isl_export 92 __isl_give isl_schedule_node *isl_schedule_node_parent( 93 __isl_take isl_schedule_node *node); 94 __isl_export 95 __isl_give isl_schedule_node *isl_schedule_node_ancestor( 96 __isl_take isl_schedule_node *node, int generation); 97 __isl_export 98 __isl_give isl_schedule_node *isl_schedule_node_child( 99 __isl_take isl_schedule_node *node, int pos); 100 __isl_export 101 __isl_give isl_schedule_node *isl_schedule_node_first_child( 102 __isl_take isl_schedule_node *node); 103 __isl_export 104 __isl_give isl_schedule_node *isl_schedule_node_previous_sibling( 105 __isl_take isl_schedule_node *node); 106 __isl_export 107 __isl_give isl_schedule_node *isl_schedule_node_next_sibling( 108 __isl_take isl_schedule_node *node); 109 110 __isl_export 111 isl_bool isl_schedule_node_is_subtree_anchored( 112 __isl_keep isl_schedule_node *node); 113 114 __isl_give isl_schedule_node *isl_schedule_node_group( 115 __isl_take isl_schedule_node *node, __isl_take isl_id *group_id); 116 117 __isl_give isl_schedule_node *isl_schedule_node_sequence_splice_child( 118 __isl_take isl_schedule_node *node, int pos); 119 120 __isl_give isl_space *isl_schedule_node_band_get_space( 121 __isl_keep isl_schedule_node *node); 122 __isl_export 123 __isl_give isl_multi_union_pw_aff *isl_schedule_node_band_get_partial_schedule( 124 __isl_keep isl_schedule_node *node); 125 __isl_give isl_union_map *isl_schedule_node_band_get_partial_schedule_union_map( 126 __isl_keep isl_schedule_node *node); 127 enum isl_ast_loop_type isl_schedule_node_band_member_get_ast_loop_type( 128 __isl_keep isl_schedule_node *node, int pos); 129 __isl_export 130 __isl_give isl_schedule_node *isl_schedule_node_band_member_set_ast_loop_type( 131 __isl_take isl_schedule_node *node, int pos, 132 enum isl_ast_loop_type type); 133 enum isl_ast_loop_type isl_schedule_node_band_member_get_isolate_ast_loop_type( 134 __isl_keep isl_schedule_node *node, int pos); 135 __isl_give isl_schedule_node * 136 isl_schedule_node_band_member_set_isolate_ast_loop_type( 137 __isl_take isl_schedule_node *node, int pos, 138 enum isl_ast_loop_type type); 139 __isl_export 140 __isl_give isl_union_set *isl_schedule_node_band_get_ast_build_options( 141 __isl_keep isl_schedule_node *node); 142 __isl_export 143 __isl_give isl_schedule_node *isl_schedule_node_band_set_ast_build_options( 144 __isl_take isl_schedule_node *node, __isl_take isl_union_set *options); 145 __isl_export 146 __isl_give isl_set *isl_schedule_node_band_get_ast_isolate_option( 147 __isl_keep isl_schedule_node *node); 148 __isl_export 149 isl_size isl_schedule_node_band_n_member(__isl_keep isl_schedule_node *node); 150 __isl_export 151 isl_bool isl_schedule_node_band_member_get_coincident( 152 __isl_keep isl_schedule_node *node, int pos); 153 __isl_export 154 __isl_give isl_schedule_node *isl_schedule_node_band_member_set_coincident( 155 __isl_take isl_schedule_node *node, int pos, int coincident); 156 __isl_export 157 isl_bool isl_schedule_node_band_get_permutable( 158 __isl_keep isl_schedule_node *node); 159 __isl_export 160 __isl_give isl_schedule_node *isl_schedule_node_band_set_permutable( 161 __isl_take isl_schedule_node *node, int permutable); 162 163 isl_stat isl_options_set_tile_scale_tile_loops(isl_ctx *ctx, int val); 164 int isl_options_get_tile_scale_tile_loops(isl_ctx *ctx); 165 isl_stat isl_options_set_tile_shift_point_loops(isl_ctx *ctx, int val); 166 int isl_options_get_tile_shift_point_loops(isl_ctx *ctx); 167 168 __isl_export 169 __isl_give isl_schedule_node *isl_schedule_node_band_scale( 170 __isl_take isl_schedule_node *node, __isl_take isl_multi_val *mv); 171 __isl_export 172 __isl_give isl_schedule_node *isl_schedule_node_band_scale_down( 173 __isl_take isl_schedule_node *node, __isl_take isl_multi_val *mv); 174 __isl_export 175 __isl_give isl_schedule_node *isl_schedule_node_band_mod( 176 __isl_take isl_schedule_node *node, __isl_take isl_multi_val *mv); 177 __isl_export 178 __isl_give isl_schedule_node *isl_schedule_node_band_shift( 179 __isl_take isl_schedule_node *node, 180 __isl_take isl_multi_union_pw_aff *shift); 181 __isl_export 182 __isl_give isl_schedule_node *isl_schedule_node_band_tile( 183 __isl_take isl_schedule_node *node, __isl_take isl_multi_val *sizes); 184 __isl_give isl_schedule_node *isl_schedule_node_band_sink( 185 __isl_take isl_schedule_node *node); 186 __isl_export 187 __isl_give isl_schedule_node *isl_schedule_node_band_split( 188 __isl_take isl_schedule_node *node, int pos); 189 190 __isl_export 191 __isl_give isl_set *isl_schedule_node_context_get_context( 192 __isl_keep isl_schedule_node *node); 193 __isl_export 194 __isl_give isl_union_set *isl_schedule_node_domain_get_domain( 195 __isl_keep isl_schedule_node *node); 196 __isl_export 197 __isl_give isl_union_map *isl_schedule_node_expansion_get_expansion( 198 __isl_keep isl_schedule_node *node); 199 __isl_export 200 __isl_give isl_union_pw_multi_aff *isl_schedule_node_expansion_get_contraction( 201 __isl_keep isl_schedule_node *node); 202 __isl_export 203 __isl_give isl_union_map *isl_schedule_node_extension_get_extension( 204 __isl_keep isl_schedule_node *node); 205 __isl_export 206 __isl_give isl_union_set *isl_schedule_node_filter_get_filter( 207 __isl_keep isl_schedule_node *node); 208 __isl_export 209 __isl_give isl_set *isl_schedule_node_guard_get_guard( 210 __isl_keep isl_schedule_node *node); 211 __isl_give isl_id *isl_schedule_node_mark_get_id( 212 __isl_keep isl_schedule_node *node); 213 214 isl_size isl_schedule_node_get_schedule_depth( 215 __isl_keep isl_schedule_node *node); 216 __isl_give isl_union_set *isl_schedule_node_get_domain( 217 __isl_keep isl_schedule_node *node); 218 __isl_give isl_union_set *isl_schedule_node_get_universe_domain( 219 __isl_keep isl_schedule_node *node); 220 __isl_export 221 __isl_give isl_multi_union_pw_aff * 222 isl_schedule_node_get_prefix_schedule_multi_union_pw_aff( 223 __isl_keep isl_schedule_node *node); 224 __isl_export 225 __isl_give isl_union_pw_multi_aff * 226 isl_schedule_node_get_prefix_schedule_union_pw_multi_aff( 227 __isl_keep isl_schedule_node *node); 228 __isl_export 229 __isl_give isl_union_map *isl_schedule_node_get_prefix_schedule_union_map( 230 __isl_keep isl_schedule_node *node); 231 __isl_give isl_union_map *isl_schedule_node_get_prefix_schedule_relation( 232 __isl_keep isl_schedule_node *node); 233 __isl_give isl_union_map *isl_schedule_node_get_subtree_schedule_union_map( 234 __isl_keep isl_schedule_node *node); 235 __isl_give isl_union_map *isl_schedule_node_get_subtree_expansion( 236 __isl_keep isl_schedule_node *node); 237 __isl_give isl_union_pw_multi_aff *isl_schedule_node_get_subtree_contraction( 238 __isl_keep isl_schedule_node *node); 239 240 __isl_export 241 __isl_give isl_schedule_node *isl_schedule_node_insert_context( 242 __isl_take isl_schedule_node *node, __isl_take isl_set *context); 243 __isl_export 244 __isl_give isl_schedule_node *isl_schedule_node_insert_partial_schedule( 245 __isl_take isl_schedule_node *node, 246 __isl_take isl_multi_union_pw_aff *schedule); 247 __isl_export 248 __isl_give isl_schedule_node *isl_schedule_node_insert_filter( 249 __isl_take isl_schedule_node *node, __isl_take isl_union_set *filter); 250 __isl_export 251 __isl_give isl_schedule_node *isl_schedule_node_insert_guard( 252 __isl_take isl_schedule_node *node, __isl_take isl_set *context); 253 __isl_export 254 __isl_give isl_schedule_node *isl_schedule_node_insert_mark( 255 __isl_take isl_schedule_node *node, __isl_take isl_id *mark); 256 __isl_export 257 __isl_give isl_schedule_node *isl_schedule_node_insert_sequence( 258 __isl_take isl_schedule_node *node, 259 __isl_take isl_union_set_list *filters); 260 __isl_export 261 __isl_give isl_schedule_node *isl_schedule_node_insert_set( 262 __isl_take isl_schedule_node *node, 263 __isl_take isl_union_set_list *filters); 264 265 __isl_give isl_schedule_node *isl_schedule_node_cut( 266 __isl_take isl_schedule_node *node); 267 __isl_give isl_schedule_node *isl_schedule_node_delete( 268 __isl_take isl_schedule_node *node); 269 270 __isl_export 271 __isl_give isl_schedule_node *isl_schedule_node_order_before( 272 __isl_take isl_schedule_node *node, __isl_take isl_union_set *filter); 273 __isl_export 274 __isl_give isl_schedule_node *isl_schedule_node_order_after( 275 __isl_take isl_schedule_node *node, __isl_take isl_union_set *filter); 276 277 __isl_export 278 __isl_give isl_schedule_node *isl_schedule_node_graft_before( 279 __isl_take isl_schedule_node *node, 280 __isl_take isl_schedule_node *graft); 281 __isl_export 282 __isl_give isl_schedule_node *isl_schedule_node_graft_after( 283 __isl_take isl_schedule_node *node, 284 __isl_take isl_schedule_node *graft); 285 286 __isl_give isl_schedule_node *isl_schedule_node_reset_user( 287 __isl_take isl_schedule_node *node); 288 __isl_give isl_schedule_node *isl_schedule_node_align_params( 289 __isl_take isl_schedule_node *node, __isl_take isl_space *space); 290 291 __isl_give isl_printer *isl_printer_print_schedule_node( 292 __isl_take isl_printer *p, __isl_keep isl_schedule_node *node); 293 void isl_schedule_node_dump(__isl_keep isl_schedule_node *node); 294 __isl_give char *isl_schedule_node_to_str(__isl_keep isl_schedule_node *node); 295 296 #if defined(__cplusplus) 297 } 298 #endif 299 300 #endif 301