2 * Copyright 2018 Sven Verdoolaege
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege.
9 /* Given a function "obj" defined over a parameter domain,
10 * convert it to a function defined over a domain corresponding
12 * Any parameters with identifiers in "domain" are reinterpreted
13 * as the corresponding domain dimensions.
15 __isl_give TYPE
*FN(TYPE
,unbind_params_insert_domain
)(
16 __isl_take TYPE
*obj
, __isl_take isl_multi_id
*domain
)
22 space
= FN(TYPE
,get_domain_space
)(obj
);
23 is_params
= isl_space_is_params(space
);
25 domain
= isl_multi_id_free(domain
);
27 isl_die(FN(TYPE
,get_ctx
)(obj
), isl_error_invalid
,
28 "expecting function with parameter domain",
29 domain
= isl_multi_id_free(domain
));
30 r
= isl_reordering_unbind_params_insert_domain(space
, domain
);
31 isl_space_free(space
);
32 isl_multi_id_free(domain
);
34 return FN(TYPE
,realign_domain
)(obj
, r
);