isl_test_cpp17-generic.cc: work around std::optional::value issue in older macOS
[isl.git] / isl_multi_gist.c
blob68f927970e89ca1291fafbab80f2a34c58c31f0c
1 /*
2 * Copyright 2011 Sven Verdoolaege
3 * Copyright 2012-2013 Ecole Normale Superieure
5 * Use of this software is governed by the MIT license
7 * Written by Sven Verdoolaege,
8 * Ecole Normale Superieure, 45 rue d’Ulm, 75230 Paris, France
9 */
11 #include <isl_multi_macro.h>
13 /* Compute the gist of the parameter domain "dom1" with respect to "dom2".
15 * Since "dom2" may not be a parameter domain, explicitly convert it
16 * to a parameter domain first.
18 static __isl_give DOM *FN(MULTI(BASE),domain_gist_params)(DOM *dom1,
19 __isl_take DOM *dom2)
21 isl_set *params;
23 params = FN(DOM,params)(dom2);
24 dom1 = FN(DOM,gist_params)(dom1, params);
26 return dom1;
29 /* Compute the gist of "multi" with respect to the domain constraints
30 * of "context".
32 __isl_give MULTI(BASE) *FN(MULTI(BASE),gist)(__isl_take MULTI(BASE) *multi,
33 __isl_take DOM *context)
35 if (FN(MULTI(BASE),check_compatible_domain)(multi, context) < 0)
36 context = FN(DOM,free)(context);
37 return FN(FN(MULTI(BASE),apply),DOMBASE)(multi, context, &FN(EL,gist),
38 &FN(DOM,gist),
39 &FN(MULTI(BASE),domain_gist_params));
42 /* Compute the gist of "multi" with respect to the parameter constraints
43 * of "context".
45 __isl_give MULTI(BASE) *FN(MULTI(BASE),gist_params)(
46 __isl_take MULTI(BASE) *multi, __isl_take isl_set *context)
48 return FN(MULTI(BASE),apply_set)(multi, context, &FN(EL,gist_params),
49 &FN(DOM,gist_params), &FN(DOM,gist_params));