source: Daodan/MSYS2/mingw32/include/isl/flow.h

Last change on this file was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 5.6 KB
Line 
1#ifndef ISL_FLOW_H
2#define ISL_FLOW_H
3
4#include <stdio.h>
5
6#include <isl/set_type.h>
7#include <isl/map_type.h>
8#include <isl/union_set_type.h>
9#include <isl/union_map_type.h>
10#include <isl/schedule.h>
11#include <isl/printer.h>
12
13#if defined(__cplusplus)
14extern "C" {
15#endif
16
17/* Let n (>= 0) be the number of iterators shared by first and second.
18 * If first precedes second textually return 2 * n + 1,
19 * otherwise return 2 * n.
20 */
21typedef int (*isl_access_level_before)(void *first, void *second);
22
23struct isl_restriction;
24typedef struct isl_restriction isl_restriction;
25
26__isl_null isl_restriction *isl_restriction_free(
27 __isl_take isl_restriction *restr);
28__isl_give isl_restriction *isl_restriction_empty(
29 __isl_take isl_map *source_map);
30__isl_give isl_restriction *isl_restriction_none(
31 __isl_take isl_map *source_map);
32__isl_give isl_restriction *isl_restriction_input(
33 __isl_take isl_set *source_restr, __isl_take isl_set *sink_restr);
34__isl_give isl_restriction *isl_restriction_output(
35 __isl_take isl_set *source_restr);
36
37isl_ctx *isl_restriction_get_ctx(__isl_keep isl_restriction *restr);
38
39typedef __isl_give isl_restriction *(*isl_access_restrict)(
40 __isl_keep isl_map *source_map, __isl_keep isl_set *sink,
41 void *source_user, void *user);
42
43struct isl_access_info;
44typedef struct isl_access_info isl_access_info;
45struct isl_flow;
46typedef struct isl_flow isl_flow;
47
48__isl_give isl_access_info *isl_access_info_alloc(__isl_take isl_map *sink,
49 void *sink_user, isl_access_level_before fn, int max_source);
50__isl_give isl_access_info *isl_access_info_set_restrict(
51 __isl_take isl_access_info *acc, isl_access_restrict fn, void *user);
52__isl_give isl_access_info *isl_access_info_add_source(
53 __isl_take isl_access_info *acc, __isl_take isl_map *source,
54 int must, void *source_user);
55__isl_null isl_access_info *isl_access_info_free(
56 __isl_take isl_access_info *acc);
57
58isl_ctx *isl_access_info_get_ctx(__isl_keep isl_access_info *acc);
59
60__isl_give isl_flow *isl_access_info_compute_flow(__isl_take isl_access_info *acc);
61isl_stat isl_flow_foreach(__isl_keep isl_flow *deps,
62 isl_stat (*fn)(__isl_take isl_map *dep, int must, void *dep_user,
63 void *user),
64 void *user);
65__isl_give isl_map *isl_flow_get_no_source(__isl_keep isl_flow *deps, int must);
66__isl_null isl_flow *isl_flow_free(__isl_take isl_flow *deps);
67
68isl_ctx *isl_flow_get_ctx(__isl_keep isl_flow *deps);
69
70struct __isl_export isl_union_access_info;
71typedef struct isl_union_access_info isl_union_access_info;
72struct __isl_export isl_union_flow;
73typedef struct isl_union_flow isl_union_flow;
74
75__isl_constructor
76__isl_give isl_union_access_info *isl_union_access_info_from_sink(
77 __isl_take isl_union_map *sink);
78__isl_export
79__isl_give isl_union_access_info *isl_union_access_info_set_must_source(
80 __isl_take isl_union_access_info *access,
81 __isl_take isl_union_map *must_source);
82__isl_export
83__isl_give isl_union_access_info *isl_union_access_info_set_may_source(
84 __isl_take isl_union_access_info *access,
85 __isl_take isl_union_map *may_source);
86__isl_export
87__isl_give isl_union_access_info *isl_union_access_info_set_kill(
88 __isl_take isl_union_access_info *access,
89 __isl_take isl_union_map *kill);
90__isl_export
91__isl_give isl_union_access_info *isl_union_access_info_set_schedule(
92 __isl_take isl_union_access_info *access,
93 __isl_take isl_schedule *schedule);
94__isl_export
95__isl_give isl_union_access_info *isl_union_access_info_set_schedule_map(
96 __isl_take isl_union_access_info *access,
97 __isl_take isl_union_map *schedule_map);
98__isl_give isl_union_access_info *isl_union_access_info_copy(
99 __isl_keep isl_union_access_info *access);
100__isl_null isl_union_access_info *isl_union_access_info_free(
101 __isl_take isl_union_access_info *access);
102
103isl_ctx *isl_union_access_info_get_ctx(
104 __isl_keep isl_union_access_info *access);
105
106__isl_give isl_union_access_info *isl_union_access_info_read_from_file(
107 isl_ctx *ctx, FILE *input);
108__isl_give isl_printer *isl_printer_print_union_access_info(
109 __isl_take isl_printer *p, __isl_keep isl_union_access_info *access);
110__isl_give char *isl_union_access_info_to_str(
111 __isl_keep isl_union_access_info *access);
112
113__isl_export
114__isl_give isl_union_flow *isl_union_access_info_compute_flow(
115 __isl_take isl_union_access_info *access);
116
117isl_ctx *isl_union_flow_get_ctx(__isl_keep isl_union_flow *flow);
118__isl_give isl_union_flow *isl_union_flow_copy(
119 __isl_keep isl_union_flow *flow);
120__isl_export
121__isl_give isl_union_map *isl_union_flow_get_must_dependence(
122 __isl_keep isl_union_flow *flow);
123__isl_export
124__isl_give isl_union_map *isl_union_flow_get_may_dependence(
125 __isl_keep isl_union_flow *flow);
126__isl_export
127__isl_give isl_union_map *isl_union_flow_get_full_must_dependence(
128 __isl_keep isl_union_flow *flow);
129__isl_export
130__isl_give isl_union_map *isl_union_flow_get_full_may_dependence(
131 __isl_keep isl_union_flow *flow);
132__isl_export
133__isl_give isl_union_map *isl_union_flow_get_must_no_source(
134 __isl_keep isl_union_flow *flow);
135__isl_export
136__isl_give isl_union_map *isl_union_flow_get_may_no_source(
137 __isl_keep isl_union_flow *flow);
138__isl_null isl_union_flow *isl_union_flow_free(__isl_take isl_union_flow *flow);
139
140__isl_give isl_printer *isl_printer_print_union_flow(
141 __isl_take isl_printer *p, __isl_keep isl_union_flow *flow);
142__isl_give char *isl_union_flow_to_str(__isl_keep isl_union_flow *flow);
143
144int isl_union_map_compute_flow(__isl_take isl_union_map *sink,
145 __isl_take isl_union_map *must_source,
146 __isl_take isl_union_map *may_source,
147 __isl_take isl_union_map *schedule,
148 __isl_give isl_union_map **must_dep, __isl_give isl_union_map **may_dep,
149 __isl_give isl_union_map **must_no_source,
150 __isl_give isl_union_map **may_no_source);
151
152#if defined(__cplusplus)
153}
154#endif
155
156#endif
Note: See TracBrowser for help on using the repository browser.