add isl_ast_build_alloc
[isl.git] / include / isl / ast_build.h
blob04b4264086ea355e556b704ff8cbe75c0b7e4945
1 #ifndef ISL_AST_CONTEXT_H
2 #define ISL_AST_CONTEXT_H
4 #include <isl/ctx.h>
5 #include <isl/set.h>
6 #include <isl/ast.h>
8 #if defined(__cplusplus)
9 extern "C" {
10 #endif
12 struct isl_ast_build;
13 typedef struct isl_ast_build isl_ast_build;
16 int isl_options_set_ast_build_atomic_upper_bound(isl_ctx *ctx, int val);
17 int isl_options_get_ast_build_atomic_upper_bound(isl_ctx *ctx);
19 int isl_options_set_ast_build_prefer_pdiv(isl_ctx *ctx, int val);
20 int isl_options_get_ast_build_prefer_pdiv(isl_ctx *ctx);
22 int isl_options_set_ast_build_exploit_nested_bounds(isl_ctx *ctx, int val);
23 int isl_options_get_ast_build_exploit_nested_bounds(isl_ctx *ctx);
25 int isl_options_set_ast_build_group_coscheduled(isl_ctx *ctx, int val);
26 int isl_options_get_ast_build_group_coscheduled(isl_ctx *ctx);
28 #define ISL_AST_BUILD_SEPARATION_BOUNDS_EXPLICIT 0
29 #define ISL_AST_BUILD_SEPARATION_BOUNDS_IMPLICIT 1
30 int isl_options_set_ast_build_separation_bounds(isl_ctx *ctx, int val);
31 int isl_options_get_ast_build_separation_bounds(isl_ctx *ctx);
33 int isl_options_set_ast_build_scale_strides(isl_ctx *ctx, int val);
34 int isl_options_get_ast_build_scale_strides(isl_ctx *ctx);
36 int isl_options_set_ast_build_allow_else(isl_ctx *ctx, int val);
37 int isl_options_get_ast_build_allow_else(isl_ctx *ctx);
39 int isl_options_set_ast_build_allow_or(isl_ctx *ctx, int val);
40 int isl_options_get_ast_build_allow_or(isl_ctx *ctx);
42 isl_ctx *isl_ast_build_get_ctx(__isl_keep isl_ast_build *build);
44 __isl_give isl_ast_build *isl_ast_build_alloc(isl_ctx *ctx);
45 __isl_give isl_ast_build *isl_ast_build_from_context(__isl_take isl_set *set);
47 __isl_give isl_space *isl_ast_build_get_schedule_space(
48 __isl_keep isl_ast_build *build);
49 __isl_give isl_union_map *isl_ast_build_get_schedule(
50 __isl_keep isl_ast_build *build);
52 __isl_give isl_ast_build *isl_ast_build_restrict(
53 __isl_take isl_ast_build *build, __isl_take isl_set *set);
55 __isl_give isl_ast_build *isl_ast_build_copy(
56 __isl_keep isl_ast_build *build);
57 __isl_null isl_ast_build *isl_ast_build_free(
58 __isl_take isl_ast_build *build);
60 __isl_give isl_ast_build *isl_ast_build_set_options(
61 __isl_take isl_ast_build *build,
62 __isl_take isl_union_map *options);
63 __isl_give isl_ast_build *isl_ast_build_set_iterators(
64 __isl_take isl_ast_build *build,
65 __isl_take isl_id_list *iterators);
66 __isl_give isl_ast_build *isl_ast_build_set_at_each_domain(
67 __isl_take isl_ast_build *build,
68 __isl_give isl_ast_node *(*fn)(__isl_take isl_ast_node *node,
69 __isl_keep isl_ast_build *build, void *user), void *user);
70 __isl_give isl_ast_build *isl_ast_build_set_before_each_for(
71 __isl_take isl_ast_build *build,
72 __isl_give isl_id *(*fn)(__isl_keep isl_ast_build *build,
73 void *user), void *user);
74 __isl_give isl_ast_build *isl_ast_build_set_after_each_for(
75 __isl_take isl_ast_build *build,
76 __isl_give isl_ast_node *(*fn)(__isl_take isl_ast_node *node,
77 __isl_keep isl_ast_build *build, void *user), void *user);
78 __isl_give isl_ast_build *isl_ast_build_set_create_leaf(
79 __isl_take isl_ast_build *build,
80 __isl_give isl_ast_node *(*fn)(__isl_take isl_ast_build *build,
81 void *user), void *user);
83 __isl_give isl_ast_expr *isl_ast_build_expr_from_set(
84 __isl_keep isl_ast_build *build, __isl_take isl_set *set);
85 __isl_give isl_ast_expr *isl_ast_build_expr_from_pw_aff(
86 __isl_keep isl_ast_build *build, __isl_take isl_pw_aff *pa);
87 __isl_give isl_ast_expr *isl_ast_build_access_from_pw_multi_aff(
88 __isl_keep isl_ast_build *build, __isl_take isl_pw_multi_aff *pma);
89 __isl_give isl_ast_expr *isl_ast_build_access_from_multi_pw_aff(
90 __isl_keep isl_ast_build *build, __isl_take isl_multi_pw_aff *mpa);
91 __isl_give isl_ast_expr *isl_ast_build_call_from_pw_multi_aff(
92 __isl_keep isl_ast_build *build, __isl_take isl_pw_multi_aff *pma);
93 __isl_give isl_ast_expr *isl_ast_build_call_from_multi_pw_aff(
94 __isl_keep isl_ast_build *build, __isl_take isl_multi_pw_aff *mpa);
96 __isl_give isl_ast_node *isl_ast_build_node_from_schedule_map(
97 __isl_keep isl_ast_build *build, __isl_take isl_union_map *schedule);
98 __isl_give isl_ast_node *isl_ast_build_ast_from_schedule(
99 __isl_keep isl_ast_build *build, __isl_take isl_union_map *schedule);
101 #if defined(__cplusplus)
103 #endif
105 #endif