1 #ifndef ISL_SCHEDULE_BAND_H
2 #define ISL_SCHEDULE_BAND_H
5 #include <isl/ast_type.h>
6 #include <isl/union_map.h>
8 /* Information about a band within a schedule.
10 * n is the number of scheduling dimensions within the band.
11 * coincident is an array of length n, indicating whether a scheduling dimension
12 * satisfies the coincidence constraints in the sense that
13 * 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 dimension
16 * of mupa is equal to n.
17 * loop_type contains the loop AST generation types for the members
18 * in the band. It may be NULL, if all members are
19 * of type isl_ast_loop_default.
20 * isolate_loop_type contains the loop AST generation types for the members
21 * in the band for the isolated part. It may be NULL, if all members are
22 * of type isl_ast_loop_default.
23 * ast_build_options are the remaining AST build options associated
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 include
29 struct isl_schedule_band
{
36 isl_multi_union_pw_aff
*mupa
;
39 isl_union_set
*ast_build_options
;
40 enum isl_ast_loop_type
*loop_type
;
41 enum isl_ast_loop_type
*isolate_loop_type
;
43 typedef struct isl_schedule_band isl_schedule_band
;
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
);
52 isl_ctx
*isl_schedule_band_get_ctx(__isl_keep isl_schedule_band
*band
);
54 int isl_schedule_band_plain_is_equal(__isl_keep isl_schedule_band
*band1
,
55 __isl_keep isl_schedule_band
*band2
);
57 int isl_schedule_band_is_anchored(__isl_keep isl_schedule_band
*band
);
59 __isl_give isl_space
*isl_schedule_band_get_space(
60 __isl_keep isl_schedule_band
*band
);
61 __isl_give isl_multi_union_pw_aff
*isl_schedule_band_get_partial_schedule(
62 __isl_keep isl_schedule_band
*band
);
63 enum isl_ast_loop_type
isl_schedule_band_member_get_ast_loop_type(
64 __isl_keep isl_schedule_band
*band
, int pos
);
65 __isl_give isl_schedule_band
*isl_schedule_band_member_set_ast_loop_type(
66 __isl_take isl_schedule_band
*band
, int pos
,
67 enum isl_ast_loop_type type
);
68 enum isl_ast_loop_type
isl_schedule_band_member_get_isolate_ast_loop_type(
69 __isl_keep isl_schedule_band
*band
, int pos
);
70 __isl_give isl_schedule_band
*
71 isl_schedule_band_member_set_isolate_ast_loop_type(
72 __isl_take isl_schedule_band
*band
, int pos
,
73 enum isl_ast_loop_type type
);
74 __isl_give isl_union_set
*isl_schedule_band_get_ast_build_options(
75 __isl_keep isl_schedule_band
*band
);
76 __isl_give isl_schedule_band
*isl_schedule_band_set_ast_build_options(
77 __isl_take isl_schedule_band
*band
, __isl_take isl_union_set
*options
);
79 int isl_schedule_band_n_member(__isl_keep isl_schedule_band
*band
);
80 int isl_schedule_band_member_get_coincident(
81 __isl_keep isl_schedule_band
*band
, int pos
);
82 __isl_give isl_schedule_band
*isl_schedule_band_member_set_coincident(
83 __isl_take isl_schedule_band
*band
, int pos
, int coincident
);
84 int isl_schedule_band_get_permutable(__isl_keep isl_schedule_band
*band
);
85 __isl_give isl_schedule_band
*isl_schedule_band_set_permutable(
86 __isl_take isl_schedule_band
*band
, int permutable
);
88 __isl_give isl_schedule_band
*isl_schedule_band_scale(
89 __isl_take isl_schedule_band
*band
, __isl_take isl_multi_val
*mv
);
90 __isl_give isl_schedule_band
*isl_schedule_band_scale_down(
91 __isl_take isl_schedule_band
*band
, __isl_take isl_multi_val
*mv
);
92 __isl_give isl_schedule_band
*isl_schedule_band_tile(
93 __isl_take isl_schedule_band
*band
, __isl_take isl_multi_val
*sizes
);
94 __isl_give isl_schedule_band
*isl_schedule_band_point(
95 __isl_take isl_schedule_band
*band
, __isl_keep isl_schedule_band
*tile
,
96 __isl_take isl_multi_val
*sizes
);
97 __isl_give isl_schedule_band
*isl_schedule_band_drop(
98 __isl_take isl_schedule_band
*band
, int pos
, int n
);
99 __isl_give isl_schedule_band
*isl_schedule_band_gist(
100 __isl_take isl_schedule_band
*band
, __isl_take isl_union_set
*context
);
102 __isl_give isl_schedule_band
*isl_schedule_band_reset_user(
103 __isl_take isl_schedule_band
*band
);
104 __isl_give isl_schedule_band
*isl_schedule_band_align_params(
105 __isl_take isl_schedule_band
*band
, __isl_take isl_space
*space
);
106 __isl_give isl_schedule_band
*isl_schedule_band_pullback_union_pw_multi_aff(
107 __isl_take isl_schedule_band
*band
,
108 __isl_take isl_union_pw_multi_aff
*upma
);