2 * Copyright 2013 Ecole Normale Superieure
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege,
7 * Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France
12 #include <isl_multi_macro.h>
14 /* Return the shared domain of the elements of "multi".
16 * If "multi" has an explicit domain, then return this domain.
18 __isl_give isl_set
*FN(MULTI(BASE
),domain
)(__isl_take
MULTI(BASE
) *multi
)
26 if (FN(MULTI(BASE
),has_explicit_domain
)(multi
)) {
27 dom
= FN(MULTI(BASE
),get_explicit_domain
)(multi
);
28 FN(MULTI(BASE
),free
)(multi
);
32 dom
= isl_set_universe(FN(MULTI(BASE
),get_domain_space
)(multi
));
33 for (i
= 0; i
< multi
->n
; ++i
) {
36 dom_i
= FN(EL
,domain
)(FN(FN(MULTI(BASE
),get
),BASE
)(multi
, i
));
37 dom
= isl_set_intersect(dom
, dom_i
);
40 FN(MULTI(BASE
),free
)(multi
);