Lines Matching refs:nested
47 space->nested[0] = NULL;
48 space->nested[1] = NULL;
74 if (space->n_in != 0 || space->nested[0])
198 if (space->n_in != 0 || space->nested[0] ||
199 space->n_out != 0 || space->nested[1])
320 /* Return the nested space at the given position.
327 if (!space->nested[pos])
329 "no nested space", return NULL);
330 return space->nested[pos];
375 "can have nested relations", return isl_size_error);
424 if (space->nested[0] &&
425 !(dup->nested[0] = isl_space_copy(space->nested[0])))
427 if (space->nested[1] &&
428 !(dup->nested[1] = isl_space_copy(space->nested[1])))
474 isl_space_free(space->nested[0]);
475 isl_space_free(space->nested[1]);
504 /* Return a copy of the nested space at the given position.
512 /* Return the nested space at the given position.
513 * This may be either a copy or the nested space itself
515 * This allows the nested space to be modified inplace
516 * if both "space" and the nested space have only a single reference.
524 isl_space *nested;
530 nested = space->nested[pos];
531 space->nested[pos] = NULL;
532 return nested;
535 /* Replace the nested space at the given position by "nested",
536 * where this nested space of "space" may be missing
542 __isl_take isl_space *space, int pos, __isl_take isl_space *nested)
544 if (!space || !nested)
547 if (space->nested[pos] == nested) {
548 isl_space_free(nested);
555 isl_space_free(space->nested[pos]);
556 space->nested[pos] = nested;
561 isl_space_free(nested);
718 * in the nested spaces (if any) as well.
731 if (!space->nested[i])
733 space->nested[i] =
734 isl_space_set_dim_id(space->nested[i],
736 if (!space->nested[i])
752 * in the nested spaces (if any) as well.
765 if (!space->nested[i])
767 space->nested[i] =
768 isl_space_reset_dim_id(space->nested[i],
770 if (!space->nested[i])
972 isl_space *nested;
974 if (!space->nested[i])
976 nested = isl_space_take_nested(space, i);
977 nested = isl_space_reset_user(nested);
978 space = isl_space_restore_nested(space, i, nested);
998 static __isl_keep isl_space *nested(__isl_keep isl_space *space,
1004 return space->nested[0];
1006 return space->nested[1];
1059 * If nested tuples are involved, then we need to be careful not
1061 * in those nested tuples.
1084 nested1 = nested(space1, type1);
1085 nested2 = nested(space2, type2);
1101 isl_space *nested;
1108 "can have nested relations", return isl_bool_error);
1110 nested = isl_space_peek_nested(space1, pos);
1111 return isl_space_tuple_is_equal(nested, inner, space2, type2);
1255 if (space && space->nested[0] &&
1256 !(space->nested[0] = isl_space_add_dims(space->nested[0],
1259 if (space && space->nested[1] &&
1260 !(space->nested[1] = isl_space_add_dims(space->nested[1],
1326 * any nested spaces.
1389 if (space && space->nested[0] &&
1390 !(space->nested[0] = isl_space_insert_dims(space->nested[0],
1393 if (space && space->nested[1] &&
1394 !(space->nested[1] = isl_space_insert_dims(space->nested[1],
1486 isl_space *nested;
1488 if (!space->nested[i])
1490 nested = isl_space_take_nested(space, i);
1491 nested = isl_space_replace_params(nested, space);
1492 space = isl_space_restore_nested(space, i, nested);
1547 if (space && left->nested[0] &&
1548 !(space->nested[0] = isl_space_copy(left->nested[0])))
1550 if (space && right->nested[1] &&
1551 !(space->nested[1] = isl_space_copy(right->nested[1])))
1661 isl_space *nested;
1667 nested = space->nested[0];
1670 nested->n_in, nested->n_out);
1673 if (nested->tuple_id[0]) {
1674 domain->tuple_id[0] = isl_id_copy(nested->tuple_id[0]);
1678 if (nested->nested[0]) {
1679 domain->nested[0] = isl_space_copy(nested->nested[0]);
1680 if (!domain->nested[0])
1697 isl_space *nested;
1703 nested = space->nested[0];
1705 range = isl_space_drop_dims(range, isl_dim_in, 0, nested->n_in);
1708 if (nested->tuple_id[1]) {
1709 range->tuple_id[0] = isl_id_copy(nested->tuple_id[1]);
1713 if (nested->nested[1]) {
1714 range->nested[0] = isl_space_copy(nested->nested[1]);
1715 if (!range->nested[0])
1734 isl_space *nested;
1740 nested = space->nested[1];
1743 nested->n_in, nested->n_out);
1746 if (nested->tuple_id[0]) {
1747 domain->tuple_id[1] = isl_id_copy(nested->tuple_id[0]);
1751 if (nested->nested[0]) {
1752 domain->nested[1] = isl_space_copy(nested->nested[0]);
1753 if (!domain->nested[1])
1810 isl_space *nested;
1816 nested = space->nested[1];
1818 range = isl_space_drop_dims(range, isl_dim_out, 0, nested->n_in);
1821 if (nested->tuple_id[1]) {
1822 range->tuple_id[1] = isl_id_copy(nested->tuple_id[1]);
1826 if (nested->nested[1]) {
1827 range->nested[1] = isl_space_copy(nested->nested[1]);
1828 if (!range->nested[1])
1942 isl_space_free(space->nested[0]);
1943 space->nested[0] = isl_space_copy(space->nested[1]);
1984 isl_space *nested;
2002 nested = space->nested[0];
2003 space->nested[0] = space->nested[1];
2004 space->nested[1] = nested;
2037 * if the nested tuples are equal, in which case the output
2048 isl_space *nested;
2052 nested = isl_space_peek_nested(space, pos);
2053 equal = isl_space_tuple_is_equal(nested, isl_dim_in,
2054 nested, isl_dim_out);
2058 nested = isl_space_take_nested(space, pos);
2059 nested = isl_space_reverse(nested);
2060 space = isl_space_restore_nested(space, pos, nested);
2063 nested = isl_space_peek_nested(space, pos);
2064 n_in = isl_space_dim(nested, isl_dim_in);
2067 space = copy_ids(space, type, 0, nested, isl_dim_in);
2068 space = copy_ids(space, type, n_in, nested, isl_dim_out);
2172 if (space && space->nested[0] &&
2173 !(space->nested[0] = isl_space_drop_dims(space->nested[0],
2176 if (space && space->nested[1] &&
2177 !(space->nested[1] = isl_space_drop_dims(space->nested[1],
2769 hash = isl_hash_tuples(hash, space->nested[0]);
2770 hash = isl_hash_tuples(hash, space->nested[1]);
2794 hash = isl_hash_tuples(hash, space->nested[0]);
2860 return isl_bool_ok(space->nested[1] != NULL);
2873 return isl_bool_ok(space->nested[0] != NULL);
2886 return isl_bool_ok(space->nested[1] != NULL);
2926 wrap->nested[1] = space;
2945 unwrap = isl_space_copy(space->nested[1]);
2963 if (space->nested[type - isl_dim_in])
2970 isl_bool nested;
2982 nested = isl_space_is_named_or_nested(space, isl_dim_in);
2983 if (nested < 0 || nested)
2984 return isl_bool_not(nested);
3000 isl_space_free(space->nested[type - isl_dim_in]);
3001 space->nested[type - isl_dim_in] = NULL;
3010 if (!space->nested[0] && !space->nested[1])
3013 if (space->nested[0])
3015 if (space && space->nested[1])
3025 if (!space->nested[0])
3035 if (!space->nested[1])
3070 isl_space *nested;
3072 if (!dst->nested[i])
3074 nested = isl_space_take_nested(dst, i);
3075 nested = isl_space_replace_params(nested, src);
3076 dst = isl_space_restore_nested(dst, i, nested);
3195 * That is, does is it have a map space with a nested relation in its domain?
3231 * That is, does it have a nested relation in its range,
3232 * the domain of which is itself a nested relation?
3243 return isl_space_can_curry(space->nested[1]);
3251 isl_space *nested;
3261 nested = isl_space_take_nested(space, 1);
3262 nested = isl_space_curry(nested);
3263 space = isl_space_restore_nested(space, 1, nested);
3269 * That is, does it have a map space with a nested relation in its range?
3383 if (model->nested[1]) {
3384 isl_space *nested = isl_space_copy(model->nested[1]);
3386 nested = isl_space_align_params(nested, isl_space_copy(space));
3387 n_nested = isl_space_dim(nested, isl_dim_param);
3392 nested = isl_space_drop_dims(nested, isl_dim_param,
3394 if (!nested)
3396 space->nested[1] = nested;
3428 nested1 = nested(space1, type);
3429 nested2 = nested(space2, type);