6 #include <isl/union_map.h>
8 #if defined(__cplusplus)
22 /* only compound assignments operators before assignment */
40 /* Index into the pet_expr->args array when pet_expr->type == pet_expr_unary
42 enum pet_un_arg_type
{
46 /* Indices into the pet_expr->args array when
47 * pet_expr->type == pet_expr_binary
49 enum pet_bin_arg_type
{
54 /* Indices into the pet_expr->args array when
55 * pet_expr->type == pet_expr_ternary
57 enum pet_ter_arg_type
{
63 /* d is valid when type == pet_expr_double
64 * acc is valid when type == pet_expr_access
65 * call is valid when type == pet_expr_call
66 * op is valid otherwise
68 * acc.access usually maps an iteration space to a data space.
69 * If the access has arguments, however, then the domain of the
70 * mapping is a wrapped mapping from the iteration space
71 * to a space of dimensionality equal to the number of arguments.
72 * Each dimension in this space corresponds to the value of the
73 * corresponding argument.
75 * If the data space is unnamed (and 1D), then it represents
76 * the set of integers. That is, the access represents a value that
77 * is equal to the index.
80 enum pet_expr_type type
;
83 struct pet_expr
**args
;
101 struct pet_expr
*body
;
104 /* context holds constraints on the parameter that ensure that
105 * this array has a valid (i.e., non-negative) size
107 * extent holds constraints on the indices
109 * value_bounds holds constraints on the elements of the array
110 * and may be NULL if no such constraints were specified by the user
112 * live_out is set if the array appears in a live-out pragma
117 isl_set
*value_bounds
;
126 struct pet_array
**arrays
;
129 struct pet_stmt
**stmts
;
132 /* Return a textual representation of the operator. */
133 const char *pet_op_str(enum pet_op_type op
);
135 /* Extract a pet_scop from a C source file.
136 * If function is not NULL, then the pet_scop is extracted from
137 * a function with that name.
139 * If autodetect is set, any valid scop is extracted.
140 * Otherwise, the scop needs to be delimited by pragmas.
142 struct pet_scop
*pet_scop_extract_from_C_source(isl_ctx
*ctx
,
143 const char *filename
, const char *function
, int autodetect
);
145 /* Update all isl_sets and isl_maps such that they all have the same
146 * parameters in the same order.
148 struct pet_scop
*pet_scop_align_params(struct pet_scop
*scop
);
150 void pet_scop_dump(struct pet_scop
*scop
);
151 void *pet_scop_free(struct pet_scop
*scop
);
153 __isl_give isl_union_set
*pet_scop_collect_domains(struct pet_scop
*scop
);
154 /* Collect all read access relations. */
155 __isl_give isl_union_map
*pet_scop_collect_reads(struct pet_scop
*scop
);
156 /* Collect all write access relations. */
157 __isl_give isl_union_map
*pet_scop_collect_writes(struct pet_scop
*scop
);
158 __isl_give isl_union_map
*pet_scop_collect_schedule(struct pet_scop
*scop
);
160 #if defined(__cplusplus)