Polly 20.0.0git
isl_obj.c
Go to the documentation of this file.
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/val.h>
17#include <isl/aff.h>
18#include <isl/set.h>
19#include <isl/map.h>
20#include <isl/union_set.h>
21#include <isl/union_map.h>
22#include <isl/polynomial.h>
23#include <isl/schedule.h>
24#include <isl/obj.h>
25
26static void *isl_obj_val_copy(void *v)
27{
28 return isl_val_copy((isl_val *)v);
29}
30
31static void isl_obj_val_free(void *v)
32{
34}
35
37 void *v)
38{
39 return isl_printer_print_val(p, (isl_val *)v);
40}
41
42static void *isl_obj_val_add(void *v1, void *v2)
43{
44 return isl_val_add((isl_val *) v1, (isl_val *) v2);
45}
46
52};
53
54static void *isl_obj_map_copy(void *v)
55{
56 return isl_map_copy((struct isl_map *)v);
57}
58
59static void isl_obj_map_free(void *v)
60{
61 isl_map_free((struct isl_map *)v);
62}
63
65 void *v)
66{
67 return isl_printer_print_map(p, (struct isl_map *)v);
68}
69
70static void *isl_obj_map_add(void *v1, void *v2)
71{
72 return isl_map_union((struct isl_map *)v1, (struct isl_map *)v2);
73}
74
80};
81
82static void *isl_obj_union_map_copy(void *v)
83{
85}
86
87static void isl_obj_union_map_free(void *v)
88{
90}
91
93 void *v)
94{
96}
97
98static void *isl_obj_union_map_add(void *v1, void *v2)
99{
101}
102
108};
109
110static void *isl_obj_set_copy(void *v)
111{
112 return isl_set_copy((struct isl_set *)v);
113}
114
115static void isl_obj_set_free(void *v)
116{
117 isl_set_free((struct isl_set *)v);
118}
119
121 void *v)
122{
123 return isl_printer_print_set(p, (struct isl_set *)v);
124}
125
126static void *isl_obj_set_add(void *v1, void *v2)
127{
128 return isl_set_union((struct isl_set *)v1, (struct isl_set *)v2);
129}
130
136};
137
138static void *isl_obj_union_set_copy(void *v)
139{
141}
142
143static void isl_obj_union_set_free(void *v)
144{
146}
147
149 void *v)
150{
152}
153
154static void *isl_obj_union_set_add(void *v1, void *v2)
155{
157}
158
164};
165
166static void *isl_obj_pw_multi_aff_copy(void *v)
167{
169}
170
171static void isl_obj_pw_multi_aff_free(void *v)
172{
174}
175
177 __isl_take isl_printer *p, void *v)
178{
180}
181
182static void *isl_obj_pw_multi_aff_add(void *v1, void *v2)
183{
185 (isl_pw_multi_aff *) v2);
186}
187
193};
194
195static void *isl_obj_none_copy(void *v)
196{
197 return v;
198}
199
200static void isl_obj_none_free(void *v)
201{
202}
203
205 void *v)
206{
207 return p;
208}
209
210static void *isl_obj_none_add(void *v1, void *v2)
211{
212 return NULL;
213}
214
220};
221
222static void *isl_obj_pw_qp_copy(void *v)
223{
225}
226
227static void isl_obj_pw_qp_free(void *v)
228{
230}
231
233 void *v)
234{
236 (struct isl_pw_qpolynomial *)v);
237}
238
239static void *isl_obj_pw_qp_add(void *v1, void *v2)
240{
241 return isl_pw_qpolynomial_add((struct isl_pw_qpolynomial *)v1,
242 (struct isl_pw_qpolynomial *)v2);
243}
244
250};
251
252static void *isl_obj_union_pw_qp_copy(void *v)
253{
255}
256
257static void isl_obj_union_pw_qp_free(void *v)
258{
260}
261
263 __isl_take isl_printer *p, void *v)
264{
266 (struct isl_union_pw_qpolynomial *)v);
267}
268
269static void *isl_obj_union_pw_qp_add(void *v1, void *v2)
270{
272 (struct isl_union_pw_qpolynomial *)v1,
273 (struct isl_union_pw_qpolynomial *)v2);
274}
275
281};
282
283static void *isl_obj_pw_qpf_copy(void *v)
284{
286}
287
288static void isl_obj_pw_qpf_free(void *v)
289{
291}
292
294 void *v)
295{
297 (struct isl_pw_qpolynomial_fold *)v);
298}
299
300static void *isl_obj_pw_qpf_add(void *v1, void *v2)
301{
303 (struct isl_pw_qpolynomial_fold *)v2);
304}
305
311};
312
313static void *isl_obj_union_pw_qpf_copy(void *v)
314{
316}
317
318static void isl_obj_union_pw_qpf_free(void *v)
319{
321}
322
324 __isl_take isl_printer *p, void *v)
325{
328}
329
330static void *isl_obj_union_pw_qpf_add(void *v1, void *v2)
331{
334 (struct isl_union_pw_qpolynomial_fold *)v2);
335}
336
342};
343
344static void *isl_obj_schedule_copy(void *v)
345{
346 return isl_schedule_copy((isl_schedule *) v);
347}
348
349static void isl_obj_schedule_free(void *v)
350{
352}
353
355 __isl_take isl_printer *p, void *v)
356{
358}
359
362 NULL,
365};
__isl_null isl_pw_multi_aff * isl_pw_multi_aff_free(__isl_take isl_pw_multi_aff *pma)
__isl_give isl_pw_multi_aff * isl_pw_multi_aff_copy(__isl_keep isl_pw_multi_aff *pma)
__isl_export __isl_give isl_pw_multi_aff * isl_pw_multi_aff_add(__isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2)
Definition: isl_aff.c:4734
__isl_give isl_printer * isl_printer_print_pw_multi_aff(__isl_take isl_printer *p, __isl_keep isl_pw_multi_aff *pma)
Definition: isl_output.c:3056
#define __isl_take
Definition: ctx.h:22
#define __isl_give
Definition: ctx.h:19
struct isl_obj_vtable isl_obj_val_vtable
Definition: isl_obj.c:47
static void * isl_obj_union_map_copy(void *v)
Definition: isl_obj.c:82
struct isl_obj_vtable isl_obj_pw_qpolynomial_vtable
Definition: isl_obj.c:245
static void * isl_obj_union_set_add(void *v1, void *v2)
Definition: isl_obj.c:154
static void * isl_obj_union_pw_qp_copy(void *v)
Definition: isl_obj.c:252
static void * isl_obj_union_pw_qp_add(void *v1, void *v2)
Definition: isl_obj.c:269
static void isl_obj_union_pw_qp_free(void *v)
Definition: isl_obj.c:257
struct isl_obj_vtable isl_obj_union_set_vtable
Definition: isl_obj.c:159
static void * isl_obj_none_add(void *v1, void *v2)
Definition: isl_obj.c:210
static void isl_obj_union_pw_qpf_free(void *v)
Definition: isl_obj.c:318
static void * isl_obj_union_pw_qpf_add(void *v1, void *v2)
Definition: isl_obj.c:330
static void isl_obj_map_free(void *v)
Definition: isl_obj.c:59
struct isl_obj_vtable isl_obj_map_vtable
Definition: isl_obj.c:75
static __isl_give isl_printer * isl_obj_pw_qpf_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:293
static void isl_obj_union_set_free(void *v)
Definition: isl_obj.c:143
static void * isl_obj_pw_qp_add(void *v1, void *v2)
Definition: isl_obj.c:239
static void * isl_obj_pw_multi_aff_add(void *v1, void *v2)
Definition: isl_obj.c:182
static void * isl_obj_pw_qp_copy(void *v)
Definition: isl_obj.c:222
static __isl_give isl_printer * isl_obj_union_pw_qp_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:262
static void * isl_obj_set_copy(void *v)
Definition: isl_obj.c:110
struct isl_obj_vtable isl_obj_schedule_vtable
Definition: isl_obj.c:360
static __isl_give isl_printer * isl_obj_map_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:64
static __isl_give isl_printer * isl_obj_val_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:36
static void isl_obj_none_free(void *v)
Definition: isl_obj.c:200
static void * isl_obj_set_add(void *v1, void *v2)
Definition: isl_obj.c:126
struct isl_obj_vtable isl_obj_union_pw_qpolynomial_vtable
Definition: isl_obj.c:276
static __isl_give isl_printer * isl_obj_union_pw_qpf_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:323
static void * isl_obj_map_copy(void *v)
Definition: isl_obj.c:54
static void * isl_obj_pw_qpf_add(void *v1, void *v2)
Definition: isl_obj.c:300
static void * isl_obj_pw_qpf_copy(void *v)
Definition: isl_obj.c:283
struct isl_obj_vtable isl_obj_set_vtable
Definition: isl_obj.c:131
struct isl_obj_vtable isl_obj_pw_qpolynomial_fold_vtable
Definition: isl_obj.c:306
static void isl_obj_set_free(void *v)
Definition: isl_obj.c:115
static void isl_obj_pw_qp_free(void *v)
Definition: isl_obj.c:227
struct isl_obj_vtable isl_obj_union_pw_qpolynomial_fold_vtable
Definition: isl_obj.c:337
static void * isl_obj_union_set_copy(void *v)
Definition: isl_obj.c:138
static void * isl_obj_val_copy(void *v)
Definition: isl_obj.c:26
static __isl_give isl_printer * isl_obj_none_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:204
static __isl_give isl_printer * isl_obj_pw_qp_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:232
static void * isl_obj_union_map_add(void *v1, void *v2)
Definition: isl_obj.c:98
static __isl_give isl_printer * isl_obj_union_set_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:148
static void isl_obj_union_map_free(void *v)
Definition: isl_obj.c:87
static void * isl_obj_map_add(void *v1, void *v2)
Definition: isl_obj.c:70
static __isl_give isl_printer * isl_obj_union_map_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:92
static void isl_obj_val_free(void *v)
Definition: isl_obj.c:31
static void isl_obj_schedule_free(void *v)
Definition: isl_obj.c:349
static void * isl_obj_val_add(void *v1, void *v2)
Definition: isl_obj.c:42
static void * isl_obj_schedule_copy(void *v)
Definition: isl_obj.c:344
static __isl_give isl_printer * isl_obj_schedule_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:354
static void isl_obj_pw_qpf_free(void *v)
Definition: isl_obj.c:288
static void * isl_obj_none_copy(void *v)
Definition: isl_obj.c:195
struct isl_obj_vtable isl_obj_pw_multi_aff_vtable
Definition: isl_obj.c:188
static void * isl_obj_union_pw_qpf_copy(void *v)
Definition: isl_obj.c:313
static void isl_obj_pw_multi_aff_free(void *v)
Definition: isl_obj.c:171
struct isl_obj_vtable isl_obj_none_vtable
Definition: isl_obj.c:215
static __isl_give isl_printer * isl_obj_set_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:120
struct isl_obj_vtable isl_obj_union_map_vtable
Definition: isl_obj.c:103
static __isl_give isl_printer * isl_obj_pw_multi_aff_print(__isl_take isl_printer *p, void *v)
Definition: isl_obj.c:176
static void * isl_obj_pw_multi_aff_copy(void *v)
Definition: isl_obj.c:166
const char * p
Definition: isl_test.c:8643
__isl_export __isl_give isl_map * isl_map_union(__isl_take isl_map *map1, __isl_take isl_map *map2)
Definition: isl_map.c:8246
__isl_give isl_map * isl_map_copy(__isl_keep isl_map *map)
Definition: isl_map.c:1494
__isl_give isl_printer * isl_printer_print_map(__isl_take isl_printer *printer, __isl_keep isl_map *map)
Definition: isl_output.c:1593
__isl_null isl_map * isl_map_free(__isl_take isl_map *map)
Definition: isl_map.c:6421
struct isl_set isl_set
Definition: map_type.h:26
__isl_give isl_pw_qpolynomial * isl_pw_qpolynomial_add(__isl_take isl_pw_qpolynomial *pwqp1, __isl_take isl_pw_qpolynomial *pwqp2)
__isl_give isl_union_pw_qpolynomial * isl_union_pw_qpolynomial_copy(__isl_keep isl_union_pw_qpolynomial *upwqp)
__isl_give isl_pw_qpolynomial_fold * isl_pw_qpolynomial_fold_fold(__isl_take isl_pw_qpolynomial_fold *pwf1, __isl_take isl_pw_qpolynomial_fold *pwf2)
Definition: isl_fold.c:1115
__isl_null isl_pw_qpolynomial * isl_pw_qpolynomial_free(__isl_take isl_pw_qpolynomial *pwqp)
__isl_give isl_printer * isl_printer_print_pw_qpolynomial(__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp)
Definition: isl_output.c:2229
__isl_give isl_pw_qpolynomial * isl_pw_qpolynomial_copy(__isl_keep isl_pw_qpolynomial *pwqp)
__isl_give isl_pw_qpolynomial_fold * isl_pw_qpolynomial_fold_copy(__isl_keep isl_pw_qpolynomial_fold *pwf)
__isl_give isl_union_pw_qpolynomial * isl_union_pw_qpolynomial_add(__isl_take isl_union_pw_qpolynomial *upwqp1, __isl_take isl_union_pw_qpolynomial *upwqp2)
__isl_null isl_union_pw_qpolynomial_fold * isl_union_pw_qpolynomial_fold_free(__isl_take isl_union_pw_qpolynomial_fold *upwf)
__isl_null isl_union_pw_qpolynomial * isl_union_pw_qpolynomial_free(__isl_take isl_union_pw_qpolynomial *upwqp)
__isl_null isl_pw_qpolynomial_fold * isl_pw_qpolynomial_fold_free(__isl_take isl_pw_qpolynomial_fold *pwf)
__isl_give isl_union_pw_qpolynomial_fold * isl_union_pw_qpolynomial_fold_copy(__isl_keep isl_union_pw_qpolynomial_fold *upwf)
__isl_give isl_printer * isl_printer_print_pw_qpolynomial_fold(__isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf)
Definition: isl_output.c:2343
__isl_give isl_printer * isl_printer_print_union_pw_qpolynomial(__isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp)
Definition: isl_output.c:2249
__isl_give isl_union_pw_qpolynomial_fold * isl_union_pw_qpolynomial_fold_fold(__isl_take isl_union_pw_qpolynomial_fold *upwf1, __isl_take isl_union_pw_qpolynomial_fold *upwf2)
Definition: isl_fold.c:1232
__isl_give isl_printer * isl_printer_print_union_pw_qpolynomial_fold(__isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial_fold *upwf)
Definition: isl_output.c:2378
struct isl_union_pw_qpolynomial_fold isl_union_pw_qpolynomial_fold
struct isl_union_pw_qpolynomial isl_union_pw_qpolynomial
__isl_null isl_schedule * isl_schedule_free(__isl_take isl_schedule *sched)
Definition: isl_schedule.c:121
__isl_give isl_schedule * isl_schedule_copy(__isl_keep isl_schedule *sched)
Definition: isl_schedule.c:93
__isl_give isl_printer * isl_printer_print_schedule(__isl_take isl_printer *p, __isl_keep isl_schedule *schedule)
Definition: isl_schedule.c:673
__isl_export __isl_give isl_set * isl_set_union(__isl_take isl_set *set1, __isl_take isl_set *set2)
Definition: isl_map.c:8281
__isl_null isl_set * isl_set_free(__isl_take isl_set *set)
Definition: isl_map.c:3513
__isl_give isl_set * isl_set_copy(__isl_keep isl_set *set)
Definition: isl_map.c:1470
__isl_give isl_printer * isl_printer_print_set(__isl_take isl_printer *printer, __isl_keep isl_set *map)
Definition: isl_output.c:1572
__isl_null isl_union_map * isl_union_map_free(__isl_take isl_union_map *umap)
__isl_give isl_union_map * isl_union_map_copy(__isl_keep isl_union_map *umap)
__isl_export __isl_give isl_union_map * isl_union_map_union(__isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2)
__isl_give isl_printer * isl_printer_print_union_map(__isl_take isl_printer *p, __isl_keep isl_union_map *umap)
Definition: isl_output.c:1657
struct isl_union_set isl_union_set
__isl_export __isl_give isl_union_set * isl_union_set_union(__isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2)
__isl_give isl_printer * isl_printer_print_union_set(__isl_take isl_printer *p, __isl_keep isl_union_set *uset)
Definition: isl_output.c:1675
__isl_give isl_union_set * isl_union_set_copy(__isl_keep isl_union_set *uset)
__isl_null isl_union_set * isl_union_set_free(__isl_take isl_union_set *uset)
__isl_give isl_val * isl_val_copy(__isl_keep isl_val *v)
Definition: isl_val.c:219
__isl_give isl_printer * isl_printer_print_val(__isl_take isl_printer *p, __isl_keep isl_val *v)
Definition: isl_val.c:1471
__isl_export __isl_give isl_val * isl_val_add(__isl_take isl_val *v1, __isl_take isl_val *v2)
Definition: isl_val.c:626
__isl_null isl_val * isl_val_free(__isl_take isl_val *v)
Definition: isl_val.c:263