blob: 4c3586d62fdf04864185e382c47c54fbec762008 [file] [log] [blame]
Olivier Deprezf4ef2d02021-04-20 13:36:24 +02001/// 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
35namespace isl {
36namespace 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 */
54struct checker {
55 bool checked = false;
56 ~checker() {
57 ISLPP_ASSERT(checked, "IMPLEMENTATION ERROR: Unchecked state");
58 }
59};
60
61class boolean {
62private:
63 mutable std::shared_ptr<checker> check = std::make_shared<checker>();
64 isl_bool val;
65
66 friend boolean manage(isl_bool val);
67 boolean(isl_bool val): val(val) {}
68public:
69 static boolean error() {
70 return boolean(isl_bool_error);
71 }
72 boolean()
73 : val(isl_bool_error) {}
74
75 /* implicit */ boolean(bool val)
76 : val(val ? isl_bool_true : isl_bool_false) {}
77
78 isl_bool release() {
79 auto tmp = val;
80 val = isl_bool_error;
81 check->checked = true;
82 return tmp;
83 }
84
85 bool is_error() const { check->checked = true; return val == isl_bool_error; }
86 bool is_false() const { check->checked = true; return val == isl_bool_false; }
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
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
108inline boolean manage(isl_bool val) {
109 return boolean(val);
110}
111
112class ctx {
113 isl_ctx *ptr;
114public:
115 /* implicit */ ctx(isl_ctx *ctx)
116 : ptr(ctx) {}
117 isl_ctx *release() {
118 auto tmp = ptr;
119 ptr = nullptr;
120 return tmp;
121 }
122 isl_ctx *get() {
123 return ptr;
124 }
125};
126
127/* Class encapsulating an isl_stat value.
128 */
129class stat {
130private:
131 mutable std::shared_ptr<checker> check = std::make_shared<checker>();
132 isl_stat val;
133
134 friend stat manage(isl_stat val);
135 stat(isl_stat val) : val(val) {}
136public:
137 static stat ok() {
138 return stat(isl_stat_ok);
139 }
140 static stat error() {
141 return stat(isl_stat_error);
142 }
143 stat() : val(isl_stat_error) {}
144
145 isl_stat release() {
146 check->checked = true;
147 return val;
148 }
149
150 bool is_error() const {
151 check->checked = true;
152 return val == isl_stat_error;
153 }
154 bool is_ok() const {
155 check->checked = true;
156 return val == isl_stat_ok;
157 }
158};
159
160inline stat manage(isl_stat val)
161{
162 return stat(val);
163}
164
165/* Class encapsulating an isl_size value.
166 */
167class size {
168private:
169 mutable std::shared_ptr<checker> check = std::make_shared<checker>();
170 isl_size val;
171
172 friend size manage(isl_size val);
173 size(isl_size val) : val(val) {}
174public:
175 size() : val(isl_size_error) {}
176
177 isl_size release() {
178 auto tmp = val;
179 val = isl_size_error;
180 check->checked = true;
181 return tmp;
182 }
183
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
198inline size manage(isl_size val)
199{
200 return size(val);
201}
202
203}
204} // namespace isl
205
206namespace isl {
207
208namespace checked {
209
210// forward declarations
211class aff;
212class aff_list;
213class ast_build;
214class ast_expr;
215class ast_expr_id;
216class ast_expr_int;
217class ast_expr_op;
218class ast_expr_op_access;
219class ast_expr_op_add;
220class ast_expr_op_address_of;
221class ast_expr_op_and;
222class ast_expr_op_and_then;
223class ast_expr_op_call;
224class ast_expr_op_cond;
225class ast_expr_op_div;
226class ast_expr_op_eq;
227class ast_expr_op_fdiv_q;
228class ast_expr_op_ge;
229class ast_expr_op_gt;
230class ast_expr_op_le;
231class ast_expr_op_lt;
232class ast_expr_op_max;
233class ast_expr_op_member;
234class ast_expr_op_min;
235class ast_expr_op_minus;
236class ast_expr_op_mul;
237class ast_expr_op_or;
238class ast_expr_op_or_else;
239class ast_expr_op_pdiv_q;
240class ast_expr_op_pdiv_r;
241class ast_expr_op_select;
242class ast_expr_op_sub;
243class ast_expr_op_zdiv_r;
244class ast_node;
245class ast_node_block;
246class ast_node_for;
247class ast_node_if;
248class ast_node_list;
249class ast_node_mark;
250class ast_node_user;
251class basic_map;
252class basic_set;
253class fixed_box;
254class id;
255class id_list;
256class map;
257class multi_aff;
258class multi_id;
259class multi_pw_aff;
260class multi_union_pw_aff;
261class multi_val;
262class point;
263class pw_aff;
264class pw_aff_list;
265class pw_multi_aff;
266class pw_multi_aff_list;
267class schedule;
268class schedule_constraints;
269class schedule_node;
270class schedule_node_band;
271class schedule_node_context;
272class schedule_node_domain;
273class schedule_node_expansion;
274class schedule_node_extension;
275class schedule_node_filter;
276class schedule_node_guard;
277class schedule_node_leaf;
278class schedule_node_mark;
279class schedule_node_sequence;
280class schedule_node_set;
281class set;
282class space;
283class union_access_info;
284class union_flow;
285class union_map;
286class union_pw_aff;
287class union_pw_aff_list;
288class union_pw_multi_aff;
289class union_set;
290class union_set_list;
291class val;
292class val_list;
293
294// declarations for isl::aff
295inline aff manage(__isl_take isl_aff *ptr);
296inline aff manage_copy(__isl_keep isl_aff *ptr);
297
298class aff {
299 friend inline aff manage(__isl_take isl_aff *ptr);
300 friend inline aff manage_copy(__isl_keep isl_aff *ptr);
301
302protected:
303 isl_aff *ptr = nullptr;
304
305 inline explicit aff(__isl_take isl_aff *ptr);
306
307public:
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::aff gist(isl::checked::set context) const;
332 inline isl::checked::set gt_set(isl::checked::aff aff2) const;
333 inline isl::checked::set le_set(isl::checked::aff aff2) const;
334 inline isl::checked::set lt_set(isl::checked::aff aff2) const;
335 inline isl::checked::aff mod(isl::checked::val mod) const;
336 inline isl::checked::aff mod(long mod) const;
337 inline isl::checked::aff mul(isl::checked::aff aff2) const;
338 inline isl::checked::set ne_set(isl::checked::aff aff2) const;
339 inline isl::checked::aff neg() const;
340 inline isl::checked::aff pullback(isl::checked::multi_aff ma) const;
341 inline isl::checked::aff scale(isl::checked::val v) const;
342 inline isl::checked::aff scale(long v) const;
343 inline isl::checked::aff scale_down(isl::checked::val v) const;
344 inline isl::checked::aff scale_down(long v) const;
345 inline isl::checked::aff sub(isl::checked::aff aff2) const;
346 inline isl::checked::aff unbind_params_insert_domain(isl::checked::multi_id domain) const;
347 static inline isl::checked::aff zero_on_domain(isl::checked::space space);
348};
349
350// declarations for isl::aff_list
351inline aff_list manage(__isl_take isl_aff_list *ptr);
352inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
353
354class aff_list {
355 friend inline aff_list manage(__isl_take isl_aff_list *ptr);
356 friend inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
357
358protected:
359 isl_aff_list *ptr = nullptr;
360
361 inline explicit aff_list(__isl_take isl_aff_list *ptr);
362
363public:
364 inline /* implicit */ aff_list();
365 inline /* implicit */ aff_list(const aff_list &obj);
366 inline explicit aff_list(isl::checked::ctx ctx, int n);
367 inline explicit aff_list(isl::checked::aff el);
368 inline aff_list &operator=(aff_list obj);
369 inline ~aff_list();
370 inline __isl_give isl_aff_list *copy() const &;
371 inline __isl_give isl_aff_list *copy() && = delete;
372 inline __isl_keep isl_aff_list *get() const;
373 inline __isl_give isl_aff_list *release();
374 inline bool is_null() const;
375 inline isl::checked::ctx ctx() const;
376
377 inline isl::checked::aff_list add(isl::checked::aff el) const;
378 inline isl::checked::aff_list clear() const;
379 inline isl::checked::aff_list concat(isl::checked::aff_list list2) const;
380 inline isl::checked::aff_list drop(unsigned int first, unsigned int n) const;
381 inline stat foreach(const std::function<stat(isl::checked::aff)> &fn) const;
382 inline isl::checked::aff at(int index) const;
383 inline isl::checked::aff get_at(int index) const;
384 inline isl::checked::aff_list insert(unsigned int pos, isl::checked::aff el) const;
385 inline class size size() const;
386};
387
388// declarations for isl::ast_build
389inline ast_build manage(__isl_take isl_ast_build *ptr);
390inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
391
392class ast_build {
393 friend inline ast_build manage(__isl_take isl_ast_build *ptr);
394 friend inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
395
396protected:
397 isl_ast_build *ptr = nullptr;
398
399 inline explicit ast_build(__isl_take isl_ast_build *ptr);
400
401public:
402 inline /* implicit */ ast_build();
403 inline /* implicit */ ast_build(const ast_build &obj);
404 inline explicit ast_build(isl::checked::ctx ctx);
405 inline ast_build &operator=(ast_build obj);
406 inline ~ast_build();
407 inline __isl_give isl_ast_build *copy() const &;
408 inline __isl_give isl_ast_build *copy() && = delete;
409 inline __isl_keep isl_ast_build *get() const;
410 inline __isl_give isl_ast_build *release();
411 inline bool is_null() const;
412 inline isl::checked::ctx ctx() const;
413
414private:
415 inline ast_build &copy_callbacks(const ast_build &obj);
416 struct at_each_domain_data {
417 std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> func;
418 };
419 std::shared_ptr<at_each_domain_data> at_each_domain_data;
420 static inline isl_ast_node *at_each_domain(isl_ast_node *arg_0, isl_ast_build *arg_1, void *arg_2);
421 inline void set_at_each_domain_data(const std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> &fn);
422public:
423 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;
424 inline isl::checked::ast_expr access_from(isl::checked::multi_pw_aff mpa) const;
425 inline isl::checked::ast_expr access_from(isl::checked::pw_multi_aff pma) const;
426 inline isl::checked::ast_expr call_from(isl::checked::multi_pw_aff mpa) const;
427 inline isl::checked::ast_expr call_from(isl::checked::pw_multi_aff pma) const;
428 inline isl::checked::ast_expr expr_from(isl::checked::pw_aff pa) const;
429 inline isl::checked::ast_expr expr_from(isl::checked::set set) const;
430 static inline isl::checked::ast_build from_context(isl::checked::set set);
431 inline isl::checked::union_map schedule() const;
432 inline isl::checked::union_map get_schedule() const;
433 inline isl::checked::ast_node node_from(isl::checked::schedule schedule) const;
434 inline isl::checked::ast_node node_from_schedule_map(isl::checked::union_map schedule) const;
435};
436
437// declarations for isl::ast_expr
438inline ast_expr manage(__isl_take isl_ast_expr *ptr);
439inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
440
441class ast_expr {
442 friend inline ast_expr manage(__isl_take isl_ast_expr *ptr);
443 friend inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
444
445protected:
446 isl_ast_expr *ptr = nullptr;
447
448 inline explicit ast_expr(__isl_take isl_ast_expr *ptr);
449
450public:
451 inline /* implicit */ ast_expr();
452 inline /* implicit */ ast_expr(const ast_expr &obj);
453 inline ast_expr &operator=(ast_expr obj);
454 inline ~ast_expr();
455 inline __isl_give isl_ast_expr *copy() const &;
456 inline __isl_give isl_ast_expr *copy() && = delete;
457 inline __isl_keep isl_ast_expr *get() const;
458 inline __isl_give isl_ast_expr *release();
459 inline bool is_null() const;
460private:
461 template <typename T,
462 typename = typename std::enable_if<std::is_same<
463 const decltype(isl_ast_expr_get_type(NULL)),
464 const T>::value>::type>
465 inline boolean isa_type(T subtype) const;
466public:
467 template <class T> inline boolean isa() const;
468 template <class T> inline T as() const;
469 inline isl::checked::ctx ctx() const;
470
471 inline std::string to_C_str() const;
472};
473
474// declarations for isl::ast_expr_id
475
476class ast_expr_id : public ast_expr {
477 template <class T>
478 friend boolean ast_expr::isa() const;
479 friend ast_expr_id ast_expr::as<ast_expr_id>() const;
480 static const auto type = isl_ast_expr_id;
481
482protected:
483 inline explicit ast_expr_id(__isl_take isl_ast_expr *ptr);
484
485public:
486 inline /* implicit */ ast_expr_id();
487 inline /* implicit */ ast_expr_id(const ast_expr_id &obj);
488 inline ast_expr_id &operator=(ast_expr_id obj);
489 inline isl::checked::ctx ctx() const;
490
491 inline isl::checked::id id() const;
492 inline isl::checked::id get_id() const;
493};
494
495// declarations for isl::ast_expr_int
496
497class ast_expr_int : public ast_expr {
498 template <class T>
499 friend boolean ast_expr::isa() const;
500 friend ast_expr_int ast_expr::as<ast_expr_int>() const;
501 static const auto type = isl_ast_expr_int;
502
503protected:
504 inline explicit ast_expr_int(__isl_take isl_ast_expr *ptr);
505
506public:
507 inline /* implicit */ ast_expr_int();
508 inline /* implicit */ ast_expr_int(const ast_expr_int &obj);
509 inline ast_expr_int &operator=(ast_expr_int obj);
510 inline isl::checked::ctx ctx() const;
511
512 inline isl::checked::val val() const;
513 inline isl::checked::val get_val() const;
514};
515
516// declarations for isl::ast_expr_op
517
518class ast_expr_op : public ast_expr {
519 template <class T>
520 friend boolean ast_expr::isa() const;
521 friend ast_expr_op ast_expr::as<ast_expr_op>() const;
522 static const auto type = isl_ast_expr_op;
523
524protected:
525 inline explicit ast_expr_op(__isl_take isl_ast_expr *ptr);
526
527public:
528 inline /* implicit */ ast_expr_op();
529 inline /* implicit */ ast_expr_op(const ast_expr_op &obj);
530 inline ast_expr_op &operator=(ast_expr_op obj);
531private:
532 template <typename T,
533 typename = typename std::enable_if<std::is_same<
534 const decltype(isl_ast_expr_op_get_type(NULL)),
535 const T>::value>::type>
536 inline boolean isa_type(T subtype) const;
537public:
538 template <class T> inline boolean isa() const;
539 template <class T> inline T as() const;
540 inline isl::checked::ctx ctx() const;
541
542 inline isl::checked::ast_expr arg(int pos) const;
543 inline isl::checked::ast_expr get_arg(int pos) const;
544 inline class size n_arg() const;
545 inline class size get_n_arg() const;
546};
547
548// declarations for isl::ast_expr_op_access
549
550class ast_expr_op_access : public ast_expr_op {
551 template <class T>
552 friend boolean ast_expr_op::isa() const;
553 friend ast_expr_op_access ast_expr_op::as<ast_expr_op_access>() const;
554 static const auto type = isl_ast_expr_op_access;
555
556protected:
557 inline explicit ast_expr_op_access(__isl_take isl_ast_expr *ptr);
558
559public:
560 inline /* implicit */ ast_expr_op_access();
561 inline /* implicit */ ast_expr_op_access(const ast_expr_op_access &obj);
562 inline ast_expr_op_access &operator=(ast_expr_op_access obj);
563 inline isl::checked::ctx ctx() const;
564
565};
566
567// declarations for isl::ast_expr_op_add
568
569class ast_expr_op_add : public ast_expr_op {
570 template <class T>
571 friend boolean ast_expr_op::isa() const;
572 friend ast_expr_op_add ast_expr_op::as<ast_expr_op_add>() const;
573 static const auto type = isl_ast_expr_op_add;
574
575protected:
576 inline explicit ast_expr_op_add(__isl_take isl_ast_expr *ptr);
577
578public:
579 inline /* implicit */ ast_expr_op_add();
580 inline /* implicit */ ast_expr_op_add(const ast_expr_op_add &obj);
581 inline ast_expr_op_add &operator=(ast_expr_op_add obj);
582 inline isl::checked::ctx ctx() const;
583
584};
585
586// declarations for isl::ast_expr_op_address_of
587
588class ast_expr_op_address_of : public ast_expr_op {
589 template <class T>
590 friend boolean ast_expr_op::isa() const;
591 friend ast_expr_op_address_of ast_expr_op::as<ast_expr_op_address_of>() const;
592 static const auto type = isl_ast_expr_op_address_of;
593
594protected:
595 inline explicit ast_expr_op_address_of(__isl_take isl_ast_expr *ptr);
596
597public:
598 inline /* implicit */ ast_expr_op_address_of();
599 inline /* implicit */ ast_expr_op_address_of(const ast_expr_op_address_of &obj);
600 inline ast_expr_op_address_of &operator=(ast_expr_op_address_of obj);
601 inline isl::checked::ctx ctx() const;
602
603};
604
605// declarations for isl::ast_expr_op_and
606
607class ast_expr_op_and : public ast_expr_op {
608 template <class T>
609 friend boolean ast_expr_op::isa() const;
610 friend ast_expr_op_and ast_expr_op::as<ast_expr_op_and>() const;
611 static const auto type = isl_ast_expr_op_and;
612
613protected:
614 inline explicit ast_expr_op_and(__isl_take isl_ast_expr *ptr);
615
616public:
617 inline /* implicit */ ast_expr_op_and();
618 inline /* implicit */ ast_expr_op_and(const ast_expr_op_and &obj);
619 inline ast_expr_op_and &operator=(ast_expr_op_and obj);
620 inline isl::checked::ctx ctx() const;
621
622};
623
624// declarations for isl::ast_expr_op_and_then
625
626class ast_expr_op_and_then : public ast_expr_op {
627 template <class T>
628 friend boolean ast_expr_op::isa() const;
629 friend ast_expr_op_and_then ast_expr_op::as<ast_expr_op_and_then>() const;
630 static const auto type = isl_ast_expr_op_and_then;
631
632protected:
633 inline explicit ast_expr_op_and_then(__isl_take isl_ast_expr *ptr);
634
635public:
636 inline /* implicit */ ast_expr_op_and_then();
637 inline /* implicit */ ast_expr_op_and_then(const ast_expr_op_and_then &obj);
638 inline ast_expr_op_and_then &operator=(ast_expr_op_and_then obj);
639 inline isl::checked::ctx ctx() const;
640
641};
642
643// declarations for isl::ast_expr_op_call
644
645class ast_expr_op_call : public ast_expr_op {
646 template <class T>
647 friend boolean ast_expr_op::isa() const;
648 friend ast_expr_op_call ast_expr_op::as<ast_expr_op_call>() const;
649 static const auto type = isl_ast_expr_op_call;
650
651protected:
652 inline explicit ast_expr_op_call(__isl_take isl_ast_expr *ptr);
653
654public:
655 inline /* implicit */ ast_expr_op_call();
656 inline /* implicit */ ast_expr_op_call(const ast_expr_op_call &obj);
657 inline ast_expr_op_call &operator=(ast_expr_op_call obj);
658 inline isl::checked::ctx ctx() const;
659
660};
661
662// declarations for isl::ast_expr_op_cond
663
664class ast_expr_op_cond : public ast_expr_op {
665 template <class T>
666 friend boolean ast_expr_op::isa() const;
667 friend ast_expr_op_cond ast_expr_op::as<ast_expr_op_cond>() const;
668 static const auto type = isl_ast_expr_op_cond;
669
670protected:
671 inline explicit ast_expr_op_cond(__isl_take isl_ast_expr *ptr);
672
673public:
674 inline /* implicit */ ast_expr_op_cond();
675 inline /* implicit */ ast_expr_op_cond(const ast_expr_op_cond &obj);
676 inline ast_expr_op_cond &operator=(ast_expr_op_cond obj);
677 inline isl::checked::ctx ctx() const;
678
679};
680
681// declarations for isl::ast_expr_op_div
682
683class ast_expr_op_div : public ast_expr_op {
684 template <class T>
685 friend boolean ast_expr_op::isa() const;
686 friend ast_expr_op_div ast_expr_op::as<ast_expr_op_div>() const;
687 static const auto type = isl_ast_expr_op_div;
688
689protected:
690 inline explicit ast_expr_op_div(__isl_take isl_ast_expr *ptr);
691
692public:
693 inline /* implicit */ ast_expr_op_div();
694 inline /* implicit */ ast_expr_op_div(const ast_expr_op_div &obj);
695 inline ast_expr_op_div &operator=(ast_expr_op_div obj);
696 inline isl::checked::ctx ctx() const;
697
698};
699
700// declarations for isl::ast_expr_op_eq
701
702class ast_expr_op_eq : public ast_expr_op {
703 template <class T>
704 friend boolean ast_expr_op::isa() const;
705 friend ast_expr_op_eq ast_expr_op::as<ast_expr_op_eq>() const;
706 static const auto type = isl_ast_expr_op_eq;
707
708protected:
709 inline explicit ast_expr_op_eq(__isl_take isl_ast_expr *ptr);
710
711public:
712 inline /* implicit */ ast_expr_op_eq();
713 inline /* implicit */ ast_expr_op_eq(const ast_expr_op_eq &obj);
714 inline ast_expr_op_eq &operator=(ast_expr_op_eq obj);
715 inline isl::checked::ctx ctx() const;
716
717};
718
719// declarations for isl::ast_expr_op_fdiv_q
720
721class ast_expr_op_fdiv_q : public ast_expr_op {
722 template <class T>
723 friend boolean ast_expr_op::isa() const;
724 friend ast_expr_op_fdiv_q ast_expr_op::as<ast_expr_op_fdiv_q>() const;
725 static const auto type = isl_ast_expr_op_fdiv_q;
726
727protected:
728 inline explicit ast_expr_op_fdiv_q(__isl_take isl_ast_expr *ptr);
729
730public:
731 inline /* implicit */ ast_expr_op_fdiv_q();
732 inline /* implicit */ ast_expr_op_fdiv_q(const ast_expr_op_fdiv_q &obj);
733 inline ast_expr_op_fdiv_q &operator=(ast_expr_op_fdiv_q obj);
734 inline isl::checked::ctx ctx() const;
735
736};
737
738// declarations for isl::ast_expr_op_ge
739
740class ast_expr_op_ge : public ast_expr_op {
741 template <class T>
742 friend boolean ast_expr_op::isa() const;
743 friend ast_expr_op_ge ast_expr_op::as<ast_expr_op_ge>() const;
744 static const auto type = isl_ast_expr_op_ge;
745
746protected:
747 inline explicit ast_expr_op_ge(__isl_take isl_ast_expr *ptr);
748
749public:
750 inline /* implicit */ ast_expr_op_ge();
751 inline /* implicit */ ast_expr_op_ge(const ast_expr_op_ge &obj);
752 inline ast_expr_op_ge &operator=(ast_expr_op_ge obj);
753 inline isl::checked::ctx ctx() const;
754
755};
756
757// declarations for isl::ast_expr_op_gt
758
759class ast_expr_op_gt : public ast_expr_op {
760 template <class T>
761 friend boolean ast_expr_op::isa() const;
762 friend ast_expr_op_gt ast_expr_op::as<ast_expr_op_gt>() const;
763 static const auto type = isl_ast_expr_op_gt;
764
765protected:
766 inline explicit ast_expr_op_gt(__isl_take isl_ast_expr *ptr);
767
768public:
769 inline /* implicit */ ast_expr_op_gt();
770 inline /* implicit */ ast_expr_op_gt(const ast_expr_op_gt &obj);
771 inline ast_expr_op_gt &operator=(ast_expr_op_gt obj);
772 inline isl::checked::ctx ctx() const;
773
774};
775
776// declarations for isl::ast_expr_op_le
777
778class ast_expr_op_le : public ast_expr_op {
779 template <class T>
780 friend boolean ast_expr_op::isa() const;
781 friend ast_expr_op_le ast_expr_op::as<ast_expr_op_le>() const;
782 static const auto type = isl_ast_expr_op_le;
783
784protected:
785 inline explicit ast_expr_op_le(__isl_take isl_ast_expr *ptr);
786
787public:
788 inline /* implicit */ ast_expr_op_le();
789 inline /* implicit */ ast_expr_op_le(const ast_expr_op_le &obj);
790 inline ast_expr_op_le &operator=(ast_expr_op_le obj);
791 inline isl::checked::ctx ctx() const;
792
793};
794
795// declarations for isl::ast_expr_op_lt
796
797class ast_expr_op_lt : public ast_expr_op {
798 template <class T>
799 friend boolean ast_expr_op::isa() const;
800 friend ast_expr_op_lt ast_expr_op::as<ast_expr_op_lt>() const;
801 static const auto type = isl_ast_expr_op_lt;
802
803protected:
804 inline explicit ast_expr_op_lt(__isl_take isl_ast_expr *ptr);
805
806public:
807 inline /* implicit */ ast_expr_op_lt();
808 inline /* implicit */ ast_expr_op_lt(const ast_expr_op_lt &obj);
809 inline ast_expr_op_lt &operator=(ast_expr_op_lt obj);
810 inline isl::checked::ctx ctx() const;
811
812};
813
814// declarations for isl::ast_expr_op_max
815
816class ast_expr_op_max : public ast_expr_op {
817 template <class T>
818 friend boolean ast_expr_op::isa() const;
819 friend ast_expr_op_max ast_expr_op::as<ast_expr_op_max>() const;
820 static const auto type = isl_ast_expr_op_max;
821
822protected:
823 inline explicit ast_expr_op_max(__isl_take isl_ast_expr *ptr);
824
825public:
826 inline /* implicit */ ast_expr_op_max();
827 inline /* implicit */ ast_expr_op_max(const ast_expr_op_max &obj);
828 inline ast_expr_op_max &operator=(ast_expr_op_max obj);
829 inline isl::checked::ctx ctx() const;
830
831};
832
833// declarations for isl::ast_expr_op_member
834
835class ast_expr_op_member : public ast_expr_op {
836 template <class T>
837 friend boolean ast_expr_op::isa() const;
838 friend ast_expr_op_member ast_expr_op::as<ast_expr_op_member>() const;
839 static const auto type = isl_ast_expr_op_member;
840
841protected:
842 inline explicit ast_expr_op_member(__isl_take isl_ast_expr *ptr);
843
844public:
845 inline /* implicit */ ast_expr_op_member();
846 inline /* implicit */ ast_expr_op_member(const ast_expr_op_member &obj);
847 inline ast_expr_op_member &operator=(ast_expr_op_member obj);
848 inline isl::checked::ctx ctx() const;
849
850};
851
852// declarations for isl::ast_expr_op_min
853
854class ast_expr_op_min : public ast_expr_op {
855 template <class T>
856 friend boolean ast_expr_op::isa() const;
857 friend ast_expr_op_min ast_expr_op::as<ast_expr_op_min>() const;
858 static const auto type = isl_ast_expr_op_min;
859
860protected:
861 inline explicit ast_expr_op_min(__isl_take isl_ast_expr *ptr);
862
863public:
864 inline /* implicit */ ast_expr_op_min();
865 inline /* implicit */ ast_expr_op_min(const ast_expr_op_min &obj);
866 inline ast_expr_op_min &operator=(ast_expr_op_min obj);
867 inline isl::checked::ctx ctx() const;
868
869};
870
871// declarations for isl::ast_expr_op_minus
872
873class ast_expr_op_minus : public ast_expr_op {
874 template <class T>
875 friend boolean ast_expr_op::isa() const;
876 friend ast_expr_op_minus ast_expr_op::as<ast_expr_op_minus>() const;
877 static const auto type = isl_ast_expr_op_minus;
878
879protected:
880 inline explicit ast_expr_op_minus(__isl_take isl_ast_expr *ptr);
881
882public:
883 inline /* implicit */ ast_expr_op_minus();
884 inline /* implicit */ ast_expr_op_minus(const ast_expr_op_minus &obj);
885 inline ast_expr_op_minus &operator=(ast_expr_op_minus obj);
886 inline isl::checked::ctx ctx() const;
887
888};
889
890// declarations for isl::ast_expr_op_mul
891
892class ast_expr_op_mul : public ast_expr_op {
893 template <class T>
894 friend boolean ast_expr_op::isa() const;
895 friend ast_expr_op_mul ast_expr_op::as<ast_expr_op_mul>() const;
896 static const auto type = isl_ast_expr_op_mul;
897
898protected:
899 inline explicit ast_expr_op_mul(__isl_take isl_ast_expr *ptr);
900
901public:
902 inline /* implicit */ ast_expr_op_mul();
903 inline /* implicit */ ast_expr_op_mul(const ast_expr_op_mul &obj);
904 inline ast_expr_op_mul &operator=(ast_expr_op_mul obj);
905 inline isl::checked::ctx ctx() const;
906
907};
908
909// declarations for isl::ast_expr_op_or
910
911class ast_expr_op_or : public ast_expr_op {
912 template <class T>
913 friend boolean ast_expr_op::isa() const;
914 friend ast_expr_op_or ast_expr_op::as<ast_expr_op_or>() const;
915 static const auto type = isl_ast_expr_op_or;
916
917protected:
918 inline explicit ast_expr_op_or(__isl_take isl_ast_expr *ptr);
919
920public:
921 inline /* implicit */ ast_expr_op_or();
922 inline /* implicit */ ast_expr_op_or(const ast_expr_op_or &obj);
923 inline ast_expr_op_or &operator=(ast_expr_op_or obj);
924 inline isl::checked::ctx ctx() const;
925
926};
927
928// declarations for isl::ast_expr_op_or_else
929
930class ast_expr_op_or_else : public ast_expr_op {
931 template <class T>
932 friend boolean ast_expr_op::isa() const;
933 friend ast_expr_op_or_else ast_expr_op::as<ast_expr_op_or_else>() const;
934 static const auto type = isl_ast_expr_op_or_else;
935
936protected:
937 inline explicit ast_expr_op_or_else(__isl_take isl_ast_expr *ptr);
938
939public:
940 inline /* implicit */ ast_expr_op_or_else();
941 inline /* implicit */ ast_expr_op_or_else(const ast_expr_op_or_else &obj);
942 inline ast_expr_op_or_else &operator=(ast_expr_op_or_else obj);
943 inline isl::checked::ctx ctx() const;
944
945};
946
947// declarations for isl::ast_expr_op_pdiv_q
948
949class ast_expr_op_pdiv_q : public ast_expr_op {
950 template <class T>
951 friend boolean ast_expr_op::isa() const;
952 friend ast_expr_op_pdiv_q ast_expr_op::as<ast_expr_op_pdiv_q>() const;
953 static const auto type = isl_ast_expr_op_pdiv_q;
954
955protected:
956 inline explicit ast_expr_op_pdiv_q(__isl_take isl_ast_expr *ptr);
957
958public:
959 inline /* implicit */ ast_expr_op_pdiv_q();
960 inline /* implicit */ ast_expr_op_pdiv_q(const ast_expr_op_pdiv_q &obj);
961 inline ast_expr_op_pdiv_q &operator=(ast_expr_op_pdiv_q obj);
962 inline isl::checked::ctx ctx() const;
963
964};
965
966// declarations for isl::ast_expr_op_pdiv_r
967
968class ast_expr_op_pdiv_r : public ast_expr_op {
969 template <class T>
970 friend boolean ast_expr_op::isa() const;
971 friend ast_expr_op_pdiv_r ast_expr_op::as<ast_expr_op_pdiv_r>() const;
972 static const auto type = isl_ast_expr_op_pdiv_r;
973
974protected:
975 inline explicit ast_expr_op_pdiv_r(__isl_take isl_ast_expr *ptr);
976
977public:
978 inline /* implicit */ ast_expr_op_pdiv_r();
979 inline /* implicit */ ast_expr_op_pdiv_r(const ast_expr_op_pdiv_r &obj);
980 inline ast_expr_op_pdiv_r &operator=(ast_expr_op_pdiv_r obj);
981 inline isl::checked::ctx ctx() const;
982
983};
984
985// declarations for isl::ast_expr_op_select
986
987class ast_expr_op_select : public ast_expr_op {
988 template <class T>
989 friend boolean ast_expr_op::isa() const;
990 friend ast_expr_op_select ast_expr_op::as<ast_expr_op_select>() const;
991 static const auto type = isl_ast_expr_op_select;
992
993protected:
994 inline explicit ast_expr_op_select(__isl_take isl_ast_expr *ptr);
995
996public:
997 inline /* implicit */ ast_expr_op_select();
998 inline /* implicit */ ast_expr_op_select(const ast_expr_op_select &obj);
999 inline ast_expr_op_select &operator=(ast_expr_op_select obj);
1000 inline isl::checked::ctx ctx() const;
1001
1002};
1003
1004// declarations for isl::ast_expr_op_sub
1005
1006class ast_expr_op_sub : public ast_expr_op {
1007 template <class T>
1008 friend boolean ast_expr_op::isa() const;
1009 friend ast_expr_op_sub ast_expr_op::as<ast_expr_op_sub>() const;
1010 static const auto type = isl_ast_expr_op_sub;
1011
1012protected:
1013 inline explicit ast_expr_op_sub(__isl_take isl_ast_expr *ptr);
1014
1015public:
1016 inline /* implicit */ ast_expr_op_sub();
1017 inline /* implicit */ ast_expr_op_sub(const ast_expr_op_sub &obj);
1018 inline ast_expr_op_sub &operator=(ast_expr_op_sub obj);
1019 inline isl::checked::ctx ctx() const;
1020
1021};
1022
1023// declarations for isl::ast_expr_op_zdiv_r
1024
1025class ast_expr_op_zdiv_r : public ast_expr_op {
1026 template <class T>
1027 friend boolean ast_expr_op::isa() const;
1028 friend ast_expr_op_zdiv_r ast_expr_op::as<ast_expr_op_zdiv_r>() const;
1029 static const auto type = isl_ast_expr_op_zdiv_r;
1030
1031protected:
1032 inline explicit ast_expr_op_zdiv_r(__isl_take isl_ast_expr *ptr);
1033
1034public:
1035 inline /* implicit */ ast_expr_op_zdiv_r();
1036 inline /* implicit */ ast_expr_op_zdiv_r(const ast_expr_op_zdiv_r &obj);
1037 inline ast_expr_op_zdiv_r &operator=(ast_expr_op_zdiv_r obj);
1038 inline isl::checked::ctx ctx() const;
1039
1040};
1041
1042// declarations for isl::ast_node
1043inline ast_node manage(__isl_take isl_ast_node *ptr);
1044inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
1045
1046class ast_node {
1047 friend inline ast_node manage(__isl_take isl_ast_node *ptr);
1048 friend inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
1049
1050protected:
1051 isl_ast_node *ptr = nullptr;
1052
1053 inline explicit ast_node(__isl_take isl_ast_node *ptr);
1054
1055public:
1056 inline /* implicit */ ast_node();
1057 inline /* implicit */ ast_node(const ast_node &obj);
1058 inline ast_node &operator=(ast_node obj);
1059 inline ~ast_node();
1060 inline __isl_give isl_ast_node *copy() const &;
1061 inline __isl_give isl_ast_node *copy() && = delete;
1062 inline __isl_keep isl_ast_node *get() const;
1063 inline __isl_give isl_ast_node *release();
1064 inline bool is_null() const;
1065private:
1066 template <typename T,
1067 typename = typename std::enable_if<std::is_same<
1068 const decltype(isl_ast_node_get_type(NULL)),
1069 const T>::value>::type>
1070 inline boolean isa_type(T subtype) const;
1071public:
1072 template <class T> inline boolean isa() const;
1073 template <class T> inline T as() const;
1074 inline isl::checked::ctx ctx() const;
1075
1076 inline std::string to_C_str() const;
1077};
1078
1079// declarations for isl::ast_node_block
1080
1081class ast_node_block : public ast_node {
1082 template <class T>
1083 friend boolean ast_node::isa() const;
1084 friend ast_node_block ast_node::as<ast_node_block>() const;
1085 static const auto type = isl_ast_node_block;
1086
1087protected:
1088 inline explicit ast_node_block(__isl_take isl_ast_node *ptr);
1089
1090public:
1091 inline /* implicit */ ast_node_block();
1092 inline /* implicit */ ast_node_block(const ast_node_block &obj);
1093 inline ast_node_block &operator=(ast_node_block obj);
1094 inline isl::checked::ctx ctx() const;
1095
1096 inline isl::checked::ast_node_list children() const;
1097 inline isl::checked::ast_node_list get_children() const;
1098};
1099
1100// declarations for isl::ast_node_for
1101
1102class ast_node_for : public ast_node {
1103 template <class T>
1104 friend boolean ast_node::isa() const;
1105 friend ast_node_for ast_node::as<ast_node_for>() const;
1106 static const auto type = isl_ast_node_for;
1107
1108protected:
1109 inline explicit ast_node_for(__isl_take isl_ast_node *ptr);
1110
1111public:
1112 inline /* implicit */ ast_node_for();
1113 inline /* implicit */ ast_node_for(const ast_node_for &obj);
1114 inline ast_node_for &operator=(ast_node_for obj);
1115 inline isl::checked::ctx ctx() const;
1116
1117 inline isl::checked::ast_node body() const;
1118 inline isl::checked::ast_node get_body() const;
1119 inline isl::checked::ast_expr cond() const;
1120 inline isl::checked::ast_expr get_cond() const;
1121 inline isl::checked::ast_expr inc() const;
1122 inline isl::checked::ast_expr get_inc() const;
1123 inline isl::checked::ast_expr init() const;
1124 inline isl::checked::ast_expr get_init() const;
1125 inline isl::checked::ast_expr iterator() const;
1126 inline isl::checked::ast_expr get_iterator() const;
1127 inline boolean is_degenerate() const;
1128};
1129
1130// declarations for isl::ast_node_if
1131
1132class ast_node_if : public ast_node {
1133 template <class T>
1134 friend boolean ast_node::isa() const;
1135 friend ast_node_if ast_node::as<ast_node_if>() const;
1136 static const auto type = isl_ast_node_if;
1137
1138protected:
1139 inline explicit ast_node_if(__isl_take isl_ast_node *ptr);
1140
1141public:
1142 inline /* implicit */ ast_node_if();
1143 inline /* implicit */ ast_node_if(const ast_node_if &obj);
1144 inline ast_node_if &operator=(ast_node_if obj);
1145 inline isl::checked::ctx ctx() const;
1146
1147 inline isl::checked::ast_expr cond() const;
1148 inline isl::checked::ast_expr get_cond() const;
1149 inline isl::checked::ast_node else_node() const;
1150 inline isl::checked::ast_node get_else_node() const;
1151 inline isl::checked::ast_node then_node() const;
1152 inline isl::checked::ast_node get_then_node() const;
1153 inline boolean has_else_node() const;
1154};
1155
1156// declarations for isl::ast_node_list
1157inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
1158inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
1159
1160class ast_node_list {
1161 friend inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
1162 friend inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
1163
1164protected:
1165 isl_ast_node_list *ptr = nullptr;
1166
1167 inline explicit ast_node_list(__isl_take isl_ast_node_list *ptr);
1168
1169public:
1170 inline /* implicit */ ast_node_list();
1171 inline /* implicit */ ast_node_list(const ast_node_list &obj);
1172 inline explicit ast_node_list(isl::checked::ctx ctx, int n);
1173 inline explicit ast_node_list(isl::checked::ast_node el);
1174 inline ast_node_list &operator=(ast_node_list obj);
1175 inline ~ast_node_list();
1176 inline __isl_give isl_ast_node_list *copy() const &;
1177 inline __isl_give isl_ast_node_list *copy() && = delete;
1178 inline __isl_keep isl_ast_node_list *get() const;
1179 inline __isl_give isl_ast_node_list *release();
1180 inline bool is_null() const;
1181 inline isl::checked::ctx ctx() const;
1182
1183 inline isl::checked::ast_node_list add(isl::checked::ast_node el) const;
1184 inline isl::checked::ast_node_list clear() const;
1185 inline isl::checked::ast_node_list concat(isl::checked::ast_node_list list2) const;
1186 inline isl::checked::ast_node_list drop(unsigned int first, unsigned int n) const;
1187 inline stat foreach(const std::function<stat(isl::checked::ast_node)> &fn) const;
1188 inline isl::checked::ast_node at(int index) const;
1189 inline isl::checked::ast_node get_at(int index) const;
1190 inline isl::checked::ast_node_list insert(unsigned int pos, isl::checked::ast_node el) const;
1191 inline class size size() const;
1192};
1193
1194// declarations for isl::ast_node_mark
1195
1196class ast_node_mark : public ast_node {
1197 template <class T>
1198 friend boolean ast_node::isa() const;
1199 friend ast_node_mark ast_node::as<ast_node_mark>() const;
1200 static const auto type = isl_ast_node_mark;
1201
1202protected:
1203 inline explicit ast_node_mark(__isl_take isl_ast_node *ptr);
1204
1205public:
1206 inline /* implicit */ ast_node_mark();
1207 inline /* implicit */ ast_node_mark(const ast_node_mark &obj);
1208 inline ast_node_mark &operator=(ast_node_mark obj);
1209 inline isl::checked::ctx ctx() const;
1210
1211 inline isl::checked::id id() const;
1212 inline isl::checked::id get_id() const;
1213 inline isl::checked::ast_node node() const;
1214 inline isl::checked::ast_node get_node() const;
1215};
1216
1217// declarations for isl::ast_node_user
1218
1219class ast_node_user : public ast_node {
1220 template <class T>
1221 friend boolean ast_node::isa() const;
1222 friend ast_node_user ast_node::as<ast_node_user>() const;
1223 static const auto type = isl_ast_node_user;
1224
1225protected:
1226 inline explicit ast_node_user(__isl_take isl_ast_node *ptr);
1227
1228public:
1229 inline /* implicit */ ast_node_user();
1230 inline /* implicit */ ast_node_user(const ast_node_user &obj);
1231 inline ast_node_user &operator=(ast_node_user obj);
1232 inline isl::checked::ctx ctx() const;
1233
1234 inline isl::checked::ast_expr expr() const;
1235 inline isl::checked::ast_expr get_expr() const;
1236};
1237
1238// declarations for isl::basic_map
1239inline basic_map manage(__isl_take isl_basic_map *ptr);
1240inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
1241
1242class basic_map {
1243 friend inline basic_map manage(__isl_take isl_basic_map *ptr);
1244 friend inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
1245
1246protected:
1247 isl_basic_map *ptr = nullptr;
1248
1249 inline explicit basic_map(__isl_take isl_basic_map *ptr);
1250
1251public:
1252 inline /* implicit */ basic_map();
1253 inline /* implicit */ basic_map(const basic_map &obj);
1254 inline explicit basic_map(isl::checked::ctx ctx, const std::string &str);
1255 inline basic_map &operator=(basic_map obj);
1256 inline ~basic_map();
1257 inline __isl_give isl_basic_map *copy() const &;
1258 inline __isl_give isl_basic_map *copy() && = delete;
1259 inline __isl_keep isl_basic_map *get() const;
1260 inline __isl_give isl_basic_map *release();
1261 inline bool is_null() const;
1262 inline isl::checked::ctx ctx() const;
1263
1264 inline isl::checked::basic_map affine_hull() const;
1265 inline isl::checked::basic_map apply_domain(isl::checked::basic_map bmap2) const;
1266 inline isl::checked::basic_map apply_range(isl::checked::basic_map bmap2) const;
1267 inline isl::checked::basic_set deltas() const;
1268 inline isl::checked::basic_map detect_equalities() const;
1269 inline isl::checked::basic_map flatten() const;
1270 inline isl::checked::basic_map flatten_domain() const;
1271 inline isl::checked::basic_map flatten_range() const;
1272 inline isl::checked::basic_map gist(isl::checked::basic_map context) const;
1273 inline isl::checked::basic_map intersect(isl::checked::basic_map bmap2) const;
1274 inline isl::checked::basic_map intersect_domain(isl::checked::basic_set bset) const;
1275 inline isl::checked::basic_map intersect_range(isl::checked::basic_set bset) const;
1276 inline boolean is_empty() const;
1277 inline boolean is_equal(const isl::checked::basic_map &bmap2) const;
1278 inline boolean is_subset(const isl::checked::basic_map &bmap2) const;
1279 inline isl::checked::map lexmax() const;
1280 inline isl::checked::map lexmin() const;
1281 inline isl::checked::basic_map reverse() const;
1282 inline isl::checked::basic_map sample() const;
1283 inline isl::checked::map unite(isl::checked::basic_map bmap2) const;
1284};
1285
1286// declarations for isl::basic_set
1287inline basic_set manage(__isl_take isl_basic_set *ptr);
1288inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
1289
1290class basic_set {
1291 friend inline basic_set manage(__isl_take isl_basic_set *ptr);
1292 friend inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
1293
1294protected:
1295 isl_basic_set *ptr = nullptr;
1296
1297 inline explicit basic_set(__isl_take isl_basic_set *ptr);
1298
1299public:
1300 inline /* implicit */ basic_set();
1301 inline /* implicit */ basic_set(const basic_set &obj);
1302 inline /* implicit */ basic_set(isl::checked::point pnt);
1303 inline explicit basic_set(isl::checked::ctx ctx, const std::string &str);
1304 inline basic_set &operator=(basic_set obj);
1305 inline ~basic_set();
1306 inline __isl_give isl_basic_set *copy() const &;
1307 inline __isl_give isl_basic_set *copy() && = delete;
1308 inline __isl_keep isl_basic_set *get() const;
1309 inline __isl_give isl_basic_set *release();
1310 inline bool is_null() const;
1311 inline isl::checked::ctx ctx() const;
1312
1313 inline isl::checked::basic_set affine_hull() const;
1314 inline isl::checked::basic_set apply(isl::checked::basic_map bmap) const;
1315 inline isl::checked::basic_set detect_equalities() const;
1316 inline isl::checked::val dim_max_val(int pos) const;
1317 inline isl::checked::basic_set flatten() const;
1318 inline isl::checked::basic_set gist(isl::checked::basic_set context) const;
1319 inline isl::checked::basic_set intersect(isl::checked::basic_set bset2) const;
1320 inline isl::checked::basic_set intersect_params(isl::checked::basic_set bset2) const;
1321 inline boolean is_empty() const;
1322 inline boolean is_equal(const isl::checked::basic_set &bset2) const;
1323 inline boolean is_subset(const isl::checked::basic_set &bset2) const;
1324 inline boolean is_wrapping() const;
1325 inline isl::checked::set lexmax() const;
1326 inline isl::checked::set lexmin() const;
1327 inline isl::checked::basic_set params() const;
1328 inline isl::checked::basic_set sample() const;
1329 inline isl::checked::point sample_point() const;
1330 inline isl::checked::set unite(isl::checked::basic_set bset2) const;
1331};
1332
1333// declarations for isl::fixed_box
1334inline fixed_box manage(__isl_take isl_fixed_box *ptr);
1335inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
1336
1337class fixed_box {
1338 friend inline fixed_box manage(__isl_take isl_fixed_box *ptr);
1339 friend inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
1340
1341protected:
1342 isl_fixed_box *ptr = nullptr;
1343
1344 inline explicit fixed_box(__isl_take isl_fixed_box *ptr);
1345
1346public:
1347 inline /* implicit */ fixed_box();
1348 inline /* implicit */ fixed_box(const fixed_box &obj);
1349 inline fixed_box &operator=(fixed_box obj);
1350 inline ~fixed_box();
1351 inline __isl_give isl_fixed_box *copy() const &;
1352 inline __isl_give isl_fixed_box *copy() && = delete;
1353 inline __isl_keep isl_fixed_box *get() const;
1354 inline __isl_give isl_fixed_box *release();
1355 inline bool is_null() const;
1356 inline isl::checked::ctx ctx() const;
1357
1358 inline isl::checked::multi_aff offset() const;
1359 inline isl::checked::multi_aff get_offset() const;
1360 inline isl::checked::multi_val size() const;
1361 inline isl::checked::multi_val get_size() const;
1362 inline isl::checked::space space() const;
1363 inline isl::checked::space get_space() const;
1364 inline boolean is_valid() const;
1365};
1366
1367// declarations for isl::id
1368inline id manage(__isl_take isl_id *ptr);
1369inline id manage_copy(__isl_keep isl_id *ptr);
1370
1371class id {
1372 friend inline id manage(__isl_take isl_id *ptr);
1373 friend inline id manage_copy(__isl_keep isl_id *ptr);
1374
1375protected:
1376 isl_id *ptr = nullptr;
1377
1378 inline explicit id(__isl_take isl_id *ptr);
1379
1380public:
1381 inline /* implicit */ id();
1382 inline /* implicit */ id(const id &obj);
1383 inline explicit id(isl::checked::ctx ctx, const std::string &str);
1384 inline id &operator=(id obj);
1385 inline ~id();
1386 inline __isl_give isl_id *copy() const &;
1387 inline __isl_give isl_id *copy() && = delete;
1388 inline __isl_keep isl_id *get() const;
1389 inline __isl_give isl_id *release();
1390 inline bool is_null() const;
1391 inline isl::checked::ctx ctx() const;
1392
1393 inline std::string name() const;
1394 inline std::string get_name() const;
1395};
1396
1397// declarations for isl::id_list
1398inline id_list manage(__isl_take isl_id_list *ptr);
1399inline id_list manage_copy(__isl_keep isl_id_list *ptr);
1400
1401class id_list {
1402 friend inline id_list manage(__isl_take isl_id_list *ptr);
1403 friend inline id_list manage_copy(__isl_keep isl_id_list *ptr);
1404
1405protected:
1406 isl_id_list *ptr = nullptr;
1407
1408 inline explicit id_list(__isl_take isl_id_list *ptr);
1409
1410public:
1411 inline /* implicit */ id_list();
1412 inline /* implicit */ id_list(const id_list &obj);
1413 inline explicit id_list(isl::checked::ctx ctx, int n);
1414 inline explicit id_list(isl::checked::id el);
1415 inline id_list &operator=(id_list obj);
1416 inline ~id_list();
1417 inline __isl_give isl_id_list *copy() const &;
1418 inline __isl_give isl_id_list *copy() && = delete;
1419 inline __isl_keep isl_id_list *get() const;
1420 inline __isl_give isl_id_list *release();
1421 inline bool is_null() const;
1422 inline isl::checked::ctx ctx() const;
1423
1424 inline isl::checked::id_list add(isl::checked::id el) const;
1425 inline isl::checked::id_list add(const std::string &el) const;
1426 inline isl::checked::id_list clear() const;
1427 inline isl::checked::id_list concat(isl::checked::id_list list2) const;
1428 inline isl::checked::id_list drop(unsigned int first, unsigned int n) const;
1429 inline stat foreach(const std::function<stat(isl::checked::id)> &fn) const;
1430 inline isl::checked::id at(int index) const;
1431 inline isl::checked::id get_at(int index) const;
1432 inline isl::checked::id_list insert(unsigned int pos, isl::checked::id el) const;
1433 inline isl::checked::id_list insert(unsigned int pos, const std::string &el) const;
1434 inline class size size() const;
1435};
1436
1437// declarations for isl::map
1438inline map manage(__isl_take isl_map *ptr);
1439inline map manage_copy(__isl_keep isl_map *ptr);
1440
1441class map {
1442 friend inline map manage(__isl_take isl_map *ptr);
1443 friend inline map manage_copy(__isl_keep isl_map *ptr);
1444
1445protected:
1446 isl_map *ptr = nullptr;
1447
1448 inline explicit map(__isl_take isl_map *ptr);
1449
1450public:
1451 inline /* implicit */ map();
1452 inline /* implicit */ map(const map &obj);
1453 inline /* implicit */ map(isl::checked::basic_map bmap);
1454 inline explicit map(isl::checked::ctx ctx, const std::string &str);
1455 inline map &operator=(map obj);
1456 inline ~map();
1457 inline __isl_give isl_map *copy() const &;
1458 inline __isl_give isl_map *copy() && = delete;
1459 inline __isl_keep isl_map *get() const;
1460 inline __isl_give isl_map *release();
1461 inline bool is_null() const;
1462 inline isl::checked::ctx ctx() const;
1463
1464 inline isl::checked::basic_map affine_hull() const;
1465 inline isl::checked::map apply_domain(isl::checked::map map2) const;
1466 inline isl::checked::map apply_range(isl::checked::map map2) const;
1467 inline isl::checked::set bind_domain(isl::checked::multi_id tuple) const;
1468 inline isl::checked::set bind_range(isl::checked::multi_id tuple) const;
1469 inline isl::checked::map coalesce() const;
1470 inline isl::checked::map complement() const;
1471 inline isl::checked::map curry() const;
1472 inline isl::checked::set deltas() const;
1473 inline isl::checked::map detect_equalities() const;
1474 inline isl::checked::set domain() const;
1475 inline isl::checked::map domain_factor_domain() const;
1476 inline isl::checked::map domain_factor_range() const;
1477 inline isl::checked::map domain_product(isl::checked::map map2) const;
1478 static inline isl::checked::map empty(isl::checked::space space);
1479 inline isl::checked::map eq_at(isl::checked::multi_pw_aff mpa) const;
1480 inline isl::checked::map factor_domain() const;
1481 inline isl::checked::map factor_range() const;
1482 inline isl::checked::map flatten() const;
1483 inline isl::checked::map flatten_domain() const;
1484 inline isl::checked::map flatten_range() const;
1485 inline stat foreach_basic_map(const std::function<stat(isl::checked::basic_map)> &fn) const;
1486 inline isl::checked::fixed_box range_simple_fixed_box_hull() const;
1487 inline isl::checked::fixed_box get_range_simple_fixed_box_hull() const;
1488 inline isl::checked::space space() const;
1489 inline isl::checked::space get_space() const;
1490 inline isl::checked::map gist(isl::checked::map context) const;
1491 inline isl::checked::map gist_domain(isl::checked::set context) const;
1492 inline isl::checked::map intersect(isl::checked::map map2) const;
1493 inline isl::checked::map intersect_domain(isl::checked::set set) const;
1494 inline isl::checked::map intersect_params(isl::checked::set params) const;
1495 inline isl::checked::map intersect_range(isl::checked::set set) const;
1496 inline boolean is_bijective() const;
1497 inline boolean is_disjoint(const isl::checked::map &map2) const;
1498 inline boolean is_empty() const;
1499 inline boolean is_equal(const isl::checked::map &map2) const;
1500 inline boolean is_injective() const;
1501 inline boolean is_single_valued() const;
1502 inline boolean is_strict_subset(const isl::checked::map &map2) const;
1503 inline boolean is_subset(const isl::checked::map &map2) const;
1504 inline isl::checked::map lex_ge_at(isl::checked::multi_pw_aff mpa) const;
1505 inline isl::checked::map lex_gt_at(isl::checked::multi_pw_aff mpa) const;
1506 inline isl::checked::map lex_le_at(isl::checked::multi_pw_aff mpa) const;
1507 inline isl::checked::map lex_lt_at(isl::checked::multi_pw_aff mpa) const;
1508 inline isl::checked::map lexmax() const;
1509 inline isl::checked::pw_multi_aff lexmax_pw_multi_aff() const;
1510 inline isl::checked::map lexmin() const;
1511 inline isl::checked::pw_multi_aff lexmin_pw_multi_aff() const;
1512 inline isl::checked::map lower_bound(isl::checked::multi_pw_aff lower) const;
1513 inline isl::checked::map lower_bound(isl::checked::multi_val lower) const;
1514 inline isl::checked::multi_pw_aff max_multi_pw_aff() const;
1515 inline isl::checked::multi_pw_aff min_multi_pw_aff() const;
1516 inline isl::checked::basic_map polyhedral_hull() const;
1517 inline isl::checked::map preimage_domain(isl::checked::multi_aff ma) const;
1518 inline isl::checked::map preimage_domain(isl::checked::multi_pw_aff mpa) const;
1519 inline isl::checked::map preimage_domain(isl::checked::pw_multi_aff pma) const;
1520 inline isl::checked::map preimage_range(isl::checked::multi_aff ma) const;
1521 inline isl::checked::map preimage_range(isl::checked::pw_multi_aff pma) const;
1522 inline isl::checked::map project_out_all_params() const;
1523 inline isl::checked::set range() const;
1524 inline isl::checked::map range_factor_domain() const;
1525 inline isl::checked::map range_factor_range() const;
1526 inline isl::checked::map range_product(isl::checked::map map2) const;
1527 inline isl::checked::map range_reverse() const;
1528 inline isl::checked::map reverse() const;
1529 inline isl::checked::basic_map sample() const;
1530 inline isl::checked::map subtract(isl::checked::map map2) const;
1531 inline isl::checked::map uncurry() const;
1532 inline isl::checked::map unite(isl::checked::map map2) const;
1533 static inline isl::checked::map universe(isl::checked::space space);
1534 inline isl::checked::basic_map unshifted_simple_hull() const;
1535 inline isl::checked::map upper_bound(isl::checked::multi_pw_aff upper) const;
1536 inline isl::checked::map upper_bound(isl::checked::multi_val upper) const;
1537 inline isl::checked::set wrap() const;
1538};
1539
1540// declarations for isl::multi_aff
1541inline multi_aff manage(__isl_take isl_multi_aff *ptr);
1542inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
1543
1544class multi_aff {
1545 friend inline multi_aff manage(__isl_take isl_multi_aff *ptr);
1546 friend inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
1547
1548protected:
1549 isl_multi_aff *ptr = nullptr;
1550
1551 inline explicit multi_aff(__isl_take isl_multi_aff *ptr);
1552
1553public:
1554 inline /* implicit */ multi_aff();
1555 inline /* implicit */ multi_aff(const multi_aff &obj);
1556 inline /* implicit */ multi_aff(isl::checked::aff aff);
1557 inline explicit multi_aff(isl::checked::space space, isl::checked::aff_list list);
1558 inline explicit multi_aff(isl::checked::ctx ctx, const std::string &str);
1559 inline multi_aff &operator=(multi_aff obj);
1560 inline ~multi_aff();
1561 inline __isl_give isl_multi_aff *copy() const &;
1562 inline __isl_give isl_multi_aff *copy() && = delete;
1563 inline __isl_keep isl_multi_aff *get() const;
1564 inline __isl_give isl_multi_aff *release();
1565 inline bool is_null() const;
1566 inline isl::checked::ctx ctx() const;
1567
1568 inline isl::checked::multi_aff add(isl::checked::multi_aff multi2) const;
1569 inline isl::checked::multi_aff add_constant(isl::checked::multi_val mv) const;
1570 inline isl::checked::multi_aff add_constant(isl::checked::val v) const;
1571 inline isl::checked::multi_aff add_constant(long v) const;
1572 inline isl::checked::basic_set bind(isl::checked::multi_id tuple) const;
1573 inline isl::checked::multi_aff bind_domain(isl::checked::multi_id tuple) const;
1574 inline isl::checked::multi_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
1575 static inline isl::checked::multi_aff domain_map(isl::checked::space space);
1576 inline isl::checked::multi_aff flat_range_product(isl::checked::multi_aff multi2) const;
1577 inline isl::checked::multi_aff floor() const;
1578 inline isl::checked::aff at(int pos) const;
1579 inline isl::checked::aff get_at(int pos) const;
1580 inline isl::checked::multi_val constant_multi_val() const;
1581 inline isl::checked::multi_val get_constant_multi_val() const;
1582 inline isl::checked::aff_list list() const;
1583 inline isl::checked::aff_list get_list() const;
1584 inline isl::checked::space space() const;
1585 inline isl::checked::space get_space() const;
1586 inline isl::checked::multi_aff gist(isl::checked::set context) const;
1587 inline isl::checked::multi_aff identity() const;
1588 static inline isl::checked::multi_aff identity_on_domain(isl::checked::space space);
1589 inline isl::checked::multi_aff insert_domain(isl::checked::space domain) const;
1590 inline boolean involves_locals() const;
1591 inline isl::checked::multi_aff neg() const;
1592 inline boolean plain_is_equal(const isl::checked::multi_aff &multi2) const;
1593 inline isl::checked::multi_aff product(isl::checked::multi_aff multi2) const;
1594 inline isl::checked::multi_aff pullback(isl::checked::multi_aff ma2) const;
1595 static inline isl::checked::multi_aff range_map(isl::checked::space space);
1596 inline isl::checked::multi_aff range_product(isl::checked::multi_aff multi2) const;
1597 inline isl::checked::multi_aff scale(isl::checked::multi_val mv) const;
1598 inline isl::checked::multi_aff scale(isl::checked::val v) const;
1599 inline isl::checked::multi_aff scale(long v) const;
1600 inline isl::checked::multi_aff scale_down(isl::checked::multi_val mv) const;
1601 inline isl::checked::multi_aff scale_down(isl::checked::val v) const;
1602 inline isl::checked::multi_aff scale_down(long v) const;
1603 inline isl::checked::multi_aff set_at(int pos, isl::checked::aff el) const;
1604 inline class size size() const;
1605 inline isl::checked::multi_aff sub(isl::checked::multi_aff multi2) const;
1606 inline isl::checked::multi_aff unbind_params_insert_domain(isl::checked::multi_id domain) const;
1607 static inline isl::checked::multi_aff zero(isl::checked::space space);
1608};
1609
1610// declarations for isl::multi_id
1611inline multi_id manage(__isl_take isl_multi_id *ptr);
1612inline multi_id manage_copy(__isl_keep isl_multi_id *ptr);
1613
1614class multi_id {
1615 friend inline multi_id manage(__isl_take isl_multi_id *ptr);
1616 friend inline multi_id manage_copy(__isl_keep isl_multi_id *ptr);
1617
1618protected:
1619 isl_multi_id *ptr = nullptr;
1620
1621 inline explicit multi_id(__isl_take isl_multi_id *ptr);
1622
1623public:
1624 inline /* implicit */ multi_id();
1625 inline /* implicit */ multi_id(const multi_id &obj);
1626 inline explicit multi_id(isl::checked::space space, isl::checked::id_list list);
1627 inline explicit multi_id(isl::checked::ctx ctx, const std::string &str);
1628 inline multi_id &operator=(multi_id obj);
1629 inline ~multi_id();
1630 inline __isl_give isl_multi_id *copy() const &;
1631 inline __isl_give isl_multi_id *copy() && = delete;
1632 inline __isl_keep isl_multi_id *get() const;
1633 inline __isl_give isl_multi_id *release();
1634 inline bool is_null() const;
1635 inline isl::checked::ctx ctx() const;
1636
1637 inline isl::checked::multi_id flat_range_product(isl::checked::multi_id multi2) const;
1638 inline isl::checked::id at(int pos) const;
1639 inline isl::checked::id get_at(int pos) const;
1640 inline isl::checked::id_list list() const;
1641 inline isl::checked::id_list get_list() const;
1642 inline isl::checked::space space() const;
1643 inline isl::checked::space get_space() const;
1644 inline boolean plain_is_equal(const isl::checked::multi_id &multi2) const;
1645 inline isl::checked::multi_id range_product(isl::checked::multi_id multi2) const;
1646 inline isl::checked::multi_id set_at(int pos, isl::checked::id el) const;
1647 inline isl::checked::multi_id set_at(int pos, const std::string &el) const;
1648 inline class size size() const;
1649};
1650
1651// declarations for isl::multi_pw_aff
1652inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
1653inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
1654
1655class multi_pw_aff {
1656 friend inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
1657 friend inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
1658
1659protected:
1660 isl_multi_pw_aff *ptr = nullptr;
1661
1662 inline explicit multi_pw_aff(__isl_take isl_multi_pw_aff *ptr);
1663
1664public:
1665 inline /* implicit */ multi_pw_aff();
1666 inline /* implicit */ multi_pw_aff(const multi_pw_aff &obj);
1667 inline /* implicit */ multi_pw_aff(isl::checked::aff aff);
1668 inline /* implicit */ multi_pw_aff(isl::checked::multi_aff ma);
1669 inline /* implicit */ multi_pw_aff(isl::checked::pw_aff pa);
1670 inline explicit multi_pw_aff(isl::checked::space space, isl::checked::pw_aff_list list);
1671 inline /* implicit */ multi_pw_aff(isl::checked::pw_multi_aff pma);
1672 inline explicit multi_pw_aff(isl::checked::ctx ctx, const std::string &str);
1673 inline multi_pw_aff &operator=(multi_pw_aff obj);
1674 inline ~multi_pw_aff();
1675 inline __isl_give isl_multi_pw_aff *copy() const &;
1676 inline __isl_give isl_multi_pw_aff *copy() && = delete;
1677 inline __isl_keep isl_multi_pw_aff *get() const;
1678 inline __isl_give isl_multi_pw_aff *release();
1679 inline bool is_null() const;
1680 inline isl::checked::ctx ctx() const;
1681
1682 inline isl::checked::multi_pw_aff add(isl::checked::multi_pw_aff multi2) const;
1683 inline isl::checked::multi_pw_aff add_constant(isl::checked::multi_val mv) const;
1684 inline isl::checked::multi_pw_aff add_constant(isl::checked::val v) const;
1685 inline isl::checked::multi_pw_aff add_constant(long v) const;
1686 inline isl::checked::set bind(isl::checked::multi_id tuple) const;
1687 inline isl::checked::multi_pw_aff bind_domain(isl::checked::multi_id tuple) const;
1688 inline isl::checked::multi_pw_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
1689 inline isl::checked::multi_pw_aff coalesce() const;
1690 inline isl::checked::set domain() const;
1691 inline isl::checked::multi_pw_aff flat_range_product(isl::checked::multi_pw_aff multi2) const;
1692 inline isl::checked::pw_aff at(int pos) const;
1693 inline isl::checked::pw_aff get_at(int pos) const;
1694 inline isl::checked::pw_aff_list list() const;
1695 inline isl::checked::pw_aff_list get_list() const;
1696 inline isl::checked::space space() const;
1697 inline isl::checked::space get_space() const;
1698 inline isl::checked::multi_pw_aff gist(isl::checked::set set) const;
1699 inline isl::checked::multi_pw_aff identity() const;
1700 static inline isl::checked::multi_pw_aff identity_on_domain(isl::checked::space space);
1701 inline isl::checked::multi_pw_aff insert_domain(isl::checked::space domain) const;
1702 inline isl::checked::multi_pw_aff intersect_domain(isl::checked::set domain) const;
1703 inline isl::checked::multi_pw_aff intersect_params(isl::checked::set set) const;
1704 inline boolean involves_param(const isl::checked::id &id) const;
1705 inline boolean involves_param(const std::string &id) const;
1706 inline boolean involves_param(const isl::checked::id_list &list) const;
1707 inline isl::checked::multi_pw_aff max(isl::checked::multi_pw_aff multi2) const;
1708 inline isl::checked::multi_val max_multi_val() const;
1709 inline isl::checked::multi_pw_aff min(isl::checked::multi_pw_aff multi2) const;
1710 inline isl::checked::multi_val min_multi_val() const;
1711 inline isl::checked::multi_pw_aff neg() const;
1712 inline boolean plain_is_equal(const isl::checked::multi_pw_aff &multi2) const;
1713 inline isl::checked::multi_pw_aff product(isl::checked::multi_pw_aff multi2) const;
1714 inline isl::checked::multi_pw_aff pullback(isl::checked::multi_aff ma) const;
1715 inline isl::checked::multi_pw_aff pullback(isl::checked::multi_pw_aff mpa2) const;
1716 inline isl::checked::multi_pw_aff pullback(isl::checked::pw_multi_aff pma) const;
1717 inline isl::checked::multi_pw_aff range_product(isl::checked::multi_pw_aff multi2) const;
1718 inline isl::checked::multi_pw_aff scale(isl::checked::multi_val mv) const;
1719 inline isl::checked::multi_pw_aff scale(isl::checked::val v) const;
1720 inline isl::checked::multi_pw_aff scale(long v) const;
1721 inline isl::checked::multi_pw_aff scale_down(isl::checked::multi_val mv) const;
1722 inline isl::checked::multi_pw_aff scale_down(isl::checked::val v) const;
1723 inline isl::checked::multi_pw_aff scale_down(long v) const;
1724 inline isl::checked::multi_pw_aff set_at(int pos, isl::checked::pw_aff el) const;
1725 inline class size size() const;
1726 inline isl::checked::multi_pw_aff sub(isl::checked::multi_pw_aff multi2) const;
1727 inline isl::checked::multi_pw_aff unbind_params_insert_domain(isl::checked::multi_id domain) const;
1728 inline isl::checked::multi_pw_aff union_add(isl::checked::multi_pw_aff mpa2) const;
1729 static inline isl::checked::multi_pw_aff zero(isl::checked::space space);
1730};
1731
1732// declarations for isl::multi_union_pw_aff
1733inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
1734inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
1735
1736class multi_union_pw_aff {
1737 friend inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
1738 friend inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
1739
1740protected:
1741 isl_multi_union_pw_aff *ptr = nullptr;
1742
1743 inline explicit multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr);
1744
1745public:
1746 inline /* implicit */ multi_union_pw_aff();
1747 inline /* implicit */ multi_union_pw_aff(const multi_union_pw_aff &obj);
1748 inline /* implicit */ multi_union_pw_aff(isl::checked::multi_pw_aff mpa);
1749 inline /* implicit */ multi_union_pw_aff(isl::checked::union_pw_aff upa);
1750 inline explicit multi_union_pw_aff(isl::checked::space space, isl::checked::union_pw_aff_list list);
1751 inline explicit multi_union_pw_aff(isl::checked::ctx ctx, const std::string &str);
1752 inline multi_union_pw_aff &operator=(multi_union_pw_aff obj);
1753 inline ~multi_union_pw_aff();
1754 inline __isl_give isl_multi_union_pw_aff *copy() const &;
1755 inline __isl_give isl_multi_union_pw_aff *copy() && = delete;
1756 inline __isl_keep isl_multi_union_pw_aff *get() const;
1757 inline __isl_give isl_multi_union_pw_aff *release();
1758 inline bool is_null() const;
1759 inline isl::checked::ctx ctx() const;
1760
1761 inline isl::checked::multi_union_pw_aff add(isl::checked::multi_union_pw_aff multi2) const;
1762 inline isl::checked::union_set bind(isl::checked::multi_id tuple) const;
1763 inline isl::checked::multi_union_pw_aff coalesce() const;
1764 inline isl::checked::union_set domain() const;
1765 inline isl::checked::multi_union_pw_aff flat_range_product(isl::checked::multi_union_pw_aff multi2) const;
1766 inline isl::checked::union_pw_aff at(int pos) const;
1767 inline isl::checked::union_pw_aff get_at(int pos) const;
1768 inline isl::checked::union_pw_aff_list list() const;
1769 inline isl::checked::union_pw_aff_list get_list() const;
1770 inline isl::checked::space space() const;
1771 inline isl::checked::space get_space() const;
1772 inline isl::checked::multi_union_pw_aff gist(isl::checked::union_set context) const;
1773 inline isl::checked::multi_union_pw_aff intersect_domain(isl::checked::union_set uset) const;
1774 inline isl::checked::multi_union_pw_aff intersect_params(isl::checked::set params) const;
1775 inline isl::checked::multi_union_pw_aff neg() const;
1776 inline boolean plain_is_equal(const isl::checked::multi_union_pw_aff &multi2) const;
1777 inline isl::checked::multi_union_pw_aff pullback(isl::checked::union_pw_multi_aff upma) const;
1778 inline isl::checked::multi_union_pw_aff range_product(isl::checked::multi_union_pw_aff multi2) const;
1779 inline isl::checked::multi_union_pw_aff scale(isl::checked::multi_val mv) const;
1780 inline isl::checked::multi_union_pw_aff scale(isl::checked::val v) const;
1781 inline isl::checked::multi_union_pw_aff scale(long v) const;
1782 inline isl::checked::multi_union_pw_aff scale_down(isl::checked::multi_val mv) const;
1783 inline isl::checked::multi_union_pw_aff scale_down(isl::checked::val v) const;
1784 inline isl::checked::multi_union_pw_aff scale_down(long v) const;
1785 inline isl::checked::multi_union_pw_aff set_at(int pos, isl::checked::union_pw_aff el) const;
1786 inline class size size() const;
1787 inline isl::checked::multi_union_pw_aff sub(isl::checked::multi_union_pw_aff multi2) const;
1788 inline isl::checked::multi_union_pw_aff union_add(isl::checked::multi_union_pw_aff mupa2) const;
1789 static inline isl::checked::multi_union_pw_aff zero(isl::checked::space space);
1790};
1791
1792// declarations for isl::multi_val
1793inline multi_val manage(__isl_take isl_multi_val *ptr);
1794inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
1795
1796class multi_val {
1797 friend inline multi_val manage(__isl_take isl_multi_val *ptr);
1798 friend inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
1799
1800protected:
1801 isl_multi_val *ptr = nullptr;
1802
1803 inline explicit multi_val(__isl_take isl_multi_val *ptr);
1804
1805public:
1806 inline /* implicit */ multi_val();
1807 inline /* implicit */ multi_val(const multi_val &obj);
1808 inline explicit multi_val(isl::checked::space space, isl::checked::val_list list);
1809 inline explicit multi_val(isl::checked::ctx ctx, const std::string &str);
1810 inline multi_val &operator=(multi_val obj);
1811 inline ~multi_val();
1812 inline __isl_give isl_multi_val *copy() const &;
1813 inline __isl_give isl_multi_val *copy() && = delete;
1814 inline __isl_keep isl_multi_val *get() const;
1815 inline __isl_give isl_multi_val *release();
1816 inline bool is_null() const;
1817 inline isl::checked::ctx ctx() const;
1818
1819 inline isl::checked::multi_val add(isl::checked::multi_val multi2) const;
1820 inline isl::checked::multi_val add(isl::checked::val v) const;
1821 inline isl::checked::multi_val add(long v) const;
1822 inline isl::checked::multi_val flat_range_product(isl::checked::multi_val multi2) const;
1823 inline isl::checked::val at(int pos) const;
1824 inline isl::checked::val get_at(int pos) const;
1825 inline isl::checked::val_list list() const;
1826 inline isl::checked::val_list get_list() const;
1827 inline isl::checked::space space() const;
1828 inline isl::checked::space get_space() const;
1829 inline isl::checked::multi_val max(isl::checked::multi_val multi2) const;
1830 inline isl::checked::multi_val min(isl::checked::multi_val multi2) const;
1831 inline isl::checked::multi_val neg() const;
1832 inline boolean plain_is_equal(const isl::checked::multi_val &multi2) const;
1833 inline isl::checked::multi_val product(isl::checked::multi_val multi2) const;
1834 inline isl::checked::multi_val range_product(isl::checked::multi_val multi2) const;
1835 inline isl::checked::multi_val scale(isl::checked::multi_val mv) const;
1836 inline isl::checked::multi_val scale(isl::checked::val v) const;
1837 inline isl::checked::multi_val scale(long v) const;
1838 inline isl::checked::multi_val scale_down(isl::checked::multi_val mv) const;
1839 inline isl::checked::multi_val scale_down(isl::checked::val v) const;
1840 inline isl::checked::multi_val scale_down(long v) const;
1841 inline isl::checked::multi_val set_at(int pos, isl::checked::val el) const;
1842 inline isl::checked::multi_val set_at(int pos, long el) const;
1843 inline class size size() const;
1844 inline isl::checked::multi_val sub(isl::checked::multi_val multi2) const;
1845 static inline isl::checked::multi_val zero(isl::checked::space space);
1846};
1847
1848// declarations for isl::point
1849inline point manage(__isl_take isl_point *ptr);
1850inline point manage_copy(__isl_keep isl_point *ptr);
1851
1852class point {
1853 friend inline point manage(__isl_take isl_point *ptr);
1854 friend inline point manage_copy(__isl_keep isl_point *ptr);
1855
1856protected:
1857 isl_point *ptr = nullptr;
1858
1859 inline explicit point(__isl_take isl_point *ptr);
1860
1861public:
1862 inline /* implicit */ point();
1863 inline /* implicit */ point(const point &obj);
1864 inline point &operator=(point obj);
1865 inline ~point();
1866 inline __isl_give isl_point *copy() const &;
1867 inline __isl_give isl_point *copy() && = delete;
1868 inline __isl_keep isl_point *get() const;
1869 inline __isl_give isl_point *release();
1870 inline bool is_null() const;
1871 inline isl::checked::ctx ctx() const;
1872
1873 inline isl::checked::multi_val multi_val() const;
1874 inline isl::checked::multi_val get_multi_val() const;
1875};
1876
1877// declarations for isl::pw_aff
1878inline pw_aff manage(__isl_take isl_pw_aff *ptr);
1879inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
1880
1881class pw_aff {
1882 friend inline pw_aff manage(__isl_take isl_pw_aff *ptr);
1883 friend inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
1884
1885protected:
1886 isl_pw_aff *ptr = nullptr;
1887
1888 inline explicit pw_aff(__isl_take isl_pw_aff *ptr);
1889
1890public:
1891 inline /* implicit */ pw_aff();
1892 inline /* implicit */ pw_aff(const pw_aff &obj);
1893 inline /* implicit */ pw_aff(isl::checked::aff aff);
1894 inline explicit pw_aff(isl::checked::ctx ctx, const std::string &str);
1895 inline pw_aff &operator=(pw_aff obj);
1896 inline ~pw_aff();
1897 inline __isl_give isl_pw_aff *copy() const &;
1898 inline __isl_give isl_pw_aff *copy() && = delete;
1899 inline __isl_keep isl_pw_aff *get() const;
1900 inline __isl_give isl_pw_aff *release();
1901 inline bool is_null() const;
1902 inline isl::checked::ctx ctx() const;
1903
1904 inline isl::checked::pw_aff add(isl::checked::pw_aff pwaff2) const;
1905 inline isl::checked::pw_aff add_constant(isl::checked::val v) const;
1906 inline isl::checked::pw_aff add_constant(long v) const;
1907 inline isl::checked::aff as_aff() const;
1908 inline isl::checked::set bind(isl::checked::id id) const;
1909 inline isl::checked::set bind(const std::string &id) const;
1910 inline isl::checked::pw_aff bind_domain(isl::checked::multi_id tuple) const;
1911 inline isl::checked::pw_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
1912 inline isl::checked::pw_aff ceil() const;
1913 inline isl::checked::pw_aff coalesce() const;
1914 inline isl::checked::pw_aff cond(isl::checked::pw_aff pwaff_true, isl::checked::pw_aff pwaff_false) const;
1915 inline isl::checked::pw_aff div(isl::checked::pw_aff pa2) const;
1916 inline isl::checked::set domain() const;
1917 inline isl::checked::set eq_set(isl::checked::pw_aff pwaff2) const;
1918 inline isl::checked::val eval(isl::checked::point pnt) const;
1919 inline isl::checked::pw_aff floor() const;
1920 inline isl::checked::set ge_set(isl::checked::pw_aff pwaff2) const;
1921 inline isl::checked::pw_aff gist(isl::checked::set context) const;
1922 inline isl::checked::set gt_set(isl::checked::pw_aff pwaff2) const;
1923 inline isl::checked::pw_aff insert_domain(isl::checked::space domain) const;
1924 inline isl::checked::pw_aff intersect_domain(isl::checked::set set) const;
1925 inline isl::checked::pw_aff intersect_params(isl::checked::set set) const;
1926 inline boolean isa_aff() const;
1927 inline isl::checked::set le_set(isl::checked::pw_aff pwaff2) const;
1928 inline isl::checked::set lt_set(isl::checked::pw_aff pwaff2) const;
1929 inline isl::checked::pw_aff max(isl::checked::pw_aff pwaff2) const;
1930 inline isl::checked::pw_aff min(isl::checked::pw_aff pwaff2) const;
1931 inline isl::checked::pw_aff mod(isl::checked::val mod) const;
1932 inline isl::checked::pw_aff mod(long mod) const;
1933 inline isl::checked::pw_aff mul(isl::checked::pw_aff pwaff2) const;
1934 inline isl::checked::set ne_set(isl::checked::pw_aff pwaff2) const;
1935 inline isl::checked::pw_aff neg() const;
1936 static inline isl::checked::pw_aff param_on_domain(isl::checked::set domain, isl::checked::id id);
1937 inline isl::checked::pw_aff pullback(isl::checked::multi_aff ma) const;
1938 inline isl::checked::pw_aff pullback(isl::checked::multi_pw_aff mpa) const;
1939 inline isl::checked::pw_aff pullback(isl::checked::pw_multi_aff pma) const;
1940 inline isl::checked::pw_aff scale(isl::checked::val v) const;
1941 inline isl::checked::pw_aff scale(long v) const;
1942 inline isl::checked::pw_aff scale_down(isl::checked::val f) const;
1943 inline isl::checked::pw_aff scale_down(long f) const;
1944 inline isl::checked::pw_aff sub(isl::checked::pw_aff pwaff2) const;
1945 inline isl::checked::pw_aff subtract_domain(isl::checked::set set) const;
1946 inline isl::checked::pw_aff tdiv_q(isl::checked::pw_aff pa2) const;
1947 inline isl::checked::pw_aff tdiv_r(isl::checked::pw_aff pa2) const;
1948 inline isl::checked::pw_aff union_add(isl::checked::pw_aff pwaff2) const;
1949};
1950
1951// declarations for isl::pw_aff_list
1952inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
1953inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
1954
1955class pw_aff_list {
1956 friend inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
1957 friend inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
1958
1959protected:
1960 isl_pw_aff_list *ptr = nullptr;
1961
1962 inline explicit pw_aff_list(__isl_take isl_pw_aff_list *ptr);
1963
1964public:
1965 inline /* implicit */ pw_aff_list();
1966 inline /* implicit */ pw_aff_list(const pw_aff_list &obj);
1967 inline explicit pw_aff_list(isl::checked::ctx ctx, int n);
1968 inline explicit pw_aff_list(isl::checked::pw_aff el);
1969 inline pw_aff_list &operator=(pw_aff_list obj);
1970 inline ~pw_aff_list();
1971 inline __isl_give isl_pw_aff_list *copy() const &;
1972 inline __isl_give isl_pw_aff_list *copy() && = delete;
1973 inline __isl_keep isl_pw_aff_list *get() const;
1974 inline __isl_give isl_pw_aff_list *release();
1975 inline bool is_null() const;
1976 inline isl::checked::ctx ctx() const;
1977
1978 inline isl::checked::pw_aff_list add(isl::checked::pw_aff el) const;
1979 inline isl::checked::pw_aff_list clear() const;
1980 inline isl::checked::pw_aff_list concat(isl::checked::pw_aff_list list2) const;
1981 inline isl::checked::pw_aff_list drop(unsigned int first, unsigned int n) const;
1982 inline stat foreach(const std::function<stat(isl::checked::pw_aff)> &fn) const;
1983 inline isl::checked::pw_aff at(int index) const;
1984 inline isl::checked::pw_aff get_at(int index) const;
1985 inline isl::checked::pw_aff_list insert(unsigned int pos, isl::checked::pw_aff el) const;
1986 inline class size size() const;
1987};
1988
1989// declarations for isl::pw_multi_aff
1990inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
1991inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
1992
1993class pw_multi_aff {
1994 friend inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
1995 friend inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
1996
1997protected:
1998 isl_pw_multi_aff *ptr = nullptr;
1999
2000 inline explicit pw_multi_aff(__isl_take isl_pw_multi_aff *ptr);
2001
2002public:
2003 inline /* implicit */ pw_multi_aff();
2004 inline /* implicit */ pw_multi_aff(const pw_multi_aff &obj);
2005 inline /* implicit */ pw_multi_aff(isl::checked::multi_aff ma);
2006 inline /* implicit */ pw_multi_aff(isl::checked::pw_aff pa);
2007 inline explicit pw_multi_aff(isl::checked::ctx ctx, const std::string &str);
2008 inline pw_multi_aff &operator=(pw_multi_aff obj);
2009 inline ~pw_multi_aff();
2010 inline __isl_give isl_pw_multi_aff *copy() const &;
2011 inline __isl_give isl_pw_multi_aff *copy() && = delete;
2012 inline __isl_keep isl_pw_multi_aff *get() const;
2013 inline __isl_give isl_pw_multi_aff *release();
2014 inline bool is_null() const;
2015 inline isl::checked::ctx ctx() const;
2016
2017 inline isl::checked::pw_multi_aff add(isl::checked::pw_multi_aff pma2) const;
2018 inline isl::checked::pw_multi_aff add_constant(isl::checked::multi_val mv) const;
2019 inline isl::checked::pw_multi_aff add_constant(isl::checked::val v) const;
2020 inline isl::checked::pw_multi_aff add_constant(long v) const;
2021 inline isl::checked::multi_aff as_multi_aff() const;
2022 inline isl::checked::pw_multi_aff bind_domain(isl::checked::multi_id tuple) const;
2023 inline isl::checked::pw_multi_aff bind_domain_wrapped_domain(isl::checked::multi_id tuple) const;
2024 inline isl::checked::pw_multi_aff coalesce() const;
2025 inline isl::checked::set domain() const;
2026 static inline isl::checked::pw_multi_aff domain_map(isl::checked::space space);
2027 inline isl::checked::pw_multi_aff flat_range_product(isl::checked::pw_multi_aff pma2) const;
2028 inline stat foreach_piece(const std::function<stat(isl::checked::set, isl::checked::multi_aff)> &fn) const;
2029 inline isl::checked::space space() const;
2030 inline isl::checked::space get_space() const;
2031 inline isl::checked::pw_multi_aff gist(isl::checked::set set) const;
2032 inline isl::checked::pw_multi_aff insert_domain(isl::checked::space domain) const;
2033 inline isl::checked::pw_multi_aff intersect_domain(isl::checked::set set) const;
2034 inline isl::checked::pw_multi_aff intersect_params(isl::checked::set set) const;
2035 inline boolean involves_locals() const;
2036 inline boolean isa_multi_aff() const;
2037 inline isl::checked::multi_val max_multi_val() const;
2038 inline isl::checked::multi_val min_multi_val() const;
2039 inline class size n_piece() const;
2040 inline isl::checked::pw_multi_aff product(isl::checked::pw_multi_aff pma2) const;
2041 inline isl::checked::pw_multi_aff pullback(isl::checked::multi_aff ma) const;
2042 inline isl::checked::pw_multi_aff pullback(isl::checked::pw_multi_aff pma2) const;
2043 inline isl::checked::pw_multi_aff range_factor_domain() const;
2044 inline isl::checked::pw_multi_aff range_factor_range() const;
2045 static inline isl::checked::pw_multi_aff range_map(isl::checked::space space);
2046 inline isl::checked::pw_multi_aff range_product(isl::checked::pw_multi_aff pma2) const;
2047 inline isl::checked::pw_multi_aff scale(isl::checked::val v) const;
2048 inline isl::checked::pw_multi_aff scale(long v) const;
2049 inline isl::checked::pw_multi_aff scale_down(isl::checked::val v) const;
2050 inline isl::checked::pw_multi_aff scale_down(long v) const;
2051 inline isl::checked::pw_multi_aff sub(isl::checked::pw_multi_aff pma2) const;
2052 inline isl::checked::pw_multi_aff subtract_domain(isl::checked::set set) const;
2053 inline isl::checked::pw_multi_aff union_add(isl::checked::pw_multi_aff pma2) const;
2054 static inline isl::checked::pw_multi_aff zero(isl::checked::space space);
2055};
2056
2057// declarations for isl::pw_multi_aff_list
2058inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
2059inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
2060
2061class pw_multi_aff_list {
2062 friend inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
2063 friend inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
2064
2065protected:
2066 isl_pw_multi_aff_list *ptr = nullptr;
2067
2068 inline explicit pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr);
2069
2070public:
2071 inline /* implicit */ pw_multi_aff_list();
2072 inline /* implicit */ pw_multi_aff_list(const pw_multi_aff_list &obj);
2073 inline explicit pw_multi_aff_list(isl::checked::ctx ctx, int n);
2074 inline explicit pw_multi_aff_list(isl::checked::pw_multi_aff el);
2075 inline pw_multi_aff_list &operator=(pw_multi_aff_list obj);
2076 inline ~pw_multi_aff_list();
2077 inline __isl_give isl_pw_multi_aff_list *copy() const &;
2078 inline __isl_give isl_pw_multi_aff_list *copy() && = delete;
2079 inline __isl_keep isl_pw_multi_aff_list *get() const;
2080 inline __isl_give isl_pw_multi_aff_list *release();
2081 inline bool is_null() const;
2082 inline isl::checked::ctx ctx() const;
2083
2084 inline isl::checked::pw_multi_aff_list add(isl::checked::pw_multi_aff el) const;
2085 inline isl::checked::pw_multi_aff_list clear() const;
2086 inline isl::checked::pw_multi_aff_list concat(isl::checked::pw_multi_aff_list list2) const;
2087 inline isl::checked::pw_multi_aff_list drop(unsigned int first, unsigned int n) const;
2088 inline stat foreach(const std::function<stat(isl::checked::pw_multi_aff)> &fn) const;
2089 inline isl::checked::pw_multi_aff at(int index) const;
2090 inline isl::checked::pw_multi_aff get_at(int index) const;
2091 inline isl::checked::pw_multi_aff_list insert(unsigned int pos, isl::checked::pw_multi_aff el) const;
2092 inline class size size() const;
2093};
2094
2095// declarations for isl::schedule
2096inline schedule manage(__isl_take isl_schedule *ptr);
2097inline schedule manage_copy(__isl_keep isl_schedule *ptr);
2098
2099class schedule {
2100 friend inline schedule manage(__isl_take isl_schedule *ptr);
2101 friend inline schedule manage_copy(__isl_keep isl_schedule *ptr);
2102
2103protected:
2104 isl_schedule *ptr = nullptr;
2105
2106 inline explicit schedule(__isl_take isl_schedule *ptr);
2107
2108public:
2109 inline /* implicit */ schedule();
2110 inline /* implicit */ schedule(const schedule &obj);
2111 inline explicit schedule(isl::checked::ctx ctx, const std::string &str);
2112 inline schedule &operator=(schedule obj);
2113 inline ~schedule();
2114 inline __isl_give isl_schedule *copy() const &;
2115 inline __isl_give isl_schedule *copy() && = delete;
2116 inline __isl_keep isl_schedule *get() const;
2117 inline __isl_give isl_schedule *release();
2118 inline bool is_null() const;
2119 inline isl::checked::ctx ctx() const;
2120
2121 static inline isl::checked::schedule from_domain(isl::checked::union_set domain);
2122 inline isl::checked::union_map map() const;
2123 inline isl::checked::union_map get_map() const;
2124 inline isl::checked::schedule_node root() const;
2125 inline isl::checked::schedule_node get_root() const;
2126 inline isl::checked::schedule pullback(isl::checked::union_pw_multi_aff upma) const;
2127};
2128
2129// declarations for isl::schedule_constraints
2130inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
2131inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
2132
2133class schedule_constraints {
2134 friend inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
2135 friend inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
2136
2137protected:
2138 isl_schedule_constraints *ptr = nullptr;
2139
2140 inline explicit schedule_constraints(__isl_take isl_schedule_constraints *ptr);
2141
2142public:
2143 inline /* implicit */ schedule_constraints();
2144 inline /* implicit */ schedule_constraints(const schedule_constraints &obj);
2145 inline explicit schedule_constraints(isl::checked::ctx ctx, const std::string &str);
2146 inline schedule_constraints &operator=(schedule_constraints obj);
2147 inline ~schedule_constraints();
2148 inline __isl_give isl_schedule_constraints *copy() const &;
2149 inline __isl_give isl_schedule_constraints *copy() && = delete;
2150 inline __isl_keep isl_schedule_constraints *get() const;
2151 inline __isl_give isl_schedule_constraints *release();
2152 inline bool is_null() const;
2153 inline isl::checked::ctx ctx() const;
2154
2155 inline isl::checked::schedule compute_schedule() const;
2156 inline isl::checked::union_map coincidence() const;
2157 inline isl::checked::union_map get_coincidence() const;
2158 inline isl::checked::union_map conditional_validity() const;
2159 inline isl::checked::union_map get_conditional_validity() const;
2160 inline isl::checked::union_map conditional_validity_condition() const;
2161 inline isl::checked::union_map get_conditional_validity_condition() const;
2162 inline isl::checked::set context() const;
2163 inline isl::checked::set get_context() const;
2164 inline isl::checked::union_set domain() const;
2165 inline isl::checked::union_set get_domain() const;
2166 inline isl::checked::union_map proximity() const;
2167 inline isl::checked::union_map get_proximity() const;
2168 inline isl::checked::union_map validity() const;
2169 inline isl::checked::union_map get_validity() const;
2170 static inline isl::checked::schedule_constraints on_domain(isl::checked::union_set domain);
2171 inline isl::checked::schedule_constraints set_coincidence(isl::checked::union_map coincidence) const;
2172 inline isl::checked::schedule_constraints set_conditional_validity(isl::checked::union_map condition, isl::checked::union_map validity) const;
2173 inline isl::checked::schedule_constraints set_context(isl::checked::set context) const;
2174 inline isl::checked::schedule_constraints set_proximity(isl::checked::union_map proximity) const;
2175 inline isl::checked::schedule_constraints set_validity(isl::checked::union_map validity) const;
2176};
2177
2178// declarations for isl::schedule_node
2179inline schedule_node manage(__isl_take isl_schedule_node *ptr);
2180inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
2181
2182class schedule_node {
2183 friend inline schedule_node manage(__isl_take isl_schedule_node *ptr);
2184 friend inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
2185
2186protected:
2187 isl_schedule_node *ptr = nullptr;
2188
2189 inline explicit schedule_node(__isl_take isl_schedule_node *ptr);
2190
2191public:
2192 inline /* implicit */ schedule_node();
2193 inline /* implicit */ schedule_node(const schedule_node &obj);
2194 inline schedule_node &operator=(schedule_node obj);
2195 inline ~schedule_node();
2196 inline __isl_give isl_schedule_node *copy() const &;
2197 inline __isl_give isl_schedule_node *copy() && = delete;
2198 inline __isl_keep isl_schedule_node *get() const;
2199 inline __isl_give isl_schedule_node *release();
2200 inline bool is_null() const;
2201private:
2202 template <typename T,
2203 typename = typename std::enable_if<std::is_same<
2204 const decltype(isl_schedule_node_get_type(NULL)),
2205 const T>::value>::type>
2206 inline boolean isa_type(T subtype) const;
2207public:
2208 template <class T> inline boolean isa() const;
2209 template <class T> inline T as() const;
2210 inline isl::checked::ctx ctx() const;
2211
2212 inline isl::checked::schedule_node ancestor(int generation) const;
2213 inline isl::checked::schedule_node child(int pos) const;
2214 inline boolean every_descendant(const std::function<boolean(isl::checked::schedule_node)> &test) const;
2215 inline isl::checked::schedule_node first_child() const;
2216 inline stat foreach_ancestor_top_down(const std::function<stat(isl::checked::schedule_node)> &fn) const;
2217 inline stat foreach_descendant_top_down(const std::function<boolean(isl::checked::schedule_node)> &fn) const;
2218 static inline isl::checked::schedule_node from_domain(isl::checked::union_set domain);
2219 static inline isl::checked::schedule_node from_extension(isl::checked::union_map extension);
2220 inline class size ancestor_child_position(const isl::checked::schedule_node &ancestor) const;
2221 inline class size get_ancestor_child_position(const isl::checked::schedule_node &ancestor) const;
2222 inline class size child_position() const;
2223 inline class size get_child_position() const;
2224 inline isl::checked::multi_union_pw_aff prefix_schedule_multi_union_pw_aff() const;
2225 inline isl::checked::multi_union_pw_aff get_prefix_schedule_multi_union_pw_aff() const;
2226 inline isl::checked::union_map prefix_schedule_union_map() const;
2227 inline isl::checked::union_map get_prefix_schedule_union_map() const;
2228 inline isl::checked::union_pw_multi_aff prefix_schedule_union_pw_multi_aff() const;
2229 inline isl::checked::union_pw_multi_aff get_prefix_schedule_union_pw_multi_aff() const;
2230 inline isl::checked::schedule schedule() const;
2231 inline isl::checked::schedule get_schedule() const;
2232 inline isl::checked::schedule_node shared_ancestor(const isl::checked::schedule_node &node2) const;
2233 inline isl::checked::schedule_node get_shared_ancestor(const isl::checked::schedule_node &node2) const;
2234 inline class size tree_depth() const;
2235 inline class size get_tree_depth() const;
2236 inline isl::checked::schedule_node graft_after(isl::checked::schedule_node graft) const;
2237 inline isl::checked::schedule_node graft_before(isl::checked::schedule_node graft) const;
2238 inline boolean has_children() const;
2239 inline boolean has_next_sibling() const;
2240 inline boolean has_parent() const;
2241 inline boolean has_previous_sibling() const;
2242 inline isl::checked::schedule_node insert_context(isl::checked::set context) const;
2243 inline isl::checked::schedule_node insert_filter(isl::checked::union_set filter) const;
2244 inline isl::checked::schedule_node insert_guard(isl::checked::set context) const;
2245 inline isl::checked::schedule_node insert_mark(isl::checked::id mark) const;
2246 inline isl::checked::schedule_node insert_mark(const std::string &mark) const;
2247 inline isl::checked::schedule_node insert_partial_schedule(isl::checked::multi_union_pw_aff schedule) const;
2248 inline isl::checked::schedule_node insert_sequence(isl::checked::union_set_list filters) const;
2249 inline isl::checked::schedule_node insert_set(isl::checked::union_set_list filters) const;
2250 inline boolean is_equal(const isl::checked::schedule_node &node2) const;
2251 inline boolean is_subtree_anchored() const;
2252 inline isl::checked::schedule_node map_descendant_bottom_up(const std::function<isl::checked::schedule_node(isl::checked::schedule_node)> &fn) const;
2253 inline class size n_children() const;
2254 inline isl::checked::schedule_node next_sibling() const;
2255 inline isl::checked::schedule_node order_after(isl::checked::union_set filter) const;
2256 inline isl::checked::schedule_node order_before(isl::checked::union_set filter) const;
2257 inline isl::checked::schedule_node parent() const;
2258 inline isl::checked::schedule_node previous_sibling() const;
2259 inline isl::checked::schedule_node root() const;
2260};
2261
2262// declarations for isl::schedule_node_band
2263
2264class schedule_node_band : public schedule_node {
2265 template <class T>
2266 friend boolean schedule_node::isa() const;
2267 friend schedule_node_band schedule_node::as<schedule_node_band>() const;
2268 static const auto type = isl_schedule_node_band;
2269
2270protected:
2271 inline explicit schedule_node_band(__isl_take isl_schedule_node *ptr);
2272
2273public:
2274 inline /* implicit */ schedule_node_band();
2275 inline /* implicit */ schedule_node_band(const schedule_node_band &obj);
2276 inline schedule_node_band &operator=(schedule_node_band obj);
2277 inline isl::checked::ctx ctx() const;
2278
2279 inline isl::checked::union_set ast_build_options() const;
2280 inline isl::checked::union_set get_ast_build_options() const;
2281 inline isl::checked::set ast_isolate_option() const;
2282 inline isl::checked::set get_ast_isolate_option() const;
2283 inline isl::checked::multi_union_pw_aff partial_schedule() const;
2284 inline isl::checked::multi_union_pw_aff get_partial_schedule() const;
2285 inline boolean permutable() const;
2286 inline boolean get_permutable() const;
2287 inline boolean member_get_coincident(int pos) const;
2288 inline schedule_node_band member_set_coincident(int pos, int coincident) const;
2289 inline schedule_node_band mod(isl::checked::multi_val mv) const;
2290 inline class size n_member() const;
2291 inline schedule_node_band scale(isl::checked::multi_val mv) const;
2292 inline schedule_node_band scale_down(isl::checked::multi_val mv) const;
2293 inline schedule_node_band set_ast_build_options(isl::checked::union_set options) const;
2294 inline schedule_node_band set_permutable(int permutable) const;
2295 inline schedule_node_band shift(isl::checked::multi_union_pw_aff shift) const;
2296 inline schedule_node_band split(int pos) const;
2297 inline schedule_node_band tile(isl::checked::multi_val sizes) const;
2298 inline schedule_node_band member_set_ast_loop_default(int pos) const;
2299 inline schedule_node_band member_set_ast_loop_atomic(int pos) const;
2300 inline schedule_node_band member_set_ast_loop_unroll(int pos) const;
2301 inline schedule_node_band member_set_ast_loop_separate(int pos) const;
2302};
2303
2304// declarations for isl::schedule_node_context
2305
2306class schedule_node_context : public schedule_node {
2307 template <class T>
2308 friend boolean schedule_node::isa() const;
2309 friend schedule_node_context schedule_node::as<schedule_node_context>() const;
2310 static const auto type = isl_schedule_node_context;
2311
2312protected:
2313 inline explicit schedule_node_context(__isl_take isl_schedule_node *ptr);
2314
2315public:
2316 inline /* implicit */ schedule_node_context();
2317 inline /* implicit */ schedule_node_context(const schedule_node_context &obj);
2318 inline schedule_node_context &operator=(schedule_node_context obj);
2319 inline isl::checked::ctx ctx() const;
2320
2321 inline isl::checked::set context() const;
2322 inline isl::checked::set get_context() const;
2323};
2324
2325// declarations for isl::schedule_node_domain
2326
2327class schedule_node_domain : public schedule_node {
2328 template <class T>
2329 friend boolean schedule_node::isa() const;
2330 friend schedule_node_domain schedule_node::as<schedule_node_domain>() const;
2331 static const auto type = isl_schedule_node_domain;
2332
2333protected:
2334 inline explicit schedule_node_domain(__isl_take isl_schedule_node *ptr);
2335
2336public:
2337 inline /* implicit */ schedule_node_domain();
2338 inline /* implicit */ schedule_node_domain(const schedule_node_domain &obj);
2339 inline schedule_node_domain &operator=(schedule_node_domain obj);
2340 inline isl::checked::ctx ctx() const;
2341
2342 inline isl::checked::union_set domain() const;
2343 inline isl::checked::union_set get_domain() const;
2344};
2345
2346// declarations for isl::schedule_node_expansion
2347
2348class schedule_node_expansion : public schedule_node {
2349 template <class T>
2350 friend boolean schedule_node::isa() const;
2351 friend schedule_node_expansion schedule_node::as<schedule_node_expansion>() const;
2352 static const auto type = isl_schedule_node_expansion;
2353
2354protected:
2355 inline explicit schedule_node_expansion(__isl_take isl_schedule_node *ptr);
2356
2357public:
2358 inline /* implicit */ schedule_node_expansion();
2359 inline /* implicit */ schedule_node_expansion(const schedule_node_expansion &obj);
2360 inline schedule_node_expansion &operator=(schedule_node_expansion obj);
2361 inline isl::checked::ctx ctx() const;
2362
2363 inline isl::checked::union_pw_multi_aff contraction() const;
2364 inline isl::checked::union_pw_multi_aff get_contraction() const;
2365 inline isl::checked::union_map expansion() const;
2366 inline isl::checked::union_map get_expansion() const;
2367};
2368
2369// declarations for isl::schedule_node_extension
2370
2371class schedule_node_extension : public schedule_node {
2372 template <class T>
2373 friend boolean schedule_node::isa() const;
2374 friend schedule_node_extension schedule_node::as<schedule_node_extension>() const;
2375 static const auto type = isl_schedule_node_extension;
2376
2377protected:
2378 inline explicit schedule_node_extension(__isl_take isl_schedule_node *ptr);
2379
2380public:
2381 inline /* implicit */ schedule_node_extension();
2382 inline /* implicit */ schedule_node_extension(const schedule_node_extension &obj);
2383 inline schedule_node_extension &operator=(schedule_node_extension obj);
2384 inline isl::checked::ctx ctx() const;
2385
2386 inline isl::checked::union_map extension() const;
2387 inline isl::checked::union_map get_extension() const;
2388};
2389
2390// declarations for isl::schedule_node_filter
2391
2392class schedule_node_filter : public schedule_node {
2393 template <class T>
2394 friend boolean schedule_node::isa() const;
2395 friend schedule_node_filter schedule_node::as<schedule_node_filter>() const;
2396 static const auto type = isl_schedule_node_filter;
2397
2398protected:
2399 inline explicit schedule_node_filter(__isl_take isl_schedule_node *ptr);
2400
2401public:
2402 inline /* implicit */ schedule_node_filter();
2403 inline /* implicit */ schedule_node_filter(const schedule_node_filter &obj);
2404 inline schedule_node_filter &operator=(schedule_node_filter obj);
2405 inline isl::checked::ctx ctx() const;
2406
2407 inline isl::checked::union_set filter() const;
2408 inline isl::checked::union_set get_filter() const;
2409};
2410
2411// declarations for isl::schedule_node_guard
2412
2413class schedule_node_guard : public schedule_node {
2414 template <class T>
2415 friend boolean schedule_node::isa() const;
2416 friend schedule_node_guard schedule_node::as<schedule_node_guard>() const;
2417 static const auto type = isl_schedule_node_guard;
2418
2419protected:
2420 inline explicit schedule_node_guard(__isl_take isl_schedule_node *ptr);
2421
2422public:
2423 inline /* implicit */ schedule_node_guard();
2424 inline /* implicit */ schedule_node_guard(const schedule_node_guard &obj);
2425 inline schedule_node_guard &operator=(schedule_node_guard obj);
2426 inline isl::checked::ctx ctx() const;
2427
2428 inline isl::checked::set guard() const;
2429 inline isl::checked::set get_guard() const;
2430};
2431
2432// declarations for isl::schedule_node_leaf
2433
2434class schedule_node_leaf : public schedule_node {
2435 template <class T>
2436 friend boolean schedule_node::isa() const;
2437 friend schedule_node_leaf schedule_node::as<schedule_node_leaf>() const;
2438 static const auto type = isl_schedule_node_leaf;
2439
2440protected:
2441 inline explicit schedule_node_leaf(__isl_take isl_schedule_node *ptr);
2442
2443public:
2444 inline /* implicit */ schedule_node_leaf();
2445 inline /* implicit */ schedule_node_leaf(const schedule_node_leaf &obj);
2446 inline schedule_node_leaf &operator=(schedule_node_leaf obj);
2447 inline isl::checked::ctx ctx() const;
2448
2449};
2450
2451// declarations for isl::schedule_node_mark
2452
2453class schedule_node_mark : public schedule_node {
2454 template <class T>
2455 friend boolean schedule_node::isa() const;
2456 friend schedule_node_mark schedule_node::as<schedule_node_mark>() const;
2457 static const auto type = isl_schedule_node_mark;
2458
2459protected:
2460 inline explicit schedule_node_mark(__isl_take isl_schedule_node *ptr);
2461
2462public:
2463 inline /* implicit */ schedule_node_mark();
2464 inline /* implicit */ schedule_node_mark(const schedule_node_mark &obj);
2465 inline schedule_node_mark &operator=(schedule_node_mark obj);
2466 inline isl::checked::ctx ctx() const;
2467
2468};
2469
2470// declarations for isl::schedule_node_sequence
2471
2472class schedule_node_sequence : public schedule_node {
2473 template <class T>
2474 friend boolean schedule_node::isa() const;
2475 friend schedule_node_sequence schedule_node::as<schedule_node_sequence>() const;
2476 static const auto type = isl_schedule_node_sequence;
2477
2478protected:
2479 inline explicit schedule_node_sequence(__isl_take isl_schedule_node *ptr);
2480
2481public:
2482 inline /* implicit */ schedule_node_sequence();
2483 inline /* implicit */ schedule_node_sequence(const schedule_node_sequence &obj);
2484 inline schedule_node_sequence &operator=(schedule_node_sequence obj);
2485 inline isl::checked::ctx ctx() const;
2486
2487};
2488
2489// declarations for isl::schedule_node_set
2490
2491class schedule_node_set : public schedule_node {
2492 template <class T>
2493 friend boolean schedule_node::isa() const;
2494 friend schedule_node_set schedule_node::as<schedule_node_set>() const;
2495 static const auto type = isl_schedule_node_set;
2496
2497protected:
2498 inline explicit schedule_node_set(__isl_take isl_schedule_node *ptr);
2499
2500public:
2501 inline /* implicit */ schedule_node_set();
2502 inline /* implicit */ schedule_node_set(const schedule_node_set &obj);
2503 inline schedule_node_set &operator=(schedule_node_set obj);
2504 inline isl::checked::ctx ctx() const;
2505
2506};
2507
2508// declarations for isl::set
2509inline set manage(__isl_take isl_set *ptr);
2510inline set manage_copy(__isl_keep isl_set *ptr);
2511
2512class set {
2513 friend inline set manage(__isl_take isl_set *ptr);
2514 friend inline set manage_copy(__isl_keep isl_set *ptr);
2515
2516protected:
2517 isl_set *ptr = nullptr;
2518
2519 inline explicit set(__isl_take isl_set *ptr);
2520
2521public:
2522 inline /* implicit */ set();
2523 inline /* implicit */ set(const set &obj);
2524 inline /* implicit */ set(isl::checked::basic_set bset);
2525 inline /* implicit */ set(isl::checked::point pnt);
2526 inline explicit set(isl::checked::ctx ctx, const std::string &str);
2527 inline set &operator=(set obj);
2528 inline ~set();
2529 inline __isl_give isl_set *copy() const &;
2530 inline __isl_give isl_set *copy() && = delete;
2531 inline __isl_keep isl_set *get() const;
2532 inline __isl_give isl_set *release();
2533 inline bool is_null() const;
2534 inline isl::checked::ctx ctx() const;
2535
2536 inline isl::checked::basic_set affine_hull() const;
2537 inline isl::checked::set apply(isl::checked::map map) const;
2538 inline isl::checked::set bind(isl::checked::multi_id tuple) const;
2539 inline isl::checked::set coalesce() const;
2540 inline isl::checked::set complement() const;
2541 inline isl::checked::set detect_equalities() const;
2542 inline isl::checked::val dim_max_val(int pos) const;
2543 inline isl::checked::val dim_min_val(int pos) const;
2544 static inline isl::checked::set empty(isl::checked::space space);
2545 inline isl::checked::set flatten() const;
2546 inline stat foreach_basic_set(const std::function<stat(isl::checked::basic_set)> &fn) const;
2547 inline stat foreach_point(const std::function<stat(isl::checked::point)> &fn) const;
2548 inline isl::checked::multi_val plain_multi_val_if_fixed() const;
2549 inline isl::checked::multi_val get_plain_multi_val_if_fixed() const;
2550 inline isl::checked::fixed_box simple_fixed_box_hull() const;
2551 inline isl::checked::fixed_box get_simple_fixed_box_hull() const;
2552 inline isl::checked::space space() const;
2553 inline isl::checked::space get_space() const;
2554 inline isl::checked::val stride(int pos) const;
2555 inline isl::checked::val get_stride(int pos) const;
2556 inline isl::checked::set gist(isl::checked::set context) const;
2557 inline isl::checked::map identity() const;
2558 inline isl::checked::pw_aff indicator_function() const;
2559 inline isl::checked::map insert_domain(isl::checked::space domain) const;
2560 inline isl::checked::set intersect(isl::checked::set set2) const;
2561 inline isl::checked::set intersect_params(isl::checked::set params) const;
2562 inline boolean involves_locals() const;
2563 inline boolean is_disjoint(const isl::checked::set &set2) const;
2564 inline boolean is_empty() const;
2565 inline boolean is_equal(const isl::checked::set &set2) const;
2566 inline boolean is_singleton() const;
2567 inline boolean is_strict_subset(const isl::checked::set &set2) const;
2568 inline boolean is_subset(const isl::checked::set &set2) const;
2569 inline boolean is_wrapping() const;
2570 inline isl::checked::set lexmax() const;
2571 inline isl::checked::pw_multi_aff lexmax_pw_multi_aff() const;
2572 inline isl::checked::set lexmin() const;
2573 inline isl::checked::pw_multi_aff lexmin_pw_multi_aff() const;
2574 inline isl::checked::set lower_bound(isl::checked::multi_pw_aff lower) const;
2575 inline isl::checked::set lower_bound(isl::checked::multi_val lower) const;
2576 inline isl::checked::multi_pw_aff max_multi_pw_aff() const;
2577 inline isl::checked::val max_val(const isl::checked::aff &obj) const;
2578 inline isl::checked::multi_pw_aff min_multi_pw_aff() const;
2579 inline isl::checked::val min_val(const isl::checked::aff &obj) const;
2580 inline isl::checked::set params() const;
2581 inline isl::checked::basic_set polyhedral_hull() const;
2582 inline isl::checked::set preimage(isl::checked::multi_aff ma) const;
2583 inline isl::checked::set preimage(isl::checked::multi_pw_aff mpa) const;
2584 inline isl::checked::set preimage(isl::checked::pw_multi_aff pma) const;
2585 inline isl::checked::set product(isl::checked::set set2) const;
2586 inline isl::checked::set project_out_all_params() const;
2587 inline isl::checked::set project_out_param(isl::checked::id id) const;
2588 inline isl::checked::set project_out_param(const std::string &id) const;
2589 inline isl::checked::set project_out_param(isl::checked::id_list list) const;
2590 inline isl::checked::basic_set sample() const;
2591 inline isl::checked::point sample_point() const;
2592 inline isl::checked::set subtract(isl::checked::set set2) const;
2593 inline isl::checked::set unbind_params(isl::checked::multi_id tuple) const;
2594 inline isl::checked::map unbind_params_insert_domain(isl::checked::multi_id domain) const;
2595 inline isl::checked::set unite(isl::checked::set set2) const;
2596 static inline isl::checked::set universe(isl::checked::space space);
2597 inline isl::checked::basic_set unshifted_simple_hull() const;
2598 inline isl::checked::map unwrap() const;
2599 inline isl::checked::set upper_bound(isl::checked::multi_pw_aff upper) const;
2600 inline isl::checked::set upper_bound(isl::checked::multi_val upper) const;
2601};
2602
2603// declarations for isl::space
2604inline space manage(__isl_take isl_space *ptr);
2605inline space manage_copy(__isl_keep isl_space *ptr);
2606
2607class space {
2608 friend inline space manage(__isl_take isl_space *ptr);
2609 friend inline space manage_copy(__isl_keep isl_space *ptr);
2610
2611protected:
2612 isl_space *ptr = nullptr;
2613
2614 inline explicit space(__isl_take isl_space *ptr);
2615
2616public:
2617 inline /* implicit */ space();
2618 inline /* implicit */ space(const space &obj);
2619 inline space &operator=(space obj);
2620 inline ~space();
2621 inline __isl_give isl_space *copy() const &;
2622 inline __isl_give isl_space *copy() && = delete;
2623 inline __isl_keep isl_space *get() const;
2624 inline __isl_give isl_space *release();
2625 inline bool is_null() const;
2626 inline isl::checked::ctx ctx() const;
2627
2628 inline isl::checked::space add_named_tuple(isl::checked::id tuple_id, unsigned int dim) const;
2629 inline isl::checked::space add_named_tuple(const std::string &tuple_id, unsigned int dim) const;
2630 inline isl::checked::space add_unnamed_tuple(unsigned int dim) const;
2631 inline isl::checked::space domain() const;
2632 inline isl::checked::space flatten_domain() const;
2633 inline isl::checked::space flatten_range() const;
2634 inline boolean is_equal(const isl::checked::space &space2) const;
2635 inline boolean is_wrapping() const;
2636 inline isl::checked::space map_from_set() const;
2637 inline isl::checked::space params() const;
2638 inline isl::checked::space range() const;
2639 static inline isl::checked::space unit(isl::checked::ctx ctx);
2640 inline isl::checked::space unwrap() const;
2641 inline isl::checked::space wrap() const;
2642};
2643
2644// declarations for isl::union_access_info
2645inline union_access_info manage(__isl_take isl_union_access_info *ptr);
2646inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
2647
2648class union_access_info {
2649 friend inline union_access_info manage(__isl_take isl_union_access_info *ptr);
2650 friend inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
2651
2652protected:
2653 isl_union_access_info *ptr = nullptr;
2654
2655 inline explicit union_access_info(__isl_take isl_union_access_info *ptr);
2656
2657public:
2658 inline /* implicit */ union_access_info();
2659 inline /* implicit */ union_access_info(const union_access_info &obj);
2660 inline explicit union_access_info(isl::checked::union_map sink);
2661 inline union_access_info &operator=(union_access_info obj);
2662 inline ~union_access_info();
2663 inline __isl_give isl_union_access_info *copy() const &;
2664 inline __isl_give isl_union_access_info *copy() && = delete;
2665 inline __isl_keep isl_union_access_info *get() const;
2666 inline __isl_give isl_union_access_info *release();
2667 inline bool is_null() const;
2668 inline isl::checked::ctx ctx() const;
2669
2670 inline isl::checked::union_flow compute_flow() const;
2671 inline isl::checked::union_access_info set_kill(isl::checked::union_map kill) const;
2672 inline isl::checked::union_access_info set_may_source(isl::checked::union_map may_source) const;
2673 inline isl::checked::union_access_info set_must_source(isl::checked::union_map must_source) const;
2674 inline isl::checked::union_access_info set_schedule(isl::checked::schedule schedule) const;
2675 inline isl::checked::union_access_info set_schedule_map(isl::checked::union_map schedule_map) const;
2676};
2677
2678// declarations for isl::union_flow
2679inline union_flow manage(__isl_take isl_union_flow *ptr);
2680inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
2681
2682class union_flow {
2683 friend inline union_flow manage(__isl_take isl_union_flow *ptr);
2684 friend inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
2685
2686protected:
2687 isl_union_flow *ptr = nullptr;
2688
2689 inline explicit union_flow(__isl_take isl_union_flow *ptr);
2690
2691public:
2692 inline /* implicit */ union_flow();
2693 inline /* implicit */ union_flow(const union_flow &obj);
2694 inline union_flow &operator=(union_flow obj);
2695 inline ~union_flow();
2696 inline __isl_give isl_union_flow *copy() const &;
2697 inline __isl_give isl_union_flow *copy() && = delete;
2698 inline __isl_keep isl_union_flow *get() const;
2699 inline __isl_give isl_union_flow *release();
2700 inline bool is_null() const;
2701 inline isl::checked::ctx ctx() const;
2702
2703 inline isl::checked::union_map full_may_dependence() const;
2704 inline isl::checked::union_map get_full_may_dependence() const;
2705 inline isl::checked::union_map full_must_dependence() const;
2706 inline isl::checked::union_map get_full_must_dependence() const;
2707 inline isl::checked::union_map may_dependence() const;
2708 inline isl::checked::union_map get_may_dependence() const;
2709 inline isl::checked::union_map may_no_source() const;
2710 inline isl::checked::union_map get_may_no_source() const;
2711 inline isl::checked::union_map must_dependence() const;
2712 inline isl::checked::union_map get_must_dependence() const;
2713 inline isl::checked::union_map must_no_source() const;
2714 inline isl::checked::union_map get_must_no_source() const;
2715};
2716
2717// declarations for isl::union_map
2718inline union_map manage(__isl_take isl_union_map *ptr);
2719inline union_map manage_copy(__isl_keep isl_union_map *ptr);
2720
2721class union_map {
2722 friend inline union_map manage(__isl_take isl_union_map *ptr);
2723 friend inline union_map manage_copy(__isl_keep isl_union_map *ptr);
2724
2725protected:
2726 isl_union_map *ptr = nullptr;
2727
2728 inline explicit union_map(__isl_take isl_union_map *ptr);
2729
2730public:
2731 inline /* implicit */ union_map();
2732 inline /* implicit */ union_map(const union_map &obj);
2733 inline /* implicit */ union_map(isl::checked::basic_map bmap);
2734 inline /* implicit */ union_map(isl::checked::map map);
2735 inline explicit union_map(isl::checked::ctx ctx, const std::string &str);
2736 inline union_map &operator=(union_map obj);
2737 inline ~union_map();
2738 inline __isl_give isl_union_map *copy() const &;
2739 inline __isl_give isl_union_map *copy() && = delete;
2740 inline __isl_keep isl_union_map *get() const;
2741 inline __isl_give isl_union_map *release();
2742 inline bool is_null() const;
2743 inline isl::checked::ctx ctx() const;
2744
2745 inline isl::checked::union_map affine_hull() const;
2746 inline isl::checked::union_map apply_domain(isl::checked::union_map umap2) const;
2747 inline isl::checked::union_map apply_range(isl::checked::union_map umap2) const;
2748 inline isl::checked::union_set bind_range(isl::checked::multi_id tuple) const;
2749 inline isl::checked::union_map coalesce() const;
2750 inline isl::checked::union_map compute_divs() const;
2751 inline isl::checked::union_map curry() const;
2752 inline isl::checked::union_set deltas() const;
2753 inline isl::checked::union_map detect_equalities() const;
2754 inline isl::checked::union_set domain() const;
2755 inline isl::checked::union_map domain_factor_domain() const;
2756 inline isl::checked::union_map domain_factor_range() const;
2757 inline isl::checked::union_map domain_map() const;
2758 inline isl::checked::union_pw_multi_aff domain_map_union_pw_multi_aff() const;
2759 inline isl::checked::union_map domain_product(isl::checked::union_map umap2) const;
2760 static inline isl::checked::union_map empty(isl::checked::ctx ctx);
2761 inline isl::checked::union_map eq_at(isl::checked::multi_union_pw_aff mupa) const;
2762 inline boolean every_map(const std::function<boolean(isl::checked::map)> &test) const;
2763 inline isl::checked::map extract_map(isl::checked::space space) const;
2764 inline isl::checked::union_map factor_domain() const;
2765 inline isl::checked::union_map factor_range() const;
2766 inline isl::checked::union_map fixed_power(isl::checked::val exp) const;
2767 inline isl::checked::union_map fixed_power(long exp) const;
2768 inline stat foreach_map(const std::function<stat(isl::checked::map)> &fn) const;
2769 static inline isl::checked::union_map from(isl::checked::multi_union_pw_aff mupa);
2770 static inline isl::checked::union_map from(isl::checked::union_pw_multi_aff upma);
2771 static inline isl::checked::union_map from_domain(isl::checked::union_set uset);
2772 static inline isl::checked::union_map from_domain_and_range(isl::checked::union_set domain, isl::checked::union_set range);
2773 static inline isl::checked::union_map from_range(isl::checked::union_set uset);
2774 inline isl::checked::space space() const;
2775 inline isl::checked::space get_space() const;
2776 inline isl::checked::union_map gist(isl::checked::union_map context) const;
2777 inline isl::checked::union_map gist_domain(isl::checked::union_set uset) const;
2778 inline isl::checked::union_map gist_params(isl::checked::set set) const;
2779 inline isl::checked::union_map gist_range(isl::checked::union_set uset) const;
2780 inline isl::checked::union_map intersect(isl::checked::union_map umap2) const;
2781 inline isl::checked::union_map intersect_domain(isl::checked::space space) const;
2782 inline isl::checked::union_map intersect_domain(isl::checked::union_set uset) const;
2783 inline isl::checked::union_map intersect_params(isl::checked::set set) const;
2784 inline isl::checked::union_map intersect_range(isl::checked::space space) const;
2785 inline isl::checked::union_map intersect_range(isl::checked::union_set uset) const;
2786 inline boolean is_bijective() const;
2787 inline boolean is_disjoint(const isl::checked::union_map &umap2) const;
2788 inline boolean is_empty() const;
2789 inline boolean is_equal(const isl::checked::union_map &umap2) const;
2790 inline boolean is_injective() const;
2791 inline boolean is_single_valued() const;
2792 inline boolean is_strict_subset(const isl::checked::union_map &umap2) const;
2793 inline boolean is_subset(const isl::checked::union_map &umap2) const;
2794 inline boolean isa_map() const;
2795 inline isl::checked::union_map lexmax() const;
2796 inline isl::checked::union_map lexmin() const;
2797 inline isl::checked::union_map polyhedral_hull() const;
2798 inline isl::checked::union_map preimage_domain(isl::checked::multi_aff ma) const;
2799 inline isl::checked::union_map preimage_domain(isl::checked::multi_pw_aff mpa) const;
2800 inline isl::checked::union_map preimage_domain(isl::checked::pw_multi_aff pma) const;
2801 inline isl::checked::union_map preimage_domain(isl::checked::union_pw_multi_aff upma) const;
2802 inline isl::checked::union_map preimage_range(isl::checked::multi_aff ma) const;
2803 inline isl::checked::union_map preimage_range(isl::checked::pw_multi_aff pma) const;
2804 inline isl::checked::union_map preimage_range(isl::checked::union_pw_multi_aff upma) const;
2805 inline isl::checked::union_map product(isl::checked::union_map umap2) const;
2806 inline isl::checked::union_map project_out_all_params() const;
2807 inline isl::checked::union_set range() const;
2808 inline isl::checked::union_map range_factor_domain() const;
2809 inline isl::checked::union_map range_factor_range() const;
2810 inline isl::checked::union_map range_map() const;
2811 inline isl::checked::union_map range_product(isl::checked::union_map umap2) const;
2812 inline isl::checked::union_map range_reverse() const;
2813 inline isl::checked::union_map reverse() const;
2814 inline isl::checked::union_map subtract(isl::checked::union_map umap2) const;
2815 inline isl::checked::union_map subtract_domain(isl::checked::union_set dom) const;
2816 inline isl::checked::union_map subtract_range(isl::checked::union_set dom) const;
2817 inline isl::checked::union_map uncurry() const;
2818 inline isl::checked::union_map unite(isl::checked::union_map umap2) const;
2819 inline isl::checked::union_map universe() const;
2820 inline isl::checked::union_set wrap() const;
2821 inline isl::checked::union_map zip() const;
2822};
2823
2824// declarations for isl::union_pw_aff
2825inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
2826inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
2827
2828class union_pw_aff {
2829 friend inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
2830 friend inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
2831
2832protected:
2833 isl_union_pw_aff *ptr = nullptr;
2834
2835 inline explicit union_pw_aff(__isl_take isl_union_pw_aff *ptr);
2836
2837public:
2838 inline /* implicit */ union_pw_aff();
2839 inline /* implicit */ union_pw_aff(const union_pw_aff &obj);
2840 inline /* implicit */ union_pw_aff(isl::checked::aff aff);
2841 inline /* implicit */ union_pw_aff(isl::checked::pw_aff pa);
2842 inline explicit union_pw_aff(isl::checked::ctx ctx, const std::string &str);
2843 inline union_pw_aff &operator=(union_pw_aff obj);
2844 inline ~union_pw_aff();
2845 inline __isl_give isl_union_pw_aff *copy() const &;
2846 inline __isl_give isl_union_pw_aff *copy() && = delete;
2847 inline __isl_keep isl_union_pw_aff *get() const;
2848 inline __isl_give isl_union_pw_aff *release();
2849 inline bool is_null() const;
2850 inline isl::checked::ctx ctx() const;
2851
2852 inline isl::checked::union_pw_aff add(isl::checked::union_pw_aff upa2) const;
2853 inline isl::checked::union_set bind(isl::checked::id id) const;
2854 inline isl::checked::union_set bind(const std::string &id) const;
2855 inline isl::checked::union_pw_aff coalesce() const;
2856 inline isl::checked::union_set domain() const;
2857 inline isl::checked::space space() const;
2858 inline isl::checked::space get_space() const;
2859 inline isl::checked::union_pw_aff gist(isl::checked::union_set context) const;
2860 inline isl::checked::union_pw_aff intersect_domain(isl::checked::space space) const;
2861 inline isl::checked::union_pw_aff intersect_domain(isl::checked::union_set uset) const;
2862 inline isl::checked::union_pw_aff intersect_domain_wrapped_domain(isl::checked::union_set uset) const;
2863 inline isl::checked::union_pw_aff intersect_domain_wrapped_range(isl::checked::union_set uset) const;
2864 inline isl::checked::union_pw_aff intersect_params(isl::checked::set set) const;
2865 inline isl::checked::union_pw_aff pullback(isl::checked::union_pw_multi_aff upma) const;
2866 inline isl::checked::union_pw_aff sub(isl::checked::union_pw_aff upa2) const;
2867 inline isl::checked::union_pw_aff subtract_domain(isl::checked::space space) const;
2868 inline isl::checked::union_pw_aff subtract_domain(isl::checked::union_set uset) const;
2869 inline isl::checked::union_pw_aff union_add(isl::checked::union_pw_aff upa2) const;
2870};
2871
2872// declarations for isl::union_pw_aff_list
2873inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
2874inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
2875
2876class union_pw_aff_list {
2877 friend inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
2878 friend inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
2879
2880protected:
2881 isl_union_pw_aff_list *ptr = nullptr;
2882
2883 inline explicit union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr);
2884
2885public:
2886 inline /* implicit */ union_pw_aff_list();
2887 inline /* implicit */ union_pw_aff_list(const union_pw_aff_list &obj);
2888 inline explicit union_pw_aff_list(isl::checked::ctx ctx, int n);
2889 inline explicit union_pw_aff_list(isl::checked::union_pw_aff el);
2890 inline union_pw_aff_list &operator=(union_pw_aff_list obj);
2891 inline ~union_pw_aff_list();
2892 inline __isl_give isl_union_pw_aff_list *copy() const &;
2893 inline __isl_give isl_union_pw_aff_list *copy() && = delete;
2894 inline __isl_keep isl_union_pw_aff_list *get() const;
2895 inline __isl_give isl_union_pw_aff_list *release();
2896 inline bool is_null() const;
2897 inline isl::checked::ctx ctx() const;
2898
2899 inline isl::checked::union_pw_aff_list add(isl::checked::union_pw_aff el) const;
2900 inline isl::checked::union_pw_aff_list clear() const;
2901 inline isl::checked::union_pw_aff_list concat(isl::checked::union_pw_aff_list list2) const;
2902 inline isl::checked::union_pw_aff_list drop(unsigned int first, unsigned int n) const;
2903 inline stat foreach(const std::function<stat(isl::checked::union_pw_aff)> &fn) const;
2904 inline isl::checked::union_pw_aff at(int index) const;
2905 inline isl::checked::union_pw_aff get_at(int index) const;
2906 inline isl::checked::union_pw_aff_list insert(unsigned int pos, isl::checked::union_pw_aff el) const;
2907 inline class size size() const;
2908};
2909
2910// declarations for isl::union_pw_multi_aff
2911inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
2912inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
2913
2914class union_pw_multi_aff {
2915 friend inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
2916 friend inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
2917
2918protected:
2919 isl_union_pw_multi_aff *ptr = nullptr;
2920
2921 inline explicit union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr);
2922
2923public:
2924 inline /* implicit */ union_pw_multi_aff();
2925 inline /* implicit */ union_pw_multi_aff(const union_pw_multi_aff &obj);
2926 inline /* implicit */ union_pw_multi_aff(isl::checked::multi_aff ma);
2927 inline /* implicit */ union_pw_multi_aff(isl::checked::pw_multi_aff pma);
2928 inline /* implicit */ union_pw_multi_aff(isl::checked::union_pw_aff upa);
2929 inline explicit union_pw_multi_aff(isl::checked::ctx ctx, const std::string &str);
2930 inline union_pw_multi_aff &operator=(union_pw_multi_aff obj);
2931 inline ~union_pw_multi_aff();
2932 inline __isl_give isl_union_pw_multi_aff *copy() const &;
2933 inline __isl_give isl_union_pw_multi_aff *copy() && = delete;
2934 inline __isl_keep isl_union_pw_multi_aff *get() const;
2935 inline __isl_give isl_union_pw_multi_aff *release();
2936 inline bool is_null() const;
2937 inline isl::checked::ctx ctx() const;
2938
2939 inline isl::checked::union_pw_multi_aff add(isl::checked::union_pw_multi_aff upma2) const;
2940 inline isl::checked::union_pw_multi_aff apply(isl::checked::union_pw_multi_aff upma2) const;
2941 inline isl::checked::pw_multi_aff as_pw_multi_aff() const;
2942 inline isl::checked::union_pw_multi_aff coalesce() const;
2943 inline isl::checked::union_set domain() const;
2944 static inline isl::checked::union_pw_multi_aff empty(isl::checked::ctx ctx);
2945 inline isl::checked::pw_multi_aff extract_pw_multi_aff(isl::checked::space space) const;
2946 inline isl::checked::union_pw_multi_aff flat_range_product(isl::checked::union_pw_multi_aff upma2) const;
2947 inline isl::checked::space space() const;
2948 inline isl::checked::space get_space() const;
2949 inline isl::checked::union_pw_multi_aff gist(isl::checked::union_set context) const;
2950 inline isl::checked::union_pw_multi_aff intersect_domain(isl::checked::space space) const;
2951 inline isl::checked::union_pw_multi_aff intersect_domain(isl::checked::union_set uset) const;
2952 inline isl::checked::union_pw_multi_aff intersect_domain_wrapped_domain(isl::checked::union_set uset) const;
2953 inline isl::checked::union_pw_multi_aff intersect_domain_wrapped_range(isl::checked::union_set uset) const;
2954 inline isl::checked::union_pw_multi_aff intersect_params(isl::checked::set set) const;
2955 inline boolean involves_locals() const;
2956 inline boolean isa_pw_multi_aff() const;
2957 inline boolean plain_is_empty() const;
2958 inline isl::checked::union_pw_multi_aff pullback(isl::checked::union_pw_multi_aff upma2) const;
2959 inline isl::checked::union_pw_multi_aff range_factor_domain() const;
2960 inline isl::checked::union_pw_multi_aff range_factor_range() const;
2961 inline isl::checked::union_pw_multi_aff range_product(isl::checked::union_pw_multi_aff upma2) const;
2962 inline isl::checked::union_pw_multi_aff sub(isl::checked::union_pw_multi_aff upma2) const;
2963 inline isl::checked::union_pw_multi_aff subtract_domain(isl::checked::space space) const;
2964 inline isl::checked::union_pw_multi_aff subtract_domain(isl::checked::union_set uset) const;
2965 inline isl::checked::union_pw_multi_aff union_add(isl::checked::union_pw_multi_aff upma2) const;
2966};
2967
2968// declarations for isl::union_set
2969inline union_set manage(__isl_take isl_union_set *ptr);
2970inline union_set manage_copy(__isl_keep isl_union_set *ptr);
2971
2972class union_set {
2973 friend inline union_set manage(__isl_take isl_union_set *ptr);
2974 friend inline union_set manage_copy(__isl_keep isl_union_set *ptr);
2975
2976protected:
2977 isl_union_set *ptr = nullptr;
2978
2979 inline explicit union_set(__isl_take isl_union_set *ptr);
2980
2981public:
2982 inline /* implicit */ union_set();
2983 inline /* implicit */ union_set(const union_set &obj);
2984 inline /* implicit */ union_set(isl::checked::basic_set bset);
2985 inline /* implicit */ union_set(isl::checked::point pnt);
2986 inline /* implicit */ union_set(isl::checked::set set);
2987 inline explicit union_set(isl::checked::ctx ctx, const std::string &str);
2988 inline union_set &operator=(union_set obj);
2989 inline ~union_set();
2990 inline __isl_give isl_union_set *copy() const &;
2991 inline __isl_give isl_union_set *copy() && = delete;
2992 inline __isl_keep isl_union_set *get() const;
2993 inline __isl_give isl_union_set *release();
2994 inline bool is_null() const;
2995 inline isl::checked::ctx ctx() const;
2996
2997 inline isl::checked::union_set affine_hull() const;
2998 inline isl::checked::union_set apply(isl::checked::union_map umap) const;
2999 inline isl::checked::union_set coalesce() const;
3000 inline isl::checked::union_set compute_divs() const;
3001 inline isl::checked::union_set detect_equalities() const;
3002 static inline isl::checked::union_set empty(isl::checked::ctx ctx);
3003 inline boolean every_set(const std::function<boolean(isl::checked::set)> &test) const;
3004 inline isl::checked::set extract_set(isl::checked::space space) const;
3005 inline stat foreach_point(const std::function<stat(isl::checked::point)> &fn) const;
3006 inline stat foreach_set(const std::function<stat(isl::checked::set)> &fn) const;
3007 inline isl::checked::space space() const;
3008 inline isl::checked::space get_space() const;
3009 inline isl::checked::union_set gist(isl::checked::union_set context) const;
3010 inline isl::checked::union_set gist_params(isl::checked::set set) const;
3011 inline isl::checked::union_map identity() const;
3012 inline isl::checked::union_set intersect(isl::checked::union_set uset2) const;
3013 inline isl::checked::union_set intersect_params(isl::checked::set set) const;
3014 inline boolean is_disjoint(const isl::checked::union_set &uset2) const;
3015 inline boolean is_empty() const;
3016 inline boolean is_equal(const isl::checked::union_set &uset2) const;
3017 inline boolean is_strict_subset(const isl::checked::union_set &uset2) const;
3018 inline boolean is_subset(const isl::checked::union_set &uset2) const;
3019 inline boolean isa_set() const;
3020 inline isl::checked::union_set lexmax() const;
3021 inline isl::checked::union_set lexmin() const;
3022 inline isl::checked::union_set polyhedral_hull() const;
3023 inline isl::checked::union_set preimage(isl::checked::multi_aff ma) const;
3024 inline isl::checked::union_set preimage(isl::checked::pw_multi_aff pma) const;
3025 inline isl::checked::union_set preimage(isl::checked::union_pw_multi_aff upma) const;
3026 inline isl::checked::point sample_point() const;
3027 inline isl::checked::union_set subtract(isl::checked::union_set uset2) const;
3028 inline isl::checked::union_set unite(isl::checked::union_set uset2) const;
3029 inline isl::checked::union_set universe() const;
3030 inline isl::checked::union_map unwrap() const;
3031};
3032
3033// declarations for isl::union_set_list
3034inline union_set_list manage(__isl_take isl_union_set_list *ptr);
3035inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
3036
3037class union_set_list {
3038 friend inline union_set_list manage(__isl_take isl_union_set_list *ptr);
3039 friend inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
3040
3041protected:
3042 isl_union_set_list *ptr = nullptr;
3043
3044 inline explicit union_set_list(__isl_take isl_union_set_list *ptr);
3045
3046public:
3047 inline /* implicit */ union_set_list();
3048 inline /* implicit */ union_set_list(const union_set_list &obj);
3049 inline explicit union_set_list(isl::checked::ctx ctx, int n);
3050 inline explicit union_set_list(isl::checked::union_set el);
3051 inline union_set_list &operator=(union_set_list obj);
3052 inline ~union_set_list();
3053 inline __isl_give isl_union_set_list *copy() const &;
3054 inline __isl_give isl_union_set_list *copy() && = delete;
3055 inline __isl_keep isl_union_set_list *get() const;
3056 inline __isl_give isl_union_set_list *release();
3057 inline bool is_null() const;
3058 inline isl::checked::ctx ctx() const;
3059
3060 inline isl::checked::union_set_list add(isl::checked::union_set el) const;
3061 inline isl::checked::union_set_list clear() const;
3062 inline isl::checked::union_set_list concat(isl::checked::union_set_list list2) const;
3063 inline isl::checked::union_set_list drop(unsigned int first, unsigned int n) const;
3064 inline stat foreach(const std::function<stat(isl::checked::union_set)> &fn) const;
3065 inline isl::checked::union_set at(int index) const;
3066 inline isl::checked::union_set get_at(int index) const;
3067 inline isl::checked::union_set_list insert(unsigned int pos, isl::checked::union_set el) const;
3068 inline class size size() const;
3069};
3070
3071// declarations for isl::val
3072inline val manage(__isl_take isl_val *ptr);
3073inline val manage_copy(__isl_keep isl_val *ptr);
3074
3075class val {
3076 friend inline val manage(__isl_take isl_val *ptr);
3077 friend inline val manage_copy(__isl_keep isl_val *ptr);
3078
3079protected:
3080 isl_val *ptr = nullptr;
3081
3082 inline explicit val(__isl_take isl_val *ptr);
3083
3084public:
3085 inline /* implicit */ val();
3086 inline /* implicit */ val(const val &obj);
3087 inline explicit val(isl::checked::ctx ctx, long i);
3088 inline explicit val(isl::checked::ctx ctx, const std::string &str);
3089 inline val &operator=(val obj);
3090 inline ~val();
3091 inline __isl_give isl_val *copy() const &;
3092 inline __isl_give isl_val *copy() && = delete;
3093 inline __isl_keep isl_val *get() const;
3094 inline __isl_give isl_val *release();
3095 inline bool is_null() const;
3096 inline isl::checked::ctx ctx() const;
3097
3098 inline isl::checked::val abs() const;
3099 inline boolean abs_eq(const isl::checked::val &v2) const;
3100 inline boolean abs_eq(long v2) const;
3101 inline isl::checked::val add(isl::checked::val v2) const;
3102 inline isl::checked::val add(long v2) const;
3103 inline isl::checked::val ceil() const;
3104 inline int cmp_si(long i) const;
3105 inline isl::checked::val div(isl::checked::val v2) const;
3106 inline isl::checked::val div(long v2) const;
3107 inline boolean eq(const isl::checked::val &v2) const;
3108 inline boolean eq(long v2) const;
3109 inline isl::checked::val floor() const;
3110 inline isl::checked::val gcd(isl::checked::val v2) const;
3111 inline isl::checked::val gcd(long v2) const;
3112 inline boolean ge(const isl::checked::val &v2) const;
3113 inline boolean ge(long v2) const;
3114 inline long den_si() const;
3115 inline long get_den_si() const;
3116 inline long num_si() const;
3117 inline long get_num_si() const;
3118 inline boolean gt(const isl::checked::val &v2) const;
3119 inline boolean gt(long v2) const;
3120 static inline isl::checked::val infty(isl::checked::ctx ctx);
3121 inline isl::checked::val inv() const;
3122 inline boolean is_divisible_by(const isl::checked::val &v2) const;
3123 inline boolean is_divisible_by(long v2) const;
3124 inline boolean is_infty() const;
3125 inline boolean is_int() const;
3126 inline boolean is_nan() const;
3127 inline boolean is_neg() const;
3128 inline boolean is_neginfty() const;
3129 inline boolean is_negone() const;
3130 inline boolean is_nonneg() const;
3131 inline boolean is_nonpos() const;
3132 inline boolean is_one() const;
3133 inline boolean is_pos() const;
3134 inline boolean is_rat() const;
3135 inline boolean is_zero() const;
3136 inline boolean le(const isl::checked::val &v2) const;
3137 inline boolean le(long v2) const;
3138 inline boolean lt(const isl::checked::val &v2) const;
3139 inline boolean lt(long v2) const;
3140 inline isl::checked::val max(isl::checked::val v2) const;
3141 inline isl::checked::val max(long v2) const;
3142 inline isl::checked::val min(isl::checked::val v2) const;
3143 inline isl::checked::val min(long v2) const;
3144 inline isl::checked::val mod(isl::checked::val v2) const;
3145 inline isl::checked::val mod(long v2) const;
3146 inline isl::checked::val mul(isl::checked::val v2) const;
3147 inline isl::checked::val mul(long v2) const;
3148 static inline isl::checked::val nan(isl::checked::ctx ctx);
3149 inline boolean ne(const isl::checked::val &v2) const;
3150 inline boolean ne(long v2) const;
3151 inline isl::checked::val neg() const;
3152 static inline isl::checked::val neginfty(isl::checked::ctx ctx);
3153 static inline isl::checked::val negone(isl::checked::ctx ctx);
3154 static inline isl::checked::val one(isl::checked::ctx ctx);
3155 inline isl::checked::val pow2() const;
3156 inline int sgn() const;
3157 inline isl::checked::val sub(isl::checked::val v2) const;
3158 inline isl::checked::val sub(long v2) const;
3159 inline isl::checked::val trunc() const;
3160 static inline isl::checked::val zero(isl::checked::ctx ctx);
3161};
3162
3163// declarations for isl::val_list
3164inline val_list manage(__isl_take isl_val_list *ptr);
3165inline val_list manage_copy(__isl_keep isl_val_list *ptr);
3166
3167class val_list {
3168 friend inline val_list manage(__isl_take isl_val_list *ptr);
3169 friend inline val_list manage_copy(__isl_keep isl_val_list *ptr);
3170
3171protected:
3172 isl_val_list *ptr = nullptr;
3173
3174 inline explicit val_list(__isl_take isl_val_list *ptr);
3175
3176public:
3177 inline /* implicit */ val_list();
3178 inline /* implicit */ val_list(const val_list &obj);
3179 inline explicit val_list(isl::checked::ctx ctx, int n);
3180 inline explicit val_list(isl::checked::val el);
3181 inline val_list &operator=(val_list obj);
3182 inline ~val_list();
3183 inline __isl_give isl_val_list *copy() const &;
3184 inline __isl_give isl_val_list *copy() && = delete;
3185 inline __isl_keep isl_val_list *get() const;
3186 inline __isl_give isl_val_list *release();
3187 inline bool is_null() const;
3188 inline isl::checked::ctx ctx() const;
3189
3190 inline isl::checked::val_list add(isl::checked::val el) const;
3191 inline isl::checked::val_list add(long el) const;
3192 inline isl::checked::val_list clear() const;
3193 inline isl::checked::val_list concat(isl::checked::val_list list2) const;
3194 inline isl::checked::val_list drop(unsigned int first, unsigned int n) const;
3195 inline stat foreach(const std::function<stat(isl::checked::val)> &fn) const;
3196 inline isl::checked::val at(int index) const;
3197 inline isl::checked::val get_at(int index) const;
3198 inline isl::checked::val_list insert(unsigned int pos, isl::checked::val el) const;
3199 inline isl::checked::val_list insert(unsigned int pos, long el) const;
3200 inline class size size() const;
3201};
3202
3203// implementations for isl::aff
3204aff manage(__isl_take isl_aff *ptr) {
3205 return aff(ptr);
3206}
3207aff manage_copy(__isl_keep isl_aff *ptr) {
3208 ptr = isl_aff_copy(ptr);
3209 return aff(ptr);
3210}
3211
3212aff::aff()
3213 : ptr(nullptr) {}
3214
3215aff::aff(const aff &obj)
3216 : ptr(nullptr)
3217{
3218 ptr = obj.copy();
3219}
3220
3221aff::aff(__isl_take isl_aff *ptr)
3222 : ptr(ptr) {}
3223
3224aff::aff(isl::checked::ctx ctx, const std::string &str)
3225{
3226 auto res = isl_aff_read_from_str(ctx.release(), str.c_str());
3227 ptr = res;
3228}
3229
3230aff &aff::operator=(aff obj) {
3231 std::swap(this->ptr, obj.ptr);
3232 return *this;
3233}
3234
3235aff::~aff() {
3236 if (ptr)
3237 isl_aff_free(ptr);
3238}
3239
3240__isl_give isl_aff *aff::copy() const & {
3241 return isl_aff_copy(ptr);
3242}
3243
3244__isl_keep isl_aff *aff::get() const {
3245 return ptr;
3246}
3247
3248__isl_give isl_aff *aff::release() {
3249 isl_aff *tmp = ptr;
3250 ptr = nullptr;
3251 return tmp;
3252}
3253
3254bool aff::is_null() const {
3255 return ptr == nullptr;
3256}
3257
3258isl::checked::ctx aff::ctx() const {
3259 return isl::checked::ctx(isl_aff_get_ctx(ptr));
3260}
3261
3262isl::checked::aff aff::add(isl::checked::aff aff2) const
3263{
3264 auto res = isl_aff_add(copy(), aff2.release());
3265 return manage(res);
3266}
3267
3268isl::checked::aff aff::add_constant(isl::checked::val v) const
3269{
3270 auto res = isl_aff_add_constant_val(copy(), v.release());
3271 return manage(res);
3272}
3273
3274isl::checked::aff aff::add_constant(long v) const
3275{
3276 return this->add_constant(isl::checked::val(ctx(), v));
3277}
3278
3279isl::checked::basic_set aff::bind(isl::checked::id id) const
3280{
3281 auto res = isl_aff_bind_id(copy(), id.release());
3282 return manage(res);
3283}
3284
3285isl::checked::basic_set aff::bind(const std::string &id) const
3286{
3287 return this->bind(isl::checked::id(ctx(), id));
3288}
3289
3290isl::checked::aff aff::ceil() const
3291{
3292 auto res = isl_aff_ceil(copy());
3293 return manage(res);
3294}
3295
3296isl::checked::aff aff::div(isl::checked::aff aff2) const
3297{
3298 auto res = isl_aff_div(copy(), aff2.release());
3299 return manage(res);
3300}
3301
3302isl::checked::set aff::eq_set(isl::checked::aff aff2) const
3303{
3304 auto res = isl_aff_eq_set(copy(), aff2.release());
3305 return manage(res);
3306}
3307
3308isl::checked::val aff::eval(isl::checked::point pnt) const
3309{
3310 auto res = isl_aff_eval(copy(), pnt.release());
3311 return manage(res);
3312}
3313
3314isl::checked::aff aff::floor() const
3315{
3316 auto res = isl_aff_floor(copy());
3317 return manage(res);
3318}
3319
3320isl::checked::set aff::ge_set(isl::checked::aff aff2) const
3321{
3322 auto res = isl_aff_ge_set(copy(), aff2.release());
3323 return manage(res);
3324}
3325
3326isl::checked::aff aff::gist(isl::checked::set context) const
3327{
3328 auto res = isl_aff_gist(copy(), context.release());
3329 return manage(res);
3330}
3331
3332isl::checked::set aff::gt_set(isl::checked::aff aff2) const
3333{
3334 auto res = isl_aff_gt_set(copy(), aff2.release());
3335 return manage(res);
3336}
3337
3338isl::checked::set aff::le_set(isl::checked::aff aff2) const
3339{
3340 auto res = isl_aff_le_set(copy(), aff2.release());
3341 return manage(res);
3342}
3343
3344isl::checked::set aff::lt_set(isl::checked::aff aff2) const
3345{
3346 auto res = isl_aff_lt_set(copy(), aff2.release());
3347 return manage(res);
3348}
3349
3350isl::checked::aff aff::mod(isl::checked::val mod) const
3351{
3352 auto res = isl_aff_mod_val(copy(), mod.release());
3353 return manage(res);
3354}
3355
3356isl::checked::aff aff::mod(long mod) const
3357{
3358 return this->mod(isl::checked::val(ctx(), mod));
3359}
3360
3361isl::checked::aff aff::mul(isl::checked::aff aff2) const
3362{
3363 auto res = isl_aff_mul(copy(), aff2.release());
3364 return manage(res);
3365}
3366
3367isl::checked::set aff::ne_set(isl::checked::aff aff2) const
3368{
3369 auto res = isl_aff_ne_set(copy(), aff2.release());
3370 return manage(res);
3371}
3372
3373isl::checked::aff aff::neg() const
3374{
3375 auto res = isl_aff_neg(copy());
3376 return manage(res);
3377}
3378
3379isl::checked::aff aff::pullback(isl::checked::multi_aff ma) const
3380{
3381 auto res = isl_aff_pullback_multi_aff(copy(), ma.release());
3382 return manage(res);
3383}
3384
3385isl::checked::aff aff::scale(isl::checked::val v) const
3386{
3387 auto res = isl_aff_scale_val(copy(), v.release());
3388 return manage(res);
3389}
3390
3391isl::checked::aff aff::scale(long v) const
3392{
3393 return this->scale(isl::checked::val(ctx(), v));
3394}
3395
3396isl::checked::aff aff::scale_down(isl::checked::val v) const
3397{
3398 auto res = isl_aff_scale_down_val(copy(), v.release());
3399 return manage(res);
3400}
3401
3402isl::checked::aff aff::scale_down(long v) const
3403{
3404 return this->scale_down(isl::checked::val(ctx(), v));
3405}
3406
3407isl::checked::aff aff::sub(isl::checked::aff aff2) const
3408{
3409 auto res = isl_aff_sub(copy(), aff2.release());
3410 return manage(res);
3411}
3412
3413isl::checked::aff aff::unbind_params_insert_domain(isl::checked::multi_id domain) const
3414{
3415 auto res = isl_aff_unbind_params_insert_domain(copy(), domain.release());
3416 return manage(res);
3417}
3418
3419isl::checked::aff aff::zero_on_domain(isl::checked::space space)
3420{
3421 auto res = isl_aff_zero_on_domain_space(space.release());
3422 return manage(res);
3423}
3424
3425inline std::ostream &operator<<(std::ostream &os, const aff &obj)
3426{
3427 char *str = isl_aff_to_str(obj.get());
3428 if (!str) {
3429 os.setstate(std::ios_base::badbit);
3430 return os;
3431 }
3432 os << str;
3433 free(str);
3434 return os;
3435}
3436
3437// implementations for isl::aff_list
3438aff_list manage(__isl_take isl_aff_list *ptr) {
3439 return aff_list(ptr);
3440}
3441aff_list manage_copy(__isl_keep isl_aff_list *ptr) {
3442 ptr = isl_aff_list_copy(ptr);
3443 return aff_list(ptr);
3444}
3445
3446aff_list::aff_list()
3447 : ptr(nullptr) {}
3448
3449aff_list::aff_list(const aff_list &obj)
3450 : ptr(nullptr)
3451{
3452 ptr = obj.copy();
3453}
3454
3455aff_list::aff_list(__isl_take isl_aff_list *ptr)
3456 : ptr(ptr) {}
3457
3458aff_list::aff_list(isl::checked::ctx ctx, int n)
3459{
3460 auto res = isl_aff_list_alloc(ctx.release(), n);
3461 ptr = res;
3462}
3463
3464aff_list::aff_list(isl::checked::aff el)
3465{
3466 auto res = isl_aff_list_from_aff(el.release());
3467 ptr = res;
3468}
3469
3470aff_list &aff_list::operator=(aff_list obj) {
3471 std::swap(this->ptr, obj.ptr);
3472 return *this;
3473}
3474
3475aff_list::~aff_list() {
3476 if (ptr)
3477 isl_aff_list_free(ptr);
3478}
3479
3480__isl_give isl_aff_list *aff_list::copy() const & {
3481 return isl_aff_list_copy(ptr);
3482}
3483
3484__isl_keep isl_aff_list *aff_list::get() const {
3485 return ptr;
3486}
3487
3488__isl_give isl_aff_list *aff_list::release() {
3489 isl_aff_list *tmp = ptr;
3490 ptr = nullptr;
3491 return tmp;
3492}
3493
3494bool aff_list::is_null() const {
3495 return ptr == nullptr;
3496}
3497
3498isl::checked::ctx aff_list::ctx() const {
3499 return isl::checked::ctx(isl_aff_list_get_ctx(ptr));
3500}
3501
3502isl::checked::aff_list aff_list::add(isl::checked::aff el) const
3503{
3504 auto res = isl_aff_list_add(copy(), el.release());
3505 return manage(res);
3506}
3507
3508isl::checked::aff_list aff_list::clear() const
3509{
3510 auto res = isl_aff_list_clear(copy());
3511 return manage(res);
3512}
3513
3514isl::checked::aff_list aff_list::concat(isl::checked::aff_list list2) const
3515{
3516 auto res = isl_aff_list_concat(copy(), list2.release());
3517 return manage(res);
3518}
3519
3520isl::checked::aff_list aff_list::drop(unsigned int first, unsigned int n) const
3521{
3522 auto res = isl_aff_list_drop(copy(), first, n);
3523 return manage(res);
3524}
3525
3526stat aff_list::foreach(const std::function<stat(isl::checked::aff)> &fn) const
3527{
3528 struct fn_data {
3529 std::function<stat(isl::checked::aff)> func;
3530 } fn_data = { fn };
3531 auto fn_lambda = [](isl_aff *arg_0, void *arg_1) -> isl_stat {
3532 auto *data = static_cast<struct fn_data *>(arg_1);
3533 auto ret = (data->func)(manage(arg_0));
3534 return ret.release();
3535 };
3536 auto res = isl_aff_list_foreach(get(), fn_lambda, &fn_data);
3537 return manage(res);
3538}
3539
3540isl::checked::aff aff_list::at(int index) const
3541{
3542 auto res = isl_aff_list_get_at(get(), index);
3543 return manage(res);
3544}
3545
3546isl::checked::aff aff_list::get_at(int index) const
3547{
3548 return at(index);
3549}
3550
3551isl::checked::aff_list aff_list::insert(unsigned int pos, isl::checked::aff el) const
3552{
3553 auto res = isl_aff_list_insert(copy(), pos, el.release());
3554 return manage(res);
3555}
3556
3557class size aff_list::size() const
3558{
3559 auto res = isl_aff_list_size(get());
3560 return manage(res);
3561}
3562
3563inline std::ostream &operator<<(std::ostream &os, const aff_list &obj)
3564{
3565 char *str = isl_aff_list_to_str(obj.get());
3566 if (!str) {
3567 os.setstate(std::ios_base::badbit);
3568 return os;
3569 }
3570 os << str;
3571 free(str);
3572 return os;
3573}
3574
3575// implementations for isl::ast_build
3576ast_build manage(__isl_take isl_ast_build *ptr) {
3577 return ast_build(ptr);
3578}
3579ast_build manage_copy(__isl_keep isl_ast_build *ptr) {
3580 ptr = isl_ast_build_copy(ptr);
3581 return ast_build(ptr);
3582}
3583
3584ast_build::ast_build()
3585 : ptr(nullptr) {}
3586
3587ast_build::ast_build(const ast_build &obj)
3588 : ptr(nullptr)
3589{
3590 ptr = obj.copy();
3591 copy_callbacks(obj);
3592}
3593
3594ast_build::ast_build(__isl_take isl_ast_build *ptr)
3595 : ptr(ptr) {}
3596
3597ast_build::ast_build(isl::checked::ctx ctx)
3598{
3599 auto res = isl_ast_build_alloc(ctx.release());
3600 ptr = res;
3601}
3602
3603ast_build &ast_build::operator=(ast_build obj) {
3604 std::swap(this->ptr, obj.ptr);
3605 copy_callbacks(obj);
3606 return *this;
3607}
3608
3609ast_build::~ast_build() {
3610 if (ptr)
3611 isl_ast_build_free(ptr);
3612}
3613
3614__isl_give isl_ast_build *ast_build::copy() const & {
3615 return isl_ast_build_copy(ptr);
3616}
3617
3618__isl_keep isl_ast_build *ast_build::get() const {
3619 return ptr;
3620}
3621
3622__isl_give isl_ast_build *ast_build::release() {
3623 if (at_each_domain_data)
3624 isl_die(ctx().get(), isl_error_invalid, "cannot release object with persistent callbacks", return nullptr);
3625 isl_ast_build *tmp = ptr;
3626 ptr = nullptr;
3627 return tmp;
3628}
3629
3630bool ast_build::is_null() const {
3631 return ptr == nullptr;
3632}
3633
3634isl::checked::ctx ast_build::ctx() const {
3635 return isl::checked::ctx(isl_ast_build_get_ctx(ptr));
3636}
3637
3638ast_build &ast_build::copy_callbacks(const ast_build &obj)
3639{
3640 at_each_domain_data = obj.at_each_domain_data;
3641 return *this;
3642}
3643
3644isl_ast_node *ast_build::at_each_domain(isl_ast_node *arg_0, isl_ast_build *arg_1, void *arg_2)
3645{
3646 auto *data = static_cast<struct at_each_domain_data *>(arg_2);
3647 auto ret = (data->func)(manage(arg_0), manage_copy(arg_1));
3648 return ret.release();
3649}
3650
3651void ast_build::set_at_each_domain_data(const std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> &fn)
3652{
3653 at_each_domain_data = std::make_shared<struct at_each_domain_data>();
3654 at_each_domain_data->func = fn;
3655 ptr = isl_ast_build_set_at_each_domain(ptr, &at_each_domain, at_each_domain_data.get());
3656}
3657
3658isl::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
3659{
3660 auto copy = *this;
3661 copy.set_at_each_domain_data(fn);
3662 return copy;
3663}
3664
3665isl::checked::ast_expr ast_build::access_from(isl::checked::multi_pw_aff mpa) const
3666{
3667 auto res = isl_ast_build_access_from_multi_pw_aff(get(), mpa.release());
3668 return manage(res);
3669}
3670
3671isl::checked::ast_expr ast_build::access_from(isl::checked::pw_multi_aff pma) const
3672{
3673 auto res = isl_ast_build_access_from_pw_multi_aff(get(), pma.release());
3674 return manage(res);
3675}
3676
3677isl::checked::ast_expr ast_build::call_from(isl::checked::multi_pw_aff mpa) const
3678{
3679 auto res = isl_ast_build_call_from_multi_pw_aff(get(), mpa.release());
3680 return manage(res);
3681}
3682
3683isl::checked::ast_expr ast_build::call_from(isl::checked::pw_multi_aff pma) const
3684{
3685 auto res = isl_ast_build_call_from_pw_multi_aff(get(), pma.release());
3686 return manage(res);
3687}
3688
3689isl::checked::ast_expr ast_build::expr_from(isl::checked::pw_aff pa) const
3690{
3691 auto res = isl_ast_build_expr_from_pw_aff(get(), pa.release());
3692 return manage(res);
3693}
3694
3695isl::checked::ast_expr ast_build::expr_from(isl::checked::set set) const
3696{
3697 auto res = isl_ast_build_expr_from_set(get(), set.release());
3698 return manage(res);
3699}
3700
3701isl::checked::ast_build ast_build::from_context(isl::checked::set set)
3702{
3703 auto res = isl_ast_build_from_context(set.release());
3704 return manage(res);
3705}
3706
3707isl::checked::union_map ast_build::schedule() const
3708{
3709 auto res = isl_ast_build_get_schedule(get());
3710 return manage(res);
3711}
3712
3713isl::checked::union_map ast_build::get_schedule() const
3714{
3715 return schedule();
3716}
3717
3718isl::checked::ast_node ast_build::node_from(isl::checked::schedule schedule) const
3719{
3720 auto res = isl_ast_build_node_from_schedule(get(), schedule.release());
3721 return manage(res);
3722}
3723
3724isl::checked::ast_node ast_build::node_from_schedule_map(isl::checked::union_map schedule) const
3725{
3726 auto res = isl_ast_build_node_from_schedule_map(get(), schedule.release());
3727 return manage(res);
3728}
3729
3730// implementations for isl::ast_expr
3731ast_expr manage(__isl_take isl_ast_expr *ptr) {
3732 return ast_expr(ptr);
3733}
3734ast_expr manage_copy(__isl_keep isl_ast_expr *ptr) {
3735 ptr = isl_ast_expr_copy(ptr);
3736 return ast_expr(ptr);
3737}
3738
3739ast_expr::ast_expr()
3740 : ptr(nullptr) {}
3741
3742ast_expr::ast_expr(const ast_expr &obj)
3743 : ptr(nullptr)
3744{
3745 ptr = obj.copy();
3746}
3747
3748ast_expr::ast_expr(__isl_take isl_ast_expr *ptr)
3749 : ptr(ptr) {}
3750
3751ast_expr &ast_expr::operator=(ast_expr obj) {
3752 std::swap(this->ptr, obj.ptr);
3753 return *this;
3754}
3755
3756ast_expr::~ast_expr() {
3757 if (ptr)
3758 isl_ast_expr_free(ptr);
3759}
3760
3761__isl_give isl_ast_expr *ast_expr::copy() const & {
3762 return isl_ast_expr_copy(ptr);
3763}
3764
3765__isl_keep isl_ast_expr *ast_expr::get() const {
3766 return ptr;
3767}
3768
3769__isl_give isl_ast_expr *ast_expr::release() {
3770 isl_ast_expr *tmp = ptr;
3771 ptr = nullptr;
3772 return tmp;
3773}
3774
3775bool ast_expr::is_null() const {
3776 return ptr == nullptr;
3777}
3778
3779template <typename T, typename>
3780boolean ast_expr::isa_type(T subtype) const
3781{
3782 if (is_null())
3783 return boolean();
3784 return isl_ast_expr_get_type(get()) == subtype;
3785}
3786template <class T>
3787boolean ast_expr::isa() const
3788{
3789 return isa_type<decltype(T::type)>(T::type);
3790}
3791template <class T>
3792T ast_expr::as() const
3793{
3794 if (isa<T>().is_false())
3795 isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
3796 return T(copy());
3797}
3798
3799isl::checked::ctx ast_expr::ctx() const {
3800 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3801}
3802
3803std::string ast_expr::to_C_str() const
3804{
3805 auto res = isl_ast_expr_to_C_str(get());
3806 std::string tmp(res);
3807 free(res);
3808 return tmp;
3809}
3810
3811inline std::ostream &operator<<(std::ostream &os, const ast_expr &obj)
3812{
3813 char *str = isl_ast_expr_to_str(obj.get());
3814 if (!str) {
3815 os.setstate(std::ios_base::badbit);
3816 return os;
3817 }
3818 os << str;
3819 free(str);
3820 return os;
3821}
3822
3823// implementations for isl::ast_expr_id
3824ast_expr_id::ast_expr_id()
3825 : ast_expr() {}
3826
3827ast_expr_id::ast_expr_id(const ast_expr_id &obj)
3828 : ast_expr(obj)
3829{
3830}
3831
3832ast_expr_id::ast_expr_id(__isl_take isl_ast_expr *ptr)
3833 : ast_expr(ptr) {}
3834
3835ast_expr_id &ast_expr_id::operator=(ast_expr_id obj) {
3836 std::swap(this->ptr, obj.ptr);
3837 return *this;
3838}
3839
3840isl::checked::ctx ast_expr_id::ctx() const {
3841 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3842}
3843
3844isl::checked::id ast_expr_id::id() const
3845{
3846 auto res = isl_ast_expr_id_get_id(get());
3847 return manage(res);
3848}
3849
3850isl::checked::id ast_expr_id::get_id() const
3851{
3852 return id();
3853}
3854
3855inline std::ostream &operator<<(std::ostream &os, const ast_expr_id &obj)
3856{
3857 char *str = isl_ast_expr_to_str(obj.get());
3858 if (!str) {
3859 os.setstate(std::ios_base::badbit);
3860 return os;
3861 }
3862 os << str;
3863 free(str);
3864 return os;
3865}
3866
3867// implementations for isl::ast_expr_int
3868ast_expr_int::ast_expr_int()
3869 : ast_expr() {}
3870
3871ast_expr_int::ast_expr_int(const ast_expr_int &obj)
3872 : ast_expr(obj)
3873{
3874}
3875
3876ast_expr_int::ast_expr_int(__isl_take isl_ast_expr *ptr)
3877 : ast_expr(ptr) {}
3878
3879ast_expr_int &ast_expr_int::operator=(ast_expr_int obj) {
3880 std::swap(this->ptr, obj.ptr);
3881 return *this;
3882}
3883
3884isl::checked::ctx ast_expr_int::ctx() const {
3885 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3886}
3887
3888isl::checked::val ast_expr_int::val() const
3889{
3890 auto res = isl_ast_expr_int_get_val(get());
3891 return manage(res);
3892}
3893
3894isl::checked::val ast_expr_int::get_val() const
3895{
3896 return val();
3897}
3898
3899inline std::ostream &operator<<(std::ostream &os, const ast_expr_int &obj)
3900{
3901 char *str = isl_ast_expr_to_str(obj.get());
3902 if (!str) {
3903 os.setstate(std::ios_base::badbit);
3904 return os;
3905 }
3906 os << str;
3907 free(str);
3908 return os;
3909}
3910
3911// implementations for isl::ast_expr_op
3912ast_expr_op::ast_expr_op()
3913 : ast_expr() {}
3914
3915ast_expr_op::ast_expr_op(const ast_expr_op &obj)
3916 : ast_expr(obj)
3917{
3918}
3919
3920ast_expr_op::ast_expr_op(__isl_take isl_ast_expr *ptr)
3921 : ast_expr(ptr) {}
3922
3923ast_expr_op &ast_expr_op::operator=(ast_expr_op obj) {
3924 std::swap(this->ptr, obj.ptr);
3925 return *this;
3926}
3927
3928template <typename T, typename>
3929boolean ast_expr_op::isa_type(T subtype) const
3930{
3931 if (is_null())
3932 return boolean();
3933 return isl_ast_expr_op_get_type(get()) == subtype;
3934}
3935template <class T>
3936boolean ast_expr_op::isa() const
3937{
3938 return isa_type<decltype(T::type)>(T::type);
3939}
3940template <class T>
3941T ast_expr_op::as() const
3942{
3943 if (isa<T>().is_false())
3944 isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
3945 return T(copy());
3946}
3947
3948isl::checked::ctx ast_expr_op::ctx() const {
3949 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3950}
3951
3952isl::checked::ast_expr ast_expr_op::arg(int pos) const
3953{
3954 auto res = isl_ast_expr_op_get_arg(get(), pos);
3955 return manage(res);
3956}
3957
3958isl::checked::ast_expr ast_expr_op::get_arg(int pos) const
3959{
3960 return arg(pos);
3961}
3962
3963class size ast_expr_op::n_arg() const
3964{
3965 auto res = isl_ast_expr_op_get_n_arg(get());
3966 return manage(res);
3967}
3968
3969class size ast_expr_op::get_n_arg() const
3970{
3971 return n_arg();
3972}
3973
3974inline std::ostream &operator<<(std::ostream &os, const ast_expr_op &obj)
3975{
3976 char *str = isl_ast_expr_to_str(obj.get());
3977 if (!str) {
3978 os.setstate(std::ios_base::badbit);
3979 return os;
3980 }
3981 os << str;
3982 free(str);
3983 return os;
3984}
3985
3986// implementations for isl::ast_expr_op_access
3987ast_expr_op_access::ast_expr_op_access()
3988 : ast_expr_op() {}
3989
3990ast_expr_op_access::ast_expr_op_access(const ast_expr_op_access &obj)
3991 : ast_expr_op(obj)
3992{
3993}
3994
3995ast_expr_op_access::ast_expr_op_access(__isl_take isl_ast_expr *ptr)
3996 : ast_expr_op(ptr) {}
3997
3998ast_expr_op_access &ast_expr_op_access::operator=(ast_expr_op_access obj) {
3999 std::swap(this->ptr, obj.ptr);
4000 return *this;
4001}
4002
4003isl::checked::ctx ast_expr_op_access::ctx() const {
4004 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4005}
4006
4007inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_access &obj)
4008{
4009 char *str = isl_ast_expr_to_str(obj.get());
4010 if (!str) {
4011 os.setstate(std::ios_base::badbit);
4012 return os;
4013 }
4014 os << str;
4015 free(str);
4016 return os;
4017}
4018
4019// implementations for isl::ast_expr_op_add
4020ast_expr_op_add::ast_expr_op_add()
4021 : ast_expr_op() {}
4022
4023ast_expr_op_add::ast_expr_op_add(const ast_expr_op_add &obj)
4024 : ast_expr_op(obj)
4025{
4026}
4027
4028ast_expr_op_add::ast_expr_op_add(__isl_take isl_ast_expr *ptr)
4029 : ast_expr_op(ptr) {}
4030
4031ast_expr_op_add &ast_expr_op_add::operator=(ast_expr_op_add obj) {
4032 std::swap(this->ptr, obj.ptr);
4033 return *this;
4034}
4035
4036isl::checked::ctx ast_expr_op_add::ctx() const {
4037 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4038}
4039
4040inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_add &obj)
4041{
4042 char *str = isl_ast_expr_to_str(obj.get());
4043 if (!str) {
4044 os.setstate(std::ios_base::badbit);
4045 return os;
4046 }
4047 os << str;
4048 free(str);
4049 return os;
4050}
4051
4052// implementations for isl::ast_expr_op_address_of
4053ast_expr_op_address_of::ast_expr_op_address_of()
4054 : ast_expr_op() {}
4055
4056ast_expr_op_address_of::ast_expr_op_address_of(const ast_expr_op_address_of &obj)
4057 : ast_expr_op(obj)
4058{
4059}
4060
4061ast_expr_op_address_of::ast_expr_op_address_of(__isl_take isl_ast_expr *ptr)
4062 : ast_expr_op(ptr) {}
4063
4064ast_expr_op_address_of &ast_expr_op_address_of::operator=(ast_expr_op_address_of obj) {
4065 std::swap(this->ptr, obj.ptr);
4066 return *this;
4067}
4068
4069isl::checked::ctx ast_expr_op_address_of::ctx() const {
4070 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4071}
4072
4073inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_address_of &obj)
4074{
4075 char *str = isl_ast_expr_to_str(obj.get());
4076 if (!str) {
4077 os.setstate(std::ios_base::badbit);
4078 return os;
4079 }
4080 os << str;
4081 free(str);
4082 return os;
4083}
4084
4085// implementations for isl::ast_expr_op_and
4086ast_expr_op_and::ast_expr_op_and()
4087 : ast_expr_op() {}
4088
4089ast_expr_op_and::ast_expr_op_and(const ast_expr_op_and &obj)
4090 : ast_expr_op(obj)
4091{
4092}
4093
4094ast_expr_op_and::ast_expr_op_and(__isl_take isl_ast_expr *ptr)
4095 : ast_expr_op(ptr) {}
4096
4097ast_expr_op_and &ast_expr_op_and::operator=(ast_expr_op_and obj) {
4098 std::swap(this->ptr, obj.ptr);
4099 return *this;
4100}
4101
4102isl::checked::ctx ast_expr_op_and::ctx() const {
4103 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4104}
4105
4106inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_and &obj)
4107{
4108 char *str = isl_ast_expr_to_str(obj.get());
4109 if (!str) {
4110 os.setstate(std::ios_base::badbit);
4111 return os;
4112 }
4113 os << str;
4114 free(str);
4115 return os;
4116}
4117
4118// implementations for isl::ast_expr_op_and_then
4119ast_expr_op_and_then::ast_expr_op_and_then()
4120 : ast_expr_op() {}
4121
4122ast_expr_op_and_then::ast_expr_op_and_then(const ast_expr_op_and_then &obj)
4123 : ast_expr_op(obj)
4124{
4125}
4126
4127ast_expr_op_and_then::ast_expr_op_and_then(__isl_take isl_ast_expr *ptr)
4128 : ast_expr_op(ptr) {}
4129
4130ast_expr_op_and_then &ast_expr_op_and_then::operator=(ast_expr_op_and_then obj) {
4131 std::swap(this->ptr, obj.ptr);
4132 return *this;
4133}
4134
4135isl::checked::ctx ast_expr_op_and_then::ctx() const {
4136 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4137}
4138
4139inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_and_then &obj)
4140{
4141 char *str = isl_ast_expr_to_str(obj.get());
4142 if (!str) {
4143 os.setstate(std::ios_base::badbit);
4144 return os;
4145 }
4146 os << str;
4147 free(str);
4148 return os;
4149}
4150
4151// implementations for isl::ast_expr_op_call
4152ast_expr_op_call::ast_expr_op_call()
4153 : ast_expr_op() {}
4154
4155ast_expr_op_call::ast_expr_op_call(const ast_expr_op_call &obj)
4156 : ast_expr_op(obj)
4157{
4158}
4159
4160ast_expr_op_call::ast_expr_op_call(__isl_take isl_ast_expr *ptr)
4161 : ast_expr_op(ptr) {}
4162
4163ast_expr_op_call &ast_expr_op_call::operator=(ast_expr_op_call obj) {
4164 std::swap(this->ptr, obj.ptr);
4165 return *this;
4166}
4167
4168isl::checked::ctx ast_expr_op_call::ctx() const {
4169 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4170}
4171
4172inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_call &obj)
4173{
4174 char *str = isl_ast_expr_to_str(obj.get());
4175 if (!str) {
4176 os.setstate(std::ios_base::badbit);
4177 return os;
4178 }
4179 os << str;
4180 free(str);
4181 return os;
4182}
4183
4184// implementations for isl::ast_expr_op_cond
4185ast_expr_op_cond::ast_expr_op_cond()
4186 : ast_expr_op() {}
4187
4188ast_expr_op_cond::ast_expr_op_cond(const ast_expr_op_cond &obj)
4189 : ast_expr_op(obj)
4190{
4191}
4192
4193ast_expr_op_cond::ast_expr_op_cond(__isl_take isl_ast_expr *ptr)
4194 : ast_expr_op(ptr) {}
4195
4196ast_expr_op_cond &ast_expr_op_cond::operator=(ast_expr_op_cond obj) {
4197 std::swap(this->ptr, obj.ptr);
4198 return *this;
4199}
4200
4201isl::checked::ctx ast_expr_op_cond::ctx() const {
4202 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4203}
4204
4205inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_cond &obj)
4206{
4207 char *str = isl_ast_expr_to_str(obj.get());
4208 if (!str) {
4209 os.setstate(std::ios_base::badbit);
4210 return os;
4211 }
4212 os << str;
4213 free(str);
4214 return os;
4215}
4216
4217// implementations for isl::ast_expr_op_div
4218ast_expr_op_div::ast_expr_op_div()
4219 : ast_expr_op() {}
4220
4221ast_expr_op_div::ast_expr_op_div(const ast_expr_op_div &obj)
4222 : ast_expr_op(obj)
4223{
4224}
4225
4226ast_expr_op_div::ast_expr_op_div(__isl_take isl_ast_expr *ptr)
4227 : ast_expr_op(ptr) {}
4228
4229ast_expr_op_div &ast_expr_op_div::operator=(ast_expr_op_div obj) {
4230 std::swap(this->ptr, obj.ptr);
4231 return *this;
4232}
4233
4234isl::checked::ctx ast_expr_op_div::ctx() const {
4235 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4236}
4237
4238inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_div &obj)
4239{
4240 char *str = isl_ast_expr_to_str(obj.get());
4241 if (!str) {
4242 os.setstate(std::ios_base::badbit);
4243 return os;
4244 }
4245 os << str;
4246 free(str);
4247 return os;
4248}
4249
4250// implementations for isl::ast_expr_op_eq
4251ast_expr_op_eq::ast_expr_op_eq()
4252 : ast_expr_op() {}
4253
4254ast_expr_op_eq::ast_expr_op_eq(const ast_expr_op_eq &obj)
4255 : ast_expr_op(obj)
4256{
4257}
4258
4259ast_expr_op_eq::ast_expr_op_eq(__isl_take isl_ast_expr *ptr)
4260 : ast_expr_op(ptr) {}
4261
4262ast_expr_op_eq &ast_expr_op_eq::operator=(ast_expr_op_eq obj) {
4263 std::swap(this->ptr, obj.ptr);
4264 return *this;
4265}
4266
4267isl::checked::ctx ast_expr_op_eq::ctx() const {
4268 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4269}
4270
4271inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_eq &obj)
4272{
4273 char *str = isl_ast_expr_to_str(obj.get());
4274 if (!str) {
4275 os.setstate(std::ios_base::badbit);
4276 return os;
4277 }
4278 os << str;
4279 free(str);
4280 return os;
4281}
4282
4283// implementations for isl::ast_expr_op_fdiv_q
4284ast_expr_op_fdiv_q::ast_expr_op_fdiv_q()
4285 : ast_expr_op() {}
4286
4287ast_expr_op_fdiv_q::ast_expr_op_fdiv_q(const ast_expr_op_fdiv_q &obj)
4288 : ast_expr_op(obj)
4289{
4290}
4291
4292ast_expr_op_fdiv_q::ast_expr_op_fdiv_q(__isl_take isl_ast_expr *ptr)
4293 : ast_expr_op(ptr) {}
4294
4295ast_expr_op_fdiv_q &ast_expr_op_fdiv_q::operator=(ast_expr_op_fdiv_q obj) {
4296 std::swap(this->ptr, obj.ptr);
4297 return *this;
4298}
4299
4300isl::checked::ctx ast_expr_op_fdiv_q::ctx() const {
4301 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4302}
4303
4304inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_fdiv_q &obj)
4305{
4306 char *str = isl_ast_expr_to_str(obj.get());
4307 if (!str) {
4308 os.setstate(std::ios_base::badbit);
4309 return os;
4310 }
4311 os << str;
4312 free(str);
4313 return os;
4314}
4315
4316// implementations for isl::ast_expr_op_ge
4317ast_expr_op_ge::ast_expr_op_ge()
4318 : ast_expr_op() {}
4319
4320ast_expr_op_ge::ast_expr_op_ge(const ast_expr_op_ge &obj)
4321 : ast_expr_op(obj)
4322{
4323}
4324
4325ast_expr_op_ge::ast_expr_op_ge(__isl_take isl_ast_expr *ptr)
4326 : ast_expr_op(ptr) {}
4327
4328ast_expr_op_ge &ast_expr_op_ge::operator=(ast_expr_op_ge obj) {
4329 std::swap(this->ptr, obj.ptr);
4330 return *this;
4331}
4332
4333isl::checked::ctx ast_expr_op_ge::ctx() const {
4334 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4335}
4336
4337inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_ge &obj)
4338{
4339 char *str = isl_ast_expr_to_str(obj.get());
4340 if (!str) {
4341 os.setstate(std::ios_base::badbit);
4342 return os;
4343 }
4344 os << str;
4345 free(str);
4346 return os;
4347}
4348
4349// implementations for isl::ast_expr_op_gt
4350ast_expr_op_gt::ast_expr_op_gt()
4351 : ast_expr_op() {}
4352
4353ast_expr_op_gt::ast_expr_op_gt(const ast_expr_op_gt &obj)
4354 : ast_expr_op(obj)
4355{
4356}
4357
4358ast_expr_op_gt::ast_expr_op_gt(__isl_take isl_ast_expr *ptr)
4359 : ast_expr_op(ptr) {}
4360
4361ast_expr_op_gt &ast_expr_op_gt::operator=(ast_expr_op_gt obj) {
4362 std::swap(this->ptr, obj.ptr);
4363 return *this;
4364}
4365
4366isl::checked::ctx ast_expr_op_gt::ctx() const {
4367 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4368}
4369
4370inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_gt &obj)
4371{
4372 char *str = isl_ast_expr_to_str(obj.get());
4373 if (!str) {
4374 os.setstate(std::ios_base::badbit);
4375 return os;
4376 }
4377 os << str;
4378 free(str);
4379 return os;
4380}
4381
4382// implementations for isl::ast_expr_op_le
4383ast_expr_op_le::ast_expr_op_le()
4384 : ast_expr_op() {}
4385
4386ast_expr_op_le::ast_expr_op_le(const ast_expr_op_le &obj)
4387 : ast_expr_op(obj)
4388{
4389}
4390
4391ast_expr_op_le::ast_expr_op_le(__isl_take isl_ast_expr *ptr)
4392 : ast_expr_op(ptr) {}
4393
4394ast_expr_op_le &ast_expr_op_le::operator=(ast_expr_op_le obj) {
4395 std::swap(this->ptr, obj.ptr);
4396 return *this;
4397}
4398
4399isl::checked::ctx ast_expr_op_le::ctx() const {
4400 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4401}
4402
4403inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_le &obj)
4404{
4405 char *str = isl_ast_expr_to_str(obj.get());
4406 if (!str) {
4407 os.setstate(std::ios_base::badbit);
4408 return os;
4409 }
4410 os << str;
4411 free(str);
4412 return os;
4413}
4414
4415// implementations for isl::ast_expr_op_lt
4416ast_expr_op_lt::ast_expr_op_lt()
4417 : ast_expr_op() {}
4418
4419ast_expr_op_lt::ast_expr_op_lt(const ast_expr_op_lt &obj)
4420 : ast_expr_op(obj)
4421{
4422}
4423
4424ast_expr_op_lt::ast_expr_op_lt(__isl_take isl_ast_expr *ptr)
4425 : ast_expr_op(ptr) {}
4426
4427ast_expr_op_lt &ast_expr_op_lt::operator=(ast_expr_op_lt obj) {
4428 std::swap(this->ptr, obj.ptr);
4429 return *this;
4430}
4431
4432isl::checked::ctx ast_expr_op_lt::ctx() const {
4433 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4434}
4435
4436inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_lt &obj)
4437{
4438 char *str = isl_ast_expr_to_str(obj.get());
4439 if (!str) {
4440 os.setstate(std::ios_base::badbit);
4441 return os;
4442 }
4443 os << str;
4444 free(str);
4445 return os;
4446}
4447
4448// implementations for isl::ast_expr_op_max
4449ast_expr_op_max::ast_expr_op_max()
4450 : ast_expr_op() {}
4451
4452ast_expr_op_max::ast_expr_op_max(const ast_expr_op_max &obj)
4453 : ast_expr_op(obj)
4454{
4455}
4456
4457ast_expr_op_max::ast_expr_op_max(__isl_take isl_ast_expr *ptr)
4458 : ast_expr_op(ptr) {}
4459
4460ast_expr_op_max &ast_expr_op_max::operator=(ast_expr_op_max obj) {
4461 std::swap(this->ptr, obj.ptr);
4462 return *this;
4463}
4464
4465isl::checked::ctx ast_expr_op_max::ctx() const {
4466 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4467}
4468
4469inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_max &obj)
4470{
4471 char *str = isl_ast_expr_to_str(obj.get());
4472 if (!str) {
4473 os.setstate(std::ios_base::badbit);
4474 return os;
4475 }
4476 os << str;
4477 free(str);
4478 return os;
4479}
4480
4481// implementations for isl::ast_expr_op_member
4482ast_expr_op_member::ast_expr_op_member()
4483 : ast_expr_op() {}
4484
4485ast_expr_op_member::ast_expr_op_member(const ast_expr_op_member &obj)
4486 : ast_expr_op(obj)
4487{
4488}
4489
4490ast_expr_op_member::ast_expr_op_member(__isl_take isl_ast_expr *ptr)
4491 : ast_expr_op(ptr) {}
4492
4493ast_expr_op_member &ast_expr_op_member::operator=(ast_expr_op_member obj) {
4494 std::swap(this->ptr, obj.ptr);
4495 return *this;
4496}
4497
4498isl::checked::ctx ast_expr_op_member::ctx() const {
4499 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4500}
4501
4502inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_member &obj)
4503{
4504 char *str = isl_ast_expr_to_str(obj.get());
4505 if (!str) {
4506 os.setstate(std::ios_base::badbit);
4507 return os;
4508 }
4509 os << str;
4510 free(str);
4511 return os;
4512}
4513
4514// implementations for isl::ast_expr_op_min
4515ast_expr_op_min::ast_expr_op_min()
4516 : ast_expr_op() {}
4517
4518ast_expr_op_min::ast_expr_op_min(const ast_expr_op_min &obj)
4519 : ast_expr_op(obj)
4520{
4521}
4522
4523ast_expr_op_min::ast_expr_op_min(__isl_take isl_ast_expr *ptr)
4524 : ast_expr_op(ptr) {}
4525
4526ast_expr_op_min &ast_expr_op_min::operator=(ast_expr_op_min obj) {
4527 std::swap(this->ptr, obj.ptr);
4528 return *this;
4529}
4530
4531isl::checked::ctx ast_expr_op_min::ctx() const {
4532 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4533}
4534
4535inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_min &obj)
4536{
4537 char *str = isl_ast_expr_to_str(obj.get());
4538 if (!str) {
4539 os.setstate(std::ios_base::badbit);
4540 return os;
4541 }
4542 os << str;
4543 free(str);
4544 return os;
4545}
4546
4547// implementations for isl::ast_expr_op_minus
4548ast_expr_op_minus::ast_expr_op_minus()
4549 : ast_expr_op() {}
4550
4551ast_expr_op_minus::ast_expr_op_minus(const ast_expr_op_minus &obj)
4552 : ast_expr_op(obj)
4553{
4554}
4555
4556ast_expr_op_minus::ast_expr_op_minus(__isl_take isl_ast_expr *ptr)
4557 : ast_expr_op(ptr) {}
4558
4559ast_expr_op_minus &ast_expr_op_minus::operator=(ast_expr_op_minus obj) {
4560 std::swap(this->ptr, obj.ptr);
4561 return *this;
4562}
4563
4564isl::checked::ctx ast_expr_op_minus::ctx() const {
4565 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4566}
4567
4568inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_minus &obj)
4569{
4570 char *str = isl_ast_expr_to_str(obj.get());
4571 if (!str) {
4572 os.setstate(std::ios_base::badbit);
4573 return os;
4574 }
4575 os << str;
4576 free(str);
4577 return os;
4578}
4579
4580// implementations for isl::ast_expr_op_mul
4581ast_expr_op_mul::ast_expr_op_mul()
4582 : ast_expr_op() {}
4583
4584ast_expr_op_mul::ast_expr_op_mul(const ast_expr_op_mul &obj)
4585 : ast_expr_op(obj)
4586{
4587}
4588
4589ast_expr_op_mul::ast_expr_op_mul(__isl_take isl_ast_expr *ptr)
4590 : ast_expr_op(ptr) {}
4591
4592ast_expr_op_mul &ast_expr_op_mul::operator=(ast_expr_op_mul obj) {
4593 std::swap(this->ptr, obj.ptr);
4594 return *this;
4595}
4596
4597isl::checked::ctx ast_expr_op_mul::ctx() const {
4598 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4599}
4600
4601inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_mul &obj)
4602{
4603 char *str = isl_ast_expr_to_str(obj.get());
4604 if (!str) {
4605 os.setstate(std::ios_base::badbit);
4606 return os;
4607 }
4608 os << str;
4609 free(str);
4610 return os;
4611}
4612
4613// implementations for isl::ast_expr_op_or
4614ast_expr_op_or::ast_expr_op_or()
4615 : ast_expr_op() {}
4616
4617ast_expr_op_or::ast_expr_op_or(const ast_expr_op_or &obj)
4618 : ast_expr_op(obj)
4619{
4620}
4621
4622ast_expr_op_or::ast_expr_op_or(__isl_take isl_ast_expr *ptr)
4623 : ast_expr_op(ptr) {}
4624
4625ast_expr_op_or &ast_expr_op_or::operator=(ast_expr_op_or obj) {
4626 std::swap(this->ptr, obj.ptr);
4627 return *this;
4628}
4629
4630isl::checked::ctx ast_expr_op_or::ctx() const {
4631 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4632}
4633
4634inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_or &obj)
4635{
4636 char *str = isl_ast_expr_to_str(obj.get());
4637 if (!str) {
4638 os.setstate(std::ios_base::badbit);
4639 return os;
4640 }
4641 os << str;
4642 free(str);
4643 return os;
4644}
4645
4646// implementations for isl::ast_expr_op_or_else
4647ast_expr_op_or_else::ast_expr_op_or_else()
4648 : ast_expr_op() {}
4649
4650ast_expr_op_or_else::ast_expr_op_or_else(const ast_expr_op_or_else &obj)
4651 : ast_expr_op(obj)
4652{
4653}
4654
4655ast_expr_op_or_else::ast_expr_op_or_else(__isl_take isl_ast_expr *ptr)
4656 : ast_expr_op(ptr) {}
4657
4658ast_expr_op_or_else &ast_expr_op_or_else::operator=(ast_expr_op_or_else obj) {
4659 std::swap(this->ptr, obj.ptr);
4660 return *this;
4661}
4662
4663isl::checked::ctx ast_expr_op_or_else::ctx() const {
4664 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4665}
4666
4667inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_or_else &obj)
4668{
4669 char *str = isl_ast_expr_to_str(obj.get());
4670 if (!str) {
4671 os.setstate(std::ios_base::badbit);
4672 return os;
4673 }
4674 os << str;
4675 free(str);
4676 return os;
4677}
4678
4679// implementations for isl::ast_expr_op_pdiv_q
4680ast_expr_op_pdiv_q::ast_expr_op_pdiv_q()
4681 : ast_expr_op() {}
4682
4683ast_expr_op_pdiv_q::ast_expr_op_pdiv_q(const ast_expr_op_pdiv_q &obj)
4684 : ast_expr_op(obj)
4685{
4686}
4687
4688ast_expr_op_pdiv_q::ast_expr_op_pdiv_q(__isl_take isl_ast_expr *ptr)
4689 : ast_expr_op(ptr) {}
4690
4691ast_expr_op_pdiv_q &ast_expr_op_pdiv_q::operator=(ast_expr_op_pdiv_q obj) {
4692 std::swap(this->ptr, obj.ptr);
4693 return *this;
4694}
4695
4696isl::checked::ctx ast_expr_op_pdiv_q::ctx() const {
4697 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4698}
4699
4700inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_pdiv_q &obj)
4701{
4702 char *str = isl_ast_expr_to_str(obj.get());
4703 if (!str) {
4704 os.setstate(std::ios_base::badbit);
4705 return os;
4706 }
4707 os << str;
4708 free(str);
4709 return os;
4710}
4711
4712// implementations for isl::ast_expr_op_pdiv_r
4713ast_expr_op_pdiv_r::ast_expr_op_pdiv_r()
4714 : ast_expr_op() {}
4715
4716ast_expr_op_pdiv_r::ast_expr_op_pdiv_r(const ast_expr_op_pdiv_r &obj)
4717 : ast_expr_op(obj)
4718{
4719}
4720
4721ast_expr_op_pdiv_r::ast_expr_op_pdiv_r(__isl_take isl_ast_expr *ptr)
4722 : ast_expr_op(ptr) {}
4723
4724ast_expr_op_pdiv_r &ast_expr_op_pdiv_r::operator=(ast_expr_op_pdiv_r obj) {
4725 std::swap(this->ptr, obj.ptr);
4726 return *this;
4727}
4728
4729isl::checked::ctx ast_expr_op_pdiv_r::ctx() const {
4730 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4731}
4732
4733inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_pdiv_r &obj)
4734{
4735 char *str = isl_ast_expr_to_str(obj.get());
4736 if (!str) {
4737 os.setstate(std::ios_base::badbit);
4738 return os;
4739 }
4740 os << str;
4741 free(str);
4742 return os;
4743}
4744
4745// implementations for isl::ast_expr_op_select
4746ast_expr_op_select::ast_expr_op_select()
4747 : ast_expr_op() {}
4748
4749ast_expr_op_select::ast_expr_op_select(const ast_expr_op_select &obj)
4750 : ast_expr_op(obj)
4751{
4752}
4753
4754ast_expr_op_select::ast_expr_op_select(__isl_take isl_ast_expr *ptr)
4755 : ast_expr_op(ptr) {}
4756
4757ast_expr_op_select &ast_expr_op_select::operator=(ast_expr_op_select obj) {
4758 std::swap(this->ptr, obj.ptr);
4759 return *this;
4760}
4761
4762isl::checked::ctx ast_expr_op_select::ctx() const {
4763 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4764}
4765
4766inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_select &obj)
4767{
4768 char *str = isl_ast_expr_to_str(obj.get());
4769 if (!str) {
4770 os.setstate(std::ios_base::badbit);
4771 return os;
4772 }
4773 os << str;
4774 free(str);
4775 return os;
4776}
4777
4778// implementations for isl::ast_expr_op_sub
4779ast_expr_op_sub::ast_expr_op_sub()
4780 : ast_expr_op() {}
4781
4782ast_expr_op_sub::ast_expr_op_sub(const ast_expr_op_sub &obj)
4783 : ast_expr_op(obj)
4784{
4785}
4786
4787ast_expr_op_sub::ast_expr_op_sub(__isl_take isl_ast_expr *ptr)
4788 : ast_expr_op(ptr) {}
4789
4790ast_expr_op_sub &ast_expr_op_sub::operator=(ast_expr_op_sub obj) {
4791 std::swap(this->ptr, obj.ptr);
4792 return *this;
4793}
4794
4795isl::checked::ctx ast_expr_op_sub::ctx() const {
4796 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4797}
4798
4799inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_sub &obj)
4800{
4801 char *str = isl_ast_expr_to_str(obj.get());
4802 if (!str) {
4803 os.setstate(std::ios_base::badbit);
4804 return os;
4805 }
4806 os << str;
4807 free(str);
4808 return os;
4809}
4810
4811// implementations for isl::ast_expr_op_zdiv_r
4812ast_expr_op_zdiv_r::ast_expr_op_zdiv_r()
4813 : ast_expr_op() {}
4814
4815ast_expr_op_zdiv_r::ast_expr_op_zdiv_r(const ast_expr_op_zdiv_r &obj)
4816 : ast_expr_op(obj)
4817{
4818}
4819
4820ast_expr_op_zdiv_r::ast_expr_op_zdiv_r(__isl_take isl_ast_expr *ptr)
4821 : ast_expr_op(ptr) {}
4822
4823ast_expr_op_zdiv_r &ast_expr_op_zdiv_r::operator=(ast_expr_op_zdiv_r obj) {
4824 std::swap(this->ptr, obj.ptr);
4825 return *this;
4826}
4827
4828isl::checked::ctx ast_expr_op_zdiv_r::ctx() const {
4829 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4830}
4831
4832inline std::ostream &operator<<(std::ostream &os, const ast_expr_op_zdiv_r &obj)
4833{
4834 char *str = isl_ast_expr_to_str(obj.get());
4835 if (!str) {
4836 os.setstate(std::ios_base::badbit);
4837 return os;
4838 }
4839 os << str;
4840 free(str);
4841 return os;
4842}
4843
4844// implementations for isl::ast_node
4845ast_node manage(__isl_take isl_ast_node *ptr) {
4846 return ast_node(ptr);
4847}
4848ast_node manage_copy(__isl_keep isl_ast_node *ptr) {
4849 ptr = isl_ast_node_copy(ptr);
4850 return ast_node(ptr);
4851}
4852
4853ast_node::ast_node()
4854 : ptr(nullptr) {}
4855
4856ast_node::ast_node(const ast_node &obj)
4857 : ptr(nullptr)
4858{
4859 ptr = obj.copy();
4860}
4861
4862ast_node::ast_node(__isl_take isl_ast_node *ptr)
4863 : ptr(ptr) {}
4864
4865ast_node &ast_node::operator=(ast_node obj) {
4866 std::swap(this->ptr, obj.ptr);
4867 return *this;
4868}
4869
4870ast_node::~ast_node() {
4871 if (ptr)
4872 isl_ast_node_free(ptr);
4873}
4874
4875__isl_give isl_ast_node *ast_node::copy() const & {
4876 return isl_ast_node_copy(ptr);
4877}
4878
4879__isl_keep isl_ast_node *ast_node::get() const {
4880 return ptr;
4881}
4882
4883__isl_give isl_ast_node *ast_node::release() {
4884 isl_ast_node *tmp = ptr;
4885 ptr = nullptr;
4886 return tmp;
4887}
4888
4889bool ast_node::is_null() const {
4890 return ptr == nullptr;
4891}
4892
4893template <typename T, typename>
4894boolean ast_node::isa_type(T subtype) const
4895{
4896 if (is_null())
4897 return boolean();
4898 return isl_ast_node_get_type(get()) == subtype;
4899}
4900template <class T>
4901boolean ast_node::isa() const
4902{
4903 return isa_type<decltype(T::type)>(T::type);
4904}
4905template <class T>
4906T ast_node::as() const
4907{
4908 if (isa<T>().is_false())
4909 isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
4910 return T(copy());
4911}
4912
4913isl::checked::ctx ast_node::ctx() const {
4914 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
4915}
4916
4917std::string ast_node::to_C_str() const
4918{
4919 auto res = isl_ast_node_to_C_str(get());
4920 std::string tmp(res);
4921 free(res);
4922 return tmp;
4923}
4924
4925inline std::ostream &operator<<(std::ostream &os, const ast_node &obj)
4926{
4927 char *str = isl_ast_node_to_str(obj.get());
4928 if (!str) {
4929 os.setstate(std::ios_base::badbit);
4930 return os;
4931 }
4932 os << str;
4933 free(str);
4934 return os;
4935}
4936
4937// implementations for isl::ast_node_block
4938ast_node_block::ast_node_block()
4939 : ast_node() {}
4940
4941ast_node_block::ast_node_block(const ast_node_block &obj)
4942 : ast_node(obj)
4943{
4944}
4945
4946ast_node_block::ast_node_block(__isl_take isl_ast_node *ptr)
4947 : ast_node(ptr) {}
4948
4949ast_node_block &ast_node_block::operator=(ast_node_block obj) {
4950 std::swap(this->ptr, obj.ptr);
4951 return *this;
4952}
4953
4954isl::checked::ctx ast_node_block::ctx() const {
4955 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
4956}
4957
4958isl::checked::ast_node_list ast_node_block::children() const
4959{
4960 auto res = isl_ast_node_block_get_children(get());
4961 return manage(res);
4962}
4963
4964isl::checked::ast_node_list ast_node_block::get_children() const
4965{
4966 return children();
4967}
4968
4969inline std::ostream &operator<<(std::ostream &os, const ast_node_block &obj)
4970{
4971 char *str = isl_ast_node_to_str(obj.get());
4972 if (!str) {
4973 os.setstate(std::ios_base::badbit);
4974 return os;
4975 }
4976 os << str;
4977 free(str);
4978 return os;
4979}
4980
4981// implementations for isl::ast_node_for
4982ast_node_for::ast_node_for()
4983 : ast_node() {}
4984
4985ast_node_for::ast_node_for(const ast_node_for &obj)
4986 : ast_node(obj)
4987{
4988}
4989
4990ast_node_for::ast_node_for(__isl_take isl_ast_node *ptr)
4991 : ast_node(ptr) {}
4992
4993ast_node_for &ast_node_for::operator=(ast_node_for obj) {
4994 std::swap(this->ptr, obj.ptr);
4995 return *this;
4996}
4997
4998isl::checked::ctx ast_node_for::ctx() const {
4999 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5000}
5001
5002isl::checked::ast_node ast_node_for::body() const
5003{
5004 auto res = isl_ast_node_for_get_body(get());
5005 return manage(res);
5006}
5007
5008isl::checked::ast_node ast_node_for::get_body() const
5009{
5010 return body();
5011}
5012
5013isl::checked::ast_expr ast_node_for::cond() const
5014{
5015 auto res = isl_ast_node_for_get_cond(get());
5016 return manage(res);
5017}
5018
5019isl::checked::ast_expr ast_node_for::get_cond() const
5020{
5021 return cond();
5022}
5023
5024isl::checked::ast_expr ast_node_for::inc() const
5025{
5026 auto res = isl_ast_node_for_get_inc(get());
5027 return manage(res);
5028}
5029
5030isl::checked::ast_expr ast_node_for::get_inc() const
5031{
5032 return inc();
5033}
5034
5035isl::checked::ast_expr ast_node_for::init() const
5036{
5037 auto res = isl_ast_node_for_get_init(get());
5038 return manage(res);
5039}
5040
5041isl::checked::ast_expr ast_node_for::get_init() const
5042{
5043 return init();
5044}
5045
5046isl::checked::ast_expr ast_node_for::iterator() const
5047{
5048 auto res = isl_ast_node_for_get_iterator(get());
5049 return manage(res);
5050}
5051
5052isl::checked::ast_expr ast_node_for::get_iterator() const
5053{
5054 return iterator();
5055}
5056
5057boolean ast_node_for::is_degenerate() const
5058{
5059 auto res = isl_ast_node_for_is_degenerate(get());
5060 return manage(res);
5061}
5062
5063inline std::ostream &operator<<(std::ostream &os, const ast_node_for &obj)
5064{
5065 char *str = isl_ast_node_to_str(obj.get());
5066 if (!str) {
5067 os.setstate(std::ios_base::badbit);
5068 return os;
5069 }
5070 os << str;
5071 free(str);
5072 return os;
5073}
5074
5075// implementations for isl::ast_node_if
5076ast_node_if::ast_node_if()
5077 : ast_node() {}
5078
5079ast_node_if::ast_node_if(const ast_node_if &obj)
5080 : ast_node(obj)
5081{
5082}
5083
5084ast_node_if::ast_node_if(__isl_take isl_ast_node *ptr)
5085 : ast_node(ptr) {}
5086
5087ast_node_if &ast_node_if::operator=(ast_node_if obj) {
5088 std::swap(this->ptr, obj.ptr);
5089 return *this;
5090}
5091
5092isl::checked::ctx ast_node_if::ctx() const {
5093 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5094}
5095
5096isl::checked::ast_expr ast_node_if::cond() const
5097{
5098 auto res = isl_ast_node_if_get_cond(get());
5099 return manage(res);
5100}
5101
5102isl::checked::ast_expr ast_node_if::get_cond() const
5103{
5104 return cond();
5105}
5106
5107isl::checked::ast_node ast_node_if::else_node() const
5108{
5109 auto res = isl_ast_node_if_get_else_node(get());
5110 return manage(res);
5111}
5112
5113isl::checked::ast_node ast_node_if::get_else_node() const
5114{
5115 return else_node();
5116}
5117
5118isl::checked::ast_node ast_node_if::then_node() const
5119{
5120 auto res = isl_ast_node_if_get_then_node(get());
5121 return manage(res);
5122}
5123
5124isl::checked::ast_node ast_node_if::get_then_node() const
5125{
5126 return then_node();
5127}
5128
5129boolean ast_node_if::has_else_node() const
5130{
5131 auto res = isl_ast_node_if_has_else_node(get());
5132 return manage(res);
5133}
5134
5135inline std::ostream &operator<<(std::ostream &os, const ast_node_if &obj)
5136{
5137 char *str = isl_ast_node_to_str(obj.get());
5138 if (!str) {
5139 os.setstate(std::ios_base::badbit);
5140 return os;
5141 }
5142 os << str;
5143 free(str);
5144 return os;
5145}
5146
5147// implementations for isl::ast_node_list
5148ast_node_list manage(__isl_take isl_ast_node_list *ptr) {
5149 return ast_node_list(ptr);
5150}
5151ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr) {
5152 ptr = isl_ast_node_list_copy(ptr);
5153 return ast_node_list(ptr);
5154}
5155
5156ast_node_list::ast_node_list()
5157 : ptr(nullptr) {}
5158
5159ast_node_list::ast_node_list(const ast_node_list &obj)
5160 : ptr(nullptr)
5161{
5162 ptr = obj.copy();
5163}
5164
5165ast_node_list::ast_node_list(__isl_take isl_ast_node_list *ptr)
5166 : ptr(ptr) {}
5167
5168ast_node_list::ast_node_list(isl::checked::ctx ctx, int n)
5169{
5170 auto res = isl_ast_node_list_alloc(ctx.release(), n);
5171 ptr = res;
5172}
5173
5174ast_node_list::ast_node_list(isl::checked::ast_node el)
5175{
5176 auto res = isl_ast_node_list_from_ast_node(el.release());
5177 ptr = res;
5178}
5179
5180ast_node_list &ast_node_list::operator=(ast_node_list obj) {
5181 std::swap(this->ptr, obj.ptr);
5182 return *this;
5183}
5184
5185ast_node_list::~ast_node_list() {
5186 if (ptr)
5187 isl_ast_node_list_free(ptr);
5188}
5189
5190__isl_give isl_ast_node_list *ast_node_list::copy() const & {
5191 return isl_ast_node_list_copy(ptr);
5192}
5193
5194__isl_keep isl_ast_node_list *ast_node_list::get() const {
5195 return ptr;
5196}
5197
5198__isl_give isl_ast_node_list *ast_node_list::release() {
5199 isl_ast_node_list *tmp = ptr;
5200 ptr = nullptr;
5201 return tmp;
5202}
5203
5204bool ast_node_list::is_null() const {
5205 return ptr == nullptr;
5206}
5207
5208isl::checked::ctx ast_node_list::ctx() const {
5209 return isl::checked::ctx(isl_ast_node_list_get_ctx(ptr));
5210}
5211
5212isl::checked::ast_node_list ast_node_list::add(isl::checked::ast_node el) const
5213{
5214 auto res = isl_ast_node_list_add(copy(), el.release());
5215 return manage(res);
5216}
5217
5218isl::checked::ast_node_list ast_node_list::clear() const
5219{
5220 auto res = isl_ast_node_list_clear(copy());
5221 return manage(res);
5222}
5223
5224isl::checked::ast_node_list ast_node_list::concat(isl::checked::ast_node_list list2) const
5225{
5226 auto res = isl_ast_node_list_concat(copy(), list2.release());
5227 return manage(res);
5228}
5229
5230isl::checked::ast_node_list ast_node_list::drop(unsigned int first, unsigned int n) const
5231{
5232 auto res = isl_ast_node_list_drop(copy(), first, n);
5233 return manage(res);
5234}
5235
5236stat ast_node_list::foreach(const std::function<stat(isl::checked::ast_node)> &fn) const
5237{
5238 struct fn_data {
5239 std::function<stat(isl::checked::ast_node)> func;
5240 } fn_data = { fn };
5241 auto fn_lambda = [](isl_ast_node *arg_0, void *arg_1) -> isl_stat {
5242 auto *data = static_cast<struct fn_data *>(arg_1);
5243 auto ret = (data->func)(manage(arg_0));
5244 return ret.release();
5245 };
5246 auto res = isl_ast_node_list_foreach(get(), fn_lambda, &fn_data);
5247 return manage(res);
5248}
5249
5250isl::checked::ast_node ast_node_list::at(int index) const
5251{
5252 auto res = isl_ast_node_list_get_at(get(), index);
5253 return manage(res);
5254}
5255
5256isl::checked::ast_node ast_node_list::get_at(int index) const
5257{
5258 return at(index);
5259}
5260
5261isl::checked::ast_node_list ast_node_list::insert(unsigned int pos, isl::checked::ast_node el) const
5262{
5263 auto res = isl_ast_node_list_insert(copy(), pos, el.release());
5264 return manage(res);
5265}
5266
5267class size ast_node_list::size() const
5268{
5269 auto res = isl_ast_node_list_size(get());
5270 return manage(res);
5271}
5272
5273inline std::ostream &operator<<(std::ostream &os, const ast_node_list &obj)
5274{
5275 char *str = isl_ast_node_list_to_str(obj.get());
5276 if (!str) {
5277 os.setstate(std::ios_base::badbit);
5278 return os;
5279 }
5280 os << str;
5281 free(str);
5282 return os;
5283}
5284
5285// implementations for isl::ast_node_mark
5286ast_node_mark::ast_node_mark()
5287 : ast_node() {}
5288
5289ast_node_mark::ast_node_mark(const ast_node_mark &obj)
5290 : ast_node(obj)
5291{
5292}
5293
5294ast_node_mark::ast_node_mark(__isl_take isl_ast_node *ptr)
5295 : ast_node(ptr) {}
5296
5297ast_node_mark &ast_node_mark::operator=(ast_node_mark obj) {
5298 std::swap(this->ptr, obj.ptr);
5299 return *this;
5300}
5301
5302isl::checked::ctx ast_node_mark::ctx() const {
5303 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5304}
5305
5306isl::checked::id ast_node_mark::id() const
5307{
5308 auto res = isl_ast_node_mark_get_id(get());
5309 return manage(res);
5310}
5311
5312isl::checked::id ast_node_mark::get_id() const
5313{
5314 return id();
5315}
5316
5317isl::checked::ast_node ast_node_mark::node() const
5318{
5319 auto res = isl_ast_node_mark_get_node(get());
5320 return manage(res);
5321}
5322
5323isl::checked::ast_node ast_node_mark::get_node() const
5324{
5325 return node();
5326}
5327
5328inline std::ostream &operator<<(std::ostream &os, const ast_node_mark &obj)
5329{
5330 char *str = isl_ast_node_to_str(obj.get());
5331 if (!str) {
5332 os.setstate(std::ios_base::badbit);
5333 return os;
5334 }
5335 os << str;
5336 free(str);
5337 return os;
5338}
5339
5340// implementations for isl::ast_node_user
5341ast_node_user::ast_node_user()
5342 : ast_node() {}
5343
5344ast_node_user::ast_node_user(const ast_node_user &obj)
5345 : ast_node(obj)
5346{
5347}
5348
5349ast_node_user::ast_node_user(__isl_take isl_ast_node *ptr)
5350 : ast_node(ptr) {}
5351
5352ast_node_user &ast_node_user::operator=(ast_node_user obj) {
5353 std::swap(this->ptr, obj.ptr);
5354 return *this;
5355}
5356
5357isl::checked::ctx ast_node_user::ctx() const {
5358 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5359}
5360
5361isl::checked::ast_expr ast_node_user::expr() const
5362{
5363 auto res = isl_ast_node_user_get_expr(get());
5364 return manage(res);
5365}
5366
5367isl::checked::ast_expr ast_node_user::get_expr() const
5368{
5369 return expr();
5370}
5371
5372inline std::ostream &operator<<(std::ostream &os, const ast_node_user &obj)
5373{
5374 char *str = isl_ast_node_to_str(obj.get());
5375 if (!str) {
5376 os.setstate(std::ios_base::badbit);
5377 return os;
5378 }
5379 os << str;
5380 free(str);
5381 return os;
5382}
5383
5384// implementations for isl::basic_map
5385basic_map manage(__isl_take isl_basic_map *ptr) {
5386 return basic_map(ptr);
5387}
5388basic_map manage_copy(__isl_keep isl_basic_map *ptr) {
5389 ptr = isl_basic_map_copy(ptr);
5390 return basic_map(ptr);
5391}
5392
5393basic_map::basic_map()
5394 : ptr(nullptr) {}
5395
5396basic_map::basic_map(const basic_map &obj)
5397 : ptr(nullptr)
5398{
5399 ptr = obj.copy();
5400}
5401
5402basic_map::basic_map(__isl_take isl_basic_map *ptr)
5403 : ptr(ptr) {}
5404
5405basic_map::basic_map(isl::checked::ctx ctx, const std::string &str)
5406{
5407 auto res = isl_basic_map_read_from_str(ctx.release(), str.c_str());
5408 ptr = res;
5409}
5410
5411basic_map &basic_map::operator=(basic_map obj) {
5412 std::swap(this->ptr, obj.ptr);
5413 return *this;
5414}
5415
5416basic_map::~basic_map() {
5417 if (ptr)
5418 isl_basic_map_free(ptr);
5419}
5420
5421__isl_give isl_basic_map *basic_map::copy() const & {
5422 return isl_basic_map_copy(ptr);
5423}
5424
5425__isl_keep isl_basic_map *basic_map::get() const {
5426 return ptr;
5427}
5428
5429__isl_give isl_basic_map *basic_map::release() {
5430 isl_basic_map *tmp = ptr;
5431 ptr = nullptr;
5432 return tmp;
5433}
5434
5435bool basic_map::is_null() const {
5436 return ptr == nullptr;
5437}
5438
5439isl::checked::ctx basic_map::ctx() const {
5440 return isl::checked::ctx(isl_basic_map_get_ctx(ptr));
5441}
5442
5443isl::checked::basic_map basic_map::affine_hull() const
5444{
5445 auto res = isl_basic_map_affine_hull(copy());
5446 return manage(res);
5447}
5448
5449isl::checked::basic_map basic_map::apply_domain(isl::checked::basic_map bmap2) const
5450{
5451 auto res = isl_basic_map_apply_domain(copy(), bmap2.release());
5452 return manage(res);
5453}
5454
5455isl::checked::basic_map basic_map::apply_range(isl::checked::basic_map bmap2) const
5456{
5457 auto res = isl_basic_map_apply_range(copy(), bmap2.release());
5458 return manage(res);
5459}
5460
5461isl::checked::basic_set basic_map::deltas() const
5462{
5463 auto res = isl_basic_map_deltas(copy());
5464 return manage(res);
5465}
5466
5467isl::checked::basic_map basic_map::detect_equalities() const
5468{
5469 auto res = isl_basic_map_detect_equalities(copy());
5470 return manage(res);
5471}
5472
5473isl::checked::basic_map basic_map::flatten() const
5474{
5475 auto res = isl_basic_map_flatten(copy());
5476 return manage(res);
5477}
5478
5479isl::checked::basic_map basic_map::flatten_domain() const
5480{
5481 auto res = isl_basic_map_flatten_domain(copy());
5482 return manage(res);
5483}
5484
5485isl::checked::basic_map basic_map::flatten_range() const
5486{
5487 auto res = isl_basic_map_flatten_range(copy());
5488 return manage(res);
5489}
5490
5491isl::checked::basic_map basic_map::gist(isl::checked::basic_map context) const
5492{
5493 auto res = isl_basic_map_gist(copy(), context.release());
5494 return manage(res);
5495}
5496
5497isl::checked::basic_map basic_map::intersect(isl::checked::basic_map bmap2) const
5498{
5499 auto res = isl_basic_map_intersect(copy(), bmap2.release());
5500 return manage(res);
5501}
5502
5503isl::checked::basic_map basic_map::intersect_domain(isl::checked::basic_set bset) const
5504{
5505 auto res = isl_basic_map_intersect_domain(copy(), bset.release());
5506 return manage(res);
5507}
5508
5509isl::checked::basic_map basic_map::intersect_range(isl::checked::basic_set bset) const
5510{
5511 auto res = isl_basic_map_intersect_range(copy(), bset.release());
5512 return manage(res);
5513}
5514
5515boolean basic_map::is_empty() const
5516{
5517 auto res = isl_basic_map_is_empty(get());
5518 return manage(res);
5519}
5520
5521boolean basic_map::is_equal(const isl::checked::basic_map &bmap2) const
5522{
5523 auto res = isl_basic_map_is_equal(get(), bmap2.get());
5524 return manage(res);
5525}
5526
5527boolean basic_map::is_subset(const isl::checked::basic_map &bmap2) const
5528{
5529 auto res = isl_basic_map_is_subset(get(), bmap2.get());
5530 return manage(res);
5531}
5532
5533isl::checked::map basic_map::lexmax() const
5534{
5535 auto res = isl_basic_map_lexmax(copy());
5536 return manage(res);
5537}
5538
5539isl::checked::map basic_map::lexmin() const
5540{
5541 auto res = isl_basic_map_lexmin(copy());
5542 return manage(res);
5543}
5544
5545isl::checked::basic_map basic_map::reverse() const
5546{
5547 auto res = isl_basic_map_reverse(copy());
5548 return manage(res);
5549}
5550
5551isl::checked::basic_map basic_map::sample() const
5552{
5553 auto res = isl_basic_map_sample(copy());
5554 return manage(res);
5555}
5556
5557isl::checked::map basic_map::unite(isl::checked::basic_map bmap2) const
5558{
5559 auto res = isl_basic_map_union(copy(), bmap2.release());
5560 return manage(res);
5561}
5562
5563inline std::ostream &operator<<(std::ostream &os, const basic_map &obj)
5564{
5565 char *str = isl_basic_map_to_str(obj.get());
5566 if (!str) {
5567 os.setstate(std::ios_base::badbit);
5568 return os;
5569 }
5570 os << str;
5571 free(str);
5572 return os;
5573}
5574
5575// implementations for isl::basic_set
5576basic_set manage(__isl_take isl_basic_set *ptr) {
5577 return basic_set(ptr);
5578}
5579basic_set manage_copy(__isl_keep isl_basic_set *ptr) {
5580 ptr = isl_basic_set_copy(ptr);
5581 return basic_set(ptr);
5582}
5583
5584basic_set::basic_set()
5585 : ptr(nullptr) {}
5586
5587basic_set::basic_set(const basic_set &obj)
5588 : ptr(nullptr)
5589{
5590 ptr = obj.copy();
5591}
5592
5593basic_set::basic_set(__isl_take isl_basic_set *ptr)
5594 : ptr(ptr) {}
5595
5596basic_set::basic_set(isl::checked::point pnt)
5597{
5598 auto res = isl_basic_set_from_point(pnt.release());
5599 ptr = res;
5600}
5601
5602basic_set::basic_set(isl::checked::ctx ctx, const std::string &str)
5603{
5604 auto res = isl_basic_set_read_from_str(ctx.release(), str.c_str());
5605 ptr = res;
5606}
5607
5608basic_set &basic_set::operator=(basic_set obj) {
5609 std::swap(this->ptr, obj.ptr);
5610 return *this;
5611}
5612
5613basic_set::~basic_set() {
5614 if (ptr)
5615 isl_basic_set_free(ptr);
5616}
5617
5618__isl_give isl_basic_set *basic_set::copy() const & {
5619 return isl_basic_set_copy(ptr);
5620}
5621
5622__isl_keep isl_basic_set *basic_set::get() const {
5623 return ptr;
5624}
5625
5626__isl_give isl_basic_set *basic_set::release() {
5627 isl_basic_set *tmp = ptr;
5628 ptr = nullptr;
5629 return tmp;
5630}
5631
5632bool basic_set::is_null() const {
5633 return ptr == nullptr;
5634}
5635
5636isl::checked::ctx basic_set::ctx() const {
5637 return isl::checked::ctx(isl_basic_set_get_ctx(ptr));
5638}
5639
5640isl::checked::basic_set basic_set::affine_hull() const
5641{
5642 auto res = isl_basic_set_affine_hull(copy());
5643 return manage(res);
5644}
5645
5646isl::checked::basic_set basic_set::apply(isl::checked::basic_map bmap) const
5647{
5648 auto res = isl_basic_set_apply(copy(), bmap.release());
5649 return manage(res);
5650}
5651
5652isl::checked::basic_set basic_set::detect_equalities() const
5653{
5654 auto res = isl_basic_set_detect_equalities(copy());
5655 return manage(res);
5656}
5657
5658isl::checked::val basic_set::dim_max_val(int pos) const
5659{
5660 auto res = isl_basic_set_dim_max_val(copy(), pos);
5661 return manage(res);
5662}
5663
5664isl::checked::basic_set basic_set::flatten() const
5665{
5666 auto res = isl_basic_set_flatten(copy());
5667 return manage(res);
5668}
5669
5670isl::checked::basic_set basic_set::gist(isl::checked::basic_set context) const
5671{
5672 auto res = isl_basic_set_gist(copy(), context.release());
5673 return manage(res);
5674}
5675
5676isl::checked::basic_set basic_set::intersect(isl::checked::basic_set bset2) const
5677{
5678 auto res = isl_basic_set_intersect(copy(), bset2.release());
5679 return manage(res);
5680}
5681
5682isl::checked::basic_set basic_set::intersect_params(isl::checked::basic_set bset2) const
5683{
5684 auto res = isl_basic_set_intersect_params(copy(), bset2.release());
5685 return manage(res);
5686}
5687
5688boolean basic_set::is_empty() const
5689{
5690 auto res = isl_basic_set_is_empty(get());
5691 return manage(res);
5692}
5693
5694boolean basic_set::is_equal(const isl::checked::basic_set &bset2) const
5695{
5696 auto res = isl_basic_set_is_equal(get(), bset2.get());
5697 return manage(res);
5698}
5699
5700boolean basic_set::is_subset(const isl::checked::basic_set &bset2) const
5701{
5702 auto res = isl_basic_set_is_subset(get(), bset2.get());
5703 return manage(res);
5704}
5705
5706boolean basic_set::is_wrapping() const
5707{
5708 auto res = isl_basic_set_is_wrapping(get());
5709 return manage(res);
5710}
5711
5712isl::checked::set basic_set::lexmax() const
5713{
5714 auto res = isl_basic_set_lexmax(copy());
5715 return manage(res);
5716}
5717
5718isl::checked::set basic_set::lexmin() const
5719{
5720 auto res = isl_basic_set_lexmin(copy());
5721 return manage(res);
5722}
5723
5724isl::checked::basic_set basic_set::params() const
5725{
5726 auto res = isl_basic_set_params(copy());
5727 return manage(res);
5728}
5729
5730isl::checked::basic_set basic_set::sample() const
5731{
5732 auto res = isl_basic_set_sample(copy());
5733 return manage(res);
5734}
5735
5736isl::checked::point basic_set::sample_point() const
5737{
5738 auto res = isl_basic_set_sample_point(copy());
5739 return manage(res);
5740}
5741
5742isl::checked::set basic_set::unite(isl::checked::basic_set bset2) const
5743{
5744 auto res = isl_basic_set_union(copy(), bset2.release());
5745 return manage(res);
5746}
5747
5748inline std::ostream &operator<<(std::ostream &os, const basic_set &obj)
5749{
5750 char *str = isl_basic_set_to_str(obj.get());
5751 if (!str) {
5752 os.setstate(std::ios_base::badbit);
5753 return os;
5754 }
5755 os << str;
5756 free(str);
5757 return os;
5758}
5759
5760// implementations for isl::fixed_box
5761fixed_box manage(__isl_take isl_fixed_box *ptr) {
5762 return fixed_box(ptr);
5763}
5764fixed_box manage_copy(__isl_keep isl_fixed_box *ptr) {
5765 ptr = isl_fixed_box_copy(ptr);
5766 return fixed_box(ptr);
5767}
5768
5769fixed_box::fixed_box()
5770 : ptr(nullptr) {}
5771
5772fixed_box::fixed_box(const fixed_box &obj)
5773 : ptr(nullptr)
5774{
5775 ptr = obj.copy();
5776}
5777
5778fixed_box::fixed_box(__isl_take isl_fixed_box *ptr)
5779 : ptr(ptr) {}
5780
5781fixed_box &fixed_box::operator=(fixed_box obj) {
5782 std::swap(this->ptr, obj.ptr);
5783 return *this;
5784}
5785
5786fixed_box::~fixed_box() {
5787 if (ptr)
5788 isl_fixed_box_free(ptr);
5789}
5790
5791__isl_give isl_fixed_box *fixed_box::copy() const & {
5792 return isl_fixed_box_copy(ptr);
5793}
5794
5795__isl_keep isl_fixed_box *fixed_box::get() const {
5796 return ptr;
5797}
5798
5799__isl_give isl_fixed_box *fixed_box::release() {
5800 isl_fixed_box *tmp = ptr;
5801 ptr = nullptr;
5802 return tmp;
5803}
5804
5805bool fixed_box::is_null() const {
5806 return ptr == nullptr;
5807}
5808
5809isl::checked::ctx fixed_box::ctx() const {
5810 return isl::checked::ctx(isl_fixed_box_get_ctx(ptr));
5811}
5812
5813isl::checked::multi_aff fixed_box::offset() const
5814{
5815 auto res = isl_fixed_box_get_offset(get());
5816 return manage(res);
5817}
5818
5819isl::checked::multi_aff fixed_box::get_offset() const
5820{
5821 return offset();
5822}
5823
5824isl::checked::multi_val fixed_box::size() const
5825{
5826 auto res = isl_fixed_box_get_size(get());
5827 return manage(res);
5828}
5829
5830isl::checked::multi_val fixed_box::get_size() const
5831{
5832 return size();
5833}
5834
5835isl::checked::space fixed_box::space() const
5836{
5837 auto res = isl_fixed_box_get_space(get());
5838 return manage(res);
5839}
5840
5841isl::checked::space fixed_box::get_space() const
5842{
5843 return space();
5844}
5845
5846boolean fixed_box::is_valid() const
5847{
5848 auto res = isl_fixed_box_is_valid(get());
5849 return manage(res);
5850}
5851
5852inline std::ostream &operator<<(std::ostream &os, const fixed_box &obj)
5853{
5854 char *str = isl_fixed_box_to_str(obj.get());
5855 if (!str) {
5856 os.setstate(std::ios_base::badbit);
5857 return os;
5858 }
5859 os << str;
5860 free(str);
5861 return os;
5862}
5863
5864// implementations for isl::id
5865id manage(__isl_take isl_id *ptr) {
5866 return id(ptr);
5867}
5868id manage_copy(__isl_keep isl_id *ptr) {
5869 ptr = isl_id_copy(ptr);
5870 return id(ptr);
5871}
5872
5873id::id()
5874 : ptr(nullptr) {}
5875
5876id::id(const id &obj)
5877 : ptr(nullptr)
5878{
5879 ptr = obj.copy();
5880}
5881
5882id::id(__isl_take isl_id *ptr)
5883 : ptr(ptr) {}
5884
5885id::id(isl::checked::ctx ctx, const std::string &str)
5886{
5887 auto res = isl_id_read_from_str(ctx.release(), str.c_str());
5888 ptr = res;
5889}
5890
5891id &id::operator=(id obj) {
5892 std::swap(this->ptr, obj.ptr);
5893 return *this;
5894}
5895
5896id::~id() {
5897 if (ptr)
5898 isl_id_free(ptr);
5899}
5900
5901__isl_give isl_id *id::copy() const & {
5902 return isl_id_copy(ptr);
5903}
5904
5905__isl_keep isl_id *id::get() const {
5906 return ptr;
5907}
5908
5909__isl_give isl_id *id::release() {
5910 isl_id *tmp = ptr;
5911 ptr = nullptr;
5912 return tmp;
5913}
5914
5915bool id::is_null() const {
5916 return ptr == nullptr;
5917}
5918
5919isl::checked::ctx id::ctx() const {
5920 return isl::checked::ctx(isl_id_get_ctx(ptr));
5921}
5922
5923std::string id::name() const
5924{
5925 auto res = isl_id_get_name(get());
5926 std::string tmp(res);
5927 return tmp;
5928}
5929
5930std::string id::get_name() const
5931{
5932 return name();
5933}
5934
5935inline std::ostream &operator<<(std::ostream &os, const id &obj)
5936{
5937 char *str = isl_id_to_str(obj.get());
5938 if (!str) {
5939 os.setstate(std::ios_base::badbit);
5940 return os;
5941 }
5942 os << str;
5943 free(str);
5944 return os;
5945}
5946
5947// implementations for isl::id_list
5948id_list manage(__isl_take isl_id_list *ptr) {
5949 return id_list(ptr);
5950}
5951id_list manage_copy(__isl_keep isl_id_list *ptr) {
5952 ptr = isl_id_list_copy(ptr);
5953 return id_list(ptr);
5954}
5955
5956id_list::id_list()
5957 : ptr(nullptr) {}
5958
5959id_list::id_list(const id_list &obj)
5960 : ptr(nullptr)
5961{
5962 ptr = obj.copy();
5963}
5964
5965id_list::id_list(__isl_take isl_id_list *ptr)
5966 : ptr(ptr) {}
5967
5968id_list::id_list(isl::checked::ctx ctx, int n)
5969{
5970 auto res = isl_id_list_alloc(ctx.release(), n);
5971 ptr = res;
5972}
5973
5974id_list::id_list(isl::checked::id el)
5975{
5976 auto res = isl_id_list_from_id(el.release());
5977 ptr = res;
5978}
5979
5980id_list &id_list::operator=(id_list obj) {
5981 std::swap(this->ptr, obj.ptr);
5982 return *this;
5983}
5984
5985id_list::~id_list() {
5986 if (ptr)
5987 isl_id_list_free(ptr);
5988}
5989
5990__isl_give isl_id_list *id_list::copy() const & {
5991 return isl_id_list_copy(ptr);
5992}
5993
5994__isl_keep isl_id_list *id_list::get() const {
5995 return ptr;
5996}
5997
5998__isl_give isl_id_list *id_list::release() {
5999 isl_id_list *tmp = ptr;
6000 ptr = nullptr;
6001 return tmp;
6002}
6003
6004bool id_list::is_null() const {
6005 return ptr == nullptr;
6006}
6007
6008isl::checked::ctx id_list::ctx() const {
6009 return isl::checked::ctx(isl_id_list_get_ctx(ptr));
6010}
6011
6012isl::checked::id_list id_list::add(isl::checked::id el) const
6013{
6014 auto res = isl_id_list_add(copy(), el.release());
6015 return manage(res);
6016}
6017
6018isl::checked::id_list id_list::add(const std::string &el) const
6019{
6020 return this->add(isl::checked::id(ctx(), el));
6021}
6022
6023isl::checked::id_list id_list::clear() const
6024{
6025 auto res = isl_id_list_clear(copy());
6026 return manage(res);
6027}
6028
6029isl::checked::id_list id_list::concat(isl::checked::id_list list2) const
6030{
6031 auto res = isl_id_list_concat(copy(), list2.release());
6032 return manage(res);
6033}
6034
6035isl::checked::id_list id_list::drop(unsigned int first, unsigned int n) const
6036{
6037 auto res = isl_id_list_drop(copy(), first, n);
6038 return manage(res);
6039}
6040
6041stat id_list::foreach(const std::function<stat(isl::checked::id)> &fn) const
6042{
6043 struct fn_data {
6044 std::function<stat(isl::checked::id)> func;
6045 } fn_data = { fn };
6046 auto fn_lambda = [](isl_id *arg_0, void *arg_1) -> isl_stat {
6047 auto *data = static_cast<struct fn_data *>(arg_1);
6048 auto ret = (data->func)(manage(arg_0));
6049 return ret.release();
6050 };
6051 auto res = isl_id_list_foreach(get(), fn_lambda, &fn_data);
6052 return manage(res);
6053}
6054
6055isl::checked::id id_list::at(int index) const
6056{
6057 auto res = isl_id_list_get_at(get(), index);
6058 return manage(res);
6059}
6060
6061isl::checked::id id_list::get_at(int index) const
6062{
6063 return at(index);
6064}
6065
6066isl::checked::id_list id_list::insert(unsigned int pos, isl::checked::id el) const
6067{
6068 auto res = isl_id_list_insert(copy(), pos, el.release());
6069 return manage(res);
6070}
6071
6072isl::checked::id_list id_list::insert(unsigned int pos, const std::string &el) const
6073{
6074 return this->insert(pos, isl::checked::id(ctx(), el));
6075}
6076
6077class size id_list::size() const
6078{
6079 auto res = isl_id_list_size(get());
6080 return manage(res);
6081}
6082
6083inline std::ostream &operator<<(std::ostream &os, const id_list &obj)
6084{
6085 char *str = isl_id_list_to_str(obj.get());
6086 if (!str) {
6087 os.setstate(std::ios_base::badbit);
6088 return os;
6089 }
6090 os << str;
6091 free(str);
6092 return os;
6093}
6094
6095// implementations for isl::map
6096map manage(__isl_take isl_map *ptr) {
6097 return map(ptr);
6098}
6099map manage_copy(__isl_keep isl_map *ptr) {
6100 ptr = isl_map_copy(ptr);
6101 return map(ptr);
6102}
6103
6104map::map()
6105 : ptr(nullptr) {}
6106
6107map::map(const map &obj)
6108 : ptr(nullptr)
6109{
6110 ptr = obj.copy();
6111}
6112
6113map::map(__isl_take isl_map *ptr)
6114 : ptr(ptr) {}
6115
6116map::map(isl::checked::basic_map bmap)
6117{
6118 auto res = isl_map_from_basic_map(bmap.release());
6119 ptr = res;
6120}
6121
6122map::map(isl::checked::ctx ctx, const std::string &str)
6123{
6124 auto res = isl_map_read_from_str(ctx.release(), str.c_str());
6125 ptr = res;
6126}
6127
6128map &map::operator=(map obj) {
6129 std::swap(this->ptr, obj.ptr);
6130 return *this;
6131}
6132
6133map::~map() {
6134 if (ptr)
6135 isl_map_free(ptr);
6136}
6137
6138__isl_give isl_map *map::copy() const & {
6139 return isl_map_copy(ptr);
6140}
6141
6142__isl_keep isl_map *map::get() const {
6143 return ptr;
6144}
6145
6146__isl_give isl_map *map::release() {
6147 isl_map *tmp = ptr;
6148 ptr = nullptr;
6149 return tmp;
6150}
6151
6152bool map::is_null() const {
6153 return ptr == nullptr;
6154}
6155
6156isl::checked::ctx map::ctx() const {
6157 return isl::checked::ctx(isl_map_get_ctx(ptr));
6158}
6159
6160isl::checked::basic_map map::affine_hull() const
6161{
6162 auto res = isl_map_affine_hull(copy());
6163 return manage(res);
6164}
6165
6166isl::checked::map map::apply_domain(isl::checked::map map2) const
6167{
6168 auto res = isl_map_apply_domain(copy(), map2.release());
6169 return manage(res);
6170}
6171
6172isl::checked::map map::apply_range(isl::checked::map map2) const
6173{
6174 auto res = isl_map_apply_range(copy(), map2.release());
6175 return manage(res);
6176}
6177
6178isl::checked::set map::bind_domain(isl::checked::multi_id tuple) const
6179{
6180 auto res = isl_map_bind_domain(copy(), tuple.release());
6181 return manage(res);
6182}
6183
6184isl::checked::set map::bind_range(isl::checked::multi_id tuple) const
6185{
6186 auto res = isl_map_bind_range(copy(), tuple.release());
6187 return manage(res);
6188}
6189
6190isl::checked::map map::coalesce() const
6191{
6192 auto res = isl_map_coalesce(copy());
6193 return manage(res);
6194}
6195
6196isl::checked::map map::complement() const
6197{
6198 auto res = isl_map_complement(copy());
6199 return manage(res);
6200}
6201
6202isl::checked::map map::curry() const
6203{
6204 auto res = isl_map_curry(copy());
6205 return manage(res);
6206}
6207
6208isl::checked::set map::deltas() const
6209{
6210 auto res = isl_map_deltas(copy());
6211 return manage(res);
6212}
6213
6214isl::checked::map map::detect_equalities() const
6215{
6216 auto res = isl_map_detect_equalities(copy());
6217 return manage(res);
6218}
6219
6220isl::checked::set map::domain() const
6221{
6222 auto res = isl_map_domain(copy());
6223 return manage(res);
6224}
6225
6226isl::checked::map map::domain_factor_domain() const
6227{
6228 auto res = isl_map_domain_factor_domain(copy());
6229 return manage(res);
6230}
6231
6232isl::checked::map map::domain_factor_range() const
6233{
6234 auto res = isl_map_domain_factor_range(copy());
6235 return manage(res);
6236}
6237
6238isl::checked::map map::domain_product(isl::checked::map map2) const
6239{
6240 auto res = isl_map_domain_product(copy(), map2.release());
6241 return manage(res);
6242}
6243
6244isl::checked::map map::empty(isl::checked::space space)
6245{
6246 auto res = isl_map_empty(space.release());
6247 return manage(res);
6248}
6249
6250isl::checked::map map::eq_at(isl::checked::multi_pw_aff mpa) const
6251{
6252 auto res = isl_map_eq_at_multi_pw_aff(copy(), mpa.release());
6253 return manage(res);
6254}
6255
6256isl::checked::map map::factor_domain() const
6257{
6258 auto res = isl_map_factor_domain(copy());
6259 return manage(res);
6260}
6261
6262isl::checked::map map::factor_range() const
6263{
6264 auto res = isl_map_factor_range(copy());
6265 return manage(res);
6266}
6267
6268isl::checked::map map::flatten() const
6269{
6270 auto res = isl_map_flatten(copy());
6271 return manage(res);
6272}
6273
6274isl::checked::map map::flatten_domain() const
6275{
6276 auto res = isl_map_flatten_domain(copy());
6277 return manage(res);
6278}
6279
6280isl::checked::map map::flatten_range() const
6281{
6282 auto res = isl_map_flatten_range(copy());
6283 return manage(res);
6284}
6285
6286stat map::foreach_basic_map(const std::function<stat(isl::checked::basic_map)> &fn) const
6287{
6288 struct fn_data {
6289 std::function<stat(isl::checked::basic_map)> func;
6290 } fn_data = { fn };
6291 auto fn_lambda = [](isl_basic_map *arg_0, void *arg_1) -> isl_stat {
6292 auto *data = static_cast<struct fn_data *>(arg_1);
6293 auto ret = (data->func)(manage(arg_0));
6294 return ret.release();
6295 };
6296 auto res = isl_map_foreach_basic_map(get(), fn_lambda, &fn_data);
6297 return manage(res);
6298}
6299
6300isl::checked::fixed_box map::range_simple_fixed_box_hull() const
6301{
6302 auto res = isl_map_get_range_simple_fixed_box_hull(get());
6303 return manage(res);
6304}
6305
6306isl::checked::fixed_box map::get_range_simple_fixed_box_hull() const
6307{
6308 return range_simple_fixed_box_hull();
6309}
6310
6311isl::checked::space map::space() const
6312{
6313 auto res = isl_map_get_space(get());
6314 return manage(res);
6315}
6316
6317isl::checked::space map::get_space() const
6318{
6319 return space();
6320}
6321
6322isl::checked::map map::gist(isl::checked::map context) const
6323{
6324 auto res = isl_map_gist(copy(), context.release());
6325 return manage(res);
6326}
6327
6328isl::checked::map map::gist_domain(isl::checked::set context) const
6329{
6330 auto res = isl_map_gist_domain(copy(), context.release());
6331 return manage(res);
6332}
6333
6334isl::checked::map map::intersect(isl::checked::map map2) const
6335{
6336 auto res = isl_map_intersect(copy(), map2.release());
6337 return manage(res);
6338}
6339
6340isl::checked::map map::intersect_domain(isl::checked::set set) const
6341{
6342 auto res = isl_map_intersect_domain(copy(), set.release());
6343 return manage(res);
6344}
6345
6346isl::checked::map map::intersect_params(isl::checked::set params) const
6347{
6348 auto res = isl_map_intersect_params(copy(), params.release());
6349 return manage(res);
6350}
6351
6352isl::checked::map map::intersect_range(isl::checked::set set) const
6353{
6354 auto res = isl_map_intersect_range(copy(), set.release());
6355 return manage(res);
6356}
6357
6358boolean map::is_bijective() const
6359{
6360 auto res = isl_map_is_bijective(get());
6361 return manage(res);
6362}
6363
6364boolean map::is_disjoint(const isl::checked::map &map2) const
6365{
6366 auto res = isl_map_is_disjoint(get(), map2.get());
6367 return manage(res);
6368}
6369
6370boolean map::is_empty() const
6371{
6372 auto res = isl_map_is_empty(get());
6373 return manage(res);
6374}
6375
6376boolean map::is_equal(const isl::checked::map &map2) const
6377{
6378 auto res = isl_map_is_equal(get(), map2.get());
6379 return manage(res);
6380}
6381
6382boolean map::is_injective() const
6383{
6384 auto res = isl_map_is_injective(get());
6385 return manage(res);
6386}
6387
6388boolean map::is_single_valued() const
6389{
6390 auto res = isl_map_is_single_valued(get());
6391 return manage(res);
6392}
6393
6394boolean map::is_strict_subset(const isl::checked::map &map2) const
6395{
6396 auto res = isl_map_is_strict_subset(get(), map2.get());
6397 return manage(res);
6398}
6399
6400boolean map::is_subset(const isl::checked::map &map2) const
6401{
6402 auto res = isl_map_is_subset(get(), map2.get());
6403 return manage(res);
6404}
6405
6406isl::checked::map map::lex_ge_at(isl::checked::multi_pw_aff mpa) const
6407{
6408 auto res = isl_map_lex_ge_at_multi_pw_aff(copy(), mpa.release());
6409 return manage(res);
6410}
6411
6412isl::checked::map map::lex_gt_at(isl::checked::multi_pw_aff mpa) const
6413{
6414 auto res = isl_map_lex_gt_at_multi_pw_aff(copy(), mpa.release());
6415 return manage(res);
6416}
6417
6418isl::checked::map map::lex_le_at(isl::checked::multi_pw_aff mpa) const
6419{
6420 auto res = isl_map_lex_le_at_multi_pw_aff(copy(), mpa.release());
6421 return manage(res);
6422}
6423
6424isl::checked::map map::lex_lt_at(isl::checked::multi_pw_aff mpa) const
6425{
6426 auto res = isl_map_lex_lt_at_multi_pw_aff(copy(), mpa.release());
6427 return manage(res);
6428}
6429
6430isl::checked::map map::lexmax() const
6431{
6432 auto res = isl_map_lexmax(copy());
6433 return manage(res);
6434}
6435
6436isl::checked::pw_multi_aff map::lexmax_pw_multi_aff() const
6437{
6438 auto res = isl_map_lexmax_pw_multi_aff(copy());
6439 return manage(res);
6440}
6441
6442isl::checked::map map::lexmin() const
6443{
6444 auto res = isl_map_lexmin(copy());
6445 return manage(res);
6446}
6447
6448isl::checked::pw_multi_aff map::lexmin_pw_multi_aff() const
6449{
6450 auto res = isl_map_lexmin_pw_multi_aff(copy());
6451 return manage(res);
6452}
6453
6454isl::checked::map map::lower_bound(isl::checked::multi_pw_aff lower) const
6455{
6456 auto res = isl_map_lower_bound_multi_pw_aff(copy(), lower.release());
6457 return manage(res);
6458}
6459
6460isl::checked::map map::lower_bound(isl::checked::multi_val lower) const
6461{
6462 auto res = isl_map_lower_bound_multi_val(copy(), lower.release());
6463 return manage(res);
6464}
6465
6466isl::checked::multi_pw_aff map::max_multi_pw_aff() const
6467{
6468 auto res = isl_map_max_multi_pw_aff(copy());
6469 return manage(res);
6470}
6471
6472isl::checked::multi_pw_aff map::min_multi_pw_aff() const
6473{
6474 auto res = isl_map_min_multi_pw_aff(copy());
6475 return manage(res);
6476}
6477
6478isl::checked::basic_map map::polyhedral_hull() const
6479{
6480 auto res = isl_map_polyhedral_hull(copy());
6481 return manage(res);
6482}
6483
6484isl::checked::map map::preimage_domain(isl::checked::multi_aff ma) const
6485{
6486 auto res = isl_map_preimage_domain_multi_aff(copy(), ma.release());
6487 return manage(res);
6488}
6489
6490isl::checked::map map::preimage_domain(isl::checked::multi_pw_aff mpa) const
6491{
6492 auto res = isl_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
6493 return manage(res);
6494}
6495
6496isl::checked::map map::preimage_domain(isl::checked::pw_multi_aff pma) const
6497{
6498 auto res = isl_map_preimage_domain_pw_multi_aff(copy(), pma.release());
6499 return manage(res);
6500}
6501
6502isl::checked::map map::preimage_range(isl::checked::multi_aff ma) const
6503{
6504 auto res = isl_map_preimage_range_multi_aff(copy(), ma.release());
6505 return manage(res);
6506}
6507
6508isl::checked::map map::preimage_range(isl::checked::pw_multi_aff pma) const
6509{
6510 auto res = isl_map_preimage_range_pw_multi_aff(copy(), pma.release());
6511 return manage(res);
6512}
6513
6514isl::checked::map map::project_out_all_params() const
6515{
6516 auto res = isl_map_project_out_all_params(copy());
6517 return manage(res);
6518}
6519
6520isl::checked::set map::range() const
6521{
6522 auto res = isl_map_range(copy());
6523 return manage(res);
6524}
6525
6526isl::checked::map map::range_factor_domain() const
6527{
6528 auto res = isl_map_range_factor_domain(copy());
6529 return manage(res);
6530}
6531
6532isl::checked::map map::range_factor_range() const
6533{
6534 auto res = isl_map_range_factor_range(copy());
6535 return manage(res);
6536}
6537
6538isl::checked::map map::range_product(isl::checked::map map2) const
6539{
6540 auto res = isl_map_range_product(copy(), map2.release());
6541 return manage(res);
6542}
6543
6544isl::checked::map map::range_reverse() const
6545{
6546 auto res = isl_map_range_reverse(copy());
6547 return manage(res);
6548}
6549
6550isl::checked::map map::reverse() const
6551{
6552 auto res = isl_map_reverse(copy());
6553 return manage(res);
6554}
6555
6556isl::checked::basic_map map::sample() const
6557{
6558 auto res = isl_map_sample(copy());
6559 return manage(res);
6560}
6561
6562isl::checked::map map::subtract(isl::checked::map map2) const
6563{
6564 auto res = isl_map_subtract(copy(), map2.release());
6565 return manage(res);
6566}
6567
6568isl::checked::map map::uncurry() const
6569{
6570 auto res = isl_map_uncurry(copy());
6571 return manage(res);
6572}
6573
6574isl::checked::map map::unite(isl::checked::map map2) const
6575{
6576 auto res = isl_map_union(copy(), map2.release());
6577 return manage(res);
6578}
6579
6580isl::checked::map map::universe(isl::checked::space space)
6581{
6582 auto res = isl_map_universe(space.release());
6583 return manage(res);
6584}
6585
6586isl::checked::basic_map map::unshifted_simple_hull() const
6587{
6588 auto res = isl_map_unshifted_simple_hull(copy());
6589 return manage(res);
6590}
6591
6592isl::checked::map map::upper_bound(isl::checked::multi_pw_aff upper) const
6593{
6594 auto res = isl_map_upper_bound_multi_pw_aff(copy(), upper.release());
6595 return manage(res);
6596}
6597
6598isl::checked::map map::upper_bound(isl::checked::multi_val upper) const
6599{
6600 auto res = isl_map_upper_bound_multi_val(copy(), upper.release());
6601 return manage(res);
6602}
6603
6604isl::checked::set map::wrap() const
6605{
6606 auto res = isl_map_wrap(copy());
6607 return manage(res);
6608}
6609
6610inline std::ostream &operator<<(std::ostream &os, const map &obj)
6611{
6612 char *str = isl_map_to_str(obj.get());
6613 if (!str) {
6614 os.setstate(std::ios_base::badbit);
6615 return os;
6616 }
6617 os << str;
6618 free(str);
6619 return os;
6620}
6621
6622// implementations for isl::multi_aff
6623multi_aff manage(__isl_take isl_multi_aff *ptr) {
6624 return multi_aff(ptr);
6625}
6626multi_aff manage_copy(__isl_keep isl_multi_aff *ptr) {
6627 ptr = isl_multi_aff_copy(ptr);
6628 return multi_aff(ptr);
6629}
6630
6631multi_aff::multi_aff()
6632 : ptr(nullptr) {}
6633
6634multi_aff::multi_aff(const multi_aff &obj)
6635 : ptr(nullptr)
6636{
6637 ptr = obj.copy();
6638}
6639
6640multi_aff::multi_aff(__isl_take isl_multi_aff *ptr)
6641 : ptr(ptr) {}
6642
6643multi_aff::multi_aff(isl::checked::aff aff)
6644{
6645 auto res = isl_multi_aff_from_aff(aff.release());
6646 ptr = res;
6647}
6648
6649multi_aff::multi_aff(isl::checked::space space, isl::checked::aff_list list)
6650{
6651 auto res = isl_multi_aff_from_aff_list(space.release(), list.release());
6652 ptr = res;
6653}
6654
6655multi_aff::multi_aff(isl::checked::ctx ctx, const std::string &str)
6656{
6657 auto res = isl_multi_aff_read_from_str(ctx.release(), str.c_str());
6658 ptr = res;
6659}
6660
6661multi_aff &multi_aff::operator=(multi_aff obj) {
6662 std::swap(this->ptr, obj.ptr);
6663 return *this;
6664}
6665
6666multi_aff::~multi_aff() {
6667 if (ptr)
6668 isl_multi_aff_free(ptr);
6669}
6670
6671__isl_give isl_multi_aff *multi_aff::copy() const & {
6672 return isl_multi_aff_copy(ptr);
6673}
6674
6675__isl_keep isl_multi_aff *multi_aff::get() const {
6676 return ptr;
6677}
6678
6679__isl_give isl_multi_aff *multi_aff::release() {
6680 isl_multi_aff *tmp = ptr;
6681 ptr = nullptr;
6682 return tmp;
6683}
6684
6685bool multi_aff::is_null() const {
6686 return ptr == nullptr;
6687}
6688
6689isl::checked::ctx multi_aff::ctx() const {
6690 return isl::checked::ctx(isl_multi_aff_get_ctx(ptr));
6691}
6692
6693isl::checked::multi_aff multi_aff::add(isl::checked::multi_aff multi2) const
6694{
6695 auto res = isl_multi_aff_add(copy(), multi2.release());
6696 return manage(res);
6697}
6698
6699isl::checked::multi_aff multi_aff::add_constant(isl::checked::multi_val mv) const
6700{
6701 auto res = isl_multi_aff_add_constant_multi_val(copy(), mv.release());
6702 return manage(res);
6703}
6704
6705isl::checked::multi_aff multi_aff::add_constant(isl::checked::val v) const
6706{
6707 auto res = isl_multi_aff_add_constant_val(copy(), v.release());
6708 return manage(res);
6709}
6710
6711isl::checked::multi_aff multi_aff::add_constant(long v) const
6712{
6713 return this->add_constant(isl::checked::val(ctx(), v));
6714}
6715
6716isl::checked::basic_set multi_aff::bind(isl::checked::multi_id tuple) const
6717{
6718 auto res = isl_multi_aff_bind(copy(), tuple.release());
6719 return manage(res);
6720}
6721
6722isl::checked::multi_aff multi_aff::bind_domain(isl::checked::multi_id tuple) const
6723{
6724 auto res = isl_multi_aff_bind_domain(copy(), tuple.release());
6725 return manage(res);
6726}
6727
6728isl::checked::multi_aff multi_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
6729{
6730 auto res = isl_multi_aff_bind_domain_wrapped_domain(copy(), tuple.release());
6731 return manage(res);
6732}
6733
6734isl::checked::multi_aff multi_aff::domain_map(isl::checked::space space)
6735{
6736 auto res = isl_multi_aff_domain_map(space.release());
6737 return manage(res);
6738}
6739
6740isl::checked::multi_aff multi_aff::flat_range_product(isl::checked::multi_aff multi2) const
6741{
6742 auto res = isl_multi_aff_flat_range_product(copy(), multi2.release());
6743 return manage(res);
6744}
6745
6746isl::checked::multi_aff multi_aff::floor() const
6747{
6748 auto res = isl_multi_aff_floor(copy());
6749 return manage(res);
6750}
6751
6752isl::checked::aff multi_aff::at(int pos) const
6753{
6754 auto res = isl_multi_aff_get_at(get(), pos);
6755 return manage(res);
6756}
6757
6758isl::checked::aff multi_aff::get_at(int pos) const
6759{
6760 return at(pos);
6761}
6762
6763isl::checked::multi_val multi_aff::constant_multi_val() const
6764{
6765 auto res = isl_multi_aff_get_constant_multi_val(get());
6766 return manage(res);
6767}
6768
6769isl::checked::multi_val multi_aff::get_constant_multi_val() const
6770{
6771 return constant_multi_val();
6772}
6773
6774isl::checked::aff_list multi_aff::list() const
6775{
6776 auto res = isl_multi_aff_get_list(get());
6777 return manage(res);
6778}
6779
6780isl::checked::aff_list multi_aff::get_list() const
6781{
6782 return list();
6783}
6784
6785isl::checked::space multi_aff::space() const
6786{
6787 auto res = isl_multi_aff_get_space(get());
6788 return manage(res);
6789}
6790
6791isl::checked::space multi_aff::get_space() const
6792{
6793 return space();
6794}
6795
6796isl::checked::multi_aff multi_aff::gist(isl::checked::set context) const
6797{
6798 auto res = isl_multi_aff_gist(copy(), context.release());
6799 return manage(res);
6800}
6801
6802isl::checked::multi_aff multi_aff::identity() const
6803{
6804 auto res = isl_multi_aff_identity_multi_aff(copy());
6805 return manage(res);
6806}
6807
6808isl::checked::multi_aff multi_aff::identity_on_domain(isl::checked::space space)
6809{
6810 auto res = isl_multi_aff_identity_on_domain_space(space.release());
6811 return manage(res);
6812}
6813
6814isl::checked::multi_aff multi_aff::insert_domain(isl::checked::space domain) const
6815{
6816 auto res = isl_multi_aff_insert_domain(copy(), domain.release());
6817 return manage(res);
6818}
6819
6820boolean multi_aff::involves_locals() const
6821{
6822 auto res = isl_multi_aff_involves_locals(get());
6823 return manage(res);
6824}
6825
6826isl::checked::multi_aff multi_aff::neg() const
6827{
6828 auto res = isl_multi_aff_neg(copy());
6829 return manage(res);
6830}
6831
6832boolean multi_aff::plain_is_equal(const isl::checked::multi_aff &multi2) const
6833{
6834 auto res = isl_multi_aff_plain_is_equal(get(), multi2.get());
6835 return manage(res);
6836}
6837
6838isl::checked::multi_aff multi_aff::product(isl::checked::multi_aff multi2) const
6839{
6840 auto res = isl_multi_aff_product(copy(), multi2.release());
6841 return manage(res);
6842}
6843
6844isl::checked::multi_aff multi_aff::pullback(isl::checked::multi_aff ma2) const
6845{
6846 auto res = isl_multi_aff_pullback_multi_aff(copy(), ma2.release());
6847 return manage(res);
6848}
6849
6850isl::checked::multi_aff multi_aff::range_map(isl::checked::space space)
6851{
6852 auto res = isl_multi_aff_range_map(space.release());
6853 return manage(res);
6854}
6855
6856isl::checked::multi_aff multi_aff::range_product(isl::checked::multi_aff multi2) const
6857{
6858 auto res = isl_multi_aff_range_product(copy(), multi2.release());
6859 return manage(res);
6860}
6861
6862isl::checked::multi_aff multi_aff::scale(isl::checked::multi_val mv) const
6863{
6864 auto res = isl_multi_aff_scale_multi_val(copy(), mv.release());
6865 return manage(res);
6866}
6867
6868isl::checked::multi_aff multi_aff::scale(isl::checked::val v) const
6869{
6870 auto res = isl_multi_aff_scale_val(copy(), v.release());
6871 return manage(res);
6872}
6873
6874isl::checked::multi_aff multi_aff::scale(long v) const
6875{
6876 return this->scale(isl::checked::val(ctx(), v));
6877}
6878
6879isl::checked::multi_aff multi_aff::scale_down(isl::checked::multi_val mv) const
6880{
6881 auto res = isl_multi_aff_scale_down_multi_val(copy(), mv.release());
6882 return manage(res);
6883}
6884
6885isl::checked::multi_aff multi_aff::scale_down(isl::checked::val v) const
6886{
6887 auto res = isl_multi_aff_scale_down_val(copy(), v.release());
6888 return manage(res);
6889}
6890
6891isl::checked::multi_aff multi_aff::scale_down(long v) const
6892{
6893 return this->scale_down(isl::checked::val(ctx(), v));
6894}
6895
6896isl::checked::multi_aff multi_aff::set_at(int pos, isl::checked::aff el) const
6897{
6898 auto res = isl_multi_aff_set_at(copy(), pos, el.release());
6899 return manage(res);
6900}
6901
6902class size multi_aff::size() const
6903{
6904 auto res = isl_multi_aff_size(get());
6905 return manage(res);
6906}
6907
6908isl::checked::multi_aff multi_aff::sub(isl::checked::multi_aff multi2) const
6909{
6910 auto res = isl_multi_aff_sub(copy(), multi2.release());
6911 return manage(res);
6912}
6913
6914isl::checked::multi_aff multi_aff::unbind_params_insert_domain(isl::checked::multi_id domain) const
6915{
6916 auto res = isl_multi_aff_unbind_params_insert_domain(copy(), domain.release());
6917 return manage(res);
6918}
6919
6920isl::checked::multi_aff multi_aff::zero(isl::checked::space space)
6921{
6922 auto res = isl_multi_aff_zero(space.release());
6923 return manage(res);
6924}
6925
6926inline std::ostream &operator<<(std::ostream &os, const multi_aff &obj)
6927{
6928 char *str = isl_multi_aff_to_str(obj.get());
6929 if (!str) {
6930 os.setstate(std::ios_base::badbit);
6931 return os;
6932 }
6933 os << str;
6934 free(str);
6935 return os;
6936}
6937
6938// implementations for isl::multi_id
6939multi_id manage(__isl_take isl_multi_id *ptr) {
6940 return multi_id(ptr);
6941}
6942multi_id manage_copy(__isl_keep isl_multi_id *ptr) {
6943 ptr = isl_multi_id_copy(ptr);
6944 return multi_id(ptr);
6945}
6946
6947multi_id::multi_id()
6948 : ptr(nullptr) {}
6949
6950multi_id::multi_id(const multi_id &obj)
6951 : ptr(nullptr)
6952{
6953 ptr = obj.copy();
6954}
6955
6956multi_id::multi_id(__isl_take isl_multi_id *ptr)
6957 : ptr(ptr) {}
6958
6959multi_id::multi_id(isl::checked::space space, isl::checked::id_list list)
6960{
6961 auto res = isl_multi_id_from_id_list(space.release(), list.release());
6962 ptr = res;
6963}
6964
6965multi_id::multi_id(isl::checked::ctx ctx, const std::string &str)
6966{
6967 auto res = isl_multi_id_read_from_str(ctx.release(), str.c_str());
6968 ptr = res;
6969}
6970
6971multi_id &multi_id::operator=(multi_id obj) {
6972 std::swap(this->ptr, obj.ptr);
6973 return *this;
6974}
6975
6976multi_id::~multi_id() {
6977 if (ptr)
6978 isl_multi_id_free(ptr);
6979}
6980
6981__isl_give isl_multi_id *multi_id::copy() const & {
6982 return isl_multi_id_copy(ptr);
6983}
6984
6985__isl_keep isl_multi_id *multi_id::get() const {
6986 return ptr;
6987}
6988
6989__isl_give isl_multi_id *multi_id::release() {
6990 isl_multi_id *tmp = ptr;
6991 ptr = nullptr;
6992 return tmp;
6993}
6994
6995bool multi_id::is_null() const {
6996 return ptr == nullptr;
6997}
6998
6999isl::checked::ctx multi_id::ctx() const {
7000 return isl::checked::ctx(isl_multi_id_get_ctx(ptr));
7001}
7002
7003isl::checked::multi_id multi_id::flat_range_product(isl::checked::multi_id multi2) const
7004{
7005 auto res = isl_multi_id_flat_range_product(copy(), multi2.release());
7006 return manage(res);
7007}
7008
7009isl::checked::id multi_id::at(int pos) const
7010{
7011 auto res = isl_multi_id_get_at(get(), pos);
7012 return manage(res);
7013}
7014
7015isl::checked::id multi_id::get_at(int pos) const
7016{
7017 return at(pos);
7018}
7019
7020isl::checked::id_list multi_id::list() const
7021{
7022 auto res = isl_multi_id_get_list(get());
7023 return manage(res);
7024}
7025
7026isl::checked::id_list multi_id::get_list() const
7027{
7028 return list();
7029}
7030
7031isl::checked::space multi_id::space() const
7032{
7033 auto res = isl_multi_id_get_space(get());
7034 return manage(res);
7035}
7036
7037isl::checked::space multi_id::get_space() const
7038{
7039 return space();
7040}
7041
7042boolean multi_id::plain_is_equal(const isl::checked::multi_id &multi2) const
7043{
7044 auto res = isl_multi_id_plain_is_equal(get(), multi2.get());
7045 return manage(res);
7046}
7047
7048isl::checked::multi_id multi_id::range_product(isl::checked::multi_id multi2) const
7049{
7050 auto res = isl_multi_id_range_product(copy(), multi2.release());
7051 return manage(res);
7052}
7053
7054isl::checked::multi_id multi_id::set_at(int pos, isl::checked::id el) const
7055{
7056 auto res = isl_multi_id_set_at(copy(), pos, el.release());
7057 return manage(res);
7058}
7059
7060isl::checked::multi_id multi_id::set_at(int pos, const std::string &el) const
7061{
7062 return this->set_at(pos, isl::checked::id(ctx(), el));
7063}
7064
7065class size multi_id::size() const
7066{
7067 auto res = isl_multi_id_size(get());
7068 return manage(res);
7069}
7070
7071inline std::ostream &operator<<(std::ostream &os, const multi_id &obj)
7072{
7073 char *str = isl_multi_id_to_str(obj.get());
7074 if (!str) {
7075 os.setstate(std::ios_base::badbit);
7076 return os;
7077 }
7078 os << str;
7079 free(str);
7080 return os;
7081}
7082
7083// implementations for isl::multi_pw_aff
7084multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr) {
7085 return multi_pw_aff(ptr);
7086}
7087multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr) {
7088 ptr = isl_multi_pw_aff_copy(ptr);
7089 return multi_pw_aff(ptr);
7090}
7091
7092multi_pw_aff::multi_pw_aff()
7093 : ptr(nullptr) {}
7094
7095multi_pw_aff::multi_pw_aff(const multi_pw_aff &obj)
7096 : ptr(nullptr)
7097{
7098 ptr = obj.copy();
7099}
7100
7101multi_pw_aff::multi_pw_aff(__isl_take isl_multi_pw_aff *ptr)
7102 : ptr(ptr) {}
7103
7104multi_pw_aff::multi_pw_aff(isl::checked::aff aff)
7105{
7106 auto res = isl_multi_pw_aff_from_aff(aff.release());
7107 ptr = res;
7108}
7109
7110multi_pw_aff::multi_pw_aff(isl::checked::multi_aff ma)
7111{
7112 auto res = isl_multi_pw_aff_from_multi_aff(ma.release());
7113 ptr = res;
7114}
7115
7116multi_pw_aff::multi_pw_aff(isl::checked::pw_aff pa)
7117{
7118 auto res = isl_multi_pw_aff_from_pw_aff(pa.release());
7119 ptr = res;
7120}
7121
7122multi_pw_aff::multi_pw_aff(isl::checked::space space, isl::checked::pw_aff_list list)
7123{
7124 auto res = isl_multi_pw_aff_from_pw_aff_list(space.release(), list.release());
7125 ptr = res;
7126}
7127
7128multi_pw_aff::multi_pw_aff(isl::checked::pw_multi_aff pma)
7129{
7130 auto res = isl_multi_pw_aff_from_pw_multi_aff(pma.release());
7131 ptr = res;
7132}
7133
7134multi_pw_aff::multi_pw_aff(isl::checked::ctx ctx, const std::string &str)
7135{
7136 auto res = isl_multi_pw_aff_read_from_str(ctx.release(), str.c_str());
7137 ptr = res;
7138}
7139
7140multi_pw_aff &multi_pw_aff::operator=(multi_pw_aff obj) {
7141 std::swap(this->ptr, obj.ptr);
7142 return *this;
7143}
7144
7145multi_pw_aff::~multi_pw_aff() {
7146 if (ptr)
7147 isl_multi_pw_aff_free(ptr);
7148}
7149
7150__isl_give isl_multi_pw_aff *multi_pw_aff::copy() const & {
7151 return isl_multi_pw_aff_copy(ptr);
7152}
7153
7154__isl_keep isl_multi_pw_aff *multi_pw_aff::get() const {
7155 return ptr;
7156}
7157
7158__isl_give isl_multi_pw_aff *multi_pw_aff::release() {
7159 isl_multi_pw_aff *tmp = ptr;
7160 ptr = nullptr;
7161 return tmp;
7162}
7163
7164bool multi_pw_aff::is_null() const {
7165 return ptr == nullptr;
7166}
7167
7168isl::checked::ctx multi_pw_aff::ctx() const {
7169 return isl::checked::ctx(isl_multi_pw_aff_get_ctx(ptr));
7170}
7171
7172isl::checked::multi_pw_aff multi_pw_aff::add(isl::checked::multi_pw_aff multi2) const
7173{
7174 auto res = isl_multi_pw_aff_add(copy(), multi2.release());
7175 return manage(res);
7176}
7177
7178isl::checked::multi_pw_aff multi_pw_aff::add_constant(isl::checked::multi_val mv) const
7179{
7180 auto res = isl_multi_pw_aff_add_constant_multi_val(copy(), mv.release());
7181 return manage(res);
7182}
7183
7184isl::checked::multi_pw_aff multi_pw_aff::add_constant(isl::checked::val v) const
7185{
7186 auto res = isl_multi_pw_aff_add_constant_val(copy(), v.release());
7187 return manage(res);
7188}
7189
7190isl::checked::multi_pw_aff multi_pw_aff::add_constant(long v) const
7191{
7192 return this->add_constant(isl::checked::val(ctx(), v));
7193}
7194
7195isl::checked::set multi_pw_aff::bind(isl::checked::multi_id tuple) const
7196{
7197 auto res = isl_multi_pw_aff_bind(copy(), tuple.release());
7198 return manage(res);
7199}
7200
7201isl::checked::multi_pw_aff multi_pw_aff::bind_domain(isl::checked::multi_id tuple) const
7202{
7203 auto res = isl_multi_pw_aff_bind_domain(copy(), tuple.release());
7204 return manage(res);
7205}
7206
7207isl::checked::multi_pw_aff multi_pw_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
7208{
7209 auto res = isl_multi_pw_aff_bind_domain_wrapped_domain(copy(), tuple.release());
7210 return manage(res);
7211}
7212
7213isl::checked::multi_pw_aff multi_pw_aff::coalesce() const
7214{
7215 auto res = isl_multi_pw_aff_coalesce(copy());
7216 return manage(res);
7217}
7218
7219isl::checked::set multi_pw_aff::domain() const
7220{
7221 auto res = isl_multi_pw_aff_domain(copy());
7222 return manage(res);
7223}
7224
7225isl::checked::multi_pw_aff multi_pw_aff::flat_range_product(isl::checked::multi_pw_aff multi2) const
7226{
7227 auto res = isl_multi_pw_aff_flat_range_product(copy(), multi2.release());
7228 return manage(res);
7229}
7230
7231isl::checked::pw_aff multi_pw_aff::at(int pos) const
7232{
7233 auto res = isl_multi_pw_aff_get_at(get(), pos);
7234 return manage(res);
7235}
7236
7237isl::checked::pw_aff multi_pw_aff::get_at(int pos) const
7238{
7239 return at(pos);
7240}
7241
7242isl::checked::pw_aff_list multi_pw_aff::list() const
7243{
7244 auto res = isl_multi_pw_aff_get_list(get());
7245 return manage(res);
7246}
7247
7248isl::checked::pw_aff_list multi_pw_aff::get_list() const
7249{
7250 return list();
7251}
7252
7253isl::checked::space multi_pw_aff::space() const
7254{
7255 auto res = isl_multi_pw_aff_get_space(get());
7256 return manage(res);
7257}
7258
7259isl::checked::space multi_pw_aff::get_space() const
7260{
7261 return space();
7262}
7263
7264isl::checked::multi_pw_aff multi_pw_aff::gist(isl::checked::set set) const
7265{
7266 auto res = isl_multi_pw_aff_gist(copy(), set.release());
7267 return manage(res);
7268}
7269
7270isl::checked::multi_pw_aff multi_pw_aff::identity() const
7271{
7272 auto res = isl_multi_pw_aff_identity_multi_pw_aff(copy());
7273 return manage(res);
7274}
7275
7276isl::checked::multi_pw_aff multi_pw_aff::identity_on_domain(isl::checked::space space)
7277{
7278 auto res = isl_multi_pw_aff_identity_on_domain_space(space.release());
7279 return manage(res);
7280}
7281
7282isl::checked::multi_pw_aff multi_pw_aff::insert_domain(isl::checked::space domain) const
7283{
7284 auto res = isl_multi_pw_aff_insert_domain(copy(), domain.release());
7285 return manage(res);
7286}
7287
7288isl::checked::multi_pw_aff multi_pw_aff::intersect_domain(isl::checked::set domain) const
7289{
7290 auto res = isl_multi_pw_aff_intersect_domain(copy(), domain.release());
7291 return manage(res);
7292}
7293
7294isl::checked::multi_pw_aff multi_pw_aff::intersect_params(isl::checked::set set) const
7295{
7296 auto res = isl_multi_pw_aff_intersect_params(copy(), set.release());
7297 return manage(res);
7298}
7299
7300boolean multi_pw_aff::involves_param(const isl::checked::id &id) const
7301{
7302 auto res = isl_multi_pw_aff_involves_param_id(get(), id.get());
7303 return manage(res);
7304}
7305
7306boolean multi_pw_aff::involves_param(const std::string &id) const
7307{
7308 return this->involves_param(isl::checked::id(ctx(), id));
7309}
7310
7311boolean multi_pw_aff::involves_param(const isl::checked::id_list &list) const
7312{
7313 auto res = isl_multi_pw_aff_involves_param_id_list(get(), list.get());
7314 return manage(res);
7315}
7316
7317isl::checked::multi_pw_aff multi_pw_aff::max(isl::checked::multi_pw_aff multi2) const
7318{
7319 auto res = isl_multi_pw_aff_max(copy(), multi2.release());
7320 return manage(res);
7321}
7322
7323isl::checked::multi_val multi_pw_aff::max_multi_val() const
7324{
7325 auto res = isl_multi_pw_aff_max_multi_val(copy());
7326 return manage(res);
7327}
7328
7329isl::checked::multi_pw_aff multi_pw_aff::min(isl::checked::multi_pw_aff multi2) const
7330{
7331 auto res = isl_multi_pw_aff_min(copy(), multi2.release());
7332 return manage(res);
7333}
7334
7335isl::checked::multi_val multi_pw_aff::min_multi_val() const
7336{
7337 auto res = isl_multi_pw_aff_min_multi_val(copy());
7338 return manage(res);
7339}
7340
7341isl::checked::multi_pw_aff multi_pw_aff::neg() const
7342{
7343 auto res = isl_multi_pw_aff_neg(copy());
7344 return manage(res);
7345}
7346
7347boolean multi_pw_aff::plain_is_equal(const isl::checked::multi_pw_aff &multi2) const
7348{
7349 auto res = isl_multi_pw_aff_plain_is_equal(get(), multi2.get());
7350 return manage(res);
7351}
7352
7353isl::checked::multi_pw_aff multi_pw_aff::product(isl::checked::multi_pw_aff multi2) const
7354{
7355 auto res = isl_multi_pw_aff_product(copy(), multi2.release());
7356 return manage(res);
7357}
7358
7359isl::checked::multi_pw_aff multi_pw_aff::pullback(isl::checked::multi_aff ma) const
7360{
7361 auto res = isl_multi_pw_aff_pullback_multi_aff(copy(), ma.release());
7362 return manage(res);
7363}
7364
7365isl::checked::multi_pw_aff multi_pw_aff::pullback(isl::checked::multi_pw_aff mpa2) const
7366{
7367 auto res = isl_multi_pw_aff_pullback_multi_pw_aff(copy(), mpa2.release());
7368 return manage(res);
7369}
7370
7371isl::checked::multi_pw_aff multi_pw_aff::pullback(isl::checked::pw_multi_aff pma) const
7372{
7373 auto res = isl_multi_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
7374 return manage(res);
7375}
7376
7377isl::checked::multi_pw_aff multi_pw_aff::range_product(isl::checked::multi_pw_aff multi2) const
7378{
7379 auto res = isl_multi_pw_aff_range_product(copy(), multi2.release());
7380 return manage(res);
7381}
7382
7383isl::checked::multi_pw_aff multi_pw_aff::scale(isl::checked::multi_val mv) const
7384{
7385 auto res = isl_multi_pw_aff_scale_multi_val(copy(), mv.release());
7386 return manage(res);
7387}
7388
7389isl::checked::multi_pw_aff multi_pw_aff::scale(isl::checked::val v) const
7390{
7391 auto res = isl_multi_pw_aff_scale_val(copy(), v.release());
7392 return manage(res);
7393}
7394
7395isl::checked::multi_pw_aff multi_pw_aff::scale(long v) const
7396{
7397 return this->scale(isl::checked::val(ctx(), v));
7398}
7399
7400isl::checked::multi_pw_aff multi_pw_aff::scale_down(isl::checked::multi_val mv) const
7401{
7402 auto res = isl_multi_pw_aff_scale_down_multi_val(copy(), mv.release());
7403 return manage(res);
7404}
7405
7406isl::checked::multi_pw_aff multi_pw_aff::scale_down(isl::checked::val v) const
7407{
7408 auto res = isl_multi_pw_aff_scale_down_val(copy(), v.release());
7409 return manage(res);
7410}
7411
7412isl::checked::multi_pw_aff multi_pw_aff::scale_down(long v) const
7413{
7414 return this->scale_down(isl::checked::val(ctx(), v));
7415}
7416
7417isl::checked::multi_pw_aff multi_pw_aff::set_at(int pos, isl::checked::pw_aff el) const
7418{
7419 auto res = isl_multi_pw_aff_set_at(copy(), pos, el.release());
7420 return manage(res);
7421}
7422
7423class size multi_pw_aff::size() const
7424{
7425 auto res = isl_multi_pw_aff_size(get());
7426 return manage(res);
7427}
7428
7429isl::checked::multi_pw_aff multi_pw_aff::sub(isl::checked::multi_pw_aff multi2) const
7430{
7431 auto res = isl_multi_pw_aff_sub(copy(), multi2.release());
7432 return manage(res);
7433}
7434
7435isl::checked::multi_pw_aff multi_pw_aff::unbind_params_insert_domain(isl::checked::multi_id domain) const
7436{
7437 auto res = isl_multi_pw_aff_unbind_params_insert_domain(copy(), domain.release());
7438 return manage(res);
7439}
7440
7441isl::checked::multi_pw_aff multi_pw_aff::union_add(isl::checked::multi_pw_aff mpa2) const
7442{
7443 auto res = isl_multi_pw_aff_union_add(copy(), mpa2.release());
7444 return manage(res);
7445}
7446
7447isl::checked::multi_pw_aff multi_pw_aff::zero(isl::checked::space space)
7448{
7449 auto res = isl_multi_pw_aff_zero(space.release());
7450 return manage(res);
7451}
7452
7453inline std::ostream &operator<<(std::ostream &os, const multi_pw_aff &obj)
7454{
7455 char *str = isl_multi_pw_aff_to_str(obj.get());
7456 if (!str) {
7457 os.setstate(std::ios_base::badbit);
7458 return os;
7459 }
7460 os << str;
7461 free(str);
7462 return os;
7463}
7464
7465// implementations for isl::multi_union_pw_aff
7466multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr) {
7467 return multi_union_pw_aff(ptr);
7468}
7469multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr) {
7470 ptr = isl_multi_union_pw_aff_copy(ptr);
7471 return multi_union_pw_aff(ptr);
7472}
7473
7474multi_union_pw_aff::multi_union_pw_aff()
7475 : ptr(nullptr) {}
7476
7477multi_union_pw_aff::multi_union_pw_aff(const multi_union_pw_aff &obj)
7478 : ptr(nullptr)
7479{
7480 ptr = obj.copy();
7481}
7482
7483multi_union_pw_aff::multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr)
7484 : ptr(ptr) {}
7485
7486multi_union_pw_aff::multi_union_pw_aff(isl::checked::multi_pw_aff mpa)
7487{
7488 auto res = isl_multi_union_pw_aff_from_multi_pw_aff(mpa.release());
7489 ptr = res;
7490}
7491
7492multi_union_pw_aff::multi_union_pw_aff(isl::checked::union_pw_aff upa)
7493{
7494 auto res = isl_multi_union_pw_aff_from_union_pw_aff(upa.release());
7495 ptr = res;
7496}
7497
7498multi_union_pw_aff::multi_union_pw_aff(isl::checked::space space, isl::checked::union_pw_aff_list list)
7499{
7500 auto res = isl_multi_union_pw_aff_from_union_pw_aff_list(space.release(), list.release());
7501 ptr = res;
7502}
7503
7504multi_union_pw_aff::multi_union_pw_aff(isl::checked::ctx ctx, const std::string &str)
7505{
7506 auto res = isl_multi_union_pw_aff_read_from_str(ctx.release(), str.c_str());
7507 ptr = res;
7508}
7509
7510multi_union_pw_aff &multi_union_pw_aff::operator=(multi_union_pw_aff obj) {
7511 std::swap(this->ptr, obj.ptr);
7512 return *this;
7513}
7514
7515multi_union_pw_aff::~multi_union_pw_aff() {
7516 if (ptr)
7517 isl_multi_union_pw_aff_free(ptr);
7518}
7519
7520__isl_give isl_multi_union_pw_aff *multi_union_pw_aff::copy() const & {
7521 return isl_multi_union_pw_aff_copy(ptr);
7522}
7523
7524__isl_keep isl_multi_union_pw_aff *multi_union_pw_aff::get() const {
7525 return ptr;
7526}
7527
7528__isl_give isl_multi_union_pw_aff *multi_union_pw_aff::release() {
7529 isl_multi_union_pw_aff *tmp = ptr;
7530 ptr = nullptr;
7531 return tmp;
7532}
7533
7534bool multi_union_pw_aff::is_null() const {
7535 return ptr == nullptr;
7536}
7537
7538isl::checked::ctx multi_union_pw_aff::ctx() const {
7539 return isl::checked::ctx(isl_multi_union_pw_aff_get_ctx(ptr));
7540}
7541
7542isl::checked::multi_union_pw_aff multi_union_pw_aff::add(isl::checked::multi_union_pw_aff multi2) const
7543{
7544 auto res = isl_multi_union_pw_aff_add(copy(), multi2.release());
7545 return manage(res);
7546}
7547
7548isl::checked::union_set multi_union_pw_aff::bind(isl::checked::multi_id tuple) const
7549{
7550 auto res = isl_multi_union_pw_aff_bind(copy(), tuple.release());
7551 return manage(res);
7552}
7553
7554isl::checked::multi_union_pw_aff multi_union_pw_aff::coalesce() const
7555{
7556 auto res = isl_multi_union_pw_aff_coalesce(copy());
7557 return manage(res);
7558}
7559
7560isl::checked::union_set multi_union_pw_aff::domain() const
7561{
7562 auto res = isl_multi_union_pw_aff_domain(copy());
7563 return manage(res);
7564}
7565
7566isl::checked::multi_union_pw_aff multi_union_pw_aff::flat_range_product(isl::checked::multi_union_pw_aff multi2) const
7567{
7568 auto res = isl_multi_union_pw_aff_flat_range_product(copy(), multi2.release());
7569 return manage(res);
7570}
7571
7572isl::checked::union_pw_aff multi_union_pw_aff::at(int pos) const
7573{
7574 auto res = isl_multi_union_pw_aff_get_at(get(), pos);
7575 return manage(res);
7576}
7577
7578isl::checked::union_pw_aff multi_union_pw_aff::get_at(int pos) const
7579{
7580 return at(pos);
7581}
7582
7583isl::checked::union_pw_aff_list multi_union_pw_aff::list() const
7584{
7585 auto res = isl_multi_union_pw_aff_get_list(get());
7586 return manage(res);
7587}
7588
7589isl::checked::union_pw_aff_list multi_union_pw_aff::get_list() const
7590{
7591 return list();
7592}
7593
7594isl::checked::space multi_union_pw_aff::space() const
7595{
7596 auto res = isl_multi_union_pw_aff_get_space(get());
7597 return manage(res);
7598}
7599
7600isl::checked::space multi_union_pw_aff::get_space() const
7601{
7602 return space();
7603}
7604
7605isl::checked::multi_union_pw_aff multi_union_pw_aff::gist(isl::checked::union_set context) const
7606{
7607 auto res = isl_multi_union_pw_aff_gist(copy(), context.release());
7608 return manage(res);
7609}
7610
7611isl::checked::multi_union_pw_aff multi_union_pw_aff::intersect_domain(isl::checked::union_set uset) const
7612{
7613 auto res = isl_multi_union_pw_aff_intersect_domain(copy(), uset.release());
7614 return manage(res);
7615}
7616
7617isl::checked::multi_union_pw_aff multi_union_pw_aff::intersect_params(isl::checked::set params) const
7618{
7619 auto res = isl_multi_union_pw_aff_intersect_params(copy(), params.release());
7620 return manage(res);
7621}
7622
7623isl::checked::multi_union_pw_aff multi_union_pw_aff::neg() const
7624{
7625 auto res = isl_multi_union_pw_aff_neg(copy());
7626 return manage(res);
7627}
7628
7629boolean multi_union_pw_aff::plain_is_equal(const isl::checked::multi_union_pw_aff &multi2) const
7630{
7631 auto res = isl_multi_union_pw_aff_plain_is_equal(get(), multi2.get());
7632 return manage(res);
7633}
7634
7635isl::checked::multi_union_pw_aff multi_union_pw_aff::pullback(isl::checked::union_pw_multi_aff upma) const
7636{
7637 auto res = isl_multi_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
7638 return manage(res);
7639}
7640
7641isl::checked::multi_union_pw_aff multi_union_pw_aff::range_product(isl::checked::multi_union_pw_aff multi2) const
7642{
7643 auto res = isl_multi_union_pw_aff_range_product(copy(), multi2.release());
7644 return manage(res);
7645}
7646
7647isl::checked::multi_union_pw_aff multi_union_pw_aff::scale(isl::checked::multi_val mv) const
7648{
7649 auto res = isl_multi_union_pw_aff_scale_multi_val(copy(), mv.release());
7650 return manage(res);
7651}
7652
7653isl::checked::multi_union_pw_aff multi_union_pw_aff::scale(isl::checked::val v) const
7654{
7655 auto res = isl_multi_union_pw_aff_scale_val(copy(), v.release());
7656 return manage(res);
7657}
7658
7659isl::checked::multi_union_pw_aff multi_union_pw_aff::scale(long v) const
7660{
7661 return this->scale(isl::checked::val(ctx(), v));
7662}
7663
7664isl::checked::multi_union_pw_aff multi_union_pw_aff::scale_down(isl::checked::multi_val mv) const
7665{
7666 auto res = isl_multi_union_pw_aff_scale_down_multi_val(copy(), mv.release());
7667 return manage(res);
7668}
7669
7670isl::checked::multi_union_pw_aff multi_union_pw_aff::scale_down(isl::checked::val v) const
7671{
7672 auto res = isl_multi_union_pw_aff_scale_down_val(copy(), v.release());
7673 return manage(res);
7674}
7675
7676isl::checked::multi_union_pw_aff multi_union_pw_aff::scale_down(long v) const
7677{
7678 return this->scale_down(isl::checked::val(ctx(), v));
7679}
7680
7681isl::checked::multi_union_pw_aff multi_union_pw_aff::set_at(int pos, isl::checked::union_pw_aff el) const
7682{
7683 auto res = isl_multi_union_pw_aff_set_at(copy(), pos, el.release());
7684 return manage(res);
7685}
7686
7687class size multi_union_pw_aff::size() const
7688{
7689 auto res = isl_multi_union_pw_aff_size(get());
7690 return manage(res);
7691}
7692
7693isl::checked::multi_union_pw_aff multi_union_pw_aff::sub(isl::checked::multi_union_pw_aff multi2) const
7694{
7695 auto res = isl_multi_union_pw_aff_sub(copy(), multi2.release());
7696 return manage(res);
7697}
7698
7699isl::checked::multi_union_pw_aff multi_union_pw_aff::union_add(isl::checked::multi_union_pw_aff mupa2) const
7700{
7701 auto res = isl_multi_union_pw_aff_union_add(copy(), mupa2.release());
7702 return manage(res);
7703}
7704
7705isl::checked::multi_union_pw_aff multi_union_pw_aff::zero(isl::checked::space space)
7706{
7707 auto res = isl_multi_union_pw_aff_zero(space.release());
7708 return manage(res);
7709}
7710
7711inline std::ostream &operator<<(std::ostream &os, const multi_union_pw_aff &obj)
7712{
7713 char *str = isl_multi_union_pw_aff_to_str(obj.get());
7714 if (!str) {
7715 os.setstate(std::ios_base::badbit);
7716 return os;
7717 }
7718 os << str;
7719 free(str);
7720 return os;
7721}
7722
7723// implementations for isl::multi_val
7724multi_val manage(__isl_take isl_multi_val *ptr) {
7725 return multi_val(ptr);
7726}
7727multi_val manage_copy(__isl_keep isl_multi_val *ptr) {
7728 ptr = isl_multi_val_copy(ptr);
7729 return multi_val(ptr);
7730}
7731
7732multi_val::multi_val()
7733 : ptr(nullptr) {}
7734
7735multi_val::multi_val(const multi_val &obj)
7736 : ptr(nullptr)
7737{
7738 ptr = obj.copy();
7739}
7740
7741multi_val::multi_val(__isl_take isl_multi_val *ptr)
7742 : ptr(ptr) {}
7743
7744multi_val::multi_val(isl::checked::space space, isl::checked::val_list list)
7745{
7746 auto res = isl_multi_val_from_val_list(space.release(), list.release());
7747 ptr = res;
7748}
7749
7750multi_val::multi_val(isl::checked::ctx ctx, const std::string &str)
7751{
7752 auto res = isl_multi_val_read_from_str(ctx.release(), str.c_str());
7753 ptr = res;
7754}
7755
7756multi_val &multi_val::operator=(multi_val obj) {
7757 std::swap(this->ptr, obj.ptr);
7758 return *this;
7759}
7760
7761multi_val::~multi_val() {
7762 if (ptr)
7763 isl_multi_val_free(ptr);
7764}
7765
7766__isl_give isl_multi_val *multi_val::copy() const & {
7767 return isl_multi_val_copy(ptr);
7768}
7769
7770__isl_keep isl_multi_val *multi_val::get() const {
7771 return ptr;
7772}
7773
7774__isl_give isl_multi_val *multi_val::release() {
7775 isl_multi_val *tmp = ptr;
7776 ptr = nullptr;
7777 return tmp;
7778}
7779
7780bool multi_val::is_null() const {
7781 return ptr == nullptr;
7782}
7783
7784isl::checked::ctx multi_val::ctx() const {
7785 return isl::checked::ctx(isl_multi_val_get_ctx(ptr));
7786}
7787
7788isl::checked::multi_val multi_val::add(isl::checked::multi_val multi2) const
7789{
7790 auto res = isl_multi_val_add(copy(), multi2.release());
7791 return manage(res);
7792}
7793
7794isl::checked::multi_val multi_val::add(isl::checked::val v) const
7795{
7796 auto res = isl_multi_val_add_val(copy(), v.release());
7797 return manage(res);
7798}
7799
7800isl::checked::multi_val multi_val::add(long v) const
7801{
7802 return this->add(isl::checked::val(ctx(), v));
7803}
7804
7805isl::checked::multi_val multi_val::flat_range_product(isl::checked::multi_val multi2) const
7806{
7807 auto res = isl_multi_val_flat_range_product(copy(), multi2.release());
7808 return manage(res);
7809}
7810
7811isl::checked::val multi_val::at(int pos) const
7812{
7813 auto res = isl_multi_val_get_at(get(), pos);
7814 return manage(res);
7815}
7816
7817isl::checked::val multi_val::get_at(int pos) const
7818{
7819 return at(pos);
7820}
7821
7822isl::checked::val_list multi_val::list() const
7823{
7824 auto res = isl_multi_val_get_list(get());
7825 return manage(res);
7826}
7827
7828isl::checked::val_list multi_val::get_list() const
7829{
7830 return list();
7831}
7832
7833isl::checked::space multi_val::space() const
7834{
7835 auto res = isl_multi_val_get_space(get());
7836 return manage(res);
7837}
7838
7839isl::checked::space multi_val::get_space() const
7840{
7841 return space();
7842}
7843
7844isl::checked::multi_val multi_val::max(isl::checked::multi_val multi2) const
7845{
7846 auto res = isl_multi_val_max(copy(), multi2.release());
7847 return manage(res);
7848}
7849
7850isl::checked::multi_val multi_val::min(isl::checked::multi_val multi2) const
7851{
7852 auto res = isl_multi_val_min(copy(), multi2.release());
7853 return manage(res);
7854}
7855
7856isl::checked::multi_val multi_val::neg() const
7857{
7858 auto res = isl_multi_val_neg(copy());
7859 return manage(res);
7860}
7861
7862boolean multi_val::plain_is_equal(const isl::checked::multi_val &multi2) const
7863{
7864 auto res = isl_multi_val_plain_is_equal(get(), multi2.get());
7865 return manage(res);
7866}
7867
7868isl::checked::multi_val multi_val::product(isl::checked::multi_val multi2) const
7869{
7870 auto res = isl_multi_val_product(copy(), multi2.release());
7871 return manage(res);
7872}
7873
7874isl::checked::multi_val multi_val::range_product(isl::checked::multi_val multi2) const
7875{
7876 auto res = isl_multi_val_range_product(copy(), multi2.release());
7877 return manage(res);
7878}
7879
7880isl::checked::multi_val multi_val::scale(isl::checked::multi_val mv) const
7881{
7882 auto res = isl_multi_val_scale_multi_val(copy(), mv.release());
7883 return manage(res);
7884}
7885
7886isl::checked::multi_val multi_val::scale(isl::checked::val v) const
7887{
7888 auto res = isl_multi_val_scale_val(copy(), v.release());
7889 return manage(res);
7890}
7891
7892isl::checked::multi_val multi_val::scale(long v) const
7893{
7894 return this->scale(isl::checked::val(ctx(), v));
7895}
7896
7897isl::checked::multi_val multi_val::scale_down(isl::checked::multi_val mv) const
7898{
7899 auto res = isl_multi_val_scale_down_multi_val(copy(), mv.release());
7900 return manage(res);
7901}
7902
7903isl::checked::multi_val multi_val::scale_down(isl::checked::val v) const
7904{
7905 auto res = isl_multi_val_scale_down_val(copy(), v.release());
7906 return manage(res);
7907}
7908
7909isl::checked::multi_val multi_val::scale_down(long v) const
7910{
7911 return this->scale_down(isl::checked::val(ctx(), v));
7912}
7913
7914isl::checked::multi_val multi_val::set_at(int pos, isl::checked::val el) const
7915{
7916 auto res = isl_multi_val_set_at(copy(), pos, el.release());
7917 return manage(res);
7918}
7919
7920isl::checked::multi_val multi_val::set_at(int pos, long el) const
7921{
7922 return this->set_at(pos, isl::checked::val(ctx(), el));
7923}
7924
7925class size multi_val::size() const
7926{
7927 auto res = isl_multi_val_size(get());
7928 return manage(res);
7929}
7930
7931isl::checked::multi_val multi_val::sub(isl::checked::multi_val multi2) const
7932{
7933 auto res = isl_multi_val_sub(copy(), multi2.release());
7934 return manage(res);
7935}
7936
7937isl::checked::multi_val multi_val::zero(isl::checked::space space)
7938{
7939 auto res = isl_multi_val_zero(space.release());
7940 return manage(res);
7941}
7942
7943inline std::ostream &operator<<(std::ostream &os, const multi_val &obj)
7944{
7945 char *str = isl_multi_val_to_str(obj.get());
7946 if (!str) {
7947 os.setstate(std::ios_base::badbit);
7948 return os;
7949 }
7950 os << str;
7951 free(str);
7952 return os;
7953}
7954
7955// implementations for isl::point
7956point manage(__isl_take isl_point *ptr) {
7957 return point(ptr);
7958}
7959point manage_copy(__isl_keep isl_point *ptr) {
7960 ptr = isl_point_copy(ptr);
7961 return point(ptr);
7962}
7963
7964point::point()
7965 : ptr(nullptr) {}
7966
7967point::point(const point &obj)
7968 : ptr(nullptr)
7969{
7970 ptr = obj.copy();
7971}
7972
7973point::point(__isl_take isl_point *ptr)
7974 : ptr(ptr) {}
7975
7976point &point::operator=(point obj) {
7977 std::swap(this->ptr, obj.ptr);
7978 return *this;
7979}
7980
7981point::~point() {
7982 if (ptr)
7983 isl_point_free(ptr);
7984}
7985
7986__isl_give isl_point *point::copy() const & {
7987 return isl_point_copy(ptr);
7988}
7989
7990__isl_keep isl_point *point::get() const {
7991 return ptr;
7992}
7993
7994__isl_give isl_point *point::release() {
7995 isl_point *tmp = ptr;
7996 ptr = nullptr;
7997 return tmp;
7998}
7999
8000bool point::is_null() const {
8001 return ptr == nullptr;
8002}
8003
8004isl::checked::ctx point::ctx() const {
8005 return isl::checked::ctx(isl_point_get_ctx(ptr));
8006}
8007
8008isl::checked::multi_val point::multi_val() const
8009{
8010 auto res = isl_point_get_multi_val(get());
8011 return manage(res);
8012}
8013
8014isl::checked::multi_val point::get_multi_val() const
8015{
8016 return multi_val();
8017}
8018
8019inline std::ostream &operator<<(std::ostream &os, const point &obj)
8020{
8021 char *str = isl_point_to_str(obj.get());
8022 if (!str) {
8023 os.setstate(std::ios_base::badbit);
8024 return os;
8025 }
8026 os << str;
8027 free(str);
8028 return os;
8029}
8030
8031// implementations for isl::pw_aff
8032pw_aff manage(__isl_take isl_pw_aff *ptr) {
8033 return pw_aff(ptr);
8034}
8035pw_aff manage_copy(__isl_keep isl_pw_aff *ptr) {
8036 ptr = isl_pw_aff_copy(ptr);
8037 return pw_aff(ptr);
8038}
8039
8040pw_aff::pw_aff()
8041 : ptr(nullptr) {}
8042
8043pw_aff::pw_aff(const pw_aff &obj)
8044 : ptr(nullptr)
8045{
8046 ptr = obj.copy();
8047}
8048
8049pw_aff::pw_aff(__isl_take isl_pw_aff *ptr)
8050 : ptr(ptr) {}
8051
8052pw_aff::pw_aff(isl::checked::aff aff)
8053{
8054 auto res = isl_pw_aff_from_aff(aff.release());
8055 ptr = res;
8056}
8057
8058pw_aff::pw_aff(isl::checked::ctx ctx, const std::string &str)
8059{
8060 auto res = isl_pw_aff_read_from_str(ctx.release(), str.c_str());
8061 ptr = res;
8062}
8063
8064pw_aff &pw_aff::operator=(pw_aff obj) {
8065 std::swap(this->ptr, obj.ptr);
8066 return *this;
8067}
8068
8069pw_aff::~pw_aff() {
8070 if (ptr)
8071 isl_pw_aff_free(ptr);
8072}
8073
8074__isl_give isl_pw_aff *pw_aff::copy() const & {
8075 return isl_pw_aff_copy(ptr);
8076}
8077
8078__isl_keep isl_pw_aff *pw_aff::get() const {
8079 return ptr;
8080}
8081
8082__isl_give isl_pw_aff *pw_aff::release() {
8083 isl_pw_aff *tmp = ptr;
8084 ptr = nullptr;
8085 return tmp;
8086}
8087
8088bool pw_aff::is_null() const {
8089 return ptr == nullptr;
8090}
8091
8092isl::checked::ctx pw_aff::ctx() const {
8093 return isl::checked::ctx(isl_pw_aff_get_ctx(ptr));
8094}
8095
8096isl::checked::pw_aff pw_aff::add(isl::checked::pw_aff pwaff2) const
8097{
8098 auto res = isl_pw_aff_add(copy(), pwaff2.release());
8099 return manage(res);
8100}
8101
8102isl::checked::pw_aff pw_aff::add_constant(isl::checked::val v) const
8103{
8104 auto res = isl_pw_aff_add_constant_val(copy(), v.release());
8105 return manage(res);
8106}
8107
8108isl::checked::pw_aff pw_aff::add_constant(long v) const
8109{
8110 return this->add_constant(isl::checked::val(ctx(), v));
8111}
8112
8113isl::checked::aff pw_aff::as_aff() const
8114{
8115 auto res = isl_pw_aff_as_aff(copy());
8116 return manage(res);
8117}
8118
8119isl::checked::set pw_aff::bind(isl::checked::id id) const
8120{
8121 auto res = isl_pw_aff_bind_id(copy(), id.release());
8122 return manage(res);
8123}
8124
8125isl::checked::set pw_aff::bind(const std::string &id) const
8126{
8127 return this->bind(isl::checked::id(ctx(), id));
8128}
8129
8130isl::checked::pw_aff pw_aff::bind_domain(isl::checked::multi_id tuple) const
8131{
8132 auto res = isl_pw_aff_bind_domain(copy(), tuple.release());
8133 return manage(res);
8134}
8135
8136isl::checked::pw_aff pw_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
8137{
8138 auto res = isl_pw_aff_bind_domain_wrapped_domain(copy(), tuple.release());
8139 return manage(res);
8140}
8141
8142isl::checked::pw_aff pw_aff::ceil() const
8143{
8144 auto res = isl_pw_aff_ceil(copy());
8145 return manage(res);
8146}
8147
8148isl::checked::pw_aff pw_aff::coalesce() const
8149{
8150 auto res = isl_pw_aff_coalesce(copy());
8151 return manage(res);
8152}
8153
8154isl::checked::pw_aff pw_aff::cond(isl::checked::pw_aff pwaff_true, isl::checked::pw_aff pwaff_false) const
8155{
8156 auto res = isl_pw_aff_cond(copy(), pwaff_true.release(), pwaff_false.release());
8157 return manage(res);
8158}
8159
8160isl::checked::pw_aff pw_aff::div(isl::checked::pw_aff pa2) const
8161{
8162 auto res = isl_pw_aff_div(copy(), pa2.release());
8163 return manage(res);
8164}
8165
8166isl::checked::set pw_aff::domain() const
8167{
8168 auto res = isl_pw_aff_domain(copy());
8169 return manage(res);
8170}
8171
8172isl::checked::set pw_aff::eq_set(isl::checked::pw_aff pwaff2) const
8173{
8174 auto res = isl_pw_aff_eq_set(copy(), pwaff2.release());
8175 return manage(res);
8176}
8177
8178isl::checked::val pw_aff::eval(isl::checked::point pnt) const
8179{
8180 auto res = isl_pw_aff_eval(copy(), pnt.release());
8181 return manage(res);
8182}
8183
8184isl::checked::pw_aff pw_aff::floor() const
8185{
8186 auto res = isl_pw_aff_floor(copy());
8187 return manage(res);
8188}
8189
8190isl::checked::set pw_aff::ge_set(isl::checked::pw_aff pwaff2) const
8191{
8192 auto res = isl_pw_aff_ge_set(copy(), pwaff2.release());
8193 return manage(res);
8194}
8195
8196isl::checked::pw_aff pw_aff::gist(isl::checked::set context) const
8197{
8198 auto res = isl_pw_aff_gist(copy(), context.release());
8199 return manage(res);
8200}
8201
8202isl::checked::set pw_aff::gt_set(isl::checked::pw_aff pwaff2) const
8203{
8204 auto res = isl_pw_aff_gt_set(copy(), pwaff2.release());
8205 return manage(res);
8206}
8207
8208isl::checked::pw_aff pw_aff::insert_domain(isl::checked::space domain) const
8209{
8210 auto res = isl_pw_aff_insert_domain(copy(), domain.release());
8211 return manage(res);
8212}
8213
8214isl::checked::pw_aff pw_aff::intersect_domain(isl::checked::set set) const
8215{
8216 auto res = isl_pw_aff_intersect_domain(copy(), set.release());
8217 return manage(res);
8218}
8219
8220isl::checked::pw_aff pw_aff::intersect_params(isl::checked::set set) const
8221{
8222 auto res = isl_pw_aff_intersect_params(copy(), set.release());
8223 return manage(res);
8224}
8225
8226boolean pw_aff::isa_aff() const
8227{
8228 auto res = isl_pw_aff_isa_aff(get());
8229 return manage(res);
8230}
8231
8232isl::checked::set pw_aff::le_set(isl::checked::pw_aff pwaff2) const
8233{
8234 auto res = isl_pw_aff_le_set(copy(), pwaff2.release());
8235 return manage(res);
8236}
8237
8238isl::checked::set pw_aff::lt_set(isl::checked::pw_aff pwaff2) const
8239{
8240 auto res = isl_pw_aff_lt_set(copy(), pwaff2.release());
8241 return manage(res);
8242}
8243
8244isl::checked::pw_aff pw_aff::max(isl::checked::pw_aff pwaff2) const
8245{
8246 auto res = isl_pw_aff_max(copy(), pwaff2.release());
8247 return manage(res);
8248}
8249
8250isl::checked::pw_aff pw_aff::min(isl::checked::pw_aff pwaff2) const
8251{
8252 auto res = isl_pw_aff_min(copy(), pwaff2.release());
8253 return manage(res);
8254}
8255
8256isl::checked::pw_aff pw_aff::mod(isl::checked::val mod) const
8257{
8258 auto res = isl_pw_aff_mod_val(copy(), mod.release());
8259 return manage(res);
8260}
8261
8262isl::checked::pw_aff pw_aff::mod(long mod) const
8263{
8264 return this->mod(isl::checked::val(ctx(), mod));
8265}
8266
8267isl::checked::pw_aff pw_aff::mul(isl::checked::pw_aff pwaff2) const
8268{
8269 auto res = isl_pw_aff_mul(copy(), pwaff2.release());
8270 return manage(res);
8271}
8272
8273isl::checked::set pw_aff::ne_set(isl::checked::pw_aff pwaff2) const
8274{
8275 auto res = isl_pw_aff_ne_set(copy(), pwaff2.release());
8276 return manage(res);
8277}
8278
8279isl::checked::pw_aff pw_aff::neg() const
8280{
8281 auto res = isl_pw_aff_neg(copy());
8282 return manage(res);
8283}
8284
8285isl::checked::pw_aff pw_aff::param_on_domain(isl::checked::set domain, isl::checked::id id)
8286{
8287 auto res = isl_pw_aff_param_on_domain_id(domain.release(), id.release());
8288 return manage(res);
8289}
8290
8291isl::checked::pw_aff pw_aff::pullback(isl::checked::multi_aff ma) const
8292{
8293 auto res = isl_pw_aff_pullback_multi_aff(copy(), ma.release());
8294 return manage(res);
8295}
8296
8297isl::checked::pw_aff pw_aff::pullback(isl::checked::multi_pw_aff mpa) const
8298{
8299 auto res = isl_pw_aff_pullback_multi_pw_aff(copy(), mpa.release());
8300 return manage(res);
8301}
8302
8303isl::checked::pw_aff pw_aff::pullback(isl::checked::pw_multi_aff pma) const
8304{
8305 auto res = isl_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
8306 return manage(res);
8307}
8308
8309isl::checked::pw_aff pw_aff::scale(isl::checked::val v) const
8310{
8311 auto res = isl_pw_aff_scale_val(copy(), v.release());
8312 return manage(res);
8313}
8314
8315isl::checked::pw_aff pw_aff::scale(long v) const
8316{
8317 return this->scale(isl::checked::val(ctx(), v));
8318}
8319
8320isl::checked::pw_aff pw_aff::scale_down(isl::checked::val f) const
8321{
8322 auto res = isl_pw_aff_scale_down_val(copy(), f.release());
8323 return manage(res);
8324}
8325
8326isl::checked::pw_aff pw_aff::scale_down(long f) const
8327{
8328 return this->scale_down(isl::checked::val(ctx(), f));
8329}
8330
8331isl::checked::pw_aff pw_aff::sub(isl::checked::pw_aff pwaff2) const
8332{
8333 auto res = isl_pw_aff_sub(copy(), pwaff2.release());
8334 return manage(res);
8335}
8336
8337isl::checked::pw_aff pw_aff::subtract_domain(isl::checked::set set) const
8338{
8339 auto res = isl_pw_aff_subtract_domain(copy(), set.release());
8340 return manage(res);
8341}
8342
8343isl::checked::pw_aff pw_aff::tdiv_q(isl::checked::pw_aff pa2) const
8344{
8345 auto res = isl_pw_aff_tdiv_q(copy(), pa2.release());
8346 return manage(res);
8347}
8348
8349isl::checked::pw_aff pw_aff::tdiv_r(isl::checked::pw_aff pa2) const
8350{
8351 auto res = isl_pw_aff_tdiv_r(copy(), pa2.release());
8352 return manage(res);
8353}
8354
8355isl::checked::pw_aff pw_aff::union_add(isl::checked::pw_aff pwaff2) const
8356{
8357 auto res = isl_pw_aff_union_add(copy(), pwaff2.release());
8358 return manage(res);
8359}
8360
8361inline std::ostream &operator<<(std::ostream &os, const pw_aff &obj)
8362{
8363 char *str = isl_pw_aff_to_str(obj.get());
8364 if (!str) {
8365 os.setstate(std::ios_base::badbit);
8366 return os;
8367 }
8368 os << str;
8369 free(str);
8370 return os;
8371}
8372
8373// implementations for isl::pw_aff_list
8374pw_aff_list manage(__isl_take isl_pw_aff_list *ptr) {
8375 return pw_aff_list(ptr);
8376}
8377pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr) {
8378 ptr = isl_pw_aff_list_copy(ptr);
8379 return pw_aff_list(ptr);
8380}
8381
8382pw_aff_list::pw_aff_list()
8383 : ptr(nullptr) {}
8384
8385pw_aff_list::pw_aff_list(const pw_aff_list &obj)
8386 : ptr(nullptr)
8387{
8388 ptr = obj.copy();
8389}
8390
8391pw_aff_list::pw_aff_list(__isl_take isl_pw_aff_list *ptr)
8392 : ptr(ptr) {}
8393
8394pw_aff_list::pw_aff_list(isl::checked::ctx ctx, int n)
8395{
8396 auto res = isl_pw_aff_list_alloc(ctx.release(), n);
8397 ptr = res;
8398}
8399
8400pw_aff_list::pw_aff_list(isl::checked::pw_aff el)
8401{
8402 auto res = isl_pw_aff_list_from_pw_aff(el.release());
8403 ptr = res;
8404}
8405
8406pw_aff_list &pw_aff_list::operator=(pw_aff_list obj) {
8407 std::swap(this->ptr, obj.ptr);
8408 return *this;
8409}
8410
8411pw_aff_list::~pw_aff_list() {
8412 if (ptr)
8413 isl_pw_aff_list_free(ptr);
8414}
8415
8416__isl_give isl_pw_aff_list *pw_aff_list::copy() const & {
8417 return isl_pw_aff_list_copy(ptr);
8418}
8419
8420__isl_keep isl_pw_aff_list *pw_aff_list::get() const {
8421 return ptr;
8422}
8423
8424__isl_give isl_pw_aff_list *pw_aff_list::release() {
8425 isl_pw_aff_list *tmp = ptr;
8426 ptr = nullptr;
8427 return tmp;
8428}
8429
8430bool pw_aff_list::is_null() const {
8431 return ptr == nullptr;
8432}
8433
8434isl::checked::ctx pw_aff_list::ctx() const {
8435 return isl::checked::ctx(isl_pw_aff_list_get_ctx(ptr));
8436}
8437
8438isl::checked::pw_aff_list pw_aff_list::add(isl::checked::pw_aff el) const
8439{
8440 auto res = isl_pw_aff_list_add(copy(), el.release());
8441 return manage(res);
8442}
8443
8444isl::checked::pw_aff_list pw_aff_list::clear() const
8445{
8446 auto res = isl_pw_aff_list_clear(copy());
8447 return manage(res);
8448}
8449
8450isl::checked::pw_aff_list pw_aff_list::concat(isl::checked::pw_aff_list list2) const
8451{
8452 auto res = isl_pw_aff_list_concat(copy(), list2.release());
8453 return manage(res);
8454}
8455
8456isl::checked::pw_aff_list pw_aff_list::drop(unsigned int first, unsigned int n) const
8457{
8458 auto res = isl_pw_aff_list_drop(copy(), first, n);
8459 return manage(res);
8460}
8461
8462stat pw_aff_list::foreach(const std::function<stat(isl::checked::pw_aff)> &fn) const
8463{
8464 struct fn_data {
8465 std::function<stat(isl::checked::pw_aff)> func;
8466 } fn_data = { fn };
8467 auto fn_lambda = [](isl_pw_aff *arg_0, void *arg_1) -> isl_stat {
8468 auto *data = static_cast<struct fn_data *>(arg_1);
8469 auto ret = (data->func)(manage(arg_0));
8470 return ret.release();
8471 };
8472 auto res = isl_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
8473 return manage(res);
8474}
8475
8476isl::checked::pw_aff pw_aff_list::at(int index) const
8477{
8478 auto res = isl_pw_aff_list_get_at(get(), index);
8479 return manage(res);
8480}
8481
8482isl::checked::pw_aff pw_aff_list::get_at(int index) const
8483{
8484 return at(index);
8485}
8486
8487isl::checked::pw_aff_list pw_aff_list::insert(unsigned int pos, isl::checked::pw_aff el) const
8488{
8489 auto res = isl_pw_aff_list_insert(copy(), pos, el.release());
8490 return manage(res);
8491}
8492
8493class size pw_aff_list::size() const
8494{
8495 auto res = isl_pw_aff_list_size(get());
8496 return manage(res);
8497}
8498
8499inline std::ostream &operator<<(std::ostream &os, const pw_aff_list &obj)
8500{
8501 char *str = isl_pw_aff_list_to_str(obj.get());
8502 if (!str) {
8503 os.setstate(std::ios_base::badbit);
8504 return os;
8505 }
8506 os << str;
8507 free(str);
8508 return os;
8509}
8510
8511// implementations for isl::pw_multi_aff
8512pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr) {
8513 return pw_multi_aff(ptr);
8514}
8515pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr) {
8516 ptr = isl_pw_multi_aff_copy(ptr);
8517 return pw_multi_aff(ptr);
8518}
8519
8520pw_multi_aff::pw_multi_aff()
8521 : ptr(nullptr) {}
8522
8523pw_multi_aff::pw_multi_aff(const pw_multi_aff &obj)
8524 : ptr(nullptr)
8525{
8526 ptr = obj.copy();
8527}
8528
8529pw_multi_aff::pw_multi_aff(__isl_take isl_pw_multi_aff *ptr)
8530 : ptr(ptr) {}
8531
8532pw_multi_aff::pw_multi_aff(isl::checked::multi_aff ma)
8533{
8534 auto res = isl_pw_multi_aff_from_multi_aff(ma.release());
8535 ptr = res;
8536}
8537
8538pw_multi_aff::pw_multi_aff(isl::checked::pw_aff pa)
8539{
8540 auto res = isl_pw_multi_aff_from_pw_aff(pa.release());
8541 ptr = res;
8542}
8543
8544pw_multi_aff::pw_multi_aff(isl::checked::ctx ctx, const std::string &str)
8545{
8546 auto res = isl_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
8547 ptr = res;
8548}
8549
8550pw_multi_aff &pw_multi_aff::operator=(pw_multi_aff obj) {
8551 std::swap(this->ptr, obj.ptr);
8552 return *this;
8553}
8554
8555pw_multi_aff::~pw_multi_aff() {
8556 if (ptr)
8557 isl_pw_multi_aff_free(ptr);
8558}
8559
8560__isl_give isl_pw_multi_aff *pw_multi_aff::copy() const & {
8561 return isl_pw_multi_aff_copy(ptr);
8562}
8563
8564__isl_keep isl_pw_multi_aff *pw_multi_aff::get() const {
8565 return ptr;
8566}
8567
8568__isl_give isl_pw_multi_aff *pw_multi_aff::release() {
8569 isl_pw_multi_aff *tmp = ptr;
8570 ptr = nullptr;
8571 return tmp;
8572}
8573
8574bool pw_multi_aff::is_null() const {
8575 return ptr == nullptr;
8576}
8577
8578isl::checked::ctx pw_multi_aff::ctx() const {
8579 return isl::checked::ctx(isl_pw_multi_aff_get_ctx(ptr));
8580}
8581
8582isl::checked::pw_multi_aff pw_multi_aff::add(isl::checked::pw_multi_aff pma2) const
8583{
8584 auto res = isl_pw_multi_aff_add(copy(), pma2.release());
8585 return manage(res);
8586}
8587
8588isl::checked::pw_multi_aff pw_multi_aff::add_constant(isl::checked::multi_val mv) const
8589{
8590 auto res = isl_pw_multi_aff_add_constant_multi_val(copy(), mv.release());
8591 return manage(res);
8592}
8593
8594isl::checked::pw_multi_aff pw_multi_aff::add_constant(isl::checked::val v) const
8595{
8596 auto res = isl_pw_multi_aff_add_constant_val(copy(), v.release());
8597 return manage(res);
8598}
8599
8600isl::checked::pw_multi_aff pw_multi_aff::add_constant(long v) const
8601{
8602 return this->add_constant(isl::checked::val(ctx(), v));
8603}
8604
8605isl::checked::multi_aff pw_multi_aff::as_multi_aff() const
8606{
8607 auto res = isl_pw_multi_aff_as_multi_aff(copy());
8608 return manage(res);
8609}
8610
8611isl::checked::pw_multi_aff pw_multi_aff::bind_domain(isl::checked::multi_id tuple) const
8612{
8613 auto res = isl_pw_multi_aff_bind_domain(copy(), tuple.release());
8614 return manage(res);
8615}
8616
8617isl::checked::pw_multi_aff pw_multi_aff::bind_domain_wrapped_domain(isl::checked::multi_id tuple) const
8618{
8619 auto res = isl_pw_multi_aff_bind_domain_wrapped_domain(copy(), tuple.release());
8620 return manage(res);
8621}
8622
8623isl::checked::pw_multi_aff pw_multi_aff::coalesce() const
8624{
8625 auto res = isl_pw_multi_aff_coalesce(copy());
8626 return manage(res);
8627}
8628
8629isl::checked::set pw_multi_aff::domain() const
8630{
8631 auto res = isl_pw_multi_aff_domain(copy());
8632 return manage(res);
8633}
8634
8635isl::checked::pw_multi_aff pw_multi_aff::domain_map(isl::checked::space space)
8636{
8637 auto res = isl_pw_multi_aff_domain_map(space.release());
8638 return manage(res);
8639}
8640
8641isl::checked::pw_multi_aff pw_multi_aff::flat_range_product(isl::checked::pw_multi_aff pma2) const
8642{
8643 auto res = isl_pw_multi_aff_flat_range_product(copy(), pma2.release());
8644 return manage(res);
8645}
8646
8647stat pw_multi_aff::foreach_piece(const std::function<stat(isl::checked::set, isl::checked::multi_aff)> &fn) const
8648{
8649 struct fn_data {
8650 std::function<stat(isl::checked::set, isl::checked::multi_aff)> func;
8651 } fn_data = { fn };
8652 auto fn_lambda = [](isl_set *arg_0, isl_multi_aff *arg_1, void *arg_2) -> isl_stat {
8653 auto *data = static_cast<struct fn_data *>(arg_2);
8654 auto ret = (data->func)(manage(arg_0), manage(arg_1));
8655 return ret.release();
8656 };
8657 auto res = isl_pw_multi_aff_foreach_piece(get(), fn_lambda, &fn_data);
8658 return manage(res);
8659}
8660
8661isl::checked::space pw_multi_aff::space() const
8662{
8663 auto res = isl_pw_multi_aff_get_space(get());
8664 return manage(res);
8665}
8666
8667isl::checked::space pw_multi_aff::get_space() const
8668{
8669 return space();
8670}
8671
8672isl::checked::pw_multi_aff pw_multi_aff::gist(isl::checked::set set) const
8673{
8674 auto res = isl_pw_multi_aff_gist(copy(), set.release());
8675 return manage(res);
8676}
8677
8678isl::checked::pw_multi_aff pw_multi_aff::insert_domain(isl::checked::space domain) const
8679{
8680 auto res = isl_pw_multi_aff_insert_domain(copy(), domain.release());
8681 return manage(res);
8682}
8683
8684isl::checked::pw_multi_aff pw_multi_aff::intersect_domain(isl::checked::set set) const
8685{
8686 auto res = isl_pw_multi_aff_intersect_domain(copy(), set.release());
8687 return manage(res);
8688}
8689
8690isl::checked::pw_multi_aff pw_multi_aff::intersect_params(isl::checked::set set) const
8691{
8692 auto res = isl_pw_multi_aff_intersect_params(copy(), set.release());
8693 return manage(res);
8694}
8695
8696boolean pw_multi_aff::involves_locals() const
8697{
8698 auto res = isl_pw_multi_aff_involves_locals(get());
8699 return manage(res);
8700}
8701
8702boolean pw_multi_aff::isa_multi_aff() const
8703{
8704 auto res = isl_pw_multi_aff_isa_multi_aff(get());
8705 return manage(res);
8706}
8707
8708isl::checked::multi_val pw_multi_aff::max_multi_val() const
8709{
8710 auto res = isl_pw_multi_aff_max_multi_val(copy());
8711 return manage(res);
8712}
8713
8714isl::checked::multi_val pw_multi_aff::min_multi_val() const
8715{
8716 auto res = isl_pw_multi_aff_min_multi_val(copy());
8717 return manage(res);
8718}
8719
8720class size pw_multi_aff::n_piece() const
8721{
8722 auto res = isl_pw_multi_aff_n_piece(get());
8723 return manage(res);
8724}
8725
8726isl::checked::pw_multi_aff pw_multi_aff::product(isl::checked::pw_multi_aff pma2) const
8727{
8728 auto res = isl_pw_multi_aff_product(copy(), pma2.release());
8729 return manage(res);
8730}
8731
8732isl::checked::pw_multi_aff pw_multi_aff::pullback(isl::checked::multi_aff ma) const
8733{
8734 auto res = isl_pw_multi_aff_pullback_multi_aff(copy(), ma.release());
8735 return manage(res);
8736}
8737
8738isl::checked::pw_multi_aff pw_multi_aff::pullback(isl::checked::pw_multi_aff pma2) const
8739{
8740 auto res = isl_pw_multi_aff_pullback_pw_multi_aff(copy(), pma2.release());
8741 return manage(res);
8742}
8743
8744isl::checked::pw_multi_aff pw_multi_aff::range_factor_domain() const
8745{
8746 auto res = isl_pw_multi_aff_range_factor_domain(copy());
8747 return manage(res);
8748}
8749
8750isl::checked::pw_multi_aff pw_multi_aff::range_factor_range() const
8751{
8752 auto res = isl_pw_multi_aff_range_factor_range(copy());
8753 return manage(res);
8754}
8755
8756isl::checked::pw_multi_aff pw_multi_aff::range_map(isl::checked::space space)
8757{
8758 auto res = isl_pw_multi_aff_range_map(space.release());
8759 return manage(res);
8760}
8761
8762isl::checked::pw_multi_aff pw_multi_aff::range_product(isl::checked::pw_multi_aff pma2) const
8763{
8764 auto res = isl_pw_multi_aff_range_product(copy(), pma2.release());
8765 return manage(res);
8766}
8767
8768isl::checked::pw_multi_aff pw_multi_aff::scale(isl::checked::val v) const
8769{
8770 auto res = isl_pw_multi_aff_scale_val(copy(), v.release());
8771 return manage(res);
8772}
8773
8774isl::checked::pw_multi_aff pw_multi_aff::scale(long v) const
8775{
8776 return this->scale(isl::checked::val(ctx(), v));
8777}
8778
8779isl::checked::pw_multi_aff pw_multi_aff::scale_down(isl::checked::val v) const
8780{
8781 auto res = isl_pw_multi_aff_scale_down_val(copy(), v.release());
8782 return manage(res);
8783}
8784
8785isl::checked::pw_multi_aff pw_multi_aff::scale_down(long v) const
8786{
8787 return this->scale_down(isl::checked::val(ctx(), v));
8788}
8789
8790isl::checked::pw_multi_aff pw_multi_aff::sub(isl::checked::pw_multi_aff pma2) const
8791{
8792 auto res = isl_pw_multi_aff_sub(copy(), pma2.release());
8793 return manage(res);
8794}
8795
8796isl::checked::pw_multi_aff pw_multi_aff::subtract_domain(isl::checked::set set) const
8797{
8798 auto res = isl_pw_multi_aff_subtract_domain(copy(), set.release());
8799 return manage(res);
8800}
8801
8802isl::checked::pw_multi_aff pw_multi_aff::union_add(isl::checked::pw_multi_aff pma2) const
8803{
8804 auto res = isl_pw_multi_aff_union_add(copy(), pma2.release());
8805 return manage(res);
8806}
8807
8808isl::checked::pw_multi_aff pw_multi_aff::zero(isl::checked::space space)
8809{
8810 auto res = isl_pw_multi_aff_zero(space.release());
8811 return manage(res);
8812}
8813
8814inline std::ostream &operator<<(std::ostream &os, const pw_multi_aff &obj)
8815{
8816 char *str = isl_pw_multi_aff_to_str(obj.get());
8817 if (!str) {
8818 os.setstate(std::ios_base::badbit);
8819 return os;
8820 }
8821 os << str;
8822 free(str);
8823 return os;
8824}
8825
8826// implementations for isl::pw_multi_aff_list
8827pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr) {
8828 return pw_multi_aff_list(ptr);
8829}
8830pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr) {
8831 ptr = isl_pw_multi_aff_list_copy(ptr);
8832 return pw_multi_aff_list(ptr);
8833}
8834
8835pw_multi_aff_list::pw_multi_aff_list()
8836 : ptr(nullptr) {}
8837
8838pw_multi_aff_list::pw_multi_aff_list(const pw_multi_aff_list &obj)
8839 : ptr(nullptr)
8840{
8841 ptr = obj.copy();
8842}
8843
8844pw_multi_aff_list::pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr)
8845 : ptr(ptr) {}
8846
8847pw_multi_aff_list::pw_multi_aff_list(isl::checked::ctx ctx, int n)
8848{
8849 auto res = isl_pw_multi_aff_list_alloc(ctx.release(), n);
8850 ptr = res;
8851}
8852
8853pw_multi_aff_list::pw_multi_aff_list(isl::checked::pw_multi_aff el)
8854{
8855 auto res = isl_pw_multi_aff_list_from_pw_multi_aff(el.release());
8856 ptr = res;
8857}
8858
8859pw_multi_aff_list &pw_multi_aff_list::operator=(pw_multi_aff_list obj) {
8860 std::swap(this->ptr, obj.ptr);
8861 return *this;
8862}
8863
8864pw_multi_aff_list::~pw_multi_aff_list() {
8865 if (ptr)
8866 isl_pw_multi_aff_list_free(ptr);
8867}
8868
8869__isl_give isl_pw_multi_aff_list *pw_multi_aff_list::copy() const & {
8870 return isl_pw_multi_aff_list_copy(ptr);
8871}
8872
8873__isl_keep isl_pw_multi_aff_list *pw_multi_aff_list::get() const {
8874 return ptr;
8875}
8876
8877__isl_give isl_pw_multi_aff_list *pw_multi_aff_list::release() {
8878 isl_pw_multi_aff_list *tmp = ptr;
8879 ptr = nullptr;
8880 return tmp;
8881}
8882
8883bool pw_multi_aff_list::is_null() const {
8884 return ptr == nullptr;
8885}
8886
8887isl::checked::ctx pw_multi_aff_list::ctx() const {
8888 return isl::checked::ctx(isl_pw_multi_aff_list_get_ctx(ptr));
8889}
8890
8891isl::checked::pw_multi_aff_list pw_multi_aff_list::add(isl::checked::pw_multi_aff el) const
8892{
8893 auto res = isl_pw_multi_aff_list_add(copy(), el.release());
8894 return manage(res);
8895}
8896
8897isl::checked::pw_multi_aff_list pw_multi_aff_list::clear() const
8898{
8899 auto res = isl_pw_multi_aff_list_clear(copy());
8900 return manage(res);
8901}
8902
8903isl::checked::pw_multi_aff_list pw_multi_aff_list::concat(isl::checked::pw_multi_aff_list list2) const
8904{
8905 auto res = isl_pw_multi_aff_list_concat(copy(), list2.release());
8906 return manage(res);
8907}
8908
8909isl::checked::pw_multi_aff_list pw_multi_aff_list::drop(unsigned int first, unsigned int n) const
8910{
8911 auto res = isl_pw_multi_aff_list_drop(copy(), first, n);
8912 return manage(res);
8913}
8914
8915stat pw_multi_aff_list::foreach(const std::function<stat(isl::checked::pw_multi_aff)> &fn) const
8916{
8917 struct fn_data {
8918 std::function<stat(isl::checked::pw_multi_aff)> func;
8919 } fn_data = { fn };
8920 auto fn_lambda = [](isl_pw_multi_aff *arg_0, void *arg_1) -> isl_stat {
8921 auto *data = static_cast<struct fn_data *>(arg_1);
8922 auto ret = (data->func)(manage(arg_0));
8923 return ret.release();
8924 };
8925 auto res = isl_pw_multi_aff_list_foreach(get(), fn_lambda, &fn_data);
8926 return manage(res);
8927}
8928
8929isl::checked::pw_multi_aff pw_multi_aff_list::at(int index) const
8930{
8931 auto res = isl_pw_multi_aff_list_get_at(get(), index);
8932 return manage(res);
8933}
8934
8935isl::checked::pw_multi_aff pw_multi_aff_list::get_at(int index) const
8936{
8937 return at(index);
8938}
8939
8940isl::checked::pw_multi_aff_list pw_multi_aff_list::insert(unsigned int pos, isl::checked::pw_multi_aff el) const
8941{
8942 auto res = isl_pw_multi_aff_list_insert(copy(), pos, el.release());
8943 return manage(res);
8944}
8945
8946class size pw_multi_aff_list::size() const
8947{
8948 auto res = isl_pw_multi_aff_list_size(get());
8949 return manage(res);
8950}
8951
8952inline std::ostream &operator<<(std::ostream &os, const pw_multi_aff_list &obj)
8953{
8954 char *str = isl_pw_multi_aff_list_to_str(obj.get());
8955 if (!str) {
8956 os.setstate(std::ios_base::badbit);
8957 return os;
8958 }
8959 os << str;
8960 free(str);
8961 return os;
8962}
8963
8964// implementations for isl::schedule
8965schedule manage(__isl_take isl_schedule *ptr) {
8966 return schedule(ptr);
8967}
8968schedule manage_copy(__isl_keep isl_schedule *ptr) {
8969 ptr = isl_schedule_copy(ptr);
8970 return schedule(ptr);
8971}
8972
8973schedule::schedule()
8974 : ptr(nullptr) {}
8975
8976schedule::schedule(const schedule &obj)
8977 : ptr(nullptr)
8978{
8979 ptr = obj.copy();
8980}
8981
8982schedule::schedule(__isl_take isl_schedule *ptr)
8983 : ptr(ptr) {}
8984
8985schedule::schedule(isl::checked::ctx ctx, const std::string &str)
8986{
8987 auto res = isl_schedule_read_from_str(ctx.release(), str.c_str());
8988 ptr = res;
8989}
8990
8991schedule &schedule::operator=(schedule obj) {
8992 std::swap(this->ptr, obj.ptr);
8993 return *this;
8994}
8995
8996schedule::~schedule() {
8997 if (ptr)
8998 isl_schedule_free(ptr);
8999}
9000
9001__isl_give isl_schedule *schedule::copy() const & {
9002 return isl_schedule_copy(ptr);
9003}
9004
9005__isl_keep isl_schedule *schedule::get() const {
9006 return ptr;
9007}
9008
9009__isl_give isl_schedule *schedule::release() {
9010 isl_schedule *tmp = ptr;
9011 ptr = nullptr;
9012 return tmp;
9013}
9014
9015bool schedule::is_null() const {
9016 return ptr == nullptr;
9017}
9018
9019isl::checked::ctx schedule::ctx() const {
9020 return isl::checked::ctx(isl_schedule_get_ctx(ptr));
9021}
9022
9023isl::checked::schedule schedule::from_domain(isl::checked::union_set domain)
9024{
9025 auto res = isl_schedule_from_domain(domain.release());
9026 return manage(res);
9027}
9028
9029isl::checked::union_map schedule::map() const
9030{
9031 auto res = isl_schedule_get_map(get());
9032 return manage(res);
9033}
9034
9035isl::checked::union_map schedule::get_map() const
9036{
9037 return map();
9038}
9039
9040isl::checked::schedule_node schedule::root() const
9041{
9042 auto res = isl_schedule_get_root(get());
9043 return manage(res);
9044}
9045
9046isl::checked::schedule_node schedule::get_root() const
9047{
9048 return root();
9049}
9050
9051isl::checked::schedule schedule::pullback(isl::checked::union_pw_multi_aff upma) const
9052{
9053 auto res = isl_schedule_pullback_union_pw_multi_aff(copy(), upma.release());
9054 return manage(res);
9055}
9056
9057inline std::ostream &operator<<(std::ostream &os, const schedule &obj)
9058{
9059 char *str = isl_schedule_to_str(obj.get());
9060 if (!str) {
9061 os.setstate(std::ios_base::badbit);
9062 return os;
9063 }
9064 os << str;
9065 free(str);
9066 return os;
9067}
9068
9069// implementations for isl::schedule_constraints
9070schedule_constraints manage(__isl_take isl_schedule_constraints *ptr) {
9071 return schedule_constraints(ptr);
9072}
9073schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr) {
9074 ptr = isl_schedule_constraints_copy(ptr);
9075 return schedule_constraints(ptr);
9076}
9077
9078schedule_constraints::schedule_constraints()
9079 : ptr(nullptr) {}
9080
9081schedule_constraints::schedule_constraints(const schedule_constraints &obj)
9082 : ptr(nullptr)
9083{
9084 ptr = obj.copy();
9085}
9086
9087schedule_constraints::schedule_constraints(__isl_take isl_schedule_constraints *ptr)
9088 : ptr(ptr) {}
9089
9090schedule_constraints::schedule_constraints(isl::checked::ctx ctx, const std::string &str)
9091{
9092 auto res = isl_schedule_constraints_read_from_str(ctx.release(), str.c_str());
9093 ptr = res;
9094}
9095
9096schedule_constraints &schedule_constraints::operator=(schedule_constraints obj) {
9097 std::swap(this->ptr, obj.ptr);
9098 return *this;
9099}
9100
9101schedule_constraints::~schedule_constraints() {
9102 if (ptr)
9103 isl_schedule_constraints_free(ptr);
9104}
9105
9106__isl_give isl_schedule_constraints *schedule_constraints::copy() const & {
9107 return isl_schedule_constraints_copy(ptr);
9108}
9109
9110__isl_keep isl_schedule_constraints *schedule_constraints::get() const {
9111 return ptr;
9112}
9113
9114__isl_give isl_schedule_constraints *schedule_constraints::release() {
9115 isl_schedule_constraints *tmp = ptr;
9116 ptr = nullptr;
9117 return tmp;
9118}
9119
9120bool schedule_constraints::is_null() const {
9121 return ptr == nullptr;
9122}
9123
9124isl::checked::ctx schedule_constraints::ctx() const {
9125 return isl::checked::ctx(isl_schedule_constraints_get_ctx(ptr));
9126}
9127
9128isl::checked::schedule schedule_constraints::compute_schedule() const
9129{
9130 auto res = isl_schedule_constraints_compute_schedule(copy());
9131 return manage(res);
9132}
9133
9134isl::checked::union_map schedule_constraints::coincidence() const
9135{
9136 auto res = isl_schedule_constraints_get_coincidence(get());
9137 return manage(res);
9138}
9139
9140isl::checked::union_map schedule_constraints::get_coincidence() const
9141{
9142 return coincidence();
9143}
9144
9145isl::checked::union_map schedule_constraints::conditional_validity() const
9146{
9147 auto res = isl_schedule_constraints_get_conditional_validity(get());
9148 return manage(res);
9149}
9150
9151isl::checked::union_map schedule_constraints::get_conditional_validity() const
9152{
9153 return conditional_validity();
9154}
9155
9156isl::checked::union_map schedule_constraints::conditional_validity_condition() const
9157{
9158 auto res = isl_schedule_constraints_get_conditional_validity_condition(get());
9159 return manage(res);
9160}
9161
9162isl::checked::union_map schedule_constraints::get_conditional_validity_condition() const
9163{
9164 return conditional_validity_condition();
9165}
9166
9167isl::checked::set schedule_constraints::context() const
9168{
9169 auto res = isl_schedule_constraints_get_context(get());
9170 return manage(res);
9171}
9172
9173isl::checked::set schedule_constraints::get_context() const
9174{
9175 return context();
9176}
9177
9178isl::checked::union_set schedule_constraints::domain() const
9179{
9180 auto res = isl_schedule_constraints_get_domain(get());
9181 return manage(res);
9182}
9183
9184isl::checked::union_set schedule_constraints::get_domain() const
9185{
9186 return domain();
9187}
9188
9189isl::checked::union_map schedule_constraints::proximity() const
9190{
9191 auto res = isl_schedule_constraints_get_proximity(get());
9192 return manage(res);
9193}
9194
9195isl::checked::union_map schedule_constraints::get_proximity() const
9196{
9197 return proximity();
9198}
9199
9200isl::checked::union_map schedule_constraints::validity() const
9201{
9202 auto res = isl_schedule_constraints_get_validity(get());
9203 return manage(res);
9204}
9205
9206isl::checked::union_map schedule_constraints::get_validity() const
9207{
9208 return validity();
9209}
9210
9211isl::checked::schedule_constraints schedule_constraints::on_domain(isl::checked::union_set domain)
9212{
9213 auto res = isl_schedule_constraints_on_domain(domain.release());
9214 return manage(res);
9215}
9216
9217isl::checked::schedule_constraints schedule_constraints::set_coincidence(isl::checked::union_map coincidence) const
9218{
9219 auto res = isl_schedule_constraints_set_coincidence(copy(), coincidence.release());
9220 return manage(res);
9221}
9222
9223isl::checked::schedule_constraints schedule_constraints::set_conditional_validity(isl::checked::union_map condition, isl::checked::union_map validity) const
9224{
9225 auto res = isl_schedule_constraints_set_conditional_validity(copy(), condition.release(), validity.release());
9226 return manage(res);
9227}
9228
9229isl::checked::schedule_constraints schedule_constraints::set_context(isl::checked::set context) const
9230{
9231 auto res = isl_schedule_constraints_set_context(copy(), context.release());
9232 return manage(res);
9233}
9234
9235isl::checked::schedule_constraints schedule_constraints::set_proximity(isl::checked::union_map proximity) const
9236{
9237 auto res = isl_schedule_constraints_set_proximity(copy(), proximity.release());
9238 return manage(res);
9239}
9240
9241isl::checked::schedule_constraints schedule_constraints::set_validity(isl::checked::union_map validity) const
9242{
9243 auto res = isl_schedule_constraints_set_validity(copy(), validity.release());
9244 return manage(res);
9245}
9246
9247inline std::ostream &operator<<(std::ostream &os, const schedule_constraints &obj)
9248{
9249 char *str = isl_schedule_constraints_to_str(obj.get());
9250 if (!str) {
9251 os.setstate(std::ios_base::badbit);
9252 return os;
9253 }
9254 os << str;
9255 free(str);
9256 return os;
9257}
9258
9259// implementations for isl::schedule_node
9260schedule_node manage(__isl_take isl_schedule_node *ptr) {
9261 return schedule_node(ptr);
9262}
9263schedule_node manage_copy(__isl_keep isl_schedule_node *ptr) {
9264 ptr = isl_schedule_node_copy(ptr);
9265 return schedule_node(ptr);
9266}
9267
9268schedule_node::schedule_node()
9269 : ptr(nullptr) {}
9270
9271schedule_node::schedule_node(const schedule_node &obj)
9272 : ptr(nullptr)
9273{
9274 ptr = obj.copy();
9275}
9276
9277schedule_node::schedule_node(__isl_take isl_schedule_node *ptr)
9278 : ptr(ptr) {}
9279
9280schedule_node &schedule_node::operator=(schedule_node obj) {
9281 std::swap(this->ptr, obj.ptr);
9282 return *this;
9283}
9284
9285schedule_node::~schedule_node() {
9286 if (ptr)
9287 isl_schedule_node_free(ptr);
9288}
9289
9290__isl_give isl_schedule_node *schedule_node::copy() const & {
9291 return isl_schedule_node_copy(ptr);
9292}
9293
9294__isl_keep isl_schedule_node *schedule_node::get() const {
9295 return ptr;
9296}
9297
9298__isl_give isl_schedule_node *schedule_node::release() {
9299 isl_schedule_node *tmp = ptr;
9300 ptr = nullptr;
9301 return tmp;
9302}
9303
9304bool schedule_node::is_null() const {
9305 return ptr == nullptr;
9306}
9307
9308template <typename T, typename>
9309boolean schedule_node::isa_type(T subtype) const
9310{
9311 if (is_null())
9312 return boolean();
9313 return isl_schedule_node_get_type(get()) == subtype;
9314}
9315template <class T>
9316boolean schedule_node::isa() const
9317{
9318 return isa_type<decltype(T::type)>(T::type);
9319}
9320template <class T>
9321T schedule_node::as() const
9322{
9323 if (isa<T>().is_false())
9324 isl_die(ctx().get(), isl_error_invalid, "not an object of the requested subtype", return T());
9325 return T(copy());
9326}
9327
9328isl::checked::ctx schedule_node::ctx() const {
9329 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9330}
9331
9332isl::checked::schedule_node schedule_node::ancestor(int generation) const
9333{
9334 auto res = isl_schedule_node_ancestor(copy(), generation);
9335 return manage(res);
9336}
9337
9338isl::checked::schedule_node schedule_node::child(int pos) const
9339{
9340 auto res = isl_schedule_node_child(copy(), pos);
9341 return manage(res);
9342}
9343
9344boolean schedule_node::every_descendant(const std::function<boolean(isl::checked::schedule_node)> &test) const
9345{
9346 struct test_data {
9347 std::function<boolean(isl::checked::schedule_node)> func;
9348 } test_data = { test };
9349 auto test_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_bool {
9350 auto *data = static_cast<struct test_data *>(arg_1);
9351 auto ret = (data->func)(manage_copy(arg_0));
9352 return ret.release();
9353 };
9354 auto res = isl_schedule_node_every_descendant(get(), test_lambda, &test_data);
9355 return manage(res);
9356}
9357
9358isl::checked::schedule_node schedule_node::first_child() const
9359{
9360 auto res = isl_schedule_node_first_child(copy());
9361 return manage(res);
9362}
9363
9364stat schedule_node::foreach_ancestor_top_down(const std::function<stat(isl::checked::schedule_node)> &fn) const
9365{
9366 struct fn_data {
9367 std::function<stat(isl::checked::schedule_node)> func;
9368 } fn_data = { fn };
9369 auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_stat {
9370 auto *data = static_cast<struct fn_data *>(arg_1);
9371 auto ret = (data->func)(manage_copy(arg_0));
9372 return ret.release();
9373 };
9374 auto res = isl_schedule_node_foreach_ancestor_top_down(get(), fn_lambda, &fn_data);
9375 return manage(res);
9376}
9377
9378stat schedule_node::foreach_descendant_top_down(const std::function<boolean(isl::checked::schedule_node)> &fn) const
9379{
9380 struct fn_data {
9381 std::function<boolean(isl::checked::schedule_node)> func;
9382 } fn_data = { fn };
9383 auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_bool {
9384 auto *data = static_cast<struct fn_data *>(arg_1);
9385 auto ret = (data->func)(manage_copy(arg_0));
9386 return ret.release();
9387 };
9388 auto res = isl_schedule_node_foreach_descendant_top_down(get(), fn_lambda, &fn_data);
9389 return manage(res);
9390}
9391
9392isl::checked::schedule_node schedule_node::from_domain(isl::checked::union_set domain)
9393{
9394 auto res = isl_schedule_node_from_domain(domain.release());
9395 return manage(res);
9396}
9397
9398isl::checked::schedule_node schedule_node::from_extension(isl::checked::union_map extension)
9399{
9400 auto res = isl_schedule_node_from_extension(extension.release());
9401 return manage(res);
9402}
9403
9404class size schedule_node::ancestor_child_position(const isl::checked::schedule_node &ancestor) const
9405{
9406 auto res = isl_schedule_node_get_ancestor_child_position(get(), ancestor.get());
9407 return manage(res);
9408}
9409
9410class size schedule_node::get_ancestor_child_position(const isl::checked::schedule_node &ancestor) const
9411{
9412 return ancestor_child_position(ancestor);
9413}
9414
9415class size schedule_node::child_position() const
9416{
9417 auto res = isl_schedule_node_get_child_position(get());
9418 return manage(res);
9419}
9420
9421class size schedule_node::get_child_position() const
9422{
9423 return child_position();
9424}
9425
9426isl::checked::multi_union_pw_aff schedule_node::prefix_schedule_multi_union_pw_aff() const
9427{
9428 auto res = isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(get());
9429 return manage(res);
9430}
9431
9432isl::checked::multi_union_pw_aff schedule_node::get_prefix_schedule_multi_union_pw_aff() const
9433{
9434 return prefix_schedule_multi_union_pw_aff();
9435}
9436
9437isl::checked::union_map schedule_node::prefix_schedule_union_map() const
9438{
9439 auto res = isl_schedule_node_get_prefix_schedule_union_map(get());
9440 return manage(res);
9441}
9442
9443isl::checked::union_map schedule_node::get_prefix_schedule_union_map() const
9444{
9445 return prefix_schedule_union_map();
9446}
9447
9448isl::checked::union_pw_multi_aff schedule_node::prefix_schedule_union_pw_multi_aff() const
9449{
9450 auto res = isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(get());
9451 return manage(res);
9452}
9453
9454isl::checked::union_pw_multi_aff schedule_node::get_prefix_schedule_union_pw_multi_aff() const
9455{
9456 return prefix_schedule_union_pw_multi_aff();
9457}
9458
9459isl::checked::schedule schedule_node::schedule() const
9460{
9461 auto res = isl_schedule_node_get_schedule(get());
9462 return manage(res);
9463}
9464
9465isl::checked::schedule schedule_node::get_schedule() const
9466{
9467 return schedule();
9468}
9469
9470isl::checked::schedule_node schedule_node::shared_ancestor(const isl::checked::schedule_node &node2) const
9471{
9472 auto res = isl_schedule_node_get_shared_ancestor(get(), node2.get());
9473 return manage(res);
9474}
9475
9476isl::checked::schedule_node schedule_node::get_shared_ancestor(const isl::checked::schedule_node &node2) const
9477{
9478 return shared_ancestor(node2);
9479}
9480
9481class size schedule_node::tree_depth() const
9482{
9483 auto res = isl_schedule_node_get_tree_depth(get());
9484 return manage(res);
9485}
9486
9487class size schedule_node::get_tree_depth() const
9488{
9489 return tree_depth();
9490}
9491
9492isl::checked::schedule_node schedule_node::graft_after(isl::checked::schedule_node graft) const
9493{
9494 auto res = isl_schedule_node_graft_after(copy(), graft.release());
9495 return manage(res);
9496}
9497
9498isl::checked::schedule_node schedule_node::graft_before(isl::checked::schedule_node graft) const
9499{
9500 auto res = isl_schedule_node_graft_before(copy(), graft.release());
9501 return manage(res);
9502}
9503
9504boolean schedule_node::has_children() const
9505{
9506 auto res = isl_schedule_node_has_children(get());
9507 return manage(res);
9508}
9509
9510boolean schedule_node::has_next_sibling() const
9511{
9512 auto res = isl_schedule_node_has_next_sibling(get());
9513 return manage(res);
9514}
9515
9516boolean schedule_node::has_parent() const
9517{
9518 auto res = isl_schedule_node_has_parent(get());
9519 return manage(res);
9520}
9521
9522boolean schedule_node::has_previous_sibling() const
9523{
9524 auto res = isl_schedule_node_has_previous_sibling(get());
9525 return manage(res);
9526}
9527
9528isl::checked::schedule_node schedule_node::insert_context(isl::checked::set context) const
9529{
9530 auto res = isl_schedule_node_insert_context(copy(), context.release());
9531 return manage(res);
9532}
9533
9534isl::checked::schedule_node schedule_node::insert_filter(isl::checked::union_set filter) const
9535{
9536 auto res = isl_schedule_node_insert_filter(copy(), filter.release());
9537 return manage(res);
9538}
9539
9540isl::checked::schedule_node schedule_node::insert_guard(isl::checked::set context) const
9541{
9542 auto res = isl_schedule_node_insert_guard(copy(), context.release());
9543 return manage(res);
9544}
9545
9546isl::checked::schedule_node schedule_node::insert_mark(isl::checked::id mark) const
9547{
9548 auto res = isl_schedule_node_insert_mark(copy(), mark.release());
9549 return manage(res);
9550}
9551
9552isl::checked::schedule_node schedule_node::insert_mark(const std::string &mark) const
9553{
9554 return this->insert_mark(isl::checked::id(ctx(), mark));
9555}
9556
9557isl::checked::schedule_node schedule_node::insert_partial_schedule(isl::checked::multi_union_pw_aff schedule) const
9558{
9559 auto res = isl_schedule_node_insert_partial_schedule(copy(), schedule.release());
9560 return manage(res);
9561}
9562
9563isl::checked::schedule_node schedule_node::insert_sequence(isl::checked::union_set_list filters) const
9564{
9565 auto res = isl_schedule_node_insert_sequence(copy(), filters.release());
9566 return manage(res);
9567}
9568
9569isl::checked::schedule_node schedule_node::insert_set(isl::checked::union_set_list filters) const
9570{
9571 auto res = isl_schedule_node_insert_set(copy(), filters.release());
9572 return manage(res);
9573}
9574
9575boolean schedule_node::is_equal(const isl::checked::schedule_node &node2) const
9576{
9577 auto res = isl_schedule_node_is_equal(get(), node2.get());
9578 return manage(res);
9579}
9580
9581boolean schedule_node::is_subtree_anchored() const
9582{
9583 auto res = isl_schedule_node_is_subtree_anchored(get());
9584 return manage(res);
9585}
9586
9587isl::checked::schedule_node schedule_node::map_descendant_bottom_up(const std::function<isl::checked::schedule_node(isl::checked::schedule_node)> &fn) const
9588{
9589 struct fn_data {
9590 std::function<isl::checked::schedule_node(isl::checked::schedule_node)> func;
9591 } fn_data = { fn };
9592 auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_schedule_node * {
9593 auto *data = static_cast<struct fn_data *>(arg_1);
9594 auto ret = (data->func)(manage(arg_0));
9595 return ret.release();
9596 };
9597 auto res = isl_schedule_node_map_descendant_bottom_up(copy(), fn_lambda, &fn_data);
9598 return manage(res);
9599}
9600
9601class size schedule_node::n_children() const
9602{
9603 auto res = isl_schedule_node_n_children(get());
9604 return manage(res);
9605}
9606
9607isl::checked::schedule_node schedule_node::next_sibling() const
9608{
9609 auto res = isl_schedule_node_next_sibling(copy());
9610 return manage(res);
9611}
9612
9613isl::checked::schedule_node schedule_node::order_after(isl::checked::union_set filter) const
9614{
9615 auto res = isl_schedule_node_order_after(copy(), filter.release());
9616 return manage(res);
9617}
9618
9619isl::checked::schedule_node schedule_node::order_before(isl::checked::union_set filter) const
9620{
9621 auto res = isl_schedule_node_order_before(copy(), filter.release());
9622 return manage(res);
9623}
9624
9625isl::checked::schedule_node schedule_node::parent() const
9626{
9627 auto res = isl_schedule_node_parent(copy());
9628 return manage(res);
9629}
9630
9631isl::checked::schedule_node schedule_node::previous_sibling() const
9632{
9633 auto res = isl_schedule_node_previous_sibling(copy());
9634 return manage(res);
9635}
9636
9637isl::checked::schedule_node schedule_node::root() const
9638{
9639 auto res = isl_schedule_node_root(copy());
9640 return manage(res);
9641}
9642
9643inline std::ostream &operator<<(std::ostream &os, const schedule_node &obj)
9644{
9645 char *str = isl_schedule_node_to_str(obj.get());
9646 if (!str) {
9647 os.setstate(std::ios_base::badbit);
9648 return os;
9649 }
9650 os << str;
9651 free(str);
9652 return os;
9653}
9654
9655// implementations for isl::schedule_node_band
9656schedule_node_band::schedule_node_band()
9657 : schedule_node() {}
9658
9659schedule_node_band::schedule_node_band(const schedule_node_band &obj)
9660 : schedule_node(obj)
9661{
9662}
9663
9664schedule_node_band::schedule_node_band(__isl_take isl_schedule_node *ptr)
9665 : schedule_node(ptr) {}
9666
9667schedule_node_band &schedule_node_band::operator=(schedule_node_band obj) {
9668 std::swap(this->ptr, obj.ptr);
9669 return *this;
9670}
9671
9672isl::checked::ctx schedule_node_band::ctx() const {
9673 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9674}
9675
9676isl::checked::union_set schedule_node_band::ast_build_options() const
9677{
9678 auto res = isl_schedule_node_band_get_ast_build_options(get());
9679 return manage(res);
9680}
9681
9682isl::checked::union_set schedule_node_band::get_ast_build_options() const
9683{
9684 return ast_build_options();
9685}
9686
9687isl::checked::set schedule_node_band::ast_isolate_option() const
9688{
9689 auto res = isl_schedule_node_band_get_ast_isolate_option(get());
9690 return manage(res);
9691}
9692
9693isl::checked::set schedule_node_band::get_ast_isolate_option() const
9694{
9695 return ast_isolate_option();
9696}
9697
9698isl::checked::multi_union_pw_aff schedule_node_band::partial_schedule() const
9699{
9700 auto res = isl_schedule_node_band_get_partial_schedule(get());
9701 return manage(res);
9702}
9703
9704isl::checked::multi_union_pw_aff schedule_node_band::get_partial_schedule() const
9705{
9706 return partial_schedule();
9707}
9708
9709boolean schedule_node_band::permutable() const
9710{
9711 auto res = isl_schedule_node_band_get_permutable(get());
9712 return manage(res);
9713}
9714
9715boolean schedule_node_band::get_permutable() const
9716{
9717 return permutable();
9718}
9719
9720boolean schedule_node_band::member_get_coincident(int pos) const
9721{
9722 auto res = isl_schedule_node_band_member_get_coincident(get(), pos);
9723 return manage(res);
9724}
9725
9726schedule_node_band schedule_node_band::member_set_coincident(int pos, int coincident) const
9727{
9728 auto res = isl_schedule_node_band_member_set_coincident(copy(), pos, coincident);
9729 return manage(res).as<schedule_node_band>();
9730}
9731
9732schedule_node_band schedule_node_band::mod(isl::checked::multi_val mv) const
9733{
9734 auto res = isl_schedule_node_band_mod(copy(), mv.release());
9735 return manage(res).as<schedule_node_band>();
9736}
9737
9738class size schedule_node_band::n_member() const
9739{
9740 auto res = isl_schedule_node_band_n_member(get());
9741 return manage(res);
9742}
9743
9744schedule_node_band schedule_node_band::scale(isl::checked::multi_val mv) const
9745{
9746 auto res = isl_schedule_node_band_scale(copy(), mv.release());
9747 return manage(res).as<schedule_node_band>();
9748}
9749
9750schedule_node_band schedule_node_band::scale_down(isl::checked::multi_val mv) const
9751{
9752 auto res = isl_schedule_node_band_scale_down(copy(), mv.release());
9753 return manage(res).as<schedule_node_band>();
9754}
9755
9756schedule_node_band schedule_node_band::set_ast_build_options(isl::checked::union_set options) const
9757{
9758 auto res = isl_schedule_node_band_set_ast_build_options(copy(), options.release());
9759 return manage(res).as<schedule_node_band>();
9760}
9761
9762schedule_node_band schedule_node_band::set_permutable(int permutable) const
9763{
9764 auto res = isl_schedule_node_band_set_permutable(copy(), permutable);
9765 return manage(res).as<schedule_node_band>();
9766}
9767
9768schedule_node_band schedule_node_band::shift(isl::checked::multi_union_pw_aff shift) const
9769{
9770 auto res = isl_schedule_node_band_shift(copy(), shift.release());
9771 return manage(res).as<schedule_node_band>();
9772}
9773
9774schedule_node_band schedule_node_band::split(int pos) const
9775{
9776 auto res = isl_schedule_node_band_split(copy(), pos);
9777 return manage(res).as<schedule_node_band>();
9778}
9779
9780schedule_node_band schedule_node_band::tile(isl::checked::multi_val sizes) const
9781{
9782 auto res = isl_schedule_node_band_tile(copy(), sizes.release());
9783 return manage(res).as<schedule_node_band>();
9784}
9785
9786
9787schedule_node_band schedule_node_band::member_set_ast_loop_default(int pos) const
9788{
9789 auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_default);
9790 return manage(res).as<schedule_node_band>();
9791}
9792
9793
9794schedule_node_band schedule_node_band::member_set_ast_loop_atomic(int pos) const
9795{
9796 auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_atomic);
9797 return manage(res).as<schedule_node_band>();
9798}
9799
9800
9801schedule_node_band schedule_node_band::member_set_ast_loop_unroll(int pos) const
9802{
9803 auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_unroll);
9804 return manage(res).as<schedule_node_band>();
9805}
9806
9807
9808schedule_node_band schedule_node_band::member_set_ast_loop_separate(int pos) const
9809{
9810 auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_separate);
9811 return manage(res).as<schedule_node_band>();
9812}
9813
9814inline std::ostream &operator<<(std::ostream &os, const schedule_node_band &obj)
9815{
9816 char *str = isl_schedule_node_to_str(obj.get());
9817 if (!str) {
9818 os.setstate(std::ios_base::badbit);
9819 return os;
9820 }
9821 os << str;
9822 free(str);
9823 return os;
9824}
9825
9826// implementations for isl::schedule_node_context
9827schedule_node_context::schedule_node_context()
9828 : schedule_node() {}
9829
9830schedule_node_context::schedule_node_context(const schedule_node_context &obj)
9831 : schedule_node(obj)
9832{
9833}
9834
9835schedule_node_context::schedule_node_context(__isl_take isl_schedule_node *ptr)
9836 : schedule_node(ptr) {}
9837
9838schedule_node_context &schedule_node_context::operator=(schedule_node_context obj) {
9839 std::swap(this->ptr, obj.ptr);
9840 return *this;
9841}
9842
9843isl::checked::ctx schedule_node_context::ctx() const {
9844 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9845}
9846
9847isl::checked::set schedule_node_context::context() const
9848{
9849 auto res = isl_schedule_node_context_get_context(get());
9850 return manage(res);
9851}
9852
9853isl::checked::set schedule_node_context::get_context() const
9854{
9855 return context();
9856}
9857
9858inline std::ostream &operator<<(std::ostream &os, const schedule_node_context &obj)
9859{
9860 char *str = isl_schedule_node_to_str(obj.get());
9861 if (!str) {
9862 os.setstate(std::ios_base::badbit);
9863 return os;
9864 }
9865 os << str;
9866 free(str);
9867 return os;
9868}
9869
9870// implementations for isl::schedule_node_domain
9871schedule_node_domain::schedule_node_domain()
9872 : schedule_node() {}
9873
9874schedule_node_domain::schedule_node_domain(const schedule_node_domain &obj)
9875 : schedule_node(obj)
9876{
9877}
9878
9879schedule_node_domain::schedule_node_domain(__isl_take isl_schedule_node *ptr)
9880 : schedule_node(ptr) {}
9881
9882schedule_node_domain &schedule_node_domain::operator=(schedule_node_domain obj) {
9883 std::swap(this->ptr, obj.ptr);
9884 return *this;
9885}
9886
9887isl::checked::ctx schedule_node_domain::ctx() const {
9888 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9889}
9890
9891isl::checked::union_set schedule_node_domain::domain() const
9892{
9893 auto res = isl_schedule_node_domain_get_domain(get());
9894 return manage(res);
9895}
9896
9897isl::checked::union_set schedule_node_domain::get_domain() const
9898{
9899 return domain();
9900}
9901
9902inline std::ostream &operator<<(std::ostream &os, const schedule_node_domain &obj)
9903{
9904 char *str = isl_schedule_node_to_str(obj.get());
9905 if (!str) {
9906 os.setstate(std::ios_base::badbit);
9907 return os;
9908 }
9909 os << str;
9910 free(str);
9911 return os;
9912}
9913
9914// implementations for isl::schedule_node_expansion
9915schedule_node_expansion::schedule_node_expansion()
9916 : schedule_node() {}
9917
9918schedule_node_expansion::schedule_node_expansion(const schedule_node_expansion &obj)
9919 : schedule_node(obj)
9920{
9921}
9922
9923schedule_node_expansion::schedule_node_expansion(__isl_take isl_schedule_node *ptr)
9924 : schedule_node(ptr) {}
9925
9926schedule_node_expansion &schedule_node_expansion::operator=(schedule_node_expansion obj) {
9927 std::swap(this->ptr, obj.ptr);
9928 return *this;
9929}
9930
9931isl::checked::ctx schedule_node_expansion::ctx() const {
9932 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9933}
9934
9935isl::checked::union_pw_multi_aff schedule_node_expansion::contraction() const
9936{
9937 auto res = isl_schedule_node_expansion_get_contraction(get());
9938 return manage(res);
9939}
9940
9941isl::checked::union_pw_multi_aff schedule_node_expansion::get_contraction() const
9942{
9943 return contraction();
9944}
9945
9946isl::checked::union_map schedule_node_expansion::expansion() const
9947{
9948 auto res = isl_schedule_node_expansion_get_expansion(get());
9949 return manage(res);
9950}
9951
9952isl::checked::union_map schedule_node_expansion::get_expansion() const
9953{
9954 return expansion();
9955}
9956
9957inline std::ostream &operator<<(std::ostream &os, const schedule_node_expansion &obj)
9958{
9959 char *str = isl_schedule_node_to_str(obj.get());
9960 if (!str) {
9961 os.setstate(std::ios_base::badbit);
9962 return os;
9963 }
9964 os << str;
9965 free(str);
9966 return os;
9967}
9968
9969// implementations for isl::schedule_node_extension
9970schedule_node_extension::schedule_node_extension()
9971 : schedule_node() {}
9972
9973schedule_node_extension::schedule_node_extension(const schedule_node_extension &obj)
9974 : schedule_node(obj)
9975{
9976}
9977
9978schedule_node_extension::schedule_node_extension(__isl_take isl_schedule_node *ptr)
9979 : schedule_node(ptr) {}
9980
9981schedule_node_extension &schedule_node_extension::operator=(schedule_node_extension obj) {
9982 std::swap(this->ptr, obj.ptr);
9983 return *this;
9984}
9985
9986isl::checked::ctx schedule_node_extension::ctx() const {
9987 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9988}
9989
9990isl::checked::union_map schedule_node_extension::extension() const
9991{
9992 auto res = isl_schedule_node_extension_get_extension(get());
9993 return manage(res);
9994}
9995
9996isl::checked::union_map schedule_node_extension::get_extension() const
9997{
9998 return extension();
9999}
10000
10001inline std::ostream &operator<<(std::ostream &os, const schedule_node_extension &obj)
10002{
10003 char *str = isl_schedule_node_to_str(obj.get());
10004 if (!str) {
10005 os.setstate(std::ios_base::badbit);
10006 return os;
10007 }
10008 os << str;
10009 free(str);
10010 return os;
10011}
10012
10013// implementations for isl::schedule_node_filter
10014schedule_node_filter::schedule_node_filter()
10015 : schedule_node() {}
10016
10017schedule_node_filter::schedule_node_filter(const schedule_node_filter &obj)
10018 : schedule_node(obj)
10019{
10020}
10021
10022schedule_node_filter::schedule_node_filter(__isl_take isl_schedule_node *ptr)
10023 : schedule_node(ptr) {}
10024
10025schedule_node_filter &schedule_node_filter::operator=(schedule_node_filter obj) {
10026 std::swap(this->ptr, obj.ptr);
10027 return *this;
10028}
10029
10030isl::checked::ctx schedule_node_filter::ctx() const {
10031 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10032}
10033
10034isl::checked::union_set schedule_node_filter::filter() const
10035{
10036 auto res = isl_schedule_node_filter_get_filter(get());
10037 return manage(res);
10038}
10039
10040isl::checked::union_set schedule_node_filter::get_filter() const
10041{
10042 return filter();
10043}
10044
10045inline std::ostream &operator<<(std::ostream &os, const schedule_node_filter &obj)
10046{
10047 char *str = isl_schedule_node_to_str(obj.get());
10048 if (!str) {
10049 os.setstate(std::ios_base::badbit);
10050 return os;
10051 }
10052 os << str;
10053 free(str);
10054 return os;
10055}
10056
10057// implementations for isl::schedule_node_guard
10058schedule_node_guard::schedule_node_guard()
10059 : schedule_node() {}
10060
10061schedule_node_guard::schedule_node_guard(const schedule_node_guard &obj)
10062 : schedule_node(obj)
10063{
10064}
10065
10066schedule_node_guard::schedule_node_guard(__isl_take isl_schedule_node *ptr)
10067 : schedule_node(ptr) {}
10068
10069schedule_node_guard &schedule_node_guard::operator=(schedule_node_guard obj) {
10070 std::swap(this->ptr, obj.ptr);
10071 return *this;
10072}
10073
10074isl::checked::ctx schedule_node_guard::ctx() const {
10075 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10076}
10077
10078isl::checked::set schedule_node_guard::guard() const
10079{
10080 auto res = isl_schedule_node_guard_get_guard(get());
10081 return manage(res);
10082}
10083
10084isl::checked::set schedule_node_guard::get_guard() const
10085{
10086 return guard();
10087}
10088
10089inline std::ostream &operator<<(std::ostream &os, const schedule_node_guard &obj)
10090{
10091 char *str = isl_schedule_node_to_str(obj.get());
10092 if (!str) {
10093 os.setstate(std::ios_base::badbit);
10094 return os;
10095 }
10096 os << str;
10097 free(str);
10098 return os;
10099}
10100
10101// implementations for isl::schedule_node_leaf
10102schedule_node_leaf::schedule_node_leaf()
10103 : schedule_node() {}
10104
10105schedule_node_leaf::schedule_node_leaf(const schedule_node_leaf &obj)
10106 : schedule_node(obj)
10107{
10108}
10109
10110schedule_node_leaf::schedule_node_leaf(__isl_take isl_schedule_node *ptr)
10111 : schedule_node(ptr) {}
10112
10113schedule_node_leaf &schedule_node_leaf::operator=(schedule_node_leaf obj) {
10114 std::swap(this->ptr, obj.ptr);
10115 return *this;
10116}
10117
10118isl::checked::ctx schedule_node_leaf::ctx() const {
10119 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10120}
10121
10122inline std::ostream &operator<<(std::ostream &os, const schedule_node_leaf &obj)
10123{
10124 char *str = isl_schedule_node_to_str(obj.get());
10125 if (!str) {
10126 os.setstate(std::ios_base::badbit);
10127 return os;
10128 }
10129 os << str;
10130 free(str);
10131 return os;
10132}
10133
10134// implementations for isl::schedule_node_mark
10135schedule_node_mark::schedule_node_mark()
10136 : schedule_node() {}
10137
10138schedule_node_mark::schedule_node_mark(const schedule_node_mark &obj)
10139 : schedule_node(obj)
10140{
10141}
10142
10143schedule_node_mark::schedule_node_mark(__isl_take isl_schedule_node *ptr)
10144 : schedule_node(ptr) {}
10145
10146schedule_node_mark &schedule_node_mark::operator=(schedule_node_mark obj) {
10147 std::swap(this->ptr, obj.ptr);
10148 return *this;
10149}
10150
10151isl::checked::ctx schedule_node_mark::ctx() const {
10152 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10153}
10154
10155inline std::ostream &operator<<(std::ostream &os, const schedule_node_mark &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_sequence
10168schedule_node_sequence::schedule_node_sequence()
10169 : schedule_node() {}
10170
10171schedule_node_sequence::schedule_node_sequence(const schedule_node_sequence &obj)
10172 : schedule_node(obj)
10173{
10174}
10175
10176schedule_node_sequence::schedule_node_sequence(__isl_take isl_schedule_node *ptr)
10177 : schedule_node(ptr) {}
10178
10179schedule_node_sequence &schedule_node_sequence::operator=(schedule_node_sequence obj) {
10180 std::swap(this->ptr, obj.ptr);
10181 return *this;
10182}
10183
10184isl::checked::ctx schedule_node_sequence::ctx() const {
10185 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10186}
10187
10188inline std::ostream &operator<<(std::ostream &os, const schedule_node_sequence &obj)
10189{
10190 char *str = isl_schedule_node_to_str(obj.get());
10191 if (!str) {
10192 os.setstate(std::ios_base::badbit);
10193 return os;
10194 }
10195 os << str;
10196 free(str);
10197 return os;
10198}
10199
10200// implementations for isl::schedule_node_set
10201schedule_node_set::schedule_node_set()
10202 : schedule_node() {}
10203
10204schedule_node_set::schedule_node_set(const schedule_node_set &obj)
10205 : schedule_node(obj)
10206{
10207}
10208
10209schedule_node_set::schedule_node_set(__isl_take isl_schedule_node *ptr)
10210 : schedule_node(ptr) {}
10211
10212schedule_node_set &schedule_node_set::operator=(schedule_node_set obj) {
10213 std::swap(this->ptr, obj.ptr);
10214 return *this;
10215}
10216
10217isl::checked::ctx schedule_node_set::ctx() const {
10218 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10219}
10220
10221inline std::ostream &operator<<(std::ostream &os, const schedule_node_set &obj)
10222{
10223 char *str = isl_schedule_node_to_str(obj.get());
10224 if (!str) {
10225 os.setstate(std::ios_base::badbit);
10226 return os;
10227 }
10228 os << str;
10229 free(str);
10230 return os;
10231}
10232
10233// implementations for isl::set
10234set manage(__isl_take isl_set *ptr) {
10235 return set(ptr);
10236}
10237set manage_copy(__isl_keep isl_set *ptr) {
10238 ptr = isl_set_copy(ptr);
10239 return set(ptr);
10240}
10241
10242set::set()
10243 : ptr(nullptr) {}
10244
10245set::set(const set &obj)
10246 : ptr(nullptr)
10247{
10248 ptr = obj.copy();
10249}
10250
10251set::set(__isl_take isl_set *ptr)
10252 : ptr(ptr) {}
10253
10254set::set(isl::checked::basic_set bset)
10255{
10256 auto res = isl_set_from_basic_set(bset.release());
10257 ptr = res;
10258}
10259
10260set::set(isl::checked::point pnt)
10261{
10262 auto res = isl_set_from_point(pnt.release());
10263 ptr = res;
10264}
10265
10266set::set(isl::checked::ctx ctx, const std::string &str)
10267{
10268 auto res = isl_set_read_from_str(ctx.release(), str.c_str());
10269 ptr = res;
10270}
10271
10272set &set::operator=(set obj) {
10273 std::swap(this->ptr, obj.ptr);
10274 return *this;
10275}
10276
10277set::~set() {
10278 if (ptr)
10279 isl_set_free(ptr);
10280}
10281
10282__isl_give isl_set *set::copy() const & {
10283 return isl_set_copy(ptr);
10284}
10285
10286__isl_keep isl_set *set::get() const {
10287 return ptr;
10288}
10289
10290__isl_give isl_set *set::release() {
10291 isl_set *tmp = ptr;
10292 ptr = nullptr;
10293 return tmp;
10294}
10295
10296bool set::is_null() const {
10297 return ptr == nullptr;
10298}
10299
10300isl::checked::ctx set::ctx() const {
10301 return isl::checked::ctx(isl_set_get_ctx(ptr));
10302}
10303
10304isl::checked::basic_set set::affine_hull() const
10305{
10306 auto res = isl_set_affine_hull(copy());
10307 return manage(res);
10308}
10309
10310isl::checked::set set::apply(isl::checked::map map) const
10311{
10312 auto res = isl_set_apply(copy(), map.release());
10313 return manage(res);
10314}
10315
10316isl::checked::set set::bind(isl::checked::multi_id tuple) const
10317{
10318 auto res = isl_set_bind(copy(), tuple.release());
10319 return manage(res);
10320}
10321
10322isl::checked::set set::coalesce() const
10323{
10324 auto res = isl_set_coalesce(copy());
10325 return manage(res);
10326}
10327
10328isl::checked::set set::complement() const
10329{
10330 auto res = isl_set_complement(copy());
10331 return manage(res);
10332}
10333
10334isl::checked::set set::detect_equalities() const
10335{
10336 auto res = isl_set_detect_equalities(copy());
10337 return manage(res);
10338}
10339
10340isl::checked::val set::dim_max_val(int pos) const
10341{
10342 auto res = isl_set_dim_max_val(copy(), pos);
10343 return manage(res);
10344}
10345
10346isl::checked::val set::dim_min_val(int pos) const
10347{
10348 auto res = isl_set_dim_min_val(copy(), pos);
10349 return manage(res);
10350}
10351
10352isl::checked::set set::empty(isl::checked::space space)
10353{
10354 auto res = isl_set_empty(space.release());
10355 return manage(res);
10356}
10357
10358isl::checked::set set::flatten() const
10359{
10360 auto res = isl_set_flatten(copy());
10361 return manage(res);
10362}
10363
10364stat set::foreach_basic_set(const std::function<stat(isl::checked::basic_set)> &fn) const
10365{
10366 struct fn_data {
10367 std::function<stat(isl::checked::basic_set)> func;
10368 } fn_data = { fn };
10369 auto fn_lambda = [](isl_basic_set *arg_0, void *arg_1) -> isl_stat {
10370 auto *data = static_cast<struct fn_data *>(arg_1);
10371 auto ret = (data->func)(manage(arg_0));
10372 return ret.release();
10373 };
10374 auto res = isl_set_foreach_basic_set(get(), fn_lambda, &fn_data);
10375 return manage(res);
10376}
10377
10378stat set::foreach_point(const std::function<stat(isl::checked::point)> &fn) const
10379{
10380 struct fn_data {
10381 std::function<stat(isl::checked::point)> func;
10382 } fn_data = { fn };
10383 auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
10384 auto *data = static_cast<struct fn_data *>(arg_1);
10385 auto ret = (data->func)(manage(arg_0));
10386 return ret.release();
10387 };
10388 auto res = isl_set_foreach_point(get(), fn_lambda, &fn_data);
10389 return manage(res);
10390}
10391
10392isl::checked::multi_val set::plain_multi_val_if_fixed() const
10393{
10394 auto res = isl_set_get_plain_multi_val_if_fixed(get());
10395 return manage(res);
10396}
10397
10398isl::checked::multi_val set::get_plain_multi_val_if_fixed() const
10399{
10400 return plain_multi_val_if_fixed();
10401}
10402
10403isl::checked::fixed_box set::simple_fixed_box_hull() const
10404{
10405 auto res = isl_set_get_simple_fixed_box_hull(get());
10406 return manage(res);
10407}
10408
10409isl::checked::fixed_box set::get_simple_fixed_box_hull() const
10410{
10411 return simple_fixed_box_hull();
10412}
10413
10414isl::checked::space set::space() const
10415{
10416 auto res = isl_set_get_space(get());
10417 return manage(res);
10418}
10419
10420isl::checked::space set::get_space() const
10421{
10422 return space();
10423}
10424
10425isl::checked::val set::stride(int pos) const
10426{
10427 auto res = isl_set_get_stride(get(), pos);
10428 return manage(res);
10429}
10430
10431isl::checked::val set::get_stride(int pos) const
10432{
10433 return stride(pos);
10434}
10435
10436isl::checked::set set::gist(isl::checked::set context) const
10437{
10438 auto res = isl_set_gist(copy(), context.release());
10439 return manage(res);
10440}
10441
10442isl::checked::map set::identity() const
10443{
10444 auto res = isl_set_identity(copy());
10445 return manage(res);
10446}
10447
10448isl::checked::pw_aff set::indicator_function() const
10449{
10450 auto res = isl_set_indicator_function(copy());
10451 return manage(res);
10452}
10453
10454isl::checked::map set::insert_domain(isl::checked::space domain) const
10455{
10456 auto res = isl_set_insert_domain(copy(), domain.release());
10457 return manage(res);
10458}
10459
10460isl::checked::set set::intersect(isl::checked::set set2) const
10461{
10462 auto res = isl_set_intersect(copy(), set2.release());
10463 return manage(res);
10464}
10465
10466isl::checked::set set::intersect_params(isl::checked::set params) const
10467{
10468 auto res = isl_set_intersect_params(copy(), params.release());
10469 return manage(res);
10470}
10471
10472boolean set::involves_locals() const
10473{
10474 auto res = isl_set_involves_locals(get());
10475 return manage(res);
10476}
10477
10478boolean set::is_disjoint(const isl::checked::set &set2) const
10479{
10480 auto res = isl_set_is_disjoint(get(), set2.get());
10481 return manage(res);
10482}
10483
10484boolean set::is_empty() const
10485{
10486 auto res = isl_set_is_empty(get());
10487 return manage(res);
10488}
10489
10490boolean set::is_equal(const isl::checked::set &set2) const
10491{
10492 auto res = isl_set_is_equal(get(), set2.get());
10493 return manage(res);
10494}
10495
10496boolean set::is_singleton() const
10497{
10498 auto res = isl_set_is_singleton(get());
10499 return manage(res);
10500}
10501
10502boolean set::is_strict_subset(const isl::checked::set &set2) const
10503{
10504 auto res = isl_set_is_strict_subset(get(), set2.get());
10505 return manage(res);
10506}
10507
10508boolean set::is_subset(const isl::checked::set &set2) const
10509{
10510 auto res = isl_set_is_subset(get(), set2.get());
10511 return manage(res);
10512}
10513
10514boolean set::is_wrapping() const
10515{
10516 auto res = isl_set_is_wrapping(get());
10517 return manage(res);
10518}
10519
10520isl::checked::set set::lexmax() const
10521{
10522 auto res = isl_set_lexmax(copy());
10523 return manage(res);
10524}
10525
10526isl::checked::pw_multi_aff set::lexmax_pw_multi_aff() const
10527{
10528 auto res = isl_set_lexmax_pw_multi_aff(copy());
10529 return manage(res);
10530}
10531
10532isl::checked::set set::lexmin() const
10533{
10534 auto res = isl_set_lexmin(copy());
10535 return manage(res);
10536}
10537
10538isl::checked::pw_multi_aff set::lexmin_pw_multi_aff() const
10539{
10540 auto res = isl_set_lexmin_pw_multi_aff(copy());
10541 return manage(res);
10542}
10543
10544isl::checked::set set::lower_bound(isl::checked::multi_pw_aff lower) const
10545{
10546 auto res = isl_set_lower_bound_multi_pw_aff(copy(), lower.release());
10547 return manage(res);
10548}
10549
10550isl::checked::set set::lower_bound(isl::checked::multi_val lower) const
10551{
10552 auto res = isl_set_lower_bound_multi_val(copy(), lower.release());
10553 return manage(res);
10554}
10555
10556isl::checked::multi_pw_aff set::max_multi_pw_aff() const
10557{
10558 auto res = isl_set_max_multi_pw_aff(copy());
10559 return manage(res);
10560}
10561
10562isl::checked::val set::max_val(const isl::checked::aff &obj) const
10563{
10564 auto res = isl_set_max_val(get(), obj.get());
10565 return manage(res);
10566}
10567
10568isl::checked::multi_pw_aff set::min_multi_pw_aff() const
10569{
10570 auto res = isl_set_min_multi_pw_aff(copy());
10571 return manage(res);
10572}
10573
10574isl::checked::val set::min_val(const isl::checked::aff &obj) const
10575{
10576 auto res = isl_set_min_val(get(), obj.get());
10577 return manage(res);
10578}
10579
10580isl::checked::set set::params() const
10581{
10582 auto res = isl_set_params(copy());
10583 return manage(res);
10584}
10585
10586isl::checked::basic_set set::polyhedral_hull() const
10587{
10588 auto res = isl_set_polyhedral_hull(copy());
10589 return manage(res);
10590}
10591
10592isl::checked::set set::preimage(isl::checked::multi_aff ma) const
10593{
10594 auto res = isl_set_preimage_multi_aff(copy(), ma.release());
10595 return manage(res);
10596}
10597
10598isl::checked::set set::preimage(isl::checked::multi_pw_aff mpa) const
10599{
10600 auto res = isl_set_preimage_multi_pw_aff(copy(), mpa.release());
10601 return manage(res);
10602}
10603
10604isl::checked::set set::preimage(isl::checked::pw_multi_aff pma) const
10605{
10606 auto res = isl_set_preimage_pw_multi_aff(copy(), pma.release());
10607 return manage(res);
10608}
10609
10610isl::checked::set set::product(isl::checked::set set2) const
10611{
10612 auto res = isl_set_product(copy(), set2.release());
10613 return manage(res);
10614}
10615
10616isl::checked::set set::project_out_all_params() const
10617{
10618 auto res = isl_set_project_out_all_params(copy());
10619 return manage(res);
10620}
10621
10622isl::checked::set set::project_out_param(isl::checked::id id) const
10623{
10624 auto res = isl_set_project_out_param_id(copy(), id.release());
10625 return manage(res);
10626}
10627
10628isl::checked::set set::project_out_param(const std::string &id) const
10629{
10630 return this->project_out_param(isl::checked::id(ctx(), id));
10631}
10632
10633isl::checked::set set::project_out_param(isl::checked::id_list list) const
10634{
10635 auto res = isl_set_project_out_param_id_list(copy(), list.release());
10636 return manage(res);
10637}
10638
10639isl::checked::basic_set set::sample() const
10640{
10641 auto res = isl_set_sample(copy());
10642 return manage(res);
10643}
10644
10645isl::checked::point set::sample_point() const
10646{
10647 auto res = isl_set_sample_point(copy());
10648 return manage(res);
10649}
10650
10651isl::checked::set set::subtract(isl::checked::set set2) const
10652{
10653 auto res = isl_set_subtract(copy(), set2.release());
10654 return manage(res);
10655}
10656
10657isl::checked::set set::unbind_params(isl::checked::multi_id tuple) const
10658{
10659 auto res = isl_set_unbind_params(copy(), tuple.release());
10660 return manage(res);
10661}
10662
10663isl::checked::map set::unbind_params_insert_domain(isl::checked::multi_id domain) const
10664{
10665 auto res = isl_set_unbind_params_insert_domain(copy(), domain.release());
10666 return manage(res);
10667}
10668
10669isl::checked::set set::unite(isl::checked::set set2) const
10670{
10671 auto res = isl_set_union(copy(), set2.release());
10672 return manage(res);
10673}
10674
10675isl::checked::set set::universe(isl::checked::space space)
10676{
10677 auto res = isl_set_universe(space.release());
10678 return manage(res);
10679}
10680
10681isl::checked::basic_set set::unshifted_simple_hull() const
10682{
10683 auto res = isl_set_unshifted_simple_hull(copy());
10684 return manage(res);
10685}
10686
10687isl::checked::map set::unwrap() const
10688{
10689 auto res = isl_set_unwrap(copy());
10690 return manage(res);
10691}
10692
10693isl::checked::set set::upper_bound(isl::checked::multi_pw_aff upper) const
10694{
10695 auto res = isl_set_upper_bound_multi_pw_aff(copy(), upper.release());
10696 return manage(res);
10697}
10698
10699isl::checked::set set::upper_bound(isl::checked::multi_val upper) const
10700{
10701 auto res = isl_set_upper_bound_multi_val(copy(), upper.release());
10702 return manage(res);
10703}
10704
10705inline std::ostream &operator<<(std::ostream &os, const set &obj)
10706{
10707 char *str = isl_set_to_str(obj.get());
10708 if (!str) {
10709 os.setstate(std::ios_base::badbit);
10710 return os;
10711 }
10712 os << str;
10713 free(str);
10714 return os;
10715}
10716
10717// implementations for isl::space
10718space manage(__isl_take isl_space *ptr) {
10719 return space(ptr);
10720}
10721space manage_copy(__isl_keep isl_space *ptr) {
10722 ptr = isl_space_copy(ptr);
10723 return space(ptr);
10724}
10725
10726space::space()
10727 : ptr(nullptr) {}
10728
10729space::space(const space &obj)
10730 : ptr(nullptr)
10731{
10732 ptr = obj.copy();
10733}
10734
10735space::space(__isl_take isl_space *ptr)
10736 : ptr(ptr) {}
10737
10738space &space::operator=(space obj) {
10739 std::swap(this->ptr, obj.ptr);
10740 return *this;
10741}
10742
10743space::~space() {
10744 if (ptr)
10745 isl_space_free(ptr);
10746}
10747
10748__isl_give isl_space *space::copy() const & {
10749 return isl_space_copy(ptr);
10750}
10751
10752__isl_keep isl_space *space::get() const {
10753 return ptr;
10754}
10755
10756__isl_give isl_space *space::release() {
10757 isl_space *tmp = ptr;
10758 ptr = nullptr;
10759 return tmp;
10760}
10761
10762bool space::is_null() const {
10763 return ptr == nullptr;
10764}
10765
10766isl::checked::ctx space::ctx() const {
10767 return isl::checked::ctx(isl_space_get_ctx(ptr));
10768}
10769
10770isl::checked::space space::add_named_tuple(isl::checked::id tuple_id, unsigned int dim) const
10771{
10772 auto res = isl_space_add_named_tuple_id_ui(copy(), tuple_id.release(), dim);
10773 return manage(res);
10774}
10775
10776isl::checked::space space::add_named_tuple(const std::string &tuple_id, unsigned int dim) const
10777{
10778 return this->add_named_tuple(isl::checked::id(ctx(), tuple_id), dim);
10779}
10780
10781isl::checked::space space::add_unnamed_tuple(unsigned int dim) const
10782{
10783 auto res = isl_space_add_unnamed_tuple_ui(copy(), dim);
10784 return manage(res);
10785}
10786
10787isl::checked::space space::domain() const
10788{
10789 auto res = isl_space_domain(copy());
10790 return manage(res);
10791}
10792
10793isl::checked::space space::flatten_domain() const
10794{
10795 auto res = isl_space_flatten_domain(copy());
10796 return manage(res);
10797}
10798
10799isl::checked::space space::flatten_range() const
10800{
10801 auto res = isl_space_flatten_range(copy());
10802 return manage(res);
10803}
10804
10805boolean space::is_equal(const isl::checked::space &space2) const
10806{
10807 auto res = isl_space_is_equal(get(), space2.get());
10808 return manage(res);
10809}
10810
10811boolean space::is_wrapping() const
10812{
10813 auto res = isl_space_is_wrapping(get());
10814 return manage(res);
10815}
10816
10817isl::checked::space space::map_from_set() const
10818{
10819 auto res = isl_space_map_from_set(copy());
10820 return manage(res);
10821}
10822
10823isl::checked::space space::params() const
10824{
10825 auto res = isl_space_params(copy());
10826 return manage(res);
10827}
10828
10829isl::checked::space space::range() const
10830{
10831 auto res = isl_space_range(copy());
10832 return manage(res);
10833}
10834
10835isl::checked::space space::unit(isl::checked::ctx ctx)
10836{
10837 auto res = isl_space_unit(ctx.release());
10838 return manage(res);
10839}
10840
10841isl::checked::space space::unwrap() const
10842{
10843 auto res = isl_space_unwrap(copy());
10844 return manage(res);
10845}
10846
10847isl::checked::space space::wrap() const
10848{
10849 auto res = isl_space_wrap(copy());
10850 return manage(res);
10851}
10852
10853inline std::ostream &operator<<(std::ostream &os, const space &obj)
10854{
10855 char *str = isl_space_to_str(obj.get());
10856 if (!str) {
10857 os.setstate(std::ios_base::badbit);
10858 return os;
10859 }
10860 os << str;
10861 free(str);
10862 return os;
10863}
10864
10865// implementations for isl::union_access_info
10866union_access_info manage(__isl_take isl_union_access_info *ptr) {
10867 return union_access_info(ptr);
10868}
10869union_access_info manage_copy(__isl_keep isl_union_access_info *ptr) {
10870 ptr = isl_union_access_info_copy(ptr);
10871 return union_access_info(ptr);
10872}
10873
10874union_access_info::union_access_info()
10875 : ptr(nullptr) {}
10876
10877union_access_info::union_access_info(const union_access_info &obj)
10878 : ptr(nullptr)
10879{
10880 ptr = obj.copy();
10881}
10882
10883union_access_info::union_access_info(__isl_take isl_union_access_info *ptr)
10884 : ptr(ptr) {}
10885
10886union_access_info::union_access_info(isl::checked::union_map sink)
10887{
10888 auto res = isl_union_access_info_from_sink(sink.release());
10889 ptr = res;
10890}
10891
10892union_access_info &union_access_info::operator=(union_access_info obj) {
10893 std::swap(this->ptr, obj.ptr);
10894 return *this;
10895}
10896
10897union_access_info::~union_access_info() {
10898 if (ptr)
10899 isl_union_access_info_free(ptr);
10900}
10901
10902__isl_give isl_union_access_info *union_access_info::copy() const & {
10903 return isl_union_access_info_copy(ptr);
10904}
10905
10906__isl_keep isl_union_access_info *union_access_info::get() const {
10907 return ptr;
10908}
10909
10910__isl_give isl_union_access_info *union_access_info::release() {
10911 isl_union_access_info *tmp = ptr;
10912 ptr = nullptr;
10913 return tmp;
10914}
10915
10916bool union_access_info::is_null() const {
10917 return ptr == nullptr;
10918}
10919
10920isl::checked::ctx union_access_info::ctx() const {
10921 return isl::checked::ctx(isl_union_access_info_get_ctx(ptr));
10922}
10923
10924isl::checked::union_flow union_access_info::compute_flow() const
10925{
10926 auto res = isl_union_access_info_compute_flow(copy());
10927 return manage(res);
10928}
10929
10930isl::checked::union_access_info union_access_info::set_kill(isl::checked::union_map kill) const
10931{
10932 auto res = isl_union_access_info_set_kill(copy(), kill.release());
10933 return manage(res);
10934}
10935
10936isl::checked::union_access_info union_access_info::set_may_source(isl::checked::union_map may_source) const
10937{
10938 auto res = isl_union_access_info_set_may_source(copy(), may_source.release());
10939 return manage(res);
10940}
10941
10942isl::checked::union_access_info union_access_info::set_must_source(isl::checked::union_map must_source) const
10943{
10944 auto res = isl_union_access_info_set_must_source(copy(), must_source.release());
10945 return manage(res);
10946}
10947
10948isl::checked::union_access_info union_access_info::set_schedule(isl::checked::schedule schedule) const
10949{
10950 auto res = isl_union_access_info_set_schedule(copy(), schedule.release());
10951 return manage(res);
10952}
10953
10954isl::checked::union_access_info union_access_info::set_schedule_map(isl::checked::union_map schedule_map) const
10955{
10956 auto res = isl_union_access_info_set_schedule_map(copy(), schedule_map.release());
10957 return manage(res);
10958}
10959
10960inline std::ostream &operator<<(std::ostream &os, const union_access_info &obj)
10961{
10962 char *str = isl_union_access_info_to_str(obj.get());
10963 if (!str) {
10964 os.setstate(std::ios_base::badbit);
10965 return os;
10966 }
10967 os << str;
10968 free(str);
10969 return os;
10970}
10971
10972// implementations for isl::union_flow
10973union_flow manage(__isl_take isl_union_flow *ptr) {
10974 return union_flow(ptr);
10975}
10976union_flow manage_copy(__isl_keep isl_union_flow *ptr) {
10977 ptr = isl_union_flow_copy(ptr);
10978 return union_flow(ptr);
10979}
10980
10981union_flow::union_flow()
10982 : ptr(nullptr) {}
10983
10984union_flow::union_flow(const union_flow &obj)
10985 : ptr(nullptr)
10986{
10987 ptr = obj.copy();
10988}
10989
10990union_flow::union_flow(__isl_take isl_union_flow *ptr)
10991 : ptr(ptr) {}
10992
10993union_flow &union_flow::operator=(union_flow obj) {
10994 std::swap(this->ptr, obj.ptr);
10995 return *this;
10996}
10997
10998union_flow::~union_flow() {
10999 if (ptr)
11000 isl_union_flow_free(ptr);
11001}
11002
11003__isl_give isl_union_flow *union_flow::copy() const & {
11004 return isl_union_flow_copy(ptr);
11005}
11006
11007__isl_keep isl_union_flow *union_flow::get() const {
11008 return ptr;
11009}
11010
11011__isl_give isl_union_flow *union_flow::release() {
11012 isl_union_flow *tmp = ptr;
11013 ptr = nullptr;
11014 return tmp;
11015}
11016
11017bool union_flow::is_null() const {
11018 return ptr == nullptr;
11019}
11020
11021isl::checked::ctx union_flow::ctx() const {
11022 return isl::checked::ctx(isl_union_flow_get_ctx(ptr));
11023}
11024
11025isl::checked::union_map union_flow::full_may_dependence() const
11026{
11027 auto res = isl_union_flow_get_full_may_dependence(get());
11028 return manage(res);
11029}
11030
11031isl::checked::union_map union_flow::get_full_may_dependence() const
11032{
11033 return full_may_dependence();
11034}
11035
11036isl::checked::union_map union_flow::full_must_dependence() const
11037{
11038 auto res = isl_union_flow_get_full_must_dependence(get());
11039 return manage(res);
11040}
11041
11042isl::checked::union_map union_flow::get_full_must_dependence() const
11043{
11044 return full_must_dependence();
11045}
11046
11047isl::checked::union_map union_flow::may_dependence() const
11048{
11049 auto res = isl_union_flow_get_may_dependence(get());
11050 return manage(res);
11051}
11052
11053isl::checked::union_map union_flow::get_may_dependence() const
11054{
11055 return may_dependence();
11056}
11057
11058isl::checked::union_map union_flow::may_no_source() const
11059{
11060 auto res = isl_union_flow_get_may_no_source(get());
11061 return manage(res);
11062}
11063
11064isl::checked::union_map union_flow::get_may_no_source() const
11065{
11066 return may_no_source();
11067}
11068
11069isl::checked::union_map union_flow::must_dependence() const
11070{
11071 auto res = isl_union_flow_get_must_dependence(get());
11072 return manage(res);
11073}
11074
11075isl::checked::union_map union_flow::get_must_dependence() const
11076{
11077 return must_dependence();
11078}
11079
11080isl::checked::union_map union_flow::must_no_source() const
11081{
11082 auto res = isl_union_flow_get_must_no_source(get());
11083 return manage(res);
11084}
11085
11086isl::checked::union_map union_flow::get_must_no_source() const
11087{
11088 return must_no_source();
11089}
11090
11091inline std::ostream &operator<<(std::ostream &os, const union_flow &obj)
11092{
11093 char *str = isl_union_flow_to_str(obj.get());
11094 if (!str) {
11095 os.setstate(std::ios_base::badbit);
11096 return os;
11097 }
11098 os << str;
11099 free(str);
11100 return os;
11101}
11102
11103// implementations for isl::union_map
11104union_map manage(__isl_take isl_union_map *ptr) {
11105 return union_map(ptr);
11106}
11107union_map manage_copy(__isl_keep isl_union_map *ptr) {
11108 ptr = isl_union_map_copy(ptr);
11109 return union_map(ptr);
11110}
11111
11112union_map::union_map()
11113 : ptr(nullptr) {}
11114
11115union_map::union_map(const union_map &obj)
11116 : ptr(nullptr)
11117{
11118 ptr = obj.copy();
11119}
11120
11121union_map::union_map(__isl_take isl_union_map *ptr)
11122 : ptr(ptr) {}
11123
11124union_map::union_map(isl::checked::basic_map bmap)
11125{
11126 auto res = isl_union_map_from_basic_map(bmap.release());
11127 ptr = res;
11128}
11129
11130union_map::union_map(isl::checked::map map)
11131{
11132 auto res = isl_union_map_from_map(map.release());
11133 ptr = res;
11134}
11135
11136union_map::union_map(isl::checked::ctx ctx, const std::string &str)
11137{
11138 auto res = isl_union_map_read_from_str(ctx.release(), str.c_str());
11139 ptr = res;
11140}
11141
11142union_map &union_map::operator=(union_map obj) {
11143 std::swap(this->ptr, obj.ptr);
11144 return *this;
11145}
11146
11147union_map::~union_map() {
11148 if (ptr)
11149 isl_union_map_free(ptr);
11150}
11151
11152__isl_give isl_union_map *union_map::copy() const & {
11153 return isl_union_map_copy(ptr);
11154}
11155
11156__isl_keep isl_union_map *union_map::get() const {
11157 return ptr;
11158}
11159
11160__isl_give isl_union_map *union_map::release() {
11161 isl_union_map *tmp = ptr;
11162 ptr = nullptr;
11163 return tmp;
11164}
11165
11166bool union_map::is_null() const {
11167 return ptr == nullptr;
11168}
11169
11170isl::checked::ctx union_map::ctx() const {
11171 return isl::checked::ctx(isl_union_map_get_ctx(ptr));
11172}
11173
11174isl::checked::union_map union_map::affine_hull() const
11175{
11176 auto res = isl_union_map_affine_hull(copy());
11177 return manage(res);
11178}
11179
11180isl::checked::union_map union_map::apply_domain(isl::checked::union_map umap2) const
11181{
11182 auto res = isl_union_map_apply_domain(copy(), umap2.release());
11183 return manage(res);
11184}
11185
11186isl::checked::union_map union_map::apply_range(isl::checked::union_map umap2) const
11187{
11188 auto res = isl_union_map_apply_range(copy(), umap2.release());
11189 return manage(res);
11190}
11191
11192isl::checked::union_set union_map::bind_range(isl::checked::multi_id tuple) const
11193{
11194 auto res = isl_union_map_bind_range(copy(), tuple.release());
11195 return manage(res);
11196}
11197
11198isl::checked::union_map union_map::coalesce() const
11199{
11200 auto res = isl_union_map_coalesce(copy());
11201 return manage(res);
11202}
11203
11204isl::checked::union_map union_map::compute_divs() const
11205{
11206 auto res = isl_union_map_compute_divs(copy());
11207 return manage(res);
11208}
11209
11210isl::checked::union_map union_map::curry() const
11211{
11212 auto res = isl_union_map_curry(copy());
11213 return manage(res);
11214}
11215
11216isl::checked::union_set union_map::deltas() const
11217{
11218 auto res = isl_union_map_deltas(copy());
11219 return manage(res);
11220}
11221
11222isl::checked::union_map union_map::detect_equalities() const
11223{
11224 auto res = isl_union_map_detect_equalities(copy());
11225 return manage(res);
11226}
11227
11228isl::checked::union_set union_map::domain() const
11229{
11230 auto res = isl_union_map_domain(copy());
11231 return manage(res);
11232}
11233
11234isl::checked::union_map union_map::domain_factor_domain() const
11235{
11236 auto res = isl_union_map_domain_factor_domain(copy());
11237 return manage(res);
11238}
11239
11240isl::checked::union_map union_map::domain_factor_range() const
11241{
11242 auto res = isl_union_map_domain_factor_range(copy());
11243 return manage(res);
11244}
11245
11246isl::checked::union_map union_map::domain_map() const
11247{
11248 auto res = isl_union_map_domain_map(copy());
11249 return manage(res);
11250}
11251
11252isl::checked::union_pw_multi_aff union_map::domain_map_union_pw_multi_aff() const
11253{
11254 auto res = isl_union_map_domain_map_union_pw_multi_aff(copy());
11255 return manage(res);
11256}
11257
11258isl::checked::union_map union_map::domain_product(isl::checked::union_map umap2) const
11259{
11260 auto res = isl_union_map_domain_product(copy(), umap2.release());
11261 return manage(res);
11262}
11263
11264isl::checked::union_map union_map::empty(isl::checked::ctx ctx)
11265{
11266 auto res = isl_union_map_empty_ctx(ctx.release());
11267 return manage(res);
11268}
11269
11270isl::checked::union_map union_map::eq_at(isl::checked::multi_union_pw_aff mupa) const
11271{
11272 auto res = isl_union_map_eq_at_multi_union_pw_aff(copy(), mupa.release());
11273 return manage(res);
11274}
11275
11276boolean union_map::every_map(const std::function<boolean(isl::checked::map)> &test) const
11277{
11278 struct test_data {
11279 std::function<boolean(isl::checked::map)> func;
11280 } test_data = { test };
11281 auto test_lambda = [](isl_map *arg_0, void *arg_1) -> isl_bool {
11282 auto *data = static_cast<struct test_data *>(arg_1);
11283 auto ret = (data->func)(manage_copy(arg_0));
11284 return ret.release();
11285 };
11286 auto res = isl_union_map_every_map(get(), test_lambda, &test_data);
11287 return manage(res);
11288}
11289
11290isl::checked::map union_map::extract_map(isl::checked::space space) const
11291{
11292 auto res = isl_union_map_extract_map(get(), space.release());
11293 return manage(res);
11294}
11295
11296isl::checked::union_map union_map::factor_domain() const
11297{
11298 auto res = isl_union_map_factor_domain(copy());
11299 return manage(res);
11300}
11301
11302isl::checked::union_map union_map::factor_range() const
11303{
11304 auto res = isl_union_map_factor_range(copy());
11305 return manage(res);
11306}
11307
11308isl::checked::union_map union_map::fixed_power(isl::checked::val exp) const
11309{
11310 auto res = isl_union_map_fixed_power_val(copy(), exp.release());
11311 return manage(res);
11312}
11313
11314isl::checked::union_map union_map::fixed_power(long exp) const
11315{
11316 return this->fixed_power(isl::checked::val(ctx(), exp));
11317}
11318
11319stat union_map::foreach_map(const std::function<stat(isl::checked::map)> &fn) const
11320{
11321 struct fn_data {
11322 std::function<stat(isl::checked::map)> func;
11323 } fn_data = { fn };
11324 auto fn_lambda = [](isl_map *arg_0, void *arg_1) -> isl_stat {
11325 auto *data = static_cast<struct fn_data *>(arg_1);
11326 auto ret = (data->func)(manage(arg_0));
11327 return ret.release();
11328 };
11329 auto res = isl_union_map_foreach_map(get(), fn_lambda, &fn_data);
11330 return manage(res);
11331}
11332
11333isl::checked::union_map union_map::from(isl::checked::multi_union_pw_aff mupa)
11334{
11335 auto res = isl_union_map_from_multi_union_pw_aff(mupa.release());
11336 return manage(res);
11337}
11338
11339isl::checked::union_map union_map::from(isl::checked::union_pw_multi_aff upma)
11340{
11341 auto res = isl_union_map_from_union_pw_multi_aff(upma.release());
11342 return manage(res);
11343}
11344
11345isl::checked::union_map union_map::from_domain(isl::checked::union_set uset)
11346{
11347 auto res = isl_union_map_from_domain(uset.release());
11348 return manage(res);
11349}
11350
11351isl::checked::union_map union_map::from_domain_and_range(isl::checked::union_set domain, isl::checked::union_set range)
11352{
11353 auto res = isl_union_map_from_domain_and_range(domain.release(), range.release());
11354 return manage(res);
11355}
11356
11357isl::checked::union_map union_map::from_range(isl::checked::union_set uset)
11358{
11359 auto res = isl_union_map_from_range(uset.release());
11360 return manage(res);
11361}
11362
11363isl::checked::space union_map::space() const
11364{
11365 auto res = isl_union_map_get_space(get());
11366 return manage(res);
11367}
11368
11369isl::checked::space union_map::get_space() const
11370{
11371 return space();
11372}
11373
11374isl::checked::union_map union_map::gist(isl::checked::union_map context) const
11375{
11376 auto res = isl_union_map_gist(copy(), context.release());
11377 return manage(res);
11378}
11379
11380isl::checked::union_map union_map::gist_domain(isl::checked::union_set uset) const
11381{
11382 auto res = isl_union_map_gist_domain(copy(), uset.release());
11383 return manage(res);
11384}
11385
11386isl::checked::union_map union_map::gist_params(isl::checked::set set) const
11387{
11388 auto res = isl_union_map_gist_params(copy(), set.release());
11389 return manage(res);
11390}
11391
11392isl::checked::union_map union_map::gist_range(isl::checked::union_set uset) const
11393{
11394 auto res = isl_union_map_gist_range(copy(), uset.release());
11395 return manage(res);
11396}
11397
11398isl::checked::union_map union_map::intersect(isl::checked::union_map umap2) const
11399{
11400 auto res = isl_union_map_intersect(copy(), umap2.release());
11401 return manage(res);
11402}
11403
11404isl::checked::union_map union_map::intersect_domain(isl::checked::space space) const
11405{
11406 auto res = isl_union_map_intersect_domain_space(copy(), space.release());
11407 return manage(res);
11408}
11409
11410isl::checked::union_map union_map::intersect_domain(isl::checked::union_set uset) const
11411{
11412 auto res = isl_union_map_intersect_domain_union_set(copy(), uset.release());
11413 return manage(res);
11414}
11415
11416isl::checked::union_map union_map::intersect_params(isl::checked::set set) const
11417{
11418 auto res = isl_union_map_intersect_params(copy(), set.release());
11419 return manage(res);
11420}
11421
11422isl::checked::union_map union_map::intersect_range(isl::checked::space space) const
11423{
11424 auto res = isl_union_map_intersect_range_space(copy(), space.release());
11425 return manage(res);
11426}
11427
11428isl::checked::union_map union_map::intersect_range(isl::checked::union_set uset) const
11429{
11430 auto res = isl_union_map_intersect_range_union_set(copy(), uset.release());
11431 return manage(res);
11432}
11433
11434boolean union_map::is_bijective() const
11435{
11436 auto res = isl_union_map_is_bijective(get());
11437 return manage(res);
11438}
11439
11440boolean union_map::is_disjoint(const isl::checked::union_map &umap2) const
11441{
11442 auto res = isl_union_map_is_disjoint(get(), umap2.get());
11443 return manage(res);
11444}
11445
11446boolean union_map::is_empty() const
11447{
11448 auto res = isl_union_map_is_empty(get());
11449 return manage(res);
11450}
11451
11452boolean union_map::is_equal(const isl::checked::union_map &umap2) const
11453{
11454 auto res = isl_union_map_is_equal(get(), umap2.get());
11455 return manage(res);
11456}
11457
11458boolean union_map::is_injective() const
11459{
11460 auto res = isl_union_map_is_injective(get());
11461 return manage(res);
11462}
11463
11464boolean union_map::is_single_valued() const
11465{
11466 auto res = isl_union_map_is_single_valued(get());
11467 return manage(res);
11468}
11469
11470boolean union_map::is_strict_subset(const isl::checked::union_map &umap2) const
11471{
11472 auto res = isl_union_map_is_strict_subset(get(), umap2.get());
11473 return manage(res);
11474}
11475
11476boolean union_map::is_subset(const isl::checked::union_map &umap2) const
11477{
11478 auto res = isl_union_map_is_subset(get(), umap2.get());
11479 return manage(res);
11480}
11481
11482boolean union_map::isa_map() const
11483{
11484 auto res = isl_union_map_isa_map(get());
11485 return manage(res);
11486}
11487
11488isl::checked::union_map union_map::lexmax() const
11489{
11490 auto res = isl_union_map_lexmax(copy());
11491 return manage(res);
11492}
11493
11494isl::checked::union_map union_map::lexmin() const
11495{
11496 auto res = isl_union_map_lexmin(copy());
11497 return manage(res);
11498}
11499
11500isl::checked::union_map union_map::polyhedral_hull() const
11501{
11502 auto res = isl_union_map_polyhedral_hull(copy());
11503 return manage(res);
11504}
11505
11506isl::checked::union_map union_map::preimage_domain(isl::checked::multi_aff ma) const
11507{
11508 auto res = isl_union_map_preimage_domain_multi_aff(copy(), ma.release());
11509 return manage(res);
11510}
11511
11512isl::checked::union_map union_map::preimage_domain(isl::checked::multi_pw_aff mpa) const
11513{
11514 auto res = isl_union_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
11515 return manage(res);
11516}
11517
11518isl::checked::union_map union_map::preimage_domain(isl::checked::pw_multi_aff pma) const
11519{
11520 auto res = isl_union_map_preimage_domain_pw_multi_aff(copy(), pma.release());
11521 return manage(res);
11522}
11523
11524isl::checked::union_map union_map::preimage_domain(isl::checked::union_pw_multi_aff upma) const
11525{
11526 auto res = isl_union_map_preimage_domain_union_pw_multi_aff(copy(), upma.release());
11527 return manage(res);
11528}
11529
11530isl::checked::union_map union_map::preimage_range(isl::checked::multi_aff ma) const
11531{
11532 auto res = isl_union_map_preimage_range_multi_aff(copy(), ma.release());
11533 return manage(res);
11534}
11535
11536isl::checked::union_map union_map::preimage_range(isl::checked::pw_multi_aff pma) const
11537{
11538 auto res = isl_union_map_preimage_range_pw_multi_aff(copy(), pma.release());
11539 return manage(res);
11540}
11541
11542isl::checked::union_map union_map::preimage_range(isl::checked::union_pw_multi_aff upma) const
11543{
11544 auto res = isl_union_map_preimage_range_union_pw_multi_aff(copy(), upma.release());
11545 return manage(res);
11546}
11547
11548isl::checked::union_map union_map::product(isl::checked::union_map umap2) const
11549{
11550 auto res = isl_union_map_product(copy(), umap2.release());
11551 return manage(res);
11552}
11553
11554isl::checked::union_map union_map::project_out_all_params() const
11555{
11556 auto res = isl_union_map_project_out_all_params(copy());
11557 return manage(res);
11558}
11559
11560isl::checked::union_set union_map::range() const
11561{
11562 auto res = isl_union_map_range(copy());
11563 return manage(res);
11564}
11565
11566isl::checked::union_map union_map::range_factor_domain() const
11567{
11568 auto res = isl_union_map_range_factor_domain(copy());
11569 return manage(res);
11570}
11571
11572isl::checked::union_map union_map::range_factor_range() const
11573{
11574 auto res = isl_union_map_range_factor_range(copy());
11575 return manage(res);
11576}
11577
11578isl::checked::union_map union_map::range_map() const
11579{
11580 auto res = isl_union_map_range_map(copy());
11581 return manage(res);
11582}
11583
11584isl::checked::union_map union_map::range_product(isl::checked::union_map umap2) const
11585{
11586 auto res = isl_union_map_range_product(copy(), umap2.release());
11587 return manage(res);
11588}
11589
11590isl::checked::union_map union_map::range_reverse() const
11591{
11592 auto res = isl_union_map_range_reverse(copy());
11593 return manage(res);
11594}
11595
11596isl::checked::union_map union_map::reverse() const
11597{
11598 auto res = isl_union_map_reverse(copy());
11599 return manage(res);
11600}
11601
11602isl::checked::union_map union_map::subtract(isl::checked::union_map umap2) const
11603{
11604 auto res = isl_union_map_subtract(copy(), umap2.release());
11605 return manage(res);
11606}
11607
11608isl::checked::union_map union_map::subtract_domain(isl::checked::union_set dom) const
11609{
11610 auto res = isl_union_map_subtract_domain(copy(), dom.release());
11611 return manage(res);
11612}
11613
11614isl::checked::union_map union_map::subtract_range(isl::checked::union_set dom) const
11615{
11616 auto res = isl_union_map_subtract_range(copy(), dom.release());
11617 return manage(res);
11618}
11619
11620isl::checked::union_map union_map::uncurry() const
11621{
11622 auto res = isl_union_map_uncurry(copy());
11623 return manage(res);
11624}
11625
11626isl::checked::union_map union_map::unite(isl::checked::union_map umap2) const
11627{
11628 auto res = isl_union_map_union(copy(), umap2.release());
11629 return manage(res);
11630}
11631
11632isl::checked::union_map union_map::universe() const
11633{
11634 auto res = isl_union_map_universe(copy());
11635 return manage(res);
11636}
11637
11638isl::checked::union_set union_map::wrap() const
11639{
11640 auto res = isl_union_map_wrap(copy());
11641 return manage(res);
11642}
11643
11644isl::checked::union_map union_map::zip() const
11645{
11646 auto res = isl_union_map_zip(copy());
11647 return manage(res);
11648}
11649
11650inline std::ostream &operator<<(std::ostream &os, const union_map &obj)
11651{
11652 char *str = isl_union_map_to_str(obj.get());
11653 if (!str) {
11654 os.setstate(std::ios_base::badbit);
11655 return os;
11656 }
11657 os << str;
11658 free(str);
11659 return os;
11660}
11661
11662// implementations for isl::union_pw_aff
11663union_pw_aff manage(__isl_take isl_union_pw_aff *ptr) {
11664 return union_pw_aff(ptr);
11665}
11666union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr) {
11667 ptr = isl_union_pw_aff_copy(ptr);
11668 return union_pw_aff(ptr);
11669}
11670
11671union_pw_aff::union_pw_aff()
11672 : ptr(nullptr) {}
11673
11674union_pw_aff::union_pw_aff(const union_pw_aff &obj)
11675 : ptr(nullptr)
11676{
11677 ptr = obj.copy();
11678}
11679
11680union_pw_aff::union_pw_aff(__isl_take isl_union_pw_aff *ptr)
11681 : ptr(ptr) {}
11682
11683union_pw_aff::union_pw_aff(isl::checked::aff aff)
11684{
11685 auto res = isl_union_pw_aff_from_aff(aff.release());
11686 ptr = res;
11687}
11688
11689union_pw_aff::union_pw_aff(isl::checked::pw_aff pa)
11690{
11691 auto res = isl_union_pw_aff_from_pw_aff(pa.release());
11692 ptr = res;
11693}
11694
11695union_pw_aff::union_pw_aff(isl::checked::ctx ctx, const std::string &str)
11696{
11697 auto res = isl_union_pw_aff_read_from_str(ctx.release(), str.c_str());
11698 ptr = res;
11699}
11700
11701union_pw_aff &union_pw_aff::operator=(union_pw_aff obj) {
11702 std::swap(this->ptr, obj.ptr);
11703 return *this;
11704}
11705
11706union_pw_aff::~union_pw_aff() {
11707 if (ptr)
11708 isl_union_pw_aff_free(ptr);
11709}
11710
11711__isl_give isl_union_pw_aff *union_pw_aff::copy() const & {
11712 return isl_union_pw_aff_copy(ptr);
11713}
11714
11715__isl_keep isl_union_pw_aff *union_pw_aff::get() const {
11716 return ptr;
11717}
11718
11719__isl_give isl_union_pw_aff *union_pw_aff::release() {
11720 isl_union_pw_aff *tmp = ptr;
11721 ptr = nullptr;
11722 return tmp;
11723}
11724
11725bool union_pw_aff::is_null() const {
11726 return ptr == nullptr;
11727}
11728
11729isl::checked::ctx union_pw_aff::ctx() const {
11730 return isl::checked::ctx(isl_union_pw_aff_get_ctx(ptr));
11731}
11732
11733isl::checked::union_pw_aff union_pw_aff::add(isl::checked::union_pw_aff upa2) const
11734{
11735 auto res = isl_union_pw_aff_add(copy(), upa2.release());
11736 return manage(res);
11737}
11738
11739isl::checked::union_set union_pw_aff::bind(isl::checked::id id) const
11740{
11741 auto res = isl_union_pw_aff_bind_id(copy(), id.release());
11742 return manage(res);
11743}
11744
11745isl::checked::union_set union_pw_aff::bind(const std::string &id) const
11746{
11747 return this->bind(isl::checked::id(ctx(), id));
11748}
11749
11750isl::checked::union_pw_aff union_pw_aff::coalesce() const
11751{
11752 auto res = isl_union_pw_aff_coalesce(copy());
11753 return manage(res);
11754}
11755
11756isl::checked::union_set union_pw_aff::domain() const
11757{
11758 auto res = isl_union_pw_aff_domain(copy());
11759 return manage(res);
11760}
11761
11762isl::checked::space union_pw_aff::space() const
11763{
11764 auto res = isl_union_pw_aff_get_space(get());
11765 return manage(res);
11766}
11767
11768isl::checked::space union_pw_aff::get_space() const
11769{
11770 return space();
11771}
11772
11773isl::checked::union_pw_aff union_pw_aff::gist(isl::checked::union_set context) const
11774{
11775 auto res = isl_union_pw_aff_gist(copy(), context.release());
11776 return manage(res);
11777}
11778
11779isl::checked::union_pw_aff union_pw_aff::intersect_domain(isl::checked::space space) const
11780{
11781 auto res = isl_union_pw_aff_intersect_domain_space(copy(), space.release());
11782 return manage(res);
11783}
11784
11785isl::checked::union_pw_aff union_pw_aff::intersect_domain(isl::checked::union_set uset) const
11786{
11787 auto res = isl_union_pw_aff_intersect_domain_union_set(copy(), uset.release());
11788 return manage(res);
11789}
11790
11791isl::checked::union_pw_aff union_pw_aff::intersect_domain_wrapped_domain(isl::checked::union_set uset) const
11792{
11793 auto res = isl_union_pw_aff_intersect_domain_wrapped_domain(copy(), uset.release());
11794 return manage(res);
11795}
11796
11797isl::checked::union_pw_aff union_pw_aff::intersect_domain_wrapped_range(isl::checked::union_set uset) const
11798{
11799 auto res = isl_union_pw_aff_intersect_domain_wrapped_range(copy(), uset.release());
11800 return manage(res);
11801}
11802
11803isl::checked::union_pw_aff union_pw_aff::intersect_params(isl::checked::set set) const
11804{
11805 auto res = isl_union_pw_aff_intersect_params(copy(), set.release());
11806 return manage(res);
11807}
11808
11809isl::checked::union_pw_aff union_pw_aff::pullback(isl::checked::union_pw_multi_aff upma) const
11810{
11811 auto res = isl_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
11812 return manage(res);
11813}
11814
11815isl::checked::union_pw_aff union_pw_aff::sub(isl::checked::union_pw_aff upa2) const
11816{
11817 auto res = isl_union_pw_aff_sub(copy(), upa2.release());
11818 return manage(res);
11819}
11820
11821isl::checked::union_pw_aff union_pw_aff::subtract_domain(isl::checked::space space) const
11822{
11823 auto res = isl_union_pw_aff_subtract_domain_space(copy(), space.release());
11824 return manage(res);
11825}
11826
11827isl::checked::union_pw_aff union_pw_aff::subtract_domain(isl::checked::union_set uset) const
11828{
11829 auto res = isl_union_pw_aff_subtract_domain_union_set(copy(), uset.release());
11830 return manage(res);
11831}
11832
11833isl::checked::union_pw_aff union_pw_aff::union_add(isl::checked::union_pw_aff upa2) const
11834{
11835 auto res = isl_union_pw_aff_union_add(copy(), upa2.release());
11836 return manage(res);
11837}
11838
11839inline std::ostream &operator<<(std::ostream &os, const union_pw_aff &obj)
11840{
11841 char *str = isl_union_pw_aff_to_str(obj.get());
11842 if (!str) {
11843 os.setstate(std::ios_base::badbit);
11844 return os;
11845 }
11846 os << str;
11847 free(str);
11848 return os;
11849}
11850
11851// implementations for isl::union_pw_aff_list
11852union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr) {
11853 return union_pw_aff_list(ptr);
11854}
11855union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr) {
11856 ptr = isl_union_pw_aff_list_copy(ptr);
11857 return union_pw_aff_list(ptr);
11858}
11859
11860union_pw_aff_list::union_pw_aff_list()
11861 : ptr(nullptr) {}
11862
11863union_pw_aff_list::union_pw_aff_list(const union_pw_aff_list &obj)
11864 : ptr(nullptr)
11865{
11866 ptr = obj.copy();
11867}
11868
11869union_pw_aff_list::union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr)
11870 : ptr(ptr) {}
11871
11872union_pw_aff_list::union_pw_aff_list(isl::checked::ctx ctx, int n)
11873{
11874 auto res = isl_union_pw_aff_list_alloc(ctx.release(), n);
11875 ptr = res;
11876}
11877
11878union_pw_aff_list::union_pw_aff_list(isl::checked::union_pw_aff el)
11879{
11880 auto res = isl_union_pw_aff_list_from_union_pw_aff(el.release());
11881 ptr = res;
11882}
11883
11884union_pw_aff_list &union_pw_aff_list::operator=(union_pw_aff_list obj) {
11885 std::swap(this->ptr, obj.ptr);
11886 return *this;
11887}
11888
11889union_pw_aff_list::~union_pw_aff_list() {
11890 if (ptr)
11891 isl_union_pw_aff_list_free(ptr);
11892}
11893
11894__isl_give isl_union_pw_aff_list *union_pw_aff_list::copy() const & {
11895 return isl_union_pw_aff_list_copy(ptr);
11896}
11897
11898__isl_keep isl_union_pw_aff_list *union_pw_aff_list::get() const {
11899 return ptr;
11900}
11901
11902__isl_give isl_union_pw_aff_list *union_pw_aff_list::release() {
11903 isl_union_pw_aff_list *tmp = ptr;
11904 ptr = nullptr;
11905 return tmp;
11906}
11907
11908bool union_pw_aff_list::is_null() const {
11909 return ptr == nullptr;
11910}
11911
11912isl::checked::ctx union_pw_aff_list::ctx() const {
11913 return isl::checked::ctx(isl_union_pw_aff_list_get_ctx(ptr));
11914}
11915
11916isl::checked::union_pw_aff_list union_pw_aff_list::add(isl::checked::union_pw_aff el) const
11917{
11918 auto res = isl_union_pw_aff_list_add(copy(), el.release());
11919 return manage(res);
11920}
11921
11922isl::checked::union_pw_aff_list union_pw_aff_list::clear() const
11923{
11924 auto res = isl_union_pw_aff_list_clear(copy());
11925 return manage(res);
11926}
11927
11928isl::checked::union_pw_aff_list union_pw_aff_list::concat(isl::checked::union_pw_aff_list list2) const
11929{
11930 auto res = isl_union_pw_aff_list_concat(copy(), list2.release());
11931 return manage(res);
11932}
11933
11934isl::checked::union_pw_aff_list union_pw_aff_list::drop(unsigned int first, unsigned int n) const
11935{
11936 auto res = isl_union_pw_aff_list_drop(copy(), first, n);
11937 return manage(res);
11938}
11939
11940stat union_pw_aff_list::foreach(const std::function<stat(isl::checked::union_pw_aff)> &fn) const
11941{
11942 struct fn_data {
11943 std::function<stat(isl::checked::union_pw_aff)> func;
11944 } fn_data = { fn };
11945 auto fn_lambda = [](isl_union_pw_aff *arg_0, void *arg_1) -> isl_stat {
11946 auto *data = static_cast<struct fn_data *>(arg_1);
11947 auto ret = (data->func)(manage(arg_0));
11948 return ret.release();
11949 };
11950 auto res = isl_union_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
11951 return manage(res);
11952}
11953
11954isl::checked::union_pw_aff union_pw_aff_list::at(int index) const
11955{
11956 auto res = isl_union_pw_aff_list_get_at(get(), index);
11957 return manage(res);
11958}
11959
11960isl::checked::union_pw_aff union_pw_aff_list::get_at(int index) const
11961{
11962 return at(index);
11963}
11964
11965isl::checked::union_pw_aff_list union_pw_aff_list::insert(unsigned int pos, isl::checked::union_pw_aff el) const
11966{
11967 auto res = isl_union_pw_aff_list_insert(copy(), pos, el.release());
11968 return manage(res);
11969}
11970
11971class size union_pw_aff_list::size() const
11972{
11973 auto res = isl_union_pw_aff_list_size(get());
11974 return manage(res);
11975}
11976
11977inline std::ostream &operator<<(std::ostream &os, const union_pw_aff_list &obj)
11978{
11979 char *str = isl_union_pw_aff_list_to_str(obj.get());
11980 if (!str) {
11981 os.setstate(std::ios_base::badbit);
11982 return os;
11983 }
11984 os << str;
11985 free(str);
11986 return os;
11987}
11988
11989// implementations for isl::union_pw_multi_aff
11990union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr) {
11991 return union_pw_multi_aff(ptr);
11992}
11993union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr) {
11994 ptr = isl_union_pw_multi_aff_copy(ptr);
11995 return union_pw_multi_aff(ptr);
11996}
11997
11998union_pw_multi_aff::union_pw_multi_aff()
11999 : ptr(nullptr) {}
12000
12001union_pw_multi_aff::union_pw_multi_aff(const union_pw_multi_aff &obj)
12002 : ptr(nullptr)
12003{
12004 ptr = obj.copy();
12005}
12006
12007union_pw_multi_aff::union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr)
12008 : ptr(ptr) {}
12009
12010union_pw_multi_aff::union_pw_multi_aff(isl::checked::multi_aff ma)
12011{
12012 auto res = isl_union_pw_multi_aff_from_multi_aff(ma.release());
12013 ptr = res;
12014}
12015
12016union_pw_multi_aff::union_pw_multi_aff(isl::checked::pw_multi_aff pma)
12017{
12018 auto res = isl_union_pw_multi_aff_from_pw_multi_aff(pma.release());
12019 ptr = res;
12020}
12021
12022union_pw_multi_aff::union_pw_multi_aff(isl::checked::union_pw_aff upa)
12023{
12024 auto res = isl_union_pw_multi_aff_from_union_pw_aff(upa.release());
12025 ptr = res;
12026}
12027
12028union_pw_multi_aff::union_pw_multi_aff(isl::checked::ctx ctx, const std::string &str)
12029{
12030 auto res = isl_union_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
12031 ptr = res;
12032}
12033
12034union_pw_multi_aff &union_pw_multi_aff::operator=(union_pw_multi_aff obj) {
12035 std::swap(this->ptr, obj.ptr);
12036 return *this;
12037}
12038
12039union_pw_multi_aff::~union_pw_multi_aff() {
12040 if (ptr)
12041 isl_union_pw_multi_aff_free(ptr);
12042}
12043
12044__isl_give isl_union_pw_multi_aff *union_pw_multi_aff::copy() const & {
12045 return isl_union_pw_multi_aff_copy(ptr);
12046}
12047
12048__isl_keep isl_union_pw_multi_aff *union_pw_multi_aff::get() const {
12049 return ptr;
12050}
12051
12052__isl_give isl_union_pw_multi_aff *union_pw_multi_aff::release() {
12053 isl_union_pw_multi_aff *tmp = ptr;
12054 ptr = nullptr;
12055 return tmp;
12056}
12057
12058bool union_pw_multi_aff::is_null() const {
12059 return ptr == nullptr;
12060}
12061
12062isl::checked::ctx union_pw_multi_aff::ctx() const {
12063 return isl::checked::ctx(isl_union_pw_multi_aff_get_ctx(ptr));
12064}
12065
12066isl::checked::union_pw_multi_aff union_pw_multi_aff::add(isl::checked::union_pw_multi_aff upma2) const
12067{
12068 auto res = isl_union_pw_multi_aff_add(copy(), upma2.release());
12069 return manage(res);
12070}
12071
12072isl::checked::union_pw_multi_aff union_pw_multi_aff::apply(isl::checked::union_pw_multi_aff upma2) const
12073{
12074 auto res = isl_union_pw_multi_aff_apply_union_pw_multi_aff(copy(), upma2.release());
12075 return manage(res);
12076}
12077
12078isl::checked::pw_multi_aff union_pw_multi_aff::as_pw_multi_aff() const
12079{
12080 auto res = isl_union_pw_multi_aff_as_pw_multi_aff(copy());
12081 return manage(res);
12082}
12083
12084isl::checked::union_pw_multi_aff union_pw_multi_aff::coalesce() const
12085{
12086 auto res = isl_union_pw_multi_aff_coalesce(copy());
12087 return manage(res);
12088}
12089
12090isl::checked::union_set union_pw_multi_aff::domain() const
12091{
12092 auto res = isl_union_pw_multi_aff_domain(copy());
12093 return manage(res);
12094}
12095
12096isl::checked::union_pw_multi_aff union_pw_multi_aff::empty(isl::checked::ctx ctx)
12097{
12098 auto res = isl_union_pw_multi_aff_empty_ctx(ctx.release());
12099 return manage(res);
12100}
12101
12102isl::checked::pw_multi_aff union_pw_multi_aff::extract_pw_multi_aff(isl::checked::space space) const
12103{
12104 auto res = isl_union_pw_multi_aff_extract_pw_multi_aff(get(), space.release());
12105 return manage(res);
12106}
12107
12108isl::checked::union_pw_multi_aff union_pw_multi_aff::flat_range_product(isl::checked::union_pw_multi_aff upma2) const
12109{
12110 auto res = isl_union_pw_multi_aff_flat_range_product(copy(), upma2.release());
12111 return manage(res);
12112}
12113
12114isl::checked::space union_pw_multi_aff::space() const
12115{
12116 auto res = isl_union_pw_multi_aff_get_space(get());
12117 return manage(res);
12118}
12119
12120isl::checked::space union_pw_multi_aff::get_space() const
12121{
12122 return space();
12123}
12124
12125isl::checked::union_pw_multi_aff union_pw_multi_aff::gist(isl::checked::union_set context) const
12126{
12127 auto res = isl_union_pw_multi_aff_gist(copy(), context.release());
12128 return manage(res);
12129}
12130
12131isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain(isl::checked::space space) const
12132{
12133 auto res = isl_union_pw_multi_aff_intersect_domain_space(copy(), space.release());
12134 return manage(res);
12135}
12136
12137isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain(isl::checked::union_set uset) const
12138{
12139 auto res = isl_union_pw_multi_aff_intersect_domain_union_set(copy(), uset.release());
12140 return manage(res);
12141}
12142
12143isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain_wrapped_domain(isl::checked::union_set uset) const
12144{
12145 auto res = isl_union_pw_multi_aff_intersect_domain_wrapped_domain(copy(), uset.release());
12146 return manage(res);
12147}
12148
12149isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_domain_wrapped_range(isl::checked::union_set uset) const
12150{
12151 auto res = isl_union_pw_multi_aff_intersect_domain_wrapped_range(copy(), uset.release());
12152 return manage(res);
12153}
12154
12155isl::checked::union_pw_multi_aff union_pw_multi_aff::intersect_params(isl::checked::set set) const
12156{
12157 auto res = isl_union_pw_multi_aff_intersect_params(copy(), set.release());
12158 return manage(res);
12159}
12160
12161boolean union_pw_multi_aff::involves_locals() const
12162{
12163 auto res = isl_union_pw_multi_aff_involves_locals(get());
12164 return manage(res);
12165}
12166
12167boolean union_pw_multi_aff::isa_pw_multi_aff() const
12168{
12169 auto res = isl_union_pw_multi_aff_isa_pw_multi_aff(get());
12170 return manage(res);
12171}
12172
12173boolean union_pw_multi_aff::plain_is_empty() const
12174{
12175 auto res = isl_union_pw_multi_aff_plain_is_empty(get());
12176 return manage(res);
12177}
12178
12179isl::checked::union_pw_multi_aff union_pw_multi_aff::pullback(isl::checked::union_pw_multi_aff upma2) const
12180{
12181 auto res = isl_union_pw_multi_aff_pullback_union_pw_multi_aff(copy(), upma2.release());
12182 return manage(res);
12183}
12184
12185isl::checked::union_pw_multi_aff union_pw_multi_aff::range_factor_domain() const
12186{
12187 auto res = isl_union_pw_multi_aff_range_factor_domain(copy());
12188 return manage(res);
12189}
12190
12191isl::checked::union_pw_multi_aff union_pw_multi_aff::range_factor_range() const
12192{
12193 auto res = isl_union_pw_multi_aff_range_factor_range(copy());
12194 return manage(res);
12195}
12196
12197isl::checked::union_pw_multi_aff union_pw_multi_aff::range_product(isl::checked::union_pw_multi_aff upma2) const
12198{
12199 auto res = isl_union_pw_multi_aff_range_product(copy(), upma2.release());
12200 return manage(res);
12201}
12202
12203isl::checked::union_pw_multi_aff union_pw_multi_aff::sub(isl::checked::union_pw_multi_aff upma2) const
12204{
12205 auto res = isl_union_pw_multi_aff_sub(copy(), upma2.release());
12206 return manage(res);
12207}
12208
12209isl::checked::union_pw_multi_aff union_pw_multi_aff::subtract_domain(isl::checked::space space) const
12210{
12211 auto res = isl_union_pw_multi_aff_subtract_domain_space(copy(), space.release());
12212 return manage(res);
12213}
12214
12215isl::checked::union_pw_multi_aff union_pw_multi_aff::subtract_domain(isl::checked::union_set uset) const
12216{
12217 auto res = isl_union_pw_multi_aff_subtract_domain_union_set(copy(), uset.release());
12218 return manage(res);
12219}
12220
12221isl::checked::union_pw_multi_aff union_pw_multi_aff::union_add(isl::checked::union_pw_multi_aff upma2) const
12222{
12223 auto res = isl_union_pw_multi_aff_union_add(copy(), upma2.release());
12224 return manage(res);
12225}
12226
12227inline std::ostream &operator<<(std::ostream &os, const union_pw_multi_aff &obj)
12228{
12229 char *str = isl_union_pw_multi_aff_to_str(obj.get());
12230 if (!str) {
12231 os.setstate(std::ios_base::badbit);
12232 return os;
12233 }
12234 os << str;
12235 free(str);
12236 return os;
12237}
12238
12239// implementations for isl::union_set
12240union_set manage(__isl_take isl_union_set *ptr) {
12241 return union_set(ptr);
12242}
12243union_set manage_copy(__isl_keep isl_union_set *ptr) {
12244 ptr = isl_union_set_copy(ptr);
12245 return union_set(ptr);
12246}
12247
12248union_set::union_set()
12249 : ptr(nullptr) {}
12250
12251union_set::union_set(const union_set &obj)
12252 : ptr(nullptr)
12253{
12254 ptr = obj.copy();
12255}
12256
12257union_set::union_set(__isl_take isl_union_set *ptr)
12258 : ptr(ptr) {}
12259
12260union_set::union_set(isl::checked::basic_set bset)
12261{
12262 auto res = isl_union_set_from_basic_set(bset.release());
12263 ptr = res;
12264}
12265
12266union_set::union_set(isl::checked::point pnt)
12267{
12268 auto res = isl_union_set_from_point(pnt.release());
12269 ptr = res;
12270}
12271
12272union_set::union_set(isl::checked::set set)
12273{
12274 auto res = isl_union_set_from_set(set.release());
12275 ptr = res;
12276}
12277
12278union_set::union_set(isl::checked::ctx ctx, const std::string &str)
12279{
12280 auto res = isl_union_set_read_from_str(ctx.release(), str.c_str());
12281 ptr = res;
12282}
12283
12284union_set &union_set::operator=(union_set obj) {
12285 std::swap(this->ptr, obj.ptr);
12286 return *this;
12287}
12288
12289union_set::~union_set() {
12290 if (ptr)
12291 isl_union_set_free(ptr);
12292}
12293
12294__isl_give isl_union_set *union_set::copy() const & {
12295 return isl_union_set_copy(ptr);
12296}
12297
12298__isl_keep isl_union_set *union_set::get() const {
12299 return ptr;
12300}
12301
12302__isl_give isl_union_set *union_set::release() {
12303 isl_union_set *tmp = ptr;
12304 ptr = nullptr;
12305 return tmp;
12306}
12307
12308bool union_set::is_null() const {
12309 return ptr == nullptr;
12310}
12311
12312isl::checked::ctx union_set::ctx() const {
12313 return isl::checked::ctx(isl_union_set_get_ctx(ptr));
12314}
12315
12316isl::checked::union_set union_set::affine_hull() const
12317{
12318 auto res = isl_union_set_affine_hull(copy());
12319 return manage(res);
12320}
12321
12322isl::checked::union_set union_set::apply(isl::checked::union_map umap) const
12323{
12324 auto res = isl_union_set_apply(copy(), umap.release());
12325 return manage(res);
12326}
12327
12328isl::checked::union_set union_set::coalesce() const
12329{
12330 auto res = isl_union_set_coalesce(copy());
12331 return manage(res);
12332}
12333
12334isl::checked::union_set union_set::compute_divs() const
12335{
12336 auto res = isl_union_set_compute_divs(copy());
12337 return manage(res);
12338}
12339
12340isl::checked::union_set union_set::detect_equalities() const
12341{
12342 auto res = isl_union_set_detect_equalities(copy());
12343 return manage(res);
12344}
12345
12346isl::checked::union_set union_set::empty(isl::checked::ctx ctx)
12347{
12348 auto res = isl_union_set_empty_ctx(ctx.release());
12349 return manage(res);
12350}
12351
12352boolean union_set::every_set(const std::function<boolean(isl::checked::set)> &test) const
12353{
12354 struct test_data {
12355 std::function<boolean(isl::checked::set)> func;
12356 } test_data = { test };
12357 auto test_lambda = [](isl_set *arg_0, void *arg_1) -> isl_bool {
12358 auto *data = static_cast<struct test_data *>(arg_1);
12359 auto ret = (data->func)(manage_copy(arg_0));
12360 return ret.release();
12361 };
12362 auto res = isl_union_set_every_set(get(), test_lambda, &test_data);
12363 return manage(res);
12364}
12365
12366isl::checked::set union_set::extract_set(isl::checked::space space) const
12367{
12368 auto res = isl_union_set_extract_set(get(), space.release());
12369 return manage(res);
12370}
12371
12372stat union_set::foreach_point(const std::function<stat(isl::checked::point)> &fn) const
12373{
12374 struct fn_data {
12375 std::function<stat(isl::checked::point)> func;
12376 } fn_data = { fn };
12377 auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
12378 auto *data = static_cast<struct fn_data *>(arg_1);
12379 auto ret = (data->func)(manage(arg_0));
12380 return ret.release();
12381 };
12382 auto res = isl_union_set_foreach_point(get(), fn_lambda, &fn_data);
12383 return manage(res);
12384}
12385
12386stat union_set::foreach_set(const std::function<stat(isl::checked::set)> &fn) const
12387{
12388 struct fn_data {
12389 std::function<stat(isl::checked::set)> func;
12390 } fn_data = { fn };
12391 auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat {
12392 auto *data = static_cast<struct fn_data *>(arg_1);
12393 auto ret = (data->func)(manage(arg_0));
12394 return ret.release();
12395 };
12396 auto res = isl_union_set_foreach_set(get(), fn_lambda, &fn_data);
12397 return manage(res);
12398}
12399
12400isl::checked::space union_set::space() const
12401{
12402 auto res = isl_union_set_get_space(get());
12403 return manage(res);
12404}
12405
12406isl::checked::space union_set::get_space() const
12407{
12408 return space();
12409}
12410
12411isl::checked::union_set union_set::gist(isl::checked::union_set context) const
12412{
12413 auto res = isl_union_set_gist(copy(), context.release());
12414 return manage(res);
12415}
12416
12417isl::checked::union_set union_set::gist_params(isl::checked::set set) const
12418{
12419 auto res = isl_union_set_gist_params(copy(), set.release());
12420 return manage(res);
12421}
12422
12423isl::checked::union_map union_set::identity() const
12424{
12425 auto res = isl_union_set_identity(copy());
12426 return manage(res);
12427}
12428
12429isl::checked::union_set union_set::intersect(isl::checked::union_set uset2) const
12430{
12431 auto res = isl_union_set_intersect(copy(), uset2.release());
12432 return manage(res);
12433}
12434
12435isl::checked::union_set union_set::intersect_params(isl::checked::set set) const
12436{
12437 auto res = isl_union_set_intersect_params(copy(), set.release());
12438 return manage(res);
12439}
12440
12441boolean union_set::is_disjoint(const isl::checked::union_set &uset2) const
12442{
12443 auto res = isl_union_set_is_disjoint(get(), uset2.get());
12444 return manage(res);
12445}
12446
12447boolean union_set::is_empty() const
12448{
12449 auto res = isl_union_set_is_empty(get());
12450 return manage(res);
12451}
12452
12453boolean union_set::is_equal(const isl::checked::union_set &uset2) const
12454{
12455 auto res = isl_union_set_is_equal(get(), uset2.get());
12456 return manage(res);
12457}
12458
12459boolean union_set::is_strict_subset(const isl::checked::union_set &uset2) const
12460{
12461 auto res = isl_union_set_is_strict_subset(get(), uset2.get());
12462 return manage(res);
12463}
12464
12465boolean union_set::is_subset(const isl::checked::union_set &uset2) const
12466{
12467 auto res = isl_union_set_is_subset(get(), uset2.get());
12468 return manage(res);
12469}
12470
12471boolean union_set::isa_set() const
12472{
12473 auto res = isl_union_set_isa_set(get());
12474 return manage(res);
12475}
12476
12477isl::checked::union_set union_set::lexmax() const
12478{
12479 auto res = isl_union_set_lexmax(copy());
12480 return manage(res);
12481}
12482
12483isl::checked::union_set union_set::lexmin() const
12484{
12485 auto res = isl_union_set_lexmin(copy());
12486 return manage(res);
12487}
12488
12489isl::checked::union_set union_set::polyhedral_hull() const
12490{
12491 auto res = isl_union_set_polyhedral_hull(copy());
12492 return manage(res);
12493}
12494
12495isl::checked::union_set union_set::preimage(isl::checked::multi_aff ma) const
12496{
12497 auto res = isl_union_set_preimage_multi_aff(copy(), ma.release());
12498 return manage(res);
12499}
12500
12501isl::checked::union_set union_set::preimage(isl::checked::pw_multi_aff pma) const
12502{
12503 auto res = isl_union_set_preimage_pw_multi_aff(copy(), pma.release());
12504 return manage(res);
12505}
12506
12507isl::checked::union_set union_set::preimage(isl::checked::union_pw_multi_aff upma) const
12508{
12509 auto res = isl_union_set_preimage_union_pw_multi_aff(copy(), upma.release());
12510 return manage(res);
12511}
12512
12513isl::checked::point union_set::sample_point() const
12514{
12515 auto res = isl_union_set_sample_point(copy());
12516 return manage(res);
12517}
12518
12519isl::checked::union_set union_set::subtract(isl::checked::union_set uset2) const
12520{
12521 auto res = isl_union_set_subtract(copy(), uset2.release());
12522 return manage(res);
12523}
12524
12525isl::checked::union_set union_set::unite(isl::checked::union_set uset2) const
12526{
12527 auto res = isl_union_set_union(copy(), uset2.release());
12528 return manage(res);
12529}
12530
12531isl::checked::union_set union_set::universe() const
12532{
12533 auto res = isl_union_set_universe(copy());
12534 return manage(res);
12535}
12536
12537isl::checked::union_map union_set::unwrap() const
12538{
12539 auto res = isl_union_set_unwrap(copy());
12540 return manage(res);
12541}
12542
12543inline std::ostream &operator<<(std::ostream &os, const union_set &obj)
12544{
12545 char *str = isl_union_set_to_str(obj.get());
12546 if (!str) {
12547 os.setstate(std::ios_base::badbit);
12548 return os;
12549 }
12550 os << str;
12551 free(str);
12552 return os;
12553}
12554
12555// implementations for isl::union_set_list
12556union_set_list manage(__isl_take isl_union_set_list *ptr) {
12557 return union_set_list(ptr);
12558}
12559union_set_list manage_copy(__isl_keep isl_union_set_list *ptr) {
12560 ptr = isl_union_set_list_copy(ptr);
12561 return union_set_list(ptr);
12562}
12563
12564union_set_list::union_set_list()
12565 : ptr(nullptr) {}
12566
12567union_set_list::union_set_list(const union_set_list &obj)
12568 : ptr(nullptr)
12569{
12570 ptr = obj.copy();
12571}
12572
12573union_set_list::union_set_list(__isl_take isl_union_set_list *ptr)
12574 : ptr(ptr) {}
12575
12576union_set_list::union_set_list(isl::checked::ctx ctx, int n)
12577{
12578 auto res = isl_union_set_list_alloc(ctx.release(), n);
12579 ptr = res;
12580}
12581
12582union_set_list::union_set_list(isl::checked::union_set el)
12583{
12584 auto res = isl_union_set_list_from_union_set(el.release());
12585 ptr = res;
12586}
12587
12588union_set_list &union_set_list::operator=(union_set_list obj) {
12589 std::swap(this->ptr, obj.ptr);
12590 return *this;
12591}
12592
12593union_set_list::~union_set_list() {
12594 if (ptr)
12595 isl_union_set_list_free(ptr);
12596}
12597
12598__isl_give isl_union_set_list *union_set_list::copy() const & {
12599 return isl_union_set_list_copy(ptr);
12600}
12601
12602__isl_keep isl_union_set_list *union_set_list::get() const {
12603 return ptr;
12604}
12605
12606__isl_give isl_union_set_list *union_set_list::release() {
12607 isl_union_set_list *tmp = ptr;
12608 ptr = nullptr;
12609 return tmp;
12610}
12611
12612bool union_set_list::is_null() const {
12613 return ptr == nullptr;
12614}
12615
12616isl::checked::ctx union_set_list::ctx() const {
12617 return isl::checked::ctx(isl_union_set_list_get_ctx(ptr));
12618}
12619
12620isl::checked::union_set_list union_set_list::add(isl::checked::union_set el) const
12621{
12622 auto res = isl_union_set_list_add(copy(), el.release());
12623 return manage(res);
12624}
12625
12626isl::checked::union_set_list union_set_list::clear() const
12627{
12628 auto res = isl_union_set_list_clear(copy());
12629 return manage(res);
12630}
12631
12632isl::checked::union_set_list union_set_list::concat(isl::checked::union_set_list list2) const
12633{
12634 auto res = isl_union_set_list_concat(copy(), list2.release());
12635 return manage(res);
12636}
12637
12638isl::checked::union_set_list union_set_list::drop(unsigned int first, unsigned int n) const
12639{
12640 auto res = isl_union_set_list_drop(copy(), first, n);
12641 return manage(res);
12642}
12643
12644stat union_set_list::foreach(const std::function<stat(isl::checked::union_set)> &fn) const
12645{
12646 struct fn_data {
12647 std::function<stat(isl::checked::union_set)> func;
12648 } fn_data = { fn };
12649 auto fn_lambda = [](isl_union_set *arg_0, void *arg_1) -> isl_stat {
12650 auto *data = static_cast<struct fn_data *>(arg_1);
12651 auto ret = (data->func)(manage(arg_0));
12652 return ret.release();
12653 };
12654 auto res = isl_union_set_list_foreach(get(), fn_lambda, &fn_data);
12655 return manage(res);
12656}
12657
12658isl::checked::union_set union_set_list::at(int index) const
12659{
12660 auto res = isl_union_set_list_get_at(get(), index);
12661 return manage(res);
12662}
12663
12664isl::checked::union_set union_set_list::get_at(int index) const
12665{
12666 return at(index);
12667}
12668
12669isl::checked::union_set_list union_set_list::insert(unsigned int pos, isl::checked::union_set el) const
12670{
12671 auto res = isl_union_set_list_insert(copy(), pos, el.release());
12672 return manage(res);
12673}
12674
12675class size union_set_list::size() const
12676{
12677 auto res = isl_union_set_list_size(get());
12678 return manage(res);
12679}
12680
12681inline std::ostream &operator<<(std::ostream &os, const union_set_list &obj)
12682{
12683 char *str = isl_union_set_list_to_str(obj.get());
12684 if (!str) {
12685 os.setstate(std::ios_base::badbit);
12686 return os;
12687 }
12688 os << str;
12689 free(str);
12690 return os;
12691}
12692
12693// implementations for isl::val
12694val manage(__isl_take isl_val *ptr) {
12695 return val(ptr);
12696}
12697val manage_copy(__isl_keep isl_val *ptr) {
12698 ptr = isl_val_copy(ptr);
12699 return val(ptr);
12700}
12701
12702val::val()
12703 : ptr(nullptr) {}
12704
12705val::val(const val &obj)
12706 : ptr(nullptr)
12707{
12708 ptr = obj.copy();
12709}
12710
12711val::val(__isl_take isl_val *ptr)
12712 : ptr(ptr) {}
12713
12714val::val(isl::checked::ctx ctx, long i)
12715{
12716 auto res = isl_val_int_from_si(ctx.release(), i);
12717 ptr = res;
12718}
12719
12720val::val(isl::checked::ctx ctx, const std::string &str)
12721{
12722 auto res = isl_val_read_from_str(ctx.release(), str.c_str());
12723 ptr = res;
12724}
12725
12726val &val::operator=(val obj) {
12727 std::swap(this->ptr, obj.ptr);
12728 return *this;
12729}
12730
12731val::~val() {
12732 if (ptr)
12733 isl_val_free(ptr);
12734}
12735
12736__isl_give isl_val *val::copy() const & {
12737 return isl_val_copy(ptr);
12738}
12739
12740__isl_keep isl_val *val::get() const {
12741 return ptr;
12742}
12743
12744__isl_give isl_val *val::release() {
12745 isl_val *tmp = ptr;
12746 ptr = nullptr;
12747 return tmp;
12748}
12749
12750bool val::is_null() const {
12751 return ptr == nullptr;
12752}
12753
12754isl::checked::ctx val::ctx() const {
12755 return isl::checked::ctx(isl_val_get_ctx(ptr));
12756}
12757
12758isl::checked::val val::abs() const
12759{
12760 auto res = isl_val_abs(copy());
12761 return manage(res);
12762}
12763
12764boolean val::abs_eq(const isl::checked::val &v2) const
12765{
12766 auto res = isl_val_abs_eq(get(), v2.get());
12767 return manage(res);
12768}
12769
12770boolean val::abs_eq(long v2) const
12771{
12772 return this->abs_eq(isl::checked::val(ctx(), v2));
12773}
12774
12775isl::checked::val val::add(isl::checked::val v2) const
12776{
12777 auto res = isl_val_add(copy(), v2.release());
12778 return manage(res);
12779}
12780
12781isl::checked::val val::add(long v2) const
12782{
12783 return this->add(isl::checked::val(ctx(), v2));
12784}
12785
12786isl::checked::val val::ceil() const
12787{
12788 auto res = isl_val_ceil(copy());
12789 return manage(res);
12790}
12791
12792int val::cmp_si(long i) const
12793{
12794 auto res = isl_val_cmp_si(get(), i);
12795 return res;
12796}
12797
12798isl::checked::val val::div(isl::checked::val v2) const
12799{
12800 auto res = isl_val_div(copy(), v2.release());
12801 return manage(res);
12802}
12803
12804isl::checked::val val::div(long v2) const
12805{
12806 return this->div(isl::checked::val(ctx(), v2));
12807}
12808
12809boolean val::eq(const isl::checked::val &v2) const
12810{
12811 auto res = isl_val_eq(get(), v2.get());
12812 return manage(res);
12813}
12814
12815boolean val::eq(long v2) const
12816{
12817 return this->eq(isl::checked::val(ctx(), v2));
12818}
12819
12820isl::checked::val val::floor() const
12821{
12822 auto res = isl_val_floor(copy());
12823 return manage(res);
12824}
12825
12826isl::checked::val val::gcd(isl::checked::val v2) const
12827{
12828 auto res = isl_val_gcd(copy(), v2.release());
12829 return manage(res);
12830}
12831
12832isl::checked::val val::gcd(long v2) const
12833{
12834 return this->gcd(isl::checked::val(ctx(), v2));
12835}
12836
12837boolean val::ge(const isl::checked::val &v2) const
12838{
12839 auto res = isl_val_ge(get(), v2.get());
12840 return manage(res);
12841}
12842
12843boolean val::ge(long v2) const
12844{
12845 return this->ge(isl::checked::val(ctx(), v2));
12846}
12847
12848long val::den_si() const
12849{
12850 auto res = isl_val_get_den_si(get());
12851 return res;
12852}
12853
12854long val::get_den_si() const
12855{
12856 return den_si();
12857}
12858
12859long val::num_si() const
12860{
12861 auto res = isl_val_get_num_si(get());
12862 return res;
12863}
12864
12865long val::get_num_si() const
12866{
12867 return num_si();
12868}
12869
12870boolean val::gt(const isl::checked::val &v2) const
12871{
12872 auto res = isl_val_gt(get(), v2.get());
12873 return manage(res);
12874}
12875
12876boolean val::gt(long v2) const
12877{
12878 return this->gt(isl::checked::val(ctx(), v2));
12879}
12880
12881isl::checked::val val::infty(isl::checked::ctx ctx)
12882{
12883 auto res = isl_val_infty(ctx.release());
12884 return manage(res);
12885}
12886
12887isl::checked::val val::inv() const
12888{
12889 auto res = isl_val_inv(copy());
12890 return manage(res);
12891}
12892
12893boolean val::is_divisible_by(const isl::checked::val &v2) const
12894{
12895 auto res = isl_val_is_divisible_by(get(), v2.get());
12896 return manage(res);
12897}
12898
12899boolean val::is_divisible_by(long v2) const
12900{
12901 return this->is_divisible_by(isl::checked::val(ctx(), v2));
12902}
12903
12904boolean val::is_infty() const
12905{
12906 auto res = isl_val_is_infty(get());
12907 return manage(res);
12908}
12909
12910boolean val::is_int() const
12911{
12912 auto res = isl_val_is_int(get());
12913 return manage(res);
12914}
12915
12916boolean val::is_nan() const
12917{
12918 auto res = isl_val_is_nan(get());
12919 return manage(res);
12920}
12921
12922boolean val::is_neg() const
12923{
12924 auto res = isl_val_is_neg(get());
12925 return manage(res);
12926}
12927
12928boolean val::is_neginfty() const
12929{
12930 auto res = isl_val_is_neginfty(get());
12931 return manage(res);
12932}
12933
12934boolean val::is_negone() const
12935{
12936 auto res = isl_val_is_negone(get());
12937 return manage(res);
12938}
12939
12940boolean val::is_nonneg() const
12941{
12942 auto res = isl_val_is_nonneg(get());
12943 return manage(res);
12944}
12945
12946boolean val::is_nonpos() const
12947{
12948 auto res = isl_val_is_nonpos(get());
12949 return manage(res);
12950}
12951
12952boolean val::is_one() const
12953{
12954 auto res = isl_val_is_one(get());
12955 return manage(res);
12956}
12957
12958boolean val::is_pos() const
12959{
12960 auto res = isl_val_is_pos(get());
12961 return manage(res);
12962}
12963
12964boolean val::is_rat() const
12965{
12966 auto res = isl_val_is_rat(get());
12967 return manage(res);
12968}
12969
12970boolean val::is_zero() const
12971{
12972 auto res = isl_val_is_zero(get());
12973 return manage(res);
12974}
12975
12976boolean val::le(const isl::checked::val &v2) const
12977{
12978 auto res = isl_val_le(get(), v2.get());
12979 return manage(res);
12980}
12981
12982boolean val::le(long v2) const
12983{
12984 return this->le(isl::checked::val(ctx(), v2));
12985}
12986
12987boolean val::lt(const isl::checked::val &v2) const
12988{
12989 auto res = isl_val_lt(get(), v2.get());
12990 return manage(res);
12991}
12992
12993boolean val::lt(long v2) const
12994{
12995 return this->lt(isl::checked::val(ctx(), v2));
12996}
12997
12998isl::checked::val val::max(isl::checked::val v2) const
12999{
13000 auto res = isl_val_max(copy(), v2.release());
13001 return manage(res);
13002}
13003
13004isl::checked::val val::max(long v2) const
13005{
13006 return this->max(isl::checked::val(ctx(), v2));
13007}
13008
13009isl::checked::val val::min(isl::checked::val v2) const
13010{
13011 auto res = isl_val_min(copy(), v2.release());
13012 return manage(res);
13013}
13014
13015isl::checked::val val::min(long v2) const
13016{
13017 return this->min(isl::checked::val(ctx(), v2));
13018}
13019
13020isl::checked::val val::mod(isl::checked::val v2) const
13021{
13022 auto res = isl_val_mod(copy(), v2.release());
13023 return manage(res);
13024}
13025
13026isl::checked::val val::mod(long v2) const
13027{
13028 return this->mod(isl::checked::val(ctx(), v2));
13029}
13030
13031isl::checked::val val::mul(isl::checked::val v2) const
13032{
13033 auto res = isl_val_mul(copy(), v2.release());
13034 return manage(res);
13035}
13036
13037isl::checked::val val::mul(long v2) const
13038{
13039 return this->mul(isl::checked::val(ctx(), v2));
13040}
13041
13042isl::checked::val val::nan(isl::checked::ctx ctx)
13043{
13044 auto res = isl_val_nan(ctx.release());
13045 return manage(res);
13046}
13047
13048boolean val::ne(const isl::checked::val &v2) const
13049{
13050 auto res = isl_val_ne(get(), v2.get());
13051 return manage(res);
13052}
13053
13054boolean val::ne(long v2) const
13055{
13056 return this->ne(isl::checked::val(ctx(), v2));
13057}
13058
13059isl::checked::val val::neg() const
13060{
13061 auto res = isl_val_neg(copy());
13062 return manage(res);
13063}
13064
13065isl::checked::val val::neginfty(isl::checked::ctx ctx)
13066{
13067 auto res = isl_val_neginfty(ctx.release());
13068 return manage(res);
13069}
13070
13071isl::checked::val val::negone(isl::checked::ctx ctx)
13072{
13073 auto res = isl_val_negone(ctx.release());
13074 return manage(res);
13075}
13076
13077isl::checked::val val::one(isl::checked::ctx ctx)
13078{
13079 auto res = isl_val_one(ctx.release());
13080 return manage(res);
13081}
13082
13083isl::checked::val val::pow2() const
13084{
13085 auto res = isl_val_pow2(copy());
13086 return manage(res);
13087}
13088
13089int val::sgn() const
13090{
13091 auto res = isl_val_sgn(get());
13092 return res;
13093}
13094
13095isl::checked::val val::sub(isl::checked::val v2) const
13096{
13097 auto res = isl_val_sub(copy(), v2.release());
13098 return manage(res);
13099}
13100
13101isl::checked::val val::sub(long v2) const
13102{
13103 return this->sub(isl::checked::val(ctx(), v2));
13104}
13105
13106isl::checked::val val::trunc() const
13107{
13108 auto res = isl_val_trunc(copy());
13109 return manage(res);
13110}
13111
13112isl::checked::val val::zero(isl::checked::ctx ctx)
13113{
13114 auto res = isl_val_zero(ctx.release());
13115 return manage(res);
13116}
13117
13118inline std::ostream &operator<<(std::ostream &os, const val &obj)
13119{
13120 char *str = isl_val_to_str(obj.get());
13121 if (!str) {
13122 os.setstate(std::ios_base::badbit);
13123 return os;
13124 }
13125 os << str;
13126 free(str);
13127 return os;
13128}
13129
13130// implementations for isl::val_list
13131val_list manage(__isl_take isl_val_list *ptr) {
13132 return val_list(ptr);
13133}
13134val_list manage_copy(__isl_keep isl_val_list *ptr) {
13135 ptr = isl_val_list_copy(ptr);
13136 return val_list(ptr);
13137}
13138
13139val_list::val_list()
13140 : ptr(nullptr) {}
13141
13142val_list::val_list(const val_list &obj)
13143 : ptr(nullptr)
13144{
13145 ptr = obj.copy();
13146}
13147
13148val_list::val_list(__isl_take isl_val_list *ptr)
13149 : ptr(ptr) {}
13150
13151val_list::val_list(isl::checked::ctx ctx, int n)
13152{
13153 auto res = isl_val_list_alloc(ctx.release(), n);
13154 ptr = res;
13155}
13156
13157val_list::val_list(isl::checked::val el)
13158{
13159 auto res = isl_val_list_from_val(el.release());
13160 ptr = res;
13161}
13162
13163val_list &val_list::operator=(val_list obj) {
13164 std::swap(this->ptr, obj.ptr);
13165 return *this;
13166}
13167
13168val_list::~val_list() {
13169 if (ptr)
13170 isl_val_list_free(ptr);
13171}
13172
13173__isl_give isl_val_list *val_list::copy() const & {
13174 return isl_val_list_copy(ptr);
13175}
13176
13177__isl_keep isl_val_list *val_list::get() const {
13178 return ptr;
13179}
13180
13181__isl_give isl_val_list *val_list::release() {
13182 isl_val_list *tmp = ptr;
13183 ptr = nullptr;
13184 return tmp;
13185}
13186
13187bool val_list::is_null() const {
13188 return ptr == nullptr;
13189}
13190
13191isl::checked::ctx val_list::ctx() const {
13192 return isl::checked::ctx(isl_val_list_get_ctx(ptr));
13193}
13194
13195isl::checked::val_list val_list::add(isl::checked::val el) const
13196{
13197 auto res = isl_val_list_add(copy(), el.release());
13198 return manage(res);
13199}
13200
13201isl::checked::val_list val_list::add(long el) const
13202{
13203 return this->add(isl::checked::val(ctx(), el));
13204}
13205
13206isl::checked::val_list val_list::clear() const
13207{
13208 auto res = isl_val_list_clear(copy());
13209 return manage(res);
13210}
13211
13212isl::checked::val_list val_list::concat(isl::checked::val_list list2) const
13213{
13214 auto res = isl_val_list_concat(copy(), list2.release());
13215 return manage(res);
13216}
13217
13218isl::checked::val_list val_list::drop(unsigned int first, unsigned int n) const
13219{
13220 auto res = isl_val_list_drop(copy(), first, n);
13221 return manage(res);
13222}
13223
13224stat val_list::foreach(const std::function<stat(isl::checked::val)> &fn) const
13225{
13226 struct fn_data {
13227 std::function<stat(isl::checked::val)> func;
13228 } fn_data = { fn };
13229 auto fn_lambda = [](isl_val *arg_0, void *arg_1) -> isl_stat {
13230 auto *data = static_cast<struct fn_data *>(arg_1);
13231 auto ret = (data->func)(manage(arg_0));
13232 return ret.release();
13233 };
13234 auto res = isl_val_list_foreach(get(), fn_lambda, &fn_data);
13235 return manage(res);
13236}
13237
13238isl::checked::val val_list::at(int index) const
13239{
13240 auto res = isl_val_list_get_at(get(), index);
13241 return manage(res);
13242}
13243
13244isl::checked::val val_list::get_at(int index) const
13245{
13246 return at(index);
13247}
13248
13249isl::checked::val_list val_list::insert(unsigned int pos, isl::checked::val el) const
13250{
13251 auto res = isl_val_list_insert(copy(), pos, el.release());
13252 return manage(res);
13253}
13254
13255isl::checked::val_list val_list::insert(unsigned int pos, long el) const
13256{
13257 return this->insert(pos, isl::checked::val(ctx(), el));
13258}
13259
13260class size val_list::size() const
13261{
13262 auto res = isl_val_list_size(get());
13263 return manage(res);
13264}
13265
13266inline std::ostream &operator<<(std::ostream &os, const val_list &obj)
13267{
13268 char *str = isl_val_list_to_str(obj.get());
13269 if (!str) {
13270 os.setstate(std::ios_base::badbit);
13271 return os;
13272 }
13273 os << str;
13274 free(str);
13275 return os;
13276}
13277} // namespace checked
13278} // namespace isl
13279
13280#endif /* ISL_CPP_CHECKED */