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) 9extern "C" { 10#endif 11 12struct isl_ast_build; 13typedef struct isl_ast_build isl_ast_build; 14 15 16int isl_options_set_ast_build_atomic_upper_bound(isl_ctx *ctx, int val); 17int isl_options_get_ast_build_atomic_upper_bound(isl_ctx *ctx); 18 19int isl_options_set_ast_build_prefer_pdiv(isl_ctx *ctx, int val); 20int isl_options_get_ast_build_prefer_pdiv(isl_ctx *ctx); 21 22int isl_options_set_ast_build_exploit_nested_bounds(isl_ctx *ctx, int val); 23int isl_options_get_ast_build_exploit_nested_bounds(isl_ctx *ctx); 24 25int isl_options_set_ast_build_group_coscheduled(isl_ctx *ctx, int val); 26int 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 30int isl_options_set_ast_build_separation_bounds(isl_ctx *ctx, int val); 31int isl_options_get_ast_build_separation_bounds(isl_ctx *ctx); 32 33int isl_options_set_ast_build_scale_strides(isl_ctx *ctx, int val); 34int isl_options_get_ast_build_scale_strides(isl_ctx *ctx); 35 36int isl_options_set_ast_build_allow_else(isl_ctx *ctx, int val); 37int isl_options_get_ast_build_allow_else(isl_ctx *ctx); 38 39isl_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); 53void *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