23 return band ? isl_multi_union_pw_aff_get_ctx(band->mupa) : NULL;
57 dim = isl_multi_union_pw_aff_size(
mupa);
60 ctx = isl_multi_union_pw_aff_get_ctx(
mupa);
77 isl_multi_union_pw_aff_free(
mupa);
100 if (band->n && !
dup->coincident)
103 for (i = 0; i < band->n; ++i)
104 dup->coincident[i] = band->coincident[i];
105 dup->permutable = band->permutable;
107 dup->mupa = isl_multi_union_pw_aff_copy(band->mupa);
109 if (!
dup->mupa || !
dup->ast_build_options)
112 if (band->loop_type) {
115 if (band->n && !
dup->loop_type)
117 for (i = 0; i < band->n; ++i)
118 dup->loop_type[i] = band->loop_type[i];
120 if (band->isolate_loop_type) {
123 if (band->n && !
dup->isolate_loop_type)
125 for (i = 0; i < band->n; ++i)
126 dup->isolate_loop_type[i] = band->isolate_loop_type[i];
170 isl_multi_union_pw_aff_free(band->mupa);
172 free(band->loop_type);
173 free(band->isolate_loop_type);
174 free(band->coincident);
188 if (!band1 || !band2)
193 if (band1->n != band2->n)
195 for (i = 0; i < band1->n; ++i)
196 if (band1->coincident[i] != band2->coincident[i])
198 if (band1->permutable != band2->permutable)
201 equal = isl_multi_union_pw_aff_plain_is_equal(band1->mupa, band2->mupa);
205 if (!band1->loop_type != !band2->loop_type)
207 if (band1->loop_type)
208 for (i = 0; i < band1->n; ++i)
209 if (band1->loop_type[i] != band2->loop_type[i])
212 if (!band1->isolate_loop_type != !band2->isolate_loop_type)
214 if (band1->isolate_loop_type)
215 for (i = 0; i < band1->n; ++i)
216 if (band1->isolate_loop_type[i] !=
217 band2->isolate_loop_type[i])
221 band2->ast_build_options);
240 if (pos < 0 || pos >= band->n)
261 if (pos < 0 || pos >= band->n)
263 "invalid member position",
266 band->coincident[
pos] = coincident;
287 if (band->permutable == permutable)
293 band->permutable = permutable;
303 return band ? band->anchored : -1;
313 return isl_multi_union_pw_aff_get_space(band->mupa);
342 return band ? isl_multi_union_pw_aff_copy(band->mupa) : NULL;
355 isl_multi_union_pw_aff_free(band->mupa);
361 isl_multi_union_pw_aff_free(
schedule);
374 if (pos < 0 || pos >= band->n)
378 if (!band->loop_type)
381 return band->loop_type[
pos];
396 if (pos < 0 || pos >= band->n)
398 "invalid member position",
405 if (!band->loop_type) {
411 if (band->n && !band->loop_type)
429 if (pos < 0 || pos >= band->n)
433 if (!band->isolate_loop_type)
436 return band->isolate_loop_type[
pos];
454 if (pos < 0 || pos >= band->n)
456 "invalid member position",
463 if (!band->isolate_loop_type) {
469 if (band->n && !band->isolate_loop_type)
473 band->isolate_loop_type[
pos] =
type;
536 for (i = 0; i <
n; ++i) {
545 while (i + 1 <
n &&
type[i + 1] ==
type[i])
677 if (!strcmp(
name,
"isolate")) {
737 "conflicting loop type options",
754 if (!band->loop_type) {
758 if (band->n && !band->loop_type)
761 for (i = 0; i < band->n; ++i) {
780 if (!band->isolate_loop_type) {
784 if (band->n && !band->isolate_loop_type)
787 for (i = 0; i < band->n; ++i) {
868 isl_bool has_isolate, has_loop_type, has_isolate_loop_type;
877 if (has_loop_type < 0)
880 if (has_isolate_loop_type < 0)
883 if (!has_loop_type) {
884 free(band->loop_type);
885 band->loop_type = NULL;
894 if (!has_isolate_loop_type) {
895 free(band->isolate_loop_type);
896 band->isolate_loop_type = NULL;
906 band->ast_build_options =
options;
907 band->anchored = has_isolate;
956 options = band->ast_build_options;
959 band->ast_build_options =
options;
961 if (!band->ast_build_options)
982 band->mupa = isl_multi_union_pw_aff_scale_multi_val(band->mupa, mv);
989 isl_multi_val_free(mv);
1003 band->mupa = isl_multi_union_pw_aff_scale_down_multi_val(band->mupa,
1011 isl_multi_val_free(mv);
1023 band->mupa = isl_multi_union_pw_aff_mod_multi_val(band->mupa, mv);
1029 isl_multi_val_free(mv);
1045 if (!band || !shift)
1048 isl_multi_union_pw_aff_copy(band->mupa));
1050 isl_multi_union_pw_aff_copy(shift));
1058 "domain of shift needs to include domain of "
1059 "partial schedule",
goto error);
1060 band->mupa = isl_multi_union_pw_aff_add(band->mupa, shift);
1066 isl_multi_union_pw_aff_free(shift);
1090 ctx = isl_multi_val_get_ctx(
sizes);
1093 n = isl_multi_union_pw_aff_size(sched);
1095 sched = isl_multi_union_pw_aff_free(sched);
1096 for (i = 0; i <
n; ++i) {
1099 upa = isl_multi_union_pw_aff_get_union_pw_aff(sched, i);
1100 v = isl_multi_val_get_val(
sizes, i);
1108 sched = isl_multi_union_pw_aff_set_union_pw_aff(sched, i, upa);
1111 isl_multi_val_free(
sizes);
1122 if (!band || !
sizes)
1130 isl_multi_val_free(
sizes);
1153 if (!band || !
sizes)
1158 isl_multi_val_free(
sizes);
1167 scaled = isl_multi_union_pw_aff_scale_multi_val(scaled,
sizes);
1169 isl_multi_val_free(
sizes);
1170 band->mupa = isl_multi_union_pw_aff_sub(band->mupa, scaled);
1176 isl_multi_val_free(
sizes);
1192 if (
pos < 0 || n < 0 || pos + n > band->n)
1194 "range out of bounds",
1201 band->mupa = isl_multi_union_pw_aff_drop_dims(band->mupa,
1206 for (i =
pos +
n; i < band->n; ++i)
1207 band->coincident[i -
n] = band->coincident[i];
1208 if (band->loop_type)
1209 for (i =
pos +
n; i < band->n; ++i)
1210 band->loop_type[i -
n] = band->loop_type[i];
1211 if (band->isolate_loop_type)
1212 for (i =
pos +
n; i < band->n; ++i)
1213 band->isolate_loop_type[i -
n] =
1214 band->isolate_loop_type[i];
1231 band->mupa = isl_multi_union_pw_aff_reset_user(band->mupa);
1232 band->ast_build_options =
1234 if (!band->mupa || !band->ast_build_options)
1246 if (!band || !space)
1249 band->mupa = isl_multi_union_pw_aff_align_params(band->mupa,
1251 band->ast_build_options =
1253 if (!band->mupa || !band->ast_build_options)
__isl_null isl_union_pw_multi_aff * isl_union_pw_multi_aff_free(__isl_take isl_union_pw_multi_aff *upma)
__isl_export __isl_give isl_multi_union_pw_aff * isl_multi_union_pw_aff_gist(__isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_union_set *context)
__isl_give isl_union_pw_aff * isl_union_pw_aff_scale_down_val(__isl_take isl_union_pw_aff *upa, __isl_take isl_val *v)
__isl_export __isl_give isl_union_set * isl_multi_union_pw_aff_domain(__isl_take isl_multi_union_pw_aff *mupa)
__isl_give isl_union_pw_aff * isl_union_pw_aff_floor(__isl_take isl_union_pw_aff *upa)
__isl_give isl_multi_union_pw_aff * isl_multi_union_pw_aff_floor(__isl_take isl_multi_union_pw_aff *mupa)
__isl_overload __isl_give isl_multi_union_pw_aff * isl_multi_union_pw_aff_pullback_union_pw_multi_aff(__isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_union_pw_multi_aff *upma)
__isl_give isl_union_pw_aff * isl_union_pw_aff_scale_val(__isl_take isl_union_pw_aff *upa, __isl_take isl_val *v)
__isl_export __isl_give isl_multi_union_pw_aff * isl_multi_union_pw_aff_intersect_domain(__isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_union_set *uset)
struct isl_union_pw_multi_aff isl_union_pw_multi_aff
struct isl_union_pw_aff isl_union_pw_aff
struct isl_multi_union_pw_aff isl_multi_union_pw_aff
#define isl_calloc_type(ctx, type)
#define isl_die(ctx, errno, msg, code)
isl_bool isl_bool_ok(int b)
#define isl_alloc_array(ctx, type, n)
#define isl_calloc_array(ctx, type, n)
isl_bool isl_bool_not(isl_bool b)
isl_stat isl_stat(*) void user)
void GMPZAPI() add(mp_int rop, mp_int op1, mp_int op2)
static __isl_give isl_ast_expr * scale(__isl_take isl_ast_expr *expr, __isl_take isl_val *v)
static void drop(struct isl_coalesce_info *info)
__isl_give dup(__isl_keep LIST(EL) *list)
static unsigned pos(__isl_keep isl_space *space, enum isl_dim_type type)
__isl_give isl_union_set * isl_schedule_band_get_ast_build_options(__isl_keep isl_schedule_band *band)
isl_bool isl_schedule_band_get_permutable(__isl_keep isl_schedule_band *band)
static isl_bool has_isolate_option(__isl_keep isl_union_set *options)
__isl_give isl_schedule_band * isl_schedule_band_mod(__isl_take isl_schedule_band *band, __isl_take isl_multi_val *mv)
static __isl_give isl_union_set * clear_isolate_loop_types(__isl_take isl_union_set *options)
static __isl_give isl_union_set * add_loop_types(__isl_take isl_union_set *options, int n, enum isl_ast_loop_type *type, int isolate)
__isl_give isl_schedule_band * isl_schedule_band_pullback_union_pw_multi_aff(__isl_take isl_schedule_band *band, __isl_take isl_union_pw_multi_aff *upma)
__isl_give isl_schedule_band * isl_schedule_band_copy(__isl_keep isl_schedule_band *band)
static isl_bool is_isolate(__isl_keep isl_set *set)
int isl_schedule_band_is_anchored(__isl_keep isl_schedule_band *band)
static enum isl_ast_loop_type extract_loop_type(__isl_keep isl_union_set *options, int pos, int isolate)
__isl_give isl_schedule_band * isl_schedule_band_member_set_coincident(__isl_take isl_schedule_band *band, int pos, int coincident)
static isl_bool not(__isl_keep isl_set *set, void *user)
__isl_give isl_schedule_band * isl_schedule_band_reset_user(__isl_take isl_schedule_band *band)
__isl_give isl_schedule_band * isl_schedule_band_shift(__isl_take isl_schedule_band *band, __isl_take isl_multi_union_pw_aff *shift)
__isl_give isl_schedule_band * isl_schedule_band_tile(__isl_take isl_schedule_band *band, __isl_take isl_multi_val *sizes)
static __isl_give isl_union_set * clear_loop_types(__isl_take isl_union_set *options)
__isl_give isl_space * isl_schedule_band_get_space(__isl_keep isl_schedule_band *band)
__isl_give isl_schedule_band * isl_schedule_band_cow(__isl_take isl_schedule_band *band)
__isl_give isl_schedule_band * isl_schedule_band_point(__isl_take isl_schedule_band *band, __isl_keep isl_schedule_band *tile, __isl_take isl_multi_val *sizes)
isl_ctx * isl_schedule_band_get_ctx(__isl_keep isl_schedule_band *band)
__isl_give isl_schedule_band * isl_schedule_band_member_set_isolate_ast_loop_type(__isl_take isl_schedule_band *band, int pos, enum isl_ast_loop_type type)
isl_size isl_schedule_band_n_member(__isl_keep isl_schedule_band *band)
static int extract_isolate_loop_types(__isl_keep isl_schedule_band *band, __isl_keep isl_union_set *options)
static isl_bool has_any(__isl_keep isl_union_set *uset, isl_bool(*is)(__isl_keep isl_set *set))
__isl_give isl_schedule_band * isl_schedule_band_replace_ast_build_option(__isl_take isl_schedule_band *band, __isl_take isl_set *drop, __isl_take isl_set *add)
static isl_bool is_isolate_loop_type_option(__isl_keep isl_set *set)
__isl_give isl_schedule_band * isl_schedule_band_gist(__isl_take isl_schedule_band *band, __isl_take isl_union_set *context)
__isl_give isl_schedule_band * isl_schedule_band_align_params(__isl_take isl_schedule_band *band, __isl_take isl_space *space)
__isl_give isl_schedule_band * isl_schedule_band_scale(__isl_take isl_schedule_band *band, __isl_take isl_multi_val *mv)
static isl_bool is_loop_type_option(__isl_keep isl_set *set)
__isl_give isl_schedule_band * isl_schedule_band_member_set_ast_loop_type(__isl_take isl_schedule_band *band, int pos, enum isl_ast_loop_type type)
__isl_give isl_multi_union_pw_aff * isl_schedule_band_get_partial_schedule(__isl_keep isl_schedule_band *band)
__isl_give isl_schedule_band * isl_schedule_band_drop(__isl_take isl_schedule_band *band, int pos, int n)
__isl_give isl_schedule_band * isl_schedule_band_scale_down(__isl_take isl_schedule_band *band, __isl_take isl_multi_val *mv)
__isl_give isl_set * isl_schedule_band_get_ast_isolate_option(__isl_keep isl_schedule_band *band, int depth)
isl_bool isl_schedule_band_plain_is_equal(__isl_keep isl_schedule_band *band1, __isl_keep isl_schedule_band *band2)
__isl_give isl_schedule_band * isl_schedule_band_set_ast_build_options(__isl_take isl_schedule_band *band, __isl_take isl_union_set *options)
__isl_give isl_schedule_band * isl_schedule_band_intersect_domain(__isl_take isl_schedule_band *band, __isl_take isl_union_set *domain)
__isl_give isl_schedule_band * isl_schedule_band_from_multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *mupa)
static int extract_loop_types(__isl_keep isl_schedule_band *band, __isl_keep isl_union_set *options)
static const char * option_str[]
enum isl_ast_loop_type isl_schedule_band_member_get_ast_loop_type(__isl_keep isl_schedule_band *band, int pos)
enum isl_ast_loop_type isl_schedule_band_member_get_isolate_ast_loop_type(__isl_keep isl_schedule_band *band, int pos)
static __isl_give isl_schedule_band * isl_schedule_band_alloc(isl_ctx *ctx)
__isl_give isl_schedule_band * isl_schedule_band_set_partial_schedule(__isl_take isl_schedule_band *band, __isl_take isl_multi_union_pw_aff *schedule)
__isl_give isl_schedule_band * isl_schedule_band_dup(__isl_keep isl_schedule_band *band)
static isl_bool has_isolate_loop_type_options(__isl_keep isl_union_set *options)
static isl_bool has_loop_type_options(__isl_keep isl_union_set *options)
static isl_multi_union_pw_aff * isl_multi_union_pw_aff_tile(__isl_take isl_multi_union_pw_aff *sched, __isl_take isl_multi_val *sizes)
isl_bool isl_schedule_band_member_get_coincident(__isl_keep isl_schedule_band *band, int pos)
static __isl_give isl_space * loop_type_space(__isl_take isl_space *space, enum isl_ast_loop_type type, int isolate)
__isl_null isl_schedule_band * isl_schedule_band_free(__isl_take isl_schedule_band *band)
static __isl_give isl_union_set * loop_types(__isl_take isl_space *space, int isolate)
__isl_give isl_schedule_band * isl_schedule_band_set_permutable(__isl_take isl_schedule_band *band, int permutable)
static __isl_give isl_map * isolate(__isl_take isl_set *set, int pos)
const char * isl_map_get_tuple_name(__isl_keep isl_map *map, enum isl_dim_type type)
__isl_export isl_bool isl_set_is_wrapping(__isl_keep isl_set *set)
__isl_export __isl_give isl_map * isl_set_unwrap(__isl_take isl_set *set)
__isl_null isl_map * isl_map_free(__isl_take isl_map *map)
isl_bool isl_map_has_tuple_name(__isl_keep isl_map *map, enum isl_dim_type type)
int isl_options_get_tile_scale_tile_loops(isl_ctx *ctx)
int isl_options_get_tile_shift_point_loops(isl_ctx *ctx)
__isl_export __isl_give isl_set * isl_set_universe(__isl_take isl_space *space)
__isl_give isl_set * isl_set_lower_bound_si(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, int value)
const char * isl_set_get_tuple_name(__isl_keep isl_set *set)
__isl_null isl_set * isl_set_free(__isl_take isl_set *set)
__isl_give isl_set * isl_set_copy(__isl_keep isl_set *set)
isl_size isl_set_dim(__isl_keep isl_set *set, enum isl_dim_type type)
__isl_give isl_set * isl_set_fix_si(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, int value)
__isl_give isl_set * isl_set_upper_bound_si(__isl_take isl_set *set, enum isl_dim_type type, unsigned pos, int value)
__isl_export isl_bool isl_set_is_empty(__isl_keep isl_set *set)
isl_bool isl_set_has_tuple_name(__isl_keep isl_set *set)
__isl_null isl_space * isl_space_free(__isl_take isl_space *space)
__isl_give isl_space * isl_space_from_range(__isl_take isl_space *space)
__isl_give isl_space * isl_space_set_from_params(__isl_take isl_space *space)
__isl_give isl_space * isl_space_copy(__isl_keep isl_space *space)
__isl_give isl_space * isl_space_set_tuple_name(__isl_take isl_space *space, enum isl_dim_type type, const char *s)
__isl_export __isl_give isl_space * isl_space_wrap(__isl_take isl_space *space)
__isl_give isl_space * isl_space_add_dims(__isl_take isl_space *space, enum isl_dim_type type, unsigned n)
__isl_give isl_space * isl_space_params_alloc(isl_ctx *ctx, unsigned nparam)
isl_bool(* is)(__isl_keep isl_set *set)
isl_multi_union_pw_aff * mupa
isl_union_set * ast_build_options
__isl_give isl_union_set * isl_union_set_align_params(__isl_take isl_union_set *uset, __isl_take isl_space *model)
struct isl_union_set isl_union_set
__isl_give isl_union_set * isl_union_set_reset_user(__isl_take isl_union_set *uset)
__isl_export __isl_give isl_union_set * isl_union_set_union(__isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2)
__isl_give isl_union_set * isl_union_set_add_set(__isl_take isl_union_set *uset, __isl_take isl_set *set)
__isl_give isl_union_set * isl_union_set_empty(__isl_take isl_space *space)
__isl_export isl_bool isl_union_set_is_equal(__isl_keep isl_union_set *uset1, __isl_keep isl_union_set *uset2)
__isl_export __isl_give isl_space * isl_union_set_get_space(__isl_keep isl_union_set *uset)
__isl_constructor __isl_give isl_union_set * isl_union_set_from_set(__isl_take isl_set *set)
__isl_export __isl_give isl_set * isl_union_set_extract_set(__isl_keep isl_union_set *uset, __isl_take isl_space *space)
isl_ctx * isl_union_set_get_ctx(__isl_keep isl_union_set *uset)
__isl_give isl_union_set * isl_union_set_copy(__isl_keep isl_union_set *uset)
__isl_export isl_bool isl_union_set_every_set(__isl_keep isl_union_set *uset, isl_bool(*test)(__isl_keep isl_set *set, void *user), void *user)
__isl_export __isl_give isl_union_set * isl_union_set_subtract(__isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2)
__isl_null isl_union_set * isl_union_set_free(__isl_take isl_union_set *uset)
__isl_export isl_bool isl_union_set_is_subset(__isl_keep isl_union_set *uset1, __isl_keep isl_union_set *uset2)
__isl_give isl_val * isl_val_copy(__isl_keep isl_val *v)
__isl_null isl_val * isl_val_free(__isl_take isl_val *v)
struct isl_multi_val isl_multi_val