2 * Copyright 2010 INRIA Saclay
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
7 * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
11 __isl_give PW
*FN(PW
,morph_domain
)(__isl_take PW
*pw
,
12 __isl_take isl_morph
*morph
)
19 n
= FN(PW
,n_piece
)(pw
);
23 ctx
= isl_space_get_ctx(pw
->dim
);
24 isl_assert(ctx
, isl_space_is_domain_internal(morph
->dom
->dim
, pw
->dim
),
27 space
= FN(PW
,take_space
)(pw
);
28 space
= isl_space_extend_domain_with_range(
29 isl_space_copy(morph
->ran
->dim
), space
);
30 pw
= FN(PW
,restore_space
)(pw
, space
);
32 for (i
= 0; i
< n
; ++i
) {
36 domain
= FN(PW
,take_domain_at
)(pw
, i
);
37 domain
= isl_morph_set(isl_morph_copy(morph
), domain
);
38 pw
= FN(PW
,restore_domain_at
)(pw
, i
, domain
);
39 el
= FN(PW
,take_base_at
)(pw
, i
);
40 el
= FN(EL
,morph_domain
)(el
, isl_morph_copy(morph
));
41 pw
= FN(PW
,restore_base_at
)(pw
, i
, el
);
44 isl_morph_free(morph
);
49 isl_morph_free(morph
);