6 #include <isl/union_map.h>
8 #if defined(__cplusplus)
22 /* only compound assignments operators before assignment */
39 /* Index into the pet_expr->args array when pet_expr->type == pet_expr_unary
41 enum pet_un_arg_type
{
45 /* Indices into the pet_expr->args array when
46 * pet_expr->type == pet_expr_binary
48 enum pet_bin_arg_type
{
53 /* Indices into the pet_expr->args array when
54 * pet_expr->type == pet_expr_ternary
56 enum pet_ter_arg_type
{
62 /* d is valid when type == pet_expr_double
63 * acc is valid when type == pet_expr_access
64 * call is valid when type == pet_expr_call
65 * op is valid otherwise
67 * acc.access usually maps an iteration space to a data space.
68 * If the access has arguments, however, then the domain of the
69 * mapping is a wrapped mapping from the iteration space
70 * to a space of dimensionality equal to the number of arguments.
71 * Each dimension in this space corresponds to the value of the
72 * corresponding argument.
74 * If the data space is unnamed (and 1D), then it represents
75 * the set of integers. That is, the access represents a value that
76 * is equal to the index.
79 enum pet_expr_type type
;
82 struct pet_expr
**args
;
100 struct pet_expr
*body
;
103 /* context holds constraints on the parameter that ensure that
104 * this array has a valid (i.e., non-negative) size
106 * extent holds constraints on the indices
108 * value_bounds holds constraints on the elements of the array
109 * and may be NULL if no such constraints were specified by the user
114 isl_set
*value_bounds
;
122 struct pet_array
**arrays
;
125 struct pet_stmt
**stmts
;
128 /* Return a textual representation of the operator. */
129 const char *pet_op_str(enum pet_op_type op
);
131 /* Extract a pet_scop from a C source file.
132 * If function is not NULL, then the pet_scop is extracted from
133 * a function with that name.
135 * If autodetect is set, any valid scop is extracted.
136 * Otherwise, the scop needs to be delimited by pragmas.
138 struct pet_scop
*pet_scop_extract_from_C_source(isl_ctx
*ctx
,
139 const char *filename
, const char *function
, int autodetect
);
141 /* Update all isl_sets and isl_maps such that they all have the same
142 * parameters in the same order.
144 struct pet_scop
*pet_scop_align_params(struct pet_scop
*scop
);
146 void pet_scop_dump(struct pet_scop
*scop
);
147 void *pet_scop_free(struct pet_scop
*scop
);
149 __isl_give isl_union_set
*pet_scop_collect_domains(struct pet_scop
*scop
);
150 /* Collect all read access relations. */
151 __isl_give isl_union_map
*pet_scop_collect_reads(struct pet_scop
*scop
);
152 /* Collect all write access relations. */
153 __isl_give isl_union_map
*pet_scop_collect_writes(struct pet_scop
*scop
);
154 __isl_give isl_union_map
*pet_scop_collect_schedule(struct pet_scop
*scop
);
156 #if defined(__cplusplus)