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 isl_bool
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_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
);
68 enum 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
);
73 enum 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
*
76 isl_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
);
84 int isl_schedule_band_n_member(__isl_keep isl_schedule_band
*band
);
85 isl_bool
isl_schedule_band_member_get_coincident(
86 __isl_keep isl_schedule_band
*band
, int pos
);
87 __isl_give isl_schedule_band
*isl_schedule_band_member_set_coincident(
88 __isl_take isl_schedule_band
*band
, int pos
, int coincident
);
89 isl_bool
isl_schedule_band_get_permutable(__isl_keep isl_schedule_band
*band
);
90 __isl_give isl_schedule_band
*isl_schedule_band_set_permutable(
91 __isl_take isl_schedule_band
*band
, int permutable
);
93 __isl_give isl_schedule_band
*isl_schedule_band_scale(
94 __isl_take isl_schedule_band
*band
, __isl_take isl_multi_val
*mv
);
95 __isl_give isl_schedule_band
*isl_schedule_band_scale_down(
96 __isl_take isl_schedule_band
*band
, __isl_take isl_multi_val
*mv
);
97 __isl_give isl_schedule_band
*isl_schedule_band_tile(
98 __isl_take isl_schedule_band
*band
, __isl_take isl_multi_val
*sizes
);
99 __isl_give isl_schedule_band
*isl_schedule_band_point(
100 __isl_take isl_schedule_band
*band
, __isl_keep isl_schedule_band
*tile
,
101 __isl_take isl_multi_val
*sizes
);
102 __isl_give isl_schedule_band
*isl_schedule_band_drop(
103 __isl_take isl_schedule_band
*band
, int pos
, int n
);
104 __isl_give isl_schedule_band
*isl_schedule_band_gist(
105 __isl_take isl_schedule_band
*band
, __isl_take isl_union_set
*context
);
107 __isl_give isl_schedule_band
*isl_schedule_band_reset_user(
108 __isl_take isl_schedule_band
*band
);
109 __isl_give isl_schedule_band
*isl_schedule_band_align_params(
110 __isl_take isl_schedule_band
*band
, __isl_take isl_space
*space
);
111 __isl_give isl_schedule_band
*isl_schedule_band_pullback_union_pw_multi_aff(
112 __isl_take isl_schedule_band
*band
,
113 __isl_take isl_union_pw_multi_aff
*upma
);