1 #ifndef ISL_AST_CONTEXT_H
2 #define ISL_AST_CONTEXT_H
7 #include <isl/schedule.h>
9 #if defined(__cplusplus)
14 typedef struct isl_ast_build isl_ast_build
;
17 isl_stat
isl_options_set_ast_build_atomic_upper_bound(isl_ctx
*ctx
, int val
);
18 int isl_options_get_ast_build_atomic_upper_bound(isl_ctx
*ctx
);
20 isl_stat
isl_options_set_ast_build_prefer_pdiv(isl_ctx
*ctx
, int val
);
21 int isl_options_get_ast_build_prefer_pdiv(isl_ctx
*ctx
);
23 isl_stat
isl_options_set_ast_build_exploit_nested_bounds(isl_ctx
*ctx
, int val
);
24 int isl_options_get_ast_build_exploit_nested_bounds(isl_ctx
*ctx
);
26 isl_stat
isl_options_set_ast_build_group_coscheduled(isl_ctx
*ctx
, int val
);
27 int isl_options_get_ast_build_group_coscheduled(isl_ctx
*ctx
);
29 #define ISL_AST_BUILD_SEPARATION_BOUNDS_EXPLICIT 0
30 #define ISL_AST_BUILD_SEPARATION_BOUNDS_IMPLICIT 1
31 isl_stat
isl_options_set_ast_build_separation_bounds(isl_ctx
*ctx
, int val
);
32 int isl_options_get_ast_build_separation_bounds(isl_ctx
*ctx
);
34 isl_stat
isl_options_set_ast_build_scale_strides(isl_ctx
*ctx
, int val
);
35 int isl_options_get_ast_build_scale_strides(isl_ctx
*ctx
);
37 isl_stat
isl_options_set_ast_build_allow_else(isl_ctx
*ctx
, int val
);
38 int isl_options_get_ast_build_allow_else(isl_ctx
*ctx
);
40 isl_stat
isl_options_set_ast_build_allow_or(isl_ctx
*ctx
, int val
);
41 int isl_options_get_ast_build_allow_or(isl_ctx
*ctx
);
43 isl_ctx
*isl_ast_build_get_ctx(__isl_keep isl_ast_build
*build
);
45 __isl_give isl_ast_build
*isl_ast_build_alloc(isl_ctx
*ctx
);
46 __isl_give isl_ast_build
*isl_ast_build_from_context(__isl_take isl_set
*set
);
48 __isl_give isl_space
*isl_ast_build_get_schedule_space(
49 __isl_keep isl_ast_build
*build
);
50 __isl_give isl_union_map
*isl_ast_build_get_schedule(
51 __isl_keep isl_ast_build
*build
);
53 __isl_give isl_ast_build
*isl_ast_build_restrict(
54 __isl_take isl_ast_build
*build
, __isl_take isl_set
*set
);
56 __isl_give isl_ast_build
*isl_ast_build_copy(
57 __isl_keep isl_ast_build
*build
);
58 __isl_null isl_ast_build
*isl_ast_build_free(
59 __isl_take isl_ast_build
*build
);
61 __isl_give isl_ast_build
*isl_ast_build_set_options(
62 __isl_take isl_ast_build
*build
,
63 __isl_take isl_union_map
*options
);
64 __isl_give isl_ast_build
*isl_ast_build_set_iterators(
65 __isl_take isl_ast_build
*build
,
66 __isl_take isl_id_list
*iterators
);
67 __isl_give isl_ast_build
*isl_ast_build_set_at_each_domain(
68 __isl_take isl_ast_build
*build
,
69 __isl_give isl_ast_node
*(*fn
)(__isl_take isl_ast_node
*node
,
70 __isl_keep isl_ast_build
*build
, void *user
), void *user
);
71 __isl_give isl_ast_build
*isl_ast_build_set_before_each_for(
72 __isl_take isl_ast_build
*build
,
73 __isl_give isl_id
*(*fn
)(__isl_keep isl_ast_build
*build
,
74 void *user
), void *user
);
75 __isl_give isl_ast_build
*isl_ast_build_set_after_each_for(
76 __isl_take isl_ast_build
*build
,
77 __isl_give isl_ast_node
*(*fn
)(__isl_take isl_ast_node
*node
,
78 __isl_keep isl_ast_build
*build
, void *user
), void *user
);
79 __isl_give isl_ast_build
*isl_ast_build_set_before_each_mark(
80 __isl_take isl_ast_build
*build
,
81 isl_stat (*fn
)(__isl_keep isl_id
*mark
, __isl_keep isl_ast_build
*build
,
82 void *user
), void *user
);
83 __isl_give isl_ast_build
*isl_ast_build_set_after_each_mark(
84 __isl_take isl_ast_build
*build
,
85 __isl_give isl_ast_node
*(*fn
)(__isl_take isl_ast_node
*node
,
86 __isl_keep isl_ast_build
*build
, void *user
), void *user
);
87 __isl_give isl_ast_build
*isl_ast_build_set_create_leaf(
88 __isl_take isl_ast_build
*build
,
89 __isl_give isl_ast_node
*(*fn
)(__isl_take isl_ast_build
*build
,
90 void *user
), void *user
);
92 __isl_give isl_ast_expr
*isl_ast_build_expr_from_set(
93 __isl_keep isl_ast_build
*build
, __isl_take isl_set
*set
);
94 __isl_give isl_ast_expr
*isl_ast_build_expr_from_pw_aff(
95 __isl_keep isl_ast_build
*build
, __isl_take isl_pw_aff
*pa
);
96 __isl_give isl_ast_expr
*isl_ast_build_access_from_pw_multi_aff(
97 __isl_keep isl_ast_build
*build
, __isl_take isl_pw_multi_aff
*pma
);
98 __isl_give isl_ast_expr
*isl_ast_build_access_from_multi_pw_aff(
99 __isl_keep isl_ast_build
*build
, __isl_take isl_multi_pw_aff
*mpa
);
100 __isl_give isl_ast_expr
*isl_ast_build_call_from_pw_multi_aff(
101 __isl_keep isl_ast_build
*build
, __isl_take isl_pw_multi_aff
*pma
);
102 __isl_give isl_ast_expr
*isl_ast_build_call_from_multi_pw_aff(
103 __isl_keep isl_ast_build
*build
, __isl_take isl_multi_pw_aff
*mpa
);
105 __isl_give isl_ast_node
*isl_ast_build_node_from_schedule(
106 __isl_keep isl_ast_build
*build
, __isl_take isl_schedule
*schedule
);
107 __isl_give isl_ast_node
*isl_ast_build_node_from_schedule_map(
108 __isl_keep isl_ast_build
*build
, __isl_take isl_union_map
*schedule
);
109 __isl_give isl_ast_node
*isl_ast_build_ast_from_schedule(
110 __isl_keep isl_ast_build
*build
, __isl_take isl_union_map
*schedule
);
112 #if defined(__cplusplus)