gpu.c: copy_group_shared_accesses: use gpu_array_is_scalar for clarity
[ppcg.git] / ppcg.h
blob8c98da79e381b44b50321bddc1b7573348d3c62b
1 #ifndef PPCG_H
2 #define PPCG_H
4 #include <isl/set.h>
5 #include <isl/union_set.h>
6 #include <isl/union_map.h>
7 #include <pet.h>
9 #include "ppcg_options.h"
11 int ppcg_extract_base_name(char *name, const char *input);
13 /* Representation of the scop for use inside PPCG.
15 * "start" and "end" are file offsets of the corresponding program text.
16 * "context" represents constraints on the parameters.
17 * "domain" is the union of all iteration domains.
18 * "call" contains the iteration domains of statements with a call expression.
19 * "reads" contains all read accesses.
20 * "live_in" contains read accesses that have no corresponding
21 * writes in the scop.
22 * "writes" contains all write accesses.
23 * "kills" contains all kill accesses.
24 * "dep_flow" represents the flow dependences.
25 * "dep_false" represents the false (anti and output) dependences.
26 * "schedule" represents the (original) schedule.
28 * "arrays" and "stmts" are copies of the corresponding elements
29 * of the original pet_scop.
31 struct ppcg_scop {
32 unsigned start;
33 unsigned end;
35 isl_set *context;
36 isl_union_set *domain;
37 isl_union_set *call;
38 isl_union_map *reads;
39 isl_union_map *live_in;
40 isl_union_map *writes;
41 isl_union_map *kills;
42 isl_union_map *dep_flow;
43 isl_union_map *dep_false;
44 isl_union_map *schedule;
46 int n_array;
47 struct pet_array **arrays;
48 int n_stmt;
49 struct pet_stmt **stmts;
52 int ppcg_transform(isl_ctx *ctx, const char *input, FILE *out,
53 struct ppcg_options *options,
54 __isl_give isl_printer *(*fn)(__isl_take isl_printer *p,
55 struct ppcg_scop *scop, void *user), void *user);
57 #endif