126 lines · c
1#ifndef ISL_SCHEDULE_BAND_H2#define ISL_SCHEDULE_BAND_H3 4#include <isl/aff.h>5#include <isl/ast_type.h>6#include <isl/union_map.h>7 8/* Information about a band within a schedule.9 *10 * n is the number of scheduling dimensions within the band.11 * coincident is an array of length n, indicating whether a scheduling dimension12 * satisfies the coincidence constraints in the sense that13 * the corresponding dependence distances are zero.14 * permutable is set if the band is permutable.15 * mupa is the partial schedule corresponding to this band. The dimension16 * of mupa is equal to n.17 * loop_type contains the loop AST generation types for the members18 * in the band. It may be NULL, if all members are19 * of type isl_ast_loop_default.20 * isolate_loop_type contains the loop AST generation types for the members21 * in the band for the isolated part. It may be NULL, if all members are22 * of type isl_ast_loop_default.23 * ast_build_options are the remaining AST build options associated24 * to the band.25 * anchored is set if the node depends on its position in the schedule tree.26 * In particular, it is set if the AST build options include27 * an isolate option.28 */29struct isl_schedule_band {30 int ref;31 32 int n;33 int *coincident;34 int permutable;35 36 isl_multi_union_pw_aff *mupa;37 38 int anchored;39 isl_union_set *ast_build_options;40 enum isl_ast_loop_type *loop_type;41 enum isl_ast_loop_type *isolate_loop_type;42};43typedef struct isl_schedule_band isl_schedule_band;44 45__isl_give isl_schedule_band *isl_schedule_band_from_multi_union_pw_aff(46 __isl_take isl_multi_union_pw_aff *mupa);47__isl_give isl_schedule_band *isl_schedule_band_copy(48 __isl_keep isl_schedule_band *band);49__isl_null isl_schedule_band *isl_schedule_band_free(50 __isl_take isl_schedule_band *band);51 52isl_ctx *isl_schedule_band_get_ctx(__isl_keep isl_schedule_band *band);53 54isl_bool isl_schedule_band_plain_is_equal(__isl_keep isl_schedule_band *band1,55 __isl_keep isl_schedule_band *band2);56 57int isl_schedule_band_is_anchored(__isl_keep isl_schedule_band *band);58 59__isl_give isl_space *isl_schedule_band_get_space(60 __isl_keep isl_schedule_band *band);61__isl_give isl_schedule_band *isl_schedule_band_intersect_domain(62 __isl_take isl_schedule_band *band, __isl_take isl_union_set *domain);63__isl_give isl_multi_union_pw_aff *isl_schedule_band_get_partial_schedule(64 __isl_keep isl_schedule_band *band);65__isl_give isl_schedule_band *isl_schedule_band_set_partial_schedule(66 __isl_take isl_schedule_band *band,67 __isl_take isl_multi_union_pw_aff *schedule);68enum isl_ast_loop_type isl_schedule_band_member_get_ast_loop_type(69 __isl_keep isl_schedule_band *band, int pos);70__isl_give isl_schedule_band *isl_schedule_band_member_set_ast_loop_type(71 __isl_take isl_schedule_band *band, int pos,72 enum isl_ast_loop_type type);73enum isl_ast_loop_type isl_schedule_band_member_get_isolate_ast_loop_type(74 __isl_keep isl_schedule_band *band, int pos);75__isl_give isl_schedule_band *76isl_schedule_band_member_set_isolate_ast_loop_type(77 __isl_take isl_schedule_band *band, int pos,78 enum isl_ast_loop_type type);79__isl_give isl_union_set *isl_schedule_band_get_ast_build_options(80 __isl_keep isl_schedule_band *band);81__isl_give isl_schedule_band *isl_schedule_band_set_ast_build_options(82 __isl_take isl_schedule_band *band, __isl_take isl_union_set *options);83__isl_give isl_set *isl_schedule_band_get_ast_isolate_option(84 __isl_keep isl_schedule_band *band, int depth);85__isl_give isl_schedule_band *isl_schedule_band_replace_ast_build_option(86 __isl_take isl_schedule_band *band, __isl_take isl_set *drop,87 __isl_take isl_set *add);88 89isl_size isl_schedule_band_n_member(__isl_keep isl_schedule_band *band);90isl_bool isl_schedule_band_member_get_coincident(91 __isl_keep isl_schedule_band *band, int pos);92__isl_give isl_schedule_band *isl_schedule_band_member_set_coincident(93 __isl_take isl_schedule_band *band, int pos, int coincident);94isl_bool isl_schedule_band_get_permutable(__isl_keep isl_schedule_band *band);95__isl_give isl_schedule_band *isl_schedule_band_set_permutable(96 __isl_take isl_schedule_band *band, int permutable);97 98__isl_give isl_schedule_band *isl_schedule_band_scale(99 __isl_take isl_schedule_band *band, __isl_take isl_multi_val *mv);100__isl_give isl_schedule_band *isl_schedule_band_scale_down(101 __isl_take isl_schedule_band *band, __isl_take isl_multi_val *mv);102__isl_give isl_schedule_band *isl_schedule_band_mod(103 __isl_take isl_schedule_band *band, __isl_take isl_multi_val *mv);104__isl_give isl_schedule_band *isl_schedule_band_tile(105 __isl_take isl_schedule_band *band, __isl_take isl_multi_val *sizes);106__isl_give isl_schedule_band *isl_schedule_band_point(107 __isl_take isl_schedule_band *band, __isl_keep isl_schedule_band *tile,108 __isl_take isl_multi_val *sizes);109__isl_give isl_schedule_band *isl_schedule_band_shift(110 __isl_take isl_schedule_band *band,111 __isl_take isl_multi_union_pw_aff *shift);112__isl_give isl_schedule_band *isl_schedule_band_drop(113 __isl_take isl_schedule_band *band, int pos, int n);114__isl_give isl_schedule_band *isl_schedule_band_gist(115 __isl_take isl_schedule_band *band, __isl_take isl_union_set *context);116 117__isl_give isl_schedule_band *isl_schedule_band_reset_user(118 __isl_take isl_schedule_band *band);119__isl_give isl_schedule_band *isl_schedule_band_align_params(120 __isl_take isl_schedule_band *band, __isl_take isl_space *space);121__isl_give isl_schedule_band *isl_schedule_band_pullback_union_pw_multi_aff(122 __isl_take isl_schedule_band *band,123 __isl_take isl_union_pw_multi_aff *upma);124 125#endif126