1/*
2 * Use of this software is governed by the MIT license
3 *
4 * Written by Sven Verdoolaege
5 */
6
7#include <isl_multi_macro.h>
8
9/* Does the multiple expression "multi" depend in any way
10 * on the parameter with identifier "id"?
11 */
12isl_bool FN(MULTI(BASE),involves_param_id)(__isl_keep MULTI(BASE) *multi,
13 __isl_keep isl_id *id)
14{
15 int i;
16 int pos;
17
18 if (!multi || !id)
19 return isl_bool_error;
20 if (multi->n == 0)
21 return isl_bool_false;
22 pos = FN(MULTI(BASE),find_dim_by_id)(multi, type: isl_dim_param, id);
23 if (pos < 0)
24 return isl_bool_false;
25
26 for (i = 0; i < multi->n; ++i) {
27 isl_bool involved = FN(EL,involves_param_id)(pw: multi->u.p[i], id);
28 if (involved < 0 || involved)
29 return involved;
30 }
31
32 return isl_bool_false;
33}
34
35/* Does the multiple expression "multi" depend in any way
36 * on any of the parameters with identifiers in "list"?
37 */
38isl_bool FN(MULTI(BASE),involves_param_id_list)(__isl_keep MULTI(BASE) *multi,
39 __isl_keep isl_id_list *list)
40{
41 int i;
42 isl_size n;
43
44 n = isl_id_list_size(list);
45 if (n < 0)
46 return isl_bool_error;
47 for (i = 0; i < n; ++i) {
48 isl_bool involves;
49 isl_id *id;
50
51 id = isl_id_list_get_at(list, index: i);
52 involves = FN(MULTI(BASE),involves_param_id)(multi, id);
53 isl_id_free(id);
54
55 if (involves < 0 || involves)
56 return involves;
57 }
58
59 return isl_bool_false;
60}
61

source code of polly/lib/External/isl/isl_multi_param_templ.c