4 #include <isl/set_type.h>
5 #include <isl/map_type.h>
6 #include <isl/union_set_type.h>
7 #include <isl/union_map_type.h>
8 #include <isl/schedule.h>
9 #include <isl/printer.h>
11 #if defined(__cplusplus)
15 /* Let n (>= 0) be the number of iterators shared by first and second.
16 * If first precedes second textually return 2 * n + 1,
17 * otherwise return 2 * n.
19 typedef int (*isl_access_level_before
)(void *first
, void *second
);
21 struct isl_restriction
;
22 typedef struct isl_restriction isl_restriction
;
24 __isl_null isl_restriction
*isl_restriction_free(
25 __isl_take isl_restriction
*restr
);
26 __isl_give isl_restriction
*isl_restriction_empty(
27 __isl_take isl_map
*source_map
);
28 __isl_give isl_restriction
*isl_restriction_none(
29 __isl_take isl_map
*source_map
);
30 __isl_give isl_restriction
*isl_restriction_input(
31 __isl_take isl_set
*source_restr
, __isl_take isl_set
*sink_restr
);
32 __isl_give isl_restriction
*isl_restriction_output(
33 __isl_take isl_set
*source_restr
);
35 isl_ctx
*isl_restriction_get_ctx(__isl_keep isl_restriction
*restr
);
37 typedef __isl_give isl_restriction
*(*isl_access_restrict
)(
38 __isl_keep isl_map
*source_map
, __isl_keep isl_set
*sink
,
39 void *source_user
, void *user
);
41 struct isl_access_info
;
42 typedef struct isl_access_info isl_access_info
;
44 typedef struct isl_flow isl_flow
;
46 __isl_give isl_access_info
*isl_access_info_alloc(__isl_take isl_map
*sink
,
47 void *sink_user
, isl_access_level_before fn
, int max_source
);
48 __isl_give isl_access_info
*isl_access_info_set_restrict(
49 __isl_take isl_access_info
*acc
, isl_access_restrict fn
, void *user
);
50 __isl_give isl_access_info
*isl_access_info_add_source(
51 __isl_take isl_access_info
*acc
, __isl_take isl_map
*source
,
52 int must
, void *source_user
);
53 __isl_null isl_access_info
*isl_access_info_free(
54 __isl_take isl_access_info
*acc
);
56 isl_ctx
*isl_access_info_get_ctx(__isl_keep isl_access_info
*acc
);
58 __isl_give isl_flow
*isl_access_info_compute_flow(__isl_take isl_access_info
*acc
);
59 isl_stat
isl_flow_foreach(__isl_keep isl_flow
*deps
,
60 isl_stat (*fn
)(__isl_take isl_map
*dep
, int must
, void *dep_user
,
63 __isl_give isl_map
*isl_flow_get_no_source(__isl_keep isl_flow
*deps
, int must
);
64 void isl_flow_free(__isl_take isl_flow
*deps
);
66 isl_ctx
*isl_flow_get_ctx(__isl_keep isl_flow
*deps
);
68 struct __isl_export isl_union_access_info
;
69 typedef struct isl_union_access_info isl_union_access_info
;
70 struct __isl_export isl_union_flow
;
71 typedef struct isl_union_flow isl_union_flow
;
74 __isl_give isl_union_access_info
*isl_union_access_info_from_sink(
75 __isl_take isl_union_map
*sink
);
77 __isl_give isl_union_access_info
*isl_union_access_info_set_must_source(
78 __isl_take isl_union_access_info
*access
,
79 __isl_take isl_union_map
*must_source
);
81 __isl_give isl_union_access_info
*isl_union_access_info_set_may_source(
82 __isl_take isl_union_access_info
*access
,
83 __isl_take isl_union_map
*may_source
);
85 __isl_give isl_union_access_info
*isl_union_access_info_set_schedule(
86 __isl_take isl_union_access_info
*access
,
87 __isl_take isl_schedule
*schedule
);
89 __isl_give isl_union_access_info
*isl_union_access_info_set_schedule_map(
90 __isl_take isl_union_access_info
*access
,
91 __isl_take isl_union_map
*schedule_map
);
92 __isl_give isl_union_access_info
*isl_union_access_info_copy(
93 __isl_keep isl_union_access_info
*access
);
94 __isl_null isl_union_access_info
*isl_union_access_info_free(
95 __isl_take isl_union_access_info
*access
);
97 isl_ctx
*isl_union_access_info_get_ctx(
98 __isl_keep isl_union_access_info
*access
);
100 __isl_give isl_printer
*isl_printer_print_union_access_info(
101 __isl_take isl_printer
*p
, __isl_keep isl_union_access_info
*access
);
102 __isl_give
char *isl_union_access_info_to_str(
103 __isl_keep isl_union_access_info
*access
);
106 __isl_give isl_union_flow
*isl_union_access_info_compute_flow(
107 __isl_take isl_union_access_info
*access
);
109 isl_ctx
*isl_union_flow_get_ctx(__isl_keep isl_union_flow
*flow
);
110 __isl_give isl_union_flow
*isl_union_flow_copy(
111 __isl_keep isl_union_flow
*flow
);
113 __isl_give isl_union_map
*isl_union_flow_get_must_dependence(
114 __isl_keep isl_union_flow
*flow
);
116 __isl_give isl_union_map
*isl_union_flow_get_may_dependence(
117 __isl_keep isl_union_flow
*flow
);
119 __isl_give isl_union_map
*isl_union_flow_get_full_must_dependence(
120 __isl_keep isl_union_flow
*flow
);
122 __isl_give isl_union_map
*isl_union_flow_get_full_may_dependence(
123 __isl_keep isl_union_flow
*flow
);
125 __isl_give isl_union_map
*isl_union_flow_get_must_no_source(
126 __isl_keep isl_union_flow
*flow
);
128 __isl_give isl_union_map
*isl_union_flow_get_may_no_source(
129 __isl_keep isl_union_flow
*flow
);
130 __isl_null isl_union_flow
*isl_union_flow_free(__isl_take isl_union_flow
*flow
);
132 __isl_give isl_printer
*isl_printer_print_union_flow(
133 __isl_take isl_printer
*p
, __isl_keep isl_union_flow
*flow
);
134 __isl_give
char *isl_union_flow_to_str(__isl_keep isl_union_flow
*flow
);
136 int isl_union_map_compute_flow(__isl_take isl_union_map
*sink
,
137 __isl_take isl_union_map
*must_source
,
138 __isl_take isl_union_map
*may_source
,
139 __isl_take isl_union_map
*schedule
,
140 __isl_give isl_union_map
**must_dep
, __isl_give isl_union_map
**may_dep
,
141 __isl_give isl_union_map
**must_no_source
,
142 __isl_give isl_union_map
**may_no_source
);
144 #if defined(__cplusplus)