Coverage Report

Created: 2017-10-03 07:32

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/polly/lib/External/isl/isl_union_templ.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2010      INRIA Saclay
3
 * Copyright 2013      Ecole Normale Superieure
4
 *
5
 * Use of this software is governed by the MIT license
6
 *
7
 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
8
 * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
9
 * 91893 Orsay, France 
10
 * and Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France
11
 */
12
13
__isl_give UNION *FN(UNION,cow)(__isl_take UNION *u);
14
15
isl_ctx *FN(UNION,get_ctx)(__isl_keep UNION *u)
16
34.4k
{
17
34.4k
  return u ? u->space->ctx : NULL;
18
34.4k
}
isl_union_pw_aff_get_ctx
Line
Count
Source
16
10.1k
{
17
10.1k
  return u ? u->space->ctx : NULL;
18
10.1k
}
isl_union_pw_multi_aff_get_ctx
Line
Count
Source
16
24.3k
{
17
24.3k
  return u ? u->space->ctx : NULL;
18
24.3k
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_get_ctx
isl_union_pw_qpolynomial_get_ctx
Line
Count
Source
16
7
{
17
7
  return u ? u->space->ctx : NULL;
18
7
}
19
20
__isl_give isl_space *FN(UNION,get_space)(__isl_keep UNION *u)
21
69.2k
{
22
69.2k
  if (!u)
23
0
    return NULL;
24
69.2k
  return isl_space_copy(u->space);
25
69.2k
}
isl_union_pw_aff_get_space
Line
Count
Source
21
44.3k
{
22
44.3k
  if (!u)
23
0
    return NULL;
24
44.3k
  return isl_space_copy(u->space);
25
44.3k
}
isl_union_pw_multi_aff_get_space
Line
Count
Source
21
24.8k
{
22
24.8k
  if (!u)
23
0
    return NULL;
24
24.8k
  return isl_space_copy(u->space);
25
24.8k
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_get_space
isl_union_pw_qpolynomial_get_space
Line
Count
Source
21
12
{
22
12
  if (!u)
23
0
    return NULL;
24
12
  return isl_space_copy(u->space);
25
12
}
26
27
/* Return the number of parameters of "u", where "type"
28
 * is required to be set to isl_dim_param.
29
 */
30
unsigned FN(UNION,dim)(__isl_keep UNION *u, enum isl_dim_type type)
31
0
{
32
0
  if (!u)
33
0
    return 0;
34
0
35
0
  
if (0
type != isl_dim_param0
)
36
0
    isl_die(FN(UNION,get_ctx)(u), isl_error_invalid,
37
0
      "can only reference parameters", return 0);
38
0
39
0
  return isl_space_dim(u->space, type);
40
0
}
Unexecuted instantiation: isl_union_pw_qpolynomial_dim
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_dim
Unexecuted instantiation: isl_union_pw_multi_aff_dim
Unexecuted instantiation: isl_union_pw_aff_dim
41
42
/* Return the position of the parameter with the given name
43
 * in "u".
44
 * Return -1 if no such dimension can be found.
45
 */
46
int FN(UNION,find_dim_by_name)(__isl_keep UNION *u, enum isl_dim_type type,
47
  const char *name)
48
0
{
49
0
  if (!u)
50
0
    return -1;
51
0
  return isl_space_find_dim_by_name(u->space, type, name);
52
0
}
Unexecuted instantiation: isl_union_pw_qpolynomial_find_dim_by_name
Unexecuted instantiation: isl_union_pw_aff_find_dim_by_name
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_find_dim_by_name
Unexecuted instantiation: isl_union_pw_multi_aff_find_dim_by_name
53
54
#ifdef HAS_TYPE
55
static __isl_give UNION *FN(UNION,alloc)(__isl_take isl_space *dim,
56
  enum isl_fold type, int size)
57
#else
58
static __isl_give UNION *FN(UNION,alloc)(__isl_take isl_space *dim, int size)
59
#endif
60
16.4k
{
61
16.4k
  UNION *u;
62
16.4k
63
16.4k
  dim = isl_space_params(dim);
64
16.4k
  if (!dim)
65
0
    return NULL;
66
16.4k
67
16.4k
  
u = 16.4k
isl_calloc_type16.4k
(dim->ctx, UNION);
68
16.4k
  if (!u)
69
0
    goto error;
70
16.4k
71
16.4k
  u->ref = 1;
72
#ifdef HAS_TYPE
73
  u->type = type;
74
#endif
75
  u->space = dim;
76
16.4k
  if (isl_hash_table_init(dim->ctx, &u->table, size) < 0)
77
0
    
return 0
FN0
(UNION,free)(u);
78
16.4k
79
16.4k
  return u;
80
0
error:
81
0
  isl_space_free(dim);
82
0
  return NULL;
83
16.4k
}
isl_aff.c:isl_union_pw_multi_aff_alloc
Line
Count
Source
60
11.7k
{
61
11.7k
  UNION *u;
62
11.7k
63
11.7k
  dim = isl_space_params(dim);
64
11.7k
  if (!dim)
65
0
    return NULL;
66
11.7k
67
11.7k
  
u = 11.7k
isl_calloc_type11.7k
(dim->ctx, UNION);
68
11.7k
  if (!u)
69
0
    goto error;
70
11.7k
71
11.7k
  u->ref = 1;
72
#ifdef HAS_TYPE
73
  u->type = type;
74
#endif
75
  u->space = dim;
76
11.7k
  if (isl_hash_table_init(dim->ctx, &u->table, size) < 0)
77
0
    
return 0
FN0
(UNION,free)(u);
78
11.7k
79
11.7k
  return u;
80
0
error:
81
0
  isl_space_free(dim);
82
0
  return NULL;
83
11.7k
}
isl_aff.c:isl_union_pw_aff_alloc
Line
Count
Source
60
4.76k
{
61
4.76k
  UNION *u;
62
4.76k
63
4.76k
  dim = isl_space_params(dim);
64
4.76k
  if (!dim)
65
0
    return NULL;
66
4.76k
67
4.76k
  
u = 4.76k
isl_calloc_type4.76k
(dim->ctx, UNION);
68
4.76k
  if (!u)
69
0
    goto error;
70
4.76k
71
4.76k
  u->ref = 1;
72
#ifdef HAS_TYPE
73
  u->type = type;
74
#endif
75
  u->space = dim;
76
4.76k
  if (isl_hash_table_init(dim->ctx, &u->table, size) < 0)
77
0
    
return 0
FN0
(UNION,free)(u);
78
4.76k
79
4.76k
  return u;
80
0
error:
81
0
  isl_space_free(dim);
82
0
  return NULL;
83
4.76k
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_alloc
isl_polynomial.c:isl_union_pw_qpolynomial_alloc
Line
Count
Source
60
4
{
61
4
  UNION *u;
62
4
63
4
  dim = isl_space_params(dim);
64
4
  if (!dim)
65
0
    return NULL;
66
4
67
4
  
u = 4
isl_calloc_type4
(dim->ctx, UNION);
68
4
  if (!u)
69
0
    goto error;
70
4
71
4
  u->ref = 1;
72
#ifdef HAS_TYPE
73
  u->type = type;
74
#endif
75
  u->space = dim;
76
4
  if (isl_hash_table_init(dim->ctx, &u->table, size) < 0)
77
0
    
return 0
FN0
(UNION,free)(u);
78
4
79
4
  return u;
80
0
error:
81
0
  isl_space_free(dim);
82
0
  return NULL;
83
4
}
84
85
#ifdef HAS_TYPE
86
__isl_give UNION *FN(UNION,ZERO)(__isl_take isl_space *dim, enum isl_fold type)
87
0
{
88
0
  return FN(UNION,alloc)(dim, type, 16);
89
0
}
90
#else
91
__isl_give UNION *FN(UNION,ZERO)(__isl_take isl_space *dim)
92
12.0k
{
93
12.0k
  return FN(UNION,alloc)(dim, 16);
94
12.0k
}
isl_union_pw_aff_empty
Line
Count
Source
92
2.76k
{
93
2.76k
  return FN(UNION,alloc)(dim, 16);
94
2.76k
}
isl_union_pw_qpolynomial_zero
Line
Count
Source
92
3
{
93
3
  return FN(UNION,alloc)(dim, 16);
94
3
}
isl_union_pw_multi_aff_empty
Line
Count
Source
92
9.32k
{
93
9.32k
  return FN(UNION,alloc)(dim, 16);
94
9.32k
}
95
#endif
96
97
__isl_give UNION *FN(UNION,copy)(__isl_keep UNION *u)
98
31.0k
{
99
31.0k
  if (!u)
100
0
    return NULL;
101
31.0k
102
31.0k
  u->ref++;
103
31.0k
  return u;
104
31.0k
}
isl_union_pw_multi_aff_copy
Line
Count
Source
98
7.84k
{
99
7.84k
  if (!u)
100
0
    return NULL;
101
7.84k
102
7.84k
  u->ref++;
103
7.84k
  return u;
104
7.84k
}
isl_union_pw_qpolynomial_copy
Line
Count
Source
98
4
{
99
4
  if (!u)
100
0
    return NULL;
101
4
102
4
  u->ref++;
103
4
  return u;
104
4
}
isl_union_pw_aff_copy
Line
Count
Source
98
23.2k
{
99
23.2k
  if (!u)
100
0
    return NULL;
101
23.2k
102
23.2k
  u->ref++;
103
23.2k
  return u;
104
23.2k
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_copy
105
106
/* Extract the element of "u" living in "space" (ignoring parameters).
107
 *
108
 * Return the ZERO element if "u" does not contain any element
109
 * living in "space".
110
 */
111
__isl_give PART *FN(FN(UNION,extract),PARTS)(__isl_keep UNION *u,
112
  __isl_take isl_space *space)
113
0
{
114
0
  struct isl_hash_table_entry *entry;
115
0
  isl_bool equal_params;
116
0
117
0
  if (
!u || 0
!space0
)
118
0
    goto error;
119
0
  equal_params = isl_space_has_equal_params(u->space, space);
120
0
  if (equal_params < 0)
121
0
    goto error;
122
0
  
if (0
!equal_params0
) {
123
0
    space = isl_space_drop_dims(space, isl_dim_param,
124
0
          0, isl_space_dim(space, isl_dim_param));
125
0
    space = isl_space_align_params(space,
126
0
          FN(UNION,get_space)(u));
127
0
    if (!space)
128
0
      goto error;
129
0
  }
130
0
131
0
  
entry = 0
FN0
(UNION,find_part_entry)(u, space, 0);
132
0
  if (!entry)
133
0
    goto error;
134
0
  
if (0
entry == isl_hash_table_entry_none0
)
135
#ifdef HAS_TYPE
136
0
    
return 0
FN0
(PART,ZERO)(space, u->type);
137
#else
138
0
    
return 0
FN0
(PART,ZERO)(space);
139
#endif
140
0
  isl_space_free(space);
141
0
  return FN(PART,copy)(entry->data);
142
0
error:
143
0
  isl_space_free(space);
144
0
  return NULL;
145
0
}
Unexecuted instantiation: isl_union_pw_qpolynomial_extract_pw_qpolynomial
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_extract_pw_qpolynomial_fold
Unexecuted instantiation: isl_union_pw_multi_aff_extract_pw_multi_aff
Unexecuted instantiation: isl_union_pw_aff_extract_pw_aff
146
147
/* Add "part" to "u".
148
 * If "disjoint" is set, then "u" is not allowed to already have
149
 * a part that is defined over a domain that overlaps with the domain
150
 * of "part".
151
 * Otherwise, compute the union sum of "part" and the part in "u"
152
 * defined on the same space.
153
 */
154
static __isl_give UNION *FN(UNION,add_part_generic)(__isl_take UNION *u,
155
  __isl_take PART *part, int disjoint)
156
19.4k
{
157
19.4k
  int empty;
158
19.4k
  struct isl_hash_table_entry *entry;
159
19.4k
160
19.4k
  if (!part)
161
0
    goto error;
162
19.4k
163
19.4k
  
empty = 19.4k
FN19.4k
(PART,IS_ZERO)(part);
164
19.4k
  if (empty < 0)
165
0
    goto error;
166
19.4k
  
if (19.4k
empty19.4k
) {
167
1
    FN(PART,free)(part);
168
1
    return u;
169
1
  }
170
19.4k
171
19.4k
  
u = 19.4k
FN19.4k
(UNION,align_params)(u,
FN19.4k
(PART,get_space)(part));
172
19.4k
  part = 
FN19.4k
(PART,align_params)(part,
FN19.4k
(UNION,get_space)(u));
173
19.4k
174
19.4k
  u = FN(UNION,cow)(u);
175
19.4k
176
19.4k
  if (!u)
177
0
    goto error;
178
19.4k
179
19.4k
  
if (19.4k
FN19.4k
(UNION,check_disjoint_domain_other)(u, part) < 019.4k
)
180
1
    goto error;
181
19.4k
  
entry = 19.4k
FN19.4k
(UNION,find_part_entry)(u, part->dim, 1);
182
19.4k
  if (!entry)
183
0
    goto error;
184
19.4k
185
19.4k
  
if (19.4k
!entry->data19.4k
)
186
19.4k
    entry->data = part;
187
3
  else {
188
3
    if (disjoint &&
189
1
        
FN1
(UNION,check_disjoint_domain)(entry->data, part) < 01
)
190
0
      goto error;
191
3
    
entry->data = 3
FN3
(PART,union_add_)(entry->data,
192
3
            FN(PART,copy)(part));
193
3
    if (!entry->data)
194
0
      goto error;
195
3
    
empty = 3
FN3
(PART,IS_ZERO)(part);
196
3
    if (empty < 0)
197
0
      goto error;
198
3
    
if (3
empty3
)
199
0
      
u = 0
FN0
(UNION,remove_part_entry)(u, entry);
200
3
    FN(PART,free)(part);
201
3
  }
202
19.4k
203
19.4k
  return u;
204
1
error:
205
1
  FN(PART,free)(part);
206
1
  FN(UNION,free)(u);
207
1
  return NULL;
208
19.4k
}
isl_polynomial.c:isl_union_pw_qpolynomial_add_part_generic
Line
Count
Source
156
5
{
157
5
  int empty;
158
5
  struct isl_hash_table_entry *entry;
159
5
160
5
  if (!part)
161
0
    goto error;
162
5
163
5
  
empty = 5
FN5
(PART,IS_ZERO)(part);
164
5
  if (empty < 0)
165
0
    goto error;
166
5
  
if (5
empty5
) {
167
0
    FN(PART,free)(part);
168
0
    return u;
169
0
  }
170
5
171
5
  
u = 5
FN5
(UNION,align_params)(u,
FN5
(PART,get_space)(part));
172
5
  part = 
FN5
(PART,align_params)(part,
FN5
(UNION,get_space)(u));
173
5
174
5
  u = FN(UNION,cow)(u);
175
5
176
5
  if (!u)
177
0
    goto error;
178
5
179
5
  
if (5
FN5
(UNION,check_disjoint_domain_other)(u, part) < 05
)
180
0
    goto error;
181
5
  
entry = 5
FN5
(UNION,find_part_entry)(u, part->dim, 1);
182
5
  if (!entry)
183
0
    goto error;
184
5
185
5
  
if (5
!entry->data5
)
186
5
    entry->data = part;
187
0
  else {
188
0
    if (disjoint &&
189
0
        
FN0
(UNION,check_disjoint_domain)(entry->data, part) < 00
)
190
0
      goto error;
191
0
    
entry->data = 0
FN0
(PART,union_add_)(entry->data,
192
0
            FN(PART,copy)(part));
193
0
    if (!entry->data)
194
0
      goto error;
195
0
    
empty = 0
FN0
(PART,IS_ZERO)(part);
196
0
    if (empty < 0)
197
0
      goto error;
198
0
    
if (0
empty0
)
199
0
      
u = 0
FN0
(UNION,remove_part_entry)(u, entry);
200
0
    FN(PART,free)(part);
201
0
  }
202
5
203
5
  return u;
204
0
error:
205
0
  FN(PART,free)(part);
206
0
  FN(UNION,free)(u);
207
0
  return NULL;
208
5
}
isl_aff.c:isl_union_pw_aff_add_part_generic
Line
Count
Source
156
7.30k
{
157
7.30k
  int empty;
158
7.30k
  struct isl_hash_table_entry *entry;
159
7.30k
160
7.30k
  if (!part)
161
0
    goto error;
162
7.30k
163
7.30k
  
empty = 7.30k
FN7.30k
(PART,IS_ZERO)(part);
164
7.30k
  if (empty < 0)
165
0
    goto error;
166
7.30k
  
if (7.30k
empty7.30k
) {
167
0
    FN(PART,free)(part);
168
0
    return u;
169
0
  }
170
7.30k
171
7.30k
  
u = 7.30k
FN7.30k
(UNION,align_params)(u,
FN7.30k
(PART,get_space)(part));
172
7.30k
  part = 
FN7.30k
(PART,align_params)(part,
FN7.30k
(UNION,get_space)(u));
173
7.30k
174
7.30k
  u = FN(UNION,cow)(u);
175
7.30k
176
7.30k
  if (!u)
177
0
    goto error;
178
7.30k
179
7.30k
  
if (7.30k
FN7.30k
(UNION,check_disjoint_domain_other)(u, part) < 07.30k
)
180
0
    goto error;
181
7.30k
  
entry = 7.30k
FN7.30k
(UNION,find_part_entry)(u, part->dim, 1);
182
7.30k
  if (!entry)
183
0
    goto error;
184
7.30k
185
7.30k
  
if (7.30k
!entry->data7.30k
)
186
7.30k
    entry->data = part;
187
0
  else {
188
0
    if (disjoint &&
189
0
        
FN0
(UNION,check_disjoint_domain)(entry->data, part) < 00
)
190
0
      goto error;
191
0
    
entry->data = 0
FN0
(PART,union_add_)(entry->data,
192
0
            FN(PART,copy)(part));
193
0
    if (!entry->data)
194
0
      goto error;
195
0
    
empty = 0
FN0
(PART,IS_ZERO)(part);
196
0
    if (empty < 0)
197
0
      goto error;
198
0
    
if (0
empty0
)
199
0
      
u = 0
FN0
(UNION,remove_part_entry)(u, entry);
200
0
    FN(PART,free)(part);
201
0
  }
202
7.30k
203
7.30k
  return u;
204
0
error:
205
0
  FN(PART,free)(part);
206
0
  FN(UNION,free)(u);
207
0
  return NULL;
208
7.30k
}
isl_aff.c:isl_union_pw_multi_aff_add_part_generic
Line
Count
Source
156
12.1k
{
157
12.1k
  int empty;
158
12.1k
  struct isl_hash_table_entry *entry;
159
12.1k
160
12.1k
  if (!part)
161
0
    goto error;
162
12.1k
163
12.1k
  
empty = 12.1k
FN12.1k
(PART,IS_ZERO)(part);
164
12.1k
  if (empty < 0)
165
0
    goto error;
166
12.1k
  
if (12.1k
empty12.1k
) {
167
1
    FN(PART,free)(part);
168
1
    return u;
169
1
  }
170
12.1k
171
12.1k
  
u = 12.1k
FN12.1k
(UNION,align_params)(u,
FN12.1k
(PART,get_space)(part));
172
12.1k
  part = 
FN12.1k
(PART,align_params)(part,
FN12.1k
(UNION,get_space)(u));
173
12.1k
174
12.1k
  u = FN(UNION,cow)(u);
175
12.1k
176
12.1k
  if (!u)
177
0
    goto error;
178
12.1k
179
12.1k
  
if (12.1k
FN12.1k
(UNION,check_disjoint_domain_other)(u, part) < 012.1k
)
180
1
    goto error;
181
12.1k
  
entry = 12.1k
FN12.1k
(UNION,find_part_entry)(u, part->dim, 1);
182
12.1k
  if (!entry)
183
0
    goto error;
184
12.1k
185
12.1k
  
if (12.1k
!entry->data12.1k
)
186
12.1k
    entry->data = part;
187
3
  else {
188
3
    if (disjoint &&
189
1
        
FN1
(UNION,check_disjoint_domain)(entry->data, part) < 01
)
190
0
      goto error;
191
3
    
entry->data = 3
FN3
(PART,union_add_)(entry->data,
192
3
            FN(PART,copy)(part));
193
3
    if (!entry->data)
194
0
      goto error;
195
3
    
empty = 3
FN3
(PART,IS_ZERO)(part);
196
3
    if (empty < 0)
197
0
      goto error;
198
3
    
if (3
empty3
)
199
0
      
u = 0
FN0
(UNION,remove_part_entry)(u, entry);
200
3
    FN(PART,free)(part);
201
3
  }
202
12.1k
203
12.1k
  return u;
204
1
error:
205
1
  FN(PART,free)(part);
206
1
  FN(UNION,free)(u);
207
1
  return NULL;
208
12.1k
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_add_part_generic
209
210
/* Add "part" to "u", where "u" is assumed not to already have
211
 * a part that is defined on the same space as "part".
212
 */
213
__isl_give UNION *FN(FN(UNION,add),PARTS)(__isl_take UNION *u,
214
  __isl_take PART *part)
215
19.0k
{
216
19.0k
  return FN(UNION,add_part_generic)(u, part, 1);
217
19.0k
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_add_pw_qpolynomial_fold
isl_union_pw_multi_aff_add_pw_multi_aff
Line
Count
Source
215
11.9k
{
216
11.9k
  return FN(UNION,add_part_generic)(u, part, 1);
217
11.9k
}
isl_union_pw_qpolynomial_add_pw_qpolynomial
Line
Count
Source
215
4
{
216
4
  return FN(UNION,add_part_generic)(u, part, 1);
217
4
}
isl_union_pw_aff_add_pw_aff
Line
Count
Source
215
7.06k
{
216
7.06k
  return FN(UNION,add_part_generic)(u, part, 1);
217
7.06k
}
218
219
#ifdef HAS_TYPE
220
/* Allocate a UNION with the same type and the same size as "u" and
221
 * with space "space".
222
 */
223
static __isl_give UNION *FN(UNION,alloc_same_size_on_space)(__isl_keep UNION *u,
224
  __isl_take isl_space *space)
225
0
{
226
0
  if (!u)
227
0
    goto error;
228
0
  
return 0
FN0
(UNION,alloc)(space, u->type, u->table.n);
229
0
error:
230
0
  isl_space_free(space);
231
0
  return NULL;
232
0
}
233
#else
234
/* Allocate a UNION with the same size as "u" and with space "space".
235
 */
236
static __isl_give UNION *FN(UNION,alloc_same_size_on_space)(__isl_keep UNION *u,
237
  __isl_take isl_space *space)
238
4.39k
{
239
4.39k
  if (!u)
240
0
    goto error;
241
4.39k
  
return 4.39k
FN4.39k
(UNION,alloc)(space, u->table.n);
242
0
error:
243
0
  isl_space_free(space);
244
0
  return NULL;
245
4.39k
}
isl_polynomial.c:isl_union_pw_qpolynomial_alloc_same_size_on_space
Line
Count
Source
238
1
{
239
1
  if (!u)
240
0
    goto error;
241
1
  
return 1
FN1
(UNION,alloc)(space, u->table.n);
242
0
error:
243
0
  isl_space_free(space);
244
0
  return NULL;
245
1
}
isl_aff.c:isl_union_pw_multi_aff_alloc_same_size_on_space
Line
Count
Source
238
2.39k
{
239
2.39k
  if (!u)
240
0
    goto error;
241
2.39k
  
return 2.39k
FN2.39k
(UNION,alloc)(space, u->table.n);
242
0
error:
243
0
  isl_space_free(space);
244
0
  return NULL;
245
2.39k
}
isl_aff.c:isl_union_pw_aff_alloc_same_size_on_space
Line
Count
Source
238
2.00k
{
239
2.00k
  if (!u)
240
0
    goto error;
241
2.00k
  
return 2.00k
FN2.00k
(UNION,alloc)(space, u->table.n);
242
0
error:
243
0
  isl_space_free(space);
244
0
  return NULL;
245
2.00k
}
246
#endif
247
248
/* Allocate a UNION with the same space, the same type (if any) and
249
 * the same size as "u".
250
 */
251
static __isl_give UNION *FN(UNION,alloc_same_size)(__isl_keep UNION *u)
252
1.25k
{
253
1.25k
  return 
FN1.25k
(UNION,alloc_same_size_on_space)(u,
FN1.25k
(UNION,get_space)(u));
254
1.25k
}
isl_aff.c:isl_union_pw_multi_aff_alloc_same_size
Line
Count
Source
252
131
{
253
131
  return 
FN131
(UNION,alloc_same_size_on_space)(u,
FN131
(UNION,get_space)(u));
254
131
}
isl_aff.c:isl_union_pw_aff_alloc_same_size
Line
Count
Source
252
1.12k
{
253
1.12k
  return 
FN1.12k
(UNION,alloc_same_size_on_space)(u,
FN1.12k
(UNION,get_space)(u));
254
1.12k
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_alloc_same_size
isl_polynomial.c:isl_union_pw_qpolynomial_alloc_same_size
Line
Count
Source
252
1
{
253
1
  return 
FN1
(UNION,alloc_same_size_on_space)(u,
FN1
(UNION,get_space)(u));
254
1
}
255
256
/* Internal data structure for isl_union_*_transform_space.
257
 * "fn' is applied to each entry in the input.
258
 * "res" collects the results.
259
 */
260
S(UNION,transform_data)
261
{
262
  __isl_give PART *(*fn)(__isl_take PART *part, void *user);
263
  void *user;
264
265
  UNION *res;
266
};
267
268
/* Apply data->fn to "part" and add the result to data->res.
269
 */
270
static isl_stat FN(UNION,transform_entry)(__isl_take PART *part, void *user)
271
2.40k
{
272
2.40k
  S(UNION,transform_data) *data = (S(UNION,transform_data) *)user;
273
2.40k
274
2.40k
  part = data->fn(part, data->user);
275
2.40k
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
276
2.40k
  if (!data->res)
277
0
    return isl_stat_error;
278
2.40k
279
2.40k
  return isl_stat_ok;
280
2.40k
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_transform_entry
isl_aff.c:isl_union_pw_aff_transform_entry
Line
Count
Source
271
987
{
272
987
  S(UNION,transform_data) *data = (S(UNION,transform_data) *)user;
273
987
274
987
  part = data->fn(part, data->user);
275
987
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
276
987
  if (!data->res)
277
0
    return isl_stat_error;
278
987
279
987
  return isl_stat_ok;
280
987
}
isl_aff.c:isl_union_pw_multi_aff_transform_entry
Line
Count
Source
271
1.41k
{
272
1.41k
  S(UNION,transform_data) *data = (S(UNION,transform_data) *)user;
273
1.41k
274
1.41k
  part = data->fn(part, data->user);
275
1.41k
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
276
1.41k
  if (!data->res)
277
0
    return isl_stat_error;
278
1.41k
279
1.41k
  return isl_stat_ok;
280
1.41k
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_transform_entry
281
282
/* Return a UNION living in "space" that is obtained by applying "fn"
283
 * to each of the entries in "u".
284
 */
285
static __isl_give UNION *FN(UNION,transform_space)(__isl_take UNION *u,
286
  isl_space *space,
287
  __isl_give PART *(*fn)(__isl_take PART *part, void *user), void *user)
288
3.13k
{
289
3.13k
  S(UNION,transform_data) data = { fn, user };
290
3.13k
291
3.13k
  data.res = FN(UNION,alloc_same_size_on_space)(u, space);
292
3.13k
  if (
FN3.13k
(FN(UNION,foreach),PARTS)(u,
293
3.13k
          &FN(UNION,transform_entry), &data) < 0)
294
0
    
data.res = 0
FN0
(UNION,free)(data.res);
295
3.13k
  FN(UNION,free)(u);
296
3.13k
  return data.res;
297
3.13k
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_transform_space
isl_aff.c:isl_union_pw_multi_aff_transform_space
Line
Count
Source
288
2.25k
{
289
2.25k
  S(UNION,transform_data) data = { fn, user };
290
2.25k
291
2.25k
  data.res = FN(UNION,alloc_same_size_on_space)(u, space);
292
2.25k
  if (
FN2.25k
(FN(UNION,foreach),PARTS)(u,
293
2.25k
          &FN(UNION,transform_entry), &data) < 0)
294
0
    
data.res = 0
FN0
(UNION,free)(data.res);
295
2.25k
  FN(UNION,free)(u);
296
2.25k
  return data.res;
297
2.25k
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_transform_space
isl_aff.c:isl_union_pw_aff_transform_space
Line
Count
Source
288
874
{
289
874
  S(UNION,transform_data) data = { fn, user };
290
874
291
874
  data.res = FN(UNION,alloc_same_size_on_space)(u, space);
292
874
  if (
FN874
(FN(UNION,foreach),PARTS)(u,
293
874
          &FN(UNION,transform_entry), &data) < 0)
294
0
    
data.res = 0
FN0
(UNION,free)(data.res);
295
874
  FN(UNION,free)(u);
296
874
  return data.res;
297
874
}
298
299
/* Return a UNION that lives in the same space as "u" and that is obtained
300
 * by applying "fn" to each of the entries in "u".
301
 */
302
static __isl_give UNION *FN(UNION,transform)(__isl_take UNION *u,
303
  __isl_give PART *(*fn)(__isl_take PART *part, void *user), void *user)
304
2.97k
{
305
2.97k
  return 
FN2.97k
(UNION,transform_space)(u,
FN2.97k
(UNION,get_space)(u), fn, user);
306
2.97k
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_transform
isl_aff.c:isl_union_pw_multi_aff_transform
Line
Count
Source
304
2.25k
{
305
2.25k
  return 
FN2.25k
(UNION,transform_space)(u,
FN2.25k
(UNION,get_space)(u), fn, user);
306
2.25k
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_transform
isl_aff.c:isl_union_pw_aff_transform
Line
Count
Source
304
728
{
305
728
  return 
FN728
(UNION,transform_space)(u,
FN728
(UNION,get_space)(u), fn, user);
306
728
}
307
308
/* Apply data->fn to *part and store the result back into *part.
309
 */
310
static isl_stat FN(UNION,transform_inplace_entry)(void **part, void *user)
311
3.21k
{
312
3.21k
  S(UNION,transform_data) *data = (S(UNION,transform_data) *) user;
313
3.21k
314
3.21k
  *part = data->fn(*part, data->user);
315
3.21k
  if (!*part)
316
0
    return isl_stat_error;
317
3.21k
  return isl_stat_ok;
318
3.21k
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_transform_inplace_entry
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_transform_inplace_entry
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_transform_inplace_entry
isl_aff.c:isl_union_pw_aff_transform_inplace_entry
Line
Count
Source
311
3.21k
{
312
3.21k
  S(UNION,transform_data) *data = (S(UNION,transform_data) *) user;
313
3.21k
314
3.21k
  *part = data->fn(*part, data->user);
315
3.21k
  if (!*part)
316
0
    return isl_stat_error;
317
3.21k
  return isl_stat_ok;
318
3.21k
}
319
320
/* Update "u" by applying "fn" to each entry.
321
 * This operation is assumed not to change the number of entries nor
322
 * the spaces of the entries.
323
 *
324
 * If there is only one reference to "u", then change "u" inplace.
325
 * Otherwise, create a new UNION from "u" and discard the original.
326
 */
327
static __isl_give UNION *FN(UNION,transform_inplace)(__isl_take UNION *u,
328
  __isl_give PART *(*fn)(__isl_take PART *part, void *user), void *user)
329
2.82k
{
330
2.82k
  isl_bool single_ref;
331
2.82k
332
2.82k
  single_ref = FN(UNION,has_single_reference)(u);
333
2.82k
  if (single_ref < 0)
334
0
    
return 0
FN0
(UNION,free)(u);
335
2.82k
  
if (2.82k
single_ref2.82k
) {
336
2.22k
    S(UNION,transform_data) data = { fn, user };
337
2.22k
    if (
FN2.22k
(UNION,foreach_inplace)(u,
338
2.22k
        &FN(UNION,transform_inplace_entry), &data) < 0)
339
0
      
return 0
FN0
(UNION,free)(u);
340
2.22k
    return u;
341
2.22k
  }
342
596
  
return 596
FN596
(UNION,transform)(u, fn, user);
343
2.82k
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_transform_inplace
isl_aff.c:isl_union_pw_aff_transform_inplace
Line
Count
Source
329
2.82k
{
330
2.82k
  isl_bool single_ref;
331
2.82k
332
2.82k
  single_ref = FN(UNION,has_single_reference)(u);
333
2.82k
  if (single_ref < 0)
334
0
    
return 0
FN0
(UNION,free)(u);
335
2.82k
  
if (2.82k
single_ref2.82k
) {
336
2.22k
    S(UNION,transform_data) data = { fn, user };
337
2.22k
    if (
FN2.22k
(UNION,foreach_inplace)(u,
338
2.22k
        &FN(UNION,transform_inplace_entry), &data) < 0)
339
0
      
return 0
FN0
(UNION,free)(u);
340
2.22k
    return u;
341
2.22k
  }
342
596
  
return 596
FN596
(UNION,transform)(u, fn, user);
343
2.82k
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_transform_inplace
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_transform_inplace
344
345
/* An isl_union_*_transform callback for use in isl_union_*_dup
346
 * that simply returns "part".
347
 */
348
static __isl_give PART *FN(UNION,copy_part)(__isl_take PART *part, void *user)
349
1.61k
{
350
1.61k
  return part;
351
1.61k
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_copy_part
isl_aff.c:isl_union_pw_multi_aff_copy_part
Line
Count
Source
349
1.41k
{
350
1.41k
  return part;
351
1.41k
}
isl_aff.c:isl_union_pw_aff_copy_part
Line
Count
Source
349
198
{
350
198
  return part;
351
198
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_copy_part
352
353
__isl_give UNION *FN(UNION,dup)(__isl_keep UNION *u)
354
2.38k
{
355
2.38k
  u = FN(UNION,copy)(u);
356
2.38k
  return 
FN2.38k
(UNION,transform)(u, &
FN2.38k
(UNION,copy_part), NULL);
357
2.38k
}
Unexecuted instantiation: isl_union_pw_qpolynomial_dup
isl_union_pw_aff_dup
Line
Count
Source
354
132
{
355
132
  u = FN(UNION,copy)(u);
356
132
  return 
FN132
(UNION,transform)(u, &
FN132
(UNION,copy_part), NULL);
357
132
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_dup
isl_union_pw_multi_aff_dup
Line
Count
Source
354
2.24k
{
355
2.24k
  u = FN(UNION,copy)(u);
356
2.24k
  return 
FN2.24k
(UNION,transform)(u, &
FN2.24k
(UNION,copy_part), NULL);
357
2.24k
}
358
359
__isl_give UNION *FN(UNION,cow)(__isl_take UNION *u)
360
19.8k
{
361
19.8k
  if (!u)
362
0
    return NULL;
363
19.8k
364
19.8k
  
if (19.8k
u->ref == 119.8k
)
365
17.4k
    return u;
366
2.38k
  u->ref--;
367
2.38k
  return FN(UNION,dup)(u);
368
19.8k
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_cow
isl_union_pw_aff_cow
Line
Count
Source
360
7.55k
{
361
7.55k
  if (!u)
362
0
    return NULL;
363
7.55k
364
7.55k
  
if (7.55k
u->ref == 17.55k
)
365
7.41k
    return u;
366
132
  u->ref--;
367
132
  return FN(UNION,dup)(u);
368
7.55k
}
isl_union_pw_multi_aff_cow
Line
Count
Source
360
12.2k
{
361
12.2k
  if (!u)
362
0
    return NULL;
363
12.2k
364
12.2k
  
if (12.2k
u->ref == 112.2k
)
365
10.0k
    return u;
366
2.24k
  u->ref--;
367
2.24k
  return FN(UNION,dup)(u);
368
12.2k
}
isl_union_pw_qpolynomial_cow
Line
Count
Source
360
6
{
361
6
  if (!u)
362
0
    return NULL;
363
6
364
6
  
if (6
u->ref == 16
)
365
6
    return u;
366
0
  u->ref--;
367
0
  return FN(UNION,dup)(u);
368
6
}
369
370
__isl_null UNION *FN(UNION,free)(__isl_take UNION *u)
371
53.4k
{
372
53.4k
  if (!u)
373
8.31k
    return NULL;
374
53.4k
375
45.1k
  
if (45.1k
--u->ref > 045.1k
)
376
28.6k
    return NULL;
377
45.1k
378
16.4k
  isl_hash_table_foreach(u->space->ctx, &u->table,
379
16.4k
        &FN(UNION,free_u_entry), NULL);
380
16.4k
  isl_hash_table_clear(&u->table);
381
16.4k
  isl_space_free(u->space);
382
16.4k
  free(u);
383
16.4k
  return NULL;
384
53.4k
}
isl_union_pw_qpolynomial_free
Line
Count
Source
371
8
{
372
8
  if (!u)
373
0
    return NULL;
374
8
375
8
  
if (8
--u->ref > 08
)
376
4
    return NULL;
377
8
378
4
  isl_hash_table_foreach(u->space->ctx, &u->table,
379
4
        &FN(UNION,free_u_entry), NULL);
380
4
  isl_hash_table_clear(&u->table);
381
4
  isl_space_free(u->space);
382
4
  free(u);
383
4
  return NULL;
384
8
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_free
isl_union_pw_multi_aff_free
Line
Count
Source
371
17.3k
{
372
17.3k
  if (!u)
373
1
    return NULL;
374
17.3k
375
17.3k
  
if (17.3k
--u->ref > 017.3k
)
376
5.59k
    return NULL;
377
17.3k
378
11.7k
  isl_hash_table_foreach(u->space->ctx, &u->table,
379
11.7k
        &FN(UNION,free_u_entry), NULL);
380
11.7k
  isl_hash_table_clear(&u->table);
381
11.7k
  isl_space_free(u->space);
382
11.7k
  free(u);
383
11.7k
  return NULL;
384
17.3k
}
isl_union_pw_aff_free
Line
Count
Source
371
36.1k
{
372
36.1k
  if (!u)
373
8.31k
    return NULL;
374
36.1k
375
27.8k
  
if (27.8k
--u->ref > 027.8k
)
376
23.1k
    return NULL;
377
27.8k
378
4.71k
  isl_hash_table_foreach(u->space->ctx, &u->table,
379
4.71k
        &FN(UNION,free_u_entry), NULL);
380
4.71k
  isl_hash_table_clear(&u->table);
381
4.71k
  isl_space_free(u->space);
382
4.71k
  free(u);
383
4.71k
  return NULL;
384
36.1k
}
385
386
static __isl_give PART *FN(UNION,align_entry)(__isl_take PART *part, void *user)
387
187
{
388
187
  isl_reordering *exp = user;
389
187
390
187
  exp = isl_reordering_extend_space(isl_reordering_copy(exp),
391
187
            FN(PART,get_domain_space)(part));
392
187
  return FN(PART,realign_domain)(part, exp);
393
187
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_align_entry
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_align_entry
isl_aff.c:isl_union_pw_aff_align_entry
Line
Count
Source
387
187
{
388
187
  isl_reordering *exp = user;
389
187
390
187
  exp = isl_reordering_extend_space(isl_reordering_copy(exp),
391
187
            FN(PART,get_domain_space)(part));
392
187
  return FN(PART,realign_domain)(part, exp);
393
187
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_align_entry
394
395
/* Reorder the parameters of "u" according to the given reordering.
396
 */
397
static __isl_give UNION *FN(UNION,realign_domain)(__isl_take UNION *u,
398
  __isl_take isl_reordering *r)
399
154
{
400
154
  isl_space *space;
401
154
402
154
  if (
!u || 154
!r154
)
403
0
    goto error;
404
154
405
154
  space = isl_space_copy(r->dim);
406
154
  u = 
FN154
(UNION,transform_space)(u, space, &
FN154
(UNION,align_entry), r);
407
154
  isl_reordering_free(r);
408
154
  return u;
409
0
error:
410
0
  FN(UNION,free)(u);
411
0
  isl_reordering_free(r);
412
0
  return NULL;
413
154
}
isl_aff.c:isl_union_pw_multi_aff_realign_domain
Line
Count
Source
399
8
{
400
8
  isl_space *space;
401
8
402
8
  if (
!u || 8
!r8
)
403
0
    goto error;
404
8
405
8
  space = isl_space_copy(r->dim);
406
8
  u = 
FN8
(UNION,transform_space)(u, space, &
FN8
(UNION,align_entry), r);
407
8
  isl_reordering_free(r);
408
8
  return u;
409
0
error:
410
0
  FN(UNION,free)(u);
411
0
  isl_reordering_free(r);
412
0
  return NULL;
413
8
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_realign_domain
isl_aff.c:isl_union_pw_aff_realign_domain
Line
Count
Source
399
146
{
400
146
  isl_space *space;
401
146
402
146
  if (
!u || 146
!r146
)
403
0
    goto error;
404
146
405
146
  space = isl_space_copy(r->dim);
406
146
  u = 
FN146
(UNION,transform_space)(u, space, &
FN146
(UNION,align_entry), r);
407
146
  isl_reordering_free(r);
408
146
  return u;
409
0
error:
410
0
  FN(UNION,free)(u);
411
0
  isl_reordering_free(r);
412
0
  return NULL;
413
146
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_realign_domain
414
415
/* Align the parameters of "u" to those of "model".
416
 */
417
__isl_give UNION *FN(UNION,align_params)(__isl_take UNION *u,
418
  __isl_take isl_space *model)
419
22.8k
{
420
22.8k
  isl_bool equal_params;
421
22.8k
  isl_reordering *r;
422
22.8k
423
22.8k
  if (
!u || 22.8k
!model22.8k
)
424
0
    goto error;
425
22.8k
426
22.8k
  equal_params = isl_space_has_equal_params(u->space, model);
427
22.8k
  if (equal_params < 0)
428
0
    goto error;
429
22.8k
  
if (22.8k
equal_params22.8k
) {
430
22.8k
    isl_space_free(model);
431
22.8k
    return u;
432
22.8k
  }
433
22.8k
434
8
  model = isl_space_params(model);
435
8
  r = isl_parameter_alignment_reordering(u->space, model);
436
8
  isl_space_free(model);
437
8
438
8
  return FN(UNION,realign_domain)(u, r);
439
0
error:
440
0
  isl_space_free(model);
441
0
  FN(UNION,free)(u);
442
0
  return NULL;
443
22.8k
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_align_params
isl_union_pw_aff_align_params
Line
Count
Source
419
9.34k
{
420
9.34k
  isl_bool equal_params;
421
9.34k
  isl_reordering *r;
422
9.34k
423
9.34k
  if (
!u || 9.34k
!model9.34k
)
424
0
    goto error;
425
9.34k
426
9.34k
  equal_params = isl_space_has_equal_params(u->space, model);
427
9.34k
  if (equal_params < 0)
428
0
    goto error;
429
9.34k
  
if (9.34k
equal_params9.34k
) {
430
9.34k
    isl_space_free(model);
431
9.34k
    return u;
432
9.34k
  }
433
9.34k
434
0
  model = isl_space_params(model);
435
0
  r = isl_parameter_alignment_reordering(u->space, model);
436
0
  isl_space_free(model);
437
0
438
0
  return FN(UNION,realign_domain)(u, r);
439
0
error:
440
0
  isl_space_free(model);
441
0
  FN(UNION,free)(u);
442
0
  return NULL;
443
9.34k
}
isl_union_pw_qpolynomial_align_params
Line
Count
Source
419
10
{
420
10
  isl_bool equal_params;
421
10
  isl_reordering *r;
422
10
423
10
  if (
!u || 10
!model10
)
424
0
    goto error;
425
10
426
10
  equal_params = isl_space_has_equal_params(u->space, model);
427
10
  if (equal_params < 0)
428
0
    goto error;
429
10
  
if (10
equal_params10
) {
430
10
    isl_space_free(model);
431
10
    return u;
432
10
  }
433
10
434
0
  model = isl_space_params(model);
435
0
  r = isl_parameter_alignment_reordering(u->space, model);
436
0
  isl_space_free(model);
437
0
438
0
  return FN(UNION,realign_domain)(u, r);
439
0
error:
440
0
  isl_space_free(model);
441
0
  FN(UNION,free)(u);
442
0
  return NULL;
443
10
}
isl_union_pw_multi_aff_align_params
Line
Count
Source
419
13.4k
{
420
13.4k
  isl_bool equal_params;
421
13.4k
  isl_reordering *r;
422
13.4k
423
13.4k
  if (
!u || 13.4k
!model13.4k
)
424
0
    goto error;
425
13.4k
426
13.4k
  equal_params = isl_space_has_equal_params(u->space, model);
427
13.4k
  if (equal_params < 0)
428
0
    goto error;
429
13.4k
  
if (13.4k
equal_params13.4k
) {
430
13.4k
    isl_space_free(model);
431
13.4k
    return u;
432
13.4k
  }
433
13.4k
434
8
  model = isl_space_params(model);
435
8
  r = isl_parameter_alignment_reordering(u->space, model);
436
8
  isl_space_free(model);
437
8
438
8
  return FN(UNION,realign_domain)(u, r);
439
0
error:
440
0
  isl_space_free(model);
441
0
  FN(UNION,free)(u);
442
0
  return NULL;
443
13.4k
}
444
445
/* Add "part" to *u, taking the union sum if "u" already has
446
 * a part defined on the same space as "part".
447
 */
448
static isl_stat FN(UNION,union_add_part)(__isl_take PART *part, void *user)
449
451
{
450
451
  UNION **u = (UNION **)user;
451
451
452
451
  *u = FN(UNION,add_part_generic)(*u, part, 0);
453
451
454
451
  return isl_stat_ok;
455
451
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_union_add_part
isl_aff.c:isl_union_pw_aff_union_add_part
Line
Count
Source
449
242
{
450
242
  UNION **u = (UNION **)user;
451
242
452
242
  *u = FN(UNION,add_part_generic)(*u, part, 0);
453
242
454
242
  return isl_stat_ok;
455
242
}
isl_polynomial.c:isl_union_pw_qpolynomial_union_add_part
Line
Count
Source
449
1
{
450
1
  UNION **u = (UNION **)user;
451
1
452
1
  *u = FN(UNION,add_part_generic)(*u, part, 0);
453
1
454
1
  return isl_stat_ok;
455
1
}
isl_aff.c:isl_union_pw_multi_aff_union_add_part
Line
Count
Source
449
208
{
450
208
  UNION **u = (UNION **)user;
451
208
452
208
  *u = FN(UNION,add_part_generic)(*u, part, 0);
453
208
454
208
  return isl_stat_ok;
455
208
}
456
457
/* Compute the sum of "u1" and "u2" on the union of their domains,
458
 * with the actual sum on the shared domain and
459
 * the defined expression on the symmetric difference of the domains.
460
 *
461
 * This is an internal function that is exposed under different
462
 * names depending on whether the base expressions have a zero default
463
 * value.
464
 * If they do, then this function is called "add".
465
 * Otherwise, it is called "union_add".
466
 */
467
static __isl_give UNION *FN(UNION,union_add_)(__isl_take UNION *u1,
468
  __isl_take UNION *u2)
469
371
{
470
371
  u1 = 
FN371
(UNION,align_params)(u1,
FN371
(UNION,get_space)(u2));
471
371
  u2 = 
FN371
(UNION,align_params)(u2,
FN371
(UNION,get_space)(u1));
472
371
473
371
  u1 = FN(UNION,cow)(u1);
474
371
475
371
  if (
!u1 || 371
!u2371
)
476
0
    goto error;
477
371
478
371
  
if (371
FN371
(FN(UNION,foreach),PARTS)(u2, &371
FN371
(UNION,union_add_part), &u1) < 0)
479
0
    goto error;
480
371
481
371
  
FN371
(UNION,free)(u2);
482
371
483
371
  return u1;
484
0
error:
485
0
  FN(UNION,free)(u1);
486
0
  FN(UNION,free)(u2);
487
0
  return NULL;
488
371
}
isl_aff.c:isl_union_pw_aff_union_add_
Line
Count
Source
469
242
{
470
242
  u1 = 
FN242
(UNION,align_params)(u1,
FN242
(UNION,get_space)(u2));
471
242
  u2 = 
FN242
(UNION,align_params)(u2,
FN242
(UNION,get_space)(u1));
472
242
473
242
  u1 = FN(UNION,cow)(u1);
474
242
475
242
  if (
!u1 || 242
!u2242
)
476
0
    goto error;
477
242
478
242
  
if (242
FN242
(FN(UNION,foreach),PARTS)(u2, &242
FN242
(UNION,union_add_part), &u1) < 0)
479
0
    goto error;
480
242
481
242
  
FN242
(UNION,free)(u2);
482
242
483
242
  return u1;
484
0
error:
485
0
  FN(UNION,free)(u1);
486
0
  FN(UNION,free)(u2);
487
0
  return NULL;
488
242
}
isl_polynomial.c:isl_union_pw_qpolynomial_union_add_
Line
Count
Source
469
1
{
470
1
  u1 = 
FN1
(UNION,align_params)(u1,
FN1
(UNION,get_space)(u2));
471
1
  u2 = 
FN1
(UNION,align_params)(u2,
FN1
(UNION,get_space)(u1));
472
1
473
1
  u1 = FN(UNION,cow)(u1);
474
1
475
1
  if (
!u1 || 1
!u21
)
476
0
    goto error;
477
1
478
1
  
if (1
FN1
(FN(UNION,foreach),PARTS)(u2, &1
FN1
(UNION,union_add_part), &u1) < 0)
479
0
    goto error;
480
1
481
1
  
FN1
(UNION,free)(u2);
482
1
483
1
  return u1;
484
0
error:
485
0
  FN(UNION,free)(u1);
486
0
  FN(UNION,free)(u2);
487
0
  return NULL;
488
1
}
isl_aff.c:isl_union_pw_multi_aff_union_add_
Line
Count
Source
469
128
{
470
128
  u1 = 
FN128
(UNION,align_params)(u1,
FN128
(UNION,get_space)(u2));
471
128
  u2 = 
FN128
(UNION,align_params)(u2,
FN128
(UNION,get_space)(u1));
472
128
473
128
  u1 = FN(UNION,cow)(u1);
474
128
475
128
  if (
!u1 || 128
!u2128
)
476
0
    goto error;
477
128
478
128
  
if (128
FN128
(FN(UNION,foreach),PARTS)(u2, &128
FN128
(UNION,union_add_part), &u1) < 0)
479
0
    goto error;
480
128
481
128
  
FN128
(UNION,free)(u2);
482
128
483
128
  return u1;
484
0
error:
485
0
  FN(UNION,free)(u1);
486
0
  FN(UNION,free)(u2);
487
0
  return NULL;
488
128
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_union_add_
489
490
__isl_give UNION *FN(FN(UNION,from),PARTS)(__isl_take PART *part)
491
735
{
492
735
  isl_space *dim;
493
735
  UNION *u;
494
735
495
735
  if (!part)
496
0
    return NULL;
497
735
498
735
  
dim = 735
FN735
(PART,get_space)(part);
499
735
  dim = isl_space_drop_dims(dim, isl_dim_in, 0, isl_space_dim(dim, isl_dim_in));
500
735
  dim = isl_space_drop_dims(dim, isl_dim_out, 0, isl_space_dim(dim, isl_dim_out));
501
#ifdef HAS_TYPE
502
0
  u = FN(UNION,ZERO)(dim, part->type);
503
#else
504
735
  u = FN(UNION,ZERO)(dim);
505
#endif
506
735
  u = FN(FN(UNION,add),PARTS)(u, part);
507
735
508
735
  return u;
509
735
}
isl_union_pw_aff_from_pw_aff
Line
Count
Source
491
732
{
492
732
  isl_space *dim;
493
732
  UNION *u;
494
732
495
732
  if (!part)
496
0
    return NULL;
497
732
498
732
  
dim = 732
FN732
(PART,get_space)(part);
499
732
  dim = isl_space_drop_dims(dim, isl_dim_in, 0, isl_space_dim(dim, isl_dim_in));
500
732
  dim = isl_space_drop_dims(dim, isl_dim_out, 0, isl_space_dim(dim, isl_dim_out));
501
#ifdef HAS_TYPE
502
  u = FN(UNION,ZERO)(dim, part->type);
503
#else
504
732
  u = FN(UNION,ZERO)(dim);
505
732
#endif
506
732
  u = FN(FN(UNION,add),PARTS)(u, part);
507
732
508
732
  return u;
509
732
}
Unexecuted instantiation: isl_union_pw_multi_aff_from_pw_multi_aff
isl_union_pw_qpolynomial_from_pw_qpolynomial
Line
Count
Source
491
3
{
492
3
  isl_space *dim;
493
3
  UNION *u;
494
3
495
3
  if (!part)
496
0
    return NULL;
497
3
498
3
  
dim = 3
FN3
(PART,get_space)(part);
499
3
  dim = isl_space_drop_dims(dim, isl_dim_in, 0, isl_space_dim(dim, isl_dim_in));
500
3
  dim = isl_space_drop_dims(dim, isl_dim_out, 0, isl_space_dim(dim, isl_dim_out));
501
#ifdef HAS_TYPE
502
  u = FN(UNION,ZERO)(dim, part->type);
503
#else
504
3
  u = FN(UNION,ZERO)(dim);
505
3
#endif
506
3
  u = FN(FN(UNION,add),PARTS)(u, part);
507
3
508
3
  return u;
509
3
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_from_pw_qpolynomial_fold
510
511
S(UNION,match_bin_data) {
512
  UNION *u2;
513
  UNION *res;
514
  __isl_give PART *(*fn)(__isl_take PART *, __isl_take PART *);
515
};
516
517
/* Check if data->u2 has an element living in the same space as "part".
518
 * If so, call data->fn on the two elements and add the result to
519
 * data->res.
520
 */
521
static isl_stat FN(UNION,match_bin_entry)(__isl_take PART *part, void *user)
522
573
{
523
573
  S(UNION,match_bin_data) *data = user;
524
573
  struct isl_hash_table_entry *entry2;
525
573
  isl_space *space;
526
573
  PART *part2;
527
573
528
573
  space = FN(PART,get_space)(part);
529
573
  entry2 = FN(UNION,find_part_entry)(data->u2, space, 0);
530
573
  isl_space_free(space);
531
573
  if (!entry2)
532
0
    goto error;
533
573
  
if (573
entry2 == isl_hash_table_entry_none573
) {
534
1
    FN(PART,free)(part);
535
1
    return isl_stat_ok;
536
1
  }
537
573
538
572
  part2 = entry2->data;
539
572
  if (!isl_space_tuple_is_equal(part->dim, isl_dim_out,
540
572
          part2->dim, isl_dim_out))
541
0
    isl_die(FN(UNION,get_ctx)(data->u2), isl_error_invalid,
542
572
      "entries should have the same range space",
543
572
      goto error);
544
572
545
572
  
part = data->fn(part, 572
FN572
(PART, copy)(entry2->data));
546
572
547
572
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
548
572
  if (!data->res)
549
0
    return isl_stat_error;
550
572
551
572
  return isl_stat_ok;
552
0
error:
553
0
  FN(PART,free)(part);
554
0
  return isl_stat_error;
555
573
}
isl_aff.c:isl_union_pw_multi_aff_match_bin_entry
Line
Count
Source
522
2
{
523
2
  S(UNION,match_bin_data) *data = user;
524
2
  struct isl_hash_table_entry *entry2;
525
2
  isl_space *space;
526
2
  PART *part2;
527
2
528
2
  space = FN(PART,get_space)(part);
529
2
  entry2 = FN(UNION,find_part_entry)(data->u2, space, 0);
530
2
  isl_space_free(space);
531
2
  if (!entry2)
532
0
    goto error;
533
2
  
if (2
entry2 == isl_hash_table_entry_none2
) {
534
1
    FN(PART,free)(part);
535
1
    return isl_stat_ok;
536
1
  }
537
2
538
1
  part2 = entry2->data;
539
1
  if (!isl_space_tuple_is_equal(part->dim, isl_dim_out,
540
1
          part2->dim, isl_dim_out))
541
0
    isl_die(FN(UNION,get_ctx)(data->u2), isl_error_invalid,
542
1
      "entries should have the same range space",
543
1
      goto error);
544
1
545
1
  
part = data->fn(part, 1
FN1
(PART, copy)(entry2->data));
546
1
547
1
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
548
1
  if (!data->res)
549
0
    return isl_stat_error;
550
1
551
1
  return isl_stat_ok;
552
0
error:
553
0
  FN(PART,free)(part);
554
0
  return isl_stat_error;
555
2
}
isl_aff.c:isl_union_pw_aff_match_bin_entry
Line
Count
Source
522
571
{
523
571
  S(UNION,match_bin_data) *data = user;
524
571
  struct isl_hash_table_entry *entry2;
525
571
  isl_space *space;
526
571
  PART *part2;
527
571
528
571
  space = FN(PART,get_space)(part);
529
571
  entry2 = FN(UNION,find_part_entry)(data->u2, space, 0);
530
571
  isl_space_free(space);
531
571
  if (!entry2)
532
0
    goto error;
533
571
  
if (571
entry2 == isl_hash_table_entry_none571
) {
534
0
    FN(PART,free)(part);
535
0
    return isl_stat_ok;
536
0
  }
537
571
538
571
  part2 = entry2->data;
539
571
  if (!isl_space_tuple_is_equal(part->dim, isl_dim_out,
540
571
          part2->dim, isl_dim_out))
541
0
    isl_die(FN(UNION,get_ctx)(data->u2), isl_error_invalid,
542
571
      "entries should have the same range space",
543
571
      goto error);
544
571
545
571
  
part = data->fn(part, 571
FN571
(PART, copy)(entry2->data));
546
571
547
571
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
548
571
  if (!data->res)
549
0
    return isl_stat_error;
550
571
551
571
  return isl_stat_ok;
552
0
error:
553
0
  FN(PART,free)(part);
554
0
  return isl_stat_error;
555
571
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_match_bin_entry
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_match_bin_entry
556
557
/* This function is currently only used from isl_polynomial.c
558
 * and not from isl_fold.c.
559
 */
560
static __isl_give UNION *FN(UNION,match_bin_op)(__isl_take UNION *u1,
561
  __isl_take UNION *u2,
562
  __isl_give PART *(*fn)(__isl_take PART *, __isl_take PART *))
563
  __attribute__ ((unused));
564
/* For each pair of elements in "u1" and "u2" living in the same space,
565
 * call "fn" and collect the results.
566
 */
567
static __isl_give UNION *FN(UNION,match_bin_op)(__isl_take UNION *u1,
568
  __isl_take UNION *u2,
569
  __isl_give PART *(*fn)(__isl_take PART *, __isl_take PART *))
570
391
{
571
391
  S(UNION,match_bin_data) data = { NULL, NULL, fn };
572
391
573
391
  u1 = 
FN391
(UNION,align_params)(u1,
FN391
(UNION,get_space)(u2));
574
391
  u2 = 
FN391
(UNION,align_params)(u2,
FN391
(UNION,get_space)(u1));
575
391
576
391
  if (
!u1 || 391
!u2391
)
577
0
    goto error;
578
391
579
391
  data.u2 = u2;
580
391
  data.res = FN(UNION,alloc_same_size)(u1);
581
391
  if (
FN391
(FN(UNION,foreach),PARTS)(u1,
582
391
            &FN(UNION,match_bin_entry), &data) < 0)
583
0
    goto error;
584
391
585
391
  
FN391
(UNION,free)(u1);
586
391
  FN(UNION,free)(u2);
587
391
  return data.res;
588
0
error:
589
0
  FN(UNION,free)(u1);
590
0
  FN(UNION,free)(u2);
591
0
  FN(UNION,free)(data.res);
592
0
  return NULL;
593
391
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_match_bin_op
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_match_bin_op
isl_aff.c:isl_union_pw_aff_match_bin_op
Line
Count
Source
570
390
{
571
390
  S(UNION,match_bin_data) data = { NULL, NULL, fn };
572
390
573
390
  u1 = 
FN390
(UNION,align_params)(u1,
FN390
(UNION,get_space)(u2));
574
390
  u2 = 
FN390
(UNION,align_params)(u2,
FN390
(UNION,get_space)(u1));
575
390
576
390
  if (
!u1 || 390
!u2390
)
577
0
    goto error;
578
390
579
390
  data.u2 = u2;
580
390
  data.res = FN(UNION,alloc_same_size)(u1);
581
390
  if (
FN390
(FN(UNION,foreach),PARTS)(u1,
582
390
            &FN(UNION,match_bin_entry), &data) < 0)
583
0
    goto error;
584
390
585
390
  
FN390
(UNION,free)(u1);
586
390
  FN(UNION,free)(u2);
587
390
  return data.res;
588
0
error:
589
0
  FN(UNION,free)(u1);
590
0
  FN(UNION,free)(u2);
591
0
  FN(UNION,free)(data.res);
592
0
  return NULL;
593
390
}
isl_aff.c:isl_union_pw_multi_aff_match_bin_op
Line
Count
Source
570
1
{
571
1
  S(UNION,match_bin_data) data = { NULL, NULL, fn };
572
1
573
1
  u1 = 
FN1
(UNION,align_params)(u1,
FN1
(UNION,get_space)(u2));
574
1
  u2 = 
FN1
(UNION,align_params)(u2,
FN1
(UNION,get_space)(u1));
575
1
576
1
  if (
!u1 || 1
!u21
)
577
0
    goto error;
578
1
579
1
  data.u2 = u2;
580
1
  data.res = FN(UNION,alloc_same_size)(u1);
581
1
  if (
FN1
(FN(UNION,foreach),PARTS)(u1,
582
1
            &FN(UNION,match_bin_entry), &data) < 0)
583
0
    goto error;
584
1
585
1
  
FN1
(UNION,free)(u1);
586
1
  FN(UNION,free)(u2);
587
1
  return data.res;
588
0
error:
589
0
  FN(UNION,free)(u1);
590
0
  FN(UNION,free)(u2);
591
0
  FN(UNION,free)(data.res);
592
0
  return NULL;
593
1
}
594
595
/* Compute the sum of "u1" and "u2".
596
 *
597
 * If the base expressions have a default zero value, then the sum
598
 * is computed on the union of the domains of "u1" and "u2".
599
 * Otherwise, it is computed on their shared domains.
600
 */
601
__isl_give UNION *FN(UNION,add)(__isl_take UNION *u1, __isl_take UNION *u2)
602
133
{
603
#if DEFAULT_IS_ZERO
604
1
  return FN(UNION,union_add_)(u1, u2);
605
#else
606
132
  return 
FN132
(UNION,match_bin_op)(u1, u2, &
FN132
(PART,add));
607
#endif
608
}
isl_union_pw_aff_add
Line
Count
Source
602
131
{
603
#if DEFAULT_IS_ZERO
604
  return FN(UNION,union_add_)(u1, u2);
605
#else
606
131
  return 
FN131
(UNION,match_bin_op)(u1, u2, &
FN131
(PART,add));
607
131
#endif
608
131
}
isl_union_pw_qpolynomial_add
Line
Count
Source
602
1
{
603
1
#if DEFAULT_IS_ZERO
604
1
  return FN(UNION,union_add_)(u1, u2);
605
#else
606
  return FN(UNION,match_bin_op)(u1, u2, &FN(PART,add));
607
#endif
608
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_add
isl_union_pw_multi_aff_add
Line
Count
Source
602
1
{
603
#if DEFAULT_IS_ZERO
604
  return FN(UNION,union_add_)(u1, u2);
605
#else
606
1
  return 
FN1
(UNION,match_bin_op)(u1, u2, &
FN1
(PART,add));
607
1
#endif
608
1
}
609
610
#ifndef NO_SUB
611
/* Subtract "u2" from "u1" and return the result.
612
 */
613
__isl_give UNION *FN(UNION,sub)(__isl_take UNION *u1, __isl_take UNION *u2)
614
259
{
615
259
  return 
FN259
(UNION,match_bin_op)(u1, u2, &
FN259
(PART,sub));
616
259
}
isl_union_pw_aff_sub
Line
Count
Source
614
259
{
615
259
  return 
FN259
(UNION,match_bin_op)(u1, u2, &
FN259
(PART,sub));
616
259
}
Unexecuted instantiation: isl_union_pw_multi_aff_sub
Unexecuted instantiation: isl_union_pw_qpolynomial_sub
617
#endif
618
619
S(UNION,any_set_data) {
620
  isl_set *set;
621
  __isl_give PW *(*fn)(__isl_take PW*, __isl_take isl_set*);
622
};
623
624
static __isl_give PART *FN(UNION,any_set_entry)(__isl_take PART *part,
625
  void *user)
626
0
{
627
0
  S(UNION,any_set_data) *data = user;
628
0
629
0
  return data->fn(part, isl_set_copy(data->set));
630
0
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_any_set_entry
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_any_set_entry
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_any_set_entry
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_any_set_entry
631
632
/* Update each element of "u" by calling "fn" on the element and "set".
633
 */
634
static __isl_give UNION *FN(UNION,any_set_op)(__isl_take UNION *u,
635
  __isl_take isl_set *set,
636
  __isl_give PW *(*fn)(__isl_take PW*, __isl_take isl_set*))
637
0
{
638
0
  S(UNION,any_set_data) data = { NULL, fn };
639
0
640
0
  u = FN(UNION,align_params)(u, isl_set_get_space(set));
641
0
  set = isl_set_align_params(set, FN(UNION,get_space)(u));
642
0
643
0
  if (
!u || 0
!set0
)
644
0
    goto error;
645
0
646
0
  data.set = set;
647
0
  u = 
FN0
(UNION,transform)(u, &
FN0
(UNION,any_set_entry), &data);
648
0
  isl_set_free(set);
649
0
  return u;
650
0
error:
651
0
  FN(UNION,free)(u);
652
0
  isl_set_free(set);
653
0
  return NULL;
654
0
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_any_set_op
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_any_set_op
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_any_set_op
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_any_set_op
655
656
/* Intersect the domain of "u" with the parameter domain "context".
657
 */
658
__isl_give UNION *FN(UNION,intersect_params)(__isl_take UNION *u,
659
  __isl_take isl_set *set)
660
0
{
661
0
  return 
FN0
(UNION,any_set_op)(u, set, &
FN0
(PW,intersect_params));
662
0
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_intersect_params
Unexecuted instantiation: isl_union_pw_aff_intersect_params
Unexecuted instantiation: isl_union_pw_multi_aff_intersect_params
Unexecuted instantiation: isl_union_pw_qpolynomial_intersect_params
663
664
/* Compute the gist of the domain of "u" with respect to
665
 * the parameter domain "context".
666
 */
667
__isl_give UNION *FN(UNION,gist_params)(__isl_take UNION *u,
668
  __isl_take isl_set *set)
669
0
{
670
0
  return 
FN0
(UNION,any_set_op)(u, set, &
FN0
(PW,gist_params));
671
0
}
Unexecuted instantiation: isl_union_pw_qpolynomial_gist_params
Unexecuted instantiation: isl_union_pw_multi_aff_gist_params
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_gist_params
Unexecuted instantiation: isl_union_pw_aff_gist_params
672
673
S(UNION,match_domain_data) {
674
  isl_union_set *uset;
675
  UNION *res;
676
  __isl_give PW *(*fn)(__isl_take PW*, __isl_take isl_set*);
677
};
678
679
static int FN(UNION,set_has_dim)(const void *entry, const void *val)
680
281
{
681
281
  isl_set *set = (isl_set *)entry;
682
281
  isl_space *dim = (isl_space *)val;
683
281
684
281
  return isl_space_is_equal(set->dim, dim);
685
281
}
isl_aff.c:isl_union_pw_multi_aff_set_has_dim
Line
Count
Source
680
29
{
681
29
  isl_set *set = (isl_set *)entry;
682
29
  isl_space *dim = (isl_space *)val;
683
29
684
29
  return isl_space_is_equal(set->dim, dim);
685
29
}
isl_polynomial.c:isl_union_pw_qpolynomial_set_has_dim
Line
Count
Source
680
1
{
681
1
  isl_set *set = (isl_set *)entry;
682
1
  isl_space *dim = (isl_space *)val;
683
1
684
1
  return isl_space_is_equal(set->dim, dim);
685
1
}
isl_aff.c:isl_union_pw_aff_set_has_dim
Line
Count
Source
680
251
{
681
251
  isl_set *set = (isl_set *)entry;
682
251
  isl_space *dim = (isl_space *)val;
683
251
684
251
  return isl_space_is_equal(set->dim, dim);
685
251
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_set_has_dim
686
687
/* Find the set in data->uset that lives in the same space as the domain
688
 * of "part", apply data->fn to *entry and this set (if any), and add
689
 * the result to data->res.
690
 */
691
static isl_stat FN(UNION,match_domain_entry)(__isl_take PART *part, void *user)
692
389
{
693
389
  S(UNION,match_domain_data) *data = user;
694
389
  uint32_t hash;
695
389
  struct isl_hash_table_entry *entry2;
696
389
  isl_space *space;
697
389
698
389
  space = FN(PART,get_domain_space)(part);
699
389
  hash = isl_space_get_hash(space);
700
389
  entry2 = isl_hash_table_find(data->uset->dim->ctx, &data->uset->table,
701
389
             hash, &FN(UNION,set_has_dim), space, 0);
702
389
  isl_space_free(space);
703
389
  if (
!entry2389
) {
704
108
    FN(PART,free)(part);
705
108
    return isl_stat_ok;
706
108
  }
707
389
708
281
  part = data->fn(part, isl_set_copy(entry2->data));
709
281
710
281
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
711
281
  if (!data->res)
712
0
    return isl_stat_error;
713
281
714
281
  return isl_stat_ok;
715
389
}
isl_aff.c:isl_union_pw_aff_match_domain_entry
Line
Count
Source
692
357
{
693
357
  S(UNION,match_domain_data) *data = user;
694
357
  uint32_t hash;
695
357
  struct isl_hash_table_entry *entry2;
696
357
  isl_space *space;
697
357
698
357
  space = FN(PART,get_domain_space)(part);
699
357
  hash = isl_space_get_hash(space);
700
357
  entry2 = isl_hash_table_find(data->uset->dim->ctx, &data->uset->table,
701
357
             hash, &FN(UNION,set_has_dim), space, 0);
702
357
  isl_space_free(space);
703
357
  if (
!entry2357
) {
704
106
    FN(PART,free)(part);
705
106
    return isl_stat_ok;
706
106
  }
707
357
708
251
  part = data->fn(part, isl_set_copy(entry2->data));
709
251
710
251
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
711
251
  if (!data->res)
712
0
    return isl_stat_error;
713
251
714
251
  return isl_stat_ok;
715
357
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_match_domain_entry
isl_polynomial.c:isl_union_pw_qpolynomial_match_domain_entry
Line
Count
Source
692
1
{
693
1
  S(UNION,match_domain_data) *data = user;
694
1
  uint32_t hash;
695
1
  struct isl_hash_table_entry *entry2;
696
1
  isl_space *space;
697
1
698
1
  space = FN(PART,get_domain_space)(part);
699
1
  hash = isl_space_get_hash(space);
700
1
  entry2 = isl_hash_table_find(data->uset->dim->ctx, &data->uset->table,
701
1
             hash, &FN(UNION,set_has_dim), space, 0);
702
1
  isl_space_free(space);
703
1
  if (
!entry21
) {
704
0
    FN(PART,free)(part);
705
0
    return isl_stat_ok;
706
0
  }
707
1
708
1
  part = data->fn(part, isl_set_copy(entry2->data));
709
1
710
1
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
711
1
  if (!data->res)
712
0
    return isl_stat_error;
713
1
714
1
  return isl_stat_ok;
715
1
}
isl_aff.c:isl_union_pw_multi_aff_match_domain_entry
Line
Count
Source
692
31
{
693
31
  S(UNION,match_domain_data) *data = user;
694
31
  uint32_t hash;
695
31
  struct isl_hash_table_entry *entry2;
696
31
  isl_space *space;
697
31
698
31
  space = FN(PART,get_domain_space)(part);
699
31
  hash = isl_space_get_hash(space);
700
31
  entry2 = isl_hash_table_find(data->uset->dim->ctx, &data->uset->table,
701
31
             hash, &FN(UNION,set_has_dim), space, 0);
702
31
  isl_space_free(space);
703
31
  if (
!entry231
) {
704
2
    FN(PART,free)(part);
705
2
    return isl_stat_ok;
706
2
  }
707
31
708
29
  part = data->fn(part, isl_set_copy(entry2->data));
709
29
710
29
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
711
29
  if (!data->res)
712
0
    return isl_stat_error;
713
29
714
29
  return isl_stat_ok;
715
31
}
716
717
/* Apply fn to each pair of PW in u and set in uset such that
718
 * the set lives in the same space as the domain of PW
719
 * and collect the results.
720
 */
721
static __isl_give UNION *FN(UNION,match_domain_op)(__isl_take UNION *u,
722
  __isl_take isl_union_set *uset,
723
  __isl_give PW *(*fn)(__isl_take PW*, __isl_take isl_set*))
724
250
{
725
250
  S(UNION,match_domain_data) data = { NULL, NULL, fn };
726
250
727
250
  u = FN(UNION,align_params)(u, isl_union_set_get_space(uset));
728
250
  uset = isl_union_set_align_params(uset, FN(UNION,get_space)(u));
729
250
730
250
  if (
!u || 250
!uset250
)
731
0
    goto error;
732
250
733
250
  data.uset = uset;
734
250
  data.res = FN(UNION,alloc_same_size)(u);
735
250
  if (
FN250
(FN(UNION,foreach),PARTS)(u,
736
250
           &FN(UNION,match_domain_entry), &data) < 0)
737
0
    goto error;
738
250
739
250
  
FN250
(UNION,free)(u);
740
250
  isl_union_set_free(uset);
741
250
  return data.res;
742
0
error:
743
0
  FN(UNION,free)(u);
744
0
  isl_union_set_free(uset);
745
0
  FN(UNION,free)(data.res);
746
0
  return NULL;
747
250
}
isl_aff.c:isl_union_pw_aff_match_domain_op
Line
Count
Source
724
228
{
725
228
  S(UNION,match_domain_data) data = { NULL, NULL, fn };
726
228
727
228
  u = FN(UNION,align_params)(u, isl_union_set_get_space(uset));
728
228
  uset = isl_union_set_align_params(uset, FN(UNION,get_space)(u));
729
228
730
228
  if (
!u || 228
!uset228
)
731
0
    goto error;
732
228
733
228
  data.uset = uset;
734
228
  data.res = FN(UNION,alloc_same_size)(u);
735
228
  if (
FN228
(FN(UNION,foreach),PARTS)(u,
736
228
           &FN(UNION,match_domain_entry), &data) < 0)
737
0
    goto error;
738
228
739
228
  
FN228
(UNION,free)(u);
740
228
  isl_union_set_free(uset);
741
228
  return data.res;
742
0
error:
743
0
  FN(UNION,free)(u);
744
0
  isl_union_set_free(uset);
745
0
  FN(UNION,free)(data.res);
746
0
  return NULL;
747
228
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_match_domain_op
isl_polynomial.c:isl_union_pw_qpolynomial_match_domain_op
Line
Count
Source
724
1
{
725
1
  S(UNION,match_domain_data) data = { NULL, NULL, fn };
726
1
727
1
  u = FN(UNION,align_params)(u, isl_union_set_get_space(uset));
728
1
  uset = isl_union_set_align_params(uset, FN(UNION,get_space)(u));
729
1
730
1
  if (
!u || 1
!uset1
)
731
0
    goto error;
732
1
733
1
  data.uset = uset;
734
1
  data.res = FN(UNION,alloc_same_size)(u);
735
1
  if (
FN1
(FN(UNION,foreach),PARTS)(u,
736
1
           &FN(UNION,match_domain_entry), &data) < 0)
737
0
    goto error;
738
1
739
1
  
FN1
(UNION,free)(u);
740
1
  isl_union_set_free(uset);
741
1
  return data.res;
742
0
error:
743
0
  FN(UNION,free)(u);
744
0
  isl_union_set_free(uset);
745
0
  FN(UNION,free)(data.res);
746
0
  return NULL;
747
1
}
isl_aff.c:isl_union_pw_multi_aff_match_domain_op
Line
Count
Source
724
21
{
725
21
  S(UNION,match_domain_data) data = { NULL, NULL, fn };
726
21
727
21
  u = FN(UNION,align_params)(u, isl_union_set_get_space(uset));
728
21
  uset = isl_union_set_align_params(uset, FN(UNION,get_space)(u));
729
21
730
21
  if (
!u || 21
!uset21
)
731
0
    goto error;
732
21
733
21
  data.uset = uset;
734
21
  data.res = FN(UNION,alloc_same_size)(u);
735
21
  if (
FN21
(FN(UNION,foreach),PARTS)(u,
736
21
           &FN(UNION,match_domain_entry), &data) < 0)
737
0
    goto error;
738
21
739
21
  
FN21
(UNION,free)(u);
740
21
  isl_union_set_free(uset);
741
21
  return data.res;
742
0
error:
743
0
  FN(UNION,free)(u);
744
0
  isl_union_set_free(uset);
745
0
  FN(UNION,free)(data.res);
746
0
  return NULL;
747
21
}
748
749
/* Intersect the domain of "u" with "uset".
750
 * If "uset" is a parameters domain, then intersect the parameter
751
 * domain of "u" with this set.
752
 */
753
__isl_give UNION *FN(UNION,intersect_domain)(__isl_take UNION *u,
754
  __isl_take isl_union_set *uset)
755
26
{
756
26
  if (isl_union_set_is_params(uset))
757
0
    
return 0
FN0
(UNION,intersect_params)(u,
758
0
            isl_set_from_union_set(uset));
759
26
  
return 26
FN26
(UNION,match_domain_op)(u, uset, &
FN26
(PW,intersect_domain));
760
26
}
isl_union_pw_qpolynomial_intersect_domain
Line
Count
Source
755
1
{
756
1
  if (isl_union_set_is_params(uset))
757
0
    
return 0
FN0
(UNION,intersect_params)(u,
758
0
            isl_set_from_union_set(uset));
759
1
  
return 1
FN1
(UNION,match_domain_op)(u, uset, &
FN1
(PW,intersect_domain));
760
1
}
isl_union_pw_multi_aff_intersect_domain
Line
Count
Source
755
20
{
756
20
  if (isl_union_set_is_params(uset))
757
0
    
return 0
FN0
(UNION,intersect_params)(u,
758
0
            isl_set_from_union_set(uset));
759
20
  
return 20
FN20
(UNION,match_domain_op)(u, uset, &
FN20
(PW,intersect_domain));
760
20
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_intersect_domain
isl_union_pw_aff_intersect_domain
Line
Count
Source
755
5
{
756
5
  if (isl_union_set_is_params(uset))
757
0
    
return 0
FN0
(UNION,intersect_params)(u,
758
0
            isl_set_from_union_set(uset));
759
5
  
return 5
FN5
(UNION,match_domain_op)(u, uset, &
FN5
(PW,intersect_domain));
760
5
}
761
762
/* Take the set (which may be empty) in data->uset that lives
763
 * in the same space as the domain of "pw", subtract it from the domain
764
 * of "part" and return the result.
765
 */
766
static __isl_give PART *FN(UNION,subtract_domain_entry)(__isl_take PART *part,
767
  void *user)
768
3
{
769
3
  isl_union_set *uset = user;
770
3
  isl_space *space;
771
3
  isl_set *set;
772
3
773
3
  space = FN(PART,get_domain_space)(part);
774
3
  set = isl_union_set_extract_set(uset, space);
775
3
  return FN(PART,subtract_domain)(part, set);
776
3
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_subtract_domain_entry
isl_aff.c:isl_union_pw_multi_aff_subtract_domain_entry
Line
Count
Source
768
3
{
769
3
  isl_union_set *uset = user;
770
3
  isl_space *space;
771
3
  isl_set *set;
772
3
773
3
  space = FN(PART,get_domain_space)(part);
774
3
  set = isl_union_set_extract_set(uset, space);
775
3
  return FN(PART,subtract_domain)(part, set);
776
3
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_subtract_domain_entry
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_subtract_domain_entry
777
778
/* Subtract "uset' from the domain of "u".
779
 */
780
__isl_give UNION *FN(UNION,subtract_domain)(__isl_take UNION *u,
781
  __isl_take isl_union_set *uset)
782
3
{
783
3
  u = 
FN3
(UNION,transform)(u, &
FN3
(UNION,subtract_domain_entry), uset);
784
3
  isl_union_set_free(uset);
785
3
  return u;
786
3
}
Unexecuted instantiation: isl_union_pw_aff_subtract_domain
Unexecuted instantiation: isl_union_pw_qpolynomial_subtract_domain
isl_union_pw_multi_aff_subtract_domain
Line
Count
Source
782
3
{
783
3
  u = 
FN3
(UNION,transform)(u, &
FN3
(UNION,subtract_domain_entry), uset);
784
3
  isl_union_set_free(uset);
785
3
  return u;
786
3
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_subtract_domain
787
788
__isl_give UNION *FN(UNION,gist)(__isl_take UNION *u,
789
  __isl_take isl_union_set *uset)
790
224
{
791
224
  if (isl_union_set_is_params(uset))
792
0
    
return 0
FN0
(UNION,gist_params)(u, isl_set_from_union_set(uset));
793
224
  
return 224
FN224
(UNION,match_domain_op)(u, uset, &
FN224
(PW,gist));
794
224
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_gist
isl_union_pw_aff_gist
Line
Count
Source
790
223
{
791
223
  if (isl_union_set_is_params(uset))
792
0
    
return 0
FN0
(UNION,gist_params)(u, isl_set_from_union_set(uset));
793
223
  
return 223
FN223
(UNION,match_domain_op)(u, uset, &
FN223
(PW,gist));
794
223
}
isl_union_pw_multi_aff_gist
Line
Count
Source
790
1
{
791
1
  if (isl_union_set_is_params(uset))
792
0
    
return 0
FN0
(UNION,gist_params)(u, isl_set_from_union_set(uset));
793
1
  
return 1
FN1
(UNION,match_domain_op)(u, uset, &
FN1
(PW,gist));
794
1
}
Unexecuted instantiation: isl_union_pw_qpolynomial_gist
795
796
/* Coalesce an entry in a UNION.  Coalescing is performed in-place.
797
 * Since the UNION may have several references, the entry is only
798
 * replaced if the coalescing is successful.
799
 */
800
static isl_stat FN(UNION,coalesce_entry)(void **entry, void *user)
801
0
{
802
0
  PART **part_p = (PART **) entry;
803
0
  PART *part;
804
0
805
0
  part = FN(PART,copy)(*part_p);
806
0
  part = FN(PW,coalesce)(part);
807
0
  if (!part)
808
0
    return isl_stat_error;
809
0
  
FN0
(PART,free)(*part_p);
810
0
  *part_p = part;
811
0
812
0
  return isl_stat_ok;
813
0
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_coalesce_entry
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_coalesce_entry
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_coalesce_entry
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_coalesce_entry
814
815
__isl_give UNION *FN(UNION,coalesce)(__isl_take UNION *u)
816
0
{
817
0
  if (
FN0
(UNION,foreach_inplace)(u, &0
FN0
(UNION,coalesce_entry), NULL) < 0)
818
0
    goto error;
819
0
820
0
  return u;
821
0
error:
822
0
  FN(UNION,free)(u);
823
0
  return NULL;
824
0
}
Unexecuted instantiation: isl_union_pw_multi_aff_coalesce
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_coalesce
Unexecuted instantiation: isl_union_pw_qpolynomial_coalesce
Unexecuted instantiation: isl_union_pw_aff_coalesce
825
826
static isl_stat FN(UNION,domain_entry)(__isl_take PART *part, void *user)
827
9.62k
{
828
9.62k
  isl_union_set **uset = (isl_union_set **)user;
829
9.62k
830
9.62k
  *uset = isl_union_set_add_set(*uset, FN(PART,domain)(part));
831
9.62k
832
9.62k
  return isl_stat_ok;
833
9.62k
}
isl_polynomial.c:isl_union_pw_qpolynomial_domain_entry
Line
Count
Source
827
1
{
828
1
  isl_union_set **uset = (isl_union_set **)user;
829
1
830
1
  *uset = isl_union_set_add_set(*uset, FN(PART,domain)(part));
831
1
832
1
  return isl_stat_ok;
833
1
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_domain_entry
isl_aff.c:isl_union_pw_multi_aff_domain_entry
Line
Count
Source
827
5
{
828
5
  isl_union_set **uset = (isl_union_set **)user;
829
5
830
5
  *uset = isl_union_set_add_set(*uset, FN(PART,domain)(part));
831
5
832
5
  return isl_stat_ok;
833
5
}
isl_aff.c:isl_union_pw_aff_domain_entry
Line
Count
Source
827
9.62k
{
828
9.62k
  isl_union_set **uset = (isl_union_set **)user;
829
9.62k
830
9.62k
  *uset = isl_union_set_add_set(*uset, FN(PART,domain)(part));
831
9.62k
832
9.62k
  return isl_stat_ok;
833
9.62k
}
834
835
__isl_give isl_union_set *FN(UNION,domain)(__isl_take UNION *u)
836
6.07k
{
837
6.07k
  isl_union_set *uset;
838
6.07k
839
6.07k
  uset = isl_union_set_empty(FN(UNION,get_space)(u));
840
6.07k
  if (
FN6.07k
(FN(UNION,foreach),PARTS)(u, &6.07k
FN6.07k
(UNION,domain_entry), &uset) < 0)
841
0
    goto error;
842
6.07k
843
6.07k
  
FN6.07k
(UNION,free)(u);
844
6.07k
  
845
6.07k
  return uset;
846
0
error:
847
0
  isl_union_set_free(uset);
848
0
  FN(UNION,free)(u);
849
0
  return NULL;
850
6.07k
}
isl_union_pw_qpolynomial_domain
Line
Count
Source
836
1
{
837
1
  isl_union_set *uset;
838
1
839
1
  uset = isl_union_set_empty(FN(UNION,get_space)(u));
840
1
  if (
FN1
(FN(UNION,foreach),PARTS)(u, &1
FN1
(UNION,domain_entry), &uset) < 0)
841
0
    goto error;
842
1
843
1
  
FN1
(UNION,free)(u);
844
1
  
845
1
  return uset;
846
0
error:
847
0
  isl_union_set_free(uset);
848
0
  FN(UNION,free)(u);
849
0
  return NULL;
850
1
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_domain
isl_union_pw_multi_aff_domain
Line
Count
Source
836
5
{
837
5
  isl_union_set *uset;
838
5
839
5
  uset = isl_union_set_empty(FN(UNION,get_space)(u));
840
5
  if (
FN5
(FN(UNION,foreach),PARTS)(u, &5
FN5
(UNION,domain_entry), &uset) < 0)
841
0
    goto error;
842
5
843
5
  
FN5
(UNION,free)(u);
844
5
  
845
5
  return uset;
846
0
error:
847
0
  isl_union_set_free(uset);
848
0
  FN(UNION,free)(u);
849
0
  return NULL;
850
5
}
isl_union_pw_aff_domain
Line
Count
Source
836
6.06k
{
837
6.06k
  isl_union_set *uset;
838
6.06k
839
6.06k
  uset = isl_union_set_empty(FN(UNION,get_space)(u));
840
6.06k
  if (
FN6.06k
(FN(UNION,foreach),PARTS)(u, &6.06k
FN6.06k
(UNION,domain_entry), &uset) < 0)
841
0
    goto error;
842
6.06k
843
6.06k
  
FN6.06k
(UNION,free)(u);
844
6.06k
  
845
6.06k
  return uset;
846
0
error:
847
0
  isl_union_set_free(uset);
848
0
  FN(UNION,free)(u);
849
0
  return NULL;
850
6.06k
}
851
852
#ifdef HAS_TYPE
853
/* Negate the type of "u".
854
 */
855
static __isl_give UNION *FN(UNION,negate_type)(__isl_take UNION *u)
856
0
{
857
0
  u = FN(UNION,cow)(u);
858
0
  if (!u)
859
0
    return NULL;
860
0
  u->type = isl_fold_type_negate(u->type);
861
0
  return u;
862
0
}
863
#else
864
/* Negate the type of "u".
865
 * Since "u" does not have a type, do nothing.
866
 */
867
static __isl_give UNION *FN(UNION,negate_type)(__isl_take UNION *u)
868
0
{
869
0
  return u;
870
0
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_negate_type
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_negate_type
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_negate_type
871
#endif
872
873
static __isl_give PART *FN(UNION,mul_isl_int_entry)(__isl_take PART *part,
874
  void *user)
875
0
{
876
0
  isl_int *v = user;
877
0
878
0
  return FN(PW,mul_isl_int)(part, *v);
879
0
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_mul_isl_int_entry
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_mul_isl_int_entry
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_mul_isl_int_entry
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_mul_isl_int_entry
880
881
__isl_give UNION *FN(UNION,mul_isl_int)(__isl_take UNION *u, isl_int v)
882
0
{
883
0
  if (isl_int_is_one(v))
884
0
    return u;
885
0
886
0
  
if (0
DEFAULT_IS_ZERO0
&& 0
u0
&&
isl_int_is_zero0
(v)) {
887
0
    UNION *zero;
888
0
    isl_space *dim = FN(UNION,get_space)(u);
889
#ifdef HAS_TYPE
890
0
    zero = FN(UNION,ZERO)(dim, u->type);
891
#else
892
0
    zero = FN(UNION,ZERO)(dim);
893
#endif
894
0
    FN(UNION,free)(u);
895
0
    return zero;
896
0
  }
897
0
898
0
  
u = 0
FN0
(UNION,transform_inplace)(u, &
FN0
(UNION,mul_isl_int_entry), &v);
899
0
  if (isl_int_is_neg(v))
900
0
    
u = 0
FN0
(UNION,negate_type)(u);
901
0
902
0
  return u;
903
0
}
Unexecuted instantiation: isl_union_pw_aff_mul_isl_int
Unexecuted instantiation: isl_union_pw_multi_aff_mul_isl_int
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_mul_isl_int
Unexecuted instantiation: isl_union_pw_qpolynomial_mul_isl_int
904
905
/* Multiply "part" by the isl_val "user" and return the result.
906
 */
907
static __isl_give PART *FN(UNION,scale_val_entry)(__isl_take PART *part,
908
  void *user)
909
152
{
910
152
  isl_val *v = user;
911
152
912
152
  return FN(PART,scale_val)(part, isl_val_copy(v));
913
152
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_scale_val_entry
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_scale_val_entry
isl_aff.c:isl_union_pw_aff_scale_val_entry
Line
Count
Source
909
152
{
910
152
  isl_val *v = user;
911
152
912
152
  return FN(PART,scale_val)(part, isl_val_copy(v));
913
152
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_scale_val_entry
914
915
/* Multiply "u" by "v" and return the result.
916
 */
917
__isl_give UNION *FN(UNION,scale_val)(__isl_take UNION *u,
918
  __isl_take isl_val *v)
919
167
{
920
167
  if (
!u || 167
!v167
)
921
0
    goto error;
922
167
  
if (167
isl_val_is_one(v)167
) {
923
18
    isl_val_free(v);
924
18
    return u;
925
18
  }
926
167
927
149
  
if (149
DEFAULT_IS_ZERO149
&& 149
u0
&&
isl_val_is_zero(v)0
) {
928
0
    UNION *zero;
929
0
    isl_space *space = FN(UNION,get_space)(u);
930
#ifdef HAS_TYPE
931
0
    zero = FN(UNION,ZERO)(space, u->type);
932
#else
933
0
    zero = FN(UNION,ZERO)(space);
934
#endif
935
0
    FN(UNION,free)(u);
936
0
    isl_val_free(v);
937
0
    return zero;
938
0
  }
939
149
940
149
  
if (149
!isl_val_is_rat(v)149
)
941
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
942
149
      "expecting rational factor", goto error);
943
149
944
149
  
u = 149
FN149
(UNION,transform_inplace)(u, &
FN149
(UNION,scale_val_entry), v);
945
149
  if (isl_val_is_neg(v))
946
0
    
u = 0
FN0
(UNION,negate_type)(u);
947
149
948
149
  isl_val_free(v);
949
149
  return u;
950
0
error:
951
0
  isl_val_free(v);
952
0
  FN(UNION,free)(u);
953
0
  return NULL;
954
167
}
Unexecuted instantiation: isl_union_pw_qpolynomial_scale_val
isl_union_pw_aff_scale_val
Line
Count
Source
919
167
{
920
167
  if (
!u || 167
!v167
)
921
0
    goto error;
922
167
  
if (167
isl_val_is_one(v)167
) {
923
18
    isl_val_free(v);
924
18
    return u;
925
18
  }
926
167
927
149
  
if (149
DEFAULT_IS_ZERO149
&& 149
u0
&&
isl_val_is_zero(v)0
) {
928
0
    UNION *zero;
929
0
    isl_space *space = FN(UNION,get_space)(u);
930
#ifdef HAS_TYPE
931
    zero = FN(UNION,ZERO)(space, u->type);
932
#else
933
0
    zero = FN(UNION,ZERO)(space);
934
0
#endif
935
0
    FN(UNION,free)(u);
936
0
    isl_val_free(v);
937
0
    return zero;
938
0
  }
939
149
940
149
  
if (149
!isl_val_is_rat(v)149
)
941
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
942
149
      "expecting rational factor", goto error);
943
149
944
149
  
u = 149
FN149
(UNION,transform_inplace)(u, &
FN149
(UNION,scale_val_entry), v);
945
149
  if (isl_val_is_neg(v))
946
0
    
u = 0
FN0
(UNION,negate_type)(u);
947
149
948
149
  isl_val_free(v);
949
149
  return u;
950
0
error:
951
0
  isl_val_free(v);
952
0
  FN(UNION,free)(u);
953
0
  return NULL;
954
167
}
Unexecuted instantiation: isl_union_pw_multi_aff_scale_val
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_scale_val
955
956
/* Divide "part" by the isl_val "user" and return the result.
957
 */
958
static __isl_give PART *FN(UNION,scale_down_val_entry)(__isl_take PART *part,
959
  void *user)
960
154
{
961
154
  isl_val *v = user;
962
154
963
154
  return FN(PART,scale_down_val)(part, isl_val_copy(v));
964
154
}
isl_aff.c:isl_union_pw_aff_scale_down_val_entry
Line
Count
Source
960
154
{
961
154
  isl_val *v = user;
962
154
963
154
  return FN(PART,scale_down_val)(part, isl_val_copy(v));
964
154
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_scale_down_val_entry
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_scale_down_val_entry
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_scale_down_val_entry
965
966
/* Divide "u" by "v" and return the result.
967
 */
968
__isl_give UNION *FN(UNION,scale_down_val)(__isl_take UNION *u,
969
  __isl_take isl_val *v)
970
169
{
971
169
  if (
!u || 169
!v169
)
972
0
    goto error;
973
169
  
if (169
isl_val_is_one(v)169
) {
974
18
    isl_val_free(v);
975
18
    return u;
976
18
  }
977
169
978
151
  
if (151
!isl_val_is_rat(v)151
)
979
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
980
151
      "expecting rational factor", goto error);
981
151
  
if (151
isl_val_is_zero(v)151
)
982
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
983
151
      "cannot scale down by zero", goto error);
984
151
985
151
  
u = 151
FN151
(UNION,transform_inplace)(u, &
FN151
(UNION,scale_down_val_entry), v);
986
151
  if (isl_val_is_neg(v))
987
0
    
u = 0
FN0
(UNION,negate_type)(u);
988
151
989
151
  isl_val_free(v);
990
151
  return u;
991
0
error:
992
0
  isl_val_free(v);
993
0
  FN(UNION,free)(u);
994
0
  return NULL;
995
169
}
isl_union_pw_aff_scale_down_val
Line
Count
Source
970
169
{
971
169
  if (
!u || 169
!v169
)
972
0
    goto error;
973
169
  
if (169
isl_val_is_one(v)169
) {
974
18
    isl_val_free(v);
975
18
    return u;
976
18
  }
977
169
978
151
  
if (151
!isl_val_is_rat(v)151
)
979
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
980
151
      "expecting rational factor", goto error);
981
151
  
if (151
isl_val_is_zero(v)151
)
982
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
983
151
      "cannot scale down by zero", goto error);
984
151
985
151
  
u = 151
FN151
(UNION,transform_inplace)(u, &
FN151
(UNION,scale_down_val_entry), v);
986
151
  if (isl_val_is_neg(v))
987
0
    
u = 0
FN0
(UNION,negate_type)(u);
988
151
989
151
  isl_val_free(v);
990
151
  return u;
991
0
error:
992
0
  isl_val_free(v);
993
0
  FN(UNION,free)(u);
994
0
  return NULL;
995
169
}
Unexecuted instantiation: isl_union_pw_qpolynomial_scale_down_val
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_scale_down_val
Unexecuted instantiation: isl_union_pw_multi_aff_scale_down_val
996
997
S(UNION,plain_is_equal_data)
998
{
999
  UNION *u2;
1000
  isl_bool is_equal;
1001
};
1002
1003
static isl_stat FN(UNION,plain_is_equal_entry)(void **entry, void *user)
1004
28
{
1005
28
  S(UNION,plain_is_equal_data) *data = user;
1006
28
  struct isl_hash_table_entry *entry2;
1007
28
  PW *pw = *entry;
1008
28
1009
28
  entry2 = FN(UNION,find_part_entry)(data->u2, pw->dim, 0);
1010
28
  if (
!entry2 || 28
entry2 == isl_hash_table_entry_none28
) {
1011
0
    if (!entry2)
1012
0
      data->is_equal = isl_bool_error;
1013
0
    else
1014
0
      data->is_equal = isl_bool_false;
1015
0
    return isl_stat_error;
1016
0
  }
1017
28
1018
28
  
data->is_equal = 28
FN28
(PW,plain_is_equal)(pw, entry2->data);
1019
28
  if (
data->is_equal < 0 || 28
!data->is_equal28
)
1020
0
    return isl_stat_error;
1021
28
1022
28
  return isl_stat_ok;
1023
28
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_plain_is_equal_entry
isl_polynomial.c:isl_union_pw_qpolynomial_plain_is_equal_entry
Line
Count
Source
1004
1
{
1005
1
  S(UNION,plain_is_equal_data) *data = user;
1006
1
  struct isl_hash_table_entry *entry2;
1007
1
  PW *pw = *entry;
1008
1
1009
1
  entry2 = FN(UNION,find_part_entry)(data->u2, pw->dim, 0);
1010
1
  if (
!entry2 || 1
entry2 == isl_hash_table_entry_none1
) {
1011
0
    if (!entry2)
1012
0
      data->is_equal = isl_bool_error;
1013
0
    else
1014
0
      data->is_equal = isl_bool_false;
1015
0
    return isl_stat_error;
1016
0
  }
1017
1
1018
1
  
data->is_equal = 1
FN1
(PW,plain_is_equal)(pw, entry2->data);
1019
1
  if (
data->is_equal < 0 || 1
!data->is_equal1
)
1020
0
    return isl_stat_error;
1021
1
1022
1
  return isl_stat_ok;
1023
1
}
isl_aff.c:isl_union_pw_aff_plain_is_equal_entry
Line
Count
Source
1004
16
{
1005
16
  S(UNION,plain_is_equal_data) *data = user;
1006
16
  struct isl_hash_table_entry *entry2;
1007
16
  PW *pw = *entry;
1008
16
1009
16
  entry2 = FN(UNION,find_part_entry)(data->u2, pw->dim, 0);
1010
16
  if (
!entry2 || 16
entry2 == isl_hash_table_entry_none16
) {
1011
0
    if (!entry2)
1012
0
      data->is_equal = isl_bool_error;
1013
0
    else
1014
0
      data->is_equal = isl_bool_false;
1015
0
    return isl_stat_error;
1016
0
  }
1017
16
1018
16
  
data->is_equal = 16
FN16
(PW,plain_is_equal)(pw, entry2->data);
1019
16
  if (
data->is_equal < 0 || 16
!data->is_equal16
)
1020
0
    return isl_stat_error;
1021
16
1022
16
  return isl_stat_ok;
1023
16
}
isl_aff.c:isl_union_pw_multi_aff_plain_is_equal_entry
Line
Count
Source
1004
11
{
1005
11
  S(UNION,plain_is_equal_data) *data = user;
1006
11
  struct isl_hash_table_entry *entry2;
1007
11
  PW *pw = *entry;
1008
11
1009
11
  entry2 = FN(UNION,find_part_entry)(data->u2, pw->dim, 0);
1010
11
  if (
!entry2 || 11
entry2 == isl_hash_table_entry_none11
) {
1011
0
    if (!entry2)
1012
0
      data->is_equal = isl_bool_error;
1013
0
    else
1014
0
      data->is_equal = isl_bool_false;
1015
0
    return isl_stat_error;
1016
0
  }
1017
11
1018
11
  
data->is_equal = 11
FN11
(PW,plain_is_equal)(pw, entry2->data);
1019
11
  if (
data->is_equal < 0 || 11
!data->is_equal11
)
1020
0
    return isl_stat_error;
1021
11
1022
11
  return isl_stat_ok;
1023
11
}
1024
1025
isl_bool FN(UNION,plain_is_equal)(__isl_keep UNION *u1, __isl_keep UNION *u2)
1026
26
{
1027
26
  S(UNION,plain_is_equal_data) data = { NULL, isl_bool_true };
1028
26
  int n1, n2;
1029
26
1030
26
  if (
!u1 || 26
!u226
)
1031
0
    return isl_bool_error;
1032
26
  
if (26
u1 == u226
)
1033
0
    return isl_bool_true;
1034
26
  
if (26
u1->table.n != u2->table.n26
)
1035
0
    return isl_bool_false;
1036
26
  
n1 = 26
FN26
(FN(UNION,n),PARTS)(u1);
1037
26
  n2 = FN(FN(UNION,n),PARTS)(u2);
1038
26
  if (
n1 < 0 || 26
n2 < 026
)
1039
0
    return isl_bool_error;
1040
26
  
if (26
n1 != n226
)
1041
0
    return isl_bool_false;
1042
26
1043
26
  
u1 = 26
FN26
(UNION,copy)(u1);
1044
26
  u2 = FN(UNION,copy)(u2);
1045
26
  u1 = 
FN26
(UNION,align_params)(u1,
FN26
(UNION,get_space)(u2));
1046
26
  u2 = 
FN26
(UNION,align_params)(u2,
FN26
(UNION,get_space)(u1));
1047
26
  if (
!u1 || 26
!u226
)
1048
0
    goto error;
1049
26
1050
26
  data.u2 = u2;
1051
26
  if (
FN26
(UNION,foreach_inplace)(u1,
1052
26
             &FN(UNION,plain_is_equal_entry), &data) < 0 &&
1053
0
      data.is_equal)
1054
0
    goto error;
1055
26
1056
26
  
FN26
(UNION,free)(u1);
1057
26
  FN(UNION,free)(u2);
1058
26
1059
26
  return data.is_equal;
1060
0
error:
1061
0
  FN(UNION,free)(u1);
1062
0
  FN(UNION,free)(u2);
1063
0
  return isl_bool_error;
1064
26
}
isl_union_pw_aff_plain_is_equal
Line
Count
Source
1026
16
{
1027
16
  S(UNION,plain_is_equal_data) data = { NULL, isl_bool_true };
1028
16
  int n1, n2;
1029
16
1030
16
  if (
!u1 || 16
!u216
)
1031
0
    return isl_bool_error;
1032
16
  
if (16
u1 == u216
)
1033
0
    return isl_bool_true;
1034
16
  
if (16
u1->table.n != u2->table.n16
)
1035
0
    return isl_bool_false;
1036
16
  
n1 = 16
FN16
(FN(UNION,n),PARTS)(u1);
1037
16
  n2 = FN(FN(UNION,n),PARTS)(u2);
1038
16
  if (
n1 < 0 || 16
n2 < 016
)
1039
0
    return isl_bool_error;
1040
16
  
if (16
n1 != n216
)
1041
0
    return isl_bool_false;
1042
16
1043
16
  
u1 = 16
FN16
(UNION,copy)(u1);
1044
16
  u2 = FN(UNION,copy)(u2);
1045
16
  u1 = 
FN16
(UNION,align_params)(u1,
FN16
(UNION,get_space)(u2));
1046
16
  u2 = 
FN16
(UNION,align_params)(u2,
FN16
(UNION,get_space)(u1));
1047
16
  if (
!u1 || 16
!u216
)
1048
0
    goto error;
1049
16
1050
16
  data.u2 = u2;
1051
16
  if (
FN16
(UNION,foreach_inplace)(u1,
1052
16
             &FN(UNION,plain_is_equal_entry), &data) < 0 &&
1053
0
      data.is_equal)
1054
0
    goto error;
1055
16
1056
16
  
FN16
(UNION,free)(u1);
1057
16
  FN(UNION,free)(u2);
1058
16
1059
16
  return data.is_equal;
1060
0
error:
1061
0
  FN(UNION,free)(u1);
1062
0
  FN(UNION,free)(u2);
1063
0
  return isl_bool_error;
1064
16
}
isl_union_pw_multi_aff_plain_is_equal
Line
Count
Source
1026
9
{
1027
9
  S(UNION,plain_is_equal_data) data = { NULL, isl_bool_true };
1028
9
  int n1, n2;
1029
9
1030
9
  if (
!u1 || 9
!u29
)
1031
0
    return isl_bool_error;
1032
9
  
if (9
u1 == u29
)
1033
0
    return isl_bool_true;
1034
9
  
if (9
u1->table.n != u2->table.n9
)
1035
0
    return isl_bool_false;
1036
9
  
n1 = 9
FN9
(FN(UNION,n),PARTS)(u1);
1037
9
  n2 = FN(FN(UNION,n),PARTS)(u2);
1038
9
  if (
n1 < 0 || 9
n2 < 09
)
1039
0
    return isl_bool_error;
1040
9
  
if (9
n1 != n29
)
1041
0
    return isl_bool_false;
1042
9
1043
9
  
u1 = 9
FN9
(UNION,copy)(u1);
1044
9
  u2 = FN(UNION,copy)(u2);
1045
9
  u1 = 
FN9
(UNION,align_params)(u1,
FN9
(UNION,get_space)(u2));
1046
9
  u2 = 
FN9
(UNION,align_params)(u2,
FN9
(UNION,get_space)(u1));
1047
9
  if (
!u1 || 9
!u29
)
1048
0
    goto error;
1049
9
1050
9
  data.u2 = u2;
1051
9
  if (
FN9
(UNION,foreach_inplace)(u1,
1052
9
             &FN(UNION,plain_is_equal_entry), &data) < 0 &&
1053
0
      data.is_equal)
1054
0
    goto error;
1055
9
1056
9
  
FN9
(UNION,free)(u1);
1057
9
  FN(UNION,free)(u2);
1058
9
1059
9
  return data.is_equal;
1060
0
error:
1061
0
  FN(UNION,free)(u1);
1062
0
  FN(UNION,free)(u2);
1063
0
  return isl_bool_error;
1064
9
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_plain_is_equal
isl_union_pw_qpolynomial_plain_is_equal
Line
Count
Source
1026
1
{
1027
1
  S(UNION,plain_is_equal_data) data = { NULL, isl_bool_true };
1028
1
  int n1, n2;
1029
1
1030
1
  if (
!u1 || 1
!u21
)
1031
0
    return isl_bool_error;
1032
1
  
if (1
u1 == u21
)
1033
0
    return isl_bool_true;
1034
1
  
if (1
u1->table.n != u2->table.n1
)
1035
0
    return isl_bool_false;
1036
1
  
n1 = 1
FN1
(FN(UNION,n),PARTS)(u1);
1037
1
  n2 = FN(FN(UNION,n),PARTS)(u2);
1038
1
  if (
n1 < 0 || 1
n2 < 01
)
1039
0
    return isl_bool_error;
1040
1
  
if (1
n1 != n21
)
1041
0
    return isl_bool_false;
1042
1
1043
1
  
u1 = 1
FN1
(UNION,copy)(u1);
1044
1
  u2 = FN(UNION,copy)(u2);
1045
1
  u1 = 
FN1
(UNION,align_params)(u1,
FN1
(UNION,get_space)(u2));
1046
1
  u2 = 
FN1
(UNION,align_params)(u2,
FN1
(UNION,get_space)(u1));
1047
1
  if (
!u1 || 1
!u21
)
1048
0
    goto error;
1049
1
1050
1
  data.u2 = u2;
1051
1
  if (
FN1
(UNION,foreach_inplace)(u1,
1052
1
             &FN(UNION,plain_is_equal_entry), &data) < 0 &&
1053
0
      data.is_equal)
1054
0
    goto error;
1055
1
1056
1
  
FN1
(UNION,free)(u1);
1057
1
  FN(UNION,free)(u2);
1058
1
1059
1
  return data.is_equal;
1060
0
error:
1061
0
  FN(UNION,free)(u1);
1062
0
  FN(UNION,free)(u2);
1063
0
  return isl_bool_error;
1064
1
}
1065
1066
/* Check whether the element that "entry" points to involves any NaNs and
1067
 * store the result in *nan.
1068
 * Abort as soon as one such element has been found.
1069
 */
1070
static isl_stat FN(UNION,involves_nan_entry)(void **entry, void *user)
1071
0
{
1072
0
  isl_bool *nan = user;
1073
0
  PW *pw = *entry;
1074
0
1075
0
  *nan = FN(PW,involves_nan)(pw);
1076
0
  if (
*nan < 0 || 0
!nan0
)
1077
0
    return isl_stat_error;
1078
0
1079
0
  return isl_stat_ok;
1080
0
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_involves_nan_entry
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_involves_nan_entry
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_involves_nan_entry
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_involves_nan_entry
1081
1082
/* Does "u" involve any NaNs?
1083
 */
1084
isl_bool FN(UNION,involves_nan)(__isl_keep UNION *u)
1085
0
{
1086
0
  isl_bool nan = isl_bool_false;
1087
0
1088
0
  if (!u)
1089
0
    return isl_bool_error;
1090
0
1091
0
  
if (0
FN0
(UNION,foreach_inplace)(u,
1092
0
            &FN(UNION,involves_nan_entry), &nan) < 0 &&
1093
0
      !nan)
1094
0
    return isl_bool_error;
1095
0
1096
0
  return nan;
1097
0
}
Unexecuted instantiation: isl_union_pw_qpolynomial_involves_nan
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_involves_nan
Unexecuted instantiation: isl_union_pw_multi_aff_involves_nan
Unexecuted instantiation: isl_union_pw_aff_involves_nan
1098
1099
/* Internal data structure for isl_union_*_drop_dims.
1100
 * type, first and n are passed to isl_*_drop_dims.
1101
 */
1102
S(UNION,drop_dims_data) {
1103
  enum isl_dim_type type;
1104
  unsigned first;
1105
  unsigned n;
1106
};
1107
1108
/* Drop the parameters specified by "data" from "part" and return the result.
1109
 */
1110
static __isl_give PART *FN(UNION,drop_dims_entry)(__isl_take PART *part,
1111
  void *user)
1112
0
{
1113
0
  S(UNION,drop_dims_data) *data = user;
1114
0
1115
0
  return FN(PART,drop_dims)(part, data->type, data->first, data->n);
1116
0
}
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_drop_dims_entry
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_drop_dims_entry
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_drop_dims_entry
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_drop_dims_entry
1117
1118
/* Drop the specified parameters from "u".
1119
 * That is, type is required to be isl_dim_param.
1120
 */
1121
__isl_give UNION *FN(UNION,drop_dims)( __isl_take UNION *u,
1122
  enum isl_dim_type type, unsigned first, unsigned n)
1123
0
{
1124
0
  isl_space *space;
1125
0
  S(UNION,drop_dims_data) data = { type, first, n };
1126
0
1127
0
  if (!u)
1128
0
    return NULL;
1129
0
1130
0
  
if (0
type != isl_dim_param0
)
1131
0
    isl_die(FN(UNION,get_ctx)(u), isl_error_invalid,
1132
0
      "can only project out parameters",
1133
0
      return FN(UNION,free)(u));
1134
0
1135
0
  
space = 0
FN0
(UNION,get_space)(u);
1136
0
  space = isl_space_drop_dims(space, type, first, n);
1137
0
  return 
FN0
(UNION,transform_space)(u, space, &
FN0
(UNION,drop_dims_entry),
1138
0
          &data);
1139
0
}
Unexecuted instantiation: isl_union_pw_qpolynomial_drop_dims
Unexecuted instantiation: isl_union_pw_aff_drop_dims
Unexecuted instantiation: isl_union_pw_multi_aff_drop_dims
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_drop_dims
1140
1141
/* Internal data structure for isl_union_*_set_dim_name.
1142
 * pos is the position of the parameter that needs to be renamed.
1143
 * s is the new name.
1144
 */
1145
S(UNION,set_dim_name_data) {
1146
  unsigned pos;
1147
  const char *s;
1148
};
1149
1150
/* Change the name of the parameter at position data->pos of "part" to data->s
1151
 * and return the result.
1152
 */
1153
static __isl_give PART *FN(UNION,set_dim_name_entry)(__isl_take PART *part,
1154
  void *user)
1155
0
{
1156
0
  S(UNION,set_dim_name_data) *data = user;
1157
0
1158
0
  return FN(PART,set_dim_name)(part, isl_dim_param, data->pos, data->s);
1159
0
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_set_dim_name_entry
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_set_dim_name_entry
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_set_dim_name_entry
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_set_dim_name_entry
1160
1161
/* Change the name of the parameter at position "pos" to "s".
1162
 * That is, type is required to be isl_dim_param.
1163
 */
1164
__isl_give UNION *FN(UNION,set_dim_name)(__isl_take UNION *u,
1165
  enum isl_dim_type type, unsigned pos, const char *s)
1166
0
{
1167
0
  S(UNION,set_dim_name_data) data = { pos, s };
1168
0
  isl_space *space;
1169
0
1170
0
  if (!u)
1171
0
    return NULL;
1172
0
1173
0
  
if (0
type != isl_dim_param0
)
1174
0
    isl_die(FN(UNION,get_ctx)(u), isl_error_invalid,
1175
0
      "can only set parameter names",
1176
0
      return FN(UNION,free)(u));
1177
0
1178
0
  
space = 0
FN0
(UNION,get_space)(u);
1179
0
  space = isl_space_set_dim_name(space, type, pos, s);
1180
0
  return FN(UNION,transform_space)(u, space,
1181
0
          &FN(UNION,set_dim_name_entry), &data);
1182
0
}
Unexecuted instantiation: isl_union_pw_aff_set_dim_name
Unexecuted instantiation: isl_union_pw_qpolynomial_set_dim_name
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_set_dim_name
Unexecuted instantiation: isl_union_pw_multi_aff_set_dim_name
1183
1184
/* Reset the user pointer on all identifiers of parameters and tuples
1185
 * of the space of "part" and return the result.
1186
 */
1187
static __isl_give PART *FN(UNION,reset_user_entry)(__isl_take PART *part,
1188
  void *user)
1189
0
{
1190
0
  return FN(PART,reset_user)(part);
1191
0
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_reset_user_entry
Unexecuted instantiation: isl_aff.c:isl_union_pw_aff_reset_user_entry
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_reset_user_entry
Unexecuted instantiation: isl_aff.c:isl_union_pw_multi_aff_reset_user_entry
1192
1193
/* Reset the user pointer on all identifiers of parameters and tuples
1194
 * of the spaces of "u".
1195
 */
1196
__isl_give UNION *FN(UNION,reset_user)(__isl_take UNION *u)
1197
0
{
1198
0
  isl_space *space;
1199
0
1200
0
  space = FN(UNION,get_space)(u);
1201
0
  space = isl_space_reset_user(space);
1202
0
  return 
FN0
(UNION,transform_space)(u, space, &
FN0
(UNION,reset_user_entry),
1203
0
          NULL);
1204
0
}
Unexecuted instantiation: isl_union_pw_aff_reset_user
Unexecuted instantiation: isl_union_pw_qpolynomial_reset_user
Unexecuted instantiation: isl_union_pw_multi_aff_reset_user
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_reset_user