Coverage Report

Created: 2017-08-18 19:41

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/polly/lib/External/isl/isl_obj.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2010      INRIA Saclay
3
 * Copyright 2014      Ecole Normale Superieure
4
 * Copyright 2014      INRIA Rocquencourt
5
 *
6
 * Use of this software is governed by the MIT license
7
 *
8
 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
9
 * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
10
 * 91893 Orsay, France 
11
 * and Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France
12
 * and Inria Paris - Rocquencourt, Domaine de Voluceau - Rocquencourt,
13
 * B.P. 105 - 78153 Le Chesnay, France
14
 */
15
16
#include <isl/aff.h>
17
#include <isl/set.h>
18
#include <isl/map.h>
19
#include <isl/union_set.h>
20
#include <isl/union_map.h>
21
#include <isl/polynomial.h>
22
#include <isl/schedule.h>
23
#include <isl/obj.h>
24
25
static void *isl_obj_val_copy(void *v)
26
0
{
27
0
  return isl_val_copy((isl_val *)v);
28
0
}
29
30
static void isl_obj_val_free(void *v)
31
0
{
32
0
  isl_val_free((isl_val *)v);
33
0
}
34
35
static __isl_give isl_printer *isl_obj_val_print(__isl_take isl_printer *p,
36
  void *v)
37
0
{
38
0
  return isl_printer_print_val(p, (isl_val *)v);
39
0
}
40
41
static void *isl_obj_val_add(void *v1, void *v2)
42
0
{
43
0
  return isl_val_add((isl_val *) v1, (isl_val *) v2);
44
0
}
45
46
struct isl_obj_vtable isl_obj_val_vtable = {
47
  isl_obj_val_copy,
48
  isl_obj_val_add,
49
  isl_obj_val_print,
50
  isl_obj_val_free
51
};
52
53
static void *isl_obj_map_copy(void *v)
54
0
{
55
0
  return isl_map_copy((struct isl_map *)v);
56
0
}
57
58
static void isl_obj_map_free(void *v)
59
4
{
60
4
  isl_map_free((struct isl_map *)v);
61
4
}
62
63
static __isl_give isl_printer *isl_obj_map_print(__isl_take isl_printer *p,
64
  void *v)
65
0
{
66
0
  return isl_printer_print_map(p, (struct isl_map *)v);
67
0
}
68
69
static void *isl_obj_map_add(void *v1, void *v2)
70
93
{
71
93
  return isl_map_union((struct isl_map *)v1, (struct isl_map *)v2);
72
93
}
73
74
struct isl_obj_vtable isl_obj_map_vtable = {
75
  isl_obj_map_copy,
76
  isl_obj_map_add,
77
  isl_obj_map_print,
78
  isl_obj_map_free
79
};
80
81
static void *isl_obj_union_map_copy(void *v)
82
0
{
83
0
  return isl_union_map_copy((isl_union_map *)v);
84
0
}
85
86
static void isl_obj_union_map_free(void *v)
87
0
{
88
0
  isl_union_map_free((isl_union_map *)v);
89
0
}
90
91
static __isl_give isl_printer *isl_obj_union_map_print(__isl_take isl_printer *p,
92
  void *v)
93
0
{
94
0
  return isl_printer_print_union_map(p, (isl_union_map *)v);
95
0
}
96
97
static void *isl_obj_union_map_add(void *v1, void *v2)
98
310
{
99
310
  return isl_union_map_union((isl_union_map *)v1, (isl_union_map *)v2);
100
310
}
101
102
struct isl_obj_vtable isl_obj_union_map_vtable = {
103
  isl_obj_union_map_copy,
104
  isl_obj_union_map_add,
105
  isl_obj_union_map_print,
106
  isl_obj_union_map_free
107
};
108
109
static void *isl_obj_set_copy(void *v)
110
0
{
111
0
  return isl_set_copy((struct isl_set *)v);
112
0
}
113
114
static void isl_obj_set_free(void *v)
115
15
{
116
15
  isl_set_free((struct isl_set *)v);
117
15
}
118
119
static __isl_give isl_printer *isl_obj_set_print(__isl_take isl_printer *p,
120
  void *v)
121
0
{
122
0
  return isl_printer_print_set(p, (struct isl_set *)v);
123
0
}
124
125
static void *isl_obj_set_add(void *v1, void *v2)
126
138
{
127
138
  return isl_set_union((struct isl_set *)v1, (struct isl_set *)v2);
128
138
}
129
130
struct isl_obj_vtable isl_obj_set_vtable = {
131
  isl_obj_set_copy,
132
  isl_obj_set_add,
133
  isl_obj_set_print,
134
  isl_obj_set_free
135
};
136
137
static void *isl_obj_union_set_copy(void *v)
138
0
{
139
0
  return isl_union_set_copy((isl_union_set *)v);
140
0
}
141
142
static void isl_obj_union_set_free(void *v)
143
0
{
144
0
  isl_union_set_free((isl_union_set *)v);
145
0
}
146
147
static __isl_give isl_printer *isl_obj_union_set_print(__isl_take isl_printer *p,
148
  void *v)
149
0
{
150
0
  return isl_printer_print_union_set(p, (isl_union_set *)v);
151
0
}
152
153
static void *isl_obj_union_set_add(void *v1, void *v2)
154
80
{
155
80
  return isl_union_set_union((isl_union_set *)v1, (isl_union_set *)v2);
156
80
}
157
158
struct isl_obj_vtable isl_obj_union_set_vtable = {
159
  isl_obj_union_set_copy,
160
  isl_obj_union_set_add,
161
  isl_obj_union_set_print,
162
  isl_obj_union_set_free
163
};
164
165
static void *isl_obj_pw_multi_aff_copy(void *v)
166
0
{
167
0
  return isl_pw_multi_aff_copy((isl_pw_multi_aff *) v);
168
0
}
169
170
static void isl_obj_pw_multi_aff_free(void *v)
171
0
{
172
0
  isl_pw_multi_aff_free((isl_pw_multi_aff *) v);
173
0
}
174
175
static __isl_give isl_printer *isl_obj_pw_multi_aff_print(
176
  __isl_take isl_printer *p, void *v)
177
0
{
178
0
  return isl_printer_print_pw_multi_aff(p, (isl_pw_multi_aff *) v);
179
0
}
180
181
static void *isl_obj_pw_multi_aff_add(void *v1, void *v2)
182
0
{
183
0
  return isl_pw_multi_aff_add((isl_pw_multi_aff *) v1,
184
0
            (isl_pw_multi_aff *) v2);
185
0
}
186
187
struct isl_obj_vtable isl_obj_pw_multi_aff_vtable = {
188
  isl_obj_pw_multi_aff_copy,
189
  isl_obj_pw_multi_aff_add,
190
  isl_obj_pw_multi_aff_print,
191
  isl_obj_pw_multi_aff_free
192
};
193
194
static void *isl_obj_none_copy(void *v)
195
0
{
196
0
  return v;
197
0
}
198
199
static void isl_obj_none_free(void *v)
200
0
{
201
0
}
202
203
static __isl_give isl_printer *isl_obj_none_print(__isl_take isl_printer *p,
204
  void *v)
205
0
{
206
0
  return p;
207
0
}
208
209
static void *isl_obj_none_add(void *v1, void *v2)
210
0
{
211
0
  return NULL;
212
0
}
213
214
struct isl_obj_vtable isl_obj_none_vtable = {
215
  isl_obj_none_copy,
216
  isl_obj_none_add,
217
  isl_obj_none_print,
218
  isl_obj_none_free
219
};
220
221
static void *isl_obj_pw_qp_copy(void *v)
222
0
{
223
0
  return isl_pw_qpolynomial_copy((struct isl_pw_qpolynomial *)v);
224
0
}
225
226
static void isl_obj_pw_qp_free(void *v)
227
0
{
228
0
  isl_pw_qpolynomial_free((struct isl_pw_qpolynomial *)v);
229
0
}
230
231
static __isl_give isl_printer *isl_obj_pw_qp_print(__isl_take isl_printer *p,
232
  void *v)
233
0
{
234
0
  return isl_printer_print_pw_qpolynomial(p,
235
0
            (struct isl_pw_qpolynomial *)v);
236
0
}
237
238
static void *isl_obj_pw_qp_add(void *v1, void *v2)
239
3
{
240
3
  return isl_pw_qpolynomial_add((struct isl_pw_qpolynomial *)v1,
241
3
          (struct isl_pw_qpolynomial *)v2);
242
3
}
243
244
struct isl_obj_vtable isl_obj_pw_qpolynomial_vtable = {
245
  isl_obj_pw_qp_copy,
246
  isl_obj_pw_qp_add,
247
  isl_obj_pw_qp_print,
248
  isl_obj_pw_qp_free
249
};
250
251
static void *isl_obj_union_pw_qp_copy(void *v)
252
0
{
253
0
  return isl_union_pw_qpolynomial_copy((struct isl_union_pw_qpolynomial *)v);
254
0
}
255
256
static void isl_obj_union_pw_qp_free(void *v)
257
0
{
258
0
  isl_union_pw_qpolynomial_free((struct isl_union_pw_qpolynomial *)v);
259
0
}
260
261
static __isl_give isl_printer *isl_obj_union_pw_qp_print(
262
  __isl_take isl_printer *p, void *v)
263
0
{
264
0
  return isl_printer_print_union_pw_qpolynomial(p,
265
0
          (struct isl_union_pw_qpolynomial *)v);
266
0
}
267
268
static void *isl_obj_union_pw_qp_add(void *v1, void *v2)
269
1
{
270
1
  return isl_union_pw_qpolynomial_add(
271
1
          (struct isl_union_pw_qpolynomial *)v1,
272
1
          (struct isl_union_pw_qpolynomial *)v2);
273
1
}
274
275
struct isl_obj_vtable isl_obj_union_pw_qpolynomial_vtable = {
276
  isl_obj_union_pw_qp_copy,
277
  isl_obj_union_pw_qp_add,
278
  isl_obj_union_pw_qp_print,
279
  isl_obj_union_pw_qp_free
280
};
281
282
static void *isl_obj_pw_qpf_copy(void *v)
283
0
{
284
0
  return isl_pw_qpolynomial_fold_copy((struct isl_pw_qpolynomial_fold *)v);
285
0
}
286
287
static void isl_obj_pw_qpf_free(void *v)
288
0
{
289
0
  isl_pw_qpolynomial_fold_free((struct isl_pw_qpolynomial_fold *)v);
290
0
}
291
292
static __isl_give isl_printer *isl_obj_pw_qpf_print(__isl_take isl_printer *p,
293
  void *v)
294
0
{
295
0
  return isl_printer_print_pw_qpolynomial_fold(p,
296
0
          (struct isl_pw_qpolynomial_fold *)v);
297
0
}
298
299
static void *isl_obj_pw_qpf_add(void *v1, void *v2)
300
0
{
301
0
  return isl_pw_qpolynomial_fold_fold((struct isl_pw_qpolynomial_fold *)v1,
302
0
              (struct isl_pw_qpolynomial_fold *)v2);
303
0
}
304
305
struct isl_obj_vtable isl_obj_pw_qpolynomial_fold_vtable = {
306
  isl_obj_pw_qpf_copy,
307
  isl_obj_pw_qpf_add,
308
  isl_obj_pw_qpf_print,
309
  isl_obj_pw_qpf_free
310
};
311
312
static void *isl_obj_union_pw_qpf_copy(void *v)
313
0
{
314
0
  return isl_union_pw_qpolynomial_fold_copy((struct isl_union_pw_qpolynomial_fold *)v);
315
0
}
316
317
static void isl_obj_union_pw_qpf_free(void *v)
318
0
{
319
0
  isl_union_pw_qpolynomial_fold_free((struct isl_union_pw_qpolynomial_fold *)v);
320
0
}
321
322
static __isl_give isl_printer *isl_obj_union_pw_qpf_print(
323
  __isl_take isl_printer *p, void *v)
324
0
{
325
0
  return isl_printer_print_union_pw_qpolynomial_fold(p,
326
0
            (struct isl_union_pw_qpolynomial_fold *)v);
327
0
}
328
329
static void *isl_obj_union_pw_qpf_add(void *v1, void *v2)
330
0
{
331
0
  return isl_union_pw_qpolynomial_fold_fold(
332
0
            (struct isl_union_pw_qpolynomial_fold *)v1,
333
0
            (struct isl_union_pw_qpolynomial_fold *)v2);
334
0
}
335
336
struct isl_obj_vtable isl_obj_union_pw_qpolynomial_fold_vtable = {
337
  isl_obj_union_pw_qpf_copy,
338
  isl_obj_union_pw_qpf_add,
339
  isl_obj_union_pw_qpf_print,
340
  isl_obj_union_pw_qpf_free
341
};
342
343
static void *isl_obj_schedule_copy(void *v)
344
0
{
345
0
  return isl_schedule_copy((isl_schedule *) v);
346
0
}
347
348
static void isl_obj_schedule_free(void *v)
349
0
{
350
0
  isl_schedule_free((isl_schedule *) v);
351
0
}
352
353
static __isl_give isl_printer *isl_obj_schedule_print(
354
  __isl_take isl_printer *p, void *v)
355
0
{
356
0
  return isl_printer_print_schedule(p, (isl_schedule *) v);
357
0
}
358
359
struct isl_obj_vtable isl_obj_schedule_vtable = {
360
  isl_obj_schedule_copy,
361
  NULL,
362
  isl_obj_schedule_print,
363
  isl_obj_schedule_free
364
};