handle data dependent accesses
[ppcg.git] / schedule.h
blobfe4c8c2852b09e8bd5a799252ab6d1831b410f50
1 #ifndef _SCHEDULE_H
2 #define _SCHEDULE_H
4 /* An access to an array element or an iterator.
5 * Accesses to iterators have an access relation that maps to an unnamed space.
6 * An access may be both read and write.
7 */
8 struct gpu_stmt_access {
9 /* Access reads elements */
10 int read;
11 /* Access writes elements */
12 int write;
13 /* All writes are definite writes. */
14 int exact_write;
16 /* Index of the array reference group this reference belong to.
17 * -1 if no reference groups have been computed for the array.
19 int group;
21 /* May access relation */
22 isl_map *access;
23 /* The reference id of the corresponding pet_expr. */
24 isl_id *ref_id;
26 struct gpu_stmt_access *next;
29 struct gpu_stmt {
30 isl_id *id;
31 struct pet_stmt *stmt;
33 /* Number of tile dimensions. */
34 int tile_len;
35 /* Number of initial parallel loops among tile dimensions. */
36 int n_parallel;
38 /* Linked list of accesses. */
39 struct gpu_stmt_access *accesses;
42 __isl_give isl_map *project_out(__isl_take isl_space *dim,
43 int len, int first, int n);
44 __isl_give isl_map *projection(__isl_take isl_space *dim,
45 int src_len, int dst_len);
46 __isl_give isl_set *extend(__isl_take isl_set *set, int dst_len);
47 __isl_give isl_union_map *align_range(__isl_take isl_union_map *umap);
49 #endif