2 * Copyright 2017 Sven Verdoolaege
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege,
9 /* Align the parameters of "multi" and "domain" (if needed) and
12 static __isl_give
MULTI(BASE
) *FN(FN(MULTI(BASE
),align_params
),ALIGN_DOMBASE
)(
13 __isl_take
MULTI(BASE
) *multi
, __isl_take ALIGN_DOM
*domain
,
14 __isl_give
MULTI(BASE
) *fn(__isl_take
MULTI(BASE
) *multi
,
15 __isl_take ALIGN_DOM
*domain
))
21 aligned
= FN(ALIGN_DOM
,space_has_equal_params
)(domain
, multi
->space
);
25 return fn(multi
, domain
);
27 dom_space
= FN(ALIGN_DOM
,peek_space
)(domain
);
28 named
= isl_space_has_named_params(multi
->space
);
29 if (named
>= 0 && named
)
30 named
= isl_space_has_named_params(dom_space
);
34 isl_die(FN(MULTI(BASE
),get_ctx
)(multi
), isl_error_invalid
,
35 "unaligned unnamed parameters", goto error
);
36 multi
= FN(MULTI(BASE
),align_params
)(multi
,
37 FN(ALIGN_DOM
,get_space
)(domain
));
38 domain
= FN(ALIGN_DOM
,align_params
)(domain
,
39 FN(MULTI(BASE
),get_space
)(multi
));
40 return fn(multi
, domain
);
42 FN(MULTI(BASE
),free
)(multi
);
43 FN(ALIGN_DOM
,free
)(domain
);