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>
10 #if defined(__cplusplus)
14 /* Let n (>= 0) be the number of iterators shared by first and second.
15 * If first precedes second textually return 2 * n + 1,
16 * otherwise return 2 * n.
18 typedef int (*isl_access_level_before
)(void *first
, void *second
);
20 struct isl_restriction
;
21 typedef struct isl_restriction isl_restriction
;
23 __isl_null isl_restriction
*isl_restriction_free(
24 __isl_take isl_restriction
*restr
);
25 __isl_give isl_restriction
*isl_restriction_empty(
26 __isl_take isl_map
*source_map
);
27 __isl_give isl_restriction
*isl_restriction_none(
28 __isl_take isl_map
*source_map
);
29 __isl_give isl_restriction
*isl_restriction_input(
30 __isl_take isl_set
*source_restr
, __isl_take isl_set
*sink_restr
);
31 __isl_give isl_restriction
*isl_restriction_output(
32 __isl_take isl_set
*source_restr
);
34 isl_ctx
*isl_restriction_get_ctx(__isl_keep isl_restriction
*restr
);
36 typedef __isl_give isl_restriction
*(*isl_access_restrict
)(
37 __isl_keep isl_map
*source_map
, __isl_keep isl_set
*sink
,
38 void *source_user
, void *user
);
40 struct isl_access_info
;
41 typedef struct isl_access_info isl_access_info
;
43 typedef struct isl_flow isl_flow
;
45 __isl_give isl_access_info
*isl_access_info_alloc(__isl_take isl_map
*sink
,
46 void *sink_user
, isl_access_level_before fn
, int max_source
);
47 __isl_give isl_access_info
*isl_access_info_set_restrict(
48 __isl_take isl_access_info
*acc
, isl_access_restrict fn
, void *user
);
49 __isl_give isl_access_info
*isl_access_info_add_source(
50 __isl_take isl_access_info
*acc
, __isl_take isl_map
*source
,
51 int must
, void *source_user
);
52 __isl_null isl_access_info
*isl_access_info_free(
53 __isl_take isl_access_info
*acc
);
55 isl_ctx
*isl_access_info_get_ctx(__isl_keep isl_access_info
*acc
);
57 __isl_give isl_flow
*isl_access_info_compute_flow(__isl_take isl_access_info
*acc
);
58 isl_stat
isl_flow_foreach(__isl_keep isl_flow
*deps
,
59 isl_stat (*fn
)(__isl_take isl_map
*dep
, int must
, void *dep_user
,
62 __isl_give isl_map
*isl_flow_get_no_source(__isl_keep isl_flow
*deps
, int must
);
63 void isl_flow_free(__isl_take isl_flow
*deps
);
65 isl_ctx
*isl_flow_get_ctx(__isl_keep isl_flow
*deps
);
67 struct isl_union_access_info
;
68 typedef struct isl_union_access_info isl_union_access_info
;
69 struct isl_union_flow
;
70 typedef struct isl_union_flow isl_union_flow
;
72 __isl_give isl_union_access_info
*isl_union_access_info_from_sink(
73 __isl_take isl_union_map
*sink
);
74 __isl_give isl_union_access_info
*isl_union_access_info_set_must_source(
75 __isl_take isl_union_access_info
*access
,
76 __isl_take isl_union_map
*must_source
);
77 __isl_give isl_union_access_info
*isl_union_access_info_set_may_source(
78 __isl_take isl_union_access_info
*access
,
79 __isl_take isl_union_map
*may_source
);
80 __isl_give isl_union_access_info
*isl_union_access_info_set_schedule(
81 __isl_take isl_union_access_info
*access
,
82 __isl_take isl_schedule
*schedule
);
83 __isl_give isl_union_access_info
*isl_union_access_info_set_schedule_map(
84 __isl_take isl_union_access_info
*access
,
85 __isl_take isl_union_map
*schedule_map
);
86 __isl_null isl_union_access_info
*isl_union_access_info_free(
87 __isl_take isl_union_access_info
*access
);
89 __isl_give isl_union_flow
*isl_union_access_info_compute_flow(
90 __isl_take isl_union_access_info
*access
);
92 __isl_give isl_union_map
*isl_union_flow_get_must_dependence(
93 __isl_keep isl_union_flow
*flow
);
94 __isl_give isl_union_map
*isl_union_flow_get_may_dependence(
95 __isl_keep isl_union_flow
*flow
);
96 __isl_give isl_union_map
*isl_union_flow_get_must_no_source(
97 __isl_keep isl_union_flow
*flow
);
98 __isl_give isl_union_map
*isl_union_flow_get_may_no_source(
99 __isl_keep isl_union_flow
*flow
);
100 __isl_null isl_union_flow
*isl_union_flow_free(__isl_take isl_union_flow
*flow
);
102 int isl_union_map_compute_flow(__isl_take isl_union_map
*sink
,
103 __isl_take isl_union_map
*must_source
,
104 __isl_take isl_union_map
*may_source
,
105 __isl_take isl_union_map
*schedule
,
106 __isl_give isl_union_map
**must_dep
, __isl_give isl_union_map
**may_dep
,
107 __isl_give isl_union_map
**must_no_source
,
108 __isl_give isl_union_map
**may_no_source
);
110 #if defined(__cplusplus)