xref: /netbsd-src/external/mit/isl/dist/isl_multi_apply_no_explicit_domain_templ.c (revision 5971e316fdea024efff6be8f03536623db06833e)
1 /*
2  * Copyright 2022      Cerebras Systems
3  *
4  * Use of this software is governed by the MIT license
5  *
6  * Written by Sven Verdoolaege,
7  * Cerebras Systems, 1237 E Arques Ave, Sunnyvale, CA, USA
8  */
9 
10 /* Transform the explicit domain of "multi" by applying "fn_domain" or
11  * "fn_params" to it with extra argument "domain".
12  * In particular, if the explicit domain is a parameter set,
13  * then apply "fn_params".  Otherwise, apply "fn_domain".
14  *
15  * Do this for a type MULTI(BASE) that cannot have an explicit domain.
16  * That is, this function is never called.
17  */
18 
MULTI(BASE)19 static __isl_give MULTI(BASE) *FN(FN(MULTI(BASE),apply_domain),APPLY_DOMBASE)(
20 	__isl_take MULTI(BASE) *multi, __isl_take isl_set *domain,
21 	__isl_give DOM *(*fn_domain)(DOM *domain, __isl_take APPLY_DOM *set),
22 	__isl_give DOM *(*fn_params)(DOM *domain, __isl_take isl_set *set))
23 {
24 	isl_set_free(domain);
25 
26 	return multi;
27 }
28 
29 #include <isl_multi_apply_templ.c>
30