18#define MULTI_NAME(BASE) "isl_multi_" #BASE
29 return multi ? multi->space : NULL;
72 multi =
FN(
MULTI(
BASE),init_explicit_domain)(multi);
91 for (i = 0; i < multi->n; ++i)
93 FN(
EL,copy)(multi->u.p[i]));
128 if (--multi->ref > 0)
132 for (i = 0; i < multi->n; ++i)
133 FN(
EL,free)(multi->u.p[i]);
157 space = multi->space;
170 if (!multi || !space)
173 if (multi->space == space) {
182 multi->space = space;
205#define TYPE MULTI(BASE)
216 return multi->u.p[
pos];
255 el = multi->u.p[
pos];
256 multi->u.p[
pos] = NULL;
269 if (multi->u.p[
pos] == el) {
279 multi->u.p[
pos] = el;
299 if (
FN(
EL,check_match_domain_space)(el, space) < 0)
314 match =
FN(
EL,matching_params)(el, multi_space);
319 FN(
EL,get_space)(el));
360 for (i = 0; i <
n; ++i) {
386 if (
n < 0 || !space || !
domain)
389 for (i = 0; i <
n; ++i) {
397 multi =
FN(
MULTI(
BASE),reset_explicit_domain_space)(multi,
401 multi =
FN(
MULTI(
BASE),restore_space)(multi, space);
456 for (i = 0; i <
n; ++i) {
488 if (!multi || !model)
492 if (equal_params < 0)
502 "model has unnamed parameters",
goto error);
505 "input has unnamed parameters",
goto error);
508 multi =
FN(
MULTI(
BASE),align_explicit_domain_params)(multi,
513 domain_space =
FN(
MULTI(
BASE),get_domain_space)(multi);
543 if (dim < 0 ||
n < 0)
549 "invalid number of elements in list",
goto error);
551 for (i = 0; i <
n; ++i) {
556 for (i = 0; i <
n; ++i) {
559 multi =
FN(
MULTI(
BASE),restore_check_space)(multi, i, el);
592 for (i = 0; i <
n; ++i)
593 FN(
EL,free)(multi->u.p[first + i]);
594 for (i = first; i +
n < multi->n; ++i)
595 multi->u.p[i] = multi->u.p[i +
n];
598 multi =
FN(
MULTI(
BASE),init_explicit_domain)(multi);
616 multi =
FN(
MULTI(
BASE),restore_space)(multi, space);
619 return FN(
MULTI(
BASE),drop_output_dims)(multi, first,
n);
622 multi =
FN(
MULTI(
BASE),drop_explicit_domain_dims)(multi,
628 for (i = 0; i <
size; ++i) {
640#define TYPE MULTI(BASE)
661 FN(
MULTI(
BASE),align_params_bin)(&multi1, &multi2);
664 if (n1 < 0 || n2 < 0)
671 for (i = 0; i < n1; ++i) {
676 for (i = 0; i < n2; ++i) {
717 "range is not a product",
745 "range is not a product",
772 "not a product",
return FN(
MULTI(
BASE),free)(multi));
792 multi =
FN(
MULTI(
BASE),restore_space)(multi, space);
830 if (dim < 0 || !multi2)
851#define TYPE MULTI(BASE)
878 FN(
MULTI(
BASE),align_params_bin)(&multi1, &multi2);
880 if (
n < 0 ||
FN(
MULTI(
BASE),check_equal_space)(multi1, multi2) < 0)
883 for (i = 0; i <
n; ++i) {
889 multi1 =
FN(
MULTI(
BASE),restore_at)(multi1, i, el1);
921 for (i = 0; i <
n; ++i) {
947 for (i = 0; i <
n; ++i) {
949 if (every < 0 || !every)
957#define TYPE MULTI(BASE)
968 if (!multi1 || !multi2)
970 if (multi1->n != multi2->n)
976 for (i = 0; i < multi1->n; ++i) {
977 equal =
FN(
EL,plain_is_equal)(multi1->u.p[i], multi2->u.p[i]);
#define isl_die(ctx, errno, msg, code)
#define isl_calloc(ctx, type, size)
isl_stat isl_stat(* fn)(__isl_take ISL_KEY *key, __isl_take ISL_VAL *val, 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 __isl_give isl_qpolynomial * reset_domain_space(__isl_take isl_qpolynomial *qp, void *user)
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)
__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_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)
__isl_give isl_space * isl_space_extend_domain_with_range(__isl_take isl_space *space, __isl_take isl_space *model)
isl_bool isl_space_has_named_params(__isl_keep isl_space *space)
static isl_bool match(__isl_keep isl_space *space1, enum isl_dim_type type1, __isl_keep isl_space *space2, enum isl_dim_type type2)
static __isl_give isl_union_map * total(__isl_take isl_union_map *umap, __isl_give isl_map *(*fn)(__isl_take isl_map *))
static __isl_give isl_union_map * intersect_explicit_domain(__isl_take isl_union_map *umap, __isl_keep isl_multi_union_pw_aff *mupa)
static bool any(const std::vector< bool > &vector)
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_flatten_range(__isl_take isl_space *space)
__isl_give isl_space * isl_space_range_factor_range(__isl_take isl_space *space)
isl_ctx * isl_space_get_ctx(__isl_keep isl_space *space)
isl_bool isl_space_range_is_wrapping(__isl_keep isl_space *space)
__isl_give isl_space * isl_space_copy(__isl_keep isl_space *space)
__isl_give isl_space * isl_space_align_params(__isl_take isl_space *space1, __isl_take isl_space *space2)
__isl_export isl_bool isl_space_is_wrapping(__isl_keep isl_space *space)
__isl_export isl_bool isl_space_is_equal(__isl_keep isl_space *space1, __isl_keep isl_space *space2)
__isl_give isl_space * isl_space_range_factor_domain(__isl_take isl_space *space)
__isl_give isl_space * isl_space_drop_dims(__isl_take isl_space *space, enum isl_dim_type type, unsigned first, unsigned num)
__isl_give isl_space * isl_space_range_product(__isl_take isl_space *left, __isl_take isl_space *right)
isl_size isl_space_dim(__isl_keep isl_space *space, enum isl_dim_type type)
__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_export __isl_give isl_space * isl_space_domain(__isl_take isl_space *space)
static Signature range_factor_domain
static std::vector< Signature > set_at
static std::vector< Signature > bin_op
static Signature range_product
static std::vector< Signature > flatten_range
static Signature range_factor_range