2 * Copyright 2017 Sven Verdoolaege
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege.
9 #include <isl_multi_macro.h>
11 /* Does the space of "domain" correspond to that of the domain of "multi"?
12 * The parameters do not need to be aligned.
14 static isl_bool
FN(MULTI(BASE
),compatible_domain
)(
15 __isl_keep
MULTI(BASE
) *multi
, __isl_keep DOM
*domain
)
18 isl_space
*space
, *domain_space
;
20 domain_space
= FN(DOM
,get_space
)(domain
);
21 space
= FN(MULTI(BASE
),get_space
)(multi
);
22 ok
= isl_space_has_domain_tuples(domain_space
, space
);
23 isl_space_free(space
);
24 isl_space_free(domain_space
);
29 /* Check that the space of "domain" corresponds to
30 * that of the domain of "multi", ignoring parameters.
32 static isl_stat
FN(MULTI(BASE
),check_compatible_domain
)(
33 __isl_keep
MULTI(BASE
) *multi
, __isl_keep DOM
*domain
)
37 ok
= FN(MULTI(BASE
),compatible_domain
)(multi
, domain
);
39 return isl_stat_error
;
41 isl_die(FN(DOM
,get_ctx
)(domain
), isl_error_invalid
,
42 "incompatible spaces", return isl_stat_error
);