Coverage Report

Created: 2017-06-28 17:40

/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
29.0k
{
17
29.0k
  return u ? u->space->ctx : NULL;
18
29.0k
}
isl_union_pw_aff_get_ctx
Line
Count
Source
16
8.85k
{
17
8.85k
  return u ? u->space->ctx : NULL;
18
8.85k
}
isl_union_pw_multi_aff_get_ctx
Line
Count
Source
16
20.2k
{
17
20.2k
  return u ? u->space->ctx : NULL;
18
20.2k
}
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
57.1k
{
22
57.1k
  if (!u)
23
0
    return NULL;
24
57.1k
  return isl_space_copy(u->space);
25
57.1k
}
isl_union_pw_aff_get_space
Line
Count
Source
21
36.4k
{
22
36.4k
  if (!u)
23
0
    return NULL;
24
36.4k
  return isl_space_copy(u->space);
25
36.4k
}
isl_union_pw_multi_aff_get_space
Line
Count
Source
21
20.7k
{
22
20.7k
  if (!u)
23
0
    return NULL;
24
20.7k
  return isl_space_copy(u->space);
25
20.7k
}
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
13.7k
{
61
13.7k
  UNION *u;
62
13.7k
63
13.7k
  dim = isl_space_params(dim);
64
13.7k
  if (!dim)
65
0
    return NULL;
66
13.7k
67
13.7k
  
u = 13.7k
isl_calloc_type13.7k
(dim->ctx, UNION);
68
13.7k
  if (!u)
69
0
    goto error;
70
13.7k
71
13.7k
  u->ref = 1;
72
13.7k
#ifdef HAS_TYPE
73
  u->type = type;
74
#endif
75
13.7k
  u->space = dim;
76
13.7k
  if (isl_hash_table_init(dim->ctx, &u->table, size) < 0)
77
0
    
return 0
FN0
(UNION,free)(u);
78
13.7k
79
13.7k
  return u;
80
0
error:
81
0
  isl_space_free(dim);
82
0
  return NULL;
83
13.7k
}
isl_aff.c:isl_union_pw_multi_aff_alloc
Line
Count
Source
60
9.74k
{
61
9.74k
  UNION *u;
62
9.74k
63
9.74k
  dim = isl_space_params(dim);
64
9.74k
  if (!dim)
65
0
    return NULL;
66
9.74k
67
9.74k
  
u = 9.74k
isl_calloc_type9.74k
(dim->ctx, UNION);
68
9.74k
  if (!u)
69
0
    goto error;
70
9.74k
71
9.74k
  u->ref = 1;
72
9.74k
#ifdef HAS_TYPE
73
  u->type = type;
74
#endif
75
9.74k
  u->space = dim;
76
9.74k
  if (isl_hash_table_init(dim->ctx, &u->table, size) < 0)
77
0
    
return 0
FN0
(UNION,free)(u);
78
9.74k
79
9.74k
  return u;
80
0
error:
81
0
  isl_space_free(dim);
82
0
  return NULL;
83
9.74k
}
isl_aff.c:isl_union_pw_aff_alloc
Line
Count
Source
60
3.96k
{
61
3.96k
  UNION *u;
62
3.96k
63
3.96k
  dim = isl_space_params(dim);
64
3.96k
  if (!dim)
65
0
    return NULL;
66
3.96k
67
3.96k
  
u = 3.96k
isl_calloc_type3.96k
(dim->ctx, UNION);
68
3.96k
  if (!u)
69
0
    goto error;
70
3.96k
71
3.96k
  u->ref = 1;
72
3.96k
#ifdef HAS_TYPE
73
  u->type = type;
74
#endif
75
3.96k
  u->space = dim;
76
3.96k
  if (isl_hash_table_init(dim->ctx, &u->table, size) < 0)
77
0
    
return 0
FN0
(UNION,free)(u);
78
3.96k
79
3.96k
  return u;
80
0
error:
81
0
  isl_space_free(dim);
82
0
  return NULL;
83
3.96k
}
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
4
#ifdef HAS_TYPE
73
  u->type = type;
74
#endif
75
4
  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
10.1k
{
93
10.1k
  return FN(UNION,alloc)(dim, 16);
94
10.1k
}
isl_union_pw_aff_empty
Line
Count
Source
92
2.47k
{
93
2.47k
  return FN(UNION,alloc)(dim, 16);
94
2.47k
}
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
7.66k
{
93
7.66k
  return FN(UNION,alloc)(dim, 16);
94
7.66k
}
95
#endif
96
97
__isl_give UNION *FN(UNION,copy)(__isl_keep UNION *u)
98
25.9k
{
99
25.9k
  if (!u)
100
0
    return NULL;
101
25.9k
102
25.9k
  u->ref++;
103
25.9k
  return u;
104
25.9k
}
isl_union_pw_multi_aff_copy
Line
Count
Source
98
6.81k
{
99
6.81k
  if (!u)
100
0
    return NULL;
101
6.81k
102
6.81k
  u->ref++;
103
6.81k
  return u;
104
6.81k
}
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
19.1k
{
99
19.1k
  if (!u)
100
0
    return NULL;
101
19.1k
102
19.1k
  u->ref++;
103
19.1k
  return u;
104
19.1k
}
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
)
{0
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
0
#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
16.2k
{
157
16.2k
  int empty;
158
16.2k
  struct isl_hash_table_entry *entry;
159
16.2k
160
16.2k
  if (!part)
161
0
    goto error;
162
16.2k
163
16.2k
  
empty = 16.2k
FN16.2k
(PART,IS_ZERO)(part);
164
16.2k
  if (empty < 0)
165
0
    goto error;
166
16.2k
  
if (16.2k
empty16.2k
)
{1
167
1
    FN(PART,free)(part);
168
1
    return u;
169
1
  }
170
16.2k
171
16.1k
  
u = 16.1k
FN16.1k
(UNION,align_params)(u,
FN16.1k
(PART,get_space)(part));
172
16.1k
  part = 
FN16.1k
(PART,align_params)(part,
FN16.1k
(UNION,get_space)(u));
173
16.1k
174
16.1k
  u = FN(UNION,cow)(u);
175
16.1k
176
16.1k
  if (!u)
177
0
    goto error;
178
16.1k
179
16.1k
  
if (16.1k
FN16.1k
(UNION,check_disjoint_domain_other)(u, part) < 016.1k
)
180
1
    goto error;
181
16.1k
  
entry = 16.1k
FN16.1k
(UNION,find_part_entry)(u, part->dim, 1);
182
16.1k
  if (!entry)
183
0
    goto error;
184
16.1k
185
16.1k
  
if (16.1k
!entry->data16.1k
)
186
16.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
16.1k
203
16.1k
  return u;
204
1
error:
205
1
  FN(PART,free)(part);
206
1
  FN(UNION,free)(u);
207
1
  return NULL;
208
16.1k
}
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
)
{0
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
6.10k
{
157
6.10k
  int empty;
158
6.10k
  struct isl_hash_table_entry *entry;
159
6.10k
160
6.10k
  if (!part)
161
0
    goto error;
162
6.10k
163
6.10k
  
empty = 6.10k
FN6.10k
(PART,IS_ZERO)(part);
164
6.10k
  if (empty < 0)
165
0
    goto error;
166
6.10k
  
if (6.10k
empty6.10k
)
{0
167
0
    FN(PART,free)(part);
168
0
    return u;
169
0
  }
170
6.10k
171
6.10k
  
u = 6.10k
FN6.10k
(UNION,align_params)(u,
FN6.10k
(PART,get_space)(part));
172
6.10k
  part = 
FN6.10k
(PART,align_params)(part,
FN6.10k
(UNION,get_space)(u));
173
6.10k
174
6.10k
  u = FN(UNION,cow)(u);
175
6.10k
176
6.10k
  if (!u)
177
0
    goto error;
178
6.10k
179
6.10k
  
if (6.10k
FN6.10k
(UNION,check_disjoint_domain_other)(u, part) < 06.10k
)
180
0
    goto error;
181
6.10k
  
entry = 6.10k
FN6.10k
(UNION,find_part_entry)(u, part->dim, 1);
182
6.10k
  if (!entry)
183
0
    goto error;
184
6.10k
185
6.10k
  
if (6.10k
!entry->data6.10k
)
186
6.10k
    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
6.10k
203
6.10k
  return u;
204
0
error:
205
0
  FN(PART,free)(part);
206
0
  FN(UNION,free)(u);
207
0
  return NULL;
208
6.10k
}
isl_aff.c:isl_union_pw_multi_aff_add_part_generic
Line
Count
Source
156
10.0k
{
157
10.0k
  int empty;
158
10.0k
  struct isl_hash_table_entry *entry;
159
10.0k
160
10.0k
  if (!part)
161
0
    goto error;
162
10.0k
163
10.0k
  
empty = 10.0k
FN10.0k
(PART,IS_ZERO)(part);
164
10.0k
  if (empty < 0)
165
0
    goto error;
166
10.0k
  
if (10.0k
empty10.0k
)
{1
167
1
    FN(PART,free)(part);
168
1
    return u;
169
1
  }
170
10.0k
171
10.0k
  
u = 10.0k
FN10.0k
(UNION,align_params)(u,
FN10.0k
(PART,get_space)(part));
172
10.0k
  part = 
FN10.0k
(PART,align_params)(part,
FN10.0k
(UNION,get_space)(u));
173
10.0k
174
10.0k
  u = FN(UNION,cow)(u);
175
10.0k
176
10.0k
  if (!u)
177
0
    goto error;
178
10.0k
179
10.0k
  
if (10.0k
FN10.0k
(UNION,check_disjoint_domain_other)(u, part) < 010.0k
)
180
1
    goto error;
181
10.0k
  
entry = 10.0k
FN10.0k
(UNION,find_part_entry)(u, part->dim, 1);
182
10.0k
  if (!entry)
183
0
    goto error;
184
10.0k
185
10.0k
  
if (10.0k
!entry->data10.0k
)
186
10.0k
    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
10.0k
203
10.0k
  return u;
204
1
error:
205
1
  FN(PART,free)(part);
206
1
  FN(UNION,free)(u);
207
1
  return NULL;
208
10.0k
}
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
15.7k
{
216
15.7k
  return FN(UNION,add_part_generic)(u, part, 1);
217
15.7k
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_add_pw_qpolynomial_fold
isl_union_pw_multi_aff_add_pw_multi_aff
Line
Count
Source
215
9.88k
{
216
9.88k
  return FN(UNION,add_part_generic)(u, part, 1);
217
9.88k
}
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
5.88k
{
216
5.88k
  return FN(UNION,add_part_generic)(u, part, 1);
217
5.88k
}
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
3.56k
{
239
3.56k
  if (!u)
240
0
    goto error;
241
3.56k
  
return 3.56k
FN3.56k
(UNION,alloc)(space, u->table.n);
242
0
error:
243
0
  isl_space_free(space);
244
0
  return NULL;
245
3.56k
}
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.07k
{
239
2.07k
  if (!u)
240
0
    goto error;
241
2.07k
  
return 2.07k
FN2.07k
(UNION,alloc)(space, u->table.n);
242
0
error:
243
0
  isl_space_free(space);
244
0
  return NULL;
245
2.07k
}
isl_aff.c:isl_union_pw_aff_alloc_same_size_on_space
Line
Count
Source
238
1.49k
{
239
1.49k
  if (!u)
240
0
    goto error;
241
1.49k
  
return 1.49k
FN1.49k
(UNION,alloc)(space, u->table.n);
242
0
error:
243
0
  isl_space_free(space);
244
0
  return NULL;
245
1.49k
}
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.08k
{
253
1.08k
  return 
FN1.08k
(UNION,alloc_same_size_on_space)(u,
FN1.08k
(UNION,get_space)(u));
254
1.08k
}
isl_aff.c:isl_union_pw_multi_aff_alloc_same_size
Line
Count
Source
252
104
{
253
104
  return 
FN104
(UNION,alloc_same_size_on_space)(u,
FN104
(UNION,get_space)(u));
254
104
}
isl_aff.c:isl_union_pw_aff_alloc_same_size
Line
Count
Source
252
978
{
253
978
  return 
FN978
(UNION,alloc_same_size_on_space)(u,
FN978
(UNION,get_space)(u));
254
978
}
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
1.85k
{
272
1.85k
  S(UNION,transform_data) *data = (S(UNION,transform_data) *)user;
273
1.85k
274
1.85k
  part = data->fn(part, data->user);
275
1.85k
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
276
1.85k
  if (!data->res)
277
0
    return isl_stat_error;
278
1.85k
279
1.85k
  return isl_stat_ok;
280
1.85k
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_transform_entry
isl_aff.c:isl_union_pw_aff_transform_entry
Line
Count
Source
271
626
{
272
626
  S(UNION,transform_data) *data = (S(UNION,transform_data) *)user;
273
626
274
626
  part = data->fn(part, data->user);
275
626
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
276
626
  if (!data->res)
277
0
    return isl_stat_error;
278
626
279
626
  return isl_stat_ok;
280
626
}
isl_aff.c:isl_union_pw_multi_aff_transform_entry
Line
Count
Source
271
1.23k
{
272
1.23k
  S(UNION,transform_data) *data = (S(UNION,transform_data) *)user;
273
1.23k
274
1.23k
  part = data->fn(part, data->user);
275
1.23k
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
276
1.23k
  if (!data->res)
277
0
    return isl_stat_error;
278
1.23k
279
1.23k
  return isl_stat_ok;
280
1.23k
}
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
2.48k
{
289
2.48k
  S(UNION,transform_data) data = { fn, user };
290
2.48k
291
2.48k
  data.res = FN(UNION,alloc_same_size_on_space)(u, space);
292
2.48k
  if (
FN2.48k
(FN(UNION,foreach),PARTS)(u,2.48k
293
2.48k
          &FN(UNION,transform_entry), &data) < 0)
294
0
    
data.res = 0
FN0
(UNION,free)(data.res);
295
2.48k
  FN(UNION,free)(u);
296
2.48k
  return data.res;
297
2.48k
}
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
1.97k
{
289
1.97k
  S(UNION,transform_data) data = { fn, user };
290
1.97k
291
1.97k
  data.res = FN(UNION,alloc_same_size_on_space)(u, space);
292
1.97k
  if (
FN1.97k
(FN(UNION,foreach),PARTS)(u,1.97k
293
1.97k
          &FN(UNION,transform_entry), &data) < 0)
294
0
    
data.res = 0
FN0
(UNION,free)(data.res);
295
1.97k
  FN(UNION,free)(u);
296
1.97k
  return data.res;
297
1.97k
}
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
513
{
289
513
  S(UNION,transform_data) data = { fn, user };
290
513
291
513
  data.res = FN(UNION,alloc_same_size_on_space)(u, space);
292
513
  if (
FN513
(FN(UNION,foreach),PARTS)(u,513
293
513
          &FN(UNION,transform_entry), &data) < 0)
294
0
    
data.res = 0
FN0
(UNION,free)(data.res);
295
513
  FN(UNION,free)(u);
296
513
  return data.res;
297
513
}
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.36k
{
305
2.36k
  return 
FN2.36k
(UNION,transform_space)(u,
FN2.36k
(UNION,get_space)(u), fn, user);
306
2.36k
}
Unexecuted instantiation: isl_polynomial.c:isl_union_pw_qpolynomial_transform
isl_aff.c:isl_union_pw_multi_aff_transform
Line
Count
Source
304
1.96k
{
305
1.96k
  return 
FN1.96k
(UNION,transform_space)(u,
FN1.96k
(UNION,get_space)(u), fn, user);
306
1.96k
}
Unexecuted instantiation: isl_fold.c:isl_union_pw_qpolynomial_fold_transform
isl_aff.c:isl_union_pw_aff_transform
Line
Count
Source
304
398
{
305
398
  return 
FN398
(UNION,transform_space)(u,
FN398
(UNION,get_space)(u), fn, user);
306
398
}
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.02k
{
312
3.02k
  S(UNION,transform_data) *data = (S(UNION,transform_data) *) user;
313
3.02k
314
3.02k
  *part = data->fn(*part, data->user);
315
3.02k
  if (!*part)
316
0
    return isl_stat_error;
317
3.02k
  return isl_stat_ok;
318
3.02k
}
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.02k
{
312
3.02k
  S(UNION,transform_data) *data = (S(UNION,transform_data) *) user;
313
3.02k
314
3.02k
  *part = data->fn(*part, data->user);
315
3.02k
  if (!*part)
316
0
    return isl_stat_error;
317
3.02k
  return isl_stat_ok;
318
3.02k
}
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.48k
{
330
2.48k
  isl_bool single_ref;
331
2.48k
332
2.48k
  single_ref = FN(UNION,has_single_reference)(u);
333
2.48k
  if (single_ref < 0)
334
0
    
return 0
FN0
(UNION,free)(u);
335
2.48k
  
if (2.48k
single_ref2.48k
)
{2.20k
336
2.20k
    S(UNION,transform_data) data = { fn, user };
337
2.20k
    if (
FN2.20k
(UNION,foreach_inplace)(u,2.20k
338
2.20k
        &FN(UNION,transform_inplace_entry), &data) < 0)
339
0
      
return 0
FN0
(UNION,free)(u);
340
2.20k
    return u;
341
2.20k
  }
342
281
  
return 281
FN281
(UNION,transform)(u, fn, user);
343
2.48k
}
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.48k
{
330
2.48k
  isl_bool single_ref;
331
2.48k
332
2.48k
  single_ref = FN(UNION,has_single_reference)(u);
333
2.48k
  if (single_ref < 0)
334
0
    
return 0
FN0
(UNION,free)(u);
335
2.48k
  
if (2.48k
single_ref2.48k
)
{2.20k
336
2.20k
    S(UNION,transform_data) data = { fn, user };
337
2.20k
    if (
FN2.20k
(UNION,foreach_inplace)(u,2.20k
338
2.20k
        &FN(UNION,transform_inplace_entry), &data) < 0)
339
0
      
return 0
FN0
(UNION,free)(u);
340
2.20k
    return u;
341
2.20k
  }
342
281
  
return 281
FN281
(UNION,transform)(u, fn, user);
343
2.48k
}
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.40k
{
350
1.40k
  return part;
351
1.40k
}
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.23k
{
350
1.23k
  return part;
351
1.23k
}
isl_aff.c:isl_union_pw_aff_copy_part
Line
Count
Source
349
176
{
350
176
  return part;
351
176
}
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.07k
{
355
2.07k
  u = FN(UNION,copy)(u);
356
2.07k
  return 
FN2.07k
(UNION,transform)(u, &
FN2.07k
(UNION,copy_part), NULL);
357
2.07k
}
Unexecuted instantiation: isl_union_pw_qpolynomial_dup
isl_union_pw_aff_dup
Line
Count
Source
354
117
{
355
117
  u = FN(UNION,copy)(u);
356
117
  return 
FN117
(UNION,transform)(u, &
FN117
(UNION,copy_part), NULL);
357
117
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_dup
isl_union_pw_multi_aff_dup
Line
Count
Source
354
1.96k
{
355
1.96k
  u = FN(UNION,copy)(u);
356
1.96k
  return 
FN1.96k
(UNION,transform)(u, &
FN1.96k
(UNION,copy_part), NULL);
357
1.96k
}
358
359
__isl_give UNION *FN(UNION,cow)(__isl_take UNION *u)
360
16.5k
{
361
16.5k
  if (!u)
362
0
    return NULL;
363
16.5k
364
16.5k
  
if (16.5k
u->ref == 116.5k
)
365
14.4k
    return u;
366
2.07k
  u->ref--;
367
2.07k
  return FN(UNION,dup)(u);
368
16.5k
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_cow
isl_union_pw_aff_cow
Line
Count
Source
360
6.32k
{
361
6.32k
  if (!u)
362
0
    return NULL;
363
6.32k
364
6.32k
  
if (6.32k
u->ref == 16.32k
)
365
6.20k
    return u;
366
117
  u->ref--;
367
117
  return FN(UNION,dup)(u);
368
6.32k
}
isl_union_pw_multi_aff_cow
Line
Count
Source
360
10.2k
{
361
10.2k
  if (!u)
362
0
    return NULL;
363
10.2k
364
10.2k
  
if (10.2k
u->ref == 110.2k
)
365
8.25k
    return u;
366
1.96k
  u->ref--;
367
1.96k
  return FN(UNION,dup)(u);
368
10.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
44.1k
{
372
44.1k
  if (!u)
373
6.51k
    return NULL;
374
44.1k
375
37.6k
  
if (37.6k
--u->ref > 037.6k
)
376
23.9k
    return NULL;
377
37.6k
378
13.7k
  isl_hash_table_foreach(u->space->ctx, &u->table,
379
13.7k
        &FN(UNION,free_u_entry), NULL);
380
13.7k
  isl_hash_table_clear(&u->table);
381
13.7k
  isl_space_free(u->space);
382
13.7k
  free(u);
383
13.7k
  return NULL;
384
37.6k
}
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
14.5k
{
372
14.5k
  if (!u)
373
1
    return NULL;
374
14.5k
375
14.5k
  
if (14.5k
--u->ref > 014.5k
)
376
4.85k
    return NULL;
377
14.5k
378
9.74k
  isl_hash_table_foreach(u->space->ctx, &u->table,
379
9.74k
        &FN(UNION,free_u_entry), NULL);
380
9.74k
  isl_hash_table_clear(&u->table);
381
9.74k
  isl_space_free(u->space);
382
9.74k
  free(u);
383
9.74k
  return NULL;
384
14.5k
}
isl_union_pw_aff_free
Line
Count
Source
371
29.5k
{
372
29.5k
  if (!u)
373
6.51k
    return NULL;
374
29.5k
375
23.0k
  
if (23.0k
--u->ref > 023.0k
)
376
19.0k
    return NULL;
377
23.0k
378
3.96k
  isl_hash_table_foreach(u->space->ctx, &u->table,
379
3.96k
        &FN(UNION,free_u_entry), NULL);
380
3.96k
  isl_hash_table_clear(&u->table);
381
3.96k
  isl_space_free(u->space);
382
3.96k
  free(u);
383
3.96k
  return NULL;
384
23.0k
}
385
386
static __isl_give PART *FN(UNION,align_entry)(__isl_take PART *part, void *user)
387
163
{
388
163
  isl_reordering *exp = user;
389
163
390
163
  exp = isl_reordering_extend_space(isl_reordering_copy(exp),
391
163
            FN(PART,get_domain_space)(part));
392
163
  return FN(PART,realign_domain)(part, exp);
393
163
}
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
163
{
388
163
  isl_reordering *exp = user;
389
163
390
163
  exp = isl_reordering_extend_space(isl_reordering_copy(exp),
391
163
            FN(PART,get_domain_space)(part));
392
163
  return FN(PART,realign_domain)(part, exp);
393
163
}
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
123
{
400
123
  isl_space *space;
401
123
402
123
  if (
!u || 123
!r123
)
403
0
    goto error;
404
123
405
123
  space = isl_space_copy(r->dim);
406
123
  u = 
FN123
(UNION,transform_space)(u, space, &
FN123
(UNION,align_entry), r);
407
123
  isl_reordering_free(r);
408
123
  return u;
409
0
error:
410
0
  FN(UNION,free)(u);
411
0
  isl_reordering_free(r);
412
0
  return NULL;
413
123
}
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
115
{
400
115
  isl_space *space;
401
115
402
115
  if (
!u || 115
!r115
)
403
0
    goto error;
404
115
405
115
  space = isl_space_copy(r->dim);
406
115
  u = 
FN115
(UNION,transform_space)(u, space, &
FN115
(UNION,align_entry), r);
407
115
  isl_reordering_free(r);
408
115
  return u;
409
0
error:
410
0
  FN(UNION,free)(u);
411
0
  isl_reordering_free(r);
412
0
  return NULL;
413
115
}
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
19.1k
{
420
19.1k
  isl_bool equal_params;
421
19.1k
  isl_reordering *r;
422
19.1k
423
19.1k
  if (
!u || 19.1k
!model19.1k
)
424
0
    goto error;
425
19.1k
426
19.1k
  equal_params = isl_space_has_equal_params(u->space, model);
427
19.1k
  if (equal_params < 0)
428
0
    goto error;
429
19.1k
  
if (19.1k
equal_params19.1k
)
{19.1k
430
19.1k
    isl_space_free(model);
431
19.1k
    return u;
432
19.1k
  }
433
19.1k
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
19.1k
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_align_params
isl_union_pw_aff_align_params
Line
Count
Source
419
7.90k
{
420
7.90k
  isl_bool equal_params;
421
7.90k
  isl_reordering *r;
422
7.90k
423
7.90k
  if (
!u || 7.90k
!model7.90k
)
424
0
    goto error;
425
7.90k
426
7.90k
  equal_params = isl_space_has_equal_params(u->space, model);
427
7.90k
  if (equal_params < 0)
428
0
    goto error;
429
7.90k
  
if (7.90k
equal_params7.90k
)
{7.90k
430
7.90k
    isl_space_free(model);
431
7.90k
    return u;
432
7.90k
  }
433
7.90k
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
7.90k
}
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
)
{10
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
11.2k
{
420
11.2k
  isl_bool equal_params;
421
11.2k
  isl_reordering *r;
422
11.2k
423
11.2k
  if (
!u || 11.2k
!model11.2k
)
424
0
    goto error;
425
11.2k
426
11.2k
  equal_params = isl_space_has_equal_params(u->space, model);
427
11.2k
  if (equal_params < 0)
428
0
    goto error;
429
11.2k
  
if (11.2k
equal_params11.2k
)
{11.2k
430
11.2k
    isl_space_free(model);
431
11.2k
    return u;
432
11.2k
  }
433
11.2k
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
11.2k
}
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
423
{
450
423
  UNION **u = (UNION **)user;
451
423
452
423
  *u = FN(UNION,add_part_generic)(*u, part, 0);
453
423
454
423
  return isl_stat_ok;
455
423
}
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
221
{
450
221
  UNION **u = (UNION **)user;
451
221
452
221
  *u = FN(UNION,add_part_generic)(*u, part, 0);
453
221
454
221
  return isl_stat_ok;
455
221
}
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
201
{
450
201
  UNION **u = (UNION **)user;
451
201
452
201
  *u = FN(UNION,add_part_generic)(*u, part, 0);
453
201
454
201
  return isl_stat_ok;
455
201
}
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
347
{
470
347
  u1 = 
FN347
(UNION,align_params)(u1,
FN347
(UNION,get_space)(u2));
471
347
  u2 = 
FN347
(UNION,align_params)(u2,
FN347
(UNION,get_space)(u1));
472
347
473
347
  u1 = FN(UNION,cow)(u1);
474
347
475
347
  if (
!u1 || 347
!u2347
)
476
0
    goto error;
477
347
478
347
  
if (347
FN347
(FN(UNION,foreach),PARTS)(u2, &347
FN347
(UNION,union_add_part), &u1) < 0)
479
0
    goto error;
480
347
481
347
  
FN347
(UNION,free)(u2);347
482
347
483
347
  return u1;
484
0
error:
485
0
  FN(UNION,free)(u1);
486
0
  FN(UNION,free)(u2);
487
0
  return NULL;
488
347
}
isl_aff.c:isl_union_pw_aff_union_add_
Line
Count
Source
469
221
{
470
221
  u1 = 
FN221
(UNION,align_params)(u1,
FN221
(UNION,get_space)(u2));
471
221
  u2 = 
FN221
(UNION,align_params)(u2,
FN221
(UNION,get_space)(u1));
472
221
473
221
  u1 = FN(UNION,cow)(u1);
474
221
475
221
  if (
!u1 || 221
!u2221
)
476
0
    goto error;
477
221
478
221
  
if (221
FN221
(FN(UNION,foreach),PARTS)(u2, &221
FN221
(UNION,union_add_part), &u1) < 0)
479
0
    goto error;
480
221
481
221
  
FN221
(UNION,free)(u2);221
482
221
483
221
  return u1;
484
0
error:
485
0
  FN(UNION,free)(u1);
486
0
  FN(UNION,free)(u2);
487
0
  return NULL;
488
221
}
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);1
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
125
{
470
125
  u1 = 
FN125
(UNION,align_params)(u1,
FN125
(UNION,get_space)(u2));
471
125
  u2 = 
FN125
(UNION,align_params)(u2,
FN125
(UNION,get_space)(u1));
472
125
473
125
  u1 = FN(UNION,cow)(u1);
474
125
475
125
  if (
!u1 || 125
!u2125
)
476
0
    goto error;
477
125
478
125
  
if (125
FN125
(FN(UNION,foreach),PARTS)(u2, &125
FN125
(UNION,union_add_part), &u1) < 0)
479
0
    goto error;
480
125
481
125
  
FN125
(UNION,free)(u2);125
482
125
483
125
  return u1;
484
0
error:
485
0
  FN(UNION,free)(u1);
486
0
  FN(UNION,free)(u2);
487
0
  return NULL;
488
125
}
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
676
{
492
676
  isl_space *dim;
493
676
  UNION *u;
494
676
495
676
  if (!part)
496
0
    return NULL;
497
676
498
676
  
dim = 676
FN676
(PART,get_space)(part);
499
676
  dim = isl_space_drop_dims(dim, isl_dim_in, 0, isl_space_dim(dim, isl_dim_in));
500
676
  dim = isl_space_drop_dims(dim, isl_dim_out, 0, isl_space_dim(dim, isl_dim_out));
501
676
#ifdef HAS_TYPE
502
0
  u = FN(UNION,ZERO)(dim, part->type);
503
#else
504
676
  u = FN(UNION,ZERO)(dim);
505
#endif
506
676
  u = FN(FN(UNION,add),PARTS)(u, part);
507
676
508
676
  return u;
509
676
}
isl_union_pw_aff_from_pw_aff
Line
Count
Source
491
673
{
492
673
  isl_space *dim;
493
673
  UNION *u;
494
673
495
673
  if (!part)
496
0
    return NULL;
497
673
498
673
  
dim = 673
FN673
(PART,get_space)(part);
499
673
  dim = isl_space_drop_dims(dim, isl_dim_in, 0, isl_space_dim(dim, isl_dim_in));
500
673
  dim = isl_space_drop_dims(dim, isl_dim_out, 0, isl_space_dim(dim, isl_dim_out));
501
673
#ifdef HAS_TYPE
502
  u = FN(UNION,ZERO)(dim, part->type);
503
#else
504
673
  u = FN(UNION,ZERO)(dim);
505
673
#endif
506
673
  u = FN(FN(UNION,add),PARTS)(u, part);
507
673
508
673
  return u;
509
673
}
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
3
#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
516
{
523
516
  S(UNION,match_bin_data) *data = user;
524
516
  struct isl_hash_table_entry *entry2;
525
516
  isl_space *space;
526
516
  PART *part2;
527
516
528
516
  space = FN(PART,get_space)(part);
529
516
  entry2 = FN(UNION,find_part_entry)(data->u2, space, 0);
530
516
  isl_space_free(space);
531
516
  if (!entry2)
532
0
    goto error;
533
516
  
if (516
entry2 == isl_hash_table_entry_none516
)
{1
534
1
    FN(PART,free)(part);
535
1
    return isl_stat_ok;
536
1
  }
537
516
538
515
  part2 = entry2->data;
539
515
  if (!isl_space_tuple_is_equal(part->dim, isl_dim_out,
540
515
          part2->dim, isl_dim_out))
541
0
    isl_die(FN(UNION,get_ctx)(data->u2), isl_error_invalid,
542
515
      "entries should have the same range space",
543
515
      goto error);
544
515
545
515
  
part = data->fn(part, 515
FN515
(PART, copy)(entry2->data));
546
515
547
515
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
548
515
  if (!data->res)
549
0
    return isl_stat_error;
550
515
551
515
  return isl_stat_ok;
552
0
error:
553
0
  FN(PART,free)(part);
554
0
  return isl_stat_error;
555
515
}
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
)
{1
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
1
}
isl_aff.c:isl_union_pw_aff_match_bin_entry
Line
Count
Source
522
514
{
523
514
  S(UNION,match_bin_data) *data = user;
524
514
  struct isl_hash_table_entry *entry2;
525
514
  isl_space *space;
526
514
  PART *part2;
527
514
528
514
  space = FN(PART,get_space)(part);
529
514
  entry2 = FN(UNION,find_part_entry)(data->u2, space, 0);
530
514
  isl_space_free(space);
531
514
  if (!entry2)
532
0
    goto error;
533
514
  
if (514
entry2 == isl_hash_table_entry_none514
)
{0
534
0
    FN(PART,free)(part);
535
0
    return isl_stat_ok;
536
0
  }
537
514
538
514
  part2 = entry2->data;
539
514
  if (!isl_space_tuple_is_equal(part->dim, isl_dim_out,
540
514
          part2->dim, isl_dim_out))
541
0
    isl_die(FN(UNION,get_ctx)(data->u2), isl_error_invalid,
542
514
      "entries should have the same range space",
543
514
      goto error);
544
514
545
514
  
part = data->fn(part, 514
FN514
(PART, copy)(entry2->data));
546
514
547
514
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
548
514
  if (!data->res)
549
0
    return isl_stat_error;
550
514
551
514
  return isl_stat_ok;
552
0
error:
553
0
  FN(PART,free)(part);
554
0
  return isl_stat_error;
555
514
}
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
353
{
571
353
  S(UNION,match_bin_data) data = { NULL, NULL, fn };
572
353
573
353
  u1 = 
FN353
(UNION,align_params)(u1,
FN353
(UNION,get_space)(u2));
574
353
  u2 = 
FN353
(UNION,align_params)(u2,
FN353
(UNION,get_space)(u1));
575
353
576
353
  if (
!u1 || 353
!u2353
)
577
0
    goto error;
578
353
579
353
  data.u2 = u2;
580
353
  data.res = FN(UNION,alloc_same_size)(u1);
581
353
  if (
FN353
(FN(UNION,foreach),PARTS)(u1,353
582
353
            &FN(UNION,match_bin_entry), &data) < 0)
583
0
    goto error;
584
353
585
353
  
FN353
(UNION,free)(u1);353
586
353
  FN(UNION,free)(u2);
587
353
  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
353
}
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
352
{
571
352
  S(UNION,match_bin_data) data = { NULL, NULL, fn };
572
352
573
352
  u1 = 
FN352
(UNION,align_params)(u1,
FN352
(UNION,get_space)(u2));
574
352
  u2 = 
FN352
(UNION,align_params)(u2,
FN352
(UNION,get_space)(u1));
575
352
576
352
  if (
!u1 || 352
!u2352
)
577
0
    goto error;
578
352
579
352
  data.u2 = u2;
580
352
  data.res = FN(UNION,alloc_same_size)(u1);
581
352
  if (
FN352
(FN(UNION,foreach),PARTS)(u1,352
582
352
            &FN(UNION,match_bin_entry), &data) < 0)
583
0
    goto error;
584
352
585
352
  
FN352
(UNION,free)(u1);352
586
352
  FN(UNION,free)(u2);
587
352
  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
352
}
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,1
582
1
            &FN(UNION,match_bin_entry), &data) < 0)
583
0
    goto error;
584
1
585
1
  
FN1
(UNION,free)(u1);1
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
121
{
603
121
#if DEFAULT_IS_ZERO
604
1
  return FN(UNION,union_add_)(u1, u2);
605
#else
606
120
  return 
FN120
(UNION,match_bin_op)(u1, u2, &
FN120
(PART,add));
607
#endif
608
121
}
isl_union_pw_aff_add
Line
Count
Source
602
119
{
603
119
#if DEFAULT_IS_ZERO
604
  return FN(UNION,union_add_)(u1, u2);
605
#else
606
119
  return 
FN119
(UNION,match_bin_op)(u1, u2, &
FN119
(PART,add));
607
119
#endif
608
119
}
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
1
#else
606
  return FN(UNION,match_bin_op)(u1, u2, &FN(PART,add));
607
#endif
608
1
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_add
isl_union_pw_multi_aff_add
Line
Count
Source
602
1
{
603
1
#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
233
{
615
233
  return 
FN233
(UNION,match_bin_op)(u1, u2, &
FN233
(PART,sub));
616
233
}
isl_union_pw_aff_sub
Line
Count
Source
614
233
{
615
233
  return 
FN233
(UNION,match_bin_op)(u1, u2, &
FN233
(PART,sub));
616
233
}
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
226
{
681
226
  isl_set *set = (isl_set *)entry;
682
226
  isl_space *dim = (isl_space *)val;
683
226
684
226
  return isl_space_is_equal(set->dim, dim);
685
226
}
isl_aff.c:isl_union_pw_multi_aff_set_has_dim
Line
Count
Source
680
26
{
681
26
  isl_set *set = (isl_set *)entry;
682
26
  isl_space *dim = (isl_space *)val;
683
26
684
26
  return isl_space_is_equal(set->dim, dim);
685
26
}
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
199
{
681
199
  isl_set *set = (isl_set *)entry;
682
199
  isl_space *dim = (isl_space *)val;
683
199
684
199
  return isl_space_is_equal(set->dim, dim);
685
199
}
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
355
{
693
355
  S(UNION,match_domain_data) *data = user;
694
355
  uint32_t hash;
695
355
  struct isl_hash_table_entry *entry2;
696
355
  isl_space *space;
697
355
698
355
  space = FN(PART,get_domain_space)(part);
699
355
  hash = isl_space_get_hash(space);
700
355
  entry2 = isl_hash_table_find(data->uset->dim->ctx, &data->uset->table,
701
355
             hash, &FN(UNION,set_has_dim), space, 0);
702
355
  isl_space_free(space);
703
355
  if (
!entry2355
)
{129
704
129
    FN(PART,free)(part);
705
129
    return isl_stat_ok;
706
129
  }
707
355
708
226
  part = data->fn(part, isl_set_copy(entry2->data));
709
226
710
226
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
711
226
  if (!data->res)
712
0
    return isl_stat_error;
713
226
714
226
  return isl_stat_ok;
715
226
}
isl_aff.c:isl_union_pw_aff_match_domain_entry
Line
Count
Source
692
326
{
693
326
  S(UNION,match_domain_data) *data = user;
694
326
  uint32_t hash;
695
326
  struct isl_hash_table_entry *entry2;
696
326
  isl_space *space;
697
326
698
326
  space = FN(PART,get_domain_space)(part);
699
326
  hash = isl_space_get_hash(space);
700
326
  entry2 = isl_hash_table_find(data->uset->dim->ctx, &data->uset->table,
701
326
             hash, &FN(UNION,set_has_dim), space, 0);
702
326
  isl_space_free(space);
703
326
  if (
!entry2326
)
{127
704
127
    FN(PART,free)(part);
705
127
    return isl_stat_ok;
706
127
  }
707
326
708
199
  part = data->fn(part, isl_set_copy(entry2->data));
709
199
710
199
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
711
199
  if (!data->res)
712
0
    return isl_stat_error;
713
199
714
199
  return isl_stat_ok;
715
199
}
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
)
{0
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
28
{
693
28
  S(UNION,match_domain_data) *data = user;
694
28
  uint32_t hash;
695
28
  struct isl_hash_table_entry *entry2;
696
28
  isl_space *space;
697
28
698
28
  space = FN(PART,get_domain_space)(part);
699
28
  hash = isl_space_get_hash(space);
700
28
  entry2 = isl_hash_table_find(data->uset->dim->ctx, &data->uset->table,
701
28
             hash, &FN(UNION,set_has_dim), space, 0);
702
28
  isl_space_free(space);
703
28
  if (
!entry228
)
{2
704
2
    FN(PART,free)(part);
705
2
    return isl_stat_ok;
706
2
  }
707
28
708
26
  part = data->fn(part, isl_set_copy(entry2->data));
709
26
710
26
  data->res = FN(FN(UNION,add),PARTS)(data->res, part);
711
26
  if (!data->res)
712
0
    return isl_stat_error;
713
26
714
26
  return isl_stat_ok;
715
26
}
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
201
{
725
201
  S(UNION,match_domain_data) data = { NULL, NULL, fn };
726
201
727
201
  u = FN(UNION,align_params)(u, isl_union_set_get_space(uset));
728
201
  uset = isl_union_set_align_params(uset, FN(UNION,get_space)(u));
729
201
730
201
  if (
!u || 201
!uset201
)
731
0
    goto error;
732
201
733
201
  data.uset = uset;
734
201
  data.res = FN(UNION,alloc_same_size)(u);
735
201
  if (
FN201
(FN(UNION,foreach),PARTS)(u,201
736
201
           &FN(UNION,match_domain_entry), &data) < 0)
737
0
    goto error;
738
201
739
201
  
FN201
(UNION,free)(u);201
740
201
  isl_union_set_free(uset);
741
201
  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
201
}
isl_aff.c:isl_union_pw_aff_match_domain_op
Line
Count
Source
724
182
{
725
182
  S(UNION,match_domain_data) data = { NULL, NULL, fn };
726
182
727
182
  u = FN(UNION,align_params)(u, isl_union_set_get_space(uset));
728
182
  uset = isl_union_set_align_params(uset, FN(UNION,get_space)(u));
729
182
730
182
  if (
!u || 182
!uset182
)
731
0
    goto error;
732
182
733
182
  data.uset = uset;
734
182
  data.res = FN(UNION,alloc_same_size)(u);
735
182
  if (
FN182
(FN(UNION,foreach),PARTS)(u,182
736
182
           &FN(UNION,match_domain_entry), &data) < 0)
737
0
    goto error;
738
182
739
182
  
FN182
(UNION,free)(u);182
740
182
  isl_union_set_free(uset);
741
182
  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
182
}
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,1
736
1
           &FN(UNION,match_domain_entry), &data) < 0)
737
0
    goto error;
738
1
739
1
  
FN1
(UNION,free)(u);1
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
18
{
725
18
  S(UNION,match_domain_data) data = { NULL, NULL, fn };
726
18
727
18
  u = FN(UNION,align_params)(u, isl_union_set_get_space(uset));
728
18
  uset = isl_union_set_align_params(uset, FN(UNION,get_space)(u));
729
18
730
18
  if (
!u || 18
!uset18
)
731
0
    goto error;
732
18
733
18
  data.uset = uset;
734
18
  data.res = FN(UNION,alloc_same_size)(u);
735
18
  if (
FN18
(FN(UNION,foreach),PARTS)(u,18
736
18
           &FN(UNION,match_domain_entry), &data) < 0)
737
0
    goto error;
738
18
739
18
  
FN18
(UNION,free)(u);18
740
18
  isl_union_set_free(uset);
741
18
  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
18
}
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
23
{
756
23
  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
23
  
return 23
FN23
(UNION,match_domain_op)(u, uset, &
FN23
(PW,intersect_domain));
760
23
}
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
17
{
756
17
  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
17
  
return 17
FN17
(UNION,match_domain_op)(u, uset, &
FN17
(PW,intersect_domain));
760
17
}
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
178
{
791
178
  if (isl_union_set_is_params(uset))
792
0
    
return 0
FN0
(UNION,gist_params)(u, isl_set_from_union_set(uset));
793
178
  
return 178
FN178
(UNION,match_domain_op)(u, uset, &
FN178
(PW,gist));
794
178
}
Unexecuted instantiation: isl_union_pw_qpolynomial_fold_gist
isl_union_pw_aff_gist
Line
Count
Source
790
177
{
791
177
  if (isl_union_set_is_params(uset))
792
0
    
return 0
FN0
(UNION,gist_params)(u, isl_set_from_union_set(uset));
793
177
  
return 177
FN177
(UNION,match_domain_op)(u, uset, &
FN177
(PW,gist));
794
177
}
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);0
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
7.96k
{
828
7.96k
  isl_union_set **uset = (isl_union_set **)user;
829
7.96k
830
7.96k
  *uset = isl_union_set_add_set(*uset, FN(PART,domain)(part));
831
7.96k
832
7.96k
  return isl_stat_ok;
833
7.96k
}
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
7.96k
{
828
7.96k
  isl_union_set **uset = (isl_union_set **)user;
829
7.96k
830
7.96k
  *uset = isl_union_set_add_set(*uset, FN(PART,domain)(part));
831
7.96k
832
7.96k
  return isl_stat_ok;
833
7.96k
}
834
835
__isl_give isl_union_set *FN(UNION,domain)(__isl_take UNION *u)
836
5.30k
{
837
5.30k
  isl_union_set *uset;
838
5.30k
839
5.30k
  uset = isl_union_set_empty(FN(UNION,get_space)(u));
840
5.30k
  if (
FN5.30k
(FN(UNION,foreach),PARTS)(u, &5.30k
FN5.30k
(UNION,domain_entry), &uset) < 0)
841
0
    goto error;
842
5.30k
843
5.30k
  
FN5.30k
(UNION,free)(u);5.30k
844
5.30k
  
845
5.30k
  return uset;
846
0
error:
847
0
  isl_union_set_free(uset);
848
0
  FN(UNION,free)(u);
849
0
  return NULL;
850
5.30k
}
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);1
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);5
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
5.29k
{
837
5.29k
  isl_union_set *uset;
838
5.29k
839
5.29k
  uset = isl_union_set_empty(FN(UNION,get_space)(u));
840
5.29k
  if (
FN5.29k
(FN(UNION,foreach),PARTS)(u, &5.29k
FN5.29k
(UNION,domain_entry), &uset) < 0)
841
0
    goto error;
842
5.29k
843
5.29k
  
FN5.29k
(UNION,free)(u);5.29k
844
5.29k
  
845
5.29k
  return uset;
846
0
error:
847
0
  isl_union_set_free(uset);
848
0
  FN(UNION,free)(u);
849
0
  return NULL;
850
5.29k
}
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))
{0
887
0
    UNION *zero;
888
0
    isl_space *dim = FN(UNION,get_space)(u);
889
0
#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
137
{
910
137
  isl_val *v = user;
911
137
912
137
  return FN(PART,scale_val)(part, isl_val_copy(v));
913
137
}
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
137
{
910
137
  isl_val *v = user;
911
137
912
137
  return FN(PART,scale_val)(part, isl_val_copy(v));
913
137
}
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
149
{
920
149
  if (
!u || 149
!v149
)
921
0
    goto error;
922
149
  
if (149
isl_val_is_one(v)149
)
{15
923
15
    isl_val_free(v);
924
15
    return u;
925
15
  }
926
149
927
134
  
if (134
DEFAULT_IS_ZERO134
&& 134
u0
&&
isl_val_is_zero(v)0
)
{0
928
0
    UNION *zero;
929
0
    isl_space *space = FN(UNION,get_space)(u);
930
0
#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
134
940
134
  
if (134
!isl_val_is_rat(v)134
)
941
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
942
134
      "expecting rational factor", goto error);
943
134
944
134
  
u = 134
FN134
(UNION,transform_inplace)(u, &
FN134
(UNION,scale_val_entry), v);
945
134
  if (isl_val_is_neg(v))
946
0
    
u = 0
FN0
(UNION,negate_type)(u);
947
134
948
134
  isl_val_free(v);
949
134
  return u;
950
0
error:
951
0
  isl_val_free(v);
952
0
  FN(UNION,free)(u);
953
0
  return NULL;
954
134
}
Unexecuted instantiation: isl_union_pw_qpolynomial_scale_val
isl_union_pw_aff_scale_val
Line
Count
Source
919
149
{
920
149
  if (
!u || 149
!v149
)
921
0
    goto error;
922
149
  
if (149
isl_val_is_one(v)149
)
{15
923
15
    isl_val_free(v);
924
15
    return u;
925
15
  }
926
149
927
134
  
if (134
DEFAULT_IS_ZERO134
&& 134
u0
&&
isl_val_is_zero(v)0
)
{0
928
0
    UNION *zero;
929
0
    isl_space *space = FN(UNION,get_space)(u);
930
0
#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
134
940
134
  
if (134
!isl_val_is_rat(v)134
)
941
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
942
134
      "expecting rational factor", goto error);
943
134
944
134
  
u = 134
FN134
(UNION,transform_inplace)(u, &
FN134
(UNION,scale_val_entry), v);
945
134
  if (isl_val_is_neg(v))
946
0
    
u = 0
FN0
(UNION,negate_type)(u);
947
134
948
134
  isl_val_free(v);
949
134
  return u;
950
0
error:
951
0
  isl_val_free(v);
952
0
  FN(UNION,free)(u);
953
0
  return NULL;
954
134
}
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
139
{
961
139
  isl_val *v = user;
962
139
963
139
  return FN(PART,scale_down_val)(part, isl_val_copy(v));
964
139
}
isl_aff.c:isl_union_pw_aff_scale_down_val_entry
Line
Count
Source
960
139
{
961
139
  isl_val *v = user;
962
139
963
139
  return FN(PART,scale_down_val)(part, isl_val_copy(v));
964
139
}
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
151
{
971
151
  if (
!u || 151
!v151
)
972
0
    goto error;
973
151
  
if (151
isl_val_is_one(v)151
)
{15
974
15
    isl_val_free(v);
975
15
    return u;
976
15
  }
977
151
978
136
  
if (136
!isl_val_is_rat(v)136
)
979
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
980
136
      "expecting rational factor", goto error);
981
136
  
if (136
isl_val_is_zero(v)136
)
982
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
983
136
      "cannot scale down by zero", goto error);
984
136
985
136
  
u = 136
FN136
(UNION,transform_inplace)(u, &
FN136
(UNION,scale_down_val_entry), v);
986
136
  if (isl_val_is_neg(v))
987
0
    
u = 0
FN0
(UNION,negate_type)(u);
988
136
989
136
  isl_val_free(v);
990
136
  return u;
991
0
error:
992
0
  isl_val_free(v);
993
0
  FN(UNION,free)(u);
994
0
  return NULL;
995
136
}
isl_union_pw_aff_scale_down_val
Line
Count
Source
970
151
{
971
151
  if (
!u || 151
!v151
)
972
0
    goto error;
973
151
  
if (151
isl_val_is_one(v)151
)
{15
974
15
    isl_val_free(v);
975
15
    return u;
976
15
  }
977
151
978
136
  
if (136
!isl_val_is_rat(v)136
)
979
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
980
136
      "expecting rational factor", goto error);
981
136
  
if (136
isl_val_is_zero(v)136
)
982
0
    isl_die(isl_val_get_ctx(v), isl_error_invalid,
983
136
      "cannot scale down by zero", goto error);
984
136
985
136
  
u = 136
FN136
(UNION,transform_inplace)(u, &
FN136
(UNION,scale_down_val_entry), v);
986
136
  if (isl_val_is_neg(v))
987
0
    
u = 0
FN0
(UNION,negate_type)(u);
988
136
989
136
  isl_val_free(v);
990
136
  return u;
991
0
error:
992
0
  isl_val_free(v);
993
0
  FN(UNION,free)(u);
994
0
  return NULL;
995
136
}
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
)
{0
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
)
{0
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
)
{0
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
)
{0
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,26
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);26
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,16
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);16
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,9
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);9
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,1
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);1
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,0
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