2 * Copyright 2019 Cerebras Systems
4 * Use of this software is governed by the MIT license
6 * Written by Sven Verdoolaege,
7 * Cerebras Systems, 175 S San Antonio Rd, Los Altos, CA, USA
10 #define xFN(TYPE,NAME) TYPE ## _ ## NAME
11 #define FN(TYPE,NAME) xFN(TYPE,NAME)
13 /* If "obj" involves a parameter with identifier "id",
14 * then turn it into an existentially quantified variable.
16 __isl_give TYPE
*FN(TYPE
,project_out_param_id
)(__isl_take TYPE
*obj
,
17 __isl_take isl_id
*id
)
23 pos
= FN(TYPE
,find_dim_by_id
)(obj
, isl_dim_param
, id
);
27 return FN(TYPE
,project_out
)(obj
, isl_dim_param
, pos
, 1);
34 /* If "obj" involves any of the parameters with identifiers in "list",
35 * then turn them into existentially quantified variables.
37 __isl_give TYPE
*FN(TYPE
,project_out_param_id_list
)(__isl_take TYPE
*obj
,
38 __isl_take isl_id_list
*list
)
43 n
= isl_id_list_size(list
);
46 for (i
= 0; i
< n
; ++i
) {
49 id
= isl_id_list_get_at(list
, i
);
50 obj
= FN(TYPE
,project_out_param_id
)(obj
, id
);
53 isl_id_list_free(list
);
56 isl_id_list_free(list
);