22 return u ? u->space->ctx : NULL;
146 entry =
FN(
UNION,find_part_entry)(u, space, 0);
190 if (
FN(
UNION,check_disjoint_domain_other)(u, part) < 0)
192 entry =
FN(
UNION,find_part_entry)(u, part->dim, 1);
200 FN(
UNION,check_disjoint_domain)(entry->
data, part) < 0)
208 u =
FN(
UNION,remove_part_entry)(u, entry);
225 return FN(
UNION,add_part_generic)(u, part, 1);
247 return FN(
UNION,alloc_same_size_on_space)(u,
FN(
UNION,get_space)(u));
279 S(
UNION,transform_control) *control;
289 S(
UNION,transform_control) *control =
data->control;
292 if (control->filter) {
295 handle = control->filter(part, control->filter_user);
302 if (!control->inplace)
303 part =
FN(
PART,copy)(part);
305 part = control->fn(part, control->fn_user);
306 if (control->inplace)
310 if (!part || !
data->res)
319 S(
UNION,transform_control) *control)
324 if (control->inplace) {
330 space =
FN(
UNION,get_space)(u);
331 data.res =
FN(
UNION,alloc_same_size_on_space)(u, space);
335 if (!control->inplace)
348 control->space = space;
364 S(
UNION,transform_control) control = { .fn =
fn, .fn_user =
user };
367 single_ref =
FN(
UNION,has_single_reference)(u);
385 S(
UNION,transform_control) control = { .fn = &
FN(
UNION,copy_part) };
411 &
FN(
UNION,free_u_entry), NULL);
423 FN(
PART,get_domain_space)(part));
432 S(
UNION,transform_control) control = {
442 u =
FN(
UNION,transform_space)(u, space, &control);
460 space =
FN(
UNION,peek_space)(u);
462 if (equal_params < 0)
486 *u =
FN(
UNION,add_part_generic)(*u, part, 0);
533 return FN(
UNION,union_add_)(u1, u2);
546 space =
FN(
PART,get_space)(part);
582 space =
FN(
PART,get_space)(part);
583 entry2 =
FN(
UNION,find_part_entry)(
data->u2, space, 0);
592 part2 = entry2->
data;
596 "entries should have the same range space",
658 return FN(
UNION,union_add_)(u1, u2);
684 S(
UNION,transform_control) control = {
685 .fn = &
FN(
UNION,any_set_entry),
744 S(
UNION,match_domain_control) *control;
757 if (
data->control->filter) {
759 if (pass < 0 || !pass) {
765 space =
FN(
PART,get_domain_space)(part);
766 if (
data->control->match_space)
767 space =
data->control->match_space(space);
790 S(
UNION,match_domain_data)
data = { NULL, NULL, control };
818 S(
UNION,match_domain_control) control = {
819 .fn = &
FN(
PW,intersect_domain),
823 return FN(
UNION,intersect_params)(u,
825 return FN(
UNION,match_domain_op)(u, uset, &control);
833 return FN(
UNION,intersect_domain_union_set)(u, uset);
856 S(
UNION,transform_control) control = {
857 .filter = &
FN(
UNION,select_entry),
858 .filter_user = space,
879 S(
UNION,match_domain_control) control = {
880 .filter = &
FN(
PART,domain_is_wrapping),
882 .fn = &
FN(
PW,intersect_domain_wrapped_domain),
885 return FN(
UNION,match_domain_op)(u, uset, &control);
894 S(
UNION,match_domain_control) control = {
895 .filter = &
FN(
PART,domain_is_wrapping),
897 .fn = &
FN(
PW,intersect_domain_wrapped_range),
900 return FN(
UNION,match_domain_op)(u, uset, &control);
914 space =
FN(
PART,get_domain_space)(part);
916 return FN(
PART,subtract_domain)(part,
set);
924 S(
UNION,transform_control) control = {
925 .fn = &
FN(
UNION,subtract_domain_entry),
939 return FN(
UNION,subtract_domain_union_set)(u, uset);
962 S(
UNION,transform_control) control = {
963 .filter = &
FN(
UNION,filter_out_entry),
964 .filter_user = space,
975 S(
UNION,match_domain_control) control = {
981 return FN(
UNION,match_domain_op)(u, uset, &control);
993 part =
FN(
PART,copy)(*part_p);
1005 if (
FN(
UNION,foreach_inplace)(u, &
FN(
UNION,coalesce_entry), NULL) < 0)
1094 "expecting rational factor",
goto error);
1096 u =
FN(
UNION,transform_inplace)(u, &
FN(
UNION,scale_val_entry), v);
1132 "expecting rational factor",
goto error);
1135 "cannot scale down by zero",
goto error);
1137 u =
FN(
UNION,transform_inplace)(u, &
FN(
UNION,scale_down_val_entry), v);
1204 entry =
FN(
UNION,find_part_entry)(
data->u2, pw->dim, 0);
1210 return FN(
PW,plain_is_equal)(pw, entry->
data);
1223 if (u1->table.n != u2->table.n)
1227 if (n1 < 0 || n2 < 0)
1299 S(
UNION,transform_control) control = {
1300 .fn = &
FN(
UNION,drop_dims_entry),
1309 "can only project out parameters",
1312 space =
FN(
UNION,get_space)(u);
1314 return FN(
UNION,transform_space)(u, space, &control);
1344 S(
UNION,transform_control) control = {
1345 .fn = &
FN(
UNION,set_dim_name_entry),
1355 "can only set parameter names",
1358 space =
FN(
UNION,get_space)(u);
1360 return FN(
UNION,transform_space)(u, space, &control);
1377 S(
UNION,transform_control) control = {
1378 .fn = &
FN(
UNION,reset_user_entry),
1382 space =
FN(
UNION,get_space)(u);
1384 return FN(
UNION,transform_space)(u, space, &control);
1417 if (
FN(
UNION,foreach_inplace)(u, &
FN(
UNION,add_to_list), &list) < 0)
isl_stat isl_stat_non_null(void *obj)
#define isl_calloc_type(ctx, type)
#define isl_die(ctx, errno, msg, code)
isl_bool isl_bool_not(isl_bool b)
void isl_hash_table_clear(struct isl_hash_table *table)
struct isl_hash_table_entry * isl_hash_table_entry_none
int isl_hash_table_init(struct isl_ctx *ctx, struct isl_hash_table *table, int min_size)
isl_stat isl_hash_table_foreach(isl_ctx *ctx, struct isl_hash_table *table, isl_stat(*fn)(void **entry, void *user), void *user)
isl_stat isl_stat(* fn)(__isl_take ISL_KEY *key, __isl_take ISL_VAL *val, void *user)
isl_stat isl_stat(*) void user)
isl_bool isl_bool(* test)(__isl_keep ISL_KEY *key, __isl_keep ISL_VAL *val, void *user)
void GMPZAPI() add(mp_int rop, mp_int op1, mp_int op2)
static int coalesce(isl_ctx *ctx, int n, struct isl_coalesce_info *info)
static __isl_give isl_qpolynomial * realign_domain(__isl_take isl_qpolynomial *qp, void *user)
static __isl_give isl_qpolynomial * drop_dims(__isl_take isl_qpolynomial *qp, void *user)
static __isl_give isl_qpolynomial * scale_val(__isl_take isl_qpolynomial *qp, void *user)
enum isl_fold isl_fold_type_negate(enum isl_fold type)
static __isl_give isl_qpolynomial * set_dim_name(__isl_take isl_qpolynomial *qp, void *user)
__isl_give dup(__isl_keep LIST(EL) *list)
static unsigned pos(__isl_keep isl_space *space, enum isl_dim_type type)
__isl_null isl_reordering * isl_reordering_free(__isl_take isl_reordering *exp)
__isl_give isl_reordering * isl_parameter_alignment_reordering(__isl_keep isl_space *alignee, __isl_keep isl_space *aligner)
__isl_give isl_space * isl_reordering_get_space(__isl_keep isl_reordering *r)
__isl_give isl_reordering * isl_reordering_extend_space(__isl_take isl_reordering *exp, __isl_take isl_space *space)
__isl_give isl_reordering * isl_reordering_copy(__isl_keep isl_reordering *exp)
static __isl_give isl_schedule_node * align_params(__isl_take isl_schedule_node *node, void *user)
static __isl_give isl_schedule_node * reset_user(__isl_take isl_schedule_node *node, void *user)
static isl_stat transform(isl_ctx *ctx, struct isl_sched_graph *graph, struct isl_sched_node *t_node)
isl_bool isl_space_has_domain_tuples(__isl_keep isl_space *space1, __isl_keep isl_space *space2)
static bool is_equal(const T &a, const T &b)
static isl_stat match_bin_entry(void **entry, void *user)
static __isl_give isl_union_map * inplace(__isl_take isl_union_map *umap, __isl_give isl_map *(*fn)(__isl_take isl_map *))
static isl_bool has_domain_space_tuples(__isl_keep isl_map *map, void *user)
static isl_stat align_entry(void **entry, void *user)
struct isl_hash_table_entry * isl_union_set_find_entry(__isl_keep isl_union_set *uset, __isl_keep isl_space *space, int reserve)
static __isl_give isl_union_map * match_bin_op(__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2, __isl_give isl_map *(*fn)(__isl_take isl_map *, __isl_take isl_map *))
#define OPT_TYPE_ARG(loc)
#define OPT_SET_TYPE(loc, val)
__isl_export __isl_give isl_space * isl_set_get_space(__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_give isl_set * isl_set_align_params(__isl_take isl_set *set, __isl_take isl_space *model)
isl_bool isl_space_has_equal_params(__isl_keep isl_space *space1, __isl_keep isl_space *space2)
__isl_null isl_space * isl_space_free(__isl_take isl_space *space)
__isl_export __isl_give isl_space * isl_space_params(__isl_take isl_space *space)
__isl_give isl_space * isl_space_factor_domain(__isl_take isl_space *space)
__isl_give isl_space * isl_space_copy(__isl_keep isl_space *space)
__isl_export __isl_give isl_space * isl_space_unit(isl_ctx *ctx)
__isl_give isl_space * isl_space_set_dim_name(__isl_take isl_space *space, enum isl_dim_type type, unsigned pos, __isl_keep const char *name)
__isl_give isl_space * isl_space_drop_dims(__isl_take isl_space *space, enum isl_dim_type type, unsigned first, unsigned num)
isl_size isl_space_dim(__isl_keep isl_space *space, enum isl_dim_type type)
isl_bool isl_space_tuple_is_equal(__isl_keep isl_space *space1, enum isl_dim_type type1, __isl_keep isl_space *space2, enum isl_dim_type type2)
__isl_give isl_space * isl_space_factor_range(__isl_take isl_space *space)
__isl_give isl_space * isl_space_reset_user(__isl_take isl_space *space)
isl_bool isl_space_domain_is_wrapping(__isl_keep isl_space *space)
int isl_space_find_dim_by_name(__isl_keep isl_space *space, enum isl_dim_type type, const char *name)
struct isl_hash_table table
struct isl_union_set isl_union_set
__isl_give isl_set * isl_set_from_union_set(__isl_take isl_union_set *uset)
isl_bool isl_union_set_is_params(__isl_keep isl_union_set *uset)
__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_give isl_set * isl_union_set_extract_set(__isl_keep isl_union_set *uset, __isl_take isl_space *space)
__isl_null isl_union_set * isl_union_set_free(__isl_take isl_union_set *uset)
__isl_give isl_val * isl_val_copy(__isl_keep isl_val *v)
isl_ctx * isl_val_get_ctx(__isl_keep isl_val *val)
__isl_export isl_bool isl_val_is_neg(__isl_keep isl_val *v)
__isl_null isl_val * isl_val_free(__isl_take isl_val *v)
__isl_export isl_bool isl_val_is_zero(__isl_keep isl_val *v)
__isl_export isl_bool isl_val_is_one(__isl_keep isl_val *v)
__isl_export isl_bool isl_val_is_rat(__isl_keep isl_val *v)