1 #ifndef ISL_AST_CONTEXT_H 2 #define ISL_AST_CONTEXT_H 3 4 #include <isl/ctx.h> 5 #include <isl/set.h> 6 #include <isl/ast.h> 7 8 #if defined(__cplusplus) 9 extern "C" { 10 #endif 11 12 struct isl_ast_build; 13 typedef struct isl_ast_build isl_ast_build; 14 15 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); 18 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); 21 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); 24 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); 27 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); 32 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); 35 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); 38 39 isl_ctx *isl_ast_build_get_ctx(__isl_keep isl_ast_build *build); 40 41 __isl_give isl_ast_build *isl_ast_build_from_context(__isl_take isl_set *set); 42 43 __isl_give isl_space *isl_ast_build_get_schedule_space( 44 __isl_keep isl_ast_build *build); 45 __isl_give isl_union_map *isl_ast_build_get_schedule( 46 __isl_keep isl_ast_build *build); 47 48 __isl_give isl_ast_build *isl_ast_build_restrict( 49 __isl_take isl_ast_build *build, __isl_take isl_set *set); 50 51 __isl_give isl_ast_build *isl_ast_build_copy( 52 __isl_keep isl_ast_build *build); 53 void *isl_ast_build_free(__isl_take isl_ast_build *build); 54 55 __isl_give isl_ast_build *isl_ast_build_set_options( 56 __isl_take isl_ast_build *build, 57 __isl_take isl_union_map *options); 58 __isl_give isl_ast_build *isl_ast_build_set_iterators( 59 __isl_take isl_ast_build *build, 60 __isl_take isl_id_list *iterators); 61 __isl_give isl_ast_build *isl_ast_build_set_at_each_domain( 62 __isl_take isl_ast_build *build, 63 __isl_give isl_ast_node *(*fn)(__isl_take isl_ast_node *node, 64 __isl_keep isl_ast_build *build, void *user), void *user); 65 __isl_give isl_ast_build *isl_ast_build_set_before_each_for( 66 __isl_take isl_ast_build *build, 67 __isl_give isl_id *(*fn)(__isl_keep isl_ast_build *build, 68 void *user), void *user); 69 __isl_give isl_ast_build *isl_ast_build_set_after_each_for( 70 __isl_take isl_ast_build *build, 71 __isl_give isl_ast_node *(*fn)(__isl_take isl_ast_node *node, 72 __isl_keep isl_ast_build *build, void *user), void *user); 73 __isl_give isl_ast_build *isl_ast_build_set_create_leaf( 74 __isl_take isl_ast_build *build, 75 __isl_give isl_ast_node *(*fn)(__isl_take isl_ast_build *build, 76 void *user), void *user); 77 78 __isl_give isl_ast_expr *isl_ast_build_expr_from_pw_aff( 79 __isl_keep isl_ast_build *build, __isl_take isl_pw_aff *pa); 80 __isl_give isl_ast_expr *isl_ast_build_call_from_pw_multi_aff( 81 __isl_keep isl_ast_build *build, __isl_take isl_pw_multi_aff *pma); 82 83 __isl_give isl_ast_node *isl_ast_build_ast_from_schedule( 84 __isl_keep isl_ast_build *build, __isl_take isl_union_map *schedule); 85 86 #if defined(__cplusplus) 87 } 88 #endif 89 90 #endif 91