doc: mention discussion group
[isl.git] / isl_obj.c
blob47341a0062b7473860666414232a028e82bc7c89
1 /*
2 * Copyright 2010 INRIA Saclay
4 * Use of this software is governed by the GNU LGPLv2.1 license
6 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
7 * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
8 * 91893 Orsay, France
9 */
11 #include <isl_obj.h>
13 static void *isl_obj_map_copy(void *v)
15 return isl_map_copy((struct isl_map *)v);
18 static void isl_obj_map_free(void *v)
20 isl_map_free((struct isl_map *)v);
23 static __isl_give isl_printer *isl_obj_map_print(__isl_take isl_printer *p,
24 void *v)
26 return isl_printer_print_map(p, (struct isl_map *)v);
29 static void *isl_obj_map_add(void *v1, void *v2)
31 return isl_map_union((struct isl_map *)v1, (struct isl_map *)v2);
34 struct isl_obj_vtable isl_obj_map_vtable = {
35 isl_obj_map_copy,
36 isl_obj_map_add,
37 isl_obj_map_print,
38 isl_obj_map_free
41 static void *isl_obj_set_copy(void *v)
43 return isl_set_copy((struct isl_set *)v);
46 static void isl_obj_set_free(void *v)
48 isl_set_free((struct isl_set *)v);
51 static __isl_give isl_printer *isl_obj_set_print(__isl_take isl_printer *p,
52 void *v)
54 return isl_printer_print_set(p, (struct isl_set *)v);
57 static void *isl_obj_set_add(void *v1, void *v2)
59 return isl_set_union((struct isl_set *)v1, (struct isl_set *)v2);
62 struct isl_obj_vtable isl_obj_set_vtable = {
63 isl_obj_set_copy,
64 isl_obj_set_add,
65 isl_obj_set_print,
66 isl_obj_set_free
69 static void *isl_obj_none_copy(void *v)
71 return v;
74 static void isl_obj_none_free(void *v)
78 static __isl_give isl_printer *isl_obj_none_print(__isl_take isl_printer *p,
79 void *v)
81 return p;
84 static void *isl_obj_none_add(void *v1, void *v2)
86 return NULL;
89 static struct isl_obj_vtable obj_none = {
90 isl_obj_none_copy,
91 isl_obj_none_add,
92 isl_obj_none_print,
93 isl_obj_none_free
95 isl_obj_type isl_obj_none = &obj_none;
97 static void *isl_obj_pw_qp_copy(void *v)
99 return isl_pw_qpolynomial_copy((struct isl_pw_qpolynomial *)v);
102 static void isl_obj_pw_qp_free(void *v)
104 isl_pw_qpolynomial_free((struct isl_pw_qpolynomial *)v);
107 static __isl_give isl_printer *isl_obj_pw_qp_print(__isl_take isl_printer *p,
108 void *v)
110 return isl_printer_print_pw_qpolynomial(p,
111 (struct isl_pw_qpolynomial *)v);
114 static void *isl_obj_pw_qp_add(void *v1, void *v2)
116 return isl_pw_qpolynomial_add((struct isl_pw_qpolynomial *)v1,
117 (struct isl_pw_qpolynomial *)v2);
120 struct isl_obj_vtable isl_obj_pw_qpolynomial_vtable = {
121 isl_obj_pw_qp_copy,
122 isl_obj_pw_qp_add,
123 isl_obj_pw_qp_print,
124 isl_obj_pw_qp_free
127 static void *isl_obj_pw_qpf_copy(void *v)
129 return isl_pw_qpolynomial_fold_copy((struct isl_pw_qpolynomial_fold *)v);
132 static void isl_obj_pw_qpf_free(void *v)
134 isl_pw_qpolynomial_fold_free((struct isl_pw_qpolynomial_fold *)v);
137 static __isl_give isl_printer *isl_obj_pw_qpf_print(__isl_take isl_printer *p,
138 void *v)
140 return isl_printer_print_pw_qpolynomial_fold(p,
141 (struct isl_pw_qpolynomial_fold *)v);
144 static void *isl_obj_pw_qpf_add(void *v1, void *v2)
146 return isl_pw_qpolynomial_fold_add((struct isl_pw_qpolynomial_fold *)v1,
147 (struct isl_pw_qpolynomial_fold *)v2);
150 struct isl_obj_vtable isl_obj_pw_qpolynomial_fold_vtable = {
151 isl_obj_pw_qpf_copy,
152 isl_obj_pw_qpf_add,
153 isl_obj_pw_qpf_print,
154 isl_obj_pw_qpf_free