1 /// These are automatically generated checked C++ bindings for isl.
2 ///
3 /// isl is a library for computing with integer sets and maps described by
4 /// Presburger formulas. On top of this, isl provides various tools for
5 /// polyhedral compilation, ranging from dependence analysis over scheduling
6 /// to AST generation.
7 
8 #ifndef ISL_CPP_CHECKED
9 #define ISL_CPP_CHECKED
10 
11 #include <isl/id.h>
12 #include <isl/space.h>
13 #include <isl/val.h>
14 #include <isl/aff.h>
15 #include <isl/set.h>
16 #include <isl/map.h>
17 #include <isl/ilp.h>
18 #include <isl/union_set.h>
19 #include <isl/union_map.h>
20 #include <isl/flow.h>
21 #include <isl/schedule.h>
22 #include <isl/schedule_node.h>
23 #include <isl/ast_build.h>
24 #include <isl/fixed_box.h>
25 
26 #include <stdio.h>
27 #include <stdlib.h>
28 
29 #include <functional>
30 #include <memory>
31 #include <ostream>
32 #include <string>
33 #include <type_traits>
34 
35 namespace isl {
36 namespace checked {
37 
38 #define ISLPP_STRINGIZE_(X) #X
39 #define ISLPP_STRINGIZE(X) ISLPP_STRINGIZE_(X)
40 
41 #define ISLPP_ASSERT(test, message)                          \
42   do {                                                       \
43     if (test)                                                \
44       break;                                                 \
45     fputs("Assertion \"" #test "\" failed at " __FILE__      \
46       ":" ISLPP_STRINGIZE(__LINE__) "\n  " message "\n",     \
47       stderr);                                               \
48     abort();                                                 \
49   } while (0)
50 
51 /* Class used to check that isl::checked::boolean,
52  * isl::checked::stat and isl::checked::size values are checked for errors.
53  */
54 struct checker {
55 	bool checked = false;
~checkerchecker56 	~checker() {
57 		ISLPP_ASSERT(checked, "IMPLEMENTATION ERROR: Unchecked state");
58 	}
59 };
60 
61 class boolean {
62 private:
63   mutable std::shared_ptr<checker> check = std::make_shared<checker>();
64   isl_bool val;
65 
66   friend boolean manage(isl_bool val);
boolean(isl_bool val)67   boolean(isl_bool val): val(val) {}
68 public:
error()69   static boolean error() {
70     return boolean(isl_bool_error);
71   }
boolean()72   boolean()
73       : val(isl_bool_error) {}
74 
boolean(bool val)75   /* implicit */ boolean(bool val)
76       : val(val ? isl_bool_true : isl_bool_false) {}
77 
release()78   isl_bool release() {
79     auto tmp = val;
80     val = isl_bool_error;
81     check->checked = true;
82     return tmp;
83   }
84 
is_error()85   bool is_error() const { check->checked = true; return val == isl_bool_error; }
is_false()86   bool is_false() const { check->checked = true; return val == isl_bool_false; }
is_true()87   bool is_true() const { check->checked = true; return val == isl_bool_true; }
88 
89   explicit operator bool() const {
90     ISLPP_ASSERT(check->checked, "IMPLEMENTATION ERROR: Unchecked error state");
91     ISLPP_ASSERT(!is_error(), "IMPLEMENTATION ERROR: Unhandled error state");
92     return is_true();
93   }
94 
negate()95   boolean negate() {
96     if (val == isl_bool_true)
97       val = isl_bool_false;
98     else if (val == isl_bool_false)
99       val = isl_bool_true;
100     return *this;
101   }
102 
103   boolean operator!() const {
104     return boolean(*this).negate();
105   }
106 };
107 
manage(isl_bool val)108 inline boolean manage(isl_bool val) {
109   return boolean(val);
110 }
111 
112 class ctx {
113   isl_ctx *ptr;
114 public:
ctx(isl_ctx * ctx)115   /* implicit */ ctx(isl_ctx *ctx)
116       : ptr(ctx) {}
release()117   isl_ctx *release() {
118     auto tmp = ptr;
119     ptr = nullptr;
120     return tmp;
121   }
get()122   isl_ctx *get() {
123     return ptr;
124   }
125 };
126 
127 /* Class encapsulating an isl_stat value.
128  */
129 class stat {
130 private:
131 	mutable std::shared_ptr<checker> check = std::make_shared<checker>();
132 	isl_stat val;
133 
134 	friend stat manage(isl_stat val);
stat(isl_stat val)135 	stat(isl_stat val) : val(val) {}
136 public:
ok()137 	static stat ok() {
138 		return stat(isl_stat_ok);
139 	}
error()140 	static stat error() {
141 		return stat(isl_stat_error);
142 	}
stat()143 	stat() : val(isl_stat_error) {}
144 
release()145 	isl_stat release() {
146 		check->checked = true;
147 		return val;
148 	}
149 
is_error()150 	bool is_error() const {
151 		check->checked = true;
152 		return val == isl_stat_error;
153 	}
is_ok()154 	bool is_ok() const {
155 		check->checked = true;
156 		return val == isl_stat_ok;
157 	}
158 };
159 
manage(isl_stat val)160 inline stat manage(isl_stat val)
161 {
162 	return stat(val);
163 }
164 
165 /* Class encapsulating an isl_size value.
166  */
167 class size {
168 private:
169 	mutable std::shared_ptr<checker> check = std::make_shared<checker>();
170 	isl_size val;
171 
172 	friend size manage(isl_size val);
size(isl_size val)173 	size(isl_size val) : val(val) {}
174 public:
size()175 	size() : val(isl_size_error) {}
176 
release()177 	isl_size release() {
178 		auto tmp = val;
179 		val = isl_size_error;
180 		check->checked = true;
181 		return tmp;
182 	}
183 
is_error()184 	bool is_error() const {
185 		check->checked = true;
186 		return val == isl_size_error;
187 	}
188 
189 	explicit operator unsigned() const {
190 		ISLPP_ASSERT(check->checked,
191 			    "IMPLEMENTATION ERROR: Unchecked error state");
192 		ISLPP_ASSERT(!is_error(),
193 			    "IMPLEMENTATION ERROR: Unhandled error state");
194 		return val;
195 	}
196 };
197 
manage(isl_size val)198 inline size manage(isl_size val)
199 {
200 	return size(val);
201 }
202 
203 }
204 } // namespace isl
205 
206 namespace isl {
207 
208 namespace checked {
209 
210 // forward declarations
211 class aff;
212 class aff_list;
213 class ast_build;
214 class ast_expr;
215 class ast_expr_id;
216 class ast_expr_int;
217 class ast_expr_op;
218 class ast_expr_op_access;
219 class ast_expr_op_add;
220 class ast_expr_op_address_of;
221 class ast_expr_op_and;
222 class ast_expr_op_and_then;
223 class ast_expr_op_call;
224 class ast_expr_op_cond;
225 class ast_expr_op_div;
226 class ast_expr_op_eq;
227 class ast_expr_op_fdiv_q;
228 class ast_expr_op_ge;
229 class ast_expr_op_gt;
230 class ast_expr_op_le;
231 class ast_expr_op_lt;
232 class ast_expr_op_max;
233 class ast_expr_op_member;
234 class ast_expr_op_min;
235 class ast_expr_op_minus;
236 class ast_expr_op_mul;
237 class ast_expr_op_or;
238 class ast_expr_op_or_else;
239 class ast_expr_op_pdiv_q;
240 class ast_expr_op_pdiv_r;
241 class ast_expr_op_select;
242 class ast_expr_op_sub;
243 class ast_expr_op_zdiv_r;
244 class ast_node;
245 class ast_node_block;
246 class ast_node_for;
247 class ast_node_if;
248 class ast_node_list;
249 class ast_node_mark;
250 class ast_node_user;
251 class basic_map;
252 class basic_set;
253 class fixed_box;
254 class id;
255 class id_list;
256 class map;
257 class multi_aff;
258 class multi_id;
259 class multi_pw_aff;
260 class multi_union_pw_aff;
261 class multi_val;
262 class point;
263 class pw_aff;
264 class pw_aff_list;
265 class pw_multi_aff;
266 class pw_multi_aff_list;
267 class schedule;
268 class schedule_constraints;
269 class schedule_node;
270 class schedule_node_band;
271 class schedule_node_context;
272 class schedule_node_domain;
273 class schedule_node_expansion;
274 class schedule_node_extension;
275 class schedule_node_filter;
276 class schedule_node_guard;
277 class schedule_node_leaf;
278 class schedule_node_mark;
279 class schedule_node_sequence;
280 class schedule_node_set;
281 class set;
282 class space;
283 class union_access_info;
284 class union_flow;
285 class union_map;
286 class union_pw_aff;
287 class union_pw_aff_list;
288 class union_pw_multi_aff;
289 class union_set;
290 class union_set_list;
291 class val;
292 class val_list;
293 
294 // declarations for isl::aff
295 inline aff manage(__isl_take isl_aff *ptr);
296 inline aff manage_copy(__isl_keep isl_aff *ptr);
297 
298 class aff {
299   friend inline aff manage(__isl_take isl_aff *ptr);
300   friend inline aff manage_copy(__isl_keep isl_aff *ptr);
301 
302 protected:
303   isl_aff *ptr = nullptr;
304 
305   inline explicit aff(__isl_take isl_aff *ptr);
306 
307 public:
308   inline /* implicit */ aff();
309   inline /* implicit */ aff(const aff &obj);
310   inline explicit aff(isl::checked::ctx ctx, const std::string &str);
311   inline aff &operator=(aff obj);
312   inline ~aff();
313   inline __isl_give isl_aff *copy() const &;
314   inline __isl_give isl_aff *copy() && = delete;
315   inline __isl_keep isl_aff *get() const;
316   inline __isl_give isl_aff *release();
317   inline bool is_null() const;
318   inline isl::checked::ctx ctx() const;
319 
320   inline isl::checked::aff add(isl::checked::aff aff2) const;
321   inline isl::checked::aff add_constant(isl::checked::val v) const;
322   inline isl::checked::aff add_constant(long v) const;
323   inline isl::checked::basic_set bind(isl::checked::id id) const;
324   inline isl::checked::basic_set bind(const std::string &id) const;
325   inline isl::checked::aff ceil() const;
326   inline isl::checked::aff div(isl::checked::aff aff2) const;
327   inline isl::checked::set eq_set(isl::checked::aff aff2) const;
328   inline isl::checked::val eval(isl::checked::point pnt) const;
329   inline isl::checked::aff floor() const;
330   inline isl::checked::set ge_set(isl::checked::aff aff2) const;
331   inline isl::checked::val constant_val() const;
332   inline isl::checked::val get_constant_val() const;
333   inline isl::checked::aff gist(isl::checked::set context) const;
334   inline isl::checked::set gt_set(isl::checked::aff aff2) const;
335   inline boolean is_cst() const;
336   inline isl::checked::set le_set(isl::checked::aff aff2) const;
337   inline isl::checked::set lt_set(isl::checked::aff aff2) const;
338   inline isl::checked::aff mod(isl::checked::val mod) const;
339   inline isl::checked::aff mod(long mod) const;
340   inline isl::checked::aff mul(isl::checked::aff aff2) const;
341   inline isl::checked::set ne_set(isl::checked::aff aff2) const;
342   inline isl::checked::aff neg() const;
343   inline isl::checked::aff pullback(isl::checked::multi_aff ma) const;
344   inline isl::checked::aff scale(isl::checked::val v) const;
345   inline isl::checked::aff scale(long v) const;
346   inline isl::checked::aff scale_down(isl::checked::val v) const;
347   inline isl::checked::aff scale_down(long v) const;
348   inline isl::checked::aff sub(isl::checked::aff aff2) const;
349   inline isl::checked::aff unbind_params_insert_domain(isl::checked::multi_id domain) const;
350   static inline isl::checked::aff zero_on_domain(isl::checked::space space);
351 };
352 
353 // declarations for isl::aff_list
354 inline aff_list manage(__isl_take isl_aff_list *ptr);
355 inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
356 
357 class aff_list {
358   friend inline aff_list manage(__isl_take isl_aff_list *ptr);
359   friend inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
360 
361 protected:
362   isl_aff_list *ptr = nullptr;
363 
364   inline explicit aff_list(__isl_take isl_aff_list *ptr);
365 
366 public:
367   inline /* implicit */ aff_list();
368   inline /* implicit */ aff_list(const aff_list &obj);
369   inline explicit aff_list(isl::checked::ctx ctx, int n);
370   inline explicit aff_list(isl::checked::aff el);
371   inline aff_list &operator=(aff_list obj);
372   inline ~aff_list();
373   inline __isl_give isl_aff_list *copy() const &;
374   inline __isl_give isl_aff_list *copy() && = delete;
375   inline __isl_keep isl_aff_list *get() const;
376   inline __isl_give isl_aff_list *release();
377   inline bool is_null() const;
378   inline isl::checked::ctx ctx() const;
379 
380   inline isl::checked::aff_list add(isl::checked::aff el) const;
381   inline isl::checked::aff_list clear() const;
382   inline isl::checked::aff_list concat(isl::checked::aff_list list2) const;
383   inline isl::checked::aff_list drop(unsigned int first, unsigned int n) const;
384   inline stat foreach(const std::function<stat(isl::checked::aff)> &fn) const;
385   inline isl::checked::aff at(int index) const;
386   inline isl::checked::aff get_at(int index) const;
387   inline isl::checked::aff_list insert(unsigned int pos, isl::checked::aff el) const;
388   inline class size size() const;
389 };
390 
391 // declarations for isl::ast_build
392 inline ast_build manage(__isl_take isl_ast_build *ptr);
393 inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
394 
395 class ast_build {
396   friend inline ast_build manage(__isl_take isl_ast_build *ptr);
397   friend inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
398 
399 protected:
400   isl_ast_build *ptr = nullptr;
401 
402   inline explicit ast_build(__isl_take isl_ast_build *ptr);
403 
404 public:
405   inline /* implicit */ ast_build();
406   inline /* implicit */ ast_build(const ast_build &obj);
407   inline explicit ast_build(isl::checked::ctx ctx);
408   inline ast_build &operator=(ast_build obj);
409   inline ~ast_build();
410   inline __isl_give isl_ast_build *copy() const &;
411   inline __isl_give isl_ast_build *copy() && = delete;
412   inline __isl_keep isl_ast_build *get() const;
413   inline __isl_give isl_ast_build *release();
414   inline bool is_null() const;
415   inline isl::checked::ctx ctx() const;
416 
417 private:
418   inline ast_build &copy_callbacks(const ast_build &obj);
419   struct at_each_domain_data {
420     std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> func;
421   };
422   std::shared_ptr<at_each_domain_data> at_each_domain_data;
423   static inline isl_ast_node *at_each_domain(isl_ast_node *arg_0, isl_ast_build *arg_1, void *arg_2);
424   inline void set_at_each_domain_data(const std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> &fn);
425 public:
426   inline isl::checked::ast_build set_at_each_domain(const std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> &fn) const;
427   inline isl::checked::ast_expr access_from(isl::checked::multi_pw_aff mpa) const;
428   inline isl::checked::ast_expr access_from(isl::checked::pw_multi_aff pma) const;
429   inline isl::checked::ast_expr call_from(isl::checked::multi_pw_aff mpa) const;
430   inline isl::checked::ast_expr call_from(isl::checked::pw_multi_aff pma) const;
431   inline isl::checked::ast_expr expr_from(isl::checked::pw_aff pa) const;
432   inline isl::checked::ast_expr expr_from(isl::checked::set set) const;
433   static inline isl::checked::ast_build from_context(isl::checked::set set);
434   inline isl::checked::union_map schedule() const;
435   inline isl::checked::union_map get_schedule() const;
436   inline isl::checked::ast_node node_from(isl::checked::schedule schedule) const;
437   inline isl::checked::ast_node node_from_schedule_map(isl::checked::union_map schedule) const;
438 };
439 
440 // declarations for isl::ast_expr
441 inline ast_expr manage(__isl_take isl_ast_expr *ptr);
442 inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
443 
444 class ast_expr {
445   friend inline ast_expr manage(__isl_take isl_ast_expr *ptr);
446   friend inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
447 
448 protected:
449   isl_ast_expr *ptr = nullptr;
450 
451   inline explicit ast_expr(__isl_take isl_ast_expr *ptr);
452 
453 public:
454   inline /* implicit */ ast_expr();
455   inline /* implicit */ ast_expr(const ast_expr &obj);
456   inline ast_expr &operator=(ast_expr obj);
457   inline ~ast_expr();
458   inline __isl_give isl_ast_expr *copy() const &;
459   inline __isl_give isl_ast_expr *copy() && = delete;
460   inline __isl_keep isl_ast_expr *get() const;
461   inline __isl_give isl_ast_expr *release();
462   inline bool is_null() const;
463 private:
464   template <typename T,
465           typename = typename std::enable_if<std::is_same<
466                   const decltype(isl_ast_expr_get_type(NULL)),
467                   const T>::value>::type>
468   inline boolean isa_type(T subtype) const;
469 public:
470   template <class T> inline boolean isa() const;
471   template <class T> inline T as() const;
472   inline isl::checked::ctx ctx() const;
473 
474   inline std::string to_C_str() const;
475 };
476 
477 // declarations for isl::ast_expr_id
478 
479 class ast_expr_id : public ast_expr {
480   template <class T>
481   friend boolean ast_expr::isa() const;
482   friend ast_expr_id ast_expr::as<ast_expr_id>() const;
483   static const auto type = isl_ast_expr_id;
484 
485 protected:
486   inline explicit ast_expr_id(__isl_take isl_ast_expr *ptr);
487 
488 public:
489   inline /* implicit */ ast_expr_id();
490   inline /* implicit */ ast_expr_id(const ast_expr_id &obj);
491   inline ast_expr_id &operator=(ast_expr_id obj);
492   inline isl::checked::ctx ctx() const;
493 
494   inline isl::checked::id id() const;
495   inline isl::checked::id get_id() const;
496 };
497 
498 // declarations for isl::ast_expr_int
499 
500 class ast_expr_int : public ast_expr {
501   template <class T>
502   friend boolean ast_expr::isa() const;
503   friend ast_expr_int ast_expr::as<ast_expr_int>() const;
504   static const auto type = isl_ast_expr_int;
505 
506 protected:
507   inline explicit ast_expr_int(__isl_take isl_ast_expr *ptr);
508 
509 public:
510   inline /* implicit */ ast_expr_int();
511   inline /* implicit */ ast_expr_int(const ast_expr_int &obj);
512   inline ast_expr_int &operator=(ast_expr_int obj);
513   inline isl::checked::ctx ctx() const;
514 
515   inline isl::checked::val val() const;
516   inline isl::checked::val get_val() const;
517 };
518 
519 // declarations for isl::ast_expr_op
520 
521 class ast_expr_op : public ast_expr {
522   template <class T>
523   friend boolean ast_expr::isa() const;
524   friend ast_expr_op ast_expr::as<ast_expr_op>() const;
525   static const auto type = isl_ast_expr_op;
526 
527 protected:
528   inline explicit ast_expr_op(__isl_take isl_ast_expr *ptr);
529 
530 public:
531   inline /* implicit */ ast_expr_op();
532   inline /* implicit */ ast_expr_op(const ast_expr_op &obj);
533   inline ast_expr_op &operator=(ast_expr_op obj);
534 private:
535   template <typename T,
536           typename = typename std::enable_if<std::is_same<
537                   const decltype(isl_ast_expr_op_get_type(NULL)),
538                   const T>::value>::type>
539   inline boolean isa_type(T subtype) const;
540 public:
541   template <class T> inline boolean isa() const;
542   template <class T> inline T as() const;
543   inline isl::checked::ctx ctx() const;
544 
545   inline isl::checked::ast_expr arg(int pos) const;
546   inline isl::checked::ast_expr get_arg(int pos) const;
547   inline class size n_arg() const;
548   inline class size get_n_arg() const;
549 };
550 
551 // declarations for isl::ast_expr_op_access
552 
553 class ast_expr_op_access : public ast_expr_op {
554   template <class T>
555   friend boolean ast_expr_op::isa() const;
556   friend ast_expr_op_access ast_expr_op::as<ast_expr_op_access>() const;
557   static const auto type = isl_ast_expr_op_access;
558 
559 protected:
560   inline explicit ast_expr_op_access(__isl_take isl_ast_expr *ptr);
561 
562 public:
563   inline /* implicit */ ast_expr_op_access();
564   inline /* implicit */ ast_expr_op_access(const ast_expr_op_access &obj);
565   inline ast_expr_op_access &operator=(ast_expr_op_access obj);
566   inline isl::checked::ctx ctx() const;
567 
568 };
569 
570 // declarations for isl::ast_expr_op_add
571 
572 class ast_expr_op_add : public ast_expr_op {
573   template <class T>
574   friend boolean ast_expr_op::isa() const;
575   friend ast_expr_op_add ast_expr_op::as<ast_expr_op_add>() const;
576   static const auto type = isl_ast_expr_op_add;
577 
578 protected:
579   inline explicit ast_expr_op_add(__isl_take isl_ast_expr *ptr);
580 
581 public:
582   inline /* implicit */ ast_expr_op_add();
583   inline /* implicit */ ast_expr_op_add(const ast_expr_op_add &obj);
584   inline ast_expr_op_add &operator=(ast_expr_op_add obj);
585   inline isl::checked::ctx ctx() const;
586 
587 };
588 
589 // declarations for isl::ast_expr_op_address_of
590 
591 class ast_expr_op_address_of : public ast_expr_op {
592   template <class T>
593   friend boolean ast_expr_op::isa() const;
594   friend ast_expr_op_address_of ast_expr_op::as<ast_expr_op_address_of>() const;
595   static const auto type = isl_ast_expr_op_address_of;
596 
597 protected:
598   inline explicit ast_expr_op_address_of(__isl_take isl_ast_expr *ptr);
599 
600 public:
601   inline /* implicit */ ast_expr_op_address_of();
602   inline /* implicit */ ast_expr_op_address_of(const ast_expr_op_address_of &obj);
603   inline ast_expr_op_address_of &operator=(ast_expr_op_address_of obj);
604   inline isl::checked::ctx ctx() const;
605 
606 };
607 
608 // declarations for isl::ast_expr_op_and
609 
610 class ast_expr_op_and : public ast_expr_op {
611   template <class T>
612   friend boolean ast_expr_op::isa() const;
613   friend ast_expr_op_and ast_expr_op::as<ast_expr_op_and>() const;
614   static const auto type = isl_ast_expr_op_and;
615 
616 protected:
617   inline explicit ast_expr_op_and(__isl_take isl_ast_expr *ptr);
618 
619 public:
620   inline /* implicit */ ast_expr_op_and();
621   inline /* implicit */ ast_expr_op_and(const ast_expr_op_and &obj);
622   inline ast_expr_op_and &operator=(ast_expr_op_and obj);
623   inline isl::checked::ctx ctx() const;
624 
625 };
626 
627 // declarations for isl::ast_expr_op_and_then
628 
629 class ast_expr_op_and_then : public ast_expr_op {
630   template <class T>
631   friend boolean ast_expr_op::isa() const;
632   friend ast_expr_op_and_then ast_expr_op::as<ast_expr_op_and_then>() const;
633   static const auto type = isl_ast_expr_op_and_then;
634 
635 protected:
636   inline explicit ast_expr_op_and_then(__isl_take isl_ast_expr *ptr);
637 
638 public:
639   inline /* implicit */ ast_expr_op_and_then();
640   inline /* implicit */ ast_expr_op_and_then(const ast_expr_op_and_then &obj);
641   inline ast_expr_op_and_then &operator=(ast_expr_op_and_then obj);
642   inline isl::checked::ctx ctx() const;
643 
644 };
645 
646 // declarations for isl::ast_expr_op_call
647 
648 class ast_expr_op_call : public ast_expr_op {
649   template <class T>
650   friend boolean ast_expr_op::isa() const;
651   friend ast_expr_op_call ast_expr_op::as<ast_expr_op_call>() const;
652   static const auto type = isl_ast_expr_op_call;
653 
654 protected:
655   inline explicit ast_expr_op_call(__isl_take isl_ast_expr *ptr);
656 
657 public:
658   inline /* implicit */ ast_expr_op_call();
659   inline /* implicit */ ast_expr_op_call(const ast_expr_op_call &obj);
660   inline ast_expr_op_call &operator=(ast_expr_op_call obj);
661   inline isl::checked::ctx ctx() const;
662 
663 };
664 
665 // declarations for isl::ast_expr_op_cond
666 
667 class ast_expr_op_cond : public ast_expr_op {
668   template <class T>
669   friend boolean ast_expr_op::isa() const;
670   friend ast_expr_op_cond ast_expr_op::as<ast_expr_op_cond>() const;
671   static const auto type = isl_ast_expr_op_cond;
672 
673 protected:
674   inline explicit ast_expr_op_cond(__isl_take isl_ast_expr *ptr);
675 
676 public:
677   inline /* implicit */ ast_expr_op_cond();
678   inline /* implicit */ ast_expr_op_cond(const ast_expr_op_cond &obj);
679   inline ast_expr_op_cond &operator=(ast_expr_op_cond obj);
680   inline isl::checked::ctx ctx() const;
681 
682 };
683 
684 // declarations for isl::ast_expr_op_div
685 
686 class ast_expr_op_div : public ast_expr_op {
687   template <class T>
688   friend boolean ast_expr_op::isa() const;
689   friend ast_expr_op_div ast_expr_op::as<ast_expr_op_div>() const;
690   static const auto type = isl_ast_expr_op_div;
691 
692 protected:
693   inline explicit ast_expr_op_div(__isl_take isl_ast_expr *ptr);
694 
695 public:
696   inline /* implicit */ ast_expr_op_div();
697   inline /* implicit */ ast_expr_op_div(const ast_expr_op_div &obj);
698   inline ast_expr_op_div &operator=(ast_expr_op_div obj);
699   inline isl::checked::ctx ctx() const;
700 
701 };
702 
703 // declarations for isl::ast_expr_op_eq
704 
705 class ast_expr_op_eq : public ast_expr_op {
706   template <class T>
707   friend boolean ast_expr_op::isa() const;
708   friend ast_expr_op_eq ast_expr_op::as<ast_expr_op_eq>() const;
709   static const auto type = isl_ast_expr_op_eq;
710 
711 protected:
712   inline explicit ast_expr_op_eq(__isl_take isl_ast_expr *ptr);
713 
714 public:
715   inline /* implicit */ ast_expr_op_eq();
716   inline /* implicit */ ast_expr_op_eq(const ast_expr_op_eq &obj);
717   inline ast_expr_op_eq &operator=(ast_expr_op_eq obj);
718   inline isl::checked::ctx ctx() const;
719 
720 };
721 
722 // declarations for isl::ast_expr_op_fdiv_q
723 
724 class ast_expr_op_fdiv_q : public ast_expr_op {
725   template <class T>
726   friend boolean ast_expr_op::isa() const;
727   friend ast_expr_op_fdiv_q ast_expr_op::as<ast_expr_op_fdiv_q>() const;
728   static const auto type = isl_ast_expr_op_fdiv_q;
729 
730 protected:
731   inline explicit ast_expr_op_fdiv_q(__isl_take isl_ast_expr *ptr);
732 
733 public:
734   inline /* implicit */ ast_expr_op_fdiv_q();
735   inline /* implicit */ ast_expr_op_fdiv_q(const ast_expr_op_fdiv_q &obj);
736   inline ast_expr_op_fdiv_q &operator=(ast_expr_op_fdiv_q obj);
737   inline isl::checked::ctx ctx() const;
738 
739 };
740 
741 // declarations for isl::ast_expr_op_ge
742 
743 class ast_expr_op_ge : public ast_expr_op {
744   template <class T>
745   friend boolean ast_expr_op::isa() const;
746   friend ast_expr_op_ge ast_expr_op::as<ast_expr_op_ge>() const;
747   static const auto type = isl_ast_expr_op_ge;
748 
749 protected:
750   inline explicit ast_expr_op_ge(__isl_take isl_ast_expr *ptr);
751 
752 public:
753   inline /* implicit */ ast_expr_op_ge();
754   inline /* implicit */ ast_expr_op_ge(const ast_expr_op_ge &obj);
755   inline ast_expr_op_ge &operator=(ast_expr_op_ge obj);
756   inline isl::checked::ctx ctx() const;
757 
758 };
759 
760 // declarations for isl::ast_expr_op_gt
761 
762 class ast_expr_op_gt : public ast_expr_op {
763   template <class T>
764   friend boolean ast_expr_op::isa() const;
765   friend ast_expr_op_gt ast_expr_op::as<ast_expr_op_gt>() const;
766   static const auto type = isl_ast_expr_op_gt;
767 
768 protected:
769   inline explicit ast_expr_op_gt(__isl_take isl_ast_expr *ptr);
770 
771 public:
772   inline /* implicit */ ast_expr_op_gt();
773   inline /* implicit */ ast_expr_op_gt(const ast_expr_op_gt &obj);
774   inline ast_expr_op_gt &operator=(ast_expr_op_gt obj);
775   inline isl::checked::ctx ctx() const;
776 
777 };
778 
779 // declarations for isl::ast_expr_op_le
780 
781 class ast_expr_op_le : public ast_expr_op {
782   template <class T>
783   friend boolean ast_expr_op::isa() const;
784   friend ast_expr_op_le ast_expr_op::as<ast_expr_op_le>() const;
785   static const auto type = isl_ast_expr_op_le;
786 
787 protected:
788   inline explicit ast_expr_op_le(__isl_take isl_ast_expr *ptr);
789 
790 public:
791   inline /* implicit */ ast_expr_op_le();
792   inline /* implicit */ ast_expr_op_le(const ast_expr_op_le &obj);
793   inline ast_expr_op_le &operator=(ast_expr_op_le obj);
794   inline isl::checked::ctx ctx() const;
795 
796 };
797 
798 // declarations for isl::ast_expr_op_lt
799 
800 class ast_expr_op_lt : public ast_expr_op {
801   template <class T>
802   friend boolean ast_expr_op::isa() const;
803   friend ast_expr_op_lt ast_expr_op::as<ast_expr_op_lt>() const;
804   static const auto type = isl_ast_expr_op_lt;
805 
806 protected:
807   inline explicit ast_expr_op_lt(__isl_take isl_ast_expr *ptr);
808 
809 public:
810   inline /* implicit */ ast_expr_op_lt();
811   inline /* implicit */ ast_expr_op_lt(const ast_expr_op_lt &obj);
812   inline ast_expr_op_lt &operator=(ast_expr_op_lt obj);
813   inline isl::checked::ctx ctx() const;
814 
815 };
816 
817 // declarations for isl::ast_expr_op_max
818 
819 class ast_expr_op_max : public ast_expr_op {
820   template <class T>
821   friend boolean ast_expr_op::isa() const;
822   friend ast_expr_op_max ast_expr_op::as<ast_expr_op_max>() const;
823   static const auto type = isl_ast_expr_op_max;
824 
825 protected:
826   inline explicit ast_expr_op_max(__isl_take isl_ast_expr *ptr);
827 
828 public:
829   inline /* implicit */ ast_expr_op_max();
830   inline /* implicit */ ast_expr_op_max(const ast_expr_op_max &obj);
831   inline ast_expr_op_max &operator=(ast_expr_op_max obj);
832   inline isl::checked::ctx ctx() const;
833 
834 };
835 
836 // declarations for isl::ast_expr_op_member
837 
838 class ast_expr_op_member : public ast_expr_op {
839   template <class T>
840   friend boolean ast_expr_op::isa() const;
841   friend ast_expr_op_member ast_expr_op::as<ast_expr_op_member>() const;
842   static const auto type = isl_ast_expr_op_member;
843 
844 protected:
845   inline explicit ast_expr_op_member(__isl_take isl_ast_expr *ptr);
846 
847 public:
848   inline /* implicit */ ast_expr_op_member();
849   inline /* implicit */ ast_expr_op_member(const ast_expr_op_member &obj);
850   inline ast_expr_op_member &operator=(ast_expr_op_member obj);
851   inline isl::checked::ctx ctx() const;
852 
853 };
854 
855 // declarations for isl::ast_expr_op_min
856 
857 class ast_expr_op_min : public ast_expr_op {
858   template <class T>
859   friend boolean ast_expr_op::isa() const;
860   friend ast_expr_op_min ast_expr_op::as<ast_expr_op_min>() const;
861   static const auto type = isl_ast_expr_op_min;
862 
863 protected:
864   inline explicit ast_expr_op_min(__isl_take isl_ast_expr *ptr);
865 
866 public:
867   inline /* implicit */ ast_expr_op_min();
868   inline /* implicit */ ast_expr_op_min(const ast_expr_op_min &obj);
869   inline ast_expr_op_min &operator=(ast_expr_op_min obj);
870   inline isl::checked::ctx ctx() const;
871 
872 };
873 
874 // declarations for isl::ast_expr_op_minus
875 
876 class ast_expr_op_minus : public ast_expr_op {
877   template <class T>
878   friend boolean ast_expr_op::isa() const;
879   friend ast_expr_op_minus ast_expr_op::as<ast_expr_op_minus>() const;
880   static const auto type = isl_ast_expr_op_minus;
881 
882 protected:
883   inline explicit ast_expr_op_minus(__isl_take isl_ast_expr *ptr);
884 
885 public:
886   inline /* implicit */ ast_expr_op_minus();
887   inline /* implicit */ ast_expr_op_minus(const ast_expr_op_minus &obj);
888   inline ast_expr_op_minus &operator=(ast_expr_op_minus obj);
889   inline isl::checked::ctx ctx() const;
890 
891 };
892 
893 // declarations for isl::ast_expr_op_mul
894 
895 class ast_expr_op_mul : public ast_expr_op {
896   template <class T>
897   friend boolean ast_expr_op::isa() const;
898   friend ast_expr_op_mul ast_expr_op::as<ast_expr_op_mul>() const;
899   static const auto type = isl_ast_expr_op_mul;
900 
901 protected:
902   inline explicit ast_expr_op_mul(__isl_take isl_ast_expr *ptr);
903 
904 public:
905   inline /* implicit */ ast_expr_op_mul();
906   inline /* implicit */ ast_expr_op_mul(const ast_expr_op_mul &obj);
907   inline ast_expr_op_mul &operator=(ast_expr_op_mul obj);
908   inline isl::checked::ctx ctx() const;
909 
910 };
911 
912 // declarations for isl::ast_expr_op_or
913 
914 class ast_expr_op_or : public ast_expr_op {
915   template <class T>
916   friend boolean ast_expr_op::isa() const;
917   friend ast_expr_op_or ast_expr_op::as<ast_expr_op_or>() const;
918   static const auto type = isl_ast_expr_op_or;
919 
920 protected:
921   inline explicit ast_expr_op_or(__isl_take isl_ast_expr *ptr);
922 
923 public:
924   inline /* implicit */ ast_expr_op_or();
925   inline /* implicit */ ast_expr_op_or(const ast_expr_op_or &obj);
926   inline ast_expr_op_or &operator=(ast_expr_op_or obj);
927   inline isl::checked::ctx ctx() const;
928 
929 };
930 
931 // declarations for isl::ast_expr_op_or_else
932 
933 class ast_expr_op_or_else : public ast_expr_op {
934   template <class T>
935   friend boolean ast_expr_op::isa() const;
936   friend ast_expr_op_or_else ast_expr_op::as<ast_expr_op_or_else>() const;
937   static const auto type = isl_ast_expr_op_or_else;
938 
939 protected:
940   inline explicit ast_expr_op_or_else(__isl_take isl_ast_expr *ptr);
941 
942 public:
943   inline /* implicit */ ast_expr_op_or_else();
944   inline /* implicit */ ast_expr_op_or_else(const ast_expr_op_or_else &obj);
945   inline ast_expr_op_or_else &operator=(ast_expr_op_or_else obj);
946   inline isl::checked::ctx ctx() const;
947 
948 };
949 
950 // declarations for isl::ast_expr_op_pdiv_q
951 
952 class ast_expr_op_pdiv_q : public ast_expr_op {
953   template <class T>
954   friend boolean ast_expr_op::isa() const;
955   friend ast_expr_op_pdiv_q ast_expr_op::as<ast_expr_op_pdiv_q>() const;
956   static const auto type = isl_ast_expr_op_pdiv_q;
957 
958 protected:
959   inline explicit ast_expr_op_pdiv_q(__isl_take isl_ast_expr *ptr);
960 
961 public:
962   inline /* implicit */ ast_expr_op_pdiv_q();
963   inline /* implicit */ ast_expr_op_pdiv_q(const ast_expr_op_pdiv_q &obj);
964   inline ast_expr_op_pdiv_q &operator=(ast_expr_op_pdiv_q obj);
965   inline isl::checked::ctx ctx() const;
966 
967 };
968 
969 // declarations for isl::ast_expr_op_pdiv_r
970 
971 class ast_expr_op_pdiv_r : public ast_expr_op {
972   template <class T>
973   friend boolean ast_expr_op::isa() const;
974   friend ast_expr_op_pdiv_r ast_expr_op::as<ast_expr_op_pdiv_r>() const;
975   static const auto type = isl_ast_expr_op_pdiv_r;
976 
977 protected:
978   inline explicit ast_expr_op_pdiv_r(__isl_take isl_ast_expr *ptr);
979 
980 public:
981   inline /* implicit */ ast_expr_op_pdiv_r();
982   inline /* implicit */ ast_expr_op_pdiv_r(const ast_expr_op_pdiv_r &obj);
983   inline ast_expr_op_pdiv_r &operator=(ast_expr_op_pdiv_r obj);
984   inline isl::checked::ctx ctx() const;
985 
986 };
987 
988 // declarations for isl::ast_expr_op_select
989 
990 class ast_expr_op_select : public ast_expr_op {
991   template <class T>
992   friend boolean ast_expr_op::isa() const;
993   friend ast_expr_op_select ast_expr_op::as<ast_expr_op_select>() const;
994   static const auto type = isl_ast_expr_op_select;
995 
996 protected:
997   inline explicit ast_expr_op_select(__isl_take isl_ast_expr *ptr);
998 
999 public:
1000   inline /* implicit */ ast_expr_op_select();
1001   inline /* implicit */ ast_expr_op_select(const ast_expr_op_select &obj);
1002   inline ast_expr_op_select &operator=(ast_expr_op_select obj);
1003   inline isl::checked::ctx ctx() const;
1004 
1005 };
1006 
1007 // declarations for isl::ast_expr_op_sub
1008 
1009 class ast_expr_op_sub : public ast_expr_op {
1010   template <class T>
1011   friend boolean ast_expr_op::isa() const;
1012   friend ast_expr_op_sub ast_expr_op::as<ast_expr_op_sub>() const;
1013   static const auto type = isl_ast_expr_op_sub;
1014 
1015 protected:
1016   inline explicit ast_expr_op_sub(__isl_take isl_ast_expr *ptr);
1017 
1018 public:
1019   inline /* implicit */ ast_expr_op_sub();
1020   inline /* implicit */ ast_expr_op_sub(const ast_expr_op_sub &obj);
1021   inline ast_expr_op_sub &operator=(ast_expr_op_sub obj);
1022   inline isl::checked::ctx ctx() const;
1023 
1024 };
1025 
1026 // declarations for isl::ast_expr_op_zdiv_r
1027 
1028 class ast_expr_op_zdiv_r : public ast_expr_op {
1029   template <class T>
1030   friend boolean ast_expr_op::isa() const;
1031   friend ast_expr_op_zdiv_r ast_expr_op::as<ast_expr_op_zdiv_r>() const;
1032   static const auto type = isl_ast_expr_op_zdiv_r;
1033 
1034 protected:
1035   inline explicit ast_expr_op_zdiv_r(__isl_take isl_ast_expr *ptr);
1036 
1037 public:
1038   inline /* implicit */ ast_expr_op_zdiv_r();
1039   inline /* implicit */ ast_expr_op_zdiv_r(const ast_expr_op_zdiv_r &obj);
1040   inline ast_expr_op_zdiv_r &operator=(ast_expr_op_zdiv_r obj);
1041   inline isl::checked::ctx ctx() const;
1042 
1043 };
1044 
1045 // declarations for isl::ast_node
1046 inline ast_node manage(__isl_take isl_ast_node *ptr);
1047 inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
1048 
1049 class ast_node {
1050   friend inline ast_node manage(__isl_take isl_ast_node *ptr);
1051   friend inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
1052 
1053 protected:
1054   isl_ast_node *ptr = nullptr;
1055 
1056   inline explicit ast_node(__isl_take isl_ast_node *ptr);
1057 
1058 public:
1059   inline /* implicit */ ast_node();
1060   inline /* implicit */ ast_node(const ast_node &obj);
1061   inline ast_node &operator=(ast_node obj);
1062   inline ~ast_node();
1063   inline __isl_give isl_ast_node *copy() const &;
1064   inline __isl_give isl_ast_node *copy() && = delete;
1065   inline __isl_keep isl_ast_node *get() const;
1066   inline __isl_give isl_ast_node *release();
1067   inline bool is_null() const;
1068 private:
1069   template <typename T,
1070           typename = typename std::enable_if<std::is_same<
1071                   const decltype(isl_ast_node_get_type(NULL)),
1072                   const T>::value>::type>
1073   inline boolean isa_type(T subtype) const;
1074 public:
1075   template <class T> inline boolean isa() const;
1076   template <class T> inline T as() const;
1077   inline isl::checked::ctx ctx() const;
1078 
1079   inline std::string to_C_str() const;
1080 };
1081 
1082 // declarations for isl::ast_node_block
1083 
1084 class ast_node_block : public ast_node {
1085   template <class T>
1086   friend boolean ast_node::isa() const;
1087   friend ast_node_block ast_node::as<ast_node_block>() const;
1088   static const auto type = isl_ast_node_block;
1089 
1090 protected:
1091   inline explicit ast_node_block(__isl_take isl_ast_node *ptr);
1092 
1093 public:
1094   inline /* implicit */ ast_node_block();
1095   inline /* implicit */ ast_node_block(const ast_node_block &obj);
1096   inline ast_node_block &operator=(ast_node_block obj);
1097   inline isl::checked::ctx ctx() const;
1098 
1099   inline isl::checked::ast_node_list children() const;
1100   inline isl::checked::ast_node_list get_children() const;
1101 };
1102 
1103 // declarations for isl::ast_node_for
1104 
1105 class ast_node_for : public ast_node {
1106   template <class T>
1107   friend boolean ast_node::isa() const;
1108   friend ast_node_for ast_node::as<ast_node_for>() const;
1109   static const auto type = isl_ast_node_for;
1110 
1111 protected:
1112   inline explicit ast_node_for(__isl_take isl_ast_node *ptr);
1113 
1114 public:
1115   inline /* implicit */ ast_node_for();
1116   inline /* implicit */ ast_node_for(const ast_node_for &obj);
1117   inline ast_node_for &operator=(ast_node_for obj);
1118   inline isl::checked::ctx ctx() const;
1119 
1120   inline isl::checked::ast_node body() const;
1121   inline isl::checked::ast_node get_body() const;
1122   inline isl::checked::ast_expr cond() const;
1123   inline isl::checked::ast_expr get_cond() const;
1124   inline isl::checked::ast_expr inc() const;
1125   inline isl::checked::ast_expr get_inc() const;
1126   inline isl::checked::ast_expr init() const;
1127   inline isl::checked::ast_expr get_init() const;
1128   inline isl::checked::ast_expr iterator() const;
1129   inline isl::checked::ast_expr get_iterator() const;
1130   inline boolean is_degenerate() const;
1131 };
1132 
1133 // declarations for isl::ast_node_if
1134 
1135 class ast_node_if : public ast_node {
1136   template <class T>
1137   friend boolean ast_node::isa() const;
1138   friend ast_node_if ast_node::as<ast_node_if>() const;
1139   static const auto type = isl_ast_node_if;
1140 
1141 protected:
1142   inline explicit ast_node_if(__isl_take isl_ast_node *ptr);
1143 
1144 public:
1145   inline /* implicit */ ast_node_if();
1146   inline /* implicit */ ast_node_if(const ast_node_if &obj);
1147   inline ast_node_if &operator=(ast_node_if obj);
1148   inline isl::checked::ctx ctx() const;
1149 
1150   inline isl::checked::ast_expr cond() const;
1151   inline isl::checked::ast_expr get_cond() const;
1152   inline isl::checked::ast_node else_node() const;
1153   inline isl::checked::ast_node get_else_node() const;
1154   inline isl::checked::ast_node then_node() const;
1155   inline isl::checked::ast_node get_then_node() const;
1156   inline boolean has_else_node() const;
1157 };
1158 
1159 // declarations for isl::ast_node_list
1160 inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
1161 inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
1162 
1163 class ast_node_list {
1164   friend inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
1165   friend inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
1166 
1167 protected:
1168   isl_ast_node_list *ptr = nullptr;
1169 
1170   inline explicit ast_node_list(__isl_take isl_ast_node_list *ptr);
1171 
1172 public:
1173   inline /* implicit */ ast_node_list();
1174   inline /* implicit */ ast_node_list(const ast_node_list &obj);
1175   inline explicit ast_node_list(isl::checked::ctx ctx, int n);
1176   inline explicit ast_node_list(isl::checked::ast_node el);
1177   inline ast_node_list &operator=(ast_node_list obj);
1178   inline ~ast_node_list();
1179   inline __isl_give isl_ast_node_list *copy() const &;
1180   inline __isl_give isl_ast_node_list *copy() && = delete;
1181   inline __isl_keep isl_ast_node_list *get() const;
1182   inline __isl_give isl_ast_node_list *release();
1183   inline bool is_null() const;
1184   inline isl::checked::ctx ctx() const;
1185 
1186   inline isl::checked::ast_node_list add(isl::checked::ast_node el) const;
1187   inline isl::checked::ast_node_list clear() const;
1188   inline isl::checked::ast_node_list concat(isl::checked::ast_node_list list2) const;
1189   inline isl::checked::ast_node_list drop(unsigned int first, unsigned int n) const;
1190   inline stat foreach(const std::function<stat(isl::checked::ast_node)> &fn) const;
1191   inline isl::checked::ast_node at(int index) const;
1192   inline isl::checked::ast_node get_at(int index) const;
1193   inline isl::checked::ast_node_list insert(unsigned int pos, isl::checked::ast_node el) const;
1194   inline class size size() const;
1195 };
1196 
1197 // declarations for isl::ast_node_mark
1198 
1199 class ast_node_mark : public ast_node {
1200   template <class T>
1201   friend boolean ast_node::isa() const;
1202   friend ast_node_mark ast_node::as<ast_node_mark>() const;
1203   static const auto type = isl_ast_node_mark;
1204 
1205 protected:
1206   inline explicit ast_node_mark(__isl_take isl_ast_node *ptr);
1207 
1208 public:
1209   inline /* implicit */ ast_node_mark();
1210   inline /* implicit */ ast_node_mark(const ast_node_mark &obj);
1211   inline ast_node_mark &operator=(ast_node_mark obj);
1212   inline isl::checked::ctx ctx() const;
1213 
1214   inline isl::checked::id id() const;
1215   inline isl::checked::id get_id() const;
1216   inline isl::checked::ast_node node() const;
1217   inline isl::checked::ast_node get_node() const;
1218 };
1219 
1220 // declarations for isl::ast_node_user
1221 
1222 class ast_node_user : public ast_node {
1223   template <class T>
1224   friend boolean ast_node::isa() const;
1225   friend ast_node_user ast_node::as<ast_node_user>() const;
1226   static const auto type = isl_ast_node_user;
1227 
1228 protected:
1229   inline explicit ast_node_user(__isl_take isl_ast_node *ptr);
1230 
1231 public:
1232   inline /* implicit */ ast_node_user();
1233   inline /* implicit */ ast_node_user(const ast_node_user &obj);
1234   inline ast_node_user &operator=(ast_node_user obj);
1235   inline isl::checked::ctx ctx() const;
1236 
1237   inline isl::checked::ast_expr expr() const;
1238   inline isl::checked::ast_expr get_expr() const;
1239 };
1240 
1241 // declarations for isl::basic_map
1242 inline basic_map manage(__isl_take isl_basic_map *ptr);
1243 inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
1244 
1245 class basic_map {
1246   friend inline basic_map manage(__isl_take isl_basic_map *ptr);
1247   friend inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
1248 
1249 protected:
1250   isl_basic_map *ptr = nullptr;
1251 
1252   inline explicit basic_map(__isl_take isl_basic_map *ptr);
1253 
1254 public:
1255   inline /* implicit */ basic_map();
1256   inline /* implicit */ basic_map(const basic_map &obj);
1257   inline explicit basic_map(isl::checked::ctx ctx, const std::string &str);
1258   inline basic_map &operator=(basic_map obj);
1259   inline ~basic_map();
1260   inline __isl_give isl_basic_map *copy() const &;
1261   inline __isl_give isl_basic_map *copy() && = delete;
1262   inline __isl_keep isl_basic_map *get() const;
1263   inline __isl_give isl_basic_map *release();
1264   inline bool is_null() const;
1265   inline isl::checked::ctx ctx() const;
1266 
1267   inline isl::checked::basic_map affine_hull() const;
1268   inline isl::checked::basic_map apply_domain(isl::checked::basic_map bmap2) const;
1269   inline isl::checked::basic_map apply_range(isl::checked::basic_map bmap2) const;
1270   inline isl::checked::basic_set deltas() const;
1271   inline isl::checked::basic_map detect_equalities() const;
1272   inline isl::checked::basic_map flatten() const;
1273   inline isl::checked::basic_map flatten_domain() const;
1274   inline isl::checked::basic_map flatten_range() const;
1275   inline isl::checked::basic_map gist(isl::checked::basic_map context) const;
1276   inline isl::checked::basic_map intersect(isl::checked::basic_map bmap2) const;
1277   inline isl::checked::basic_map intersect_domain(isl::checked::basic_set bset) const;
1278   inline isl::checked::basic_map intersect_range(isl::checked::basic_set bset) const;
1279   inline boolean is_empty() const;
1280   inline boolean is_equal(const isl::checked::basic_map &bmap2) const;
1281   inline boolean is_subset(const isl::checked::basic_map &bmap2) const;
1282   inline isl::checked::map lexmax() const;
1283   inline isl::checked::map lexmin() const;
1284   inline isl::checked::basic_map reverse() const;
1285   inline isl::checked::basic_map sample() const;
1286   inline isl::checked::map unite(isl::checked::basic_map bmap2) const;
1287 };
1288 
1289 // declarations for isl::basic_set
1290 inline basic_set manage(__isl_take isl_basic_set *ptr);
1291 inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
1292 
1293 class basic_set {
1294   friend inline basic_set manage(__isl_take isl_basic_set *ptr);
1295   friend inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
1296 
1297 protected:
1298   isl_basic_set *ptr = nullptr;
1299 
1300   inline explicit basic_set(__isl_take isl_basic_set *ptr);
1301 
1302 public:
1303   inline /* implicit */ basic_set();
1304   inline /* implicit */ basic_set(const basic_set &obj);
1305   inline /* implicit */ basic_set(isl::checked::point pnt);
1306   inline explicit basic_set(isl::checked::ctx ctx, const std::string &str);
1307   inline basic_set &operator=(basic_set obj);
1308   inline ~basic_set();
1309   inline __isl_give isl_basic_set *copy() const &;
1310   inline __isl_give isl_basic_set *copy() && = delete;
1311   inline __isl_keep isl_basic_set *get() const;
1312   inline __isl_give isl_basic_set *release();
1313   inline bool is_null() const;
1314   inline isl::checked::ctx ctx() const;
1315 
1316   inline isl::checked::basic_set affine_hull() const;
1317   inline isl::checked::basic_set apply(isl::checked::basic_map bmap) const;
1318   inline isl::checked::basic_set detect_equalities() const;
1319   inline isl::checked::val dim_max_val(int pos) const;
1320   inline isl::checked::basic_set flatten() const;
1321   inline isl::checked::basic_set gist(isl::checked::basic_set context) const;
1322   inline isl::checked::basic_set intersect(isl::checked::basic_set bset2) const;
1323   inline isl::checked::basic_set intersect_params(isl::checked::basic_set bset2) const;
1324   inline boolean is_empty() const;
1325   inline boolean is_equal(const isl::checked::basic_set &bset2) const;
1326   inline boolean is_subset(const isl::checked::basic_set &bset2) const;
1327   inline boolean is_wrapping() const;
1328   inline isl::checked::set lexmax() const;
1329   inline isl::checked::set lexmin() const;
1330   inline isl::checked::basic_set params() const;
1331   inline isl::checked::basic_set sample() const;
1332   inline isl::checked::point sample_point() const;
1333   inline isl::checked::set unite(isl::checked::basic_set bset2) const;
1334 };
1335 
1336 // declarations for isl::fixed_box
1337 inline fixed_box manage(__isl_take isl_fixed_box *ptr);
1338 inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
1339 
1340 class fixed_box {
1341   friend inline fixed_box manage(__isl_take isl_fixed_box *ptr);
1342   friend inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
1343 
1344 protected:
1345   isl_fixed_box *ptr = nullptr;
1346 
1347   inline explicit fixed_box(__isl_take isl_fixed_box *ptr);
1348 
1349 public:
1350   inline /* implicit */ fixed_box();
1351   inline /* implicit */ fixed_box(const fixed_box &obj);
1352   inline fixed_box &operator=(fixed_box obj);
1353   inline ~fixed_box();
1354   inline __isl_give isl_fixed_box *copy() const &;
1355   inline __isl_give isl_fixed_box *copy() && = delete;
1356   inline __isl_keep isl_fixed_box *get() const;
1357   inline __isl_give isl_fixed_box *release();
1358   inline bool is_null() const;
1359   inline isl::checked::ctx ctx() const;
1360 
1361   inline isl::checked::multi_aff offset() const;
1362   inline isl::checked::multi_aff get_offset() const;
1363   inline isl::checked::multi_val size() const;
1364   inline isl::checked::multi_val get_size() const;
1365   inline isl::checked::space space() const;
1366   inline isl::checked::space get_space() const;
1367   inline boolean is_valid() const;
1368 };
1369 
1370 // declarations for isl::id
1371 inline id manage(__isl_take isl_id *ptr);
1372 inline id manage_copy(__isl_keep isl_id *ptr);
1373 
1374 class id {
1375   friend inline id manage(__isl_take isl_id *ptr);
1376   friend inline id manage_copy(__isl_keep isl_id *ptr);
1377 
1378 protected:
1379   isl_id *ptr = nullptr;
1380 
1381   inline explicit id(__isl_take isl_id *ptr);
1382 
1383 public:
1384   inline /* implicit */ id();
1385   inline /* implicit */ id(const id &obj);
1386   inline explicit id(isl::checked::ctx ctx, const std::string &str);
1387   inline id &operator=(id obj);
1388   inline ~id();
1389   inline __isl_give isl_id *copy() const &;
1390   inline __isl_give isl_id *copy() && = delete;
1391   inline __isl_keep isl_id *get() const;
1392   inline __isl_give isl_id *release();
1393   inline bool is_null() const;
1394   inline isl::checked::ctx ctx() const;
1395 
1396   inline std::string name() const;
1397   inline std::string get_name() const;
1398 };
1399 
1400 // declarations for isl::id_list
1401 inline id_list manage(__isl_take isl_id_list *ptr);
1402 inline id_list manage_copy(__isl_keep isl_id_list *ptr);
1403 
1404 class id_list {
1405   friend inline id_list manage(__isl_take isl_id_list *ptr);
1406   friend inline id_list manage_copy(__isl_keep isl_id_list *ptr);
1407 
1408 protected:
1409   isl_id_list *ptr = nullptr;
1410 
1411   inline explicit id_list(__isl_take isl_id_list *ptr);
1412 
1413 public:
1414   inline /* implicit */ id_list();
1415   inline /* implicit */ id_list(const id_list &obj);
1416   inline explicit id_list(isl::checked::ctx ctx, int n);
1417   inline explicit id_list(isl::checked::id el);
1418   inline id_list &operator=(id_list obj);
1419   inline ~id_list();
1420   inline __isl_give isl_id_list *copy() const &;
1421   inline __isl_give isl_id_list *copy() && = delete;
1422   inline __isl_keep isl_id_list *get() const;
1423   inline __isl_give isl_id_list *release();
1424   inline bool is_null() const;
1425   inline isl::checked::ctx ctx() const;
1426 
1427   inline isl::checked::id_list add(isl::checked::id el) const;
1428   inline isl::checked::id_list add(const std::string &el) const;
1429   inline isl::checked::id_list clear() const;
1430   inline isl::checked::id_list concat(isl::checked::id_list list2) const;
1431   inline isl::checked::id_list drop(unsigned int first, unsigned int n) const;
1432   inline stat foreach(const std::function<stat(isl::checked::id)> &fn) const;
1433   inline isl::checked::id at(int index) const;
1434   inline isl::checked::id get_at(int index) const;
1435   inline isl::checked::id_list insert(unsigned int pos, isl::checked::id el) const;
1436   inline isl::checked::id_list insert(unsigned int pos, const std::string &el) const;
1437   inline class size size() const;
1438 };
1439 
1440 // declarations for isl::map
1441 inline map manage(__isl_take isl_map *ptr);
1442 inline map manage_copy(__isl_keep isl_map *ptr);
1443 
1444 class map {
1445   friend inline map manage(__isl_take isl_map *ptr);
1446   friend inline map manage_copy(__isl_keep isl_map *ptr);
1447 
1448 protected:
1449   isl_map *ptr = nullptr;
1450 
1451   inline explicit map(__isl_take isl_map *ptr);
1452 
1453 public:
1454   inline /* implicit */ map();
1455   inline /* implicit */ map(const map &obj);
1456   inline /* implicit */ map(isl::checked::basic_map bmap);
1457   inline explicit map(isl::checked::ctx ctx, const std::string &str);
1458   inline map &operator=(map obj);
1459   inline ~map();
1460   inline __isl_give isl_map *copy() const &;
1461   inline __isl_give isl_map *copy() && = delete;
1462   inline __isl_keep isl_map *get() const;
1463   inline __isl_give isl_map *release();
1464   inline bool is_null() const;
1465   inline isl::checked::ctx ctx() const;
1466 
1467   inline isl::checked::basic_map affine_hull() const;
1468   inline isl::checked::map apply_domain(isl::checked::map map2) const;
1469   inline isl::checked::map apply_range(isl::checked::map map2) const;
1470   inline isl::checked::set bind_domain(isl::checked::multi_id tuple) const;
1471   inline isl::checked::set bind_range(isl::checked::multi_id tuple) const;
1472   inline isl::checked::map coalesce() const;
1473   inline isl::checked::map complement() const;
1474   inline isl::checked::map curry() const;
1475   inline isl::checked::set deltas() const;
1476   inline isl::checked::map detect_equalities() const;
1477   inline isl::checked::set domain() const;
1478   inline isl::checked::map domain_factor_domain() const;
1479   inline isl::checked::map domain_factor_range() const;
1480   inline isl::checked::map domain_product(isl::checked::map map2) const;
1481   static inline isl::checked::map empty(isl::checked::space space);
1482   inline isl::checked::map eq_at(isl::checked::multi_pw_aff mpa) const;
1483   inline isl::checked::map factor_domain() const;
1484   inline isl::checked::map factor_range() const;
1485   inline isl::checked::map flatten() const;
1486   inline isl::checked::map flatten_domain() const;
1487   inline isl::checked::map flatten_range() const;
1488   inline stat foreach_basic_map(const std::function<stat(isl::checked::basic_map)> &fn) const;
1489   inline isl::checked::fixed_box range_simple_fixed_box_hull() const;
1490   inline isl::checked::fixed_box get_range_simple_fixed_box_hull() const;
1491   inline isl::checked::space space() const;
1492   inline isl::checked::space get_space() const;
1493   inline isl::checked::map gist(isl::checked::map context) const;
1494   inline isl::checked::map gist_domain(isl::checked::set context) const;
1495   inline isl::checked::map intersect(isl::checked::map map2) const;
1496   inline isl::checked::map intersect_domain(isl::checked::set set) const;
1497   inline isl::checked::map intersect_domain_factor_domain(isl::checked::map factor) const;
1498   inline isl::checked::map intersect_domain_factor_range(isl::checked::map factor) const;
1499   inline isl::checked::map intersect_params(isl::checked::set params) const;
1500   inline isl::checked::map intersect_range(isl::checked::set set) const;
1501   inline isl::checked::map intersect_range_factor_domain(isl::checked::map factor) const;
1502   inline isl::checked::map intersect_range_factor_range(isl::checked::map factor) const;
1503   inline boolean is_bijective() const;
1504   inline boolean is_disjoint(const isl::checked::map &map2) const;
1505   inline boolean is_empty() const;
1506   inline boolean is_equal(const isl::checked::map &map2) const;
1507   inline boolean is_injective() const;
1508   inline boolean is_single_valued() const;
1509   inline boolean is_strict_subset(const isl::checked::map &map2) const;
1510   inline boolean is_subset(const isl::checked::map &map2) const;
1511   inline isl::checked::map lex_ge_at(isl::checked::multi_pw_aff mpa) const;
1512   inline isl::checked::map lex_gt_at(isl::checked::multi_pw_aff mpa) const;
1513   inline isl::checked::map lex_le_at(isl::checked::multi_pw_aff mpa) const;
1514   inline isl::checked::map lex_lt_at(isl::checked::multi_pw_aff mpa) const;
1515   inline isl::checked::map lexmax() const;
1516   inline isl::checked::pw_multi_aff lexmax_pw_multi_aff() const;
1517   inline isl::checked::map lexmin() const;
1518   inline isl::checked::pw_multi_aff lexmin_pw_multi_aff() const;
1519   inline isl::checked::map lower_bound(isl::checked::multi_pw_aff lower) const;
1520   inline isl::checked::multi_pw_aff max_multi_pw_aff() const;
1521   inline isl::checked::multi_pw_aff min_multi_pw_aff() const;
1522   inline isl::checked::basic_map polyhedral_hull() const;
1523   inline isl::checked::map preimage_domain(isl::checked::multi_aff ma) const;
1524   inline isl::checked::map preimage_domain(isl::checked::multi_pw_aff mpa) const;
1525   inline isl::checked::map preimage_domain(isl::checked::pw_multi_aff pma) const;
1526   inline isl::checked::map preimage_range(isl::checked::multi_aff ma) const;
1527   inline isl::checked::map preimage_range(isl::checked::pw_multi_aff pma) const;
1528   inline isl::checked::map product(isl::checked::map map2) const;
1529   inline isl::checked::map project_out_all_params() const;
1530   inline isl::checked::set range() const;
1531   inline isl::checked::map range_factor_domain() const;
1532   inline isl::checked::map range_factor_range() const;
1533   inline isl::checked::map range_product(isl::checked::map map2) const;
1534   inline isl::checked::map range_reverse() const;
1535   inline isl::checked::map reverse() const;
1536   inline isl::checked::basic_map sample() const;
1537   inline isl::checked::map subtract(isl::checked::map map2) const;
1538   inline isl::checked::map uncurry() const;
1539   inline isl::checked::map unite(isl::checked::map map2) const;
1540   static inline isl::checked::map universe(isl::checked::space space);
1541   inline isl::checked::basic_map unshifted_simple_hull() const;
1542   inline isl::checked::map upper_bound(isl::checked::multi_pw_aff upper) const;
1543   inline isl::checked::set wrap() const;
1544   inline isl::checked::map zip() const;
1545 };
1546 
1547 // declarations for isl::multi_aff
1548 inline multi_aff manage(__isl_take isl_multi_aff *ptr);
1549 inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
1550 
1551 class multi_aff {
1552   friend inline multi_aff manage(__isl_take isl_multi_aff *ptr);
1553   friend inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
1554 
1555 protected:
1556   isl_multi_aff *ptr = nullptr;
1557 
1558   inline explicit multi_aff(__isl_take isl_multi_aff *ptr);
1559 
1560 public:
1561   inline /* implicit */ multi_aff();
1562   inline /* implicit */ multi_aff(const multi_aff &obj);
1563   inline /* implicit */ multi_aff(isl::checked::aff aff);
1564   inline explicit multi_aff(isl::checked::space space, isl::checked::aff_list list);
1565   inline explicit multi_aff(isl::checked::ctx ctx, const std::string &str);
1566   inline multi_aff &operator=(multi_aff obj);
1567   inline ~multi_aff();
1568   inline __isl_give isl_multi_aff *copy() const &;
1569   inline __isl_give isl_multi_aff *copy() && = delete;
1570   inline __isl_keep isl_multi_aff *get() const;
1571   inline __isl_give isl_multi_aff *release();
1572   inline bool is_null() const;
1573   inline isl::checked::ctx ctx() const;
1574 
1575   inline isl::checked::multi_aff add(isl::checked::multi_aff multi2) const;
1576   inline isl::checked::multi_aff add_constant(isl::checked::multi_val mv) const;
1577   inline isl::checked::multi_aff add_constant(isl::checked::val v) const;
1578   inline isl::checked::multi_aff add_constant(long v) const;
1579   inline isl::checked::basic_set bind(isl::checked::multi_id tuple) const;
1580   inline isl::checked::multi_aff bind_domain(isl::checked::multi_id tuple) const;
1581   inline isl::checked::multi_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
1582   static inline isl::checked::multi_aff domain_map(isl::checked::space space);
1583   inline isl::checked::multi_aff flat_range_product(isl::checked::multi_aff multi2) const;
1584   inline isl::checked::multi_aff floor() const;
1585   inline isl::checked::aff at(int pos) const;
1586   inline isl::checked::aff get_at(int pos) const;
1587   inline isl::checked::multi_val constant_multi_val() const;
1588   inline isl::checked::multi_val get_constant_multi_val() const;
1589   inline isl::checked::aff_list list() const;
1590   inline isl::checked::aff_list get_list() const;
1591   inline isl::checked::space space() const;
1592   inline isl::checked::space get_space() const;
1593   inline isl::checked::multi_aff gist(isl::checked::set context) const;
1594   inline isl::checked::multi_aff identity() const;
1595   static inline isl::checked::multi_aff identity_on_domain(isl::checked::space space);
1596   inline isl::checked::multi_aff insert_domain(isl::checked::space domain) const;
1597   inline boolean involves_locals() const;
1598   inline boolean involves_nan() const;
1599   inline isl::checked::multi_aff neg() const;
1600   inline boolean plain_is_equal(const isl::checked::multi_aff &multi2) const;
1601   inline isl::checked::multi_aff product(isl::checked::multi_aff multi2) const;
1602   inline isl::checked::multi_aff pullback(isl::checked::multi_aff ma2) const;
1603   static inline isl::checked::multi_aff range_map(isl::checked::space space);
1604   inline isl::checked::multi_aff range_product(isl::checked::multi_aff multi2) const;
1605   inline isl::checked::multi_aff scale(isl::checked::multi_val mv) const;
1606   inline isl::checked::multi_aff scale(isl::checked::val v) const;
1607   inline isl::checked::multi_aff scale(long v) const;
1608   inline isl::checked::multi_aff scale_down(isl::checked::multi_val mv) const;
1609   inline isl::checked::multi_aff scale_down(isl::checked::val v) const;
1610   inline isl::checked::multi_aff scale_down(long v) const;
1611   inline isl::checked::multi_aff set_at(int pos, isl::checked::aff el) const;
1612   inline class size size() const;
1613   inline isl::checked::multi_aff sub(isl::checked::multi_aff multi2) const;
1614   inline isl::checked::multi_aff unbind_params_insert_domain(isl::checked::multi_id domain) const;
1615   static inline isl::checked::multi_aff zero(isl::checked::space space);
1616 };
1617 
1618 // declarations for isl::multi_id
1619 inline multi_id manage(__isl_take isl_multi_id *ptr);
1620 inline multi_id manage_copy(__isl_keep isl_multi_id *ptr);
1621 
1622 class multi_id {
1623   friend inline multi_id manage(__isl_take isl_multi_id *ptr);
1624   friend inline multi_id manage_copy(__isl_keep isl_multi_id *ptr);
1625 
1626 protected:
1627   isl_multi_id *ptr = nullptr;
1628 
1629   inline explicit multi_id(__isl_take isl_multi_id *ptr);
1630 
1631 public:
1632   inline /* implicit */ multi_id();
1633   inline /* implicit */ multi_id(const multi_id &obj);
1634   inline explicit multi_id(isl::checked::space space, isl::checked::id_list list);
1635   inline explicit multi_id(isl::checked::ctx ctx, const std::string &str);
1636   inline multi_id &operator=(multi_id obj);
1637   inline ~multi_id();
1638   inline __isl_give isl_multi_id *copy() const &;
1639   inline __isl_give isl_multi_id *copy() && = delete;
1640   inline __isl_keep isl_multi_id *get() const;
1641   inline __isl_give isl_multi_id *release();
1642   inline bool is_null() const;
1643   inline isl::checked::ctx ctx() const;
1644 
1645   inline isl::checked::multi_id flat_range_product(isl::checked::multi_id multi2) const;
1646   inline isl::checked::id at(int pos) const;
1647   inline isl::checked::id get_at(int pos) const;
1648   inline isl::checked::id_list list() const;
1649   inline isl::checked::id_list get_list() const;
1650   inline isl::checked::space space() const;
1651   inline isl::checked::space get_space() const;
1652   inline boolean plain_is_equal(const isl::checked::multi_id &multi2) const;
1653   inline isl::checked::multi_id range_product(isl::checked::multi_id multi2) const;
1654   inline isl::checked::multi_id set_at(int pos, isl::checked::id el) const;
1655   inline isl::checked::multi_id set_at(int pos, const std::string &el) const;
1656   inline class size size() const;
1657 };
1658 
1659 // declarations for isl::multi_pw_aff
1660 inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
1661 inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
1662 
1663 class multi_pw_aff {
1664   friend inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
1665   friend inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
1666 
1667 protected:
1668   isl_multi_pw_aff *ptr = nullptr;
1669 
1670   inline explicit multi_pw_aff(__isl_take isl_multi_pw_aff *ptr);
1671 
1672 public:
1673   inline /* implicit */ multi_pw_aff();
1674   inline /* implicit */ multi_pw_aff(const multi_pw_aff &obj);
1675   inline /* implicit */ multi_pw_aff(isl::checked::aff aff);
1676   inline /* implicit */ multi_pw_aff(isl::checked::multi_aff ma);
1677   inline /* implicit */ multi_pw_aff(isl::checked::pw_aff pa);
1678   inline explicit multi_pw_aff(isl::checked::space space, isl::checked::pw_aff_list list);
1679   inline /* implicit */ multi_pw_aff(isl::checked::pw_multi_aff pma);
1680   inline explicit multi_pw_aff(isl::checked::ctx ctx, const std::string &str);
1681   inline multi_pw_aff &operator=(multi_pw_aff obj);
1682   inline ~multi_pw_aff();
1683   inline __isl_give isl_multi_pw_aff *copy() const &;
1684   inline __isl_give isl_multi_pw_aff *copy() && = delete;
1685   inline __isl_keep isl_multi_pw_aff *get() const;
1686   inline __isl_give isl_multi_pw_aff *release();
1687   inline bool is_null() const;
1688   inline isl::checked::ctx ctx() const;
1689 
1690   inline isl::checked::multi_pw_aff add(isl::checked::multi_pw_aff multi2) const;
1691   inline isl::checked::multi_pw_aff add_constant(isl::checked::multi_val mv) const;
1692   inline isl::checked::multi_pw_aff add_constant(isl::checked::val v) const;
1693   inline isl::checked::multi_pw_aff add_constant(long v) const;
1694   inline isl::checked::set bind(isl::checked::multi_id tuple) const;
1695   inline isl::checked::multi_pw_aff bind_domain(isl::checked::multi_id tuple) const;
1696   inline isl::checked::multi_pw_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
1697   inline isl::checked::multi_pw_aff coalesce() const;
1698   inline isl::checked::set domain() const;
1699   inline isl::checked::multi_pw_aff flat_range_product(isl::checked::multi_pw_aff multi2) const;
1700   inline isl::checked::pw_aff at(int pos) const;
1701   inline isl::checked::pw_aff get_at(int pos) const;
1702   inline isl::checked::pw_aff_list list() const;
1703   inline isl::checked::pw_aff_list get_list() const;
1704   inline isl::checked::space space() const;
1705   inline isl::checked::space get_space() const;
1706   inline isl::checked::multi_pw_aff gist(isl::checked::set set) const;
1707   inline isl::checked::multi_pw_aff identity() const;
1708   static inline isl::checked::multi_pw_aff identity_on_domain(isl::checked::space space);
1709   inline isl::checked::multi_pw_aff insert_domain(isl::checked::space domain) const;
1710   inline isl::checked::multi_pw_aff intersect_domain(isl::checked::set domain) const;
1711   inline isl::checked::multi_pw_aff intersect_params(isl::checked::set set) const;
1712   inline boolean involves_nan() const;
1713   inline boolean involves_param(const isl::checked::id &id) const;
1714   inline boolean involves_param(const std::string &id) const;
1715   inline boolean involves_param(const isl::checked::id_list &list) const;
1716   inline isl::checked::multi_pw_aff max(isl::checked::multi_pw_aff multi2) const;
1717   inline isl::checked::multi_val max_multi_val() const;
1718   inline isl::checked::multi_pw_aff min(isl::checked::multi_pw_aff multi2) const;
1719   inline isl::checked::multi_val min_multi_val() const;
1720   inline isl::checked::multi_pw_aff neg() const;
1721   inline boolean plain_is_equal(const isl::checked::multi_pw_aff &multi2) const;
1722   inline isl::checked::multi_pw_aff product(isl::checked::multi_pw_aff multi2) const;
1723   inline isl::checked::multi_pw_aff pullback(isl::checked::multi_aff ma) const;
1724   inline isl::checked::multi_pw_aff pullback(isl::checked::multi_pw_aff mpa2) const;
1725   inline isl::checked::multi_pw_aff pullback(isl::checked::pw_multi_aff pma) const;
1726   inline isl::checked::multi_pw_aff range_product(isl::checked::multi_pw_aff multi2) const;
1727   inline isl::checked::multi_pw_aff scale(isl::checked::multi_val mv) const;
1728   inline isl::checked::multi_pw_aff scale(isl::checked::val v) const;
1729   inline isl::checked::multi_pw_aff scale(long v) const;
1730   inline isl::checked::multi_pw_aff scale_down(isl::checked::multi_val mv) const;
1731   inline isl::checked::multi_pw_aff scale_down(isl::checked::val v) const;
1732   inline isl::checked::multi_pw_aff scale_down(long v) const;
1733   inline isl::checked::multi_pw_aff set_at(int pos, isl::checked::pw_aff el) const;
1734   inline class size size() const;
1735   inline isl::checked::multi_pw_aff sub(isl::checked::multi_pw_aff multi2) const;
1736   inline isl::checked::multi_pw_aff unbind_params_insert_domain(isl::checked::multi_id domain) const;
1737   inline isl::checked::multi_pw_aff union_add(isl::checked::multi_pw_aff mpa2) const;
1738   static inline isl::checked::multi_pw_aff zero(isl::checked::space space);
1739 };
1740 
1741 // declarations for isl::multi_union_pw_aff
1742 inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
1743 inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
1744 
1745 class multi_union_pw_aff {
1746   friend inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
1747   friend inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
1748 
1749 protected:
1750   isl_multi_union_pw_aff *ptr = nullptr;
1751 
1752   inline explicit multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr);
1753 
1754 public:
1755   inline /* implicit */ multi_union_pw_aff();
1756   inline /* implicit */ multi_union_pw_aff(const multi_union_pw_aff &obj);
1757   inline /* implicit */ multi_union_pw_aff(isl::checked::multi_pw_aff mpa);
1758   inline /* implicit */ multi_union_pw_aff(isl::checked::union_pw_aff upa);
1759   inline explicit multi_union_pw_aff(isl::checked::space space, isl::checked::union_pw_aff_list list);
1760   inline explicit multi_union_pw_aff(isl::checked::ctx ctx, const std::string &str);
1761   inline multi_union_pw_aff &operator=(multi_union_pw_aff obj);
1762   inline ~multi_union_pw_aff();
1763   inline __isl_give isl_multi_union_pw_aff *copy() const &;
1764   inline __isl_give isl_multi_union_pw_aff *copy() && = delete;
1765   inline __isl_keep isl_multi_union_pw_aff *get() const;
1766   inline __isl_give isl_multi_union_pw_aff *release();
1767   inline bool is_null() const;
1768   inline isl::checked::ctx ctx() const;
1769 
1770   inline isl::checked::multi_union_pw_aff add(isl::checked::multi_union_pw_aff multi2) const;
1771   inline isl::checked::union_set bind(isl::checked::multi_id tuple) const;
1772   inline isl::checked::multi_union_pw_aff coalesce() const;
1773   inline isl::checked::union_set domain() const;
1774   inline isl::checked::multi_union_pw_aff flat_range_product(isl::checked::multi_union_pw_aff multi2) const;
1775   inline isl::checked::union_pw_aff at(int pos) const;
1776   inline isl::checked::union_pw_aff get_at(int pos) const;
1777   inline isl::checked::union_pw_aff_list list() const;
1778   inline isl::checked::union_pw_aff_list get_list() const;
1779   inline isl::checked::space space() const;
1780   inline isl::checked::space get_space() const;
1781   inline isl::checked::multi_union_pw_aff gist(isl::checked::union_set context) const;
1782   inline isl::checked::multi_union_pw_aff intersect_domain(isl::checked::union_set uset) const;
1783   inline isl::checked::multi_union_pw_aff intersect_params(isl::checked::set params) const;
1784   inline boolean involves_nan() const;
1785   inline isl::checked::multi_union_pw_aff neg() const;
1786   inline boolean plain_is_equal(const isl::checked::multi_union_pw_aff &multi2) const;
1787   inline isl::checked::multi_union_pw_aff pullback(isl::checked::union_pw_multi_aff upma) const;
1788   inline isl::checked::multi_union_pw_aff range_product(isl::checked::multi_union_pw_aff multi2) const;
1789   inline isl::checked::multi_union_pw_aff scale(isl::checked::multi_val mv) const;
1790   inline isl::checked::multi_union_pw_aff scale(isl::checked::val v) const;
1791   inline isl::checked::multi_union_pw_aff scale(long v) const;
1792   inline isl::checked::multi_union_pw_aff scale_down(isl::checked::multi_val mv) const;
1793   inline isl::checked::multi_union_pw_aff scale_down(isl::checked::val v) const;
1794   inline isl::checked::multi_union_pw_aff scale_down(long v) const;
1795   inline isl::checked::multi_union_pw_aff set_at(int pos, isl::checked::union_pw_aff el) const;
1796   inline class size size() const;
1797   inline isl::checked::multi_union_pw_aff sub(isl::checked::multi_union_pw_aff multi2) const;
1798   inline isl::checked::multi_union_pw_aff union_add(isl::checked::multi_union_pw_aff mupa2) const;
1799   static inline isl::checked::multi_union_pw_aff zero(isl::checked::space space);
1800 };
1801 
1802 // declarations for isl::multi_val
1803 inline multi_val manage(__isl_take isl_multi_val *ptr);
1804 inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
1805 
1806 class multi_val {
1807   friend inline multi_val manage(__isl_take isl_multi_val *ptr);
1808   friend inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
1809 
1810 protected:
1811   isl_multi_val *ptr = nullptr;
1812 
1813   inline explicit multi_val(__isl_take isl_multi_val *ptr);
1814 
1815 public:
1816   inline /* implicit */ multi_val();
1817   inline /* implicit */ multi_val(const multi_val &obj);
1818   inline explicit multi_val(isl::checked::space space, isl::checked::val_list list);
1819   inline explicit multi_val(isl::checked::ctx ctx, const std::string &str);
1820   inline multi_val &operator=(multi_val obj);
1821   inline ~multi_val();
1822   inline __isl_give isl_multi_val *copy() const &;
1823   inline __isl_give isl_multi_val *copy() && = delete;
1824   inline __isl_keep isl_multi_val *get() const;
1825   inline __isl_give isl_multi_val *release();
1826   inline bool is_null() const;
1827   inline isl::checked::ctx ctx() const;
1828 
1829   inline isl::checked::multi_val add(isl::checked::multi_val multi2) const;
1830   inline isl::checked::multi_val add(isl::checked::val v) const;
1831   inline isl::checked::multi_val add(long v) const;
1832   inline isl::checked::multi_val flat_range_product(isl::checked::multi_val multi2) const;
1833   inline isl::checked::val at(int pos) const;
1834   inline isl::checked::val get_at(int pos) const;
1835   inline isl::checked::val_list list() const;
1836   inline isl::checked::val_list get_list() const;
1837   inline isl::checked::space space() const;
1838   inline isl::checked::space get_space() const;
1839   inline boolean involves_nan() const;
1840   inline isl::checked::multi_val max(isl::checked::multi_val multi2) const;
1841   inline isl::checked::multi_val min(isl::checked::multi_val multi2) const;
1842   inline isl::checked::multi_val neg() const;
1843   inline boolean plain_is_equal(const isl::checked::multi_val &multi2) const;
1844   inline isl::checked::multi_val product(isl::checked::multi_val multi2) const;
1845   inline isl::checked::multi_val range_product(isl::checked::multi_val multi2) const;
1846   inline isl::checked::multi_val scale(isl::checked::multi_val mv) const;
1847   inline isl::checked::multi_val scale(isl::checked::val v) const;
1848   inline isl::checked::multi_val scale(long v) const;
1849   inline isl::checked::multi_val scale_down(isl::checked::multi_val mv) const;
1850   inline isl::checked::multi_val scale_down(isl::checked::val v) const;
1851   inline isl::checked::multi_val scale_down(long v) const;
1852   inline isl::checked::multi_val set_at(int pos, isl::checked::val el) const;
1853   inline isl::checked::multi_val set_at(int pos, long el) const;
1854   inline class size size() const;
1855   inline isl::checked::multi_val sub(isl::checked::multi_val multi2) const;
1856   static inline isl::checked::multi_val zero(isl::checked::space space);
1857 };
1858 
1859 // declarations for isl::point
1860 inline point manage(__isl_take isl_point *ptr);
1861 inline point manage_copy(__isl_keep isl_point *ptr);
1862 
1863 class point {
1864   friend inline point manage(__isl_take isl_point *ptr);
1865   friend inline point manage_copy(__isl_keep isl_point *ptr);
1866 
1867 protected:
1868   isl_point *ptr = nullptr;
1869 
1870   inline explicit point(__isl_take isl_point *ptr);
1871 
1872 public:
1873   inline /* implicit */ point();
1874   inline /* implicit */ point(const point &obj);
1875   inline point &operator=(point obj);
1876   inline ~point();
1877   inline __isl_give isl_point *copy() const &;
1878   inline __isl_give isl_point *copy() && = delete;
1879   inline __isl_keep isl_point *get() const;
1880   inline __isl_give isl_point *release();
1881   inline bool is_null() const;
1882   inline isl::checked::ctx ctx() const;
1883 
1884   inline isl::checked::multi_val multi_val() const;
1885   inline isl::checked::multi_val get_multi_val() const;
1886 };
1887 
1888 // declarations for isl::pw_aff
1889 inline pw_aff manage(__isl_take isl_pw_aff *ptr);
1890 inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
1891 
1892 class pw_aff {
1893   friend inline pw_aff manage(__isl_take isl_pw_aff *ptr);
1894   friend inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
1895 
1896 protected:
1897   isl_pw_aff *ptr = nullptr;
1898 
1899   inline explicit pw_aff(__isl_take isl_pw_aff *ptr);
1900 
1901 public:
1902   inline /* implicit */ pw_aff();
1903   inline /* implicit */ pw_aff(const pw_aff &obj);
1904   inline /* implicit */ pw_aff(isl::checked::aff aff);
1905   inline explicit pw_aff(isl::checked::ctx ctx, const std::string &str);
1906   inline pw_aff &operator=(pw_aff obj);
1907   inline ~pw_aff();
1908   inline __isl_give isl_pw_aff *copy() const &;
1909   inline __isl_give isl_pw_aff *copy() && = delete;
1910   inline __isl_keep isl_pw_aff *get() const;
1911   inline __isl_give isl_pw_aff *release();
1912   inline bool is_null() const;
1913   inline isl::checked::ctx ctx() const;
1914 
1915   inline isl::checked::pw_aff add(isl::checked::pw_aff pwaff2) const;
1916   inline isl::checked::pw_aff add_constant(isl::checked::val v) const;
1917   inline isl::checked::pw_aff add_constant(long v) const;
1918   inline isl::checked::aff as_aff() const;
1919   inline isl::checked::set bind(isl::checked::id id) const;
1920   inline isl::checked::set bind(const std::string &id) const;
1921   inline isl::checked::pw_aff bind_domain(isl::checked::multi_id tuple) const;
1922   inline isl::checked::pw_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
1923   inline isl::checked::pw_aff ceil() const;
1924   inline isl::checked::pw_aff coalesce() const;
1925   inline isl::checked::pw_aff cond(isl::checked::pw_aff pwaff_true, isl::checked::pw_aff pwaff_false) const;
1926   inline isl::checked::pw_aff div(isl::checked::pw_aff pa2) const;
1927   inline isl::checked::set domain() const;
1928   inline isl::checked::set eq_set(isl::checked::pw_aff pwaff2) const;
1929   inline isl::checked::val eval(isl::checked::point pnt) const;
1930   inline isl::checked::pw_aff floor() const;
1931   inline isl::checked::set ge_set(isl::checked::pw_aff pwaff2) const;
1932   inline isl::checked::pw_aff gist(isl::checked::set context) const;
1933   inline isl::checked::set gt_set(isl::checked::pw_aff pwaff2) const;
1934   inline isl::checked::pw_aff insert_domain(isl::checked::space domain) const;
1935   inline isl::checked::pw_aff intersect_domain(isl::checked::set set) const;
1936   inline isl::checked::pw_aff intersect_params(isl::checked::set set) const;
1937   inline boolean isa_aff() const;
1938   inline isl::checked::set le_set(isl::checked::pw_aff pwaff2) const;
1939   inline isl::checked::set lt_set(isl::checked::pw_aff pwaff2) const;
1940   inline isl::checked::pw_aff max(isl::checked::pw_aff pwaff2) const;
1941   inline isl::checked::pw_aff min(isl::checked::pw_aff pwaff2) const;
1942   inline isl::checked::pw_aff mod(isl::checked::val mod) const;
1943   inline isl::checked::pw_aff mod(long mod) const;
1944   inline isl::checked::pw_aff mul(isl::checked::pw_aff pwaff2) const;
1945   inline isl::checked::set ne_set(isl::checked::pw_aff pwaff2) const;
1946   inline isl::checked::pw_aff neg() const;
1947   static inline isl::checked::pw_aff param_on_domain(isl::checked::set domain, isl::checked::id id);
1948   inline isl::checked::pw_aff pullback(isl::checked::multi_aff ma) const;
1949   inline isl::checked::pw_aff pullback(isl::checked::multi_pw_aff mpa) const;
1950   inline isl::checked::pw_aff pullback(isl::checked::pw_multi_aff pma) const;
1951   inline isl::checked::pw_aff scale(isl::checked::val v) const;
1952   inline isl::checked::pw_aff scale(long v) const;
1953   inline isl::checked::pw_aff scale_down(isl::checked::val f) const;
1954   inline isl::checked::pw_aff scale_down(long f) const;
1955   inline isl::checked::pw_aff sub(isl::checked::pw_aff pwaff2) const;
1956   inline isl::checked::pw_aff subtract_domain(isl::checked::set set) const;
1957   inline isl::checked::pw_aff tdiv_q(isl::checked::pw_aff pa2) const;
1958   inline isl::checked::pw_aff tdiv_r(isl::checked::pw_aff pa2) const;
1959   inline isl::checked::pw_aff union_add(isl::checked::pw_aff pwaff2) const;
1960 };
1961 
1962 // declarations for isl::pw_aff_list
1963 inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
1964 inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
1965 
1966 class pw_aff_list {
1967   friend inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
1968   friend inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
1969 
1970 protected:
1971   isl_pw_aff_list *ptr = nullptr;
1972 
1973   inline explicit pw_aff_list(__isl_take isl_pw_aff_list *ptr);
1974 
1975 public:
1976   inline /* implicit */ pw_aff_list();
1977   inline /* implicit */ pw_aff_list(const pw_aff_list &obj);
1978   inline explicit pw_aff_list(isl::checked::ctx ctx, int n);
1979   inline explicit pw_aff_list(isl::checked::pw_aff el);
1980   inline pw_aff_list &operator=(pw_aff_list obj);
1981   inline ~pw_aff_list();
1982   inline __isl_give isl_pw_aff_list *copy() const &;
1983   inline __isl_give isl_pw_aff_list *copy() && = delete;
1984   inline __isl_keep isl_pw_aff_list *get() const;
1985   inline __isl_give isl_pw_aff_list *release();
1986   inline bool is_null() const;
1987   inline isl::checked::ctx ctx() const;
1988 
1989   inline isl::checked::pw_aff_list add(isl::checked::pw_aff el) const;
1990   inline isl::checked::pw_aff_list clear() const;
1991   inline isl::checked::pw_aff_list concat(isl::checked::pw_aff_list list2) const;
1992   inline isl::checked::pw_aff_list drop(unsigned int first, unsigned int n) const;
1993   inline stat foreach(const std::function<stat(isl::checked::pw_aff)> &fn) const;
1994   inline isl::checked::pw_aff at(int index) const;
1995   inline isl::checked::pw_aff get_at(int index) const;
1996   inline isl::checked::pw_aff_list insert(unsigned int pos, isl::checked::pw_aff el) const;
1997   inline class size size() const;
1998 };
1999 
2000 // declarations for isl::pw_multi_aff
2001 inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
2002 inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
2003 
2004 class pw_multi_aff {
2005   friend inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
2006   friend inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
2007 
2008 protected:
2009   isl_pw_multi_aff *ptr = nullptr;
2010 
2011   inline explicit pw_multi_aff(__isl_take isl_pw_multi_aff *ptr);
2012 
2013 public:
2014   inline /* implicit */ pw_multi_aff();
2015   inline /* implicit */ pw_multi_aff(const pw_multi_aff &obj);
2016   inline /* implicit */ pw_multi_aff(isl::checked::multi_aff ma);
2017   inline /* implicit */ pw_multi_aff(isl::checked::pw_aff pa);
2018   inline explicit pw_multi_aff(isl::checked::ctx ctx, const std::string &str);
2019   inline pw_multi_aff &operator=(pw_multi_aff obj);
2020   inline ~pw_multi_aff();
2021   inline __isl_give isl_pw_multi_aff *copy() const &;
2022   inline __isl_give isl_pw_multi_aff *copy() && = delete;
2023   inline __isl_keep isl_pw_multi_aff *get() const;
2024   inline __isl_give isl_pw_multi_aff *release();
2025   inline bool is_null() const;
2026   inline isl::checked::ctx ctx() const;
2027 
2028   inline isl::checked::pw_multi_aff add(isl::checked::pw_multi_aff pma2) const;
2029   inline isl::checked::pw_multi_aff add_constant(isl::checked::multi_val mv) const;
2030   inline isl::checked::pw_multi_aff add_constant(isl::checked::val v) const;
2031   inline isl::checked::pw_multi_aff add_constant(long v) const;
2032   inline isl::checked::multi_aff as_multi_aff() const;
2033   inline isl::checked::pw_multi_aff bind_domain(isl::checked::multi_id tuple) const;
2034   inline isl::checked::pw_multi_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
2035   inline isl::checked::pw_multi_aff coalesce() const;
2036   inline isl::checked::set domain() const;
2037   static inline isl::checked::pw_multi_aff domain_map(isl::checked::space space);
2038   inline isl::checked::pw_multi_aff flat_range_product(isl::checked::pw_multi_aff pma2) const;
2039   inline stat foreach_piece(const std::function<stat(isl::checked::set, isl::checked::multi_aff)> &fn) const;
2040   inline isl::checked::space space() const;
2041   inline isl::checked::space get_space() const;
2042   inline isl::checked::pw_multi_aff gist(isl::checked::set set) const;
2043   static inline isl::checked::pw_multi_aff identity_on_domain(isl::checked::space space);
2044   inline isl::checked::pw_multi_aff insert_domain(isl::checked::space domain) const;
2045   inline isl::checked::pw_multi_aff intersect_domain(isl::checked::set set) const;
2046   inline isl::checked::pw_multi_aff intersect_params(isl::checked::set set) const;
2047   inline boolean involves_locals() const;
2048   inline boolean isa_multi_aff() const;
2049   inline isl::checked::multi_val max_multi_val() const;
2050   inline isl::checked::multi_val min_multi_val() const;
2051   inline class size n_piece() const;
2052   inline isl::checked::pw_multi_aff preimage_domain_wrapped_domain(isl::checked::pw_multi_aff pma2) const;
2053   inline isl::checked::pw_multi_aff product(isl::checked::pw_multi_aff pma2) const;
2054   inline isl::checked::pw_multi_aff pullback(isl::checked::multi_aff ma) const;
2055   inline isl::checked::pw_multi_aff pullback(isl::checked::pw_multi_aff pma2) const;
2056   inline isl::checked::pw_multi_aff range_factor_domain() const;
2057   inline isl::checked::pw_multi_aff range_factor_range() const;
2058   static inline isl::checked::pw_multi_aff range_map(isl::checked::space space);
2059   inline isl::checked::pw_multi_aff range_product(isl::checked::pw_multi_aff pma2) const;
2060   inline isl::checked::pw_multi_aff scale(isl::checked::val v) const;
2061   inline isl::checked::pw_multi_aff scale(long v) const;
2062   inline isl::checked::pw_multi_aff scale_down(isl::checked::val v) const;
2063   inline isl::checked::pw_multi_aff scale_down(long v) const;
2064   inline isl::checked::pw_multi_aff sub(isl::checked::pw_multi_aff pma2) const;
2065   inline isl::checked::pw_multi_aff subtract_domain(isl::checked::set set) const;
2066   inline isl::checked::pw_multi_aff union_add(isl::checked::pw_multi_aff pma2) const;
2067   static inline isl::checked::pw_multi_aff zero(isl::checked::space space);
2068 };
2069 
2070 // declarations for isl::pw_multi_aff_list
2071 inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
2072 inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
2073 
2074 class pw_multi_aff_list {
2075   friend inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
2076   friend inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
2077 
2078 protected:
2079   isl_pw_multi_aff_list *ptr = nullptr;
2080 
2081   inline explicit pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr);
2082 
2083 public:
2084   inline /* implicit */ pw_multi_aff_list();
2085   inline /* implicit */ pw_multi_aff_list(const pw_multi_aff_list &obj);
2086   inline explicit pw_multi_aff_list(isl::checked::ctx ctx, int n);
2087   inline explicit pw_multi_aff_list(isl::checked::pw_multi_aff el);
2088   inline pw_multi_aff_list &operator=(pw_multi_aff_list obj);
2089   inline ~pw_multi_aff_list();
2090   inline __isl_give isl_pw_multi_aff_list *copy() const &;
2091   inline __isl_give isl_pw_multi_aff_list *copy() && = delete;
2092   inline __isl_keep isl_pw_multi_aff_list *get() const;
2093   inline __isl_give isl_pw_multi_aff_list *release();
2094   inline bool is_null() const;
2095   inline isl::checked::ctx ctx() const;
2096 
2097   inline isl::checked::pw_multi_aff_list add(isl::checked::pw_multi_aff el) const;
2098   inline isl::checked::pw_multi_aff_list clear() const;
2099   inline isl::checked::pw_multi_aff_list concat(isl::checked::pw_multi_aff_list list2) const;
2100   inline isl::checked::pw_multi_aff_list drop(unsigned int first, unsigned int n) const;
2101   inline stat foreach(const std::function<stat(isl::checked::pw_multi_aff)> &fn) const;
2102   inline isl::checked::pw_multi_aff at(int index) const;
2103   inline isl::checked::pw_multi_aff get_at(int index) const;
2104   inline isl::checked::pw_multi_aff_list insert(unsigned int pos, isl::checked::pw_multi_aff el) const;
2105   inline class size size() const;
2106 };
2107 
2108 // declarations for isl::schedule
2109 inline schedule manage(__isl_take isl_schedule *ptr);
2110 inline schedule manage_copy(__isl_keep isl_schedule *ptr);
2111 
2112 class schedule {
2113   friend inline schedule manage(__isl_take isl_schedule *ptr);
2114   friend inline schedule manage_copy(__isl_keep isl_schedule *ptr);
2115 
2116 protected:
2117   isl_schedule *ptr = nullptr;
2118 
2119   inline explicit schedule(__isl_take isl_schedule *ptr);
2120 
2121 public:
2122   inline /* implicit */ schedule();
2123   inline /* implicit */ schedule(const schedule &obj);
2124   inline explicit schedule(isl::checked::ctx ctx, const std::string &str);
2125   inline schedule &operator=(schedule obj);
2126   inline ~schedule();
2127   inline __isl_give isl_schedule *copy() const &;
2128   inline __isl_give isl_schedule *copy() && = delete;
2129   inline __isl_keep isl_schedule *get() const;
2130   inline __isl_give isl_schedule *release();
2131   inline bool is_null() const;
2132   inline isl::checked::ctx ctx() const;
2133 
2134   static inline isl::checked::schedule from_domain(isl::checked::union_set domain);
2135   inline isl::checked::union_set domain() const;
2136   inline isl::checked::union_set get_domain() const;
2137   inline isl::checked::union_map map() const;
2138   inline isl::checked::union_map get_map() const;
2139   inline isl::checked::schedule_node root() const;
2140   inline isl::checked::schedule_node get_root() const;
2141   inline isl::checked::schedule pullback(isl::checked::union_pw_multi_aff upma) const;
2142 };
2143 
2144 // declarations for isl::schedule_constraints
2145 inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
2146 inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
2147 
2148 class schedule_constraints {
2149   friend inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
2150   friend inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
2151 
2152 protected:
2153   isl_schedule_constraints *ptr = nullptr;
2154 
2155   inline explicit schedule_constraints(__isl_take isl_schedule_constraints *ptr);
2156 
2157 public:
2158   inline /* implicit */ schedule_constraints();
2159   inline /* implicit */ schedule_constraints(const schedule_constraints &obj);
2160   inline explicit schedule_constraints(isl::checked::ctx ctx, const std::string &str);
2161   inline schedule_constraints &operator=(schedule_constraints obj);
2162   inline ~schedule_constraints();
2163   inline __isl_give isl_schedule_constraints *copy() const &;
2164   inline __isl_give isl_schedule_constraints *copy() && = delete;
2165   inline __isl_keep isl_schedule_constraints *get() const;
2166   inline __isl_give isl_schedule_constraints *release();
2167   inline bool is_null() const;
2168   inline isl::checked::ctx ctx() const;
2169 
2170   inline isl::checked::schedule compute_schedule() const;
2171   inline isl::checked::union_map coincidence() const;
2172   inline isl::checked::union_map get_coincidence() const;
2173   inline isl::checked::union_map conditional_validity() const;
2174   inline isl::checked::union_map get_conditional_validity() const;
2175   inline isl::checked::union_map conditional_validity_condition() const;
2176   inline isl::checked::union_map get_conditional_validity_condition() const;
2177   inline isl::checked::set context() const;
2178   inline isl::checked::set get_context() const;
2179   inline isl::checked::union_set domain() const;
2180   inline isl::checked::union_set get_domain() const;
2181   inline isl::checked::union_map proximity() const;
2182   inline isl::checked::union_map get_proximity() const;
2183   inline isl::checked::union_map validity() const;
2184   inline isl::checked::union_map get_validity() const;
2185   static inline isl::checked::schedule_constraints on_domain(isl::checked::union_set domain);
2186   inline isl::checked::schedule_constraints set_coincidence(isl::checked::union_map coincidence) const;
2187   inline isl::checked::schedule_constraints set_conditional_validity(isl::checked::union_map condition, isl::checked::union_map validity) const;
2188   inline isl::checked::schedule_constraints set_context(isl::checked::set context) const;
2189   inline isl::checked::schedule_constraints set_proximity(isl::checked::union_map proximity) const;
2190   inline isl::checked::schedule_constraints set_validity(isl::checked::union_map validity) const;
2191 };
2192 
2193 // declarations for isl::schedule_node
2194 inline schedule_node manage(__isl_take isl_schedule_node *ptr);
2195 inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
2196 
2197 class schedule_node {
2198   friend inline schedule_node manage(__isl_take isl_schedule_node *ptr);
2199   friend inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
2200 
2201 protected:
2202   isl_schedule_node *ptr = nullptr;
2203 
2204   inline explicit schedule_node(__isl_take isl_schedule_node *ptr);
2205 
2206 public:
2207   inline /* implicit */ schedule_node();
2208   inline /* implicit */ schedule_node(const schedule_node &obj);
2209   inline schedule_node &operator=(schedule_node obj);
2210   inline ~schedule_node();
2211   inline __isl_give isl_schedule_node *copy() const &;
2212   inline __isl_give isl_schedule_node *copy() && = delete;
2213   inline __isl_keep isl_schedule_node *get() const;
2214   inline __isl_give isl_schedule_node *release();
2215   inline bool is_null() const;
2216 private:
2217   template <typename T,
2218           typename = typename std::enable_if<std::is_same<
2219                   const decltype(isl_schedule_node_get_type(NULL)),
2220                   const T>::value>::type>
2221   inline boolean isa_type(T subtype) const;
2222 public:
2223   template <class T> inline boolean isa() const;
2224   template <class T> inline T as() const;
2225   inline isl::checked::ctx ctx() const;
2226 
2227   inline isl::checked::schedule_node ancestor(int generation) const;
2228   inline isl::checked::schedule_node child(int pos) const;
2229   inline boolean every_descendant(const std::function<boolean(isl::checked::schedule_node)> &test) const;
2230   inline isl::checked::schedule_node first_child() const;
2231   inline stat foreach_ancestor_top_down(const std::function<stat(isl::checked::schedule_node)> &fn) const;
2232   inline stat foreach_descendant_top_down(const std::function<boolean(isl::checked::schedule_node)> &fn) const;
2233   static inline isl::checked::schedule_node from_domain(isl::checked::union_set domain);
2234   static inline isl::checked::schedule_node from_extension(isl::checked::union_map extension);
2235   inline class size ancestor_child_position(const isl::checked::schedule_node &ancestor) const;
2236   inline class size get_ancestor_child_position(const isl::checked::schedule_node &ancestor) const;
2237   inline class size child_position() const;
2238   inline class size get_child_position() const;
2239   inline isl::checked::multi_union_pw_aff prefix_schedule_multi_union_pw_aff() const;
2240   inline isl::checked::multi_union_pw_aff get_prefix_schedule_multi_union_pw_aff() const;
2241   inline isl::checked::union_map prefix_schedule_union_map() const;
2242   inline isl::checked::union_map get_prefix_schedule_union_map() const;
2243   inline isl::checked::union_pw_multi_aff prefix_schedule_union_pw_multi_aff() const;
2244   inline isl::checked::union_pw_multi_aff get_prefix_schedule_union_pw_multi_aff() const;
2245   inline isl::checked::schedule schedule() const;
2246   inline isl::checked::schedule get_schedule() const;
2247   inline isl::checked::schedule_node shared_ancestor(const isl::checked::schedule_node &node2) const;
2248   inline isl::checked::schedule_node get_shared_ancestor(const isl::checked::schedule_node &node2) const;
2249   inline class size tree_depth() const;
2250   inline class size get_tree_depth() const;
2251   inline isl::checked::schedule_node graft_after(isl::checked::schedule_node graft) const;
2252   inline isl::checked::schedule_node graft_before(isl::checked::schedule_node graft) const;
2253   inline boolean has_children() const;
2254   inline boolean has_next_sibling() const;
2255   inline boolean has_parent() const;
2256   inline boolean has_previous_sibling() const;
2257   inline isl::checked::schedule_node insert_context(isl::checked::set context) const;
2258   inline isl::checked::schedule_node insert_filter(isl::checked::union_set filter) const;
2259   inline isl::checked::schedule_node insert_guard(isl::checked::set context) const;
2260   inline isl::checked::schedule_node insert_mark(isl::checked::id mark) const;
2261   inline isl::checked::schedule_node insert_mark(const std::string &mark) const;
2262   inline isl::checked::schedule_node insert_partial_schedule(isl::checked::multi_union_pw_aff schedule) const;
2263   inline isl::checked::schedule_node insert_sequence(isl::checked::union_set_list filters) const;
2264   inline isl::checked::schedule_node insert_set(isl::checked::union_set_list filters) const;
2265   inline boolean is_equal(const isl::checked::schedule_node &node2) const;
2266   inline boolean is_subtree_anchored() const;
2267   inline isl::checked::schedule_node map_descendant_bottom_up(const std::function<isl::checked::schedule_node(isl::checked::schedule_node)> &fn) const;
2268   inline class size n_children() const;
2269   inline isl::checked::schedule_node next_sibling() const;
2270   inline isl::checked::schedule_node order_after(isl::checked::union_set filter) const;
2271   inline isl::checked::schedule_node order_before(isl::checked::union_set filter) const;
2272   inline isl::checked::schedule_node parent() const;
2273   inline isl::checked::schedule_node previous_sibling() const;
2274   inline isl::checked::schedule_node root() const;
2275 };
2276 
2277 // declarations for isl::schedule_node_band
2278 
2279 class schedule_node_band : public schedule_node {
2280   template <class T>
2281   friend boolean schedule_node::isa() const;
2282   friend schedule_node_band schedule_node::as<schedule_node_band>() const;
2283   static const auto type = isl_schedule_node_band;
2284 
2285 protected:
2286   inline explicit schedule_node_band(__isl_take isl_schedule_node *ptr);
2287 
2288 public:
2289   inline /* implicit */ schedule_node_band();
2290   inline /* implicit */ schedule_node_band(const schedule_node_band &obj);
2291   inline schedule_node_band &operator=(schedule_node_band obj);
2292   inline isl::checked::ctx ctx() const;
2293 
2294   inline isl::checked::union_set ast_build_options() const;
2295   inline isl::checked::union_set get_ast_build_options() const;
2296   inline isl::checked::set ast_isolate_option() const;
2297   inline isl::checked::set get_ast_isolate_option() const;
2298   inline isl::checked::multi_union_pw_aff partial_schedule() const;
2299   inline isl::checked::multi_union_pw_aff get_partial_schedule() const;
2300   inline boolean permutable() const;
2301   inline boolean get_permutable() const;
2302   inline boolean member_get_coincident(int pos) const;
2303   inline schedule_node_band member_set_coincident(int pos, int coincident) const;
2304   inline schedule_node_band mod(isl::checked::multi_val mv) const;
2305   inline class size n_member() const;
2306   inline schedule_node_band scale(isl::checked::multi_val mv) const;
2307   inline schedule_node_band scale_down(isl::checked::multi_val mv) const;
2308   inline schedule_node_band set_ast_build_options(isl::checked::union_set options) const;
2309   inline schedule_node_band set_permutable(int permutable) const;
2310   inline schedule_node_band shift(isl::checked::multi_union_pw_aff shift) const;
2311   inline schedule_node_band split(int pos) const;
2312   inline schedule_node_band tile(isl::checked::multi_val sizes) const;
2313   inline schedule_node_band member_set_ast_loop_default(int pos) const;
2314   inline schedule_node_band member_set_ast_loop_atomic(int pos) const;
2315   inline schedule_node_band member_set_ast_loop_unroll(int pos) const;
2316   inline schedule_node_band member_set_ast_loop_separate(int pos) const;
2317 };
2318 
2319 // declarations for isl::schedule_node_context
2320 
2321 class schedule_node_context : public schedule_node {
2322   template <class T>
2323   friend boolean schedule_node::isa() const;
2324   friend schedule_node_context schedule_node::as<schedule_node_context>() const;
2325   static const auto type = isl_schedule_node_context;
2326 
2327 protected:
2328   inline explicit schedule_node_context(__isl_take isl_schedule_node *ptr);
2329 
2330 public:
2331   inline /* implicit */ schedule_node_context();
2332   inline /* implicit */ schedule_node_context(const schedule_node_context &obj);
2333   inline schedule_node_context &operator=(schedule_node_context obj);
2334   inline isl::checked::ctx ctx() const;
2335 
2336   inline isl::checked::set context() const;
2337   inline isl::checked::set get_context() const;
2338 };
2339 
2340 // declarations for isl::schedule_node_domain
2341 
2342 class schedule_node_domain : public schedule_node {
2343   template <class T>
2344   friend boolean schedule_node::isa() const;
2345   friend schedule_node_domain schedule_node::as<schedule_node_domain>() const;
2346   static const auto type = isl_schedule_node_domain;
2347 
2348 protected:
2349   inline explicit schedule_node_domain(__isl_take isl_schedule_node *ptr);
2350 
2351 public:
2352   inline /* implicit */ schedule_node_domain();
2353   inline /* implicit */ schedule_node_domain(const schedule_node_domain &obj);
2354   inline schedule_node_domain &operator=(schedule_node_domain obj);
2355   inline isl::checked::ctx ctx() const;
2356 
2357   inline isl::checked::union_set domain() const;
2358   inline isl::checked::union_set get_domain() const;
2359 };
2360 
2361 // declarations for isl::schedule_node_expansion
2362 
2363 class schedule_node_expansion : public schedule_node {
2364   template <class T>
2365   friend boolean schedule_node::isa() const;
2366   friend schedule_node_expansion schedule_node::as<schedule_node_expansion>() const;
2367   static const auto type = isl_schedule_node_expansion;
2368 
2369 protected:
2370   inline explicit schedule_node_expansion(__isl_take isl_schedule_node *ptr);
2371 
2372 public:
2373   inline /* implicit */ schedule_node_expansion();
2374   inline /* implicit */ schedule_node_expansion(const schedule_node_expansion &obj);
2375   inline schedule_node_expansion &operator=(schedule_node_expansion obj);
2376   inline isl::checked::ctx ctx() const;
2377 
2378   inline isl::checked::union_pw_multi_aff contraction() const;
2379   inline isl::checked::union_pw_multi_aff get_contraction() const;
2380   inline isl::checked::union_map expansion() const;
2381   inline isl::checked::union_map get_expansion() const;
2382 };
2383 
2384 // declarations for isl::schedule_node_extension
2385 
2386 class schedule_node_extension : public schedule_node {
2387   template <class T>
2388   friend boolean schedule_node::isa() const;
2389   friend schedule_node_extension schedule_node::as<schedule_node_extension>() const;
2390   static const auto type = isl_schedule_node_extension;
2391 
2392 protected:
2393   inline explicit schedule_node_extension(__isl_take isl_schedule_node *ptr);
2394 
2395 public:
2396   inline /* implicit */ schedule_node_extension();
2397   inline /* implicit */ schedule_node_extension(const schedule_node_extension &obj);
2398   inline schedule_node_extension &operator=(schedule_node_extension obj);
2399   inline isl::checked::ctx ctx() const;
2400 
2401   inline isl::checked::union_map extension() const;
2402   inline isl::checked::union_map get_extension() const;
2403 };
2404 
2405 // declarations for isl::schedule_node_filter
2406 
2407 class schedule_node_filter : public schedule_node {
2408   template <class T>
2409   friend boolean schedule_node::isa() const;
2410   friend schedule_node_filter schedule_node::as<schedule_node_filter>() const;
2411   static const auto type = isl_schedule_node_filter;
2412 
2413 protected:
2414   inline explicit schedule_node_filter(__isl_take isl_schedule_node *ptr);
2415 
2416 public:
2417   inline /* implicit */ schedule_node_filter();
2418   inline /* implicit */ schedule_node_filter(const schedule_node_filter &obj);
2419   inline schedule_node_filter &operator=(schedule_node_filter obj);
2420   inline isl::checked::ctx ctx() const;
2421 
2422   inline isl::checked::union_set filter() const;
2423   inline isl::checked::union_set get_filter() const;
2424 };
2425 
2426 // declarations for isl::schedule_node_guard
2427 
2428 class schedule_node_guard : public schedule_node {
2429   template <class T>
2430   friend boolean schedule_node::isa() const;
2431   friend schedule_node_guard schedule_node::as<schedule_node_guard>() const;
2432   static const auto type = isl_schedule_node_guard;
2433 
2434 protected:
2435   inline explicit schedule_node_guard(__isl_take isl_schedule_node *ptr);
2436 
2437 public:
2438   inline /* implicit */ schedule_node_guard();
2439   inline /* implicit */ schedule_node_guard(const schedule_node_guard &obj);
2440   inline schedule_node_guard &operator=(schedule_node_guard obj);
2441   inline isl::checked::ctx ctx() const;
2442 
2443   inline isl::checked::set guard() const;
2444   inline isl::checked::set get_guard() const;
2445 };
2446 
2447 // declarations for isl::schedule_node_leaf
2448 
2449 class schedule_node_leaf : public schedule_node {
2450   template <class T>
2451   friend boolean schedule_node::isa() const;
2452   friend schedule_node_leaf schedule_node::as<schedule_node_leaf>() const;
2453   static const auto type = isl_schedule_node_leaf;
2454 
2455 protected:
2456   inline explicit schedule_node_leaf(__isl_take isl_schedule_node *ptr);
2457 
2458 public:
2459   inline /* implicit */ schedule_node_leaf();
2460   inline /* implicit */ schedule_node_leaf(const schedule_node_leaf &obj);
2461   inline schedule_node_leaf &operator=(schedule_node_leaf obj);
2462   inline isl::checked::ctx ctx() const;
2463 
2464 };
2465 
2466 // declarations for isl::schedule_node_mark
2467 
2468 class schedule_node_mark : public schedule_node {
2469   template <class T>
2470   friend boolean schedule_node::isa() const;
2471   friend schedule_node_mark schedule_node::as<schedule_node_mark>() const;
2472   static const auto type = isl_schedule_node_mark;
2473 
2474 protected:
2475   inline explicit schedule_node_mark(__isl_take isl_schedule_node *ptr);
2476 
2477 public:
2478   inline /* implicit */ schedule_node_mark();
2479   inline /* implicit */ schedule_node_mark(const schedule_node_mark &obj);
2480   inline schedule_node_mark &operator=(schedule_node_mark obj);
2481   inline isl::checked::ctx ctx() const;
2482 
2483 };
2484 
2485 // declarations for isl::schedule_node_sequence
2486 
2487 class schedule_node_sequence : public schedule_node {
2488   template <class T>
2489   friend boolean schedule_node::isa() const;
2490   friend schedule_node_sequence schedule_node::as<schedule_node_sequence>() const;
2491   static const auto type = isl_schedule_node_sequence;
2492 
2493 protected:
2494   inline explicit schedule_node_sequence(__isl_take isl_schedule_node *ptr);
2495 
2496 public:
2497   inline /* implicit */ schedule_node_sequence();
2498   inline /* implicit */ schedule_node_sequence(const schedule_node_sequence &obj);
2499   inline schedule_node_sequence &operator=(schedule_node_sequence obj);
2500   inline isl::checked::ctx ctx() const;
2501 
2502 };
2503 
2504 // declarations for isl::schedule_node_set
2505 
2506 class schedule_node_set : public schedule_node {
2507   template <class T>
2508   friend boolean schedule_node::isa() const;
2509   friend schedule_node_set schedule_node::as<schedule_node_set>() const;
2510   static const auto type = isl_schedule_node_set;
2511 
2512 protected:
2513   inline explicit schedule_node_set(__isl_take isl_schedule_node *ptr);
2514 
2515 public:
2516   inline /* implicit */ schedule_node_set();
2517   inline /* implicit */ schedule_node_set(const schedule_node_set &obj);
2518   inline schedule_node_set &operator=(schedule_node_set obj);
2519   inline isl::checked::ctx ctx() const;
2520 
2521 };
2522 
2523 // declarations for isl::set
2524 inline set manage(__isl_take isl_set *ptr);
2525 inline set manage_copy(__isl_keep isl_set *ptr);
2526 
2527 class set {
2528   friend inline set manage(__isl_take isl_set *ptr);
2529   friend inline set manage_copy(__isl_keep isl_set *ptr);
2530 
2531 protected:
2532   isl_set *ptr = nullptr;
2533 
2534   inline explicit set(__isl_take isl_set *ptr);
2535 
2536 public:
2537   inline /* implicit */ set();
2538   inline /* implicit */ set(const set &obj);
2539   inline /* implicit */ set(isl::checked::basic_set bset);
2540   inline /* implicit */ set(isl::checked::point pnt);
2541   inline explicit set(isl::checked::ctx ctx, const std::string &str);
2542   inline set &operator=(set obj);
2543   inline ~set();
2544   inline __isl_give isl_set *copy() const &;
2545   inline __isl_give isl_set *copy() && = delete;
2546   inline __isl_keep isl_set *get() const;
2547   inline __isl_give isl_set *release();
2548   inline bool is_null() const;
2549   inline isl::checked::ctx ctx() const;
2550 
2551   inline isl::checked::basic_set affine_hull() const;
2552   inline isl::checked::set apply(isl::checked::map map) const;
2553   inline isl::checked::set bind(isl::checked::multi_id tuple) const;
2554   inline isl::checked::set coalesce() const;
2555   inline isl::checked::set complement() const;
2556   inline isl::checked::set detect_equalities() const;
2557   inline isl::checked::val dim_max_val(int pos) const;
2558   inline isl::checked::val dim_min_val(int pos) const;
2559   static inline isl::checked::set empty(isl::checked::space space);
2560   inline isl::checked::set flatten() const;
2561   inline stat foreach_basic_set(const std::function<stat(isl::checked::basic_set)> &fn) const;
2562   inline stat foreach_point(const std::function<stat(isl::checked::point)> &fn) const;
2563   inline isl::checked::multi_val plain_multi_val_if_fixed() const;
2564   inline isl::checked::multi_val get_plain_multi_val_if_fixed() const;
2565   inline isl::checked::fixed_box simple_fixed_box_hull() const;
2566   inline isl::checked::fixed_box get_simple_fixed_box_hull() const;
2567   inline isl::checked::space space() const;
2568   inline isl::checked::space get_space() const;
2569   inline isl::checked::val stride(int pos) const;
2570   inline isl::checked::val get_stride(int pos) const;
2571   inline isl::checked::set gist(isl::checked::set context) const;
2572   inline isl::checked::map identity() const;
2573   inline isl::checked::pw_aff indicator_function() const;
2574   inline isl::checked::map insert_domain(isl::checked::space domain) const;
2575   inline isl::checked::set intersect(isl::checked::set set2) const;
2576   inline isl::checked::set intersect_params(isl::checked::set params) const;
2577   inline boolean involves_locals() const;
2578   inline boolean is_disjoint(const isl::checked::set &set2) const;
2579   inline boolean is_empty() const;
2580   inline boolean is_equal(const isl::checked::set &set2) const;
2581   inline boolean is_singleton() const;
2582   inline boolean is_strict_subset(const isl::checked::set &set2) const;
2583   inline boolean is_subset(const isl::checked::set &set2) const;
2584   inline boolean is_wrapping() const;
2585   inline isl::checked::set lexmax() const;
2586   inline isl::checked::pw_multi_aff lexmax_pw_multi_aff() const;
2587   inline isl::checked::set lexmin() const;
2588   inline isl::checked::pw_multi_aff lexmin_pw_multi_aff() const;
2589   inline isl::checked::set lower_bound(isl::checked::multi_pw_aff lower) const;
2590   inline isl::checked::set lower_bound(isl::checked::multi_val lower) const;
2591   inline isl::checked::multi_pw_aff max_multi_pw_aff() const;
2592   inline isl::checked::val max_val(const isl::checked::aff &obj) const;
2593   inline isl::checked::multi_pw_aff min_multi_pw_aff() const;
2594   inline isl::checked::val min_val(const isl::checked::aff &obj) const;
2595   inline isl::checked::set params() const;
2596   inline isl::checked::basic_set polyhedral_hull() const;
2597   inline isl::checked::set preimage(isl::checked::multi_aff ma) const;
2598   inline isl::checked::set preimage(isl::checked::multi_pw_aff mpa) const;
2599   inline isl::checked::set preimage(isl::checked::pw_multi_aff pma) const;
2600   inline isl::checked::set product(isl::checked::set set2) const;
2601   inline isl::checked::set project_out_all_params() const;
2602   inline isl::checked::set project_out_param(isl::checked::id id) const;
2603   inline isl::checked::set project_out_param(const std::string &id) const;
2604   inline isl::checked::set project_out_param(isl::checked::id_list list) const;
2605   inline isl::checked::basic_set sample() const;
2606   inline isl::checked::point sample_point() const;
2607   inline isl::checked::set subtract(isl::checked::set set2) const;
2608   inline isl::checked::map translation() const;
2609   inline isl::checked::set unbind_params(isl::checked::multi_id tuple) const;
2610   inline isl::checked::map unbind_params_insert_domain(isl::checked::multi_id domain) const;
2611   inline isl::checked::set unite(isl::checked::set set2) const;
2612   static inline isl::checked::set universe(isl::checked::space space);
2613   inline isl::checked::basic_set unshifted_simple_hull() const;
2614   inline isl::checked::map unwrap() const;
2615   inline isl::checked::set upper_bound(isl::checked::multi_pw_aff upper) const;
2616   inline isl::checked::set upper_bound(isl::checked::multi_val upper) const;
2617 };
2618 
2619 // declarations for isl::space
2620 inline space manage(__isl_take isl_space *ptr);
2621 inline space manage_copy(__isl_keep isl_space *ptr);
2622 
2623 class space {
2624   friend inline space manage(__isl_take isl_space *ptr);
2625   friend inline space manage_copy(__isl_keep isl_space *ptr);
2626 
2627 protected:
2628   isl_space *ptr = nullptr;
2629 
2630   inline explicit space(__isl_take isl_space *ptr);
2631 
2632 public:
2633   inline /* implicit */ space();
2634   inline /* implicit */ space(const space &obj);
2635   inline space &operator=(space obj);
2636   inline ~space();
2637   inline __isl_give isl_space *copy() const &;
2638   inline __isl_give isl_space *copy() && = delete;
2639   inline __isl_keep isl_space *get() const;
2640   inline __isl_give isl_space *release();
2641   inline bool is_null() const;
2642   inline isl::checked::ctx ctx() const;
2643 
2644   inline isl::checked::space add_named_tuple(isl::checked::id tuple_id, unsigned int dim) const;
2645   inline isl::checked::space add_named_tuple(const std::string &tuple_id, unsigned int dim) const;
2646   inline isl::checked::space add_unnamed_tuple(unsigned int dim) const;
2647   inline isl::checked::space curry() const;
2648   inline isl::checked::space domain() const;
2649   inline isl::checked::space flatten_domain() const;
2650   inline isl::checked::space flatten_range() const;
2651   inline boolean is_equal(const isl::checked::space &space2) const;
2652   inline boolean is_wrapping() const;
2653   inline isl::checked::space map_from_set() const;
2654   inline isl::checked::space params() const;
2655   inline isl::checked::space product(isl::checked::space right) const;
2656   inline isl::checked::space range() const;
2657   inline isl::checked::space range_reverse() const;
2658   inline isl::checked::space reverse() const;
2659   inline isl::checked::space uncurry() const;
2660   static inline isl::checked::space unit(isl::checked::ctx ctx);
2661   inline isl::checked::space unwrap() const;
2662   inline isl::checked::space wrap() const;
2663 };
2664 
2665 // declarations for isl::union_access_info
2666 inline union_access_info manage(__isl_take isl_union_access_info *ptr);
2667 inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
2668 
2669 class union_access_info {
2670   friend inline union_access_info manage(__isl_take isl_union_access_info *ptr);
2671   friend inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
2672 
2673 protected:
2674   isl_union_access_info *ptr = nullptr;
2675 
2676   inline explicit union_access_info(__isl_take isl_union_access_info *ptr);
2677 
2678 public:
2679   inline /* implicit */ union_access_info();
2680   inline /* implicit */ union_access_info(const union_access_info &obj);
2681   inline explicit union_access_info(isl::checked::union_map sink);
2682   inline union_access_info &operator=(union_access_info obj);
2683   inline ~union_access_info();
2684   inline __isl_give isl_union_access_info *copy() const &;
2685   inline __isl_give isl_union_access_info *copy() && = delete;
2686   inline __isl_keep isl_union_access_info *get() const;
2687   inline __isl_give isl_union_access_info *release();
2688   inline bool is_null() const;
2689   inline isl::checked::ctx ctx() const;
2690 
2691   inline isl::checked::union_flow compute_flow() const;
2692   inline isl::checked::union_access_info set_kill(isl::checked::union_map kill) const;
2693   inline isl::checked::union_access_info set_may_source(isl::checked::union_map may_source) const;
2694   inline isl::checked::union_access_info set_must_source(isl::checked::union_map must_source) const;
2695   inline isl::checked::union_access_info set_schedule(isl::checked::schedule schedule) const;
2696   inline isl::checked::union_access_info set_schedule_map(isl::checked::union_map schedule_map) const;
2697 };
2698 
2699 // declarations for isl::union_flow
2700 inline union_flow manage(__isl_take isl_union_flow *ptr);
2701 inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
2702 
2703 class union_flow {
2704   friend inline union_flow manage(__isl_take isl_union_flow *ptr);
2705   friend inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
2706 
2707 protected:
2708   isl_union_flow *ptr = nullptr;
2709 
2710   inline explicit union_flow(__isl_take isl_union_flow *ptr);
2711 
2712 public:
2713   inline /* implicit */ union_flow();
2714   inline /* implicit */ union_flow(const union_flow &obj);
2715   inline union_flow &operator=(union_flow obj);
2716   inline ~union_flow();
2717   inline __isl_give isl_union_flow *copy() const &;
2718   inline __isl_give isl_union_flow *copy() && = delete;
2719   inline __isl_keep isl_union_flow *get() const;
2720   inline __isl_give isl_union_flow *release();
2721   inline bool is_null() const;
2722   inline isl::checked::ctx ctx() const;
2723 
2724   inline isl::checked::union_map full_may_dependence() const;
2725   inline isl::checked::union_map get_full_may_dependence() const;
2726   inline isl::checked::union_map full_must_dependence() const;
2727   inline isl::checked::union_map get_full_must_dependence() const;
2728   inline isl::checked::union_map may_dependence() const;
2729   inline isl::checked::union_map get_may_dependence() const;
2730   inline isl::checked::union_map may_no_source() const;
2731   inline isl::checked::union_map get_may_no_source() const;
2732   inline isl::checked::union_map must_dependence() const;
2733   inline isl::checked::union_map get_must_dependence() const;
2734   inline isl::checked::union_map must_no_source() const;
2735   inline isl::checked::union_map get_must_no_source() const;
2736 };
2737 
2738 // declarations for isl::union_map
2739 inline union_map manage(__isl_take isl_union_map *ptr);
2740 inline union_map manage_copy(__isl_keep isl_union_map *ptr);
2741 
2742 class union_map {
2743   friend inline union_map manage(__isl_take isl_union_map *ptr);
2744   friend inline union_map manage_copy(__isl_keep isl_union_map *ptr);
2745 
2746 protected:
2747   isl_union_map *ptr = nullptr;
2748 
2749   inline explicit union_map(__isl_take isl_union_map *ptr);
2750 
2751 public:
2752   inline /* implicit */ union_map();
2753   inline /* implicit */ union_map(const union_map &obj);
2754   inline /* implicit */ union_map(isl::checked::basic_map bmap);
2755   inline /* implicit */ union_map(isl::checked::map map);
2756   inline explicit union_map(isl::checked::ctx ctx, const std::string &str);
2757   inline union_map &operator=(union_map obj);
2758   inline ~union_map();
2759   inline __isl_give isl_union_map *copy() const &;
2760   inline __isl_give isl_union_map *copy() && = delete;
2761   inline __isl_keep isl_union_map *get() const;
2762   inline __isl_give isl_union_map *release();
2763   inline bool is_null() const;
2764   inline isl::checked::ctx ctx() const;
2765 
2766   inline isl::checked::union_map affine_hull() const;
2767   inline isl::checked::union_map apply_domain(isl::checked::union_map umap2) const;
2768   inline isl::checked::union_map apply_range(isl::checked::union_map umap2) const;
2769   inline isl::checked::union_set bind_range(isl::checked::multi_id tuple) const;
2770   inline isl::checked::union_map coalesce() const;
2771   inline isl::checked::union_map compute_divs() const;
2772   inline isl::checked::union_map curry() const;
2773   inline isl::checked::union_set deltas() const;
2774   inline isl::checked::union_map detect_equalities() const;
2775   inline isl::checked::union_set domain() const;
2776   inline isl::checked::union_map domain_factor_domain() const;
2777   inline isl::checked::union_map domain_factor_range() const;
2778   inline isl::checked::union_map domain_map() const;
2779   inline isl::checked::union_pw_multi_aff domain_map_union_pw_multi_aff() const;
2780   inline isl::checked::union_map domain_product(isl::checked::union_map umap2) const;
2781   static inline isl::checked::union_map empty(isl::checked::ctx ctx);
2782   inline isl::checked::union_map eq_at(isl::checked::multi_union_pw_aff mupa) const;
2783   inline boolean every_map(const std::function<boolean(isl::checked::map)> &test) const;
2784   inline isl::checked::map extract_map(isl::checked::space space) const;
2785   inline isl::checked::union_map factor_domain() const;
2786   inline isl::checked::union_map factor_range() const;
2787   inline isl::checked::union_map fixed_power(isl::checked::val exp) const;
2788   inline isl::checked::union_map fixed_power(long exp) const;
2789   inline stat foreach_map(const std::function<stat(isl::checked::map)> &fn) const;
2790   static inline isl::checked::union_map from(isl::checked::multi_union_pw_aff mupa);
2791   static inline isl::checked::union_map from(isl::checked::union_pw_multi_aff upma);
2792   static inline isl::checked::union_map from_domain(isl::checked::union_set uset);
2793   static inline isl::checked::union_map from_domain_and_range(isl::checked::union_set domain, isl::checked::union_set range);
2794   static inline isl::checked::union_map from_range(isl::checked::union_set uset);
2795   inline isl::checked::space space() const;
2796   inline isl::checked::space get_space() const;
2797   inline isl::checked::union_map gist(isl::checked::union_map context) const;
2798   inline isl::checked::union_map gist_domain(isl::checked::union_set uset) const;
2799   inline isl::checked::union_map gist_params(isl::checked::set set) const;
2800   inline isl::checked::union_map gist_range(isl::checked::union_set uset) const;
2801   inline isl::checked::union_map intersect(isl::checked::union_map umap2) const;
2802   inline isl::checked::union_map intersect_domain(isl::checked::space space) const;
2803   inline isl::checked::union_map intersect_domain(isl::checked::union_set uset) const;
2804   inline isl::checked::union_map intersect_domain_factor_domain(isl::checked::union_map factor) const;
2805   inline isl::checked::union_map intersect_domain_factor_range(isl::checked::union_map factor) const;
2806   inline isl::checked::union_map intersect_params(isl::checked::set set) const;
2807   inline isl::checked::union_map intersect_range(isl::checked::space space) const;
2808   inline isl::checked::union_map intersect_range(isl::checked::union_set uset) const;
2809   inline isl::checked::union_map intersect_range_factor_domain(isl::checked::union_map factor) const;
2810   inline isl::checked::union_map intersect_range_factor_range(isl::checked::union_map factor) const;
2811   inline boolean is_bijective() const;
2812   inline boolean is_disjoint(const isl::checked::union_map &umap2) const;
2813   inline boolean is_empty() const;
2814   inline boolean is_equal(const isl::checked::union_map &umap2) const;
2815   inline boolean is_injective() const;
2816   inline boolean is_single_valued() const;
2817   inline boolean is_strict_subset(const isl::checked::union_map &umap2) const;
2818   inline boolean is_subset(const isl::checked::union_map &umap2) const;
2819   inline boolean isa_map() const;
2820   inline isl::checked::union_map lexmax() const;
2821   inline isl::checked::union_map lexmin() const;
2822   inline isl::checked::union_map polyhedral_hull() const;
2823   inline isl::checked::union_map preimage_domain(isl::checked::multi_aff ma) const;
2824   inline isl::checked::union_map preimage_domain(isl::checked::multi_pw_aff mpa) const;
2825   inline isl::checked::union_map preimage_domain(isl::checked::pw_multi_aff pma) const;
2826   inline isl::checked::union_map preimage_domain(isl::checked::union_pw_multi_aff upma) const;
2827   inline isl::checked::union_map preimage_range(isl::checked::multi_aff ma) const;
2828   inline isl::checked::union_map preimage_range(isl::checked::pw_multi_aff pma) const;
2829   inline isl::checked::union_map preimage_range(isl::checked::union_pw_multi_aff upma) const;
2830   inline isl::checked::union_map product(isl::checked::union_map umap2) const;
2831   inline isl::checked::union_map project_out_all_params() const;
2832   inline isl::checked::union_set range() const;
2833   inline isl::checked::union_map range_factor_domain() const;
2834   inline isl::checked::union_map range_factor_range() const;
2835   inline isl::checked::union_map range_map() const;
2836   inline isl::checked::union_map range_product(isl::checked::union_map umap2) const;
2837   inline isl::checked::union_map range_reverse() const;
2838   inline isl::checked::union_map reverse() const;
2839   inline isl::checked::union_map subtract(isl::checked::union_map umap2) const;
2840   inline isl::checked::union_map subtract_domain(isl::checked::union_set dom) const;
2841   inline isl::checked::union_map subtract_range(isl::checked::union_set dom) const;
2842   inline isl::checked::union_map uncurry() const;
2843   inline isl::checked::union_map unite(isl::checked::union_map umap2) const;
2844   inline isl::checked::union_map universe() const;
2845   inline isl::checked::union_set wrap() const;
2846   inline isl::checked::union_map zip() const;
2847 };
2848 
2849 // declarations for isl::union_pw_aff
2850 inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
2851 inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
2852 
2853 class union_pw_aff {
2854   friend inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
2855   friend inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
2856 
2857 protected:
2858   isl_union_pw_aff *ptr = nullptr;
2859 
2860   inline explicit union_pw_aff(__isl_take isl_union_pw_aff *ptr);
2861 
2862 public:
2863   inline /* implicit */ union_pw_aff();
2864   inline /* implicit */ union_pw_aff(const union_pw_aff &obj);
2865   inline /* implicit */ union_pw_aff(isl::checked::aff aff);
2866   inline /* implicit */ union_pw_aff(isl::checked::pw_aff pa);
2867   inline explicit union_pw_aff(isl::checked::ctx ctx, const std::string &str);
2868   inline union_pw_aff &operator=(union_pw_aff obj);
2869   inline ~union_pw_aff();
2870   inline __isl_give isl_union_pw_aff *copy() const &;
2871   inline __isl_give isl_union_pw_aff *copy() && = delete;
2872   inline __isl_keep isl_union_pw_aff *get() const;
2873   inline __isl_give isl_union_pw_aff *release();
2874   inline bool is_null() const;
2875   inline isl::checked::ctx ctx() const;
2876 
2877   inline isl::checked::union_pw_aff add(isl::checked::union_pw_aff upa2) const;
2878   inline isl::checked::union_set bind(isl::checked::id id) const;
2879   inline isl::checked::union_set bind(const std::string &id) const;
2880   inline isl::checked::union_pw_aff coalesce() const;
2881   inline isl::checked::union_set domain() const;
2882   inline isl::checked::space space() const;
2883   inline isl::checked::space get_space() const;
2884   inline isl::checked::union_pw_aff gist(isl::checked::union_set context) const;
2885   inline isl::checked::union_pw_aff intersect_domain(isl::checked::space space) const;
2886   inline isl::checked::union_pw_aff intersect_domain(isl::checked::union_set uset) const;
2887   inline isl::checked::union_pw_aff intersect_domain_wrapped_domain(isl::checked::union_set uset) const;
2888   inline isl::checked::union_pw_aff intersect_domain_wrapped_range(isl::checked::union_set uset) const;
2889   inline isl::checked::union_pw_aff intersect_params(isl::checked::set set) const;
2890   inline isl::checked::union_pw_aff pullback(isl::checked::union_pw_multi_aff upma) const;
2891   inline isl::checked::union_pw_aff sub(isl::checked::union_pw_aff upa2) const;
2892   inline isl::checked::union_pw_aff subtract_domain(isl::checked::space space) const;
2893   inline isl::checked::union_pw_aff subtract_domain(isl::checked::union_set uset) const;
2894   inline isl::checked::union_pw_aff union_add(isl::checked::union_pw_aff upa2) const;
2895 };
2896 
2897 // declarations for isl::union_pw_aff_list
2898 inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
2899 inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
2900 
2901 class union_pw_aff_list {
2902   friend inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
2903   friend inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
2904 
2905 protected:
2906   isl_union_pw_aff_list *ptr = nullptr;
2907 
2908   inline explicit union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr);
2909 
2910 public:
2911   inline /* implicit */ union_pw_aff_list();
2912   inline /* implicit */ union_pw_aff_list(const union_pw_aff_list &obj);
2913   inline explicit union_pw_aff_list(isl::checked::ctx ctx, int n);
2914   inline explicit union_pw_aff_list(isl::checked::union_pw_aff el);
2915   inline union_pw_aff_list &operator=(union_pw_aff_list obj);
2916   inline ~union_pw_aff_list();
2917   inline __isl_give isl_union_pw_aff_list *copy() const &;
2918   inline __isl_give isl_union_pw_aff_list *copy() && = delete;
2919   inline __isl_keep isl_union_pw_aff_list *get() const;
2920   inline __isl_give isl_union_pw_aff_list *release();
2921   inline bool is_null() const;
2922   inline isl::checked::ctx ctx() const;
2923 
2924   inline isl::checked::union_pw_aff_list add(isl::checked::union_pw_aff el) const;
2925   inline isl::checked::union_pw_aff_list clear() const;
2926   inline isl::checked::union_pw_aff_list concat(isl::checked::union_pw_aff_list list2) const;
2927   inline isl::checked::union_pw_aff_list drop(unsigned int first, unsigned int n) const;
2928   inline stat foreach(const std::function<stat(isl::checked::union_pw_aff)> &fn) const;
2929   inline isl::checked::union_pw_aff at(int index) const;
2930   inline isl::checked::union_pw_aff get_at(int index) const;
2931   inline isl::checked::union_pw_aff_list insert(unsigned int pos, isl::checked::union_pw_aff el) const;
2932   inline class size size() const;
2933 };
2934 
2935 // declarations for isl::union_pw_multi_aff
2936 inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
2937 inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
2938 
2939 class union_pw_multi_aff {
2940   friend inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
2941   friend inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
2942 
2943 protected:
2944   isl_union_pw_multi_aff *ptr = nullptr;
2945 
2946   inline explicit union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr);
2947 
2948 public:
2949   inline /* implicit */ union_pw_multi_aff();
2950   inline /* implicit */ union_pw_multi_aff(const union_pw_multi_aff &obj);
2951   inline /* implicit */ union_pw_multi_aff(isl::checked::multi_aff ma);
2952   inline /* implicit */ union_pw_multi_aff(isl::checked::pw_multi_aff pma);
2953   inline /* implicit */ union_pw_multi_aff(isl::checked::union_pw_aff upa);
2954   inline explicit union_pw_multi_aff(isl::checked::ctx ctx, const std::string &str);
2955   inline union_pw_multi_aff &operator=(union_pw_multi_aff obj);
2956   inline ~union_pw_multi_aff();
2957   inline __isl_give isl_union_pw_multi_aff *copy() const &;
2958   inline __isl_give isl_union_pw_multi_aff *copy() && = delete;
2959   inline __isl_keep isl_union_pw_multi_aff *get() const;
2960   inline __isl_give isl_union_pw_multi_aff *release();
2961   inline bool is_null() const;
2962   inline isl::checked::ctx ctx() const;
2963 
2964   inline isl::checked::union_pw_multi_aff add(isl::checked::union_pw_multi_aff upma2) const;
2965   inline isl::checked::union_pw_multi_aff apply(isl::checked::union_pw_multi_aff upma2) const;
2966   inline isl::checked::pw_multi_aff as_pw_multi_aff() const;
2967   inline isl::checked::union_pw_multi_aff coalesce() const;
2968   inline isl::checked::union_set domain() const;
2969   static inline isl::checked::union_pw_multi_aff empty(isl::checked::ctx ctx);
2970   inline isl::checked::pw_multi_aff extract_pw_multi_aff(isl::checked::space space) const;
2971   inline isl::checked::union_pw_multi_aff flat_range_product(isl::checked::union_pw_multi_aff upma2) const;
2972   inline isl::checked::space space() const;
2973   inline isl::checked::space get_space() const;
2974   inline isl::checked::union_pw_multi_aff gist(isl::checked::union_set context) const;
2975   inline isl::checked::union_pw_multi_aff intersect_domain(isl::checked::space space) const;
2976   inline isl::checked::union_pw_multi_aff intersect_domain(isl::checked::union_set uset) const;
2977   inline isl::checked::union_pw_multi_aff intersect_domain_wrapped_domain(isl::checked::union_set uset) const;
2978   inline isl::checked::union_pw_multi_aff intersect_domain_wrapped_range(isl::checked::union_set uset) const;
2979   inline isl::checked::union_pw_multi_aff intersect_params(isl::checked::set set) const;
2980   inline boolean involves_locals() const;
2981   inline boolean isa_pw_multi_aff() const;
2982   inline boolean plain_is_empty() const;
2983   inline isl::checked::union_pw_multi_aff preimage_domain_wrapped_domain(isl::checked::union_pw_multi_aff upma2) const;
2984   inline isl::checked::union_pw_multi_aff pullback(isl::checked::union_pw_multi_aff upma2) const;
2985   inline isl::checked::union_pw_multi_aff range_factor_domain() const;
2986   inline isl::checked::union_pw_multi_aff range_factor_range() const;
2987   inline isl::checked::union_pw_multi_aff range_product(isl::checked::union_pw_multi_aff upma2) const;
2988   inline isl::checked::union_pw_multi_aff sub(isl::checked::union_pw_multi_aff upma2) const;
2989   inline isl::checked::union_pw_multi_aff subtract_domain(isl::checked::space space) const;
2990   inline isl::checked::union_pw_multi_aff subtract_domain(isl::checked::union_set uset) const;
2991   inline isl::checked::union_pw_multi_aff union_add(isl::checked::union_pw_multi_aff upma2) const;
2992 };
2993 
2994 // declarations for isl::union_set
2995 inline union_set manage(__isl_take isl_union_set *ptr);
2996 inline union_set manage_copy(__isl_keep isl_union_set *ptr);
2997 
2998 class union_set {
2999   friend inline union_set manage(__isl_take isl_union_set *ptr);
3000   friend inline union_set manage_copy(__isl_keep isl_union_set *ptr);
3001 
3002 protected:
3003   isl_union_set *ptr = nullptr;
3004 
3005   inline explicit union_set(__isl_take isl_union_set *ptr);
3006 
3007 public:
3008   inline /* implicit */ union_set();
3009   inline /* implicit */ union_set(const union_set &obj);
3010   inline /* implicit */ union_set(isl::checked::basic_set bset);
3011   inline /* implicit */ union_set(isl::checked::point pnt);
3012   inline /* implicit */ union_set(isl::checked::set set);
3013   inline explicit union_set(isl::checked::ctx ctx, const std::string &str);
3014   inline union_set &operator=(union_set obj);
3015   inline ~union_set();
3016   inline __isl_give isl_union_set *copy() const &;
3017   inline __isl_give isl_union_set *copy() && = delete;
3018   inline __isl_keep isl_union_set *get() const;
3019   inline __isl_give isl_union_set *release();
3020   inline bool is_null() const;
3021   inline isl::checked::ctx ctx() const;
3022 
3023   inline isl::checked::union_set affine_hull() const;
3024   inline isl::checked::union_set apply(isl::checked::union_map umap) const;
3025   inline isl::checked::union_set coalesce() const;
3026   inline isl::checked::union_set compute_divs() const;
3027   inline isl::checked::union_set detect_equalities() const;
3028   static inline isl::checked::union_set empty(isl::checked::ctx ctx);
3029   inline boolean every_set(const std::function<boolean(isl::checked::set)> &test) const;
3030   inline isl::checked::set extract_set(isl::checked::space space) const;
3031   inline stat foreach_point(const std::function<stat(isl::checked::point)> &fn) const;
3032   inline stat foreach_set(const std::function<stat(isl::checked::set)> &fn) const;
3033   inline isl::checked::space space() const;
3034   inline isl::checked::space get_space() const;
3035   inline isl::checked::union_set gist(isl::checked::union_set context) const;
3036   inline isl::checked::union_set gist_params(isl::checked::set set) const;
3037   inline isl::checked::union_map identity() const;
3038   inline isl::checked::union_set intersect(isl::checked::union_set uset2) const;
3039   inline isl::checked::union_set intersect_params(isl::checked::set set) const;
3040   inline boolean is_disjoint(const isl::checked::union_set &uset2) const;
3041   inline boolean is_empty() const;
3042   inline boolean is_equal(const isl::checked::union_set &uset2) const;
3043   inline boolean is_strict_subset(const isl::checked::union_set &uset2) const;
3044   inline boolean is_subset(const isl::checked::union_set &uset2) const;
3045   inline boolean isa_set() const;
3046   inline isl::checked::union_set lexmax() const;
3047   inline isl::checked::union_set lexmin() const;
3048   inline isl::checked::union_set polyhedral_hull() const;
3049   inline isl::checked::union_set preimage(isl::checked::multi_aff ma) const;
3050   inline isl::checked::union_set preimage(isl::checked::pw_multi_aff pma) const;
3051   inline isl::checked::union_set preimage(isl::checked::union_pw_multi_aff upma) const;
3052   inline isl::checked::point sample_point() const;
3053   inline isl::checked::union_set subtract(isl::checked::union_set uset2) const;
3054   inline isl::checked::union_set unite(isl::checked::union_set uset2) const;
3055   inline isl::checked::union_set universe() const;
3056   inline isl::checked::union_map unwrap() const;
3057 };
3058 
3059 // declarations for isl::union_set_list
3060 inline union_set_list manage(__isl_take isl_union_set_list *ptr);
3061 inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
3062 
3063 class union_set_list {
3064   friend inline union_set_list manage(__isl_take isl_union_set_list *ptr);
3065   friend inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
3066 
3067 protected:
3068   isl_union_set_list *ptr = nullptr;
3069 
3070   inline explicit union_set_list(__isl_take isl_union_set_list *ptr);
3071 
3072 public:
3073   inline /* implicit */ union_set_list();
3074   inline /* implicit */ union_set_list(const union_set_list &obj);
3075   inline explicit union_set_list(isl::checked::ctx ctx, int n);
3076   inline explicit union_set_list(isl::checked::union_set el);
3077   inline union_set_list &operator=(union_set_list obj);
3078   inline ~union_set_list();
3079   inline __isl_give isl_union_set_list *copy() const &;
3080   inline __isl_give isl_union_set_list *copy() && = delete;
3081   inline __isl_keep isl_union_set_list *get() const;
3082   inline __isl_give isl_union_set_list *release();
3083   inline bool is_null() const;
3084   inline isl::checked::ctx ctx() const;
3085 
3086   inline isl::checked::union_set_list add(isl::checked::union_set el) const;
3087   inline isl::checked::union_set_list clear() const;
3088   inline isl::checked::union_set_list concat(isl::checked::union_set_list list2) const;
3089   inline isl::checked::union_set_list drop(unsigned int first, unsigned int n) const;
3090   inline stat foreach(const std::function<stat(isl::checked::union_set)> &fn) const;
3091   inline isl::checked::union_set at(int index) const;
3092   inline isl::checked::union_set get_at(int index) const;
3093   inline isl::checked::union_set_list insert(unsigned int pos, isl::checked::union_set el) const;
3094   inline class size size() const;
3095 };
3096 
3097 // declarations for isl::val
3098 inline val manage(__isl_take isl_val *ptr);
3099 inline val manage_copy(__isl_keep isl_val *ptr);
3100 
3101 class val {
3102   friend inline val manage(__isl_take isl_val *ptr);
3103   friend inline val manage_copy(__isl_keep isl_val *ptr);
3104 
3105 protected:
3106   isl_val *ptr = nullptr;
3107 
3108   inline explicit val(__isl_take isl_val *ptr);
3109 
3110 public:
3111   inline /* implicit */ val();
3112   inline /* implicit */ val(const val &obj);
3113   inline explicit val(isl::checked::ctx ctx, long i);
3114   inline explicit val(isl::checked::ctx ctx, const std::string &str);
3115   inline val &operator=(val obj);
3116   inline ~val();
3117   inline __isl_give isl_val *copy() const &;
3118   inline __isl_give isl_val *copy() && = delete;
3119   inline __isl_keep isl_val *get() const;
3120   inline __isl_give isl_val *release();
3121   inline bool is_null() const;
3122   inline isl::checked::ctx ctx() const;
3123 
3124   inline isl::checked::val abs() const;
3125   inline boolean abs_eq(const isl::checked::val &v2) const;
3126   inline boolean abs_eq(long v2) const;
3127   inline isl::checked::val add(isl::checked::val v2) const;
3128   inline isl::checked::val add(long v2) const;
3129   inline isl::checked::val ceil() const;
3130   inline int cmp_si(long i) const;
3131   inline isl::checked::val div(isl::checked::val v2) const;
3132   inline isl::checked::val div(long v2) const;
3133   inline boolean eq(const isl::checked::val &v2) const;
3134   inline boolean eq(long v2) const;
3135   inline isl::checked::val floor() const;
3136   inline isl::checked::val gcd(isl::checked::val v2) const;
3137   inline isl::checked::val gcd(long v2) const;
3138   inline boolean ge(const isl::checked::val &v2) const;
3139   inline boolean ge(long v2) const;
3140   inline long den_si() const;
3141   inline long get_den_si() const;
3142   inline long num_si() const;
3143   inline long get_num_si() const;
3144   inline boolean gt(const isl::checked::val &v2) const;
3145   inline boolean gt(long v2) const;
3146   static inline isl::checked::val infty(isl::checked::ctx ctx);
3147   inline isl::checked::val inv() const;
3148   inline boolean is_divisible_by(const isl::checked::val &v2) const;
3149   inline boolean is_divisible_by(long v2) const;
3150   inline boolean is_infty() const;
3151   inline boolean is_int() const;
3152   inline boolean is_nan() const;
3153   inline boolean is_neg() const;
3154   inline boolean is_neginfty() const;
3155   inline boolean is_negone() const;
3156   inline boolean is_nonneg() const;
3157   inline boolean is_nonpos() const;
3158   inline boolean is_one() const;
3159   inline boolean is_pos() const;
3160   inline boolean is_rat() const;
3161   inline boolean is_zero() const;
3162   inline boolean le(const isl::checked::val &v2) const;
3163   inline boolean le(long v2) const;
3164   inline boolean lt(const isl::checked::val &v2) const;
3165   inline boolean lt(long v2) const;
3166   inline isl::checked::val max(isl::checked::val v2) const;
3167   inline isl::checked::val max(long v2) const;
3168   inline isl::checked::val min(isl::checked::val v2) const;
3169   inline isl::checked::val min(long v2) const;
3170   inline isl::checked::val mod(isl::checked::val v2) const;
3171   inline isl::checked::val mod(long v2) const;
3172   inline isl::checked::val mul(isl::checked::val v2) const;
3173   inline isl::checked::val mul(long v2) const;
3174   static inline isl::checked::val nan(isl::checked::ctx ctx);
3175   inline boolean ne(const isl::checked::val &v2) const;
3176   inline boolean ne(long v2) const;
3177   inline isl::checked::val neg() const;
3178   static inline isl::checked::val neginfty(isl::checked::ctx ctx);
3179   static inline isl::checked::val negone(isl::checked::ctx ctx);
3180   static inline isl::checked::val one(isl::checked::ctx ctx);
3181   inline isl::checked::val pow2() const;
3182   inline int sgn() const;
3183   inline isl::checked::val sub(isl::checked::val v2) const;
3184   inline isl::checked::val sub(long v2) const;
3185   inline isl::checked::val trunc() const;
3186   static inline isl::checked::val zero(isl::checked::ctx ctx);
3187 };
3188 
3189 // declarations for isl::val_list
3190 inline val_list manage(__isl_take isl_val_list *ptr);
3191 inline val_list manage_copy(__isl_keep isl_val_list *ptr);
3192 
3193 class val_list {
3194   friend inline val_list manage(__isl_take isl_val_list *ptr);
3195   friend inline val_list manage_copy(__isl_keep isl_val_list *ptr);
3196 
3197 protected:
3198   isl_val_list *ptr = nullptr;
3199 
3200   inline explicit val_list(__isl_take isl_val_list *ptr);
3201 
3202 public:
3203   inline /* implicit */ val_list();
3204   inline /* implicit */ val_list(const val_list &obj);
3205   inline explicit val_list(isl::checked::ctx ctx, int n);
3206   inline explicit val_list(isl::checked::val el);
3207   inline val_list &operator=(val_list obj);
3208   inline ~val_list();
3209   inline __isl_give isl_val_list *copy() const &;
3210   inline __isl_give isl_val_list *copy() && = delete;
3211   inline __isl_keep isl_val_list *get() const;
3212   inline __isl_give isl_val_list *release();
3213   inline bool is_null() const;
3214   inline isl::checked::ctx ctx() const;
3215 
3216   inline isl::checked::val_list add(isl::checked::val el) const;
3217   inline isl::checked::val_list add(long el) const;
3218   inline isl::checked::val_list clear() const;
3219   inline isl::checked::val_list concat(isl::checked::val_list list2) const;
3220   inline isl::checked::val_list drop(unsigned int first, unsigned int n) const;
3221   inline stat foreach(const std::function<stat(isl::checked::val)> &fn) const;
3222   inline isl::checked::val at(int index) const;
3223   inline isl::checked::val get_at(int index) const;
3224   inline isl::checked::val_list insert(unsigned int pos, isl::checked::val el) const;
3225   inline isl::checked::val_list insert(unsigned int pos, long el) const;
3226   inline class size size() const;
3227 };
3228 
3229 // implementations for isl::aff
manage(__isl_take isl_aff * ptr)3230 aff manage(__isl_take isl_aff *ptr) {
3231   return aff(ptr);
3232 }
manage_copy(__isl_keep isl_aff * ptr)3233 aff manage_copy(__isl_keep isl_aff *ptr) {
3234   ptr = isl_aff_copy(ptr);
3235   return aff(ptr);
3236 }
3237 
aff()3238 aff::aff()
3239     : ptr(nullptr) {}
3240 
aff(const aff & obj)3241 aff::aff(const aff &obj)
3242     : ptr(nullptr)
3243 {
3244   ptr = obj.copy();
3245 }
3246 
aff(__isl_take isl_aff * ptr)3247 aff::aff(__isl_take isl_aff *ptr)
3248     : ptr(ptr) {}
3249 
aff(isl::checked::ctx ctx,const std::string & str)3250 aff::aff(isl::checked::ctx ctx, const std::string &str)
3251 {
3252   auto res = isl_aff_read_from_str(ctx.release(), str.c_str());
3253   ptr = res;
3254 }
3255 
3256 aff &aff::operator=(aff obj) {
3257   std::swap(this->ptr, obj.ptr);
3258   return *this;
3259 }
3260 
~aff()3261 aff::~aff() {
3262   if (ptr)
3263     isl_aff_free(ptr);
3264 }
3265 
copy()3266 __isl_give isl_aff *aff::copy() const & {
3267   return isl_aff_copy(ptr);
3268 }
3269 
get()3270 __isl_keep isl_aff *aff::get() const {
3271   return ptr;
3272 }
3273 
release()3274 __isl_give isl_aff *aff::release() {
3275   isl_aff *tmp = ptr;
3276   ptr = nullptr;
3277   return tmp;
3278 }
3279 
is_null()3280 bool aff::is_null() const {
3281   return ptr == nullptr;
3282 }
3283 
ctx()3284 isl::checked::ctx aff::ctx() const {
3285   return isl::checked::ctx(isl_aff_get_ctx(ptr));
3286 }
3287 
add(isl::checked::aff aff2)3288 isl::checked::aff aff::add(isl::checked::aff aff2) const
3289 {
3290   auto res = isl_aff_add(copy(), aff2.release());
3291   return manage(res);
3292 }
3293 
add_constant(isl::checked::val v)3294 isl::checked::aff aff::add_constant(isl::checked::val v) const
3295 {
3296   auto res = isl_aff_add_constant_val(copy(), v.release());
3297   return manage(res);
3298 }
3299 
add_constant(long v)3300 isl::checked::aff aff::add_constant(long v) const
3301 {
3302   return this->add_constant(isl::checked::val(ctx(), v));
3303 }
3304 
bind(isl::checked::id id)3305 isl::checked::basic_set aff::bind(isl::checked::id id) const
3306 {
3307   auto res = isl_aff_bind_id(copy(), id.release());
3308   return manage(res);
3309 }
3310 
bind(const std::string & id)3311 isl::checked::basic_set aff::bind(const std::string &id) const
3312 {
3313   return this->bind(isl::checked::id(ctx(), id));
3314 }
3315 
ceil()3316 isl::checked::aff aff::ceil() const
3317 {
3318   auto res = isl_aff_ceil(copy());
3319   return manage(res);
3320 }
3321 
div(isl::checked::aff aff2)3322 isl::checked::aff aff::div(isl::checked::aff aff2) const
3323 {
3324   auto res = isl_aff_div(copy(), aff2.release());
3325   return manage(res);
3326 }
3327 
eq_set(isl::checked::aff aff2)3328 isl::checked::set aff::eq_set(isl::checked::aff aff2) const
3329 {
3330   auto res = isl_aff_eq_set(copy(), aff2.release());
3331   return manage(res);
3332 }
3333 
eval(isl::checked::point pnt)3334 isl::checked::val aff::eval(isl::checked::point pnt) const
3335 {
3336   auto res = isl_aff_eval(copy(), pnt.release());
3337   return manage(res);
3338 }
3339 
floor()3340 isl::checked::aff aff::floor() const
3341 {
3342   auto res = isl_aff_floor(copy());
3343   return manage(res);
3344 }
3345 
ge_set(isl::checked::aff aff2)3346 isl::checked::set aff::ge_set(isl::checked::aff aff2) const
3347 {
3348   auto res = isl_aff_ge_set(copy(), aff2.release());
3349   return manage(res);
3350 }
3351 
constant_val()3352 isl::checked::val aff::constant_val() const
3353 {
3354   auto res = isl_aff_get_constant_val(get());
3355   return manage(res);
3356 }
3357 
get_constant_val()3358 isl::checked::val aff::get_constant_val() const
3359 {
3360   return constant_val();
3361 }
3362 
gist(isl::checked::set context)3363 isl::checked::aff aff::gist(isl::checked::set context) const
3364 {
3365   auto res = isl_aff_gist(copy(), context.release());
3366   return manage(res);
3367 }
3368 
gt_set(isl::checked::aff aff2)3369 isl::checked::set aff::gt_set(isl::checked::aff aff2) const
3370 {
3371   auto res = isl_aff_gt_set(copy(), aff2.release());
3372   return manage(res);
3373 }
3374 
is_cst()3375 boolean aff::is_cst() const
3376 {
3377   auto res = isl_aff_is_cst(get());
3378   return manage(res);
3379 }
3380 
le_set(isl::checked::aff aff2)3381 isl::checked::set aff::le_set(isl::checked::aff aff2) const
3382 {
3383   auto res = isl_aff_le_set(copy(), aff2.release());
3384   return manage(res);
3385 }
3386 
lt_set(isl::checked::aff aff2)3387 isl::checked::set aff::lt_set(isl::checked::aff aff2) const
3388 {
3389   auto res = isl_aff_lt_set(copy(), aff2.release());
3390   return manage(res);
3391 }
3392 
mod(isl::checked::val mod)3393 isl::checked::aff aff::mod(isl::checked::val mod) const
3394 {
3395   auto res = isl_aff_mod_val(copy(), mod.release());
3396   return manage(res);
3397 }
3398 
mod(long mod)3399 isl::checked::aff aff::mod(long mod) const
3400 {
3401   return this->mod(isl::checked::val(ctx(), mod));
3402 }
3403 
mul(isl::checked::aff aff2)3404 isl::checked::aff aff::mul(isl::checked::aff aff2) const
3405 {
3406   auto res = isl_aff_mul(copy(), aff2.release());
3407   return manage(res);
3408 }
3409 
ne_set(isl::checked::aff aff2)3410 isl::checked::set aff::ne_set(isl::checked::aff aff2) const
3411 {
3412   auto res = isl_aff_ne_set(copy(), aff2.release());
3413   return manage(res);
3414 }
3415 
neg()3416 isl::checked::aff aff::neg() const
3417 {
3418   auto res = isl_aff_neg(copy());
3419   return manage(res);
3420 }
3421 
pullback(isl::checked::multi_aff ma)3422 isl::checked::aff aff::pullback(isl::checked::multi_aff ma) const
3423 {
3424   auto res = isl_aff_pullback_multi_aff(copy(), ma.release());
3425   return manage(res);
3426 }
3427 
scale(isl::checked::val v)3428 isl::checked::aff aff::scale(isl::checked::val v) const
3429 {
3430   auto res = isl_aff_scale_val(copy(), v.release());
3431   return manage(res);
3432 }
3433 
scale(long v)3434 isl::checked::aff aff::scale(long v) const
3435 {
3436   return this->scale(isl::checked::val(ctx(), v));
3437 }
3438 
scale_down(isl::checked::val v)3439 isl::checked::aff aff::scale_down(isl::checked::val v) const
3440 {
3441   auto res = isl_aff_scale_down_val(copy(), v.release());
3442   return manage(res);
3443 }
3444 
scale_down(long v)3445 isl::checked::aff aff::scale_down(long v) const
3446 {
3447   return this->scale_down(isl::checked::val(ctx(), v));
3448 }
3449 
sub(isl::checked::aff aff2)3450 isl::checked::aff aff::sub(isl::checked::aff aff2) const
3451 {
3452   auto res = isl_aff_sub(copy(), aff2.release());
3453   return manage(res);
3454 }
3455 
unbind_params_insert_domain(isl::checked::multi_id domain)3456 isl::checked::aff aff::unbind_params_insert_domain(isl::checked::multi_id domain) const
3457 {
3458   auto res = isl_aff_unbind_params_insert_domain(copy(), domain.release());
3459   return manage(res);
3460 }
3461 
zero_on_domain(isl::checked::space space)3462 isl::checked::aff aff::zero_on_domain(isl::checked::space space)
3463 {
3464   auto res = isl_aff_zero_on_domain_space(space.release());
3465   return manage(res);
3466 }
3467 
3468 inline std::ostream &operator<<(std::ostream &os, const aff &obj)
3469 {
3470   char *str = isl_aff_to_str(obj.get());
3471   if (!str) {
3472     os.setstate(std::ios_base::badbit);
3473     return os;
3474   }
3475   os << str;
3476   free(str);
3477   return os;
3478 }
3479 
3480 // implementations for isl::aff_list
manage(__isl_take isl_aff_list * ptr)3481 aff_list manage(__isl_take isl_aff_list *ptr) {
3482   return aff_list(ptr);
3483 }
manage_copy(__isl_keep isl_aff_list * ptr)3484 aff_list manage_copy(__isl_keep isl_aff_list *ptr) {
3485   ptr = isl_aff_list_copy(ptr);
3486   return aff_list(ptr);
3487 }
3488 
aff_list()3489 aff_list::aff_list()
3490     : ptr(nullptr) {}
3491 
aff_list(const aff_list & obj)3492 aff_list::aff_list(const aff_list &obj)
3493     : ptr(nullptr)
3494 {
3495   ptr = obj.copy();
3496 }
3497 
aff_list(__isl_take isl_aff_list * ptr)3498 aff_list::aff_list(__isl_take isl_aff_list *ptr)
3499     : ptr(ptr) {}
3500 
aff_list(isl::checked::ctx ctx,int n)3501 aff_list::aff_list(isl::checked::ctx ctx, int n)
3502 {
3503   auto res = isl_aff_list_alloc(ctx.release(), n);
3504   ptr = res;
3505 }
3506 
aff_list(isl::checked::aff el)3507 aff_list::aff_list(isl::checked::aff el)
3508 {
3509   auto res = isl_aff_list_from_aff(el.release());
3510   ptr = res;
3511 }
3512 
3513 aff_list &aff_list::operator=(aff_list obj) {
3514   std::swap(this->ptr, obj.ptr);
3515   return *this;
3516 }
3517 
~aff_list()3518 aff_list::~aff_list() {
3519   if (ptr)
3520     isl_aff_list_free(ptr);
3521 }
3522 
copy()3523 __isl_give isl_aff_list *aff_list::copy() const & {
3524   return isl_aff_list_copy(ptr);
3525 }
3526 
get()3527 __isl_keep isl_aff_list *aff_list::get() const {
3528   return ptr;
3529 }
3530 
release()3531 __isl_give isl_aff_list *aff_list::release() {
3532   isl_aff_list *tmp = ptr;
3533   ptr = nullptr;
3534   return tmp;
3535 }
3536 
is_null()3537 bool aff_list::is_null() const {
3538   return ptr == nullptr;
3539 }
3540 
ctx()3541 isl::checked::ctx aff_list::ctx() const {
3542   return isl::checked::ctx(isl_aff_list_get_ctx(ptr));
3543 }
3544 
add(isl::checked::aff el)3545 isl::checked::aff_list aff_list::add(isl::checked::aff el) const
3546 {
3547   auto res = isl_aff_list_add(copy(), el.release());
3548   return manage(res);
3549 }
3550 
clear()3551 isl::checked::aff_list aff_list::clear() const
3552 {
3553   auto res = isl_aff_list_clear(copy());
3554   return manage(res);
3555 }
3556 
concat(isl::checked::aff_list list2)3557 isl::checked::aff_list aff_list::concat(isl::checked::aff_list list2) const
3558 {
3559   auto res = isl_aff_list_concat(copy(), list2.release());
3560   return manage(res);
3561 }
3562 
drop(unsigned int first,unsigned int n)3563 isl::checked::aff_list aff_list::drop(unsigned int first, unsigned int n) const
3564 {
3565   auto res = isl_aff_list_drop(copy(), first, n);
3566   return manage(res);
3567 }
3568 
foreach(const std::function<stat (isl::checked::aff)> & fn)3569 stat aff_list::foreach(const std::function<stat(isl::checked::aff)> &fn) const
3570 {
3571   struct fn_data {
3572     std::function<stat(isl::checked::aff)> func;
3573   } fn_data = { fn };
3574   auto fn_lambda = [](isl_aff *arg_0, void *arg_1) -> isl_stat {
3575     auto *data = static_cast<struct fn_data *>(arg_1);
3576     auto ret = (data->func)(manage(arg_0));
3577     return ret.release();
3578   };
3579   auto res = isl_aff_list_foreach(get(), fn_lambda, &fn_data);
3580   return manage(res);
3581 }
3582 
at(int index)3583 isl::checked::aff aff_list::at(int index) const
3584 {
3585   auto res = isl_aff_list_get_at(get(), index);
3586   return manage(res);
3587 }
3588 
get_at(int index)3589 isl::checked::aff aff_list::get_at(int index) const
3590 {
3591   return at(index);
3592 }
3593 
insert(unsigned int pos,isl::checked::aff el)3594 isl::checked::aff_list aff_list::insert(unsigned int pos, isl::checked::aff el) const
3595 {
3596   auto res = isl_aff_list_insert(copy(), pos, el.release());
3597   return manage(res);
3598 }
3599 
size()3600 class size aff_list::size() const
3601 {
3602   auto res = isl_aff_list_size(get());
3603   return manage(res);
3604 }
3605 
3606 inline std::ostream &operator<<(std::ostream &os, const aff_list &obj)
3607 {
3608   char *str = isl_aff_list_to_str(obj.get());
3609   if (!str) {
3610     os.setstate(std::ios_base::badbit);
3611     return os;
3612   }
3613   os << str;
3614   free(str);
3615   return os;
3616 }
3617 
3618 // implementations for isl::ast_build
manage(__isl_take isl_ast_build * ptr)3619 ast_build manage(__isl_take isl_ast_build *ptr) {
3620   return ast_build(ptr);
3621 }
manage_copy(__isl_keep isl_ast_build * ptr)3622 ast_build manage_copy(__isl_keep isl_ast_build *ptr) {
3623   ptr = isl_ast_build_copy(ptr);
3624   return ast_build(ptr);
3625 }
3626 
ast_build()3627 ast_build::ast_build()
3628     : ptr(nullptr) {}
3629 
ast_build(const ast_build & obj)3630 ast_build::ast_build(const ast_build &obj)
3631     : ptr(nullptr)
3632 {
3633   ptr = obj.copy();
3634   copy_callbacks(obj);
3635 }
3636 
ast_build(__isl_take isl_ast_build * ptr)3637 ast_build::ast_build(__isl_take isl_ast_build *ptr)
3638     : ptr(ptr) {}
3639 
ast_build(isl::checked::ctx ctx)3640 ast_build::ast_build(isl::checked::ctx ctx)
3641 {
3642   auto res = isl_ast_build_alloc(ctx.release());
3643   ptr = res;
3644 }
3645 
3646 ast_build &ast_build::operator=(ast_build obj) {
3647   std::swap(this->ptr, obj.ptr);
3648   copy_callbacks(obj);
3649   return *this;
3650 }
3651 
~ast_build()3652 ast_build::~ast_build() {
3653   if (ptr)
3654     isl_ast_build_free(ptr);
3655 }
3656 
copy()3657 __isl_give isl_ast_build *ast_build::copy() const & {
3658   return isl_ast_build_copy(ptr);
3659 }
3660 
get()3661 __isl_keep isl_ast_build *ast_build::get() const {
3662   return ptr;
3663 }
3664 
release()3665 __isl_give isl_ast_build *ast_build::release() {
3666   if (at_each_domain_data)
3667     isl_die(ctx().get(), isl_error_invalid, "cannot release object with persistent callbacks", return nullptr);
3668   isl_ast_build *tmp = ptr;
3669   ptr = nullptr;
3670   return tmp;
3671 }
3672 
is_null()3673 bool ast_build::is_null() const {
3674   return ptr == nullptr;
3675 }
3676 
ctx()3677 isl::checked::ctx ast_build::ctx() const {
3678   return isl::checked::ctx(isl_ast_build_get_ctx(ptr));
3679 }
3680 
copy_callbacks(const ast_build & obj)3681 ast_build &ast_build::copy_callbacks(const ast_build &obj)
3682 {
3683   at_each_domain_data = obj.at_each_domain_data;
3684   return *this;
3685 }
3686 
at_each_domain(isl_ast_node * arg_0,isl_ast_build * arg_1,void * arg_2)3687 isl_ast_node *ast_build::at_each_domain(isl_ast_node *arg_0, isl_ast_build *arg_1, void *arg_2)
3688 {
3689   auto *data = static_cast<struct at_each_domain_data *>(arg_2);
3690   auto ret = (data->func)(manage(arg_0), manage_copy(arg_1));
3691   return ret.release();
3692 }
3693 
set_at_each_domain_data(const std::function<isl::checked::ast_node (isl::checked::ast_node,isl::checked::ast_build)> & fn)3694 void ast_build::set_at_each_domain_data(const std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> &fn)
3695 {
3696   at_each_domain_data = std::make_shared<struct at_each_domain_data>();
3697   at_each_domain_data->func = fn;
3698   ptr = isl_ast_build_set_at_each_domain(ptr, &at_each_domain, at_each_domain_data.get());
3699 }
3700 
set_at_each_domain(const std::function<isl::checked::ast_node (isl::checked::ast_node,isl::checked::ast_build)> & fn)3701 isl::checked::ast_build ast_build::set_at_each_domain(const std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> &fn) const
3702 {
3703   auto copy = *this;
3704   copy.set_at_each_domain_data(fn);
3705   return copy;
3706 }
3707 
access_from(isl::checked::multi_pw_aff mpa)3708 isl::checked::ast_expr ast_build::access_from(isl::checked::multi_pw_aff mpa) const
3709 {
3710   auto res = isl_ast_build_access_from_multi_pw_aff(get(), mpa.release());
3711   return manage(res);
3712 }
3713 
access_from(isl::checked::pw_multi_aff pma)3714 isl::checked::ast_expr ast_build::access_from(isl::checked::pw_multi_aff pma) const
3715 {
3716   auto res = isl_ast_build_access_from_pw_multi_aff(get(), pma.release());
3717   return manage(res);
3718 }
3719 
call_from(isl::checked::multi_pw_aff mpa)3720 isl::checked::ast_expr ast_build::call_from(isl::checked::multi_pw_aff mpa) const
3721 {
3722   auto res = isl_ast_build_call_from_multi_pw_aff(get(), mpa.release());
3723   return manage(res);
3724 }
3725 
call_from(isl::checked::pw_multi_aff pma)3726 isl::checked::ast_expr ast_build::call_from(isl::checked::pw_multi_aff pma) const
3727 {
3728   auto res = isl_ast_build_call_from_pw_multi_aff(get(), pma.release());
3729   return manage(res);
3730 }
3731 
expr_from(isl::checked::pw_aff pa)3732 isl::checked::ast_expr ast_build::expr_from(isl::checked::pw_aff pa) const
3733 {
3734   auto res = isl_ast_build_expr_from_pw_aff(get(), pa.release());
3735   return manage(res);
3736 }
3737 
expr_from(isl::checked::set set)3738 isl::checked::ast_expr ast_build::expr_from(isl::checked::set set) const
3739 {
3740   auto res = isl_ast_build_expr_from_set(get(), set.release());
3741   return manage(res);
3742 }
3743 
from_context(isl::checked::set set)3744 isl::checked::ast_build ast_build::from_context(isl::checked::set set)
3745 {
3746   auto res = isl_ast_build_from_context(set.release());
3747   return manage(res);
3748 }
3749 
schedule()3750 isl::checked::union_map ast_build::schedule() const
3751 {
3752   auto res = isl_ast_build_get_schedule(get());
3753   return manage(res);
3754 }
3755 
get_schedule()3756 isl::checked::union_map ast_build::get_schedule() const
3757 {
3758   return schedule();
3759 }
3760 
node_from(isl::checked::schedule schedule)3761 isl::checked::ast_node ast_build::node_from(isl::checked::schedule schedule) const
3762 {
3763   auto res = isl_ast_build_node_from_schedule(get(), schedule.release());
3764   return manage(res);
3765 }
3766 
node_from_schedule_map(isl::checked::union_map schedule)3767 isl::checked::ast_node ast_build::node_from_schedule_map(isl::checked::union_map schedule) const
3768 {
3769   auto res = isl_ast_build_node_from_schedule_map(get(), schedule.release());
3770   return manage(res);
3771 }
3772 
3773 // implementations for isl::ast_expr
manage(__isl_take isl_ast_expr * ptr)3774 ast_expr manage(__isl_take isl_ast_expr *ptr) {
3775   return ast_expr(ptr);
3776 }
manage_copy(__isl_keep isl_ast_expr * ptr)3777 ast_expr manage_copy(__isl_keep isl_ast_expr *ptr) {
3778   ptr = isl_ast_expr_copy(ptr);
3779   return ast_expr(ptr);
3780 }
3781 
ast_expr()3782 ast_expr::ast_expr()
3783     : ptr(nullptr) {}
3784 
ast_expr(const ast_expr & obj)3785 ast_expr::ast_expr(const ast_expr &obj)
3786     : ptr(nullptr)
3787 {
3788   ptr = obj.copy();
3789 }
3790 
ast_expr(__isl_take isl_ast_expr * ptr)3791 ast_expr::ast_expr(__isl_take isl_ast_expr *ptr)
3792     : ptr(ptr) {}
3793 
3794 ast_expr &ast_expr::operator=(ast_expr obj) {
3795   std::swap(this->ptr, obj.ptr);
3796   return *this;
3797 }
3798 
~ast_expr()3799 ast_expr::~ast_expr() {
3800   if (ptr)
3801     isl_ast_expr_free(ptr);
3802 }
3803 
copy()3804 __isl_give isl_ast_expr *ast_expr::copy() const & {
3805   return isl_ast_expr_copy(ptr);
3806 }
3807 
get()3808 __isl_keep isl_ast_expr *ast_expr::get() const {
3809   return ptr;
3810 }
3811 
release()3812 __isl_give isl_ast_expr *ast_expr::release() {
3813   isl_ast_expr *tmp = ptr;
3814   ptr = nullptr;
3815   return tmp;
3816 }
3817 
is_null()3818 bool ast_expr::is_null() const {
3819   return ptr == nullptr;
3820 }
3821 
3822 template <typename T, typename>
isa_type(T subtype)3823 boolean ast_expr::isa_type(T subtype) const
3824 {
3825   if (is_null())
3826     return boolean();
3827   return isl_ast_expr_get_type(get()) == subtype;
3828 }
3829 template <class T>
isa()3830 boolean ast_expr::isa() const
3831 {
3832   return isa_type<decltype(T::type)>(T::type);
3833 }
3834 template <class T>
as()3835 T ast_expr::as() const
3836 {
3837  if (isa<T>().is_false())
3838     isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
3839   return T(copy());
3840 }
3841 
ctx()3842 isl::checked::ctx ast_expr::ctx() const {
3843   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3844 }
3845 
to_C_str()3846 std::string ast_expr::to_C_str() const
3847 {
3848   auto res = isl_ast_expr_to_C_str(get());
3849   std::string tmp(res);
3850   free(res);
3851   return tmp;
3852 }
3853 
3854 inline std::ostream &operator<<(std::ostream &os, const ast_expr &obj)
3855 {
3856   char *str = isl_ast_expr_to_str(obj.get());
3857   if (!str) {
3858     os.setstate(std::ios_base::badbit);
3859     return os;
3860   }
3861   os << str;
3862   free(str);
3863   return os;
3864 }
3865 
3866 // implementations for isl::ast_expr_id
ast_expr_id()3867 ast_expr_id::ast_expr_id()
3868     : ast_expr() {}
3869 
ast_expr_id(const ast_expr_id & obj)3870 ast_expr_id::ast_expr_id(const ast_expr_id &obj)
3871     : ast_expr(obj)
3872 {
3873 }
3874 
ast_expr_id(__isl_take isl_ast_expr * ptr)3875 ast_expr_id::ast_expr_id(__isl_take isl_ast_expr *ptr)
3876     : ast_expr(ptr) {}
3877 
3878 ast_expr_id &ast_expr_id::operator=(ast_expr_id obj) {
3879   std::swap(this->ptr, obj.ptr);
3880   return *this;
3881 }
3882 
ctx()3883 isl::checked::ctx ast_expr_id::ctx() const {
3884   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3885 }
3886 
id()3887 isl::checked::id ast_expr_id::id() const
3888 {
3889   auto res = isl_ast_expr_id_get_id(get());
3890   return manage(res);
3891 }
3892 
get_id()3893 isl::checked::id ast_expr_id::get_id() const
3894 {
3895   return id();
3896 }
3897 
3898 inline std::ostream &operator<<(std::ostream &os, const ast_expr_id &obj)
3899 {
3900   char *str = isl_ast_expr_to_str(obj.get());
3901   if (!str) {
3902     os.setstate(std::ios_base::badbit);
3903     return os;
3904   }
3905   os << str;
3906   free(str);
3907   return os;
3908 }
3909 
3910 // implementations for isl::ast_expr_int
ast_expr_int()3911 ast_expr_int::ast_expr_int()
3912     : ast_expr() {}
3913 
ast_expr_int(const ast_expr_int & obj)3914 ast_expr_int::ast_expr_int(const ast_expr_int &obj)
3915     : ast_expr(obj)
3916 {
3917 }
3918 
ast_expr_int(__isl_take isl_ast_expr * ptr)3919 ast_expr_int::ast_expr_int(__isl_take isl_ast_expr *ptr)
3920     : ast_expr(ptr) {}
3921 
3922 ast_expr_int &ast_expr_int::operator=(ast_expr_int obj) {
3923   std::swap(this->ptr, obj.ptr);
3924   return *this;
3925 }
3926 
ctx()3927 isl::checked::ctx ast_expr_int::ctx() const {
3928   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3929 }
3930 
val()3931 isl::checked::val ast_expr_int::val() const
3932 {
3933   auto res = isl_ast_expr_int_get_val(get());
3934   return manage(res);
3935 }
3936 
get_val()3937 isl::checked::val ast_expr_int::get_val() const
3938 {
3939   return val();
3940 }
3941 
3942 inline std::ostream &operator<<(std::ostream &os, const ast_expr_int &obj)
3943 {
3944   char *str = isl_ast_expr_to_str(obj.get());
3945   if (!str) {
3946     os.setstate(std::ios_base::badbit);
3947     return os;
3948   }
3949   os << str;
3950   free(str);
3951   return os;
3952 }
3953 
3954 // implementations for isl::ast_expr_op
ast_expr_op()3955 ast_expr_op::ast_expr_op()
3956     : ast_expr() {}
3957 
ast_expr_op(const ast_expr_op & obj)3958 ast_expr_op::ast_expr_op(const ast_expr_op &obj)
3959     : ast_expr(obj)
3960 {
3961 }
3962 
ast_expr_op(__isl_take isl_ast_expr * ptr)3963 ast_expr_op::ast_expr_op(__isl_take isl_ast_expr *ptr)
3964     : ast_expr(ptr) {}
3965 
3966 ast_expr_op &ast_expr_op::operator=(ast_expr_op obj) {
3967   std::swap(this->ptr, obj.ptr);
3968   return *this;
3969 }
3970 
3971 template <typename T, typename>
isa_type(T subtype)3972 boolean ast_expr_op::isa_type(T subtype) const
3973 {
3974   if (is_null())
3975     return boolean();
3976   return isl_ast_expr_op_get_type(get()) == subtype;
3977 }
3978 template <class T>
isa()3979 boolean ast_expr_op::isa() const
3980 {
3981   return isa_type<decltype(T::type)>(T::type);
3982 }
3983 template <class T>
as()3984 T ast_expr_op::as() const
3985 {
3986  if (isa<T>().is_false())
3987     isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
3988   return T(copy());
3989 }
3990 
ctx()3991 isl::checked::ctx ast_expr_op::ctx() const {
3992   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3993 }
3994 
arg(int pos)3995 isl::checked::ast_expr ast_expr_op::arg(int pos) const
3996 {
3997   auto res = isl_ast_expr_op_get_arg(get(), pos);
3998   return manage(res);
3999 }
4000 
get_arg(int pos)4001 isl::checked::ast_expr ast_expr_op::get_arg(int pos) const
4002 {
4003   return arg(pos);
4004 }
4005 
n_arg()4006 class size ast_expr_op::n_arg() const
4007 {
4008   auto res = isl_ast_expr_op_get_n_arg(get());
4009   return manage(res);
4010 }
4011 
get_n_arg()4012 class size ast_expr_op::get_n_arg() const
4013 {
4014   return n_arg();
4015 }
4016 
4017 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op &obj)
4018 {
4019   char *str = isl_ast_expr_to_str(obj.get());
4020   if (!str) {
4021     os.setstate(std::ios_base::badbit);
4022     return os;
4023   }
4024   os << str;
4025   free(str);
4026   return os;
4027 }
4028 
4029 // implementations for isl::ast_expr_op_access
ast_expr_op_access()4030 ast_expr_op_access::ast_expr_op_access()
4031     : ast_expr_op() {}
4032 
ast_expr_op_access(const ast_expr_op_access & obj)4033 ast_expr_op_access::ast_expr_op_access(const ast_expr_op_access &obj)
4034     : ast_expr_op(obj)
4035 {
4036 }
4037 
ast_expr_op_access(__isl_take isl_ast_expr * ptr)4038 ast_expr_op_access::ast_expr_op_access(__isl_take isl_ast_expr *ptr)
4039     : ast_expr_op(ptr) {}
4040 
4041 ast_expr_op_access &ast_expr_op_access::operator=(ast_expr_op_access obj) {
4042   std::swap(this->ptr, obj.ptr);
4043   return *this;
4044 }
4045 
ctx()4046 isl::checked::ctx ast_expr_op_access::ctx() const {
4047   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4048 }
4049 
4050 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_access &obj)
4051 {
4052   char *str = isl_ast_expr_to_str(obj.get());
4053   if (!str) {
4054     os.setstate(std::ios_base::badbit);
4055     return os;
4056   }
4057   os << str;
4058   free(str);
4059   return os;
4060 }
4061 
4062 // implementations for isl::ast_expr_op_add
ast_expr_op_add()4063 ast_expr_op_add::ast_expr_op_add()
4064     : ast_expr_op() {}
4065 
ast_expr_op_add(const ast_expr_op_add & obj)4066 ast_expr_op_add::ast_expr_op_add(const ast_expr_op_add &obj)
4067     : ast_expr_op(obj)
4068 {
4069 }
4070 
ast_expr_op_add(__isl_take isl_ast_expr * ptr)4071 ast_expr_op_add::ast_expr_op_add(__isl_take isl_ast_expr *ptr)
4072     : ast_expr_op(ptr) {}
4073 
4074 ast_expr_op_add &ast_expr_op_add::operator=(ast_expr_op_add obj) {
4075   std::swap(this->ptr, obj.ptr);
4076   return *this;
4077 }
4078 
ctx()4079 isl::checked::ctx ast_expr_op_add::ctx() const {
4080   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4081 }
4082 
4083 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_add &obj)
4084 {
4085   char *str = isl_ast_expr_to_str(obj.get());
4086   if (!str) {
4087     os.setstate(std::ios_base::badbit);
4088     return os;
4089   }
4090   os << str;
4091   free(str);
4092   return os;
4093 }
4094 
4095 // implementations for isl::ast_expr_op_address_of
ast_expr_op_address_of()4096 ast_expr_op_address_of::ast_expr_op_address_of()
4097     : ast_expr_op() {}
4098 
ast_expr_op_address_of(const ast_expr_op_address_of & obj)4099 ast_expr_op_address_of::ast_expr_op_address_of(const ast_expr_op_address_of &obj)
4100     : ast_expr_op(obj)
4101 {
4102 }
4103 
ast_expr_op_address_of(__isl_take isl_ast_expr * ptr)4104 ast_expr_op_address_of::ast_expr_op_address_of(__isl_take isl_ast_expr *ptr)
4105     : ast_expr_op(ptr) {}
4106 
4107 ast_expr_op_address_of &ast_expr_op_address_of::operator=(ast_expr_op_address_of obj) {
4108   std::swap(this->ptr, obj.ptr);
4109   return *this;
4110 }
4111 
ctx()4112 isl::checked::ctx ast_expr_op_address_of::ctx() const {
4113   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4114 }
4115 
4116 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_address_of &obj)
4117 {
4118   char *str = isl_ast_expr_to_str(obj.get());
4119   if (!str) {
4120     os.setstate(std::ios_base::badbit);
4121     return os;
4122   }
4123   os << str;
4124   free(str);
4125   return os;
4126 }
4127 
4128 // implementations for isl::ast_expr_op_and
ast_expr_op_and()4129 ast_expr_op_and::ast_expr_op_and()
4130     : ast_expr_op() {}
4131 
ast_expr_op_and(const ast_expr_op_and & obj)4132 ast_expr_op_and::ast_expr_op_and(const ast_expr_op_and &obj)
4133     : ast_expr_op(obj)
4134 {
4135 }
4136 
ast_expr_op_and(__isl_take isl_ast_expr * ptr)4137 ast_expr_op_and::ast_expr_op_and(__isl_take isl_ast_expr *ptr)
4138     : ast_expr_op(ptr) {}
4139 
4140 ast_expr_op_and &ast_expr_op_and::operator=(ast_expr_op_and obj) {
4141   std::swap(this->ptr, obj.ptr);
4142   return *this;
4143 }
4144 
ctx()4145 isl::checked::ctx ast_expr_op_and::ctx() const {
4146   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4147 }
4148 
4149 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_and &obj)
4150 {
4151   char *str = isl_ast_expr_to_str(obj.get());
4152   if (!str) {
4153     os.setstate(std::ios_base::badbit);
4154     return os;
4155   }
4156   os << str;
4157   free(str);
4158   return os;
4159 }
4160 
4161 // implementations for isl::ast_expr_op_and_then
ast_expr_op_and_then()4162 ast_expr_op_and_then::ast_expr_op_and_then()
4163     : ast_expr_op() {}
4164 
ast_expr_op_and_then(const ast_expr_op_and_then & obj)4165 ast_expr_op_and_then::ast_expr_op_and_then(const ast_expr_op_and_then &obj)
4166     : ast_expr_op(obj)
4167 {
4168 }
4169 
ast_expr_op_and_then(__isl_take isl_ast_expr * ptr)4170 ast_expr_op_and_then::ast_expr_op_and_then(__isl_take isl_ast_expr *ptr)
4171     : ast_expr_op(ptr) {}
4172 
4173 ast_expr_op_and_then &ast_expr_op_and_then::operator=(ast_expr_op_and_then obj) {
4174   std::swap(this->ptr, obj.ptr);
4175   return *this;
4176 }
4177 
ctx()4178 isl::checked::ctx ast_expr_op_and_then::ctx() const {
4179   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4180 }
4181 
4182 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_and_then &obj)
4183 {
4184   char *str = isl_ast_expr_to_str(obj.get());
4185   if (!str) {
4186     os.setstate(std::ios_base::badbit);
4187     return os;
4188   }
4189   os << str;
4190   free(str);
4191   return os;
4192 }
4193 
4194 // implementations for isl::ast_expr_op_call
ast_expr_op_call()4195 ast_expr_op_call::ast_expr_op_call()
4196     : ast_expr_op() {}
4197 
ast_expr_op_call(const ast_expr_op_call & obj)4198 ast_expr_op_call::ast_expr_op_call(const ast_expr_op_call &obj)
4199     : ast_expr_op(obj)
4200 {
4201 }
4202 
ast_expr_op_call(__isl_take isl_ast_expr * ptr)4203 ast_expr_op_call::ast_expr_op_call(__isl_take isl_ast_expr *ptr)
4204     : ast_expr_op(ptr) {}
4205 
4206 ast_expr_op_call &ast_expr_op_call::operator=(ast_expr_op_call obj) {
4207   std::swap(this->ptr, obj.ptr);
4208   return *this;
4209 }
4210 
ctx()4211 isl::checked::ctx ast_expr_op_call::ctx() const {
4212   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4213 }
4214 
4215 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_call &obj)
4216 {
4217   char *str = isl_ast_expr_to_str(obj.get());
4218   if (!str) {
4219     os.setstate(std::ios_base::badbit);
4220     return os;
4221   }
4222   os << str;
4223   free(str);
4224   return os;
4225 }
4226 
4227 // implementations for isl::ast_expr_op_cond
ast_expr_op_cond()4228 ast_expr_op_cond::ast_expr_op_cond()
4229     : ast_expr_op() {}
4230 
ast_expr_op_cond(const ast_expr_op_cond & obj)4231 ast_expr_op_cond::ast_expr_op_cond(const ast_expr_op_cond &obj)
4232     : ast_expr_op(obj)
4233 {
4234 }
4235 
ast_expr_op_cond(__isl_take isl_ast_expr * ptr)4236 ast_expr_op_cond::ast_expr_op_cond(__isl_take isl_ast_expr *ptr)
4237     : ast_expr_op(ptr) {}
4238 
4239 ast_expr_op_cond &ast_expr_op_cond::operator=(ast_expr_op_cond obj) {
4240   std::swap(this->ptr, obj.ptr);
4241   return *this;
4242 }
4243 
ctx()4244 isl::checked::ctx ast_expr_op_cond::ctx() const {
4245   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4246 }
4247 
4248 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_cond &obj)
4249 {
4250   char *str = isl_ast_expr_to_str(obj.get());
4251   if (!str) {
4252     os.setstate(std::ios_base::badbit);
4253     return os;
4254   }
4255   os << str;
4256   free(str);
4257   return os;
4258 }
4259 
4260 // implementations for isl::ast_expr_op_div
ast_expr_op_div()4261 ast_expr_op_div::ast_expr_op_div()
4262     : ast_expr_op() {}
4263 
ast_expr_op_div(const ast_expr_op_div & obj)4264 ast_expr_op_div::ast_expr_op_div(const ast_expr_op_div &obj)
4265     : ast_expr_op(obj)
4266 {
4267 }
4268 
ast_expr_op_div(__isl_take isl_ast_expr * ptr)4269 ast_expr_op_div::ast_expr_op_div(__isl_take isl_ast_expr *ptr)
4270     : ast_expr_op(ptr) {}
4271 
4272 ast_expr_op_div &ast_expr_op_div::operator=(ast_expr_op_div obj) {
4273   std::swap(this->ptr, obj.ptr);
4274   return *this;
4275 }
4276 
ctx()4277 isl::checked::ctx ast_expr_op_div::ctx() const {
4278   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4279 }
4280 
4281 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_div &obj)
4282 {
4283   char *str = isl_ast_expr_to_str(obj.get());
4284   if (!str) {
4285     os.setstate(std::ios_base::badbit);
4286     return os;
4287   }
4288   os << str;
4289   free(str);
4290   return os;
4291 }
4292 
4293 // implementations for isl::ast_expr_op_eq
ast_expr_op_eq()4294 ast_expr_op_eq::ast_expr_op_eq()
4295     : ast_expr_op() {}
4296 
ast_expr_op_eq(const ast_expr_op_eq & obj)4297 ast_expr_op_eq::ast_expr_op_eq(const ast_expr_op_eq &obj)
4298     : ast_expr_op(obj)
4299 {
4300 }
4301 
ast_expr_op_eq(__isl_take isl_ast_expr * ptr)4302 ast_expr_op_eq::ast_expr_op_eq(__isl_take isl_ast_expr *ptr)
4303     : ast_expr_op(ptr) {}
4304 
4305 ast_expr_op_eq &ast_expr_op_eq::operator=(ast_expr_op_eq obj) {
4306   std::swap(this->ptr, obj.ptr);
4307   return *this;
4308 }
4309 
ctx()4310 isl::checked::ctx ast_expr_op_eq::ctx() const {
4311   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4312 }
4313 
4314 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_eq &obj)
4315 {
4316   char *str = isl_ast_expr_to_str(obj.get());
4317   if (!str) {
4318     os.setstate(std::ios_base::badbit);
4319     return os;
4320   }
4321   os << str;
4322   free(str);
4323   return os;
4324 }
4325 
4326 // implementations for isl::ast_expr_op_fdiv_q
ast_expr_op_fdiv_q()4327 ast_expr_op_fdiv_q::ast_expr_op_fdiv_q()
4328     : ast_expr_op() {}
4329 
ast_expr_op_fdiv_q(const ast_expr_op_fdiv_q & obj)4330 ast_expr_op_fdiv_q::ast_expr_op_fdiv_q(const ast_expr_op_fdiv_q &obj)
4331     : ast_expr_op(obj)
4332 {
4333 }
4334 
ast_expr_op_fdiv_q(__isl_take isl_ast_expr * ptr)4335 ast_expr_op_fdiv_q::ast_expr_op_fdiv_q(__isl_take isl_ast_expr *ptr)
4336     : ast_expr_op(ptr) {}
4337 
4338 ast_expr_op_fdiv_q &ast_expr_op_fdiv_q::operator=(ast_expr_op_fdiv_q obj) {
4339   std::swap(this->ptr, obj.ptr);
4340   return *this;
4341 }
4342 
ctx()4343 isl::checked::ctx ast_expr_op_fdiv_q::ctx() const {
4344   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4345 }
4346 
4347 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_fdiv_q &obj)
4348 {
4349   char *str = isl_ast_expr_to_str(obj.get());
4350   if (!str) {
4351     os.setstate(std::ios_base::badbit);
4352     return os;
4353   }
4354   os << str;
4355   free(str);
4356   return os;
4357 }
4358 
4359 // implementations for isl::ast_expr_op_ge
ast_expr_op_ge()4360 ast_expr_op_ge::ast_expr_op_ge()
4361     : ast_expr_op() {}
4362 
ast_expr_op_ge(const ast_expr_op_ge & obj)4363 ast_expr_op_ge::ast_expr_op_ge(const ast_expr_op_ge &obj)
4364     : ast_expr_op(obj)
4365 {
4366 }
4367 
ast_expr_op_ge(__isl_take isl_ast_expr * ptr)4368 ast_expr_op_ge::ast_expr_op_ge(__isl_take isl_ast_expr *ptr)
4369     : ast_expr_op(ptr) {}
4370 
4371 ast_expr_op_ge &ast_expr_op_ge::operator=(ast_expr_op_ge obj) {
4372   std::swap(this->ptr, obj.ptr);
4373   return *this;
4374 }
4375 
ctx()4376 isl::checked::ctx ast_expr_op_ge::ctx() const {
4377   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4378 }
4379 
4380 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_ge &obj)
4381 {
4382   char *str = isl_ast_expr_to_str(obj.get());
4383   if (!str) {
4384     os.setstate(std::ios_base::badbit);
4385     return os;
4386   }
4387   os << str;
4388   free(str);
4389   return os;
4390 }
4391 
4392 // implementations for isl::ast_expr_op_gt
ast_expr_op_gt()4393 ast_expr_op_gt::ast_expr_op_gt()
4394     : ast_expr_op() {}
4395 
ast_expr_op_gt(const ast_expr_op_gt & obj)4396 ast_expr_op_gt::ast_expr_op_gt(const ast_expr_op_gt &obj)
4397     : ast_expr_op(obj)
4398 {
4399 }
4400 
ast_expr_op_gt(__isl_take isl_ast_expr * ptr)4401 ast_expr_op_gt::ast_expr_op_gt(__isl_take isl_ast_expr *ptr)
4402     : ast_expr_op(ptr) {}
4403 
4404 ast_expr_op_gt &ast_expr_op_gt::operator=(ast_expr_op_gt obj) {
4405   std::swap(this->ptr, obj.ptr);
4406   return *this;
4407 }
4408 
ctx()4409 isl::checked::ctx ast_expr_op_gt::ctx() const {
4410   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4411 }
4412 
4413 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_gt &obj)
4414 {
4415   char *str = isl_ast_expr_to_str(obj.get());
4416   if (!str) {
4417     os.setstate(std::ios_base::badbit);
4418     return os;
4419   }
4420   os << str;
4421   free(str);
4422   return os;
4423 }
4424 
4425 // implementations for isl::ast_expr_op_le
ast_expr_op_le()4426 ast_expr_op_le::ast_expr_op_le()
4427     : ast_expr_op() {}
4428 
ast_expr_op_le(const ast_expr_op_le & obj)4429 ast_expr_op_le::ast_expr_op_le(const ast_expr_op_le &obj)
4430     : ast_expr_op(obj)
4431 {
4432 }
4433 
ast_expr_op_le(__isl_take isl_ast_expr * ptr)4434 ast_expr_op_le::ast_expr_op_le(__isl_take isl_ast_expr *ptr)
4435     : ast_expr_op(ptr) {}
4436 
4437 ast_expr_op_le &ast_expr_op_le::operator=(ast_expr_op_le obj) {
4438   std::swap(this->ptr, obj.ptr);
4439   return *this;
4440 }
4441 
ctx()4442 isl::checked::ctx ast_expr_op_le::ctx() const {
4443   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4444 }
4445 
4446 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_le &obj)
4447 {
4448   char *str = isl_ast_expr_to_str(obj.get());
4449   if (!str) {
4450     os.setstate(std::ios_base::badbit);
4451     return os;
4452   }
4453   os << str;
4454   free(str);
4455   return os;
4456 }
4457 
4458 // implementations for isl::ast_expr_op_lt
ast_expr_op_lt()4459 ast_expr_op_lt::ast_expr_op_lt()
4460     : ast_expr_op() {}
4461 
ast_expr_op_lt(const ast_expr_op_lt & obj)4462 ast_expr_op_lt::ast_expr_op_lt(const ast_expr_op_lt &obj)
4463     : ast_expr_op(obj)
4464 {
4465 }
4466 
ast_expr_op_lt(__isl_take isl_ast_expr * ptr)4467 ast_expr_op_lt::ast_expr_op_lt(__isl_take isl_ast_expr *ptr)
4468     : ast_expr_op(ptr) {}
4469 
4470 ast_expr_op_lt &ast_expr_op_lt::operator=(ast_expr_op_lt obj) {
4471   std::swap(this->ptr, obj.ptr);
4472   return *this;
4473 }
4474 
ctx()4475 isl::checked::ctx ast_expr_op_lt::ctx() const {
4476   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4477 }
4478 
4479 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_lt &obj)
4480 {
4481   char *str = isl_ast_expr_to_str(obj.get());
4482   if (!str) {
4483     os.setstate(std::ios_base::badbit);
4484     return os;
4485   }
4486   os << str;
4487   free(str);
4488   return os;
4489 }
4490 
4491 // implementations for isl::ast_expr_op_max
ast_expr_op_max()4492 ast_expr_op_max::ast_expr_op_max()
4493     : ast_expr_op() {}
4494 
ast_expr_op_max(const ast_expr_op_max & obj)4495 ast_expr_op_max::ast_expr_op_max(const ast_expr_op_max &obj)
4496     : ast_expr_op(obj)
4497 {
4498 }
4499 
ast_expr_op_max(__isl_take isl_ast_expr * ptr)4500 ast_expr_op_max::ast_expr_op_max(__isl_take isl_ast_expr *ptr)
4501     : ast_expr_op(ptr) {}
4502 
4503 ast_expr_op_max &ast_expr_op_max::operator=(ast_expr_op_max obj) {
4504   std::swap(this->ptr, obj.ptr);
4505   return *this;
4506 }
4507 
ctx()4508 isl::checked::ctx ast_expr_op_max::ctx() const {
4509   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4510 }
4511 
4512 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_max &obj)
4513 {
4514   char *str = isl_ast_expr_to_str(obj.get());
4515   if (!str) {
4516     os.setstate(std::ios_base::badbit);
4517     return os;
4518   }
4519   os << str;
4520   free(str);
4521   return os;
4522 }
4523 
4524 // implementations for isl::ast_expr_op_member
ast_expr_op_member()4525 ast_expr_op_member::ast_expr_op_member()
4526     : ast_expr_op() {}
4527 
ast_expr_op_member(const ast_expr_op_member & obj)4528 ast_expr_op_member::ast_expr_op_member(const ast_expr_op_member &obj)
4529     : ast_expr_op(obj)
4530 {
4531 }
4532 
ast_expr_op_member(__isl_take isl_ast_expr * ptr)4533 ast_expr_op_member::ast_expr_op_member(__isl_take isl_ast_expr *ptr)
4534     : ast_expr_op(ptr) {}
4535 
4536 ast_expr_op_member &ast_expr_op_member::operator=(ast_expr_op_member obj) {
4537   std::swap(this->ptr, obj.ptr);
4538   return *this;
4539 }
4540 
ctx()4541 isl::checked::ctx ast_expr_op_member::ctx() const {
4542   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4543 }
4544 
4545 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_member &obj)
4546 {
4547   char *str = isl_ast_expr_to_str(obj.get());
4548   if (!str) {
4549     os.setstate(std::ios_base::badbit);
4550     return os;
4551   }
4552   os << str;
4553   free(str);
4554   return os;
4555 }
4556 
4557 // implementations for isl::ast_expr_op_min
ast_expr_op_min()4558 ast_expr_op_min::ast_expr_op_min()
4559     : ast_expr_op() {}
4560 
ast_expr_op_min(const ast_expr_op_min & obj)4561 ast_expr_op_min::ast_expr_op_min(const ast_expr_op_min &obj)
4562     : ast_expr_op(obj)
4563 {
4564 }
4565 
ast_expr_op_min(__isl_take isl_ast_expr * ptr)4566 ast_expr_op_min::ast_expr_op_min(__isl_take isl_ast_expr *ptr)
4567     : ast_expr_op(ptr) {}
4568 
4569 ast_expr_op_min &ast_expr_op_min::operator=(ast_expr_op_min obj) {
4570   std::swap(this->ptr, obj.ptr);
4571   return *this;
4572 }
4573 
ctx()4574 isl::checked::ctx ast_expr_op_min::ctx() const {
4575   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4576 }
4577 
4578 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_min &obj)
4579 {
4580   char *str = isl_ast_expr_to_str(obj.get());
4581   if (!str) {
4582     os.setstate(std::ios_base::badbit);
4583     return os;
4584   }
4585   os << str;
4586   free(str);
4587   return os;
4588 }
4589 
4590 // implementations for isl::ast_expr_op_minus
ast_expr_op_minus()4591 ast_expr_op_minus::ast_expr_op_minus()
4592     : ast_expr_op() {}
4593 
ast_expr_op_minus(const ast_expr_op_minus & obj)4594 ast_expr_op_minus::ast_expr_op_minus(const ast_expr_op_minus &obj)
4595     : ast_expr_op(obj)
4596 {
4597 }
4598 
ast_expr_op_minus(__isl_take isl_ast_expr * ptr)4599 ast_expr_op_minus::ast_expr_op_minus(__isl_take isl_ast_expr *ptr)
4600     : ast_expr_op(ptr) {}
4601 
4602 ast_expr_op_minus &ast_expr_op_minus::operator=(ast_expr_op_minus obj) {
4603   std::swap(this->ptr, obj.ptr);
4604   return *this;
4605 }
4606 
ctx()4607 isl::checked::ctx ast_expr_op_minus::ctx() const {
4608   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4609 }
4610 
4611 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_minus &obj)
4612 {
4613   char *str = isl_ast_expr_to_str(obj.get());
4614   if (!str) {
4615     os.setstate(std::ios_base::badbit);
4616     return os;
4617   }
4618   os << str;
4619   free(str);
4620   return os;
4621 }
4622 
4623 // implementations for isl::ast_expr_op_mul
ast_expr_op_mul()4624 ast_expr_op_mul::ast_expr_op_mul()
4625     : ast_expr_op() {}
4626 
ast_expr_op_mul(const ast_expr_op_mul & obj)4627 ast_expr_op_mul::ast_expr_op_mul(const ast_expr_op_mul &obj)
4628     : ast_expr_op(obj)
4629 {
4630 }
4631 
ast_expr_op_mul(__isl_take isl_ast_expr * ptr)4632 ast_expr_op_mul::ast_expr_op_mul(__isl_take isl_ast_expr *ptr)
4633     : ast_expr_op(ptr) {}
4634 
4635 ast_expr_op_mul &ast_expr_op_mul::operator=(ast_expr_op_mul obj) {
4636   std::swap(this->ptr, obj.ptr);
4637   return *this;
4638 }
4639 
ctx()4640 isl::checked::ctx ast_expr_op_mul::ctx() const {
4641   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4642 }
4643 
4644 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_mul &obj)
4645 {
4646   char *str = isl_ast_expr_to_str(obj.get());
4647   if (!str) {
4648     os.setstate(std::ios_base::badbit);
4649     return os;
4650   }
4651   os << str;
4652   free(str);
4653   return os;
4654 }
4655 
4656 // implementations for isl::ast_expr_op_or
ast_expr_op_or()4657 ast_expr_op_or::ast_expr_op_or()
4658     : ast_expr_op() {}
4659 
ast_expr_op_or(const ast_expr_op_or & obj)4660 ast_expr_op_or::ast_expr_op_or(const ast_expr_op_or &obj)
4661     : ast_expr_op(obj)
4662 {
4663 }
4664 
ast_expr_op_or(__isl_take isl_ast_expr * ptr)4665 ast_expr_op_or::ast_expr_op_or(__isl_take isl_ast_expr *ptr)
4666     : ast_expr_op(ptr) {}
4667 
4668 ast_expr_op_or &ast_expr_op_or::operator=(ast_expr_op_or obj) {
4669   std::swap(this->ptr, obj.ptr);
4670   return *this;
4671 }
4672 
ctx()4673 isl::checked::ctx ast_expr_op_or::ctx() const {
4674   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4675 }
4676 
4677 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_or &obj)
4678 {
4679   char *str = isl_ast_expr_to_str(obj.get());
4680   if (!str) {
4681     os.setstate(std::ios_base::badbit);
4682     return os;
4683   }
4684   os << str;
4685   free(str);
4686   return os;
4687 }
4688 
4689 // implementations for isl::ast_expr_op_or_else
ast_expr_op_or_else()4690 ast_expr_op_or_else::ast_expr_op_or_else()
4691     : ast_expr_op() {}
4692 
ast_expr_op_or_else(const ast_expr_op_or_else & obj)4693 ast_expr_op_or_else::ast_expr_op_or_else(const ast_expr_op_or_else &obj)
4694     : ast_expr_op(obj)
4695 {
4696 }
4697 
ast_expr_op_or_else(__isl_take isl_ast_expr * ptr)4698 ast_expr_op_or_else::ast_expr_op_or_else(__isl_take isl_ast_expr *ptr)
4699     : ast_expr_op(ptr) {}
4700 
4701 ast_expr_op_or_else &ast_expr_op_or_else::operator=(ast_expr_op_or_else obj) {
4702   std::swap(this->ptr, obj.ptr);
4703   return *this;
4704 }
4705 
ctx()4706 isl::checked::ctx ast_expr_op_or_else::ctx() const {
4707   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4708 }
4709 
4710 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_or_else &obj)
4711 {
4712   char *str = isl_ast_expr_to_str(obj.get());
4713   if (!str) {
4714     os.setstate(std::ios_base::badbit);
4715     return os;
4716   }
4717   os << str;
4718   free(str);
4719   return os;
4720 }
4721 
4722 // implementations for isl::ast_expr_op_pdiv_q
ast_expr_op_pdiv_q()4723 ast_expr_op_pdiv_q::ast_expr_op_pdiv_q()
4724     : ast_expr_op() {}
4725 
ast_expr_op_pdiv_q(const ast_expr_op_pdiv_q & obj)4726 ast_expr_op_pdiv_q::ast_expr_op_pdiv_q(const ast_expr_op_pdiv_q &obj)
4727     : ast_expr_op(obj)
4728 {
4729 }
4730 
ast_expr_op_pdiv_q(__isl_take isl_ast_expr * ptr)4731 ast_expr_op_pdiv_q::ast_expr_op_pdiv_q(__isl_take isl_ast_expr *ptr)
4732     : ast_expr_op(ptr) {}
4733 
4734 ast_expr_op_pdiv_q &ast_expr_op_pdiv_q::operator=(ast_expr_op_pdiv_q obj) {
4735   std::swap(this->ptr, obj.ptr);
4736   return *this;
4737 }
4738 
ctx()4739 isl::checked::ctx ast_expr_op_pdiv_q::ctx() const {
4740   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4741 }
4742 
4743 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_pdiv_q &obj)
4744 {
4745   char *str = isl_ast_expr_to_str(obj.get());
4746   if (!str) {
4747     os.setstate(std::ios_base::badbit);
4748     return os;
4749   }
4750   os << str;
4751   free(str);
4752   return os;
4753 }
4754 
4755 // implementations for isl::ast_expr_op_pdiv_r
ast_expr_op_pdiv_r()4756 ast_expr_op_pdiv_r::ast_expr_op_pdiv_r()
4757     : ast_expr_op() {}
4758 
ast_expr_op_pdiv_r(const ast_expr_op_pdiv_r & obj)4759 ast_expr_op_pdiv_r::ast_expr_op_pdiv_r(const ast_expr_op_pdiv_r &obj)
4760     : ast_expr_op(obj)
4761 {
4762 }
4763 
ast_expr_op_pdiv_r(__isl_take isl_ast_expr * ptr)4764 ast_expr_op_pdiv_r::ast_expr_op_pdiv_r(__isl_take isl_ast_expr *ptr)
4765     : ast_expr_op(ptr) {}
4766 
4767 ast_expr_op_pdiv_r &ast_expr_op_pdiv_r::operator=(ast_expr_op_pdiv_r obj) {
4768   std::swap(this->ptr, obj.ptr);
4769   return *this;
4770 }
4771 
ctx()4772 isl::checked::ctx ast_expr_op_pdiv_r::ctx() const {
4773   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4774 }
4775 
4776 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_pdiv_r &obj)
4777 {
4778   char *str = isl_ast_expr_to_str(obj.get());
4779   if (!str) {
4780     os.setstate(std::ios_base::badbit);
4781     return os;
4782   }
4783   os << str;
4784   free(str);
4785   return os;
4786 }
4787 
4788 // implementations for isl::ast_expr_op_select
ast_expr_op_select()4789 ast_expr_op_select::ast_expr_op_select()
4790     : ast_expr_op() {}
4791 
ast_expr_op_select(const ast_expr_op_select & obj)4792 ast_expr_op_select::ast_expr_op_select(const ast_expr_op_select &obj)
4793     : ast_expr_op(obj)
4794 {
4795 }
4796 
ast_expr_op_select(__isl_take isl_ast_expr * ptr)4797 ast_expr_op_select::ast_expr_op_select(__isl_take isl_ast_expr *ptr)
4798     : ast_expr_op(ptr) {}
4799 
4800 ast_expr_op_select &ast_expr_op_select::operator=(ast_expr_op_select obj) {
4801   std::swap(this->ptr, obj.ptr);
4802   return *this;
4803 }
4804 
ctx()4805 isl::checked::ctx ast_expr_op_select::ctx() const {
4806   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4807 }
4808 
4809 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_select &obj)
4810 {
4811   char *str = isl_ast_expr_to_str(obj.get());
4812   if (!str) {
4813     os.setstate(std::ios_base::badbit);
4814     return os;
4815   }
4816   os << str;
4817   free(str);
4818   return os;
4819 }
4820 
4821 // implementations for isl::ast_expr_op_sub
ast_expr_op_sub()4822 ast_expr_op_sub::ast_expr_op_sub()
4823     : ast_expr_op() {}
4824 
ast_expr_op_sub(const ast_expr_op_sub & obj)4825 ast_expr_op_sub::ast_expr_op_sub(const ast_expr_op_sub &obj)
4826     : ast_expr_op(obj)
4827 {
4828 }
4829 
ast_expr_op_sub(__isl_take isl_ast_expr * ptr)4830 ast_expr_op_sub::ast_expr_op_sub(__isl_take isl_ast_expr *ptr)
4831     : ast_expr_op(ptr) {}
4832 
4833 ast_expr_op_sub &ast_expr_op_sub::operator=(ast_expr_op_sub obj) {
4834   std::swap(this->ptr, obj.ptr);
4835   return *this;
4836 }
4837 
ctx()4838 isl::checked::ctx ast_expr_op_sub::ctx() const {
4839   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4840 }
4841 
4842 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_sub &obj)
4843 {
4844   char *str = isl_ast_expr_to_str(obj.get());
4845   if (!str) {
4846     os.setstate(std::ios_base::badbit);
4847     return os;
4848   }
4849   os << str;
4850   free(str);
4851   return os;
4852 }
4853 
4854 // implementations for isl::ast_expr_op_zdiv_r
ast_expr_op_zdiv_r()4855 ast_expr_op_zdiv_r::ast_expr_op_zdiv_r()
4856     : ast_expr_op() {}
4857 
ast_expr_op_zdiv_r(const ast_expr_op_zdiv_r & obj)4858 ast_expr_op_zdiv_r::ast_expr_op_zdiv_r(const ast_expr_op_zdiv_r &obj)
4859     : ast_expr_op(obj)
4860 {
4861 }
4862 
ast_expr_op_zdiv_r(__isl_take isl_ast_expr * ptr)4863 ast_expr_op_zdiv_r::ast_expr_op_zdiv_r(__isl_take isl_ast_expr *ptr)
4864     : ast_expr_op(ptr) {}
4865 
4866 ast_expr_op_zdiv_r &ast_expr_op_zdiv_r::operator=(ast_expr_op_zdiv_r obj) {
4867   std::swap(this->ptr, obj.ptr);
4868   return *this;
4869 }
4870 
ctx()4871 isl::checked::ctx ast_expr_op_zdiv_r::ctx() const {
4872   return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4873 }
4874 
4875 inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_zdiv_r &obj)
4876 {
4877   char *str = isl_ast_expr_to_str(obj.get());
4878   if (!str) {
4879     os.setstate(std::ios_base::badbit);
4880     return os;
4881   }
4882   os << str;
4883   free(str);
4884   return os;
4885 }
4886 
4887 // implementations for isl::ast_node
manage(__isl_take isl_ast_node * ptr)4888 ast_node manage(__isl_take isl_ast_node *ptr) {
4889   return ast_node(ptr);
4890 }
manage_copy(__isl_keep isl_ast_node * ptr)4891 ast_node manage_copy(__isl_keep isl_ast_node *ptr) {
4892   ptr = isl_ast_node_copy(ptr);
4893   return ast_node(ptr);
4894 }
4895 
ast_node()4896 ast_node::ast_node()
4897     : ptr(nullptr) {}
4898 
ast_node(const ast_node & obj)4899 ast_node::ast_node(const ast_node &obj)
4900     : ptr(nullptr)
4901 {
4902   ptr = obj.copy();
4903 }
4904 
ast_node(__isl_take isl_ast_node * ptr)4905 ast_node::ast_node(__isl_take isl_ast_node *ptr)
4906     : ptr(ptr) {}
4907 
4908 ast_node &ast_node::operator=(ast_node obj) {
4909   std::swap(this->ptr, obj.ptr);
4910   return *this;
4911 }
4912 
~ast_node()4913 ast_node::~ast_node() {
4914   if (ptr)
4915     isl_ast_node_free(ptr);
4916 }
4917 
copy()4918 __isl_give isl_ast_node *ast_node::copy() const & {
4919   return isl_ast_node_copy(ptr);
4920 }
4921 
get()4922 __isl_keep isl_ast_node *ast_node::get() const {
4923   return ptr;
4924 }
4925 
release()4926 __isl_give isl_ast_node *ast_node::release() {
4927   isl_ast_node *tmp = ptr;
4928   ptr = nullptr;
4929   return tmp;
4930 }
4931 
is_null()4932 bool ast_node::is_null() const {
4933   return ptr == nullptr;
4934 }
4935 
4936 template <typename T, typename>
isa_type(T subtype)4937 boolean ast_node::isa_type(T subtype) const
4938 {
4939   if (is_null())
4940     return boolean();
4941   return isl_ast_node_get_type(get()) == subtype;
4942 }
4943 template <class T>
isa()4944 boolean ast_node::isa() const
4945 {
4946   return isa_type<decltype(T::type)>(T::type);
4947 }
4948 template <class T>
as()4949 T ast_node::as() const
4950 {
4951  if (isa<T>().is_false())
4952     isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
4953   return T(copy());
4954 }
4955 
ctx()4956 isl::checked::ctx ast_node::ctx() const {
4957   return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
4958 }
4959 
to_C_str()4960 std::string ast_node::to_C_str() const
4961 {
4962   auto res = isl_ast_node_to_C_str(get());
4963   std::string tmp(res);
4964   free(res);
4965   return tmp;
4966 }
4967 
4968 inline std::ostream &operator<<(std::ostream &os, const ast_node &obj)
4969 {
4970   char *str = isl_ast_node_to_str(obj.get());
4971   if (!str) {
4972     os.setstate(std::ios_base::badbit);
4973     return os;
4974   }
4975   os << str;
4976   free(str);
4977   return os;
4978 }
4979 
4980 // implementations for isl::ast_node_block
ast_node_block()4981 ast_node_block::ast_node_block()
4982     : ast_node() {}
4983 
ast_node_block(const ast_node_block & obj)4984 ast_node_block::ast_node_block(const ast_node_block &obj)
4985     : ast_node(obj)
4986 {
4987 }
4988 
ast_node_block(__isl_take isl_ast_node * ptr)4989 ast_node_block::ast_node_block(__isl_take isl_ast_node *ptr)
4990     : ast_node(ptr) {}
4991 
4992 ast_node_block &ast_node_block::operator=(ast_node_block obj) {
4993   std::swap(this->ptr, obj.ptr);
4994   return *this;
4995 }
4996 
ctx()4997 isl::checked::ctx ast_node_block::ctx() const {
4998   return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
4999 }
5000 
children()5001 isl::checked::ast_node_list ast_node_block::children() const
5002 {
5003   auto res = isl_ast_node_block_get_children(get());
5004   return manage(res);
5005 }
5006 
get_children()5007 isl::checked::ast_node_list ast_node_block::get_children() const
5008 {
5009   return children();
5010 }
5011 
5012 inline std::ostream &operator<<(std::ostream &os, const ast_node_block &obj)
5013 {
5014   char *str = isl_ast_node_to_str(obj.get());
5015   if (!str) {
5016     os.setstate(std::ios_base::badbit);
5017     return os;
5018   }
5019   os << str;
5020   free(str);
5021   return os;
5022 }
5023 
5024 // implementations for isl::ast_node_for
ast_node_for()5025 ast_node_for::ast_node_for()
5026     : ast_node() {}
5027 
ast_node_for(const ast_node_for & obj)5028 ast_node_for::ast_node_for(const ast_node_for &obj)
5029     : ast_node(obj)
5030 {
5031 }
5032 
ast_node_for(__isl_take isl_ast_node * ptr)5033 ast_node_for::ast_node_for(__isl_take isl_ast_node *ptr)
5034     : ast_node(ptr) {}
5035 
5036 ast_node_for &ast_node_for::operator=(ast_node_for obj) {
5037   std::swap(this->ptr, obj.ptr);
5038   return *this;
5039 }
5040 
ctx()5041 isl::checked::ctx ast_node_for::ctx() const {
5042   return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5043 }
5044 
body()5045 isl::checked::ast_node ast_node_for::body() const
5046 {
5047   auto res = isl_ast_node_for_get_body(get());
5048   return manage(res);
5049 }
5050 
get_body()5051 isl::checked::ast_node ast_node_for::get_body() const
5052 {
5053   return body();
5054 }
5055 
cond()5056 isl::checked::ast_expr ast_node_for::cond() const
5057 {
5058   auto res = isl_ast_node_for_get_cond(get());
5059   return manage(res);
5060 }
5061 
get_cond()5062 isl::checked::ast_expr ast_node_for::get_cond() const
5063 {
5064   return cond();
5065 }
5066 
inc()5067 isl::checked::ast_expr ast_node_for::inc() const
5068 {
5069   auto res = isl_ast_node_for_get_inc(get());
5070   return manage(res);
5071 }
5072 
get_inc()5073 isl::checked::ast_expr ast_node_for::get_inc() const
5074 {
5075   return inc();
5076 }
5077 
init()5078 isl::checked::ast_expr ast_node_for::init() const
5079 {
5080   auto res = isl_ast_node_for_get_init(get());
5081   return manage(res);
5082 }
5083 
get_init()5084 isl::checked::ast_expr ast_node_for::get_init() const
5085 {
5086   return init();
5087 }
5088 
iterator()5089 isl::checked::ast_expr ast_node_for::iterator() const
5090 {
5091   auto res = isl_ast_node_for_get_iterator(get());
5092   return manage(res);
5093 }
5094 
get_iterator()5095 isl::checked::ast_expr ast_node_for::get_iterator() const
5096 {
5097   return iterator();
5098 }
5099 
is_degenerate()5100 boolean ast_node_for::is_degenerate() const
5101 {
5102   auto res = isl_ast_node_for_is_degenerate(get());
5103   return manage(res);
5104 }
5105 
5106 inline std::ostream &operator<<(std::ostream &os, const ast_node_for &obj)
5107 {
5108   char *str = isl_ast_node_to_str(obj.get());
5109   if (!str) {
5110     os.setstate(std::ios_base::badbit);
5111     return os;
5112   }
5113   os << str;
5114   free(str);
5115   return os;
5116 }
5117 
5118 // implementations for isl::ast_node_if
ast_node_if()5119 ast_node_if::ast_node_if()
5120     : ast_node() {}
5121 
ast_node_if(const ast_node_if & obj)5122 ast_node_if::ast_node_if(const ast_node_if &obj)
5123     : ast_node(obj)
5124 {
5125 }
5126 
ast_node_if(__isl_take isl_ast_node * ptr)5127 ast_node_if::ast_node_if(__isl_take isl_ast_node *ptr)
5128     : ast_node(ptr) {}
5129 
5130 ast_node_if &ast_node_if::operator=(ast_node_if obj) {
5131   std::swap(this->ptr, obj.ptr);
5132   return *this;
5133 }
5134 
ctx()5135 isl::checked::ctx ast_node_if::ctx() const {
5136   return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5137 }
5138 
cond()5139 isl::checked::ast_expr ast_node_if::cond() const
5140 {
5141   auto res = isl_ast_node_if_get_cond(get());
5142   return manage(res);
5143 }
5144 
get_cond()5145 isl::checked::ast_expr ast_node_if::get_cond() const
5146 {
5147   return cond();
5148 }
5149 
else_node()5150 isl::checked::ast_node ast_node_if::else_node() const
5151 {
5152   auto res = isl_ast_node_if_get_else_node(get());
5153   return manage(res);
5154 }
5155 
get_else_node()5156 isl::checked::ast_node ast_node_if::get_else_node() const
5157 {
5158   return else_node();
5159 }
5160 
then_node()5161 isl::checked::ast_node ast_node_if::then_node() const
5162 {
5163   auto res = isl_ast_node_if_get_then_node(get());
5164   return manage(res);
5165 }
5166 
get_then_node()5167 isl::checked::ast_node ast_node_if::get_then_node() const
5168 {
5169   return then_node();
5170 }
5171 
has_else_node()5172 boolean ast_node_if::has_else_node() const
5173 {
5174   auto res = isl_ast_node_if_has_else_node(get());
5175   return manage(res);
5176 }
5177 
5178 inline std::ostream &operator<<(std::ostream &os, const ast_node_if &obj)
5179 {
5180   char *str = isl_ast_node_to_str(obj.get());
5181   if (!str) {
5182     os.setstate(std::ios_base::badbit);
5183     return os;
5184   }
5185   os << str;
5186   free(str);
5187   return os;
5188 }
5189 
5190 // implementations for isl::ast_node_list
manage(__isl_take isl_ast_node_list * ptr)5191 ast_node_list manage(__isl_take isl_ast_node_list *ptr) {
5192   return ast_node_list(ptr);
5193 }
manage_copy(__isl_keep isl_ast_node_list * ptr)5194 ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr) {
5195   ptr = isl_ast_node_list_copy(ptr);
5196   return ast_node_list(ptr);
5197 }
5198 
ast_node_list()5199 ast_node_list::ast_node_list()
5200     : ptr(nullptr) {}
5201 
ast_node_list(const ast_node_list & obj)5202 ast_node_list::ast_node_list(const ast_node_list &obj)
5203     : ptr(nullptr)
5204 {
5205   ptr = obj.copy();
5206 }
5207 
ast_node_list(__isl_take isl_ast_node_list * ptr)5208 ast_node_list::ast_node_list(__isl_take isl_ast_node_list *ptr)
5209     : ptr(ptr) {}
5210 
ast_node_list(isl::checked::ctx ctx,int n)5211 ast_node_list::ast_node_list(isl::checked::ctx ctx, int n)
5212 {
5213   auto res = isl_ast_node_list_alloc(ctx.release(), n);
5214   ptr = res;
5215 }
5216 
ast_node_list(isl::checked::ast_node el)5217 ast_node_list::ast_node_list(isl::checked::ast_node el)
5218 {
5219   auto res = isl_ast_node_list_from_ast_node(el.release());
5220   ptr = res;
5221 }
5222 
5223 ast_node_list &ast_node_list::operator=(ast_node_list obj) {
5224   std::swap(this->ptr, obj.ptr);
5225   return *this;
5226 }
5227 
~ast_node_list()5228 ast_node_list::~ast_node_list() {
5229   if (ptr)
5230     isl_ast_node_list_free(ptr);
5231 }
5232 
copy()5233 __isl_give isl_ast_node_list *ast_node_list::copy() const & {
5234   return isl_ast_node_list_copy(ptr);
5235 }
5236 
get()5237 __isl_keep isl_ast_node_list *ast_node_list::get() const {
5238   return ptr;
5239 }
5240 
release()5241 __isl_give isl_ast_node_list *ast_node_list::release() {
5242   isl_ast_node_list *tmp = ptr;
5243   ptr = nullptr;
5244   return tmp;
5245 }
5246 
is_null()5247 bool ast_node_list::is_null() const {
5248   return ptr == nullptr;
5249 }
5250 
ctx()5251 isl::checked::ctx ast_node_list::ctx() const {
5252   return isl::checked::ctx(isl_ast_node_list_get_ctx(ptr));
5253 }
5254 
add(isl::checked::ast_node el)5255 isl::checked::ast_node_list ast_node_list::add(isl::checked::ast_node el) const
5256 {
5257   auto res = isl_ast_node_list_add(copy(), el.release());
5258   return manage(res);
5259 }
5260 
clear()5261 isl::checked::ast_node_list ast_node_list::clear() const
5262 {
5263   auto res = isl_ast_node_list_clear(copy());
5264   return manage(res);
5265 }
5266 
concat(isl::checked::ast_node_list list2)5267 isl::checked::ast_node_list ast_node_list::concat(isl::checked::ast_node_list list2) const
5268 {
5269   auto res = isl_ast_node_list_concat(copy(), list2.release());
5270   return manage(res);
5271 }
5272 
drop(unsigned int first,unsigned int n)5273 isl::checked::ast_node_list ast_node_list::drop(unsigned int first, unsigned int n) const
5274 {
5275   auto res = isl_ast_node_list_drop(copy(), first, n);
5276   return manage(res);
5277 }
5278 
foreach(const std::function<stat (isl::checked::ast_node)> & fn)5279 stat ast_node_list::foreach(const std::function<stat(isl::checked::ast_node)> &fn) const
5280 {
5281   struct fn_data {
5282     std::function<stat(isl::checked::ast_node)> func;
5283   } fn_data = { fn };
5284   auto fn_lambda = [](isl_ast_node *arg_0, void *arg_1) -> isl_stat {
5285     auto *data = static_cast<struct fn_data *>(arg_1);
5286     auto ret = (data->func)(manage(arg_0));
5287     return ret.release();
5288   };
5289   auto res = isl_ast_node_list_foreach(get(), fn_lambda, &fn_data);
5290   return manage(res);
5291 }
5292 
at(int index)5293 isl::checked::ast_node ast_node_list::at(int index) const
5294 {
5295   auto res = isl_ast_node_list_get_at(get(), index);
5296   return manage(res);
5297 }
5298 
get_at(int index)5299 isl::checked::ast_node ast_node_list::get_at(int index) const
5300 {
5301   return at(index);
5302 }
5303 
insert(unsigned int pos,isl::checked::ast_node el)5304 isl::checked::ast_node_list ast_node_list::insert(unsigned int pos, isl::checked::ast_node el) const
5305 {
5306   auto res = isl_ast_node_list_insert(copy(), pos, el.release());
5307   return manage(res);
5308 }
5309 
size()5310 class size ast_node_list::size() const
5311 {
5312   auto res = isl_ast_node_list_size(get());
5313   return manage(res);
5314 }
5315 
5316 inline std::ostream &operator<<(std::ostream &os, const ast_node_list &obj)
5317 {
5318   char *str = isl_ast_node_list_to_str(obj.get());
5319   if (!str) {
5320     os.setstate(std::ios_base::badbit);
5321     return os;
5322   }
5323   os << str;
5324   free(str);
5325   return os;
5326 }
5327 
5328 // implementations for isl::ast_node_mark
ast_node_mark()5329 ast_node_mark::ast_node_mark()
5330     : ast_node() {}
5331 
ast_node_mark(const ast_node_mark & obj)5332 ast_node_mark::ast_node_mark(const ast_node_mark &obj)
5333     : ast_node(obj)
5334 {
5335 }
5336 
ast_node_mark(__isl_take isl_ast_node * ptr)5337 ast_node_mark::ast_node_mark(__isl_take isl_ast_node *ptr)
5338     : ast_node(ptr) {}
5339 
5340 ast_node_mark &ast_node_mark::operator=(ast_node_mark obj) {
5341   std::swap(this->ptr, obj.ptr);
5342   return *this;
5343 }
5344 
ctx()5345 isl::checked::ctx ast_node_mark::ctx() const {
5346   return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5347 }
5348 
id()5349 isl::checked::id ast_node_mark::id() const
5350 {
5351   auto res = isl_ast_node_mark_get_id(get());
5352   return manage(res);
5353 }
5354 
get_id()5355 isl::checked::id ast_node_mark::get_id() const
5356 {
5357   return id();
5358 }
5359 
node()5360 isl::checked::ast_node ast_node_mark::node() const
5361 {
5362   auto res = isl_ast_node_mark_get_node(get());
5363   return manage(res);
5364 }
5365 
get_node()5366 isl::checked::ast_node ast_node_mark::get_node() const
5367 {
5368   return node();
5369 }
5370 
5371 inline std::ostream &operator<<(std::ostream &os, const ast_node_mark &obj)
5372 {
5373   char *str = isl_ast_node_to_str(obj.get());
5374   if (!str) {
5375     os.setstate(std::ios_base::badbit);
5376     return os;
5377   }
5378   os << str;
5379   free(str);
5380   return os;
5381 }
5382 
5383 // implementations for isl::ast_node_user
ast_node_user()5384 ast_node_user::ast_node_user()
5385     : ast_node() {}
5386 
ast_node_user(const ast_node_user & obj)5387 ast_node_user::ast_node_user(const ast_node_user &obj)
5388     : ast_node(obj)
5389 {
5390 }
5391 
ast_node_user(__isl_take isl_ast_node * ptr)5392 ast_node_user::ast_node_user(__isl_take isl_ast_node *ptr)
5393     : ast_node(ptr) {}
5394 
5395 ast_node_user &ast_node_user::operator=(ast_node_user obj) {
5396   std::swap(this->ptr, obj.ptr);
5397   return *this;
5398 }
5399 
ctx()5400 isl::checked::ctx ast_node_user::ctx() const {
5401   return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5402 }
5403 
expr()5404 isl::checked::ast_expr ast_node_user::expr() const
5405 {
5406   auto res = isl_ast_node_user_get_expr(get());
5407   return manage(res);
5408 }
5409 
get_expr()5410 isl::checked::ast_expr ast_node_user::get_expr() const
5411 {
5412   return expr();
5413 }
5414 
5415 inline std::ostream &operator<<(std::ostream &os, const ast_node_user &obj)
5416 {
5417   char *str = isl_ast_node_to_str(obj.get());
5418   if (!str) {
5419     os.setstate(std::ios_base::badbit);
5420     return os;
5421   }
5422   os << str;
5423   free(str);
5424   return os;
5425 }
5426 
5427 // implementations for isl::basic_map
manage(__isl_take isl_basic_map * ptr)5428 basic_map manage(__isl_take isl_basic_map *ptr) {
5429   return basic_map(ptr);
5430 }
manage_copy(__isl_keep isl_basic_map * ptr)5431 basic_map manage_copy(__isl_keep isl_basic_map *ptr) {
5432   ptr = isl_basic_map_copy(ptr);
5433   return basic_map(ptr);
5434 }
5435 
basic_map()5436 basic_map::basic_map()
5437     : ptr(nullptr) {}
5438 
basic_map(const basic_map & obj)5439 basic_map::basic_map(const basic_map &obj)
5440     : ptr(nullptr)
5441 {
5442   ptr = obj.copy();
5443 }
5444 
basic_map(__isl_take isl_basic_map * ptr)5445 basic_map::basic_map(__isl_take isl_basic_map *ptr)
5446     : ptr(ptr) {}
5447 
basic_map(isl::checked::ctx ctx,const std::string & str)5448 basic_map::basic_map(isl::checked::ctx ctx, const std::string &str)
5449 {
5450   auto res = isl_basic_map_read_from_str(ctx.release(), str.c_str());
5451   ptr = res;
5452 }
5453 
5454 basic_map &basic_map::operator=(basic_map obj) {
5455   std::swap(this->ptr, obj.ptr);
5456   return *this;
5457 }
5458 
~basic_map()5459 basic_map::~basic_map() {
5460   if (ptr)
5461     isl_basic_map_free(ptr);
5462 }
5463 
copy()5464 __isl_give isl_basic_map *basic_map::copy() const & {
5465   return isl_basic_map_copy(ptr);
5466 }
5467 
get()5468 __isl_keep isl_basic_map *basic_map::get() const {
5469   return ptr;
5470 }
5471 
release()5472 __isl_give isl_basic_map *basic_map::release() {
5473   isl_basic_map *tmp = ptr;
5474   ptr = nullptr;
5475   return tmp;
5476 }
5477 
is_null()5478 bool basic_map::is_null() const {
5479   return ptr == nullptr;
5480 }
5481 
ctx()5482 isl::checked::ctx basic_map::ctx() const {
5483   return isl::checked::ctx(isl_basic_map_get_ctx(ptr));
5484 }
5485 
affine_hull()5486 isl::checked::basic_map basic_map::affine_hull() const
5487 {
5488   auto res = isl_basic_map_affine_hull(copy());
5489   return manage(res);
5490 }
5491 
apply_domain(isl::checked::basic_map bmap2)5492 isl::checked::basic_map basic_map::apply_domain(isl::checked::basic_map bmap2) const
5493 {
5494   auto res = isl_basic_map_apply_domain(copy(), bmap2.release());
5495   return manage(res);
5496 }
5497 
apply_range(isl::checked::basic_map bmap2)5498 isl::checked::basic_map basic_map::apply_range(isl::checked::basic_map bmap2) const
5499 {
5500   auto res = isl_basic_map_apply_range(copy(), bmap2.release());
5501   return manage(res);
5502 }
5503 
deltas()5504 isl::checked::basic_set basic_map::deltas() const
5505 {
5506   auto res = isl_basic_map_deltas(copy());
5507   return manage(res);
5508 }
5509 
detect_equalities()5510 isl::checked::basic_map basic_map::detect_equalities() const
5511 {
5512   auto res = isl_basic_map_detect_equalities(copy());
5513   return manage(res);
5514 }
5515 
flatten()5516 isl::checked::basic_map basic_map::flatten() const
5517 {
5518   auto res = isl_basic_map_flatten(copy());
5519   return manage(res);
5520 }
5521 
flatten_domain()5522 isl::checked::basic_map basic_map::flatten_domain() const
5523 {
5524   auto res = isl_basic_map_flatten_domain(copy());
5525   return manage(res);
5526 }
5527 
flatten_range()5528 isl::checked::basic_map basic_map::flatten_range() const
5529 {
5530   auto res = isl_basic_map_flatten_range(copy());
5531   return manage(res);
5532 }
5533 
gist(isl::checked::basic_map context)5534 isl::checked::basic_map basic_map::gist(isl::checked::basic_map context) const
5535 {
5536   auto res = isl_basic_map_gist(copy(), context.release());
5537   return manage(res);
5538 }
5539 
intersect(isl::checked::basic_map bmap2)5540 isl::checked::basic_map basic_map::intersect(isl::checked::basic_map bmap2) const
5541 {
5542   auto res = isl_basic_map_intersect(copy(), bmap2.release());
5543   return manage(res);
5544 }
5545 
intersect_domain(isl::checked::basic_set bset)5546 isl::checked::basic_map basic_map::intersect_domain(isl::checked::basic_set bset) const
5547 {
5548   auto res = isl_basic_map_intersect_domain(copy(), bset.release());
5549   return manage(res);
5550 }
5551 
intersect_range(isl::checked::basic_set bset)5552 isl::checked::basic_map basic_map::intersect_range(isl::checked::basic_set bset) const
5553 {
5554   auto res = isl_basic_map_intersect_range(copy(), bset.release());
5555   return manage(res);
5556 }
5557 
is_empty()5558 boolean basic_map::is_empty() const
5559 {
5560   auto res = isl_basic_map_is_empty(get());
5561   return manage(res);
5562 }
5563 
is_equal(const isl::checked::basic_map & bmap2)5564 boolean basic_map::is_equal(const isl::checked::basic_map &bmap2) const
5565 {
5566   auto res = isl_basic_map_is_equal(get(), bmap2.get());
5567   return manage(res);
5568 }
5569 
is_subset(const isl::checked::basic_map & bmap2)5570 boolean basic_map::is_subset(const isl::checked::basic_map &bmap2) const
5571 {
5572   auto res = isl_basic_map_is_subset(get(), bmap2.get());
5573   return manage(res);
5574 }
5575 
lexmax()5576 isl::checked::map basic_map::lexmax() const
5577 {
5578   auto res = isl_basic_map_lexmax(copy());
5579   return manage(res);
5580 }
5581 
lexmin()5582 isl::checked::map basic_map::lexmin() const
5583 {
5584   auto res = isl_basic_map_lexmin(copy());
5585   return manage(res);
5586 }
5587 
reverse()5588 isl::checked::basic_map basic_map::reverse() const
5589 {
5590   auto res = isl_basic_map_reverse(copy());
5591   return manage(res);
5592 }
5593 
sample()5594 isl::checked::basic_map basic_map::sample() const
5595 {
5596   auto res = isl_basic_map_sample(copy());
5597   return manage(res);
5598 }
5599 
unite(isl::checked::basic_map bmap2)5600 isl::checked::map basic_map::unite(isl::checked::basic_map bmap2) const
5601 {
5602   auto res = isl_basic_map_union(copy(), bmap2.release());
5603   return manage(res);
5604 }
5605 
5606 inline std::ostream &operator<<(std::ostream &os, const basic_map &obj)
5607 {
5608   char *str = isl_basic_map_to_str(obj.get());
5609   if (!str) {
5610     os.setstate(std::ios_base::badbit);
5611     return os;
5612   }
5613   os << str;
5614   free(str);
5615   return os;
5616 }
5617 
5618 // implementations for isl::basic_set
manage(__isl_take isl_basic_set * ptr)5619 basic_set manage(__isl_take isl_basic_set *ptr) {
5620   return basic_set(ptr);
5621 }
manage_copy(__isl_keep isl_basic_set * ptr)5622 basic_set manage_copy(__isl_keep isl_basic_set *ptr) {
5623   ptr = isl_basic_set_copy(ptr);
5624   return basic_set(ptr);
5625 }
5626 
basic_set()5627 basic_set::basic_set()
5628     : ptr(nullptr) {}
5629 
basic_set(const basic_set & obj)5630 basic_set::basic_set(const basic_set &obj)
5631     : ptr(nullptr)
5632 {
5633   ptr = obj.copy();
5634 }
5635 
basic_set(__isl_take isl_basic_set * ptr)5636 basic_set::basic_set(__isl_take isl_basic_set *ptr)
5637     : ptr(ptr) {}
5638 
basic_set(isl::checked::point pnt)5639 basic_set::basic_set(isl::checked::point pnt)
5640 {
5641   auto res = isl_basic_set_from_point(pnt.release());
5642   ptr = res;
5643 }
5644 
basic_set(isl::checked::ctx ctx,const std::string & str)5645 basic_set::basic_set(isl::checked::ctx ctx, const std::string &str)
5646 {
5647   auto res = isl_basic_set_read_from_str(ctx.release(), str.c_str());
5648   ptr = res;
5649 }
5650 
5651 basic_set &basic_set::operator=(basic_set obj) {
5652   std::swap(this->ptr, obj.ptr);
5653   return *this;
5654 }
5655 
~basic_set()5656 basic_set::~basic_set() {
5657   if (ptr)
5658     isl_basic_set_free(ptr);
5659 }
5660 
copy()5661 __isl_give isl_basic_set *basic_set::copy() const & {
5662   return isl_basic_set_copy(ptr);
5663 }
5664 
get()5665 __isl_keep isl_basic_set *basic_set::get() const {
5666   return ptr;
5667 }
5668 
release()5669 __isl_give isl_basic_set *basic_set::release() {
5670   isl_basic_set *tmp = ptr;
5671   ptr = nullptr;
5672   return tmp;
5673 }
5674 
is_null()5675 bool basic_set::is_null() const {
5676   return ptr == nullptr;
5677 }
5678 
ctx()5679 isl::checked::ctx basic_set::ctx() const {
5680   return isl::checked::ctx(isl_basic_set_get_ctx(ptr));
5681 }
5682 
affine_hull()5683 isl::checked::basic_set basic_set::affine_hull() const
5684 {
5685   auto res = isl_basic_set_affine_hull(copy());
5686   return manage(res);
5687 }
5688 
apply(isl::checked::basic_map bmap)5689 isl::checked::basic_set basic_set::apply(isl::checked::basic_map bmap) const
5690 {
5691   auto res = isl_basic_set_apply(copy(), bmap.release());
5692   return manage(res);
5693 }
5694 
detect_equalities()5695 isl::checked::basic_set basic_set::detect_equalities() const
5696 {
5697   auto res = isl_basic_set_detect_equalities(copy());
5698   return manage(res);
5699 }
5700 
dim_max_val(int pos)5701 isl::checked::val basic_set::dim_max_val(int pos) const
5702 {
5703   auto res = isl_basic_set_dim_max_val(copy(), pos);
5704   return manage(res);
5705 }
5706 
flatten()5707 isl::checked::basic_set basic_set::flatten() const
5708 {
5709   auto res = isl_basic_set_flatten(copy());
5710   return manage(res);
5711 }
5712 
gist(isl::checked::basic_set context)5713 isl::checked::basic_set basic_set::gist(isl::checked::basic_set context) const
5714 {
5715   auto res = isl_basic_set_gist(copy(), context.release());
5716   return manage(res);
5717 }
5718 
intersect(isl::checked::basic_set bset2)5719 isl::checked::basic_set basic_set::intersect(isl::checked::basic_set bset2) const
5720 {
5721   auto res = isl_basic_set_intersect(copy(), bset2.release());
5722   return manage(res);
5723 }
5724 
intersect_params(isl::checked::basic_set bset2)5725 isl::checked::basic_set basic_set::intersect_params(isl::checked::basic_set bset2) const
5726 {
5727   auto res = isl_basic_set_intersect_params(copy(), bset2.release());
5728   return manage(res);
5729 }
5730 
is_empty()5731 boolean basic_set::is_empty() const
5732 {
5733   auto res = isl_basic_set_is_empty(get());
5734   return manage(res);
5735 }
5736 
is_equal(const isl::checked::basic_set & bset2)5737 boolean basic_set::is_equal(const isl::checked::basic_set &bset2) const
5738 {
5739   auto res = isl_basic_set_is_equal(get(), bset2.get());
5740   return manage(res);
5741 }
5742 
is_subset(const isl::checked::basic_set & bset2)5743 boolean basic_set::is_subset(const isl::checked::basic_set &bset2) const
5744 {
5745   auto res = isl_basic_set_is_subset(get(), bset2.get());
5746   return manage(res);
5747 }
5748 
is_wrapping()5749 boolean basic_set::is_wrapping() const
5750 {
5751   auto res = isl_basic_set_is_wrapping(get());
5752   return manage(res);
5753 }
5754 
lexmax()5755 isl::checked::set basic_set::lexmax() const
5756 {
5757   auto res = isl_basic_set_lexmax(copy());
5758   return manage(res);
5759 }
5760 
lexmin()5761 isl::checked::set basic_set::lexmin() const
5762 {
5763   auto res = isl_basic_set_lexmin(copy());
5764   return manage(res);
5765 }
5766 
params()5767 isl::checked::basic_set basic_set::params() const
5768 {
5769   auto res = isl_basic_set_params(copy());
5770   return manage(res);
5771 }
5772 
sample()5773 isl::checked::basic_set basic_set::sample() const
5774 {
5775   auto res = isl_basic_set_sample(copy());
5776   return manage(res);
5777 }
5778 
sample_point()5779 isl::checked::point basic_set::sample_point() const
5780 {
5781   auto res = isl_basic_set_sample_point(copy());
5782   return manage(res);
5783 }
5784 
unite(isl::checked::basic_set bset2)5785 isl::checked::set basic_set::unite(isl::checked::basic_set bset2) const
5786 {
5787   auto res = isl_basic_set_union(copy(), bset2.release());
5788   return manage(res);
5789 }
5790 
5791 inline std::ostream &operator<<(std::ostream &os, const basic_set &obj)
5792 {
5793   char *str = isl_basic_set_to_str(obj.get());
5794   if (!str) {
5795     os.setstate(std::ios_base::badbit);
5796     return os;
5797   }
5798   os << str;
5799   free(str);
5800   return os;
5801 }
5802 
5803 // implementations for isl::fixed_box
manage(__isl_take isl_fixed_box * ptr)5804 fixed_box manage(__isl_take isl_fixed_box *ptr) {
5805   return fixed_box(ptr);
5806 }
manage_copy(__isl_keep isl_fixed_box * ptr)5807 fixed_box manage_copy(__isl_keep isl_fixed_box *ptr) {
5808   ptr = isl_fixed_box_copy(ptr);
5809   return fixed_box(ptr);
5810 }
5811 
fixed_box()5812 fixed_box::fixed_box()
5813     : ptr(nullptr) {}
5814 
fixed_box(const fixed_box & obj)5815 fixed_box::fixed_box(const fixed_box &obj)
5816     : ptr(nullptr)
5817 {
5818   ptr = obj.copy();
5819 }
5820 
fixed_box(__isl_take isl_fixed_box * ptr)5821 fixed_box::fixed_box(__isl_take isl_fixed_box *ptr)
5822     : ptr(ptr) {}
5823 
5824 fixed_box &fixed_box::operator=(fixed_box obj) {
5825   std::swap(this->ptr, obj.ptr);
5826   return *this;
5827 }
5828 
~fixed_box()5829 fixed_box::~fixed_box() {
5830   if (ptr)
5831     isl_fixed_box_free(ptr);
5832 }
5833 
copy()5834 __isl_give isl_fixed_box *fixed_box::copy() const & {
5835   return isl_fixed_box_copy(ptr);
5836 }
5837 
get()5838 __isl_keep isl_fixed_box *fixed_box::get() const {
5839   return ptr;
5840 }
5841 
release()5842 __isl_give isl_fixed_box *fixed_box::release() {
5843   isl_fixed_box *tmp = ptr;
5844   ptr = nullptr;
5845   return tmp;
5846 }
5847 
is_null()5848 bool fixed_box::is_null() const {
5849   return ptr == nullptr;
5850 }
5851 
ctx()5852 isl::checked::ctx fixed_box::ctx() const {
5853   return isl::checked::ctx(isl_fixed_box_get_ctx(ptr));
5854 }
5855 
offset()5856 isl::checked::multi_aff fixed_box::offset() const
5857 {
5858   auto res = isl_fixed_box_get_offset(get());
5859   return manage(res);
5860 }
5861 
get_offset()5862 isl::checked::multi_aff fixed_box::get_offset() const
5863 {
5864   return offset();
5865 }
5866 
size()5867 isl::checked::multi_val fixed_box::size() const
5868 {
5869   auto res = isl_fixed_box_get_size(get());
5870   return manage(res);
5871 }
5872 
get_size()5873 isl::checked::multi_val fixed_box::get_size() const
5874 {
5875   return size();
5876 }
5877 
space()5878 isl::checked::space fixed_box::space() const
5879 {
5880   auto res = isl_fixed_box_get_space(get());
5881   return manage(res);
5882 }
5883 
get_space()5884 isl::checked::space fixed_box::get_space() const
5885 {
5886   return space();
5887 }
5888 
is_valid()5889 boolean fixed_box::is_valid() const
5890 {
5891   auto res = isl_fixed_box_is_valid(get());
5892   return manage(res);
5893 }
5894 
5895 inline std::ostream &operator<<(std::ostream &os, const fixed_box &obj)
5896 {
5897   char *str = isl_fixed_box_to_str(obj.get());
5898   if (!str) {
5899     os.setstate(std::ios_base::badbit);
5900     return os;
5901   }
5902   os << str;
5903   free(str);
5904   return os;
5905 }
5906 
5907 // implementations for isl::id
manage(__isl_take isl_id * ptr)5908 id manage(__isl_take isl_id *ptr) {
5909   return id(ptr);
5910 }
manage_copy(__isl_keep isl_id * ptr)5911 id manage_copy(__isl_keep isl_id *ptr) {
5912   ptr = isl_id_copy(ptr);
5913   return id(ptr);
5914 }
5915 
id()5916 id::id()
5917     : ptr(nullptr) {}
5918 
id(const id & obj)5919 id::id(const id &obj)
5920     : ptr(nullptr)
5921 {
5922   ptr = obj.copy();
5923 }
5924 
id(__isl_take isl_id * ptr)5925 id::id(__isl_take isl_id *ptr)
5926     : ptr(ptr) {}
5927 
id(isl::checked::ctx ctx,const std::string & str)5928 id::id(isl::checked::ctx ctx, const std::string &str)
5929 {
5930   auto res = isl_id_read_from_str(ctx.release(), str.c_str());
5931   ptr = res;
5932 }
5933 
5934 id &id::operator=(id obj) {
5935   std::swap(this->ptr, obj.ptr);
5936   return *this;
5937 }
5938 
~id()5939 id::~id() {
5940   if (ptr)
5941     isl_id_free(ptr);
5942 }
5943 
copy()5944 __isl_give isl_id *id::copy() const & {
5945   return isl_id_copy(ptr);
5946 }
5947 
get()5948 __isl_keep isl_id *id::get() const {
5949   return ptr;
5950 }
5951 
release()5952 __isl_give isl_id *id::release() {
5953   isl_id *tmp = ptr;
5954   ptr = nullptr;
5955   return tmp;
5956 }
5957 
is_null()5958 bool id::is_null() const {
5959   return ptr == nullptr;
5960 }
5961 
ctx()5962 isl::checked::ctx id::ctx() const {
5963   return isl::checked::ctx(isl_id_get_ctx(ptr));
5964 }
5965 
name()5966 std::string id::name() const
5967 {
5968   auto res = isl_id_get_name(get());
5969   std::string tmp(res);
5970   return tmp;
5971 }
5972 
get_name()5973 std::string id::get_name() const
5974 {
5975   return name();
5976 }
5977 
5978 inline std::ostream &operator<<(std::ostream &os, const id &obj)
5979 {
5980   char *str = isl_id_to_str(obj.get());
5981   if (!str) {
5982     os.setstate(std::ios_base::badbit);
5983     return os;
5984   }
5985   os << str;
5986   free(str);
5987   return os;
5988 }
5989 
5990 // implementations for isl::id_list
manage(__isl_take isl_id_list * ptr)5991 id_list manage(__isl_take isl_id_list *ptr) {
5992   return id_list(ptr);
5993 }
manage_copy(__isl_keep isl_id_list * ptr)5994 id_list manage_copy(__isl_keep isl_id_list *ptr) {
5995   ptr = isl_id_list_copy(ptr);
5996   return id_list(ptr);
5997 }
5998 
id_list()5999 id_list::id_list()
6000     : ptr(nullptr) {}
6001 
id_list(const id_list & obj)6002 id_list::id_list(const id_list &obj)
6003     : ptr(nullptr)
6004 {
6005   ptr = obj.copy();
6006 }
6007 
id_list(__isl_take isl_id_list * ptr)6008 id_list::id_list(__isl_take isl_id_list *ptr)
6009     : ptr(ptr) {}
6010 
id_list(isl::checked::ctx ctx,int n)6011 id_list::id_list(isl::checked::ctx ctx, int n)
6012 {
6013   auto res = isl_id_list_alloc(ctx.release(), n);
6014   ptr = res;
6015 }
6016 
id_list(isl::checked::id el)6017 id_list::id_list(isl::checked::id el)
6018 {
6019   auto res = isl_id_list_from_id(el.release());
6020   ptr = res;
6021 }
6022 
6023 id_list &id_list::operator=(id_list obj) {
6024   std::swap(this->ptr, obj.ptr);
6025   return *this;
6026 }
6027 
~id_list()6028 id_list::~id_list() {
6029   if (ptr)
6030     isl_id_list_free(ptr);
6031 }
6032 
copy()6033 __isl_give isl_id_list *id_list::copy() const & {
6034   return isl_id_list_copy(ptr);
6035 }
6036 
get()6037 __isl_keep isl_id_list *id_list::get() const {
6038   return ptr;
6039 }
6040 
release()6041 __isl_give isl_id_list *id_list::release() {
6042   isl_id_list *tmp = ptr;
6043   ptr = nullptr;
6044   return tmp;
6045 }
6046 
is_null()6047 bool id_list::is_null() const {
6048   return ptr == nullptr;
6049 }
6050 
ctx()6051 isl::checked::ctx id_list::ctx() const {
6052   return isl::checked::ctx(isl_id_list_get_ctx(ptr));
6053 }
6054 
add(isl::checked::id el)6055 isl::checked::id_list id_list::add(isl::checked::id el) const
6056 {
6057   auto res = isl_id_list_add(copy(), el.release());
6058   return manage(res);
6059 }
6060 
add(const std::string & el)6061 isl::checked::id_list id_list::add(const std::string &el) const
6062 {
6063   return this->add(isl::checked::id(ctx(), el));
6064 }
6065 
clear()6066 isl::checked::id_list id_list::clear() const
6067 {
6068   auto res = isl_id_list_clear(copy());
6069   return manage(res);
6070 }
6071 
concat(isl::checked::id_list list2)6072 isl::checked::id_list id_list::concat(isl::checked::id_list list2) const
6073 {
6074   auto res = isl_id_list_concat(copy(), list2.release());
6075   return manage(res);
6076 }
6077 
drop(unsigned int first,unsigned int n)6078 isl::checked::id_list id_list::drop(unsigned int first, unsigned int n) const
6079 {
6080   auto res = isl_id_list_drop(copy(), first, n);
6081   return manage(res);
6082 }
6083 
foreach(const std::function<stat (isl::checked::id)> & fn)6084 stat id_list::foreach(const std::function<stat(isl::checked::id)> &fn) const
6085 {
6086   struct fn_data {
6087     std::function<stat(isl::checked::id)> func;
6088   } fn_data = { fn };
6089   auto fn_lambda = [](isl_id *arg_0, void *arg_1) -> isl_stat {
6090     auto *data = static_cast<struct fn_data *>(arg_1);
6091     auto ret = (data->func)(manage(arg_0));
6092     return ret.release();
6093   };
6094   auto res = isl_id_list_foreach(get(), fn_lambda, &fn_data);
6095   return manage(res);
6096 }
6097 
at(int index)6098 isl::checked::id id_list::at(int index) const
6099 {
6100   auto res = isl_id_list_get_at(get(), index);
6101   return manage(res);
6102 }
6103 
get_at(int index)6104 isl::checked::id id_list::get_at(int index) const
6105 {
6106   return at(index);
6107 }
6108 
insert(unsigned int pos,isl::checked::id el)6109 isl::checked::id_list id_list::insert(unsigned int pos, isl::checked::id el) const
6110 {
6111   auto res = isl_id_list_insert(copy(), pos, el.release());
6112   return manage(res);
6113 }
6114 
insert(unsigned int pos,const std::string & el)6115 isl::checked::id_list id_list::insert(unsigned int pos, const std::string &el) const
6116 {
6117   return this->insert(pos, isl::checked::id(ctx(), el));
6118 }
6119 
size()6120 class size id_list::size() const
6121 {
6122   auto res = isl_id_list_size(get());
6123   return manage(res);
6124 }
6125 
6126 inline std::ostream &operator<<(std::ostream &os, const id_list &obj)
6127 {
6128   char *str = isl_id_list_to_str(obj.get());
6129   if (!str) {
6130     os.setstate(std::ios_base::badbit);
6131     return os;
6132   }
6133   os << str;
6134   free(str);
6135   return os;
6136 }
6137 
6138 // implementations for isl::map
manage(__isl_take isl_map * ptr)6139 map manage(__isl_take isl_map *ptr) {
6140   return map(ptr);
6141 }
manage_copy(__isl_keep isl_map * ptr)6142 map manage_copy(__isl_keep isl_map *ptr) {
6143   ptr = isl_map_copy(ptr);
6144   return map(ptr);
6145 }
6146 
map()6147 map::map()
6148     : ptr(nullptr) {}
6149 
map(const map & obj)6150 map::map(const map &obj)
6151     : ptr(nullptr)
6152 {
6153   ptr = obj.copy();
6154 }
6155 
map(__isl_take isl_map * ptr)6156 map::map(__isl_take isl_map *ptr)
6157     : ptr(ptr) {}
6158 
map(isl::checked::basic_map bmap)6159 map::map(isl::checked::basic_map bmap)
6160 {
6161   auto res = isl_map_from_basic_map(bmap.release());
6162   ptr = res;
6163 }
6164 
map(isl::checked::ctx ctx,const std::string & str)6165 map::map(isl::checked::ctx ctx, const std::string &str)
6166 {
6167   auto res = isl_map_read_from_str(ctx.release(), str.c_str());
6168   ptr = res;
6169 }
6170 
6171 map &map::operator=(map obj) {
6172   std::swap(this->ptr, obj.ptr);
6173   return *this;
6174 }
6175 
~map()6176 map::~map() {
6177   if (ptr)
6178     isl_map_free(ptr);
6179 }
6180 
copy()6181 __isl_give isl_map *map::copy() const & {
6182   return isl_map_copy(ptr);
6183 }
6184 
get()6185 __isl_keep isl_map *map::get() const {
6186   return ptr;
6187 }
6188 
release()6189 __isl_give isl_map *map::release() {
6190   isl_map *tmp = ptr;
6191   ptr = nullptr;
6192   return tmp;
6193 }
6194 
is_null()6195 bool map::is_null() const {
6196   return ptr == nullptr;
6197 }
6198 
ctx()6199 isl::checked::ctx map::ctx() const {
6200   return isl::checked::ctx(isl_map_get_ctx(ptr));
6201 }
6202 
affine_hull()6203 isl::checked::basic_map map::affine_hull() const
6204 {
6205   auto res = isl_map_affine_hull(copy());
6206   return manage(res);
6207 }
6208 
apply_domain(isl::checked::map map2)6209 isl::checked::map map::apply_domain(isl::checked::map map2) const
6210 {
6211   auto res = isl_map_apply_domain(copy(), map2.release());
6212   return manage(res);
6213 }
6214 
apply_range(isl::checked::map map2)6215 isl::checked::map map::apply_range(isl::checked::map map2) const
6216 {
6217   auto res = isl_map_apply_range(copy(), map2.release());
6218   return manage(res);
6219 }
6220 
bind_domain(isl::checked::multi_id tuple)6221 isl::checked::set map::bind_domain(isl::checked::multi_id tuple) const
6222 {
6223   auto res = isl_map_bind_domain(copy(), tuple.release());
6224   return manage(res);
6225 }
6226 
bind_range(isl::checked::multi_id tuple)6227 isl::checked::set map::bind_range(isl::checked::multi_id tuple) const
6228 {
6229   auto res = isl_map_bind_range(copy(), tuple.release());
6230   return manage(res);
6231 }
6232 
coalesce()6233 isl::checked::map map::coalesce() const
6234 {
6235   auto res = isl_map_coalesce(copy());
6236   return manage(res);
6237 }
6238 
complement()6239 isl::checked::map map::complement() const
6240 {
6241   auto res = isl_map_complement(copy());
6242   return manage(res);
6243 }
6244 
curry()6245 isl::checked::map map::curry() const
6246 {
6247   auto res = isl_map_curry(copy());
6248   return manage(res);
6249 }
6250 
deltas()6251 isl::checked::set map::deltas() const
6252 {
6253   auto res = isl_map_deltas(copy());
6254   return manage(res);
6255 }
6256 
detect_equalities()6257 isl::checked::map map::detect_equalities() const
6258 {
6259   auto res = isl_map_detect_equalities(copy());
6260   return manage(res);
6261 }
6262 
domain()6263 isl::checked::set map::domain() const
6264 {
6265   auto res = isl_map_domain(copy());
6266   return manage(res);
6267 }
6268 
domain_factor_domain()6269 isl::checked::map map::domain_factor_domain() const
6270 {
6271   auto res = isl_map_domain_factor_domain(copy());
6272   return manage(res);
6273 }
6274 
domain_factor_range()6275 isl::checked::map map::domain_factor_range() const
6276 {
6277   auto res = isl_map_domain_factor_range(copy());
6278   return manage(res);
6279 }
6280 
domain_product(isl::checked::map map2)6281 isl::checked::map map::domain_product(isl::checked::map map2) const
6282 {
6283   auto res = isl_map_domain_product(copy(), map2.release());
6284   return manage(res);
6285 }
6286 
empty(isl::checked::space space)6287 isl::checked::map map::empty(isl::checked::space space)
6288 {
6289   auto res = isl_map_empty(space.release());
6290   return manage(res);
6291 }
6292 
eq_at(isl::checked::multi_pw_aff mpa)6293 isl::checked::map map::eq_at(isl::checked::multi_pw_aff mpa) const
6294 {
6295   auto res = isl_map_eq_at_multi_pw_aff(copy(), mpa.release());
6296   return manage(res);
6297 }
6298 
factor_domain()6299 isl::checked::map map::factor_domain() const
6300 {
6301   auto res = isl_map_factor_domain(copy());
6302   return manage(res);
6303 }
6304 
factor_range()6305 isl::checked::map map::factor_range() const
6306 {
6307   auto res = isl_map_factor_range(copy());
6308   return manage(res);
6309 }
6310 
flatten()6311 isl::checked::map map::flatten() const
6312 {
6313   auto res = isl_map_flatten(copy());
6314   return manage(res);
6315 }
6316 
flatten_domain()6317 isl::checked::map map::flatten_domain() const
6318 {
6319   auto res = isl_map_flatten_domain(copy());
6320   return manage(res);
6321 }
6322 
flatten_range()6323 isl::checked::map map::flatten_range() const
6324 {
6325   auto res = isl_map_flatten_range(copy());
6326   return manage(res);
6327 }
6328 
foreach_basic_map(const std::function<stat (isl::checked::basic_map)> & fn)6329 stat map::foreach_basic_map(const std::function<stat(isl::checked::basic_map)> &fn) const
6330 {
6331   struct fn_data {
6332     std::function<stat(isl::checked::basic_map)> func;
6333   } fn_data = { fn };
6334   auto fn_lambda = [](isl_basic_map *arg_0, void *arg_1) -> isl_stat {
6335     auto *data = static_cast<struct fn_data *>(arg_1);
6336     auto ret = (data->func)(manage(arg_0));
6337     return ret.release();
6338   };
6339   auto res = isl_map_foreach_basic_map(get(), fn_lambda, &fn_data);
6340   return manage(res);
6341 }
6342 
range_simple_fixed_box_hull()6343 isl::checked::fixed_box map::range_simple_fixed_box_hull() const
6344 {
6345   auto res = isl_map_get_range_simple_fixed_box_hull(get());
6346   return manage(res);
6347 }
6348 
get_range_simple_fixed_box_hull()6349 isl::checked::fixed_box map::get_range_simple_fixed_box_hull() const
6350 {
6351   return range_simple_fixed_box_hull();
6352 }
6353 
space()6354 isl::checked::space map::space() const
6355 {
6356   auto res = isl_map_get_space(get());
6357   return manage(res);
6358 }
6359 
get_space()6360 isl::checked::space map::get_space() const
6361 {
6362   return space();
6363 }
6364 
gist(isl::checked::map context)6365 isl::checked::map map::gist(isl::checked::map context) const
6366 {
6367   auto res = isl_map_gist(copy(), context.release());
6368   return manage(res);
6369 }
6370 
gist_domain(isl::checked::set context)6371 isl::checked::map map::gist_domain(isl::checked::set context) const
6372 {
6373   auto res = isl_map_gist_domain(copy(), context.release());
6374   return manage(res);
6375 }
6376 
intersect(isl::checked::map map2)6377 isl::checked::map map::intersect(isl::checked::map map2) const
6378 {
6379   auto res = isl_map_intersect(copy(), map2.release());
6380   return manage(res);
6381 }
6382 
intersect_domain(isl::checked::set set)6383 isl::checked::map map::intersect_domain(isl::checked::set set) const
6384 {
6385   auto res = isl_map_intersect_domain(copy(), set.release());
6386   return manage(res);
6387 }
6388 
intersect_domain_factor_domain(isl::checked::map factor)6389 isl::checked::map map::intersect_domain_factor_domain(isl::checked::map factor) const
6390 {
6391   auto res = isl_map_intersect_domain_factor_domain(copy(), factor.release());
6392   return manage(res);
6393 }
6394 
intersect_domain_factor_range(isl::checked::map factor)6395 isl::checked::map map::intersect_domain_factor_range(isl::checked::map factor) const
6396 {
6397   auto res = isl_map_intersect_domain_factor_range(copy(), factor.release());
6398   return manage(res);
6399 }
6400 
intersect_params(isl::checked::set params)6401 isl::checked::map map::intersect_params(isl::checked::set params) const
6402 {
6403   auto res = isl_map_intersect_params(copy(), params.release());
6404   return manage(res);
6405 }
6406 
intersect_range(isl::checked::set set)6407 isl::checked::map map::intersect_range(isl::checked::set set) const
6408 {
6409   auto res = isl_map_intersect_range(copy(), set.release());
6410   return manage(res);
6411 }
6412 
intersect_range_factor_domain(isl::checked::map factor)6413 isl::checked::map map::intersect_range_factor_domain(isl::checked::map factor) const
6414 {
6415   auto res = isl_map_intersect_range_factor_domain(copy(), factor.release());
6416   return manage(res);
6417 }
6418 
intersect_range_factor_range(isl::checked::map factor)6419 isl::checked::map map::intersect_range_factor_range(isl::checked::map factor) const
6420 {
6421   auto res = isl_map_intersect_range_factor_range(copy(), factor.release());
6422   return manage(res);
6423 }
6424 
is_bijective()6425 boolean map::is_bijective() const
6426 {
6427   auto res = isl_map_is_bijective(get());
6428   return manage(res);
6429 }
6430 
is_disjoint(const isl::checked::map & map2)6431 boolean map::is_disjoint(const isl::checked::map &map2) const
6432 {
6433   auto res = isl_map_is_disjoint(get(), map2.get());
6434   return manage(res);
6435 }
6436 
is_empty()6437 boolean map::is_empty() const
6438 {
6439   auto res = isl_map_is_empty(get());
6440   return manage(res);
6441 }
6442 
is_equal(const isl::checked::map & map2)6443 boolean map::is_equal(const isl::checked::map &map2) const
6444 {
6445   auto res = isl_map_is_equal(get(), map2.get());
6446   return manage(res);
6447 }
6448 
is_injective()6449 boolean map::is_injective() const
6450 {
6451   auto res = isl_map_is_injective(get());
6452   return manage(res);
6453 }
6454 
is_single_valued()6455 boolean map::is_single_valued() const
6456 {
6457   auto res = isl_map_is_single_valued(get());
6458   return manage(res);
6459 }
6460 
is_strict_subset(const isl::checked::map & map2)6461 boolean map::is_strict_subset(const isl::checked::map &map2) const
6462 {
6463   auto res = isl_map_is_strict_subset(get(), map2.get());
6464   return manage(res);
6465 }
6466 
is_subset(const isl::checked::map & map2)6467 boolean map::is_subset(const isl::checked::map &map2) const
6468 {
6469   auto res = isl_map_is_subset(get(), map2.get());
6470   return manage(res);
6471 }
6472 
lex_ge_at(isl::checked::multi_pw_aff mpa)6473 isl::checked::map map::lex_ge_at(isl::checked::multi_pw_aff mpa) const
6474 {
6475   auto res = isl_map_lex_ge_at_multi_pw_aff(copy(), mpa.release());
6476   return manage(res);
6477 }
6478 
lex_gt_at(isl::checked::multi_pw_aff mpa)6479 isl::checked::map map::lex_gt_at(isl::checked::multi_pw_aff mpa) const
6480 {
6481   auto res = isl_map_lex_gt_at_multi_pw_aff(copy(), mpa.release());
6482   return manage(res);
6483 }
6484 
lex_le_at(isl::checked::multi_pw_aff mpa)6485 isl::checked::map map::lex_le_at(isl::checked::multi_pw_aff mpa) const
6486 {
6487   auto res = isl_map_lex_le_at_multi_pw_aff(copy(), mpa.release());
6488   return manage(res);
6489 }
6490 
lex_lt_at(isl::checked::multi_pw_aff mpa)6491 isl::checked::map map::lex_lt_at(isl::checked::multi_pw_aff mpa) const
6492 {
6493   auto res = isl_map_lex_lt_at_multi_pw_aff(copy(), mpa.release());
6494   return manage(res);
6495 }
6496 
lexmax()6497 isl::checked::map map::lexmax() const
6498 {
6499   auto res = isl_map_lexmax(copy());
6500   return manage(res);
6501 }
6502 
lexmax_pw_multi_aff()6503 isl::checked::pw_multi_aff map::lexmax_pw_multi_aff() const
6504 {
6505   auto res = isl_map_lexmax_pw_multi_aff(copy());
6506   return manage(res);
6507 }
6508 
lexmin()6509 isl::checked::map map::lexmin() const
6510 {
6511   auto res = isl_map_lexmin(copy());
6512   return manage(res);
6513 }
6514 
lexmin_pw_multi_aff()6515 isl::checked::pw_multi_aff map::lexmin_pw_multi_aff() const
6516 {
6517   auto res = isl_map_lexmin_pw_multi_aff(copy());
6518   return manage(res);
6519 }
6520 
lower_bound(isl::checked::multi_pw_aff lower)6521 isl::checked::map map::lower_bound(isl::checked::multi_pw_aff lower) const
6522 {
6523   auto res = isl_map_lower_bound_multi_pw_aff(copy(), lower.release());
6524   return manage(res);
6525 }
6526 
max_multi_pw_aff()6527 isl::checked::multi_pw_aff map::max_multi_pw_aff() const
6528 {
6529   auto res = isl_map_max_multi_pw_aff(copy());
6530   return manage(res);
6531 }
6532 
min_multi_pw_aff()6533 isl::checked::multi_pw_aff map::min_multi_pw_aff() const
6534 {
6535   auto res = isl_map_min_multi_pw_aff(copy());
6536   return manage(res);
6537 }
6538 
polyhedral_hull()6539 isl::checked::basic_map map::polyhedral_hull() const
6540 {
6541   auto res = isl_map_polyhedral_hull(copy());
6542   return manage(res);
6543 }
6544 
preimage_domain(isl::checked::multi_aff ma)6545 isl::checked::map map::preimage_domain(isl::checked::multi_aff ma) const
6546 {
6547   auto res = isl_map_preimage_domain_multi_aff(copy(), ma.release());
6548   return manage(res);
6549 }
6550 
preimage_domain(isl::checked::multi_pw_aff mpa)6551 isl::checked::map map::preimage_domain(isl::checked::multi_pw_aff mpa) const
6552 {
6553   auto res = isl_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
6554   return manage(res);
6555 }
6556 
preimage_domain(isl::checked::pw_multi_aff pma)6557 isl::checked::map map::preimage_domain(isl::checked::pw_multi_aff pma) const
6558 {
6559   auto res = isl_map_preimage_domain_pw_multi_aff(copy(), pma.release());
6560   return manage(res);
6561 }
6562 
preimage_range(isl::checked::multi_aff ma)6563 isl::checked::map map::preimage_range(isl::checked::multi_aff ma) const
6564 {
6565   auto res = isl_map_preimage_range_multi_aff(copy(), ma.release());
6566   return manage(res);
6567 }
6568 
preimage_range(isl::checked::pw_multi_aff pma)6569 isl::checked::map map::preimage_range(isl::checked::pw_multi_aff pma) const
6570 {
6571   auto res = isl_map_preimage_range_pw_multi_aff(copy(), pma.release());
6572   return manage(res);
6573 }
6574 
product(isl::checked::map map2)6575 isl::checked::map map::product(isl::checked::map map2) const
6576 {
6577   auto res = isl_map_product(copy(), map2.release());
6578   return manage(res);
6579 }
6580 
project_out_all_params()6581 isl::checked::map map::project_out_all_params() const
6582 {
6583   auto res = isl_map_project_out_all_params(copy());
6584   return manage(res);
6585 }
6586 
range()6587 isl::checked::set map::range() const
6588 {
6589   auto res = isl_map_range(copy());
6590   return manage(res);
6591 }
6592 
range_factor_domain()6593 isl::checked::map map::range_factor_domain() const
6594 {
6595   auto res = isl_map_range_factor_domain(copy());
6596   return manage(res);
6597 }
6598 
range_factor_range()6599 isl::checked::map map::range_factor_range() const
6600 {
6601   auto res = isl_map_range_factor_range(copy());
6602   return manage(res);
6603 }
6604 
range_product(isl::checked::map map2)6605 isl::checked::map map::range_product(isl::checked::map map2) const
6606 {
6607   auto res = isl_map_range_product(copy(), map2.release());
6608   return manage(res);
6609 }
6610 
range_reverse()6611 isl::checked::map map::range_reverse() const
6612 {
6613   auto res = isl_map_range_reverse(copy());
6614   return manage(res);
6615 }
6616 
reverse()6617 isl::checked::map map::reverse() const
6618 {
6619   auto res = isl_map_reverse(copy());
6620   return manage(res);
6621 }
6622 
sample()6623 isl::checked::basic_map map::sample() const
6624 {
6625   auto res = isl_map_sample(copy());
6626   return manage(res);
6627 }
6628 
subtract(isl::checked::map map2)6629 isl::checked::map map::subtract(isl::checked::map map2) const
6630 {
6631   auto res = isl_map_subtract(copy(), map2.release());
6632   return manage(res);
6633 }
6634 
uncurry()6635 isl::checked::map map::uncurry() const
6636 {
6637   auto res = isl_map_uncurry(copy());
6638   return manage(res);
6639 }
6640 
unite(isl::checked::map map2)6641 isl::checked::map map::unite(isl::checked::map map2) const
6642 {
6643   auto res = isl_map_union(copy(), map2.release());
6644   return manage(res);
6645 }
6646 
universe(isl::checked::space space)6647 isl::checked::map map::universe(isl::checked::space space)
6648 {
6649   auto res = isl_map_universe(space.release());
6650   return manage(res);
6651 }
6652 
unshifted_simple_hull()6653 isl::checked::basic_map map::unshifted_simple_hull() const
6654 {
6655   auto res = isl_map_unshifted_simple_hull(copy());
6656   return manage(res);
6657 }
6658 
upper_bound(isl::checked::multi_pw_aff upper)6659 isl::checked::map map::upper_bound(isl::checked::multi_pw_aff upper) const
6660 {
6661   auto res = isl_map_upper_bound_multi_pw_aff(copy(), upper.release());
6662   return manage(res);
6663 }
6664 
wrap()6665 isl::checked::set map::wrap() const
6666 {
6667   auto res = isl_map_wrap(copy());
6668   return manage(res);
6669 }
6670 
zip()6671 isl::checked::map map::zip() const
6672 {
6673   auto res = isl_map_zip(copy());
6674   return manage(res);
6675 }
6676 
6677 inline std::ostream &operator<<(std::ostream &os, const map &obj)
6678 {
6679   char *str = isl_map_to_str(obj.get());
6680   if (!str) {
6681     os.setstate(std::ios_base::badbit);
6682     return os;
6683   }
6684   os << str;
6685   free(str);
6686   return os;
6687 }
6688 
6689 // implementations for isl::multi_aff
manage(__isl_take isl_multi_aff * ptr)6690 multi_aff manage(__isl_take isl_multi_aff *ptr) {
6691   return multi_aff(ptr);
6692 }
manage_copy(__isl_keep isl_multi_aff * ptr)6693 multi_aff manage_copy(__isl_keep isl_multi_aff *ptr) {
6694   ptr = isl_multi_aff_copy(ptr);
6695   return multi_aff(ptr);
6696 }
6697 
multi_aff()6698 multi_aff::multi_aff()
6699     : ptr(nullptr) {}
6700 
multi_aff(const multi_aff & obj)6701 multi_aff::multi_aff(const multi_aff &obj)
6702     : ptr(nullptr)
6703 {
6704   ptr = obj.copy();
6705 }
6706 
multi_aff(__isl_take isl_multi_aff * ptr)6707 multi_aff::multi_aff(__isl_take isl_multi_aff *ptr)
6708     : ptr(ptr) {}
6709 
multi_aff(isl::checked::aff aff)6710 multi_aff::multi_aff(isl::checked::aff aff)
6711 {
6712   auto res = isl_multi_aff_from_aff(aff.release());
6713   ptr = res;
6714 }
6715 
multi_aff(isl::checked::space space,isl::checked::aff_list list)6716 multi_aff::multi_aff(isl::checked::space space, isl::checked::aff_list list)
6717 {
6718   auto res = isl_multi_aff_from_aff_list(space.release(), list.release());
6719   ptr = res;
6720 }
6721 
multi_aff(isl::checked::ctx ctx,const std::string & str)6722 multi_aff::multi_aff(isl::checked::ctx ctx, const std::string &str)
6723 {
6724   auto res = isl_multi_aff_read_from_str(ctx.release(), str.c_str());
6725   ptr = res;
6726 }
6727 
6728 multi_aff &multi_aff::operator=(multi_aff obj) {
6729   std::swap(this->ptr, obj.ptr);
6730   return *this;
6731 }
6732 
~multi_aff()6733 multi_aff::~multi_aff() {
6734   if (ptr)
6735     isl_multi_aff_free(ptr);
6736 }
6737 
copy()6738 __isl_give isl_multi_aff *multi_aff::copy() const & {
6739   return isl_multi_aff_copy(ptr);
6740 }
6741 
get()6742 __isl_keep isl_multi_aff *multi_aff::get() const {
6743   return ptr;
6744 }
6745 
release()6746 __isl_give isl_multi_aff *multi_aff::release() {
6747   isl_multi_aff *tmp = ptr;
6748   ptr = nullptr;
6749   return tmp;
6750 }
6751 
is_null()6752 bool multi_aff::is_null() const {
6753   return ptr == nullptr;
6754 }
6755 
ctx()6756 isl::checked::ctx multi_aff::ctx() const {
6757   return isl::checked::ctx(isl_multi_aff_get_ctx(ptr));
6758 }
6759 
add(isl::checked::multi_aff multi2)6760 isl::checked::multi_aff multi_aff::add(isl::checked::multi_aff multi2) const
6761 {
6762   auto res = isl_multi_aff_add(copy(), multi2.release());
6763   return manage(res);
6764 }
6765 
add_constant(isl::checked::multi_val mv)6766 isl::checked::multi_aff multi_aff::add_constant(isl::checked::multi_val mv) const
6767 {
6768   auto res = isl_multi_aff_add_constant_multi_val(copy(), mv.release());
6769   return manage(res);
6770 }
6771 
add_constant(isl::checked::val v)6772 isl::checked::multi_aff multi_aff::add_constant(isl::checked::val v) const
6773 {
6774   auto res = isl_multi_aff_add_constant_val(copy(), v.release());
6775   return manage(res);
6776 }
6777 
add_constant(long v)6778 isl::checked::multi_aff multi_aff::add_constant(long v) const
6779 {
6780   return this->add_constant(isl::checked::val(ctx(), v));
6781 }
6782 
bind(isl::checked::multi_id tuple)6783 isl::checked::basic_set multi_aff::bind(isl::checked::multi_id tuple) const
6784 {
6785   auto res = isl_multi_aff_bind(copy(), tuple.release());
6786   return manage(res);
6787 }
6788 
bind_domain(isl::checked::multi_id tuple)6789 isl::checked::multi_aff multi_aff::bind_domain(isl::checked::multi_id tuple) const
6790 {
6791   auto res = isl_multi_aff_bind_domain(copy(), tuple.release());
6792   return manage(res);
6793 }
6794 
bind_domain_wrapped_domain(isl::checked::multi_id tuple)6795 isl::checked::multi_aff multi_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
6796 {
6797   auto res = isl_multi_aff_bind_domain_wrapped_domain(copy(), tuple.release());
6798   return manage(res);
6799 }
6800 
domain_map(isl::checked::space space)6801 isl::checked::multi_aff multi_aff::domain_map(isl::checked::space space)
6802 {
6803   auto res = isl_multi_aff_domain_map(space.release());
6804   return manage(res);
6805 }
6806 
flat_range_product(isl::checked::multi_aff multi2)6807 isl::checked::multi_aff multi_aff::flat_range_product(isl::checked::multi_aff multi2) const
6808 {
6809   auto res = isl_multi_aff_flat_range_product(copy(), multi2.release());
6810   return manage(res);
6811 }
6812 
floor()6813 isl::checked::multi_aff multi_aff::floor() const
6814 {
6815   auto res = isl_multi_aff_floor(copy());
6816   return manage(res);
6817 }
6818 
at(int pos)6819 isl::checked::aff multi_aff::at(int pos) const
6820 {
6821   auto res = isl_multi_aff_get_at(get(), pos);
6822   return manage(res);
6823 }
6824 
get_at(int pos)6825 isl::checked::aff multi_aff::get_at(int pos) const
6826 {
6827   return at(pos);
6828 }
6829 
constant_multi_val()6830 isl::checked::multi_val multi_aff::constant_multi_val() const
6831 {
6832   auto res = isl_multi_aff_get_constant_multi_val(get());
6833   return manage(res);
6834 }
6835 
get_constant_multi_val()6836 isl::checked::multi_val multi_aff::get_constant_multi_val() const
6837 {
6838   return constant_multi_val();
6839 }
6840 
list()6841 isl::checked::aff_list multi_aff::list() const
6842 {
6843   auto res = isl_multi_aff_get_list(get());
6844   return manage(res);
6845 }
6846 
get_list()6847 isl::checked::aff_list multi_aff::get_list() const
6848 {
6849   return list();
6850 }
6851 
space()6852 isl::checked::space multi_aff::space() const
6853 {
6854   auto res = isl_multi_aff_get_space(get());
6855   return manage(res);
6856 }
6857 
get_space()6858 isl::checked::space multi_aff::get_space() const
6859 {
6860   return space();
6861 }
6862 
gist(isl::checked::set context)6863 isl::checked::multi_aff multi_aff::gist(isl::checked::set context) const
6864 {
6865   auto res = isl_multi_aff_gist(copy(), context.release());
6866   return manage(res);
6867 }
6868 
identity()6869 isl::checked::multi_aff multi_aff::identity() const
6870 {
6871   auto res = isl_multi_aff_identity_multi_aff(copy());
6872   return manage(res);
6873 }
6874 
identity_on_domain(isl::checked::space space)6875 isl::checked::multi_aff multi_aff::identity_on_domain(isl::checked::space space)
6876 {
6877   auto res = isl_multi_aff_identity_on_domain_space(space.release());
6878   return manage(res);
6879 }
6880 
insert_domain(isl::checked::space domain)6881 isl::checked::multi_aff multi_aff::insert_domain(isl::checked::space domain) const
6882 {
6883   auto res = isl_multi_aff_insert_domain(copy(), domain.release());
6884   return manage(res);
6885 }
6886 
involves_locals()6887 boolean multi_aff::involves_locals() const
6888 {
6889   auto res = isl_multi_aff_involves_locals(get());
6890   return manage(res);
6891 }
6892 
involves_nan()6893 boolean multi_aff::involves_nan() const
6894 {
6895   auto res = isl_multi_aff_involves_nan(get());
6896   return manage(res);
6897 }
6898 
neg()6899 isl::checked::multi_aff multi_aff::neg() const
6900 {
6901   auto res = isl_multi_aff_neg(copy());
6902   return manage(res);
6903 }
6904 
plain_is_equal(const isl::checked::multi_aff & multi2)6905 boolean multi_aff::plain_is_equal(const isl::checked::multi_aff &multi2) const
6906 {
6907   auto res = isl_multi_aff_plain_is_equal(get(), multi2.get());
6908   return manage(res);
6909 }
6910 
product(isl::checked::multi_aff multi2)6911 isl::checked::multi_aff multi_aff::product(isl::checked::multi_aff multi2) const
6912 {
6913   auto res = isl_multi_aff_product(copy(), multi2.release());
6914   return manage(res);
6915 }
6916 
pullback(isl::checked::multi_aff ma2)6917 isl::checked::multi_aff multi_aff::pullback(isl::checked::multi_aff ma2) const
6918 {
6919   auto res = isl_multi_aff_pullback_multi_aff(copy(), ma2.release());
6920   return manage(res);
6921 }
6922 
range_map(isl::checked::space space)6923 isl::checked::multi_aff multi_aff::range_map(isl::checked::space space)
6924 {
6925   auto res = isl_multi_aff_range_map(space.release());
6926   return manage(res);
6927 }
6928 
range_product(isl::checked::multi_aff multi2)6929 isl::checked::multi_aff multi_aff::range_product(isl::checked::multi_aff multi2) const
6930 {
6931   auto res = isl_multi_aff_range_product(copy(), multi2.release());
6932   return manage(res);
6933 }
6934 
scale(isl::checked::multi_val mv)6935 isl::checked::multi_aff multi_aff::scale(isl::checked::multi_val mv) const
6936 {
6937   auto res = isl_multi_aff_scale_multi_val(copy(), mv.release());
6938   return manage(res);
6939 }
6940 
scale(isl::checked::val v)6941 isl::checked::multi_aff multi_aff::scale(isl::checked::val v) const
6942 {
6943   auto res = isl_multi_aff_scale_val(copy(), v.release());
6944   return manage(res);
6945 }
6946 
scale(long v)6947 isl::checked::multi_aff multi_aff::scale(long v) const
6948 {
6949   return this->scale(isl::checked::val(ctx(), v));
6950 }
6951 
scale_down(isl::checked::multi_val mv)6952 isl::checked::multi_aff multi_aff::scale_down(isl::checked::multi_val mv) const
6953 {
6954   auto res = isl_multi_aff_scale_down_multi_val(copy(), mv.release());
6955   return manage(res);
6956 }
6957 
scale_down(isl::checked::val v)6958 isl::checked::multi_aff multi_aff::scale_down(isl::checked::val v) const
6959 {
6960   auto res = isl_multi_aff_scale_down_val(copy(), v.release());
6961   return manage(res);
6962 }
6963 
scale_down(long v)6964 isl::checked::multi_aff multi_aff::scale_down(long v) const
6965 {
6966   return this->scale_down(isl::checked::val(ctx(), v));
6967 }
6968 
set_at(int pos,isl::checked::aff el)6969 isl::checked::multi_aff multi_aff::set_at(int pos, isl::checked::aff el) const
6970 {
6971   auto res = isl_multi_aff_set_at(copy(), pos, el.release());
6972   return manage(res);
6973 }
6974 
size()6975 class size multi_aff::size() const
6976 {
6977   auto res = isl_multi_aff_size(get());
6978   return manage(res);
6979 }
6980 
sub(isl::checked::multi_aff multi2)6981 isl::checked::multi_aff multi_aff::sub(isl::checked::multi_aff multi2) const
6982 {
6983   auto res = isl_multi_aff_sub(copy(), multi2.release());
6984   return manage(res);
6985 }
6986 
unbind_params_insert_domain(isl::checked::multi_id domain)6987 isl::checked::multi_aff multi_aff::unbind_params_insert_domain(isl::checked::multi_id domain) const
6988 {
6989   auto res = isl_multi_aff_unbind_params_insert_domain(copy(), domain.release());
6990   return manage(res);
6991 }
6992 
zero(isl::checked::space space)6993 isl::checked::multi_aff multi_aff::zero(isl::checked::space space)
6994 {
6995   auto res = isl_multi_aff_zero(space.release());
6996   return manage(res);
6997 }
6998 
6999 inline std::ostream &operator<<(std::ostream &os, const multi_aff &obj)
7000 {
7001   char *str = isl_multi_aff_to_str(obj.get());
7002   if (!str) {
7003     os.setstate(std::ios_base::badbit);
7004     return os;
7005   }
7006   os << str;
7007   free(str);
7008   return os;
7009 }
7010 
7011 // implementations for isl::multi_id
manage(__isl_take isl_multi_id * ptr)7012 multi_id manage(__isl_take isl_multi_id *ptr) {
7013   return multi_id(ptr);
7014 }
manage_copy(__isl_keep isl_multi_id * ptr)7015 multi_id manage_copy(__isl_keep isl_multi_id *ptr) {
7016   ptr = isl_multi_id_copy(ptr);
7017   return multi_id(ptr);
7018 }
7019 
multi_id()7020 multi_id::multi_id()
7021     : ptr(nullptr) {}
7022 
multi_id(const multi_id & obj)7023 multi_id::multi_id(const multi_id &obj)
7024     : ptr(nullptr)
7025 {
7026   ptr = obj.copy();
7027 }
7028 
multi_id(__isl_take isl_multi_id * ptr)7029 multi_id::multi_id(__isl_take isl_multi_id *ptr)
7030     : ptr(ptr) {}
7031 
multi_id(isl::checked::space space,isl::checked::id_list list)7032 multi_id::multi_id(isl::checked::space space, isl::checked::id_list list)
7033 {
7034   auto res = isl_multi_id_from_id_list(space.release(), list.release());
7035   ptr = res;
7036 }
7037 
multi_id(isl::checked::ctx ctx,const std::string & str)7038 multi_id::multi_id(isl::checked::ctx ctx, const std::string &str)
7039 {
7040   auto res = isl_multi_id_read_from_str(ctx.release(), str.c_str());
7041   ptr = res;
7042 }
7043 
7044 multi_id &multi_id::operator=(multi_id obj) {
7045   std::swap(this->ptr, obj.ptr);
7046   return *this;
7047 }
7048 
~multi_id()7049 multi_id::~multi_id() {
7050   if (ptr)
7051     isl_multi_id_free(ptr);
7052 }
7053 
copy()7054 __isl_give isl_multi_id *multi_id::copy() const & {
7055   return isl_multi_id_copy(ptr);
7056 }
7057 
get()7058 __isl_keep isl_multi_id *multi_id::get() const {
7059   return ptr;
7060 }
7061 
release()7062 __isl_give isl_multi_id *multi_id::release() {
7063   isl_multi_id *tmp = ptr;
7064   ptr = nullptr;
7065   return tmp;
7066 }
7067 
is_null()7068 bool multi_id::is_null() const {
7069   return ptr == nullptr;
7070 }
7071 
ctx()7072 isl::checked::ctx multi_id::ctx() const {
7073   return isl::checked::ctx(isl_multi_id_get_ctx(ptr));
7074 }
7075 
flat_range_product(isl::checked::multi_id multi2)7076 isl::checked::multi_id multi_id::flat_range_product(isl::checked::multi_id multi2) const
7077 {
7078   auto res = isl_multi_id_flat_range_product(copy(), multi2.release());
7079   return manage(res);
7080 }
7081 
at(int pos)7082 isl::checked::id multi_id::at(int pos) const
7083 {
7084   auto res = isl_multi_id_get_at(get(), pos);
7085   return manage(res);
7086 }
7087 
get_at(int pos)7088 isl::checked::id multi_id::get_at(int pos) const
7089 {
7090   return at(pos);
7091 }
7092 
list()7093 isl::checked::id_list multi_id::list() const
7094 {
7095   auto res = isl_multi_id_get_list(get());
7096   return manage(res);
7097 }
7098 
get_list()7099 isl::checked::id_list multi_id::get_list() const
7100 {
7101   return list();
7102 }
7103 
space()7104 isl::checked::space multi_id::space() const
7105 {
7106   auto res = isl_multi_id_get_space(get());
7107   return manage(res);
7108 }
7109 
get_space()7110 isl::checked::space multi_id::get_space() const
7111 {
7112   return space();
7113 }
7114 
plain_is_equal(const isl::checked::multi_id & multi2)7115 boolean multi_id::plain_is_equal(const isl::checked::multi_id &multi2) const
7116 {
7117   auto res = isl_multi_id_plain_is_equal(get(), multi2.get());
7118   return manage(res);
7119 }
7120 
range_product(isl::checked::multi_id multi2)7121 isl::checked::multi_id multi_id::range_product(isl::checked::multi_id multi2) const
7122 {
7123   auto res = isl_multi_id_range_product(copy(), multi2.release());
7124   return manage(res);
7125 }
7126 
set_at(int pos,isl::checked::id el)7127 isl::checked::multi_id multi_id::set_at(int pos, isl::checked::id el) const
7128 {
7129   auto res = isl_multi_id_set_at(copy(), pos, el.release());
7130   return manage(res);
7131 }
7132 
set_at(int pos,const std::string & el)7133 isl::checked::multi_id multi_id::set_at(int pos, const std::string &el) const
7134 {
7135   return this->set_at(pos, isl::checked::id(ctx(), el));
7136 }
7137 
size()7138 class size multi_id::size() const
7139 {
7140   auto res = isl_multi_id_size(get());
7141   return manage(res);
7142 }
7143 
7144 inline std::ostream &operator<<(std::ostream &os, const multi_id &obj)
7145 {
7146   char *str = isl_multi_id_to_str(obj.get());
7147   if (!str) {
7148     os.setstate(std::ios_base::badbit);
7149     return os;
7150   }
7151   os << str;
7152   free(str);
7153   return os;
7154 }
7155 
7156 // implementations for isl::multi_pw_aff
manage(__isl_take isl_multi_pw_aff * ptr)7157 multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr) {
7158   return multi_pw_aff(ptr);
7159 }
manage_copy(__isl_keep isl_multi_pw_aff * ptr)7160 multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr) {
7161   ptr = isl_multi_pw_aff_copy(ptr);
7162   return multi_pw_aff(ptr);
7163 }
7164 
multi_pw_aff()7165 multi_pw_aff::multi_pw_aff()
7166     : ptr(nullptr) {}
7167 
multi_pw_aff(const multi_pw_aff & obj)7168 multi_pw_aff::multi_pw_aff(const multi_pw_aff &obj)
7169     : ptr(nullptr)
7170 {
7171   ptr = obj.copy();
7172 }
7173 
multi_pw_aff(__isl_take isl_multi_pw_aff * ptr)7174 multi_pw_aff::multi_pw_aff(__isl_take isl_multi_pw_aff *ptr)
7175     : ptr(ptr) {}
7176 
multi_pw_aff(isl::checked::aff aff)7177 multi_pw_aff::multi_pw_aff(isl::checked::aff aff)
7178 {
7179   auto res = isl_multi_pw_aff_from_aff(aff.release());
7180   ptr = res;
7181 }
7182 
multi_pw_aff(isl::checked::multi_aff ma)7183 multi_pw_aff::multi_pw_aff(isl::checked::multi_aff ma)
7184 {
7185   auto res = isl_multi_pw_aff_from_multi_aff(ma.release());
7186   ptr = res;
7187 }
7188 
multi_pw_aff(isl::checked::pw_aff pa)7189 multi_pw_aff::multi_pw_aff(isl::checked::pw_aff pa)
7190 {
7191   auto res = isl_multi_pw_aff_from_pw_aff(pa.release());
7192   ptr = res;
7193 }
7194 
multi_pw_aff(isl::checked::space space,isl::checked::pw_aff_list list)7195 multi_pw_aff::multi_pw_aff(isl::checked::space space, isl::checked::pw_aff_list list)
7196 {
7197   auto res = isl_multi_pw_aff_from_pw_aff_list(space.release(), list.release());
7198   ptr = res;
7199 }
7200 
multi_pw_aff(isl::checked::pw_multi_aff pma)7201 multi_pw_aff::multi_pw_aff(isl::checked::pw_multi_aff pma)
7202 {
7203   auto res = isl_multi_pw_aff_from_pw_multi_aff(pma.release());
7204   ptr = res;
7205 }
7206 
multi_pw_aff(isl::checked::ctx ctx,const std::string & str)7207 multi_pw_aff::multi_pw_aff(isl::checked::ctx ctx, const std::string &str)
7208 {
7209   auto res = isl_multi_pw_aff_read_from_str(ctx.release(), str.c_str());
7210   ptr = res;
7211 }
7212 
7213 multi_pw_aff &multi_pw_aff::operator=(multi_pw_aff obj) {
7214   std::swap(this->ptr, obj.ptr);
7215   return *this;
7216 }
7217 
~multi_pw_aff()7218 multi_pw_aff::~multi_pw_aff() {
7219   if (ptr)
7220     isl_multi_pw_aff_free(ptr);
7221 }
7222 
copy()7223 __isl_give isl_multi_pw_aff *multi_pw_aff::copy() const & {
7224   return isl_multi_pw_aff_copy(ptr);
7225 }
7226 
get()7227 __isl_keep isl_multi_pw_aff *multi_pw_aff::get() const {
7228   return ptr;
7229 }
7230 
release()7231 __isl_give isl_multi_pw_aff *multi_pw_aff::release() {
7232   isl_multi_pw_aff *tmp = ptr;
7233   ptr = nullptr;
7234   return tmp;
7235 }
7236 
is_null()7237 bool multi_pw_aff::is_null() const {
7238   return ptr == nullptr;
7239 }
7240 
ctx()7241 isl::checked::ctx multi_pw_aff::ctx() const {
7242   return isl::checked::ctx(isl_multi_pw_aff_get_ctx(ptr));
7243 }
7244 
add(isl::checked::multi_pw_aff multi2)7245 isl::checked::multi_pw_aff multi_pw_aff::add(isl::checked::multi_pw_aff multi2) const
7246 {
7247   auto res = isl_multi_pw_aff_add(copy(), multi2.release());
7248   return manage(res);
7249 }
7250 
add_constant(isl::checked::multi_val mv)7251 isl::checked::multi_pw_aff multi_pw_aff::add_constant(isl::checked::multi_val mv) const
7252 {
7253   auto res = isl_multi_pw_aff_add_constant_multi_val(copy(), mv.release());
7254   return manage(res);
7255 }
7256 
add_constant(isl::checked::val v)7257 isl::checked::multi_pw_aff multi_pw_aff::add_constant(isl::checked::val v) const
7258 {
7259   auto res = isl_multi_pw_aff_add_constant_val(copy(), v.release());
7260   return manage(res);
7261 }
7262 
add_constant(long v)7263 isl::checked::multi_pw_aff multi_pw_aff::add_constant(long v) const
7264 {
7265   return this->add_constant(isl::checked::val(ctx(), v));
7266 }
7267 
bind(isl::checked::multi_id tuple)7268 isl::checked::set multi_pw_aff::bind(isl::checked::multi_id tuple) const
7269 {
7270   auto res = isl_multi_pw_aff_bind(copy(), tuple.release());
7271   return manage(res);
7272 }
7273 
bind_domain(isl::checked::multi_id tuple)7274 isl::checked::multi_pw_aff multi_pw_aff::bind_domain(isl::checked::multi_id tuple) const
7275 {
7276   auto res = isl_multi_pw_aff_bind_domain(copy(), tuple.release());
7277   return manage(res);
7278 }
7279 
bind_domain_wrapped_domain(isl::checked::multi_id tuple)7280 isl::checked::multi_pw_aff multi_pw_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
7281 {
7282   auto res = isl_multi_pw_aff_bind_domain_wrapped_domain(copy(), tuple.release());
7283   return manage(res);
7284 }
7285 
coalesce()7286 isl::checked::multi_pw_aff multi_pw_aff::coalesce() const
7287 {
7288   auto res = isl_multi_pw_aff_coalesce(copy());
7289   return manage(res);
7290 }
7291 
domain()7292 isl::checked::set multi_pw_aff::domain() const
7293 {
7294   auto res = isl_multi_pw_aff_domain(copy());
7295   return manage(res);
7296 }
7297 
flat_range_product(isl::checked::multi_pw_aff multi2)7298 isl::checked::multi_pw_aff multi_pw_aff::flat_range_product(isl::checked::multi_pw_aff multi2) const
7299 {
7300   auto res = isl_multi_pw_aff_flat_range_product(copy(), multi2.release());
7301   return manage(res);
7302 }
7303 
at(int pos)7304 isl::checked::pw_aff multi_pw_aff::at(int pos) const
7305 {
7306   auto res = isl_multi_pw_aff_get_at(get(), pos);
7307   return manage(res);
7308 }
7309 
get_at(int pos)7310 isl::checked::pw_aff multi_pw_aff::get_at(int pos) const
7311 {
7312   return at(pos);
7313 }
7314 
list()7315 isl::checked::pw_aff_list multi_pw_aff::list() const
7316 {
7317   auto res = isl_multi_pw_aff_get_list(get());
7318   return manage(res);
7319 }
7320 
get_list()7321 isl::checked::pw_aff_list multi_pw_aff::get_list() const
7322 {
7323   return list();
7324 }
7325 
space()7326 isl::checked::space multi_pw_aff::space() const
7327 {
7328   auto res = isl_multi_pw_aff_get_space(get());
7329   return manage(res);
7330 }
7331 
get_space()7332 isl::checked::space multi_pw_aff::get_space() const
7333 {
7334   return space();
7335 }
7336 
gist(isl::checked::set set)7337 isl::checked::multi_pw_aff multi_pw_aff::gist(isl::checked::set set) const
7338 {
7339   auto res = isl_multi_pw_aff_gist(copy(), set.release());
7340   return manage(res);
7341 }
7342 
identity()7343 isl::checked::multi_pw_aff multi_pw_aff::identity() const
7344 {
7345   auto res = isl_multi_pw_aff_identity_multi_pw_aff(copy());
7346   return manage(res);
7347 }
7348 
identity_on_domain(isl::checked::space space)7349 isl::checked::multi_pw_aff multi_pw_aff::identity_on_domain(isl::checked::space space)
7350 {
7351   auto res = isl_multi_pw_aff_identity_on_domain_space(space.release());
7352   return manage(res);
7353 }
7354 
insert_domain(isl::checked::space domain)7355 isl::checked::multi_pw_aff multi_pw_aff::insert_domain(isl::checked::space domain) const
7356 {
7357   auto res = isl_multi_pw_aff_insert_domain(copy(), domain.release());
7358   return manage(res);
7359 }
7360 
intersect_domain(isl::checked::set domain)7361 isl::checked::multi_pw_aff multi_pw_aff::intersect_domain(isl::checked::set domain) const
7362 {
7363   auto res = isl_multi_pw_aff_intersect_domain(copy(), domain.release());
7364   return manage(res);
7365 }
7366 
intersect_params(isl::checked::set set)7367 isl::checked::multi_pw_aff multi_pw_aff::intersect_params(isl::checked::set set) const
7368 {
7369   auto res = isl_multi_pw_aff_intersect_params(copy(), set.release());
7370   return manage(res);
7371 }
7372 
involves_nan()7373 boolean multi_pw_aff::involves_nan() const
7374 {
7375   auto res = isl_multi_pw_aff_involves_nan(get());
7376   return manage(res);
7377 }
7378 
involves_param(const isl::checked::id & id)7379 boolean multi_pw_aff::involves_param(const isl::checked::id &id) const
7380 {
7381   auto res = isl_multi_pw_aff_involves_param_id(get(), id.get());
7382   return manage(res);
7383 }
7384 
involves_param(const std::string & id)7385 boolean multi_pw_aff::involves_param(const std::string &id) const
7386 {
7387   return this->involves_param(isl::checked::id(ctx(), id));
7388 }
7389 
involves_param(const isl::checked::id_list & list)7390 boolean multi_pw_aff::involves_param(const isl::checked::id_list &list) const
7391 {
7392   auto res = isl_multi_pw_aff_involves_param_id_list(get(), list.get());
7393   return manage(res);
7394 }
7395 
max(isl::checked::multi_pw_aff multi2)7396 isl::checked::multi_pw_aff multi_pw_aff::max(isl::checked::multi_pw_aff multi2) const
7397 {
7398   auto res = isl_multi_pw_aff_max(copy(), multi2.release());
7399   return manage(res);
7400 }
7401 
max_multi_val()7402 isl::checked::multi_val multi_pw_aff::max_multi_val() const
7403 {
7404   auto res = isl_multi_pw_aff_max_multi_val(copy());
7405   return manage(res);
7406 }
7407 
min(isl::checked::multi_pw_aff multi2)7408 isl::checked::multi_pw_aff multi_pw_aff::min(isl::checked::multi_pw_aff multi2) const
7409 {
7410   auto res = isl_multi_pw_aff_min(copy(), multi2.release());
7411   return manage(res);
7412 }
7413 
min_multi_val()7414 isl::checked::multi_val multi_pw_aff::min_multi_val() const
7415 {
7416   auto res = isl_multi_pw_aff_min_multi_val(copy());
7417   return manage(res);
7418 }
7419 
neg()7420 isl::checked::multi_pw_aff multi_pw_aff::neg() const
7421 {
7422   auto res = isl_multi_pw_aff_neg(copy());
7423   return manage(res);
7424 }
7425 
plain_is_equal(const isl::checked::multi_pw_aff & multi2)7426 boolean multi_pw_aff::plain_is_equal(const isl::checked::multi_pw_aff &multi2) const
7427 {
7428   auto res = isl_multi_pw_aff_plain_is_equal(get(), multi2.get());
7429   return manage(res);
7430 }
7431 
product(isl::checked::multi_pw_aff multi2)7432 isl::checked::multi_pw_aff multi_pw_aff::product(isl::checked::multi_pw_aff multi2) const
7433 {
7434   auto res = isl_multi_pw_aff_product(copy(), multi2.release());
7435   return manage(res);
7436 }
7437 
pullback(isl::checked::multi_aff ma)7438 isl::checked::multi_pw_aff multi_pw_aff::pullback(isl::checked::multi_aff ma) const
7439 {
7440   auto res = isl_multi_pw_aff_pullback_multi_aff(copy(), ma.release());
7441   return manage(res);
7442 }
7443 
pullback(isl::checked::multi_pw_aff mpa2)7444 isl::checked::multi_pw_aff multi_pw_aff::pullback(isl::checked::multi_pw_aff mpa2) const
7445 {
7446   auto res = isl_multi_pw_aff_pullback_multi_pw_aff(copy(), mpa2.release());
7447   return manage(res);
7448 }
7449 
pullback(isl::checked::pw_multi_aff pma)7450 isl::checked::multi_pw_aff multi_pw_aff::pullback(isl::checked::pw_multi_aff pma) const
7451 {
7452   auto res = isl_multi_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
7453   return manage(res);
7454 }
7455 
range_product(isl::checked::multi_pw_aff multi2)7456 isl::checked::multi_pw_aff multi_pw_aff::range_product(isl::checked::multi_pw_aff multi2) const
7457 {
7458   auto res = isl_multi_pw_aff_range_product(copy(), multi2.release());
7459   return manage(res);
7460 }
7461 
scale(isl::checked::multi_val mv)7462 isl::checked::multi_pw_aff multi_pw_aff::scale(isl::checked::multi_val mv) const
7463 {
7464   auto res = isl_multi_pw_aff_scale_multi_val(copy(), mv.release());
7465   return manage(res);
7466 }
7467 
scale(isl::checked::val v)7468 isl::checked::multi_pw_aff multi_pw_aff::scale(isl::checked::val v) const
7469 {
7470   auto res = isl_multi_pw_aff_scale_val(copy(), v.release());
7471   return manage(res);
7472 }
7473 
scale(long v)7474 isl::checked::multi_pw_aff multi_pw_aff::scale(long v) const
7475 {
7476   return this->scale(isl::checked::val(ctx(), v));
7477 }
7478 
scale_down(isl::checked::multi_val mv)7479 isl::checked::multi_pw_aff multi_pw_aff::scale_down(isl::checked::multi_val mv) const
7480 {
7481   auto res = isl_multi_pw_aff_scale_down_multi_val(copy(), mv.release());
7482   return manage(res);
7483 }
7484 
scale_down(isl::checked::val v)7485 isl::checked::multi_pw_aff multi_pw_aff::scale_down(isl::checked::val v) const
7486 {
7487   auto res = isl_multi_pw_aff_scale_down_val(copy(), v.release());
7488   return manage(res);
7489 }
7490 
scale_down(long v)7491 isl::checked::multi_pw_aff multi_pw_aff::scale_down(long v) const
7492 {
7493   return this->scale_down(isl::checked::val(ctx(), v));
7494 }
7495 
set_at(int pos,isl::checked::pw_aff el)7496 isl::checked::multi_pw_aff multi_pw_aff::set_at(int pos, isl::checked::pw_aff el) const
7497 {
7498   auto res = isl_multi_pw_aff_set_at(copy(), pos, el.release());
7499   return manage(res);
7500 }
7501 
size()7502 class size multi_pw_aff::size() const
7503 {
7504   auto res = isl_multi_pw_aff_size(get());
7505   return manage(res);
7506 }
7507 
sub(isl::checked::multi_pw_aff multi2)7508 isl::checked::multi_pw_aff multi_pw_aff::sub(isl::checked::multi_pw_aff multi2) const
7509 {
7510   auto res = isl_multi_pw_aff_sub(copy(), multi2.release());
7511   return manage(res);
7512 }
7513 
unbind_params_insert_domain(isl::checked::multi_id domain)7514 isl::checked::multi_pw_aff multi_pw_aff::unbind_params_insert_domain(isl::checked::multi_id domain) const
7515 {
7516   auto res = isl_multi_pw_aff_unbind_params_insert_domain(copy(), domain.release());
7517   return manage(res);
7518 }
7519 
union_add(isl::checked::multi_pw_aff mpa2)7520 isl::checked::multi_pw_aff multi_pw_aff::union_add(isl::checked::multi_pw_aff mpa2) const
7521 {
7522   auto res = isl_multi_pw_aff_union_add(copy(), mpa2.release());
7523   return manage(res);
7524 }
7525 
zero(isl::checked::space space)7526 isl::checked::multi_pw_aff multi_pw_aff::zero(isl::checked::space space)
7527 {
7528   auto res = isl_multi_pw_aff_zero(space.release());
7529   return manage(res);
7530 }
7531 
7532 inline std::ostream &operator<<(std::ostream &os, const multi_pw_aff &obj)
7533 {
7534   char *str = isl_multi_pw_aff_to_str(obj.get());
7535   if (!str) {
7536     os.setstate(std::ios_base::badbit);
7537     return os;
7538   }
7539   os << str;
7540   free(str);
7541   return os;
7542 }
7543 
7544 // implementations for isl::multi_union_pw_aff
manage(__isl_take isl_multi_union_pw_aff * ptr)7545 multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr) {
7546   return multi_union_pw_aff(ptr);
7547 }
manage_copy(__isl_keep isl_multi_union_pw_aff * ptr)7548 multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr) {
7549   ptr = isl_multi_union_pw_aff_copy(ptr);
7550   return multi_union_pw_aff(ptr);
7551 }
7552 
multi_union_pw_aff()7553 multi_union_pw_aff::multi_union_pw_aff()
7554     : ptr(nullptr) {}
7555 
multi_union_pw_aff(const multi_union_pw_aff & obj)7556 multi_union_pw_aff::multi_union_pw_aff(const multi_union_pw_aff &obj)
7557     : ptr(nullptr)
7558 {
7559   ptr = obj.copy();
7560 }
7561 
multi_union_pw_aff(__isl_take isl_multi_union_pw_aff * ptr)7562 multi_union_pw_aff::multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr)
7563     : ptr(ptr) {}
7564 
multi_union_pw_aff(isl::checked::multi_pw_aff mpa)7565 multi_union_pw_aff::multi_union_pw_aff(isl::checked::multi_pw_aff mpa)
7566 {
7567   auto res = isl_multi_union_pw_aff_from_multi_pw_aff(mpa.release());
7568   ptr = res;
7569 }
7570 
multi_union_pw_aff(isl::checked::union_pw_aff upa)7571 multi_union_pw_aff::multi_union_pw_aff(isl::checked::union_pw_aff upa)
7572 {
7573   auto res = isl_multi_union_pw_aff_from_union_pw_aff(upa.release());
7574   ptr = res;
7575 }
7576 
multi_union_pw_aff(isl::checked::space space,isl::checked::union_pw_aff_list list)7577 multi_union_pw_aff::multi_union_pw_aff(isl::checked::space space, isl::checked::union_pw_aff_list list)
7578 {
7579   auto res = isl_multi_union_pw_aff_from_union_pw_aff_list(space.release(), list.release());
7580   ptr = res;
7581 }
7582 
multi_union_pw_aff(isl::checked::ctx ctx,const std::string & str)7583 multi_union_pw_aff::multi_union_pw_aff(isl::checked::ctx ctx, const std::string &str)
7584 {
7585   auto res = isl_multi_union_pw_aff_read_from_str(ctx.release(), str.c_str());
7586   ptr = res;
7587 }
7588 
7589 multi_union_pw_aff &multi_union_pw_aff::operator=(multi_union_pw_aff obj) {
7590   std::swap(this->ptr, obj.ptr);
7591   return *this;
7592 }
7593 
~multi_union_pw_aff()7594 multi_union_pw_aff::~multi_union_pw_aff() {
7595   if (ptr)
7596     isl_multi_union_pw_aff_free(ptr);
7597 }
7598 
copy()7599 __isl_give isl_multi_union_pw_aff *multi_union_pw_aff::copy() const & {
7600   return isl_multi_union_pw_aff_copy(ptr);
7601 }
7602 
get()7603 __isl_keep isl_multi_union_pw_aff *multi_union_pw_aff::get() const {
7604   return ptr;
7605 }
7606 
release()7607 __isl_give isl_multi_union_pw_aff *multi_union_pw_aff::release() {
7608   isl_multi_union_pw_aff *tmp = ptr;
7609   ptr = nullptr;
7610   return tmp;
7611 }
7612 
is_null()7613 bool multi_union_pw_aff::is_null() const {
7614   return ptr == nullptr;
7615 }
7616 
ctx()7617 isl::checked::ctx multi_union_pw_aff::ctx() const {
7618   return isl::checked::ctx(isl_multi_union_pw_aff_get_ctx(ptr));
7619 }
7620 
add(isl::checked::multi_union_pw_aff multi2)7621 isl::checked::multi_union_pw_aff multi_union_pw_aff::add(isl::checked::multi_union_pw_aff multi2) const
7622 {
7623   auto res = isl_multi_union_pw_aff_add(copy(), multi2.release());
7624   return manage(res);
7625 }
7626 
bind(isl::checked::multi_id tuple)7627 isl::checked::union_set multi_union_pw_aff::bind(isl::checked::multi_id tuple) const
7628 {
7629   auto res = isl_multi_union_pw_aff_bind(copy(), tuple.release());
7630   return manage(res);
7631 }
7632 
coalesce()7633 isl::checked::multi_union_pw_aff multi_union_pw_aff::coalesce() const
7634 {
7635   auto res = isl_multi_union_pw_aff_coalesce(copy());
7636   return manage(res);
7637 }
7638 
domain()7639 isl::checked::union_set multi_union_pw_aff::domain() const
7640 {
7641   auto res = isl_multi_union_pw_aff_domain(copy());
7642   return manage(res);
7643 }
7644 
flat_range_product(isl::checked::multi_union_pw_aff multi2)7645 isl::checked::multi_union_pw_aff multi_union_pw_aff::flat_range_product(isl::checked::multi_union_pw_aff multi2) const
7646 {
7647   auto res = isl_multi_union_pw_aff_flat_range_product(copy(), multi2.release());
7648   return manage(res);
7649 }
7650 
at(int pos)7651 isl::checked::union_pw_aff multi_union_pw_aff::at(int pos) const
7652 {
7653   auto res = isl_multi_union_pw_aff_get_at(get(), pos);
7654   return manage(res);
7655 }
7656 
get_at(int pos)7657 isl::checked::union_pw_aff multi_union_pw_aff::get_at(int pos) const
7658 {
7659   return at(pos);
7660 }
7661 
list()7662 isl::checked::union_pw_aff_list multi_union_pw_aff::list() const
7663 {
7664   auto res = isl_multi_union_pw_aff_get_list(get());
7665   return manage(res);
7666 }
7667 
get_list()7668 isl::checked::union_pw_aff_list multi_union_pw_aff::get_list() const
7669 {
7670   return list();
7671 }
7672 
space()7673 isl::checked::space multi_union_pw_aff::space() const
7674 {
7675   auto res = isl_multi_union_pw_aff_get_space(get());
7676   return manage(res);
7677 }
7678 
get_space()7679 isl::checked::space multi_union_pw_aff::get_space() const
7680 {
7681   return space();
7682 }
7683 
gist(isl::checked::union_set context)7684 isl::checked::multi_union_pw_aff multi_union_pw_aff::gist(isl::checked::union_set context) const
7685 {
7686   auto res = isl_multi_union_pw_aff_gist(copy(), context.release());
7687   return manage(res);
7688 }
7689 
intersect_domain(isl::checked::union_set uset)7690 isl::checked::multi_union_pw_aff multi_union_pw_aff::intersect_domain(isl::checked::union_set uset) const
7691 {
7692   auto res = isl_multi_union_pw_aff_intersect_domain(copy(), uset.release());
7693   return manage(res);
7694 }
7695 
intersect_params(isl::checked::set params)7696 isl::checked::multi_union_pw_aff multi_union_pw_aff::intersect_params(isl::checked::set params) const
7697 {
7698   auto res = isl_multi_union_pw_aff_intersect_params(copy(), params.release());
7699   return manage(res);
7700 }
7701 
involves_nan()7702 boolean multi_union_pw_aff::involves_nan() const
7703 {
7704   auto res = isl_multi_union_pw_aff_involves_nan(get());
7705   return manage(res);
7706 }
7707 
neg()7708 isl::checked::multi_union_pw_aff multi_union_pw_aff::neg() const
7709 {
7710   auto res = isl_multi_union_pw_aff_neg(copy());
7711   return manage(res);
7712 }
7713 
plain_is_equal(const isl::checked::multi_union_pw_aff & multi2)7714 boolean multi_union_pw_aff::plain_is_equal(const isl::checked::multi_union_pw_aff &multi2) const
7715 {
7716   auto res = isl_multi_union_pw_aff_plain_is_equal(get(), multi2.get());
7717   return manage(res);
7718 }
7719 
pullback(isl::checked::union_pw_multi_aff upma)7720 isl::checked::multi_union_pw_aff multi_union_pw_aff::pullback(isl::checked::union_pw_multi_aff upma) const
7721 {
7722   auto res = isl_multi_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
7723   return manage(res);
7724 }
7725 
range_product(isl::checked::multi_union_pw_aff multi2)7726 isl::checked::multi_union_pw_aff multi_union_pw_aff::range_product(isl::checked::multi_union_pw_aff multi2) const
7727 {
7728   auto res = isl_multi_union_pw_aff_range_product(copy(), multi2.release());
7729   return manage(res);
7730 }
7731 
scale(isl::checked::multi_val mv)7732 isl::checked::multi_union_pw_aff multi_union_pw_aff::scale(isl::checked::multi_val mv) const
7733 {
7734   auto res = isl_multi_union_pw_aff_scale_multi_val(copy(), mv.release());
7735   return manage(res);
7736 }
7737 
scale(isl::checked::val v)7738 isl::checked::multi_union_pw_aff multi_union_pw_aff::scale(isl::checked::val v) const
7739 {
7740   auto res = isl_multi_union_pw_aff_scale_val(copy(), v.release());
7741   return manage(res);
7742 }
7743 
scale(long v)7744 isl::checked::multi_union_pw_aff multi_union_pw_aff::scale(long v) const
7745 {
7746   return this->scale(isl::checked::val(ctx(), v));
7747 }
7748 
scale_down(isl::checked::multi_val mv)7749 isl::checked::multi_union_pw_aff multi_union_pw_aff::scale_down(isl::checked::multi_val mv) const
7750 {
7751   auto res = isl_multi_union_pw_aff_scale_down_multi_val(copy(), mv.release());
7752   return manage(res);
7753 }
7754 
scale_down(isl::checked::val v)7755 isl::checked::multi_union_pw_aff multi_union_pw_aff::scale_down(isl::checked::val v) const
7756 {
7757   auto res = isl_multi_union_pw_aff_scale_down_val(copy(), v.release());
7758   return manage(res);
7759 }
7760 
scale_down(long v)7761 isl::checked::multi_union_pw_aff multi_union_pw_aff::scale_down(long v) const
7762 {
7763   return this->scale_down(isl::checked::val(ctx(), v));
7764 }
7765 
set_at(int pos,isl::checked::union_pw_aff el)7766 isl::checked::multi_union_pw_aff multi_union_pw_aff::set_at(int pos, isl::checked::union_pw_aff el) const
7767 {
7768   auto res = isl_multi_union_pw_aff_set_at(copy(), pos, el.release());
7769   return manage(res);
7770 }
7771 
size()7772 class size multi_union_pw_aff::size() const
7773 {
7774   auto res = isl_multi_union_pw_aff_size(get());
7775   return manage(res);
7776 }
7777 
sub(isl::checked::multi_union_pw_aff multi2)7778 isl::checked::multi_union_pw_aff multi_union_pw_aff::sub(isl::checked::multi_union_pw_aff multi2) const
7779 {
7780   auto res = isl_multi_union_pw_aff_sub(copy(), multi2.release());
7781   return manage(res);
7782 }
7783 
union_add(isl::checked::multi_union_pw_aff mupa2)7784 isl::checked::multi_union_pw_aff multi_union_pw_aff::union_add(isl::checked::multi_union_pw_aff mupa2) const
7785 {
7786   auto res = isl_multi_union_pw_aff_union_add(copy(), mupa2.release());
7787   return manage(res);
7788 }
7789 
zero(isl::checked::space space)7790 isl::checked::multi_union_pw_aff multi_union_pw_aff::zero(isl::checked::space space)
7791 {
7792   auto res = isl_multi_union_pw_aff_zero(space.release());
7793   return manage(res);
7794 }
7795 
7796 inline std::ostream &operator<<(std::ostream &os, const multi_union_pw_aff &obj)
7797 {
7798   char *str = isl_multi_union_pw_aff_to_str(obj.get());
7799   if (!str) {
7800     os.setstate(std::ios_base::badbit);
7801     return os;
7802   }
7803   os << str;
7804   free(str);
7805   return os;
7806 }
7807 
7808 // implementations for isl::multi_val
manage(__isl_take isl_multi_val * ptr)7809 multi_val manage(__isl_take isl_multi_val *ptr) {
7810   return multi_val(ptr);
7811 }
manage_copy(__isl_keep isl_multi_val * ptr)7812 multi_val manage_copy(__isl_keep isl_multi_val *ptr) {
7813   ptr = isl_multi_val_copy(ptr);
7814   return multi_val(ptr);
7815 }
7816 
multi_val()7817 multi_val::multi_val()
7818     : ptr(nullptr) {}
7819 
multi_val(const multi_val & obj)7820 multi_val::multi_val(const multi_val &obj)
7821     : ptr(nullptr)
7822 {
7823   ptr = obj.copy();
7824 }
7825 
multi_val(__isl_take isl_multi_val * ptr)7826 multi_val::multi_val(__isl_take isl_multi_val *ptr)
7827     : ptr(ptr) {}
7828 
multi_val(isl::checked::space space,isl::checked::val_list list)7829 multi_val::multi_val(isl::checked::space space, isl::checked::val_list list)
7830 {
7831   auto res = isl_multi_val_from_val_list(space.release(), list.release());
7832   ptr = res;
7833 }
7834 
multi_val(isl::checked::ctx ctx,const std::string & str)7835 multi_val::multi_val(isl::checked::ctx ctx, const std::string &str)
7836 {
7837   auto res = isl_multi_val_read_from_str(ctx.release(), str.c_str());
7838   ptr = res;
7839 }
7840 
7841 multi_val &multi_val::operator=(multi_val obj) {
7842   std::swap(this->ptr, obj.ptr);
7843   return *this;
7844 }
7845 
~multi_val()7846 multi_val::~multi_val() {
7847   if (ptr)
7848     isl_multi_val_free(ptr);
7849 }
7850 
copy()7851 __isl_give isl_multi_val *multi_val::copy() const & {
7852   return isl_multi_val_copy(ptr);
7853 }
7854 
get()7855 __isl_keep isl_multi_val *multi_val::get() const {
7856   return ptr;
7857 }
7858 
release()7859 __isl_give isl_multi_val *multi_val::release() {
7860   isl_multi_val *tmp = ptr;
7861   ptr = nullptr;
7862   return tmp;
7863 }
7864 
is_null()7865 bool multi_val::is_null() const {
7866   return ptr == nullptr;
7867 }
7868 
ctx()7869 isl::checked::ctx multi_val::ctx() const {
7870   return isl::checked::ctx(isl_multi_val_get_ctx(ptr));
7871 }
7872 
add(isl::checked::multi_val multi2)7873 isl::checked::multi_val multi_val::add(isl::checked::multi_val multi2) const
7874 {
7875   auto res = isl_multi_val_add(copy(), multi2.release());
7876   return manage(res);
7877 }
7878 
add(isl::checked::val v)7879 isl::checked::multi_val multi_val::add(isl::checked::val v) const
7880 {
7881   auto res = isl_multi_val_add_val(copy(), v.release());
7882   return manage(res);
7883 }
7884 
add(long v)7885 isl::checked::multi_val multi_val::add(long v) const
7886 {
7887   return this->add(isl::checked::val(ctx(), v));
7888 }
7889 
flat_range_product(isl::checked::multi_val multi2)7890 isl::checked::multi_val multi_val::flat_range_product(isl::checked::multi_val multi2) const
7891 {
7892   auto res = isl_multi_val_flat_range_product(copy(), multi2.release());
7893   return manage(res);
7894 }
7895 
at(int pos)7896 isl::checked::val multi_val::at(int pos) const
7897 {
7898   auto res = isl_multi_val_get_at(get(), pos);
7899   return manage(res);
7900 }
7901 
get_at(int pos)7902 isl::checked::val multi_val::get_at(int pos) const
7903 {
7904   return at(pos);
7905 }
7906 
list()7907 isl::checked::val_list multi_val::list() const
7908 {
7909   auto res = isl_multi_val_get_list(get());
7910   return manage(res);
7911 }
7912 
get_list()7913 isl::checked::val_list multi_val::get_list() const
7914 {
7915   return list();
7916 }
7917 
space()7918 isl::checked::space multi_val::space() const
7919 {
7920   auto res = isl_multi_val_get_space(get());
7921   return manage(res);
7922 }
7923 
get_space()7924 isl::checked::space multi_val::get_space() const
7925 {
7926   return space();
7927 }
7928 
involves_nan()7929 boolean multi_val::involves_nan() const
7930 {
7931   auto res = isl_multi_val_involves_nan(get());
7932   return manage(res);
7933 }
7934 
max(isl::checked::multi_val multi2)7935 isl::checked::multi_val multi_val::max(isl::checked::multi_val multi2) const
7936 {
7937   auto res = isl_multi_val_max(copy(), multi2.release());
7938   return manage(res);
7939 }
7940 
min(isl::checked::multi_val multi2)7941 isl::checked::multi_val multi_val::min(isl::checked::multi_val multi2) const
7942 {
7943   auto res = isl_multi_val_min(copy(), multi2.release());
7944   return manage(res);
7945 }
7946 
neg()7947 isl::checked::multi_val multi_val::neg() const
7948 {
7949   auto res = isl_multi_val_neg(copy());
7950   return manage(res);
7951 }
7952 
plain_is_equal(const isl::checked::multi_val & multi2)7953 boolean multi_val::plain_is_equal(const isl::checked::multi_val &multi2) const
7954 {
7955   auto res = isl_multi_val_plain_is_equal(get(), multi2.get());
7956   return manage(res);
7957 }
7958 
product(isl::checked::multi_val multi2)7959 isl::checked::multi_val multi_val::product(isl::checked::multi_val multi2) const
7960 {
7961   auto res = isl_multi_val_product(copy(), multi2.release());
7962   return manage(res);
7963 }
7964 
range_product(isl::checked::multi_val multi2)7965 isl::checked::multi_val multi_val::range_product(isl::checked::multi_val multi2) const
7966 {
7967   auto res = isl_multi_val_range_product(copy(), multi2.release());
7968   return manage(res);
7969 }
7970 
scale(isl::checked::multi_val mv)7971 isl::checked::multi_val multi_val::scale(isl::checked::multi_val mv) const
7972 {
7973   auto res = isl_multi_val_scale_multi_val(copy(), mv.release());
7974   return manage(res);
7975 }
7976 
scale(isl::checked::val v)7977 isl::checked::multi_val multi_val::scale(isl::checked::val v) const
7978 {
7979   auto res = isl_multi_val_scale_val(copy(), v.release());
7980   return manage(res);
7981 }
7982 
scale(long v)7983 isl::checked::multi_val multi_val::scale(long v) const
7984 {
7985   return this->scale(isl::checked::val(ctx(), v));
7986 }
7987 
scale_down(isl::checked::multi_val mv)7988 isl::checked::multi_val multi_val::scale_down(isl::checked::multi_val mv) const
7989 {
7990   auto res = isl_multi_val_scale_down_multi_val(copy(), mv.release());
7991   return manage(res);
7992 }
7993 
scale_down(isl::checked::val v)7994 isl::checked::multi_val multi_val::scale_down(isl::checked::val v) const
7995 {
7996   auto res = isl_multi_val_scale_down_val(copy(), v.release());
7997   return manage(res);
7998 }
7999 
scale_down(long v)8000 isl::checked::multi_val multi_val::scale_down(long v) const
8001 {
8002   return this->scale_down(isl::checked::val(ctx(), v));
8003 }
8004 
set_at(int pos,isl::checked::val el)8005 isl::checked::multi_val multi_val::set_at(int pos, isl::checked::val el) const
8006 {
8007   auto res = isl_multi_val_set_at(copy(), pos, el.release());
8008   return manage(res);
8009 }
8010 
set_at(int pos,long el)8011 isl::checked::multi_val multi_val::set_at(int pos, long el) const
8012 {
8013   return this->set_at(pos, isl::checked::val(ctx(), el));
8014 }
8015 
size()8016 class size multi_val::size() const
8017 {
8018   auto res = isl_multi_val_size(get());
8019   return manage(res);
8020 }
8021 
sub(isl::checked::multi_val multi2)8022 isl::checked::multi_val multi_val::sub(isl::checked::multi_val multi2) const
8023 {
8024   auto res = isl_multi_val_sub(copy(), multi2.release());
8025   return manage(res);
8026 }
8027 
zero(isl::checked::space space)8028 isl::checked::multi_val multi_val::zero(isl::checked::space space)
8029 {
8030   auto res = isl_multi_val_zero(space.release());
8031   return manage(res);
8032 }
8033 
8034 inline std::ostream &operator<<(std::ostream &os, const multi_val &obj)
8035 {
8036   char *str = isl_multi_val_to_str(obj.get());
8037   if (!str) {
8038     os.setstate(std::ios_base::badbit);
8039     return os;
8040   }
8041   os << str;
8042   free(str);
8043   return os;
8044 }
8045 
8046 // implementations for isl::point
manage(__isl_take isl_point * ptr)8047 point manage(__isl_take isl_point *ptr) {
8048   return point(ptr);
8049 }
manage_copy(__isl_keep isl_point * ptr)8050 point manage_copy(__isl_keep isl_point *ptr) {
8051   ptr = isl_point_copy(ptr);
8052   return point(ptr);
8053 }
8054 
point()8055 point::point()
8056     : ptr(nullptr) {}
8057 
point(const point & obj)8058 point::point(const point &obj)
8059     : ptr(nullptr)
8060 {
8061   ptr = obj.copy();
8062 }
8063 
point(__isl_take isl_point * ptr)8064 point::point(__isl_take isl_point *ptr)
8065     : ptr(ptr) {}
8066 
8067 point &point::operator=(point obj) {
8068   std::swap(this->ptr, obj.ptr);
8069   return *this;
8070 }
8071 
~point()8072 point::~point() {
8073   if (ptr)
8074     isl_point_free(ptr);
8075 }
8076 
copy()8077 __isl_give isl_point *point::copy() const & {
8078   return isl_point_copy(ptr);
8079 }
8080 
get()8081 __isl_keep isl_point *point::get() const {
8082   return ptr;
8083 }
8084 
release()8085 __isl_give isl_point *point::release() {
8086   isl_point *tmp = ptr;
8087   ptr = nullptr;
8088   return tmp;
8089 }
8090 
is_null()8091 bool point::is_null() const {
8092   return ptr == nullptr;
8093 }
8094 
ctx()8095 isl::checked::ctx point::ctx() const {
8096   return isl::checked::ctx(isl_point_get_ctx(ptr));
8097 }
8098 
multi_val()8099 isl::checked::multi_val point::multi_val() const
8100 {
8101   auto res = isl_point_get_multi_val(get());
8102   return manage(res);
8103 }
8104 
get_multi_val()8105 isl::checked::multi_val point::get_multi_val() const
8106 {
8107   return multi_val();
8108 }
8109 
8110 inline std::ostream &operator<<(std::ostream &os, const point &obj)
8111 {
8112   char *str = isl_point_to_str(obj.get());
8113   if (!str) {
8114     os.setstate(std::ios_base::badbit);
8115     return os;
8116   }
8117   os << str;
8118   free(str);
8119   return os;
8120 }
8121 
8122 // implementations for isl::pw_aff
manage(__isl_take isl_pw_aff * ptr)8123 pw_aff manage(__isl_take isl_pw_aff *ptr) {
8124   return pw_aff(ptr);
8125 }
manage_copy(__isl_keep isl_pw_aff * ptr)8126 pw_aff manage_copy(__isl_keep isl_pw_aff *ptr) {
8127   ptr = isl_pw_aff_copy(ptr);
8128   return pw_aff(ptr);
8129 }
8130 
pw_aff()8131 pw_aff::pw_aff()
8132     : ptr(nullptr) {}
8133 
pw_aff(const pw_aff & obj)8134 pw_aff::pw_aff(const pw_aff &obj)
8135     : ptr(nullptr)
8136 {
8137   ptr = obj.copy();
8138 }
8139 
pw_aff(__isl_take isl_pw_aff * ptr)8140 pw_aff::pw_aff(__isl_take isl_pw_aff *ptr)
8141     : ptr(ptr) {}
8142 
pw_aff(isl::checked::aff aff)8143 pw_aff::pw_aff(isl::checked::aff aff)
8144 {
8145   auto res = isl_pw_aff_from_aff(aff.release());
8146   ptr = res;
8147 }
8148 
pw_aff(isl::checked::ctx ctx,const std::string & str)8149 pw_aff::pw_aff(isl::checked::ctx ctx, const std::string &str)
8150 {
8151   auto res = isl_pw_aff_read_from_str(ctx.release(), str.c_str());
8152   ptr = res;
8153 }
8154 
8155 pw_aff &pw_aff::operator=(pw_aff obj) {
8156   std::swap(this->ptr, obj.ptr);
8157   return *this;
8158 }
8159 
~pw_aff()8160 pw_aff::~pw_aff() {
8161   if (ptr)
8162     isl_pw_aff_free(ptr);
8163 }
8164 
copy()8165 __isl_give isl_pw_aff *pw_aff::copy() const & {
8166   return isl_pw_aff_copy(ptr);
8167 }
8168 
get()8169 __isl_keep isl_pw_aff *pw_aff::get() const {
8170   return ptr;
8171 }
8172 
release()8173 __isl_give isl_pw_aff *pw_aff::release() {
8174   isl_pw_aff *tmp = ptr;
8175   ptr = nullptr;
8176   return tmp;
8177 }
8178 
is_null()8179 bool pw_aff::is_null() const {
8180   return ptr == nullptr;
8181 }
8182 
ctx()8183 isl::checked::ctx pw_aff::ctx() const {
8184   return isl::checked::ctx(isl_pw_aff_get_ctx(ptr));
8185 }
8186 
add(isl::checked::pw_aff pwaff2)8187 isl::checked::pw_aff pw_aff::add(isl::checked::pw_aff pwaff2) const
8188 {
8189   auto res = isl_pw_aff_add(copy(), pwaff2.release());
8190   return manage(res);
8191 }
8192 
add_constant(isl::checked::val v)8193 isl::checked::pw_aff pw_aff::add_constant(isl::checked::val v) const
8194 {
8195   auto res = isl_pw_aff_add_constant_val(copy(), v.release());
8196   return manage(res);
8197 }
8198 
add_constant(long v)8199 isl::checked::pw_aff pw_aff::add_constant(long v) const
8200 {
8201   return this->add_constant(isl::checked::val(ctx(), v));
8202 }
8203 
as_aff()8204 isl::checked::aff pw_aff::as_aff() const
8205 {
8206   auto res = isl_pw_aff_as_aff(copy());
8207   return manage(res);
8208 }
8209 
bind(isl::checked::id id)8210 isl::checked::set pw_aff::bind(isl::checked::id id) const
8211 {
8212   auto res = isl_pw_aff_bind_id(copy(), id.release());
8213   return manage(res);
8214 }
8215 
bind(const std::string & id)8216 isl::checked::set pw_aff::bind(const std::string &id) const
8217 {
8218   return this->bind(isl::checked::id(ctx(), id));
8219 }
8220 
bind_domain(isl::checked::multi_id tuple)8221 isl::checked::pw_aff pw_aff::bind_domain(isl::checked::multi_id tuple) const
8222 {
8223   auto res = isl_pw_aff_bind_domain(copy(), tuple.release());
8224   return manage(res);
8225 }
8226 
bind_domain_wrapped_domain(isl::checked::multi_id tuple)8227 isl::checked::pw_aff pw_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
8228 {
8229   auto res = isl_pw_aff_bind_domain_wrapped_domain(copy(), tuple.release());
8230   return manage(res);
8231 }
8232 
ceil()8233 isl::checked::pw_aff pw_aff::ceil() const
8234 {
8235   auto res = isl_pw_aff_ceil(copy());
8236   return manage(res);
8237 }
8238 
coalesce()8239 isl::checked::pw_aff pw_aff::coalesce() const
8240 {
8241   auto res = isl_pw_aff_coalesce(copy());
8242   return manage(res);
8243 }
8244 
cond(isl::checked::pw_aff pwaff_true,isl::checked::pw_aff pwaff_false)8245 isl::checked::pw_aff pw_aff::cond(isl::checked::pw_aff pwaff_true, isl::checked::pw_aff pwaff_false) const
8246 {
8247   auto res = isl_pw_aff_cond(copy(), pwaff_true.release(), pwaff_false.release());
8248   return manage(res);
8249 }
8250 
div(isl::checked::pw_aff pa2)8251 isl::checked::pw_aff pw_aff::div(isl::checked::pw_aff pa2) const
8252 {
8253   auto res = isl_pw_aff_div(copy(), pa2.release());
8254   return manage(res);
8255 }
8256 
domain()8257 isl::checked::set pw_aff::domain() const
8258 {
8259   auto res = isl_pw_aff_domain(copy());
8260   return manage(res);
8261 }
8262 
eq_set(isl::checked::pw_aff pwaff2)8263 isl::checked::set pw_aff::eq_set(isl::checked::pw_aff pwaff2) const
8264 {
8265   auto res = isl_pw_aff_eq_set(copy(), pwaff2.release());
8266   return manage(res);
8267 }
8268 
eval(isl::checked::point pnt)8269 isl::checked::val pw_aff::eval(isl::checked::point pnt) const
8270 {
8271   auto res = isl_pw_aff_eval(copy(), pnt.release());
8272   return manage(res);
8273 }
8274 
floor()8275 isl::checked::pw_aff pw_aff::floor() const
8276 {
8277   auto res = isl_pw_aff_floor(copy());
8278   return manage(res);
8279 }
8280 
ge_set(isl::checked::pw_aff pwaff2)8281 isl::checked::set pw_aff::ge_set(isl::checked::pw_aff pwaff2) const
8282 {
8283   auto res = isl_pw_aff_ge_set(copy(), pwaff2.release());
8284   return manage(res);
8285 }
8286 
gist(isl::checked::set context)8287 isl::checked::pw_aff pw_aff::gist(isl::checked::set context) const
8288 {
8289   auto res = isl_pw_aff_gist(copy(), context.release());
8290   return manage(res);
8291 }
8292 
gt_set(isl::checked::pw_aff pwaff2)8293 isl::checked::set pw_aff::gt_set(isl::checked::pw_aff pwaff2) const
8294 {
8295   auto res = isl_pw_aff_gt_set(copy(), pwaff2.release());
8296   return manage(res);
8297 }
8298 
insert_domain(isl::checked::space domain)8299 isl::checked::pw_aff pw_aff::insert_domain(isl::checked::space domain) const
8300 {
8301   auto res = isl_pw_aff_insert_domain(copy(), domain.release());
8302   return manage(res);
8303 }
8304 
intersect_domain(isl::checked::set set)8305 isl::checked::pw_aff pw_aff::intersect_domain(isl::checked::set set) const
8306 {
8307   auto res = isl_pw_aff_intersect_domain(copy(), set.release());
8308   return manage(res);
8309 }
8310 
intersect_params(isl::checked::set set)8311 isl::checked::pw_aff pw_aff::intersect_params(isl::checked::set set) const
8312 {
8313   auto res = isl_pw_aff_intersect_params(copy(), set.release());
8314   return manage(res);
8315 }
8316 
isa_aff()8317 boolean pw_aff::isa_aff() const
8318 {
8319   auto res = isl_pw_aff_isa_aff(get());
8320   return manage(res);
8321 }
8322 
le_set(isl::checked::pw_aff pwaff2)8323 isl::checked::set pw_aff::le_set(isl::checked::pw_aff pwaff2) const
8324 {
8325   auto res = isl_pw_aff_le_set(copy(), pwaff2.release());
8326   return manage(res);
8327 }
8328 
lt_set(isl::checked::pw_aff pwaff2)8329 isl::checked::set pw_aff::lt_set(isl::checked::pw_aff pwaff2) const
8330 {
8331   auto res = isl_pw_aff_lt_set(copy(), pwaff2.release());
8332   return manage(res);
8333 }
8334 
max(isl::checked::pw_aff pwaff2)8335 isl::checked::pw_aff pw_aff::max(isl::checked::pw_aff pwaff2) const
8336 {
8337   auto res = isl_pw_aff_max(copy(), pwaff2.release());
8338   return manage(res);
8339 }
8340 
min(isl::checked::pw_aff pwaff2)8341 isl::checked::pw_aff pw_aff::min(isl::checked::pw_aff pwaff2) const
8342 {
8343   auto res = isl_pw_aff_min(copy(), pwaff2.release());
8344   return manage(res);
8345 }
8346 
mod(isl::checked::val mod)8347 isl::checked::pw_aff pw_aff::mod(isl::checked::val mod) const
8348 {
8349   auto res = isl_pw_aff_mod_val(copy(), mod.release());
8350   return manage(res);
8351 }
8352 
mod(long mod)8353 isl::checked::pw_aff pw_aff::mod(long mod) const
8354 {
8355   return this->mod(isl::checked::val(ctx(), mod));
8356 }
8357 
mul(isl::checked::pw_aff pwaff2)8358 isl::checked::pw_aff pw_aff::mul(isl::checked::pw_aff pwaff2) const
8359 {
8360   auto res = isl_pw_aff_mul(copy(), pwaff2.release());
8361   return manage(res);
8362 }
8363 
ne_set(isl::checked::pw_aff pwaff2)8364 isl::checked::set pw_aff::ne_set(isl::checked::pw_aff pwaff2) const
8365 {
8366   auto res = isl_pw_aff_ne_set(copy(), pwaff2.release());
8367   return manage(res);
8368 }
8369 
neg()8370 isl::checked::pw_aff pw_aff::neg() const
8371 {
8372   auto res = isl_pw_aff_neg(copy());
8373   return manage(res);
8374 }
8375 
param_on_domain(isl::checked::set domain,isl::checked::id id)8376 isl::checked::pw_aff pw_aff::param_on_domain(isl::checked::set domain, isl::checked::id id)
8377 {
8378   auto res = isl_pw_aff_param_on_domain_id(domain.release(), id.release());
8379   return manage(res);
8380 }
8381 
pullback(isl::checked::multi_aff ma)8382 isl::checked::pw_aff pw_aff::pullback(isl::checked::multi_aff ma) const
8383 {
8384   auto res = isl_pw_aff_pullback_multi_aff(copy(), ma.release());
8385   return manage(res);
8386 }
8387 
pullback(isl::checked::multi_pw_aff mpa)8388 isl::checked::pw_aff pw_aff::pullback(isl::checked::multi_pw_aff mpa) const
8389 {
8390   auto res = isl_pw_aff_pullback_multi_pw_aff(copy(), mpa.release());
8391   return manage(res);
8392 }
8393 
pullback(isl::checked::pw_multi_aff pma)8394 isl::checked::pw_aff pw_aff::pullback(isl::checked::pw_multi_aff pma) const
8395 {
8396   auto res = isl_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
8397   return manage(res);
8398 }
8399 
scale(isl::checked::val v)8400 isl::checked::pw_aff pw_aff::scale(isl::checked::val v) const
8401 {
8402   auto res = isl_pw_aff_scale_val(copy(), v.release());
8403   return manage(res);
8404 }
8405 
scale(long v)8406 isl::checked::pw_aff pw_aff::scale(long v) const
8407 {
8408   return this->scale(isl::checked::val(ctx(), v));
8409 }
8410 
scale_down(isl::checked::val f)8411 isl::checked::pw_aff pw_aff::scale_down(isl::checked::val f) const
8412 {
8413   auto res = isl_pw_aff_scale_down_val(copy(), f.release());
8414   return manage(res);
8415 }
8416 
scale_down(long f)8417 isl::checked::pw_aff pw_aff::scale_down(long f) const
8418 {
8419   return this->scale_down(isl::checked::val(ctx(), f));
8420 }
8421 
sub(isl::checked::pw_aff pwaff2)8422 isl::checked::pw_aff pw_aff::sub(isl::checked::pw_aff pwaff2) const
8423 {
8424   auto res = isl_pw_aff_sub(copy(), pwaff2.release());
8425   return manage(res);
8426 }
8427 
subtract_domain(isl::checked::set set)8428 isl::checked::pw_aff pw_aff::subtract_domain(isl::checked::set set) const
8429 {
8430   auto res = isl_pw_aff_subtract_domain(copy(), set.release());
8431   return manage(res);
8432 }
8433 
tdiv_q(isl::checked::pw_aff pa2)8434 isl::checked::pw_aff pw_aff::tdiv_q(isl::checked::pw_aff pa2) const
8435 {
8436   auto res = isl_pw_aff_tdiv_q(copy(), pa2.release());
8437   return manage(res);
8438 }
8439 
tdiv_r(isl::checked::pw_aff pa2)8440 isl::checked::pw_aff pw_aff::tdiv_r(isl::checked::pw_aff pa2) const
8441 {
8442   auto res = isl_pw_aff_tdiv_r(copy(), pa2.release());
8443   return manage(res);
8444 }
8445 
union_add(isl::checked::pw_aff pwaff2)8446 isl::checked::pw_aff pw_aff::union_add(isl::checked::pw_aff pwaff2) const
8447 {
8448   auto res = isl_pw_aff_union_add(copy(), pwaff2.release());
8449   return manage(res);
8450 }
8451 
8452 inline std::ostream &operator<<(std::ostream &os, const pw_aff &obj)
8453 {
8454   char *str = isl_pw_aff_to_str(obj.get());
8455   if (!str) {
8456     os.setstate(std::ios_base::badbit);
8457     return os;
8458   }
8459   os << str;
8460   free(str);
8461   return os;
8462 }
8463 
8464 // implementations for isl::pw_aff_list
manage(__isl_take isl_pw_aff_list * ptr)8465 pw_aff_list manage(__isl_take isl_pw_aff_list *ptr) {
8466   return pw_aff_list(ptr);
8467 }
manage_copy(__isl_keep isl_pw_aff_list * ptr)8468 pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr) {
8469   ptr = isl_pw_aff_list_copy(ptr);
8470   return pw_aff_list(ptr);
8471 }
8472 
pw_aff_list()8473 pw_aff_list::pw_aff_list()
8474     : ptr(nullptr) {}
8475 
pw_aff_list(const pw_aff_list & obj)8476 pw_aff_list::pw_aff_list(const pw_aff_list &obj)
8477     : ptr(nullptr)
8478 {
8479   ptr = obj.copy();
8480 }
8481 
pw_aff_list(__isl_take isl_pw_aff_list * ptr)8482 pw_aff_list::pw_aff_list(__isl_take isl_pw_aff_list *ptr)
8483     : ptr(ptr) {}
8484 
pw_aff_list(isl::checked::ctx ctx,int n)8485 pw_aff_list::pw_aff_list(isl::checked::ctx ctx, int n)
8486 {
8487   auto res = isl_pw_aff_list_alloc(ctx.release(), n);
8488   ptr = res;
8489 }
8490 
pw_aff_list(isl::checked::pw_aff el)8491 pw_aff_list::pw_aff_list(isl::checked::pw_aff el)
8492 {
8493   auto res = isl_pw_aff_list_from_pw_aff(el.release());
8494   ptr = res;
8495 }
8496 
8497 pw_aff_list &pw_aff_list::operator=(pw_aff_list obj) {
8498   std::swap(this->ptr, obj.ptr);
8499   return *this;
8500 }
8501 
~pw_aff_list()8502 pw_aff_list::~pw_aff_list() {
8503   if (ptr)
8504     isl_pw_aff_list_free(ptr);
8505 }
8506 
copy()8507 __isl_give isl_pw_aff_list *pw_aff_list::copy() const & {
8508   return isl_pw_aff_list_copy(ptr);
8509 }
8510 
get()8511 __isl_keep isl_pw_aff_list *pw_aff_list::get() const {
8512   return ptr;
8513 }
8514 
release()8515 __isl_give isl_pw_aff_list *pw_aff_list::release() {
8516   isl_pw_aff_list *tmp = ptr;
8517   ptr = nullptr;
8518   return tmp;
8519 }
8520 
is_null()8521 bool pw_aff_list::is_null() const {
8522   return ptr == nullptr;
8523 }
8524 
ctx()8525 isl::checked::ctx pw_aff_list::ctx() const {
8526   return isl::checked::ctx(isl_pw_aff_list_get_ctx(ptr));
8527 }
8528 
add(isl::checked::pw_aff el)8529 isl::checked::pw_aff_list pw_aff_list::add(isl::checked::pw_aff el) const
8530 {
8531   auto res = isl_pw_aff_list_add(copy(), el.release());
8532   return manage(res);
8533 }
8534 
clear()8535 isl::checked::pw_aff_list pw_aff_list::clear() const
8536 {
8537   auto res = isl_pw_aff_list_clear(copy());
8538   return manage(res);
8539 }
8540 
concat(isl::checked::pw_aff_list list2)8541 isl::checked::pw_aff_list pw_aff_list::concat(isl::checked::pw_aff_list list2) const
8542 {
8543   auto res = isl_pw_aff_list_concat(copy(), list2.release());
8544   return manage(res);
8545 }
8546 
drop(unsigned int first,unsigned int n)8547 isl::checked::pw_aff_list pw_aff_list::drop(unsigned int first, unsigned int n) const
8548 {
8549   auto res = isl_pw_aff_list_drop(copy(), first, n);
8550   return manage(res);
8551 }
8552 
foreach(const std::function<stat (isl::checked::pw_aff)> & fn)8553 stat pw_aff_list::foreach(const std::function<stat(isl::checked::pw_aff)> &fn) const
8554 {
8555   struct fn_data {
8556     std::function<stat(isl::checked::pw_aff)> func;
8557   } fn_data = { fn };
8558   auto fn_lambda = [](isl_pw_aff *arg_0, void *arg_1) -> isl_stat {
8559     auto *data = static_cast<struct fn_data *>(arg_1);
8560     auto ret = (data->func)(manage(arg_0));
8561     return ret.release();
8562   };
8563   auto res = isl_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
8564   return manage(res);
8565 }
8566 
at(int index)8567 isl::checked::pw_aff pw_aff_list::at(int index) const
8568 {
8569   auto res = isl_pw_aff_list_get_at(get(), index);
8570   return manage(res);
8571 }
8572 
get_at(int index)8573 isl::checked::pw_aff pw_aff_list::get_at(int index) const
8574 {
8575   return at(index);
8576 }
8577 
insert(unsigned int pos,isl::checked::pw_aff el)8578 isl::checked::pw_aff_list pw_aff_list::insert(unsigned int pos, isl::checked::pw_aff el) const
8579 {
8580   auto res = isl_pw_aff_list_insert(copy(), pos, el.release());
8581   return manage(res);
8582 }
8583 
size()8584 class size pw_aff_list::size() const
8585 {
8586   auto res = isl_pw_aff_list_size(get());
8587   return manage(res);
8588 }
8589 
8590 inline std::ostream &operator<<(std::ostream &os, const pw_aff_list &obj)
8591 {
8592   char *str = isl_pw_aff_list_to_str(obj.get());
8593   if (!str) {
8594     os.setstate(std::ios_base::badbit);
8595     return os;
8596   }
8597   os << str;
8598   free(str);
8599   return os;
8600 }
8601 
8602 // implementations for isl::pw_multi_aff
manage(__isl_take isl_pw_multi_aff * ptr)8603 pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr) {
8604   return pw_multi_aff(ptr);
8605 }
manage_copy(__isl_keep isl_pw_multi_aff * ptr)8606 pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr) {
8607   ptr = isl_pw_multi_aff_copy(ptr);
8608   return pw_multi_aff(ptr);
8609 }
8610 
pw_multi_aff()8611 pw_multi_aff::pw_multi_aff()
8612     : ptr(nullptr) {}
8613 
pw_multi_aff(const pw_multi_aff & obj)8614 pw_multi_aff::pw_multi_aff(const pw_multi_aff &obj)
8615     : ptr(nullptr)
8616 {
8617   ptr = obj.copy();
8618 }
8619 
pw_multi_aff(__isl_take isl_pw_multi_aff * ptr)8620 pw_multi_aff::pw_multi_aff(__isl_take isl_pw_multi_aff *ptr)
8621     : ptr(ptr) {}
8622 
pw_multi_aff(isl::checked::multi_aff ma)8623 pw_multi_aff::pw_multi_aff(isl::checked::multi_aff ma)
8624 {
8625   auto res = isl_pw_multi_aff_from_multi_aff(ma.release());
8626   ptr = res;
8627 }
8628 
pw_multi_aff(isl::checked::pw_aff pa)8629 pw_multi_aff::pw_multi_aff(isl::checked::pw_aff pa)
8630 {
8631   auto res = isl_pw_multi_aff_from_pw_aff(pa.release());
8632   ptr = res;
8633 }
8634 
pw_multi_aff(isl::checked::ctx ctx,const std::string & str)8635 pw_multi_aff::pw_multi_aff(isl::checked::ctx ctx, const std::string &str)
8636 {
8637   auto res = isl_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
8638   ptr = res;
8639 }
8640 
8641 pw_multi_aff &pw_multi_aff::operator=(pw_multi_aff obj) {
8642   std::swap(this->ptr, obj.ptr);
8643   return *this;
8644 }
8645 
~pw_multi_aff()8646 pw_multi_aff::~pw_multi_aff() {
8647   if (ptr)
8648     isl_pw_multi_aff_free(ptr);
8649 }
8650 
copy()8651 __isl_give isl_pw_multi_aff *pw_multi_aff::copy() const & {
8652   return isl_pw_multi_aff_copy(ptr);
8653 }
8654 
get()8655 __isl_keep isl_pw_multi_aff *pw_multi_aff::get() const {
8656   return ptr;
8657 }
8658 
release()8659 __isl_give isl_pw_multi_aff *pw_multi_aff::release() {
8660   isl_pw_multi_aff *tmp = ptr;
8661   ptr = nullptr;
8662   return tmp;
8663 }
8664 
is_null()8665 bool pw_multi_aff::is_null() const {
8666   return ptr == nullptr;
8667 }
8668 
ctx()8669 isl::checked::ctx pw_multi_aff::ctx() const {
8670   return isl::checked::ctx(isl_pw_multi_aff_get_ctx(ptr));
8671 }
8672 
add(isl::checked::pw_multi_aff pma2)8673 isl::checked::pw_multi_aff pw_multi_aff::add(isl::checked::pw_multi_aff pma2) const
8674 {
8675   auto res = isl_pw_multi_aff_add(copy(), pma2.release());
8676   return manage(res);
8677 }
8678 
add_constant(isl::checked::multi_val mv)8679 isl::checked::pw_multi_aff pw_multi_aff::add_constant(isl::checked::multi_val mv) const
8680 {
8681   auto res = isl_pw_multi_aff_add_constant_multi_val(copy(), mv.release());
8682   return manage(res);
8683 }
8684 
add_constant(isl::checked::val v)8685 isl::checked::pw_multi_aff pw_multi_aff::add_constant(isl::checked::val v) const
8686 {
8687   auto res = isl_pw_multi_aff_add_constant_val(copy(), v.release());
8688   return manage(res);
8689 }
8690 
add_constant(long v)8691 isl::checked::pw_multi_aff pw_multi_aff::add_constant(long v) const
8692 {
8693   return this->add_constant(isl::checked::val(ctx(), v));
8694 }
8695 
as_multi_aff()8696 isl::checked::multi_aff pw_multi_aff::as_multi_aff() const
8697 {
8698   auto res = isl_pw_multi_aff_as_multi_aff(copy());
8699   return manage(res);
8700 }
8701 
bind_domain(isl::checked::multi_id tuple)8702 isl::checked::pw_multi_aff pw_multi_aff::bind_domain(isl::checked::multi_id tuple) const
8703 {
8704   auto res = isl_pw_multi_aff_bind_domain(copy(), tuple.release());
8705   return manage(res);
8706 }
8707 
bind_domain_wrapped_domain(isl::checked::multi_id tuple)8708 isl::checked::pw_multi_aff pw_multi_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
8709 {
8710   auto res = isl_pw_multi_aff_bind_domain_wrapped_domain(copy(), tuple.release());
8711   return manage(res);
8712 }
8713 
coalesce()8714 isl::checked::pw_multi_aff pw_multi_aff::coalesce() const
8715 {
8716   auto res = isl_pw_multi_aff_coalesce(copy());
8717   return manage(res);
8718 }
8719 
domain()8720 isl::checked::set pw_multi_aff::domain() const
8721 {
8722   auto res = isl_pw_multi_aff_domain(copy());
8723   return manage(res);
8724 }
8725 
domain_map(isl::checked::space space)8726 isl::checked::pw_multi_aff pw_multi_aff::domain_map(isl::checked::space space)
8727 {
8728   auto res = isl_pw_multi_aff_domain_map(space.release());
8729   return manage(res);
8730 }
8731 
flat_range_product(isl::checked::pw_multi_aff pma2)8732 isl::checked::pw_multi_aff pw_multi_aff::flat_range_product(isl::checked::pw_multi_aff pma2) const
8733 {
8734   auto res = isl_pw_multi_aff_flat_range_product(copy(), pma2.release());
8735   return manage(res);
8736 }
8737 
foreach_piece(const std::function<stat (isl::checked::set,isl::checked::multi_aff)> & fn)8738 stat pw_multi_aff::foreach_piece(const std::function<stat(isl::checked::set, isl::checked::multi_aff)> &fn) const
8739 {
8740   struct fn_data {
8741     std::function<stat(isl::checked::set, isl::checked::multi_aff)> func;
8742   } fn_data = { fn };
8743   auto fn_lambda = [](isl_set *arg_0, isl_multi_aff *arg_1, void *arg_2) -> isl_stat {
8744     auto *data = static_cast<struct fn_data *>(arg_2);
8745     auto ret = (data->func)(manage(arg_0), manage(arg_1));
8746     return ret.release();
8747   };
8748   auto res = isl_pw_multi_aff_foreach_piece(get(), fn_lambda, &fn_data);
8749   return manage(res);
8750 }
8751 
space()8752 isl::checked::space pw_multi_aff::space() const
8753 {
8754   auto res = isl_pw_multi_aff_get_space(get());
8755   return manage(res);
8756 }
8757 
get_space()8758 isl::checked::space pw_multi_aff::get_space() const
8759 {
8760   return space();
8761 }
8762 
gist(isl::checked::set set)8763 isl::checked::pw_multi_aff pw_multi_aff::gist(isl::checked::set set) const
8764 {
8765   auto res = isl_pw_multi_aff_gist(copy(), set.release());
8766   return manage(res);
8767 }
8768 
identity_on_domain(isl::checked::space space)8769 isl::checked::pw_multi_aff pw_multi_aff::identity_on_domain(isl::checked::space space)
8770 {
8771   auto res = isl_pw_multi_aff_identity_on_domain_space(space.release());
8772   return manage(res);
8773 }
8774 
insert_domain(isl::checked::space domain)8775 isl::checked::pw_multi_aff pw_multi_aff::insert_domain(isl::checked::space domain) const
8776 {
8777   auto res = isl_pw_multi_aff_insert_domain(copy(), domain.release());
8778   return manage(res);
8779 }
8780 
intersect_domain(isl::checked::set set)8781 isl::checked::pw_multi_aff pw_multi_aff::intersect_domain(isl::checked::set set) const
8782 {
8783   auto res = isl_pw_multi_aff_intersect_domain(copy(), set.release());
8784   return manage(res);
8785 }
8786 
intersect_params(isl::checked::set set)8787 isl::checked::pw_multi_aff pw_multi_aff::intersect_params(isl::checked::set set) const
8788 {
8789   auto res = isl_pw_multi_aff_intersect_params(copy(), set.release());
8790   return manage(res);
8791 }
8792 
involves_locals()8793 boolean pw_multi_aff::involves_locals() const
8794 {
8795   auto res = isl_pw_multi_aff_involves_locals(get());
8796   return manage(res);
8797 }
8798 
isa_multi_aff()8799 boolean pw_multi_aff::isa_multi_aff() const
8800 {
8801   auto res = isl_pw_multi_aff_isa_multi_aff(get());
8802   return manage(res);
8803 }
8804 
max_multi_val()8805 isl::checked::multi_val pw_multi_aff::max_multi_val() const
8806 {
8807   auto res = isl_pw_multi_aff_max_multi_val(copy());
8808   return manage(res);
8809 }
8810 
min_multi_val()8811 isl::checked::multi_val pw_multi_aff::min_multi_val() const
8812 {
8813   auto res = isl_pw_multi_aff_min_multi_val(copy());
8814   return manage(res);
8815 }
8816 
n_piece()8817 class size pw_multi_aff::n_piece() const
8818 {
8819   auto res = isl_pw_multi_aff_n_piece(get());
8820   return manage(res);
8821 }
8822 
preimage_domain_wrapped_domain(isl::checked::pw_multi_aff pma2)8823 isl::checked::pw_multi_aff pw_multi_aff::preimage_domain_wrapped_domain(isl::checked::pw_multi_aff pma2) const
8824 {
8825   auto res = isl_pw_multi_aff_preimage_domain_wrapped_domain_pw_multi_aff(copy(), pma2.release());
8826   return manage(res);
8827 }
8828 
product(isl::checked::pw_multi_aff pma2)8829 isl::checked::pw_multi_aff pw_multi_aff::product(isl::checked::pw_multi_aff pma2) const
8830 {
8831   auto res = isl_pw_multi_aff_product(copy(), pma2.release());
8832   return manage(res);
8833 }
8834 
pullback(isl::checked::multi_aff ma)8835 isl::checked::pw_multi_aff pw_multi_aff::pullback(isl::checked::multi_aff ma) const
8836 {
8837   auto res = isl_pw_multi_aff_pullback_multi_aff(copy(), ma.release());
8838   return manage(res);
8839 }
8840 
pullback(isl::checked::pw_multi_aff pma2)8841 isl::checked::pw_multi_aff pw_multi_aff::pullback(isl::checked::pw_multi_aff pma2) const
8842 {
8843   auto res = isl_pw_multi_aff_pullback_pw_multi_aff(copy(), pma2.release());
8844   return manage(res);
8845 }
8846 
range_factor_domain()8847 isl::checked::pw_multi_aff pw_multi_aff::range_factor_domain() const
8848 {
8849   auto res = isl_pw_multi_aff_range_factor_domain(copy());
8850   return manage(res);
8851 }
8852 
range_factor_range()8853 isl::checked::pw_multi_aff pw_multi_aff::range_factor_range() const
8854 {
8855   auto res = isl_pw_multi_aff_range_factor_range(copy());
8856   return manage(res);
8857 }
8858 
range_map(isl::checked::space space)8859 isl::checked::pw_multi_aff pw_multi_aff::range_map(isl::checked::space space)
8860 {
8861   auto res = isl_pw_multi_aff_range_map(space.release());
8862   return manage(res);
8863 }
8864 
range_product(isl::checked::pw_multi_aff pma2)8865 isl::checked::pw_multi_aff pw_multi_aff::range_product(isl::checked::pw_multi_aff pma2) const
8866 {
8867   auto res = isl_pw_multi_aff_range_product(copy(), pma2.release());
8868   return manage(res);
8869 }
8870 
scale(isl::checked::val v)8871 isl::checked::pw_multi_aff pw_multi_aff::scale(isl::checked::val v) const
8872 {
8873   auto res = isl_pw_multi_aff_scale_val(copy(), v.release());
8874   return manage(res);
8875 }
8876 
scale(long v)8877 isl::checked::pw_multi_aff pw_multi_aff::scale(long v) const
8878 {
8879   return this->scale(isl::checked::val(ctx(), v));
8880 }
8881 
scale_down(isl::checked::val v)8882 isl::checked::pw_multi_aff pw_multi_aff::scale_down(isl::checked::val v) const
8883 {
8884   auto res = isl_pw_multi_aff_scale_down_val(copy(), v.release());
8885   return manage(res);
8886 }
8887 
scale_down(long v)8888 isl::checked::pw_multi_aff pw_multi_aff::scale_down(long v) const
8889 {
8890   return this->scale_down(isl::checked::val(ctx(), v));
8891 }
8892 
sub(isl::checked::pw_multi_aff pma2)8893 isl::checked::pw_multi_aff pw_multi_aff::sub(isl::checked::pw_multi_aff pma2) const
8894 {
8895   auto res = isl_pw_multi_aff_sub(copy(), pma2.release());
8896   return manage(res);
8897 }
8898 
subtract_domain(isl::checked::set set)8899 isl::checked::pw_multi_aff pw_multi_aff::subtract_domain(isl::checked::set set) const
8900 {
8901   auto res = isl_pw_multi_aff_subtract_domain(copy(), set.release());
8902   return manage(res);
8903 }
8904 
union_add(isl::checked::pw_multi_aff pma2)8905 isl::checked::pw_multi_aff pw_multi_aff::union_add(isl::checked::pw_multi_aff pma2) const
8906 {
8907   auto res = isl_pw_multi_aff_union_add(copy(), pma2.release());
8908   return manage(res);
8909 }
8910 
zero(isl::checked::space space)8911 isl::checked::pw_multi_aff pw_multi_aff::zero(isl::checked::space space)
8912 {
8913   auto res = isl_pw_multi_aff_zero(space.release());
8914   return manage(res);
8915 }
8916 
8917 inline std::ostream &operator<<(std::ostream &os, const pw_multi_aff &obj)
8918 {
8919   char *str = isl_pw_multi_aff_to_str(obj.get());
8920   if (!str) {
8921     os.setstate(std::ios_base::badbit);
8922     return os;
8923   }
8924   os << str;
8925   free(str);
8926   return os;
8927 }
8928 
8929 // implementations for isl::pw_multi_aff_list
manage(__isl_take isl_pw_multi_aff_list * ptr)8930 pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr) {
8931   return pw_multi_aff_list(ptr);
8932 }
manage_copy(__isl_keep isl_pw_multi_aff_list * ptr)8933 pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr) {
8934   ptr = isl_pw_multi_aff_list_copy(ptr);
8935   return pw_multi_aff_list(ptr);
8936 }
8937 
pw_multi_aff_list()8938 pw_multi_aff_list::pw_multi_aff_list()
8939     : ptr(nullptr) {}
8940 
pw_multi_aff_list(const pw_multi_aff_list & obj)8941 pw_multi_aff_list::pw_multi_aff_list(const pw_multi_aff_list &obj)
8942     : ptr(nullptr)
8943 {
8944   ptr = obj.copy();
8945 }
8946 
pw_multi_aff_list(__isl_take isl_pw_multi_aff_list * ptr)8947 pw_multi_aff_list::pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr)
8948     : ptr(ptr) {}
8949 
pw_multi_aff_list(isl::checked::ctx ctx,int n)8950 pw_multi_aff_list::pw_multi_aff_list(isl::checked::ctx ctx, int n)
8951 {
8952   auto res = isl_pw_multi_aff_list_alloc(ctx.release(), n);
8953   ptr = res;
8954 }
8955 
pw_multi_aff_list(isl::checked::pw_multi_aff el)8956 pw_multi_aff_list::pw_multi_aff_list(isl::checked::pw_multi_aff el)
8957 {
8958   auto res = isl_pw_multi_aff_list_from_pw_multi_aff(el.release());
8959   ptr = res;
8960 }
8961 
8962 pw_multi_aff_list &pw_multi_aff_list::operator=(pw_multi_aff_list obj) {
8963   std::swap(this->ptr, obj.ptr);
8964   return *this;
8965 }
8966 
~pw_multi_aff_list()8967 pw_multi_aff_list::~pw_multi_aff_list() {
8968   if (ptr)
8969     isl_pw_multi_aff_list_free(ptr);
8970 }
8971 
copy()8972 __isl_give isl_pw_multi_aff_list *pw_multi_aff_list::copy() const & {
8973   return isl_pw_multi_aff_list_copy(ptr);
8974 }
8975 
get()8976 __isl_keep isl_pw_multi_aff_list *pw_multi_aff_list::get() const {
8977   return ptr;
8978 }
8979 
release()8980 __isl_give isl_pw_multi_aff_list *pw_multi_aff_list::release() {
8981   isl_pw_multi_aff_list *tmp = ptr;
8982   ptr = nullptr;
8983   return tmp;
8984 }
8985 
is_null()8986 bool pw_multi_aff_list::is_null() const {
8987   return ptr == nullptr;
8988 }
8989 
ctx()8990 isl::checked::ctx pw_multi_aff_list::ctx() const {
8991   return isl::checked::ctx(isl_pw_multi_aff_list_get_ctx(ptr));
8992 }
8993 
add(isl::checked::pw_multi_aff el)8994 isl::checked::pw_multi_aff_list pw_multi_aff_list::add(isl::checked::pw_multi_aff el) const
8995 {
8996   auto res = isl_pw_multi_aff_list_add(copy(), el.release());
8997   return manage(res);
8998 }
8999 
clear()9000 isl::checked::pw_multi_aff_list pw_multi_aff_list::clear() const
9001 {
9002   auto res = isl_pw_multi_aff_list_clear(copy());
9003   return manage(res);
9004 }
9005 
concat(isl::checked::pw_multi_aff_list list2)9006 isl::checked::pw_multi_aff_list pw_multi_aff_list::concat(isl::checked::pw_multi_aff_list list2) const
9007 {
9008   auto res = isl_pw_multi_aff_list_concat(copy(), list2.release());
9009   return manage(res);
9010 }
9011 
drop(unsigned int first,unsigned int n)9012 isl::checked::pw_multi_aff_list pw_multi_aff_list::drop(unsigned int first, unsigned int n) const
9013 {
9014   auto res = isl_pw_multi_aff_list_drop(copy(), first, n);
9015   return manage(res);
9016 }
9017 
foreach(const std::function<stat (isl::checked::pw_multi_aff)> & fn)9018 stat pw_multi_aff_list::foreach(const std::function<stat(isl::checked::pw_multi_aff)> &fn) const
9019 {
9020   struct fn_data {
9021     std::function<stat(isl::checked::pw_multi_aff)> func;
9022   } fn_data = { fn };
9023   auto fn_lambda = [](isl_pw_multi_aff *arg_0, void *arg_1) -> isl_stat {
9024     auto *data = static_cast<struct fn_data *>(arg_1);
9025     auto ret = (data->func)(manage(arg_0));
9026     return ret.release();
9027   };
9028   auto res = isl_pw_multi_aff_list_foreach(get(), fn_lambda, &fn_data);
9029   return manage(res);
9030 }
9031 
at(int index)9032 isl::checked::pw_multi_aff pw_multi_aff_list::at(int index) const
9033 {
9034   auto res = isl_pw_multi_aff_list_get_at(get(), index);
9035   return manage(res);
9036 }
9037 
get_at(int index)9038 isl::checked::pw_multi_aff pw_multi_aff_list::get_at(int index) const
9039 {
9040   return at(index);
9041 }
9042 
insert(unsigned int pos,isl::checked::pw_multi_aff el)9043 isl::checked::pw_multi_aff_list pw_multi_aff_list::insert(unsigned int pos, isl::checked::pw_multi_aff el) const
9044 {
9045   auto res = isl_pw_multi_aff_list_insert(copy(), pos, el.release());
9046   return manage(res);
9047 }
9048 
size()9049 class size pw_multi_aff_list::size() const
9050 {
9051   auto res = isl_pw_multi_aff_list_size(get());
9052   return manage(res);
9053 }
9054 
9055 inline std::ostream &operator<<(std::ostream &os, const pw_multi_aff_list &obj)
9056 {
9057   char *str = isl_pw_multi_aff_list_to_str(obj.get());
9058   if (!str) {
9059     os.setstate(std::ios_base::badbit);
9060     return os;
9061   }
9062   os << str;
9063   free(str);
9064   return os;
9065 }
9066 
9067 // implementations for isl::schedule
manage(__isl_take isl_schedule * ptr)9068 schedule manage(__isl_take isl_schedule *ptr) {
9069   return schedule(ptr);
9070 }
manage_copy(__isl_keep isl_schedule * ptr)9071 schedule manage_copy(__isl_keep isl_schedule *ptr) {
9072   ptr = isl_schedule_copy(ptr);
9073   return schedule(ptr);
9074 }
9075 
schedule()9076 schedule::schedule()
9077     : ptr(nullptr) {}
9078 
schedule(const schedule & obj)9079 schedule::schedule(const schedule &obj)
9080     : ptr(nullptr)
9081 {
9082   ptr = obj.copy();
9083 }
9084 
schedule(__isl_take isl_schedule * ptr)9085 schedule::schedule(__isl_take isl_schedule *ptr)
9086     : ptr(ptr) {}
9087 
schedule(isl::checked::ctx ctx,const std::string & str)9088 schedule::schedule(isl::checked::ctx ctx, const std::string &str)
9089 {
9090   auto res = isl_schedule_read_from_str(ctx.release(), str.c_str());
9091   ptr = res;
9092 }
9093 
9094 schedule &schedule::operator=(schedule obj) {
9095   std::swap(this->ptr, obj.ptr);
9096   return *this;
9097 }
9098 
~schedule()9099 schedule::~schedule() {
9100   if (ptr)
9101     isl_schedule_free(ptr);
9102 }
9103 
copy()9104 __isl_give isl_schedule *schedule::copy() const & {
9105   return isl_schedule_copy(ptr);
9106 }
9107 
get()9108 __isl_keep isl_schedule *schedule::get() const {
9109   return ptr;
9110 }
9111 
release()9112 __isl_give isl_schedule *schedule::release() {
9113   isl_schedule *tmp = ptr;
9114   ptr = nullptr;
9115   return tmp;
9116 }
9117 
is_null()9118 bool schedule::is_null() const {
9119   return ptr == nullptr;
9120 }
9121 
ctx()9122 isl::checked::ctx schedule::ctx() const {
9123   return isl::checked::ctx(isl_schedule_get_ctx(ptr));
9124 }
9125 
from_domain(isl::checked::union_set domain)9126 isl::checked::schedule schedule::from_domain(isl::checked::union_set domain)
9127 {
9128   auto res = isl_schedule_from_domain(domain.release());
9129   return manage(res);
9130 }
9131 
domain()9132 isl::checked::union_set schedule::domain() const
9133 {
9134   auto res = isl_schedule_get_domain(get());
9135   return manage(res);
9136 }
9137 
get_domain()9138 isl::checked::union_set schedule::get_domain() const
9139 {
9140   return domain();
9141 }
9142 
map()9143 isl::checked::union_map schedule::map() const
9144 {
9145   auto res = isl_schedule_get_map(get());
9146   return manage(res);
9147 }
9148 
get_map()9149 isl::checked::union_map schedule::get_map() const
9150 {
9151   return map();
9152 }
9153 
root()9154 isl::checked::schedule_node schedule::root() const
9155 {
9156   auto res = isl_schedule_get_root(get());
9157   return manage(res);
9158 }
9159 
get_root()9160 isl::checked::schedule_node schedule::get_root() const
9161 {
9162   return root();
9163 }
9164 
pullback(isl::checked::union_pw_multi_aff upma)9165 isl::checked::schedule schedule::pullback(isl::checked::union_pw_multi_aff upma) const
9166 {
9167   auto res = isl_schedule_pullback_union_pw_multi_aff(copy(), upma.release());
9168   return manage(res);
9169 }
9170 
9171 inline std::ostream &operator<<(std::ostream &os, const schedule &obj)
9172 {
9173   char *str = isl_schedule_to_str(obj.get());
9174   if (!str) {
9175     os.setstate(std::ios_base::badbit);
9176     return os;
9177   }
9178   os << str;
9179   free(str);
9180   return os;
9181 }
9182 
9183 // implementations for isl::schedule_constraints
manage(__isl_take isl_schedule_constraints * ptr)9184 schedule_constraints manage(__isl_take isl_schedule_constraints *ptr) {
9185   return schedule_constraints(ptr);
9186 }
manage_copy(__isl_keep isl_schedule_constraints * ptr)9187 schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr) {
9188   ptr = isl_schedule_constraints_copy(ptr);
9189   return schedule_constraints(ptr);
9190 }
9191 
schedule_constraints()9192 schedule_constraints::schedule_constraints()
9193     : ptr(nullptr) {}
9194 
schedule_constraints(const schedule_constraints & obj)9195 schedule_constraints::schedule_constraints(const schedule_constraints &obj)
9196     : ptr(nullptr)
9197 {
9198   ptr = obj.copy();
9199 }
9200 
schedule_constraints(__isl_take isl_schedule_constraints * ptr)9201 schedule_constraints::schedule_constraints(__isl_take isl_schedule_constraints *ptr)
9202     : ptr(ptr) {}
9203 
schedule_constraints(isl::checked::ctx ctx,const std::string & str)9204 schedule_constraints::schedule_constraints(isl::checked::ctx ctx, const std::string &str)
9205 {
9206   auto res = isl_schedule_constraints_read_from_str(ctx.release(), str.c_str());
9207   ptr = res;
9208 }
9209 
9210 schedule_constraints &schedule_constraints::operator=(schedule_constraints obj) {
9211   std::swap(this->ptr, obj.ptr);
9212   return *this;
9213 }
9214 
~schedule_constraints()9215 schedule_constraints::~schedule_constraints() {
9216   if (ptr)
9217     isl_schedule_constraints_free(ptr);
9218 }
9219 
copy()9220 __isl_give isl_schedule_constraints *schedule_constraints::copy() const & {
9221   return isl_schedule_constraints_copy(ptr);
9222 }
9223 
get()9224 __isl_keep isl_schedule_constraints *schedule_constraints::get() const {
9225   return ptr;
9226 }
9227 
release()9228 __isl_give isl_schedule_constraints *schedule_constraints::release() {
9229   isl_schedule_constraints *tmp = ptr;
9230   ptr = nullptr;
9231   return tmp;
9232 }
9233 
is_null()9234 bool schedule_constraints::is_null() const {
9235   return ptr == nullptr;
9236 }
9237 
ctx()9238 isl::checked::ctx schedule_constraints::ctx() const {
9239   return isl::checked::ctx(isl_schedule_constraints_get_ctx(ptr));
9240 }
9241 
compute_schedule()9242 isl::checked::schedule schedule_constraints::compute_schedule() const
9243 {
9244   auto res = isl_schedule_constraints_compute_schedule(copy());
9245   return manage(res);
9246 }
9247 
coincidence()9248 isl::checked::union_map schedule_constraints::coincidence() const
9249 {
9250   auto res = isl_schedule_constraints_get_coincidence(get());
9251   return manage(res);
9252 }
9253 
get_coincidence()9254 isl::checked::union_map schedule_constraints::get_coincidence() const
9255 {
9256   return coincidence();
9257 }
9258 
conditional_validity()9259 isl::checked::union_map schedule_constraints::conditional_validity() const
9260 {
9261   auto res = isl_schedule_constraints_get_conditional_validity(get());
9262   return manage(res);
9263 }
9264 
get_conditional_validity()9265 isl::checked::union_map schedule_constraints::get_conditional_validity() const
9266 {
9267   return conditional_validity();
9268 }
9269 
conditional_validity_condition()9270 isl::checked::union_map schedule_constraints::conditional_validity_condition() const
9271 {
9272   auto res = isl_schedule_constraints_get_conditional_validity_condition(get());
9273   return manage(res);
9274 }
9275 
get_conditional_validity_condition()9276 isl::checked::union_map schedule_constraints::get_conditional_validity_condition() const
9277 {
9278   return conditional_validity_condition();
9279 }
9280 
context()9281 isl::checked::set schedule_constraints::context() const
9282 {
9283   auto res = isl_schedule_constraints_get_context(get());
9284   return manage(res);
9285 }
9286 
get_context()9287 isl::checked::set schedule_constraints::get_context() const
9288 {
9289   return context();
9290 }
9291 
domain()9292 isl::checked::union_set schedule_constraints::domain() const
9293 {
9294   auto res = isl_schedule_constraints_get_domain(get());
9295   return manage(res);
9296 }
9297 
get_domain()9298 isl::checked::union_set schedule_constraints::get_domain() const
9299 {
9300   return domain();
9301 }
9302 
proximity()9303 isl::checked::union_map schedule_constraints::proximity() const
9304 {
9305   auto res = isl_schedule_constraints_get_proximity(get());
9306   return manage(res);
9307 }
9308 
get_proximity()9309 isl::checked::union_map schedule_constraints::get_proximity() const
9310 {
9311   return proximity();
9312 }
9313 
validity()9314 isl::checked::union_map schedule_constraints::validity() const
9315 {
9316   auto res = isl_schedule_constraints_get_validity(get());
9317   return manage(res);
9318 }
9319 
get_validity()9320 isl::checked::union_map schedule_constraints::get_validity() const
9321 {
9322   return validity();
9323 }
9324 
on_domain(isl::checked::union_set domain)9325 isl::checked::schedule_constraints schedule_constraints::on_domain(isl::checked::union_set domain)
9326 {
9327   auto res = isl_schedule_constraints_on_domain(domain.release());
9328   return manage(res);
9329 }
9330 
set_coincidence(isl::checked::union_map coincidence)9331 isl::checked::schedule_constraints schedule_constraints::set_coincidence(isl::checked::union_map coincidence) const
9332 {
9333   auto res = isl_schedule_constraints_set_coincidence(copy(), coincidence.release());
9334   return manage(res);
9335 }
9336 
set_conditional_validity(isl::checked::union_map condition,isl::checked::union_map validity)9337 isl::checked::schedule_constraints schedule_constraints::set_conditional_validity(isl::checked::union_map condition, isl::checked::union_map validity) const
9338 {
9339   auto res = isl_schedule_constraints_set_conditional_validity(copy(), condition.release(), validity.release());
9340   return manage(res);
9341 }
9342 
set_context(isl::checked::set context)9343 isl::checked::schedule_constraints schedule_constraints::set_context(isl::checked::set context) const
9344 {
9345   auto res = isl_schedule_constraints_set_context(copy(), context.release());
9346   return manage(res);
9347 }
9348 
set_proximity(isl::checked::union_map proximity)9349 isl::checked::schedule_constraints schedule_constraints::set_proximity(isl::checked::union_map proximity) const
9350 {
9351   auto res = isl_schedule_constraints_set_proximity(copy(), proximity.release());
9352   return manage(res);
9353 }
9354 
set_validity(isl::checked::union_map validity)9355 isl::checked::schedule_constraints schedule_constraints::set_validity(isl::checked::union_map validity) const
9356 {
9357   auto res = isl_schedule_constraints_set_validity(copy(), validity.release());
9358   return manage(res);
9359 }
9360 
9361 inline std::ostream &operator<<(std::ostream &os, const schedule_constraints &obj)
9362 {
9363   char *str = isl_schedule_constraints_to_str(obj.get());
9364   if (!str) {
9365     os.setstate(std::ios_base::badbit);
9366     return os;
9367   }
9368   os << str;
9369   free(str);
9370   return os;
9371 }
9372 
9373 // implementations for isl::schedule_node
manage(__isl_take isl_schedule_node * ptr)9374 schedule_node manage(__isl_take isl_schedule_node *ptr) {
9375   return schedule_node(ptr);
9376 }
manage_copy(__isl_keep isl_schedule_node * ptr)9377 schedule_node manage_copy(__isl_keep isl_schedule_node *ptr) {
9378   ptr = isl_schedule_node_copy(ptr);
9379   return schedule_node(ptr);
9380 }
9381 
schedule_node()9382 schedule_node::schedule_node()
9383     : ptr(nullptr) {}
9384 
schedule_node(const schedule_node & obj)9385 schedule_node::schedule_node(const schedule_node &obj)
9386     : ptr(nullptr)
9387 {
9388   ptr = obj.copy();
9389 }
9390 
schedule_node(__isl_take isl_schedule_node * ptr)9391 schedule_node::schedule_node(__isl_take isl_schedule_node *ptr)
9392     : ptr(ptr) {}
9393 
9394 schedule_node &schedule_node::operator=(schedule_node obj) {
9395   std::swap(this->ptr, obj.ptr);
9396   return *this;
9397 }
9398 
~schedule_node()9399 schedule_node::~schedule_node() {
9400   if (ptr)
9401     isl_schedule_node_free(ptr);
9402 }
9403 
copy()9404 __isl_give isl_schedule_node *schedule_node::copy() const & {
9405   return isl_schedule_node_copy(ptr);
9406 }
9407 
get()9408 __isl_keep isl_schedule_node *schedule_node::get() const {
9409   return ptr;
9410 }
9411 
release()9412 __isl_give isl_schedule_node *schedule_node::release() {
9413   isl_schedule_node *tmp = ptr;
9414   ptr = nullptr;
9415   return tmp;
9416 }
9417 
is_null()9418 bool schedule_node::is_null() const {
9419   return ptr == nullptr;
9420 }
9421 
9422 template <typename T, typename>
isa_type(T subtype)9423 boolean schedule_node::isa_type(T subtype) const
9424 {
9425   if (is_null())
9426     return boolean();
9427   return isl_schedule_node_get_type(get()) == subtype;
9428 }
9429 template <class T>
isa()9430 boolean schedule_node::isa() const
9431 {
9432   return isa_type<decltype(T::type)>(T::type);
9433 }
9434 template <class T>
as()9435 T schedule_node::as() const
9436 {
9437  if (isa<T>().is_false())
9438     isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
9439   return T(copy());
9440 }
9441 
ctx()9442 isl::checked::ctx schedule_node::ctx() const {
9443   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9444 }
9445 
ancestor(int generation)9446 isl::checked::schedule_node schedule_node::ancestor(int generation) const
9447 {
9448   auto res = isl_schedule_node_ancestor(copy(), generation);
9449   return manage(res);
9450 }
9451 
child(int pos)9452 isl::checked::schedule_node schedule_node::child(int pos) const
9453 {
9454   auto res = isl_schedule_node_child(copy(), pos);
9455   return manage(res);
9456 }
9457 
every_descendant(const std::function<boolean (isl::checked::schedule_node)> & test)9458 boolean schedule_node::every_descendant(const std::function<boolean(isl::checked::schedule_node)> &test) const
9459 {
9460   struct test_data {
9461     std::function<boolean(isl::checked::schedule_node)> func;
9462   } test_data = { test };
9463   auto test_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_bool {
9464     auto *data = static_cast<struct test_data *>(arg_1);
9465     auto ret = (data->func)(manage_copy(arg_0));
9466     return ret.release();
9467   };
9468   auto res = isl_schedule_node_every_descendant(get(), test_lambda, &test_data);
9469   return manage(res);
9470 }
9471 
first_child()9472 isl::checked::schedule_node schedule_node::first_child() const
9473 {
9474   auto res = isl_schedule_node_first_child(copy());
9475   return manage(res);
9476 }
9477 
foreach_ancestor_top_down(const std::function<stat (isl::checked::schedule_node)> & fn)9478 stat schedule_node::foreach_ancestor_top_down(const std::function<stat(isl::checked::schedule_node)> &fn) const
9479 {
9480   struct fn_data {
9481     std::function<stat(isl::checked::schedule_node)> func;
9482   } fn_data = { fn };
9483   auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_stat {
9484     auto *data = static_cast<struct fn_data *>(arg_1);
9485     auto ret = (data->func)(manage_copy(arg_0));
9486     return ret.release();
9487   };
9488   auto res = isl_schedule_node_foreach_ancestor_top_down(get(), fn_lambda, &fn_data);
9489   return manage(res);
9490 }
9491 
foreach_descendant_top_down(const std::function<boolean (isl::checked::schedule_node)> & fn)9492 stat schedule_node::foreach_descendant_top_down(const std::function<boolean(isl::checked::schedule_node)> &fn) const
9493 {
9494   struct fn_data {
9495     std::function<boolean(isl::checked::schedule_node)> func;
9496   } fn_data = { fn };
9497   auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_bool {
9498     auto *data = static_cast<struct fn_data *>(arg_1);
9499     auto ret = (data->func)(manage_copy(arg_0));
9500     return ret.release();
9501   };
9502   auto res = isl_schedule_node_foreach_descendant_top_down(get(), fn_lambda, &fn_data);
9503   return manage(res);
9504 }
9505 
from_domain(isl::checked::union_set domain)9506 isl::checked::schedule_node schedule_node::from_domain(isl::checked::union_set domain)
9507 {
9508   auto res = isl_schedule_node_from_domain(domain.release());
9509   return manage(res);
9510 }
9511 
from_extension(isl::checked::union_map extension)9512 isl::checked::schedule_node schedule_node::from_extension(isl::checked::union_map extension)
9513 {
9514   auto res = isl_schedule_node_from_extension(extension.release());
9515   return manage(res);
9516 }
9517 
ancestor_child_position(const isl::checked::schedule_node & ancestor)9518 class size schedule_node::ancestor_child_position(const isl::checked::schedule_node &ancestor) const
9519 {
9520   auto res = isl_schedule_node_get_ancestor_child_position(get(), ancestor.get());
9521   return manage(res);
9522 }
9523 
get_ancestor_child_position(const isl::checked::schedule_node & ancestor)9524 class size schedule_node::get_ancestor_child_position(const isl::checked::schedule_node &ancestor) const
9525 {
9526   return ancestor_child_position(ancestor);
9527 }
9528 
child_position()9529 class size schedule_node::child_position() const
9530 {
9531   auto res = isl_schedule_node_get_child_position(get());
9532   return manage(res);
9533 }
9534 
get_child_position()9535 class size schedule_node::get_child_position() const
9536 {
9537   return child_position();
9538 }
9539 
prefix_schedule_multi_union_pw_aff()9540 isl::checked::multi_union_pw_aff schedule_node::prefix_schedule_multi_union_pw_aff() const
9541 {
9542   auto res = isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(get());
9543   return manage(res);
9544 }
9545 
get_prefix_schedule_multi_union_pw_aff()9546 isl::checked::multi_union_pw_aff schedule_node::get_prefix_schedule_multi_union_pw_aff() const
9547 {
9548   return prefix_schedule_multi_union_pw_aff();
9549 }
9550 
prefix_schedule_union_map()9551 isl::checked::union_map schedule_node::prefix_schedule_union_map() const
9552 {
9553   auto res = isl_schedule_node_get_prefix_schedule_union_map(get());
9554   return manage(res);
9555 }
9556 
get_prefix_schedule_union_map()9557 isl::checked::union_map schedule_node::get_prefix_schedule_union_map() const
9558 {
9559   return prefix_schedule_union_map();
9560 }
9561 
prefix_schedule_union_pw_multi_aff()9562 isl::checked::union_pw_multi_aff schedule_node::prefix_schedule_union_pw_multi_aff() const
9563 {
9564   auto res = isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(get());
9565   return manage(res);
9566 }
9567 
get_prefix_schedule_union_pw_multi_aff()9568 isl::checked::union_pw_multi_aff schedule_node::get_prefix_schedule_union_pw_multi_aff() const
9569 {
9570   return prefix_schedule_union_pw_multi_aff();
9571 }
9572 
schedule()9573 isl::checked::schedule schedule_node::schedule() const
9574 {
9575   auto res = isl_schedule_node_get_schedule(get());
9576   return manage(res);
9577 }
9578 
get_schedule()9579 isl::checked::schedule schedule_node::get_schedule() const
9580 {
9581   return schedule();
9582 }
9583 
shared_ancestor(const isl::checked::schedule_node & node2)9584 isl::checked::schedule_node schedule_node::shared_ancestor(const isl::checked::schedule_node &node2) const
9585 {
9586   auto res = isl_schedule_node_get_shared_ancestor(get(), node2.get());
9587   return manage(res);
9588 }
9589 
get_shared_ancestor(const isl::checked::schedule_node & node2)9590 isl::checked::schedule_node schedule_node::get_shared_ancestor(const isl::checked::schedule_node &node2) const
9591 {
9592   return shared_ancestor(node2);
9593 }
9594 
tree_depth()9595 class size schedule_node::tree_depth() const
9596 {
9597   auto res = isl_schedule_node_get_tree_depth(get());
9598   return manage(res);
9599 }
9600 
get_tree_depth()9601 class size schedule_node::get_tree_depth() const
9602 {
9603   return tree_depth();
9604 }
9605 
graft_after(isl::checked::schedule_node graft)9606 isl::checked::schedule_node schedule_node::graft_after(isl::checked::schedule_node graft) const
9607 {
9608   auto res = isl_schedule_node_graft_after(copy(), graft.release());
9609   return manage(res);
9610 }
9611 
graft_before(isl::checked::schedule_node graft)9612 isl::checked::schedule_node schedule_node::graft_before(isl::checked::schedule_node graft) const
9613 {
9614   auto res = isl_schedule_node_graft_before(copy(), graft.release());
9615   return manage(res);
9616 }
9617 
has_children()9618 boolean schedule_node::has_children() const
9619 {
9620   auto res = isl_schedule_node_has_children(get());
9621   return manage(res);
9622 }
9623 
has_next_sibling()9624 boolean schedule_node::has_next_sibling() const
9625 {
9626   auto res = isl_schedule_node_has_next_sibling(get());
9627   return manage(res);
9628 }
9629 
has_parent()9630 boolean schedule_node::has_parent() const
9631 {
9632   auto res = isl_schedule_node_has_parent(get());
9633   return manage(res);
9634 }
9635 
has_previous_sibling()9636 boolean schedule_node::has_previous_sibling() const
9637 {
9638   auto res = isl_schedule_node_has_previous_sibling(get());
9639   return manage(res);
9640 }
9641 
insert_context(isl::checked::set context)9642 isl::checked::schedule_node schedule_node::insert_context(isl::checked::set context) const
9643 {
9644   auto res = isl_schedule_node_insert_context(copy(), context.release());
9645   return manage(res);
9646 }
9647 
insert_filter(isl::checked::union_set filter)9648 isl::checked::schedule_node schedule_node::insert_filter(isl::checked::union_set filter) const
9649 {
9650   auto res = isl_schedule_node_insert_filter(copy(), filter.release());
9651   return manage(res);
9652 }
9653 
insert_guard(isl::checked::set context)9654 isl::checked::schedule_node schedule_node::insert_guard(isl::checked::set context) const
9655 {
9656   auto res = isl_schedule_node_insert_guard(copy(), context.release());
9657   return manage(res);
9658 }
9659 
insert_mark(isl::checked::id mark)9660 isl::checked::schedule_node schedule_node::insert_mark(isl::checked::id mark) const
9661 {
9662   auto res = isl_schedule_node_insert_mark(copy(), mark.release());
9663   return manage(res);
9664 }
9665 
insert_mark(const std::string & mark)9666 isl::checked::schedule_node schedule_node::insert_mark(const std::string &mark) const
9667 {
9668   return this->insert_mark(isl::checked::id(ctx(), mark));
9669 }
9670 
insert_partial_schedule(isl::checked::multi_union_pw_aff schedule)9671 isl::checked::schedule_node schedule_node::insert_partial_schedule(isl::checked::multi_union_pw_aff schedule) const
9672 {
9673   auto res = isl_schedule_node_insert_partial_schedule(copy(), schedule.release());
9674   return manage(res);
9675 }
9676 
insert_sequence(isl::checked::union_set_list filters)9677 isl::checked::schedule_node schedule_node::insert_sequence(isl::checked::union_set_list filters) const
9678 {
9679   auto res = isl_schedule_node_insert_sequence(copy(), filters.release());
9680   return manage(res);
9681 }
9682 
insert_set(isl::checked::union_set_list filters)9683 isl::checked::schedule_node schedule_node::insert_set(isl::checked::union_set_list filters) const
9684 {
9685   auto res = isl_schedule_node_insert_set(copy(), filters.release());
9686   return manage(res);
9687 }
9688 
is_equal(const isl::checked::schedule_node & node2)9689 boolean schedule_node::is_equal(const isl::checked::schedule_node &node2) const
9690 {
9691   auto res = isl_schedule_node_is_equal(get(), node2.get());
9692   return manage(res);
9693 }
9694 
is_subtree_anchored()9695 boolean schedule_node::is_subtree_anchored() const
9696 {
9697   auto res = isl_schedule_node_is_subtree_anchored(get());
9698   return manage(res);
9699 }
9700 
map_descendant_bottom_up(const std::function<isl::checked::schedule_node (isl::checked::schedule_node)> & fn)9701 isl::checked::schedule_node schedule_node::map_descendant_bottom_up(const std::function<isl::checked::schedule_node(isl::checked::schedule_node)> &fn) const
9702 {
9703   struct fn_data {
9704     std::function<isl::checked::schedule_node(isl::checked::schedule_node)> func;
9705   } fn_data = { fn };
9706   auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_schedule_node * {
9707     auto *data = static_cast<struct fn_data *>(arg_1);
9708     auto ret = (data->func)(manage(arg_0));
9709     return ret.release();
9710   };
9711   auto res = isl_schedule_node_map_descendant_bottom_up(copy(), fn_lambda, &fn_data);
9712   return manage(res);
9713 }
9714 
n_children()9715 class size schedule_node::n_children() const
9716 {
9717   auto res = isl_schedule_node_n_children(get());
9718   return manage(res);
9719 }
9720 
next_sibling()9721 isl::checked::schedule_node schedule_node::next_sibling() const
9722 {
9723   auto res = isl_schedule_node_next_sibling(copy());
9724   return manage(res);
9725 }
9726 
order_after(isl::checked::union_set filter)9727 isl::checked::schedule_node schedule_node::order_after(isl::checked::union_set filter) const
9728 {
9729   auto res = isl_schedule_node_order_after(copy(), filter.release());
9730   return manage(res);
9731 }
9732 
order_before(isl::checked::union_set filter)9733 isl::checked::schedule_node schedule_node::order_before(isl::checked::union_set filter) const
9734 {
9735   auto res = isl_schedule_node_order_before(copy(), filter.release());
9736   return manage(res);
9737 }
9738 
parent()9739 isl::checked::schedule_node schedule_node::parent() const
9740 {
9741   auto res = isl_schedule_node_parent(copy());
9742   return manage(res);
9743 }
9744 
previous_sibling()9745 isl::checked::schedule_node schedule_node::previous_sibling() const
9746 {
9747   auto res = isl_schedule_node_previous_sibling(copy());
9748   return manage(res);
9749 }
9750 
root()9751 isl::checked::schedule_node schedule_node::root() const
9752 {
9753   auto res = isl_schedule_node_root(copy());
9754   return manage(res);
9755 }
9756 
9757 inline std::ostream &operator<<(std::ostream &os, const schedule_node &obj)
9758 {
9759   char *str = isl_schedule_node_to_str(obj.get());
9760   if (!str) {
9761     os.setstate(std::ios_base::badbit);
9762     return os;
9763   }
9764   os << str;
9765   free(str);
9766   return os;
9767 }
9768 
9769 // implementations for isl::schedule_node_band
schedule_node_band()9770 schedule_node_band::schedule_node_band()
9771     : schedule_node() {}
9772 
schedule_node_band(const schedule_node_band & obj)9773 schedule_node_band::schedule_node_band(const schedule_node_band &obj)
9774     : schedule_node(obj)
9775 {
9776 }
9777 
schedule_node_band(__isl_take isl_schedule_node * ptr)9778 schedule_node_band::schedule_node_band(__isl_take isl_schedule_node *ptr)
9779     : schedule_node(ptr) {}
9780 
9781 schedule_node_band &schedule_node_band::operator=(schedule_node_band obj) {
9782   std::swap(this->ptr, obj.ptr);
9783   return *this;
9784 }
9785 
ctx()9786 isl::checked::ctx schedule_node_band::ctx() const {
9787   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9788 }
9789 
ast_build_options()9790 isl::checked::union_set schedule_node_band::ast_build_options() const
9791 {
9792   auto res = isl_schedule_node_band_get_ast_build_options(get());
9793   return manage(res);
9794 }
9795 
get_ast_build_options()9796 isl::checked::union_set schedule_node_band::get_ast_build_options() const
9797 {
9798   return ast_build_options();
9799 }
9800 
ast_isolate_option()9801 isl::checked::set schedule_node_band::ast_isolate_option() const
9802 {
9803   auto res = isl_schedule_node_band_get_ast_isolate_option(get());
9804   return manage(res);
9805 }
9806 
get_ast_isolate_option()9807 isl::checked::set schedule_node_band::get_ast_isolate_option() const
9808 {
9809   return ast_isolate_option();
9810 }
9811 
partial_schedule()9812 isl::checked::multi_union_pw_aff schedule_node_band::partial_schedule() const
9813 {
9814   auto res = isl_schedule_node_band_get_partial_schedule(get());
9815   return manage(res);
9816 }
9817 
get_partial_schedule()9818 isl::checked::multi_union_pw_aff schedule_node_band::get_partial_schedule() const
9819 {
9820   return partial_schedule();
9821 }
9822 
permutable()9823 boolean schedule_node_band::permutable() const
9824 {
9825   auto res = isl_schedule_node_band_get_permutable(get());
9826   return manage(res);
9827 }
9828 
get_permutable()9829 boolean schedule_node_band::get_permutable() const
9830 {
9831   return permutable();
9832 }
9833 
member_get_coincident(int pos)9834 boolean schedule_node_band::member_get_coincident(int pos) const
9835 {
9836   auto res = isl_schedule_node_band_member_get_coincident(get(), pos);
9837   return manage(res);
9838 }
9839 
member_set_coincident(int pos,int coincident)9840 schedule_node_band schedule_node_band::member_set_coincident(int pos, int coincident) const
9841 {
9842   auto res = isl_schedule_node_band_member_set_coincident(copy(), pos, coincident);
9843   return manage(res).as<schedule_node_band>();
9844 }
9845 
mod(isl::checked::multi_val mv)9846 schedule_node_band schedule_node_band::mod(isl::checked::multi_val mv) const
9847 {
9848   auto res = isl_schedule_node_band_mod(copy(), mv.release());
9849   return manage(res).as<schedule_node_band>();
9850 }
9851 
n_member()9852 class size schedule_node_band::n_member() const
9853 {
9854   auto res = isl_schedule_node_band_n_member(get());
9855   return manage(res);
9856 }
9857 
scale(isl::checked::multi_val mv)9858 schedule_node_band schedule_node_band::scale(isl::checked::multi_val mv) const
9859 {
9860   auto res = isl_schedule_node_band_scale(copy(), mv.release());
9861   return manage(res).as<schedule_node_band>();
9862 }
9863 
scale_down(isl::checked::multi_val mv)9864 schedule_node_band schedule_node_band::scale_down(isl::checked::multi_val mv) const
9865 {
9866   auto res = isl_schedule_node_band_scale_down(copy(), mv.release());
9867   return manage(res).as<schedule_node_band>();
9868 }
9869 
set_ast_build_options(isl::checked::union_set options)9870 schedule_node_band schedule_node_band::set_ast_build_options(isl::checked::union_set options) const
9871 {
9872   auto res = isl_schedule_node_band_set_ast_build_options(copy(), options.release());
9873   return manage(res).as<schedule_node_band>();
9874 }
9875 
set_permutable(int permutable)9876 schedule_node_band schedule_node_band::set_permutable(int permutable) const
9877 {
9878   auto res = isl_schedule_node_band_set_permutable(copy(), permutable);
9879   return manage(res).as<schedule_node_band>();
9880 }
9881 
shift(isl::checked::multi_union_pw_aff shift)9882 schedule_node_band schedule_node_band::shift(isl::checked::multi_union_pw_aff shift) const
9883 {
9884   auto res = isl_schedule_node_band_shift(copy(), shift.release());
9885   return manage(res).as<schedule_node_band>();
9886 }
9887 
split(int pos)9888 schedule_node_band schedule_node_band::split(int pos) const
9889 {
9890   auto res = isl_schedule_node_band_split(copy(), pos);
9891   return manage(res).as<schedule_node_band>();
9892 }
9893 
tile(isl::checked::multi_val sizes)9894 schedule_node_band schedule_node_band::tile(isl::checked::multi_val sizes) const
9895 {
9896   auto res = isl_schedule_node_band_tile(copy(), sizes.release());
9897   return manage(res).as<schedule_node_band>();
9898 }
9899 
member_set_ast_loop_default(int pos)9900 schedule_node_band schedule_node_band::member_set_ast_loop_default(int pos) const
9901 {
9902   auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_default);
9903   return manage(res).as<schedule_node_band>();
9904 }
9905 
member_set_ast_loop_atomic(int pos)9906 schedule_node_band schedule_node_band::member_set_ast_loop_atomic(int pos) const
9907 {
9908   auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_atomic);
9909   return manage(res).as<schedule_node_band>();
9910 }
9911 
member_set_ast_loop_unroll(int pos)9912 schedule_node_band schedule_node_band::member_set_ast_loop_unroll(int pos) const
9913 {
9914   auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_unroll);
9915   return manage(res).as<schedule_node_band>();
9916 }
9917 
member_set_ast_loop_separate(int pos)9918 schedule_node_band schedule_node_band::member_set_ast_loop_separate(int pos) const
9919 {
9920   auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_separate);
9921   return manage(res).as<schedule_node_band>();
9922 }
9923 
9924 inline std::ostream &operator<<(std::ostream &os, const schedule_node_band &obj)
9925 {
9926   char *str = isl_schedule_node_to_str(obj.get());
9927   if (!str) {
9928     os.setstate(std::ios_base::badbit);
9929     return os;
9930   }
9931   os << str;
9932   free(str);
9933   return os;
9934 }
9935 
9936 // implementations for isl::schedule_node_context
schedule_node_context()9937 schedule_node_context::schedule_node_context()
9938     : schedule_node() {}
9939 
schedule_node_context(const schedule_node_context & obj)9940 schedule_node_context::schedule_node_context(const schedule_node_context &obj)
9941     : schedule_node(obj)
9942 {
9943 }
9944 
schedule_node_context(__isl_take isl_schedule_node * ptr)9945 schedule_node_context::schedule_node_context(__isl_take isl_schedule_node *ptr)
9946     : schedule_node(ptr) {}
9947 
9948 schedule_node_context &schedule_node_context::operator=(schedule_node_context obj) {
9949   std::swap(this->ptr, obj.ptr);
9950   return *this;
9951 }
9952 
ctx()9953 isl::checked::ctx schedule_node_context::ctx() const {
9954   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9955 }
9956 
context()9957 isl::checked::set schedule_node_context::context() const
9958 {
9959   auto res = isl_schedule_node_context_get_context(get());
9960   return manage(res);
9961 }
9962 
get_context()9963 isl::checked::set schedule_node_context::get_context() const
9964 {
9965   return context();
9966 }
9967 
9968 inline std::ostream &operator<<(std::ostream &os, const schedule_node_context &obj)
9969 {
9970   char *str = isl_schedule_node_to_str(obj.get());
9971   if (!str) {
9972     os.setstate(std::ios_base::badbit);
9973     return os;
9974   }
9975   os << str;
9976   free(str);
9977   return os;
9978 }
9979 
9980 // implementations for isl::schedule_node_domain
schedule_node_domain()9981 schedule_node_domain::schedule_node_domain()
9982     : schedule_node() {}
9983 
schedule_node_domain(const schedule_node_domain & obj)9984 schedule_node_domain::schedule_node_domain(const schedule_node_domain &obj)
9985     : schedule_node(obj)
9986 {
9987 }
9988 
schedule_node_domain(__isl_take isl_schedule_node * ptr)9989 schedule_node_domain::schedule_node_domain(__isl_take isl_schedule_node *ptr)
9990     : schedule_node(ptr) {}
9991 
9992 schedule_node_domain &schedule_node_domain::operator=(schedule_node_domain obj) {
9993   std::swap(this->ptr, obj.ptr);
9994   return *this;
9995 }
9996 
ctx()9997 isl::checked::ctx schedule_node_domain::ctx() const {
9998   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9999 }
10000 
domain()10001 isl::checked::union_set schedule_node_domain::domain() const
10002 {
10003   auto res = isl_schedule_node_domain_get_domain(get());
10004   return manage(res);
10005 }
10006 
get_domain()10007 isl::checked::union_set schedule_node_domain::get_domain() const
10008 {
10009   return domain();
10010 }
10011 
10012 inline std::ostream &operator<<(std::ostream &os, const schedule_node_domain &obj)
10013 {
10014   char *str = isl_schedule_node_to_str(obj.get());
10015   if (!str) {
10016     os.setstate(std::ios_base::badbit);
10017     return os;
10018   }
10019   os << str;
10020   free(str);
10021   return os;
10022 }
10023 
10024 // implementations for isl::schedule_node_expansion
schedule_node_expansion()10025 schedule_node_expansion::schedule_node_expansion()
10026     : schedule_node() {}
10027 
schedule_node_expansion(const schedule_node_expansion & obj)10028 schedule_node_expansion::schedule_node_expansion(const schedule_node_expansion &obj)
10029     : schedule_node(obj)
10030 {
10031 }
10032 
schedule_node_expansion(__isl_take isl_schedule_node * ptr)10033 schedule_node_expansion::schedule_node_expansion(__isl_take isl_schedule_node *ptr)
10034     : schedule_node(ptr) {}
10035 
10036 schedule_node_expansion &schedule_node_expansion::operator=(schedule_node_expansion obj) {
10037   std::swap(this->ptr, obj.ptr);
10038   return *this;
10039 }
10040 
ctx()10041 isl::checked::ctx schedule_node_expansion::ctx() const {
10042   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10043 }
10044 
contraction()10045 isl::checked::union_pw_multi_aff schedule_node_expansion::contraction() const
10046 {
10047   auto res = isl_schedule_node_expansion_get_contraction(get());
10048   return manage(res);
10049 }
10050 
get_contraction()10051 isl::checked::union_pw_multi_aff schedule_node_expansion::get_contraction() const
10052 {
10053   return contraction();
10054 }
10055 
expansion()10056 isl::checked::union_map schedule_node_expansion::expansion() const
10057 {
10058   auto res = isl_schedule_node_expansion_get_expansion(get());
10059   return manage(res);
10060 }
10061 
get_expansion()10062 isl::checked::union_map schedule_node_expansion::get_expansion() const
10063 {
10064   return expansion();
10065 }
10066 
10067 inline std::ostream &operator<<(std::ostream &os, const schedule_node_expansion &obj)
10068 {
10069   char *str = isl_schedule_node_to_str(obj.get());
10070   if (!str) {
10071     os.setstate(std::ios_base::badbit);
10072     return os;
10073   }
10074   os << str;
10075   free(str);
10076   return os;
10077 }
10078 
10079 // implementations for isl::schedule_node_extension
schedule_node_extension()10080 schedule_node_extension::schedule_node_extension()
10081     : schedule_node() {}
10082 
schedule_node_extension(const schedule_node_extension & obj)10083 schedule_node_extension::schedule_node_extension(const schedule_node_extension &obj)
10084     : schedule_node(obj)
10085 {
10086 }
10087 
schedule_node_extension(__isl_take isl_schedule_node * ptr)10088 schedule_node_extension::schedule_node_extension(__isl_take isl_schedule_node *ptr)
10089     : schedule_node(ptr) {}
10090 
10091 schedule_node_extension &schedule_node_extension::operator=(schedule_node_extension obj) {
10092   std::swap(this->ptr, obj.ptr);
10093   return *this;
10094 }
10095 
ctx()10096 isl::checked::ctx schedule_node_extension::ctx() const {
10097   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10098 }
10099 
extension()10100 isl::checked::union_map schedule_node_extension::extension() const
10101 {
10102   auto res = isl_schedule_node_extension_get_extension(get());
10103   return manage(res);
10104 }
10105 
get_extension()10106 isl::checked::union_map schedule_node_extension::get_extension() const
10107 {
10108   return extension();
10109 }
10110 
10111 inline std::ostream &operator<<(std::ostream &os, const schedule_node_extension &obj)
10112 {
10113   char *str = isl_schedule_node_to_str(obj.get());
10114   if (!str) {
10115     os.setstate(std::ios_base::badbit);
10116     return os;
10117   }
10118   os << str;
10119   free(str);
10120   return os;
10121 }
10122 
10123 // implementations for isl::schedule_node_filter
schedule_node_filter()10124 schedule_node_filter::schedule_node_filter()
10125     : schedule_node() {}
10126 
schedule_node_filter(const schedule_node_filter & obj)10127 schedule_node_filter::schedule_node_filter(const schedule_node_filter &obj)
10128     : schedule_node(obj)
10129 {
10130 }
10131 
schedule_node_filter(__isl_take isl_schedule_node * ptr)10132 schedule_node_filter::schedule_node_filter(__isl_take isl_schedule_node *ptr)
10133     : schedule_node(ptr) {}
10134 
10135 schedule_node_filter &schedule_node_filter::operator=(schedule_node_filter obj) {
10136   std::swap(this->ptr, obj.ptr);
10137   return *this;
10138 }
10139 
ctx()10140 isl::checked::ctx schedule_node_filter::ctx() const {
10141   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10142 }
10143 
filter()10144 isl::checked::union_set schedule_node_filter::filter() const
10145 {
10146   auto res = isl_schedule_node_filter_get_filter(get());
10147   return manage(res);
10148 }
10149 
get_filter()10150 isl::checked::union_set schedule_node_filter::get_filter() const
10151 {
10152   return filter();
10153 }
10154 
10155 inline std::ostream &operator<<(std::ostream &os, const schedule_node_filter &obj)
10156 {
10157   char *str = isl_schedule_node_to_str(obj.get());
10158   if (!str) {
10159     os.setstate(std::ios_base::badbit);
10160     return os;
10161   }
10162   os << str;
10163   free(str);
10164   return os;
10165 }
10166 
10167 // implementations for isl::schedule_node_guard
schedule_node_guard()10168 schedule_node_guard::schedule_node_guard()
10169     : schedule_node() {}
10170 
schedule_node_guard(const schedule_node_guard & obj)10171 schedule_node_guard::schedule_node_guard(const schedule_node_guard &obj)
10172     : schedule_node(obj)
10173 {
10174 }
10175 
schedule_node_guard(__isl_take isl_schedule_node * ptr)10176 schedule_node_guard::schedule_node_guard(__isl_take isl_schedule_node *ptr)
10177     : schedule_node(ptr) {}
10178 
10179 schedule_node_guard &schedule_node_guard::operator=(schedule_node_guard obj) {
10180   std::swap(this->ptr, obj.ptr);
10181   return *this;
10182 }
10183 
ctx()10184 isl::checked::ctx schedule_node_guard::ctx() const {
10185   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10186 }
10187 
guard()10188 isl::checked::set schedule_node_guard::guard() const
10189 {
10190   auto res = isl_schedule_node_guard_get_guard(get());
10191   return manage(res);
10192 }
10193 
get_guard()10194 isl::checked::set schedule_node_guard::get_guard() const
10195 {
10196   return guard();
10197 }
10198 
10199 inline std::ostream &operator<<(std::ostream &os, const schedule_node_guard &obj)
10200 {
10201   char *str = isl_schedule_node_to_str(obj.get());
10202   if (!str) {
10203     os.setstate(std::ios_base::badbit);
10204     return os;
10205   }
10206   os << str;
10207   free(str);
10208   return os;
10209 }
10210 
10211 // implementations for isl::schedule_node_leaf
schedule_node_leaf()10212 schedule_node_leaf::schedule_node_leaf()
10213     : schedule_node() {}
10214 
schedule_node_leaf(const schedule_node_leaf & obj)10215 schedule_node_leaf::schedule_node_leaf(const schedule_node_leaf &obj)
10216     : schedule_node(obj)
10217 {
10218 }
10219 
schedule_node_leaf(__isl_take isl_schedule_node * ptr)10220 schedule_node_leaf::schedule_node_leaf(__isl_take isl_schedule_node *ptr)
10221     : schedule_node(ptr) {}
10222 
10223 schedule_node_leaf &schedule_node_leaf::operator=(schedule_node_leaf obj) {
10224   std::swap(this->ptr, obj.ptr);
10225   return *this;
10226 }
10227 
ctx()10228 isl::checked::ctx schedule_node_leaf::ctx() const {
10229   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10230 }
10231 
10232 inline std::ostream &operator<<(std::ostream &os, const schedule_node_leaf &obj)
10233 {
10234   char *str = isl_schedule_node_to_str(obj.get());
10235   if (!str) {
10236     os.setstate(std::ios_base::badbit);
10237     return os;
10238   }
10239   os << str;
10240   free(str);
10241   return os;
10242 }
10243 
10244 // implementations for isl::schedule_node_mark
schedule_node_mark()10245 schedule_node_mark::schedule_node_mark()
10246     : schedule_node() {}
10247 
schedule_node_mark(const schedule_node_mark & obj)10248 schedule_node_mark::schedule_node_mark(const schedule_node_mark &obj)
10249     : schedule_node(obj)
10250 {
10251 }
10252 
schedule_node_mark(__isl_take isl_schedule_node * ptr)10253 schedule_node_mark::schedule_node_mark(__isl_take isl_schedule_node *ptr)
10254     : schedule_node(ptr) {}
10255 
10256 schedule_node_mark &schedule_node_mark::operator=(schedule_node_mark obj) {
10257   std::swap(this->ptr, obj.ptr);
10258   return *this;
10259 }
10260 
ctx()10261 isl::checked::ctx schedule_node_mark::ctx() const {
10262   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10263 }
10264 
10265 inline std::ostream &operator<<(std::ostream &os, const schedule_node_mark &obj)
10266 {
10267   char *str = isl_schedule_node_to_str(obj.get());
10268   if (!str) {
10269     os.setstate(std::ios_base::badbit);
10270     return os;
10271   }
10272   os << str;
10273   free(str);
10274   return os;
10275 }
10276 
10277 // implementations for isl::schedule_node_sequence
schedule_node_sequence()10278 schedule_node_sequence::schedule_node_sequence()
10279     : schedule_node() {}
10280 
schedule_node_sequence(const schedule_node_sequence & obj)10281 schedule_node_sequence::schedule_node_sequence(const schedule_node_sequence &obj)
10282     : schedule_node(obj)
10283 {
10284 }
10285 
schedule_node_sequence(__isl_take isl_schedule_node * ptr)10286 schedule_node_sequence::schedule_node_sequence(__isl_take isl_schedule_node *ptr)
10287     : schedule_node(ptr) {}
10288 
10289 schedule_node_sequence &schedule_node_sequence::operator=(schedule_node_sequence obj) {
10290   std::swap(this->ptr, obj.ptr);
10291   return *this;
10292 }
10293 
ctx()10294 isl::checked::ctx schedule_node_sequence::ctx() const {
10295   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10296 }
10297 
10298 inline std::ostream &operator<<(std::ostream &os, const schedule_node_sequence &obj)
10299 {
10300   char *str = isl_schedule_node_to_str(obj.get());
10301   if (!str) {
10302     os.setstate(std::ios_base::badbit);
10303     return os;
10304   }
10305   os << str;
10306   free(str);
10307   return os;
10308 }
10309 
10310 // implementations for isl::schedule_node_set
schedule_node_set()10311 schedule_node_set::schedule_node_set()
10312     : schedule_node() {}
10313 
schedule_node_set(const schedule_node_set & obj)10314 schedule_node_set::schedule_node_set(const schedule_node_set &obj)
10315     : schedule_node(obj)
10316 {
10317 }
10318 
schedule_node_set(__isl_take isl_schedule_node * ptr)10319 schedule_node_set::schedule_node_set(__isl_take isl_schedule_node *ptr)
10320     : schedule_node(ptr) {}
10321 
10322 schedule_node_set &schedule_node_set::operator=(schedule_node_set obj) {
10323   std::swap(this->ptr, obj.ptr);
10324   return *this;
10325 }
10326 
ctx()10327 isl::checked::ctx schedule_node_set::ctx() const {
10328   return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10329 }
10330 
10331 inline std::ostream &operator<<(std::ostream &os, const schedule_node_set &obj)
10332 {
10333   char *str = isl_schedule_node_to_str(obj.get());
10334   if (!str) {
10335     os.setstate(std::ios_base::badbit);
10336     return os;
10337   }
10338   os << str;
10339   free(str);
10340   return os;
10341 }
10342 
10343 // implementations for isl::set
manage(__isl_take isl_set * ptr)10344 set manage(__isl_take isl_set *ptr) {
10345   return set(ptr);
10346 }
manage_copy(__isl_keep isl_set * ptr)10347 set manage_copy(__isl_keep isl_set *ptr) {
10348   ptr = isl_set_copy(ptr);
10349   return set(ptr);
10350 }
10351 
set()10352 set::set()
10353     : ptr(nullptr) {}
10354 
set(const set & obj)10355 set::set(const set &obj)
10356     : ptr(nullptr)
10357 {
10358   ptr = obj.copy();
10359 }
10360 
set(__isl_take isl_set * ptr)10361 set::set(__isl_take isl_set *ptr)
10362     : ptr(ptr) {}
10363 
set(isl::checked::basic_set bset)10364 set::set(isl::checked::basic_set bset)
10365 {
10366   auto res = isl_set_from_basic_set(bset.release());
10367   ptr = res;
10368 }
10369 
set(isl::checked::point pnt)10370 set::set(isl::checked::point pnt)
10371 {
10372   auto res = isl_set_from_point(pnt.release());
10373   ptr = res;
10374 }
10375 
set(isl::checked::ctx ctx,const std::string & str)10376 set::set(isl::checked::ctx ctx, const std::string &str)
10377 {
10378   auto res = isl_set_read_from_str(ctx.release(), str.c_str());
10379   ptr = res;
10380 }
10381 
10382 set &set::operator=(set obj) {
10383   std::swap(this->ptr, obj.ptr);
10384   return *this;
10385 }
10386 
~set()10387 set::~set() {
10388   if (ptr)
10389     isl_set_free(ptr);
10390 }
10391 
copy()10392 __isl_give isl_set *set::copy() const & {
10393   return isl_set_copy(ptr);
10394 }
10395 
get()10396 __isl_keep isl_set *set::get() const {
10397   return ptr;
10398 }
10399 
release()10400 __isl_give isl_set *set::release() {
10401   isl_set *tmp = ptr;
10402   ptr = nullptr;
10403   return tmp;
10404 }
10405 
is_null()10406 bool set::is_null() const {
10407   return ptr == nullptr;
10408 }
10409 
ctx()10410 isl::checked::ctx set::ctx() const {
10411   return isl::checked::ctx(isl_set_get_ctx(ptr));
10412 }
10413 
affine_hull()10414 isl::checked::basic_set set::affine_hull() const
10415 {
10416   auto res = isl_set_affine_hull(copy());
10417   return manage(res);
10418 }
10419 
apply(isl::checked::map map)10420 isl::checked::set set::apply(isl::checked::map map) const
10421 {
10422   auto res = isl_set_apply(copy(), map.release());
10423   return manage(res);
10424 }
10425 
bind(isl::checked::multi_id tuple)10426 isl::checked::set set::bind(isl::checked::multi_id tuple) const
10427 {
10428   auto res = isl_set_bind(copy(), tuple.release());
10429   return manage(res);
10430 }
10431 
coalesce()10432 isl::checked::set set::coalesce() const
10433 {
10434   auto res = isl_set_coalesce(copy());
10435   return manage(res);
10436 }
10437 
complement()10438 isl::checked::set set::complement() const
10439 {
10440   auto res = isl_set_complement(copy());
10441   return manage(res);
10442 }
10443 
detect_equalities()10444 isl::checked::set set::detect_equalities() const
10445 {
10446   auto res = isl_set_detect_equalities(copy());
10447   return manage(res);
10448 }
10449 
dim_max_val(int pos)10450 isl::checked::val set::dim_max_val(int pos) const
10451 {
10452   auto res = isl_set_dim_max_val(copy(), pos);
10453   return manage(res);
10454 }
10455 
dim_min_val(int pos)10456 isl::checked::val set::dim_min_val(int pos) const
10457 {
10458   auto res = isl_set_dim_min_val(copy(), pos);
10459   return manage(res);
10460 }
10461 
empty(isl::checked::space space)10462 isl::checked::set set::empty(isl::checked::space space)
10463 {
10464   auto res = isl_set_empty(space.release());
10465   return manage(res);
10466 }
10467 
flatten()10468 isl::checked::set set::flatten() const
10469 {
10470   auto res = isl_set_flatten(copy());
10471   return manage(res);
10472 }
10473 
foreach_basic_set(const std::function<stat (isl::checked::basic_set)> & fn)10474 stat set::foreach_basic_set(const std::function<stat(isl::checked::basic_set)> &fn) const
10475 {
10476   struct fn_data {
10477     std::function<stat(isl::checked::basic_set)> func;
10478   } fn_data = { fn };
10479   auto fn_lambda = [](isl_basic_set *arg_0, void *arg_1) -> isl_stat {
10480     auto *data = static_cast<struct fn_data *>(arg_1);
10481     auto ret = (data->func)(manage(arg_0));
10482     return ret.release();
10483   };
10484   auto res = isl_set_foreach_basic_set(get(), fn_lambda, &fn_data);
10485   return manage(res);
10486 }
10487 
foreach_point(const std::function<stat (isl::checked::point)> & fn)10488 stat set::foreach_point(const std::function<stat(isl::checked::point)> &fn) const
10489 {
10490   struct fn_data {
10491     std::function<stat(isl::checked::point)> func;
10492   } fn_data = { fn };
10493   auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
10494     auto *data = static_cast<struct fn_data *>(arg_1);
10495     auto ret = (data->func)(manage(arg_0));
10496     return ret.release();
10497   };
10498   auto res = isl_set_foreach_point(get(), fn_lambda, &fn_data);
10499   return manage(res);
10500 }
10501 
plain_multi_val_if_fixed()10502 isl::checked::multi_val set::plain_multi_val_if_fixed() const
10503 {
10504   auto res = isl_set_get_plain_multi_val_if_fixed(get());
10505   return manage(res);
10506 }
10507 
get_plain_multi_val_if_fixed()10508 isl::checked::multi_val set::get_plain_multi_val_if_fixed() const
10509 {
10510   return plain_multi_val_if_fixed();
10511 }
10512 
simple_fixed_box_hull()10513 isl::checked::fixed_box set::simple_fixed_box_hull() const
10514 {
10515   auto res = isl_set_get_simple_fixed_box_hull(get());
10516   return manage(res);
10517 }
10518 
get_simple_fixed_box_hull()10519 isl::checked::fixed_box set::get_simple_fixed_box_hull() const
10520 {
10521   return simple_fixed_box_hull();
10522 }
10523 
space()10524 isl::checked::space set::space() const
10525 {
10526   auto res = isl_set_get_space(get());
10527   return manage(res);
10528 }
10529 
get_space()10530 isl::checked::space set::get_space() const
10531 {
10532   return space();
10533 }
10534 
stride(int pos)10535 isl::checked::val set::stride(int pos) const
10536 {
10537   auto res = isl_set_get_stride(get(), pos);
10538   return manage(res);
10539 }
10540 
get_stride(int pos)10541 isl::checked::val set::get_stride(int pos) const
10542 {
10543   return stride(pos);
10544 }
10545 
gist(isl::checked::set context)10546 isl::checked::set set::gist(isl::checked::set context) const
10547 {
10548   auto res = isl_set_gist(copy(), context.release());
10549   return manage(res);
10550 }
10551 
identity()10552 isl::checked::map set::identity() const
10553 {
10554   auto res = isl_set_identity(copy());
10555   return manage(res);
10556 }
10557 
indicator_function()10558 isl::checked::pw_aff set::indicator_function() const
10559 {
10560   auto res = isl_set_indicator_function(copy());
10561   return manage(res);
10562 }
10563 
insert_domain(isl::checked::space domain)10564 isl::checked::map set::insert_domain(isl::checked::space domain) const
10565 {
10566   auto res = isl_set_insert_domain(copy(), domain.release());
10567   return manage(res);
10568 }
10569 
intersect(isl::checked::set set2)10570 isl::checked::set set::intersect(isl::checked::set set2) const
10571 {
10572   auto res = isl_set_intersect(copy(), set2.release());
10573   return manage(res);
10574 }
10575 
intersect_params(isl::checked::set params)10576 isl::checked::set set::intersect_params(isl::checked::set params) const
10577 {
10578   auto res = isl_set_intersect_params(copy(), params.release());
10579   return manage(res);
10580 }
10581 
involves_locals()10582 boolean set::involves_locals() const
10583 {
10584   auto res = isl_set_involves_locals(get());
10585   return manage(res);
10586 }
10587 
is_disjoint(const isl::checked::set & set2)10588 boolean set::is_disjoint(const isl::checked::set &set2) const
10589 {
10590   auto res = isl_set_is_disjoint(get(), set2.get());
10591   return manage(res);
10592 }
10593 
is_empty()10594 boolean set::is_empty() const
10595 {
10596   auto res = isl_set_is_empty(get());
10597   return manage(res);
10598 }
10599 
is_equal(const isl::checked::set & set2)10600 boolean set::is_equal(const isl::checked::set &set2) const
10601 {
10602   auto res = isl_set_is_equal(get(), set2.get());
10603   return manage(res);
10604 }
10605 
is_singleton()10606 boolean set::is_singleton() const
10607 {
10608   auto res = isl_set_is_singleton(get());
10609   return manage(res);
10610 }
10611 
is_strict_subset(const isl::checked::set & set2)10612 boolean set::is_strict_subset(const isl::checked::set &set2) const
10613 {
10614   auto res = isl_set_is_strict_subset(get(), set2.get());
10615   return manage(res);
10616 }
10617 
is_subset(const isl::checked::set & set2)10618 boolean set::is_subset(const isl::checked::set &set2) const
10619 {
10620   auto res = isl_set_is_subset(get(), set2.get());
10621   return manage(res);
10622 }
10623 
is_wrapping()10624 boolean set::is_wrapping() const
10625 {
10626   auto res = isl_set_is_wrapping(get());
10627   return manage(res);
10628 }
10629 
lexmax()10630 isl::checked::set set::lexmax() const
10631 {
10632   auto res = isl_set_lexmax(copy());
10633   return manage(res);
10634 }
10635 
lexmax_pw_multi_aff()10636 isl::checked::pw_multi_aff set::lexmax_pw_multi_aff() const
10637 {
10638   auto res = isl_set_lexmax_pw_multi_aff(copy());
10639   return manage(res);
10640 }
10641 
lexmin()10642 isl::checked::set set::lexmin() const
10643 {
10644   auto res = isl_set_lexmin(copy());
10645   return manage(res);
10646 }
10647 
lexmin_pw_multi_aff()10648 isl::checked::pw_multi_aff set::lexmin_pw_multi_aff() const
10649 {
10650   auto res = isl_set_lexmin_pw_multi_aff(copy());
10651   return manage(res);
10652 }
10653 
lower_bound(isl::checked::multi_pw_aff lower)10654 isl::checked::set set::lower_bound(isl::checked::multi_pw_aff lower) const
10655 {
10656   auto res = isl_set_lower_bound_multi_pw_aff(copy(), lower.release());
10657   return manage(res);
10658 }
10659 
lower_bound(isl::checked::multi_val lower)10660 isl::checked::set set::lower_bound(isl::checked::multi_val lower) const
10661 {
10662   auto res = isl_set_lower_bound_multi_val(copy(), lower.release());
10663   return manage(res);
10664 }
10665 
max_multi_pw_aff()10666 isl::checked::multi_pw_aff set::max_multi_pw_aff() const
10667 {
10668   auto res = isl_set_max_multi_pw_aff(copy());
10669   return manage(res);
10670 }
10671 
max_val(const isl::checked::aff & obj)10672 isl::checked::val set::max_val(const isl::checked::aff &obj) const
10673 {
10674   auto res = isl_set_max_val(get(), obj.get());
10675   return manage(res);
10676 }
10677 
min_multi_pw_aff()10678 isl::checked::multi_pw_aff set::min_multi_pw_aff() const
10679 {
10680   auto res = isl_set_min_multi_pw_aff(copy());
10681   return manage(res);
10682 }
10683 
min_val(const isl::checked::aff & obj)10684 isl::checked::val set::min_val(const isl::checked::aff &obj) const
10685 {
10686   auto res = isl_set_min_val(get(), obj.get());
10687   return manage(res);
10688 }
10689 
params()10690 isl::checked::set set::params() const
10691 {
10692   auto res = isl_set_params(copy());
10693   return manage(res);
10694 }
10695 
polyhedral_hull()10696 isl::checked::basic_set set::polyhedral_hull() const
10697 {
10698   auto res = isl_set_polyhedral_hull(copy());
10699   return manage(res);
10700 }
10701 
preimage(isl::checked::multi_aff ma)10702 isl::checked::set set::preimage(isl::checked::multi_aff ma) const
10703 {
10704   auto res = isl_set_preimage_multi_aff(copy(), ma.release());
10705   return manage(res);
10706 }
10707 
preimage(isl::checked::multi_pw_aff mpa)10708 isl::checked::set set::preimage(isl::checked::multi_pw_aff mpa) const
10709 {
10710   auto res = isl_set_preimage_multi_pw_aff(copy(), mpa.release());
10711   return manage(res);
10712 }
10713 
preimage(isl::checked::pw_multi_aff pma)10714 isl::checked::set set::preimage(isl::checked::pw_multi_aff pma) const
10715 {
10716   auto res = isl_set_preimage_pw_multi_aff(copy(), pma.release());
10717   return manage(res);
10718 }
10719 
product(isl::checked::set set2)10720 isl::checked::set set::product(isl::checked::set set2) const
10721 {
10722   auto res = isl_set_product(copy(), set2.release());
10723   return manage(res);
10724 }
10725 
project_out_all_params()10726 isl::checked::set set::project_out_all_params() const
10727 {
10728   auto res = isl_set_project_out_all_params(copy());
10729   return manage(res);
10730 }
10731 
project_out_param(isl::checked::id id)10732 isl::checked::set set::project_out_param(isl::checked::id id) const
10733 {
10734   auto res = isl_set_project_out_param_id(copy(), id.release());
10735   return manage(res);
10736 }
10737 
project_out_param(const std::string & id)10738 isl::checked::set set::project_out_param(const std::string &id) const
10739 {
10740   return this->project_out_param(isl::checked::id(ctx(), id));
10741 }
10742 
project_out_param(isl::checked::id_list list)10743 isl::checked::set set::project_out_param(isl::checked::id_list list) const
10744 {
10745   auto res = isl_set_project_out_param_id_list(copy(), list.release());
10746   return manage(res);
10747 }
10748 
sample()10749 isl::checked::basic_set set::sample() const
10750 {
10751   auto res = isl_set_sample(copy());
10752   return manage(res);
10753 }
10754 
sample_point()10755 isl::checked::point set::sample_point() const
10756 {
10757   auto res = isl_set_sample_point(copy());
10758   return manage(res);
10759 }
10760 
subtract(isl::checked::set set2)10761 isl::checked::set set::subtract(isl::checked::set set2) const
10762 {
10763   auto res = isl_set_subtract(copy(), set2.release());
10764   return manage(res);
10765 }
10766 
translation()10767 isl::checked::map set::translation() const
10768 {
10769   auto res = isl_set_translation(copy());
10770   return manage(res);
10771 }
10772 
unbind_params(isl::checked::multi_id tuple)10773 isl::checked::set set::unbind_params(isl::checked::multi_id tuple) const
10774 {
10775   auto res = isl_set_unbind_params(copy(), tuple.release());
10776   return manage(res);
10777 }
10778 
unbind_params_insert_domain(isl::checked::multi_id domain)10779 isl::checked::map set::unbind_params_insert_domain(isl::checked::multi_id domain) const
10780 {
10781   auto res = isl_set_unbind_params_insert_domain(copy(), domain.release());
10782   return manage(res);
10783 }
10784 
unite(isl::checked::set set2)10785 isl::checked::set set::unite(isl::checked::set set2) const
10786 {
10787   auto res = isl_set_union(copy(), set2.release());
10788   return manage(res);
10789 }
10790 
universe(isl::checked::space space)10791 isl::checked::set set::universe(isl::checked::space space)
10792 {
10793   auto res = isl_set_universe(space.release());
10794   return manage(res);
10795 }
10796 
unshifted_simple_hull()10797 isl::checked::basic_set set::unshifted_simple_hull() const
10798 {
10799   auto res = isl_set_unshifted_simple_hull(copy());
10800   return manage(res);
10801 }
10802 
unwrap()10803 isl::checked::map set::unwrap() const
10804 {
10805   auto res = isl_set_unwrap(copy());
10806   return manage(res);
10807 }
10808 
upper_bound(isl::checked::multi_pw_aff upper)10809 isl::checked::set set::upper_bound(isl::checked::multi_pw_aff upper) const
10810 {
10811   auto res = isl_set_upper_bound_multi_pw_aff(copy(), upper.release());
10812   return manage(res);
10813 }
10814 
upper_bound(isl::checked::multi_val upper)10815 isl::checked::set set::upper_bound(isl::checked::multi_val upper) const
10816 {
10817   auto res = isl_set_upper_bound_multi_val(copy(), upper.release());
10818   return manage(res);
10819 }
10820 
10821 inline std::ostream &operator<<(std::ostream &os, const set &obj)
10822 {
10823   char *str = isl_set_to_str(obj.get());
10824   if (!str) {
10825     os.setstate(std::ios_base::badbit);
10826     return os;
10827   }
10828   os << str;
10829   free(str);
10830   return os;
10831 }
10832 
10833 // implementations for isl::space
manage(__isl_take isl_space * ptr)10834 space manage(__isl_take isl_space *ptr) {
10835   return space(ptr);
10836 }
manage_copy(__isl_keep isl_space * ptr)10837 space manage_copy(__isl_keep isl_space *ptr) {
10838   ptr = isl_space_copy(ptr);
10839   return space(ptr);
10840 }
10841 
space()10842 space::space()
10843     : ptr(nullptr) {}
10844 
space(const space & obj)10845 space::space(const space &obj)
10846     : ptr(nullptr)
10847 {
10848   ptr = obj.copy();
10849 }
10850 
space(__isl_take isl_space * ptr)10851 space::space(__isl_take isl_space *ptr)
10852     : ptr(ptr) {}
10853 
10854 space &space::operator=(space obj) {
10855   std::swap(this->ptr, obj.ptr);
10856   return *this;
10857 }
10858 
~space()10859 space::~space() {
10860   if (ptr)
10861     isl_space_free(ptr);
10862 }
10863 
copy()10864 __isl_give isl_space *space::copy() const & {
10865   return isl_space_copy(ptr);
10866 }
10867 
get()10868 __isl_keep isl_space *space::get() const {
10869   return ptr;
10870 }
10871 
release()10872 __isl_give isl_space *space::release() {
10873   isl_space *tmp = ptr;
10874   ptr = nullptr;
10875   return tmp;
10876 }
10877 
is_null()10878 bool space::is_null() const {
10879   return ptr == nullptr;
10880 }
10881 
ctx()10882 isl::checked::ctx space::ctx() const {
10883   return isl::checked::ctx(isl_space_get_ctx(ptr));
10884 }
10885 
add_named_tuple(isl::checked::id tuple_id,unsigned int dim)10886 isl::checked::space space::add_named_tuple(isl::checked::id tuple_id, unsigned int dim) const
10887 {
10888   auto res = isl_space_add_named_tuple_id_ui(copy(), tuple_id.release(), dim);
10889   return manage(res);
10890 }
10891 
add_named_tuple(const std::string & tuple_id,unsigned int dim)10892 isl::checked::space space::add_named_tuple(const std::string &tuple_id, unsigned int dim) const
10893 {
10894   return this->add_named_tuple(isl::checked::id(ctx(), tuple_id), dim);
10895 }
10896 
add_unnamed_tuple(unsigned int dim)10897 isl::checked::space space::add_unnamed_tuple(unsigned int dim) const
10898 {
10899   auto res = isl_space_add_unnamed_tuple_ui(copy(), dim);
10900   return manage(res);
10901 }
10902 
curry()10903 isl::checked::space space::curry() const
10904 {
10905   auto res = isl_space_curry(copy());
10906   return manage(res);
10907 }
10908 
domain()10909 isl::checked::space space::domain() const
10910 {
10911   auto res = isl_space_domain(copy());
10912   return manage(res);
10913 }
10914 
flatten_domain()10915 isl::checked::space space::flatten_domain() const
10916 {
10917   auto res = isl_space_flatten_domain(copy());
10918   return manage(res);
10919 }
10920 
flatten_range()10921 isl::checked::space space::flatten_range() const
10922 {
10923   auto res = isl_space_flatten_range(copy());
10924   return manage(res);
10925 }
10926 
is_equal(const isl::checked::space & space2)10927 boolean space::is_equal(const isl::checked::space &space2) const
10928 {
10929   auto res = isl_space_is_equal(get(), space2.get());
10930   return manage(res);
10931 }
10932 
is_wrapping()10933 boolean space::is_wrapping() const
10934 {
10935   auto res = isl_space_is_wrapping(get());
10936   return manage(res);
10937 }
10938 
map_from_set()10939 isl::checked::space space::map_from_set() const
10940 {
10941   auto res = isl_space_map_from_set(copy());
10942   return manage(res);
10943 }
10944 
params()10945 isl::checked::space space::params() const
10946 {
10947   auto res = isl_space_params(copy());
10948   return manage(res);
10949 }
10950 
product(isl::checked::space right)10951 isl::checked::space space::product(isl::checked::space right) const
10952 {
10953   auto res = isl_space_product(copy(), right.release());
10954   return manage(res);
10955 }
10956 
range()10957 isl::checked::space space::range() const
10958 {
10959   auto res = isl_space_range(copy());
10960   return manage(res);
10961 }
10962 
range_reverse()10963 isl::checked::space space::range_reverse() const
10964 {
10965   auto res = isl_space_range_reverse(copy());
10966   return manage(res);
10967 }
10968 
reverse()10969 isl::checked::space space::reverse() const
10970 {
10971   auto res = isl_space_reverse(copy());
10972   return manage(res);
10973 }
10974 
uncurry()10975 isl::checked::space space::uncurry() const
10976 {
10977   auto res = isl_space_uncurry(copy());
10978   return manage(res);
10979 }
10980 
unit(isl::checked::ctx ctx)10981 isl::checked::space space::unit(isl::checked::ctx ctx)
10982 {
10983   auto res = isl_space_unit(ctx.release());
10984   return manage(res);
10985 }
10986 
unwrap()10987 isl::checked::space space::unwrap() const
10988 {
10989   auto res = isl_space_unwrap(copy());
10990   return manage(res);
10991 }
10992 
wrap()10993 isl::checked::space space::wrap() const
10994 {
10995   auto res = isl_space_wrap(copy());
10996   return manage(res);
10997 }
10998 
10999 inline std::ostream &operator<<(std::ostream &os, const space &obj)
11000 {
11001   char *str = isl_space_to_str(obj.get());
11002   if (!str) {
11003     os.setstate(std::ios_base::badbit);
11004     return os;
11005   }
11006   os << str;
11007   free(str);
11008   return os;
11009 }
11010 
11011 // implementations for isl::union_access_info
manage(__isl_take isl_union_access_info * ptr)11012 union_access_info manage(__isl_take isl_union_access_info *ptr) {
11013   return union_access_info(ptr);
11014 }
manage_copy(__isl_keep isl_union_access_info * ptr)11015 union_access_info manage_copy(__isl_keep isl_union_access_info *ptr) {
11016   ptr = isl_union_access_info_copy(ptr);
11017   return union_access_info(ptr);
11018 }
11019 
union_access_info()11020 union_access_info::union_access_info()
11021     : ptr(nullptr) {}
11022 
union_access_info(const union_access_info & obj)11023 union_access_info::union_access_info(const union_access_info &obj)
11024     : ptr(nullptr)
11025 {
11026   ptr = obj.copy();
11027 }
11028 
union_access_info(__isl_take isl_union_access_info * ptr)11029 union_access_info::union_access_info(__isl_take isl_union_access_info *ptr)
11030     : ptr(ptr) {}
11031 
union_access_info(isl::checked::union_map sink)11032 union_access_info::union_access_info(isl::checked::union_map sink)
11033 {
11034   auto res = isl_union_access_info_from_sink(sink.release());
11035   ptr = res;
11036 }
11037 
11038 union_access_info &union_access_info::operator=(union_access_info obj) {
11039   std::swap(this->ptr, obj.ptr);
11040   return *this;
11041 }
11042 
~union_access_info()11043 union_access_info::~union_access_info() {
11044   if (ptr)
11045     isl_union_access_info_free(ptr);
11046 }
11047 
copy()11048 __isl_give isl_union_access_info *union_access_info::copy() const & {
11049   return isl_union_access_info_copy(ptr);
11050 }
11051 
get()11052 __isl_keep isl_union_access_info *union_access_info::get() const {
11053   return ptr;
11054 }
11055 
release()11056 __isl_give isl_union_access_info *union_access_info::release() {
11057   isl_union_access_info *tmp = ptr;
11058   ptr = nullptr;
11059   return tmp;
11060 }
11061 
is_null()11062 bool union_access_info::is_null() const {
11063   return ptr == nullptr;
11064 }
11065 
ctx()11066 isl::checked::ctx union_access_info::ctx() const {
11067   return isl::checked::ctx(isl_union_access_info_get_ctx(ptr));
11068 }
11069 
compute_flow()11070 isl::checked::union_flow union_access_info::compute_flow() const
11071 {
11072   auto res = isl_union_access_info_compute_flow(copy());
11073   return manage(res);
11074 }
11075 
set_kill(isl::checked::union_map kill)11076 isl::checked::union_access_info union_access_info::set_kill(isl::checked::union_map kill) const
11077 {
11078   auto res = isl_union_access_info_set_kill(copy(), kill.release());
11079   return manage(res);
11080 }
11081 
set_may_source(isl::checked::union_map may_source)11082 isl::checked::union_access_info union_access_info::set_may_source(isl::checked::union_map may_source) const
11083 {
11084   auto res = isl_union_access_info_set_may_source(copy(), may_source.release());
11085   return manage(res);
11086 }
11087 
set_must_source(isl::checked::union_map must_source)11088 isl::checked::union_access_info union_access_info::set_must_source(isl::checked::union_map must_source) const
11089 {
11090   auto res = isl_union_access_info_set_must_source(copy(), must_source.release());
11091   return manage(res);
11092 }
11093 
set_schedule(isl::checked::schedule schedule)11094 isl::checked::union_access_info union_access_info::set_schedule(isl::checked::schedule schedule) const
11095 {
11096   auto res = isl_union_access_info_set_schedule(copy(), schedule.release());
11097   return manage(res);
11098 }
11099 
set_schedule_map(isl::checked::union_map schedule_map)11100 isl::checked::union_access_info union_access_info::set_schedule_map(isl::checked::union_map schedule_map) const
11101 {
11102   auto res = isl_union_access_info_set_schedule_map(copy(), schedule_map.release());
11103   return manage(res);
11104 }
11105 
11106 inline std::ostream &operator<<(std::ostream &os, const union_access_info &obj)
11107 {
11108   char *str = isl_union_access_info_to_str(obj.get());
11109   if (!str) {
11110     os.setstate(std::ios_base::badbit);
11111     return os;
11112   }
11113   os << str;
11114   free(str);
11115   return os;
11116 }
11117 
11118 // implementations for isl::union_flow
manage(__isl_take isl_union_flow * ptr)11119 union_flow manage(__isl_take isl_union_flow *ptr) {
11120   return union_flow(ptr);
11121 }
manage_copy(__isl_keep isl_union_flow * ptr)11122 union_flow manage_copy(__isl_keep isl_union_flow *ptr) {
11123   ptr = isl_union_flow_copy(ptr);
11124   return union_flow(ptr);
11125 }
11126 
union_flow()11127 union_flow::union_flow()
11128     : ptr(nullptr) {}
11129 
union_flow(const union_flow & obj)11130 union_flow::union_flow(const union_flow &obj)
11131     : ptr(nullptr)
11132 {
11133   ptr = obj.copy();
11134 }
11135 
union_flow(__isl_take isl_union_flow * ptr)11136 union_flow::union_flow(__isl_take isl_union_flow *ptr)
11137     : ptr(ptr) {}
11138 
11139 union_flow &union_flow::operator=(union_flow obj) {
11140   std::swap(this->ptr, obj.ptr);
11141   return *this;
11142 }
11143 
~union_flow()11144 union_flow::~union_flow() {
11145   if (ptr)
11146     isl_union_flow_free(ptr);
11147 }
11148 
copy()11149 __isl_give isl_union_flow *union_flow::copy() const & {
11150   return isl_union_flow_copy(ptr);
11151 }
11152 
get()11153 __isl_keep isl_union_flow *union_flow::get() const {
11154   return ptr;
11155 }
11156 
release()11157 __isl_give isl_union_flow *union_flow::release() {
11158   isl_union_flow *tmp = ptr;
11159   ptr = nullptr;
11160   return tmp;
11161 }
11162 
is_null()11163 bool union_flow::is_null() const {
11164   return ptr == nullptr;
11165 }
11166 
ctx()11167 isl::checked::ctx union_flow::ctx() const {
11168   return isl::checked::ctx(isl_union_flow_get_ctx(ptr));
11169 }
11170 
full_may_dependence()11171 isl::checked::union_map union_flow::full_may_dependence() const
11172 {
11173   auto res = isl_union_flow_get_full_may_dependence(get());
11174   return manage(res);
11175 }
11176 
get_full_may_dependence()11177 isl::checked::union_map union_flow::get_full_may_dependence() const
11178 {
11179   return full_may_dependence();
11180 }
11181 
full_must_dependence()11182 isl::checked::union_map union_flow::full_must_dependence() const
11183 {
11184   auto res = isl_union_flow_get_full_must_dependence(get());
11185   return manage(res);
11186 }
11187 
get_full_must_dependence()11188 isl::checked::union_map union_flow::get_full_must_dependence() const
11189 {
11190   return full_must_dependence();
11191 }
11192 
may_dependence()11193 isl::checked::union_map union_flow::may_dependence() const
11194 {
11195   auto res = isl_union_flow_get_may_dependence(get());
11196   return manage(res);
11197 }
11198 
get_may_dependence()11199 isl::checked::union_map union_flow::get_may_dependence() const
11200 {
11201   return may_dependence();
11202 }
11203 
may_no_source()11204 isl::checked::union_map union_flow::may_no_source() const
11205 {
11206   auto res = isl_union_flow_get_may_no_source(get());
11207   return manage(res);
11208 }
11209 
get_may_no_source()11210 isl::checked::union_map union_flow::get_may_no_source() const
11211 {
11212   return may_no_source();
11213 }
11214 
must_dependence()11215 isl::checked::union_map union_flow::must_dependence() const
11216 {
11217   auto res = isl_union_flow_get_must_dependence(get());
11218   return manage(res);
11219 }
11220 
get_must_dependence()11221 isl::checked::union_map union_flow::get_must_dependence() const
11222 {
11223   return must_dependence();
11224 }
11225 
must_no_source()11226 isl::checked::union_map union_flow::must_no_source() const
11227 {
11228   auto res = isl_union_flow_get_must_no_source(get());
11229   return manage(res);
11230 }
11231 
get_must_no_source()11232 isl::checked::union_map union_flow::get_must_no_source() const
11233 {
11234   return must_no_source();
11235 }
11236 
11237 inline std::ostream &operator<<(std::ostream &os, const union_flow &obj)
11238 {
11239   char *str = isl_union_flow_to_str(obj.get());
11240   if (!str) {
11241     os.setstate(std::ios_base::badbit);
11242     return os;
11243   }
11244   os << str;
11245   free(str);
11246   return os;
11247 }
11248 
11249 // implementations for isl::union_map
manage(__isl_take isl_union_map * ptr)11250 union_map manage(__isl_take isl_union_map *ptr) {
11251   return union_map(ptr);
11252 }
manage_copy(__isl_keep isl_union_map * ptr)11253 union_map manage_copy(__isl_keep isl_union_map *ptr) {
11254   ptr = isl_union_map_copy(ptr);
11255   return union_map(ptr);
11256 }
11257 
union_map()11258 union_map::union_map()
11259     : ptr(nullptr) {}
11260 
union_map(const union_map & obj)11261 union_map::union_map(const union_map &obj)
11262     : ptr(nullptr)
11263 {
11264   ptr = obj.copy();
11265 }
11266 
union_map(__isl_take isl_union_map * ptr)11267 union_map::union_map(__isl_take isl_union_map *ptr)
11268     : ptr(ptr) {}
11269 
union_map(isl::checked::basic_map bmap)11270 union_map::union_map(isl::checked::basic_map bmap)
11271 {
11272   auto res = isl_union_map_from_basic_map(bmap.release());
11273   ptr = res;
11274 }
11275 
union_map(isl::checked::map map)11276 union_map::union_map(isl::checked::map map)
11277 {
11278   auto res = isl_union_map_from_map(map.release());
11279   ptr = res;
11280 }
11281 
union_map(isl::checked::ctx ctx,const std::string & str)11282 union_map::union_map(isl::checked::ctx ctx, const std::string &str)
11283 {
11284   auto res = isl_union_map_read_from_str(ctx.release(), str.c_str());
11285   ptr = res;
11286 }
11287 
11288 union_map &union_map::operator=(union_map obj) {
11289   std::swap(this->ptr, obj.ptr);
11290   return *this;
11291 }
11292 
~union_map()11293 union_map::~union_map() {
11294   if (ptr)
11295     isl_union_map_free(ptr);
11296 }
11297 
copy()11298 __isl_give isl_union_map *union_map::copy() const & {
11299   return isl_union_map_copy(ptr);
11300 }
11301 
get()11302 __isl_keep isl_union_map *union_map::get() const {
11303   return ptr;
11304 }
11305 
release()11306 __isl_give isl_union_map *union_map::release() {
11307   isl_union_map *tmp = ptr;
11308   ptr = nullptr;
11309   return tmp;
11310 }
11311 
is_null()11312 bool union_map::is_null() const {
11313   return ptr == nullptr;
11314 }
11315 
ctx()11316 isl::checked::ctx union_map::ctx() const {
11317   return isl::checked::ctx(isl_union_map_get_ctx(ptr));
11318 }
11319 
affine_hull()11320 isl::checked::union_map union_map::affine_hull() const
11321 {
11322   auto res = isl_union_map_affine_hull(copy());
11323   return manage(res);
11324 }
11325 
apply_domain(isl::checked::union_map umap2)11326 isl::checked::union_map union_map::apply_domain(isl::checked::union_map umap2) const
11327 {
11328   auto res = isl_union_map_apply_domain(copy(), umap2.release());
11329   return manage(res);
11330 }
11331 
apply_range(isl::checked::union_map umap2)11332 isl::checked::union_map union_map::apply_range(isl::checked::union_map umap2) const
11333 {
11334   auto res = isl_union_map_apply_range(copy(), umap2.release());
11335   return manage(res);
11336 }
11337 
bind_range(isl::checked::multi_id tuple)11338 isl::checked::union_set union_map::bind_range(isl::checked::multi_id tuple) const
11339 {
11340   auto res = isl_union_map_bind_range(copy(), tuple.release());
11341   return manage(res);
11342 }
11343 
coalesce()11344 isl::checked::union_map union_map::coalesce() const
11345 {
11346   auto res = isl_union_map_coalesce(copy());
11347   return manage(res);
11348 }
11349 
compute_divs()11350 isl::checked::union_map union_map::compute_divs() const
11351 {
11352   auto res = isl_union_map_compute_divs(copy());
11353   return manage(res);
11354 }
11355 
curry()11356 isl::checked::union_map union_map::curry() const
11357 {
11358   auto res = isl_union_map_curry(copy());
11359   return manage(res);
11360 }
11361 
deltas()11362 isl::checked::union_set union_map::deltas() const
11363 {
11364   auto res = isl_union_map_deltas(copy());
11365   return manage(res);
11366 }
11367 
detect_equalities()11368 isl::checked::union_map union_map::detect_equalities() const
11369 {
11370   auto res = isl_union_map_detect_equalities(copy());
11371   return manage(res);
11372 }
11373 
domain()11374 isl::checked::union_set union_map::domain() const
11375 {
11376   auto res = isl_union_map_domain(copy());
11377   return manage(res);
11378 }
11379 
domain_factor_domain()11380 isl::checked::union_map union_map::domain_factor_domain() const
11381 {
11382   auto res = isl_union_map_domain_factor_domain(copy());
11383   return manage(res);
11384 }
11385 
domain_factor_range()11386 isl::checked::union_map union_map::domain_factor_range() const
11387 {
11388   auto res = isl_union_map_domain_factor_range(copy());
11389   return manage(res);
11390 }
11391 
domain_map()11392 isl::checked::union_map union_map::domain_map() const
11393 {
11394   auto res = isl_union_map_domain_map(copy());
11395   return manage(res);
11396 }
11397 
domain_map_union_pw_multi_aff()11398 isl::checked::union_pw_multi_aff union_map::domain_map_union_pw_multi_aff() const
11399 {
11400   auto res = isl_union_map_domain_map_union_pw_multi_aff(copy());
11401   return manage(res);
11402 }
11403 
domain_product(isl::checked::union_map umap2)11404 isl::checked::union_map union_map::domain_product(isl::checked::union_map umap2) const
11405 {
11406   auto res = isl_union_map_domain_product(copy(), umap2.release());
11407   return manage(res);
11408 }
11409 
empty(isl::checked::ctx ctx)11410 isl::checked::union_map union_map::empty(isl::checked::ctx ctx)
11411 {
11412   auto res = isl_union_map_empty_ctx(ctx.release());
11413   return manage(res);
11414 }
11415 
eq_at(isl::checked::multi_union_pw_aff mupa)11416 isl::checked::union_map union_map::eq_at(isl::checked::multi_union_pw_aff mupa) const
11417 {
11418   auto res = isl_union_map_eq_at_multi_union_pw_aff(copy(), mupa.release());
11419   return manage(res);
11420 }
11421 
every_map(const std::function<boolean (isl::checked::map)> & test)11422 boolean union_map::every_map(const std::function<boolean(isl::checked::map)> &test) const
11423 {
11424   struct test_data {
11425     std::function<boolean(isl::checked::map)> func;
11426   } test_data = { test };
11427   auto test_lambda = [](isl_map *arg_0, void *arg_1) -> isl_bool {
11428     auto *data = static_cast<struct test_data *>(arg_1);
11429     auto ret = (data->func)(manage_copy(arg_0));
11430     return ret.release();
11431   };
11432   auto res = isl_union_map_every_map(get(), test_lambda, &test_data);
11433   return manage(res);
11434 }
11435 
extract_map(isl::checked::space space)11436 isl::checked::map union_map::extract_map(isl::checked::space space) const
11437 {
11438   auto res = isl_union_map_extract_map(get(), space.release());
11439   return manage(res);
11440 }
11441 
factor_domain()11442 isl::checked::union_map union_map::factor_domain() const
11443 {
11444   auto res = isl_union_map_factor_domain(copy());
11445   return manage(res);
11446 }
11447 
factor_range()11448 isl::checked::union_map union_map::factor_range() const
11449 {
11450   auto res = isl_union_map_factor_range(copy());
11451   return manage(res);
11452 }
11453 
fixed_power(isl::checked::val exp)11454 isl::checked::union_map union_map::fixed_power(isl::checked::val exp) const
11455 {
11456   auto res = isl_union_map_fixed_power_val(copy(), exp.release());
11457   return manage(res);
11458 }
11459 
fixed_power(long exp)11460 isl::checked::union_map union_map::fixed_power(long exp) const
11461 {
11462   return this->fixed_power(isl::checked::val(ctx(), exp));
11463 }
11464 
foreach_map(const std::function<stat (isl::checked::map)> & fn)11465 stat union_map::foreach_map(const std::function<stat(isl::checked::map)> &fn) const
11466 {
11467   struct fn_data {
11468     std::function<stat(isl::checked::map)> func;
11469   } fn_data = { fn };
11470   auto fn_lambda = [](isl_map *arg_0, void *arg_1) -> isl_stat {
11471     auto *data = static_cast<struct fn_data *>(arg_1);
11472     auto ret = (data->func)(manage(arg_0));
11473     return ret.release();
11474   };
11475   auto res = isl_union_map_foreach_map(get(), fn_lambda, &fn_data);
11476   return manage(res);
11477 }
11478 
from(isl::checked::multi_union_pw_aff mupa)11479 isl::checked::union_map union_map::from(isl::checked::multi_union_pw_aff mupa)
11480 {
11481   auto res = isl_union_map_from_multi_union_pw_aff(mupa.release());
11482   return manage(res);
11483 }
11484 
from(isl::checked::union_pw_multi_aff upma)11485 isl::checked::union_map union_map::from(isl::checked::union_pw_multi_aff upma)
11486 {
11487   auto res = isl_union_map_from_union_pw_multi_aff(upma.release());
11488   return manage(res);
11489 }
11490 
from_domain(isl::checked::union_set uset)11491 isl::checked::union_map union_map::from_domain(isl::checked::union_set uset)
11492 {
11493   auto res = isl_union_map_from_domain(uset.release());
11494   return manage(res);
11495 }
11496 
from_domain_and_range(isl::checked::union_set domain,isl::checked::union_set range)11497 isl::checked::union_map union_map::from_domain_and_range(isl::checked::union_set domain, isl::checked::union_set range)
11498 {
11499   auto res = isl_union_map_from_domain_and_range(domain.release(), range.release());
11500   return manage(res);
11501 }
11502 
from_range(isl::checked::union_set uset)11503 isl::checked::union_map union_map::from_range(isl::checked::union_set uset)
11504 {
11505   auto res = isl_union_map_from_range(uset.release());
11506   return manage(res);
11507 }
11508 
space()11509 isl::checked::space union_map::space() const
11510 {
11511   auto res = isl_union_map_get_space(get());
11512   return manage(res);
11513 }
11514 
get_space()11515 isl::checked::space union_map::get_space() const
11516 {
11517   return space();
11518 }
11519 
gist(isl::checked::union_map context)11520 isl::checked::union_map union_map::gist(isl::checked::union_map context) const
11521 {
11522   auto res = isl_union_map_gist(copy(), context.release());
11523   return manage(res);
11524 }
11525 
gist_domain(isl::checked::union_set uset)11526 isl::checked::union_map union_map::gist_domain(isl::checked::union_set uset) const
11527 {
11528   auto res = isl_union_map_gist_domain(copy(), uset.release());
11529   return manage(res);
11530 }
11531 
gist_params(isl::checked::set set)11532 isl::checked::union_map union_map::gist_params(isl::checked::set set) const
11533 {
11534   auto res = isl_union_map_gist_params(copy(), set.release());
11535   return manage(res);
11536 }
11537 
gist_range(isl::checked::union_set uset)11538 isl::checked::union_map union_map::gist_range(isl::checked::union_set uset) const
11539 {
11540   auto res = isl_union_map_gist_range(copy(), uset.release());
11541   return manage(res);
11542 }
11543 
intersect(isl::checked::union_map umap2)11544 isl::checked::union_map union_map::intersect(isl::checked::union_map umap2) const
11545 {
11546   auto res = isl_union_map_intersect(copy(), umap2.release());
11547   return manage(res);
11548 }
11549 
intersect_domain(isl::checked::space space)11550 isl::checked::union_map union_map::intersect_domain(isl::checked::space space) const
11551 {
11552   auto res = isl_union_map_intersect_domain_space(copy(), space.release());
11553   return manage(res);
11554 }
11555 
intersect_domain(isl::checked::union_set uset)11556 isl::checked::union_map union_map::intersect_domain(isl::checked::union_set uset) const
11557 {
11558   auto res = isl_union_map_intersect_domain_union_set(copy(), uset.release());
11559   return manage(res);
11560 }
11561 
intersect_domain_factor_domain(isl::checked::union_map factor)11562 isl::checked::union_map union_map::intersect_domain_factor_domain(isl::checked::union_map factor) const
11563 {
11564   auto res = isl_union_map_intersect_domain_factor_domain(copy(), factor.release());
11565   return manage(res);
11566 }
11567 
intersect_domain_factor_range(isl::checked::union_map factor)11568 isl::checked::union_map union_map::intersect_domain_factor_range(isl::checked::union_map factor) const
11569 {
11570   auto res = isl_union_map_intersect_domain_factor_range(copy(), factor.release());
11571   return manage(res);
11572 }
11573 
intersect_params(isl::checked::set set)11574 isl::checked::union_map union_map::intersect_params(isl::checked::set set) const
11575 {
11576   auto res = isl_union_map_intersect_params(copy(), set.release());
11577   return manage(res);
11578 }
11579 
intersect_range(isl::checked::space space)11580 isl::checked::union_map union_map::intersect_range(isl::checked::space space) const
11581 {
11582   auto res = isl_union_map_intersect_range_space(copy(), space.release());
11583   return manage(res);
11584 }
11585 
intersect_range(isl::checked::union_set uset)11586 isl::checked::union_map union_map::intersect_range(isl::checked::union_set uset) const
11587 {
11588   auto res = isl_union_map_intersect_range_union_set(copy(), uset.release());
11589   return manage(res);
11590 }
11591 
intersect_range_factor_domain(isl::checked::union_map factor)11592 isl::checked::union_map union_map::intersect_range_factor_domain(isl::checked::union_map factor) const
11593 {
11594   auto res = isl_union_map_intersect_range_factor_domain(copy(), factor.release());
11595   return manage(res);
11596 }
11597 
intersect_range_factor_range(isl::checked::union_map factor)11598 isl::checked::union_map union_map::intersect_range_factor_range(isl::checked::union_map factor) const
11599 {
11600   auto res = isl_union_map_intersect_range_factor_range(copy(), factor.release());
11601   return manage(res);
11602 }
11603 
is_bijective()11604 boolean union_map::is_bijective() const
11605 {
11606   auto res = isl_union_map_is_bijective(get());
11607   return manage(res);
11608 }
11609 
is_disjoint(const isl::checked::union_map & umap2)11610 boolean union_map::is_disjoint(const isl::checked::union_map &umap2) const
11611 {
11612   auto res = isl_union_map_is_disjoint(get(), umap2.get());
11613   return manage(res);
11614 }
11615 
is_empty()11616 boolean union_map::is_empty() const
11617 {
11618   auto res = isl_union_map_is_empty(get());
11619   return manage(res);
11620 }
11621 
is_equal(const isl::checked::union_map & umap2)11622 boolean union_map::is_equal(const isl::checked::union_map &umap2) const
11623 {
11624   auto res = isl_union_map_is_equal(get(), umap2.get());
11625   return manage(res);
11626 }
11627 
is_injective()11628 boolean union_map::is_injective() const
11629 {
11630   auto res = isl_union_map_is_injective(get());
11631   return manage(res);
11632 }
11633 
is_single_valued()11634 boolean union_map::is_single_valued() const
11635 {
11636   auto res = isl_union_map_is_single_valued(get());
11637   return manage(res);
11638 }
11639 
is_strict_subset(const isl::checked::union_map & umap2)11640 boolean union_map::is_strict_subset(const isl::checked::union_map &umap2) const
11641 {
11642   auto res = isl_union_map_is_strict_subset(get(), umap2.get());
11643   return manage(res);
11644 }
11645 
is_subset(const isl::checked::union_map & umap2)11646 boolean union_map::is_subset(const isl::checked::union_map &umap2) const
11647 {
11648   auto res = isl_union_map_is_subset(get(), umap2.get());
11649   return manage(res);
11650 }
11651 
isa_map()11652 boolean union_map::isa_map() const
11653 {
11654   auto res = isl_union_map_isa_map(get());
11655   return manage(res);
11656 }
11657 
lexmax()11658 isl::checked::union_map union_map::lexmax() const
11659 {
11660   auto res = isl_union_map_lexmax(copy());
11661   return manage(res);
11662 }
11663 
lexmin()11664 isl::checked::union_map union_map::lexmin() const
11665 {
11666   auto res = isl_union_map_lexmin(copy());
11667   return manage(res);
11668 }
11669 
polyhedral_hull()11670 isl::checked::union_map union_map::polyhedral_hull() const
11671 {
11672   auto res = isl_union_map_polyhedral_hull(copy());
11673   return manage(res);
11674 }
11675 
preimage_domain(isl::checked::multi_aff ma)11676 isl::checked::union_map union_map::preimage_domain(isl::checked::multi_aff ma) const
11677 {
11678   auto res = isl_union_map_preimage_domain_multi_aff(copy(), ma.release());
11679   return manage(res);
11680 }
11681 
preimage_domain(isl::checked::multi_pw_aff mpa)11682 isl::checked::union_map union_map::preimage_domain(isl::checked::multi_pw_aff mpa) const
11683 {
11684   auto res = isl_union_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
11685   return manage(res);
11686 }
11687 
preimage_domain(isl::checked::pw_multi_aff pma)11688 isl::checked::union_map union_map::preimage_domain(isl::checked::pw_multi_aff pma) const
11689 {
11690   auto res = isl_union_map_preimage_domain_pw_multi_aff(copy(), pma.release());
11691   return manage(res);
11692 }
11693 
preimage_domain(isl::checked::union_pw_multi_aff upma)11694 isl::checked::union_map union_map::preimage_domain(isl::checked::union_pw_multi_aff upma) const
11695 {
11696   auto res = isl_union_map_preimage_domain_union_pw_multi_aff(copy(), upma.release());
11697   return manage(res);
11698 }
11699 
preimage_range(isl::checked::multi_aff ma)11700 isl::checked::union_map union_map::preimage_range(isl::checked::multi_aff ma) const
11701 {
11702   auto res = isl_union_map_preimage_range_multi_aff(copy(), ma.release());
11703   return manage(res);
11704 }
11705 
preimage_range(isl::checked::pw_multi_aff pma)11706 isl::checked::union_map union_map::preimage_range(isl::checked::pw_multi_aff pma) const
11707 {
11708   auto res = isl_union_map_preimage_range_pw_multi_aff(copy(), pma.release());
11709   return manage(res);
11710 }
11711 
preimage_range(isl::checked::union_pw_multi_aff upma)11712 isl::checked::union_map union_map::preimage_range(isl::checked::union_pw_multi_aff upma) const
11713 {
11714   auto res = isl_union_map_preimage_range_union_pw_multi_aff(copy(), upma.release());
11715   return manage(res);
11716 }
11717 
product(isl::checked::union_map umap2)11718 isl::checked::union_map union_map::product(isl::checked::union_map umap2) const
11719 {
11720   auto res = isl_union_map_product(copy(), umap2.release());
11721   return manage(res);
11722 }
11723 
project_out_all_params()11724 isl::checked::union_map union_map::project_out_all_params() const
11725 {
11726   auto res = isl_union_map_project_out_all_params(copy());
11727   return manage(res);
11728 }
11729 
range()11730 isl::checked::union_set union_map::range() const
11731 {
11732   auto res = isl_union_map_range(copy());
11733   return manage(res);
11734 }
11735 
range_factor_domain()11736 isl::checked::union_map union_map::range_factor_domain() const
11737 {
11738   auto res = isl_union_map_range_factor_domain(copy());
11739   return manage(res);
11740 }
11741 
range_factor_range()11742 isl::checked::union_map union_map::range_factor_range() const
11743 {
11744   auto res = isl_union_map_range_factor_range(copy());
11745   return manage(res);
11746 }
11747 
range_map()11748 isl::checked::union_map union_map::range_map() const
11749 {
11750   auto res = isl_union_map_range_map(copy());
11751   return manage(res);
11752 }
11753 
range_product(isl::checked::union_map umap2)11754 isl::checked::union_map union_map::range_product(isl::checked::union_map umap2) const
11755 {
11756   auto res = isl_union_map_range_product(copy(), umap2.release());
11757   return manage(res);
11758 }
11759 
range_reverse()11760 isl::checked::union_map union_map::range_reverse() const
11761 {
11762   auto res = isl_union_map_range_reverse(copy());
11763   return manage(res);
11764 }
11765 
reverse()11766 isl::checked::union_map union_map::reverse() const
11767 {
11768   auto res = isl_union_map_reverse(copy());
11769   return manage(res);
11770 }
11771 
subtract(isl::checked::union_map umap2)11772 isl::checked::union_map union_map::subtract(isl::checked::union_map umap2) const
11773 {
11774   auto res = isl_union_map_subtract(copy(), umap2.release());
11775   return manage(res);
11776 }
11777 
subtract_domain(isl::checked::union_set dom)11778 isl::checked::union_map union_map::subtract_domain(isl::checked::union_set dom) const
11779 {
11780   auto res = isl_union_map_subtract_domain(copy(), dom.release());
11781   return manage(res);
11782 }
11783 
subtract_range(isl::checked::union_set dom)11784 isl::checked::union_map union_map::subtract_range(isl::checked::union_set dom) const
11785 {
11786   auto res = isl_union_map_subtract_range(copy(), dom.release());
11787   return manage(res);
11788 }
11789 
uncurry()11790 isl::checked::union_map union_map::uncurry() const
11791 {
11792   auto res = isl_union_map_uncurry(copy());
11793   return manage(res);
11794 }
11795 
unite(isl::checked::union_map umap2)11796 isl::checked::union_map union_map::unite(isl::checked::union_map umap2) const
11797 {
11798   auto res = isl_union_map_union(copy(), umap2.release());
11799   return manage(res);
11800 }
11801 
universe()11802 isl::checked::union_map union_map::universe() const
11803 {
11804   auto res = isl_union_map_universe(copy());
11805   return manage(res);
11806 }
11807 
wrap()11808 isl::checked::union_set union_map::wrap() const
11809 {
11810   auto res = isl_union_map_wrap(copy());
11811   return manage(res);
11812 }
11813 
zip()11814 isl::checked::union_map union_map::zip() const
11815 {
11816   auto res = isl_union_map_zip(copy());
11817   return manage(res);
11818 }
11819 
11820 inline std::ostream &operator<<(std::ostream &os, const union_map &obj)
11821 {
11822   char *str = isl_union_map_to_str(obj.get());
11823   if (!str) {
11824     os.setstate(std::ios_base::badbit);
11825     return os;
11826   }
11827   os << str;
11828   free(str);
11829   return os;
11830 }
11831 
11832 // implementations for isl::union_pw_aff
manage(__isl_take isl_union_pw_aff * ptr)11833 union_pw_aff manage(__isl_take isl_union_pw_aff *ptr) {
11834   return union_pw_aff(ptr);
11835 }
manage_copy(__isl_keep isl_union_pw_aff * ptr)11836 union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr) {
11837   ptr = isl_union_pw_aff_copy(ptr);
11838   return union_pw_aff(ptr);
11839 }
11840 
union_pw_aff()11841 union_pw_aff::union_pw_aff()
11842     : ptr(nullptr) {}
11843 
union_pw_aff(const union_pw_aff & obj)11844 union_pw_aff::union_pw_aff(const union_pw_aff &obj)
11845     : ptr(nullptr)
11846 {
11847   ptr = obj.copy();
11848 }
11849 
union_pw_aff(__isl_take isl_union_pw_aff * ptr)11850 union_pw_aff::union_pw_aff(__isl_take isl_union_pw_aff *ptr)
11851     : ptr(ptr) {}
11852 
union_pw_aff(isl::checked::aff aff)11853 union_pw_aff::union_pw_aff(isl::checked::aff aff)
11854 {
11855   auto res = isl_union_pw_aff_from_aff(aff.release());
11856   ptr = res;
11857 }
11858 
union_pw_aff(isl::checked::pw_aff pa)11859 union_pw_aff::union_pw_aff(isl::checked::pw_aff pa)
11860 {
11861   auto res = isl_union_pw_aff_from_pw_aff(pa.release());
11862   ptr = res;
11863 }
11864 
union_pw_aff(isl::checked::ctx ctx,const std::string & str)11865 union_pw_aff::union_pw_aff(isl::checked::ctx ctx, const std::string &str)
11866 {
11867   auto res = isl_union_pw_aff_read_from_str(ctx.release(), str.c_str());
11868   ptr = res;
11869 }
11870 
11871 union_pw_aff &union_pw_aff::operator=(union_pw_aff obj) {
11872   std::swap(this->ptr, obj.ptr);
11873   return *this;
11874 }
11875 
~union_pw_aff()11876 union_pw_aff::~union_pw_aff() {
11877   if (ptr)
11878     isl_union_pw_aff_free(ptr);
11879 }
11880 
copy()11881 __isl_give isl_union_pw_aff *union_pw_aff::copy() const & {
11882   return isl_union_pw_aff_copy(ptr);
11883 }
11884 
get()11885 __isl_keep isl_union_pw_aff *union_pw_aff::get() const {
11886   return ptr;
11887 }
11888 
release()11889 __isl_give isl_union_pw_aff *union_pw_aff::release() {
11890   isl_union_pw_aff *tmp = ptr;
11891   ptr = nullptr;
11892   return tmp;
11893 }
11894 
is_null()11895 bool union_pw_aff::is_null() const {
11896   return ptr == nullptr;
11897 }
11898 
ctx()11899 isl::checked::ctx union_pw_aff::ctx() const {
11900   return isl::checked::ctx(isl_union_pw_aff_get_ctx(ptr));
11901 }
11902 
add(isl::checked::union_pw_aff upa2)11903 isl::checked::union_pw_aff union_pw_aff::add(isl::checked::union_pw_aff upa2) const
11904 {
11905   auto res = isl_union_pw_aff_add(copy(), upa2.release());
11906   return manage(res);
11907 }
11908 
bind(isl::checked::id id)11909 isl::checked::union_set union_pw_aff::bind(isl::checked::id id) const
11910 {
11911   auto res = isl_union_pw_aff_bind_id(copy(), id.release());
11912   return manage(res);
11913 }
11914 
bind(const std::string & id)11915 isl::checked::union_set union_pw_aff::bind(const std::string &id) const
11916 {
11917   return this->bind(isl::checked::id(ctx(), id));
11918 }
11919 
coalesce()11920 isl::checked::union_pw_aff union_pw_aff::coalesce() const
11921 {
11922   auto res = isl_union_pw_aff_coalesce(copy());
11923   return manage(res);
11924 }
11925 
domain()11926 isl::checked::union_set union_pw_aff::domain() const
11927 {
11928   auto res = isl_union_pw_aff_domain(copy());
11929   return manage(res);
11930 }
11931 
space()11932 isl::checked::space union_pw_aff::space() const
11933 {
11934   auto res = isl_union_pw_aff_get_space(get());
11935   return manage(res);
11936 }
11937 
get_space()11938 isl::checked::space union_pw_aff::get_space() const
11939 {
11940   return space();
11941 }
11942 
gist(isl::checked::union_set context)11943 isl::checked::union_pw_aff union_pw_aff::gist(isl::checked::union_set context) const
11944 {
11945   auto res = isl_union_pw_aff_gist(copy(), context.release());
11946   return manage(res);
11947 }
11948 
intersect_domain(isl::checked::space space)11949 isl::checked::union_pw_aff union_pw_aff::intersect_domain(isl::checked::space space) const
11950 {
11951   auto res = isl_union_pw_aff_intersect_domain_space(copy(), space.release());
11952   return manage(res);
11953 }
11954 
intersect_domain(isl::checked::union_set uset)11955 isl::checked::union_pw_aff union_pw_aff::intersect_domain(isl::checked::union_set uset) const
11956 {
11957   auto res = isl_union_pw_aff_intersect_domain_union_set(copy(), uset.release());
11958   return manage(res);
11959 }
11960 
intersect_domain_wrapped_domain(isl::checked::union_set uset)11961 isl::checked::union_pw_aff union_pw_aff::intersect_domain_wrapped_domain(isl::checked::union_set uset) const
11962 {
11963   auto res = isl_union_pw_aff_intersect_domain_wrapped_domain(copy(), uset.release());
11964   return manage(res);
11965 }
11966 
intersect_domain_wrapped_range(isl::checked::union_set uset)11967 isl::checked::union_pw_aff union_pw_aff::intersect_domain_wrapped_range(isl::checked::union_set uset) const
11968 {
11969   auto res = isl_union_pw_aff_intersect_domain_wrapped_range(copy(), uset.release());
11970   return manage(res);
11971 }
11972 
intersect_params(isl::checked::set set)11973 isl::checked::union_pw_aff union_pw_aff::intersect_params(isl::checked::set set) const
11974 {
11975   auto res = isl_union_pw_aff_intersect_params(copy(), set.release());
11976   return manage(res);
11977 }
11978 
pullback(isl::checked::union_pw_multi_aff upma)11979 isl::checked::union_pw_aff union_pw_aff::pullback(isl::checked::union_pw_multi_aff upma) const
11980 {
11981   auto res = isl_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
11982   return manage(res);
11983 }
11984 
sub(isl::checked::union_pw_aff upa2)11985 isl::checked::union_pw_aff union_pw_aff::sub(isl::checked::union_pw_aff upa2) const
11986 {
11987   auto res = isl_union_pw_aff_sub(copy(), upa2.release());
11988   return manage(res);
11989 }
11990 
subtract_domain(isl::checked::space space)11991 isl::checked::union_pw_aff union_pw_aff::subtract_domain(isl::checked::space space) const
11992 {
11993   auto res = isl_union_pw_aff_subtract_domain_space(copy(), space.release());
11994   return manage(res);
11995 }
11996 
subtract_domain(isl::checked::union_set uset)11997 isl::checked::union_pw_aff union_pw_aff::subtract_domain(isl::checked::union_set uset) const
11998 {
11999   auto res = isl_union_pw_aff_subtract_domain_union_set(copy(), uset.release());
12000   return manage(res);
12001 }
12002 
union_add(isl::checked::union_pw_aff upa2)12003 isl::checked::union_pw_aff union_pw_aff::union_add(isl::checked::union_pw_aff upa2) const
12004 {
12005   auto res = isl_union_pw_aff_union_add(copy(), upa2.release());
12006   return manage(res);
12007 }
12008 
12009 inline std::ostream &operator<<(std::ostream &os, const union_pw_aff &obj)
12010 {
12011   char *str = isl_union_pw_aff_to_str(obj.get());
12012   if (!str) {
12013     os.setstate(std::ios_base::badbit);
12014     return os;
12015   }
12016   os << str;
12017   free(str);
12018   return os;
12019 }
12020 
12021 // implementations for isl::union_pw_aff_list
manage(__isl_take isl_union_pw_aff_list * ptr)12022 union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr) {
12023   return union_pw_aff_list(ptr);
12024 }
manage_copy(__isl_keep isl_union_pw_aff_list * ptr)12025 union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr) {
12026   ptr = isl_union_pw_aff_list_copy(ptr);
12027   return union_pw_aff_list(ptr);
12028 }
12029 
union_pw_aff_list()12030 union_pw_aff_list::union_pw_aff_list()
12031     : ptr(nullptr) {}
12032 
union_pw_aff_list(const union_pw_aff_list & obj)12033 union_pw_aff_list::union_pw_aff_list(const union_pw_aff_list &obj)
12034     : ptr(nullptr)
12035 {
12036   ptr = obj.copy();
12037 }
12038 
union_pw_aff_list(__isl_take isl_union_pw_aff_list * ptr)12039 union_pw_aff_list::union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr)
12040     : ptr(ptr) {}
12041 
union_pw_aff_list(isl::checked::ctx ctx,int n)12042 union_pw_aff_list::union_pw_aff_list(isl::checked::ctx ctx, int n)
12043 {
12044   auto res = isl_union_pw_aff_list_alloc(ctx.release(), n);
12045   ptr = res;
12046 }
12047 
union_pw_aff_list(isl::checked::union_pw_aff el)12048 union_pw_aff_list::union_pw_aff_list(isl::checked::union_pw_aff el)
12049 {
12050   auto res = isl_union_pw_aff_list_from_union_pw_aff(el.release());
12051   ptr = res;
12052 }
12053 
12054 union_pw_aff_list &union_pw_aff_list::operator=(union_pw_aff_list obj) {
12055   std::swap(this->ptr, obj.ptr);
12056   return *this;
12057 }
12058 
~union_pw_aff_list()12059 union_pw_aff_list::~union_pw_aff_list() {
12060   if (ptr)
12061     isl_union_pw_aff_list_free(ptr);
12062 }
12063 
copy()12064 __isl_give isl_union_pw_aff_list *union_pw_aff_list::copy() const & {
12065   return isl_union_pw_aff_list_copy(ptr);
12066 }
12067 
get()12068 __isl_keep isl_union_pw_aff_list *union_pw_aff_list::get() const {
12069   return ptr;
12070 }
12071 
release()12072 __isl_give isl_union_pw_aff_list *union_pw_aff_list::release() {
12073   isl_union_pw_aff_list *tmp = ptr;
12074   ptr = nullptr;
12075   return tmp;
12076 }
12077 
is_null()12078 bool union_pw_aff_list::is_null() const {
12079   return ptr == nullptr;
12080 }
12081 
ctx()12082 isl::checked::ctx union_pw_aff_list::ctx() const {
12083   return isl::checked::ctx(isl_union_pw_aff_list_get_ctx(ptr));
12084 }
12085 
add(isl::checked::union_pw_aff el)12086 isl::checked::union_pw_aff_list union_pw_aff_list::add(isl::checked::union_pw_aff el) const
12087 {
12088   auto res = isl_union_pw_aff_list_add(copy(), el.release());
12089   return manage(res);
12090 }
12091 
clear()12092 isl::checked::union_pw_aff_list union_pw_aff_list::clear() const
12093 {
12094   auto res = isl_union_pw_aff_list_clear(copy());
12095   return manage(res);
12096 }
12097 
concat(isl::checked::union_pw_aff_list list2)12098 isl::checked::union_pw_aff_list union_pw_aff_list::concat(isl::checked::union_pw_aff_list list2) const
12099 {
12100   auto res = isl_union_pw_aff_list_concat(copy(), list2.release());
12101   return manage(res);
12102 }
12103 
drop(unsigned int first,unsigned int n)12104 isl::checked::union_pw_aff_list union_pw_aff_list::drop(unsigned int first, unsigned int n) const
12105 {
12106   auto res = isl_union_pw_aff_list_drop(copy(), first, n);
12107   return manage(res);
12108 }
12109 
foreach(const std::function<stat (isl::checked::union_pw_aff)> & fn)12110 stat union_pw_aff_list::foreach(const std::function<stat(isl::checked::union_pw_aff)> &fn) const
12111 {
12112   struct fn_data {
12113     std::function<stat(isl::checked::union_pw_aff)> func;
12114   } fn_data = { fn };
12115   auto fn_lambda = [](isl_union_pw_aff *arg_0, void *arg_1) -> isl_stat {
12116     auto *data = static_cast<struct fn_data *>(arg_1);
12117     auto ret = (data->func)(manage(arg_0));
12118     return ret.release();
12119   };
12120   auto res = isl_union_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
12121   return manage(res);
12122 }
12123 
at(int index)12124 isl::checked::union_pw_aff union_pw_aff_list::at(int index) const
12125 {
12126   auto res = isl_union_pw_aff_list_get_at(get(), index);
12127   return manage(res);
12128 }
12129 
get_at(int index)12130 isl::checked::union_pw_aff union_pw_aff_list::get_at(int index) const
12131 {
12132   return at(index);
12133 }
12134 
insert(unsigned int pos,isl::checked::union_pw_aff el)12135 isl::checked::union_pw_aff_list union_pw_aff_list::insert(unsigned int pos, isl::checked::union_pw_aff el) const
12136 {
12137   auto res = isl_union_pw_aff_list_insert(copy(), pos, el.release());
12138   return manage(res);
12139 }
12140 
size()12141 class size union_pw_aff_list::size() const
12142 {
12143   auto res = isl_union_pw_aff_list_size(get());
12144   return manage(res);
12145 }
12146 
12147 inline std::ostream &operator<<(std::ostream &os, const union_pw_aff_list &obj)
12148 {
12149   char *str = isl_union_pw_aff_list_to_str(obj.get());
12150   if (!str) {
12151     os.setstate(std::ios_base::badbit);
12152     return os;
12153   }
12154   os << str;
12155   free(str);
12156   return os;
12157 }
12158 
12159 // implementations for isl::union_pw_multi_aff
manage(__isl_take isl_union_pw_multi_aff * ptr)12160 union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr) {
12161   return union_pw_multi_aff(ptr);
12162 }
manage_copy(__isl_keep isl_union_pw_multi_aff * ptr)12163 union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr) {
12164   ptr = isl_union_pw_multi_aff_copy(ptr);
12165   return union_pw_multi_aff(ptr);
12166 }
12167 
union_pw_multi_aff()12168 union_pw_multi_aff::union_pw_multi_aff()
12169     : ptr(nullptr) {}
12170 
union_pw_multi_aff(const union_pw_multi_aff & obj)12171 union_pw_multi_aff::union_pw_multi_aff(const union_pw_multi_aff &obj)
12172     : ptr(nullptr)
12173 {
12174   ptr = obj.copy();
12175 }
12176 
union_pw_multi_aff(__isl_take isl_union_pw_multi_aff * ptr)12177 union_pw_multi_aff::union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr)
12178     : ptr(ptr) {}
12179 
union_pw_multi_aff(isl::checked::multi_aff ma)12180 union_pw_multi_aff::union_pw_multi_aff(isl::checked::multi_aff ma)
12181 {
12182   auto res = isl_union_pw_multi_aff_from_multi_aff(ma.release());
12183   ptr = res;
12184 }
12185 
union_pw_multi_aff(isl::checked::pw_multi_aff pma)12186 union_pw_multi_aff::union_pw_multi_aff(isl::checked::pw_multi_aff pma)
12187 {
12188   auto res = isl_union_pw_multi_aff_from_pw_multi_aff(pma.release());
12189   ptr = res;
12190 }
12191 
union_pw_multi_aff(isl::checked::union_pw_aff upa)12192 union_pw_multi_aff::union_pw_multi_aff(isl::checked::union_pw_aff upa)
12193 {
12194   auto res = isl_union_pw_multi_aff_from_union_pw_aff(upa.release());
12195   ptr = res;
12196 }
12197 
union_pw_multi_aff(isl::checked::ctx ctx,const std::string & str)12198 union_pw_multi_aff::union_pw_multi_aff(isl::checked::ctx ctx, const std::string &str)
12199 {
12200   auto res = isl_union_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
12201   ptr = res;
12202 }
12203 
12204 union_pw_multi_aff &union_pw_multi_aff::operator=(union_pw_multi_aff obj) {
12205   std::swap(this->ptr, obj.ptr);
12206   return *this;
12207 }
12208 
~union_pw_multi_aff()12209 union_pw_multi_aff::~union_pw_multi_aff() {
12210   if (ptr)
12211     isl_union_pw_multi_aff_free(ptr);
12212 }
12213 
copy()12214 __isl_give isl_union_pw_multi_aff *union_pw_multi_aff::copy() const & {
12215   return isl_union_pw_multi_aff_copy(ptr);
12216 }
12217 
get()12218 __isl_keep isl_union_pw_multi_aff *union_pw_multi_aff::get() const {
12219   return ptr;
12220 }
12221 
release()12222 __isl_give isl_union_pw_multi_aff *union_pw_multi_aff::release() {
12223   isl_union_pw_multi_aff *tmp = ptr;
12224   ptr = nullptr;
12225   return tmp;
12226 }
12227 
is_null()12228 bool union_pw_multi_aff::is_null() const {
12229   return ptr == nullptr;
12230 }
12231 
ctx()12232 isl::checked::ctx union_pw_multi_aff::ctx() const {
12233   return isl::checked::ctx(isl_union_pw_multi_aff_get_ctx(ptr));
12234 }
12235 
add(isl::checked::union_pw_multi_aff upma2)12236 isl::checked::union_pw_multi_aff union_pw_multi_aff::add(isl::checked::union_pw_multi_aff upma2) const
12237 {
12238   auto res = isl_union_pw_multi_aff_add(copy(), upma2.release());
12239   return manage(res);
12240 }
12241 
apply(isl::checked::union_pw_multi_aff upma2)12242 isl::checked::union_pw_multi_aff union_pw_multi_aff::apply(isl::checked::union_pw_multi_aff upma2) const
12243 {
12244   auto res = isl_union_pw_multi_aff_apply_union_pw_multi_aff(copy(), upma2.release());
12245   return manage(res);
12246 }
12247 
as_pw_multi_aff()12248 isl::checked::pw_multi_aff union_pw_multi_aff::as_pw_multi_aff() const
12249 {
12250   auto res = isl_union_pw_multi_aff_as_pw_multi_aff(copy());
12251   return manage(res);
12252 }
12253 
coalesce()12254 isl::checked::union_pw_multi_aff union_pw_multi_aff::coalesce() const
12255 {
12256   auto res = isl_union_pw_multi_aff_coalesce(copy());
12257   return manage(res);
12258 }
12259 
domain()12260 isl::checked::union_set union_pw_multi_aff::domain() const
12261 {
12262   auto res = isl_union_pw_multi_aff_domain(copy());
12263   return manage(res);
12264 }
12265 
empty(isl::checked::ctx ctx)12266 isl::checked::union_pw_multi_aff union_pw_multi_aff::empty(isl::checked::ctx ctx)
12267 {
12268   auto res = isl_union_pw_multi_aff_empty_ctx(ctx.release());
12269   return manage(res);
12270 }
12271 
extract_pw_multi_aff(isl::checked::space space)12272 isl::checked::pw_multi_aff union_pw_multi_aff::extract_pw_multi_aff(isl::checked::space space) const
12273 {
12274   auto res = isl_union_pw_multi_aff_extract_pw_multi_aff(get(), space.release());
12275   return manage(res);
12276 }
12277 
flat_range_product(isl::checked::union_pw_multi_aff upma2)12278 isl::checked::union_pw_multi_aff union_pw_multi_aff::flat_range_product(isl::checked::union_pw_multi_aff upma2) const
12279 {
12280   auto res = isl_union_pw_multi_aff_flat_range_product(copy(), upma2.release());
12281   return manage(res);
12282 }
12283 
space()12284 isl::checked::space union_pw_multi_aff::space() const
12285 {
12286   auto res = isl_union_pw_multi_aff_get_space(get());
12287   return manage(res);
12288 }
12289 
get_space()12290 isl::checked::space union_pw_multi_aff::get_space() const
12291 {
12292   return space();
12293 }
12294 
gist(isl::checked::union_set context)12295 isl::checked::union_pw_multi_aff union_pw_multi_aff::gist(isl::checked::union_set context) const
12296 {
12297   auto res = isl_union_pw_multi_aff_gist(copy(), context.release());
12298   return manage(res);
12299 }
12300 
intersect_domain(isl::checked::space space)12301 isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain(isl::checked::space space) const
12302 {
12303   auto res = isl_union_pw_multi_aff_intersect_domain_space(copy(), space.release());
12304   return manage(res);
12305 }
12306 
intersect_domain(isl::checked::union_set uset)12307 isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain(isl::checked::union_set uset) const
12308 {
12309   auto res = isl_union_pw_multi_aff_intersect_domain_union_set(copy(), uset.release());
12310   return manage(res);
12311 }
12312 
intersect_domain_wrapped_domain(isl::checked::union_set uset)12313 isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain_wrapped_domain(isl::checked::union_set uset) const
12314 {
12315   auto res = isl_union_pw_multi_aff_intersect_domain_wrapped_domain(copy(), uset.release());
12316   return manage(res);
12317 }
12318 
intersect_domain_wrapped_range(isl::checked::union_set uset)12319 isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain_wrapped_range(isl::checked::union_set uset) const
12320 {
12321   auto res = isl_union_pw_multi_aff_intersect_domain_wrapped_range(copy(), uset.release());
12322   return manage(res);
12323 }
12324 
intersect_params(isl::checked::set set)12325 isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_params(isl::checked::set set) const
12326 {
12327   auto res = isl_union_pw_multi_aff_intersect_params(copy(), set.release());
12328   return manage(res);
12329 }
12330 
involves_locals()12331 boolean union_pw_multi_aff::involves_locals() const
12332 {
12333   auto res = isl_union_pw_multi_aff_involves_locals(get());
12334   return manage(res);
12335 }
12336 
isa_pw_multi_aff()12337 boolean union_pw_multi_aff::isa_pw_multi_aff() const
12338 {
12339   auto res = isl_union_pw_multi_aff_isa_pw_multi_aff(get());
12340   return manage(res);
12341 }
12342 
plain_is_empty()12343 boolean union_pw_multi_aff::plain_is_empty() const
12344 {
12345   auto res = isl_union_pw_multi_aff_plain_is_empty(get());
12346   return manage(res);
12347 }
12348 
preimage_domain_wrapped_domain(isl::checked::union_pw_multi_aff upma2)12349 isl::checked::union_pw_multi_aff union_pw_multi_aff::preimage_domain_wrapped_domain(isl::checked::union_pw_multi_aff upma2) const
12350 {
12351   auto res = isl_union_pw_multi_aff_preimage_domain_wrapped_domain_union_pw_multi_aff(copy(), upma2.release());
12352   return manage(res);
12353 }
12354 
pullback(isl::checked::union_pw_multi_aff upma2)12355 isl::checked::union_pw_multi_aff union_pw_multi_aff::pullback(isl::checked::union_pw_multi_aff upma2) const
12356 {
12357   auto res = isl_union_pw_multi_aff_pullback_union_pw_multi_aff(copy(), upma2.release());
12358   return manage(res);
12359 }
12360 
range_factor_domain()12361 isl::checked::union_pw_multi_aff union_pw_multi_aff::range_factor_domain() const
12362 {
12363   auto res = isl_union_pw_multi_aff_range_factor_domain(copy());
12364   return manage(res);
12365 }
12366 
range_factor_range()12367 isl::checked::union_pw_multi_aff union_pw_multi_aff::range_factor_range() const
12368 {
12369   auto res = isl_union_pw_multi_aff_range_factor_range(copy());
12370   return manage(res);
12371 }
12372 
range_product(isl::checked::union_pw_multi_aff upma2)12373 isl::checked::union_pw_multi_aff union_pw_multi_aff::range_product(isl::checked::union_pw_multi_aff upma2) const
12374 {
12375   auto res = isl_union_pw_multi_aff_range_product(copy(), upma2.release());
12376   return manage(res);
12377 }
12378 
sub(isl::checked::union_pw_multi_aff upma2)12379 isl::checked::union_pw_multi_aff union_pw_multi_aff::sub(isl::checked::union_pw_multi_aff upma2) const
12380 {
12381   auto res = isl_union_pw_multi_aff_sub(copy(), upma2.release());
12382   return manage(res);
12383 }
12384 
subtract_domain(isl::checked::space space)12385 isl::checked::union_pw_multi_aff union_pw_multi_aff::subtract_domain(isl::checked::space space) const
12386 {
12387   auto res = isl_union_pw_multi_aff_subtract_domain_space(copy(), space.release());
12388   return manage(res);
12389 }
12390 
subtract_domain(isl::checked::union_set uset)12391 isl::checked::union_pw_multi_aff union_pw_multi_aff::subtract_domain(isl::checked::union_set uset) const
12392 {
12393   auto res = isl_union_pw_multi_aff_subtract_domain_union_set(copy(), uset.release());
12394   return manage(res);
12395 }
12396 
union_add(isl::checked::union_pw_multi_aff upma2)12397 isl::checked::union_pw_multi_aff union_pw_multi_aff::union_add(isl::checked::union_pw_multi_aff upma2) const
12398 {
12399   auto res = isl_union_pw_multi_aff_union_add(copy(), upma2.release());
12400   return manage(res);
12401 }
12402 
12403 inline std::ostream &operator<<(std::ostream &os, const union_pw_multi_aff &obj)
12404 {
12405   char *str = isl_union_pw_multi_aff_to_str(obj.get());
12406   if (!str) {
12407     os.setstate(std::ios_base::badbit);
12408     return os;
12409   }
12410   os << str;
12411   free(str);
12412   return os;
12413 }
12414 
12415 // implementations for isl::union_set
manage(__isl_take isl_union_set * ptr)12416 union_set manage(__isl_take isl_union_set *ptr) {
12417   return union_set(ptr);
12418 }
manage_copy(__isl_keep isl_union_set * ptr)12419 union_set manage_copy(__isl_keep isl_union_set *ptr) {
12420   ptr = isl_union_set_copy(ptr);
12421   return union_set(ptr);
12422 }
12423 
union_set()12424 union_set::union_set()
12425     : ptr(nullptr) {}
12426 
union_set(const union_set & obj)12427 union_set::union_set(const union_set &obj)
12428     : ptr(nullptr)
12429 {
12430   ptr = obj.copy();
12431 }
12432 
union_set(__isl_take isl_union_set * ptr)12433 union_set::union_set(__isl_take isl_union_set *ptr)
12434     : ptr(ptr) {}
12435 
union_set(isl::checked::basic_set bset)12436 union_set::union_set(isl::checked::basic_set bset)
12437 {
12438   auto res = isl_union_set_from_basic_set(bset.release());
12439   ptr = res;
12440 }
12441 
union_set(isl::checked::point pnt)12442 union_set::union_set(isl::checked::point pnt)
12443 {
12444   auto res = isl_union_set_from_point(pnt.release());
12445   ptr = res;
12446 }
12447 
union_set(isl::checked::set set)12448 union_set::union_set(isl::checked::set set)
12449 {
12450   auto res = isl_union_set_from_set(set.release());
12451   ptr = res;
12452 }
12453 
union_set(isl::checked::ctx ctx,const std::string & str)12454 union_set::union_set(isl::checked::ctx ctx, const std::string &str)
12455 {
12456   auto res = isl_union_set_read_from_str(ctx.release(), str.c_str());
12457   ptr = res;
12458 }
12459 
12460 union_set &union_set::operator=(union_set obj) {
12461   std::swap(this->ptr, obj.ptr);
12462   return *this;
12463 }
12464 
~union_set()12465 union_set::~union_set() {
12466   if (ptr)
12467     isl_union_set_free(ptr);
12468 }
12469 
copy()12470 __isl_give isl_union_set *union_set::copy() const & {
12471   return isl_union_set_copy(ptr);
12472 }
12473 
get()12474 __isl_keep isl_union_set *union_set::get() const {
12475   return ptr;
12476 }
12477 
release()12478 __isl_give isl_union_set *union_set::release() {
12479   isl_union_set *tmp = ptr;
12480   ptr = nullptr;
12481   return tmp;
12482 }
12483 
is_null()12484 bool union_set::is_null() const {
12485   return ptr == nullptr;
12486 }
12487 
ctx()12488 isl::checked::ctx union_set::ctx() const {
12489   return isl::checked::ctx(isl_union_set_get_ctx(ptr));
12490 }
12491 
affine_hull()12492 isl::checked::union_set union_set::affine_hull() const
12493 {
12494   auto res = isl_union_set_affine_hull(copy());
12495   return manage(res);
12496 }
12497 
apply(isl::checked::union_map umap)12498 isl::checked::union_set union_set::apply(isl::checked::union_map umap) const
12499 {
12500   auto res = isl_union_set_apply(copy(), umap.release());
12501   return manage(res);
12502 }
12503 
coalesce()12504 isl::checked::union_set union_set::coalesce() const
12505 {
12506   auto res = isl_union_set_coalesce(copy());
12507   return manage(res);
12508 }
12509 
compute_divs()12510 isl::checked::union_set union_set::compute_divs() const
12511 {
12512   auto res = isl_union_set_compute_divs(copy());
12513   return manage(res);
12514 }
12515 
detect_equalities()12516 isl::checked::union_set union_set::detect_equalities() const
12517 {
12518   auto res = isl_union_set_detect_equalities(copy());
12519   return manage(res);
12520 }
12521 
empty(isl::checked::ctx ctx)12522 isl::checked::union_set union_set::empty(isl::checked::ctx ctx)
12523 {
12524   auto res = isl_union_set_empty_ctx(ctx.release());
12525   return manage(res);
12526 }
12527 
every_set(const std::function<boolean (isl::checked::set)> & test)12528 boolean union_set::every_set(const std::function<boolean(isl::checked::set)> &test) const
12529 {
12530   struct test_data {
12531     std::function<boolean(isl::checked::set)> func;
12532   } test_data = { test };
12533   auto test_lambda = [](isl_set *arg_0, void *arg_1) -> isl_bool {
12534     auto *data = static_cast<struct test_data *>(arg_1);
12535     auto ret = (data->func)(manage_copy(arg_0));
12536     return ret.release();
12537   };
12538   auto res = isl_union_set_every_set(get(), test_lambda, &test_data);
12539   return manage(res);
12540 }
12541 
extract_set(isl::checked::space space)12542 isl::checked::set union_set::extract_set(isl::checked::space space) const
12543 {
12544   auto res = isl_union_set_extract_set(get(), space.release());
12545   return manage(res);
12546 }
12547 
foreach_point(const std::function<stat (isl::checked::point)> & fn)12548 stat union_set::foreach_point(const std::function<stat(isl::checked::point)> &fn) const
12549 {
12550   struct fn_data {
12551     std::function<stat(isl::checked::point)> func;
12552   } fn_data = { fn };
12553   auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
12554     auto *data = static_cast<struct fn_data *>(arg_1);
12555     auto ret = (data->func)(manage(arg_0));
12556     return ret.release();
12557   };
12558   auto res = isl_union_set_foreach_point(get(), fn_lambda, &fn_data);
12559   return manage(res);
12560 }
12561 
foreach_set(const std::function<stat (isl::checked::set)> & fn)12562 stat union_set::foreach_set(const std::function<stat(isl::checked::set)> &fn) const
12563 {
12564   struct fn_data {
12565     std::function<stat(isl::checked::set)> func;
12566   } fn_data = { fn };
12567   auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat {
12568     auto *data = static_cast<struct fn_data *>(arg_1);
12569     auto ret = (data->func)(manage(arg_0));
12570     return ret.release();
12571   };
12572   auto res = isl_union_set_foreach_set(get(), fn_lambda, &fn_data);
12573   return manage(res);
12574 }
12575 
space()12576 isl::checked::space union_set::space() const
12577 {
12578   auto res = isl_union_set_get_space(get());
12579   return manage(res);
12580 }
12581 
get_space()12582 isl::checked::space union_set::get_space() const
12583 {
12584   return space();
12585 }
12586 
gist(isl::checked::union_set context)12587 isl::checked::union_set union_set::gist(isl::checked::union_set context) const
12588 {
12589   auto res = isl_union_set_gist(copy(), context.release());
12590   return manage(res);
12591 }
12592 
gist_params(isl::checked::set set)12593 isl::checked::union_set union_set::gist_params(isl::checked::set set) const
12594 {
12595   auto res = isl_union_set_gist_params(copy(), set.release());
12596   return manage(res);
12597 }
12598 
identity()12599 isl::checked::union_map union_set::identity() const
12600 {
12601   auto res = isl_union_set_identity(copy());
12602   return manage(res);
12603 }
12604 
intersect(isl::checked::union_set uset2)12605 isl::checked::union_set union_set::intersect(isl::checked::union_set uset2) const
12606 {
12607   auto res = isl_union_set_intersect(copy(), uset2.release());
12608   return manage(res);
12609 }
12610 
intersect_params(isl::checked::set set)12611 isl::checked::union_set union_set::intersect_params(isl::checked::set set) const
12612 {
12613   auto res = isl_union_set_intersect_params(copy(), set.release());
12614   return manage(res);
12615 }
12616 
is_disjoint(const isl::checked::union_set & uset2)12617 boolean union_set::is_disjoint(const isl::checked::union_set &uset2) const
12618 {
12619   auto res = isl_union_set_is_disjoint(get(), uset2.get());
12620   return manage(res);
12621 }
12622 
is_empty()12623 boolean union_set::is_empty() const
12624 {
12625   auto res = isl_union_set_is_empty(get());
12626   return manage(res);
12627 }
12628 
is_equal(const isl::checked::union_set & uset2)12629 boolean union_set::is_equal(const isl::checked::union_set &uset2) const
12630 {
12631   auto res = isl_union_set_is_equal(get(), uset2.get());
12632   return manage(res);
12633 }
12634 
is_strict_subset(const isl::checked::union_set & uset2)12635 boolean union_set::is_strict_subset(const isl::checked::union_set &uset2) const
12636 {
12637   auto res = isl_union_set_is_strict_subset(get(), uset2.get());
12638   return manage(res);
12639 }
12640 
is_subset(const isl::checked::union_set & uset2)12641 boolean union_set::is_subset(const isl::checked::union_set &uset2) const
12642 {
12643   auto res = isl_union_set_is_subset(get(), uset2.get());
12644   return manage(res);
12645 }
12646 
isa_set()12647 boolean union_set::isa_set() const
12648 {
12649   auto res = isl_union_set_isa_set(get());
12650   return manage(res);
12651 }
12652 
lexmax()12653 isl::checked::union_set union_set::lexmax() const
12654 {
12655   auto res = isl_union_set_lexmax(copy());
12656   return manage(res);
12657 }
12658 
lexmin()12659 isl::checked::union_set union_set::lexmin() const
12660 {
12661   auto res = isl_union_set_lexmin(copy());
12662   return manage(res);
12663 }
12664 
polyhedral_hull()12665 isl::checked::union_set union_set::polyhedral_hull() const
12666 {
12667   auto res = isl_union_set_polyhedral_hull(copy());
12668   return manage(res);
12669 }
12670 
preimage(isl::checked::multi_aff ma)12671 isl::checked::union_set union_set::preimage(isl::checked::multi_aff ma) const
12672 {
12673   auto res = isl_union_set_preimage_multi_aff(copy(), ma.release());
12674   return manage(res);
12675 }
12676 
preimage(isl::checked::pw_multi_aff pma)12677 isl::checked::union_set union_set::preimage(isl::checked::pw_multi_aff pma) const
12678 {
12679   auto res = isl_union_set_preimage_pw_multi_aff(copy(), pma.release());
12680   return manage(res);
12681 }
12682 
preimage(isl::checked::union_pw_multi_aff upma)12683 isl::checked::union_set union_set::preimage(isl::checked::union_pw_multi_aff upma) const
12684 {
12685   auto res = isl_union_set_preimage_union_pw_multi_aff(copy(), upma.release());
12686   return manage(res);
12687 }
12688 
sample_point()12689 isl::checked::point union_set::sample_point() const
12690 {
12691   auto res = isl_union_set_sample_point(copy());
12692   return manage(res);
12693 }
12694 
subtract(isl::checked::union_set uset2)12695 isl::checked::union_set union_set::subtract(isl::checked::union_set uset2) const
12696 {
12697   auto res = isl_union_set_subtract(copy(), uset2.release());
12698   return manage(res);
12699 }
12700 
unite(isl::checked::union_set uset2)12701 isl::checked::union_set union_set::unite(isl::checked::union_set uset2) const
12702 {
12703   auto res = isl_union_set_union(copy(), uset2.release());
12704   return manage(res);
12705 }
12706 
universe()12707 isl::checked::union_set union_set::universe() const
12708 {
12709   auto res = isl_union_set_universe(copy());
12710   return manage(res);
12711 }
12712 
unwrap()12713 isl::checked::union_map union_set::unwrap() const
12714 {
12715   auto res = isl_union_set_unwrap(copy());
12716   return manage(res);
12717 }
12718 
12719 inline std::ostream &operator<<(std::ostream &os, const union_set &obj)
12720 {
12721   char *str = isl_union_set_to_str(obj.get());
12722   if (!str) {
12723     os.setstate(std::ios_base::badbit);
12724     return os;
12725   }
12726   os << str;
12727   free(str);
12728   return os;
12729 }
12730 
12731 // implementations for isl::union_set_list
manage(__isl_take isl_union_set_list * ptr)12732 union_set_list manage(__isl_take isl_union_set_list *ptr) {
12733   return union_set_list(ptr);
12734 }
manage_copy(__isl_keep isl_union_set_list * ptr)12735 union_set_list manage_copy(__isl_keep isl_union_set_list *ptr) {
12736   ptr = isl_union_set_list_copy(ptr);
12737   return union_set_list(ptr);
12738 }
12739 
union_set_list()12740 union_set_list::union_set_list()
12741     : ptr(nullptr) {}
12742 
union_set_list(const union_set_list & obj)12743 union_set_list::union_set_list(const union_set_list &obj)
12744     : ptr(nullptr)
12745 {
12746   ptr = obj.copy();
12747 }
12748 
union_set_list(__isl_take isl_union_set_list * ptr)12749 union_set_list::union_set_list(__isl_take isl_union_set_list *ptr)
12750     : ptr(ptr) {}
12751 
union_set_list(isl::checked::ctx ctx,int n)12752 union_set_list::union_set_list(isl::checked::ctx ctx, int n)
12753 {
12754   auto res = isl_union_set_list_alloc(ctx.release(), n);
12755   ptr = res;
12756 }
12757 
union_set_list(isl::checked::union_set el)12758 union_set_list::union_set_list(isl::checked::union_set el)
12759 {
12760   auto res = isl_union_set_list_from_union_set(el.release());
12761   ptr = res;
12762 }
12763 
12764 union_set_list &union_set_list::operator=(union_set_list obj) {
12765   std::swap(this->ptr, obj.ptr);
12766   return *this;
12767 }
12768 
~union_set_list()12769 union_set_list::~union_set_list() {
12770   if (ptr)
12771     isl_union_set_list_free(ptr);
12772 }
12773 
copy()12774 __isl_give isl_union_set_list *union_set_list::copy() const & {
12775   return isl_union_set_list_copy(ptr);
12776 }
12777 
get()12778 __isl_keep isl_union_set_list *union_set_list::get() const {
12779   return ptr;
12780 }
12781 
release()12782 __isl_give isl_union_set_list *union_set_list::release() {
12783   isl_union_set_list *tmp = ptr;
12784   ptr = nullptr;
12785   return tmp;
12786 }
12787 
is_null()12788 bool union_set_list::is_null() const {
12789   return ptr == nullptr;
12790 }
12791 
ctx()12792 isl::checked::ctx union_set_list::ctx() const {
12793   return isl::checked::ctx(isl_union_set_list_get_ctx(ptr));
12794 }
12795 
add(isl::checked::union_set el)12796 isl::checked::union_set_list union_set_list::add(isl::checked::union_set el) const
12797 {
12798   auto res = isl_union_set_list_add(copy(), el.release());
12799   return manage(res);
12800 }
12801 
clear()12802 isl::checked::union_set_list union_set_list::clear() const
12803 {
12804   auto res = isl_union_set_list_clear(copy());
12805   return manage(res);
12806 }
12807 
concat(isl::checked::union_set_list list2)12808 isl::checked::union_set_list union_set_list::concat(isl::checked::union_set_list list2) const
12809 {
12810   auto res = isl_union_set_list_concat(copy(), list2.release());
12811   return manage(res);
12812 }
12813 
drop(unsigned int first,unsigned int n)12814 isl::checked::union_set_list union_set_list::drop(unsigned int first, unsigned int n) const
12815 {
12816   auto res = isl_union_set_list_drop(copy(), first, n);
12817   return manage(res);
12818 }
12819 
foreach(const std::function<stat (isl::checked::union_set)> & fn)12820 stat union_set_list::foreach(const std::function<stat(isl::checked::union_set)> &fn) const
12821 {
12822   struct fn_data {
12823     std::function<stat(isl::checked::union_set)> func;
12824   } fn_data = { fn };
12825   auto fn_lambda = [](isl_union_set *arg_0, void *arg_1) -> isl_stat {
12826     auto *data = static_cast<struct fn_data *>(arg_1);
12827     auto ret = (data->func)(manage(arg_0));
12828     return ret.release();
12829   };
12830   auto res = isl_union_set_list_foreach(get(), fn_lambda, &fn_data);
12831   return manage(res);
12832 }
12833 
at(int index)12834 isl::checked::union_set union_set_list::at(int index) const
12835 {
12836   auto res = isl_union_set_list_get_at(get(), index);
12837   return manage(res);
12838 }
12839 
get_at(int index)12840 isl::checked::union_set union_set_list::get_at(int index) const
12841 {
12842   return at(index);
12843 }
12844 
insert(unsigned int pos,isl::checked::union_set el)12845 isl::checked::union_set_list union_set_list::insert(unsigned int pos, isl::checked::union_set el) const
12846 {
12847   auto res = isl_union_set_list_insert(copy(), pos, el.release());
12848   return manage(res);
12849 }
12850 
size()12851 class size union_set_list::size() const
12852 {
12853   auto res = isl_union_set_list_size(get());
12854   return manage(res);
12855 }
12856 
12857 inline std::ostream &operator<<(std::ostream &os, const union_set_list &obj)
12858 {
12859   char *str = isl_union_set_list_to_str(obj.get());
12860   if (!str) {
12861     os.setstate(std::ios_base::badbit);
12862     return os;
12863   }
12864   os << str;
12865   free(str);
12866   return os;
12867 }
12868 
12869 // implementations for isl::val
manage(__isl_take isl_val * ptr)12870 val manage(__isl_take isl_val *ptr) {
12871   return val(ptr);
12872 }
manage_copy(__isl_keep isl_val * ptr)12873 val manage_copy(__isl_keep isl_val *ptr) {
12874   ptr = isl_val_copy(ptr);
12875   return val(ptr);
12876 }
12877 
val()12878 val::val()
12879     : ptr(nullptr) {}
12880 
val(const val & obj)12881 val::val(const val &obj)
12882     : ptr(nullptr)
12883 {
12884   ptr = obj.copy();
12885 }
12886 
val(__isl_take isl_val * ptr)12887 val::val(__isl_take isl_val *ptr)
12888     : ptr(ptr) {}
12889 
val(isl::checked::ctx ctx,long i)12890 val::val(isl::checked::ctx ctx, long i)
12891 {
12892   auto res = isl_val_int_from_si(ctx.release(), i);
12893   ptr = res;
12894 }
12895 
val(isl::checked::ctx ctx,const std::string & str)12896 val::val(isl::checked::ctx ctx, const std::string &str)
12897 {
12898   auto res = isl_val_read_from_str(ctx.release(), str.c_str());
12899   ptr = res;
12900 }
12901 
12902 val &val::operator=(val obj) {
12903   std::swap(this->ptr, obj.ptr);
12904   return *this;
12905 }
12906 
~val()12907 val::~val() {
12908   if (ptr)
12909     isl_val_free(ptr);
12910 }
12911 
copy()12912 __isl_give isl_val *val::copy() const & {
12913   return isl_val_copy(ptr);
12914 }
12915 
get()12916 __isl_keep isl_val *val::get() const {
12917   return ptr;
12918 }
12919 
release()12920 __isl_give isl_val *val::release() {
12921   isl_val *tmp = ptr;
12922   ptr = nullptr;
12923   return tmp;
12924 }
12925 
is_null()12926 bool val::is_null() const {
12927   return ptr == nullptr;
12928 }
12929 
ctx()12930 isl::checked::ctx val::ctx() const {
12931   return isl::checked::ctx(isl_val_get_ctx(ptr));
12932 }
12933 
abs()12934 isl::checked::val val::abs() const
12935 {
12936   auto res = isl_val_abs(copy());
12937   return manage(res);
12938 }
12939 
abs_eq(const isl::checked::val & v2)12940 boolean val::abs_eq(const isl::checked::val &v2) const
12941 {
12942   auto res = isl_val_abs_eq(get(), v2.get());
12943   return manage(res);
12944 }
12945 
abs_eq(long v2)12946 boolean val::abs_eq(long v2) const
12947 {
12948   return this->abs_eq(isl::checked::val(ctx(), v2));
12949 }
12950 
add(isl::checked::val v2)12951 isl::checked::val val::add(isl::checked::val v2) const
12952 {
12953   auto res = isl_val_add(copy(), v2.release());
12954   return manage(res);
12955 }
12956 
add(long v2)12957 isl::checked::val val::add(long v2) const
12958 {
12959   return this->add(isl::checked::val(ctx(), v2));
12960 }
12961 
ceil()12962 isl::checked::val val::ceil() const
12963 {
12964   auto res = isl_val_ceil(copy());
12965   return manage(res);
12966 }
12967 
cmp_si(long i)12968 int val::cmp_si(long i) const
12969 {
12970   auto res = isl_val_cmp_si(get(), i);
12971   return res;
12972 }
12973 
div(isl::checked::val v2)12974 isl::checked::val val::div(isl::checked::val v2) const
12975 {
12976   auto res = isl_val_div(copy(), v2.release());
12977   return manage(res);
12978 }
12979 
div(long v2)12980 isl::checked::val val::div(long v2) const
12981 {
12982   return this->div(isl::checked::val(ctx(), v2));
12983 }
12984 
eq(const isl::checked::val & v2)12985 boolean val::eq(const isl::checked::val &v2) const
12986 {
12987   auto res = isl_val_eq(get(), v2.get());
12988   return manage(res);
12989 }
12990 
eq(long v2)12991 boolean val::eq(long v2) const
12992 {
12993   return this->eq(isl::checked::val(ctx(), v2));
12994 }
12995 
floor()12996 isl::checked::val val::floor() const
12997 {
12998   auto res = isl_val_floor(copy());
12999   return manage(res);
13000 }
13001 
gcd(isl::checked::val v2)13002 isl::checked::val val::gcd(isl::checked::val v2) const
13003 {
13004   auto res = isl_val_gcd(copy(), v2.release());
13005   return manage(res);
13006 }
13007 
gcd(long v2)13008 isl::checked::val val::gcd(long v2) const
13009 {
13010   return this->gcd(isl::checked::val(ctx(), v2));
13011 }
13012 
ge(const isl::checked::val & v2)13013 boolean val::ge(const isl::checked::val &v2) const
13014 {
13015   auto res = isl_val_ge(get(), v2.get());
13016   return manage(res);
13017 }
13018 
ge(long v2)13019 boolean val::ge(long v2) const
13020 {
13021   return this->ge(isl::checked::val(ctx(), v2));
13022 }
13023 
den_si()13024 long val::den_si() const
13025 {
13026   auto res = isl_val_get_den_si(get());
13027   return res;
13028 }
13029 
get_den_si()13030 long val::get_den_si() const
13031 {
13032   return den_si();
13033 }
13034 
num_si()13035 long val::num_si() const
13036 {
13037   auto res = isl_val_get_num_si(get());
13038   return res;
13039 }
13040 
get_num_si()13041 long val::get_num_si() const
13042 {
13043   return num_si();
13044 }
13045 
gt(const isl::checked::val & v2)13046 boolean val::gt(const isl::checked::val &v2) const
13047 {
13048   auto res = isl_val_gt(get(), v2.get());
13049   return manage(res);
13050 }
13051 
gt(long v2)13052 boolean val::gt(long v2) const
13053 {
13054   return this->gt(isl::checked::val(ctx(), v2));
13055 }
13056 
infty(isl::checked::ctx ctx)13057 isl::checked::val val::infty(isl::checked::ctx ctx)
13058 {
13059   auto res = isl_val_infty(ctx.release());
13060   return manage(res);
13061 }
13062 
inv()13063 isl::checked::val val::inv() const
13064 {
13065   auto res = isl_val_inv(copy());
13066   return manage(res);
13067 }
13068 
is_divisible_by(const isl::checked::val & v2)13069 boolean val::is_divisible_by(const isl::checked::val &v2) const
13070 {
13071   auto res = isl_val_is_divisible_by(get(), v2.get());
13072   return manage(res);
13073 }
13074 
is_divisible_by(long v2)13075 boolean val::is_divisible_by(long v2) const
13076 {
13077   return this->is_divisible_by(isl::checked::val(ctx(), v2));
13078 }
13079 
is_infty()13080 boolean val::is_infty() const
13081 {
13082   auto res = isl_val_is_infty(get());
13083   return manage(res);
13084 }
13085 
is_int()13086 boolean val::is_int() const
13087 {
13088   auto res = isl_val_is_int(get());
13089   return manage(res);
13090 }
13091 
is_nan()13092 boolean val::is_nan() const
13093 {
13094   auto res = isl_val_is_nan(get());
13095   return manage(res);
13096 }
13097 
is_neg()13098 boolean val::is_neg() const
13099 {
13100   auto res = isl_val_is_neg(get());
13101   return manage(res);
13102 }
13103 
is_neginfty()13104 boolean val::is_neginfty() const
13105 {
13106   auto res = isl_val_is_neginfty(get());
13107   return manage(res);
13108 }
13109 
is_negone()13110 boolean val::is_negone() const
13111 {
13112   auto res = isl_val_is_negone(get());
13113   return manage(res);
13114 }
13115 
is_nonneg()13116 boolean val::is_nonneg() const
13117 {
13118   auto res = isl_val_is_nonneg(get());
13119   return manage(res);
13120 }
13121 
is_nonpos()13122 boolean val::is_nonpos() const
13123 {
13124   auto res = isl_val_is_nonpos(get());
13125   return manage(res);
13126 }
13127 
is_one()13128 boolean val::is_one() const
13129 {
13130   auto res = isl_val_is_one(get());
13131   return manage(res);
13132 }
13133 
is_pos()13134 boolean val::is_pos() const
13135 {
13136   auto res = isl_val_is_pos(get());
13137   return manage(res);
13138 }
13139 
is_rat()13140 boolean val::is_rat() const
13141 {
13142   auto res = isl_val_is_rat(get());
13143   return manage(res);
13144 }
13145 
is_zero()13146 boolean val::is_zero() const
13147 {
13148   auto res = isl_val_is_zero(get());
13149   return manage(res);
13150 }
13151 
le(const isl::checked::val & v2)13152 boolean val::le(const isl::checked::val &v2) const
13153 {
13154   auto res = isl_val_le(get(), v2.get());
13155   return manage(res);
13156 }
13157 
le(long v2)13158 boolean val::le(long v2) const
13159 {
13160   return this->le(isl::checked::val(ctx(), v2));
13161 }
13162 
lt(const isl::checked::val & v2)13163 boolean val::lt(const isl::checked::val &v2) const
13164 {
13165   auto res = isl_val_lt(get(), v2.get());
13166   return manage(res);
13167 }
13168 
lt(long v2)13169 boolean val::lt(long v2) const
13170 {
13171   return this->lt(isl::checked::val(ctx(), v2));
13172 }
13173 
max(isl::checked::val v2)13174 isl::checked::val val::max(isl::checked::val v2) const
13175 {
13176   auto res = isl_val_max(copy(), v2.release());
13177   return manage(res);
13178 }
13179 
max(long v2)13180 isl::checked::val val::max(long v2) const
13181 {
13182   return this->max(isl::checked::val(ctx(), v2));
13183 }
13184 
min(isl::checked::val v2)13185 isl::checked::val val::min(isl::checked::val v2) const
13186 {
13187   auto res = isl_val_min(copy(), v2.release());
13188   return manage(res);
13189 }
13190 
min(long v2)13191 isl::checked::val val::min(long v2) const
13192 {
13193   return this->min(isl::checked::val(ctx(), v2));
13194 }
13195 
mod(isl::checked::val v2)13196 isl::checked::val val::mod(isl::checked::val v2) const
13197 {
13198   auto res = isl_val_mod(copy(), v2.release());
13199   return manage(res);
13200 }
13201 
mod(long v2)13202 isl::checked::val val::mod(long v2) const
13203 {
13204   return this->mod(isl::checked::val(ctx(), v2));
13205 }
13206 
mul(isl::checked::val v2)13207 isl::checked::val val::mul(isl::checked::val v2) const
13208 {
13209   auto res = isl_val_mul(copy(), v2.release());
13210   return manage(res);
13211 }
13212 
mul(long v2)13213 isl::checked::val val::mul(long v2) const
13214 {
13215   return this->mul(isl::checked::val(ctx(), v2));
13216 }
13217 
nan(isl::checked::ctx ctx)13218 isl::checked::val val::nan(isl::checked::ctx ctx)
13219 {
13220   auto res = isl_val_nan(ctx.release());
13221   return manage(res);
13222 }
13223 
ne(const isl::checked::val & v2)13224 boolean val::ne(const isl::checked::val &v2) const
13225 {
13226   auto res = isl_val_ne(get(), v2.get());
13227   return manage(res);
13228 }
13229 
ne(long v2)13230 boolean val::ne(long v2) const
13231 {
13232   return this->ne(isl::checked::val(ctx(), v2));
13233 }
13234 
neg()13235 isl::checked::val val::neg() const
13236 {
13237   auto res = isl_val_neg(copy());
13238   return manage(res);
13239 }
13240 
neginfty(isl::checked::ctx ctx)13241 isl::checked::val val::neginfty(isl::checked::ctx ctx)
13242 {
13243   auto res = isl_val_neginfty(ctx.release());
13244   return manage(res);
13245 }
13246 
negone(isl::checked::ctx ctx)13247 isl::checked::val val::negone(isl::checked::ctx ctx)
13248 {
13249   auto res = isl_val_negone(ctx.release());
13250   return manage(res);
13251 }
13252 
one(isl::checked::ctx ctx)13253 isl::checked::val val::one(isl::checked::ctx ctx)
13254 {
13255   auto res = isl_val_one(ctx.release());
13256   return manage(res);
13257 }
13258 
pow2()13259 isl::checked::val val::pow2() const
13260 {
13261   auto res = isl_val_pow2(copy());
13262   return manage(res);
13263 }
13264 
sgn()13265 int val::sgn() const
13266 {
13267   auto res = isl_val_sgn(get());
13268   return res;
13269 }
13270 
sub(isl::checked::val v2)13271 isl::checked::val val::sub(isl::checked::val v2) const
13272 {
13273   auto res = isl_val_sub(copy(), v2.release());
13274   return manage(res);
13275 }
13276 
sub(long v2)13277 isl::checked::val val::sub(long v2) const
13278 {
13279   return this->sub(isl::checked::val(ctx(), v2));
13280 }
13281 
trunc()13282 isl::checked::val val::trunc() const
13283 {
13284   auto res = isl_val_trunc(copy());
13285   return manage(res);
13286 }
13287 
zero(isl::checked::ctx ctx)13288 isl::checked::val val::zero(isl::checked::ctx ctx)
13289 {
13290   auto res = isl_val_zero(ctx.release());
13291   return manage(res);
13292 }
13293 
13294 inline std::ostream &operator<<(std::ostream &os, const val &obj)
13295 {
13296   char *str = isl_val_to_str(obj.get());
13297   if (!str) {
13298     os.setstate(std::ios_base::badbit);
13299     return os;
13300   }
13301   os << str;
13302   free(str);
13303   return os;
13304 }
13305 
13306 // implementations for isl::val_list
manage(__isl_take isl_val_list * ptr)13307 val_list manage(__isl_take isl_val_list *ptr) {
13308   return val_list(ptr);
13309 }
manage_copy(__isl_keep isl_val_list * ptr)13310 val_list manage_copy(__isl_keep isl_val_list *ptr) {
13311   ptr = isl_val_list_copy(ptr);
13312   return val_list(ptr);
13313 }
13314 
val_list()13315 val_list::val_list()
13316     : ptr(nullptr) {}
13317 
val_list(const val_list & obj)13318 val_list::val_list(const val_list &obj)
13319     : ptr(nullptr)
13320 {
13321   ptr = obj.copy();
13322 }
13323 
val_list(__isl_take isl_val_list * ptr)13324 val_list::val_list(__isl_take isl_val_list *ptr)
13325     : ptr(ptr) {}
13326 
val_list(isl::checked::ctx ctx,int n)13327 val_list::val_list(isl::checked::ctx ctx, int n)
13328 {
13329   auto res = isl_val_list_alloc(ctx.release(), n);
13330   ptr = res;
13331 }
13332 
val_list(isl::checked::val el)13333 val_list::val_list(isl::checked::val el)
13334 {
13335   auto res = isl_val_list_from_val(el.release());
13336   ptr = res;
13337 }
13338 
13339 val_list &val_list::operator=(val_list obj) {
13340   std::swap(this->ptr, obj.ptr);
13341   return *this;
13342 }
13343 
~val_list()13344 val_list::~val_list() {
13345   if (ptr)
13346     isl_val_list_free(ptr);
13347 }
13348 
copy()13349 __isl_give isl_val_list *val_list::copy() const & {
13350   return isl_val_list_copy(ptr);
13351 }
13352 
get()13353 __isl_keep isl_val_list *val_list::get() const {
13354   return ptr;
13355 }
13356 
release()13357 __isl_give isl_val_list *val_list::release() {
13358   isl_val_list *tmp = ptr;
13359   ptr = nullptr;
13360   return tmp;
13361 }
13362 
is_null()13363 bool val_list::is_null() const {
13364   return ptr == nullptr;
13365 }
13366 
ctx()13367 isl::checked::ctx val_list::ctx() const {
13368   return isl::checked::ctx(isl_val_list_get_ctx(ptr));
13369 }
13370 
add(isl::checked::val el)13371 isl::checked::val_list val_list::add(isl::checked::val el) const
13372 {
13373   auto res = isl_val_list_add(copy(), el.release());
13374   return manage(res);
13375 }
13376 
add(long el)13377 isl::checked::val_list val_list::add(long el) const
13378 {
13379   return this->add(isl::checked::val(ctx(), el));
13380 }
13381 
clear()13382 isl::checked::val_list val_list::clear() const
13383 {
13384   auto res = isl_val_list_clear(copy());
13385   return manage(res);
13386 }
13387 
concat(isl::checked::val_list list2)13388 isl::checked::val_list val_list::concat(isl::checked::val_list list2) const
13389 {
13390   auto res = isl_val_list_concat(copy(), list2.release());
13391   return manage(res);
13392 }
13393 
drop(unsigned int first,unsigned int n)13394 isl::checked::val_list val_list::drop(unsigned int first, unsigned int n) const
13395 {
13396   auto res = isl_val_list_drop(copy(), first, n);
13397   return manage(res);
13398 }
13399 
foreach(const std::function<stat (isl::checked::val)> & fn)13400 stat val_list::foreach(const std::function<stat(isl::checked::val)> &fn) const
13401 {
13402   struct fn_data {
13403     std::function<stat(isl::checked::val)> func;
13404   } fn_data = { fn };
13405   auto fn_lambda = [](isl_val *arg_0, void *arg_1) -> isl_stat {
13406     auto *data = static_cast<struct fn_data *>(arg_1);
13407     auto ret = (data->func)(manage(arg_0));
13408     return ret.release();
13409   };
13410   auto res = isl_val_list_foreach(get(), fn_lambda, &fn_data);
13411   return manage(res);
13412 }
13413 
at(int index)13414 isl::checked::val val_list::at(int index) const
13415 {
13416   auto res = isl_val_list_get_at(get(), index);
13417   return manage(res);
13418 }
13419 
get_at(int index)13420 isl::checked::val val_list::get_at(int index) const
13421 {
13422   return at(index);
13423 }
13424 
insert(unsigned int pos,isl::checked::val el)13425 isl::checked::val_list val_list::insert(unsigned int pos, isl::checked::val el) const
13426 {
13427   auto res = isl_val_list_insert(copy(), pos, el.release());
13428   return manage(res);
13429 }
13430 
insert(unsigned int pos,long el)13431 isl::checked::val_list val_list::insert(unsigned int pos, long el) const
13432 {
13433   return this->insert(pos, isl::checked::val(ctx(), el));
13434 }
13435 
size()13436 class size val_list::size() const
13437 {
13438   auto res = isl_val_list_size(get());
13439   return manage(res);
13440 }
13441 
13442 inline std::ostream &operator<<(std::ostream &os, const val_list &obj)
13443 {
13444   char *str = isl_val_list_to_str(obj.get());
13445   if (!str) {
13446     os.setstate(std::ios_base::badbit);
13447     return os;
13448   }
13449   os << str;
13450   free(str);
13451   return os;
13452 }
13453 } // namespace checked
13454 } // namespace isl
13455 
13456 #endif /* ISL_CPP_CHECKED */
13457