1 /// These are automatically generated checked C++ bindings for isl.
2 ///
3 /// isl is a library for computing with integer sets and maps described by
4 /// Presburger formulas. On top of this, isl provides various tools for
5 /// polyhedral compilation, ranging from dependence analysis over scheduling
6 /// to AST generation.
7
8 #ifndef ISL_CPP_CHECKED
9 #define ISL_CPP_CHECKED
10
11 #include <isl/id.h>
12 #include <isl/space.h>
13 #include <isl/val.h>
14 #include <isl/aff.h>
15 #include <isl/set.h>
16 #include <isl/map.h>
17 #include <isl/ilp.h>
18 #include <isl/union_set.h>
19 #include <isl/union_map.h>
20 #include <isl/flow.h>
21 #include <isl/schedule.h>
22 #include <isl/schedule_node.h>
23 #include <isl/ast_build.h>
24 #include <isl/fixed_box.h>
25
26 #include <stdio.h>
27 #include <stdlib.h>
28
29 #include <functional>
30 #include <memory>
31 #include <ostream>
32 #include <string>
33 #include <type_traits>
34
35 namespace isl {
36 namespace checked {
37
38 #define ISLPP_STRINGIZE_(X) #X
39 #define ISLPP_STRINGIZE(X) ISLPP_STRINGIZE_(X)
40
41 #define ISLPP_ASSERT(test, message) \
42 do { \
43 if (test) \
44 break; \
45 fputs("Assertion \"" #test "\" failed at " __FILE__ \
46 ":" ISLPP_STRINGIZE(__LINE__) "\n " message "\n", \
47 stderr); \
48 abort(); \
49 } while (0)
50
51 /* Class used to check that isl::checked::boolean,
52 * isl::checked::stat and isl::checked::size values are checked for errors.
53 */
54 struct checker {
55 bool checked = false;
~checkerchecker56 ~checker() {
57 ISLPP_ASSERT(checked, "IMPLEMENTATION ERROR: Unchecked state");
58 }
59 };
60
61 class boolean {
62 private:
63 mutable std::shared_ptr<checker> check = std::make_shared<checker>();
64 isl_bool val;
65
66 friend boolean manage(isl_bool val);
boolean(isl_bool val)67 boolean(isl_bool val): val(val) {}
68 public:
error()69 static boolean error() {
70 return boolean(isl_bool_error);
71 }
boolean()72 boolean()
73 : val(isl_bool_error) {}
74
boolean(bool val)75 /* implicit */ boolean(bool val)
76 : val(val ? isl_bool_true : isl_bool_false) {}
77
release()78 isl_bool release() {
79 auto tmp = val;
80 val = isl_bool_error;
81 check->checked = true;
82 return tmp;
83 }
84
is_error()85 bool is_error() const { check->checked = true; return val == isl_bool_error; }
is_false()86 bool is_false() const { check->checked = true; return val == isl_bool_false; }
is_true()87 bool is_true() const { check->checked = true; return val == isl_bool_true; }
88
89 explicit operator bool() const {
90 ISLPP_ASSERT(check->checked, "IMPLEMENTATION ERROR: Unchecked error state");
91 ISLPP_ASSERT(!is_error(), "IMPLEMENTATION ERROR: Unhandled error state");
92 return is_true();
93 }
94
negate()95 boolean negate() {
96 if (val == isl_bool_true)
97 val = isl_bool_false;
98 else if (val == isl_bool_false)
99 val = isl_bool_true;
100 return *this;
101 }
102
103 boolean operator!() const {
104 return boolean(*this).negate();
105 }
106 };
107
manage(isl_bool val)108 inline boolean manage(isl_bool val) {
109 return boolean(val);
110 }
111
112 class ctx {
113 isl_ctx *ptr;
114 public:
ctx(isl_ctx * ctx)115 /* implicit */ ctx(isl_ctx *ctx)
116 : ptr(ctx) {}
release()117 isl_ctx *release() {
118 auto tmp = ptr;
119 ptr = nullptr;
120 return tmp;
121 }
get()122 isl_ctx *get() {
123 return ptr;
124 }
125 };
126
127 /* Class encapsulating an isl_stat value.
128 */
129 class stat {
130 private:
131 mutable std::shared_ptr<checker> check = std::make_shared<checker>();
132 isl_stat val;
133
134 friend stat manage(isl_stat val);
stat(isl_stat val)135 stat(isl_stat val) : val(val) {}
136 public:
ok()137 static stat ok() {
138 return stat(isl_stat_ok);
139 }
error()140 static stat error() {
141 return stat(isl_stat_error);
142 }
stat()143 stat() : val(isl_stat_error) {}
144
release()145 isl_stat release() {
146 check->checked = true;
147 return val;
148 }
149
is_error()150 bool is_error() const {
151 check->checked = true;
152 return val == isl_stat_error;
153 }
is_ok()154 bool is_ok() const {
155 check->checked = true;
156 return val == isl_stat_ok;
157 }
158 };
159
manage(isl_stat val)160 inline stat manage(isl_stat val)
161 {
162 return stat(val);
163 }
164
165 /* Class encapsulating an isl_size value.
166 */
167 class size {
168 private:
169 mutable std::shared_ptr<checker> check = std::make_shared<checker>();
170 isl_size val;
171
172 friend size manage(isl_size val);
size(isl_size val)173 size(isl_size val) : val(val) {}
174 public:
size()175 size() : val(isl_size_error) {}
176
release()177 isl_size release() {
178 auto tmp = val;
179 val = isl_size_error;
180 check->checked = true;
181 return tmp;
182 }
183
is_error()184 bool is_error() const {
185 check->checked = true;
186 return val == isl_size_error;
187 }
188
189 explicit operator unsigned() const {
190 ISLPP_ASSERT(check->checked,
191 "IMPLEMENTATION ERROR: Unchecked error state");
192 ISLPP_ASSERT(!is_error(),
193 "IMPLEMENTATION ERROR: Unhandled error state");
194 return val;
195 }
196 };
197
manage(isl_size val)198 inline size manage(isl_size val)
199 {
200 return size(val);
201 }
202
203 }
204 } // namespace isl
205
206 namespace isl {
207
208 namespace checked {
209
210 // forward declarations
211 class aff;
212 class aff_list;
213 class ast_build;
214 class ast_expr;
215 class ast_expr_id;
216 class ast_expr_int;
217 class ast_expr_op;
218 class ast_expr_op_access;
219 class ast_expr_op_add;
220 class ast_expr_op_address_of;
221 class ast_expr_op_and;
222 class ast_expr_op_and_then;
223 class ast_expr_op_call;
224 class ast_expr_op_cond;
225 class ast_expr_op_div;
226 class ast_expr_op_eq;
227 class ast_expr_op_fdiv_q;
228 class ast_expr_op_ge;
229 class ast_expr_op_gt;
230 class ast_expr_op_le;
231 class ast_expr_op_lt;
232 class ast_expr_op_max;
233 class ast_expr_op_member;
234 class ast_expr_op_min;
235 class ast_expr_op_minus;
236 class ast_expr_op_mul;
237 class ast_expr_op_or;
238 class ast_expr_op_or_else;
239 class ast_expr_op_pdiv_q;
240 class ast_expr_op_pdiv_r;
241 class ast_expr_op_select;
242 class ast_expr_op_sub;
243 class ast_expr_op_zdiv_r;
244 class ast_node;
245 class ast_node_block;
246 class ast_node_for;
247 class ast_node_if;
248 class ast_node_list;
249 class ast_node_mark;
250 class ast_node_user;
251 class basic_map;
252 class basic_set;
253 class fixed_box;
254 class id;
255 class id_list;
256 class map;
257 class multi_aff;
258 class multi_id;
259 class multi_pw_aff;
260 class multi_union_pw_aff;
261 class multi_val;
262 class point;
263 class pw_aff;
264 class pw_aff_list;
265 class pw_multi_aff;
266 class pw_multi_aff_list;
267 class schedule;
268 class schedule_constraints;
269 class schedule_node;
270 class schedule_node_band;
271 class schedule_node_context;
272 class schedule_node_domain;
273 class schedule_node_expansion;
274 class schedule_node_extension;
275 class schedule_node_filter;
276 class schedule_node_guard;
277 class schedule_node_leaf;
278 class schedule_node_mark;
279 class schedule_node_sequence;
280 class schedule_node_set;
281 class set;
282 class space;
283 class union_access_info;
284 class union_flow;
285 class union_map;
286 class union_pw_aff;
287 class union_pw_aff_list;
288 class union_pw_multi_aff;
289 class union_set;
290 class union_set_list;
291 class val;
292 class val_list;
293
294 // declarations for isl::aff
295 inline aff manage(__isl_take isl_aff *ptr);
296 inline aff manage_copy(__isl_keep isl_aff *ptr);
297
298 class aff {
299 friend inline aff manage(__isl_take isl_aff *ptr);
300 friend inline aff manage_copy(__isl_keep isl_aff *ptr);
301
302 protected:
303 isl_aff *ptr = nullptr;
304
305 inline explicit aff(__isl_take isl_aff *ptr);
306
307 public:
308 inline /* implicit */ aff();
309 inline /* implicit */ aff(const aff &obj);
310 inline explicit aff(isl::checked::ctx ctx, const std::string &str);
311 inline aff &operator=(aff obj);
312 inline ~aff();
313 inline __isl_give isl_aff *copy() const &;
314 inline __isl_give isl_aff *copy() && = delete;
315 inline __isl_keep isl_aff *get() const;
316 inline __isl_give isl_aff *release();
317 inline bool is_null() const;
318 inline isl::checked::ctx ctx() const;
319
320 inline isl::checked::aff add(isl::checked::aff aff2) const;
321 inline isl::checked::aff add_constant(isl::checked::val v) const;
322 inline isl::checked::aff add_constant(long v) const;
323 inline isl::checked::basic_set bind(isl::checked::id id) const;
324 inline isl::checked::basic_set bind(const std::string &id) const;
325 inline isl::checked::aff ceil() const;
326 inline isl::checked::aff div(isl::checked::aff aff2) const;
327 inline isl::checked::set eq_set(isl::checked::aff aff2) const;
328 inline isl::checked::val eval(isl::checked::point pnt) const;
329 inline isl::checked::aff floor() const;
330 inline isl::checked::set ge_set(isl::checked::aff aff2) const;
331 inline isl::checked::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
351 inline aff_list manage(__isl_take isl_aff_list *ptr);
352 inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
353
354 class 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
358 protected:
359 isl_aff_list *ptr = nullptr;
360
361 inline explicit aff_list(__isl_take isl_aff_list *ptr);
362
363 public:
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
389 inline ast_build manage(__isl_take isl_ast_build *ptr);
390 inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
391
392 class 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
396 protected:
397 isl_ast_build *ptr = nullptr;
398
399 inline explicit ast_build(__isl_take isl_ast_build *ptr);
400
401 public:
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
414 private:
415 inline ast_build ©_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);
422 public:
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
438 inline ast_expr manage(__isl_take isl_ast_expr *ptr);
439 inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
440
441 class 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
445 protected:
446 isl_ast_expr *ptr = nullptr;
447
448 inline explicit ast_expr(__isl_take isl_ast_expr *ptr);
449
450 public:
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;
460 private:
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;
466 public:
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
476 class 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
482 protected:
483 inline explicit ast_expr_id(__isl_take isl_ast_expr *ptr);
484
485 public:
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
497 class 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
503 protected:
504 inline explicit ast_expr_int(__isl_take isl_ast_expr *ptr);
505
506 public:
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
518 class 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
524 protected:
525 inline explicit ast_expr_op(__isl_take isl_ast_expr *ptr);
526
527 public:
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);
531 private:
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;
537 public:
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
550 class 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
556 protected:
557 inline explicit ast_expr_op_access(__isl_take isl_ast_expr *ptr);
558
559 public:
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
569 class 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
575 protected:
576 inline explicit ast_expr_op_add(__isl_take isl_ast_expr *ptr);
577
578 public:
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
588 class 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
594 protected:
595 inline explicit ast_expr_op_address_of(__isl_take isl_ast_expr *ptr);
596
597 public:
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
607 class 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
613 protected:
614 inline explicit ast_expr_op_and(__isl_take isl_ast_expr *ptr);
615
616 public:
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
626 class 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
632 protected:
633 inline explicit ast_expr_op_and_then(__isl_take isl_ast_expr *ptr);
634
635 public:
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
645 class 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
651 protected:
652 inline explicit ast_expr_op_call(__isl_take isl_ast_expr *ptr);
653
654 public:
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
664 class 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
670 protected:
671 inline explicit ast_expr_op_cond(__isl_take isl_ast_expr *ptr);
672
673 public:
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
683 class 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
689 protected:
690 inline explicit ast_expr_op_div(__isl_take isl_ast_expr *ptr);
691
692 public:
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
702 class 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
708 protected:
709 inline explicit ast_expr_op_eq(__isl_take isl_ast_expr *ptr);
710
711 public:
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
721 class 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
727 protected:
728 inline explicit ast_expr_op_fdiv_q(__isl_take isl_ast_expr *ptr);
729
730 public:
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
740 class 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
746 protected:
747 inline explicit ast_expr_op_ge(__isl_take isl_ast_expr *ptr);
748
749 public:
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
759 class 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
765 protected:
766 inline explicit ast_expr_op_gt(__isl_take isl_ast_expr *ptr);
767
768 public:
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
778 class 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
784 protected:
785 inline explicit ast_expr_op_le(__isl_take isl_ast_expr *ptr);
786
787 public:
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
797 class 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
803 protected:
804 inline explicit ast_expr_op_lt(__isl_take isl_ast_expr *ptr);
805
806 public:
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
816 class 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
822 protected:
823 inline explicit ast_expr_op_max(__isl_take isl_ast_expr *ptr);
824
825 public:
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
835 class 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
841 protected:
842 inline explicit ast_expr_op_member(__isl_take isl_ast_expr *ptr);
843
844 public:
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
854 class 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
860 protected:
861 inline explicit ast_expr_op_min(__isl_take isl_ast_expr *ptr);
862
863 public:
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
873 class 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
879 protected:
880 inline explicit ast_expr_op_minus(__isl_take isl_ast_expr *ptr);
881
882 public:
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
892 class 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
898 protected:
899 inline explicit ast_expr_op_mul(__isl_take isl_ast_expr *ptr);
900
901 public:
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
911 class 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
917 protected:
918 inline explicit ast_expr_op_or(__isl_take isl_ast_expr *ptr);
919
920 public:
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
930 class 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
936 protected:
937 inline explicit ast_expr_op_or_else(__isl_take isl_ast_expr *ptr);
938
939 public:
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
949 class 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
955 protected:
956 inline explicit ast_expr_op_pdiv_q(__isl_take isl_ast_expr *ptr);
957
958 public:
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
968 class 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
974 protected:
975 inline explicit ast_expr_op_pdiv_r(__isl_take isl_ast_expr *ptr);
976
977 public:
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
987 class 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
993 protected:
994 inline explicit ast_expr_op_select(__isl_take isl_ast_expr *ptr);
995
996 public:
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
1006 class 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
1012 protected:
1013 inline explicit ast_expr_op_sub(__isl_take isl_ast_expr *ptr);
1014
1015 public:
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
1025 class 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
1031 protected:
1032 inline explicit ast_expr_op_zdiv_r(__isl_take isl_ast_expr *ptr);
1033
1034 public:
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
1043 inline ast_node manage(__isl_take isl_ast_node *ptr);
1044 inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
1045
1046 class 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
1050 protected:
1051 isl_ast_node *ptr = nullptr;
1052
1053 inline explicit ast_node(__isl_take isl_ast_node *ptr);
1054
1055 public:
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;
1065 private:
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;
1071 public:
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
1081 class 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
1087 protected:
1088 inline explicit ast_node_block(__isl_take isl_ast_node *ptr);
1089
1090 public:
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
1102 class 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
1108 protected:
1109 inline explicit ast_node_for(__isl_take isl_ast_node *ptr);
1110
1111 public:
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
1132 class 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
1138 protected:
1139 inline explicit ast_node_if(__isl_take isl_ast_node *ptr);
1140
1141 public:
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
1157 inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
1158 inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
1159
1160 class 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
1164 protected:
1165 isl_ast_node_list *ptr = nullptr;
1166
1167 inline explicit ast_node_list(__isl_take isl_ast_node_list *ptr);
1168
1169 public:
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
1196 class 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
1202 protected:
1203 inline explicit ast_node_mark(__isl_take isl_ast_node *ptr);
1204
1205 public:
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
1219 class 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
1225 protected:
1226 inline explicit ast_node_user(__isl_take isl_ast_node *ptr);
1227
1228 public:
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
1239 inline basic_map manage(__isl_take isl_basic_map *ptr);
1240 inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
1241
1242 class 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
1246 protected:
1247 isl_basic_map *ptr = nullptr;
1248
1249 inline explicit basic_map(__isl_take isl_basic_map *ptr);
1250
1251 public:
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
1287 inline basic_set manage(__isl_take isl_basic_set *ptr);
1288 inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
1289
1290 class 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
1294 protected:
1295 isl_basic_set *ptr = nullptr;
1296
1297 inline explicit basic_set(__isl_take isl_basic_set *ptr);
1298
1299 public:
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
1334 inline fixed_box manage(__isl_take isl_fixed_box *ptr);
1335 inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
1336
1337 class 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
1341 protected:
1342 isl_fixed_box *ptr = nullptr;
1343
1344 inline explicit fixed_box(__isl_take isl_fixed_box *ptr);
1345
1346 public:
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
1368 inline id manage(__isl_take isl_id *ptr);
1369 inline id manage_copy(__isl_keep isl_id *ptr);
1370
1371 class id {
1372 friend inline id manage(__isl_take isl_id *ptr);
1373 friend inline id manage_copy(__isl_keep isl_id *ptr);
1374
1375 protected:
1376 isl_id *ptr = nullptr;
1377
1378 inline explicit id(__isl_take isl_id *ptr);
1379
1380 public:
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
1398 inline id_list manage(__isl_take isl_id_list *ptr);
1399 inline id_list manage_copy(__isl_keep isl_id_list *ptr);
1400
1401 class 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
1405 protected:
1406 isl_id_list *ptr = nullptr;
1407
1408 inline explicit id_list(__isl_take isl_id_list *ptr);
1409
1410 public:
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
1438 inline map manage(__isl_take isl_map *ptr);
1439 inline map manage_copy(__isl_keep isl_map *ptr);
1440
1441 class map {
1442 friend inline map manage(__isl_take isl_map *ptr);
1443 friend inline map manage_copy(__isl_keep isl_map *ptr);
1444
1445 protected:
1446 isl_map *ptr = nullptr;
1447
1448 inline explicit map(__isl_take isl_map *ptr);
1449
1450 public:
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
1541 inline multi_aff manage(__isl_take isl_multi_aff *ptr);
1542 inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
1543
1544 class 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
1548 protected:
1549 isl_multi_aff *ptr = nullptr;
1550
1551 inline explicit multi_aff(__isl_take isl_multi_aff *ptr);
1552
1553 public:
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
1611 inline multi_id manage(__isl_take isl_multi_id *ptr);
1612 inline multi_id manage_copy(__isl_keep isl_multi_id *ptr);
1613
1614 class 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
1618 protected:
1619 isl_multi_id *ptr = nullptr;
1620
1621 inline explicit multi_id(__isl_take isl_multi_id *ptr);
1622
1623 public:
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
1652 inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
1653 inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
1654
1655 class 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
1659 protected:
1660 isl_multi_pw_aff *ptr = nullptr;
1661
1662 inline explicit multi_pw_aff(__isl_take isl_multi_pw_aff *ptr);
1663
1664 public:
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
1733 inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
1734 inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
1735
1736 class 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
1740 protected:
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
1745 public:
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
1793 inline multi_val manage(__isl_take isl_multi_val *ptr);
1794 inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
1795
1796 class 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
1800 protected:
1801 isl_multi_val *ptr = nullptr;
1802
1803 inline explicit multi_val(__isl_take isl_multi_val *ptr);
1804
1805 public:
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
1849 inline point manage(__isl_take isl_point *ptr);
1850 inline point manage_copy(__isl_keep isl_point *ptr);
1851
1852 class point {
1853 friend inline point manage(__isl_take isl_point *ptr);
1854 friend inline point manage_copy(__isl_keep isl_point *ptr);
1855
1856 protected:
1857 isl_point *ptr = nullptr;
1858
1859 inline explicit point(__isl_take isl_point *ptr);
1860
1861 public:
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
1878 inline pw_aff manage(__isl_take isl_pw_aff *ptr);
1879 inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
1880
1881 class 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
1885 protected:
1886 isl_pw_aff *ptr = nullptr;
1887
1888 inline explicit pw_aff(__isl_take isl_pw_aff *ptr);
1889
1890 public:
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
1952 inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
1953 inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
1954
1955 class 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
1959 protected:
1960 isl_pw_aff_list *ptr = nullptr;
1961
1962 inline explicit pw_aff_list(__isl_take isl_pw_aff_list *ptr);
1963
1964 public:
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
1990 inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
1991 inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
1992
1993 class 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
1997 protected:
1998 isl_pw_multi_aff *ptr = nullptr;
1999
2000 inline explicit pw_multi_aff(__isl_take isl_pw_multi_aff *ptr);
2001
2002 public:
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
2058 inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
2059 inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
2060
2061 class 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
2065 protected:
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
2070 public:
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
2096 inline schedule manage(__isl_take isl_schedule *ptr);
2097 inline schedule manage_copy(__isl_keep isl_schedule *ptr);
2098
2099 class schedule {
2100 friend inline schedule manage(__isl_take isl_schedule *ptr);
2101 friend inline schedule manage_copy(__isl_keep isl_schedule *ptr);
2102
2103 protected:
2104 isl_schedule *ptr = nullptr;
2105
2106 inline explicit schedule(__isl_take isl_schedule *ptr);
2107
2108 public:
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
2130 inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
2131 inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
2132
2133 class 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
2137 protected:
2138 isl_schedule_constraints *ptr = nullptr;
2139
2140 inline explicit schedule_constraints(__isl_take isl_schedule_constraints *ptr);
2141
2142 public:
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
2179 inline schedule_node manage(__isl_take isl_schedule_node *ptr);
2180 inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
2181
2182 class 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
2186 protected:
2187 isl_schedule_node *ptr = nullptr;
2188
2189 inline explicit schedule_node(__isl_take isl_schedule_node *ptr);
2190
2191 public:
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;
2201 private:
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;
2207 public:
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
2264 class 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
2270 protected:
2271 inline explicit schedule_node_band(__isl_take isl_schedule_node *ptr);
2272
2273 public:
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
2306 class 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
2312 protected:
2313 inline explicit schedule_node_context(__isl_take isl_schedule_node *ptr);
2314
2315 public:
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
2327 class 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
2333 protected:
2334 inline explicit schedule_node_domain(__isl_take isl_schedule_node *ptr);
2335
2336 public:
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
2348 class 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
2354 protected:
2355 inline explicit schedule_node_expansion(__isl_take isl_schedule_node *ptr);
2356
2357 public:
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
2371 class 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
2377 protected:
2378 inline explicit schedule_node_extension(__isl_take isl_schedule_node *ptr);
2379
2380 public:
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
2392 class 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
2398 protected:
2399 inline explicit schedule_node_filter(__isl_take isl_schedule_node *ptr);
2400
2401 public:
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
2413 class 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
2419 protected:
2420 inline explicit schedule_node_guard(__isl_take isl_schedule_node *ptr);
2421
2422 public:
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
2434 class 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
2440 protected:
2441 inline explicit schedule_node_leaf(__isl_take isl_schedule_node *ptr);
2442
2443 public:
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
2453 class 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
2459 protected:
2460 inline explicit schedule_node_mark(__isl_take isl_schedule_node *ptr);
2461
2462 public:
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
2472 class 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
2478 protected:
2479 inline explicit schedule_node_sequence(__isl_take isl_schedule_node *ptr);
2480
2481 public:
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
2491 class 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
2497 protected:
2498 inline explicit schedule_node_set(__isl_take isl_schedule_node *ptr);
2499
2500 public:
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
2509 inline set manage(__isl_take isl_set *ptr);
2510 inline set manage_copy(__isl_keep isl_set *ptr);
2511
2512 class set {
2513 friend inline set manage(__isl_take isl_set *ptr);
2514 friend inline set manage_copy(__isl_keep isl_set *ptr);
2515
2516 protected:
2517 isl_set *ptr = nullptr;
2518
2519 inline explicit set(__isl_take isl_set *ptr);
2520
2521 public:
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
2604 inline space manage(__isl_take isl_space *ptr);
2605 inline space manage_copy(__isl_keep isl_space *ptr);
2606
2607 class space {
2608 friend inline space manage(__isl_take isl_space *ptr);
2609 friend inline space manage_copy(__isl_keep isl_space *ptr);
2610
2611 protected:
2612 isl_space *ptr = nullptr;
2613
2614 inline explicit space(__isl_take isl_space *ptr);
2615
2616 public:
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
2645 inline union_access_info manage(__isl_take isl_union_access_info *ptr);
2646 inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
2647
2648 class 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
2652 protected:
2653 isl_union_access_info *ptr = nullptr;
2654
2655 inline explicit union_access_info(__isl_take isl_union_access_info *ptr);
2656
2657 public:
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
2679 inline union_flow manage(__isl_take isl_union_flow *ptr);
2680 inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
2681
2682 class 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
2686 protected:
2687 isl_union_flow *ptr = nullptr;
2688
2689 inline explicit union_flow(__isl_take isl_union_flow *ptr);
2690
2691 public:
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
2718 inline union_map manage(__isl_take isl_union_map *ptr);
2719 inline union_map manage_copy(__isl_keep isl_union_map *ptr);
2720
2721 class 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
2725 protected:
2726 isl_union_map *ptr = nullptr;
2727
2728 inline explicit union_map(__isl_take isl_union_map *ptr);
2729
2730 public:
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
2825 inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
2826 inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
2827
2828 class 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
2832 protected:
2833 isl_union_pw_aff *ptr = nullptr;
2834
2835 inline explicit union_pw_aff(__isl_take isl_union_pw_aff *ptr);
2836
2837 public:
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
2873 inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
2874 inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
2875
2876 class 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
2880 protected:
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
2885 public:
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
2911 inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
2912 inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
2913
2914 class 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
2918 protected:
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
2923 public:
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
2969 inline union_set manage(__isl_take isl_union_set *ptr);
2970 inline union_set manage_copy(__isl_keep isl_union_set *ptr);
2971
2972 class 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
2976 protected:
2977 isl_union_set *ptr = nullptr;
2978
2979 inline explicit union_set(__isl_take isl_union_set *ptr);
2980
2981 public:
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
3034 inline union_set_list manage(__isl_take isl_union_set_list *ptr);
3035 inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
3036
3037 class 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
3041 protected:
3042 isl_union_set_list *ptr = nullptr;
3043
3044 inline explicit union_set_list(__isl_take isl_union_set_list *ptr);
3045
3046 public:
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
3072 inline val manage(__isl_take isl_val *ptr);
3073 inline val manage_copy(__isl_keep isl_val *ptr);
3074
3075 class val {
3076 friend inline val manage(__isl_take isl_val *ptr);
3077 friend inline val manage_copy(__isl_keep isl_val *ptr);
3078
3079 protected:
3080 isl_val *ptr = nullptr;
3081
3082 inline explicit val(__isl_take isl_val *ptr);
3083
3084 public:
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
3164 inline val_list manage(__isl_take isl_val_list *ptr);
3165 inline val_list manage_copy(__isl_keep isl_val_list *ptr);
3166
3167 class 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
3171 protected:
3172 isl_val_list *ptr = nullptr;
3173
3174 inline explicit val_list(__isl_take isl_val_list *ptr);
3175
3176 public:
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
manage(__isl_take isl_aff * ptr)3204 aff manage(__isl_take isl_aff *ptr) {
3205 return aff(ptr);
3206 }
manage_copy(__isl_keep isl_aff * ptr)3207 aff manage_copy(__isl_keep isl_aff *ptr) {
3208 ptr = isl_aff_copy(ptr);
3209 return aff(ptr);
3210 }
3211
aff()3212 aff::aff()
3213 : ptr(nullptr) {}
3214
aff(const aff & obj)3215 aff::aff(const aff &obj)
3216 : ptr(nullptr)
3217 {
3218 ptr = obj.copy();
3219 }
3220
aff(__isl_take isl_aff * ptr)3221 aff::aff(__isl_take isl_aff *ptr)
3222 : ptr(ptr) {}
3223
aff(isl::checked::ctx ctx,const std::string & str)3224 aff::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
3230 aff &aff::operator=(aff obj) {
3231 std::swap(this->ptr, obj.ptr);
3232 return *this;
3233 }
3234
~aff()3235 aff::~aff() {
3236 if (ptr)
3237 isl_aff_free(ptr);
3238 }
3239
copy()3240 __isl_give isl_aff *aff::copy() const & {
3241 return isl_aff_copy(ptr);
3242 }
3243
get()3244 __isl_keep isl_aff *aff::get() const {
3245 return ptr;
3246 }
3247
release()3248 __isl_give isl_aff *aff::release() {
3249 isl_aff *tmp = ptr;
3250 ptr = nullptr;
3251 return tmp;
3252 }
3253
is_null()3254 bool aff::is_null() const {
3255 return ptr == nullptr;
3256 }
3257
ctx()3258 isl::checked::ctx aff::ctx() const {
3259 return isl::checked::ctx(isl_aff_get_ctx(ptr));
3260 }
3261
add(isl::checked::aff aff2)3262 isl::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
add_constant(isl::checked::val v)3268 isl::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
add_constant(long v)3274 isl::checked::aff aff::add_constant(long v) const
3275 {
3276 return this->add_constant(isl::checked::val(ctx(), v));
3277 }
3278
bind(isl::checked::id id)3279 isl::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
bind(const std::string & id)3285 isl::checked::basic_set aff::bind(const std::string &id) const
3286 {
3287 return this->bind(isl::checked::id(ctx(), id));
3288 }
3289
ceil()3290 isl::checked::aff aff::ceil() const
3291 {
3292 auto res = isl_aff_ceil(copy());
3293 return manage(res);
3294 }
3295
div(isl::checked::aff aff2)3296 isl::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
eq_set(isl::checked::aff aff2)3302 isl::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
eval(isl::checked::point pnt)3308 isl::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
floor()3314 isl::checked::aff aff::floor() const
3315 {
3316 auto res = isl_aff_floor(copy());
3317 return manage(res);
3318 }
3319
ge_set(isl::checked::aff aff2)3320 isl::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
gist(isl::checked::set context)3326 isl::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
gt_set(isl::checked::aff aff2)3332 isl::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
le_set(isl::checked::aff aff2)3338 isl::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
lt_set(isl::checked::aff aff2)3344 isl::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
mod(isl::checked::val mod)3350 isl::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
mod(long mod)3356 isl::checked::aff aff::mod(long mod) const
3357 {
3358 return this->mod(isl::checked::val(ctx(), mod));
3359 }
3360
mul(isl::checked::aff aff2)3361 isl::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
ne_set(isl::checked::aff aff2)3367 isl::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
neg()3373 isl::checked::aff aff::neg() const
3374 {
3375 auto res = isl_aff_neg(copy());
3376 return manage(res);
3377 }
3378
pullback(isl::checked::multi_aff ma)3379 isl::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
scale(isl::checked::val v)3385 isl::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
scale(long v)3391 isl::checked::aff aff::scale(long v) const
3392 {
3393 return this->scale(isl::checked::val(ctx(), v));
3394 }
3395
scale_down(isl::checked::val v)3396 isl::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
scale_down(long v)3402 isl::checked::aff aff::scale_down(long v) const
3403 {
3404 return this->scale_down(isl::checked::val(ctx(), v));
3405 }
3406
sub(isl::checked::aff aff2)3407 isl::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
unbind_params_insert_domain(isl::checked::multi_id domain)3413 isl::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
zero_on_domain(isl::checked::space space)3419 isl::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
3425 inline 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
manage(__isl_take isl_aff_list * ptr)3438 aff_list manage(__isl_take isl_aff_list *ptr) {
3439 return aff_list(ptr);
3440 }
manage_copy(__isl_keep isl_aff_list * ptr)3441 aff_list manage_copy(__isl_keep isl_aff_list *ptr) {
3442 ptr = isl_aff_list_copy(ptr);
3443 return aff_list(ptr);
3444 }
3445
aff_list()3446 aff_list::aff_list()
3447 : ptr(nullptr) {}
3448
aff_list(const aff_list & obj)3449 aff_list::aff_list(const aff_list &obj)
3450 : ptr(nullptr)
3451 {
3452 ptr = obj.copy();
3453 }
3454
aff_list(__isl_take isl_aff_list * ptr)3455 aff_list::aff_list(__isl_take isl_aff_list *ptr)
3456 : ptr(ptr) {}
3457
aff_list(isl::checked::ctx ctx,int n)3458 aff_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
aff_list(isl::checked::aff el)3464 aff_list::aff_list(isl::checked::aff el)
3465 {
3466 auto res = isl_aff_list_from_aff(el.release());
3467 ptr = res;
3468 }
3469
3470 aff_list &aff_list::operator=(aff_list obj) {
3471 std::swap(this->ptr, obj.ptr);
3472 return *this;
3473 }
3474
~aff_list()3475 aff_list::~aff_list() {
3476 if (ptr)
3477 isl_aff_list_free(ptr);
3478 }
3479
copy()3480 __isl_give isl_aff_list *aff_list::copy() const & {
3481 return isl_aff_list_copy(ptr);
3482 }
3483
get()3484 __isl_keep isl_aff_list *aff_list::get() const {
3485 return ptr;
3486 }
3487
release()3488 __isl_give isl_aff_list *aff_list::release() {
3489 isl_aff_list *tmp = ptr;
3490 ptr = nullptr;
3491 return tmp;
3492 }
3493
is_null()3494 bool aff_list::is_null() const {
3495 return ptr == nullptr;
3496 }
3497
ctx()3498 isl::checked::ctx aff_list::ctx() const {
3499 return isl::checked::ctx(isl_aff_list_get_ctx(ptr));
3500 }
3501
add(isl::checked::aff el)3502 isl::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
clear()3508 isl::checked::aff_list aff_list::clear() const
3509 {
3510 auto res = isl_aff_list_clear(copy());
3511 return manage(res);
3512 }
3513
concat(isl::checked::aff_list list2)3514 isl::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
drop(unsigned int first,unsigned int n)3520 isl::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
foreach(const std::function<stat (isl::checked::aff)> & fn)3526 stat 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
at(int index)3540 isl::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
get_at(int index)3546 isl::checked::aff aff_list::get_at(int index) const
3547 {
3548 return at(index);
3549 }
3550
insert(unsigned int pos,isl::checked::aff el)3551 isl::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
size()3557 class size aff_list::size() const
3558 {
3559 auto res = isl_aff_list_size(get());
3560 return manage(res);
3561 }
3562
3563 inline 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
manage(__isl_take isl_ast_build * ptr)3576 ast_build manage(__isl_take isl_ast_build *ptr) {
3577 return ast_build(ptr);
3578 }
manage_copy(__isl_keep isl_ast_build * ptr)3579 ast_build manage_copy(__isl_keep isl_ast_build *ptr) {
3580 ptr = isl_ast_build_copy(ptr);
3581 return ast_build(ptr);
3582 }
3583
ast_build()3584 ast_build::ast_build()
3585 : ptr(nullptr) {}
3586
ast_build(const ast_build & obj)3587 ast_build::ast_build(const ast_build &obj)
3588 : ptr(nullptr)
3589 {
3590 ptr = obj.copy();
3591 copy_callbacks(obj);
3592 }
3593
ast_build(__isl_take isl_ast_build * ptr)3594 ast_build::ast_build(__isl_take isl_ast_build *ptr)
3595 : ptr(ptr) {}
3596
ast_build(isl::checked::ctx ctx)3597 ast_build::ast_build(isl::checked::ctx ctx)
3598 {
3599 auto res = isl_ast_build_alloc(ctx.release());
3600 ptr = res;
3601 }
3602
3603 ast_build &ast_build::operator=(ast_build obj) {
3604 std::swap(this->ptr, obj.ptr);
3605 copy_callbacks(obj);
3606 return *this;
3607 }
3608
~ast_build()3609 ast_build::~ast_build() {
3610 if (ptr)
3611 isl_ast_build_free(ptr);
3612 }
3613
copy()3614 __isl_give isl_ast_build *ast_build::copy() const & {
3615 return isl_ast_build_copy(ptr);
3616 }
3617
get()3618 __isl_keep isl_ast_build *ast_build::get() const {
3619 return ptr;
3620 }
3621
release()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
is_null()3630 bool ast_build::is_null() const {
3631 return ptr == nullptr;
3632 }
3633
ctx()3634 isl::checked::ctx ast_build::ctx() const {
3635 return isl::checked::ctx(isl_ast_build_get_ctx(ptr));
3636 }
3637
copy_callbacks(const ast_build & obj)3638 ast_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
at_each_domain(isl_ast_node * arg_0,isl_ast_build * arg_1,void * arg_2)3644 isl_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
set_at_each_domain_data(const std::function<isl::checked::ast_node (isl::checked::ast_node,isl::checked::ast_build)> & fn)3651 void 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
set_at_each_domain(const std::function<isl::checked::ast_node (isl::checked::ast_node,isl::checked::ast_build)> & fn)3658 isl::checked::ast_build ast_build::set_at_each_domain(const std::function<isl::checked::ast_node(isl::checked::ast_node, isl::checked::ast_build)> &fn) const
3659 {
3660 auto copy = *this;
3661 copy.set_at_each_domain_data(fn);
3662 return copy;
3663 }
3664
access_from(isl::checked::multi_pw_aff mpa)3665 isl::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
access_from(isl::checked::pw_multi_aff pma)3671 isl::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
call_from(isl::checked::multi_pw_aff mpa)3677 isl::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
call_from(isl::checked::pw_multi_aff pma)3683 isl::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
expr_from(isl::checked::pw_aff pa)3689 isl::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
expr_from(isl::checked::set set)3695 isl::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
from_context(isl::checked::set set)3701 isl::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
schedule()3707 isl::checked::union_map ast_build::schedule() const
3708 {
3709 auto res = isl_ast_build_get_schedule(get());
3710 return manage(res);
3711 }
3712
get_schedule()3713 isl::checked::union_map ast_build::get_schedule() const
3714 {
3715 return schedule();
3716 }
3717
node_from(isl::checked::schedule schedule)3718 isl::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
node_from_schedule_map(isl::checked::union_map schedule)3724 isl::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
manage(__isl_take isl_ast_expr * ptr)3731 ast_expr manage(__isl_take isl_ast_expr *ptr) {
3732 return ast_expr(ptr);
3733 }
manage_copy(__isl_keep isl_ast_expr * ptr)3734 ast_expr manage_copy(__isl_keep isl_ast_expr *ptr) {
3735 ptr = isl_ast_expr_copy(ptr);
3736 return ast_expr(ptr);
3737 }
3738
ast_expr()3739 ast_expr::ast_expr()
3740 : ptr(nullptr) {}
3741
ast_expr(const ast_expr & obj)3742 ast_expr::ast_expr(const ast_expr &obj)
3743 : ptr(nullptr)
3744 {
3745 ptr = obj.copy();
3746 }
3747
ast_expr(__isl_take isl_ast_expr * ptr)3748 ast_expr::ast_expr(__isl_take isl_ast_expr *ptr)
3749 : ptr(ptr) {}
3750
3751 ast_expr &ast_expr::operator=(ast_expr obj) {
3752 std::swap(this->ptr, obj.ptr);
3753 return *this;
3754 }
3755
~ast_expr()3756 ast_expr::~ast_expr() {
3757 if (ptr)
3758 isl_ast_expr_free(ptr);
3759 }
3760
copy()3761 __isl_give isl_ast_expr *ast_expr::copy() const & {
3762 return isl_ast_expr_copy(ptr);
3763 }
3764
get()3765 __isl_keep isl_ast_expr *ast_expr::get() const {
3766 return ptr;
3767 }
3768
release()3769 __isl_give isl_ast_expr *ast_expr::release() {
3770 isl_ast_expr *tmp = ptr;
3771 ptr = nullptr;
3772 return tmp;
3773 }
3774
is_null()3775 bool ast_expr::is_null() const {
3776 return ptr == nullptr;
3777 }
3778
3779 template <typename T, typename>
isa_type(T subtype)3780 boolean 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 }
3786 template <class T>
isa()3787 boolean ast_expr::isa() const
3788 {
3789 return isa_type<decltype(T::type)>(T::type);
3790 }
3791 template <class T>
as()3792 T 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
ctx()3799 isl::checked::ctx ast_expr::ctx() const {
3800 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3801 }
3802
to_C_str()3803 std::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
3811 inline 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
ast_expr_id()3824 ast_expr_id::ast_expr_id()
3825 : ast_expr() {}
3826
ast_expr_id(const ast_expr_id & obj)3827 ast_expr_id::ast_expr_id(const ast_expr_id &obj)
3828 : ast_expr(obj)
3829 {
3830 }
3831
ast_expr_id(__isl_take isl_ast_expr * ptr)3832 ast_expr_id::ast_expr_id(__isl_take isl_ast_expr *ptr)
3833 : ast_expr(ptr) {}
3834
3835 ast_expr_id &ast_expr_id::operator=(ast_expr_id obj) {
3836 std::swap(this->ptr, obj.ptr);
3837 return *this;
3838 }
3839
ctx()3840 isl::checked::ctx ast_expr_id::ctx() const {
3841 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3842 }
3843
id()3844 isl::checked::id ast_expr_id::id() const
3845 {
3846 auto res = isl_ast_expr_id_get_id(get());
3847 return manage(res);
3848 }
3849
get_id()3850 isl::checked::id ast_expr_id::get_id() const
3851 {
3852 return id();
3853 }
3854
3855 inline 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
ast_expr_int()3868 ast_expr_int::ast_expr_int()
3869 : ast_expr() {}
3870
ast_expr_int(const ast_expr_int & obj)3871 ast_expr_int::ast_expr_int(const ast_expr_int &obj)
3872 : ast_expr(obj)
3873 {
3874 }
3875
ast_expr_int(__isl_take isl_ast_expr * ptr)3876 ast_expr_int::ast_expr_int(__isl_take isl_ast_expr *ptr)
3877 : ast_expr(ptr) {}
3878
3879 ast_expr_int &ast_expr_int::operator=(ast_expr_int obj) {
3880 std::swap(this->ptr, obj.ptr);
3881 return *this;
3882 }
3883
ctx()3884 isl::checked::ctx ast_expr_int::ctx() const {
3885 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3886 }
3887
val()3888 isl::checked::val ast_expr_int::val() const
3889 {
3890 auto res = isl_ast_expr_int_get_val(get());
3891 return manage(res);
3892 }
3893
get_val()3894 isl::checked::val ast_expr_int::get_val() const
3895 {
3896 return val();
3897 }
3898
3899 inline 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
ast_expr_op()3912 ast_expr_op::ast_expr_op()
3913 : ast_expr() {}
3914
ast_expr_op(const ast_expr_op & obj)3915 ast_expr_op::ast_expr_op(const ast_expr_op &obj)
3916 : ast_expr(obj)
3917 {
3918 }
3919
ast_expr_op(__isl_take isl_ast_expr * ptr)3920 ast_expr_op::ast_expr_op(__isl_take isl_ast_expr *ptr)
3921 : ast_expr(ptr) {}
3922
3923 ast_expr_op &ast_expr_op::operator=(ast_expr_op obj) {
3924 std::swap(this->ptr, obj.ptr);
3925 return *this;
3926 }
3927
3928 template <typename T, typename>
isa_type(T subtype)3929 boolean 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 }
3935 template <class T>
isa()3936 boolean ast_expr_op::isa() const
3937 {
3938 return isa_type<decltype(T::type)>(T::type);
3939 }
3940 template <class T>
as()3941 T 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
ctx()3948 isl::checked::ctx ast_expr_op::ctx() const {
3949 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
3950 }
3951
arg(int pos)3952 isl::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
get_arg(int pos)3958 isl::checked::ast_expr ast_expr_op::get_arg(int pos) const
3959 {
3960 return arg(pos);
3961 }
3962
n_arg()3963 class 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
get_n_arg()3969 class size ast_expr_op::get_n_arg() const
3970 {
3971 return n_arg();
3972 }
3973
3974 inline 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
ast_expr_op_access()3987 ast_expr_op_access::ast_expr_op_access()
3988 : ast_expr_op() {}
3989
ast_expr_op_access(const ast_expr_op_access & obj)3990 ast_expr_op_access::ast_expr_op_access(const ast_expr_op_access &obj)
3991 : ast_expr_op(obj)
3992 {
3993 }
3994
ast_expr_op_access(__isl_take isl_ast_expr * ptr)3995 ast_expr_op_access::ast_expr_op_access(__isl_take isl_ast_expr *ptr)
3996 : ast_expr_op(ptr) {}
3997
3998 ast_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
ctx()4003 isl::checked::ctx ast_expr_op_access::ctx() const {
4004 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4005 }
4006
4007 inline 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
ast_expr_op_add()4020 ast_expr_op_add::ast_expr_op_add()
4021 : ast_expr_op() {}
4022
ast_expr_op_add(const ast_expr_op_add & obj)4023 ast_expr_op_add::ast_expr_op_add(const ast_expr_op_add &obj)
4024 : ast_expr_op(obj)
4025 {
4026 }
4027
ast_expr_op_add(__isl_take isl_ast_expr * ptr)4028 ast_expr_op_add::ast_expr_op_add(__isl_take isl_ast_expr *ptr)
4029 : ast_expr_op(ptr) {}
4030
4031 ast_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
ctx()4036 isl::checked::ctx ast_expr_op_add::ctx() const {
4037 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4038 }
4039
4040 inline 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
ast_expr_op_address_of()4053 ast_expr_op_address_of::ast_expr_op_address_of()
4054 : ast_expr_op() {}
4055
ast_expr_op_address_of(const ast_expr_op_address_of & obj)4056 ast_expr_op_address_of::ast_expr_op_address_of(const ast_expr_op_address_of &obj)
4057 : ast_expr_op(obj)
4058 {
4059 }
4060
ast_expr_op_address_of(__isl_take isl_ast_expr * ptr)4061 ast_expr_op_address_of::ast_expr_op_address_of(__isl_take isl_ast_expr *ptr)
4062 : ast_expr_op(ptr) {}
4063
4064 ast_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
ctx()4069 isl::checked::ctx ast_expr_op_address_of::ctx() const {
4070 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4071 }
4072
4073 inline 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
ast_expr_op_and()4086 ast_expr_op_and::ast_expr_op_and()
4087 : ast_expr_op() {}
4088
ast_expr_op_and(const ast_expr_op_and & obj)4089 ast_expr_op_and::ast_expr_op_and(const ast_expr_op_and &obj)
4090 : ast_expr_op(obj)
4091 {
4092 }
4093
ast_expr_op_and(__isl_take isl_ast_expr * ptr)4094 ast_expr_op_and::ast_expr_op_and(__isl_take isl_ast_expr *ptr)
4095 : ast_expr_op(ptr) {}
4096
4097 ast_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
ctx()4102 isl::checked::ctx ast_expr_op_and::ctx() const {
4103 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4104 }
4105
4106 inline 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
ast_expr_op_and_then()4119 ast_expr_op_and_then::ast_expr_op_and_then()
4120 : ast_expr_op() {}
4121
ast_expr_op_and_then(const ast_expr_op_and_then & obj)4122 ast_expr_op_and_then::ast_expr_op_and_then(const ast_expr_op_and_then &obj)
4123 : ast_expr_op(obj)
4124 {
4125 }
4126
ast_expr_op_and_then(__isl_take isl_ast_expr * ptr)4127 ast_expr_op_and_then::ast_expr_op_and_then(__isl_take isl_ast_expr *ptr)
4128 : ast_expr_op(ptr) {}
4129
4130 ast_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
ctx()4135 isl::checked::ctx ast_expr_op_and_then::ctx() const {
4136 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4137 }
4138
4139 inline 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
ast_expr_op_call()4152 ast_expr_op_call::ast_expr_op_call()
4153 : ast_expr_op() {}
4154
ast_expr_op_call(const ast_expr_op_call & obj)4155 ast_expr_op_call::ast_expr_op_call(const ast_expr_op_call &obj)
4156 : ast_expr_op(obj)
4157 {
4158 }
4159
ast_expr_op_call(__isl_take isl_ast_expr * ptr)4160 ast_expr_op_call::ast_expr_op_call(__isl_take isl_ast_expr *ptr)
4161 : ast_expr_op(ptr) {}
4162
4163 ast_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
ctx()4168 isl::checked::ctx ast_expr_op_call::ctx() const {
4169 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4170 }
4171
4172 inline 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
ast_expr_op_cond()4185 ast_expr_op_cond::ast_expr_op_cond()
4186 : ast_expr_op() {}
4187
ast_expr_op_cond(const ast_expr_op_cond & obj)4188 ast_expr_op_cond::ast_expr_op_cond(const ast_expr_op_cond &obj)
4189 : ast_expr_op(obj)
4190 {
4191 }
4192
ast_expr_op_cond(__isl_take isl_ast_expr * ptr)4193 ast_expr_op_cond::ast_expr_op_cond(__isl_take isl_ast_expr *ptr)
4194 : ast_expr_op(ptr) {}
4195
4196 ast_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
ctx()4201 isl::checked::ctx ast_expr_op_cond::ctx() const {
4202 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4203 }
4204
4205 inline 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
ast_expr_op_div()4218 ast_expr_op_div::ast_expr_op_div()
4219 : ast_expr_op() {}
4220
ast_expr_op_div(const ast_expr_op_div & obj)4221 ast_expr_op_div::ast_expr_op_div(const ast_expr_op_div &obj)
4222 : ast_expr_op(obj)
4223 {
4224 }
4225
ast_expr_op_div(__isl_take isl_ast_expr * ptr)4226 ast_expr_op_div::ast_expr_op_div(__isl_take isl_ast_expr *ptr)
4227 : ast_expr_op(ptr) {}
4228
4229 ast_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
ctx()4234 isl::checked::ctx ast_expr_op_div::ctx() const {
4235 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4236 }
4237
4238 inline 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
ast_expr_op_eq()4251 ast_expr_op_eq::ast_expr_op_eq()
4252 : ast_expr_op() {}
4253
ast_expr_op_eq(const ast_expr_op_eq & obj)4254 ast_expr_op_eq::ast_expr_op_eq(const ast_expr_op_eq &obj)
4255 : ast_expr_op(obj)
4256 {
4257 }
4258
ast_expr_op_eq(__isl_take isl_ast_expr * ptr)4259 ast_expr_op_eq::ast_expr_op_eq(__isl_take isl_ast_expr *ptr)
4260 : ast_expr_op(ptr) {}
4261
4262 ast_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
ctx()4267 isl::checked::ctx ast_expr_op_eq::ctx() const {
4268 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4269 }
4270
4271 inline 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
ast_expr_op_fdiv_q()4284 ast_expr_op_fdiv_q::ast_expr_op_fdiv_q()
4285 : ast_expr_op() {}
4286
ast_expr_op_fdiv_q(const ast_expr_op_fdiv_q & obj)4287 ast_expr_op_fdiv_q::ast_expr_op_fdiv_q(const ast_expr_op_fdiv_q &obj)
4288 : ast_expr_op(obj)
4289 {
4290 }
4291
ast_expr_op_fdiv_q(__isl_take isl_ast_expr * ptr)4292 ast_expr_op_fdiv_q::ast_expr_op_fdiv_q(__isl_take isl_ast_expr *ptr)
4293 : ast_expr_op(ptr) {}
4294
4295 ast_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
ctx()4300 isl::checked::ctx ast_expr_op_fdiv_q::ctx() const {
4301 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4302 }
4303
4304 inline 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
ast_expr_op_ge()4317 ast_expr_op_ge::ast_expr_op_ge()
4318 : ast_expr_op() {}
4319
ast_expr_op_ge(const ast_expr_op_ge & obj)4320 ast_expr_op_ge::ast_expr_op_ge(const ast_expr_op_ge &obj)
4321 : ast_expr_op(obj)
4322 {
4323 }
4324
ast_expr_op_ge(__isl_take isl_ast_expr * ptr)4325 ast_expr_op_ge::ast_expr_op_ge(__isl_take isl_ast_expr *ptr)
4326 : ast_expr_op(ptr) {}
4327
4328 ast_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
ctx()4333 isl::checked::ctx ast_expr_op_ge::ctx() const {
4334 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4335 }
4336
4337 inline 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
ast_expr_op_gt()4350 ast_expr_op_gt::ast_expr_op_gt()
4351 : ast_expr_op() {}
4352
ast_expr_op_gt(const ast_expr_op_gt & obj)4353 ast_expr_op_gt::ast_expr_op_gt(const ast_expr_op_gt &obj)
4354 : ast_expr_op(obj)
4355 {
4356 }
4357
ast_expr_op_gt(__isl_take isl_ast_expr * ptr)4358 ast_expr_op_gt::ast_expr_op_gt(__isl_take isl_ast_expr *ptr)
4359 : ast_expr_op(ptr) {}
4360
4361 ast_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
ctx()4366 isl::checked::ctx ast_expr_op_gt::ctx() const {
4367 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4368 }
4369
4370 inline 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
ast_expr_op_le()4383 ast_expr_op_le::ast_expr_op_le()
4384 : ast_expr_op() {}
4385
ast_expr_op_le(const ast_expr_op_le & obj)4386 ast_expr_op_le::ast_expr_op_le(const ast_expr_op_le &obj)
4387 : ast_expr_op(obj)
4388 {
4389 }
4390
ast_expr_op_le(__isl_take isl_ast_expr * ptr)4391 ast_expr_op_le::ast_expr_op_le(__isl_take isl_ast_expr *ptr)
4392 : ast_expr_op(ptr) {}
4393
4394 ast_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
ctx()4399 isl::checked::ctx ast_expr_op_le::ctx() const {
4400 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4401 }
4402
4403 inline 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
ast_expr_op_lt()4416 ast_expr_op_lt::ast_expr_op_lt()
4417 : ast_expr_op() {}
4418
ast_expr_op_lt(const ast_expr_op_lt & obj)4419 ast_expr_op_lt::ast_expr_op_lt(const ast_expr_op_lt &obj)
4420 : ast_expr_op(obj)
4421 {
4422 }
4423
ast_expr_op_lt(__isl_take isl_ast_expr * ptr)4424 ast_expr_op_lt::ast_expr_op_lt(__isl_take isl_ast_expr *ptr)
4425 : ast_expr_op(ptr) {}
4426
4427 ast_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
ctx()4432 isl::checked::ctx ast_expr_op_lt::ctx() const {
4433 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4434 }
4435
4436 inline 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
ast_expr_op_max()4449 ast_expr_op_max::ast_expr_op_max()
4450 : ast_expr_op() {}
4451
ast_expr_op_max(const ast_expr_op_max & obj)4452 ast_expr_op_max::ast_expr_op_max(const ast_expr_op_max &obj)
4453 : ast_expr_op(obj)
4454 {
4455 }
4456
ast_expr_op_max(__isl_take isl_ast_expr * ptr)4457 ast_expr_op_max::ast_expr_op_max(__isl_take isl_ast_expr *ptr)
4458 : ast_expr_op(ptr) {}
4459
4460 ast_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
ctx()4465 isl::checked::ctx ast_expr_op_max::ctx() const {
4466 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4467 }
4468
4469 inline 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
ast_expr_op_member()4482 ast_expr_op_member::ast_expr_op_member()
4483 : ast_expr_op() {}
4484
ast_expr_op_member(const ast_expr_op_member & obj)4485 ast_expr_op_member::ast_expr_op_member(const ast_expr_op_member &obj)
4486 : ast_expr_op(obj)
4487 {
4488 }
4489
ast_expr_op_member(__isl_take isl_ast_expr * ptr)4490 ast_expr_op_member::ast_expr_op_member(__isl_take isl_ast_expr *ptr)
4491 : ast_expr_op(ptr) {}
4492
4493 ast_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
ctx()4498 isl::checked::ctx ast_expr_op_member::ctx() const {
4499 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4500 }
4501
4502 inline 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
ast_expr_op_min()4515 ast_expr_op_min::ast_expr_op_min()
4516 : ast_expr_op() {}
4517
ast_expr_op_min(const ast_expr_op_min & obj)4518 ast_expr_op_min::ast_expr_op_min(const ast_expr_op_min &obj)
4519 : ast_expr_op(obj)
4520 {
4521 }
4522
ast_expr_op_min(__isl_take isl_ast_expr * ptr)4523 ast_expr_op_min::ast_expr_op_min(__isl_take isl_ast_expr *ptr)
4524 : ast_expr_op(ptr) {}
4525
4526 ast_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
ctx()4531 isl::checked::ctx ast_expr_op_min::ctx() const {
4532 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4533 }
4534
4535 inline 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
ast_expr_op_minus()4548 ast_expr_op_minus::ast_expr_op_minus()
4549 : ast_expr_op() {}
4550
ast_expr_op_minus(const ast_expr_op_minus & obj)4551 ast_expr_op_minus::ast_expr_op_minus(const ast_expr_op_minus &obj)
4552 : ast_expr_op(obj)
4553 {
4554 }
4555
ast_expr_op_minus(__isl_take isl_ast_expr * ptr)4556 ast_expr_op_minus::ast_expr_op_minus(__isl_take isl_ast_expr *ptr)
4557 : ast_expr_op(ptr) {}
4558
4559 ast_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
ctx()4564 isl::checked::ctx ast_expr_op_minus::ctx() const {
4565 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4566 }
4567
4568 inline 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
ast_expr_op_mul()4581 ast_expr_op_mul::ast_expr_op_mul()
4582 : ast_expr_op() {}
4583
ast_expr_op_mul(const ast_expr_op_mul & obj)4584 ast_expr_op_mul::ast_expr_op_mul(const ast_expr_op_mul &obj)
4585 : ast_expr_op(obj)
4586 {
4587 }
4588
ast_expr_op_mul(__isl_take isl_ast_expr * ptr)4589 ast_expr_op_mul::ast_expr_op_mul(__isl_take isl_ast_expr *ptr)
4590 : ast_expr_op(ptr) {}
4591
4592 ast_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
ctx()4597 isl::checked::ctx ast_expr_op_mul::ctx() const {
4598 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4599 }
4600
4601 inline 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
ast_expr_op_or()4614 ast_expr_op_or::ast_expr_op_or()
4615 : ast_expr_op() {}
4616
ast_expr_op_or(const ast_expr_op_or & obj)4617 ast_expr_op_or::ast_expr_op_or(const ast_expr_op_or &obj)
4618 : ast_expr_op(obj)
4619 {
4620 }
4621
ast_expr_op_or(__isl_take isl_ast_expr * ptr)4622 ast_expr_op_or::ast_expr_op_or(__isl_take isl_ast_expr *ptr)
4623 : ast_expr_op(ptr) {}
4624
4625 ast_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
ctx()4630 isl::checked::ctx ast_expr_op_or::ctx() const {
4631 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4632 }
4633
4634 inline 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
ast_expr_op_or_else()4647 ast_expr_op_or_else::ast_expr_op_or_else()
4648 : ast_expr_op() {}
4649
ast_expr_op_or_else(const ast_expr_op_or_else & obj)4650 ast_expr_op_or_else::ast_expr_op_or_else(const ast_expr_op_or_else &obj)
4651 : ast_expr_op(obj)
4652 {
4653 }
4654
ast_expr_op_or_else(__isl_take isl_ast_expr * ptr)4655 ast_expr_op_or_else::ast_expr_op_or_else(__isl_take isl_ast_expr *ptr)
4656 : ast_expr_op(ptr) {}
4657
4658 ast_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
ctx()4663 isl::checked::ctx ast_expr_op_or_else::ctx() const {
4664 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4665 }
4666
4667 inline 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
ast_expr_op_pdiv_q()4680 ast_expr_op_pdiv_q::ast_expr_op_pdiv_q()
4681 : ast_expr_op() {}
4682
ast_expr_op_pdiv_q(const ast_expr_op_pdiv_q & obj)4683 ast_expr_op_pdiv_q::ast_expr_op_pdiv_q(const ast_expr_op_pdiv_q &obj)
4684 : ast_expr_op(obj)
4685 {
4686 }
4687
ast_expr_op_pdiv_q(__isl_take isl_ast_expr * ptr)4688 ast_expr_op_pdiv_q::ast_expr_op_pdiv_q(__isl_take isl_ast_expr *ptr)
4689 : ast_expr_op(ptr) {}
4690
4691 ast_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
ctx()4696 isl::checked::ctx ast_expr_op_pdiv_q::ctx() const {
4697 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4698 }
4699
4700 inline 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
ast_expr_op_pdiv_r()4713 ast_expr_op_pdiv_r::ast_expr_op_pdiv_r()
4714 : ast_expr_op() {}
4715
ast_expr_op_pdiv_r(const ast_expr_op_pdiv_r & obj)4716 ast_expr_op_pdiv_r::ast_expr_op_pdiv_r(const ast_expr_op_pdiv_r &obj)
4717 : ast_expr_op(obj)
4718 {
4719 }
4720
ast_expr_op_pdiv_r(__isl_take isl_ast_expr * ptr)4721 ast_expr_op_pdiv_r::ast_expr_op_pdiv_r(__isl_take isl_ast_expr *ptr)
4722 : ast_expr_op(ptr) {}
4723
4724 ast_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
ctx()4729 isl::checked::ctx ast_expr_op_pdiv_r::ctx() const {
4730 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4731 }
4732
4733 inline 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
ast_expr_op_select()4746 ast_expr_op_select::ast_expr_op_select()
4747 : ast_expr_op() {}
4748
ast_expr_op_select(const ast_expr_op_select & obj)4749 ast_expr_op_select::ast_expr_op_select(const ast_expr_op_select &obj)
4750 : ast_expr_op(obj)
4751 {
4752 }
4753
ast_expr_op_select(__isl_take isl_ast_expr * ptr)4754 ast_expr_op_select::ast_expr_op_select(__isl_take isl_ast_expr *ptr)
4755 : ast_expr_op(ptr) {}
4756
4757 ast_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
ctx()4762 isl::checked::ctx ast_expr_op_select::ctx() const {
4763 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4764 }
4765
4766 inline 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
ast_expr_op_sub()4779 ast_expr_op_sub::ast_expr_op_sub()
4780 : ast_expr_op() {}
4781
ast_expr_op_sub(const ast_expr_op_sub & obj)4782 ast_expr_op_sub::ast_expr_op_sub(const ast_expr_op_sub &obj)
4783 : ast_expr_op(obj)
4784 {
4785 }
4786
ast_expr_op_sub(__isl_take isl_ast_expr * ptr)4787 ast_expr_op_sub::ast_expr_op_sub(__isl_take isl_ast_expr *ptr)
4788 : ast_expr_op(ptr) {}
4789
4790 ast_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
ctx()4795 isl::checked::ctx ast_expr_op_sub::ctx() const {
4796 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4797 }
4798
4799 inline 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
ast_expr_op_zdiv_r()4812 ast_expr_op_zdiv_r::ast_expr_op_zdiv_r()
4813 : ast_expr_op() {}
4814
ast_expr_op_zdiv_r(const ast_expr_op_zdiv_r & obj)4815 ast_expr_op_zdiv_r::ast_expr_op_zdiv_r(const ast_expr_op_zdiv_r &obj)
4816 : ast_expr_op(obj)
4817 {
4818 }
4819
ast_expr_op_zdiv_r(__isl_take isl_ast_expr * ptr)4820 ast_expr_op_zdiv_r::ast_expr_op_zdiv_r(__isl_take isl_ast_expr *ptr)
4821 : ast_expr_op(ptr) {}
4822
4823 ast_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
ctx()4828 isl::checked::ctx ast_expr_op_zdiv_r::ctx() const {
4829 return isl::checked::ctx(isl_ast_expr_get_ctx(ptr));
4830 }
4831
4832 inline 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
manage(__isl_take isl_ast_node * ptr)4845 ast_node manage(__isl_take isl_ast_node *ptr) {
4846 return ast_node(ptr);
4847 }
manage_copy(__isl_keep isl_ast_node * ptr)4848 ast_node manage_copy(__isl_keep isl_ast_node *ptr) {
4849 ptr = isl_ast_node_copy(ptr);
4850 return ast_node(ptr);
4851 }
4852
ast_node()4853 ast_node::ast_node()
4854 : ptr(nullptr) {}
4855
ast_node(const ast_node & obj)4856 ast_node::ast_node(const ast_node &obj)
4857 : ptr(nullptr)
4858 {
4859 ptr = obj.copy();
4860 }
4861
ast_node(__isl_take isl_ast_node * ptr)4862 ast_node::ast_node(__isl_take isl_ast_node *ptr)
4863 : ptr(ptr) {}
4864
4865 ast_node &ast_node::operator=(ast_node obj) {
4866 std::swap(this->ptr, obj.ptr);
4867 return *this;
4868 }
4869
~ast_node()4870 ast_node::~ast_node() {
4871 if (ptr)
4872 isl_ast_node_free(ptr);
4873 }
4874
copy()4875 __isl_give isl_ast_node *ast_node::copy() const & {
4876 return isl_ast_node_copy(ptr);
4877 }
4878
get()4879 __isl_keep isl_ast_node *ast_node::get() const {
4880 return ptr;
4881 }
4882
release()4883 __isl_give isl_ast_node *ast_node::release() {
4884 isl_ast_node *tmp = ptr;
4885 ptr = nullptr;
4886 return tmp;
4887 }
4888
is_null()4889 bool ast_node::is_null() const {
4890 return ptr == nullptr;
4891 }
4892
4893 template <typename T, typename>
isa_type(T subtype)4894 boolean 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 }
4900 template <class T>
isa()4901 boolean ast_node::isa() const
4902 {
4903 return isa_type<decltype(T::type)>(T::type);
4904 }
4905 template <class T>
as()4906 T 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
ctx()4913 isl::checked::ctx ast_node::ctx() const {
4914 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
4915 }
4916
to_C_str()4917 std::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
4925 inline 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
ast_node_block()4938 ast_node_block::ast_node_block()
4939 : ast_node() {}
4940
ast_node_block(const ast_node_block & obj)4941 ast_node_block::ast_node_block(const ast_node_block &obj)
4942 : ast_node(obj)
4943 {
4944 }
4945
ast_node_block(__isl_take isl_ast_node * ptr)4946 ast_node_block::ast_node_block(__isl_take isl_ast_node *ptr)
4947 : ast_node(ptr) {}
4948
4949 ast_node_block &ast_node_block::operator=(ast_node_block obj) {
4950 std::swap(this->ptr, obj.ptr);
4951 return *this;
4952 }
4953
ctx()4954 isl::checked::ctx ast_node_block::ctx() const {
4955 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
4956 }
4957
children()4958 isl::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
get_children()4964 isl::checked::ast_node_list ast_node_block::get_children() const
4965 {
4966 return children();
4967 }
4968
4969 inline 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
ast_node_for()4982 ast_node_for::ast_node_for()
4983 : ast_node() {}
4984
ast_node_for(const ast_node_for & obj)4985 ast_node_for::ast_node_for(const ast_node_for &obj)
4986 : ast_node(obj)
4987 {
4988 }
4989
ast_node_for(__isl_take isl_ast_node * ptr)4990 ast_node_for::ast_node_for(__isl_take isl_ast_node *ptr)
4991 : ast_node(ptr) {}
4992
4993 ast_node_for &ast_node_for::operator=(ast_node_for obj) {
4994 std::swap(this->ptr, obj.ptr);
4995 return *this;
4996 }
4997
ctx()4998 isl::checked::ctx ast_node_for::ctx() const {
4999 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5000 }
5001
body()5002 isl::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
get_body()5008 isl::checked::ast_node ast_node_for::get_body() const
5009 {
5010 return body();
5011 }
5012
cond()5013 isl::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
get_cond()5019 isl::checked::ast_expr ast_node_for::get_cond() const
5020 {
5021 return cond();
5022 }
5023
inc()5024 isl::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
get_inc()5030 isl::checked::ast_expr ast_node_for::get_inc() const
5031 {
5032 return inc();
5033 }
5034
init()5035 isl::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
get_init()5041 isl::checked::ast_expr ast_node_for::get_init() const
5042 {
5043 return init();
5044 }
5045
iterator()5046 isl::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
get_iterator()5052 isl::checked::ast_expr ast_node_for::get_iterator() const
5053 {
5054 return iterator();
5055 }
5056
is_degenerate()5057 boolean ast_node_for::is_degenerate() const
5058 {
5059 auto res = isl_ast_node_for_is_degenerate(get());
5060 return manage(res);
5061 }
5062
5063 inline 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
ast_node_if()5076 ast_node_if::ast_node_if()
5077 : ast_node() {}
5078
ast_node_if(const ast_node_if & obj)5079 ast_node_if::ast_node_if(const ast_node_if &obj)
5080 : ast_node(obj)
5081 {
5082 }
5083
ast_node_if(__isl_take isl_ast_node * ptr)5084 ast_node_if::ast_node_if(__isl_take isl_ast_node *ptr)
5085 : ast_node(ptr) {}
5086
5087 ast_node_if &ast_node_if::operator=(ast_node_if obj) {
5088 std::swap(this->ptr, obj.ptr);
5089 return *this;
5090 }
5091
ctx()5092 isl::checked::ctx ast_node_if::ctx() const {
5093 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5094 }
5095
cond()5096 isl::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
get_cond()5102 isl::checked::ast_expr ast_node_if::get_cond() const
5103 {
5104 return cond();
5105 }
5106
else_node()5107 isl::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
get_else_node()5113 isl::checked::ast_node ast_node_if::get_else_node() const
5114 {
5115 return else_node();
5116 }
5117
then_node()5118 isl::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
get_then_node()5124 isl::checked::ast_node ast_node_if::get_then_node() const
5125 {
5126 return then_node();
5127 }
5128
has_else_node()5129 boolean 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
5135 inline 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
manage(__isl_take isl_ast_node_list * ptr)5148 ast_node_list manage(__isl_take isl_ast_node_list *ptr) {
5149 return ast_node_list(ptr);
5150 }
manage_copy(__isl_keep isl_ast_node_list * ptr)5151 ast_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
ast_node_list()5156 ast_node_list::ast_node_list()
5157 : ptr(nullptr) {}
5158
ast_node_list(const ast_node_list & obj)5159 ast_node_list::ast_node_list(const ast_node_list &obj)
5160 : ptr(nullptr)
5161 {
5162 ptr = obj.copy();
5163 }
5164
ast_node_list(__isl_take isl_ast_node_list * ptr)5165 ast_node_list::ast_node_list(__isl_take isl_ast_node_list *ptr)
5166 : ptr(ptr) {}
5167
ast_node_list(isl::checked::ctx ctx,int n)5168 ast_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
ast_node_list(isl::checked::ast_node el)5174 ast_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
5180 ast_node_list &ast_node_list::operator=(ast_node_list obj) {
5181 std::swap(this->ptr, obj.ptr);
5182 return *this;
5183 }
5184
~ast_node_list()5185 ast_node_list::~ast_node_list() {
5186 if (ptr)
5187 isl_ast_node_list_free(ptr);
5188 }
5189
copy()5190 __isl_give isl_ast_node_list *ast_node_list::copy() const & {
5191 return isl_ast_node_list_copy(ptr);
5192 }
5193
get()5194 __isl_keep isl_ast_node_list *ast_node_list::get() const {
5195 return ptr;
5196 }
5197
release()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
is_null()5204 bool ast_node_list::is_null() const {
5205 return ptr == nullptr;
5206 }
5207
ctx()5208 isl::checked::ctx ast_node_list::ctx() const {
5209 return isl::checked::ctx(isl_ast_node_list_get_ctx(ptr));
5210 }
5211
add(isl::checked::ast_node el)5212 isl::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
clear()5218 isl::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
concat(isl::checked::ast_node_list list2)5224 isl::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
drop(unsigned int first,unsigned int n)5230 isl::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
foreach(const std::function<stat (isl::checked::ast_node)> & fn)5236 stat 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
at(int index)5250 isl::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
get_at(int index)5256 isl::checked::ast_node ast_node_list::get_at(int index) const
5257 {
5258 return at(index);
5259 }
5260
insert(unsigned int pos,isl::checked::ast_node el)5261 isl::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
size()5267 class size ast_node_list::size() const
5268 {
5269 auto res = isl_ast_node_list_size(get());
5270 return manage(res);
5271 }
5272
5273 inline 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
ast_node_mark()5286 ast_node_mark::ast_node_mark()
5287 : ast_node() {}
5288
ast_node_mark(const ast_node_mark & obj)5289 ast_node_mark::ast_node_mark(const ast_node_mark &obj)
5290 : ast_node(obj)
5291 {
5292 }
5293
ast_node_mark(__isl_take isl_ast_node * ptr)5294 ast_node_mark::ast_node_mark(__isl_take isl_ast_node *ptr)
5295 : ast_node(ptr) {}
5296
5297 ast_node_mark &ast_node_mark::operator=(ast_node_mark obj) {
5298 std::swap(this->ptr, obj.ptr);
5299 return *this;
5300 }
5301
ctx()5302 isl::checked::ctx ast_node_mark::ctx() const {
5303 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5304 }
5305
id()5306 isl::checked::id ast_node_mark::id() const
5307 {
5308 auto res = isl_ast_node_mark_get_id(get());
5309 return manage(res);
5310 }
5311
get_id()5312 isl::checked::id ast_node_mark::get_id() const
5313 {
5314 return id();
5315 }
5316
node()5317 isl::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
get_node()5323 isl::checked::ast_node ast_node_mark::get_node() const
5324 {
5325 return node();
5326 }
5327
5328 inline 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
ast_node_user()5341 ast_node_user::ast_node_user()
5342 : ast_node() {}
5343
ast_node_user(const ast_node_user & obj)5344 ast_node_user::ast_node_user(const ast_node_user &obj)
5345 : ast_node(obj)
5346 {
5347 }
5348
ast_node_user(__isl_take isl_ast_node * ptr)5349 ast_node_user::ast_node_user(__isl_take isl_ast_node *ptr)
5350 : ast_node(ptr) {}
5351
5352 ast_node_user &ast_node_user::operator=(ast_node_user obj) {
5353 std::swap(this->ptr, obj.ptr);
5354 return *this;
5355 }
5356
ctx()5357 isl::checked::ctx ast_node_user::ctx() const {
5358 return isl::checked::ctx(isl_ast_node_get_ctx(ptr));
5359 }
5360
expr()5361 isl::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
get_expr()5367 isl::checked::ast_expr ast_node_user::get_expr() const
5368 {
5369 return expr();
5370 }
5371
5372 inline 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
manage(__isl_take isl_basic_map * ptr)5385 basic_map manage(__isl_take isl_basic_map *ptr) {
5386 return basic_map(ptr);
5387 }
manage_copy(__isl_keep isl_basic_map * ptr)5388 basic_map manage_copy(__isl_keep isl_basic_map *ptr) {
5389 ptr = isl_basic_map_copy(ptr);
5390 return basic_map(ptr);
5391 }
5392
basic_map()5393 basic_map::basic_map()
5394 : ptr(nullptr) {}
5395
basic_map(const basic_map & obj)5396 basic_map::basic_map(const basic_map &obj)
5397 : ptr(nullptr)
5398 {
5399 ptr = obj.copy();
5400 }
5401
basic_map(__isl_take isl_basic_map * ptr)5402 basic_map::basic_map(__isl_take isl_basic_map *ptr)
5403 : ptr(ptr) {}
5404
basic_map(isl::checked::ctx ctx,const std::string & str)5405 basic_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
5411 basic_map &basic_map::operator=(basic_map obj) {
5412 std::swap(this->ptr, obj.ptr);
5413 return *this;
5414 }
5415
~basic_map()5416 basic_map::~basic_map() {
5417 if (ptr)
5418 isl_basic_map_free(ptr);
5419 }
5420
copy()5421 __isl_give isl_basic_map *basic_map::copy() const & {
5422 return isl_basic_map_copy(ptr);
5423 }
5424
get()5425 __isl_keep isl_basic_map *basic_map::get() const {
5426 return ptr;
5427 }
5428
release()5429 __isl_give isl_basic_map *basic_map::release() {
5430 isl_basic_map *tmp = ptr;
5431 ptr = nullptr;
5432 return tmp;
5433 }
5434
is_null()5435 bool basic_map::is_null() const {
5436 return ptr == nullptr;
5437 }
5438
ctx()5439 isl::checked::ctx basic_map::ctx() const {
5440 return isl::checked::ctx(isl_basic_map_get_ctx(ptr));
5441 }
5442
affine_hull()5443 isl::checked::basic_map basic_map::affine_hull() const
5444 {
5445 auto res = isl_basic_map_affine_hull(copy());
5446 return manage(res);
5447 }
5448
apply_domain(isl::checked::basic_map bmap2)5449 isl::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
apply_range(isl::checked::basic_map bmap2)5455 isl::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
deltas()5461 isl::checked::basic_set basic_map::deltas() const
5462 {
5463 auto res = isl_basic_map_deltas(copy());
5464 return manage(res);
5465 }
5466
detect_equalities()5467 isl::checked::basic_map basic_map::detect_equalities() const
5468 {
5469 auto res = isl_basic_map_detect_equalities(copy());
5470 return manage(res);
5471 }
5472
flatten()5473 isl::checked::basic_map basic_map::flatten() const
5474 {
5475 auto res = isl_basic_map_flatten(copy());
5476 return manage(res);
5477 }
5478
flatten_domain()5479 isl::checked::basic_map basic_map::flatten_domain() const
5480 {
5481 auto res = isl_basic_map_flatten_domain(copy());
5482 return manage(res);
5483 }
5484
flatten_range()5485 isl::checked::basic_map basic_map::flatten_range() const
5486 {
5487 auto res = isl_basic_map_flatten_range(copy());
5488 return manage(res);
5489 }
5490
gist(isl::checked::basic_map context)5491 isl::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
intersect(isl::checked::basic_map bmap2)5497 isl::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
intersect_domain(isl::checked::basic_set bset)5503 isl::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
intersect_range(isl::checked::basic_set bset)5509 isl::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
is_empty()5515 boolean basic_map::is_empty() const
5516 {
5517 auto res = isl_basic_map_is_empty(get());
5518 return manage(res);
5519 }
5520
is_equal(const isl::checked::basic_map & bmap2)5521 boolean 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
is_subset(const isl::checked::basic_map & bmap2)5527 boolean 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
lexmax()5533 isl::checked::map basic_map::lexmax() const
5534 {
5535 auto res = isl_basic_map_lexmax(copy());
5536 return manage(res);
5537 }
5538
lexmin()5539 isl::checked::map basic_map::lexmin() const
5540 {
5541 auto res = isl_basic_map_lexmin(copy());
5542 return manage(res);
5543 }
5544
reverse()5545 isl::checked::basic_map basic_map::reverse() const
5546 {
5547 auto res = isl_basic_map_reverse(copy());
5548 return manage(res);
5549 }
5550
sample()5551 isl::checked::basic_map basic_map::sample() const
5552 {
5553 auto res = isl_basic_map_sample(copy());
5554 return manage(res);
5555 }
5556
unite(isl::checked::basic_map bmap2)5557 isl::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
5563 inline 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
manage(__isl_take isl_basic_set * ptr)5576 basic_set manage(__isl_take isl_basic_set *ptr) {
5577 return basic_set(ptr);
5578 }
manage_copy(__isl_keep isl_basic_set * ptr)5579 basic_set manage_copy(__isl_keep isl_basic_set *ptr) {
5580 ptr = isl_basic_set_copy(ptr);
5581 return basic_set(ptr);
5582 }
5583
basic_set()5584 basic_set::basic_set()
5585 : ptr(nullptr) {}
5586
basic_set(const basic_set & obj)5587 basic_set::basic_set(const basic_set &obj)
5588 : ptr(nullptr)
5589 {
5590 ptr = obj.copy();
5591 }
5592
basic_set(__isl_take isl_basic_set * ptr)5593 basic_set::basic_set(__isl_take isl_basic_set *ptr)
5594 : ptr(ptr) {}
5595
basic_set(isl::checked::point pnt)5596 basic_set::basic_set(isl::checked::point pnt)
5597 {
5598 auto res = isl_basic_set_from_point(pnt.release());
5599 ptr = res;
5600 }
5601
basic_set(isl::checked::ctx ctx,const std::string & str)5602 basic_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
5608 basic_set &basic_set::operator=(basic_set obj) {
5609 std::swap(this->ptr, obj.ptr);
5610 return *this;
5611 }
5612
~basic_set()5613 basic_set::~basic_set() {
5614 if (ptr)
5615 isl_basic_set_free(ptr);
5616 }
5617
copy()5618 __isl_give isl_basic_set *basic_set::copy() const & {
5619 return isl_basic_set_copy(ptr);
5620 }
5621
get()5622 __isl_keep isl_basic_set *basic_set::get() const {
5623 return ptr;
5624 }
5625
release()5626 __isl_give isl_basic_set *basic_set::release() {
5627 isl_basic_set *tmp = ptr;
5628 ptr = nullptr;
5629 return tmp;
5630 }
5631
is_null()5632 bool basic_set::is_null() const {
5633 return ptr == nullptr;
5634 }
5635
ctx()5636 isl::checked::ctx basic_set::ctx() const {
5637 return isl::checked::ctx(isl_basic_set_get_ctx(ptr));
5638 }
5639
affine_hull()5640 isl::checked::basic_set basic_set::affine_hull() const
5641 {
5642 auto res = isl_basic_set_affine_hull(copy());
5643 return manage(res);
5644 }
5645
apply(isl::checked::basic_map bmap)5646 isl::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
detect_equalities()5652 isl::checked::basic_set basic_set::detect_equalities() const
5653 {
5654 auto res = isl_basic_set_detect_equalities(copy());
5655 return manage(res);
5656 }
5657
dim_max_val(int pos)5658 isl::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
flatten()5664 isl::checked::basic_set basic_set::flatten() const
5665 {
5666 auto res = isl_basic_set_flatten(copy());
5667 return manage(res);
5668 }
5669
gist(isl::checked::basic_set context)5670 isl::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
intersect(isl::checked::basic_set bset2)5676 isl::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
intersect_params(isl::checked::basic_set bset2)5682 isl::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
is_empty()5688 boolean basic_set::is_empty() const
5689 {
5690 auto res = isl_basic_set_is_empty(get());
5691 return manage(res);
5692 }
5693
is_equal(const isl::checked::basic_set & bset2)5694 boolean 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
is_subset(const isl::checked::basic_set & bset2)5700 boolean 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
is_wrapping()5706 boolean basic_set::is_wrapping() const
5707 {
5708 auto res = isl_basic_set_is_wrapping(get());
5709 return manage(res);
5710 }
5711
lexmax()5712 isl::checked::set basic_set::lexmax() const
5713 {
5714 auto res = isl_basic_set_lexmax(copy());
5715 return manage(res);
5716 }
5717
lexmin()5718 isl::checked::set basic_set::lexmin() const
5719 {
5720 auto res = isl_basic_set_lexmin(copy());
5721 return manage(res);
5722 }
5723
params()5724 isl::checked::basic_set basic_set::params() const
5725 {
5726 auto res = isl_basic_set_params(copy());
5727 return manage(res);
5728 }
5729
sample()5730 isl::checked::basic_set basic_set::sample() const
5731 {
5732 auto res = isl_basic_set_sample(copy());
5733 return manage(res);
5734 }
5735
sample_point()5736 isl::checked::point basic_set::sample_point() const
5737 {
5738 auto res = isl_basic_set_sample_point(copy());
5739 return manage(res);
5740 }
5741
unite(isl::checked::basic_set bset2)5742 isl::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
5748 inline 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
manage(__isl_take isl_fixed_box * ptr)5761 fixed_box manage(__isl_take isl_fixed_box *ptr) {
5762 return fixed_box(ptr);
5763 }
manage_copy(__isl_keep isl_fixed_box * ptr)5764 fixed_box manage_copy(__isl_keep isl_fixed_box *ptr) {
5765 ptr = isl_fixed_box_copy(ptr);
5766 return fixed_box(ptr);
5767 }
5768
fixed_box()5769 fixed_box::fixed_box()
5770 : ptr(nullptr) {}
5771
fixed_box(const fixed_box & obj)5772 fixed_box::fixed_box(const fixed_box &obj)
5773 : ptr(nullptr)
5774 {
5775 ptr = obj.copy();
5776 }
5777
fixed_box(__isl_take isl_fixed_box * ptr)5778 fixed_box::fixed_box(__isl_take isl_fixed_box *ptr)
5779 : ptr(ptr) {}
5780
5781 fixed_box &fixed_box::operator=(fixed_box obj) {
5782 std::swap(this->ptr, obj.ptr);
5783 return *this;
5784 }
5785
~fixed_box()5786 fixed_box::~fixed_box() {
5787 if (ptr)
5788 isl_fixed_box_free(ptr);
5789 }
5790
copy()5791 __isl_give isl_fixed_box *fixed_box::copy() const & {
5792 return isl_fixed_box_copy(ptr);
5793 }
5794
get()5795 __isl_keep isl_fixed_box *fixed_box::get() const {
5796 return ptr;
5797 }
5798
release()5799 __isl_give isl_fixed_box *fixed_box::release() {
5800 isl_fixed_box *tmp = ptr;
5801 ptr = nullptr;
5802 return tmp;
5803 }
5804
is_null()5805 bool fixed_box::is_null() const {
5806 return ptr == nullptr;
5807 }
5808
ctx()5809 isl::checked::ctx fixed_box::ctx() const {
5810 return isl::checked::ctx(isl_fixed_box_get_ctx(ptr));
5811 }
5812
offset()5813 isl::checked::multi_aff fixed_box::offset() const
5814 {
5815 auto res = isl_fixed_box_get_offset(get());
5816 return manage(res);
5817 }
5818
get_offset()5819 isl::checked::multi_aff fixed_box::get_offset() const
5820 {
5821 return offset();
5822 }
5823
size()5824 isl::checked::multi_val fixed_box::size() const
5825 {
5826 auto res = isl_fixed_box_get_size(get());
5827 return manage(res);
5828 }
5829
get_size()5830 isl::checked::multi_val fixed_box::get_size() const
5831 {
5832 return size();
5833 }
5834
space()5835 isl::checked::space fixed_box::space() const
5836 {
5837 auto res = isl_fixed_box_get_space(get());
5838 return manage(res);
5839 }
5840
get_space()5841 isl::checked::space fixed_box::get_space() const
5842 {
5843 return space();
5844 }
5845
is_valid()5846 boolean fixed_box::is_valid() const
5847 {
5848 auto res = isl_fixed_box_is_valid(get());
5849 return manage(res);
5850 }
5851
5852 inline 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
manage(__isl_take isl_id * ptr)5865 id manage(__isl_take isl_id *ptr) {
5866 return id(ptr);
5867 }
manage_copy(__isl_keep isl_id * ptr)5868 id manage_copy(__isl_keep isl_id *ptr) {
5869 ptr = isl_id_copy(ptr);
5870 return id(ptr);
5871 }
5872
id()5873 id::id()
5874 : ptr(nullptr) {}
5875
id(const id & obj)5876 id::id(const id &obj)
5877 : ptr(nullptr)
5878 {
5879 ptr = obj.copy();
5880 }
5881
id(__isl_take isl_id * ptr)5882 id::id(__isl_take isl_id *ptr)
5883 : ptr(ptr) {}
5884
id(isl::checked::ctx ctx,const std::string & str)5885 id::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
5891 id &id::operator=(id obj) {
5892 std::swap(this->ptr, obj.ptr);
5893 return *this;
5894 }
5895
~id()5896 id::~id() {
5897 if (ptr)
5898 isl_id_free(ptr);
5899 }
5900
copy()5901 __isl_give isl_id *id::copy() const & {
5902 return isl_id_copy(ptr);
5903 }
5904
get()5905 __isl_keep isl_id *id::get() const {
5906 return ptr;
5907 }
5908
release()5909 __isl_give isl_id *id::release() {
5910 isl_id *tmp = ptr;
5911 ptr = nullptr;
5912 return tmp;
5913 }
5914
is_null()5915 bool id::is_null() const {
5916 return ptr == nullptr;
5917 }
5918
ctx()5919 isl::checked::ctx id::ctx() const {
5920 return isl::checked::ctx(isl_id_get_ctx(ptr));
5921 }
5922
name()5923 std::string id::name() const
5924 {
5925 auto res = isl_id_get_name(get());
5926 std::string tmp(res);
5927 return tmp;
5928 }
5929
get_name()5930 std::string id::get_name() const
5931 {
5932 return name();
5933 }
5934
5935 inline 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
manage(__isl_take isl_id_list * ptr)5948 id_list manage(__isl_take isl_id_list *ptr) {
5949 return id_list(ptr);
5950 }
manage_copy(__isl_keep isl_id_list * ptr)5951 id_list manage_copy(__isl_keep isl_id_list *ptr) {
5952 ptr = isl_id_list_copy(ptr);
5953 return id_list(ptr);
5954 }
5955
id_list()5956 id_list::id_list()
5957 : ptr(nullptr) {}
5958
id_list(const id_list & obj)5959 id_list::id_list(const id_list &obj)
5960 : ptr(nullptr)
5961 {
5962 ptr = obj.copy();
5963 }
5964
id_list(__isl_take isl_id_list * ptr)5965 id_list::id_list(__isl_take isl_id_list *ptr)
5966 : ptr(ptr) {}
5967
id_list(isl::checked::ctx ctx,int n)5968 id_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
id_list(isl::checked::id el)5974 id_list::id_list(isl::checked::id el)
5975 {
5976 auto res = isl_id_list_from_id(el.release());
5977 ptr = res;
5978 }
5979
5980 id_list &id_list::operator=(id_list obj) {
5981 std::swap(this->ptr, obj.ptr);
5982 return *this;
5983 }
5984
~id_list()5985 id_list::~id_list() {
5986 if (ptr)
5987 isl_id_list_free(ptr);
5988 }
5989
copy()5990 __isl_give isl_id_list *id_list::copy() const & {
5991 return isl_id_list_copy(ptr);
5992 }
5993
get()5994 __isl_keep isl_id_list *id_list::get() const {
5995 return ptr;
5996 }
5997
release()5998 __isl_give isl_id_list *id_list::release() {
5999 isl_id_list *tmp = ptr;
6000 ptr = nullptr;
6001 return tmp;
6002 }
6003
is_null()6004 bool id_list::is_null() const {
6005 return ptr == nullptr;
6006 }
6007
ctx()6008 isl::checked::ctx id_list::ctx() const {
6009 return isl::checked::ctx(isl_id_list_get_ctx(ptr));
6010 }
6011
add(isl::checked::id el)6012 isl::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
add(const std::string & el)6018 isl::checked::id_list id_list::add(const std::string &el) const
6019 {
6020 return this->add(isl::checked::id(ctx(), el));
6021 }
6022
clear()6023 isl::checked::id_list id_list::clear() const
6024 {
6025 auto res = isl_id_list_clear(copy());
6026 return manage(res);
6027 }
6028
concat(isl::checked::id_list list2)6029 isl::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
drop(unsigned int first,unsigned int n)6035 isl::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
foreach(const std::function<stat (isl::checked::id)> & fn)6041 stat 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
at(int index)6055 isl::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
get_at(int index)6061 isl::checked::id id_list::get_at(int index) const
6062 {
6063 return at(index);
6064 }
6065
insert(unsigned int pos,isl::checked::id el)6066 isl::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
insert(unsigned int pos,const std::string & el)6072 isl::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
size()6077 class size id_list::size() const
6078 {
6079 auto res = isl_id_list_size(get());
6080 return manage(res);
6081 }
6082
6083 inline 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
manage(__isl_take isl_map * ptr)6096 map manage(__isl_take isl_map *ptr) {
6097 return map(ptr);
6098 }
manage_copy(__isl_keep isl_map * ptr)6099 map manage_copy(__isl_keep isl_map *ptr) {
6100 ptr = isl_map_copy(ptr);
6101 return map(ptr);
6102 }
6103
map()6104 map::map()
6105 : ptr(nullptr) {}
6106
map(const map & obj)6107 map::map(const map &obj)
6108 : ptr(nullptr)
6109 {
6110 ptr = obj.copy();
6111 }
6112
map(__isl_take isl_map * ptr)6113 map::map(__isl_take isl_map *ptr)
6114 : ptr(ptr) {}
6115
map(isl::checked::basic_map bmap)6116 map::map(isl::checked::basic_map bmap)
6117 {
6118 auto res = isl_map_from_basic_map(bmap.release());
6119 ptr = res;
6120 }
6121
map(isl::checked::ctx ctx,const std::string & str)6122 map::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
6128 map &map::operator=(map obj) {
6129 std::swap(this->ptr, obj.ptr);
6130 return *this;
6131 }
6132
~map()6133 map::~map() {
6134 if (ptr)
6135 isl_map_free(ptr);
6136 }
6137
copy()6138 __isl_give isl_map *map::copy() const & {
6139 return isl_map_copy(ptr);
6140 }
6141
get()6142 __isl_keep isl_map *map::get() const {
6143 return ptr;
6144 }
6145
release()6146 __isl_give isl_map *map::release() {
6147 isl_map *tmp = ptr;
6148 ptr = nullptr;
6149 return tmp;
6150 }
6151
is_null()6152 bool map::is_null() const {
6153 return ptr == nullptr;
6154 }
6155
ctx()6156 isl::checked::ctx map::ctx() const {
6157 return isl::checked::ctx(isl_map_get_ctx(ptr));
6158 }
6159
affine_hull()6160 isl::checked::basic_map map::affine_hull() const
6161 {
6162 auto res = isl_map_affine_hull(copy());
6163 return manage(res);
6164 }
6165
apply_domain(isl::checked::map map2)6166 isl::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
apply_range(isl::checked::map map2)6172 isl::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
bind_domain(isl::checked::multi_id tuple)6178 isl::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
bind_range(isl::checked::multi_id tuple)6184 isl::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
coalesce()6190 isl::checked::map map::coalesce() const
6191 {
6192 auto res = isl_map_coalesce(copy());
6193 return manage(res);
6194 }
6195
complement()6196 isl::checked::map map::complement() const
6197 {
6198 auto res = isl_map_complement(copy());
6199 return manage(res);
6200 }
6201
curry()6202 isl::checked::map map::curry() const
6203 {
6204 auto res = isl_map_curry(copy());
6205 return manage(res);
6206 }
6207
deltas()6208 isl::checked::set map::deltas() const
6209 {
6210 auto res = isl_map_deltas(copy());
6211 return manage(res);
6212 }
6213
detect_equalities()6214 isl::checked::map map::detect_equalities() const
6215 {
6216 auto res = isl_map_detect_equalities(copy());
6217 return manage(res);
6218 }
6219
domain()6220 isl::checked::set map::domain() const
6221 {
6222 auto res = isl_map_domain(copy());
6223 return manage(res);
6224 }
6225
domain_factor_domain()6226 isl::checked::map map::domain_factor_domain() const
6227 {
6228 auto res = isl_map_domain_factor_domain(copy());
6229 return manage(res);
6230 }
6231
domain_factor_range()6232 isl::checked::map map::domain_factor_range() const
6233 {
6234 auto res = isl_map_domain_factor_range(copy());
6235 return manage(res);
6236 }
6237
domain_product(isl::checked::map map2)6238 isl::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
empty(isl::checked::space space)6244 isl::checked::map map::empty(isl::checked::space space)
6245 {
6246 auto res = isl_map_empty(space.release());
6247 return manage(res);
6248 }
6249
eq_at(isl::checked::multi_pw_aff mpa)6250 isl::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
factor_domain()6256 isl::checked::map map::factor_domain() const
6257 {
6258 auto res = isl_map_factor_domain(copy());
6259 return manage(res);
6260 }
6261
factor_range()6262 isl::checked::map map::factor_range() const
6263 {
6264 auto res = isl_map_factor_range(copy());
6265 return manage(res);
6266 }
6267
flatten()6268 isl::checked::map map::flatten() const
6269 {
6270 auto res = isl_map_flatten(copy());
6271 return manage(res);
6272 }
6273
flatten_domain()6274 isl::checked::map map::flatten_domain() const
6275 {
6276 auto res = isl_map_flatten_domain(copy());
6277 return manage(res);
6278 }
6279
flatten_range()6280 isl::checked::map map::flatten_range() const
6281 {
6282 auto res = isl_map_flatten_range(copy());
6283 return manage(res);
6284 }
6285
foreach_basic_map(const std::function<stat (isl::checked::basic_map)> & fn)6286 stat 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
range_simple_fixed_box_hull()6300 isl::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
get_range_simple_fixed_box_hull()6306 isl::checked::fixed_box map::get_range_simple_fixed_box_hull() const
6307 {
6308 return range_simple_fixed_box_hull();
6309 }
6310
space()6311 isl::checked::space map::space() const
6312 {
6313 auto res = isl_map_get_space(get());
6314 return manage(res);
6315 }
6316
get_space()6317 isl::checked::space map::get_space() const
6318 {
6319 return space();
6320 }
6321
gist(isl::checked::map context)6322 isl::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
gist_domain(isl::checked::set context)6328 isl::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
intersect(isl::checked::map map2)6334 isl::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
intersect_domain(isl::checked::set set)6340 isl::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
intersect_params(isl::checked::set params)6346 isl::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
intersect_range(isl::checked::set set)6352 isl::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
is_bijective()6358 boolean map::is_bijective() const
6359 {
6360 auto res = isl_map_is_bijective(get());
6361 return manage(res);
6362 }
6363
is_disjoint(const isl::checked::map & map2)6364 boolean 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
is_empty()6370 boolean map::is_empty() const
6371 {
6372 auto res = isl_map_is_empty(get());
6373 return manage(res);
6374 }
6375
is_equal(const isl::checked::map & map2)6376 boolean 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
is_injective()6382 boolean map::is_injective() const
6383 {
6384 auto res = isl_map_is_injective(get());
6385 return manage(res);
6386 }
6387
is_single_valued()6388 boolean map::is_single_valued() const
6389 {
6390 auto res = isl_map_is_single_valued(get());
6391 return manage(res);
6392 }
6393
is_strict_subset(const isl::checked::map & map2)6394 boolean 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
is_subset(const isl::checked::map & map2)6400 boolean 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
lex_ge_at(isl::checked::multi_pw_aff mpa)6406 isl::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
lex_gt_at(isl::checked::multi_pw_aff mpa)6412 isl::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
lex_le_at(isl::checked::multi_pw_aff mpa)6418 isl::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
lex_lt_at(isl::checked::multi_pw_aff mpa)6424 isl::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
lexmax()6430 isl::checked::map map::lexmax() const
6431 {
6432 auto res = isl_map_lexmax(copy());
6433 return manage(res);
6434 }
6435
lexmax_pw_multi_aff()6436 isl::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
lexmin()6442 isl::checked::map map::lexmin() const
6443 {
6444 auto res = isl_map_lexmin(copy());
6445 return manage(res);
6446 }
6447
lexmin_pw_multi_aff()6448 isl::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
lower_bound(isl::checked::multi_pw_aff lower)6454 isl::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
lower_bound(isl::checked::multi_val lower)6460 isl::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
max_multi_pw_aff()6466 isl::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
min_multi_pw_aff()6472 isl::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
polyhedral_hull()6478 isl::checked::basic_map map::polyhedral_hull() const
6479 {
6480 auto res = isl_map_polyhedral_hull(copy());
6481 return manage(res);
6482 }
6483
preimage_domain(isl::checked::multi_aff ma)6484 isl::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
preimage_domain(isl::checked::multi_pw_aff mpa)6490 isl::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
preimage_domain(isl::checked::pw_multi_aff pma)6496 isl::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
preimage_range(isl::checked::multi_aff ma)6502 isl::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
preimage_range(isl::checked::pw_multi_aff pma)6508 isl::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
project_out_all_params()6514 isl::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
range()6520 isl::checked::set map::range() const
6521 {
6522 auto res = isl_map_range(copy());
6523 return manage(res);
6524 }
6525
range_factor_domain()6526 isl::checked::map map::range_factor_domain() const
6527 {
6528 auto res = isl_map_range_factor_domain(copy());
6529 return manage(res);
6530 }
6531
range_factor_range()6532 isl::checked::map map::range_factor_range() const
6533 {
6534 auto res = isl_map_range_factor_range(copy());
6535 return manage(res);
6536 }
6537
range_product(isl::checked::map map2)6538 isl::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
range_reverse()6544 isl::checked::map map::range_reverse() const
6545 {
6546 auto res = isl_map_range_reverse(copy());
6547 return manage(res);
6548 }
6549
reverse()6550 isl::checked::map map::reverse() const
6551 {
6552 auto res = isl_map_reverse(copy());
6553 return manage(res);
6554 }
6555
sample()6556 isl::checked::basic_map map::sample() const
6557 {
6558 auto res = isl_map_sample(copy());
6559 return manage(res);
6560 }
6561
subtract(isl::checked::map map2)6562 isl::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
uncurry()6568 isl::checked::map map::uncurry() const
6569 {
6570 auto res = isl_map_uncurry(copy());
6571 return manage(res);
6572 }
6573
unite(isl::checked::map map2)6574 isl::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
universe(isl::checked::space space)6580 isl::checked::map map::universe(isl::checked::space space)
6581 {
6582 auto res = isl_map_universe(space.release());
6583 return manage(res);
6584 }
6585
unshifted_simple_hull()6586 isl::checked::basic_map map::unshifted_simple_hull() const
6587 {
6588 auto res = isl_map_unshifted_simple_hull(copy());
6589 return manage(res);
6590 }
6591
upper_bound(isl::checked::multi_pw_aff upper)6592 isl::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
upper_bound(isl::checked::multi_val upper)6598 isl::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
wrap()6604 isl::checked::set map::wrap() const
6605 {
6606 auto res = isl_map_wrap(copy());
6607 return manage(res);
6608 }
6609
6610 inline 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
manage(__isl_take isl_multi_aff * ptr)6623 multi_aff manage(__isl_take isl_multi_aff *ptr) {
6624 return multi_aff(ptr);
6625 }
manage_copy(__isl_keep isl_multi_aff * ptr)6626 multi_aff manage_copy(__isl_keep isl_multi_aff *ptr) {
6627 ptr = isl_multi_aff_copy(ptr);
6628 return multi_aff(ptr);
6629 }
6630
multi_aff()6631 multi_aff::multi_aff()
6632 : ptr(nullptr) {}
6633
multi_aff(const multi_aff & obj)6634 multi_aff::multi_aff(const multi_aff &obj)
6635 : ptr(nullptr)
6636 {
6637 ptr = obj.copy();
6638 }
6639
multi_aff(__isl_take isl_multi_aff * ptr)6640 multi_aff::multi_aff(__isl_take isl_multi_aff *ptr)
6641 : ptr(ptr) {}
6642
multi_aff(isl::checked::aff aff)6643 multi_aff::multi_aff(isl::checked::aff aff)
6644 {
6645 auto res = isl_multi_aff_from_aff(aff.release());
6646 ptr = res;
6647 }
6648
multi_aff(isl::checked::space space,isl::checked::aff_list list)6649 multi_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
multi_aff(isl::checked::ctx ctx,const std::string & str)6655 multi_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
6661 multi_aff &multi_aff::operator=(multi_aff obj) {
6662 std::swap(this->ptr, obj.ptr);
6663 return *this;
6664 }
6665
~multi_aff()6666 multi_aff::~multi_aff() {
6667 if (ptr)
6668 isl_multi_aff_free(ptr);
6669 }
6670
copy()6671 __isl_give isl_multi_aff *multi_aff::copy() const & {
6672 return isl_multi_aff_copy(ptr);
6673 }
6674
get()6675 __isl_keep isl_multi_aff *multi_aff::get() const {
6676 return ptr;
6677 }
6678
release()6679 __isl_give isl_multi_aff *multi_aff::release() {
6680 isl_multi_aff *tmp = ptr;
6681 ptr = nullptr;
6682 return tmp;
6683 }
6684
is_null()6685 bool multi_aff::is_null() const {
6686 return ptr == nullptr;
6687 }
6688
ctx()6689 isl::checked::ctx multi_aff::ctx() const {
6690 return isl::checked::ctx(isl_multi_aff_get_ctx(ptr));
6691 }
6692
add(isl::checked::multi_aff multi2)6693 isl::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
add_constant(isl::checked::multi_val mv)6699 isl::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
add_constant(isl::checked::val v)6705 isl::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
add_constant(long v)6711 isl::checked::multi_aff multi_aff::add_constant(long v) const
6712 {
6713 return this->add_constant(isl::checked::val(ctx(), v));
6714 }
6715
bind(isl::checked::multi_id tuple)6716 isl::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
bind_domain(isl::checked::multi_id tuple)6722 isl::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
bind_domain_wrapped_domain(isl::checked::multi_id tuple)6728 isl::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
domain_map(isl::checked::space space)6734 isl::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
flat_range_product(isl::checked::multi_aff multi2)6740 isl::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
floor()6746 isl::checked::multi_aff multi_aff::floor() const
6747 {
6748 auto res = isl_multi_aff_floor(copy());
6749 return manage(res);
6750 }
6751
at(int pos)6752 isl::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
get_at(int pos)6758 isl::checked::aff multi_aff::get_at(int pos) const
6759 {
6760 return at(pos);
6761 }
6762
constant_multi_val()6763 isl::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
get_constant_multi_val()6769 isl::checked::multi_val multi_aff::get_constant_multi_val() const
6770 {
6771 return constant_multi_val();
6772 }
6773
list()6774 isl::checked::aff_list multi_aff::list() const
6775 {
6776 auto res = isl_multi_aff_get_list(get());
6777 return manage(res);
6778 }
6779
get_list()6780 isl::checked::aff_list multi_aff::get_list() const
6781 {
6782 return list();
6783 }
6784
space()6785 isl::checked::space multi_aff::space() const
6786 {
6787 auto res = isl_multi_aff_get_space(get());
6788 return manage(res);
6789 }
6790
get_space()6791 isl::checked::space multi_aff::get_space() const
6792 {
6793 return space();
6794 }
6795
gist(isl::checked::set context)6796 isl::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
identity()6802 isl::checked::multi_aff multi_aff::identity() const
6803 {
6804 auto res = isl_multi_aff_identity_multi_aff(copy());
6805 return manage(res);
6806 }
6807
identity_on_domain(isl::checked::space space)6808 isl::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
insert_domain(isl::checked::space domain)6814 isl::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
involves_locals()6820 boolean multi_aff::involves_locals() const
6821 {
6822 auto res = isl_multi_aff_involves_locals(get());
6823 return manage(res);
6824 }
6825
neg()6826 isl::checked::multi_aff multi_aff::neg() const
6827 {
6828 auto res = isl_multi_aff_neg(copy());
6829 return manage(res);
6830 }
6831
plain_is_equal(const isl::checked::multi_aff & multi2)6832 boolean 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
product(isl::checked::multi_aff multi2)6838 isl::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
pullback(isl::checked::multi_aff ma2)6844 isl::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
range_map(isl::checked::space space)6850 isl::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
range_product(isl::checked::multi_aff multi2)6856 isl::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
scale(isl::checked::multi_val mv)6862 isl::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
scale(isl::checked::val v)6868 isl::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
scale(long v)6874 isl::checked::multi_aff multi_aff::scale(long v) const
6875 {
6876 return this->scale(isl::checked::val(ctx(), v));
6877 }
6878
scale_down(isl::checked::multi_val mv)6879 isl::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
scale_down(isl::checked::val v)6885 isl::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
scale_down(long v)6891 isl::checked::multi_aff multi_aff::scale_down(long v) const
6892 {
6893 return this->scale_down(isl::checked::val(ctx(), v));
6894 }
6895
set_at(int pos,isl::checked::aff el)6896 isl::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
size()6902 class size multi_aff::size() const
6903 {
6904 auto res = isl_multi_aff_size(get());
6905 return manage(res);
6906 }
6907
sub(isl::checked::multi_aff multi2)6908 isl::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
unbind_params_insert_domain(isl::checked::multi_id domain)6914 isl::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
zero(isl::checked::space space)6920 isl::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
6926 inline 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
manage(__isl_take isl_multi_id * ptr)6939 multi_id manage(__isl_take isl_multi_id *ptr) {
6940 return multi_id(ptr);
6941 }
manage_copy(__isl_keep isl_multi_id * ptr)6942 multi_id manage_copy(__isl_keep isl_multi_id *ptr) {
6943 ptr = isl_multi_id_copy(ptr);
6944 return multi_id(ptr);
6945 }
6946
multi_id()6947 multi_id::multi_id()
6948 : ptr(nullptr) {}
6949
multi_id(const multi_id & obj)6950 multi_id::multi_id(const multi_id &obj)
6951 : ptr(nullptr)
6952 {
6953 ptr = obj.copy();
6954 }
6955
multi_id(__isl_take isl_multi_id * ptr)6956 multi_id::multi_id(__isl_take isl_multi_id *ptr)
6957 : ptr(ptr) {}
6958
multi_id(isl::checked::space space,isl::checked::id_list list)6959 multi_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
multi_id(isl::checked::ctx ctx,const std::string & str)6965 multi_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
6971 multi_id &multi_id::operator=(multi_id obj) {
6972 std::swap(this->ptr, obj.ptr);
6973 return *this;
6974 }
6975
~multi_id()6976 multi_id::~multi_id() {
6977 if (ptr)
6978 isl_multi_id_free(ptr);
6979 }
6980
copy()6981 __isl_give isl_multi_id *multi_id::copy() const & {
6982 return isl_multi_id_copy(ptr);
6983 }
6984
get()6985 __isl_keep isl_multi_id *multi_id::get() const {
6986 return ptr;
6987 }
6988
release()6989 __isl_give isl_multi_id *multi_id::release() {
6990 isl_multi_id *tmp = ptr;
6991 ptr = nullptr;
6992 return tmp;
6993 }
6994
is_null()6995 bool multi_id::is_null() const {
6996 return ptr == nullptr;
6997 }
6998
ctx()6999 isl::checked::ctx multi_id::ctx() const {
7000 return isl::checked::ctx(isl_multi_id_get_ctx(ptr));
7001 }
7002
flat_range_product(isl::checked::multi_id multi2)7003 isl::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
at(int pos)7009 isl::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
get_at(int pos)7015 isl::checked::id multi_id::get_at(int pos) const
7016 {
7017 return at(pos);
7018 }
7019
list()7020 isl::checked::id_list multi_id::list() const
7021 {
7022 auto res = isl_multi_id_get_list(get());
7023 return manage(res);
7024 }
7025
get_list()7026 isl::checked::id_list multi_id::get_list() const
7027 {
7028 return list();
7029 }
7030
space()7031 isl::checked::space multi_id::space() const
7032 {
7033 auto res = isl_multi_id_get_space(get());
7034 return manage(res);
7035 }
7036
get_space()7037 isl::checked::space multi_id::get_space() const
7038 {
7039 return space();
7040 }
7041
plain_is_equal(const isl::checked::multi_id & multi2)7042 boolean 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
range_product(isl::checked::multi_id multi2)7048 isl::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
set_at(int pos,isl::checked::id el)7054 isl::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
set_at(int pos,const std::string & el)7060 isl::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
size()7065 class size multi_id::size() const
7066 {
7067 auto res = isl_multi_id_size(get());
7068 return manage(res);
7069 }
7070
7071 inline 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
manage(__isl_take isl_multi_pw_aff * ptr)7084 multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr) {
7085 return multi_pw_aff(ptr);
7086 }
manage_copy(__isl_keep isl_multi_pw_aff * ptr)7087 multi_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
multi_pw_aff()7092 multi_pw_aff::multi_pw_aff()
7093 : ptr(nullptr) {}
7094
multi_pw_aff(const multi_pw_aff & obj)7095 multi_pw_aff::multi_pw_aff(const multi_pw_aff &obj)
7096 : ptr(nullptr)
7097 {
7098 ptr = obj.copy();
7099 }
7100
multi_pw_aff(__isl_take isl_multi_pw_aff * ptr)7101 multi_pw_aff::multi_pw_aff(__isl_take isl_multi_pw_aff *ptr)
7102 : ptr(ptr) {}
7103
multi_pw_aff(isl::checked::aff aff)7104 multi_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
multi_pw_aff(isl::checked::multi_aff ma)7110 multi_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
multi_pw_aff(isl::checked::pw_aff pa)7116 multi_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
multi_pw_aff(isl::checked::space space,isl::checked::pw_aff_list list)7122 multi_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
multi_pw_aff(isl::checked::pw_multi_aff pma)7128 multi_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
multi_pw_aff(isl::checked::ctx ctx,const std::string & str)7134 multi_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
7140 multi_pw_aff &multi_pw_aff::operator=(multi_pw_aff obj) {
7141 std::swap(this->ptr, obj.ptr);
7142 return *this;
7143 }
7144
~multi_pw_aff()7145 multi_pw_aff::~multi_pw_aff() {
7146 if (ptr)
7147 isl_multi_pw_aff_free(ptr);
7148 }
7149
copy()7150 __isl_give isl_multi_pw_aff *multi_pw_aff::copy() const & {
7151 return isl_multi_pw_aff_copy(ptr);
7152 }
7153
get()7154 __isl_keep isl_multi_pw_aff *multi_pw_aff::get() const {
7155 return ptr;
7156 }
7157
release()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
is_null()7164 bool multi_pw_aff::is_null() const {
7165 return ptr == nullptr;
7166 }
7167
ctx()7168 isl::checked::ctx multi_pw_aff::ctx() const {
7169 return isl::checked::ctx(isl_multi_pw_aff_get_ctx(ptr));
7170 }
7171
add(isl::checked::multi_pw_aff multi2)7172 isl::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
add_constant(isl::checked::multi_val mv)7178 isl::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
add_constant(isl::checked::val v)7184 isl::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
add_constant(long v)7190 isl::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
bind(isl::checked::multi_id tuple)7195 isl::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
bind_domain(isl::checked::multi_id tuple)7201 isl::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
bind_domain_wrapped_domain(isl::checked::multi_id tuple)7207 isl::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
coalesce()7213 isl::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
domain()7219 isl::checked::set multi_pw_aff::domain() const
7220 {
7221 auto res = isl_multi_pw_aff_domain(copy());
7222 return manage(res);
7223 }
7224
flat_range_product(isl::checked::multi_pw_aff multi2)7225 isl::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
at(int pos)7231 isl::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
get_at(int pos)7237 isl::checked::pw_aff multi_pw_aff::get_at(int pos) const
7238 {
7239 return at(pos);
7240 }
7241
list()7242 isl::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
get_list()7248 isl::checked::pw_aff_list multi_pw_aff::get_list() const
7249 {
7250 return list();
7251 }
7252
space()7253 isl::checked::space multi_pw_aff::space() const
7254 {
7255 auto res = isl_multi_pw_aff_get_space(get());
7256 return manage(res);
7257 }
7258
get_space()7259 isl::checked::space multi_pw_aff::get_space() const
7260 {
7261 return space();
7262 }
7263
gist(isl::checked::set set)7264 isl::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
identity()7270 isl::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
identity_on_domain(isl::checked::space space)7276 isl::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
insert_domain(isl::checked::space domain)7282 isl::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
intersect_domain(isl::checked::set domain)7288 isl::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
intersect_params(isl::checked::set set)7294 isl::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
involves_param(const isl::checked::id & id)7300 boolean 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
involves_param(const std::string & id)7306 boolean multi_pw_aff::involves_param(const std::string &id) const
7307 {
7308 return this->involves_param(isl::checked::id(ctx(), id));
7309 }
7310
involves_param(const isl::checked::id_list & list)7311 boolean 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
max(isl::checked::multi_pw_aff multi2)7317 isl::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
max_multi_val()7323 isl::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
min(isl::checked::multi_pw_aff multi2)7329 isl::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
min_multi_val()7335 isl::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
neg()7341 isl::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
plain_is_equal(const isl::checked::multi_pw_aff & multi2)7347 boolean 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
product(isl::checked::multi_pw_aff multi2)7353 isl::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
pullback(isl::checked::multi_aff ma)7359 isl::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
pullback(isl::checked::multi_pw_aff mpa2)7365 isl::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
pullback(isl::checked::pw_multi_aff pma)7371 isl::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
range_product(isl::checked::multi_pw_aff multi2)7377 isl::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
scale(isl::checked::multi_val mv)7383 isl::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
scale(isl::checked::val v)7389 isl::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
scale(long v)7395 isl::checked::multi_pw_aff multi_pw_aff::scale(long v) const
7396 {
7397 return this->scale(isl::checked::val(ctx(), v));
7398 }
7399
scale_down(isl::checked::multi_val mv)7400 isl::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
scale_down(isl::checked::val v)7406 isl::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
scale_down(long v)7412 isl::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
set_at(int pos,isl::checked::pw_aff el)7417 isl::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
size()7423 class size multi_pw_aff::size() const
7424 {
7425 auto res = isl_multi_pw_aff_size(get());
7426 return manage(res);
7427 }
7428
sub(isl::checked::multi_pw_aff multi2)7429 isl::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
unbind_params_insert_domain(isl::checked::multi_id domain)7435 isl::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
union_add(isl::checked::multi_pw_aff mpa2)7441 isl::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
zero(isl::checked::space space)7447 isl::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
7453 inline 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
manage(__isl_take isl_multi_union_pw_aff * ptr)7466 multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr) {
7467 return multi_union_pw_aff(ptr);
7468 }
manage_copy(__isl_keep isl_multi_union_pw_aff * ptr)7469 multi_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
multi_union_pw_aff()7474 multi_union_pw_aff::multi_union_pw_aff()
7475 : ptr(nullptr) {}
7476
multi_union_pw_aff(const multi_union_pw_aff & obj)7477 multi_union_pw_aff::multi_union_pw_aff(const multi_union_pw_aff &obj)
7478 : ptr(nullptr)
7479 {
7480 ptr = obj.copy();
7481 }
7482
multi_union_pw_aff(__isl_take isl_multi_union_pw_aff * ptr)7483 multi_union_pw_aff::multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr)
7484 : ptr(ptr) {}
7485
multi_union_pw_aff(isl::checked::multi_pw_aff mpa)7486 multi_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
multi_union_pw_aff(isl::checked::union_pw_aff upa)7492 multi_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
multi_union_pw_aff(isl::checked::space space,isl::checked::union_pw_aff_list list)7498 multi_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
multi_union_pw_aff(isl::checked::ctx ctx,const std::string & str)7504 multi_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
7510 multi_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
~multi_union_pw_aff()7515 multi_union_pw_aff::~multi_union_pw_aff() {
7516 if (ptr)
7517 isl_multi_union_pw_aff_free(ptr);
7518 }
7519
copy()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
get()7524 __isl_keep isl_multi_union_pw_aff *multi_union_pw_aff::get() const {
7525 return ptr;
7526 }
7527
release()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
is_null()7534 bool multi_union_pw_aff::is_null() const {
7535 return ptr == nullptr;
7536 }
7537
ctx()7538 isl::checked::ctx multi_union_pw_aff::ctx() const {
7539 return isl::checked::ctx(isl_multi_union_pw_aff_get_ctx(ptr));
7540 }
7541
add(isl::checked::multi_union_pw_aff multi2)7542 isl::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
bind(isl::checked::multi_id tuple)7548 isl::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
coalesce()7554 isl::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
domain()7560 isl::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
flat_range_product(isl::checked::multi_union_pw_aff multi2)7566 isl::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
at(int pos)7572 isl::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
get_at(int pos)7578 isl::checked::union_pw_aff multi_union_pw_aff::get_at(int pos) const
7579 {
7580 return at(pos);
7581 }
7582
list()7583 isl::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
get_list()7589 isl::checked::union_pw_aff_list multi_union_pw_aff::get_list() const
7590 {
7591 return list();
7592 }
7593
space()7594 isl::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
get_space()7600 isl::checked::space multi_union_pw_aff::get_space() const
7601 {
7602 return space();
7603 }
7604
gist(isl::checked::union_set context)7605 isl::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
intersect_domain(isl::checked::union_set uset)7611 isl::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
intersect_params(isl::checked::set params)7617 isl::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
neg()7623 isl::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
plain_is_equal(const isl::checked::multi_union_pw_aff & multi2)7629 boolean 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
pullback(isl::checked::union_pw_multi_aff upma)7635 isl::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
range_product(isl::checked::multi_union_pw_aff multi2)7641 isl::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
scale(isl::checked::multi_val mv)7647 isl::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
scale(isl::checked::val v)7653 isl::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
scale(long v)7659 isl::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
scale_down(isl::checked::multi_val mv)7664 isl::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
scale_down(isl::checked::val v)7670 isl::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
scale_down(long v)7676 isl::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
set_at(int pos,isl::checked::union_pw_aff el)7681 isl::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
size()7687 class size multi_union_pw_aff::size() const
7688 {
7689 auto res = isl_multi_union_pw_aff_size(get());
7690 return manage(res);
7691 }
7692
sub(isl::checked::multi_union_pw_aff multi2)7693 isl::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
union_add(isl::checked::multi_union_pw_aff mupa2)7699 isl::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
zero(isl::checked::space space)7705 isl::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
7711 inline 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
manage(__isl_take isl_multi_val * ptr)7724 multi_val manage(__isl_take isl_multi_val *ptr) {
7725 return multi_val(ptr);
7726 }
manage_copy(__isl_keep isl_multi_val * ptr)7727 multi_val manage_copy(__isl_keep isl_multi_val *ptr) {
7728 ptr = isl_multi_val_copy(ptr);
7729 return multi_val(ptr);
7730 }
7731
multi_val()7732 multi_val::multi_val()
7733 : ptr(nullptr) {}
7734
multi_val(const multi_val & obj)7735 multi_val::multi_val(const multi_val &obj)
7736 : ptr(nullptr)
7737 {
7738 ptr = obj.copy();
7739 }
7740
multi_val(__isl_take isl_multi_val * ptr)7741 multi_val::multi_val(__isl_take isl_multi_val *ptr)
7742 : ptr(ptr) {}
7743
multi_val(isl::checked::space space,isl::checked::val_list list)7744 multi_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
multi_val(isl::checked::ctx ctx,const std::string & str)7750 multi_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
7756 multi_val &multi_val::operator=(multi_val obj) {
7757 std::swap(this->ptr, obj.ptr);
7758 return *this;
7759 }
7760
~multi_val()7761 multi_val::~multi_val() {
7762 if (ptr)
7763 isl_multi_val_free(ptr);
7764 }
7765
copy()7766 __isl_give isl_multi_val *multi_val::copy() const & {
7767 return isl_multi_val_copy(ptr);
7768 }
7769
get()7770 __isl_keep isl_multi_val *multi_val::get() const {
7771 return ptr;
7772 }
7773
release()7774 __isl_give isl_multi_val *multi_val::release() {
7775 isl_multi_val *tmp = ptr;
7776 ptr = nullptr;
7777 return tmp;
7778 }
7779
is_null()7780 bool multi_val::is_null() const {
7781 return ptr == nullptr;
7782 }
7783
ctx()7784 isl::checked::ctx multi_val::ctx() const {
7785 return isl::checked::ctx(isl_multi_val_get_ctx(ptr));
7786 }
7787
add(isl::checked::multi_val multi2)7788 isl::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
add(isl::checked::val v)7794 isl::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
add(long v)7800 isl::checked::multi_val multi_val::add(long v) const
7801 {
7802 return this->add(isl::checked::val(ctx(), v));
7803 }
7804
flat_range_product(isl::checked::multi_val multi2)7805 isl::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
at(int pos)7811 isl::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
get_at(int pos)7817 isl::checked::val multi_val::get_at(int pos) const
7818 {
7819 return at(pos);
7820 }
7821
list()7822 isl::checked::val_list multi_val::list() const
7823 {
7824 auto res = isl_multi_val_get_list(get());
7825 return manage(res);
7826 }
7827
get_list()7828 isl::checked::val_list multi_val::get_list() const
7829 {
7830 return list();
7831 }
7832
space()7833 isl::checked::space multi_val::space() const
7834 {
7835 auto res = isl_multi_val_get_space(get());
7836 return manage(res);
7837 }
7838
get_space()7839 isl::checked::space multi_val::get_space() const
7840 {
7841 return space();
7842 }
7843
max(isl::checked::multi_val multi2)7844 isl::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
min(isl::checked::multi_val multi2)7850 isl::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
neg()7856 isl::checked::multi_val multi_val::neg() const
7857 {
7858 auto res = isl_multi_val_neg(copy());
7859 return manage(res);
7860 }
7861
plain_is_equal(const isl::checked::multi_val & multi2)7862 boolean 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
product(isl::checked::multi_val multi2)7868 isl::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
range_product(isl::checked::multi_val multi2)7874 isl::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
scale(isl::checked::multi_val mv)7880 isl::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
scale(isl::checked::val v)7886 isl::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
scale(long v)7892 isl::checked::multi_val multi_val::scale(long v) const
7893 {
7894 return this->scale(isl::checked::val(ctx(), v));
7895 }
7896
scale_down(isl::checked::multi_val mv)7897 isl::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
scale_down(isl::checked::val v)7903 isl::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
scale_down(long v)7909 isl::checked::multi_val multi_val::scale_down(long v) const
7910 {
7911 return this->scale_down(isl::checked::val(ctx(), v));
7912 }
7913
set_at(int pos,isl::checked::val el)7914 isl::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
set_at(int pos,long el)7920 isl::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
size()7925 class size multi_val::size() const
7926 {
7927 auto res = isl_multi_val_size(get());
7928 return manage(res);
7929 }
7930
sub(isl::checked::multi_val multi2)7931 isl::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
zero(isl::checked::space space)7937 isl::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
7943 inline 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
manage(__isl_take isl_point * ptr)7956 point manage(__isl_take isl_point *ptr) {
7957 return point(ptr);
7958 }
manage_copy(__isl_keep isl_point * ptr)7959 point manage_copy(__isl_keep isl_point *ptr) {
7960 ptr = isl_point_copy(ptr);
7961 return point(ptr);
7962 }
7963
point()7964 point::point()
7965 : ptr(nullptr) {}
7966
point(const point & obj)7967 point::point(const point &obj)
7968 : ptr(nullptr)
7969 {
7970 ptr = obj.copy();
7971 }
7972
point(__isl_take isl_point * ptr)7973 point::point(__isl_take isl_point *ptr)
7974 : ptr(ptr) {}
7975
7976 point &point::operator=(point obj) {
7977 std::swap(this->ptr, obj.ptr);
7978 return *this;
7979 }
7980
~point()7981 point::~point() {
7982 if (ptr)
7983 isl_point_free(ptr);
7984 }
7985
copy()7986 __isl_give isl_point *point::copy() const & {
7987 return isl_point_copy(ptr);
7988 }
7989
get()7990 __isl_keep isl_point *point::get() const {
7991 return ptr;
7992 }
7993
release()7994 __isl_give isl_point *point::release() {
7995 isl_point *tmp = ptr;
7996 ptr = nullptr;
7997 return tmp;
7998 }
7999
is_null()8000 bool point::is_null() const {
8001 return ptr == nullptr;
8002 }
8003
ctx()8004 isl::checked::ctx point::ctx() const {
8005 return isl::checked::ctx(isl_point_get_ctx(ptr));
8006 }
8007
multi_val()8008 isl::checked::multi_val point::multi_val() const
8009 {
8010 auto res = isl_point_get_multi_val(get());
8011 return manage(res);
8012 }
8013
get_multi_val()8014 isl::checked::multi_val point::get_multi_val() const
8015 {
8016 return multi_val();
8017 }
8018
8019 inline 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
manage(__isl_take isl_pw_aff * ptr)8032 pw_aff manage(__isl_take isl_pw_aff *ptr) {
8033 return pw_aff(ptr);
8034 }
manage_copy(__isl_keep isl_pw_aff * ptr)8035 pw_aff manage_copy(__isl_keep isl_pw_aff *ptr) {
8036 ptr = isl_pw_aff_copy(ptr);
8037 return pw_aff(ptr);
8038 }
8039
pw_aff()8040 pw_aff::pw_aff()
8041 : ptr(nullptr) {}
8042
pw_aff(const pw_aff & obj)8043 pw_aff::pw_aff(const pw_aff &obj)
8044 : ptr(nullptr)
8045 {
8046 ptr = obj.copy();
8047 }
8048
pw_aff(__isl_take isl_pw_aff * ptr)8049 pw_aff::pw_aff(__isl_take isl_pw_aff *ptr)
8050 : ptr(ptr) {}
8051
pw_aff(isl::checked::aff aff)8052 pw_aff::pw_aff(isl::checked::aff aff)
8053 {
8054 auto res = isl_pw_aff_from_aff(aff.release());
8055 ptr = res;
8056 }
8057
pw_aff(isl::checked::ctx ctx,const std::string & str)8058 pw_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
8064 pw_aff &pw_aff::operator=(pw_aff obj) {
8065 std::swap(this->ptr, obj.ptr);
8066 return *this;
8067 }
8068
~pw_aff()8069 pw_aff::~pw_aff() {
8070 if (ptr)
8071 isl_pw_aff_free(ptr);
8072 }
8073
copy()8074 __isl_give isl_pw_aff *pw_aff::copy() const & {
8075 return isl_pw_aff_copy(ptr);
8076 }
8077
get()8078 __isl_keep isl_pw_aff *pw_aff::get() const {
8079 return ptr;
8080 }
8081
release()8082 __isl_give isl_pw_aff *pw_aff::release() {
8083 isl_pw_aff *tmp = ptr;
8084 ptr = nullptr;
8085 return tmp;
8086 }
8087
is_null()8088 bool pw_aff::is_null() const {
8089 return ptr == nullptr;
8090 }
8091
ctx()8092 isl::checked::ctx pw_aff::ctx() const {
8093 return isl::checked::ctx(isl_pw_aff_get_ctx(ptr));
8094 }
8095
add(isl::checked::pw_aff pwaff2)8096 isl::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
add_constant(isl::checked::val v)8102 isl::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
add_constant(long v)8108 isl::checked::pw_aff pw_aff::add_constant(long v) const
8109 {
8110 return this->add_constant(isl::checked::val(ctx(), v));
8111 }
8112
as_aff()8113 isl::checked::aff pw_aff::as_aff() const
8114 {
8115 auto res = isl_pw_aff_as_aff(copy());
8116 return manage(res);
8117 }
8118
bind(isl::checked::id id)8119 isl::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
bind(const std::string & id)8125 isl::checked::set pw_aff::bind(const std::string &id) const
8126 {
8127 return this->bind(isl::checked::id(ctx(), id));
8128 }
8129
bind_domain(isl::checked::multi_id tuple)8130 isl::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
bind_domain_wrapped_domain(isl::checked::multi_id tuple)8136 isl::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
ceil()8142 isl::checked::pw_aff pw_aff::ceil() const
8143 {
8144 auto res = isl_pw_aff_ceil(copy());
8145 return manage(res);
8146 }
8147
coalesce()8148 isl::checked::pw_aff pw_aff::coalesce() const
8149 {
8150 auto res = isl_pw_aff_coalesce(copy());
8151 return manage(res);
8152 }
8153
cond(isl::checked::pw_aff pwaff_true,isl::checked::pw_aff pwaff_false)8154 isl::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
div(isl::checked::pw_aff pa2)8160 isl::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
domain()8166 isl::checked::set pw_aff::domain() const
8167 {
8168 auto res = isl_pw_aff_domain(copy());
8169 return manage(res);
8170 }
8171
eq_set(isl::checked::pw_aff pwaff2)8172 isl::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
eval(isl::checked::point pnt)8178 isl::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
floor()8184 isl::checked::pw_aff pw_aff::floor() const
8185 {
8186 auto res = isl_pw_aff_floor(copy());
8187 return manage(res);
8188 }
8189
ge_set(isl::checked::pw_aff pwaff2)8190 isl::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
gist(isl::checked::set context)8196 isl::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
gt_set(isl::checked::pw_aff pwaff2)8202 isl::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
insert_domain(isl::checked::space domain)8208 isl::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
intersect_domain(isl::checked::set set)8214 isl::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
intersect_params(isl::checked::set set)8220 isl::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
isa_aff()8226 boolean pw_aff::isa_aff() const
8227 {
8228 auto res = isl_pw_aff_isa_aff(get());
8229 return manage(res);
8230 }
8231
le_set(isl::checked::pw_aff pwaff2)8232 isl::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
lt_set(isl::checked::pw_aff pwaff2)8238 isl::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
max(isl::checked::pw_aff pwaff2)8244 isl::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
min(isl::checked::pw_aff pwaff2)8250 isl::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
mod(isl::checked::val mod)8256 isl::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
mod(long mod)8262 isl::checked::pw_aff pw_aff::mod(long mod) const
8263 {
8264 return this->mod(isl::checked::val(ctx(), mod));
8265 }
8266
mul(isl::checked::pw_aff pwaff2)8267 isl::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
ne_set(isl::checked::pw_aff pwaff2)8273 isl::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
neg()8279 isl::checked::pw_aff pw_aff::neg() const
8280 {
8281 auto res = isl_pw_aff_neg(copy());
8282 return manage(res);
8283 }
8284
param_on_domain(isl::checked::set domain,isl::checked::id id)8285 isl::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
pullback(isl::checked::multi_aff ma)8291 isl::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
pullback(isl::checked::multi_pw_aff mpa)8297 isl::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
pullback(isl::checked::pw_multi_aff pma)8303 isl::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
scale(isl::checked::val v)8309 isl::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
scale(long v)8315 isl::checked::pw_aff pw_aff::scale(long v) const
8316 {
8317 return this->scale(isl::checked::val(ctx(), v));
8318 }
8319
scale_down(isl::checked::val f)8320 isl::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
scale_down(long f)8326 isl::checked::pw_aff pw_aff::scale_down(long f) const
8327 {
8328 return this->scale_down(isl::checked::val(ctx(), f));
8329 }
8330
sub(isl::checked::pw_aff pwaff2)8331 isl::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
subtract_domain(isl::checked::set set)8337 isl::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
tdiv_q(isl::checked::pw_aff pa2)8343 isl::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
tdiv_r(isl::checked::pw_aff pa2)8349 isl::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
union_add(isl::checked::pw_aff pwaff2)8355 isl::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
8361 inline 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
manage(__isl_take isl_pw_aff_list * ptr)8374 pw_aff_list manage(__isl_take isl_pw_aff_list *ptr) {
8375 return pw_aff_list(ptr);
8376 }
manage_copy(__isl_keep isl_pw_aff_list * ptr)8377 pw_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
pw_aff_list()8382 pw_aff_list::pw_aff_list()
8383 : ptr(nullptr) {}
8384
pw_aff_list(const pw_aff_list & obj)8385 pw_aff_list::pw_aff_list(const pw_aff_list &obj)
8386 : ptr(nullptr)
8387 {
8388 ptr = obj.copy();
8389 }
8390
pw_aff_list(__isl_take isl_pw_aff_list * ptr)8391 pw_aff_list::pw_aff_list(__isl_take isl_pw_aff_list *ptr)
8392 : ptr(ptr) {}
8393
pw_aff_list(isl::checked::ctx ctx,int n)8394 pw_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
pw_aff_list(isl::checked::pw_aff el)8400 pw_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
8406 pw_aff_list &pw_aff_list::operator=(pw_aff_list obj) {
8407 std::swap(this->ptr, obj.ptr);
8408 return *this;
8409 }
8410
~pw_aff_list()8411 pw_aff_list::~pw_aff_list() {
8412 if (ptr)
8413 isl_pw_aff_list_free(ptr);
8414 }
8415
copy()8416 __isl_give isl_pw_aff_list *pw_aff_list::copy() const & {
8417 return isl_pw_aff_list_copy(ptr);
8418 }
8419
get()8420 __isl_keep isl_pw_aff_list *pw_aff_list::get() const {
8421 return ptr;
8422 }
8423
release()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
is_null()8430 bool pw_aff_list::is_null() const {
8431 return ptr == nullptr;
8432 }
8433
ctx()8434 isl::checked::ctx pw_aff_list::ctx() const {
8435 return isl::checked::ctx(isl_pw_aff_list_get_ctx(ptr));
8436 }
8437
add(isl::checked::pw_aff el)8438 isl::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
clear()8444 isl::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
concat(isl::checked::pw_aff_list list2)8450 isl::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
drop(unsigned int first,unsigned int n)8456 isl::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
foreach(const std::function<stat (isl::checked::pw_aff)> & fn)8462 stat 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
at(int index)8476 isl::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
get_at(int index)8482 isl::checked::pw_aff pw_aff_list::get_at(int index) const
8483 {
8484 return at(index);
8485 }
8486
insert(unsigned int pos,isl::checked::pw_aff el)8487 isl::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
size()8493 class size pw_aff_list::size() const
8494 {
8495 auto res = isl_pw_aff_list_size(get());
8496 return manage(res);
8497 }
8498
8499 inline 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
manage(__isl_take isl_pw_multi_aff * ptr)8512 pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr) {
8513 return pw_multi_aff(ptr);
8514 }
manage_copy(__isl_keep isl_pw_multi_aff * ptr)8515 pw_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
pw_multi_aff()8520 pw_multi_aff::pw_multi_aff()
8521 : ptr(nullptr) {}
8522
pw_multi_aff(const pw_multi_aff & obj)8523 pw_multi_aff::pw_multi_aff(const pw_multi_aff &obj)
8524 : ptr(nullptr)
8525 {
8526 ptr = obj.copy();
8527 }
8528
pw_multi_aff(__isl_take isl_pw_multi_aff * ptr)8529 pw_multi_aff::pw_multi_aff(__isl_take isl_pw_multi_aff *ptr)
8530 : ptr(ptr) {}
8531
pw_multi_aff(isl::checked::multi_aff ma)8532 pw_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
pw_multi_aff(isl::checked::pw_aff pa)8538 pw_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
pw_multi_aff(isl::checked::ctx ctx,const std::string & str)8544 pw_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
8550 pw_multi_aff &pw_multi_aff::operator=(pw_multi_aff obj) {
8551 std::swap(this->ptr, obj.ptr);
8552 return *this;
8553 }
8554
~pw_multi_aff()8555 pw_multi_aff::~pw_multi_aff() {
8556 if (ptr)
8557 isl_pw_multi_aff_free(ptr);
8558 }
8559
copy()8560 __isl_give isl_pw_multi_aff *pw_multi_aff::copy() const & {
8561 return isl_pw_multi_aff_copy(ptr);
8562 }
8563
get()8564 __isl_keep isl_pw_multi_aff *pw_multi_aff::get() const {
8565 return ptr;
8566 }
8567
release()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
is_null()8574 bool pw_multi_aff::is_null() const {
8575 return ptr == nullptr;
8576 }
8577
ctx()8578 isl::checked::ctx pw_multi_aff::ctx() const {
8579 return isl::checked::ctx(isl_pw_multi_aff_get_ctx(ptr));
8580 }
8581
add(isl::checked::pw_multi_aff pma2)8582 isl::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
add_constant(isl::checked::multi_val mv)8588 isl::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
add_constant(isl::checked::val v)8594 isl::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
add_constant(long v)8600 isl::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
as_multi_aff()8605 isl::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
bind_domain(isl::checked::multi_id tuple)8611 isl::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
bind_domain_wrapped_domain(isl::checked::multi_id tuple)8617 isl::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
coalesce()8623 isl::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
domain()8629 isl::checked::set pw_multi_aff::domain() const
8630 {
8631 auto res = isl_pw_multi_aff_domain(copy());
8632 return manage(res);
8633 }
8634
domain_map(isl::checked::space space)8635 isl::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
flat_range_product(isl::checked::pw_multi_aff pma2)8641 isl::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
foreach_piece(const std::function<stat (isl::checked::set,isl::checked::multi_aff)> & fn)8647 stat 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
space()8661 isl::checked::space pw_multi_aff::space() const
8662 {
8663 auto res = isl_pw_multi_aff_get_space(get());
8664 return manage(res);
8665 }
8666
get_space()8667 isl::checked::space pw_multi_aff::get_space() const
8668 {
8669 return space();
8670 }
8671
gist(isl::checked::set set)8672 isl::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
insert_domain(isl::checked::space domain)8678 isl::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
intersect_domain(isl::checked::set set)8684 isl::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
intersect_params(isl::checked::set set)8690 isl::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
involves_locals()8696 boolean pw_multi_aff::involves_locals() const
8697 {
8698 auto res = isl_pw_multi_aff_involves_locals(get());
8699 return manage(res);
8700 }
8701
isa_multi_aff()8702 boolean 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
max_multi_val()8708 isl::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
min_multi_val()8714 isl::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
n_piece()8720 class size pw_multi_aff::n_piece() const
8721 {
8722 auto res = isl_pw_multi_aff_n_piece(get());
8723 return manage(res);
8724 }
8725
product(isl::checked::pw_multi_aff pma2)8726 isl::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
pullback(isl::checked::multi_aff ma)8732 isl::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
pullback(isl::checked::pw_multi_aff pma2)8738 isl::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
range_factor_domain()8744 isl::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
range_factor_range()8750 isl::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
range_map(isl::checked::space space)8756 isl::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
range_product(isl::checked::pw_multi_aff pma2)8762 isl::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
scale(isl::checked::val v)8768 isl::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
scale(long v)8774 isl::checked::pw_multi_aff pw_multi_aff::scale(long v) const
8775 {
8776 return this->scale(isl::checked::val(ctx(), v));
8777 }
8778
scale_down(isl::checked::val v)8779 isl::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
scale_down(long v)8785 isl::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
sub(isl::checked::pw_multi_aff pma2)8790 isl::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
subtract_domain(isl::checked::set set)8796 isl::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
union_add(isl::checked::pw_multi_aff pma2)8802 isl::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
zero(isl::checked::space space)8808 isl::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
8814 inline 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
manage(__isl_take isl_pw_multi_aff_list * ptr)8827 pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr) {
8828 return pw_multi_aff_list(ptr);
8829 }
manage_copy(__isl_keep isl_pw_multi_aff_list * ptr)8830 pw_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
pw_multi_aff_list()8835 pw_multi_aff_list::pw_multi_aff_list()
8836 : ptr(nullptr) {}
8837
pw_multi_aff_list(const pw_multi_aff_list & obj)8838 pw_multi_aff_list::pw_multi_aff_list(const pw_multi_aff_list &obj)
8839 : ptr(nullptr)
8840 {
8841 ptr = obj.copy();
8842 }
8843
pw_multi_aff_list(__isl_take isl_pw_multi_aff_list * ptr)8844 pw_multi_aff_list::pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr)
8845 : ptr(ptr) {}
8846
pw_multi_aff_list(isl::checked::ctx ctx,int n)8847 pw_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
pw_multi_aff_list(isl::checked::pw_multi_aff el)8853 pw_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
8859 pw_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
~pw_multi_aff_list()8864 pw_multi_aff_list::~pw_multi_aff_list() {
8865 if (ptr)
8866 isl_pw_multi_aff_list_free(ptr);
8867 }
8868
copy()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
get()8873 __isl_keep isl_pw_multi_aff_list *pw_multi_aff_list::get() const {
8874 return ptr;
8875 }
8876
release()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
is_null()8883 bool pw_multi_aff_list::is_null() const {
8884 return ptr == nullptr;
8885 }
8886
ctx()8887 isl::checked::ctx pw_multi_aff_list::ctx() const {
8888 return isl::checked::ctx(isl_pw_multi_aff_list_get_ctx(ptr));
8889 }
8890
add(isl::checked::pw_multi_aff el)8891 isl::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
clear()8897 isl::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
concat(isl::checked::pw_multi_aff_list list2)8903 isl::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
drop(unsigned int first,unsigned int n)8909 isl::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
foreach(const std::function<stat (isl::checked::pw_multi_aff)> & fn)8915 stat 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
at(int index)8929 isl::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
get_at(int index)8935 isl::checked::pw_multi_aff pw_multi_aff_list::get_at(int index) const
8936 {
8937 return at(index);
8938 }
8939
insert(unsigned int pos,isl::checked::pw_multi_aff el)8940 isl::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
size()8946 class size pw_multi_aff_list::size() const
8947 {
8948 auto res = isl_pw_multi_aff_list_size(get());
8949 return manage(res);
8950 }
8951
8952 inline 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
manage(__isl_take isl_schedule * ptr)8965 schedule manage(__isl_take isl_schedule *ptr) {
8966 return schedule(ptr);
8967 }
manage_copy(__isl_keep isl_schedule * ptr)8968 schedule manage_copy(__isl_keep isl_schedule *ptr) {
8969 ptr = isl_schedule_copy(ptr);
8970 return schedule(ptr);
8971 }
8972
schedule()8973 schedule::schedule()
8974 : ptr(nullptr) {}
8975
schedule(const schedule & obj)8976 schedule::schedule(const schedule &obj)
8977 : ptr(nullptr)
8978 {
8979 ptr = obj.copy();
8980 }
8981
schedule(__isl_take isl_schedule * ptr)8982 schedule::schedule(__isl_take isl_schedule *ptr)
8983 : ptr(ptr) {}
8984
schedule(isl::checked::ctx ctx,const std::string & str)8985 schedule::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
8991 schedule &schedule::operator=(schedule obj) {
8992 std::swap(this->ptr, obj.ptr);
8993 return *this;
8994 }
8995
~schedule()8996 schedule::~schedule() {
8997 if (ptr)
8998 isl_schedule_free(ptr);
8999 }
9000
copy()9001 __isl_give isl_schedule *schedule::copy() const & {
9002 return isl_schedule_copy(ptr);
9003 }
9004
get()9005 __isl_keep isl_schedule *schedule::get() const {
9006 return ptr;
9007 }
9008
release()9009 __isl_give isl_schedule *schedule::release() {
9010 isl_schedule *tmp = ptr;
9011 ptr = nullptr;
9012 return tmp;
9013 }
9014
is_null()9015 bool schedule::is_null() const {
9016 return ptr == nullptr;
9017 }
9018
ctx()9019 isl::checked::ctx schedule::ctx() const {
9020 return isl::checked::ctx(isl_schedule_get_ctx(ptr));
9021 }
9022
from_domain(isl::checked::union_set domain)9023 isl::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
map()9029 isl::checked::union_map schedule::map() const
9030 {
9031 auto res = isl_schedule_get_map(get());
9032 return manage(res);
9033 }
9034
get_map()9035 isl::checked::union_map schedule::get_map() const
9036 {
9037 return map();
9038 }
9039
root()9040 isl::checked::schedule_node schedule::root() const
9041 {
9042 auto res = isl_schedule_get_root(get());
9043 return manage(res);
9044 }
9045
get_root()9046 isl::checked::schedule_node schedule::get_root() const
9047 {
9048 return root();
9049 }
9050
pullback(isl::checked::union_pw_multi_aff upma)9051 isl::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
9057 inline 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
manage(__isl_take isl_schedule_constraints * ptr)9070 schedule_constraints manage(__isl_take isl_schedule_constraints *ptr) {
9071 return schedule_constraints(ptr);
9072 }
manage_copy(__isl_keep isl_schedule_constraints * ptr)9073 schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr) {
9074 ptr = isl_schedule_constraints_copy(ptr);
9075 return schedule_constraints(ptr);
9076 }
9077
schedule_constraints()9078 schedule_constraints::schedule_constraints()
9079 : ptr(nullptr) {}
9080
schedule_constraints(const schedule_constraints & obj)9081 schedule_constraints::schedule_constraints(const schedule_constraints &obj)
9082 : ptr(nullptr)
9083 {
9084 ptr = obj.copy();
9085 }
9086
schedule_constraints(__isl_take isl_schedule_constraints * ptr)9087 schedule_constraints::schedule_constraints(__isl_take isl_schedule_constraints *ptr)
9088 : ptr(ptr) {}
9089
schedule_constraints(isl::checked::ctx ctx,const std::string & str)9090 schedule_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
9096 schedule_constraints &schedule_constraints::operator=(schedule_constraints obj) {
9097 std::swap(this->ptr, obj.ptr);
9098 return *this;
9099 }
9100
~schedule_constraints()9101 schedule_constraints::~schedule_constraints() {
9102 if (ptr)
9103 isl_schedule_constraints_free(ptr);
9104 }
9105
copy()9106 __isl_give isl_schedule_constraints *schedule_constraints::copy() const & {
9107 return isl_schedule_constraints_copy(ptr);
9108 }
9109
get()9110 __isl_keep isl_schedule_constraints *schedule_constraints::get() const {
9111 return ptr;
9112 }
9113
release()9114 __isl_give isl_schedule_constraints *schedule_constraints::release() {
9115 isl_schedule_constraints *tmp = ptr;
9116 ptr = nullptr;
9117 return tmp;
9118 }
9119
is_null()9120 bool schedule_constraints::is_null() const {
9121 return ptr == nullptr;
9122 }
9123
ctx()9124 isl::checked::ctx schedule_constraints::ctx() const {
9125 return isl::checked::ctx(isl_schedule_constraints_get_ctx(ptr));
9126 }
9127
compute_schedule()9128 isl::checked::schedule schedule_constraints::compute_schedule() const
9129 {
9130 auto res = isl_schedule_constraints_compute_schedule(copy());
9131 return manage(res);
9132 }
9133
coincidence()9134 isl::checked::union_map schedule_constraints::coincidence() const
9135 {
9136 auto res = isl_schedule_constraints_get_coincidence(get());
9137 return manage(res);
9138 }
9139
get_coincidence()9140 isl::checked::union_map schedule_constraints::get_coincidence() const
9141 {
9142 return coincidence();
9143 }
9144
conditional_validity()9145 isl::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
get_conditional_validity()9151 isl::checked::union_map schedule_constraints::get_conditional_validity() const
9152 {
9153 return conditional_validity();
9154 }
9155
conditional_validity_condition()9156 isl::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
get_conditional_validity_condition()9162 isl::checked::union_map schedule_constraints::get_conditional_validity_condition() const
9163 {
9164 return conditional_validity_condition();
9165 }
9166
context()9167 isl::checked::set schedule_constraints::context() const
9168 {
9169 auto res = isl_schedule_constraints_get_context(get());
9170 return manage(res);
9171 }
9172
get_context()9173 isl::checked::set schedule_constraints::get_context() const
9174 {
9175 return context();
9176 }
9177
domain()9178 isl::checked::union_set schedule_constraints::domain() const
9179 {
9180 auto res = isl_schedule_constraints_get_domain(get());
9181 return manage(res);
9182 }
9183
get_domain()9184 isl::checked::union_set schedule_constraints::get_domain() const
9185 {
9186 return domain();
9187 }
9188
proximity()9189 isl::checked::union_map schedule_constraints::proximity() const
9190 {
9191 auto res = isl_schedule_constraints_get_proximity(get());
9192 return manage(res);
9193 }
9194
get_proximity()9195 isl::checked::union_map schedule_constraints::get_proximity() const
9196 {
9197 return proximity();
9198 }
9199
validity()9200 isl::checked::union_map schedule_constraints::validity() const
9201 {
9202 auto res = isl_schedule_constraints_get_validity(get());
9203 return manage(res);
9204 }
9205
get_validity()9206 isl::checked::union_map schedule_constraints::get_validity() const
9207 {
9208 return validity();
9209 }
9210
on_domain(isl::checked::union_set domain)9211 isl::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
set_coincidence(isl::checked::union_map coincidence)9217 isl::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
set_conditional_validity(isl::checked::union_map condition,isl::checked::union_map validity)9223 isl::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
set_context(isl::checked::set context)9229 isl::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
set_proximity(isl::checked::union_map proximity)9235 isl::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
set_validity(isl::checked::union_map validity)9241 isl::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
9247 inline 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
manage(__isl_take isl_schedule_node * ptr)9260 schedule_node manage(__isl_take isl_schedule_node *ptr) {
9261 return schedule_node(ptr);
9262 }
manage_copy(__isl_keep isl_schedule_node * ptr)9263 schedule_node manage_copy(__isl_keep isl_schedule_node *ptr) {
9264 ptr = isl_schedule_node_copy(ptr);
9265 return schedule_node(ptr);
9266 }
9267
schedule_node()9268 schedule_node::schedule_node()
9269 : ptr(nullptr) {}
9270
schedule_node(const schedule_node & obj)9271 schedule_node::schedule_node(const schedule_node &obj)
9272 : ptr(nullptr)
9273 {
9274 ptr = obj.copy();
9275 }
9276
schedule_node(__isl_take isl_schedule_node * ptr)9277 schedule_node::schedule_node(__isl_take isl_schedule_node *ptr)
9278 : ptr(ptr) {}
9279
9280 schedule_node &schedule_node::operator=(schedule_node obj) {
9281 std::swap(this->ptr, obj.ptr);
9282 return *this;
9283 }
9284
~schedule_node()9285 schedule_node::~schedule_node() {
9286 if (ptr)
9287 isl_schedule_node_free(ptr);
9288 }
9289
copy()9290 __isl_give isl_schedule_node *schedule_node::copy() const & {
9291 return isl_schedule_node_copy(ptr);
9292 }
9293
get()9294 __isl_keep isl_schedule_node *schedule_node::get() const {
9295 return ptr;
9296 }
9297
release()9298 __isl_give isl_schedule_node *schedule_node::release() {
9299 isl_schedule_node *tmp = ptr;
9300 ptr = nullptr;
9301 return tmp;
9302 }
9303
is_null()9304 bool schedule_node::is_null() const {
9305 return ptr == nullptr;
9306 }
9307
9308 template <typename T, typename>
isa_type(T subtype)9309 boolean 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 }
9315 template <class T>
isa()9316 boolean schedule_node::isa() const
9317 {
9318 return isa_type<decltype(T::type)>(T::type);
9319 }
9320 template <class T>
as()9321 T 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
ctx()9328 isl::checked::ctx schedule_node::ctx() const {
9329 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9330 }
9331
ancestor(int generation)9332 isl::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
child(int pos)9338 isl::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
every_descendant(const std::function<boolean (isl::checked::schedule_node)> & test)9344 boolean 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
first_child()9358 isl::checked::schedule_node schedule_node::first_child() const
9359 {
9360 auto res = isl_schedule_node_first_child(copy());
9361 return manage(res);
9362 }
9363
foreach_ancestor_top_down(const std::function<stat (isl::checked::schedule_node)> & fn)9364 stat 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
foreach_descendant_top_down(const std::function<boolean (isl::checked::schedule_node)> & fn)9378 stat 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
from_domain(isl::checked::union_set domain)9392 isl::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
from_extension(isl::checked::union_map extension)9398 isl::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
ancestor_child_position(const isl::checked::schedule_node & ancestor)9404 class 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
get_ancestor_child_position(const isl::checked::schedule_node & ancestor)9410 class size schedule_node::get_ancestor_child_position(const isl::checked::schedule_node &ancestor) const
9411 {
9412 return ancestor_child_position(ancestor);
9413 }
9414
child_position()9415 class size schedule_node::child_position() const
9416 {
9417 auto res = isl_schedule_node_get_child_position(get());
9418 return manage(res);
9419 }
9420
get_child_position()9421 class size schedule_node::get_child_position() const
9422 {
9423 return child_position();
9424 }
9425
prefix_schedule_multi_union_pw_aff()9426 isl::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
get_prefix_schedule_multi_union_pw_aff()9432 isl::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
prefix_schedule_union_map()9437 isl::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
get_prefix_schedule_union_map()9443 isl::checked::union_map schedule_node::get_prefix_schedule_union_map() const
9444 {
9445 return prefix_schedule_union_map();
9446 }
9447
prefix_schedule_union_pw_multi_aff()9448 isl::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
get_prefix_schedule_union_pw_multi_aff()9454 isl::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
schedule()9459 isl::checked::schedule schedule_node::schedule() const
9460 {
9461 auto res = isl_schedule_node_get_schedule(get());
9462 return manage(res);
9463 }
9464
get_schedule()9465 isl::checked::schedule schedule_node::get_schedule() const
9466 {
9467 return schedule();
9468 }
9469
shared_ancestor(const isl::checked::schedule_node & node2)9470 isl::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
get_shared_ancestor(const isl::checked::schedule_node & node2)9476 isl::checked::schedule_node schedule_node::get_shared_ancestor(const isl::checked::schedule_node &node2) const
9477 {
9478 return shared_ancestor(node2);
9479 }
9480
tree_depth()9481 class size schedule_node::tree_depth() const
9482 {
9483 auto res = isl_schedule_node_get_tree_depth(get());
9484 return manage(res);
9485 }
9486
get_tree_depth()9487 class size schedule_node::get_tree_depth() const
9488 {
9489 return tree_depth();
9490 }
9491
graft_after(isl::checked::schedule_node graft)9492 isl::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
graft_before(isl::checked::schedule_node graft)9498 isl::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
has_children()9504 boolean schedule_node::has_children() const
9505 {
9506 auto res = isl_schedule_node_has_children(get());
9507 return manage(res);
9508 }
9509
has_next_sibling()9510 boolean schedule_node::has_next_sibling() const
9511 {
9512 auto res = isl_schedule_node_has_next_sibling(get());
9513 return manage(res);
9514 }
9515
has_parent()9516 boolean schedule_node::has_parent() const
9517 {
9518 auto res = isl_schedule_node_has_parent(get());
9519 return manage(res);
9520 }
9521
has_previous_sibling()9522 boolean schedule_node::has_previous_sibling() const
9523 {
9524 auto res = isl_schedule_node_has_previous_sibling(get());
9525 return manage(res);
9526 }
9527
insert_context(isl::checked::set context)9528 isl::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
insert_filter(isl::checked::union_set filter)9534 isl::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
insert_guard(isl::checked::set context)9540 isl::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
insert_mark(isl::checked::id mark)9546 isl::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
insert_mark(const std::string & mark)9552 isl::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
insert_partial_schedule(isl::checked::multi_union_pw_aff schedule)9557 isl::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
insert_sequence(isl::checked::union_set_list filters)9563 isl::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
insert_set(isl::checked::union_set_list filters)9569 isl::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
is_equal(const isl::checked::schedule_node & node2)9575 boolean 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
is_subtree_anchored()9581 boolean schedule_node::is_subtree_anchored() const
9582 {
9583 auto res = isl_schedule_node_is_subtree_anchored(get());
9584 return manage(res);
9585 }
9586
map_descendant_bottom_up(const std::function<isl::checked::schedule_node (isl::checked::schedule_node)> & fn)9587 isl::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
n_children()9601 class size schedule_node::n_children() const
9602 {
9603 auto res = isl_schedule_node_n_children(get());
9604 return manage(res);
9605 }
9606
next_sibling()9607 isl::checked::schedule_node schedule_node::next_sibling() const
9608 {
9609 auto res = isl_schedule_node_next_sibling(copy());
9610 return manage(res);
9611 }
9612
order_after(isl::checked::union_set filter)9613 isl::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
order_before(isl::checked::union_set filter)9619 isl::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
parent()9625 isl::checked::schedule_node schedule_node::parent() const
9626 {
9627 auto res = isl_schedule_node_parent(copy());
9628 return manage(res);
9629 }
9630
previous_sibling()9631 isl::checked::schedule_node schedule_node::previous_sibling() const
9632 {
9633 auto res = isl_schedule_node_previous_sibling(copy());
9634 return manage(res);
9635 }
9636
root()9637 isl::checked::schedule_node schedule_node::root() const
9638 {
9639 auto res = isl_schedule_node_root(copy());
9640 return manage(res);
9641 }
9642
9643 inline 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
schedule_node_band()9656 schedule_node_band::schedule_node_band()
9657 : schedule_node() {}
9658
schedule_node_band(const schedule_node_band & obj)9659 schedule_node_band::schedule_node_band(const schedule_node_band &obj)
9660 : schedule_node(obj)
9661 {
9662 }
9663
schedule_node_band(__isl_take isl_schedule_node * ptr)9664 schedule_node_band::schedule_node_band(__isl_take isl_schedule_node *ptr)
9665 : schedule_node(ptr) {}
9666
9667 schedule_node_band &schedule_node_band::operator=(schedule_node_band obj) {
9668 std::swap(this->ptr, obj.ptr);
9669 return *this;
9670 }
9671
ctx()9672 isl::checked::ctx schedule_node_band::ctx() const {
9673 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9674 }
9675
ast_build_options()9676 isl::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
get_ast_build_options()9682 isl::checked::union_set schedule_node_band::get_ast_build_options() const
9683 {
9684 return ast_build_options();
9685 }
9686
ast_isolate_option()9687 isl::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
get_ast_isolate_option()9693 isl::checked::set schedule_node_band::get_ast_isolate_option() const
9694 {
9695 return ast_isolate_option();
9696 }
9697
partial_schedule()9698 isl::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
get_partial_schedule()9704 isl::checked::multi_union_pw_aff schedule_node_band::get_partial_schedule() const
9705 {
9706 return partial_schedule();
9707 }
9708
permutable()9709 boolean schedule_node_band::permutable() const
9710 {
9711 auto res = isl_schedule_node_band_get_permutable(get());
9712 return manage(res);
9713 }
9714
get_permutable()9715 boolean schedule_node_band::get_permutable() const
9716 {
9717 return permutable();
9718 }
9719
member_get_coincident(int pos)9720 boolean 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
member_set_coincident(int pos,int coincident)9726 schedule_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
mod(isl::checked::multi_val mv)9732 schedule_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
n_member()9738 class size schedule_node_band::n_member() const
9739 {
9740 auto res = isl_schedule_node_band_n_member(get());
9741 return manage(res);
9742 }
9743
scale(isl::checked::multi_val mv)9744 schedule_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
scale_down(isl::checked::multi_val mv)9750 schedule_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
set_ast_build_options(isl::checked::union_set options)9756 schedule_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
set_permutable(int permutable)9762 schedule_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
shift(isl::checked::multi_union_pw_aff shift)9768 schedule_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
split(int pos)9774 schedule_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
tile(isl::checked::multi_val sizes)9780 schedule_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
member_set_ast_loop_default(int pos)9787 schedule_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
member_set_ast_loop_atomic(int pos)9794 schedule_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
member_set_ast_loop_unroll(int pos)9801 schedule_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
member_set_ast_loop_separate(int pos)9808 schedule_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
9814 inline 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
schedule_node_context()9827 schedule_node_context::schedule_node_context()
9828 : schedule_node() {}
9829
schedule_node_context(const schedule_node_context & obj)9830 schedule_node_context::schedule_node_context(const schedule_node_context &obj)
9831 : schedule_node(obj)
9832 {
9833 }
9834
schedule_node_context(__isl_take isl_schedule_node * ptr)9835 schedule_node_context::schedule_node_context(__isl_take isl_schedule_node *ptr)
9836 : schedule_node(ptr) {}
9837
9838 schedule_node_context &schedule_node_context::operator=(schedule_node_context obj) {
9839 std::swap(this->ptr, obj.ptr);
9840 return *this;
9841 }
9842
ctx()9843 isl::checked::ctx schedule_node_context::ctx() const {
9844 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9845 }
9846
context()9847 isl::checked::set schedule_node_context::context() const
9848 {
9849 auto res = isl_schedule_node_context_get_context(get());
9850 return manage(res);
9851 }
9852
get_context()9853 isl::checked::set schedule_node_context::get_context() const
9854 {
9855 return context();
9856 }
9857
9858 inline 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
schedule_node_domain()9871 schedule_node_domain::schedule_node_domain()
9872 : schedule_node() {}
9873
schedule_node_domain(const schedule_node_domain & obj)9874 schedule_node_domain::schedule_node_domain(const schedule_node_domain &obj)
9875 : schedule_node(obj)
9876 {
9877 }
9878
schedule_node_domain(__isl_take isl_schedule_node * ptr)9879 schedule_node_domain::schedule_node_domain(__isl_take isl_schedule_node *ptr)
9880 : schedule_node(ptr) {}
9881
9882 schedule_node_domain &schedule_node_domain::operator=(schedule_node_domain obj) {
9883 std::swap(this->ptr, obj.ptr);
9884 return *this;
9885 }
9886
ctx()9887 isl::checked::ctx schedule_node_domain::ctx() const {
9888 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9889 }
9890
domain()9891 isl::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
get_domain()9897 isl::checked::union_set schedule_node_domain::get_domain() const
9898 {
9899 return domain();
9900 }
9901
9902 inline 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
schedule_node_expansion()9915 schedule_node_expansion::schedule_node_expansion()
9916 : schedule_node() {}
9917
schedule_node_expansion(const schedule_node_expansion & obj)9918 schedule_node_expansion::schedule_node_expansion(const schedule_node_expansion &obj)
9919 : schedule_node(obj)
9920 {
9921 }
9922
schedule_node_expansion(__isl_take isl_schedule_node * ptr)9923 schedule_node_expansion::schedule_node_expansion(__isl_take isl_schedule_node *ptr)
9924 : schedule_node(ptr) {}
9925
9926 schedule_node_expansion &schedule_node_expansion::operator=(schedule_node_expansion obj) {
9927 std::swap(this->ptr, obj.ptr);
9928 return *this;
9929 }
9930
ctx()9931 isl::checked::ctx schedule_node_expansion::ctx() const {
9932 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9933 }
9934
contraction()9935 isl::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
get_contraction()9941 isl::checked::union_pw_multi_aff schedule_node_expansion::get_contraction() const
9942 {
9943 return contraction();
9944 }
9945
expansion()9946 isl::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
get_expansion()9952 isl::checked::union_map schedule_node_expansion::get_expansion() const
9953 {
9954 return expansion();
9955 }
9956
9957 inline 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
schedule_node_extension()9970 schedule_node_extension::schedule_node_extension()
9971 : schedule_node() {}
9972
schedule_node_extension(const schedule_node_extension & obj)9973 schedule_node_extension::schedule_node_extension(const schedule_node_extension &obj)
9974 : schedule_node(obj)
9975 {
9976 }
9977
schedule_node_extension(__isl_take isl_schedule_node * ptr)9978 schedule_node_extension::schedule_node_extension(__isl_take isl_schedule_node *ptr)
9979 : schedule_node(ptr) {}
9980
9981 schedule_node_extension &schedule_node_extension::operator=(schedule_node_extension obj) {
9982 std::swap(this->ptr, obj.ptr);
9983 return *this;
9984 }
9985
ctx()9986 isl::checked::ctx schedule_node_extension::ctx() const {
9987 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
9988 }
9989
extension()9990 isl::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
get_extension()9996 isl::checked::union_map schedule_node_extension::get_extension() const
9997 {
9998 return extension();
9999 }
10000
10001 inline 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
schedule_node_filter()10014 schedule_node_filter::schedule_node_filter()
10015 : schedule_node() {}
10016
schedule_node_filter(const schedule_node_filter & obj)10017 schedule_node_filter::schedule_node_filter(const schedule_node_filter &obj)
10018 : schedule_node(obj)
10019 {
10020 }
10021
schedule_node_filter(__isl_take isl_schedule_node * ptr)10022 schedule_node_filter::schedule_node_filter(__isl_take isl_schedule_node *ptr)
10023 : schedule_node(ptr) {}
10024
10025 schedule_node_filter &schedule_node_filter::operator=(schedule_node_filter obj) {
10026 std::swap(this->ptr, obj.ptr);
10027 return *this;
10028 }
10029
ctx()10030 isl::checked::ctx schedule_node_filter::ctx() const {
10031 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10032 }
10033
filter()10034 isl::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
get_filter()10040 isl::checked::union_set schedule_node_filter::get_filter() const
10041 {
10042 return filter();
10043 }
10044
10045 inline 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
schedule_node_guard()10058 schedule_node_guard::schedule_node_guard()
10059 : schedule_node() {}
10060
schedule_node_guard(const schedule_node_guard & obj)10061 schedule_node_guard::schedule_node_guard(const schedule_node_guard &obj)
10062 : schedule_node(obj)
10063 {
10064 }
10065
schedule_node_guard(__isl_take isl_schedule_node * ptr)10066 schedule_node_guard::schedule_node_guard(__isl_take isl_schedule_node *ptr)
10067 : schedule_node(ptr) {}
10068
10069 schedule_node_guard &schedule_node_guard::operator=(schedule_node_guard obj) {
10070 std::swap(this->ptr, obj.ptr);
10071 return *this;
10072 }
10073
ctx()10074 isl::checked::ctx schedule_node_guard::ctx() const {
10075 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10076 }
10077
guard()10078 isl::checked::set schedule_node_guard::guard() const
10079 {
10080 auto res = isl_schedule_node_guard_get_guard(get());
10081 return manage(res);
10082 }
10083
get_guard()10084 isl::checked::set schedule_node_guard::get_guard() const
10085 {
10086 return guard();
10087 }
10088
10089 inline 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
schedule_node_leaf()10102 schedule_node_leaf::schedule_node_leaf()
10103 : schedule_node() {}
10104
schedule_node_leaf(const schedule_node_leaf & obj)10105 schedule_node_leaf::schedule_node_leaf(const schedule_node_leaf &obj)
10106 : schedule_node(obj)
10107 {
10108 }
10109
schedule_node_leaf(__isl_take isl_schedule_node * ptr)10110 schedule_node_leaf::schedule_node_leaf(__isl_take isl_schedule_node *ptr)
10111 : schedule_node(ptr) {}
10112
10113 schedule_node_leaf &schedule_node_leaf::operator=(schedule_node_leaf obj) {
10114 std::swap(this->ptr, obj.ptr);
10115 return *this;
10116 }
10117
ctx()10118 isl::checked::ctx schedule_node_leaf::ctx() const {
10119 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10120 }
10121
10122 inline 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
schedule_node_mark()10135 schedule_node_mark::schedule_node_mark()
10136 : schedule_node() {}
10137
schedule_node_mark(const schedule_node_mark & obj)10138 schedule_node_mark::schedule_node_mark(const schedule_node_mark &obj)
10139 : schedule_node(obj)
10140 {
10141 }
10142
schedule_node_mark(__isl_take isl_schedule_node * ptr)10143 schedule_node_mark::schedule_node_mark(__isl_take isl_schedule_node *ptr)
10144 : schedule_node(ptr) {}
10145
10146 schedule_node_mark &schedule_node_mark::operator=(schedule_node_mark obj) {
10147 std::swap(this->ptr, obj.ptr);
10148 return *this;
10149 }
10150
ctx()10151 isl::checked::ctx schedule_node_mark::ctx() const {
10152 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10153 }
10154
10155 inline 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
schedule_node_sequence()10168 schedule_node_sequence::schedule_node_sequence()
10169 : schedule_node() {}
10170
schedule_node_sequence(const schedule_node_sequence & obj)10171 schedule_node_sequence::schedule_node_sequence(const schedule_node_sequence &obj)
10172 : schedule_node(obj)
10173 {
10174 }
10175
schedule_node_sequence(__isl_take isl_schedule_node * ptr)10176 schedule_node_sequence::schedule_node_sequence(__isl_take isl_schedule_node *ptr)
10177 : schedule_node(ptr) {}
10178
10179 schedule_node_sequence &schedule_node_sequence::operator=(schedule_node_sequence obj) {
10180 std::swap(this->ptr, obj.ptr);
10181 return *this;
10182 }
10183
ctx()10184 isl::checked::ctx schedule_node_sequence::ctx() const {
10185 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10186 }
10187
10188 inline 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
schedule_node_set()10201 schedule_node_set::schedule_node_set()
10202 : schedule_node() {}
10203
schedule_node_set(const schedule_node_set & obj)10204 schedule_node_set::schedule_node_set(const schedule_node_set &obj)
10205 : schedule_node(obj)
10206 {
10207 }
10208
schedule_node_set(__isl_take isl_schedule_node * ptr)10209 schedule_node_set::schedule_node_set(__isl_take isl_schedule_node *ptr)
10210 : schedule_node(ptr) {}
10211
10212 schedule_node_set &schedule_node_set::operator=(schedule_node_set obj) {
10213 std::swap(this->ptr, obj.ptr);
10214 return *this;
10215 }
10216
ctx()10217 isl::checked::ctx schedule_node_set::ctx() const {
10218 return isl::checked::ctx(isl_schedule_node_get_ctx(ptr));
10219 }
10220
10221 inline 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
manage(__isl_take isl_set * ptr)10234 set manage(__isl_take isl_set *ptr) {
10235 return set(ptr);
10236 }
manage_copy(__isl_keep isl_set * ptr)10237 set manage_copy(__isl_keep isl_set *ptr) {
10238 ptr = isl_set_copy(ptr);
10239 return set(ptr);
10240 }
10241
set()10242 set::set()
10243 : ptr(nullptr) {}
10244
set(const set & obj)10245 set::set(const set &obj)
10246 : ptr(nullptr)
10247 {
10248 ptr = obj.copy();
10249 }
10250
set(__isl_take isl_set * ptr)10251 set::set(__isl_take isl_set *ptr)
10252 : ptr(ptr) {}
10253
set(isl::checked::basic_set bset)10254 set::set(isl::checked::basic_set bset)
10255 {
10256 auto res = isl_set_from_basic_set(bset.release());
10257 ptr = res;
10258 }
10259
set(isl::checked::point pnt)10260 set::set(isl::checked::point pnt)
10261 {
10262 auto res = isl_set_from_point(pnt.release());
10263 ptr = res;
10264 }
10265
set(isl::checked::ctx ctx,const std::string & str)10266 set::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
10272 set &set::operator=(set obj) {
10273 std::swap(this->ptr, obj.ptr);
10274 return *this;
10275 }
10276
~set()10277 set::~set() {
10278 if (ptr)
10279 isl_set_free(ptr);
10280 }
10281
copy()10282 __isl_give isl_set *set::copy() const & {
10283 return isl_set_copy(ptr);
10284 }
10285
get()10286 __isl_keep isl_set *set::get() const {
10287 return ptr;
10288 }
10289
release()10290 __isl_give isl_set *set::release() {
10291 isl_set *tmp = ptr;
10292 ptr = nullptr;
10293 return tmp;
10294 }
10295
is_null()10296 bool set::is_null() const {
10297 return ptr == nullptr;
10298 }
10299
ctx()10300 isl::checked::ctx set::ctx() const {
10301 return isl::checked::ctx(isl_set_get_ctx(ptr));
10302 }
10303
affine_hull()10304 isl::checked::basic_set set::affine_hull() const
10305 {
10306 auto res = isl_set_affine_hull(copy());
10307 return manage(res);
10308 }
10309
apply(isl::checked::map map)10310 isl::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
bind(isl::checked::multi_id tuple)10316 isl::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
coalesce()10322 isl::checked::set set::coalesce() const
10323 {
10324 auto res = isl_set_coalesce(copy());
10325 return manage(res);
10326 }
10327
complement()10328 isl::checked::set set::complement() const
10329 {
10330 auto res = isl_set_complement(copy());
10331 return manage(res);
10332 }
10333
detect_equalities()10334 isl::checked::set set::detect_equalities() const
10335 {
10336 auto res = isl_set_detect_equalities(copy());
10337 return manage(res);
10338 }
10339
dim_max_val(int pos)10340 isl::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
dim_min_val(int pos)10346 isl::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
empty(isl::checked::space space)10352 isl::checked::set set::empty(isl::checked::space space)
10353 {
10354 auto res = isl_set_empty(space.release());
10355 return manage(res);
10356 }
10357
flatten()10358 isl::checked::set set::flatten() const
10359 {
10360 auto res = isl_set_flatten(copy());
10361 return manage(res);
10362 }
10363
foreach_basic_set(const std::function<stat (isl::checked::basic_set)> & fn)10364 stat 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
foreach_point(const std::function<stat (isl::checked::point)> & fn)10378 stat 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
plain_multi_val_if_fixed()10392 isl::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
get_plain_multi_val_if_fixed()10398 isl::checked::multi_val set::get_plain_multi_val_if_fixed() const
10399 {
10400 return plain_multi_val_if_fixed();
10401 }
10402
simple_fixed_box_hull()10403 isl::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
get_simple_fixed_box_hull()10409 isl::checked::fixed_box set::get_simple_fixed_box_hull() const
10410 {
10411 return simple_fixed_box_hull();
10412 }
10413
space()10414 isl::checked::space set::space() const
10415 {
10416 auto res = isl_set_get_space(get());
10417 return manage(res);
10418 }
10419
get_space()10420 isl::checked::space set::get_space() const
10421 {
10422 return space();
10423 }
10424
stride(int pos)10425 isl::checked::val set::stride(int pos) const
10426 {
10427 auto res = isl_set_get_stride(get(), pos);
10428 return manage(res);
10429 }
10430
get_stride(int pos)10431 isl::checked::val set::get_stride(int pos) const
10432 {
10433 return stride(pos);
10434 }
10435
gist(isl::checked::set context)10436 isl::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
identity()10442 isl::checked::map set::identity() const
10443 {
10444 auto res = isl_set_identity(copy());
10445 return manage(res);
10446 }
10447
indicator_function()10448 isl::checked::pw_aff set::indicator_function() const
10449 {
10450 auto res = isl_set_indicator_function(copy());
10451 return manage(res);
10452 }
10453
insert_domain(isl::checked::space domain)10454 isl::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
intersect(isl::checked::set set2)10460 isl::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
intersect_params(isl::checked::set params)10466 isl::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
involves_locals()10472 boolean set::involves_locals() const
10473 {
10474 auto res = isl_set_involves_locals(get());
10475 return manage(res);
10476 }
10477
is_disjoint(const isl::checked::set & set2)10478 boolean 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
is_empty()10484 boolean set::is_empty() const
10485 {
10486 auto res = isl_set_is_empty(get());
10487 return manage(res);
10488 }
10489
is_equal(const isl::checked::set & set2)10490 boolean 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
is_singleton()10496 boolean set::is_singleton() const
10497 {
10498 auto res = isl_set_is_singleton(get());
10499 return manage(res);
10500 }
10501
is_strict_subset(const isl::checked::set & set2)10502 boolean 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
is_subset(const isl::checked::set & set2)10508 boolean 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
is_wrapping()10514 boolean set::is_wrapping() const
10515 {
10516 auto res = isl_set_is_wrapping(get());
10517 return manage(res);
10518 }
10519
lexmax()10520 isl::checked::set set::lexmax() const
10521 {
10522 auto res = isl_set_lexmax(copy());
10523 return manage(res);
10524 }
10525
lexmax_pw_multi_aff()10526 isl::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
lexmin()10532 isl::checked::set set::lexmin() const
10533 {
10534 auto res = isl_set_lexmin(copy());
10535 return manage(res);
10536 }
10537
lexmin_pw_multi_aff()10538 isl::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
lower_bound(isl::checked::multi_pw_aff lower)10544 isl::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
lower_bound(isl::checked::multi_val lower)10550 isl::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
max_multi_pw_aff()10556 isl::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
max_val(const isl::checked::aff & obj)10562 isl::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
min_multi_pw_aff()10568 isl::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
min_val(const isl::checked::aff & obj)10574 isl::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
params()10580 isl::checked::set set::params() const
10581 {
10582 auto res = isl_set_params(copy());
10583 return manage(res);
10584 }
10585
polyhedral_hull()10586 isl::checked::basic_set set::polyhedral_hull() const
10587 {
10588 auto res = isl_set_polyhedral_hull(copy());
10589 return manage(res);
10590 }
10591
preimage(isl::checked::multi_aff ma)10592 isl::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
preimage(isl::checked::multi_pw_aff mpa)10598 isl::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
preimage(isl::checked::pw_multi_aff pma)10604 isl::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
product(isl::checked::set set2)10610 isl::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
project_out_all_params()10616 isl::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
project_out_param(isl::checked::id id)10622 isl::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
project_out_param(const std::string & id)10628 isl::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
project_out_param(isl::checked::id_list list)10633 isl::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
sample()10639 isl::checked::basic_set set::sample() const
10640 {
10641 auto res = isl_set_sample(copy());
10642 return manage(res);
10643 }
10644
sample_point()10645 isl::checked::point set::sample_point() const
10646 {
10647 auto res = isl_set_sample_point(copy());
10648 return manage(res);
10649 }
10650
subtract(isl::checked::set set2)10651 isl::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
unbind_params(isl::checked::multi_id tuple)10657 isl::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
unbind_params_insert_domain(isl::checked::multi_id domain)10663 isl::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
unite(isl::checked::set set2)10669 isl::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
universe(isl::checked::space space)10675 isl::checked::set set::universe(isl::checked::space space)
10676 {
10677 auto res = isl_set_universe(space.release());
10678 return manage(res);
10679 }
10680
unshifted_simple_hull()10681 isl::checked::basic_set set::unshifted_simple_hull() const
10682 {
10683 auto res = isl_set_unshifted_simple_hull(copy());
10684 return manage(res);
10685 }
10686
unwrap()10687 isl::checked::map set::unwrap() const
10688 {
10689 auto res = isl_set_unwrap(copy());
10690 return manage(res);
10691 }
10692
upper_bound(isl::checked::multi_pw_aff upper)10693 isl::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
upper_bound(isl::checked::multi_val upper)10699 isl::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
10705 inline 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
manage(__isl_take isl_space * ptr)10718 space manage(__isl_take isl_space *ptr) {
10719 return space(ptr);
10720 }
manage_copy(__isl_keep isl_space * ptr)10721 space manage_copy(__isl_keep isl_space *ptr) {
10722 ptr = isl_space_copy(ptr);
10723 return space(ptr);
10724 }
10725
space()10726 space::space()
10727 : ptr(nullptr) {}
10728
space(const space & obj)10729 space::space(const space &obj)
10730 : ptr(nullptr)
10731 {
10732 ptr = obj.copy();
10733 }
10734
space(__isl_take isl_space * ptr)10735 space::space(__isl_take isl_space *ptr)
10736 : ptr(ptr) {}
10737
10738 space &space::operator=(space obj) {
10739 std::swap(this->ptr, obj.ptr);
10740 return *this;
10741 }
10742
~space()10743 space::~space() {
10744 if (ptr)
10745 isl_space_free(ptr);
10746 }
10747
copy()10748 __isl_give isl_space *space::copy() const & {
10749 return isl_space_copy(ptr);
10750 }
10751
get()10752 __isl_keep isl_space *space::get() const {
10753 return ptr;
10754 }
10755
release()10756 __isl_give isl_space *space::release() {
10757 isl_space *tmp = ptr;
10758 ptr = nullptr;
10759 return tmp;
10760 }
10761
is_null()10762 bool space::is_null() const {
10763 return ptr == nullptr;
10764 }
10765
ctx()10766 isl::checked::ctx space::ctx() const {
10767 return isl::checked::ctx(isl_space_get_ctx(ptr));
10768 }
10769
add_named_tuple(isl::checked::id tuple_id,unsigned int dim)10770 isl::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
add_named_tuple(const std::string & tuple_id,unsigned int dim)10776 isl::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
add_unnamed_tuple(unsigned int dim)10781 isl::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
domain()10787 isl::checked::space space::domain() const
10788 {
10789 auto res = isl_space_domain(copy());
10790 return manage(res);
10791 }
10792
flatten_domain()10793 isl::checked::space space::flatten_domain() const
10794 {
10795 auto res = isl_space_flatten_domain(copy());
10796 return manage(res);
10797 }
10798
flatten_range()10799 isl::checked::space space::flatten_range() const
10800 {
10801 auto res = isl_space_flatten_range(copy());
10802 return manage(res);
10803 }
10804
is_equal(const isl::checked::space & space2)10805 boolean 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
is_wrapping()10811 boolean space::is_wrapping() const
10812 {
10813 auto res = isl_space_is_wrapping(get());
10814 return manage(res);
10815 }
10816
map_from_set()10817 isl::checked::space space::map_from_set() const
10818 {
10819 auto res = isl_space_map_from_set(copy());
10820 return manage(res);
10821 }
10822
params()10823 isl::checked::space space::params() const
10824 {
10825 auto res = isl_space_params(copy());
10826 return manage(res);
10827 }
10828
range()10829 isl::checked::space space::range() const
10830 {
10831 auto res = isl_space_range(copy());
10832 return manage(res);
10833 }
10834
unit(isl::checked::ctx ctx)10835 isl::checked::space space::unit(isl::checked::ctx ctx)
10836 {
10837 auto res = isl_space_unit(ctx.release());
10838 return manage(res);
10839 }
10840
unwrap()10841 isl::checked::space space::unwrap() const
10842 {
10843 auto res = isl_space_unwrap(copy());
10844 return manage(res);
10845 }
10846
wrap()10847 isl::checked::space space::wrap() const
10848 {
10849 auto res = isl_space_wrap(copy());
10850 return manage(res);
10851 }
10852
10853 inline 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
manage(__isl_take isl_union_access_info * ptr)10866 union_access_info manage(__isl_take isl_union_access_info *ptr) {
10867 return union_access_info(ptr);
10868 }
manage_copy(__isl_keep isl_union_access_info * ptr)10869 union_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
union_access_info()10874 union_access_info::union_access_info()
10875 : ptr(nullptr) {}
10876
union_access_info(const union_access_info & obj)10877 union_access_info::union_access_info(const union_access_info &obj)
10878 : ptr(nullptr)
10879 {
10880 ptr = obj.copy();
10881 }
10882
union_access_info(__isl_take isl_union_access_info * ptr)10883 union_access_info::union_access_info(__isl_take isl_union_access_info *ptr)
10884 : ptr(ptr) {}
10885
union_access_info(isl::checked::union_map sink)10886 union_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
10892 union_access_info &union_access_info::operator=(union_access_info obj) {
10893 std::swap(this->ptr, obj.ptr);
10894 return *this;
10895 }
10896
~union_access_info()10897 union_access_info::~union_access_info() {
10898 if (ptr)
10899 isl_union_access_info_free(ptr);
10900 }
10901
copy()10902 __isl_give isl_union_access_info *union_access_info::copy() const & {
10903 return isl_union_access_info_copy(ptr);
10904 }
10905
get()10906 __isl_keep isl_union_access_info *union_access_info::get() const {
10907 return ptr;
10908 }
10909
release()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
is_null()10916 bool union_access_info::is_null() const {
10917 return ptr == nullptr;
10918 }
10919
ctx()10920 isl::checked::ctx union_access_info::ctx() const {
10921 return isl::checked::ctx(isl_union_access_info_get_ctx(ptr));
10922 }
10923
compute_flow()10924 isl::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
set_kill(isl::checked::union_map kill)10930 isl::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
set_may_source(isl::checked::union_map may_source)10936 isl::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
set_must_source(isl::checked::union_map must_source)10942 isl::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
set_schedule(isl::checked::schedule schedule)10948 isl::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
set_schedule_map(isl::checked::union_map schedule_map)10954 isl::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
10960 inline 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
manage(__isl_take isl_union_flow * ptr)10973 union_flow manage(__isl_take isl_union_flow *ptr) {
10974 return union_flow(ptr);
10975 }
manage_copy(__isl_keep isl_union_flow * ptr)10976 union_flow manage_copy(__isl_keep isl_union_flow *ptr) {
10977 ptr = isl_union_flow_copy(ptr);
10978 return union_flow(ptr);
10979 }
10980
union_flow()10981 union_flow::union_flow()
10982 : ptr(nullptr) {}
10983
union_flow(const union_flow & obj)10984 union_flow::union_flow(const union_flow &obj)
10985 : ptr(nullptr)
10986 {
10987 ptr = obj.copy();
10988 }
10989
union_flow(__isl_take isl_union_flow * ptr)10990 union_flow::union_flow(__isl_take isl_union_flow *ptr)
10991 : ptr(ptr) {}
10992
10993 union_flow &union_flow::operator=(union_flow obj) {
10994 std::swap(this->ptr, obj.ptr);
10995 return *this;
10996 }
10997
~union_flow()10998 union_flow::~union_flow() {
10999 if (ptr)
11000 isl_union_flow_free(ptr);
11001 }
11002
copy()11003 __isl_give isl_union_flow *union_flow::copy() const & {
11004 return isl_union_flow_copy(ptr);
11005 }
11006
get()11007 __isl_keep isl_union_flow *union_flow::get() const {
11008 return ptr;
11009 }
11010
release()11011 __isl_give isl_union_flow *union_flow::release() {
11012 isl_union_flow *tmp = ptr;
11013 ptr = nullptr;
11014 return tmp;
11015 }
11016
is_null()11017 bool union_flow::is_null() const {
11018 return ptr == nullptr;
11019 }
11020
ctx()11021 isl::checked::ctx union_flow::ctx() const {
11022 return isl::checked::ctx(isl_union_flow_get_ctx(ptr));
11023 }
11024
full_may_dependence()11025 isl::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
get_full_may_dependence()11031 isl::checked::union_map union_flow::get_full_may_dependence() const
11032 {
11033 return full_may_dependence();
11034 }
11035
full_must_dependence()11036 isl::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
get_full_must_dependence()11042 isl::checked::union_map union_flow::get_full_must_dependence() const
11043 {
11044 return full_must_dependence();
11045 }
11046
may_dependence()11047 isl::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
get_may_dependence()11053 isl::checked::union_map union_flow::get_may_dependence() const
11054 {
11055 return may_dependence();
11056 }
11057
may_no_source()11058 isl::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
get_may_no_source()11064 isl::checked::union_map union_flow::get_may_no_source() const
11065 {
11066 return may_no_source();
11067 }
11068
must_dependence()11069 isl::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
get_must_dependence()11075 isl::checked::union_map union_flow::get_must_dependence() const
11076 {
11077 return must_dependence();
11078 }
11079
must_no_source()11080 isl::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
get_must_no_source()11086 isl::checked::union_map union_flow::get_must_no_source() const
11087 {
11088 return must_no_source();
11089 }
11090
11091 inline 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
manage(__isl_take isl_union_map * ptr)11104 union_map manage(__isl_take isl_union_map *ptr) {
11105 return union_map(ptr);
11106 }
manage_copy(__isl_keep isl_union_map * ptr)11107 union_map manage_copy(__isl_keep isl_union_map *ptr) {
11108 ptr = isl_union_map_copy(ptr);
11109 return union_map(ptr);
11110 }
11111
union_map()11112 union_map::union_map()
11113 : ptr(nullptr) {}
11114
union_map(const union_map & obj)11115 union_map::union_map(const union_map &obj)
11116 : ptr(nullptr)
11117 {
11118 ptr = obj.copy();
11119 }
11120
union_map(__isl_take isl_union_map * ptr)11121 union_map::union_map(__isl_take isl_union_map *ptr)
11122 : ptr(ptr) {}
11123
union_map(isl::checked::basic_map bmap)11124 union_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
union_map(isl::checked::map map)11130 union_map::union_map(isl::checked::map map)
11131 {
11132 auto res = isl_union_map_from_map(map.release());
11133 ptr = res;
11134 }
11135
union_map(isl::checked::ctx ctx,const std::string & str)11136 union_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
11142 union_map &union_map::operator=(union_map obj) {
11143 std::swap(this->ptr, obj.ptr);
11144 return *this;
11145 }
11146
~union_map()11147 union_map::~union_map() {
11148 if (ptr)
11149 isl_union_map_free(ptr);
11150 }
11151
copy()11152 __isl_give isl_union_map *union_map::copy() const & {
11153 return isl_union_map_copy(ptr);
11154 }
11155
get()11156 __isl_keep isl_union_map *union_map::get() const {
11157 return ptr;
11158 }
11159
release()11160 __isl_give isl_union_map *union_map::release() {
11161 isl_union_map *tmp = ptr;
11162 ptr = nullptr;
11163 return tmp;
11164 }
11165
is_null()11166 bool union_map::is_null() const {
11167 return ptr == nullptr;
11168 }
11169
ctx()11170 isl::checked::ctx union_map::ctx() const {
11171 return isl::checked::ctx(isl_union_map_get_ctx(ptr));
11172 }
11173
affine_hull()11174 isl::checked::union_map union_map::affine_hull() const
11175 {
11176 auto res = isl_union_map_affine_hull(copy());
11177 return manage(res);
11178 }
11179
apply_domain(isl::checked::union_map umap2)11180 isl::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
apply_range(isl::checked::union_map umap2)11186 isl::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
bind_range(isl::checked::multi_id tuple)11192 isl::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
coalesce()11198 isl::checked::union_map union_map::coalesce() const
11199 {
11200 auto res = isl_union_map_coalesce(copy());
11201 return manage(res);
11202 }
11203
compute_divs()11204 isl::checked::union_map union_map::compute_divs() const
11205 {
11206 auto res = isl_union_map_compute_divs(copy());
11207 return manage(res);
11208 }
11209
curry()11210 isl::checked::union_map union_map::curry() const
11211 {
11212 auto res = isl_union_map_curry(copy());
11213 return manage(res);
11214 }
11215
deltas()11216 isl::checked::union_set union_map::deltas() const
11217 {
11218 auto res = isl_union_map_deltas(copy());
11219 return manage(res);
11220 }
11221
detect_equalities()11222 isl::checked::union_map union_map::detect_equalities() const
11223 {
11224 auto res = isl_union_map_detect_equalities(copy());
11225 return manage(res);
11226 }
11227
domain()11228 isl::checked::union_set union_map::domain() const
11229 {
11230 auto res = isl_union_map_domain(copy());
11231 return manage(res);
11232 }
11233
domain_factor_domain()11234 isl::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
domain_factor_range()11240 isl::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
domain_map()11246 isl::checked::union_map union_map::domain_map() const
11247 {
11248 auto res = isl_union_map_domain_map(copy());
11249 return manage(res);
11250 }
11251
domain_map_union_pw_multi_aff()11252 isl::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
domain_product(isl::checked::union_map umap2)11258 isl::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
empty(isl::checked::ctx ctx)11264 isl::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
eq_at(isl::checked::multi_union_pw_aff mupa)11270 isl::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
every_map(const std::function<boolean (isl::checked::map)> & test)11276 boolean 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
extract_map(isl::checked::space space)11290 isl::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
factor_domain()11296 isl::checked::union_map union_map::factor_domain() const
11297 {
11298 auto res = isl_union_map_factor_domain(copy());
11299 return manage(res);
11300 }
11301
factor_range()11302 isl::checked::union_map union_map::factor_range() const
11303 {
11304 auto res = isl_union_map_factor_range(copy());
11305 return manage(res);
11306 }
11307
fixed_power(isl::checked::val exp)11308 isl::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
fixed_power(long exp)11314 isl::checked::union_map union_map::fixed_power(long exp) const
11315 {
11316 return this->fixed_power(isl::checked::val(ctx(), exp));
11317 }
11318
foreach_map(const std::function<stat (isl::checked::map)> & fn)11319 stat 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
from(isl::checked::multi_union_pw_aff mupa)11333 isl::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
from(isl::checked::union_pw_multi_aff upma)11339 isl::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
from_domain(isl::checked::union_set uset)11345 isl::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
from_domain_and_range(isl::checked::union_set domain,isl::checked::union_set range)11351 isl::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
from_range(isl::checked::union_set uset)11357 isl::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
space()11363 isl::checked::space union_map::space() const
11364 {
11365 auto res = isl_union_map_get_space(get());
11366 return manage(res);
11367 }
11368
get_space()11369 isl::checked::space union_map::get_space() const
11370 {
11371 return space();
11372 }
11373
gist(isl::checked::union_map context)11374 isl::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
gist_domain(isl::checked::union_set uset)11380 isl::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
gist_params(isl::checked::set set)11386 isl::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
gist_range(isl::checked::union_set uset)11392 isl::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
intersect(isl::checked::union_map umap2)11398 isl::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
intersect_domain(isl::checked::space space)11404 isl::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
intersect_domain(isl::checked::union_set uset)11410 isl::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
intersect_params(isl::checked::set set)11416 isl::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
intersect_range(isl::checked::space space)11422 isl::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
intersect_range(isl::checked::union_set uset)11428 isl::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
is_bijective()11434 boolean union_map::is_bijective() const
11435 {
11436 auto res = isl_union_map_is_bijective(get());
11437 return manage(res);
11438 }
11439
is_disjoint(const isl::checked::union_map & umap2)11440 boolean 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
is_empty()11446 boolean union_map::is_empty() const
11447 {
11448 auto res = isl_union_map_is_empty(get());
11449 return manage(res);
11450 }
11451
is_equal(const isl::checked::union_map & umap2)11452 boolean 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
is_injective()11458 boolean union_map::is_injective() const
11459 {
11460 auto res = isl_union_map_is_injective(get());
11461 return manage(res);
11462 }
11463
is_single_valued()11464 boolean union_map::is_single_valued() const
11465 {
11466 auto res = isl_union_map_is_single_valued(get());
11467 return manage(res);
11468 }
11469
is_strict_subset(const isl::checked::union_map & umap2)11470 boolean 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
is_subset(const isl::checked::union_map & umap2)11476 boolean 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
isa_map()11482 boolean union_map::isa_map() const
11483 {
11484 auto res = isl_union_map_isa_map(get());
11485 return manage(res);
11486 }
11487
lexmax()11488 isl::checked::union_map union_map::lexmax() const
11489 {
11490 auto res = isl_union_map_lexmax(copy());
11491 return manage(res);
11492 }
11493
lexmin()11494 isl::checked::union_map union_map::lexmin() const
11495 {
11496 auto res = isl_union_map_lexmin(copy());
11497 return manage(res);
11498 }
11499
polyhedral_hull()11500 isl::checked::union_map union_map::polyhedral_hull() const
11501 {
11502 auto res = isl_union_map_polyhedral_hull(copy());
11503 return manage(res);
11504 }
11505
preimage_domain(isl::checked::multi_aff ma)11506 isl::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
preimage_domain(isl::checked::multi_pw_aff mpa)11512 isl::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
preimage_domain(isl::checked::pw_multi_aff pma)11518 isl::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
preimage_domain(isl::checked::union_pw_multi_aff upma)11524 isl::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
preimage_range(isl::checked::multi_aff ma)11530 isl::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
preimage_range(isl::checked::pw_multi_aff pma)11536 isl::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
preimage_range(isl::checked::union_pw_multi_aff upma)11542 isl::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
product(isl::checked::union_map umap2)11548 isl::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
project_out_all_params()11554 isl::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
range()11560 isl::checked::union_set union_map::range() const
11561 {
11562 auto res = isl_union_map_range(copy());
11563 return manage(res);
11564 }
11565
range_factor_domain()11566 isl::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
range_factor_range()11572 isl::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
range_map()11578 isl::checked::union_map union_map::range_map() const
11579 {
11580 auto res = isl_union_map_range_map(copy());
11581 return manage(res);
11582 }
11583
range_product(isl::checked::union_map umap2)11584 isl::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
range_reverse()11590 isl::checked::union_map union_map::range_reverse() const
11591 {
11592 auto res = isl_union_map_range_reverse(copy());
11593 return manage(res);
11594 }
11595
reverse()11596 isl::checked::union_map union_map::reverse() const
11597 {
11598 auto res = isl_union_map_reverse(copy());
11599 return manage(res);
11600 }
11601
subtract(isl::checked::union_map umap2)11602 isl::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
subtract_domain(isl::checked::union_set dom)11608 isl::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
subtract_range(isl::checked::union_set dom)11614 isl::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
uncurry()11620 isl::checked::union_map union_map::uncurry() const
11621 {
11622 auto res = isl_union_map_uncurry(copy());
11623 return manage(res);
11624 }
11625
unite(isl::checked::union_map umap2)11626 isl::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
universe()11632 isl::checked::union_map union_map::universe() const
11633 {
11634 auto res = isl_union_map_universe(copy());
11635 return manage(res);
11636 }
11637
wrap()11638 isl::checked::union_set union_map::wrap() const
11639 {
11640 auto res = isl_union_map_wrap(copy());
11641 return manage(res);
11642 }
11643
zip()11644 isl::checked::union_map union_map::zip() const
11645 {
11646 auto res = isl_union_map_zip(copy());
11647 return manage(res);
11648 }
11649
11650 inline 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
manage(__isl_take isl_union_pw_aff * ptr)11663 union_pw_aff manage(__isl_take isl_union_pw_aff *ptr) {
11664 return union_pw_aff(ptr);
11665 }
manage_copy(__isl_keep isl_union_pw_aff * ptr)11666 union_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
union_pw_aff()11671 union_pw_aff::union_pw_aff()
11672 : ptr(nullptr) {}
11673
union_pw_aff(const union_pw_aff & obj)11674 union_pw_aff::union_pw_aff(const union_pw_aff &obj)
11675 : ptr(nullptr)
11676 {
11677 ptr = obj.copy();
11678 }
11679
union_pw_aff(__isl_take isl_union_pw_aff * ptr)11680 union_pw_aff::union_pw_aff(__isl_take isl_union_pw_aff *ptr)
11681 : ptr(ptr) {}
11682
union_pw_aff(isl::checked::aff aff)11683 union_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
union_pw_aff(isl::checked::pw_aff pa)11689 union_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
union_pw_aff(isl::checked::ctx ctx,const std::string & str)11695 union_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
11701 union_pw_aff &union_pw_aff::operator=(union_pw_aff obj) {
11702 std::swap(this->ptr, obj.ptr);
11703 return *this;
11704 }
11705
~union_pw_aff()11706 union_pw_aff::~union_pw_aff() {
11707 if (ptr)
11708 isl_union_pw_aff_free(ptr);
11709 }
11710
copy()11711 __isl_give isl_union_pw_aff *union_pw_aff::copy() const & {
11712 return isl_union_pw_aff_copy(ptr);
11713 }
11714
get()11715 __isl_keep isl_union_pw_aff *union_pw_aff::get() const {
11716 return ptr;
11717 }
11718
release()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
is_null()11725 bool union_pw_aff::is_null() const {
11726 return ptr == nullptr;
11727 }
11728
ctx()11729 isl::checked::ctx union_pw_aff::ctx() const {
11730 return isl::checked::ctx(isl_union_pw_aff_get_ctx(ptr));
11731 }
11732
add(isl::checked::union_pw_aff upa2)11733 isl::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
bind(isl::checked::id id)11739 isl::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
bind(const std::string & id)11745 isl::checked::union_set union_pw_aff::bind(const std::string &id) const
11746 {
11747 return this->bind(isl::checked::id(ctx(), id));
11748 }
11749
coalesce()11750 isl::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
domain()11756 isl::checked::union_set union_pw_aff::domain() const
11757 {
11758 auto res = isl_union_pw_aff_domain(copy());
11759 return manage(res);
11760 }
11761
space()11762 isl::checked::space union_pw_aff::space() const
11763 {
11764 auto res = isl_union_pw_aff_get_space(get());
11765 return manage(res);
11766 }
11767
get_space()11768 isl::checked::space union_pw_aff::get_space() const
11769 {
11770 return space();
11771 }
11772
gist(isl::checked::union_set context)11773 isl::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
intersect_domain(isl::checked::space space)11779 isl::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
intersect_domain(isl::checked::union_set uset)11785 isl::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
intersect_domain_wrapped_domain(isl::checked::union_set uset)11791 isl::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
intersect_domain_wrapped_range(isl::checked::union_set uset)11797 isl::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
intersect_params(isl::checked::set set)11803 isl::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
pullback(isl::checked::union_pw_multi_aff upma)11809 isl::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
sub(isl::checked::union_pw_aff upa2)11815 isl::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
subtract_domain(isl::checked::space space)11821 isl::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
subtract_domain(isl::checked::union_set uset)11827 isl::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
union_add(isl::checked::union_pw_aff upa2)11833 isl::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
11839 inline 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
manage(__isl_take isl_union_pw_aff_list * ptr)11852 union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr) {
11853 return union_pw_aff_list(ptr);
11854 }
manage_copy(__isl_keep isl_union_pw_aff_list * ptr)11855 union_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
union_pw_aff_list()11860 union_pw_aff_list::union_pw_aff_list()
11861 : ptr(nullptr) {}
11862
union_pw_aff_list(const union_pw_aff_list & obj)11863 union_pw_aff_list::union_pw_aff_list(const union_pw_aff_list &obj)
11864 : ptr(nullptr)
11865 {
11866 ptr = obj.copy();
11867 }
11868
union_pw_aff_list(__isl_take isl_union_pw_aff_list * ptr)11869 union_pw_aff_list::union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr)
11870 : ptr(ptr) {}
11871
union_pw_aff_list(isl::checked::ctx ctx,int n)11872 union_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
union_pw_aff_list(isl::checked::union_pw_aff el)11878 union_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
11884 union_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
~union_pw_aff_list()11889 union_pw_aff_list::~union_pw_aff_list() {
11890 if (ptr)
11891 isl_union_pw_aff_list_free(ptr);
11892 }
11893
copy()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
get()11898 __isl_keep isl_union_pw_aff_list *union_pw_aff_list::get() const {
11899 return ptr;
11900 }
11901
release()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
is_null()11908 bool union_pw_aff_list::is_null() const {
11909 return ptr == nullptr;
11910 }
11911
ctx()11912 isl::checked::ctx union_pw_aff_list::ctx() const {
11913 return isl::checked::ctx(isl_union_pw_aff_list_get_ctx(ptr));
11914 }
11915
add(isl::checked::union_pw_aff el)11916 isl::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
clear()11922 isl::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
concat(isl::checked::union_pw_aff_list list2)11928 isl::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
drop(unsigned int first,unsigned int n)11934 isl::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
foreach(const std::function<stat (isl::checked::union_pw_aff)> & fn)11940 stat 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
at(int index)11954 isl::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
get_at(int index)11960 isl::checked::union_pw_aff union_pw_aff_list::get_at(int index) const
11961 {
11962 return at(index);
11963 }
11964
insert(unsigned int pos,isl::checked::union_pw_aff el)11965 isl::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
size()11971 class size union_pw_aff_list::size() const
11972 {
11973 auto res = isl_union_pw_aff_list_size(get());
11974 return manage(res);
11975 }
11976
11977 inline 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
manage(__isl_take isl_union_pw_multi_aff * ptr)11990 union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr) {
11991 return union_pw_multi_aff(ptr);
11992 }
manage_copy(__isl_keep isl_union_pw_multi_aff * ptr)11993 union_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
union_pw_multi_aff()11998 union_pw_multi_aff::union_pw_multi_aff()
11999 : ptr(nullptr) {}
12000
union_pw_multi_aff(const union_pw_multi_aff & obj)12001 union_pw_multi_aff::union_pw_multi_aff(const union_pw_multi_aff &obj)
12002 : ptr(nullptr)
12003 {
12004 ptr = obj.copy();
12005 }
12006
union_pw_multi_aff(__isl_take isl_union_pw_multi_aff * ptr)12007 union_pw_multi_aff::union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr)
12008 : ptr(ptr) {}
12009
union_pw_multi_aff(isl::checked::multi_aff ma)12010 union_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
union_pw_multi_aff(isl::checked::pw_multi_aff pma)12016 union_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
union_pw_multi_aff(isl::checked::union_pw_aff upa)12022 union_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
union_pw_multi_aff(isl::checked::ctx ctx,const std::string & str)12028 union_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
12034 union_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
~union_pw_multi_aff()12039 union_pw_multi_aff::~union_pw_multi_aff() {
12040 if (ptr)
12041 isl_union_pw_multi_aff_free(ptr);
12042 }
12043
copy()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
get()12048 __isl_keep isl_union_pw_multi_aff *union_pw_multi_aff::get() const {
12049 return ptr;
12050 }
12051
release()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
is_null()12058 bool union_pw_multi_aff::is_null() const {
12059 return ptr == nullptr;
12060 }
12061
ctx()12062 isl::checked::ctx union_pw_multi_aff::ctx() const {
12063 return isl::checked::ctx(isl_union_pw_multi_aff_get_ctx(ptr));
12064 }
12065
add(isl::checked::union_pw_multi_aff upma2)12066 isl::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
apply(isl::checked::union_pw_multi_aff upma2)12072 isl::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
as_pw_multi_aff()12078 isl::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
coalesce()12084 isl::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
domain()12090 isl::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
empty(isl::checked::ctx ctx)12096 isl::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
extract_pw_multi_aff(isl::checked::space space)12102 isl::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
flat_range_product(isl::checked::union_pw_multi_aff upma2)12108 isl::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
space()12114 isl::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
get_space()12120 isl::checked::space union_pw_multi_aff::get_space() const
12121 {
12122 return space();
12123 }
12124
gist(isl::checked::union_set context)12125 isl::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
intersect_domain(isl::checked::space space)12131 isl::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
intersect_domain(isl::checked::union_set uset)12137 isl::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
intersect_domain_wrapped_domain(isl::checked::union_set uset)12143 isl::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
intersect_domain_wrapped_range(isl::checked::union_set uset)12149 isl::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
intersect_params(isl::checked::set set)12155 isl::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
involves_locals()12161 boolean 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
isa_pw_multi_aff()12167 boolean 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
plain_is_empty()12173 boolean 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
pullback(isl::checked::union_pw_multi_aff upma2)12179 isl::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
range_factor_domain()12185 isl::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
range_factor_range()12191 isl::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
range_product(isl::checked::union_pw_multi_aff upma2)12197 isl::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
sub(isl::checked::union_pw_multi_aff upma2)12203 isl::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
subtract_domain(isl::checked::space space)12209 isl::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
subtract_domain(isl::checked::union_set uset)12215 isl::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
union_add(isl::checked::union_pw_multi_aff upma2)12221 isl::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
12227 inline 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
manage(__isl_take isl_union_set * ptr)12240 union_set manage(__isl_take isl_union_set *ptr) {
12241 return union_set(ptr);
12242 }
manage_copy(__isl_keep isl_union_set * ptr)12243 union_set manage_copy(__isl_keep isl_union_set *ptr) {
12244 ptr = isl_union_set_copy(ptr);
12245 return union_set(ptr);
12246 }
12247
union_set()12248 union_set::union_set()
12249 : ptr(nullptr) {}
12250
union_set(const union_set & obj)12251 union_set::union_set(const union_set &obj)
12252 : ptr(nullptr)
12253 {
12254 ptr = obj.copy();
12255 }
12256
union_set(__isl_take isl_union_set * ptr)12257 union_set::union_set(__isl_take isl_union_set *ptr)
12258 : ptr(ptr) {}
12259
union_set(isl::checked::basic_set bset)12260 union_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
union_set(isl::checked::point pnt)12266 union_set::union_set(isl::checked::point pnt)
12267 {
12268 auto res = isl_union_set_from_point(pnt.release());
12269 ptr = res;
12270 }
12271
union_set(isl::checked::set set)12272 union_set::union_set(isl::checked::set set)
12273 {
12274 auto res = isl_union_set_from_set(set.release());
12275 ptr = res;
12276 }
12277
union_set(isl::checked::ctx ctx,const std::string & str)12278 union_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
12284 union_set &union_set::operator=(union_set obj) {
12285 std::swap(this->ptr, obj.ptr);
12286 return *this;
12287 }
12288
~union_set()12289 union_set::~union_set() {
12290 if (ptr)
12291 isl_union_set_free(ptr);
12292 }
12293
copy()12294 __isl_give isl_union_set *union_set::copy() const & {
12295 return isl_union_set_copy(ptr);
12296 }
12297
get()12298 __isl_keep isl_union_set *union_set::get() const {
12299 return ptr;
12300 }
12301
release()12302 __isl_give isl_union_set *union_set::release() {
12303 isl_union_set *tmp = ptr;
12304 ptr = nullptr;
12305 return tmp;
12306 }
12307
is_null()12308 bool union_set::is_null() const {
12309 return ptr == nullptr;
12310 }
12311
ctx()12312 isl::checked::ctx union_set::ctx() const {
12313 return isl::checked::ctx(isl_union_set_get_ctx(ptr));
12314 }
12315
affine_hull()12316 isl::checked::union_set union_set::affine_hull() const
12317 {
12318 auto res = isl_union_set_affine_hull(copy());
12319 return manage(res);
12320 }
12321
apply(isl::checked::union_map umap)12322 isl::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
coalesce()12328 isl::checked::union_set union_set::coalesce() const
12329 {
12330 auto res = isl_union_set_coalesce(copy());
12331 return manage(res);
12332 }
12333
compute_divs()12334 isl::checked::union_set union_set::compute_divs() const
12335 {
12336 auto res = isl_union_set_compute_divs(copy());
12337 return manage(res);
12338 }
12339
detect_equalities()12340 isl::checked::union_set union_set::detect_equalities() const
12341 {
12342 auto res = isl_union_set_detect_equalities(copy());
12343 return manage(res);
12344 }
12345
empty(isl::checked::ctx ctx)12346 isl::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
every_set(const std::function<boolean (isl::checked::set)> & test)12352 boolean 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
extract_set(isl::checked::space space)12366 isl::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
foreach_point(const std::function<stat (isl::checked::point)> & fn)12372 stat 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
foreach_set(const std::function<stat (isl::checked::set)> & fn)12386 stat 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
space()12400 isl::checked::space union_set::space() const
12401 {
12402 auto res = isl_union_set_get_space(get());
12403 return manage(res);
12404 }
12405
get_space()12406 isl::checked::space union_set::get_space() const
12407 {
12408 return space();
12409 }
12410
gist(isl::checked::union_set context)12411 isl::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
gist_params(isl::checked::set set)12417 isl::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
identity()12423 isl::checked::union_map union_set::identity() const
12424 {
12425 auto res = isl_union_set_identity(copy());
12426 return manage(res);
12427 }
12428
intersect(isl::checked::union_set uset2)12429 isl::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
intersect_params(isl::checked::set set)12435 isl::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
is_disjoint(const isl::checked::union_set & uset2)12441 boolean 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
is_empty()12447 boolean union_set::is_empty() const
12448 {
12449 auto res = isl_union_set_is_empty(get());
12450 return manage(res);
12451 }
12452
is_equal(const isl::checked::union_set & uset2)12453 boolean 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
is_strict_subset(const isl::checked::union_set & uset2)12459 boolean 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
is_subset(const isl::checked::union_set & uset2)12465 boolean 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
isa_set()12471 boolean union_set::isa_set() const
12472 {
12473 auto res = isl_union_set_isa_set(get());
12474 return manage(res);
12475 }
12476
lexmax()12477 isl::checked::union_set union_set::lexmax() const
12478 {
12479 auto res = isl_union_set_lexmax(copy());
12480 return manage(res);
12481 }
12482
lexmin()12483 isl::checked::union_set union_set::lexmin() const
12484 {
12485 auto res = isl_union_set_lexmin(copy());
12486 return manage(res);
12487 }
12488
polyhedral_hull()12489 isl::checked::union_set union_set::polyhedral_hull() const
12490 {
12491 auto res = isl_union_set_polyhedral_hull(copy());
12492 return manage(res);
12493 }
12494
preimage(isl::checked::multi_aff ma)12495 isl::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
preimage(isl::checked::pw_multi_aff pma)12501 isl::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
preimage(isl::checked::union_pw_multi_aff upma)12507 isl::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
sample_point()12513 isl::checked::point union_set::sample_point() const
12514 {
12515 auto res = isl_union_set_sample_point(copy());
12516 return manage(res);
12517 }
12518
subtract(isl::checked::union_set uset2)12519 isl::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
unite(isl::checked::union_set uset2)12525 isl::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
universe()12531 isl::checked::union_set union_set::universe() const
12532 {
12533 auto res = isl_union_set_universe(copy());
12534 return manage(res);
12535 }
12536
unwrap()12537 isl::checked::union_map union_set::unwrap() const
12538 {
12539 auto res = isl_union_set_unwrap(copy());
12540 return manage(res);
12541 }
12542
12543 inline 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
manage(__isl_take isl_union_set_list * ptr)12556 union_set_list manage(__isl_take isl_union_set_list *ptr) {
12557 return union_set_list(ptr);
12558 }
manage_copy(__isl_keep isl_union_set_list * ptr)12559 union_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
union_set_list()12564 union_set_list::union_set_list()
12565 : ptr(nullptr) {}
12566
union_set_list(const union_set_list & obj)12567 union_set_list::union_set_list(const union_set_list &obj)
12568 : ptr(nullptr)
12569 {
12570 ptr = obj.copy();
12571 }
12572
union_set_list(__isl_take isl_union_set_list * ptr)12573 union_set_list::union_set_list(__isl_take isl_union_set_list *ptr)
12574 : ptr(ptr) {}
12575
union_set_list(isl::checked::ctx ctx,int n)12576 union_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
union_set_list(isl::checked::union_set el)12582 union_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
12588 union_set_list &union_set_list::operator=(union_set_list obj) {
12589 std::swap(this->ptr, obj.ptr);
12590 return *this;
12591 }
12592
~union_set_list()12593 union_set_list::~union_set_list() {
12594 if (ptr)
12595 isl_union_set_list_free(ptr);
12596 }
12597
copy()12598 __isl_give isl_union_set_list *union_set_list::copy() const & {
12599 return isl_union_set_list_copy(ptr);
12600 }
12601
get()12602 __isl_keep isl_union_set_list *union_set_list::get() const {
12603 return ptr;
12604 }
12605
release()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
is_null()12612 bool union_set_list::is_null() const {
12613 return ptr == nullptr;
12614 }
12615
ctx()12616 isl::checked::ctx union_set_list::ctx() const {
12617 return isl::checked::ctx(isl_union_set_list_get_ctx(ptr));
12618 }
12619
add(isl::checked::union_set el)12620 isl::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
clear()12626 isl::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
concat(isl::checked::union_set_list list2)12632 isl::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
drop(unsigned int first,unsigned int n)12638 isl::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
foreach(const std::function<stat (isl::checked::union_set)> & fn)12644 stat 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
at(int index)12658 isl::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
get_at(int index)12664 isl::checked::union_set union_set_list::get_at(int index) const
12665 {
12666 return at(index);
12667 }
12668
insert(unsigned int pos,isl::checked::union_set el)12669 isl::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
size()12675 class size union_set_list::size() const
12676 {
12677 auto res = isl_union_set_list_size(get());
12678 return manage(res);
12679 }
12680
12681 inline 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
manage(__isl_take isl_val * ptr)12694 val manage(__isl_take isl_val *ptr) {
12695 return val(ptr);
12696 }
manage_copy(__isl_keep isl_val * ptr)12697 val manage_copy(__isl_keep isl_val *ptr) {
12698 ptr = isl_val_copy(ptr);
12699 return val(ptr);
12700 }
12701
val()12702 val::val()
12703 : ptr(nullptr) {}
12704
val(const val & obj)12705 val::val(const val &obj)
12706 : ptr(nullptr)
12707 {
12708 ptr = obj.copy();
12709 }
12710
val(__isl_take isl_val * ptr)12711 val::val(__isl_take isl_val *ptr)
12712 : ptr(ptr) {}
12713
val(isl::checked::ctx ctx,long i)12714 val::val(isl::checked::ctx ctx, long i)
12715 {
12716 auto res = isl_val_int_from_si(ctx.release(), i);
12717 ptr = res;
12718 }
12719
val(isl::checked::ctx ctx,const std::string & str)12720 val::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
12726 val &val::operator=(val obj) {
12727 std::swap(this->ptr, obj.ptr);
12728 return *this;
12729 }
12730
~val()12731 val::~val() {
12732 if (ptr)
12733 isl_val_free(ptr);
12734 }
12735
copy()12736 __isl_give isl_val *val::copy() const & {
12737 return isl_val_copy(ptr);
12738 }
12739
get()12740 __isl_keep isl_val *val::get() const {
12741 return ptr;
12742 }
12743
release()12744 __isl_give isl_val *val::release() {
12745 isl_val *tmp = ptr;
12746 ptr = nullptr;
12747 return tmp;
12748 }
12749
is_null()12750 bool val::is_null() const {
12751 return ptr == nullptr;
12752 }
12753
ctx()12754 isl::checked::ctx val::ctx() const {
12755 return isl::checked::ctx(isl_val_get_ctx(ptr));
12756 }
12757
abs()12758 isl::checked::val val::abs() const
12759 {
12760 auto res = isl_val_abs(copy());
12761 return manage(res);
12762 }
12763
abs_eq(const isl::checked::val & v2)12764 boolean 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
abs_eq(long v2)12770 boolean val::abs_eq(long v2) const
12771 {
12772 return this->abs_eq(isl::checked::val(ctx(), v2));
12773 }
12774
add(isl::checked::val v2)12775 isl::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
add(long v2)12781 isl::checked::val val::add(long v2) const
12782 {
12783 return this->add(isl::checked::val(ctx(), v2));
12784 }
12785
ceil()12786 isl::checked::val val::ceil() const
12787 {
12788 auto res = isl_val_ceil(copy());
12789 return manage(res);
12790 }
12791
cmp_si(long i)12792 int val::cmp_si(long i) const
12793 {
12794 auto res = isl_val_cmp_si(get(), i);
12795 return res;
12796 }
12797
div(isl::checked::val v2)12798 isl::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
div(long v2)12804 isl::checked::val val::div(long v2) const
12805 {
12806 return this->div(isl::checked::val(ctx(), v2));
12807 }
12808
eq(const isl::checked::val & v2)12809 boolean val::eq(const isl::checked::val &v2) const
12810 {
12811 auto res = isl_val_eq(get(), v2.get());
12812 return manage(res);
12813 }
12814
eq(long v2)12815 boolean val::eq(long v2) const
12816 {
12817 return this->eq(isl::checked::val(ctx(), v2));
12818 }
12819
floor()12820 isl::checked::val val::floor() const
12821 {
12822 auto res = isl_val_floor(copy());
12823 return manage(res);
12824 }
12825
gcd(isl::checked::val v2)12826 isl::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
gcd(long v2)12832 isl::checked::val val::gcd(long v2) const
12833 {
12834 return this->gcd(isl::checked::val(ctx(), v2));
12835 }
12836
ge(const isl::checked::val & v2)12837 boolean val::ge(const isl::checked::val &v2) const
12838 {
12839 auto res = isl_val_ge(get(), v2.get());
12840 return manage(res);
12841 }
12842
ge(long v2)12843 boolean val::ge(long v2) const
12844 {
12845 return this->ge(isl::checked::val(ctx(), v2));
12846 }
12847
den_si()12848 long val::den_si() const
12849 {
12850 auto res = isl_val_get_den_si(get());
12851 return res;
12852 }
12853
get_den_si()12854 long val::get_den_si() const
12855 {
12856 return den_si();
12857 }
12858
num_si()12859 long val::num_si() const
12860 {
12861 auto res = isl_val_get_num_si(get());
12862 return res;
12863 }
12864
get_num_si()12865 long val::get_num_si() const
12866 {
12867 return num_si();
12868 }
12869
gt(const isl::checked::val & v2)12870 boolean val::gt(const isl::checked::val &v2) const
12871 {
12872 auto res = isl_val_gt(get(), v2.get());
12873 return manage(res);
12874 }
12875
gt(long v2)12876 boolean val::gt(long v2) const
12877 {
12878 return this->gt(isl::checked::val(ctx(), v2));
12879 }
12880
infty(isl::checked::ctx ctx)12881 isl::checked::val val::infty(isl::checked::ctx ctx)
12882 {
12883 auto res = isl_val_infty(ctx.release());
12884 return manage(res);
12885 }
12886
inv()12887 isl::checked::val val::inv() const
12888 {
12889 auto res = isl_val_inv(copy());
12890 return manage(res);
12891 }
12892
is_divisible_by(const isl::checked::val & v2)12893 boolean 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
is_divisible_by(long v2)12899 boolean val::is_divisible_by(long v2) const
12900 {
12901 return this->is_divisible_by(isl::checked::val(ctx(), v2));
12902 }
12903
is_infty()12904 boolean val::is_infty() const
12905 {
12906 auto res = isl_val_is_infty(get());
12907 return manage(res);
12908 }
12909
is_int()12910 boolean val::is_int() const
12911 {
12912 auto res = isl_val_is_int(get());
12913 return manage(res);
12914 }
12915
is_nan()12916 boolean val::is_nan() const
12917 {
12918 auto res = isl_val_is_nan(get());
12919 return manage(res);
12920 }
12921
is_neg()12922 boolean val::is_neg() const
12923 {
12924 auto res = isl_val_is_neg(get());
12925 return manage(res);
12926 }
12927
is_neginfty()12928 boolean val::is_neginfty() const
12929 {
12930 auto res = isl_val_is_neginfty(get());
12931 return manage(res);
12932 }
12933
is_negone()12934 boolean val::is_negone() const
12935 {
12936 auto res = isl_val_is_negone(get());
12937 return manage(res);
12938 }
12939
is_nonneg()12940 boolean val::is_nonneg() const
12941 {
12942 auto res = isl_val_is_nonneg(get());
12943 return manage(res);
12944 }
12945
is_nonpos()12946 boolean val::is_nonpos() const
12947 {
12948 auto res = isl_val_is_nonpos(get());
12949 return manage(res);
12950 }
12951
is_one()12952 boolean val::is_one() const
12953 {
12954 auto res = isl_val_is_one(get());
12955 return manage(res);
12956 }
12957
is_pos()12958 boolean val::is_pos() const
12959 {
12960 auto res = isl_val_is_pos(get());
12961 return manage(res);
12962 }
12963
is_rat()12964 boolean val::is_rat() const
12965 {
12966 auto res = isl_val_is_rat(get());
12967 return manage(res);
12968 }
12969
is_zero()12970 boolean val::is_zero() const
12971 {
12972 auto res = isl_val_is_zero(get());
12973 return manage(res);
12974 }
12975
le(const isl::checked::val & v2)12976 boolean val::le(const isl::checked::val &v2) const
12977 {
12978 auto res = isl_val_le(get(), v2.get());
12979 return manage(res);
12980 }
12981
le(long v2)12982 boolean val::le(long v2) const
12983 {
12984 return this->le(isl::checked::val(ctx(), v2));
12985 }
12986
lt(const isl::checked::val & v2)12987 boolean val::lt(const isl::checked::val &v2) const
12988 {
12989 auto res = isl_val_lt(get(), v2.get());
12990 return manage(res);
12991 }
12992
lt(long v2)12993 boolean val::lt(long v2) const
12994 {
12995 return this->lt(isl::checked::val(ctx(), v2));
12996 }
12997
max(isl::checked::val v2)12998 isl::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
max(long v2)13004 isl::checked::val val::max(long v2) const
13005 {
13006 return this->max(isl::checked::val(ctx(), v2));
13007 }
13008
min(isl::checked::val v2)13009 isl::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
min(long v2)13015 isl::checked::val val::min(long v2) const
13016 {
13017 return this->min(isl::checked::val(ctx(), v2));
13018 }
13019
mod(isl::checked::val v2)13020 isl::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
mod(long v2)13026 isl::checked::val val::mod(long v2) const
13027 {
13028 return this->mod(isl::checked::val(ctx(), v2));
13029 }
13030
mul(isl::checked::val v2)13031 isl::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
mul(long v2)13037 isl::checked::val val::mul(long v2) const
13038 {
13039 return this->mul(isl::checked::val(ctx(), v2));
13040 }
13041
nan(isl::checked::ctx ctx)13042 isl::checked::val val::nan(isl::checked::ctx ctx)
13043 {
13044 auto res = isl_val_nan(ctx.release());
13045 return manage(res);
13046 }
13047
ne(const isl::checked::val & v2)13048 boolean val::ne(const isl::checked::val &v2) const
13049 {
13050 auto res = isl_val_ne(get(), v2.get());
13051 return manage(res);
13052 }
13053
ne(long v2)13054 boolean val::ne(long v2) const
13055 {
13056 return this->ne(isl::checked::val(ctx(), v2));
13057 }
13058
neg()13059 isl::checked::val val::neg() const
13060 {
13061 auto res = isl_val_neg(copy());
13062 return manage(res);
13063 }
13064
neginfty(isl::checked::ctx ctx)13065 isl::checked::val val::neginfty(isl::checked::ctx ctx)
13066 {
13067 auto res = isl_val_neginfty(ctx.release());
13068 return manage(res);
13069 }
13070
negone(isl::checked::ctx ctx)13071 isl::checked::val val::negone(isl::checked::ctx ctx)
13072 {
13073 auto res = isl_val_negone(ctx.release());
13074 return manage(res);
13075 }
13076
one(isl::checked::ctx ctx)13077 isl::checked::val val::one(isl::checked::ctx ctx)
13078 {
13079 auto res = isl_val_one(ctx.release());
13080 return manage(res);
13081 }
13082
pow2()13083 isl::checked::val val::pow2() const
13084 {
13085 auto res = isl_val_pow2(copy());
13086 return manage(res);
13087 }
13088
sgn()13089 int val::sgn() const
13090 {
13091 auto res = isl_val_sgn(get());
13092 return res;
13093 }
13094
sub(isl::checked::val v2)13095 isl::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
sub(long v2)13101 isl::checked::val val::sub(long v2) const
13102 {
13103 return this->sub(isl::checked::val(ctx(), v2));
13104 }
13105
trunc()13106 isl::checked::val val::trunc() const
13107 {
13108 auto res = isl_val_trunc(copy());
13109 return manage(res);
13110 }
13111
zero(isl::checked::ctx ctx)13112 isl::checked::val val::zero(isl::checked::ctx ctx)
13113 {
13114 auto res = isl_val_zero(ctx.release());
13115 return manage(res);
13116 }
13117
13118 inline 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
manage(__isl_take isl_val_list * ptr)13131 val_list manage(__isl_take isl_val_list *ptr) {
13132 return val_list(ptr);
13133 }
manage_copy(__isl_keep isl_val_list * ptr)13134 val_list manage_copy(__isl_keep isl_val_list *ptr) {
13135 ptr = isl_val_list_copy(ptr);
13136 return val_list(ptr);
13137 }
13138
val_list()13139 val_list::val_list()
13140 : ptr(nullptr) {}
13141
val_list(const val_list & obj)13142 val_list::val_list(const val_list &obj)
13143 : ptr(nullptr)
13144 {
13145 ptr = obj.copy();
13146 }
13147
val_list(__isl_take isl_val_list * ptr)13148 val_list::val_list(__isl_take isl_val_list *ptr)
13149 : ptr(ptr) {}
13150
val_list(isl::checked::ctx ctx,int n)13151 val_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
val_list(isl::checked::val el)13157 val_list::val_list(isl::checked::val el)
13158 {
13159 auto res = isl_val_list_from_val(el.release());
13160 ptr = res;
13161 }
13162
13163 val_list &val_list::operator=(val_list obj) {
13164 std::swap(this->ptr, obj.ptr);
13165 return *this;
13166 }
13167
~val_list()13168 val_list::~val_list() {
13169 if (ptr)
13170 isl_val_list_free(ptr);
13171 }
13172
copy()13173 __isl_give isl_val_list *val_list::copy() const & {
13174 return isl_val_list_copy(ptr);
13175 }
13176
get()13177 __isl_keep isl_val_list *val_list::get() const {
13178 return ptr;
13179 }
13180
release()13181 __isl_give isl_val_list *val_list::release() {
13182 isl_val_list *tmp = ptr;
13183 ptr = nullptr;
13184 return tmp;
13185 }
13186
is_null()13187 bool val_list::is_null() const {
13188 return ptr == nullptr;
13189 }
13190
ctx()13191 isl::checked::ctx val_list::ctx() const {
13192 return isl::checked::ctx(isl_val_list_get_ctx(ptr));
13193 }
13194
add(isl::checked::val el)13195 isl::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
add(long el)13201 isl::checked::val_list val_list::add(long el) const
13202 {
13203 return this->add(isl::checked::val(ctx(), el));
13204 }
13205
clear()13206 isl::checked::val_list val_list::clear() const
13207 {
13208 auto res = isl_val_list_clear(copy());
13209 return manage(res);
13210 }
13211
concat(isl::checked::val_list list2)13212 isl::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
drop(unsigned int first,unsigned int n)13218 isl::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
foreach(const std::function<stat (isl::checked::val)> & fn)13224 stat 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
at(int index)13238 isl::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
get_at(int index)13244 isl::checked::val val_list::get_at(int index) const
13245 {
13246 return at(index);
13247 }
13248
insert(unsigned int pos,isl::checked::val el)13249 isl::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
insert(unsigned int pos,long el)13255 isl::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
size()13260 class size val_list::size() const
13261 {
13262 auto res = isl_val_list_size(get());
13263 return manage(res);
13264 }
13265
13266 inline 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 */
13281