Polly 20.0.0git
isl_multi_param_templ.c
Go to the documentation of this file.
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,
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, 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)(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, 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}
#define FN(TYPE, NAME)
#define __isl_keep
Definition: ctx.h:25
int isl_size
Definition: ctx.h:96
isl_bool
Definition: ctx.h:89
@ isl_bool_false
Definition: ctx.h:91
@ isl_bool_error
Definition: ctx.h:90
#define BASE
Definition: flow_cmp.c:49
__isl_null isl_id * isl_id_free(__isl_take isl_id *id)
Definition: isl_id.c:207
#define EL
static unsigned pos(__isl_keep isl_space *space, enum isl_dim_type type)
Definition: isl_map.c:70
#define MULTI(BASE)
const char * id
Definition: isl_test.c:7279
@ isl_dim_param
Definition: space_type.h:15
n
Definition: youcefn.c:8