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/val.h>
12 #include <isl/aff.h>
13 #include <isl/set.h>
14 #include <isl/space.h>
15 #include <isl/id.h>
16 #include <isl/map.h>
17 #include <isl/vec.h>
18 #include <isl/ilp.h>
19 #include <isl/union_set.h>
20 #include <isl/union_map.h>
21 #include <isl/flow.h>
22 #include <isl/schedule.h>
23 #include <isl/schedule_node.h>
24 #include <isl/ast_build.h>
25 #include <isl/constraint.h>
26 #include <isl/polynomial.h>
27 #include <isl/mat.h>
28 #include <isl/fixed_box.h>
29
30 #include <stdio.h>
31 #include <stdlib.h>
32
33 #include <functional>
34 #include <string>
35
36 namespace isl {
37 inline namespace noexceptions {
38
39 #define ISLPP_STRINGIZE_(X) #X
40 #define ISLPP_STRINGIZE(X) ISLPP_STRINGIZE_(X)
41
42 #define ISLPP_ASSERT(test, message) \
43 do { \
44 if (test) \
45 break; \
46 fputs("Assertion \"" #test "\" failed at " __FILE__ \
47 ":" ISLPP_STRINGIZE(__LINE__) "\n " message "\n", \
48 stderr); \
49 abort(); \
50 } while (0)
51
52 class boolean {
53 private:
54 mutable bool checked = false;
55 isl_bool val;
56
57 friend boolean manage(isl_bool val);
boolean(isl_bool val)58 boolean(isl_bool val): val(val) {}
59 public:
boolean()60 boolean()
61 : val(isl_bool_error) {}
~boolean()62 ~boolean() {
63 // ISLPP_ASSERT(checked, "IMPLEMENTATION ERROR: Unchecked state");
64 }
65
boolean(bool val)66 /* implicit */ boolean(bool val)
67 : val(val ? isl_bool_true : isl_bool_false) {}
68
is_error()69 bool is_error() const { checked = true; return val == isl_bool_error; }
is_false()70 bool is_false() const { checked = true; return val == isl_bool_false; }
is_true()71 bool is_true() const { checked = true; return val == isl_bool_true; }
72
73 operator bool() const {
74 // ISLPP_ASSERT(checked, "IMPLEMENTATION ERROR: Unchecked error state");
75 ISLPP_ASSERT(!is_error(), "IMPLEMENTATION ERROR: Unhandled error state");
76 return is_true();
77 }
78
79 boolean operator!() const {
80 if (is_error())
81 return *this;
82 return !is_true();
83 }
84 };
85
manage(isl_bool val)86 inline boolean manage(isl_bool val) {
87 return boolean(val);
88 }
89
90 class ctx {
91 isl_ctx *ptr;
92 public:
ctx(isl_ctx * ctx)93 /* implicit */ ctx(isl_ctx *ctx)
94 : ptr(ctx) {}
release()95 isl_ctx *release() {
96 auto tmp = ptr;
97 ptr = nullptr;
98 return tmp;
99 }
get()100 isl_ctx *get() {
101 return ptr;
102 }
103 };
104
105 /* Class encapsulating an isl_stat value.
106 */
107 class stat {
108 private:
109 mutable bool checked = false;
110 isl_stat val;
111
112 friend stat manage(isl_stat val);
113 public:
stat(isl_stat val)114 constexpr stat(isl_stat val) : val(val) {}
ok()115 static stat ok() {
116 return stat(isl_stat_ok);
117 }
error()118 static stat error() {
119 return stat(isl_stat_error);
120 }
stat()121 stat() : val(isl_stat_error) {}
~stat()122 ~stat() {
123 // ISLPP_ASSERT(checked, "IMPLEMENTATION ERROR: Unchecked state");
124 }
125
release()126 isl_stat release() {
127 checked = true;
128 return val;
129 }
130
is_error()131 bool is_error() const {
132 checked = true;
133 return val == isl_stat_error;
134 }
is_ok()135 bool is_ok() const {
136 checked = true;
137 return val == isl_stat_ok;
138 }
139 };
140
141
manage(isl_stat val)142 inline stat manage(isl_stat val)
143 {
144 return stat(val);
145 }
146
147 enum class dim {
148 cst = isl_dim_cst,
149 param = isl_dim_param,
150 in = isl_dim_in,
151 out = isl_dim_out,
152 set = isl_dim_set,
153 div = isl_dim_div,
154 all = isl_dim_all
155 };
156
157 }
158 } // namespace isl
159
160 namespace isl {
161
162 inline namespace noexceptions {
163
164 // forward declarations
165 class aff;
166 class aff_list;
167 class ast_build;
168 class ast_expr;
169 class ast_expr_list;
170 class ast_node;
171 class ast_node_list;
172 class basic_map;
173 class basic_map_list;
174 class basic_set;
175 class basic_set_list;
176 class constraint;
177 class constraint_list;
178 class fixed_box;
179 class id;
180 class id_list;
181 class id_to_ast_expr;
182 class local_space;
183 class map;
184 class map_list;
185 class mat;
186 class multi_aff;
187 class multi_pw_aff;
188 class multi_union_pw_aff;
189 class multi_val;
190 class point;
191 class pw_aff;
192 class pw_aff_list;
193 class pw_multi_aff;
194 class pw_multi_aff_list;
195 class pw_qpolynomial;
196 class pw_qpolynomial_fold_list;
197 class pw_qpolynomial_list;
198 class qpolynomial;
199 class schedule;
200 class schedule_constraints;
201 class schedule_node;
202 class set;
203 class set_list;
204 class space;
205 class term;
206 class union_access_info;
207 class union_flow;
208 class union_map;
209 class union_map_list;
210 class union_pw_aff;
211 class union_pw_aff_list;
212 class union_pw_multi_aff;
213 class union_pw_multi_aff_list;
214 class union_pw_qpolynomial;
215 class union_set;
216 class union_set_list;
217 class val;
218 class val_list;
219 class vec;
220
221 // declarations for isl::aff
222 inline aff manage(__isl_take isl_aff *ptr);
223 inline aff manage_copy(__isl_keep isl_aff *ptr);
224
225 class aff {
226 friend inline aff manage(__isl_take isl_aff *ptr);
227 friend inline aff manage_copy(__isl_keep isl_aff *ptr);
228
229 isl_aff *ptr = nullptr;
230
231 inline explicit aff(__isl_take isl_aff *ptr);
232
233 public:
234 inline /* implicit */ aff();
235 inline /* implicit */ aff(const aff &obj);
236 inline /* implicit */ aff(std::nullptr_t);
237 inline explicit aff(local_space ls);
238 inline explicit aff(local_space ls, val val);
239 inline explicit aff(ctx ctx, const std::string &str);
240 inline aff &operator=(aff obj);
241 inline ~aff();
242 inline __isl_give isl_aff *copy() const &;
243 inline __isl_give isl_aff *copy() && = delete;
244 inline __isl_keep isl_aff *get() const;
245 inline __isl_give isl_aff *release();
246 inline bool is_null() const;
247 inline explicit operator bool() const;
248 inline ctx get_ctx() const;
249 inline std::string to_str() const;
250 inline void dump() const;
251
252 inline aff add(aff aff2) const;
253 inline aff add_coefficient_si(isl::dim type, int pos, int v) const;
254 inline aff add_coefficient_val(isl::dim type, int pos, val v) const;
255 inline aff add_constant_num_si(int v) const;
256 inline aff add_constant_si(int v) const;
257 inline aff add_constant_val(val v) const;
258 inline aff add_dims(isl::dim type, unsigned int n) const;
259 inline aff align_params(space model) const;
260 inline aff ceil() const;
261 inline int coefficient_sgn(isl::dim type, int pos) const;
262 inline int dim(isl::dim type) const;
263 inline aff div(aff aff2) const;
264 inline aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
265 inline basic_set eq_basic_set(aff aff2) const;
266 inline set eq_set(aff aff2) const;
267 inline val eval(point pnt) const;
268 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
269 inline aff floor() const;
270 inline aff from_range() const;
271 inline basic_set ge_basic_set(aff aff2) const;
272 inline set ge_set(aff aff2) const;
273 inline val get_coefficient_val(isl::dim type, int pos) const;
274 inline val get_constant_val() const;
275 inline val get_denominator_val() const;
276 inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
277 inline aff get_div(int pos) const;
278 inline local_space get_domain_local_space() const;
279 inline space get_domain_space() const;
280 inline uint32_t get_hash() const;
281 inline local_space get_local_space() const;
282 inline space get_space() const;
283 inline aff gist(set context) const;
284 inline aff gist_params(set context) const;
285 inline basic_set gt_basic_set(aff aff2) const;
286 inline set gt_set(aff aff2) const;
287 inline aff insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
288 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
289 inline boolean is_cst() const;
290 inline boolean is_nan() const;
291 inline basic_set le_basic_set(aff aff2) const;
292 inline set le_set(aff aff2) const;
293 inline basic_set lt_basic_set(aff aff2) const;
294 inline set lt_set(aff aff2) const;
295 inline aff mod(val mod) const;
296 inline aff move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
297 inline aff mul(aff aff2) const;
298 static inline aff nan_on_domain(local_space ls);
299 inline set ne_set(aff aff2) const;
300 inline aff neg() const;
301 inline basic_set neg_basic_set() const;
302 static inline aff param_on_domain_space_id(space space, id id);
303 inline boolean plain_is_equal(const aff &aff2) const;
304 inline boolean plain_is_zero() const;
305 inline aff project_domain_on_params() const;
306 inline aff pullback(multi_aff ma) const;
307 inline aff pullback_aff(aff aff2) const;
308 inline aff scale(val v) const;
309 inline aff scale_down(val v) const;
310 inline aff scale_down_ui(unsigned int f) const;
311 inline aff set_coefficient_si(isl::dim type, int pos, int v) const;
312 inline aff set_coefficient_val(isl::dim type, int pos, val v) const;
313 inline aff set_constant_si(int v) const;
314 inline aff set_constant_val(val v) const;
315 inline aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
316 inline aff set_tuple_id(isl::dim type, id id) const;
317 inline aff sub(aff aff2) const;
318 static inline aff var_on_domain(local_space ls, isl::dim type, unsigned int pos);
319 inline basic_set zero_basic_set() const;
320 };
321
322 // declarations for isl::aff_list
323 inline aff_list manage(__isl_take isl_aff_list *ptr);
324 inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
325
326 class aff_list {
327 friend inline aff_list manage(__isl_take isl_aff_list *ptr);
328 friend inline aff_list manage_copy(__isl_keep isl_aff_list *ptr);
329
330 isl_aff_list *ptr = nullptr;
331
332 inline explicit aff_list(__isl_take isl_aff_list *ptr);
333
334 public:
335 inline /* implicit */ aff_list();
336 inline /* implicit */ aff_list(const aff_list &obj);
337 inline /* implicit */ aff_list(std::nullptr_t);
338 inline aff_list &operator=(aff_list obj);
339 inline ~aff_list();
340 inline __isl_give isl_aff_list *copy() const &;
341 inline __isl_give isl_aff_list *copy() && = delete;
342 inline __isl_keep isl_aff_list *get() const;
343 inline __isl_give isl_aff_list *release();
344 inline bool is_null() const;
345 inline explicit operator bool() const;
346 inline ctx get_ctx() const;
347 inline void dump() const;
348
349 inline aff_list add(aff el) const;
350 static inline aff_list alloc(ctx ctx, int n);
351 inline aff_list concat(aff_list list2) const;
352 inline aff_list drop(unsigned int first, unsigned int n) const;
353 inline stat foreach(const std::function<stat(aff)> &fn) const;
354 static inline aff_list from_aff(aff el);
355 inline aff get_aff(int index) const;
356 inline aff get_at(int index) const;
357 inline aff_list insert(unsigned int pos, aff el) const;
358 inline int n_aff() const;
359 inline aff_list reverse() const;
360 inline aff_list set_aff(int index, aff el) const;
361 inline int size() const;
362 inline aff_list swap(unsigned int pos1, unsigned int pos2) const;
363 };
364
365 // declarations for isl::ast_build
366 inline ast_build manage(__isl_take isl_ast_build *ptr);
367 inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
368
369 class ast_build {
370 friend inline ast_build manage(__isl_take isl_ast_build *ptr);
371 friend inline ast_build manage_copy(__isl_keep isl_ast_build *ptr);
372
373 isl_ast_build *ptr = nullptr;
374
375 inline explicit ast_build(__isl_take isl_ast_build *ptr);
376
377 public:
378 inline /* implicit */ ast_build();
379 inline /* implicit */ ast_build(const ast_build &obj);
380 inline /* implicit */ ast_build(std::nullptr_t);
381 inline explicit ast_build(ctx ctx);
382 inline ast_build &operator=(ast_build obj);
383 inline ~ast_build();
384 inline __isl_give isl_ast_build *copy() const &;
385 inline __isl_give isl_ast_build *copy() && = delete;
386 inline __isl_keep isl_ast_build *get() const;
387 inline __isl_give isl_ast_build *release();
388 inline bool is_null() const;
389 inline explicit operator bool() const;
390 inline ctx get_ctx() const;
391
392 inline ast_expr access_from(pw_multi_aff pma) const;
393 inline ast_expr access_from(multi_pw_aff mpa) const;
394 inline ast_node ast_from_schedule(union_map schedule) const;
395 inline ast_expr call_from(pw_multi_aff pma) const;
396 inline ast_expr call_from(multi_pw_aff mpa) const;
397 inline ast_expr expr_from(set set) const;
398 inline ast_expr expr_from(pw_aff pa) const;
399 static inline ast_build from_context(set set);
400 inline union_map get_schedule() const;
401 inline space get_schedule_space() const;
402 inline ast_node node_from_schedule(schedule schedule) const;
403 inline ast_node node_from_schedule_map(union_map schedule) const;
404 inline ast_build restrict(set set) const;
405 };
406
407 // declarations for isl::ast_expr
408 inline ast_expr manage(__isl_take isl_ast_expr *ptr);
409 inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
410
411 class ast_expr {
412 friend inline ast_expr manage(__isl_take isl_ast_expr *ptr);
413 friend inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr);
414
415 isl_ast_expr *ptr = nullptr;
416
417 inline explicit ast_expr(__isl_take isl_ast_expr *ptr);
418
419 public:
420 inline /* implicit */ ast_expr();
421 inline /* implicit */ ast_expr(const ast_expr &obj);
422 inline /* implicit */ ast_expr(std::nullptr_t);
423 inline ast_expr &operator=(ast_expr obj);
424 inline ~ast_expr();
425 inline __isl_give isl_ast_expr *copy() const &;
426 inline __isl_give isl_ast_expr *copy() && = delete;
427 inline __isl_keep isl_ast_expr *get() const;
428 inline __isl_give isl_ast_expr *release();
429 inline bool is_null() const;
430 inline explicit operator bool() const;
431 inline ctx get_ctx() const;
432 inline std::string to_str() const;
433 inline void dump() const;
434
435 inline ast_expr access(ast_expr_list indices) const;
436 inline ast_expr add(ast_expr expr2) const;
437 inline ast_expr address_of() const;
438 inline ast_expr call(ast_expr_list arguments) const;
439 inline ast_expr div(ast_expr expr2) const;
440 inline ast_expr eq(ast_expr expr2) const;
441 static inline ast_expr from_id(id id);
442 static inline ast_expr from_val(val v);
443 inline ast_expr ge(ast_expr expr2) const;
444 inline id get_id() const;
445 inline ast_expr get_op_arg(int pos) const;
446 inline int get_op_n_arg() const;
447 inline val get_val() const;
448 inline ast_expr gt(ast_expr expr2) const;
449 inline boolean is_equal(const ast_expr &expr2) const;
450 inline ast_expr le(ast_expr expr2) const;
451 inline ast_expr lt(ast_expr expr2) const;
452 inline ast_expr mul(ast_expr expr2) const;
453 inline ast_expr neg() const;
454 inline ast_expr pdiv_q(ast_expr expr2) const;
455 inline ast_expr pdiv_r(ast_expr expr2) const;
456 inline ast_expr set_op_arg(int pos, ast_expr arg) const;
457 inline ast_expr sub(ast_expr expr2) const;
458 inline ast_expr substitute_ids(id_to_ast_expr id2expr) const;
459 inline std::string to_C_str() const;
460 };
461
462 // declarations for isl::ast_expr_list
463 inline ast_expr_list manage(__isl_take isl_ast_expr_list *ptr);
464 inline ast_expr_list manage_copy(__isl_keep isl_ast_expr_list *ptr);
465
466 class ast_expr_list {
467 friend inline ast_expr_list manage(__isl_take isl_ast_expr_list *ptr);
468 friend inline ast_expr_list manage_copy(__isl_keep isl_ast_expr_list *ptr);
469
470 isl_ast_expr_list *ptr = nullptr;
471
472 inline explicit ast_expr_list(__isl_take isl_ast_expr_list *ptr);
473
474 public:
475 inline /* implicit */ ast_expr_list();
476 inline /* implicit */ ast_expr_list(const ast_expr_list &obj);
477 inline /* implicit */ ast_expr_list(std::nullptr_t);
478 inline ast_expr_list &operator=(ast_expr_list obj);
479 inline ~ast_expr_list();
480 inline __isl_give isl_ast_expr_list *copy() const &;
481 inline __isl_give isl_ast_expr_list *copy() && = delete;
482 inline __isl_keep isl_ast_expr_list *get() const;
483 inline __isl_give isl_ast_expr_list *release();
484 inline bool is_null() const;
485 inline explicit operator bool() const;
486 inline ctx get_ctx() const;
487 inline void dump() const;
488
489 inline ast_expr_list add(ast_expr el) const;
490 static inline ast_expr_list alloc(ctx ctx, int n);
491 inline ast_expr_list concat(ast_expr_list list2) const;
492 inline ast_expr_list drop(unsigned int first, unsigned int n) const;
493 inline stat foreach(const std::function<stat(ast_expr)> &fn) const;
494 static inline ast_expr_list from_ast_expr(ast_expr el);
495 inline ast_expr get_ast_expr(int index) const;
496 inline ast_expr get_at(int index) const;
497 inline ast_expr_list insert(unsigned int pos, ast_expr el) const;
498 inline int n_ast_expr() const;
499 inline ast_expr_list reverse() const;
500 inline ast_expr_list set_ast_expr(int index, ast_expr el) const;
501 inline int size() const;
502 inline ast_expr_list swap(unsigned int pos1, unsigned int pos2) const;
503 };
504
505 // declarations for isl::ast_node
506 inline ast_node manage(__isl_take isl_ast_node *ptr);
507 inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
508
509 class ast_node {
510 friend inline ast_node manage(__isl_take isl_ast_node *ptr);
511 friend inline ast_node manage_copy(__isl_keep isl_ast_node *ptr);
512
513 isl_ast_node *ptr = nullptr;
514
515 inline explicit ast_node(__isl_take isl_ast_node *ptr);
516
517 public:
518 inline /* implicit */ ast_node();
519 inline /* implicit */ ast_node(const ast_node &obj);
520 inline /* implicit */ ast_node(std::nullptr_t);
521 inline ast_node &operator=(ast_node obj);
522 inline ~ast_node();
523 inline __isl_give isl_ast_node *copy() const &;
524 inline __isl_give isl_ast_node *copy() && = delete;
525 inline __isl_keep isl_ast_node *get() const;
526 inline __isl_give isl_ast_node *release();
527 inline bool is_null() const;
528 inline explicit operator bool() const;
529 inline ctx get_ctx() const;
530 inline std::string to_str() const;
531 inline void dump() const;
532
533 static inline ast_node alloc_user(ast_expr expr);
534 inline ast_node_list block_get_children() const;
535 inline ast_node for_get_body() const;
536 inline ast_expr for_get_cond() const;
537 inline ast_expr for_get_inc() const;
538 inline ast_expr for_get_init() const;
539 inline ast_expr for_get_iterator() const;
540 inline boolean for_is_degenerate() const;
541 inline id get_annotation() const;
542 inline ast_expr if_get_cond() const;
543 inline ast_node if_get_else() const;
544 inline ast_node if_get_then() const;
545 inline boolean if_has_else() const;
546 inline id mark_get_id() const;
547 inline ast_node mark_get_node() const;
548 inline ast_node set_annotation(id annotation) const;
549 inline std::string to_C_str() const;
550 inline ast_expr user_get_expr() const;
551 };
552
553 // declarations for isl::ast_node_list
554 inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
555 inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
556
557 class ast_node_list {
558 friend inline ast_node_list manage(__isl_take isl_ast_node_list *ptr);
559 friend inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr);
560
561 isl_ast_node_list *ptr = nullptr;
562
563 inline explicit ast_node_list(__isl_take isl_ast_node_list *ptr);
564
565 public:
566 inline /* implicit */ ast_node_list();
567 inline /* implicit */ ast_node_list(const ast_node_list &obj);
568 inline /* implicit */ ast_node_list(std::nullptr_t);
569 inline ast_node_list &operator=(ast_node_list obj);
570 inline ~ast_node_list();
571 inline __isl_give isl_ast_node_list *copy() const &;
572 inline __isl_give isl_ast_node_list *copy() && = delete;
573 inline __isl_keep isl_ast_node_list *get() const;
574 inline __isl_give isl_ast_node_list *release();
575 inline bool is_null() const;
576 inline explicit operator bool() const;
577 inline ctx get_ctx() const;
578 inline void dump() const;
579
580 inline ast_node_list add(ast_node el) const;
581 static inline ast_node_list alloc(ctx ctx, int n);
582 inline ast_node_list concat(ast_node_list list2) const;
583 inline ast_node_list drop(unsigned int first, unsigned int n) const;
584 inline stat foreach(const std::function<stat(ast_node)> &fn) const;
585 static inline ast_node_list from_ast_node(ast_node el);
586 inline ast_node get_ast_node(int index) const;
587 inline ast_node get_at(int index) const;
588 inline ast_node_list insert(unsigned int pos, ast_node el) const;
589 inline int n_ast_node() const;
590 inline ast_node_list reverse() const;
591 inline ast_node_list set_ast_node(int index, ast_node el) const;
592 inline int size() const;
593 inline ast_node_list swap(unsigned int pos1, unsigned int pos2) const;
594 };
595
596 // declarations for isl::basic_map
597 inline basic_map manage(__isl_take isl_basic_map *ptr);
598 inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
599
600 class basic_map {
601 friend inline basic_map manage(__isl_take isl_basic_map *ptr);
602 friend inline basic_map manage_copy(__isl_keep isl_basic_map *ptr);
603
604 isl_basic_map *ptr = nullptr;
605
606 inline explicit basic_map(__isl_take isl_basic_map *ptr);
607
608 public:
609 inline /* implicit */ basic_map();
610 inline /* implicit */ basic_map(const basic_map &obj);
611 inline /* implicit */ basic_map(std::nullptr_t);
612 inline explicit basic_map(ctx ctx, const std::string &str);
613 inline basic_map &operator=(basic_map obj);
614 inline ~basic_map();
615 inline __isl_give isl_basic_map *copy() const &;
616 inline __isl_give isl_basic_map *copy() && = delete;
617 inline __isl_keep isl_basic_map *get() const;
618 inline __isl_give isl_basic_map *release();
619 inline bool is_null() const;
620 inline explicit operator bool() const;
621 inline ctx get_ctx() const;
622 inline std::string to_str() const;
623 inline void dump() const;
624
625 inline basic_map add_constraint(constraint constraint) const;
626 inline basic_map add_dims(isl::dim type, unsigned int n) const;
627 inline basic_map affine_hull() const;
628 inline basic_map align_params(space model) const;
629 inline basic_map apply_domain(basic_map bmap2) const;
630 inline basic_map apply_range(basic_map bmap2) const;
631 inline boolean can_curry() const;
632 inline boolean can_uncurry() const;
633 inline boolean can_zip() const;
634 inline basic_map curry() const;
635 inline basic_set deltas() const;
636 inline basic_map deltas_map() const;
637 inline basic_map detect_equalities() const;
638 inline unsigned int dim(isl::dim type) const;
639 inline basic_set domain() const;
640 inline basic_map domain_map() const;
641 inline basic_map domain_product(basic_map bmap2) const;
642 inline basic_map drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
643 inline basic_map drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
644 inline basic_map drop_unused_params() const;
645 inline basic_map eliminate(isl::dim type, unsigned int first, unsigned int n) const;
646 static inline basic_map empty(space space);
647 static inline basic_map equal(space dim, unsigned int n_equal);
648 inline mat equalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4, isl::dim c5) const;
649 inline basic_map equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
650 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
651 inline basic_map fix_si(isl::dim type, unsigned int pos, int value) const;
652 inline basic_map fix_val(isl::dim type, unsigned int pos, val v) const;
653 inline basic_map flat_product(basic_map bmap2) const;
654 inline basic_map flat_range_product(basic_map bmap2) const;
655 inline basic_map flatten() const;
656 inline basic_map flatten_domain() const;
657 inline basic_map flatten_range() const;
658 inline stat foreach_constraint(const std::function<stat(constraint)> &fn) const;
659 static inline basic_map from_aff(aff aff);
660 static inline basic_map from_aff_list(space domain_space, aff_list list);
661 static inline basic_map from_constraint(constraint constraint);
662 static inline basic_map from_domain(basic_set bset);
663 static inline basic_map from_domain_and_range(basic_set domain, basic_set range);
664 static inline basic_map from_multi_aff(multi_aff maff);
665 static inline basic_map from_qpolynomial(qpolynomial qp);
666 static inline basic_map from_range(basic_set bset);
667 inline constraint_list get_constraint_list() const;
668 inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
669 inline aff get_div(int pos) const;
670 inline local_space get_local_space() const;
671 inline space get_space() const;
672 inline std::string get_tuple_name(isl::dim type) const;
673 inline basic_map gist(basic_map context) const;
674 inline basic_map gist_domain(basic_set context) const;
675 inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
676 static inline basic_map identity(space dim);
677 inline boolean image_is_bounded() const;
678 inline mat inequalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4, isl::dim c5) const;
679 inline basic_map insert_dims(isl::dim type, unsigned int pos, unsigned int n) const;
680 inline basic_map intersect(basic_map bmap2) const;
681 inline basic_map intersect_domain(basic_set bset) const;
682 inline basic_map intersect_range(basic_set bset) const;
683 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
684 inline boolean is_disjoint(const basic_map &bmap2) const;
685 inline boolean is_empty() const;
686 inline boolean is_equal(const basic_map &bmap2) const;
687 inline boolean is_rational() const;
688 inline boolean is_single_valued() const;
689 inline boolean is_strict_subset(const basic_map &bmap2) const;
690 inline boolean is_subset(const basic_map &bmap2) const;
691 inline boolean is_universe() const;
692 static inline basic_map less_at(space dim, unsigned int pos);
693 inline map lexmax() const;
694 inline map lexmin() const;
695 inline pw_multi_aff lexmin_pw_multi_aff() const;
696 inline basic_map lower_bound_si(isl::dim type, unsigned int pos, int value) const;
697 static inline basic_map more_at(space dim, unsigned int pos);
698 inline basic_map move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
699 inline int n_constraint() const;
700 static inline basic_map nat_universe(space dim);
701 inline basic_map neg() const;
702 inline basic_map order_ge(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
703 inline basic_map order_gt(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
704 inline val plain_get_val_if_fixed(isl::dim type, unsigned int pos) const;
705 inline boolean plain_is_empty() const;
706 inline boolean plain_is_universe() const;
707 inline basic_map preimage_domain_multi_aff(multi_aff ma) const;
708 inline basic_map preimage_range_multi_aff(multi_aff ma) const;
709 inline basic_map product(basic_map bmap2) const;
710 inline basic_map project_out(isl::dim type, unsigned int first, unsigned int n) const;
711 inline basic_set range() const;
712 inline basic_map range_map() const;
713 inline basic_map range_product(basic_map bmap2) const;
714 inline basic_map remove_dims(isl::dim type, unsigned int first, unsigned int n) const;
715 inline basic_map remove_divs() const;
716 inline basic_map remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
717 inline basic_map remove_redundancies() const;
718 inline basic_map reverse() const;
719 inline basic_map sample() const;
720 inline basic_map set_tuple_id(isl::dim type, id id) const;
721 inline basic_map set_tuple_name(isl::dim type, const std::string &s) const;
722 inline basic_map sum(basic_map bmap2) const;
723 inline basic_map uncurry() const;
724 inline map unite(basic_map bmap2) const;
725 static inline basic_map universe(space space);
726 inline basic_map upper_bound_si(isl::dim type, unsigned int pos, int value) const;
727 inline basic_set wrap() const;
728 inline basic_map zip() const;
729 };
730
731 // declarations for isl::basic_map_list
732 inline basic_map_list manage(__isl_take isl_basic_map_list *ptr);
733 inline basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr);
734
735 class basic_map_list {
736 friend inline basic_map_list manage(__isl_take isl_basic_map_list *ptr);
737 friend inline basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr);
738
739 isl_basic_map_list *ptr = nullptr;
740
741 inline explicit basic_map_list(__isl_take isl_basic_map_list *ptr);
742
743 public:
744 inline /* implicit */ basic_map_list();
745 inline /* implicit */ basic_map_list(const basic_map_list &obj);
746 inline /* implicit */ basic_map_list(std::nullptr_t);
747 inline basic_map_list &operator=(basic_map_list obj);
748 inline ~basic_map_list();
749 inline __isl_give isl_basic_map_list *copy() const &;
750 inline __isl_give isl_basic_map_list *copy() && = delete;
751 inline __isl_keep isl_basic_map_list *get() const;
752 inline __isl_give isl_basic_map_list *release();
753 inline bool is_null() const;
754 inline explicit operator bool() const;
755 inline ctx get_ctx() const;
756 inline void dump() const;
757
758 inline basic_map_list add(basic_map el) const;
759 static inline basic_map_list alloc(ctx ctx, int n);
760 inline basic_map_list concat(basic_map_list list2) const;
761 inline basic_map_list drop(unsigned int first, unsigned int n) const;
762 inline stat foreach(const std::function<stat(basic_map)> &fn) const;
763 static inline basic_map_list from_basic_map(basic_map el);
764 inline basic_map get_at(int index) const;
765 inline basic_map get_basic_map(int index) const;
766 inline basic_map_list insert(unsigned int pos, basic_map el) const;
767 inline int n_basic_map() const;
768 inline basic_map_list reverse() const;
769 inline basic_map_list set_basic_map(int index, basic_map el) const;
770 inline int size() const;
771 inline basic_map_list swap(unsigned int pos1, unsigned int pos2) const;
772 };
773
774 // declarations for isl::basic_set
775 inline basic_set manage(__isl_take isl_basic_set *ptr);
776 inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
777
778 class basic_set {
779 friend inline basic_set manage(__isl_take isl_basic_set *ptr);
780 friend inline basic_set manage_copy(__isl_keep isl_basic_set *ptr);
781
782 isl_basic_set *ptr = nullptr;
783
784 inline explicit basic_set(__isl_take isl_basic_set *ptr);
785
786 public:
787 inline /* implicit */ basic_set();
788 inline /* implicit */ basic_set(const basic_set &obj);
789 inline /* implicit */ basic_set(std::nullptr_t);
790 inline explicit basic_set(ctx ctx, const std::string &str);
791 inline /* implicit */ basic_set(point pnt);
792 inline basic_set &operator=(basic_set obj);
793 inline ~basic_set();
794 inline __isl_give isl_basic_set *copy() const &;
795 inline __isl_give isl_basic_set *copy() && = delete;
796 inline __isl_keep isl_basic_set *get() const;
797 inline __isl_give isl_basic_set *release();
798 inline bool is_null() const;
799 inline explicit operator bool() const;
800 inline ctx get_ctx() const;
801 inline std::string to_str() const;
802 inline void dump() const;
803
804 inline basic_set affine_hull() const;
805 inline basic_set align_params(space model) const;
806 inline basic_set apply(basic_map bmap) const;
807 static inline basic_set box_from_points(point pnt1, point pnt2);
808 inline basic_set coefficients() const;
809 inline basic_set detect_equalities() const;
810 inline unsigned int dim(isl::dim type) const;
811 inline val dim_max_val(int pos) const;
812 inline basic_set drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
813 inline basic_set drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
814 inline basic_set drop_unused_params() const;
815 inline basic_set eliminate(isl::dim type, unsigned int first, unsigned int n) const;
816 static inline basic_set empty(space space);
817 inline mat equalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4) const;
818 inline basic_set fix_si(isl::dim type, unsigned int pos, int value) const;
819 inline basic_set fix_val(isl::dim type, unsigned int pos, val v) const;
820 inline basic_set flat_product(basic_set bset2) const;
821 inline basic_set flatten() const;
822 inline stat foreach_bound_pair(isl::dim type, unsigned int pos, const std::function<stat(constraint, constraint, basic_set)> &fn) const;
823 inline stat foreach_constraint(const std::function<stat(constraint)> &fn) const;
824 static inline basic_set from_constraint(constraint constraint);
825 static inline basic_set from_multi_aff(multi_aff ma);
826 inline basic_set from_params() const;
827 inline constraint_list get_constraint_list() const;
828 inline id get_dim_id(isl::dim type, unsigned int pos) const;
829 inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
830 inline aff get_div(int pos) const;
831 inline local_space get_local_space() const;
832 inline space get_space() const;
833 inline std::string get_tuple_name() const;
834 inline basic_set gist(basic_set context) const;
835 inline mat inequalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4) const;
836 inline basic_set insert_dims(isl::dim type, unsigned int pos, unsigned int n) const;
837 inline basic_set intersect(basic_set bset2) const;
838 inline basic_set intersect_params(basic_set bset2) const;
839 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
840 inline boolean is_bounded() const;
841 inline boolean is_disjoint(const basic_set &bset2) const;
842 inline boolean is_empty() const;
843 inline boolean is_equal(const basic_set &bset2) const;
844 inline int is_rational() const;
845 inline boolean is_subset(const basic_set &bset2) const;
846 inline boolean is_universe() const;
847 inline boolean is_wrapping() const;
848 inline set lexmax() const;
849 inline set lexmin() const;
850 inline basic_set lower_bound_val(isl::dim type, unsigned int pos, val value) const;
851 inline val max_val(const aff &obj) const;
852 inline basic_set move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
853 inline int n_constraint() const;
854 inline unsigned int n_dim() const;
855 static inline basic_set nat_universe(space dim);
856 inline basic_set neg() const;
857 inline basic_set params() const;
858 inline boolean plain_is_empty() const;
859 inline boolean plain_is_equal(const basic_set &bset2) const;
860 inline boolean plain_is_universe() const;
861 static inline basic_set positive_orthant(space space);
862 inline basic_set preimage_multi_aff(multi_aff ma) const;
863 inline basic_set project_out(isl::dim type, unsigned int first, unsigned int n) const;
864 inline mat reduced_basis() const;
865 inline basic_set remove_dims(isl::dim type, unsigned int first, unsigned int n) const;
866 inline basic_set remove_divs() const;
867 inline basic_set remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
868 inline basic_set remove_redundancies() const;
869 inline basic_set remove_unknown_divs() const;
870 inline basic_set sample() const;
871 inline point sample_point() const;
872 inline basic_set set_tuple_id(id id) const;
873 inline basic_set set_tuple_name(const std::string &s) const;
874 inline basic_set solutions() const;
875 inline set unite(basic_set bset2) const;
876 static inline basic_set universe(space space);
877 inline basic_map unwrap() const;
878 inline basic_set upper_bound_val(isl::dim type, unsigned int pos, val value) const;
879 };
880
881 // declarations for isl::basic_set_list
882 inline basic_set_list manage(__isl_take isl_basic_set_list *ptr);
883 inline basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr);
884
885 class basic_set_list {
886 friend inline basic_set_list manage(__isl_take isl_basic_set_list *ptr);
887 friend inline basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr);
888
889 isl_basic_set_list *ptr = nullptr;
890
891 inline explicit basic_set_list(__isl_take isl_basic_set_list *ptr);
892
893 public:
894 inline /* implicit */ basic_set_list();
895 inline /* implicit */ basic_set_list(const basic_set_list &obj);
896 inline /* implicit */ basic_set_list(std::nullptr_t);
897 inline basic_set_list &operator=(basic_set_list obj);
898 inline ~basic_set_list();
899 inline __isl_give isl_basic_set_list *copy() const &;
900 inline __isl_give isl_basic_set_list *copy() && = delete;
901 inline __isl_keep isl_basic_set_list *get() const;
902 inline __isl_give isl_basic_set_list *release();
903 inline bool is_null() const;
904 inline explicit operator bool() const;
905 inline ctx get_ctx() const;
906 inline void dump() const;
907
908 inline basic_set_list add(basic_set el) const;
909 static inline basic_set_list alloc(ctx ctx, int n);
910 inline basic_set_list coefficients() const;
911 inline basic_set_list concat(basic_set_list list2) const;
912 inline basic_set_list drop(unsigned int first, unsigned int n) const;
913 inline stat foreach(const std::function<stat(basic_set)> &fn) const;
914 static inline basic_set_list from_basic_set(basic_set el);
915 inline basic_set get_at(int index) const;
916 inline basic_set get_basic_set(int index) const;
917 inline basic_set_list insert(unsigned int pos, basic_set el) const;
918 inline int n_basic_set() const;
919 inline basic_set_list reverse() const;
920 inline basic_set_list set_basic_set(int index, basic_set el) const;
921 inline int size() const;
922 inline basic_set_list swap(unsigned int pos1, unsigned int pos2) const;
923 };
924
925 // declarations for isl::constraint
926 inline constraint manage(__isl_take isl_constraint *ptr);
927 inline constraint manage_copy(__isl_keep isl_constraint *ptr);
928
929 class constraint {
930 friend inline constraint manage(__isl_take isl_constraint *ptr);
931 friend inline constraint manage_copy(__isl_keep isl_constraint *ptr);
932
933 isl_constraint *ptr = nullptr;
934
935 inline explicit constraint(__isl_take isl_constraint *ptr);
936
937 public:
938 inline /* implicit */ constraint();
939 inline /* implicit */ constraint(const constraint &obj);
940 inline /* implicit */ constraint(std::nullptr_t);
941 inline constraint &operator=(constraint obj);
942 inline ~constraint();
943 inline __isl_give isl_constraint *copy() const &;
944 inline __isl_give isl_constraint *copy() && = delete;
945 inline __isl_keep isl_constraint *get() const;
946 inline __isl_give isl_constraint *release();
947 inline bool is_null() const;
948 inline explicit operator bool() const;
949 inline ctx get_ctx() const;
950 inline void dump() const;
951
952 static inline constraint alloc_equality(local_space ls);
953 static inline constraint alloc_inequality(local_space ls);
954 inline int cmp_last_non_zero(const constraint &c2) const;
955 inline aff get_aff() const;
956 inline aff get_bound(isl::dim type, int pos) const;
957 inline val get_coefficient_val(isl::dim type, int pos) const;
958 inline val get_constant_val() const;
959 inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
960 inline aff get_div(int pos) const;
961 inline local_space get_local_space() const;
962 inline space get_space() const;
963 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
964 inline int is_div_constraint() const;
965 inline boolean is_lower_bound(isl::dim type, unsigned int pos) const;
966 inline boolean is_upper_bound(isl::dim type, unsigned int pos) const;
967 inline int plain_cmp(const constraint &c2) const;
968 inline constraint set_coefficient_si(isl::dim type, int pos, int v) const;
969 inline constraint set_coefficient_val(isl::dim type, int pos, val v) const;
970 inline constraint set_constant_si(int v) const;
971 inline constraint set_constant_val(val v) const;
972 };
973
974 // declarations for isl::constraint_list
975 inline constraint_list manage(__isl_take isl_constraint_list *ptr);
976 inline constraint_list manage_copy(__isl_keep isl_constraint_list *ptr);
977
978 class constraint_list {
979 friend inline constraint_list manage(__isl_take isl_constraint_list *ptr);
980 friend inline constraint_list manage_copy(__isl_keep isl_constraint_list *ptr);
981
982 isl_constraint_list *ptr = nullptr;
983
984 inline explicit constraint_list(__isl_take isl_constraint_list *ptr);
985
986 public:
987 inline /* implicit */ constraint_list();
988 inline /* implicit */ constraint_list(const constraint_list &obj);
989 inline /* implicit */ constraint_list(std::nullptr_t);
990 inline constraint_list &operator=(constraint_list obj);
991 inline ~constraint_list();
992 inline __isl_give isl_constraint_list *copy() const &;
993 inline __isl_give isl_constraint_list *copy() && = delete;
994 inline __isl_keep isl_constraint_list *get() const;
995 inline __isl_give isl_constraint_list *release();
996 inline bool is_null() const;
997 inline explicit operator bool() const;
998 inline ctx get_ctx() const;
999 inline void dump() const;
1000
1001 inline constraint_list add(constraint el) const;
1002 static inline constraint_list alloc(ctx ctx, int n);
1003 inline constraint_list concat(constraint_list list2) const;
1004 inline constraint_list drop(unsigned int first, unsigned int n) const;
1005 inline stat foreach(const std::function<stat(constraint)> &fn) const;
1006 static inline constraint_list from_constraint(constraint el);
1007 inline constraint get_at(int index) const;
1008 inline constraint get_constraint(int index) const;
1009 inline constraint_list insert(unsigned int pos, constraint el) const;
1010 inline int n_constraint() const;
1011 inline constraint_list reverse() const;
1012 inline constraint_list set_constraint(int index, constraint el) const;
1013 inline int size() const;
1014 inline constraint_list swap(unsigned int pos1, unsigned int pos2) const;
1015 };
1016
1017 // declarations for isl::fixed_box
1018 inline fixed_box manage(__isl_take isl_fixed_box *ptr);
1019 inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
1020
1021 class fixed_box {
1022 friend inline fixed_box manage(__isl_take isl_fixed_box *ptr);
1023 friend inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr);
1024
1025 isl_fixed_box *ptr = nullptr;
1026
1027 inline explicit fixed_box(__isl_take isl_fixed_box *ptr);
1028
1029 public:
1030 inline /* implicit */ fixed_box();
1031 inline /* implicit */ fixed_box(const fixed_box &obj);
1032 inline /* implicit */ fixed_box(std::nullptr_t);
1033 inline fixed_box &operator=(fixed_box obj);
1034 inline ~fixed_box();
1035 inline __isl_give isl_fixed_box *copy() const &;
1036 inline __isl_give isl_fixed_box *copy() && = delete;
1037 inline __isl_keep isl_fixed_box *get() const;
1038 inline __isl_give isl_fixed_box *release();
1039 inline bool is_null() const;
1040 inline explicit operator bool() const;
1041 inline ctx get_ctx() const;
1042
1043 inline multi_aff get_offset() const;
1044 inline multi_val get_size() const;
1045 inline space get_space() const;
1046 inline boolean is_valid() const;
1047 };
1048
1049 // declarations for isl::id
1050 inline id manage(__isl_take isl_id *ptr);
1051 inline id manage_copy(__isl_keep isl_id *ptr);
1052
1053 class id {
1054 friend inline id manage(__isl_take isl_id *ptr);
1055 friend inline id manage_copy(__isl_keep isl_id *ptr);
1056
1057 isl_id *ptr = nullptr;
1058
1059 inline explicit id(__isl_take isl_id *ptr);
1060
1061 public:
1062 inline /* implicit */ id();
1063 inline /* implicit */ id(const id &obj);
1064 inline /* implicit */ id(std::nullptr_t);
1065 inline id &operator=(id obj);
1066 inline ~id();
1067 inline __isl_give isl_id *copy() const &;
1068 inline __isl_give isl_id *copy() && = delete;
1069 inline __isl_keep isl_id *get() const;
1070 inline __isl_give isl_id *release();
1071 inline bool is_null() const;
1072 inline explicit operator bool() const;
1073 inline ctx get_ctx() const;
1074 inline std::string to_str() const;
1075 inline void dump() const;
1076
1077 static inline id alloc(ctx ctx, const std::string &name, void * user);
1078 inline uint32_t get_hash() const;
1079 inline std::string get_name() const;
1080 inline void * get_user() const;
1081 };
1082
1083 // declarations for isl::id_list
1084 inline id_list manage(__isl_take isl_id_list *ptr);
1085 inline id_list manage_copy(__isl_keep isl_id_list *ptr);
1086
1087 class id_list {
1088 friend inline id_list manage(__isl_take isl_id_list *ptr);
1089 friend inline id_list manage_copy(__isl_keep isl_id_list *ptr);
1090
1091 isl_id_list *ptr = nullptr;
1092
1093 inline explicit id_list(__isl_take isl_id_list *ptr);
1094
1095 public:
1096 inline /* implicit */ id_list();
1097 inline /* implicit */ id_list(const id_list &obj);
1098 inline /* implicit */ id_list(std::nullptr_t);
1099 inline id_list &operator=(id_list obj);
1100 inline ~id_list();
1101 inline __isl_give isl_id_list *copy() const &;
1102 inline __isl_give isl_id_list *copy() && = delete;
1103 inline __isl_keep isl_id_list *get() const;
1104 inline __isl_give isl_id_list *release();
1105 inline bool is_null() const;
1106 inline explicit operator bool() const;
1107 inline ctx get_ctx() const;
1108 inline void dump() const;
1109
1110 inline id_list add(id el) const;
1111 static inline id_list alloc(ctx ctx, int n);
1112 inline id_list concat(id_list list2) const;
1113 inline id_list drop(unsigned int first, unsigned int n) const;
1114 inline stat foreach(const std::function<stat(id)> &fn) const;
1115 static inline id_list from_id(id el);
1116 inline id get_at(int index) const;
1117 inline id get_id(int index) const;
1118 inline id_list insert(unsigned int pos, id el) const;
1119 inline int n_id() const;
1120 inline id_list reverse() const;
1121 inline id_list set_id(int index, id el) const;
1122 inline int size() const;
1123 inline id_list swap(unsigned int pos1, unsigned int pos2) const;
1124 };
1125
1126 // declarations for isl::id_to_ast_expr
1127 inline id_to_ast_expr manage(__isl_take isl_id_to_ast_expr *ptr);
1128 inline id_to_ast_expr manage_copy(__isl_keep isl_id_to_ast_expr *ptr);
1129
1130 class id_to_ast_expr {
1131 friend inline id_to_ast_expr manage(__isl_take isl_id_to_ast_expr *ptr);
1132 friend inline id_to_ast_expr manage_copy(__isl_keep isl_id_to_ast_expr *ptr);
1133
1134 isl_id_to_ast_expr *ptr = nullptr;
1135
1136 inline explicit id_to_ast_expr(__isl_take isl_id_to_ast_expr *ptr);
1137
1138 public:
1139 inline /* implicit */ id_to_ast_expr();
1140 inline /* implicit */ id_to_ast_expr(const id_to_ast_expr &obj);
1141 inline /* implicit */ id_to_ast_expr(std::nullptr_t);
1142 inline id_to_ast_expr &operator=(id_to_ast_expr obj);
1143 inline ~id_to_ast_expr();
1144 inline __isl_give isl_id_to_ast_expr *copy() const &;
1145 inline __isl_give isl_id_to_ast_expr *copy() && = delete;
1146 inline __isl_keep isl_id_to_ast_expr *get() const;
1147 inline __isl_give isl_id_to_ast_expr *release();
1148 inline bool is_null() const;
1149 inline explicit operator bool() const;
1150 inline ctx get_ctx() const;
1151 inline void dump() const;
1152
1153 static inline id_to_ast_expr alloc(ctx ctx, int min_size);
1154 inline id_to_ast_expr drop(id key) const;
1155 inline stat foreach(const std::function<stat(id, ast_expr)> &fn) const;
1156 inline ast_expr get(id key) const;
1157 inline boolean has(const id &key) const;
1158 inline id_to_ast_expr set(id key, ast_expr val) const;
1159 };
1160
1161 // declarations for isl::local_space
1162 inline local_space manage(__isl_take isl_local_space *ptr);
1163 inline local_space manage_copy(__isl_keep isl_local_space *ptr);
1164
1165 class local_space {
1166 friend inline local_space manage(__isl_take isl_local_space *ptr);
1167 friend inline local_space manage_copy(__isl_keep isl_local_space *ptr);
1168
1169 isl_local_space *ptr = nullptr;
1170
1171 inline explicit local_space(__isl_take isl_local_space *ptr);
1172
1173 public:
1174 inline /* implicit */ local_space();
1175 inline /* implicit */ local_space(const local_space &obj);
1176 inline /* implicit */ local_space(std::nullptr_t);
1177 inline explicit local_space(space dim);
1178 inline local_space &operator=(local_space obj);
1179 inline ~local_space();
1180 inline __isl_give isl_local_space *copy() const &;
1181 inline __isl_give isl_local_space *copy() && = delete;
1182 inline __isl_keep isl_local_space *get() const;
1183 inline __isl_give isl_local_space *release();
1184 inline bool is_null() const;
1185 inline explicit operator bool() const;
1186 inline ctx get_ctx() const;
1187 inline void dump() const;
1188
1189 inline local_space add_dims(isl::dim type, unsigned int n) const;
1190 inline int dim(isl::dim type) const;
1191 inline local_space domain() const;
1192 inline local_space drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
1193 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
1194 inline local_space flatten_domain() const;
1195 inline local_space flatten_range() const;
1196 inline local_space from_domain() const;
1197 inline id get_dim_id(isl::dim type, unsigned int pos) const;
1198 inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
1199 inline aff get_div(int pos) const;
1200 inline space get_space() const;
1201 inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
1202 inline boolean has_dim_name(isl::dim type, unsigned int pos) const;
1203 inline local_space insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
1204 inline local_space intersect(local_space ls2) const;
1205 inline boolean is_equal(const local_space &ls2) const;
1206 inline boolean is_params() const;
1207 inline boolean is_set() const;
1208 inline local_space range() const;
1209 inline local_space set_dim_id(isl::dim type, unsigned int pos, id id) const;
1210 inline local_space set_from_params() const;
1211 inline local_space set_tuple_id(isl::dim type, id id) const;
1212 inline local_space wrap() const;
1213 };
1214
1215 // declarations for isl::map
1216 inline map manage(__isl_take isl_map *ptr);
1217 inline map manage_copy(__isl_keep isl_map *ptr);
1218
1219 class map {
1220 friend inline map manage(__isl_take isl_map *ptr);
1221 friend inline map manage_copy(__isl_keep isl_map *ptr);
1222
1223 isl_map *ptr = nullptr;
1224
1225 inline explicit map(__isl_take isl_map *ptr);
1226
1227 public:
1228 inline /* implicit */ map();
1229 inline /* implicit */ map(const map &obj);
1230 inline /* implicit */ map(std::nullptr_t);
1231 inline explicit map(ctx ctx, const std::string &str);
1232 inline /* implicit */ map(basic_map bmap);
1233 inline map &operator=(map obj);
1234 inline ~map();
1235 inline __isl_give isl_map *copy() const &;
1236 inline __isl_give isl_map *copy() && = delete;
1237 inline __isl_keep isl_map *get() const;
1238 inline __isl_give isl_map *release();
1239 inline bool is_null() const;
1240 inline explicit operator bool() const;
1241 inline ctx get_ctx() const;
1242 inline std::string to_str() const;
1243 inline void dump() const;
1244
1245 inline map add_constraint(constraint constraint) const;
1246 inline map add_dims(isl::dim type, unsigned int n) const;
1247 inline basic_map affine_hull() const;
1248 inline map align_params(space model) const;
1249 inline map apply_domain(map map2) const;
1250 inline map apply_range(map map2) const;
1251 inline boolean can_curry() const;
1252 inline boolean can_range_curry() const;
1253 inline boolean can_uncurry() const;
1254 inline boolean can_zip() const;
1255 inline map coalesce() const;
1256 inline map complement() const;
1257 inline basic_map convex_hull() const;
1258 inline map curry() const;
1259 inline set deltas() const;
1260 inline map deltas_map() const;
1261 inline map detect_equalities() const;
1262 inline unsigned int dim(isl::dim type) const;
1263 inline pw_aff dim_max(int pos) const;
1264 inline pw_aff dim_min(int pos) const;
1265 inline set domain() const;
1266 inline map domain_factor_domain() const;
1267 inline map domain_factor_range() const;
1268 inline boolean domain_is_wrapping() const;
1269 inline map domain_map() const;
1270 inline map domain_product(map map2) const;
1271 inline map drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
1272 inline map drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
1273 inline map drop_unused_params() const;
1274 inline map eliminate(isl::dim type, unsigned int first, unsigned int n) const;
1275 static inline map empty(space space);
1276 inline map equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
1277 inline map factor_domain() const;
1278 inline map factor_range() const;
1279 inline int find_dim_by_id(isl::dim type, const id &id) const;
1280 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
1281 inline map fix_si(isl::dim type, unsigned int pos, int value) const;
1282 inline map fix_val(isl::dim type, unsigned int pos, val v) const;
1283 inline map fixed_power_val(val exp) const;
1284 inline map flat_domain_product(map map2) const;
1285 inline map flat_product(map map2) const;
1286 inline map flat_range_product(map map2) const;
1287 inline map flatten() const;
1288 inline map flatten_domain() const;
1289 inline map flatten_range() const;
1290 inline map floordiv_val(val d) const;
1291 inline stat foreach_basic_map(const std::function<stat(basic_map)> &fn) const;
1292 static inline map from_aff(aff aff);
1293 static inline map from_domain(set set);
1294 static inline map from_domain_and_range(set domain, set range);
1295 static inline map from_multi_aff(multi_aff maff);
1296 static inline map from_multi_pw_aff(multi_pw_aff mpa);
1297 static inline map from_pw_aff(pw_aff pwaff);
1298 static inline map from_pw_multi_aff(pw_multi_aff pma);
1299 static inline map from_range(set set);
1300 static inline map from_union_map(union_map umap);
1301 inline basic_map_list get_basic_map_list() const;
1302 inline id get_dim_id(isl::dim type, unsigned int pos) const;
1303 inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
1304 inline uint32_t get_hash() const;
1305 inline fixed_box get_range_simple_fixed_box_hull() const;
1306 inline space get_space() const;
1307 inline id get_tuple_id(isl::dim type) const;
1308 inline std::string get_tuple_name(isl::dim type) const;
1309 inline map gist(map context) const;
1310 inline map gist_basic_map(basic_map context) const;
1311 inline map gist_domain(set context) const;
1312 inline map gist_params(set context) const;
1313 inline map gist_range(set context) const;
1314 inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
1315 inline boolean has_dim_name(isl::dim type, unsigned int pos) const;
1316 inline boolean has_equal_space(const map &map2) const;
1317 inline boolean has_tuple_id(isl::dim type) const;
1318 inline boolean has_tuple_name(isl::dim type) const;
1319 static inline map identity(space dim);
1320 inline map insert_dims(isl::dim type, unsigned int pos, unsigned int n) const;
1321 inline map intersect(map map2) const;
1322 inline map intersect_domain(set set) const;
1323 inline map intersect_domain_factor_range(map factor) const;
1324 inline map intersect_params(set params) const;
1325 inline map intersect_range(set set) const;
1326 inline map intersect_range_factor_range(map factor) const;
1327 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
1328 inline boolean is_bijective() const;
1329 inline boolean is_disjoint(const map &map2) const;
1330 inline boolean is_empty() const;
1331 inline boolean is_equal(const map &map2) const;
1332 inline boolean is_identity() const;
1333 inline boolean is_injective() const;
1334 inline boolean is_product() const;
1335 inline boolean is_single_valued() const;
1336 inline boolean is_strict_subset(const map &map2) const;
1337 inline boolean is_subset(const map &map2) const;
1338 inline int is_translation() const;
1339 static inline map lex_ge(space set_dim);
1340 static inline map lex_ge_first(space dim, unsigned int n);
1341 inline map lex_ge_map(map map2) const;
1342 static inline map lex_gt(space set_dim);
1343 static inline map lex_gt_first(space dim, unsigned int n);
1344 inline map lex_gt_map(map map2) const;
1345 static inline map lex_le(space set_dim);
1346 static inline map lex_le_first(space dim, unsigned int n);
1347 inline map lex_le_map(map map2) const;
1348 static inline map lex_lt(space set_dim);
1349 static inline map lex_lt_first(space dim, unsigned int n);
1350 inline map lex_lt_map(map map2) const;
1351 inline map lexmax() const;
1352 inline pw_multi_aff lexmax_pw_multi_aff() const;
1353 inline map lexmin() const;
1354 inline pw_multi_aff lexmin_pw_multi_aff() const;
1355 inline map lower_bound_si(isl::dim type, unsigned int pos, int value) const;
1356 inline map move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
1357 inline int n_basic_map() const;
1358 static inline map nat_universe(space dim);
1359 inline map neg() const;
1360 inline map oppose(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
1361 inline map order_ge(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
1362 inline map order_gt(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
1363 inline map order_le(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
1364 inline map order_lt(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
1365 inline set params() const;
1366 inline val plain_get_val_if_fixed(isl::dim type, unsigned int pos) const;
1367 inline boolean plain_is_empty() const;
1368 inline boolean plain_is_equal(const map &map2) const;
1369 inline boolean plain_is_injective() const;
1370 inline boolean plain_is_single_valued() const;
1371 inline boolean plain_is_universe() const;
1372 inline basic_map plain_unshifted_simple_hull() const;
1373 inline basic_map polyhedral_hull() const;
1374 inline map preimage_domain_multi_aff(multi_aff ma) const;
1375 inline map preimage_domain_multi_pw_aff(multi_pw_aff mpa) const;
1376 inline map preimage_domain_pw_multi_aff(pw_multi_aff pma) const;
1377 inline map preimage_range_multi_aff(multi_aff ma) const;
1378 inline map preimage_range_pw_multi_aff(pw_multi_aff pma) const;
1379 inline map product(map map2) const;
1380 inline map project_out(isl::dim type, unsigned int first, unsigned int n) const;
1381 inline set range() const;
1382 inline map range_curry() const;
1383 inline map range_factor_domain() const;
1384 inline map range_factor_range() const;
1385 inline boolean range_is_wrapping() const;
1386 inline map range_map() const;
1387 inline map range_product(map map2) const;
1388 inline map remove_dims(isl::dim type, unsigned int first, unsigned int n) const;
1389 inline map remove_divs() const;
1390 inline map remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
1391 inline map remove_redundancies() const;
1392 inline map remove_unknown_divs() const;
1393 inline map reset_tuple_id(isl::dim type) const;
1394 inline map reset_user() const;
1395 inline map reverse() const;
1396 inline basic_map sample() const;
1397 inline map set_dim_id(isl::dim type, unsigned int pos, id id) const;
1398 inline map set_tuple_id(isl::dim type, id id) const;
1399 inline map set_tuple_name(isl::dim type, const std::string &s) const;
1400 inline basic_map simple_hull() const;
1401 inline map subtract(map map2) const;
1402 inline map subtract_domain(set dom) const;
1403 inline map subtract_range(set dom) const;
1404 inline map sum(map map2) const;
1405 inline map uncurry() const;
1406 inline map unite(map map2) const;
1407 static inline map universe(space space);
1408 inline basic_map unshifted_simple_hull() const;
1409 inline basic_map unshifted_simple_hull_from_map_list(map_list list) const;
1410 inline map upper_bound_si(isl::dim type, unsigned int pos, int value) const;
1411 inline set wrap() const;
1412 inline map zip() const;
1413 };
1414
1415 // declarations for isl::map_list
1416 inline map_list manage(__isl_take isl_map_list *ptr);
1417 inline map_list manage_copy(__isl_keep isl_map_list *ptr);
1418
1419 class map_list {
1420 friend inline map_list manage(__isl_take isl_map_list *ptr);
1421 friend inline map_list manage_copy(__isl_keep isl_map_list *ptr);
1422
1423 isl_map_list *ptr = nullptr;
1424
1425 inline explicit map_list(__isl_take isl_map_list *ptr);
1426
1427 public:
1428 inline /* implicit */ map_list();
1429 inline /* implicit */ map_list(const map_list &obj);
1430 inline /* implicit */ map_list(std::nullptr_t);
1431 inline map_list &operator=(map_list obj);
1432 inline ~map_list();
1433 inline __isl_give isl_map_list *copy() const &;
1434 inline __isl_give isl_map_list *copy() && = delete;
1435 inline __isl_keep isl_map_list *get() const;
1436 inline __isl_give isl_map_list *release();
1437 inline bool is_null() const;
1438 inline explicit operator bool() const;
1439 inline ctx get_ctx() const;
1440 inline void dump() const;
1441
1442 inline map_list add(map el) const;
1443 static inline map_list alloc(ctx ctx, int n);
1444 inline map_list concat(map_list list2) const;
1445 inline map_list drop(unsigned int first, unsigned int n) const;
1446 inline stat foreach(const std::function<stat(map)> &fn) const;
1447 static inline map_list from_map(map el);
1448 inline map get_at(int index) const;
1449 inline map get_map(int index) const;
1450 inline map_list insert(unsigned int pos, map el) const;
1451 inline int n_map() const;
1452 inline map_list reverse() const;
1453 inline map_list set_map(int index, map el) const;
1454 inline int size() const;
1455 inline map_list swap(unsigned int pos1, unsigned int pos2) const;
1456 };
1457
1458 // declarations for isl::mat
1459 inline mat manage(__isl_take isl_mat *ptr);
1460 inline mat manage_copy(__isl_keep isl_mat *ptr);
1461
1462 class mat {
1463 friend inline mat manage(__isl_take isl_mat *ptr);
1464 friend inline mat manage_copy(__isl_keep isl_mat *ptr);
1465
1466 isl_mat *ptr = nullptr;
1467
1468 inline explicit mat(__isl_take isl_mat *ptr);
1469
1470 public:
1471 inline /* implicit */ mat();
1472 inline /* implicit */ mat(const mat &obj);
1473 inline /* implicit */ mat(std::nullptr_t);
1474 inline mat &operator=(mat obj);
1475 inline ~mat();
1476 inline __isl_give isl_mat *copy() const &;
1477 inline __isl_give isl_mat *copy() && = delete;
1478 inline __isl_keep isl_mat *get() const;
1479 inline __isl_give isl_mat *release();
1480 inline bool is_null() const;
1481 inline explicit operator bool() const;
1482 inline ctx get_ctx() const;
1483 inline void dump() const;
1484
1485 inline mat add_rows(unsigned int n) const;
1486 inline mat add_zero_cols(unsigned int n) const;
1487 inline mat add_zero_rows(unsigned int n) const;
1488 inline mat aff_direct_sum(mat right) const;
1489 static inline mat alloc(ctx ctx, unsigned int n_row, unsigned int n_col);
1490 inline int cols() const;
1491 inline mat concat(mat bot) const;
1492 inline mat diagonal(mat mat2) const;
1493 inline mat drop_cols(unsigned int col, unsigned int n) const;
1494 inline mat drop_rows(unsigned int row, unsigned int n) const;
1495 static inline mat from_row_vec(vec vec);
1496 inline val get_element_val(int row, int col) const;
1497 inline boolean has_linearly_independent_rows(const mat &mat2) const;
1498 inline int initial_non_zero_cols() const;
1499 inline mat insert_cols(unsigned int col, unsigned int n) const;
1500 inline mat insert_rows(unsigned int row, unsigned int n) const;
1501 inline mat insert_zero_cols(unsigned int first, unsigned int n) const;
1502 inline mat insert_zero_rows(unsigned int row, unsigned int n) const;
1503 inline mat inverse_product(mat right) const;
1504 inline boolean is_equal(const mat &mat2) const;
1505 inline mat lin_to_aff() const;
1506 inline mat move_cols(unsigned int dst_col, unsigned int src_col, unsigned int n) const;
1507 inline mat normalize() const;
1508 inline mat normalize_row(int row) const;
1509 inline mat product(mat right) const;
1510 inline int rank() const;
1511 inline mat right_inverse() const;
1512 inline mat right_kernel() const;
1513 inline mat row_basis() const;
1514 inline mat row_basis_extension(mat mat2) const;
1515 inline int rows() const;
1516 inline mat set_element_si(int row, int col, int v) const;
1517 inline mat set_element_val(int row, int col, val v) const;
1518 inline mat swap_cols(unsigned int i, unsigned int j) const;
1519 inline mat swap_rows(unsigned int i, unsigned int j) const;
1520 inline mat transpose() const;
1521 inline mat unimodular_complete(int row) const;
1522 inline mat vec_concat(vec bot) const;
1523 inline vec vec_inverse_product(vec vec) const;
1524 inline vec vec_product(vec vec) const;
1525 };
1526
1527 // declarations for isl::multi_aff
1528 inline multi_aff manage(__isl_take isl_multi_aff *ptr);
1529 inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
1530
1531 class multi_aff {
1532 friend inline multi_aff manage(__isl_take isl_multi_aff *ptr);
1533 friend inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr);
1534
1535 isl_multi_aff *ptr = nullptr;
1536
1537 inline explicit multi_aff(__isl_take isl_multi_aff *ptr);
1538
1539 public:
1540 inline /* implicit */ multi_aff();
1541 inline /* implicit */ multi_aff(const multi_aff &obj);
1542 inline /* implicit */ multi_aff(std::nullptr_t);
1543 inline /* implicit */ multi_aff(aff aff);
1544 inline explicit multi_aff(ctx ctx, const std::string &str);
1545 inline multi_aff &operator=(multi_aff obj);
1546 inline ~multi_aff();
1547 inline __isl_give isl_multi_aff *copy() const &;
1548 inline __isl_give isl_multi_aff *copy() && = delete;
1549 inline __isl_keep isl_multi_aff *get() const;
1550 inline __isl_give isl_multi_aff *release();
1551 inline bool is_null() const;
1552 inline explicit operator bool() const;
1553 inline ctx get_ctx() const;
1554 inline std::string to_str() const;
1555 inline void dump() const;
1556
1557 inline multi_aff add(multi_aff multi2) const;
1558 inline multi_aff add_dims(isl::dim type, unsigned int n) const;
1559 inline multi_aff align_params(space model) const;
1560 inline unsigned int dim(isl::dim type) const;
1561 static inline multi_aff domain_map(space space);
1562 inline multi_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
1563 inline multi_aff factor_range() const;
1564 inline int find_dim_by_id(isl::dim type, const id &id) const;
1565 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
1566 inline multi_aff flat_range_product(multi_aff multi2) const;
1567 inline multi_aff flatten_domain() const;
1568 inline multi_aff flatten_range() const;
1569 inline multi_aff floor() const;
1570 static inline multi_aff from_aff_list(space space, aff_list list);
1571 inline multi_aff from_range() const;
1572 inline aff get_aff(int pos) const;
1573 inline id get_dim_id(isl::dim type, unsigned int pos) const;
1574 inline space get_domain_space() const;
1575 inline space get_space() const;
1576 inline id get_tuple_id(isl::dim type) const;
1577 inline std::string get_tuple_name(isl::dim type) const;
1578 inline multi_aff gist(set context) const;
1579 inline multi_aff gist_params(set context) const;
1580 inline boolean has_tuple_id(isl::dim type) const;
1581 static inline multi_aff identity(space space);
1582 inline multi_aff insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
1583 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
1584 inline boolean involves_nan() const;
1585 inline set lex_ge_set(multi_aff ma2) const;
1586 inline set lex_gt_set(multi_aff ma2) const;
1587 inline set lex_le_set(multi_aff ma2) const;
1588 inline set lex_lt_set(multi_aff ma2) const;
1589 inline multi_aff mod_multi_val(multi_val mv) const;
1590 inline multi_aff move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
1591 static inline multi_aff multi_val_on_space(space space, multi_val mv);
1592 inline multi_aff neg() const;
1593 inline int plain_cmp(const multi_aff &multi2) const;
1594 inline boolean plain_is_equal(const multi_aff &multi2) const;
1595 inline multi_aff product(multi_aff multi2) const;
1596 inline multi_aff project_domain_on_params() const;
1597 static inline multi_aff project_out_map(space space, isl::dim type, unsigned int first, unsigned int n);
1598 inline multi_aff pullback(multi_aff ma2) const;
1599 inline multi_aff range_factor_domain() const;
1600 inline multi_aff range_factor_range() const;
1601 inline boolean range_is_wrapping() const;
1602 static inline multi_aff range_map(space space);
1603 inline multi_aff range_product(multi_aff multi2) const;
1604 inline multi_aff range_splice(unsigned int pos, multi_aff multi2) const;
1605 inline multi_aff reset_tuple_id(isl::dim type) const;
1606 inline multi_aff reset_user() const;
1607 inline multi_aff scale_down_multi_val(multi_val mv) const;
1608 inline multi_aff scale_down_val(val v) const;
1609 inline multi_aff scale_multi_val(multi_val mv) const;
1610 inline multi_aff scale_val(val v) const;
1611 inline multi_aff set_aff(int pos, aff el) const;
1612 inline multi_aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
1613 inline multi_aff set_tuple_id(isl::dim type, id id) const;
1614 inline multi_aff set_tuple_name(isl::dim type, const std::string &s) const;
1615 inline multi_aff splice(unsigned int in_pos, unsigned int out_pos, multi_aff multi2) const;
1616 inline multi_aff sub(multi_aff multi2) const;
1617 static inline multi_aff zero(space space);
1618 };
1619
1620 // declarations for isl::multi_pw_aff
1621 inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
1622 inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
1623
1624 class multi_pw_aff {
1625 friend inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr);
1626 friend inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr);
1627
1628 isl_multi_pw_aff *ptr = nullptr;
1629
1630 inline explicit multi_pw_aff(__isl_take isl_multi_pw_aff *ptr);
1631
1632 public:
1633 inline /* implicit */ multi_pw_aff();
1634 inline /* implicit */ multi_pw_aff(const multi_pw_aff &obj);
1635 inline /* implicit */ multi_pw_aff(std::nullptr_t);
1636 inline /* implicit */ multi_pw_aff(multi_aff ma);
1637 inline /* implicit */ multi_pw_aff(pw_aff pa);
1638 inline /* implicit */ multi_pw_aff(pw_multi_aff pma);
1639 inline explicit multi_pw_aff(ctx ctx, const std::string &str);
1640 inline multi_pw_aff &operator=(multi_pw_aff obj);
1641 inline ~multi_pw_aff();
1642 inline __isl_give isl_multi_pw_aff *copy() const &;
1643 inline __isl_give isl_multi_pw_aff *copy() && = delete;
1644 inline __isl_keep isl_multi_pw_aff *get() const;
1645 inline __isl_give isl_multi_pw_aff *release();
1646 inline bool is_null() const;
1647 inline explicit operator bool() const;
1648 inline ctx get_ctx() const;
1649 inline std::string to_str() const;
1650 inline void dump() const;
1651
1652 inline multi_pw_aff add(multi_pw_aff multi2) const;
1653 inline multi_pw_aff add_dims(isl::dim type, unsigned int n) const;
1654 inline multi_pw_aff align_params(space model) const;
1655 inline multi_pw_aff coalesce() const;
1656 inline unsigned int dim(isl::dim type) const;
1657 inline set domain() const;
1658 inline multi_pw_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
1659 inline map eq_map(multi_pw_aff mpa2) const;
1660 inline multi_pw_aff factor_range() const;
1661 inline int find_dim_by_id(isl::dim type, const id &id) const;
1662 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
1663 inline multi_pw_aff flat_range_product(multi_pw_aff multi2) const;
1664 inline multi_pw_aff flatten_range() const;
1665 static inline multi_pw_aff from_pw_aff_list(space space, pw_aff_list list);
1666 inline multi_pw_aff from_range() const;
1667 inline id get_dim_id(isl::dim type, unsigned int pos) const;
1668 inline space get_domain_space() const;
1669 inline uint32_t get_hash() const;
1670 inline pw_aff get_pw_aff(int pos) const;
1671 inline space get_space() const;
1672 inline id get_tuple_id(isl::dim type) const;
1673 inline std::string get_tuple_name(isl::dim type) const;
1674 inline multi_pw_aff gist(set set) const;
1675 inline multi_pw_aff gist_params(set set) const;
1676 inline boolean has_tuple_id(isl::dim type) const;
1677 static inline multi_pw_aff identity(space space);
1678 inline multi_pw_aff insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
1679 inline multi_pw_aff intersect_domain(set domain) const;
1680 inline multi_pw_aff intersect_params(set set) const;
1681 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
1682 inline boolean involves_nan() const;
1683 inline boolean is_cst() const;
1684 inline boolean is_equal(const multi_pw_aff &mpa2) const;
1685 inline map lex_gt_map(multi_pw_aff mpa2) const;
1686 inline map lex_lt_map(multi_pw_aff mpa2) const;
1687 inline multi_pw_aff mod_multi_val(multi_val mv) const;
1688 inline multi_pw_aff move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
1689 inline multi_pw_aff neg() const;
1690 inline boolean plain_is_equal(const multi_pw_aff &multi2) const;
1691 inline multi_pw_aff product(multi_pw_aff multi2) const;
1692 inline multi_pw_aff project_domain_on_params() const;
1693 inline multi_pw_aff pullback(multi_aff ma) const;
1694 inline multi_pw_aff pullback(pw_multi_aff pma) const;
1695 inline multi_pw_aff pullback(multi_pw_aff mpa2) const;
1696 inline multi_pw_aff range_factor_domain() const;
1697 inline multi_pw_aff range_factor_range() const;
1698 inline boolean range_is_wrapping() const;
1699 inline multi_pw_aff range_product(multi_pw_aff multi2) const;
1700 inline multi_pw_aff range_splice(unsigned int pos, multi_pw_aff multi2) const;
1701 inline multi_pw_aff reset_tuple_id(isl::dim type) const;
1702 inline multi_pw_aff reset_user() const;
1703 inline multi_pw_aff scale_down_multi_val(multi_val mv) const;
1704 inline multi_pw_aff scale_down_val(val v) const;
1705 inline multi_pw_aff scale_multi_val(multi_val mv) const;
1706 inline multi_pw_aff scale_val(val v) const;
1707 inline multi_pw_aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
1708 inline multi_pw_aff set_pw_aff(int pos, pw_aff el) const;
1709 inline multi_pw_aff set_tuple_id(isl::dim type, id id) const;
1710 inline multi_pw_aff set_tuple_name(isl::dim type, const std::string &s) const;
1711 inline multi_pw_aff splice(unsigned int in_pos, unsigned int out_pos, multi_pw_aff multi2) const;
1712 inline multi_pw_aff sub(multi_pw_aff multi2) const;
1713 static inline multi_pw_aff zero(space space);
1714 };
1715
1716 // declarations for isl::multi_union_pw_aff
1717 inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
1718 inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
1719
1720 class multi_union_pw_aff {
1721 friend inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr);
1722 friend inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr);
1723
1724 isl_multi_union_pw_aff *ptr = nullptr;
1725
1726 inline explicit multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr);
1727
1728 public:
1729 inline /* implicit */ multi_union_pw_aff();
1730 inline /* implicit */ multi_union_pw_aff(const multi_union_pw_aff &obj);
1731 inline /* implicit */ multi_union_pw_aff(std::nullptr_t);
1732 inline /* implicit */ multi_union_pw_aff(union_pw_aff upa);
1733 inline /* implicit */ multi_union_pw_aff(multi_pw_aff mpa);
1734 inline explicit multi_union_pw_aff(union_pw_multi_aff upma);
1735 inline explicit multi_union_pw_aff(ctx ctx, const std::string &str);
1736 inline multi_union_pw_aff &operator=(multi_union_pw_aff obj);
1737 inline ~multi_union_pw_aff();
1738 inline __isl_give isl_multi_union_pw_aff *copy() const &;
1739 inline __isl_give isl_multi_union_pw_aff *copy() && = delete;
1740 inline __isl_keep isl_multi_union_pw_aff *get() const;
1741 inline __isl_give isl_multi_union_pw_aff *release();
1742 inline bool is_null() const;
1743 inline explicit operator bool() const;
1744 inline ctx get_ctx() const;
1745 inline std::string to_str() const;
1746 inline void dump() const;
1747
1748 inline multi_union_pw_aff add(multi_union_pw_aff multi2) const;
1749 inline multi_union_pw_aff align_params(space model) const;
1750 inline union_pw_aff apply_aff(aff aff) const;
1751 inline union_pw_aff apply_pw_aff(pw_aff pa) const;
1752 inline multi_union_pw_aff apply_pw_multi_aff(pw_multi_aff pma) const;
1753 inline multi_union_pw_aff coalesce() const;
1754 inline unsigned int dim(isl::dim type) const;
1755 inline union_set domain() const;
1756 inline multi_union_pw_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
1757 inline multi_pw_aff extract_multi_pw_aff(space space) const;
1758 inline multi_union_pw_aff factor_range() const;
1759 inline int find_dim_by_id(isl::dim type, const id &id) const;
1760 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
1761 inline multi_union_pw_aff flat_range_product(multi_union_pw_aff multi2) const;
1762 inline multi_union_pw_aff flatten_range() const;
1763 inline multi_union_pw_aff floor() const;
1764 static inline multi_union_pw_aff from_multi_aff(multi_aff ma);
1765 inline multi_union_pw_aff from_range() const;
1766 static inline multi_union_pw_aff from_union_map(union_map umap);
1767 static inline multi_union_pw_aff from_union_pw_aff_list(space space, union_pw_aff_list list);
1768 inline id get_dim_id(isl::dim type, unsigned int pos) const;
1769 inline space get_domain_space() const;
1770 inline space get_space() const;
1771 inline id get_tuple_id(isl::dim type) const;
1772 inline std::string get_tuple_name(isl::dim type) const;
1773 inline union_pw_aff get_union_pw_aff(int pos) const;
1774 inline multi_union_pw_aff gist(union_set context) const;
1775 inline multi_union_pw_aff gist_params(set context) const;
1776 inline boolean has_tuple_id(isl::dim type) const;
1777 inline multi_union_pw_aff intersect_domain(union_set uset) const;
1778 inline multi_union_pw_aff intersect_params(set params) const;
1779 inline multi_union_pw_aff intersect_range(set set) const;
1780 inline boolean involves_nan() const;
1781 inline multi_val max_multi_val() const;
1782 inline multi_val min_multi_val() const;
1783 inline multi_union_pw_aff mod_multi_val(multi_val mv) const;
1784 static inline multi_union_pw_aff multi_aff_on_domain(union_set domain, multi_aff ma);
1785 static inline multi_union_pw_aff multi_val_on_domain(union_set domain, multi_val mv);
1786 inline multi_union_pw_aff neg() const;
1787 inline boolean plain_is_equal(const multi_union_pw_aff &multi2) const;
1788 inline multi_union_pw_aff pullback(union_pw_multi_aff upma) const;
1789 static inline multi_union_pw_aff pw_multi_aff_on_domain(union_set domain, pw_multi_aff pma);
1790 inline multi_union_pw_aff range_factor_domain() const;
1791 inline multi_union_pw_aff range_factor_range() const;
1792 inline boolean range_is_wrapping() const;
1793 inline multi_union_pw_aff range_product(multi_union_pw_aff multi2) const;
1794 inline multi_union_pw_aff range_splice(unsigned int pos, multi_union_pw_aff multi2) const;
1795 inline multi_union_pw_aff reset_tuple_id(isl::dim type) const;
1796 inline multi_union_pw_aff reset_user() const;
1797 inline multi_union_pw_aff scale_down_multi_val(multi_val mv) const;
1798 inline multi_union_pw_aff scale_down_val(val v) const;
1799 inline multi_union_pw_aff scale_multi_val(multi_val mv) const;
1800 inline multi_union_pw_aff scale_val(val v) const;
1801 inline multi_union_pw_aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
1802 inline multi_union_pw_aff set_tuple_id(isl::dim type, id id) const;
1803 inline multi_union_pw_aff set_tuple_name(isl::dim type, const std::string &s) const;
1804 inline multi_union_pw_aff set_union_pw_aff(int pos, union_pw_aff el) const;
1805 inline multi_union_pw_aff sub(multi_union_pw_aff multi2) const;
1806 inline multi_union_pw_aff union_add(multi_union_pw_aff mupa2) const;
1807 static inline multi_union_pw_aff zero(space space);
1808 inline union_set zero_union_set() const;
1809 };
1810
1811 // declarations for isl::multi_val
1812 inline multi_val manage(__isl_take isl_multi_val *ptr);
1813 inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
1814
1815 class multi_val {
1816 friend inline multi_val manage(__isl_take isl_multi_val *ptr);
1817 friend inline multi_val manage_copy(__isl_keep isl_multi_val *ptr);
1818
1819 isl_multi_val *ptr = nullptr;
1820
1821 inline explicit multi_val(__isl_take isl_multi_val *ptr);
1822
1823 public:
1824 inline /* implicit */ multi_val();
1825 inline /* implicit */ multi_val(const multi_val &obj);
1826 inline /* implicit */ multi_val(std::nullptr_t);
1827 inline multi_val &operator=(multi_val obj);
1828 inline ~multi_val();
1829 inline __isl_give isl_multi_val *copy() const &;
1830 inline __isl_give isl_multi_val *copy() && = delete;
1831 inline __isl_keep isl_multi_val *get() const;
1832 inline __isl_give isl_multi_val *release();
1833 inline bool is_null() const;
1834 inline explicit operator bool() const;
1835 inline ctx get_ctx() const;
1836 inline std::string to_str() const;
1837 inline void dump() const;
1838
1839 inline multi_val add(multi_val multi2) const;
1840 inline multi_val add_dims(isl::dim type, unsigned int n) const;
1841 inline multi_val add_val(val v) const;
1842 inline multi_val align_params(space model) const;
1843 inline unsigned int dim(isl::dim type) const;
1844 inline multi_val drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
1845 inline multi_val factor_range() const;
1846 inline int find_dim_by_id(isl::dim type, const id &id) const;
1847 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
1848 inline multi_val flat_range_product(multi_val multi2) const;
1849 inline multi_val flatten_range() const;
1850 inline multi_val from_range() const;
1851 static inline multi_val from_val_list(space space, val_list list);
1852 inline id get_dim_id(isl::dim type, unsigned int pos) const;
1853 inline space get_domain_space() const;
1854 inline space get_space() const;
1855 inline id get_tuple_id(isl::dim type) const;
1856 inline std::string get_tuple_name(isl::dim type) const;
1857 inline val get_val(int pos) const;
1858 inline boolean has_tuple_id(isl::dim type) const;
1859 inline multi_val insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
1860 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
1861 inline boolean involves_nan() const;
1862 inline multi_val mod_multi_val(multi_val mv) const;
1863 inline multi_val mod_val(val v) const;
1864 inline multi_val neg() const;
1865 inline boolean plain_is_equal(const multi_val &multi2) const;
1866 inline multi_val product(multi_val multi2) const;
1867 inline multi_val project_domain_on_params() const;
1868 inline multi_val range_factor_domain() const;
1869 inline multi_val range_factor_range() const;
1870 inline boolean range_is_wrapping() const;
1871 inline multi_val range_product(multi_val multi2) const;
1872 inline multi_val range_splice(unsigned int pos, multi_val multi2) const;
1873 static inline multi_val read_from_str(ctx ctx, const std::string &str);
1874 inline multi_val reset_tuple_id(isl::dim type) const;
1875 inline multi_val reset_user() const;
1876 inline multi_val scale_down_multi_val(multi_val mv) const;
1877 inline multi_val scale_down_val(val v) const;
1878 inline multi_val scale_multi_val(multi_val mv) const;
1879 inline multi_val scale_val(val v) const;
1880 inline multi_val set_dim_id(isl::dim type, unsigned int pos, id id) const;
1881 inline multi_val set_tuple_id(isl::dim type, id id) const;
1882 inline multi_val set_tuple_name(isl::dim type, const std::string &s) const;
1883 inline multi_val set_val(int pos, val el) const;
1884 inline multi_val splice(unsigned int in_pos, unsigned int out_pos, multi_val multi2) const;
1885 inline multi_val sub(multi_val multi2) const;
1886 static inline multi_val zero(space space);
1887 };
1888
1889 // declarations for isl::point
1890 inline point manage(__isl_take isl_point *ptr);
1891 inline point manage_copy(__isl_keep isl_point *ptr);
1892
1893 class point {
1894 friend inline point manage(__isl_take isl_point *ptr);
1895 friend inline point manage_copy(__isl_keep isl_point *ptr);
1896
1897 isl_point *ptr = nullptr;
1898
1899 inline explicit point(__isl_take isl_point *ptr);
1900
1901 public:
1902 inline /* implicit */ point();
1903 inline /* implicit */ point(const point &obj);
1904 inline /* implicit */ point(std::nullptr_t);
1905 inline explicit point(space dim);
1906 inline point &operator=(point obj);
1907 inline ~point();
1908 inline __isl_give isl_point *copy() const &;
1909 inline __isl_give isl_point *copy() && = delete;
1910 inline __isl_keep isl_point *get() const;
1911 inline __isl_give isl_point *release();
1912 inline bool is_null() const;
1913 inline explicit operator bool() const;
1914 inline ctx get_ctx() const;
1915 inline std::string to_str() const;
1916 inline void dump() const;
1917
1918 inline point add_ui(isl::dim type, int pos, unsigned int val) const;
1919 inline val get_coordinate_val(isl::dim type, int pos) const;
1920 inline space get_space() const;
1921 inline point set_coordinate_val(isl::dim type, int pos, val v) const;
1922 inline point sub_ui(isl::dim type, int pos, unsigned int val) const;
1923 };
1924
1925 // declarations for isl::pw_aff
1926 inline pw_aff manage(__isl_take isl_pw_aff *ptr);
1927 inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
1928
1929 class pw_aff {
1930 friend inline pw_aff manage(__isl_take isl_pw_aff *ptr);
1931 friend inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr);
1932
1933 isl_pw_aff *ptr = nullptr;
1934
1935 inline explicit pw_aff(__isl_take isl_pw_aff *ptr);
1936
1937 public:
1938 inline /* implicit */ pw_aff();
1939 inline /* implicit */ pw_aff(const pw_aff &obj);
1940 inline /* implicit */ pw_aff(std::nullptr_t);
1941 inline /* implicit */ pw_aff(aff aff);
1942 inline explicit pw_aff(local_space ls);
1943 inline explicit pw_aff(set domain, val v);
1944 inline explicit pw_aff(ctx ctx, const std::string &str);
1945 inline pw_aff &operator=(pw_aff obj);
1946 inline ~pw_aff();
1947 inline __isl_give isl_pw_aff *copy() const &;
1948 inline __isl_give isl_pw_aff *copy() && = delete;
1949 inline __isl_keep isl_pw_aff *get() const;
1950 inline __isl_give isl_pw_aff *release();
1951 inline bool is_null() const;
1952 inline explicit operator bool() const;
1953 inline ctx get_ctx() const;
1954 inline std::string to_str() const;
1955 inline void dump() const;
1956
1957 inline pw_aff add(pw_aff pwaff2) const;
1958 inline pw_aff add_dims(isl::dim type, unsigned int n) const;
1959 inline pw_aff align_params(space model) const;
1960 static inline pw_aff alloc(set set, aff aff);
1961 inline pw_aff ceil() const;
1962 inline pw_aff coalesce() const;
1963 inline pw_aff cond(pw_aff pwaff_true, pw_aff pwaff_false) const;
1964 inline unsigned int dim(isl::dim type) const;
1965 inline pw_aff div(pw_aff pa2) const;
1966 inline set domain() const;
1967 inline pw_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
1968 inline pw_aff drop_unused_params() const;
1969 static inline pw_aff empty(space dim);
1970 inline map eq_map(pw_aff pa2) const;
1971 inline set eq_set(pw_aff pwaff2) const;
1972 inline val eval(point pnt) const;
1973 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
1974 inline pw_aff floor() const;
1975 inline stat foreach_piece(const std::function<stat(set, aff)> &fn) const;
1976 inline pw_aff from_range() const;
1977 inline set ge_set(pw_aff pwaff2) const;
1978 inline id get_dim_id(isl::dim type, unsigned int pos) const;
1979 inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
1980 inline space get_domain_space() const;
1981 inline uint32_t get_hash() const;
1982 inline space get_space() const;
1983 inline id get_tuple_id(isl::dim type) const;
1984 inline pw_aff gist(set context) const;
1985 inline pw_aff gist_params(set context) const;
1986 inline map gt_map(pw_aff pa2) const;
1987 inline set gt_set(pw_aff pwaff2) const;
1988 inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
1989 inline boolean has_tuple_id(isl::dim type) const;
1990 inline pw_aff insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
1991 inline pw_aff intersect_domain(set set) const;
1992 inline pw_aff intersect_params(set set) const;
1993 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
1994 inline boolean involves_nan() const;
1995 inline boolean is_cst() const;
1996 inline boolean is_empty() const;
1997 inline boolean is_equal(const pw_aff &pa2) const;
1998 inline set le_set(pw_aff pwaff2) const;
1999 inline map lt_map(pw_aff pa2) const;
2000 inline set lt_set(pw_aff pwaff2) const;
2001 inline pw_aff max(pw_aff pwaff2) const;
2002 inline pw_aff min(pw_aff pwaff2) const;
2003 inline pw_aff mod(val mod) const;
2004 inline pw_aff move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
2005 inline pw_aff mul(pw_aff pwaff2) const;
2006 inline int n_piece() const;
2007 static inline pw_aff nan_on_domain(local_space ls);
2008 inline set ne_set(pw_aff pwaff2) const;
2009 inline pw_aff neg() const;
2010 inline set non_zero_set() const;
2011 inline set nonneg_set() const;
2012 inline set params() const;
2013 inline int plain_cmp(const pw_aff &pa2) const;
2014 inline boolean plain_is_equal(const pw_aff &pwaff2) const;
2015 inline set pos_set() const;
2016 inline pw_aff project_domain_on_params() const;
2017 inline pw_aff pullback(multi_aff ma) const;
2018 inline pw_aff pullback(pw_multi_aff pma) const;
2019 inline pw_aff pullback(multi_pw_aff mpa) const;
2020 inline pw_aff reset_tuple_id(isl::dim type) const;
2021 inline pw_aff reset_user() const;
2022 inline pw_aff scale(val v) const;
2023 inline pw_aff scale_down(val f) const;
2024 inline pw_aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
2025 inline pw_aff set_tuple_id(isl::dim type, id id) const;
2026 inline pw_aff sub(pw_aff pwaff2) const;
2027 inline pw_aff subtract_domain(set set) const;
2028 inline pw_aff tdiv_q(pw_aff pa2) const;
2029 inline pw_aff tdiv_r(pw_aff pa2) const;
2030 inline pw_aff union_add(pw_aff pwaff2) const;
2031 inline pw_aff union_max(pw_aff pwaff2) const;
2032 inline pw_aff union_min(pw_aff pwaff2) const;
2033 static inline pw_aff var_on_domain(local_space ls, isl::dim type, unsigned int pos);
2034 inline set zero_set() const;
2035 };
2036
2037 // declarations for isl::pw_aff_list
2038 inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
2039 inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
2040
2041 class pw_aff_list {
2042 friend inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr);
2043 friend inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr);
2044
2045 isl_pw_aff_list *ptr = nullptr;
2046
2047 inline explicit pw_aff_list(__isl_take isl_pw_aff_list *ptr);
2048
2049 public:
2050 inline /* implicit */ pw_aff_list();
2051 inline /* implicit */ pw_aff_list(const pw_aff_list &obj);
2052 inline /* implicit */ pw_aff_list(std::nullptr_t);
2053 inline pw_aff_list &operator=(pw_aff_list obj);
2054 inline ~pw_aff_list();
2055 inline __isl_give isl_pw_aff_list *copy() const &;
2056 inline __isl_give isl_pw_aff_list *copy() && = delete;
2057 inline __isl_keep isl_pw_aff_list *get() const;
2058 inline __isl_give isl_pw_aff_list *release();
2059 inline bool is_null() const;
2060 inline explicit operator bool() const;
2061 inline ctx get_ctx() const;
2062 inline void dump() const;
2063
2064 inline pw_aff_list add(pw_aff el) const;
2065 static inline pw_aff_list alloc(ctx ctx, int n);
2066 inline pw_aff_list concat(pw_aff_list list2) const;
2067 inline pw_aff_list drop(unsigned int first, unsigned int n) const;
2068 inline set eq_set(pw_aff_list list2) const;
2069 inline stat foreach(const std::function<stat(pw_aff)> &fn) const;
2070 static inline pw_aff_list from_pw_aff(pw_aff el);
2071 inline set ge_set(pw_aff_list list2) const;
2072 inline pw_aff get_at(int index) const;
2073 inline pw_aff get_pw_aff(int index) const;
2074 inline set gt_set(pw_aff_list list2) const;
2075 inline pw_aff_list insert(unsigned int pos, pw_aff el) const;
2076 inline set le_set(pw_aff_list list2) const;
2077 inline set lt_set(pw_aff_list list2) const;
2078 inline pw_aff max() const;
2079 inline pw_aff min() const;
2080 inline int n_pw_aff() const;
2081 inline set ne_set(pw_aff_list list2) const;
2082 inline pw_aff_list reverse() const;
2083 inline pw_aff_list set_pw_aff(int index, pw_aff el) const;
2084 inline int size() const;
2085 inline pw_aff_list swap(unsigned int pos1, unsigned int pos2) const;
2086 };
2087
2088 // declarations for isl::pw_multi_aff
2089 inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
2090 inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
2091
2092 class pw_multi_aff {
2093 friend inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr);
2094 friend inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr);
2095
2096 isl_pw_multi_aff *ptr = nullptr;
2097
2098 inline explicit pw_multi_aff(__isl_take isl_pw_multi_aff *ptr);
2099
2100 public:
2101 inline /* implicit */ pw_multi_aff();
2102 inline /* implicit */ pw_multi_aff(const pw_multi_aff &obj);
2103 inline /* implicit */ pw_multi_aff(std::nullptr_t);
2104 inline /* implicit */ pw_multi_aff(multi_aff ma);
2105 inline /* implicit */ pw_multi_aff(pw_aff pa);
2106 inline explicit pw_multi_aff(ctx ctx, const std::string &str);
2107 inline pw_multi_aff &operator=(pw_multi_aff obj);
2108 inline ~pw_multi_aff();
2109 inline __isl_give isl_pw_multi_aff *copy() const &;
2110 inline __isl_give isl_pw_multi_aff *copy() && = delete;
2111 inline __isl_keep isl_pw_multi_aff *get() const;
2112 inline __isl_give isl_pw_multi_aff *release();
2113 inline bool is_null() const;
2114 inline explicit operator bool() const;
2115 inline ctx get_ctx() const;
2116 inline std::string to_str() const;
2117 inline void dump() const;
2118
2119 inline pw_multi_aff add(pw_multi_aff pma2) const;
2120 inline pw_multi_aff align_params(space model) const;
2121 static inline pw_multi_aff alloc(set set, multi_aff maff);
2122 inline pw_multi_aff coalesce() const;
2123 inline unsigned int dim(isl::dim type) const;
2124 inline set domain() const;
2125 inline pw_multi_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
2126 inline pw_multi_aff drop_unused_params() const;
2127 static inline pw_multi_aff empty(space space);
2128 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
2129 inline pw_multi_aff fix_si(isl::dim type, unsigned int pos, int value) const;
2130 inline pw_multi_aff flat_range_product(pw_multi_aff pma2) const;
2131 inline stat foreach_piece(const std::function<stat(set, multi_aff)> &fn) const;
2132 static inline pw_multi_aff from_domain(set set);
2133 static inline pw_multi_aff from_map(map map);
2134 static inline pw_multi_aff from_multi_pw_aff(multi_pw_aff mpa);
2135 static inline pw_multi_aff from_set(set set);
2136 inline id get_dim_id(isl::dim type, unsigned int pos) const;
2137 inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
2138 inline space get_domain_space() const;
2139 inline pw_aff get_pw_aff(int pos) const;
2140 inline space get_space() const;
2141 inline id get_tuple_id(isl::dim type) const;
2142 inline std::string get_tuple_name(isl::dim type) const;
2143 inline pw_multi_aff gist(set set) const;
2144 inline pw_multi_aff gist_params(set set) const;
2145 inline boolean has_tuple_id(isl::dim type) const;
2146 inline boolean has_tuple_name(isl::dim type) const;
2147 static inline pw_multi_aff identity(space space);
2148 inline pw_multi_aff intersect_domain(set set) const;
2149 inline pw_multi_aff intersect_params(set set) const;
2150 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
2151 inline boolean involves_nan() const;
2152 inline boolean is_equal(const pw_multi_aff &pma2) const;
2153 static inline pw_multi_aff multi_val_on_domain(set domain, multi_val mv);
2154 inline int n_piece() const;
2155 inline pw_multi_aff neg() const;
2156 inline boolean plain_is_equal(const pw_multi_aff &pma2) const;
2157 inline pw_multi_aff product(pw_multi_aff pma2) const;
2158 inline pw_multi_aff project_domain_on_params() const;
2159 static inline pw_multi_aff project_out_map(space space, isl::dim type, unsigned int first, unsigned int n);
2160 inline pw_multi_aff pullback(multi_aff ma) const;
2161 inline pw_multi_aff pullback(pw_multi_aff pma2) const;
2162 static inline pw_multi_aff range_map(space space);
2163 inline pw_multi_aff range_product(pw_multi_aff pma2) const;
2164 inline pw_multi_aff reset_tuple_id(isl::dim type) const;
2165 inline pw_multi_aff reset_user() const;
2166 inline pw_multi_aff scale_down_val(val v) const;
2167 inline pw_multi_aff scale_multi_val(multi_val mv) const;
2168 inline pw_multi_aff scale_val(val v) const;
2169 inline pw_multi_aff set_dim_id(isl::dim type, unsigned int pos, id id) const;
2170 inline pw_multi_aff set_pw_aff(unsigned int pos, pw_aff pa) const;
2171 inline pw_multi_aff set_tuple_id(isl::dim type, id id) const;
2172 inline pw_multi_aff sub(pw_multi_aff pma2) const;
2173 inline pw_multi_aff subtract_domain(set set) const;
2174 inline pw_multi_aff union_add(pw_multi_aff pma2) const;
2175 inline pw_multi_aff union_lexmax(pw_multi_aff pma2) const;
2176 inline pw_multi_aff union_lexmin(pw_multi_aff pma2) const;
2177 static inline pw_multi_aff zero(space space);
2178 };
2179
2180 // declarations for isl::pw_multi_aff_list
2181 inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
2182 inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
2183
2184 class pw_multi_aff_list {
2185 friend inline pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr);
2186 friend inline pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr);
2187
2188 isl_pw_multi_aff_list *ptr = nullptr;
2189
2190 inline explicit pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr);
2191
2192 public:
2193 inline /* implicit */ pw_multi_aff_list();
2194 inline /* implicit */ pw_multi_aff_list(const pw_multi_aff_list &obj);
2195 inline /* implicit */ pw_multi_aff_list(std::nullptr_t);
2196 inline pw_multi_aff_list &operator=(pw_multi_aff_list obj);
2197 inline ~pw_multi_aff_list();
2198 inline __isl_give isl_pw_multi_aff_list *copy() const &;
2199 inline __isl_give isl_pw_multi_aff_list *copy() && = delete;
2200 inline __isl_keep isl_pw_multi_aff_list *get() const;
2201 inline __isl_give isl_pw_multi_aff_list *release();
2202 inline bool is_null() const;
2203 inline explicit operator bool() const;
2204 inline ctx get_ctx() const;
2205 inline void dump() const;
2206
2207 inline pw_multi_aff_list add(pw_multi_aff el) const;
2208 static inline pw_multi_aff_list alloc(ctx ctx, int n);
2209 inline pw_multi_aff_list concat(pw_multi_aff_list list2) const;
2210 inline pw_multi_aff_list drop(unsigned int first, unsigned int n) const;
2211 inline stat foreach(const std::function<stat(pw_multi_aff)> &fn) const;
2212 static inline pw_multi_aff_list from_pw_multi_aff(pw_multi_aff el);
2213 inline pw_multi_aff get_at(int index) const;
2214 inline pw_multi_aff get_pw_multi_aff(int index) const;
2215 inline pw_multi_aff_list insert(unsigned int pos, pw_multi_aff el) const;
2216 inline int n_pw_multi_aff() const;
2217 inline pw_multi_aff_list reverse() const;
2218 inline pw_multi_aff_list set_pw_multi_aff(int index, pw_multi_aff el) const;
2219 inline int size() const;
2220 inline pw_multi_aff_list swap(unsigned int pos1, unsigned int pos2) const;
2221 };
2222
2223 // declarations for isl::pw_qpolynomial
2224 inline pw_qpolynomial manage(__isl_take isl_pw_qpolynomial *ptr);
2225 inline pw_qpolynomial manage_copy(__isl_keep isl_pw_qpolynomial *ptr);
2226
2227 class pw_qpolynomial {
2228 friend inline pw_qpolynomial manage(__isl_take isl_pw_qpolynomial *ptr);
2229 friend inline pw_qpolynomial manage_copy(__isl_keep isl_pw_qpolynomial *ptr);
2230
2231 isl_pw_qpolynomial *ptr = nullptr;
2232
2233 inline explicit pw_qpolynomial(__isl_take isl_pw_qpolynomial *ptr);
2234
2235 public:
2236 inline /* implicit */ pw_qpolynomial();
2237 inline /* implicit */ pw_qpolynomial(const pw_qpolynomial &obj);
2238 inline /* implicit */ pw_qpolynomial(std::nullptr_t);
2239 inline explicit pw_qpolynomial(ctx ctx, const std::string &str);
2240 inline pw_qpolynomial &operator=(pw_qpolynomial obj);
2241 inline ~pw_qpolynomial();
2242 inline __isl_give isl_pw_qpolynomial *copy() const &;
2243 inline __isl_give isl_pw_qpolynomial *copy() && = delete;
2244 inline __isl_keep isl_pw_qpolynomial *get() const;
2245 inline __isl_give isl_pw_qpolynomial *release();
2246 inline bool is_null() const;
2247 inline explicit operator bool() const;
2248 inline ctx get_ctx() const;
2249 inline std::string to_str() const;
2250 inline void dump() const;
2251
2252 inline pw_qpolynomial add(pw_qpolynomial pwqp2) const;
2253 inline pw_qpolynomial add_dims(isl::dim type, unsigned int n) const;
2254 static inline pw_qpolynomial alloc(set set, qpolynomial qp);
2255 inline pw_qpolynomial coalesce() const;
2256 inline unsigned int dim(isl::dim type) const;
2257 inline set domain() const;
2258 inline pw_qpolynomial drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
2259 inline pw_qpolynomial drop_unused_params() const;
2260 inline val eval(point pnt) const;
2261 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
2262 inline pw_qpolynomial fix_val(isl::dim type, unsigned int n, val v) const;
2263 inline stat foreach_piece(const std::function<stat(set, qpolynomial)> &fn) const;
2264 static inline pw_qpolynomial from_pw_aff(pw_aff pwaff);
2265 static inline pw_qpolynomial from_qpolynomial(qpolynomial qp);
2266 inline pw_qpolynomial from_range() const;
2267 inline space get_domain_space() const;
2268 inline space get_space() const;
2269 inline pw_qpolynomial gist(set context) const;
2270 inline pw_qpolynomial gist_params(set context) const;
2271 inline boolean has_equal_space(const pw_qpolynomial &pwqp2) const;
2272 inline pw_qpolynomial insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
2273 inline pw_qpolynomial intersect_domain(set set) const;
2274 inline pw_qpolynomial intersect_params(set set) const;
2275 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
2276 inline boolean involves_nan() const;
2277 inline boolean is_zero() const;
2278 inline val max() const;
2279 inline val min() const;
2280 inline pw_qpolynomial move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
2281 inline pw_qpolynomial mul(pw_qpolynomial pwqp2) const;
2282 inline int n_piece() const;
2283 inline pw_qpolynomial neg() const;
2284 inline boolean plain_is_equal(const pw_qpolynomial &pwqp2) const;
2285 inline pw_qpolynomial pow(unsigned int exponent) const;
2286 inline pw_qpolynomial project_domain_on_params() const;
2287 inline pw_qpolynomial reset_domain_space(space dim) const;
2288 inline pw_qpolynomial reset_user() const;
2289 inline pw_qpolynomial scale_down_val(val v) const;
2290 inline pw_qpolynomial scale_val(val v) const;
2291 inline pw_qpolynomial split_dims(isl::dim type, unsigned int first, unsigned int n) const;
2292 inline pw_qpolynomial split_periods(int max_periods) const;
2293 inline pw_qpolynomial sub(pw_qpolynomial pwqp2) const;
2294 inline pw_qpolynomial subtract_domain(set set) const;
2295 inline pw_qpolynomial to_polynomial(int sign) const;
2296 static inline pw_qpolynomial zero(space dim);
2297 };
2298
2299 // declarations for isl::pw_qpolynomial_fold_list
2300 inline pw_qpolynomial_fold_list manage(__isl_take isl_pw_qpolynomial_fold_list *ptr);
2301 inline pw_qpolynomial_fold_list manage_copy(__isl_keep isl_pw_qpolynomial_fold_list *ptr);
2302
2303 class pw_qpolynomial_fold_list {
2304 friend inline pw_qpolynomial_fold_list manage(__isl_take isl_pw_qpolynomial_fold_list *ptr);
2305 friend inline pw_qpolynomial_fold_list manage_copy(__isl_keep isl_pw_qpolynomial_fold_list *ptr);
2306
2307 isl_pw_qpolynomial_fold_list *ptr = nullptr;
2308
2309 inline explicit pw_qpolynomial_fold_list(__isl_take isl_pw_qpolynomial_fold_list *ptr);
2310
2311 public:
2312 inline /* implicit */ pw_qpolynomial_fold_list();
2313 inline /* implicit */ pw_qpolynomial_fold_list(const pw_qpolynomial_fold_list &obj);
2314 inline /* implicit */ pw_qpolynomial_fold_list(std::nullptr_t);
2315 inline pw_qpolynomial_fold_list &operator=(pw_qpolynomial_fold_list obj);
2316 inline ~pw_qpolynomial_fold_list();
2317 inline __isl_give isl_pw_qpolynomial_fold_list *copy() const &;
2318 inline __isl_give isl_pw_qpolynomial_fold_list *copy() && = delete;
2319 inline __isl_keep isl_pw_qpolynomial_fold_list *get() const;
2320 inline __isl_give isl_pw_qpolynomial_fold_list *release();
2321 inline bool is_null() const;
2322 inline explicit operator bool() const;
2323 inline ctx get_ctx() const;
2324 inline void dump() const;
2325
2326 };
2327
2328 // declarations for isl::pw_qpolynomial_list
2329 inline pw_qpolynomial_list manage(__isl_take isl_pw_qpolynomial_list *ptr);
2330 inline pw_qpolynomial_list manage_copy(__isl_keep isl_pw_qpolynomial_list *ptr);
2331
2332 class pw_qpolynomial_list {
2333 friend inline pw_qpolynomial_list manage(__isl_take isl_pw_qpolynomial_list *ptr);
2334 friend inline pw_qpolynomial_list manage_copy(__isl_keep isl_pw_qpolynomial_list *ptr);
2335
2336 isl_pw_qpolynomial_list *ptr = nullptr;
2337
2338 inline explicit pw_qpolynomial_list(__isl_take isl_pw_qpolynomial_list *ptr);
2339
2340 public:
2341 inline /* implicit */ pw_qpolynomial_list();
2342 inline /* implicit */ pw_qpolynomial_list(const pw_qpolynomial_list &obj);
2343 inline /* implicit */ pw_qpolynomial_list(std::nullptr_t);
2344 inline pw_qpolynomial_list &operator=(pw_qpolynomial_list obj);
2345 inline ~pw_qpolynomial_list();
2346 inline __isl_give isl_pw_qpolynomial_list *copy() const &;
2347 inline __isl_give isl_pw_qpolynomial_list *copy() && = delete;
2348 inline __isl_keep isl_pw_qpolynomial_list *get() const;
2349 inline __isl_give isl_pw_qpolynomial_list *release();
2350 inline bool is_null() const;
2351 inline explicit operator bool() const;
2352 inline ctx get_ctx() const;
2353 inline void dump() const;
2354
2355 inline pw_qpolynomial_list add(pw_qpolynomial el) const;
2356 static inline pw_qpolynomial_list alloc(ctx ctx, int n);
2357 inline pw_qpolynomial_list concat(pw_qpolynomial_list list2) const;
2358 inline pw_qpolynomial_list drop(unsigned int first, unsigned int n) const;
2359 inline stat foreach(const std::function<stat(pw_qpolynomial)> &fn) const;
2360 static inline pw_qpolynomial_list from_pw_qpolynomial(pw_qpolynomial el);
2361 inline pw_qpolynomial get_at(int index) const;
2362 inline pw_qpolynomial get_pw_qpolynomial(int index) const;
2363 inline pw_qpolynomial_list insert(unsigned int pos, pw_qpolynomial el) const;
2364 inline int n_pw_qpolynomial() const;
2365 inline pw_qpolynomial_list reverse() const;
2366 inline pw_qpolynomial_list set_pw_qpolynomial(int index, pw_qpolynomial el) const;
2367 inline int size() const;
2368 inline pw_qpolynomial_list swap(unsigned int pos1, unsigned int pos2) const;
2369 };
2370
2371 // declarations for isl::qpolynomial
2372 inline qpolynomial manage(__isl_take isl_qpolynomial *ptr);
2373 inline qpolynomial manage_copy(__isl_keep isl_qpolynomial *ptr);
2374
2375 class qpolynomial {
2376 friend inline qpolynomial manage(__isl_take isl_qpolynomial *ptr);
2377 friend inline qpolynomial manage_copy(__isl_keep isl_qpolynomial *ptr);
2378
2379 isl_qpolynomial *ptr = nullptr;
2380
2381 inline explicit qpolynomial(__isl_take isl_qpolynomial *ptr);
2382
2383 public:
2384 inline /* implicit */ qpolynomial();
2385 inline /* implicit */ qpolynomial(const qpolynomial &obj);
2386 inline /* implicit */ qpolynomial(std::nullptr_t);
2387 inline qpolynomial &operator=(qpolynomial obj);
2388 inline ~qpolynomial();
2389 inline __isl_give isl_qpolynomial *copy() const &;
2390 inline __isl_give isl_qpolynomial *copy() && = delete;
2391 inline __isl_keep isl_qpolynomial *get() const;
2392 inline __isl_give isl_qpolynomial *release();
2393 inline bool is_null() const;
2394 inline explicit operator bool() const;
2395 inline ctx get_ctx() const;
2396 inline void dump() const;
2397
2398 inline qpolynomial add(qpolynomial qp2) const;
2399 inline qpolynomial add_dims(isl::dim type, unsigned int n) const;
2400 inline qpolynomial align_params(space model) const;
2401 inline stat as_polynomial_on_domain(const basic_set &bset, const std::function<stat(basic_set, qpolynomial)> &fn) const;
2402 inline unsigned int dim(isl::dim type) const;
2403 inline qpolynomial drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
2404 inline val eval(point pnt) const;
2405 inline stat foreach_term(const std::function<stat(term)> &fn) const;
2406 static inline qpolynomial from_aff(aff aff);
2407 static inline qpolynomial from_constraint(constraint c, isl::dim type, unsigned int pos);
2408 static inline qpolynomial from_term(term term);
2409 inline val get_constant_val() const;
2410 inline space get_domain_space() const;
2411 inline space get_space() const;
2412 inline qpolynomial gist(set context) const;
2413 inline qpolynomial gist_params(set context) const;
2414 inline qpolynomial homogenize() const;
2415 static inline qpolynomial infty_on_domain(space dim);
2416 inline qpolynomial insert_dims(isl::dim type, unsigned int first, unsigned int n) const;
2417 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
2418 inline boolean is_infty() const;
2419 inline boolean is_nan() const;
2420 inline boolean is_neginfty() const;
2421 inline boolean is_zero() const;
2422 inline qpolynomial move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
2423 inline qpolynomial mul(qpolynomial qp2) const;
2424 static inline qpolynomial nan_on_domain(space dim);
2425 inline qpolynomial neg() const;
2426 static inline qpolynomial neginfty_on_domain(space dim);
2427 static inline qpolynomial one_on_domain(space dim);
2428 inline boolean plain_is_equal(const qpolynomial &qp2) const;
2429 inline qpolynomial pow(unsigned int power) const;
2430 inline qpolynomial project_domain_on_params() const;
2431 inline qpolynomial scale_down_val(val v) const;
2432 inline qpolynomial scale_val(val v) const;
2433 inline int sgn() const;
2434 inline qpolynomial sub(qpolynomial qp2) const;
2435 static inline qpolynomial val_on_domain(space space, val val);
2436 static inline qpolynomial var_on_domain(space dim, isl::dim type, unsigned int pos);
2437 static inline qpolynomial zero_on_domain(space dim);
2438 };
2439
2440 // declarations for isl::schedule
2441 inline schedule manage(__isl_take isl_schedule *ptr);
2442 inline schedule manage_copy(__isl_keep isl_schedule *ptr);
2443
2444 class schedule {
2445 friend inline schedule manage(__isl_take isl_schedule *ptr);
2446 friend inline schedule manage_copy(__isl_keep isl_schedule *ptr);
2447
2448 isl_schedule *ptr = nullptr;
2449
2450 inline explicit schedule(__isl_take isl_schedule *ptr);
2451
2452 public:
2453 inline /* implicit */ schedule();
2454 inline /* implicit */ schedule(const schedule &obj);
2455 inline /* implicit */ schedule(std::nullptr_t);
2456 inline explicit schedule(ctx ctx, const std::string &str);
2457 inline schedule &operator=(schedule obj);
2458 inline ~schedule();
2459 inline __isl_give isl_schedule *copy() const &;
2460 inline __isl_give isl_schedule *copy() && = delete;
2461 inline __isl_keep isl_schedule *get() const;
2462 inline __isl_give isl_schedule *release();
2463 inline bool is_null() const;
2464 inline explicit operator bool() const;
2465 inline ctx get_ctx() const;
2466 inline std::string to_str() const;
2467 inline void dump() const;
2468
2469 inline schedule align_params(space space) const;
2470 static inline schedule empty(space space);
2471 static inline schedule from_domain(union_set domain);
2472 inline union_set get_domain() const;
2473 inline union_map get_map() const;
2474 inline schedule_node get_root() const;
2475 inline schedule gist_domain_params(set context) const;
2476 inline schedule insert_context(set context) const;
2477 inline schedule insert_guard(set guard) const;
2478 inline schedule insert_partial_schedule(multi_union_pw_aff partial) const;
2479 inline schedule intersect_domain(union_set domain) const;
2480 inline boolean plain_is_equal(const schedule &schedule2) const;
2481 inline schedule pullback(union_pw_multi_aff upma) const;
2482 inline schedule reset_user() const;
2483 inline schedule sequence(schedule schedule2) const;
2484 };
2485
2486 // declarations for isl::schedule_constraints
2487 inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
2488 inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
2489
2490 class schedule_constraints {
2491 friend inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr);
2492 friend inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr);
2493
2494 isl_schedule_constraints *ptr = nullptr;
2495
2496 inline explicit schedule_constraints(__isl_take isl_schedule_constraints *ptr);
2497
2498 public:
2499 inline /* implicit */ schedule_constraints();
2500 inline /* implicit */ schedule_constraints(const schedule_constraints &obj);
2501 inline /* implicit */ schedule_constraints(std::nullptr_t);
2502 inline explicit schedule_constraints(ctx ctx, const std::string &str);
2503 inline schedule_constraints &operator=(schedule_constraints obj);
2504 inline ~schedule_constraints();
2505 inline __isl_give isl_schedule_constraints *copy() const &;
2506 inline __isl_give isl_schedule_constraints *copy() && = delete;
2507 inline __isl_keep isl_schedule_constraints *get() const;
2508 inline __isl_give isl_schedule_constraints *release();
2509 inline bool is_null() const;
2510 inline explicit operator bool() const;
2511 inline ctx get_ctx() const;
2512 inline std::string to_str() const;
2513 inline void dump() const;
2514
2515 inline schedule_constraints apply(union_map umap) const;
2516 inline schedule compute_schedule() const;
2517 inline union_map get_coincidence() const;
2518 inline union_map get_conditional_validity() const;
2519 inline union_map get_conditional_validity_condition() const;
2520 inline set get_context() const;
2521 inline union_set get_domain() const;
2522 inline union_map get_proximity() const;
2523 inline union_map get_validity() const;
2524 static inline schedule_constraints on_domain(union_set domain);
2525 inline schedule_constraints set_coincidence(union_map coincidence) const;
2526 inline schedule_constraints set_conditional_validity(union_map condition, union_map validity) const;
2527 inline schedule_constraints set_context(set context) const;
2528 inline schedule_constraints set_proximity(union_map proximity) const;
2529 inline schedule_constraints set_validity(union_map validity) const;
2530 };
2531
2532 // declarations for isl::schedule_node
2533 inline schedule_node manage(__isl_take isl_schedule_node *ptr);
2534 inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
2535
2536 class schedule_node {
2537 friend inline schedule_node manage(__isl_take isl_schedule_node *ptr);
2538 friend inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr);
2539
2540 isl_schedule_node *ptr = nullptr;
2541
2542 inline explicit schedule_node(__isl_take isl_schedule_node *ptr);
2543
2544 public:
2545 inline /* implicit */ schedule_node();
2546 inline /* implicit */ schedule_node(const schedule_node &obj);
2547 inline /* implicit */ schedule_node(std::nullptr_t);
2548 inline schedule_node &operator=(schedule_node obj);
2549 inline ~schedule_node();
2550 inline __isl_give isl_schedule_node *copy() const &;
2551 inline __isl_give isl_schedule_node *copy() && = delete;
2552 inline __isl_keep isl_schedule_node *get() const;
2553 inline __isl_give isl_schedule_node *release();
2554 inline bool is_null() const;
2555 inline explicit operator bool() const;
2556 inline ctx get_ctx() const;
2557 inline std::string to_str() const;
2558 inline void dump() const;
2559
2560 inline schedule_node align_params(space space) const;
2561 inline schedule_node ancestor(int generation) const;
2562 inline boolean band_member_get_coincident(int pos) const;
2563 inline schedule_node band_member_set_coincident(int pos, int coincident) const;
2564 inline schedule_node band_set_ast_build_options(union_set options) const;
2565 inline schedule_node child(int pos) const;
2566 inline set context_get_context() const;
2567 inline schedule_node cut() const;
2568 inline union_set domain_get_domain() const;
2569 inline union_pw_multi_aff expansion_get_contraction() const;
2570 inline union_map expansion_get_expansion() const;
2571 inline union_map extension_get_extension() const;
2572 inline union_set filter_get_filter() const;
2573 inline schedule_node first_child() const;
2574 inline stat foreach_ancestor_top_down(const std::function<stat(schedule_node)> &fn) const;
2575 static inline schedule_node from_domain(union_set domain);
2576 static inline schedule_node from_extension(union_map extension);
2577 inline int get_ancestor_child_position(const schedule_node &ancestor) const;
2578 inline schedule_node get_child(int pos) const;
2579 inline int get_child_position() const;
2580 inline union_set get_domain() const;
2581 inline multi_union_pw_aff get_prefix_schedule_multi_union_pw_aff() const;
2582 inline union_map get_prefix_schedule_relation() const;
2583 inline union_map get_prefix_schedule_union_map() const;
2584 inline union_pw_multi_aff get_prefix_schedule_union_pw_multi_aff() const;
2585 inline schedule get_schedule() const;
2586 inline int get_schedule_depth() const;
2587 inline schedule_node get_shared_ancestor(const schedule_node &node2) const;
2588 inline union_pw_multi_aff get_subtree_contraction() const;
2589 inline union_map get_subtree_expansion() const;
2590 inline union_map get_subtree_schedule_union_map() const;
2591 inline int get_tree_depth() const;
2592 inline union_set get_universe_domain() const;
2593 inline schedule_node graft_after(schedule_node graft) const;
2594 inline schedule_node graft_before(schedule_node graft) const;
2595 inline schedule_node group(id group_id) const;
2596 inline set guard_get_guard() const;
2597 inline boolean has_children() const;
2598 inline boolean has_next_sibling() const;
2599 inline boolean has_parent() const;
2600 inline boolean has_previous_sibling() const;
2601 inline schedule_node insert_context(set context) const;
2602 inline schedule_node insert_filter(union_set filter) const;
2603 inline schedule_node insert_guard(set context) const;
2604 inline schedule_node insert_mark(id mark) const;
2605 inline schedule_node insert_partial_schedule(multi_union_pw_aff schedule) const;
2606 inline schedule_node insert_sequence(union_set_list filters) const;
2607 inline schedule_node insert_set(union_set_list filters) const;
2608 inline boolean is_equal(const schedule_node &node2) const;
2609 inline boolean is_subtree_anchored() const;
2610 inline id mark_get_id() const;
2611 inline int n_children() const;
2612 inline schedule_node next_sibling() const;
2613 inline schedule_node order_after(union_set filter) const;
2614 inline schedule_node order_before(union_set filter) const;
2615 inline schedule_node parent() const;
2616 inline schedule_node previous_sibling() const;
2617 inline schedule_node reset_user() const;
2618 inline schedule_node root() const;
2619 inline schedule_node sequence_splice_child(int pos) const;
2620 };
2621
2622 // declarations for isl::set
2623 inline set manage(__isl_take isl_set *ptr);
2624 inline set manage_copy(__isl_keep isl_set *ptr);
2625
2626 class set {
2627 friend inline set manage(__isl_take isl_set *ptr);
2628 friend inline set manage_copy(__isl_keep isl_set *ptr);
2629
2630 isl_set *ptr = nullptr;
2631
2632 inline explicit set(__isl_take isl_set *ptr);
2633
2634 public:
2635 inline /* implicit */ set();
2636 inline /* implicit */ set(const set &obj);
2637 inline /* implicit */ set(std::nullptr_t);
2638 inline explicit set(ctx ctx, const std::string &str);
2639 inline /* implicit */ set(basic_set bset);
2640 inline /* implicit */ set(point pnt);
2641 inline explicit set(union_set uset);
2642 inline set &operator=(set obj);
2643 inline ~set();
2644 inline __isl_give isl_set *copy() const &;
2645 inline __isl_give isl_set *copy() && = delete;
2646 inline __isl_keep isl_set *get() const;
2647 inline __isl_give isl_set *release();
2648 inline bool is_null() const;
2649 inline explicit operator bool() const;
2650 inline ctx get_ctx() const;
2651 inline std::string to_str() const;
2652 inline void dump() const;
2653
2654 inline set add_constraint(constraint constraint) const;
2655 inline set add_dims(isl::dim type, unsigned int n) const;
2656 inline basic_set affine_hull() const;
2657 inline set align_params(space model) const;
2658 inline set apply(map map) const;
2659 inline basic_set bounded_simple_hull() const;
2660 static inline set box_from_points(point pnt1, point pnt2);
2661 inline set coalesce() const;
2662 inline basic_set coefficients() const;
2663 inline set complement() const;
2664 inline basic_set convex_hull() const;
2665 inline val count_val() const;
2666 inline set detect_equalities() const;
2667 inline unsigned int dim(isl::dim type) const;
2668 inline boolean dim_has_any_lower_bound(isl::dim type, unsigned int pos) const;
2669 inline boolean dim_has_any_upper_bound(isl::dim type, unsigned int pos) const;
2670 inline boolean dim_has_lower_bound(isl::dim type, unsigned int pos) const;
2671 inline boolean dim_has_upper_bound(isl::dim type, unsigned int pos) const;
2672 inline boolean dim_is_bounded(isl::dim type, unsigned int pos) const;
2673 inline pw_aff dim_max(int pos) const;
2674 inline pw_aff dim_min(int pos) const;
2675 inline set drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
2676 inline set drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
2677 inline set drop_unused_params() const;
2678 inline set eliminate(isl::dim type, unsigned int first, unsigned int n) const;
2679 static inline set empty(space space);
2680 inline set equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const;
2681 inline int find_dim_by_id(isl::dim type, const id &id) const;
2682 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
2683 inline set fix_si(isl::dim type, unsigned int pos, int value) const;
2684 inline set fix_val(isl::dim type, unsigned int pos, val v) const;
2685 inline set flat_product(set set2) const;
2686 inline set flatten() const;
2687 inline map flatten_map() const;
2688 inline int follows_at(const set &set2, int pos) const;
2689 inline stat foreach_basic_set(const std::function<stat(basic_set)> &fn) const;
2690 inline stat foreach_point(const std::function<stat(point)> &fn) const;
2691 static inline set from_multi_aff(multi_aff ma);
2692 static inline set from_multi_pw_aff(multi_pw_aff mpa);
2693 inline set from_params() const;
2694 static inline set from_pw_aff(pw_aff pwaff);
2695 static inline set from_pw_multi_aff(pw_multi_aff pma);
2696 inline basic_set_list get_basic_set_list() const;
2697 inline id get_dim_id(isl::dim type, unsigned int pos) const;
2698 inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
2699 inline space get_space() const;
2700 inline val get_stride(int pos) const;
2701 inline id get_tuple_id() const;
2702 inline std::string get_tuple_name() const;
2703 inline set gist(set context) const;
2704 inline set gist_basic_set(basic_set context) const;
2705 inline set gist_params(set context) const;
2706 inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
2707 inline boolean has_dim_name(isl::dim type, unsigned int pos) const;
2708 inline boolean has_equal_space(const set &set2) const;
2709 inline boolean has_tuple_id() const;
2710 inline boolean has_tuple_name() const;
2711 inline map identity() const;
2712 inline pw_aff indicator_function() const;
2713 inline set insert_dims(isl::dim type, unsigned int pos, unsigned int n) const;
2714 inline set intersect(set set2) const;
2715 inline set intersect_params(set params) const;
2716 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
2717 inline boolean is_bounded() const;
2718 inline boolean is_box() const;
2719 inline boolean is_disjoint(const set &set2) const;
2720 inline boolean is_empty() const;
2721 inline boolean is_equal(const set &set2) const;
2722 inline boolean is_params() const;
2723 inline boolean is_singleton() const;
2724 inline boolean is_strict_subset(const set &set2) const;
2725 inline boolean is_subset(const set &set2) const;
2726 inline boolean is_wrapping() const;
2727 inline map lex_ge_set(set set2) const;
2728 inline map lex_gt_set(set set2) const;
2729 inline map lex_le_set(set set2) const;
2730 inline map lex_lt_set(set set2) const;
2731 inline set lexmax() const;
2732 inline pw_multi_aff lexmax_pw_multi_aff() const;
2733 inline set lexmin() const;
2734 inline pw_multi_aff lexmin_pw_multi_aff() const;
2735 inline set lower_bound_si(isl::dim type, unsigned int pos, int value) const;
2736 inline set lower_bound_val(isl::dim type, unsigned int pos, val value) const;
2737 inline val max_val(const aff &obj) const;
2738 inline val min_val(const aff &obj) const;
2739 inline set move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
2740 inline int n_basic_set() const;
2741 inline unsigned int n_dim() const;
2742 static inline set nat_universe(space dim);
2743 inline set neg() const;
2744 inline set params() const;
2745 inline int plain_cmp(const set &set2) const;
2746 inline val plain_get_val_if_fixed(isl::dim type, unsigned int pos) const;
2747 inline boolean plain_is_disjoint(const set &set2) const;
2748 inline boolean plain_is_empty() const;
2749 inline boolean plain_is_equal(const set &set2) const;
2750 inline boolean plain_is_universe() const;
2751 inline basic_set plain_unshifted_simple_hull() const;
2752 inline basic_set polyhedral_hull() const;
2753 inline set preimage_multi_aff(multi_aff ma) const;
2754 inline set preimage_multi_pw_aff(multi_pw_aff mpa) const;
2755 inline set preimage_pw_multi_aff(pw_multi_aff pma) const;
2756 inline set product(set set2) const;
2757 inline map project_onto_map(isl::dim type, unsigned int first, unsigned int n) const;
2758 inline set project_out(isl::dim type, unsigned int first, unsigned int n) const;
2759 inline set remove_dims(isl::dim type, unsigned int first, unsigned int n) const;
2760 inline set remove_divs() const;
2761 inline set remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const;
2762 inline set remove_redundancies() const;
2763 inline set remove_unknown_divs() const;
2764 inline set reset_space(space dim) const;
2765 inline set reset_tuple_id() const;
2766 inline set reset_user() const;
2767 inline basic_set sample() const;
2768 inline point sample_point() const;
2769 inline set set_dim_id(isl::dim type, unsigned int pos, id id) const;
2770 inline set set_tuple_id(id id) const;
2771 inline set set_tuple_name(const std::string &s) const;
2772 inline basic_set simple_hull() const;
2773 inline int size() const;
2774 inline basic_set solutions() const;
2775 inline set split_dims(isl::dim type, unsigned int first, unsigned int n) const;
2776 inline set subtract(set set2) const;
2777 inline set sum(set set2) const;
2778 inline set unite(set set2) const;
2779 static inline set universe(space space);
2780 inline basic_set unshifted_simple_hull() const;
2781 inline basic_set unshifted_simple_hull_from_set_list(set_list list) const;
2782 inline map unwrap() const;
2783 inline set upper_bound_si(isl::dim type, unsigned int pos, int value) const;
2784 inline set upper_bound_val(isl::dim type, unsigned int pos, val value) const;
2785 inline map wrapped_domain_map() const;
2786 };
2787
2788 // declarations for isl::set_list
2789 inline set_list manage(__isl_take isl_set_list *ptr);
2790 inline set_list manage_copy(__isl_keep isl_set_list *ptr);
2791
2792 class set_list {
2793 friend inline set_list manage(__isl_take isl_set_list *ptr);
2794 friend inline set_list manage_copy(__isl_keep isl_set_list *ptr);
2795
2796 isl_set_list *ptr = nullptr;
2797
2798 inline explicit set_list(__isl_take isl_set_list *ptr);
2799
2800 public:
2801 inline /* implicit */ set_list();
2802 inline /* implicit */ set_list(const set_list &obj);
2803 inline /* implicit */ set_list(std::nullptr_t);
2804 inline set_list &operator=(set_list obj);
2805 inline ~set_list();
2806 inline __isl_give isl_set_list *copy() const &;
2807 inline __isl_give isl_set_list *copy() && = delete;
2808 inline __isl_keep isl_set_list *get() const;
2809 inline __isl_give isl_set_list *release();
2810 inline bool is_null() const;
2811 inline explicit operator bool() const;
2812 inline ctx get_ctx() const;
2813 inline void dump() const;
2814
2815 inline set_list add(set el) const;
2816 static inline set_list alloc(ctx ctx, int n);
2817 inline set_list concat(set_list list2) const;
2818 inline set_list drop(unsigned int first, unsigned int n) const;
2819 inline stat foreach(const std::function<stat(set)> &fn) const;
2820 static inline set_list from_set(set el);
2821 inline set get_at(int index) const;
2822 inline set get_set(int index) const;
2823 inline set_list insert(unsigned int pos, set el) const;
2824 inline int n_set() const;
2825 inline set_list reverse() const;
2826 inline set_list set_set(int index, set el) const;
2827 inline int size() const;
2828 inline set_list swap(unsigned int pos1, unsigned int pos2) const;
2829 inline set unite() const;
2830 };
2831
2832 // declarations for isl::space
2833 inline space manage(__isl_take isl_space *ptr);
2834 inline space manage_copy(__isl_keep isl_space *ptr);
2835
2836 class space {
2837 friend inline space manage(__isl_take isl_space *ptr);
2838 friend inline space manage_copy(__isl_keep isl_space *ptr);
2839
2840 isl_space *ptr = nullptr;
2841
2842 inline explicit space(__isl_take isl_space *ptr);
2843
2844 public:
2845 inline /* implicit */ space();
2846 inline /* implicit */ space(const space &obj);
2847 inline /* implicit */ space(std::nullptr_t);
2848 inline explicit space(ctx ctx, unsigned int nparam, unsigned int n_in, unsigned int n_out);
2849 inline explicit space(ctx ctx, unsigned int nparam, unsigned int dim);
2850 inline space &operator=(space obj);
2851 inline ~space();
2852 inline __isl_give isl_space *copy() const &;
2853 inline __isl_give isl_space *copy() && = delete;
2854 inline __isl_keep isl_space *get() const;
2855 inline __isl_give isl_space *release();
2856 inline bool is_null() const;
2857 inline explicit operator bool() const;
2858 inline ctx get_ctx() const;
2859 inline std::string to_str() const;
2860 inline void dump() const;
2861
2862 inline space add_dims(isl::dim type, unsigned int n) const;
2863 inline space add_param_id(id id) const;
2864 inline space align_params(space dim2) const;
2865 inline boolean can_curry() const;
2866 inline boolean can_range_curry() const;
2867 inline boolean can_uncurry() const;
2868 inline boolean can_zip() const;
2869 inline space curry() const;
2870 inline unsigned int dim(isl::dim type) const;
2871 inline space domain() const;
2872 inline space domain_factor_domain() const;
2873 inline space domain_factor_range() const;
2874 inline boolean domain_is_wrapping() const;
2875 inline space domain_map() const;
2876 inline space domain_product(space right) const;
2877 inline space drop_dims(isl::dim type, unsigned int first, unsigned int num) const;
2878 inline space factor_domain() const;
2879 inline space factor_range() const;
2880 inline int find_dim_by_id(isl::dim type, const id &id) const;
2881 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
2882 inline space flatten_domain() const;
2883 inline space flatten_range() const;
2884 inline space from_domain() const;
2885 inline space from_range() const;
2886 inline id get_dim_id(isl::dim type, unsigned int pos) const;
2887 inline std::string get_dim_name(isl::dim type, unsigned int pos) const;
2888 inline id get_tuple_id(isl::dim type) const;
2889 inline std::string get_tuple_name(isl::dim type) const;
2890 inline boolean has_dim_id(isl::dim type, unsigned int pos) const;
2891 inline boolean has_dim_name(isl::dim type, unsigned int pos) const;
2892 inline boolean has_equal_params(const space &space2) const;
2893 inline boolean has_equal_tuples(const space &space2) const;
2894 inline boolean has_tuple_id(isl::dim type) const;
2895 inline boolean has_tuple_name(isl::dim type) const;
2896 inline space insert_dims(isl::dim type, unsigned int pos, unsigned int n) const;
2897 inline boolean is_domain(const space &space2) const;
2898 inline boolean is_equal(const space &space2) const;
2899 inline boolean is_map() const;
2900 inline boolean is_params() const;
2901 inline boolean is_product() const;
2902 inline boolean is_range(const space &space2) const;
2903 inline boolean is_set() const;
2904 inline boolean is_wrapping() const;
2905 inline space join(space right) const;
2906 inline space map_from_domain_and_range(space range) const;
2907 inline space map_from_set() const;
2908 inline space move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const;
2909 inline space params() const;
2910 static inline space params_alloc(ctx ctx, unsigned int nparam);
2911 inline space product(space right) const;
2912 inline space range() const;
2913 inline space range_curry() const;
2914 inline space range_factor_domain() const;
2915 inline space range_factor_range() const;
2916 inline boolean range_is_wrapping() const;
2917 inline space range_map() const;
2918 inline space range_product(space right) const;
2919 inline space reset_tuple_id(isl::dim type) const;
2920 inline space reset_user() const;
2921 inline space reverse() const;
2922 inline space set_dim_id(isl::dim type, unsigned int pos, id id) const;
2923 inline space set_from_params() const;
2924 inline space set_tuple_id(isl::dim type, id id) const;
2925 inline space set_tuple_name(isl::dim type, const std::string &s) const;
2926 inline boolean tuple_is_equal(isl::dim type1, const space &space2, isl::dim type2) const;
2927 inline space uncurry() const;
2928 inline space unwrap() const;
2929 inline space wrap() const;
2930 inline space zip() const;
2931 };
2932
2933 // declarations for isl::term
2934 inline term manage(__isl_take isl_term *ptr);
2935 inline term manage_copy(__isl_keep isl_term *ptr);
2936
2937 class term {
2938 friend inline term manage(__isl_take isl_term *ptr);
2939 friend inline term manage_copy(__isl_keep isl_term *ptr);
2940
2941 isl_term *ptr = nullptr;
2942
2943 inline explicit term(__isl_take isl_term *ptr);
2944
2945 public:
2946 inline /* implicit */ term();
2947 inline /* implicit */ term(const term &obj);
2948 inline /* implicit */ term(std::nullptr_t);
2949 inline term &operator=(term obj);
2950 inline ~term();
2951 inline __isl_give isl_term *copy() const &;
2952 inline __isl_give isl_term *copy() && = delete;
2953 inline __isl_keep isl_term *get() const;
2954 inline __isl_give isl_term *release();
2955 inline bool is_null() const;
2956 inline explicit operator bool() const;
2957 inline ctx get_ctx() const;
2958
2959 inline unsigned int dim(isl::dim type) const;
2960 inline val get_coefficient_val() const;
2961 inline aff get_div(unsigned int pos) const;
2962 inline int get_exp(isl::dim type, unsigned int pos) const;
2963 };
2964
2965 // declarations for isl::union_access_info
2966 inline union_access_info manage(__isl_take isl_union_access_info *ptr);
2967 inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
2968
2969 class union_access_info {
2970 friend inline union_access_info manage(__isl_take isl_union_access_info *ptr);
2971 friend inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr);
2972
2973 isl_union_access_info *ptr = nullptr;
2974
2975 inline explicit union_access_info(__isl_take isl_union_access_info *ptr);
2976
2977 public:
2978 inline /* implicit */ union_access_info();
2979 inline /* implicit */ union_access_info(const union_access_info &obj);
2980 inline /* implicit */ union_access_info(std::nullptr_t);
2981 inline explicit union_access_info(union_map sink);
2982 inline union_access_info &operator=(union_access_info obj);
2983 inline ~union_access_info();
2984 inline __isl_give isl_union_access_info *copy() const &;
2985 inline __isl_give isl_union_access_info *copy() && = delete;
2986 inline __isl_keep isl_union_access_info *get() const;
2987 inline __isl_give isl_union_access_info *release();
2988 inline bool is_null() const;
2989 inline explicit operator bool() const;
2990 inline ctx get_ctx() const;
2991 inline std::string to_str() const;
2992
2993 inline union_flow compute_flow() const;
2994 inline union_access_info set_kill(union_map kill) const;
2995 inline union_access_info set_may_source(union_map may_source) const;
2996 inline union_access_info set_must_source(union_map must_source) const;
2997 inline union_access_info set_schedule(schedule schedule) const;
2998 inline union_access_info set_schedule_map(union_map schedule_map) const;
2999 };
3000
3001 // declarations for isl::union_flow
3002 inline union_flow manage(__isl_take isl_union_flow *ptr);
3003 inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
3004
3005 class union_flow {
3006 friend inline union_flow manage(__isl_take isl_union_flow *ptr);
3007 friend inline union_flow manage_copy(__isl_keep isl_union_flow *ptr);
3008
3009 isl_union_flow *ptr = nullptr;
3010
3011 inline explicit union_flow(__isl_take isl_union_flow *ptr);
3012
3013 public:
3014 inline /* implicit */ union_flow();
3015 inline /* implicit */ union_flow(const union_flow &obj);
3016 inline /* implicit */ union_flow(std::nullptr_t);
3017 inline union_flow &operator=(union_flow obj);
3018 inline ~union_flow();
3019 inline __isl_give isl_union_flow *copy() const &;
3020 inline __isl_give isl_union_flow *copy() && = delete;
3021 inline __isl_keep isl_union_flow *get() const;
3022 inline __isl_give isl_union_flow *release();
3023 inline bool is_null() const;
3024 inline explicit operator bool() const;
3025 inline ctx get_ctx() const;
3026 inline std::string to_str() const;
3027
3028 inline union_map get_full_may_dependence() const;
3029 inline union_map get_full_must_dependence() const;
3030 inline union_map get_may_dependence() const;
3031 inline union_map get_may_no_source() const;
3032 inline union_map get_must_dependence() const;
3033 inline union_map get_must_no_source() const;
3034 };
3035
3036 // declarations for isl::union_map
3037 inline union_map manage(__isl_take isl_union_map *ptr);
3038 inline union_map manage_copy(__isl_keep isl_union_map *ptr);
3039
3040 class union_map {
3041 friend inline union_map manage(__isl_take isl_union_map *ptr);
3042 friend inline union_map manage_copy(__isl_keep isl_union_map *ptr);
3043
3044 isl_union_map *ptr = nullptr;
3045
3046 inline explicit union_map(__isl_take isl_union_map *ptr);
3047
3048 public:
3049 inline /* implicit */ union_map();
3050 inline /* implicit */ union_map(const union_map &obj);
3051 inline /* implicit */ union_map(std::nullptr_t);
3052 inline explicit union_map(union_pw_multi_aff upma);
3053 inline /* implicit */ union_map(basic_map bmap);
3054 inline /* implicit */ union_map(map map);
3055 inline explicit union_map(ctx ctx, const std::string &str);
3056 inline union_map &operator=(union_map obj);
3057 inline ~union_map();
3058 inline __isl_give isl_union_map *copy() const &;
3059 inline __isl_give isl_union_map *copy() && = delete;
3060 inline __isl_keep isl_union_map *get() const;
3061 inline __isl_give isl_union_map *release();
3062 inline bool is_null() const;
3063 inline explicit operator bool() const;
3064 inline ctx get_ctx() const;
3065 inline std::string to_str() const;
3066 inline void dump() const;
3067
3068 inline union_map add_map(map map) const;
3069 inline union_map affine_hull() const;
3070 inline union_map align_params(space model) const;
3071 inline union_map apply_domain(union_map umap2) const;
3072 inline union_map apply_range(union_map umap2) const;
3073 inline union_map coalesce() const;
3074 inline boolean contains(const space &space) const;
3075 inline union_map curry() const;
3076 inline union_set deltas() const;
3077 inline union_map deltas_map() const;
3078 inline union_map detect_equalities() const;
3079 inline unsigned int dim(isl::dim type) const;
3080 inline union_set domain() const;
3081 inline union_map domain_factor_domain() const;
3082 inline union_map domain_factor_range() const;
3083 inline union_map domain_map() const;
3084 inline union_pw_multi_aff domain_map_union_pw_multi_aff() const;
3085 inline union_map domain_product(union_map umap2) const;
3086 static inline union_map empty(space space);
3087 inline union_map eq_at(multi_union_pw_aff mupa) const;
3088 inline map extract_map(space dim) const;
3089 inline union_map factor_domain() const;
3090 inline union_map factor_range() const;
3091 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
3092 inline union_map fixed_power(val exp) const;
3093 inline union_map flat_domain_product(union_map umap2) const;
3094 inline union_map flat_range_product(union_map umap2) const;
3095 inline stat foreach_map(const std::function<stat(map)> &fn) const;
3096 static inline union_map from(multi_union_pw_aff mupa);
3097 static inline union_map from_domain(union_set uset);
3098 static inline union_map from_domain_and_range(union_set domain, union_set range);
3099 static inline union_map from_range(union_set uset);
3100 static inline union_map from_union_pw_aff(union_pw_aff upa);
3101 inline id get_dim_id(isl::dim type, unsigned int pos) const;
3102 inline uint32_t get_hash() const;
3103 inline map_list get_map_list() const;
3104 inline space get_space() const;
3105 inline union_map gist(union_map context) const;
3106 inline union_map gist_domain(union_set uset) const;
3107 inline union_map gist_params(set set) const;
3108 inline union_map gist_range(union_set uset) const;
3109 inline union_map intersect(union_map umap2) const;
3110 inline union_map intersect_domain(union_set uset) const;
3111 inline union_map intersect_params(set set) const;
3112 inline union_map intersect_range(union_set uset) const;
3113 inline union_map intersect_range_factor_range(union_map factor) const;
3114 inline boolean involves_dims(isl::dim type, unsigned int first, unsigned int n) const;
3115 inline boolean is_bijective() const;
3116 inline boolean is_disjoint(const union_map &umap2) const;
3117 inline boolean is_empty() const;
3118 inline boolean is_equal(const union_map &umap2) const;
3119 inline boolean is_identity() const;
3120 inline boolean is_injective() const;
3121 inline boolean is_single_valued() const;
3122 inline boolean is_strict_subset(const union_map &umap2) const;
3123 inline boolean is_subset(const union_map &umap2) const;
3124 inline union_map lex_ge_union_map(union_map umap2) const;
3125 inline union_map lex_gt_at_multi_union_pw_aff(multi_union_pw_aff mupa) const;
3126 inline union_map lex_gt_union_map(union_map umap2) const;
3127 inline union_map lex_le_union_map(union_map umap2) const;
3128 inline union_map lex_lt_at_multi_union_pw_aff(multi_union_pw_aff mupa) const;
3129 inline union_map lex_lt_union_map(union_map umap2) const;
3130 inline union_map lexmax() const;
3131 inline union_map lexmin() const;
3132 inline int n_map() const;
3133 inline set params() const;
3134 inline boolean plain_is_empty() const;
3135 inline boolean plain_is_injective() const;
3136 inline union_map polyhedral_hull() const;
3137 inline union_map preimage_domain_multi_aff(multi_aff ma) const;
3138 inline union_map preimage_domain_multi_pw_aff(multi_pw_aff mpa) const;
3139 inline union_map preimage_domain_pw_multi_aff(pw_multi_aff pma) const;
3140 inline union_map preimage_domain_union_pw_multi_aff(union_pw_multi_aff upma) const;
3141 inline union_map preimage_range_multi_aff(multi_aff ma) const;
3142 inline union_map preimage_range_pw_multi_aff(pw_multi_aff pma) const;
3143 inline union_map preimage_range_union_pw_multi_aff(union_pw_multi_aff upma) const;
3144 inline union_map product(union_map umap2) const;
3145 inline union_map project_out(isl::dim type, unsigned int first, unsigned int n) const;
3146 inline union_map project_out_all_params() const;
3147 inline union_set range() const;
3148 inline union_map range_curry() const;
3149 inline union_map range_factor_domain() const;
3150 inline union_map range_factor_range() const;
3151 inline union_map range_map() const;
3152 inline union_map range_product(union_map umap2) const;
3153 inline union_map remove_divs() const;
3154 inline union_map remove_redundancies() const;
3155 inline union_map reset_user() const;
3156 inline union_map reverse() const;
3157 inline basic_map sample() const;
3158 inline union_map simple_hull() const;
3159 inline union_map subtract(union_map umap2) const;
3160 inline union_map subtract_domain(union_set dom) const;
3161 inline union_map subtract_range(union_set dom) const;
3162 inline union_map uncurry() const;
3163 inline union_map unite(union_map umap2) const;
3164 inline union_map universe() const;
3165 inline union_set wrap() const;
3166 inline union_map zip() const;
3167 };
3168
3169 // declarations for isl::union_map_list
3170 inline union_map_list manage(__isl_take isl_union_map_list *ptr);
3171 inline union_map_list manage_copy(__isl_keep isl_union_map_list *ptr);
3172
3173 class union_map_list {
3174 friend inline union_map_list manage(__isl_take isl_union_map_list *ptr);
3175 friend inline union_map_list manage_copy(__isl_keep isl_union_map_list *ptr);
3176
3177 isl_union_map_list *ptr = nullptr;
3178
3179 inline explicit union_map_list(__isl_take isl_union_map_list *ptr);
3180
3181 public:
3182 inline /* implicit */ union_map_list();
3183 inline /* implicit */ union_map_list(const union_map_list &obj);
3184 inline /* implicit */ union_map_list(std::nullptr_t);
3185 inline union_map_list &operator=(union_map_list obj);
3186 inline ~union_map_list();
3187 inline __isl_give isl_union_map_list *copy() const &;
3188 inline __isl_give isl_union_map_list *copy() && = delete;
3189 inline __isl_keep isl_union_map_list *get() const;
3190 inline __isl_give isl_union_map_list *release();
3191 inline bool is_null() const;
3192 inline explicit operator bool() const;
3193 inline ctx get_ctx() const;
3194 inline void dump() const;
3195
3196 inline union_map_list add(union_map el) const;
3197 static inline union_map_list alloc(ctx ctx, int n);
3198 inline union_map_list concat(union_map_list list2) const;
3199 inline union_map_list drop(unsigned int first, unsigned int n) const;
3200 inline stat foreach(const std::function<stat(union_map)> &fn) const;
3201 static inline union_map_list from_union_map(union_map el);
3202 inline union_map get_at(int index) const;
3203 inline union_map get_union_map(int index) const;
3204 inline union_map_list insert(unsigned int pos, union_map el) const;
3205 inline int n_union_map() const;
3206 inline union_map_list reverse() const;
3207 inline union_map_list set_union_map(int index, union_map el) const;
3208 inline int size() const;
3209 inline union_map_list swap(unsigned int pos1, unsigned int pos2) const;
3210 };
3211
3212 // declarations for isl::union_pw_aff
3213 inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
3214 inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
3215
3216 class union_pw_aff {
3217 friend inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr);
3218 friend inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr);
3219
3220 isl_union_pw_aff *ptr = nullptr;
3221
3222 inline explicit union_pw_aff(__isl_take isl_union_pw_aff *ptr);
3223
3224 public:
3225 inline /* implicit */ union_pw_aff();
3226 inline /* implicit */ union_pw_aff(const union_pw_aff &obj);
3227 inline /* implicit */ union_pw_aff(std::nullptr_t);
3228 inline /* implicit */ union_pw_aff(pw_aff pa);
3229 inline explicit union_pw_aff(union_set domain, val v);
3230 inline explicit union_pw_aff(ctx ctx, const std::string &str);
3231 inline union_pw_aff &operator=(union_pw_aff obj);
3232 inline ~union_pw_aff();
3233 inline __isl_give isl_union_pw_aff *copy() const &;
3234 inline __isl_give isl_union_pw_aff *copy() && = delete;
3235 inline __isl_keep isl_union_pw_aff *get() const;
3236 inline __isl_give isl_union_pw_aff *release();
3237 inline bool is_null() const;
3238 inline explicit operator bool() const;
3239 inline ctx get_ctx() const;
3240 inline std::string to_str() const;
3241 inline void dump() const;
3242
3243 inline union_pw_aff add(union_pw_aff upa2) const;
3244 inline union_pw_aff add_pw_aff(pw_aff pa) const;
3245 static inline union_pw_aff aff_on_domain(union_set domain, aff aff);
3246 inline union_pw_aff align_params(space model) const;
3247 inline union_pw_aff coalesce() const;
3248 inline unsigned int dim(isl::dim type) const;
3249 inline union_set domain() const;
3250 inline union_pw_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
3251 static inline union_pw_aff empty(space space);
3252 inline pw_aff extract_pw_aff(space space) const;
3253 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
3254 inline union_pw_aff floor() const;
3255 inline stat foreach_pw_aff(const std::function<stat(pw_aff)> &fn) const;
3256 inline pw_aff_list get_pw_aff_list() const;
3257 inline space get_space() const;
3258 inline union_pw_aff gist(union_set context) const;
3259 inline union_pw_aff gist_params(set context) const;
3260 inline union_pw_aff intersect_domain(union_set uset) const;
3261 inline union_pw_aff intersect_params(set set) const;
3262 inline boolean involves_nan() const;
3263 inline val max_val() const;
3264 inline val min_val() const;
3265 inline union_pw_aff mod_val(val f) const;
3266 inline int n_pw_aff() const;
3267 inline union_pw_aff neg() const;
3268 static inline union_pw_aff param_on_domain_id(union_set domain, id id);
3269 inline boolean plain_is_equal(const union_pw_aff &upa2) const;
3270 inline union_pw_aff pullback(union_pw_multi_aff upma) const;
3271 static inline union_pw_aff pw_aff_on_domain(union_set domain, pw_aff pa);
3272 inline union_pw_aff reset_user() const;
3273 inline union_pw_aff scale_down_val(val v) const;
3274 inline union_pw_aff scale_val(val v) const;
3275 inline union_pw_aff sub(union_pw_aff upa2) const;
3276 inline union_pw_aff subtract_domain(union_set uset) const;
3277 inline union_pw_aff union_add(union_pw_aff upa2) const;
3278 inline union_set zero_union_set() const;
3279 };
3280
3281 // declarations for isl::union_pw_aff_list
3282 inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
3283 inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
3284
3285 class union_pw_aff_list {
3286 friend inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr);
3287 friend inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr);
3288
3289 isl_union_pw_aff_list *ptr = nullptr;
3290
3291 inline explicit union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr);
3292
3293 public:
3294 inline /* implicit */ union_pw_aff_list();
3295 inline /* implicit */ union_pw_aff_list(const union_pw_aff_list &obj);
3296 inline /* implicit */ union_pw_aff_list(std::nullptr_t);
3297 inline union_pw_aff_list &operator=(union_pw_aff_list obj);
3298 inline ~union_pw_aff_list();
3299 inline __isl_give isl_union_pw_aff_list *copy() const &;
3300 inline __isl_give isl_union_pw_aff_list *copy() && = delete;
3301 inline __isl_keep isl_union_pw_aff_list *get() const;
3302 inline __isl_give isl_union_pw_aff_list *release();
3303 inline bool is_null() const;
3304 inline explicit operator bool() const;
3305 inline ctx get_ctx() const;
3306 inline void dump() const;
3307
3308 inline union_pw_aff_list add(union_pw_aff el) const;
3309 static inline union_pw_aff_list alloc(ctx ctx, int n);
3310 inline union_pw_aff_list concat(union_pw_aff_list list2) const;
3311 inline union_pw_aff_list drop(unsigned int first, unsigned int n) const;
3312 inline stat foreach(const std::function<stat(union_pw_aff)> &fn) const;
3313 static inline union_pw_aff_list from_union_pw_aff(union_pw_aff el);
3314 inline union_pw_aff get_at(int index) const;
3315 inline union_pw_aff get_union_pw_aff(int index) const;
3316 inline union_pw_aff_list insert(unsigned int pos, union_pw_aff el) const;
3317 inline int n_union_pw_aff() const;
3318 inline union_pw_aff_list reverse() const;
3319 inline union_pw_aff_list set_union_pw_aff(int index, union_pw_aff el) const;
3320 inline int size() const;
3321 inline union_pw_aff_list swap(unsigned int pos1, unsigned int pos2) const;
3322 };
3323
3324 // declarations for isl::union_pw_multi_aff
3325 inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
3326 inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
3327
3328 class union_pw_multi_aff {
3329 friend inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr);
3330 friend inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr);
3331
3332 isl_union_pw_multi_aff *ptr = nullptr;
3333
3334 inline explicit union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr);
3335
3336 public:
3337 inline /* implicit */ union_pw_multi_aff();
3338 inline /* implicit */ union_pw_multi_aff(const union_pw_multi_aff &obj);
3339 inline /* implicit */ union_pw_multi_aff(std::nullptr_t);
3340 inline /* implicit */ union_pw_multi_aff(aff aff);
3341 inline /* implicit */ union_pw_multi_aff(pw_multi_aff pma);
3342 inline explicit union_pw_multi_aff(union_set uset);
3343 inline explicit union_pw_multi_aff(union_map umap);
3344 inline explicit union_pw_multi_aff(ctx ctx, const std::string &str);
3345 inline /* implicit */ union_pw_multi_aff(union_pw_aff upa);
3346 inline explicit union_pw_multi_aff(multi_union_pw_aff mupa);
3347 inline union_pw_multi_aff &operator=(union_pw_multi_aff obj);
3348 inline ~union_pw_multi_aff();
3349 inline __isl_give isl_union_pw_multi_aff *copy() const &;
3350 inline __isl_give isl_union_pw_multi_aff *copy() && = delete;
3351 inline __isl_keep isl_union_pw_multi_aff *get() const;
3352 inline __isl_give isl_union_pw_multi_aff *release();
3353 inline bool is_null() const;
3354 inline explicit operator bool() const;
3355 inline ctx get_ctx() const;
3356 inline std::string to_str() const;
3357 inline void dump() const;
3358
3359 inline union_pw_multi_aff add(union_pw_multi_aff upma2) const;
3360 inline union_pw_multi_aff add_pw_multi_aff(pw_multi_aff pma) const;
3361 inline union_pw_multi_aff align_params(space model) const;
3362 inline union_pw_multi_aff coalesce() const;
3363 inline unsigned int dim(isl::dim type) const;
3364 inline union_set domain() const;
3365 inline union_pw_multi_aff drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
3366 static inline union_pw_multi_aff empty(space space);
3367 inline pw_multi_aff extract_pw_multi_aff(space space) const;
3368 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
3369 inline union_pw_multi_aff flat_range_product(union_pw_multi_aff upma2) const;
3370 inline stat foreach_pw_multi_aff(const std::function<stat(pw_multi_aff)> &fn) const;
3371 static inline union_pw_multi_aff from_union_set(union_set uset);
3372 inline pw_multi_aff_list get_pw_multi_aff_list() const;
3373 inline space get_space() const;
3374 inline union_pw_aff get_union_pw_aff(int pos) const;
3375 inline union_pw_multi_aff gist(union_set context) const;
3376 inline union_pw_multi_aff gist_params(set context) const;
3377 inline union_pw_multi_aff intersect_domain(union_set uset) const;
3378 inline union_pw_multi_aff intersect_params(set set) const;
3379 inline boolean involves_nan() const;
3380 static inline union_pw_multi_aff multi_val_on_domain(union_set domain, multi_val mv);
3381 inline int n_pw_multi_aff() const;
3382 inline union_pw_multi_aff neg() const;
3383 inline boolean plain_is_equal(const union_pw_multi_aff &upma2) const;
3384 inline union_pw_multi_aff pullback(union_pw_multi_aff upma2) const;
3385 inline union_pw_multi_aff reset_user() const;
3386 inline union_pw_multi_aff scale_down_val(val val) const;
3387 inline union_pw_multi_aff scale_multi_val(multi_val mv) const;
3388 inline union_pw_multi_aff scale_val(val val) const;
3389 inline union_pw_multi_aff sub(union_pw_multi_aff upma2) const;
3390 inline union_pw_multi_aff subtract_domain(union_set uset) const;
3391 inline union_pw_multi_aff union_add(union_pw_multi_aff upma2) const;
3392 };
3393
3394 // declarations for isl::union_pw_multi_aff_list
3395 inline union_pw_multi_aff_list manage(__isl_take isl_union_pw_multi_aff_list *ptr);
3396 inline union_pw_multi_aff_list manage_copy(__isl_keep isl_union_pw_multi_aff_list *ptr);
3397
3398 class union_pw_multi_aff_list {
3399 friend inline union_pw_multi_aff_list manage(__isl_take isl_union_pw_multi_aff_list *ptr);
3400 friend inline union_pw_multi_aff_list manage_copy(__isl_keep isl_union_pw_multi_aff_list *ptr);
3401
3402 isl_union_pw_multi_aff_list *ptr = nullptr;
3403
3404 inline explicit union_pw_multi_aff_list(__isl_take isl_union_pw_multi_aff_list *ptr);
3405
3406 public:
3407 inline /* implicit */ union_pw_multi_aff_list();
3408 inline /* implicit */ union_pw_multi_aff_list(const union_pw_multi_aff_list &obj);
3409 inline /* implicit */ union_pw_multi_aff_list(std::nullptr_t);
3410 inline union_pw_multi_aff_list &operator=(union_pw_multi_aff_list obj);
3411 inline ~union_pw_multi_aff_list();
3412 inline __isl_give isl_union_pw_multi_aff_list *copy() const &;
3413 inline __isl_give isl_union_pw_multi_aff_list *copy() && = delete;
3414 inline __isl_keep isl_union_pw_multi_aff_list *get() const;
3415 inline __isl_give isl_union_pw_multi_aff_list *release();
3416 inline bool is_null() const;
3417 inline explicit operator bool() const;
3418 inline ctx get_ctx() const;
3419 inline void dump() const;
3420
3421 inline union_pw_multi_aff_list add(union_pw_multi_aff el) const;
3422 static inline union_pw_multi_aff_list alloc(ctx ctx, int n);
3423 inline union_pw_multi_aff_list concat(union_pw_multi_aff_list list2) const;
3424 inline union_pw_multi_aff_list drop(unsigned int first, unsigned int n) const;
3425 inline stat foreach(const std::function<stat(union_pw_multi_aff)> &fn) const;
3426 static inline union_pw_multi_aff_list from_union_pw_multi_aff(union_pw_multi_aff el);
3427 inline union_pw_multi_aff get_at(int index) const;
3428 inline union_pw_multi_aff get_union_pw_multi_aff(int index) const;
3429 inline union_pw_multi_aff_list insert(unsigned int pos, union_pw_multi_aff el) const;
3430 inline int n_union_pw_multi_aff() const;
3431 inline union_pw_multi_aff_list reverse() const;
3432 inline union_pw_multi_aff_list set_union_pw_multi_aff(int index, union_pw_multi_aff el) const;
3433 inline int size() const;
3434 inline union_pw_multi_aff_list swap(unsigned int pos1, unsigned int pos2) const;
3435 };
3436
3437 // declarations for isl::union_pw_qpolynomial
3438 inline union_pw_qpolynomial manage(__isl_take isl_union_pw_qpolynomial *ptr);
3439 inline union_pw_qpolynomial manage_copy(__isl_keep isl_union_pw_qpolynomial *ptr);
3440
3441 class union_pw_qpolynomial {
3442 friend inline union_pw_qpolynomial manage(__isl_take isl_union_pw_qpolynomial *ptr);
3443 friend inline union_pw_qpolynomial manage_copy(__isl_keep isl_union_pw_qpolynomial *ptr);
3444
3445 isl_union_pw_qpolynomial *ptr = nullptr;
3446
3447 inline explicit union_pw_qpolynomial(__isl_take isl_union_pw_qpolynomial *ptr);
3448
3449 public:
3450 inline /* implicit */ union_pw_qpolynomial();
3451 inline /* implicit */ union_pw_qpolynomial(const union_pw_qpolynomial &obj);
3452 inline /* implicit */ union_pw_qpolynomial(std::nullptr_t);
3453 inline explicit union_pw_qpolynomial(ctx ctx, const std::string &str);
3454 inline union_pw_qpolynomial &operator=(union_pw_qpolynomial obj);
3455 inline ~union_pw_qpolynomial();
3456 inline __isl_give isl_union_pw_qpolynomial *copy() const &;
3457 inline __isl_give isl_union_pw_qpolynomial *copy() && = delete;
3458 inline __isl_keep isl_union_pw_qpolynomial *get() const;
3459 inline __isl_give isl_union_pw_qpolynomial *release();
3460 inline bool is_null() const;
3461 inline explicit operator bool() const;
3462 inline ctx get_ctx() const;
3463 inline std::string to_str() const;
3464
3465 inline union_pw_qpolynomial add(union_pw_qpolynomial upwqp2) const;
3466 inline union_pw_qpolynomial add_pw_qpolynomial(pw_qpolynomial pwqp) const;
3467 inline union_pw_qpolynomial align_params(space model) const;
3468 inline union_pw_qpolynomial coalesce() const;
3469 inline unsigned int dim(isl::dim type) const;
3470 inline union_set domain() const;
3471 inline union_pw_qpolynomial drop_dims(isl::dim type, unsigned int first, unsigned int n) const;
3472 inline val eval(point pnt) const;
3473 inline pw_qpolynomial extract_pw_qpolynomial(space dim) const;
3474 inline int find_dim_by_name(isl::dim type, const std::string &name) const;
3475 inline stat foreach_pw_qpolynomial(const std::function<stat(pw_qpolynomial)> &fn) const;
3476 static inline union_pw_qpolynomial from_pw_qpolynomial(pw_qpolynomial pwqp);
3477 inline pw_qpolynomial_list get_pw_qpolynomial_list() const;
3478 inline space get_space() const;
3479 inline union_pw_qpolynomial gist(union_set context) const;
3480 inline union_pw_qpolynomial gist_params(set context) const;
3481 inline union_pw_qpolynomial intersect_domain(union_set uset) const;
3482 inline union_pw_qpolynomial intersect_params(set set) const;
3483 inline boolean involves_nan() const;
3484 inline union_pw_qpolynomial mul(union_pw_qpolynomial upwqp2) const;
3485 inline int n_pw_qpolynomial() const;
3486 inline union_pw_qpolynomial neg() const;
3487 inline boolean plain_is_equal(const union_pw_qpolynomial &upwqp2) const;
3488 inline union_pw_qpolynomial reset_user() const;
3489 inline union_pw_qpolynomial scale_down_val(val v) const;
3490 inline union_pw_qpolynomial scale_val(val v) const;
3491 inline union_pw_qpolynomial sub(union_pw_qpolynomial upwqp2) const;
3492 inline union_pw_qpolynomial subtract_domain(union_set uset) const;
3493 inline union_pw_qpolynomial to_polynomial(int sign) const;
3494 static inline union_pw_qpolynomial zero(space dim);
3495 };
3496
3497 // declarations for isl::union_set
3498 inline union_set manage(__isl_take isl_union_set *ptr);
3499 inline union_set manage_copy(__isl_keep isl_union_set *ptr);
3500
3501 class union_set {
3502 friend inline union_set manage(__isl_take isl_union_set *ptr);
3503 friend inline union_set manage_copy(__isl_keep isl_union_set *ptr);
3504
3505 isl_union_set *ptr = nullptr;
3506
3507 inline explicit union_set(__isl_take isl_union_set *ptr);
3508
3509 public:
3510 inline /* implicit */ union_set();
3511 inline /* implicit */ union_set(const union_set &obj);
3512 inline /* implicit */ union_set(std::nullptr_t);
3513 inline /* implicit */ union_set(basic_set bset);
3514 inline /* implicit */ union_set(set set);
3515 inline /* implicit */ union_set(point pnt);
3516 inline explicit union_set(ctx ctx, const std::string &str);
3517 inline union_set &operator=(union_set obj);
3518 inline ~union_set();
3519 inline __isl_give isl_union_set *copy() const &;
3520 inline __isl_give isl_union_set *copy() && = delete;
3521 inline __isl_keep isl_union_set *get() const;
3522 inline __isl_give isl_union_set *release();
3523 inline bool is_null() const;
3524 inline explicit operator bool() const;
3525 inline ctx get_ctx() const;
3526 inline std::string to_str() const;
3527 inline void dump() const;
3528
3529 inline union_set add_set(set set) const;
3530 inline union_set affine_hull() const;
3531 inline union_set align_params(space model) const;
3532 inline union_set apply(union_map umap) const;
3533 inline union_set coalesce() const;
3534 inline union_set coefficients() const;
3535 inline schedule compute_schedule(union_map validity, union_map proximity) const;
3536 inline boolean contains(const space &space) const;
3537 inline union_set detect_equalities() const;
3538 inline unsigned int dim(isl::dim type) const;
3539 static inline union_set empty(space space);
3540 inline set extract_set(space dim) const;
3541 inline stat foreach_point(const std::function<stat(point)> &fn) const;
3542 inline stat foreach_set(const std::function<stat(set)> &fn) const;
3543 inline basic_set_list get_basic_set_list() const;
3544 inline uint32_t get_hash() const;
3545 inline set_list get_set_list() const;
3546 inline space get_space() const;
3547 inline union_set gist(union_set context) const;
3548 inline union_set gist_params(set set) const;
3549 inline union_map identity() const;
3550 inline union_pw_multi_aff identity_union_pw_multi_aff() const;
3551 inline union_set intersect(union_set uset2) const;
3552 inline union_set intersect_params(set set) const;
3553 inline boolean is_disjoint(const union_set &uset2) const;
3554 inline boolean is_empty() const;
3555 inline boolean is_equal(const union_set &uset2) const;
3556 inline boolean is_params() const;
3557 inline boolean is_strict_subset(const union_set &uset2) const;
3558 inline boolean is_subset(const union_set &uset2) const;
3559 inline union_map lex_ge_union_set(union_set uset2) const;
3560 inline union_map lex_gt_union_set(union_set uset2) const;
3561 inline union_map lex_le_union_set(union_set uset2) const;
3562 inline union_map lex_lt_union_set(union_set uset2) const;
3563 inline union_set lexmax() const;
3564 inline union_set lexmin() const;
3565 inline multi_val min_multi_union_pw_aff(const multi_union_pw_aff &obj) const;
3566 inline int n_set() const;
3567 inline set params() const;
3568 inline union_set polyhedral_hull() const;
3569 inline union_set preimage(multi_aff ma) const;
3570 inline union_set preimage(pw_multi_aff pma) const;
3571 inline union_set preimage(union_pw_multi_aff upma) const;
3572 inline union_set product(union_set uset2) const;
3573 inline union_set project_out(isl::dim type, unsigned int first, unsigned int n) const;
3574 inline union_set remove_divs() const;
3575 inline union_set remove_redundancies() const;
3576 inline union_set reset_user() const;
3577 inline basic_set sample() const;
3578 inline point sample_point() const;
3579 inline union_set simple_hull() const;
3580 inline union_set solutions() const;
3581 inline union_set subtract(union_set uset2) const;
3582 inline union_set unite(union_set uset2) const;
3583 inline union_set universe() const;
3584 inline union_map unwrap() const;
3585 inline union_map wrapped_domain_map() const;
3586 };
3587
3588 // declarations for isl::union_set_list
3589 inline union_set_list manage(__isl_take isl_union_set_list *ptr);
3590 inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
3591
3592 class union_set_list {
3593 friend inline union_set_list manage(__isl_take isl_union_set_list *ptr);
3594 friend inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr);
3595
3596 isl_union_set_list *ptr = nullptr;
3597
3598 inline explicit union_set_list(__isl_take isl_union_set_list *ptr);
3599
3600 public:
3601 inline /* implicit */ union_set_list();
3602 inline /* implicit */ union_set_list(const union_set_list &obj);
3603 inline /* implicit */ union_set_list(std::nullptr_t);
3604 inline union_set_list &operator=(union_set_list obj);
3605 inline ~union_set_list();
3606 inline __isl_give isl_union_set_list *copy() const &;
3607 inline __isl_give isl_union_set_list *copy() && = delete;
3608 inline __isl_keep isl_union_set_list *get() const;
3609 inline __isl_give isl_union_set_list *release();
3610 inline bool is_null() const;
3611 inline explicit operator bool() const;
3612 inline ctx get_ctx() const;
3613 inline void dump() const;
3614
3615 inline union_set_list add(union_set el) const;
3616 static inline union_set_list alloc(ctx ctx, int n);
3617 inline union_set_list concat(union_set_list list2) const;
3618 inline union_set_list drop(unsigned int first, unsigned int n) const;
3619 inline stat foreach(const std::function<stat(union_set)> &fn) const;
3620 static inline union_set_list from_union_set(union_set el);
3621 inline union_set get_at(int index) const;
3622 inline union_set get_union_set(int index) const;
3623 inline union_set_list insert(unsigned int pos, union_set el) const;
3624 inline int n_union_set() const;
3625 inline union_set_list reverse() const;
3626 inline union_set_list set_union_set(int index, union_set el) const;
3627 inline int size() const;
3628 inline union_set_list swap(unsigned int pos1, unsigned int pos2) const;
3629 inline union_set unite() const;
3630 };
3631
3632 // declarations for isl::val
3633 inline val manage(__isl_take isl_val *ptr);
3634 inline val manage_copy(__isl_keep isl_val *ptr);
3635
3636 class val {
3637 friend inline val manage(__isl_take isl_val *ptr);
3638 friend inline val manage_copy(__isl_keep isl_val *ptr);
3639
3640 isl_val *ptr = nullptr;
3641
3642 inline explicit val(__isl_take isl_val *ptr);
3643
3644 public:
3645 inline /* implicit */ val();
3646 inline /* implicit */ val(const val &obj);
3647 inline /* implicit */ val(std::nullptr_t);
3648 inline explicit val(ctx ctx, const std::string &str);
3649 inline explicit val(ctx ctx, long i);
3650 inline val &operator=(val obj);
3651 inline ~val();
3652 inline __isl_give isl_val *copy() const &;
3653 inline __isl_give isl_val *copy() && = delete;
3654 inline __isl_keep isl_val *get() const;
3655 inline __isl_give isl_val *release();
3656 inline bool is_null() const;
3657 inline explicit operator bool() const;
3658 inline ctx get_ctx() const;
3659 inline std::string to_str() const;
3660 inline void dump() const;
3661
3662 inline val abs() const;
3663 inline boolean abs_eq(const val &v2) const;
3664 inline val add(val v2) const;
3665 inline val add_ui(unsigned long v2) const;
3666 inline val ceil() const;
3667 inline int cmp_si(long i) const;
3668 inline val div(val v2) const;
3669 inline val div_ui(unsigned long v2) const;
3670 inline boolean eq(const val &v2) const;
3671 inline val floor() const;
3672 inline val gcd(val v2) const;
3673 inline boolean ge(const val &v2) const;
3674 inline uint32_t get_hash() const;
3675 inline long get_num_si() const;
3676 inline boolean gt(const val &v2) const;
3677 inline boolean gt_si(long i) const;
3678 static inline val infty(ctx ctx);
3679 static inline val int_from_ui(ctx ctx, unsigned long u);
3680 inline val inv() const;
3681 inline boolean is_divisible_by(const val &v2) const;
3682 inline boolean is_infty() const;
3683 inline boolean is_int() const;
3684 inline boolean is_nan() const;
3685 inline boolean is_neg() const;
3686 inline boolean is_neginfty() const;
3687 inline boolean is_negone() const;
3688 inline boolean is_nonneg() const;
3689 inline boolean is_nonpos() const;
3690 inline boolean is_one() const;
3691 inline boolean is_pos() const;
3692 inline boolean is_rat() const;
3693 inline boolean is_zero() const;
3694 inline boolean le(const val &v2) const;
3695 inline boolean lt(const val &v2) const;
3696 inline val max(val v2) const;
3697 inline val min(val v2) const;
3698 inline val mod(val v2) const;
3699 inline val mul(val v2) const;
3700 inline val mul_ui(unsigned long v2) const;
3701 inline size_t n_abs_num_chunks(size_t size) const;
3702 static inline val nan(ctx ctx);
3703 inline boolean ne(const val &v2) const;
3704 inline val neg() const;
3705 static inline val neginfty(ctx ctx);
3706 static inline val negone(ctx ctx);
3707 static inline val one(ctx ctx);
3708 inline val pow2() const;
3709 inline val set_si(long i) const;
3710 inline int sgn() const;
3711 inline val sub(val v2) const;
3712 inline val sub_ui(unsigned long v2) const;
3713 inline val trunc() const;
3714 static inline val zero(ctx ctx);
3715 };
3716
3717 // declarations for isl::val_list
3718 inline val_list manage(__isl_take isl_val_list *ptr);
3719 inline val_list manage_copy(__isl_keep isl_val_list *ptr);
3720
3721 class val_list {
3722 friend inline val_list manage(__isl_take isl_val_list *ptr);
3723 friend inline val_list manage_copy(__isl_keep isl_val_list *ptr);
3724
3725 isl_val_list *ptr = nullptr;
3726
3727 inline explicit val_list(__isl_take isl_val_list *ptr);
3728
3729 public:
3730 inline /* implicit */ val_list();
3731 inline /* implicit */ val_list(const val_list &obj);
3732 inline /* implicit */ val_list(std::nullptr_t);
3733 inline val_list &operator=(val_list obj);
3734 inline ~val_list();
3735 inline __isl_give isl_val_list *copy() const &;
3736 inline __isl_give isl_val_list *copy() && = delete;
3737 inline __isl_keep isl_val_list *get() const;
3738 inline __isl_give isl_val_list *release();
3739 inline bool is_null() const;
3740 inline explicit operator bool() const;
3741 inline ctx get_ctx() const;
3742 inline void dump() const;
3743
3744 inline val_list add(val el) const;
3745 static inline val_list alloc(ctx ctx, int n);
3746 inline val_list concat(val_list list2) const;
3747 inline val_list drop(unsigned int first, unsigned int n) const;
3748 inline stat foreach(const std::function<stat(val)> &fn) const;
3749 static inline val_list from_val(val el);
3750 inline val get_at(int index) const;
3751 inline val get_val(int index) const;
3752 inline val_list insert(unsigned int pos, val el) const;
3753 inline int n_val() const;
3754 inline val_list reverse() const;
3755 inline val_list set_val(int index, val el) const;
3756 inline int size() const;
3757 inline val_list swap(unsigned int pos1, unsigned int pos2) const;
3758 };
3759
3760 // declarations for isl::vec
3761 inline vec manage(__isl_take isl_vec *ptr);
3762 inline vec manage_copy(__isl_keep isl_vec *ptr);
3763
3764 class vec {
3765 friend inline vec manage(__isl_take isl_vec *ptr);
3766 friend inline vec manage_copy(__isl_keep isl_vec *ptr);
3767
3768 isl_vec *ptr = nullptr;
3769
3770 inline explicit vec(__isl_take isl_vec *ptr);
3771
3772 public:
3773 inline /* implicit */ vec();
3774 inline /* implicit */ vec(const vec &obj);
3775 inline /* implicit */ vec(std::nullptr_t);
3776 inline vec &operator=(vec obj);
3777 inline ~vec();
3778 inline __isl_give isl_vec *copy() const &;
3779 inline __isl_give isl_vec *copy() && = delete;
3780 inline __isl_keep isl_vec *get() const;
3781 inline __isl_give isl_vec *release();
3782 inline bool is_null() const;
3783 inline explicit operator bool() const;
3784 inline ctx get_ctx() const;
3785 inline void dump() const;
3786
3787 inline vec add(vec vec2) const;
3788 inline vec add_els(unsigned int n) const;
3789 static inline vec alloc(ctx ctx, unsigned int size);
3790 inline vec ceil() const;
3791 inline vec clr() const;
3792 inline int cmp_element(const vec &vec2, int pos) const;
3793 inline vec concat(vec vec2) const;
3794 inline vec drop_els(unsigned int pos, unsigned int n) const;
3795 inline vec extend(unsigned int size) const;
3796 inline val get_element_val(int pos) const;
3797 inline vec insert_els(unsigned int pos, unsigned int n) const;
3798 inline vec insert_zero_els(unsigned int pos, unsigned int n) const;
3799 inline boolean is_equal(const vec &vec2) const;
3800 inline vec mat_product(mat mat) const;
3801 inline vec move_els(unsigned int dst_col, unsigned int src_col, unsigned int n) const;
3802 inline vec neg() const;
3803 inline vec set_element_si(int pos, int v) const;
3804 inline vec set_element_val(int pos, val v) const;
3805 inline vec set_si(int v) const;
3806 inline vec set_val(val v) const;
3807 inline int size() const;
3808 inline vec sort() const;
3809 static inline vec zero(ctx ctx, unsigned int size);
3810 inline vec zero_extend(unsigned int size) const;
3811 };
3812
3813 // implementations for isl::aff
manage(__isl_take isl_aff * ptr)3814 aff manage(__isl_take isl_aff *ptr) {
3815 return aff(ptr);
3816 }
manage_copy(__isl_keep isl_aff * ptr)3817 aff manage_copy(__isl_keep isl_aff *ptr) {
3818 ptr = isl_aff_copy(ptr);
3819 return aff(ptr);
3820 }
3821
aff()3822 aff::aff()
3823 : ptr(nullptr) {}
3824
aff(const aff & obj)3825 aff::aff(const aff &obj)
3826 : ptr(nullptr)
3827 {
3828 ptr = obj.copy();
3829 }
aff(std::nullptr_t)3830 aff::aff(std::nullptr_t)
3831 : ptr(nullptr) {}
3832
3833
aff(__isl_take isl_aff * ptr)3834 aff::aff(__isl_take isl_aff *ptr)
3835 : ptr(ptr) {}
3836
aff(local_space ls)3837 aff::aff(local_space ls)
3838 {
3839 auto res = isl_aff_zero_on_domain(ls.release());
3840 ptr = res;
3841 }
aff(local_space ls,val val)3842 aff::aff(local_space ls, val val)
3843 {
3844 auto res = isl_aff_val_on_domain(ls.release(), val.release());
3845 ptr = res;
3846 }
aff(ctx ctx,const std::string & str)3847 aff::aff(ctx ctx, const std::string &str)
3848 {
3849 auto res = isl_aff_read_from_str(ctx.release(), str.c_str());
3850 ptr = res;
3851 }
3852
3853 aff &aff::operator=(aff obj) {
3854 std::swap(this->ptr, obj.ptr);
3855 return *this;
3856 }
3857
~aff()3858 aff::~aff() {
3859 if (ptr)
3860 isl_aff_free(ptr);
3861 }
3862
copy()3863 __isl_give isl_aff *aff::copy() const & {
3864 return isl_aff_copy(ptr);
3865 }
3866
get()3867 __isl_keep isl_aff *aff::get() const {
3868 return ptr;
3869 }
3870
release()3871 __isl_give isl_aff *aff::release() {
3872 isl_aff *tmp = ptr;
3873 ptr = nullptr;
3874 return tmp;
3875 }
3876
is_null()3877 bool aff::is_null() const {
3878 return ptr == nullptr;
3879 }
3880 aff::operator bool() const {
3881 return !is_null();
3882 }
3883
3884
get_ctx()3885 ctx aff::get_ctx() const {
3886 return ctx(isl_aff_get_ctx(ptr));
3887 }
to_str()3888 std::string aff::to_str() const {
3889 char *Tmp = isl_aff_to_str(get());
3890 if (!Tmp)
3891 return "";
3892 std::string S(Tmp);
3893 free(Tmp);
3894 return S;
3895 }
3896
3897
dump()3898 void aff::dump() const {
3899 isl_aff_dump(get());
3900 }
3901
3902
add(aff aff2)3903 aff aff::add(aff aff2) const
3904 {
3905 auto res = isl_aff_add(copy(), aff2.release());
3906 return manage(res);
3907 }
3908
add_coefficient_si(isl::dim type,int pos,int v)3909 aff aff::add_coefficient_si(isl::dim type, int pos, int v) const
3910 {
3911 auto res = isl_aff_add_coefficient_si(copy(), static_cast<enum isl_dim_type>(type), pos, v);
3912 return manage(res);
3913 }
3914
add_coefficient_val(isl::dim type,int pos,val v)3915 aff aff::add_coefficient_val(isl::dim type, int pos, val v) const
3916 {
3917 auto res = isl_aff_add_coefficient_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
3918 return manage(res);
3919 }
3920
add_constant_num_si(int v)3921 aff aff::add_constant_num_si(int v) const
3922 {
3923 auto res = isl_aff_add_constant_num_si(copy(), v);
3924 return manage(res);
3925 }
3926
add_constant_si(int v)3927 aff aff::add_constant_si(int v) const
3928 {
3929 auto res = isl_aff_add_constant_si(copy(), v);
3930 return manage(res);
3931 }
3932
add_constant_val(val v)3933 aff aff::add_constant_val(val v) const
3934 {
3935 auto res = isl_aff_add_constant_val(copy(), v.release());
3936 return manage(res);
3937 }
3938
add_dims(isl::dim type,unsigned int n)3939 aff aff::add_dims(isl::dim type, unsigned int n) const
3940 {
3941 auto res = isl_aff_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
3942 return manage(res);
3943 }
3944
align_params(space model)3945 aff aff::align_params(space model) const
3946 {
3947 auto res = isl_aff_align_params(copy(), model.release());
3948 return manage(res);
3949 }
3950
ceil()3951 aff aff::ceil() const
3952 {
3953 auto res = isl_aff_ceil(copy());
3954 return manage(res);
3955 }
3956
coefficient_sgn(isl::dim type,int pos)3957 int aff::coefficient_sgn(isl::dim type, int pos) const
3958 {
3959 auto res = isl_aff_coefficient_sgn(get(), static_cast<enum isl_dim_type>(type), pos);
3960 return res;
3961 }
3962
dim(isl::dim type)3963 int aff::dim(isl::dim type) const
3964 {
3965 auto res = isl_aff_dim(get(), static_cast<enum isl_dim_type>(type));
3966 return res;
3967 }
3968
div(aff aff2)3969 aff aff::div(aff aff2) const
3970 {
3971 auto res = isl_aff_div(copy(), aff2.release());
3972 return manage(res);
3973 }
3974
drop_dims(isl::dim type,unsigned int first,unsigned int n)3975 aff aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
3976 {
3977 auto res = isl_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
3978 return manage(res);
3979 }
3980
eq_basic_set(aff aff2)3981 basic_set aff::eq_basic_set(aff aff2) const
3982 {
3983 auto res = isl_aff_eq_basic_set(copy(), aff2.release());
3984 return manage(res);
3985 }
3986
eq_set(aff aff2)3987 set aff::eq_set(aff aff2) const
3988 {
3989 auto res = isl_aff_eq_set(copy(), aff2.release());
3990 return manage(res);
3991 }
3992
eval(point pnt)3993 val aff::eval(point pnt) const
3994 {
3995 auto res = isl_aff_eval(copy(), pnt.release());
3996 return manage(res);
3997 }
3998
find_dim_by_name(isl::dim type,const std::string & name)3999 int aff::find_dim_by_name(isl::dim type, const std::string &name) const
4000 {
4001 auto res = isl_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
4002 return res;
4003 }
4004
floor()4005 aff aff::floor() const
4006 {
4007 auto res = isl_aff_floor(copy());
4008 return manage(res);
4009 }
4010
from_range()4011 aff aff::from_range() const
4012 {
4013 auto res = isl_aff_from_range(copy());
4014 return manage(res);
4015 }
4016
ge_basic_set(aff aff2)4017 basic_set aff::ge_basic_set(aff aff2) const
4018 {
4019 auto res = isl_aff_ge_basic_set(copy(), aff2.release());
4020 return manage(res);
4021 }
4022
ge_set(aff aff2)4023 set aff::ge_set(aff aff2) const
4024 {
4025 auto res = isl_aff_ge_set(copy(), aff2.release());
4026 return manage(res);
4027 }
4028
get_coefficient_val(isl::dim type,int pos)4029 val aff::get_coefficient_val(isl::dim type, int pos) const
4030 {
4031 auto res = isl_aff_get_coefficient_val(get(), static_cast<enum isl_dim_type>(type), pos);
4032 return manage(res);
4033 }
4034
get_constant_val()4035 val aff::get_constant_val() const
4036 {
4037 auto res = isl_aff_get_constant_val(get());
4038 return manage(res);
4039 }
4040
get_denominator_val()4041 val aff::get_denominator_val() const
4042 {
4043 auto res = isl_aff_get_denominator_val(get());
4044 return manage(res);
4045 }
4046
get_dim_name(isl::dim type,unsigned int pos)4047 std::string aff::get_dim_name(isl::dim type, unsigned int pos) const
4048 {
4049 auto res = isl_aff_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
4050 std::string tmp(res);
4051 return tmp;
4052 }
4053
get_div(int pos)4054 aff aff::get_div(int pos) const
4055 {
4056 auto res = isl_aff_get_div(get(), pos);
4057 return manage(res);
4058 }
4059
get_domain_local_space()4060 local_space aff::get_domain_local_space() const
4061 {
4062 auto res = isl_aff_get_domain_local_space(get());
4063 return manage(res);
4064 }
4065
get_domain_space()4066 space aff::get_domain_space() const
4067 {
4068 auto res = isl_aff_get_domain_space(get());
4069 return manage(res);
4070 }
4071
get_hash()4072 uint32_t aff::get_hash() const
4073 {
4074 auto res = isl_aff_get_hash(get());
4075 return res;
4076 }
4077
get_local_space()4078 local_space aff::get_local_space() const
4079 {
4080 auto res = isl_aff_get_local_space(get());
4081 return manage(res);
4082 }
4083
get_space()4084 space aff::get_space() const
4085 {
4086 auto res = isl_aff_get_space(get());
4087 return manage(res);
4088 }
4089
gist(set context)4090 aff aff::gist(set context) const
4091 {
4092 auto res = isl_aff_gist(copy(), context.release());
4093 return manage(res);
4094 }
4095
gist_params(set context)4096 aff aff::gist_params(set context) const
4097 {
4098 auto res = isl_aff_gist_params(copy(), context.release());
4099 return manage(res);
4100 }
4101
gt_basic_set(aff aff2)4102 basic_set aff::gt_basic_set(aff aff2) const
4103 {
4104 auto res = isl_aff_gt_basic_set(copy(), aff2.release());
4105 return manage(res);
4106 }
4107
gt_set(aff aff2)4108 set aff::gt_set(aff aff2) const
4109 {
4110 auto res = isl_aff_gt_set(copy(), aff2.release());
4111 return manage(res);
4112 }
4113
insert_dims(isl::dim type,unsigned int first,unsigned int n)4114 aff aff::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
4115 {
4116 auto res = isl_aff_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
4117 return manage(res);
4118 }
4119
involves_dims(isl::dim type,unsigned int first,unsigned int n)4120 boolean aff::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
4121 {
4122 auto res = isl_aff_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
4123 return manage(res);
4124 }
4125
is_cst()4126 boolean aff::is_cst() const
4127 {
4128 auto res = isl_aff_is_cst(get());
4129 return manage(res);
4130 }
4131
is_nan()4132 boolean aff::is_nan() const
4133 {
4134 auto res = isl_aff_is_nan(get());
4135 return manage(res);
4136 }
4137
le_basic_set(aff aff2)4138 basic_set aff::le_basic_set(aff aff2) const
4139 {
4140 auto res = isl_aff_le_basic_set(copy(), aff2.release());
4141 return manage(res);
4142 }
4143
le_set(aff aff2)4144 set aff::le_set(aff aff2) const
4145 {
4146 auto res = isl_aff_le_set(copy(), aff2.release());
4147 return manage(res);
4148 }
4149
lt_basic_set(aff aff2)4150 basic_set aff::lt_basic_set(aff aff2) const
4151 {
4152 auto res = isl_aff_lt_basic_set(copy(), aff2.release());
4153 return manage(res);
4154 }
4155
lt_set(aff aff2)4156 set aff::lt_set(aff aff2) const
4157 {
4158 auto res = isl_aff_lt_set(copy(), aff2.release());
4159 return manage(res);
4160 }
4161
mod(val mod)4162 aff aff::mod(val mod) const
4163 {
4164 auto res = isl_aff_mod_val(copy(), mod.release());
4165 return manage(res);
4166 }
4167
move_dims(isl::dim dst_type,unsigned int dst_pos,isl::dim src_type,unsigned int src_pos,unsigned int n)4168 aff aff::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
4169 {
4170 auto res = isl_aff_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
4171 return manage(res);
4172 }
4173
mul(aff aff2)4174 aff aff::mul(aff aff2) const
4175 {
4176 auto res = isl_aff_mul(copy(), aff2.release());
4177 return manage(res);
4178 }
4179
nan_on_domain(local_space ls)4180 aff aff::nan_on_domain(local_space ls)
4181 {
4182 auto res = isl_aff_nan_on_domain(ls.release());
4183 return manage(res);
4184 }
4185
ne_set(aff aff2)4186 set aff::ne_set(aff aff2) const
4187 {
4188 auto res = isl_aff_ne_set(copy(), aff2.release());
4189 return manage(res);
4190 }
4191
neg()4192 aff aff::neg() const
4193 {
4194 auto res = isl_aff_neg(copy());
4195 return manage(res);
4196 }
4197
neg_basic_set()4198 basic_set aff::neg_basic_set() const
4199 {
4200 auto res = isl_aff_neg_basic_set(copy());
4201 return manage(res);
4202 }
4203
param_on_domain_space_id(space space,id id)4204 aff aff::param_on_domain_space_id(space space, id id)
4205 {
4206 auto res = isl_aff_param_on_domain_space_id(space.release(), id.release());
4207 return manage(res);
4208 }
4209
plain_is_equal(const aff & aff2)4210 boolean aff::plain_is_equal(const aff &aff2) const
4211 {
4212 auto res = isl_aff_plain_is_equal(get(), aff2.get());
4213 return manage(res);
4214 }
4215
plain_is_zero()4216 boolean aff::plain_is_zero() const
4217 {
4218 auto res = isl_aff_plain_is_zero(get());
4219 return manage(res);
4220 }
4221
project_domain_on_params()4222 aff aff::project_domain_on_params() const
4223 {
4224 auto res = isl_aff_project_domain_on_params(copy());
4225 return manage(res);
4226 }
4227
pullback(multi_aff ma)4228 aff aff::pullback(multi_aff ma) const
4229 {
4230 auto res = isl_aff_pullback_multi_aff(copy(), ma.release());
4231 return manage(res);
4232 }
4233
pullback_aff(aff aff2)4234 aff aff::pullback_aff(aff aff2) const
4235 {
4236 auto res = isl_aff_pullback_aff(copy(), aff2.release());
4237 return manage(res);
4238 }
4239
scale(val v)4240 aff aff::scale(val v) const
4241 {
4242 auto res = isl_aff_scale_val(copy(), v.release());
4243 return manage(res);
4244 }
4245
scale_down(val v)4246 aff aff::scale_down(val v) const
4247 {
4248 auto res = isl_aff_scale_down_val(copy(), v.release());
4249 return manage(res);
4250 }
4251
scale_down_ui(unsigned int f)4252 aff aff::scale_down_ui(unsigned int f) const
4253 {
4254 auto res = isl_aff_scale_down_ui(copy(), f);
4255 return manage(res);
4256 }
4257
set_coefficient_si(isl::dim type,int pos,int v)4258 aff aff::set_coefficient_si(isl::dim type, int pos, int v) const
4259 {
4260 auto res = isl_aff_set_coefficient_si(copy(), static_cast<enum isl_dim_type>(type), pos, v);
4261 return manage(res);
4262 }
4263
set_coefficient_val(isl::dim type,int pos,val v)4264 aff aff::set_coefficient_val(isl::dim type, int pos, val v) const
4265 {
4266 auto res = isl_aff_set_coefficient_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
4267 return manage(res);
4268 }
4269
set_constant_si(int v)4270 aff aff::set_constant_si(int v) const
4271 {
4272 auto res = isl_aff_set_constant_si(copy(), v);
4273 return manage(res);
4274 }
4275
set_constant_val(val v)4276 aff aff::set_constant_val(val v) const
4277 {
4278 auto res = isl_aff_set_constant_val(copy(), v.release());
4279 return manage(res);
4280 }
4281
set_dim_id(isl::dim type,unsigned int pos,id id)4282 aff aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
4283 {
4284 auto res = isl_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
4285 return manage(res);
4286 }
4287
set_tuple_id(isl::dim type,id id)4288 aff aff::set_tuple_id(isl::dim type, id id) const
4289 {
4290 auto res = isl_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
4291 return manage(res);
4292 }
4293
sub(aff aff2)4294 aff aff::sub(aff aff2) const
4295 {
4296 auto res = isl_aff_sub(copy(), aff2.release());
4297 return manage(res);
4298 }
4299
var_on_domain(local_space ls,isl::dim type,unsigned int pos)4300 aff aff::var_on_domain(local_space ls, isl::dim type, unsigned int pos)
4301 {
4302 auto res = isl_aff_var_on_domain(ls.release(), static_cast<enum isl_dim_type>(type), pos);
4303 return manage(res);
4304 }
4305
zero_basic_set()4306 basic_set aff::zero_basic_set() const
4307 {
4308 auto res = isl_aff_zero_basic_set(copy());
4309 return manage(res);
4310 }
4311
4312 // implementations for isl::aff_list
manage(__isl_take isl_aff_list * ptr)4313 aff_list manage(__isl_take isl_aff_list *ptr) {
4314 return aff_list(ptr);
4315 }
manage_copy(__isl_keep isl_aff_list * ptr)4316 aff_list manage_copy(__isl_keep isl_aff_list *ptr) {
4317 ptr = isl_aff_list_copy(ptr);
4318 return aff_list(ptr);
4319 }
4320
aff_list()4321 aff_list::aff_list()
4322 : ptr(nullptr) {}
4323
aff_list(const aff_list & obj)4324 aff_list::aff_list(const aff_list &obj)
4325 : ptr(nullptr)
4326 {
4327 ptr = obj.copy();
4328 }
aff_list(std::nullptr_t)4329 aff_list::aff_list(std::nullptr_t)
4330 : ptr(nullptr) {}
4331
4332
aff_list(__isl_take isl_aff_list * ptr)4333 aff_list::aff_list(__isl_take isl_aff_list *ptr)
4334 : ptr(ptr) {}
4335
4336
4337 aff_list &aff_list::operator=(aff_list obj) {
4338 std::swap(this->ptr, obj.ptr);
4339 return *this;
4340 }
4341
~aff_list()4342 aff_list::~aff_list() {
4343 if (ptr)
4344 isl_aff_list_free(ptr);
4345 }
4346
copy()4347 __isl_give isl_aff_list *aff_list::copy() const & {
4348 return isl_aff_list_copy(ptr);
4349 }
4350
get()4351 __isl_keep isl_aff_list *aff_list::get() const {
4352 return ptr;
4353 }
4354
release()4355 __isl_give isl_aff_list *aff_list::release() {
4356 isl_aff_list *tmp = ptr;
4357 ptr = nullptr;
4358 return tmp;
4359 }
4360
is_null()4361 bool aff_list::is_null() const {
4362 return ptr == nullptr;
4363 }
4364 aff_list::operator bool() const {
4365 return !is_null();
4366 }
4367
4368
get_ctx()4369 ctx aff_list::get_ctx() const {
4370 return ctx(isl_aff_list_get_ctx(ptr));
4371 }
4372
dump()4373 void aff_list::dump() const {
4374 isl_aff_list_dump(get());
4375 }
4376
4377
add(aff el)4378 aff_list aff_list::add(aff el) const
4379 {
4380 auto res = isl_aff_list_add(copy(), el.release());
4381 return manage(res);
4382 }
4383
alloc(ctx ctx,int n)4384 aff_list aff_list::alloc(ctx ctx, int n)
4385 {
4386 auto res = isl_aff_list_alloc(ctx.release(), n);
4387 return manage(res);
4388 }
4389
concat(aff_list list2)4390 aff_list aff_list::concat(aff_list list2) const
4391 {
4392 auto res = isl_aff_list_concat(copy(), list2.release());
4393 return manage(res);
4394 }
4395
drop(unsigned int first,unsigned int n)4396 aff_list aff_list::drop(unsigned int first, unsigned int n) const
4397 {
4398 auto res = isl_aff_list_drop(copy(), first, n);
4399 return manage(res);
4400 }
4401
foreach(const std::function<stat (aff)> & fn)4402 stat aff_list::foreach(const std::function<stat(aff)> &fn) const
4403 {
4404 struct fn_data {
4405 const std::function<stat(aff)> *func;
4406 } fn_data = { &fn };
4407 auto fn_lambda = [](isl_aff *arg_0, void *arg_1) -> isl_stat {
4408 auto *data = static_cast<struct fn_data *>(arg_1);
4409 stat ret = (*data->func)(manage(arg_0));
4410 return ret.release();
4411 };
4412 auto res = isl_aff_list_foreach(get(), fn_lambda, &fn_data);
4413 return manage(res);
4414 }
4415
from_aff(aff el)4416 aff_list aff_list::from_aff(aff el)
4417 {
4418 auto res = isl_aff_list_from_aff(el.release());
4419 return manage(res);
4420 }
4421
get_aff(int index)4422 aff aff_list::get_aff(int index) const
4423 {
4424 auto res = isl_aff_list_get_aff(get(), index);
4425 return manage(res);
4426 }
4427
get_at(int index)4428 aff aff_list::get_at(int index) const
4429 {
4430 auto res = isl_aff_list_get_at(get(), index);
4431 return manage(res);
4432 }
4433
insert(unsigned int pos,aff el)4434 aff_list aff_list::insert(unsigned int pos, aff el) const
4435 {
4436 auto res = isl_aff_list_insert(copy(), pos, el.release());
4437 return manage(res);
4438 }
4439
n_aff()4440 int aff_list::n_aff() const
4441 {
4442 auto res = isl_aff_list_n_aff(get());
4443 return res;
4444 }
4445
reverse()4446 aff_list aff_list::reverse() const
4447 {
4448 auto res = isl_aff_list_reverse(copy());
4449 return manage(res);
4450 }
4451
set_aff(int index,aff el)4452 aff_list aff_list::set_aff(int index, aff el) const
4453 {
4454 auto res = isl_aff_list_set_aff(copy(), index, el.release());
4455 return manage(res);
4456 }
4457
size()4458 int aff_list::size() const
4459 {
4460 auto res = isl_aff_list_size(get());
4461 return res;
4462 }
4463
swap(unsigned int pos1,unsigned int pos2)4464 aff_list aff_list::swap(unsigned int pos1, unsigned int pos2) const
4465 {
4466 auto res = isl_aff_list_swap(copy(), pos1, pos2);
4467 return manage(res);
4468 }
4469
4470 // implementations for isl::ast_build
manage(__isl_take isl_ast_build * ptr)4471 ast_build manage(__isl_take isl_ast_build *ptr) {
4472 return ast_build(ptr);
4473 }
manage_copy(__isl_keep isl_ast_build * ptr)4474 ast_build manage_copy(__isl_keep isl_ast_build *ptr) {
4475 ptr = isl_ast_build_copy(ptr);
4476 return ast_build(ptr);
4477 }
4478
ast_build()4479 ast_build::ast_build()
4480 : ptr(nullptr) {}
4481
ast_build(const ast_build & obj)4482 ast_build::ast_build(const ast_build &obj)
4483 : ptr(nullptr)
4484 {
4485 ptr = obj.copy();
4486 }
ast_build(std::nullptr_t)4487 ast_build::ast_build(std::nullptr_t)
4488 : ptr(nullptr) {}
4489
4490
ast_build(__isl_take isl_ast_build * ptr)4491 ast_build::ast_build(__isl_take isl_ast_build *ptr)
4492 : ptr(ptr) {}
4493
ast_build(ctx ctx)4494 ast_build::ast_build(ctx ctx)
4495 {
4496 auto res = isl_ast_build_alloc(ctx.release());
4497 ptr = res;
4498 }
4499
4500 ast_build &ast_build::operator=(ast_build obj) {
4501 std::swap(this->ptr, obj.ptr);
4502 return *this;
4503 }
4504
~ast_build()4505 ast_build::~ast_build() {
4506 if (ptr)
4507 isl_ast_build_free(ptr);
4508 }
4509
copy()4510 __isl_give isl_ast_build *ast_build::copy() const & {
4511 return isl_ast_build_copy(ptr);
4512 }
4513
get()4514 __isl_keep isl_ast_build *ast_build::get() const {
4515 return ptr;
4516 }
4517
release()4518 __isl_give isl_ast_build *ast_build::release() {
4519 isl_ast_build *tmp = ptr;
4520 ptr = nullptr;
4521 return tmp;
4522 }
4523
is_null()4524 bool ast_build::is_null() const {
4525 return ptr == nullptr;
4526 }
4527 ast_build::operator bool() const {
4528 return !is_null();
4529 }
4530
4531
get_ctx()4532 ctx ast_build::get_ctx() const {
4533 return ctx(isl_ast_build_get_ctx(ptr));
4534 }
4535
4536
access_from(pw_multi_aff pma)4537 ast_expr ast_build::access_from(pw_multi_aff pma) const
4538 {
4539 auto res = isl_ast_build_access_from_pw_multi_aff(get(), pma.release());
4540 return manage(res);
4541 }
4542
access_from(multi_pw_aff mpa)4543 ast_expr ast_build::access_from(multi_pw_aff mpa) const
4544 {
4545 auto res = isl_ast_build_access_from_multi_pw_aff(get(), mpa.release());
4546 return manage(res);
4547 }
4548
ast_from_schedule(union_map schedule)4549 ast_node ast_build::ast_from_schedule(union_map schedule) const
4550 {
4551 auto res = isl_ast_build_ast_from_schedule(get(), schedule.release());
4552 return manage(res);
4553 }
4554
call_from(pw_multi_aff pma)4555 ast_expr ast_build::call_from(pw_multi_aff pma) const
4556 {
4557 auto res = isl_ast_build_call_from_pw_multi_aff(get(), pma.release());
4558 return manage(res);
4559 }
4560
call_from(multi_pw_aff mpa)4561 ast_expr ast_build::call_from(multi_pw_aff mpa) const
4562 {
4563 auto res = isl_ast_build_call_from_multi_pw_aff(get(), mpa.release());
4564 return manage(res);
4565 }
4566
expr_from(set set)4567 ast_expr ast_build::expr_from(set set) const
4568 {
4569 auto res = isl_ast_build_expr_from_set(get(), set.release());
4570 return manage(res);
4571 }
4572
expr_from(pw_aff pa)4573 ast_expr ast_build::expr_from(pw_aff pa) const
4574 {
4575 auto res = isl_ast_build_expr_from_pw_aff(get(), pa.release());
4576 return manage(res);
4577 }
4578
from_context(set set)4579 ast_build ast_build::from_context(set set)
4580 {
4581 auto res = isl_ast_build_from_context(set.release());
4582 return manage(res);
4583 }
4584
get_schedule()4585 union_map ast_build::get_schedule() const
4586 {
4587 auto res = isl_ast_build_get_schedule(get());
4588 return manage(res);
4589 }
4590
get_schedule_space()4591 space ast_build::get_schedule_space() const
4592 {
4593 auto res = isl_ast_build_get_schedule_space(get());
4594 return manage(res);
4595 }
4596
node_from_schedule(schedule schedule)4597 ast_node ast_build::node_from_schedule(schedule schedule) const
4598 {
4599 auto res = isl_ast_build_node_from_schedule(get(), schedule.release());
4600 return manage(res);
4601 }
4602
node_from_schedule_map(union_map schedule)4603 ast_node ast_build::node_from_schedule_map(union_map schedule) const
4604 {
4605 auto res = isl_ast_build_node_from_schedule_map(get(), schedule.release());
4606 return manage(res);
4607 }
4608
4609 ast_build ast_build::restrict(set set) const
4610 {
4611 auto res = isl_ast_build_restrict(copy(), set.release());
4612 return manage(res);
4613 }
4614
4615 // implementations for isl::ast_expr
manage(__isl_take isl_ast_expr * ptr)4616 ast_expr manage(__isl_take isl_ast_expr *ptr) {
4617 return ast_expr(ptr);
4618 }
manage_copy(__isl_keep isl_ast_expr * ptr)4619 ast_expr manage_copy(__isl_keep isl_ast_expr *ptr) {
4620 ptr = isl_ast_expr_copy(ptr);
4621 return ast_expr(ptr);
4622 }
4623
ast_expr()4624 ast_expr::ast_expr()
4625 : ptr(nullptr) {}
4626
ast_expr(const ast_expr & obj)4627 ast_expr::ast_expr(const ast_expr &obj)
4628 : ptr(nullptr)
4629 {
4630 ptr = obj.copy();
4631 }
ast_expr(std::nullptr_t)4632 ast_expr::ast_expr(std::nullptr_t)
4633 : ptr(nullptr) {}
4634
4635
ast_expr(__isl_take isl_ast_expr * ptr)4636 ast_expr::ast_expr(__isl_take isl_ast_expr *ptr)
4637 : ptr(ptr) {}
4638
4639
4640 ast_expr &ast_expr::operator=(ast_expr obj) {
4641 std::swap(this->ptr, obj.ptr);
4642 return *this;
4643 }
4644
~ast_expr()4645 ast_expr::~ast_expr() {
4646 if (ptr)
4647 isl_ast_expr_free(ptr);
4648 }
4649
copy()4650 __isl_give isl_ast_expr *ast_expr::copy() const & {
4651 return isl_ast_expr_copy(ptr);
4652 }
4653
get()4654 __isl_keep isl_ast_expr *ast_expr::get() const {
4655 return ptr;
4656 }
4657
release()4658 __isl_give isl_ast_expr *ast_expr::release() {
4659 isl_ast_expr *tmp = ptr;
4660 ptr = nullptr;
4661 return tmp;
4662 }
4663
is_null()4664 bool ast_expr::is_null() const {
4665 return ptr == nullptr;
4666 }
4667 ast_expr::operator bool() const {
4668 return !is_null();
4669 }
4670
4671
get_ctx()4672 ctx ast_expr::get_ctx() const {
4673 return ctx(isl_ast_expr_get_ctx(ptr));
4674 }
to_str()4675 std::string ast_expr::to_str() const {
4676 char *Tmp = isl_ast_expr_to_str(get());
4677 if (!Tmp)
4678 return "";
4679 std::string S(Tmp);
4680 free(Tmp);
4681 return S;
4682 }
4683
4684
dump()4685 void ast_expr::dump() const {
4686 isl_ast_expr_dump(get());
4687 }
4688
4689
access(ast_expr_list indices)4690 ast_expr ast_expr::access(ast_expr_list indices) const
4691 {
4692 auto res = isl_ast_expr_access(copy(), indices.release());
4693 return manage(res);
4694 }
4695
add(ast_expr expr2)4696 ast_expr ast_expr::add(ast_expr expr2) const
4697 {
4698 auto res = isl_ast_expr_add(copy(), expr2.release());
4699 return manage(res);
4700 }
4701
address_of()4702 ast_expr ast_expr::address_of() const
4703 {
4704 auto res = isl_ast_expr_address_of(copy());
4705 return manage(res);
4706 }
4707
call(ast_expr_list arguments)4708 ast_expr ast_expr::call(ast_expr_list arguments) const
4709 {
4710 auto res = isl_ast_expr_call(copy(), arguments.release());
4711 return manage(res);
4712 }
4713
div(ast_expr expr2)4714 ast_expr ast_expr::div(ast_expr expr2) const
4715 {
4716 auto res = isl_ast_expr_div(copy(), expr2.release());
4717 return manage(res);
4718 }
4719
eq(ast_expr expr2)4720 ast_expr ast_expr::eq(ast_expr expr2) const
4721 {
4722 auto res = isl_ast_expr_eq(copy(), expr2.release());
4723 return manage(res);
4724 }
4725
from_id(id id)4726 ast_expr ast_expr::from_id(id id)
4727 {
4728 auto res = isl_ast_expr_from_id(id.release());
4729 return manage(res);
4730 }
4731
from_val(val v)4732 ast_expr ast_expr::from_val(val v)
4733 {
4734 auto res = isl_ast_expr_from_val(v.release());
4735 return manage(res);
4736 }
4737
ge(ast_expr expr2)4738 ast_expr ast_expr::ge(ast_expr expr2) const
4739 {
4740 auto res = isl_ast_expr_ge(copy(), expr2.release());
4741 return manage(res);
4742 }
4743
get_id()4744 id ast_expr::get_id() const
4745 {
4746 auto res = isl_ast_expr_get_id(get());
4747 return manage(res);
4748 }
4749
get_op_arg(int pos)4750 ast_expr ast_expr::get_op_arg(int pos) const
4751 {
4752 auto res = isl_ast_expr_get_op_arg(get(), pos);
4753 return manage(res);
4754 }
4755
get_op_n_arg()4756 int ast_expr::get_op_n_arg() const
4757 {
4758 auto res = isl_ast_expr_get_op_n_arg(get());
4759 return res;
4760 }
4761
get_val()4762 val ast_expr::get_val() const
4763 {
4764 auto res = isl_ast_expr_get_val(get());
4765 return manage(res);
4766 }
4767
gt(ast_expr expr2)4768 ast_expr ast_expr::gt(ast_expr expr2) const
4769 {
4770 auto res = isl_ast_expr_gt(copy(), expr2.release());
4771 return manage(res);
4772 }
4773
is_equal(const ast_expr & expr2)4774 boolean ast_expr::is_equal(const ast_expr &expr2) const
4775 {
4776 auto res = isl_ast_expr_is_equal(get(), expr2.get());
4777 return manage(res);
4778 }
4779
le(ast_expr expr2)4780 ast_expr ast_expr::le(ast_expr expr2) const
4781 {
4782 auto res = isl_ast_expr_le(copy(), expr2.release());
4783 return manage(res);
4784 }
4785
lt(ast_expr expr2)4786 ast_expr ast_expr::lt(ast_expr expr2) const
4787 {
4788 auto res = isl_ast_expr_lt(copy(), expr2.release());
4789 return manage(res);
4790 }
4791
mul(ast_expr expr2)4792 ast_expr ast_expr::mul(ast_expr expr2) const
4793 {
4794 auto res = isl_ast_expr_mul(copy(), expr2.release());
4795 return manage(res);
4796 }
4797
neg()4798 ast_expr ast_expr::neg() const
4799 {
4800 auto res = isl_ast_expr_neg(copy());
4801 return manage(res);
4802 }
4803
pdiv_q(ast_expr expr2)4804 ast_expr ast_expr::pdiv_q(ast_expr expr2) const
4805 {
4806 auto res = isl_ast_expr_pdiv_q(copy(), expr2.release());
4807 return manage(res);
4808 }
4809
pdiv_r(ast_expr expr2)4810 ast_expr ast_expr::pdiv_r(ast_expr expr2) const
4811 {
4812 auto res = isl_ast_expr_pdiv_r(copy(), expr2.release());
4813 return manage(res);
4814 }
4815
set_op_arg(int pos,ast_expr arg)4816 ast_expr ast_expr::set_op_arg(int pos, ast_expr arg) const
4817 {
4818 auto res = isl_ast_expr_set_op_arg(copy(), pos, arg.release());
4819 return manage(res);
4820 }
4821
sub(ast_expr expr2)4822 ast_expr ast_expr::sub(ast_expr expr2) const
4823 {
4824 auto res = isl_ast_expr_sub(copy(), expr2.release());
4825 return manage(res);
4826 }
4827
substitute_ids(id_to_ast_expr id2expr)4828 ast_expr ast_expr::substitute_ids(id_to_ast_expr id2expr) const
4829 {
4830 auto res = isl_ast_expr_substitute_ids(copy(), id2expr.release());
4831 return manage(res);
4832 }
4833
to_C_str()4834 std::string ast_expr::to_C_str() const
4835 {
4836 auto res = isl_ast_expr_to_C_str(get());
4837 std::string tmp(res);
4838 free(res);
4839 return tmp;
4840 }
4841
4842 // implementations for isl::ast_expr_list
manage(__isl_take isl_ast_expr_list * ptr)4843 ast_expr_list manage(__isl_take isl_ast_expr_list *ptr) {
4844 return ast_expr_list(ptr);
4845 }
manage_copy(__isl_keep isl_ast_expr_list * ptr)4846 ast_expr_list manage_copy(__isl_keep isl_ast_expr_list *ptr) {
4847 ptr = isl_ast_expr_list_copy(ptr);
4848 return ast_expr_list(ptr);
4849 }
4850
ast_expr_list()4851 ast_expr_list::ast_expr_list()
4852 : ptr(nullptr) {}
4853
ast_expr_list(const ast_expr_list & obj)4854 ast_expr_list::ast_expr_list(const ast_expr_list &obj)
4855 : ptr(nullptr)
4856 {
4857 ptr = obj.copy();
4858 }
ast_expr_list(std::nullptr_t)4859 ast_expr_list::ast_expr_list(std::nullptr_t)
4860 : ptr(nullptr) {}
4861
4862
ast_expr_list(__isl_take isl_ast_expr_list * ptr)4863 ast_expr_list::ast_expr_list(__isl_take isl_ast_expr_list *ptr)
4864 : ptr(ptr) {}
4865
4866
4867 ast_expr_list &ast_expr_list::operator=(ast_expr_list obj) {
4868 std::swap(this->ptr, obj.ptr);
4869 return *this;
4870 }
4871
~ast_expr_list()4872 ast_expr_list::~ast_expr_list() {
4873 if (ptr)
4874 isl_ast_expr_list_free(ptr);
4875 }
4876
copy()4877 __isl_give isl_ast_expr_list *ast_expr_list::copy() const & {
4878 return isl_ast_expr_list_copy(ptr);
4879 }
4880
get()4881 __isl_keep isl_ast_expr_list *ast_expr_list::get() const {
4882 return ptr;
4883 }
4884
release()4885 __isl_give isl_ast_expr_list *ast_expr_list::release() {
4886 isl_ast_expr_list *tmp = ptr;
4887 ptr = nullptr;
4888 return tmp;
4889 }
4890
is_null()4891 bool ast_expr_list::is_null() const {
4892 return ptr == nullptr;
4893 }
4894 ast_expr_list::operator bool() const {
4895 return !is_null();
4896 }
4897
4898
get_ctx()4899 ctx ast_expr_list::get_ctx() const {
4900 return ctx(isl_ast_expr_list_get_ctx(ptr));
4901 }
4902
dump()4903 void ast_expr_list::dump() const {
4904 isl_ast_expr_list_dump(get());
4905 }
4906
4907
add(ast_expr el)4908 ast_expr_list ast_expr_list::add(ast_expr el) const
4909 {
4910 auto res = isl_ast_expr_list_add(copy(), el.release());
4911 return manage(res);
4912 }
4913
alloc(ctx ctx,int n)4914 ast_expr_list ast_expr_list::alloc(ctx ctx, int n)
4915 {
4916 auto res = isl_ast_expr_list_alloc(ctx.release(), n);
4917 return manage(res);
4918 }
4919
concat(ast_expr_list list2)4920 ast_expr_list ast_expr_list::concat(ast_expr_list list2) const
4921 {
4922 auto res = isl_ast_expr_list_concat(copy(), list2.release());
4923 return manage(res);
4924 }
4925
drop(unsigned int first,unsigned int n)4926 ast_expr_list ast_expr_list::drop(unsigned int first, unsigned int n) const
4927 {
4928 auto res = isl_ast_expr_list_drop(copy(), first, n);
4929 return manage(res);
4930 }
4931
foreach(const std::function<stat (ast_expr)> & fn)4932 stat ast_expr_list::foreach(const std::function<stat(ast_expr)> &fn) const
4933 {
4934 struct fn_data {
4935 const std::function<stat(ast_expr)> *func;
4936 } fn_data = { &fn };
4937 auto fn_lambda = [](isl_ast_expr *arg_0, void *arg_1) -> isl_stat {
4938 auto *data = static_cast<struct fn_data *>(arg_1);
4939 stat ret = (*data->func)(manage(arg_0));
4940 return ret.release();
4941 };
4942 auto res = isl_ast_expr_list_foreach(get(), fn_lambda, &fn_data);
4943 return manage(res);
4944 }
4945
from_ast_expr(ast_expr el)4946 ast_expr_list ast_expr_list::from_ast_expr(ast_expr el)
4947 {
4948 auto res = isl_ast_expr_list_from_ast_expr(el.release());
4949 return manage(res);
4950 }
4951
get_ast_expr(int index)4952 ast_expr ast_expr_list::get_ast_expr(int index) const
4953 {
4954 auto res = isl_ast_expr_list_get_ast_expr(get(), index);
4955 return manage(res);
4956 }
4957
get_at(int index)4958 ast_expr ast_expr_list::get_at(int index) const
4959 {
4960 auto res = isl_ast_expr_list_get_at(get(), index);
4961 return manage(res);
4962 }
4963
insert(unsigned int pos,ast_expr el)4964 ast_expr_list ast_expr_list::insert(unsigned int pos, ast_expr el) const
4965 {
4966 auto res = isl_ast_expr_list_insert(copy(), pos, el.release());
4967 return manage(res);
4968 }
4969
n_ast_expr()4970 int ast_expr_list::n_ast_expr() const
4971 {
4972 auto res = isl_ast_expr_list_n_ast_expr(get());
4973 return res;
4974 }
4975
reverse()4976 ast_expr_list ast_expr_list::reverse() const
4977 {
4978 auto res = isl_ast_expr_list_reverse(copy());
4979 return manage(res);
4980 }
4981
set_ast_expr(int index,ast_expr el)4982 ast_expr_list ast_expr_list::set_ast_expr(int index, ast_expr el) const
4983 {
4984 auto res = isl_ast_expr_list_set_ast_expr(copy(), index, el.release());
4985 return manage(res);
4986 }
4987
size()4988 int ast_expr_list::size() const
4989 {
4990 auto res = isl_ast_expr_list_size(get());
4991 return res;
4992 }
4993
swap(unsigned int pos1,unsigned int pos2)4994 ast_expr_list ast_expr_list::swap(unsigned int pos1, unsigned int pos2) const
4995 {
4996 auto res = isl_ast_expr_list_swap(copy(), pos1, pos2);
4997 return manage(res);
4998 }
4999
5000 // implementations for isl::ast_node
manage(__isl_take isl_ast_node * ptr)5001 ast_node manage(__isl_take isl_ast_node *ptr) {
5002 return ast_node(ptr);
5003 }
manage_copy(__isl_keep isl_ast_node * ptr)5004 ast_node manage_copy(__isl_keep isl_ast_node *ptr) {
5005 ptr = isl_ast_node_copy(ptr);
5006 return ast_node(ptr);
5007 }
5008
ast_node()5009 ast_node::ast_node()
5010 : ptr(nullptr) {}
5011
ast_node(const ast_node & obj)5012 ast_node::ast_node(const ast_node &obj)
5013 : ptr(nullptr)
5014 {
5015 ptr = obj.copy();
5016 }
ast_node(std::nullptr_t)5017 ast_node::ast_node(std::nullptr_t)
5018 : ptr(nullptr) {}
5019
5020
ast_node(__isl_take isl_ast_node * ptr)5021 ast_node::ast_node(__isl_take isl_ast_node *ptr)
5022 : ptr(ptr) {}
5023
5024
5025 ast_node &ast_node::operator=(ast_node obj) {
5026 std::swap(this->ptr, obj.ptr);
5027 return *this;
5028 }
5029
~ast_node()5030 ast_node::~ast_node() {
5031 if (ptr)
5032 isl_ast_node_free(ptr);
5033 }
5034
copy()5035 __isl_give isl_ast_node *ast_node::copy() const & {
5036 return isl_ast_node_copy(ptr);
5037 }
5038
get()5039 __isl_keep isl_ast_node *ast_node::get() const {
5040 return ptr;
5041 }
5042
release()5043 __isl_give isl_ast_node *ast_node::release() {
5044 isl_ast_node *tmp = ptr;
5045 ptr = nullptr;
5046 return tmp;
5047 }
5048
is_null()5049 bool ast_node::is_null() const {
5050 return ptr == nullptr;
5051 }
5052 ast_node::operator bool() const {
5053 return !is_null();
5054 }
5055
5056
get_ctx()5057 ctx ast_node::get_ctx() const {
5058 return ctx(isl_ast_node_get_ctx(ptr));
5059 }
to_str()5060 std::string ast_node::to_str() const {
5061 char *Tmp = isl_ast_node_to_str(get());
5062 if (!Tmp)
5063 return "";
5064 std::string S(Tmp);
5065 free(Tmp);
5066 return S;
5067 }
5068
5069
dump()5070 void ast_node::dump() const {
5071 isl_ast_node_dump(get());
5072 }
5073
5074
alloc_user(ast_expr expr)5075 ast_node ast_node::alloc_user(ast_expr expr)
5076 {
5077 auto res = isl_ast_node_alloc_user(expr.release());
5078 return manage(res);
5079 }
5080
block_get_children()5081 ast_node_list ast_node::block_get_children() const
5082 {
5083 auto res = isl_ast_node_block_get_children(get());
5084 return manage(res);
5085 }
5086
for_get_body()5087 ast_node ast_node::for_get_body() const
5088 {
5089 auto res = isl_ast_node_for_get_body(get());
5090 return manage(res);
5091 }
5092
for_get_cond()5093 ast_expr ast_node::for_get_cond() const
5094 {
5095 auto res = isl_ast_node_for_get_cond(get());
5096 return manage(res);
5097 }
5098
for_get_inc()5099 ast_expr ast_node::for_get_inc() const
5100 {
5101 auto res = isl_ast_node_for_get_inc(get());
5102 return manage(res);
5103 }
5104
for_get_init()5105 ast_expr ast_node::for_get_init() const
5106 {
5107 auto res = isl_ast_node_for_get_init(get());
5108 return manage(res);
5109 }
5110
for_get_iterator()5111 ast_expr ast_node::for_get_iterator() const
5112 {
5113 auto res = isl_ast_node_for_get_iterator(get());
5114 return manage(res);
5115 }
5116
for_is_degenerate()5117 boolean ast_node::for_is_degenerate() const
5118 {
5119 auto res = isl_ast_node_for_is_degenerate(get());
5120 return manage(res);
5121 }
5122
get_annotation()5123 id ast_node::get_annotation() const
5124 {
5125 auto res = isl_ast_node_get_annotation(get());
5126 return manage(res);
5127 }
5128
if_get_cond()5129 ast_expr ast_node::if_get_cond() const
5130 {
5131 auto res = isl_ast_node_if_get_cond(get());
5132 return manage(res);
5133 }
5134
if_get_else()5135 ast_node ast_node::if_get_else() const
5136 {
5137 auto res = isl_ast_node_if_get_else(get());
5138 return manage(res);
5139 }
5140
if_get_then()5141 ast_node ast_node::if_get_then() const
5142 {
5143 auto res = isl_ast_node_if_get_then(get());
5144 return manage(res);
5145 }
5146
if_has_else()5147 boolean ast_node::if_has_else() const
5148 {
5149 auto res = isl_ast_node_if_has_else(get());
5150 return manage(res);
5151 }
5152
mark_get_id()5153 id ast_node::mark_get_id() const
5154 {
5155 auto res = isl_ast_node_mark_get_id(get());
5156 return manage(res);
5157 }
5158
mark_get_node()5159 ast_node ast_node::mark_get_node() const
5160 {
5161 auto res = isl_ast_node_mark_get_node(get());
5162 return manage(res);
5163 }
5164
set_annotation(id annotation)5165 ast_node ast_node::set_annotation(id annotation) const
5166 {
5167 auto res = isl_ast_node_set_annotation(copy(), annotation.release());
5168 return manage(res);
5169 }
5170
to_C_str()5171 std::string ast_node::to_C_str() const
5172 {
5173 auto res = isl_ast_node_to_C_str(get());
5174 std::string tmp(res);
5175 free(res);
5176 return tmp;
5177 }
5178
user_get_expr()5179 ast_expr ast_node::user_get_expr() const
5180 {
5181 auto res = isl_ast_node_user_get_expr(get());
5182 return manage(res);
5183 }
5184
5185 // implementations for isl::ast_node_list
manage(__isl_take isl_ast_node_list * ptr)5186 ast_node_list manage(__isl_take isl_ast_node_list *ptr) {
5187 return ast_node_list(ptr);
5188 }
manage_copy(__isl_keep isl_ast_node_list * ptr)5189 ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr) {
5190 ptr = isl_ast_node_list_copy(ptr);
5191 return ast_node_list(ptr);
5192 }
5193
ast_node_list()5194 ast_node_list::ast_node_list()
5195 : ptr(nullptr) {}
5196
ast_node_list(const ast_node_list & obj)5197 ast_node_list::ast_node_list(const ast_node_list &obj)
5198 : ptr(nullptr)
5199 {
5200 ptr = obj.copy();
5201 }
ast_node_list(std::nullptr_t)5202 ast_node_list::ast_node_list(std::nullptr_t)
5203 : ptr(nullptr) {}
5204
5205
ast_node_list(__isl_take isl_ast_node_list * ptr)5206 ast_node_list::ast_node_list(__isl_take isl_ast_node_list *ptr)
5207 : ptr(ptr) {}
5208
5209
5210 ast_node_list &ast_node_list::operator=(ast_node_list obj) {
5211 std::swap(this->ptr, obj.ptr);
5212 return *this;
5213 }
5214
~ast_node_list()5215 ast_node_list::~ast_node_list() {
5216 if (ptr)
5217 isl_ast_node_list_free(ptr);
5218 }
5219
copy()5220 __isl_give isl_ast_node_list *ast_node_list::copy() const & {
5221 return isl_ast_node_list_copy(ptr);
5222 }
5223
get()5224 __isl_keep isl_ast_node_list *ast_node_list::get() const {
5225 return ptr;
5226 }
5227
release()5228 __isl_give isl_ast_node_list *ast_node_list::release() {
5229 isl_ast_node_list *tmp = ptr;
5230 ptr = nullptr;
5231 return tmp;
5232 }
5233
is_null()5234 bool ast_node_list::is_null() const {
5235 return ptr == nullptr;
5236 }
5237 ast_node_list::operator bool() const {
5238 return !is_null();
5239 }
5240
5241
get_ctx()5242 ctx ast_node_list::get_ctx() const {
5243 return ctx(isl_ast_node_list_get_ctx(ptr));
5244 }
5245
dump()5246 void ast_node_list::dump() const {
5247 isl_ast_node_list_dump(get());
5248 }
5249
5250
add(ast_node el)5251 ast_node_list ast_node_list::add(ast_node el) const
5252 {
5253 auto res = isl_ast_node_list_add(copy(), el.release());
5254 return manage(res);
5255 }
5256
alloc(ctx ctx,int n)5257 ast_node_list ast_node_list::alloc(ctx ctx, int n)
5258 {
5259 auto res = isl_ast_node_list_alloc(ctx.release(), n);
5260 return manage(res);
5261 }
5262
concat(ast_node_list list2)5263 ast_node_list ast_node_list::concat(ast_node_list list2) const
5264 {
5265 auto res = isl_ast_node_list_concat(copy(), list2.release());
5266 return manage(res);
5267 }
5268
drop(unsigned int first,unsigned int n)5269 ast_node_list ast_node_list::drop(unsigned int first, unsigned int n) const
5270 {
5271 auto res = isl_ast_node_list_drop(copy(), first, n);
5272 return manage(res);
5273 }
5274
foreach(const std::function<stat (ast_node)> & fn)5275 stat ast_node_list::foreach(const std::function<stat(ast_node)> &fn) const
5276 {
5277 struct fn_data {
5278 const std::function<stat(ast_node)> *func;
5279 } fn_data = { &fn };
5280 auto fn_lambda = [](isl_ast_node *arg_0, void *arg_1) -> isl_stat {
5281 auto *data = static_cast<struct fn_data *>(arg_1);
5282 stat ret = (*data->func)(manage(arg_0));
5283 return ret.release();
5284 };
5285 auto res = isl_ast_node_list_foreach(get(), fn_lambda, &fn_data);
5286 return manage(res);
5287 }
5288
from_ast_node(ast_node el)5289 ast_node_list ast_node_list::from_ast_node(ast_node el)
5290 {
5291 auto res = isl_ast_node_list_from_ast_node(el.release());
5292 return manage(res);
5293 }
5294
get_ast_node(int index)5295 ast_node ast_node_list::get_ast_node(int index) const
5296 {
5297 auto res = isl_ast_node_list_get_ast_node(get(), index);
5298 return manage(res);
5299 }
5300
get_at(int index)5301 ast_node ast_node_list::get_at(int index) const
5302 {
5303 auto res = isl_ast_node_list_get_at(get(), index);
5304 return manage(res);
5305 }
5306
insert(unsigned int pos,ast_node el)5307 ast_node_list ast_node_list::insert(unsigned int pos, ast_node el) const
5308 {
5309 auto res = isl_ast_node_list_insert(copy(), pos, el.release());
5310 return manage(res);
5311 }
5312
n_ast_node()5313 int ast_node_list::n_ast_node() const
5314 {
5315 auto res = isl_ast_node_list_n_ast_node(get());
5316 return res;
5317 }
5318
reverse()5319 ast_node_list ast_node_list::reverse() const
5320 {
5321 auto res = isl_ast_node_list_reverse(copy());
5322 return manage(res);
5323 }
5324
set_ast_node(int index,ast_node el)5325 ast_node_list ast_node_list::set_ast_node(int index, ast_node el) const
5326 {
5327 auto res = isl_ast_node_list_set_ast_node(copy(), index, el.release());
5328 return manage(res);
5329 }
5330
size()5331 int ast_node_list::size() const
5332 {
5333 auto res = isl_ast_node_list_size(get());
5334 return res;
5335 }
5336
swap(unsigned int pos1,unsigned int pos2)5337 ast_node_list ast_node_list::swap(unsigned int pos1, unsigned int pos2) const
5338 {
5339 auto res = isl_ast_node_list_swap(copy(), pos1, pos2);
5340 return manage(res);
5341 }
5342
5343 // implementations for isl::basic_map
manage(__isl_take isl_basic_map * ptr)5344 basic_map manage(__isl_take isl_basic_map *ptr) {
5345 return basic_map(ptr);
5346 }
manage_copy(__isl_keep isl_basic_map * ptr)5347 basic_map manage_copy(__isl_keep isl_basic_map *ptr) {
5348 ptr = isl_basic_map_copy(ptr);
5349 return basic_map(ptr);
5350 }
5351
basic_map()5352 basic_map::basic_map()
5353 : ptr(nullptr) {}
5354
basic_map(const basic_map & obj)5355 basic_map::basic_map(const basic_map &obj)
5356 : ptr(nullptr)
5357 {
5358 ptr = obj.copy();
5359 }
basic_map(std::nullptr_t)5360 basic_map::basic_map(std::nullptr_t)
5361 : ptr(nullptr) {}
5362
5363
basic_map(__isl_take isl_basic_map * ptr)5364 basic_map::basic_map(__isl_take isl_basic_map *ptr)
5365 : ptr(ptr) {}
5366
basic_map(ctx ctx,const std::string & str)5367 basic_map::basic_map(ctx ctx, const std::string &str)
5368 {
5369 auto res = isl_basic_map_read_from_str(ctx.release(), str.c_str());
5370 ptr = res;
5371 }
5372
5373 basic_map &basic_map::operator=(basic_map obj) {
5374 std::swap(this->ptr, obj.ptr);
5375 return *this;
5376 }
5377
~basic_map()5378 basic_map::~basic_map() {
5379 if (ptr)
5380 isl_basic_map_free(ptr);
5381 }
5382
copy()5383 __isl_give isl_basic_map *basic_map::copy() const & {
5384 return isl_basic_map_copy(ptr);
5385 }
5386
get()5387 __isl_keep isl_basic_map *basic_map::get() const {
5388 return ptr;
5389 }
5390
release()5391 __isl_give isl_basic_map *basic_map::release() {
5392 isl_basic_map *tmp = ptr;
5393 ptr = nullptr;
5394 return tmp;
5395 }
5396
is_null()5397 bool basic_map::is_null() const {
5398 return ptr == nullptr;
5399 }
5400 basic_map::operator bool() const {
5401 return !is_null();
5402 }
5403
5404
get_ctx()5405 ctx basic_map::get_ctx() const {
5406 return ctx(isl_basic_map_get_ctx(ptr));
5407 }
to_str()5408 std::string basic_map::to_str() const {
5409 char *Tmp = isl_basic_map_to_str(get());
5410 if (!Tmp)
5411 return "";
5412 std::string S(Tmp);
5413 free(Tmp);
5414 return S;
5415 }
5416
5417
dump()5418 void basic_map::dump() const {
5419 isl_basic_map_dump(get());
5420 }
5421
5422
add_constraint(constraint constraint)5423 basic_map basic_map::add_constraint(constraint constraint) const
5424 {
5425 auto res = isl_basic_map_add_constraint(copy(), constraint.release());
5426 return manage(res);
5427 }
5428
add_dims(isl::dim type,unsigned int n)5429 basic_map basic_map::add_dims(isl::dim type, unsigned int n) const
5430 {
5431 auto res = isl_basic_map_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
5432 return manage(res);
5433 }
5434
affine_hull()5435 basic_map basic_map::affine_hull() const
5436 {
5437 auto res = isl_basic_map_affine_hull(copy());
5438 return manage(res);
5439 }
5440
align_params(space model)5441 basic_map basic_map::align_params(space model) const
5442 {
5443 auto res = isl_basic_map_align_params(copy(), model.release());
5444 return manage(res);
5445 }
5446
apply_domain(basic_map bmap2)5447 basic_map basic_map::apply_domain(basic_map bmap2) const
5448 {
5449 auto res = isl_basic_map_apply_domain(copy(), bmap2.release());
5450 return manage(res);
5451 }
5452
apply_range(basic_map bmap2)5453 basic_map basic_map::apply_range(basic_map bmap2) const
5454 {
5455 auto res = isl_basic_map_apply_range(copy(), bmap2.release());
5456 return manage(res);
5457 }
5458
can_curry()5459 boolean basic_map::can_curry() const
5460 {
5461 auto res = isl_basic_map_can_curry(get());
5462 return manage(res);
5463 }
5464
can_uncurry()5465 boolean basic_map::can_uncurry() const
5466 {
5467 auto res = isl_basic_map_can_uncurry(get());
5468 return manage(res);
5469 }
5470
can_zip()5471 boolean basic_map::can_zip() const
5472 {
5473 auto res = isl_basic_map_can_zip(get());
5474 return manage(res);
5475 }
5476
curry()5477 basic_map basic_map::curry() const
5478 {
5479 auto res = isl_basic_map_curry(copy());
5480 return manage(res);
5481 }
5482
deltas()5483 basic_set basic_map::deltas() const
5484 {
5485 auto res = isl_basic_map_deltas(copy());
5486 return manage(res);
5487 }
5488
deltas_map()5489 basic_map basic_map::deltas_map() const
5490 {
5491 auto res = isl_basic_map_deltas_map(copy());
5492 return manage(res);
5493 }
5494
detect_equalities()5495 basic_map basic_map::detect_equalities() const
5496 {
5497 auto res = isl_basic_map_detect_equalities(copy());
5498 return manage(res);
5499 }
5500
dim(isl::dim type)5501 unsigned int basic_map::dim(isl::dim type) const
5502 {
5503 auto res = isl_basic_map_dim(get(), static_cast<enum isl_dim_type>(type));
5504 return res;
5505 }
5506
domain()5507 basic_set basic_map::domain() const
5508 {
5509 auto res = isl_basic_map_domain(copy());
5510 return manage(res);
5511 }
5512
domain_map()5513 basic_map basic_map::domain_map() const
5514 {
5515 auto res = isl_basic_map_domain_map(copy());
5516 return manage(res);
5517 }
5518
domain_product(basic_map bmap2)5519 basic_map basic_map::domain_product(basic_map bmap2) const
5520 {
5521 auto res = isl_basic_map_domain_product(copy(), bmap2.release());
5522 return manage(res);
5523 }
5524
drop_constraints_involving_dims(isl::dim type,unsigned int first,unsigned int n)5525 basic_map basic_map::drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
5526 {
5527 auto res = isl_basic_map_drop_constraints_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
5528 return manage(res);
5529 }
5530
drop_constraints_not_involving_dims(isl::dim type,unsigned int first,unsigned int n)5531 basic_map basic_map::drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
5532 {
5533 auto res = isl_basic_map_drop_constraints_not_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
5534 return manage(res);
5535 }
5536
drop_unused_params()5537 basic_map basic_map::drop_unused_params() const
5538 {
5539 auto res = isl_basic_map_drop_unused_params(copy());
5540 return manage(res);
5541 }
5542
eliminate(isl::dim type,unsigned int first,unsigned int n)5543 basic_map basic_map::eliminate(isl::dim type, unsigned int first, unsigned int n) const
5544 {
5545 auto res = isl_basic_map_eliminate(copy(), static_cast<enum isl_dim_type>(type), first, n);
5546 return manage(res);
5547 }
5548
empty(space space)5549 basic_map basic_map::empty(space space)
5550 {
5551 auto res = isl_basic_map_empty(space.release());
5552 return manage(res);
5553 }
5554
equal(space dim,unsigned int n_equal)5555 basic_map basic_map::equal(space dim, unsigned int n_equal)
5556 {
5557 auto res = isl_basic_map_equal(dim.release(), n_equal);
5558 return manage(res);
5559 }
5560
equalities_matrix(isl::dim c1,isl::dim c2,isl::dim c3,isl::dim c4,isl::dim c5)5561 mat basic_map::equalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4, isl::dim c5) const
5562 {
5563 auto res = isl_basic_map_equalities_matrix(get(), static_cast<enum isl_dim_type>(c1), static_cast<enum isl_dim_type>(c2), static_cast<enum isl_dim_type>(c3), static_cast<enum isl_dim_type>(c4), static_cast<enum isl_dim_type>(c5));
5564 return manage(res);
5565 }
5566
equate(isl::dim type1,int pos1,isl::dim type2,int pos2)5567 basic_map basic_map::equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const
5568 {
5569 auto res = isl_basic_map_equate(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
5570 return manage(res);
5571 }
5572
find_dim_by_name(isl::dim type,const std::string & name)5573 int basic_map::find_dim_by_name(isl::dim type, const std::string &name) const
5574 {
5575 auto res = isl_basic_map_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
5576 return res;
5577 }
5578
fix_si(isl::dim type,unsigned int pos,int value)5579 basic_map basic_map::fix_si(isl::dim type, unsigned int pos, int value) const
5580 {
5581 auto res = isl_basic_map_fix_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
5582 return manage(res);
5583 }
5584
fix_val(isl::dim type,unsigned int pos,val v)5585 basic_map basic_map::fix_val(isl::dim type, unsigned int pos, val v) const
5586 {
5587 auto res = isl_basic_map_fix_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
5588 return manage(res);
5589 }
5590
flat_product(basic_map bmap2)5591 basic_map basic_map::flat_product(basic_map bmap2) const
5592 {
5593 auto res = isl_basic_map_flat_product(copy(), bmap2.release());
5594 return manage(res);
5595 }
5596
flat_range_product(basic_map bmap2)5597 basic_map basic_map::flat_range_product(basic_map bmap2) const
5598 {
5599 auto res = isl_basic_map_flat_range_product(copy(), bmap2.release());
5600 return manage(res);
5601 }
5602
flatten()5603 basic_map basic_map::flatten() const
5604 {
5605 auto res = isl_basic_map_flatten(copy());
5606 return manage(res);
5607 }
5608
flatten_domain()5609 basic_map basic_map::flatten_domain() const
5610 {
5611 auto res = isl_basic_map_flatten_domain(copy());
5612 return manage(res);
5613 }
5614
flatten_range()5615 basic_map basic_map::flatten_range() const
5616 {
5617 auto res = isl_basic_map_flatten_range(copy());
5618 return manage(res);
5619 }
5620
foreach_constraint(const std::function<stat (constraint)> & fn)5621 stat basic_map::foreach_constraint(const std::function<stat(constraint)> &fn) const
5622 {
5623 struct fn_data {
5624 const std::function<stat(constraint)> *func;
5625 } fn_data = { &fn };
5626 auto fn_lambda = [](isl_constraint *arg_0, void *arg_1) -> isl_stat {
5627 auto *data = static_cast<struct fn_data *>(arg_1);
5628 stat ret = (*data->func)(manage(arg_0));
5629 return ret.release();
5630 };
5631 auto res = isl_basic_map_foreach_constraint(get(), fn_lambda, &fn_data);
5632 return manage(res);
5633 }
5634
from_aff(aff aff)5635 basic_map basic_map::from_aff(aff aff)
5636 {
5637 auto res = isl_basic_map_from_aff(aff.release());
5638 return manage(res);
5639 }
5640
from_aff_list(space domain_space,aff_list list)5641 basic_map basic_map::from_aff_list(space domain_space, aff_list list)
5642 {
5643 auto res = isl_basic_map_from_aff_list(domain_space.release(), list.release());
5644 return manage(res);
5645 }
5646
from_constraint(constraint constraint)5647 basic_map basic_map::from_constraint(constraint constraint)
5648 {
5649 auto res = isl_basic_map_from_constraint(constraint.release());
5650 return manage(res);
5651 }
5652
from_domain(basic_set bset)5653 basic_map basic_map::from_domain(basic_set bset)
5654 {
5655 auto res = isl_basic_map_from_domain(bset.release());
5656 return manage(res);
5657 }
5658
from_domain_and_range(basic_set domain,basic_set range)5659 basic_map basic_map::from_domain_and_range(basic_set domain, basic_set range)
5660 {
5661 auto res = isl_basic_map_from_domain_and_range(domain.release(), range.release());
5662 return manage(res);
5663 }
5664
from_multi_aff(multi_aff maff)5665 basic_map basic_map::from_multi_aff(multi_aff maff)
5666 {
5667 auto res = isl_basic_map_from_multi_aff(maff.release());
5668 return manage(res);
5669 }
5670
from_qpolynomial(qpolynomial qp)5671 basic_map basic_map::from_qpolynomial(qpolynomial qp)
5672 {
5673 auto res = isl_basic_map_from_qpolynomial(qp.release());
5674 return manage(res);
5675 }
5676
from_range(basic_set bset)5677 basic_map basic_map::from_range(basic_set bset)
5678 {
5679 auto res = isl_basic_map_from_range(bset.release());
5680 return manage(res);
5681 }
5682
get_constraint_list()5683 constraint_list basic_map::get_constraint_list() const
5684 {
5685 auto res = isl_basic_map_get_constraint_list(get());
5686 return manage(res);
5687 }
5688
get_dim_name(isl::dim type,unsigned int pos)5689 std::string basic_map::get_dim_name(isl::dim type, unsigned int pos) const
5690 {
5691 auto res = isl_basic_map_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
5692 std::string tmp(res);
5693 return tmp;
5694 }
5695
get_div(int pos)5696 aff basic_map::get_div(int pos) const
5697 {
5698 auto res = isl_basic_map_get_div(get(), pos);
5699 return manage(res);
5700 }
5701
get_local_space()5702 local_space basic_map::get_local_space() const
5703 {
5704 auto res = isl_basic_map_get_local_space(get());
5705 return manage(res);
5706 }
5707
get_space()5708 space basic_map::get_space() const
5709 {
5710 auto res = isl_basic_map_get_space(get());
5711 return manage(res);
5712 }
5713
get_tuple_name(isl::dim type)5714 std::string basic_map::get_tuple_name(isl::dim type) const
5715 {
5716 auto res = isl_basic_map_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
5717 std::string tmp(res);
5718 return tmp;
5719 }
5720
gist(basic_map context)5721 basic_map basic_map::gist(basic_map context) const
5722 {
5723 auto res = isl_basic_map_gist(copy(), context.release());
5724 return manage(res);
5725 }
5726
gist_domain(basic_set context)5727 basic_map basic_map::gist_domain(basic_set context) const
5728 {
5729 auto res = isl_basic_map_gist_domain(copy(), context.release());
5730 return manage(res);
5731 }
5732
has_dim_id(isl::dim type,unsigned int pos)5733 boolean basic_map::has_dim_id(isl::dim type, unsigned int pos) const
5734 {
5735 auto res = isl_basic_map_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
5736 return manage(res);
5737 }
5738
identity(space dim)5739 basic_map basic_map::identity(space dim)
5740 {
5741 auto res = isl_basic_map_identity(dim.release());
5742 return manage(res);
5743 }
5744
image_is_bounded()5745 boolean basic_map::image_is_bounded() const
5746 {
5747 auto res = isl_basic_map_image_is_bounded(get());
5748 return manage(res);
5749 }
5750
inequalities_matrix(isl::dim c1,isl::dim c2,isl::dim c3,isl::dim c4,isl::dim c5)5751 mat basic_map::inequalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4, isl::dim c5) const
5752 {
5753 auto res = isl_basic_map_inequalities_matrix(get(), static_cast<enum isl_dim_type>(c1), static_cast<enum isl_dim_type>(c2), static_cast<enum isl_dim_type>(c3), static_cast<enum isl_dim_type>(c4), static_cast<enum isl_dim_type>(c5));
5754 return manage(res);
5755 }
5756
insert_dims(isl::dim type,unsigned int pos,unsigned int n)5757 basic_map basic_map::insert_dims(isl::dim type, unsigned int pos, unsigned int n) const
5758 {
5759 auto res = isl_basic_map_insert_dims(copy(), static_cast<enum isl_dim_type>(type), pos, n);
5760 return manage(res);
5761 }
5762
intersect(basic_map bmap2)5763 basic_map basic_map::intersect(basic_map bmap2) const
5764 {
5765 auto res = isl_basic_map_intersect(copy(), bmap2.release());
5766 return manage(res);
5767 }
5768
intersect_domain(basic_set bset)5769 basic_map basic_map::intersect_domain(basic_set bset) const
5770 {
5771 auto res = isl_basic_map_intersect_domain(copy(), bset.release());
5772 return manage(res);
5773 }
5774
intersect_range(basic_set bset)5775 basic_map basic_map::intersect_range(basic_set bset) const
5776 {
5777 auto res = isl_basic_map_intersect_range(copy(), bset.release());
5778 return manage(res);
5779 }
5780
involves_dims(isl::dim type,unsigned int first,unsigned int n)5781 boolean basic_map::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
5782 {
5783 auto res = isl_basic_map_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
5784 return manage(res);
5785 }
5786
is_disjoint(const basic_map & bmap2)5787 boolean basic_map::is_disjoint(const basic_map &bmap2) const
5788 {
5789 auto res = isl_basic_map_is_disjoint(get(), bmap2.get());
5790 return manage(res);
5791 }
5792
is_empty()5793 boolean basic_map::is_empty() const
5794 {
5795 auto res = isl_basic_map_is_empty(get());
5796 return manage(res);
5797 }
5798
is_equal(const basic_map & bmap2)5799 boolean basic_map::is_equal(const basic_map &bmap2) const
5800 {
5801 auto res = isl_basic_map_is_equal(get(), bmap2.get());
5802 return manage(res);
5803 }
5804
is_rational()5805 boolean basic_map::is_rational() const
5806 {
5807 auto res = isl_basic_map_is_rational(get());
5808 return manage(res);
5809 }
5810
is_single_valued()5811 boolean basic_map::is_single_valued() const
5812 {
5813 auto res = isl_basic_map_is_single_valued(get());
5814 return manage(res);
5815 }
5816
is_strict_subset(const basic_map & bmap2)5817 boolean basic_map::is_strict_subset(const basic_map &bmap2) const
5818 {
5819 auto res = isl_basic_map_is_strict_subset(get(), bmap2.get());
5820 return manage(res);
5821 }
5822
is_subset(const basic_map & bmap2)5823 boolean basic_map::is_subset(const basic_map &bmap2) const
5824 {
5825 auto res = isl_basic_map_is_subset(get(), bmap2.get());
5826 return manage(res);
5827 }
5828
is_universe()5829 boolean basic_map::is_universe() const
5830 {
5831 auto res = isl_basic_map_is_universe(get());
5832 return manage(res);
5833 }
5834
less_at(space dim,unsigned int pos)5835 basic_map basic_map::less_at(space dim, unsigned int pos)
5836 {
5837 auto res = isl_basic_map_less_at(dim.release(), pos);
5838 return manage(res);
5839 }
5840
lexmax()5841 map basic_map::lexmax() const
5842 {
5843 auto res = isl_basic_map_lexmax(copy());
5844 return manage(res);
5845 }
5846
lexmin()5847 map basic_map::lexmin() const
5848 {
5849 auto res = isl_basic_map_lexmin(copy());
5850 return manage(res);
5851 }
5852
lexmin_pw_multi_aff()5853 pw_multi_aff basic_map::lexmin_pw_multi_aff() const
5854 {
5855 auto res = isl_basic_map_lexmin_pw_multi_aff(copy());
5856 return manage(res);
5857 }
5858
lower_bound_si(isl::dim type,unsigned int pos,int value)5859 basic_map basic_map::lower_bound_si(isl::dim type, unsigned int pos, int value) const
5860 {
5861 auto res = isl_basic_map_lower_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
5862 return manage(res);
5863 }
5864
more_at(space dim,unsigned int pos)5865 basic_map basic_map::more_at(space dim, unsigned int pos)
5866 {
5867 auto res = isl_basic_map_more_at(dim.release(), pos);
5868 return manage(res);
5869 }
5870
move_dims(isl::dim dst_type,unsigned int dst_pos,isl::dim src_type,unsigned int src_pos,unsigned int n)5871 basic_map basic_map::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
5872 {
5873 auto res = isl_basic_map_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
5874 return manage(res);
5875 }
5876
n_constraint()5877 int basic_map::n_constraint() const
5878 {
5879 auto res = isl_basic_map_n_constraint(get());
5880 return res;
5881 }
5882
nat_universe(space dim)5883 basic_map basic_map::nat_universe(space dim)
5884 {
5885 auto res = isl_basic_map_nat_universe(dim.release());
5886 return manage(res);
5887 }
5888
neg()5889 basic_map basic_map::neg() const
5890 {
5891 auto res = isl_basic_map_neg(copy());
5892 return manage(res);
5893 }
5894
order_ge(isl::dim type1,int pos1,isl::dim type2,int pos2)5895 basic_map basic_map::order_ge(isl::dim type1, int pos1, isl::dim type2, int pos2) const
5896 {
5897 auto res = isl_basic_map_order_ge(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
5898 return manage(res);
5899 }
5900
order_gt(isl::dim type1,int pos1,isl::dim type2,int pos2)5901 basic_map basic_map::order_gt(isl::dim type1, int pos1, isl::dim type2, int pos2) const
5902 {
5903 auto res = isl_basic_map_order_gt(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
5904 return manage(res);
5905 }
5906
plain_get_val_if_fixed(isl::dim type,unsigned int pos)5907 val basic_map::plain_get_val_if_fixed(isl::dim type, unsigned int pos) const
5908 {
5909 auto res = isl_basic_map_plain_get_val_if_fixed(get(), static_cast<enum isl_dim_type>(type), pos);
5910 return manage(res);
5911 }
5912
plain_is_empty()5913 boolean basic_map::plain_is_empty() const
5914 {
5915 auto res = isl_basic_map_plain_is_empty(get());
5916 return manage(res);
5917 }
5918
plain_is_universe()5919 boolean basic_map::plain_is_universe() const
5920 {
5921 auto res = isl_basic_map_plain_is_universe(get());
5922 return manage(res);
5923 }
5924
preimage_domain_multi_aff(multi_aff ma)5925 basic_map basic_map::preimage_domain_multi_aff(multi_aff ma) const
5926 {
5927 auto res = isl_basic_map_preimage_domain_multi_aff(copy(), ma.release());
5928 return manage(res);
5929 }
5930
preimage_range_multi_aff(multi_aff ma)5931 basic_map basic_map::preimage_range_multi_aff(multi_aff ma) const
5932 {
5933 auto res = isl_basic_map_preimage_range_multi_aff(copy(), ma.release());
5934 return manage(res);
5935 }
5936
product(basic_map bmap2)5937 basic_map basic_map::product(basic_map bmap2) const
5938 {
5939 auto res = isl_basic_map_product(copy(), bmap2.release());
5940 return manage(res);
5941 }
5942
project_out(isl::dim type,unsigned int first,unsigned int n)5943 basic_map basic_map::project_out(isl::dim type, unsigned int first, unsigned int n) const
5944 {
5945 auto res = isl_basic_map_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
5946 return manage(res);
5947 }
5948
range()5949 basic_set basic_map::range() const
5950 {
5951 auto res = isl_basic_map_range(copy());
5952 return manage(res);
5953 }
5954
range_map()5955 basic_map basic_map::range_map() const
5956 {
5957 auto res = isl_basic_map_range_map(copy());
5958 return manage(res);
5959 }
5960
range_product(basic_map bmap2)5961 basic_map basic_map::range_product(basic_map bmap2) const
5962 {
5963 auto res = isl_basic_map_range_product(copy(), bmap2.release());
5964 return manage(res);
5965 }
5966
remove_dims(isl::dim type,unsigned int first,unsigned int n)5967 basic_map basic_map::remove_dims(isl::dim type, unsigned int first, unsigned int n) const
5968 {
5969 auto res = isl_basic_map_remove_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
5970 return manage(res);
5971 }
5972
remove_divs()5973 basic_map basic_map::remove_divs() const
5974 {
5975 auto res = isl_basic_map_remove_divs(copy());
5976 return manage(res);
5977 }
5978
remove_divs_involving_dims(isl::dim type,unsigned int first,unsigned int n)5979 basic_map basic_map::remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
5980 {
5981 auto res = isl_basic_map_remove_divs_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
5982 return manage(res);
5983 }
5984
remove_redundancies()5985 basic_map basic_map::remove_redundancies() const
5986 {
5987 auto res = isl_basic_map_remove_redundancies(copy());
5988 return manage(res);
5989 }
5990
reverse()5991 basic_map basic_map::reverse() const
5992 {
5993 auto res = isl_basic_map_reverse(copy());
5994 return manage(res);
5995 }
5996
sample()5997 basic_map basic_map::sample() const
5998 {
5999 auto res = isl_basic_map_sample(copy());
6000 return manage(res);
6001 }
6002
set_tuple_id(isl::dim type,id id)6003 basic_map basic_map::set_tuple_id(isl::dim type, id id) const
6004 {
6005 auto res = isl_basic_map_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
6006 return manage(res);
6007 }
6008
set_tuple_name(isl::dim type,const std::string & s)6009 basic_map basic_map::set_tuple_name(isl::dim type, const std::string &s) const
6010 {
6011 auto res = isl_basic_map_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
6012 return manage(res);
6013 }
6014
sum(basic_map bmap2)6015 basic_map basic_map::sum(basic_map bmap2) const
6016 {
6017 auto res = isl_basic_map_sum(copy(), bmap2.release());
6018 return manage(res);
6019 }
6020
uncurry()6021 basic_map basic_map::uncurry() const
6022 {
6023 auto res = isl_basic_map_uncurry(copy());
6024 return manage(res);
6025 }
6026
unite(basic_map bmap2)6027 map basic_map::unite(basic_map bmap2) const
6028 {
6029 auto res = isl_basic_map_union(copy(), bmap2.release());
6030 return manage(res);
6031 }
6032
universe(space space)6033 basic_map basic_map::universe(space space)
6034 {
6035 auto res = isl_basic_map_universe(space.release());
6036 return manage(res);
6037 }
6038
upper_bound_si(isl::dim type,unsigned int pos,int value)6039 basic_map basic_map::upper_bound_si(isl::dim type, unsigned int pos, int value) const
6040 {
6041 auto res = isl_basic_map_upper_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
6042 return manage(res);
6043 }
6044
wrap()6045 basic_set basic_map::wrap() const
6046 {
6047 auto res = isl_basic_map_wrap(copy());
6048 return manage(res);
6049 }
6050
zip()6051 basic_map basic_map::zip() const
6052 {
6053 auto res = isl_basic_map_zip(copy());
6054 return manage(res);
6055 }
6056
6057 // implementations for isl::basic_map_list
manage(__isl_take isl_basic_map_list * ptr)6058 basic_map_list manage(__isl_take isl_basic_map_list *ptr) {
6059 return basic_map_list(ptr);
6060 }
manage_copy(__isl_keep isl_basic_map_list * ptr)6061 basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr) {
6062 ptr = isl_basic_map_list_copy(ptr);
6063 return basic_map_list(ptr);
6064 }
6065
basic_map_list()6066 basic_map_list::basic_map_list()
6067 : ptr(nullptr) {}
6068
basic_map_list(const basic_map_list & obj)6069 basic_map_list::basic_map_list(const basic_map_list &obj)
6070 : ptr(nullptr)
6071 {
6072 ptr = obj.copy();
6073 }
basic_map_list(std::nullptr_t)6074 basic_map_list::basic_map_list(std::nullptr_t)
6075 : ptr(nullptr) {}
6076
6077
basic_map_list(__isl_take isl_basic_map_list * ptr)6078 basic_map_list::basic_map_list(__isl_take isl_basic_map_list *ptr)
6079 : ptr(ptr) {}
6080
6081
6082 basic_map_list &basic_map_list::operator=(basic_map_list obj) {
6083 std::swap(this->ptr, obj.ptr);
6084 return *this;
6085 }
6086
~basic_map_list()6087 basic_map_list::~basic_map_list() {
6088 if (ptr)
6089 isl_basic_map_list_free(ptr);
6090 }
6091
copy()6092 __isl_give isl_basic_map_list *basic_map_list::copy() const & {
6093 return isl_basic_map_list_copy(ptr);
6094 }
6095
get()6096 __isl_keep isl_basic_map_list *basic_map_list::get() const {
6097 return ptr;
6098 }
6099
release()6100 __isl_give isl_basic_map_list *basic_map_list::release() {
6101 isl_basic_map_list *tmp = ptr;
6102 ptr = nullptr;
6103 return tmp;
6104 }
6105
is_null()6106 bool basic_map_list::is_null() const {
6107 return ptr == nullptr;
6108 }
6109 basic_map_list::operator bool() const {
6110 return !is_null();
6111 }
6112
6113
get_ctx()6114 ctx basic_map_list::get_ctx() const {
6115 return ctx(isl_basic_map_list_get_ctx(ptr));
6116 }
6117
dump()6118 void basic_map_list::dump() const {
6119 isl_basic_map_list_dump(get());
6120 }
6121
6122
add(basic_map el)6123 basic_map_list basic_map_list::add(basic_map el) const
6124 {
6125 auto res = isl_basic_map_list_add(copy(), el.release());
6126 return manage(res);
6127 }
6128
alloc(ctx ctx,int n)6129 basic_map_list basic_map_list::alloc(ctx ctx, int n)
6130 {
6131 auto res = isl_basic_map_list_alloc(ctx.release(), n);
6132 return manage(res);
6133 }
6134
concat(basic_map_list list2)6135 basic_map_list basic_map_list::concat(basic_map_list list2) const
6136 {
6137 auto res = isl_basic_map_list_concat(copy(), list2.release());
6138 return manage(res);
6139 }
6140
drop(unsigned int first,unsigned int n)6141 basic_map_list basic_map_list::drop(unsigned int first, unsigned int n) const
6142 {
6143 auto res = isl_basic_map_list_drop(copy(), first, n);
6144 return manage(res);
6145 }
6146
foreach(const std::function<stat (basic_map)> & fn)6147 stat basic_map_list::foreach(const std::function<stat(basic_map)> &fn) const
6148 {
6149 struct fn_data {
6150 const std::function<stat(basic_map)> *func;
6151 } fn_data = { &fn };
6152 auto fn_lambda = [](isl_basic_map *arg_0, void *arg_1) -> isl_stat {
6153 auto *data = static_cast<struct fn_data *>(arg_1);
6154 stat ret = (*data->func)(manage(arg_0));
6155 return ret.release();
6156 };
6157 auto res = isl_basic_map_list_foreach(get(), fn_lambda, &fn_data);
6158 return manage(res);
6159 }
6160
from_basic_map(basic_map el)6161 basic_map_list basic_map_list::from_basic_map(basic_map el)
6162 {
6163 auto res = isl_basic_map_list_from_basic_map(el.release());
6164 return manage(res);
6165 }
6166
get_at(int index)6167 basic_map basic_map_list::get_at(int index) const
6168 {
6169 auto res = isl_basic_map_list_get_at(get(), index);
6170 return manage(res);
6171 }
6172
get_basic_map(int index)6173 basic_map basic_map_list::get_basic_map(int index) const
6174 {
6175 auto res = isl_basic_map_list_get_basic_map(get(), index);
6176 return manage(res);
6177 }
6178
insert(unsigned int pos,basic_map el)6179 basic_map_list basic_map_list::insert(unsigned int pos, basic_map el) const
6180 {
6181 auto res = isl_basic_map_list_insert(copy(), pos, el.release());
6182 return manage(res);
6183 }
6184
n_basic_map()6185 int basic_map_list::n_basic_map() const
6186 {
6187 auto res = isl_basic_map_list_n_basic_map(get());
6188 return res;
6189 }
6190
reverse()6191 basic_map_list basic_map_list::reverse() const
6192 {
6193 auto res = isl_basic_map_list_reverse(copy());
6194 return manage(res);
6195 }
6196
set_basic_map(int index,basic_map el)6197 basic_map_list basic_map_list::set_basic_map(int index, basic_map el) const
6198 {
6199 auto res = isl_basic_map_list_set_basic_map(copy(), index, el.release());
6200 return manage(res);
6201 }
6202
size()6203 int basic_map_list::size() const
6204 {
6205 auto res = isl_basic_map_list_size(get());
6206 return res;
6207 }
6208
swap(unsigned int pos1,unsigned int pos2)6209 basic_map_list basic_map_list::swap(unsigned int pos1, unsigned int pos2) const
6210 {
6211 auto res = isl_basic_map_list_swap(copy(), pos1, pos2);
6212 return manage(res);
6213 }
6214
6215 // implementations for isl::basic_set
manage(__isl_take isl_basic_set * ptr)6216 basic_set manage(__isl_take isl_basic_set *ptr) {
6217 return basic_set(ptr);
6218 }
manage_copy(__isl_keep isl_basic_set * ptr)6219 basic_set manage_copy(__isl_keep isl_basic_set *ptr) {
6220 ptr = isl_basic_set_copy(ptr);
6221 return basic_set(ptr);
6222 }
6223
basic_set()6224 basic_set::basic_set()
6225 : ptr(nullptr) {}
6226
basic_set(const basic_set & obj)6227 basic_set::basic_set(const basic_set &obj)
6228 : ptr(nullptr)
6229 {
6230 ptr = obj.copy();
6231 }
basic_set(std::nullptr_t)6232 basic_set::basic_set(std::nullptr_t)
6233 : ptr(nullptr) {}
6234
6235
basic_set(__isl_take isl_basic_set * ptr)6236 basic_set::basic_set(__isl_take isl_basic_set *ptr)
6237 : ptr(ptr) {}
6238
basic_set(ctx ctx,const std::string & str)6239 basic_set::basic_set(ctx ctx, const std::string &str)
6240 {
6241 auto res = isl_basic_set_read_from_str(ctx.release(), str.c_str());
6242 ptr = res;
6243 }
basic_set(point pnt)6244 basic_set::basic_set(point pnt)
6245 {
6246 auto res = isl_basic_set_from_point(pnt.release());
6247 ptr = res;
6248 }
6249
6250 basic_set &basic_set::operator=(basic_set obj) {
6251 std::swap(this->ptr, obj.ptr);
6252 return *this;
6253 }
6254
~basic_set()6255 basic_set::~basic_set() {
6256 if (ptr)
6257 isl_basic_set_free(ptr);
6258 }
6259
copy()6260 __isl_give isl_basic_set *basic_set::copy() const & {
6261 return isl_basic_set_copy(ptr);
6262 }
6263
get()6264 __isl_keep isl_basic_set *basic_set::get() const {
6265 return ptr;
6266 }
6267
release()6268 __isl_give isl_basic_set *basic_set::release() {
6269 isl_basic_set *tmp = ptr;
6270 ptr = nullptr;
6271 return tmp;
6272 }
6273
is_null()6274 bool basic_set::is_null() const {
6275 return ptr == nullptr;
6276 }
6277 basic_set::operator bool() const {
6278 return !is_null();
6279 }
6280
6281
get_ctx()6282 ctx basic_set::get_ctx() const {
6283 return ctx(isl_basic_set_get_ctx(ptr));
6284 }
to_str()6285 std::string basic_set::to_str() const {
6286 char *Tmp = isl_basic_set_to_str(get());
6287 if (!Tmp)
6288 return "";
6289 std::string S(Tmp);
6290 free(Tmp);
6291 return S;
6292 }
6293
6294
dump()6295 void basic_set::dump() const {
6296 isl_basic_set_dump(get());
6297 }
6298
6299
affine_hull()6300 basic_set basic_set::affine_hull() const
6301 {
6302 auto res = isl_basic_set_affine_hull(copy());
6303 return manage(res);
6304 }
6305
align_params(space model)6306 basic_set basic_set::align_params(space model) const
6307 {
6308 auto res = isl_basic_set_align_params(copy(), model.release());
6309 return manage(res);
6310 }
6311
apply(basic_map bmap)6312 basic_set basic_set::apply(basic_map bmap) const
6313 {
6314 auto res = isl_basic_set_apply(copy(), bmap.release());
6315 return manage(res);
6316 }
6317
box_from_points(point pnt1,point pnt2)6318 basic_set basic_set::box_from_points(point pnt1, point pnt2)
6319 {
6320 auto res = isl_basic_set_box_from_points(pnt1.release(), pnt2.release());
6321 return manage(res);
6322 }
6323
coefficients()6324 basic_set basic_set::coefficients() const
6325 {
6326 auto res = isl_basic_set_coefficients(copy());
6327 return manage(res);
6328 }
6329
detect_equalities()6330 basic_set basic_set::detect_equalities() const
6331 {
6332 auto res = isl_basic_set_detect_equalities(copy());
6333 return manage(res);
6334 }
6335
dim(isl::dim type)6336 unsigned int basic_set::dim(isl::dim type) const
6337 {
6338 auto res = isl_basic_set_dim(get(), static_cast<enum isl_dim_type>(type));
6339 return res;
6340 }
6341
dim_max_val(int pos)6342 val basic_set::dim_max_val(int pos) const
6343 {
6344 auto res = isl_basic_set_dim_max_val(copy(), pos);
6345 return manage(res);
6346 }
6347
drop_constraints_involving_dims(isl::dim type,unsigned int first,unsigned int n)6348 basic_set basic_set::drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
6349 {
6350 auto res = isl_basic_set_drop_constraints_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
6351 return manage(res);
6352 }
6353
drop_constraints_not_involving_dims(isl::dim type,unsigned int first,unsigned int n)6354 basic_set basic_set::drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
6355 {
6356 auto res = isl_basic_set_drop_constraints_not_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
6357 return manage(res);
6358 }
6359
drop_unused_params()6360 basic_set basic_set::drop_unused_params() const
6361 {
6362 auto res = isl_basic_set_drop_unused_params(copy());
6363 return manage(res);
6364 }
6365
eliminate(isl::dim type,unsigned int first,unsigned int n)6366 basic_set basic_set::eliminate(isl::dim type, unsigned int first, unsigned int n) const
6367 {
6368 auto res = isl_basic_set_eliminate(copy(), static_cast<enum isl_dim_type>(type), first, n);
6369 return manage(res);
6370 }
6371
empty(space space)6372 basic_set basic_set::empty(space space)
6373 {
6374 auto res = isl_basic_set_empty(space.release());
6375 return manage(res);
6376 }
6377
equalities_matrix(isl::dim c1,isl::dim c2,isl::dim c3,isl::dim c4)6378 mat basic_set::equalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4) const
6379 {
6380 auto res = isl_basic_set_equalities_matrix(get(), static_cast<enum isl_dim_type>(c1), static_cast<enum isl_dim_type>(c2), static_cast<enum isl_dim_type>(c3), static_cast<enum isl_dim_type>(c4));
6381 return manage(res);
6382 }
6383
fix_si(isl::dim type,unsigned int pos,int value)6384 basic_set basic_set::fix_si(isl::dim type, unsigned int pos, int value) const
6385 {
6386 auto res = isl_basic_set_fix_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
6387 return manage(res);
6388 }
6389
fix_val(isl::dim type,unsigned int pos,val v)6390 basic_set basic_set::fix_val(isl::dim type, unsigned int pos, val v) const
6391 {
6392 auto res = isl_basic_set_fix_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
6393 return manage(res);
6394 }
6395
flat_product(basic_set bset2)6396 basic_set basic_set::flat_product(basic_set bset2) const
6397 {
6398 auto res = isl_basic_set_flat_product(copy(), bset2.release());
6399 return manage(res);
6400 }
6401
flatten()6402 basic_set basic_set::flatten() const
6403 {
6404 auto res = isl_basic_set_flatten(copy());
6405 return manage(res);
6406 }
6407
foreach_bound_pair(isl::dim type,unsigned int pos,const std::function<stat (constraint,constraint,basic_set)> & fn)6408 stat basic_set::foreach_bound_pair(isl::dim type, unsigned int pos, const std::function<stat(constraint, constraint, basic_set)> &fn) const
6409 {
6410 struct fn_data {
6411 const std::function<stat(constraint, constraint, basic_set)> *func;
6412 } fn_data = { &fn };
6413 auto fn_lambda = [](isl_constraint *arg_0, isl_constraint *arg_1, isl_basic_set *arg_2, void *arg_3) -> isl_stat {
6414 auto *data = static_cast<struct fn_data *>(arg_3);
6415 stat ret = (*data->func)(manage(arg_0), manage(arg_1), manage(arg_2));
6416 return ret.release();
6417 };
6418 auto res = isl_basic_set_foreach_bound_pair(get(), static_cast<enum isl_dim_type>(type), pos, fn_lambda, &fn_data);
6419 return manage(res);
6420 }
6421
foreach_constraint(const std::function<stat (constraint)> & fn)6422 stat basic_set::foreach_constraint(const std::function<stat(constraint)> &fn) const
6423 {
6424 struct fn_data {
6425 const std::function<stat(constraint)> *func;
6426 } fn_data = { &fn };
6427 auto fn_lambda = [](isl_constraint *arg_0, void *arg_1) -> isl_stat {
6428 auto *data = static_cast<struct fn_data *>(arg_1);
6429 stat ret = (*data->func)(manage(arg_0));
6430 return ret.release();
6431 };
6432 auto res = isl_basic_set_foreach_constraint(get(), fn_lambda, &fn_data);
6433 return manage(res);
6434 }
6435
from_constraint(constraint constraint)6436 basic_set basic_set::from_constraint(constraint constraint)
6437 {
6438 auto res = isl_basic_set_from_constraint(constraint.release());
6439 return manage(res);
6440 }
6441
from_multi_aff(multi_aff ma)6442 basic_set basic_set::from_multi_aff(multi_aff ma)
6443 {
6444 auto res = isl_basic_set_from_multi_aff(ma.release());
6445 return manage(res);
6446 }
6447
from_params()6448 basic_set basic_set::from_params() const
6449 {
6450 auto res = isl_basic_set_from_params(copy());
6451 return manage(res);
6452 }
6453
get_constraint_list()6454 constraint_list basic_set::get_constraint_list() const
6455 {
6456 auto res = isl_basic_set_get_constraint_list(get());
6457 return manage(res);
6458 }
6459
get_dim_id(isl::dim type,unsigned int pos)6460 id basic_set::get_dim_id(isl::dim type, unsigned int pos) const
6461 {
6462 auto res = isl_basic_set_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
6463 return manage(res);
6464 }
6465
get_dim_name(isl::dim type,unsigned int pos)6466 std::string basic_set::get_dim_name(isl::dim type, unsigned int pos) const
6467 {
6468 auto res = isl_basic_set_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
6469 std::string tmp(res);
6470 return tmp;
6471 }
6472
get_div(int pos)6473 aff basic_set::get_div(int pos) const
6474 {
6475 auto res = isl_basic_set_get_div(get(), pos);
6476 return manage(res);
6477 }
6478
get_local_space()6479 local_space basic_set::get_local_space() const
6480 {
6481 auto res = isl_basic_set_get_local_space(get());
6482 return manage(res);
6483 }
6484
get_space()6485 space basic_set::get_space() const
6486 {
6487 auto res = isl_basic_set_get_space(get());
6488 return manage(res);
6489 }
6490
get_tuple_name()6491 std::string basic_set::get_tuple_name() const
6492 {
6493 auto res = isl_basic_set_get_tuple_name(get());
6494 std::string tmp(res);
6495 return tmp;
6496 }
6497
gist(basic_set context)6498 basic_set basic_set::gist(basic_set context) const
6499 {
6500 auto res = isl_basic_set_gist(copy(), context.release());
6501 return manage(res);
6502 }
6503
inequalities_matrix(isl::dim c1,isl::dim c2,isl::dim c3,isl::dim c4)6504 mat basic_set::inequalities_matrix(isl::dim c1, isl::dim c2, isl::dim c3, isl::dim c4) const
6505 {
6506 auto res = isl_basic_set_inequalities_matrix(get(), static_cast<enum isl_dim_type>(c1), static_cast<enum isl_dim_type>(c2), static_cast<enum isl_dim_type>(c3), static_cast<enum isl_dim_type>(c4));
6507 return manage(res);
6508 }
6509
insert_dims(isl::dim type,unsigned int pos,unsigned int n)6510 basic_set basic_set::insert_dims(isl::dim type, unsigned int pos, unsigned int n) const
6511 {
6512 auto res = isl_basic_set_insert_dims(copy(), static_cast<enum isl_dim_type>(type), pos, n);
6513 return manage(res);
6514 }
6515
intersect(basic_set bset2)6516 basic_set basic_set::intersect(basic_set bset2) const
6517 {
6518 auto res = isl_basic_set_intersect(copy(), bset2.release());
6519 return manage(res);
6520 }
6521
intersect_params(basic_set bset2)6522 basic_set basic_set::intersect_params(basic_set bset2) const
6523 {
6524 auto res = isl_basic_set_intersect_params(copy(), bset2.release());
6525 return manage(res);
6526 }
6527
involves_dims(isl::dim type,unsigned int first,unsigned int n)6528 boolean basic_set::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
6529 {
6530 auto res = isl_basic_set_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
6531 return manage(res);
6532 }
6533
is_bounded()6534 boolean basic_set::is_bounded() const
6535 {
6536 auto res = isl_basic_set_is_bounded(get());
6537 return manage(res);
6538 }
6539
is_disjoint(const basic_set & bset2)6540 boolean basic_set::is_disjoint(const basic_set &bset2) const
6541 {
6542 auto res = isl_basic_set_is_disjoint(get(), bset2.get());
6543 return manage(res);
6544 }
6545
is_empty()6546 boolean basic_set::is_empty() const
6547 {
6548 auto res = isl_basic_set_is_empty(get());
6549 return manage(res);
6550 }
6551
is_equal(const basic_set & bset2)6552 boolean basic_set::is_equal(const basic_set &bset2) const
6553 {
6554 auto res = isl_basic_set_is_equal(get(), bset2.get());
6555 return manage(res);
6556 }
6557
is_rational()6558 int basic_set::is_rational() const
6559 {
6560 auto res = isl_basic_set_is_rational(get());
6561 return res;
6562 }
6563
is_subset(const basic_set & bset2)6564 boolean basic_set::is_subset(const basic_set &bset2) const
6565 {
6566 auto res = isl_basic_set_is_subset(get(), bset2.get());
6567 return manage(res);
6568 }
6569
is_universe()6570 boolean basic_set::is_universe() const
6571 {
6572 auto res = isl_basic_set_is_universe(get());
6573 return manage(res);
6574 }
6575
is_wrapping()6576 boolean basic_set::is_wrapping() const
6577 {
6578 auto res = isl_basic_set_is_wrapping(get());
6579 return manage(res);
6580 }
6581
lexmax()6582 set basic_set::lexmax() const
6583 {
6584 auto res = isl_basic_set_lexmax(copy());
6585 return manage(res);
6586 }
6587
lexmin()6588 set basic_set::lexmin() const
6589 {
6590 auto res = isl_basic_set_lexmin(copy());
6591 return manage(res);
6592 }
6593
lower_bound_val(isl::dim type,unsigned int pos,val value)6594 basic_set basic_set::lower_bound_val(isl::dim type, unsigned int pos, val value) const
6595 {
6596 auto res = isl_basic_set_lower_bound_val(copy(), static_cast<enum isl_dim_type>(type), pos, value.release());
6597 return manage(res);
6598 }
6599
max_val(const aff & obj)6600 val basic_set::max_val(const aff &obj) const
6601 {
6602 auto res = isl_basic_set_max_val(get(), obj.get());
6603 return manage(res);
6604 }
6605
move_dims(isl::dim dst_type,unsigned int dst_pos,isl::dim src_type,unsigned int src_pos,unsigned int n)6606 basic_set basic_set::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
6607 {
6608 auto res = isl_basic_set_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
6609 return manage(res);
6610 }
6611
n_constraint()6612 int basic_set::n_constraint() const
6613 {
6614 auto res = isl_basic_set_n_constraint(get());
6615 return res;
6616 }
6617
n_dim()6618 unsigned int basic_set::n_dim() const
6619 {
6620 auto res = isl_basic_set_n_dim(get());
6621 return res;
6622 }
6623
nat_universe(space dim)6624 basic_set basic_set::nat_universe(space dim)
6625 {
6626 auto res = isl_basic_set_nat_universe(dim.release());
6627 return manage(res);
6628 }
6629
neg()6630 basic_set basic_set::neg() const
6631 {
6632 auto res = isl_basic_set_neg(copy());
6633 return manage(res);
6634 }
6635
params()6636 basic_set basic_set::params() const
6637 {
6638 auto res = isl_basic_set_params(copy());
6639 return manage(res);
6640 }
6641
plain_is_empty()6642 boolean basic_set::plain_is_empty() const
6643 {
6644 auto res = isl_basic_set_plain_is_empty(get());
6645 return manage(res);
6646 }
6647
plain_is_equal(const basic_set & bset2)6648 boolean basic_set::plain_is_equal(const basic_set &bset2) const
6649 {
6650 auto res = isl_basic_set_plain_is_equal(get(), bset2.get());
6651 return manage(res);
6652 }
6653
plain_is_universe()6654 boolean basic_set::plain_is_universe() const
6655 {
6656 auto res = isl_basic_set_plain_is_universe(get());
6657 return manage(res);
6658 }
6659
positive_orthant(space space)6660 basic_set basic_set::positive_orthant(space space)
6661 {
6662 auto res = isl_basic_set_positive_orthant(space.release());
6663 return manage(res);
6664 }
6665
preimage_multi_aff(multi_aff ma)6666 basic_set basic_set::preimage_multi_aff(multi_aff ma) const
6667 {
6668 auto res = isl_basic_set_preimage_multi_aff(copy(), ma.release());
6669 return manage(res);
6670 }
6671
project_out(isl::dim type,unsigned int first,unsigned int n)6672 basic_set basic_set::project_out(isl::dim type, unsigned int first, unsigned int n) const
6673 {
6674 auto res = isl_basic_set_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
6675 return manage(res);
6676 }
6677
reduced_basis()6678 mat basic_set::reduced_basis() const
6679 {
6680 auto res = isl_basic_set_reduced_basis(get());
6681 return manage(res);
6682 }
6683
remove_dims(isl::dim type,unsigned int first,unsigned int n)6684 basic_set basic_set::remove_dims(isl::dim type, unsigned int first, unsigned int n) const
6685 {
6686 auto res = isl_basic_set_remove_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
6687 return manage(res);
6688 }
6689
remove_divs()6690 basic_set basic_set::remove_divs() const
6691 {
6692 auto res = isl_basic_set_remove_divs(copy());
6693 return manage(res);
6694 }
6695
remove_divs_involving_dims(isl::dim type,unsigned int first,unsigned int n)6696 basic_set basic_set::remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
6697 {
6698 auto res = isl_basic_set_remove_divs_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
6699 return manage(res);
6700 }
6701
remove_redundancies()6702 basic_set basic_set::remove_redundancies() const
6703 {
6704 auto res = isl_basic_set_remove_redundancies(copy());
6705 return manage(res);
6706 }
6707
remove_unknown_divs()6708 basic_set basic_set::remove_unknown_divs() const
6709 {
6710 auto res = isl_basic_set_remove_unknown_divs(copy());
6711 return manage(res);
6712 }
6713
sample()6714 basic_set basic_set::sample() const
6715 {
6716 auto res = isl_basic_set_sample(copy());
6717 return manage(res);
6718 }
6719
sample_point()6720 point basic_set::sample_point() const
6721 {
6722 auto res = isl_basic_set_sample_point(copy());
6723 return manage(res);
6724 }
6725
set_tuple_id(id id)6726 basic_set basic_set::set_tuple_id(id id) const
6727 {
6728 auto res = isl_basic_set_set_tuple_id(copy(), id.release());
6729 return manage(res);
6730 }
6731
set_tuple_name(const std::string & s)6732 basic_set basic_set::set_tuple_name(const std::string &s) const
6733 {
6734 auto res = isl_basic_set_set_tuple_name(copy(), s.c_str());
6735 return manage(res);
6736 }
6737
solutions()6738 basic_set basic_set::solutions() const
6739 {
6740 auto res = isl_basic_set_solutions(copy());
6741 return manage(res);
6742 }
6743
unite(basic_set bset2)6744 set basic_set::unite(basic_set bset2) const
6745 {
6746 auto res = isl_basic_set_union(copy(), bset2.release());
6747 return manage(res);
6748 }
6749
universe(space space)6750 basic_set basic_set::universe(space space)
6751 {
6752 auto res = isl_basic_set_universe(space.release());
6753 return manage(res);
6754 }
6755
unwrap()6756 basic_map basic_set::unwrap() const
6757 {
6758 auto res = isl_basic_set_unwrap(copy());
6759 return manage(res);
6760 }
6761
upper_bound_val(isl::dim type,unsigned int pos,val value)6762 basic_set basic_set::upper_bound_val(isl::dim type, unsigned int pos, val value) const
6763 {
6764 auto res = isl_basic_set_upper_bound_val(copy(), static_cast<enum isl_dim_type>(type), pos, value.release());
6765 return manage(res);
6766 }
6767
6768 // implementations for isl::basic_set_list
manage(__isl_take isl_basic_set_list * ptr)6769 basic_set_list manage(__isl_take isl_basic_set_list *ptr) {
6770 return basic_set_list(ptr);
6771 }
manage_copy(__isl_keep isl_basic_set_list * ptr)6772 basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr) {
6773 ptr = isl_basic_set_list_copy(ptr);
6774 return basic_set_list(ptr);
6775 }
6776
basic_set_list()6777 basic_set_list::basic_set_list()
6778 : ptr(nullptr) {}
6779
basic_set_list(const basic_set_list & obj)6780 basic_set_list::basic_set_list(const basic_set_list &obj)
6781 : ptr(nullptr)
6782 {
6783 ptr = obj.copy();
6784 }
basic_set_list(std::nullptr_t)6785 basic_set_list::basic_set_list(std::nullptr_t)
6786 : ptr(nullptr) {}
6787
6788
basic_set_list(__isl_take isl_basic_set_list * ptr)6789 basic_set_list::basic_set_list(__isl_take isl_basic_set_list *ptr)
6790 : ptr(ptr) {}
6791
6792
6793 basic_set_list &basic_set_list::operator=(basic_set_list obj) {
6794 std::swap(this->ptr, obj.ptr);
6795 return *this;
6796 }
6797
~basic_set_list()6798 basic_set_list::~basic_set_list() {
6799 if (ptr)
6800 isl_basic_set_list_free(ptr);
6801 }
6802
copy()6803 __isl_give isl_basic_set_list *basic_set_list::copy() const & {
6804 return isl_basic_set_list_copy(ptr);
6805 }
6806
get()6807 __isl_keep isl_basic_set_list *basic_set_list::get() const {
6808 return ptr;
6809 }
6810
release()6811 __isl_give isl_basic_set_list *basic_set_list::release() {
6812 isl_basic_set_list *tmp = ptr;
6813 ptr = nullptr;
6814 return tmp;
6815 }
6816
is_null()6817 bool basic_set_list::is_null() const {
6818 return ptr == nullptr;
6819 }
6820 basic_set_list::operator bool() const {
6821 return !is_null();
6822 }
6823
6824
get_ctx()6825 ctx basic_set_list::get_ctx() const {
6826 return ctx(isl_basic_set_list_get_ctx(ptr));
6827 }
6828
dump()6829 void basic_set_list::dump() const {
6830 isl_basic_set_list_dump(get());
6831 }
6832
6833
add(basic_set el)6834 basic_set_list basic_set_list::add(basic_set el) const
6835 {
6836 auto res = isl_basic_set_list_add(copy(), el.release());
6837 return manage(res);
6838 }
6839
alloc(ctx ctx,int n)6840 basic_set_list basic_set_list::alloc(ctx ctx, int n)
6841 {
6842 auto res = isl_basic_set_list_alloc(ctx.release(), n);
6843 return manage(res);
6844 }
6845
coefficients()6846 basic_set_list basic_set_list::coefficients() const
6847 {
6848 auto res = isl_basic_set_list_coefficients(copy());
6849 return manage(res);
6850 }
6851
concat(basic_set_list list2)6852 basic_set_list basic_set_list::concat(basic_set_list list2) const
6853 {
6854 auto res = isl_basic_set_list_concat(copy(), list2.release());
6855 return manage(res);
6856 }
6857
drop(unsigned int first,unsigned int n)6858 basic_set_list basic_set_list::drop(unsigned int first, unsigned int n) const
6859 {
6860 auto res = isl_basic_set_list_drop(copy(), first, n);
6861 return manage(res);
6862 }
6863
foreach(const std::function<stat (basic_set)> & fn)6864 stat basic_set_list::foreach(const std::function<stat(basic_set)> &fn) const
6865 {
6866 struct fn_data {
6867 const std::function<stat(basic_set)> *func;
6868 } fn_data = { &fn };
6869 auto fn_lambda = [](isl_basic_set *arg_0, void *arg_1) -> isl_stat {
6870 auto *data = static_cast<struct fn_data *>(arg_1);
6871 stat ret = (*data->func)(manage(arg_0));
6872 return ret.release();
6873 };
6874 auto res = isl_basic_set_list_foreach(get(), fn_lambda, &fn_data);
6875 return manage(res);
6876 }
6877
from_basic_set(basic_set el)6878 basic_set_list basic_set_list::from_basic_set(basic_set el)
6879 {
6880 auto res = isl_basic_set_list_from_basic_set(el.release());
6881 return manage(res);
6882 }
6883
get_at(int index)6884 basic_set basic_set_list::get_at(int index) const
6885 {
6886 auto res = isl_basic_set_list_get_at(get(), index);
6887 return manage(res);
6888 }
6889
get_basic_set(int index)6890 basic_set basic_set_list::get_basic_set(int index) const
6891 {
6892 auto res = isl_basic_set_list_get_basic_set(get(), index);
6893 return manage(res);
6894 }
6895
insert(unsigned int pos,basic_set el)6896 basic_set_list basic_set_list::insert(unsigned int pos, basic_set el) const
6897 {
6898 auto res = isl_basic_set_list_insert(copy(), pos, el.release());
6899 return manage(res);
6900 }
6901
n_basic_set()6902 int basic_set_list::n_basic_set() const
6903 {
6904 auto res = isl_basic_set_list_n_basic_set(get());
6905 return res;
6906 }
6907
reverse()6908 basic_set_list basic_set_list::reverse() const
6909 {
6910 auto res = isl_basic_set_list_reverse(copy());
6911 return manage(res);
6912 }
6913
set_basic_set(int index,basic_set el)6914 basic_set_list basic_set_list::set_basic_set(int index, basic_set el) const
6915 {
6916 auto res = isl_basic_set_list_set_basic_set(copy(), index, el.release());
6917 return manage(res);
6918 }
6919
size()6920 int basic_set_list::size() const
6921 {
6922 auto res = isl_basic_set_list_size(get());
6923 return res;
6924 }
6925
swap(unsigned int pos1,unsigned int pos2)6926 basic_set_list basic_set_list::swap(unsigned int pos1, unsigned int pos2) const
6927 {
6928 auto res = isl_basic_set_list_swap(copy(), pos1, pos2);
6929 return manage(res);
6930 }
6931
6932 // implementations for isl::constraint
manage(__isl_take isl_constraint * ptr)6933 constraint manage(__isl_take isl_constraint *ptr) {
6934 return constraint(ptr);
6935 }
manage_copy(__isl_keep isl_constraint * ptr)6936 constraint manage_copy(__isl_keep isl_constraint *ptr) {
6937 ptr = isl_constraint_copy(ptr);
6938 return constraint(ptr);
6939 }
6940
constraint()6941 constraint::constraint()
6942 : ptr(nullptr) {}
6943
constraint(const constraint & obj)6944 constraint::constraint(const constraint &obj)
6945 : ptr(nullptr)
6946 {
6947 ptr = obj.copy();
6948 }
constraint(std::nullptr_t)6949 constraint::constraint(std::nullptr_t)
6950 : ptr(nullptr) {}
6951
6952
constraint(__isl_take isl_constraint * ptr)6953 constraint::constraint(__isl_take isl_constraint *ptr)
6954 : ptr(ptr) {}
6955
6956
6957 constraint &constraint::operator=(constraint obj) {
6958 std::swap(this->ptr, obj.ptr);
6959 return *this;
6960 }
6961
~constraint()6962 constraint::~constraint() {
6963 if (ptr)
6964 isl_constraint_free(ptr);
6965 }
6966
copy()6967 __isl_give isl_constraint *constraint::copy() const & {
6968 return isl_constraint_copy(ptr);
6969 }
6970
get()6971 __isl_keep isl_constraint *constraint::get() const {
6972 return ptr;
6973 }
6974
release()6975 __isl_give isl_constraint *constraint::release() {
6976 isl_constraint *tmp = ptr;
6977 ptr = nullptr;
6978 return tmp;
6979 }
6980
is_null()6981 bool constraint::is_null() const {
6982 return ptr == nullptr;
6983 }
6984 constraint::operator bool() const {
6985 return !is_null();
6986 }
6987
6988
get_ctx()6989 ctx constraint::get_ctx() const {
6990 return ctx(isl_constraint_get_ctx(ptr));
6991 }
6992
dump()6993 void constraint::dump() const {
6994 isl_constraint_dump(get());
6995 }
6996
6997
alloc_equality(local_space ls)6998 constraint constraint::alloc_equality(local_space ls)
6999 {
7000 auto res = isl_constraint_alloc_equality(ls.release());
7001 return manage(res);
7002 }
7003
alloc_inequality(local_space ls)7004 constraint constraint::alloc_inequality(local_space ls)
7005 {
7006 auto res = isl_constraint_alloc_inequality(ls.release());
7007 return manage(res);
7008 }
7009
cmp_last_non_zero(const constraint & c2)7010 int constraint::cmp_last_non_zero(const constraint &c2) const
7011 {
7012 auto res = isl_constraint_cmp_last_non_zero(get(), c2.get());
7013 return res;
7014 }
7015
get_aff()7016 aff constraint::get_aff() const
7017 {
7018 auto res = isl_constraint_get_aff(get());
7019 return manage(res);
7020 }
7021
get_bound(isl::dim type,int pos)7022 aff constraint::get_bound(isl::dim type, int pos) const
7023 {
7024 auto res = isl_constraint_get_bound(get(), static_cast<enum isl_dim_type>(type), pos);
7025 return manage(res);
7026 }
7027
get_coefficient_val(isl::dim type,int pos)7028 val constraint::get_coefficient_val(isl::dim type, int pos) const
7029 {
7030 auto res = isl_constraint_get_coefficient_val(get(), static_cast<enum isl_dim_type>(type), pos);
7031 return manage(res);
7032 }
7033
get_constant_val()7034 val constraint::get_constant_val() const
7035 {
7036 auto res = isl_constraint_get_constant_val(get());
7037 return manage(res);
7038 }
7039
get_dim_name(isl::dim type,unsigned int pos)7040 std::string constraint::get_dim_name(isl::dim type, unsigned int pos) const
7041 {
7042 auto res = isl_constraint_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
7043 std::string tmp(res);
7044 return tmp;
7045 }
7046
get_div(int pos)7047 aff constraint::get_div(int pos) const
7048 {
7049 auto res = isl_constraint_get_div(get(), pos);
7050 return manage(res);
7051 }
7052
get_local_space()7053 local_space constraint::get_local_space() const
7054 {
7055 auto res = isl_constraint_get_local_space(get());
7056 return manage(res);
7057 }
7058
get_space()7059 space constraint::get_space() const
7060 {
7061 auto res = isl_constraint_get_space(get());
7062 return manage(res);
7063 }
7064
involves_dims(isl::dim type,unsigned int first,unsigned int n)7065 boolean constraint::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
7066 {
7067 auto res = isl_constraint_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
7068 return manage(res);
7069 }
7070
is_div_constraint()7071 int constraint::is_div_constraint() const
7072 {
7073 auto res = isl_constraint_is_div_constraint(get());
7074 return res;
7075 }
7076
is_lower_bound(isl::dim type,unsigned int pos)7077 boolean constraint::is_lower_bound(isl::dim type, unsigned int pos) const
7078 {
7079 auto res = isl_constraint_is_lower_bound(get(), static_cast<enum isl_dim_type>(type), pos);
7080 return manage(res);
7081 }
7082
is_upper_bound(isl::dim type,unsigned int pos)7083 boolean constraint::is_upper_bound(isl::dim type, unsigned int pos) const
7084 {
7085 auto res = isl_constraint_is_upper_bound(get(), static_cast<enum isl_dim_type>(type), pos);
7086 return manage(res);
7087 }
7088
plain_cmp(const constraint & c2)7089 int constraint::plain_cmp(const constraint &c2) const
7090 {
7091 auto res = isl_constraint_plain_cmp(get(), c2.get());
7092 return res;
7093 }
7094
set_coefficient_si(isl::dim type,int pos,int v)7095 constraint constraint::set_coefficient_si(isl::dim type, int pos, int v) const
7096 {
7097 auto res = isl_constraint_set_coefficient_si(copy(), static_cast<enum isl_dim_type>(type), pos, v);
7098 return manage(res);
7099 }
7100
set_coefficient_val(isl::dim type,int pos,val v)7101 constraint constraint::set_coefficient_val(isl::dim type, int pos, val v) const
7102 {
7103 auto res = isl_constraint_set_coefficient_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
7104 return manage(res);
7105 }
7106
set_constant_si(int v)7107 constraint constraint::set_constant_si(int v) const
7108 {
7109 auto res = isl_constraint_set_constant_si(copy(), v);
7110 return manage(res);
7111 }
7112
set_constant_val(val v)7113 constraint constraint::set_constant_val(val v) const
7114 {
7115 auto res = isl_constraint_set_constant_val(copy(), v.release());
7116 return manage(res);
7117 }
7118
7119 // implementations for isl::constraint_list
manage(__isl_take isl_constraint_list * ptr)7120 constraint_list manage(__isl_take isl_constraint_list *ptr) {
7121 return constraint_list(ptr);
7122 }
manage_copy(__isl_keep isl_constraint_list * ptr)7123 constraint_list manage_copy(__isl_keep isl_constraint_list *ptr) {
7124 ptr = isl_constraint_list_copy(ptr);
7125 return constraint_list(ptr);
7126 }
7127
constraint_list()7128 constraint_list::constraint_list()
7129 : ptr(nullptr) {}
7130
constraint_list(const constraint_list & obj)7131 constraint_list::constraint_list(const constraint_list &obj)
7132 : ptr(nullptr)
7133 {
7134 ptr = obj.copy();
7135 }
constraint_list(std::nullptr_t)7136 constraint_list::constraint_list(std::nullptr_t)
7137 : ptr(nullptr) {}
7138
7139
constraint_list(__isl_take isl_constraint_list * ptr)7140 constraint_list::constraint_list(__isl_take isl_constraint_list *ptr)
7141 : ptr(ptr) {}
7142
7143
7144 constraint_list &constraint_list::operator=(constraint_list obj) {
7145 std::swap(this->ptr, obj.ptr);
7146 return *this;
7147 }
7148
~constraint_list()7149 constraint_list::~constraint_list() {
7150 if (ptr)
7151 isl_constraint_list_free(ptr);
7152 }
7153
copy()7154 __isl_give isl_constraint_list *constraint_list::copy() const & {
7155 return isl_constraint_list_copy(ptr);
7156 }
7157
get()7158 __isl_keep isl_constraint_list *constraint_list::get() const {
7159 return ptr;
7160 }
7161
release()7162 __isl_give isl_constraint_list *constraint_list::release() {
7163 isl_constraint_list *tmp = ptr;
7164 ptr = nullptr;
7165 return tmp;
7166 }
7167
is_null()7168 bool constraint_list::is_null() const {
7169 return ptr == nullptr;
7170 }
7171 constraint_list::operator bool() const {
7172 return !is_null();
7173 }
7174
7175
get_ctx()7176 ctx constraint_list::get_ctx() const {
7177 return ctx(isl_constraint_list_get_ctx(ptr));
7178 }
7179
dump()7180 void constraint_list::dump() const {
7181 isl_constraint_list_dump(get());
7182 }
7183
7184
add(constraint el)7185 constraint_list constraint_list::add(constraint el) const
7186 {
7187 auto res = isl_constraint_list_add(copy(), el.release());
7188 return manage(res);
7189 }
7190
alloc(ctx ctx,int n)7191 constraint_list constraint_list::alloc(ctx ctx, int n)
7192 {
7193 auto res = isl_constraint_list_alloc(ctx.release(), n);
7194 return manage(res);
7195 }
7196
concat(constraint_list list2)7197 constraint_list constraint_list::concat(constraint_list list2) const
7198 {
7199 auto res = isl_constraint_list_concat(copy(), list2.release());
7200 return manage(res);
7201 }
7202
drop(unsigned int first,unsigned int n)7203 constraint_list constraint_list::drop(unsigned int first, unsigned int n) const
7204 {
7205 auto res = isl_constraint_list_drop(copy(), first, n);
7206 return manage(res);
7207 }
7208
foreach(const std::function<stat (constraint)> & fn)7209 stat constraint_list::foreach(const std::function<stat(constraint)> &fn) const
7210 {
7211 struct fn_data {
7212 const std::function<stat(constraint)> *func;
7213 } fn_data = { &fn };
7214 auto fn_lambda = [](isl_constraint *arg_0, void *arg_1) -> isl_stat {
7215 auto *data = static_cast<struct fn_data *>(arg_1);
7216 stat ret = (*data->func)(manage(arg_0));
7217 return ret.release();
7218 };
7219 auto res = isl_constraint_list_foreach(get(), fn_lambda, &fn_data);
7220 return manage(res);
7221 }
7222
from_constraint(constraint el)7223 constraint_list constraint_list::from_constraint(constraint el)
7224 {
7225 auto res = isl_constraint_list_from_constraint(el.release());
7226 return manage(res);
7227 }
7228
get_at(int index)7229 constraint constraint_list::get_at(int index) const
7230 {
7231 auto res = isl_constraint_list_get_at(get(), index);
7232 return manage(res);
7233 }
7234
get_constraint(int index)7235 constraint constraint_list::get_constraint(int index) const
7236 {
7237 auto res = isl_constraint_list_get_constraint(get(), index);
7238 return manage(res);
7239 }
7240
insert(unsigned int pos,constraint el)7241 constraint_list constraint_list::insert(unsigned int pos, constraint el) const
7242 {
7243 auto res = isl_constraint_list_insert(copy(), pos, el.release());
7244 return manage(res);
7245 }
7246
n_constraint()7247 int constraint_list::n_constraint() const
7248 {
7249 auto res = isl_constraint_list_n_constraint(get());
7250 return res;
7251 }
7252
reverse()7253 constraint_list constraint_list::reverse() const
7254 {
7255 auto res = isl_constraint_list_reverse(copy());
7256 return manage(res);
7257 }
7258
set_constraint(int index,constraint el)7259 constraint_list constraint_list::set_constraint(int index, constraint el) const
7260 {
7261 auto res = isl_constraint_list_set_constraint(copy(), index, el.release());
7262 return manage(res);
7263 }
7264
size()7265 int constraint_list::size() const
7266 {
7267 auto res = isl_constraint_list_size(get());
7268 return res;
7269 }
7270
swap(unsigned int pos1,unsigned int pos2)7271 constraint_list constraint_list::swap(unsigned int pos1, unsigned int pos2) const
7272 {
7273 auto res = isl_constraint_list_swap(copy(), pos1, pos2);
7274 return manage(res);
7275 }
7276
7277 // implementations for isl::fixed_box
manage(__isl_take isl_fixed_box * ptr)7278 fixed_box manage(__isl_take isl_fixed_box *ptr) {
7279 return fixed_box(ptr);
7280 }
manage_copy(__isl_keep isl_fixed_box * ptr)7281 fixed_box manage_copy(__isl_keep isl_fixed_box *ptr) {
7282 ptr = isl_fixed_box_copy(ptr);
7283 return fixed_box(ptr);
7284 }
7285
fixed_box()7286 fixed_box::fixed_box()
7287 : ptr(nullptr) {}
7288
fixed_box(const fixed_box & obj)7289 fixed_box::fixed_box(const fixed_box &obj)
7290 : ptr(nullptr)
7291 {
7292 ptr = obj.copy();
7293 }
fixed_box(std::nullptr_t)7294 fixed_box::fixed_box(std::nullptr_t)
7295 : ptr(nullptr) {}
7296
7297
fixed_box(__isl_take isl_fixed_box * ptr)7298 fixed_box::fixed_box(__isl_take isl_fixed_box *ptr)
7299 : ptr(ptr) {}
7300
7301
7302 fixed_box &fixed_box::operator=(fixed_box obj) {
7303 std::swap(this->ptr, obj.ptr);
7304 return *this;
7305 }
7306
~fixed_box()7307 fixed_box::~fixed_box() {
7308 if (ptr)
7309 isl_fixed_box_free(ptr);
7310 }
7311
copy()7312 __isl_give isl_fixed_box *fixed_box::copy() const & {
7313 return isl_fixed_box_copy(ptr);
7314 }
7315
get()7316 __isl_keep isl_fixed_box *fixed_box::get() const {
7317 return ptr;
7318 }
7319
release()7320 __isl_give isl_fixed_box *fixed_box::release() {
7321 isl_fixed_box *tmp = ptr;
7322 ptr = nullptr;
7323 return tmp;
7324 }
7325
is_null()7326 bool fixed_box::is_null() const {
7327 return ptr == nullptr;
7328 }
7329 fixed_box::operator bool() const {
7330 return !is_null();
7331 }
7332
7333
get_ctx()7334 ctx fixed_box::get_ctx() const {
7335 return ctx(isl_fixed_box_get_ctx(ptr));
7336 }
7337
7338
get_offset()7339 multi_aff fixed_box::get_offset() const
7340 {
7341 auto res = isl_fixed_box_get_offset(get());
7342 return manage(res);
7343 }
7344
get_size()7345 multi_val fixed_box::get_size() const
7346 {
7347 auto res = isl_fixed_box_get_size(get());
7348 return manage(res);
7349 }
7350
get_space()7351 space fixed_box::get_space() const
7352 {
7353 auto res = isl_fixed_box_get_space(get());
7354 return manage(res);
7355 }
7356
is_valid()7357 boolean fixed_box::is_valid() const
7358 {
7359 auto res = isl_fixed_box_is_valid(get());
7360 return manage(res);
7361 }
7362
7363 // implementations for isl::id
manage(__isl_take isl_id * ptr)7364 id manage(__isl_take isl_id *ptr) {
7365 return id(ptr);
7366 }
manage_copy(__isl_keep isl_id * ptr)7367 id manage_copy(__isl_keep isl_id *ptr) {
7368 ptr = isl_id_copy(ptr);
7369 return id(ptr);
7370 }
7371
id()7372 id::id()
7373 : ptr(nullptr) {}
7374
id(const id & obj)7375 id::id(const id &obj)
7376 : ptr(nullptr)
7377 {
7378 ptr = obj.copy();
7379 }
id(std::nullptr_t)7380 id::id(std::nullptr_t)
7381 : ptr(nullptr) {}
7382
7383
id(__isl_take isl_id * ptr)7384 id::id(__isl_take isl_id *ptr)
7385 : ptr(ptr) {}
7386
7387
7388 id &id::operator=(id obj) {
7389 std::swap(this->ptr, obj.ptr);
7390 return *this;
7391 }
7392
~id()7393 id::~id() {
7394 if (ptr)
7395 isl_id_free(ptr);
7396 }
7397
copy()7398 __isl_give isl_id *id::copy() const & {
7399 return isl_id_copy(ptr);
7400 }
7401
get()7402 __isl_keep isl_id *id::get() const {
7403 return ptr;
7404 }
7405
release()7406 __isl_give isl_id *id::release() {
7407 isl_id *tmp = ptr;
7408 ptr = nullptr;
7409 return tmp;
7410 }
7411
is_null()7412 bool id::is_null() const {
7413 return ptr == nullptr;
7414 }
7415 id::operator bool() const {
7416 return !is_null();
7417 }
7418
7419
get_ctx()7420 ctx id::get_ctx() const {
7421 return ctx(isl_id_get_ctx(ptr));
7422 }
to_str()7423 std::string id::to_str() const {
7424 char *Tmp = isl_id_to_str(get());
7425 if (!Tmp)
7426 return "";
7427 std::string S(Tmp);
7428 free(Tmp);
7429 return S;
7430 }
7431
7432
dump()7433 void id::dump() const {
7434 isl_id_dump(get());
7435 }
7436
7437
alloc(ctx ctx,const std::string & name,void * user)7438 id id::alloc(ctx ctx, const std::string &name, void * user)
7439 {
7440 auto res = isl_id_alloc(ctx.release(), name.c_str(), user);
7441 return manage(res);
7442 }
7443
get_hash()7444 uint32_t id::get_hash() const
7445 {
7446 auto res = isl_id_get_hash(get());
7447 return res;
7448 }
7449
get_name()7450 std::string id::get_name() const
7451 {
7452 auto res = isl_id_get_name(get());
7453 std::string tmp(res);
7454 return tmp;
7455 }
7456
get_user()7457 void * id::get_user() const
7458 {
7459 auto res = isl_id_get_user(get());
7460 return res;
7461 }
7462
7463 // implementations for isl::id_list
manage(__isl_take isl_id_list * ptr)7464 id_list manage(__isl_take isl_id_list *ptr) {
7465 return id_list(ptr);
7466 }
manage_copy(__isl_keep isl_id_list * ptr)7467 id_list manage_copy(__isl_keep isl_id_list *ptr) {
7468 ptr = isl_id_list_copy(ptr);
7469 return id_list(ptr);
7470 }
7471
id_list()7472 id_list::id_list()
7473 : ptr(nullptr) {}
7474
id_list(const id_list & obj)7475 id_list::id_list(const id_list &obj)
7476 : ptr(nullptr)
7477 {
7478 ptr = obj.copy();
7479 }
id_list(std::nullptr_t)7480 id_list::id_list(std::nullptr_t)
7481 : ptr(nullptr) {}
7482
7483
id_list(__isl_take isl_id_list * ptr)7484 id_list::id_list(__isl_take isl_id_list *ptr)
7485 : ptr(ptr) {}
7486
7487
7488 id_list &id_list::operator=(id_list obj) {
7489 std::swap(this->ptr, obj.ptr);
7490 return *this;
7491 }
7492
~id_list()7493 id_list::~id_list() {
7494 if (ptr)
7495 isl_id_list_free(ptr);
7496 }
7497
copy()7498 __isl_give isl_id_list *id_list::copy() const & {
7499 return isl_id_list_copy(ptr);
7500 }
7501
get()7502 __isl_keep isl_id_list *id_list::get() const {
7503 return ptr;
7504 }
7505
release()7506 __isl_give isl_id_list *id_list::release() {
7507 isl_id_list *tmp = ptr;
7508 ptr = nullptr;
7509 return tmp;
7510 }
7511
is_null()7512 bool id_list::is_null() const {
7513 return ptr == nullptr;
7514 }
7515 id_list::operator bool() const {
7516 return !is_null();
7517 }
7518
7519
get_ctx()7520 ctx id_list::get_ctx() const {
7521 return ctx(isl_id_list_get_ctx(ptr));
7522 }
7523
dump()7524 void id_list::dump() const {
7525 isl_id_list_dump(get());
7526 }
7527
7528
add(id el)7529 id_list id_list::add(id el) const
7530 {
7531 auto res = isl_id_list_add(copy(), el.release());
7532 return manage(res);
7533 }
7534
alloc(ctx ctx,int n)7535 id_list id_list::alloc(ctx ctx, int n)
7536 {
7537 auto res = isl_id_list_alloc(ctx.release(), n);
7538 return manage(res);
7539 }
7540
concat(id_list list2)7541 id_list id_list::concat(id_list list2) const
7542 {
7543 auto res = isl_id_list_concat(copy(), list2.release());
7544 return manage(res);
7545 }
7546
drop(unsigned int first,unsigned int n)7547 id_list id_list::drop(unsigned int first, unsigned int n) const
7548 {
7549 auto res = isl_id_list_drop(copy(), first, n);
7550 return manage(res);
7551 }
7552
foreach(const std::function<stat (id)> & fn)7553 stat id_list::foreach(const std::function<stat(id)> &fn) const
7554 {
7555 struct fn_data {
7556 const std::function<stat(id)> *func;
7557 } fn_data = { &fn };
7558 auto fn_lambda = [](isl_id *arg_0, void *arg_1) -> isl_stat {
7559 auto *data = static_cast<struct fn_data *>(arg_1);
7560 stat ret = (*data->func)(manage(arg_0));
7561 return ret.release();
7562 };
7563 auto res = isl_id_list_foreach(get(), fn_lambda, &fn_data);
7564 return manage(res);
7565 }
7566
from_id(id el)7567 id_list id_list::from_id(id el)
7568 {
7569 auto res = isl_id_list_from_id(el.release());
7570 return manage(res);
7571 }
7572
get_at(int index)7573 id id_list::get_at(int index) const
7574 {
7575 auto res = isl_id_list_get_at(get(), index);
7576 return manage(res);
7577 }
7578
get_id(int index)7579 id id_list::get_id(int index) const
7580 {
7581 auto res = isl_id_list_get_id(get(), index);
7582 return manage(res);
7583 }
7584
insert(unsigned int pos,id el)7585 id_list id_list::insert(unsigned int pos, id el) const
7586 {
7587 auto res = isl_id_list_insert(copy(), pos, el.release());
7588 return manage(res);
7589 }
7590
n_id()7591 int id_list::n_id() const
7592 {
7593 auto res = isl_id_list_n_id(get());
7594 return res;
7595 }
7596
reverse()7597 id_list id_list::reverse() const
7598 {
7599 auto res = isl_id_list_reverse(copy());
7600 return manage(res);
7601 }
7602
set_id(int index,id el)7603 id_list id_list::set_id(int index, id el) const
7604 {
7605 auto res = isl_id_list_set_id(copy(), index, el.release());
7606 return manage(res);
7607 }
7608
size()7609 int id_list::size() const
7610 {
7611 auto res = isl_id_list_size(get());
7612 return res;
7613 }
7614
swap(unsigned int pos1,unsigned int pos2)7615 id_list id_list::swap(unsigned int pos1, unsigned int pos2) const
7616 {
7617 auto res = isl_id_list_swap(copy(), pos1, pos2);
7618 return manage(res);
7619 }
7620
7621 // implementations for isl::id_to_ast_expr
manage(__isl_take isl_id_to_ast_expr * ptr)7622 id_to_ast_expr manage(__isl_take isl_id_to_ast_expr *ptr) {
7623 return id_to_ast_expr(ptr);
7624 }
manage_copy(__isl_keep isl_id_to_ast_expr * ptr)7625 id_to_ast_expr manage_copy(__isl_keep isl_id_to_ast_expr *ptr) {
7626 ptr = isl_id_to_ast_expr_copy(ptr);
7627 return id_to_ast_expr(ptr);
7628 }
7629
id_to_ast_expr()7630 id_to_ast_expr::id_to_ast_expr()
7631 : ptr(nullptr) {}
7632
id_to_ast_expr(const id_to_ast_expr & obj)7633 id_to_ast_expr::id_to_ast_expr(const id_to_ast_expr &obj)
7634 : ptr(nullptr)
7635 {
7636 ptr = obj.copy();
7637 }
id_to_ast_expr(std::nullptr_t)7638 id_to_ast_expr::id_to_ast_expr(std::nullptr_t)
7639 : ptr(nullptr) {}
7640
7641
id_to_ast_expr(__isl_take isl_id_to_ast_expr * ptr)7642 id_to_ast_expr::id_to_ast_expr(__isl_take isl_id_to_ast_expr *ptr)
7643 : ptr(ptr) {}
7644
7645
7646 id_to_ast_expr &id_to_ast_expr::operator=(id_to_ast_expr obj) {
7647 std::swap(this->ptr, obj.ptr);
7648 return *this;
7649 }
7650
~id_to_ast_expr()7651 id_to_ast_expr::~id_to_ast_expr() {
7652 if (ptr)
7653 isl_id_to_ast_expr_free(ptr);
7654 }
7655
copy()7656 __isl_give isl_id_to_ast_expr *id_to_ast_expr::copy() const & {
7657 return isl_id_to_ast_expr_copy(ptr);
7658 }
7659
get()7660 __isl_keep isl_id_to_ast_expr *id_to_ast_expr::get() const {
7661 return ptr;
7662 }
7663
release()7664 __isl_give isl_id_to_ast_expr *id_to_ast_expr::release() {
7665 isl_id_to_ast_expr *tmp = ptr;
7666 ptr = nullptr;
7667 return tmp;
7668 }
7669
is_null()7670 bool id_to_ast_expr::is_null() const {
7671 return ptr == nullptr;
7672 }
7673 id_to_ast_expr::operator bool() const {
7674 return !is_null();
7675 }
7676
7677
get_ctx()7678 ctx id_to_ast_expr::get_ctx() const {
7679 return ctx(isl_id_to_ast_expr_get_ctx(ptr));
7680 }
7681
dump()7682 void id_to_ast_expr::dump() const {
7683 isl_id_to_ast_expr_dump(get());
7684 }
7685
7686
alloc(ctx ctx,int min_size)7687 id_to_ast_expr id_to_ast_expr::alloc(ctx ctx, int min_size)
7688 {
7689 auto res = isl_id_to_ast_expr_alloc(ctx.release(), min_size);
7690 return manage(res);
7691 }
7692
drop(id key)7693 id_to_ast_expr id_to_ast_expr::drop(id key) const
7694 {
7695 auto res = isl_id_to_ast_expr_drop(copy(), key.release());
7696 return manage(res);
7697 }
7698
foreach(const std::function<stat (id,ast_expr)> & fn)7699 stat id_to_ast_expr::foreach(const std::function<stat(id, ast_expr)> &fn) const
7700 {
7701 struct fn_data {
7702 const std::function<stat(id, ast_expr)> *func;
7703 } fn_data = { &fn };
7704 auto fn_lambda = [](isl_id *arg_0, isl_ast_expr *arg_1, void *arg_2) -> isl_stat {
7705 auto *data = static_cast<struct fn_data *>(arg_2);
7706 stat ret = (*data->func)(manage(arg_0), manage(arg_1));
7707 return ret.release();
7708 };
7709 auto res = isl_id_to_ast_expr_foreach(get(), fn_lambda, &fn_data);
7710 return manage(res);
7711 }
7712
get(id key)7713 ast_expr id_to_ast_expr::get(id key) const
7714 {
7715 auto res = isl_id_to_ast_expr_get(get(), key.release());
7716 return manage(res);
7717 }
7718
has(const id & key)7719 boolean id_to_ast_expr::has(const id &key) const
7720 {
7721 auto res = isl_id_to_ast_expr_has(get(), key.get());
7722 return manage(res);
7723 }
7724
set(id key,ast_expr val)7725 id_to_ast_expr id_to_ast_expr::set(id key, ast_expr val) const
7726 {
7727 auto res = isl_id_to_ast_expr_set(copy(), key.release(), val.release());
7728 return manage(res);
7729 }
7730
7731 // implementations for isl::local_space
manage(__isl_take isl_local_space * ptr)7732 local_space manage(__isl_take isl_local_space *ptr) {
7733 return local_space(ptr);
7734 }
manage_copy(__isl_keep isl_local_space * ptr)7735 local_space manage_copy(__isl_keep isl_local_space *ptr) {
7736 ptr = isl_local_space_copy(ptr);
7737 return local_space(ptr);
7738 }
7739
local_space()7740 local_space::local_space()
7741 : ptr(nullptr) {}
7742
local_space(const local_space & obj)7743 local_space::local_space(const local_space &obj)
7744 : ptr(nullptr)
7745 {
7746 ptr = obj.copy();
7747 }
local_space(std::nullptr_t)7748 local_space::local_space(std::nullptr_t)
7749 : ptr(nullptr) {}
7750
7751
local_space(__isl_take isl_local_space * ptr)7752 local_space::local_space(__isl_take isl_local_space *ptr)
7753 : ptr(ptr) {}
7754
local_space(space dim)7755 local_space::local_space(space dim)
7756 {
7757 auto res = isl_local_space_from_space(dim.release());
7758 ptr = res;
7759 }
7760
7761 local_space &local_space::operator=(local_space obj) {
7762 std::swap(this->ptr, obj.ptr);
7763 return *this;
7764 }
7765
~local_space()7766 local_space::~local_space() {
7767 if (ptr)
7768 isl_local_space_free(ptr);
7769 }
7770
copy()7771 __isl_give isl_local_space *local_space::copy() const & {
7772 return isl_local_space_copy(ptr);
7773 }
7774
get()7775 __isl_keep isl_local_space *local_space::get() const {
7776 return ptr;
7777 }
7778
release()7779 __isl_give isl_local_space *local_space::release() {
7780 isl_local_space *tmp = ptr;
7781 ptr = nullptr;
7782 return tmp;
7783 }
7784
is_null()7785 bool local_space::is_null() const {
7786 return ptr == nullptr;
7787 }
7788 local_space::operator bool() const {
7789 return !is_null();
7790 }
7791
7792
get_ctx()7793 ctx local_space::get_ctx() const {
7794 return ctx(isl_local_space_get_ctx(ptr));
7795 }
7796
dump()7797 void local_space::dump() const {
7798 isl_local_space_dump(get());
7799 }
7800
7801
add_dims(isl::dim type,unsigned int n)7802 local_space local_space::add_dims(isl::dim type, unsigned int n) const
7803 {
7804 auto res = isl_local_space_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
7805 return manage(res);
7806 }
7807
dim(isl::dim type)7808 int local_space::dim(isl::dim type) const
7809 {
7810 auto res = isl_local_space_dim(get(), static_cast<enum isl_dim_type>(type));
7811 return res;
7812 }
7813
domain()7814 local_space local_space::domain() const
7815 {
7816 auto res = isl_local_space_domain(copy());
7817 return manage(res);
7818 }
7819
drop_dims(isl::dim type,unsigned int first,unsigned int n)7820 local_space local_space::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
7821 {
7822 auto res = isl_local_space_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
7823 return manage(res);
7824 }
7825
find_dim_by_name(isl::dim type,const std::string & name)7826 int local_space::find_dim_by_name(isl::dim type, const std::string &name) const
7827 {
7828 auto res = isl_local_space_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
7829 return res;
7830 }
7831
flatten_domain()7832 local_space local_space::flatten_domain() const
7833 {
7834 auto res = isl_local_space_flatten_domain(copy());
7835 return manage(res);
7836 }
7837
flatten_range()7838 local_space local_space::flatten_range() const
7839 {
7840 auto res = isl_local_space_flatten_range(copy());
7841 return manage(res);
7842 }
7843
from_domain()7844 local_space local_space::from_domain() const
7845 {
7846 auto res = isl_local_space_from_domain(copy());
7847 return manage(res);
7848 }
7849
get_dim_id(isl::dim type,unsigned int pos)7850 id local_space::get_dim_id(isl::dim type, unsigned int pos) const
7851 {
7852 auto res = isl_local_space_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
7853 return manage(res);
7854 }
7855
get_dim_name(isl::dim type,unsigned int pos)7856 std::string local_space::get_dim_name(isl::dim type, unsigned int pos) const
7857 {
7858 auto res = isl_local_space_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
7859 std::string tmp(res);
7860 return tmp;
7861 }
7862
get_div(int pos)7863 aff local_space::get_div(int pos) const
7864 {
7865 auto res = isl_local_space_get_div(get(), pos);
7866 return manage(res);
7867 }
7868
get_space()7869 space local_space::get_space() const
7870 {
7871 auto res = isl_local_space_get_space(get());
7872 return manage(res);
7873 }
7874
has_dim_id(isl::dim type,unsigned int pos)7875 boolean local_space::has_dim_id(isl::dim type, unsigned int pos) const
7876 {
7877 auto res = isl_local_space_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
7878 return manage(res);
7879 }
7880
has_dim_name(isl::dim type,unsigned int pos)7881 boolean local_space::has_dim_name(isl::dim type, unsigned int pos) const
7882 {
7883 auto res = isl_local_space_has_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
7884 return manage(res);
7885 }
7886
insert_dims(isl::dim type,unsigned int first,unsigned int n)7887 local_space local_space::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
7888 {
7889 auto res = isl_local_space_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
7890 return manage(res);
7891 }
7892
intersect(local_space ls2)7893 local_space local_space::intersect(local_space ls2) const
7894 {
7895 auto res = isl_local_space_intersect(copy(), ls2.release());
7896 return manage(res);
7897 }
7898
is_equal(const local_space & ls2)7899 boolean local_space::is_equal(const local_space &ls2) const
7900 {
7901 auto res = isl_local_space_is_equal(get(), ls2.get());
7902 return manage(res);
7903 }
7904
is_params()7905 boolean local_space::is_params() const
7906 {
7907 auto res = isl_local_space_is_params(get());
7908 return manage(res);
7909 }
7910
is_set()7911 boolean local_space::is_set() const
7912 {
7913 auto res = isl_local_space_is_set(get());
7914 return manage(res);
7915 }
7916
range()7917 local_space local_space::range() const
7918 {
7919 auto res = isl_local_space_range(copy());
7920 return manage(res);
7921 }
7922
set_dim_id(isl::dim type,unsigned int pos,id id)7923 local_space local_space::set_dim_id(isl::dim type, unsigned int pos, id id) const
7924 {
7925 auto res = isl_local_space_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
7926 return manage(res);
7927 }
7928
set_from_params()7929 local_space local_space::set_from_params() const
7930 {
7931 auto res = isl_local_space_set_from_params(copy());
7932 return manage(res);
7933 }
7934
set_tuple_id(isl::dim type,id id)7935 local_space local_space::set_tuple_id(isl::dim type, id id) const
7936 {
7937 auto res = isl_local_space_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
7938 return manage(res);
7939 }
7940
wrap()7941 local_space local_space::wrap() const
7942 {
7943 auto res = isl_local_space_wrap(copy());
7944 return manage(res);
7945 }
7946
7947 // implementations for isl::map
manage(__isl_take isl_map * ptr)7948 map manage(__isl_take isl_map *ptr) {
7949 return map(ptr);
7950 }
manage_copy(__isl_keep isl_map * ptr)7951 map manage_copy(__isl_keep isl_map *ptr) {
7952 ptr = isl_map_copy(ptr);
7953 return map(ptr);
7954 }
7955
map()7956 map::map()
7957 : ptr(nullptr) {}
7958
map(const map & obj)7959 map::map(const map &obj)
7960 : ptr(nullptr)
7961 {
7962 ptr = obj.copy();
7963 }
map(std::nullptr_t)7964 map::map(std::nullptr_t)
7965 : ptr(nullptr) {}
7966
7967
map(__isl_take isl_map * ptr)7968 map::map(__isl_take isl_map *ptr)
7969 : ptr(ptr) {}
7970
map(ctx ctx,const std::string & str)7971 map::map(ctx ctx, const std::string &str)
7972 {
7973 auto res = isl_map_read_from_str(ctx.release(), str.c_str());
7974 ptr = res;
7975 }
map(basic_map bmap)7976 map::map(basic_map bmap)
7977 {
7978 auto res = isl_map_from_basic_map(bmap.release());
7979 ptr = res;
7980 }
7981
7982 map &map::operator=(map obj) {
7983 std::swap(this->ptr, obj.ptr);
7984 return *this;
7985 }
7986
~map()7987 map::~map() {
7988 if (ptr)
7989 isl_map_free(ptr);
7990 }
7991
copy()7992 __isl_give isl_map *map::copy() const & {
7993 return isl_map_copy(ptr);
7994 }
7995
get()7996 __isl_keep isl_map *map::get() const {
7997 return ptr;
7998 }
7999
release()8000 __isl_give isl_map *map::release() {
8001 isl_map *tmp = ptr;
8002 ptr = nullptr;
8003 return tmp;
8004 }
8005
is_null()8006 bool map::is_null() const {
8007 return ptr == nullptr;
8008 }
8009 map::operator bool() const {
8010 return !is_null();
8011 }
8012
8013
get_ctx()8014 ctx map::get_ctx() const {
8015 return ctx(isl_map_get_ctx(ptr));
8016 }
to_str()8017 std::string map::to_str() const {
8018 char *Tmp = isl_map_to_str(get());
8019 if (!Tmp)
8020 return "";
8021 std::string S(Tmp);
8022 free(Tmp);
8023 return S;
8024 }
8025
8026
dump()8027 void map::dump() const {
8028 isl_map_dump(get());
8029 }
8030
8031
add_constraint(constraint constraint)8032 map map::add_constraint(constraint constraint) const
8033 {
8034 auto res = isl_map_add_constraint(copy(), constraint.release());
8035 return manage(res);
8036 }
8037
add_dims(isl::dim type,unsigned int n)8038 map map::add_dims(isl::dim type, unsigned int n) const
8039 {
8040 auto res = isl_map_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
8041 return manage(res);
8042 }
8043
affine_hull()8044 basic_map map::affine_hull() const
8045 {
8046 auto res = isl_map_affine_hull(copy());
8047 return manage(res);
8048 }
8049
align_params(space model)8050 map map::align_params(space model) const
8051 {
8052 auto res = isl_map_align_params(copy(), model.release());
8053 return manage(res);
8054 }
8055
apply_domain(map map2)8056 map map::apply_domain(map map2) const
8057 {
8058 auto res = isl_map_apply_domain(copy(), map2.release());
8059 return manage(res);
8060 }
8061
apply_range(map map2)8062 map map::apply_range(map map2) const
8063 {
8064 auto res = isl_map_apply_range(copy(), map2.release());
8065 return manage(res);
8066 }
8067
can_curry()8068 boolean map::can_curry() const
8069 {
8070 auto res = isl_map_can_curry(get());
8071 return manage(res);
8072 }
8073
can_range_curry()8074 boolean map::can_range_curry() const
8075 {
8076 auto res = isl_map_can_range_curry(get());
8077 return manage(res);
8078 }
8079
can_uncurry()8080 boolean map::can_uncurry() const
8081 {
8082 auto res = isl_map_can_uncurry(get());
8083 return manage(res);
8084 }
8085
can_zip()8086 boolean map::can_zip() const
8087 {
8088 auto res = isl_map_can_zip(get());
8089 return manage(res);
8090 }
8091
coalesce()8092 map map::coalesce() const
8093 {
8094 auto res = isl_map_coalesce(copy());
8095 return manage(res);
8096 }
8097
complement()8098 map map::complement() const
8099 {
8100 auto res = isl_map_complement(copy());
8101 return manage(res);
8102 }
8103
convex_hull()8104 basic_map map::convex_hull() const
8105 {
8106 auto res = isl_map_convex_hull(copy());
8107 return manage(res);
8108 }
8109
curry()8110 map map::curry() const
8111 {
8112 auto res = isl_map_curry(copy());
8113 return manage(res);
8114 }
8115
deltas()8116 set map::deltas() const
8117 {
8118 auto res = isl_map_deltas(copy());
8119 return manage(res);
8120 }
8121
deltas_map()8122 map map::deltas_map() const
8123 {
8124 auto res = isl_map_deltas_map(copy());
8125 return manage(res);
8126 }
8127
detect_equalities()8128 map map::detect_equalities() const
8129 {
8130 auto res = isl_map_detect_equalities(copy());
8131 return manage(res);
8132 }
8133
dim(isl::dim type)8134 unsigned int map::dim(isl::dim type) const
8135 {
8136 auto res = isl_map_dim(get(), static_cast<enum isl_dim_type>(type));
8137 return res;
8138 }
8139
dim_max(int pos)8140 pw_aff map::dim_max(int pos) const
8141 {
8142 auto res = isl_map_dim_max(copy(), pos);
8143 return manage(res);
8144 }
8145
dim_min(int pos)8146 pw_aff map::dim_min(int pos) const
8147 {
8148 auto res = isl_map_dim_min(copy(), pos);
8149 return manage(res);
8150 }
8151
domain()8152 set map::domain() const
8153 {
8154 auto res = isl_map_domain(copy());
8155 return manage(res);
8156 }
8157
domain_factor_domain()8158 map map::domain_factor_domain() const
8159 {
8160 auto res = isl_map_domain_factor_domain(copy());
8161 return manage(res);
8162 }
8163
domain_factor_range()8164 map map::domain_factor_range() const
8165 {
8166 auto res = isl_map_domain_factor_range(copy());
8167 return manage(res);
8168 }
8169
domain_is_wrapping()8170 boolean map::domain_is_wrapping() const
8171 {
8172 auto res = isl_map_domain_is_wrapping(get());
8173 return manage(res);
8174 }
8175
domain_map()8176 map map::domain_map() const
8177 {
8178 auto res = isl_map_domain_map(copy());
8179 return manage(res);
8180 }
8181
domain_product(map map2)8182 map map::domain_product(map map2) const
8183 {
8184 auto res = isl_map_domain_product(copy(), map2.release());
8185 return manage(res);
8186 }
8187
drop_constraints_involving_dims(isl::dim type,unsigned int first,unsigned int n)8188 map map::drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
8189 {
8190 auto res = isl_map_drop_constraints_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
8191 return manage(res);
8192 }
8193
drop_constraints_not_involving_dims(isl::dim type,unsigned int first,unsigned int n)8194 map map::drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
8195 {
8196 auto res = isl_map_drop_constraints_not_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
8197 return manage(res);
8198 }
8199
drop_unused_params()8200 map map::drop_unused_params() const
8201 {
8202 auto res = isl_map_drop_unused_params(copy());
8203 return manage(res);
8204 }
8205
eliminate(isl::dim type,unsigned int first,unsigned int n)8206 map map::eliminate(isl::dim type, unsigned int first, unsigned int n) const
8207 {
8208 auto res = isl_map_eliminate(copy(), static_cast<enum isl_dim_type>(type), first, n);
8209 return manage(res);
8210 }
8211
empty(space space)8212 map map::empty(space space)
8213 {
8214 auto res = isl_map_empty(space.release());
8215 return manage(res);
8216 }
8217
equate(isl::dim type1,int pos1,isl::dim type2,int pos2)8218 map map::equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const
8219 {
8220 auto res = isl_map_equate(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
8221 return manage(res);
8222 }
8223
factor_domain()8224 map map::factor_domain() const
8225 {
8226 auto res = isl_map_factor_domain(copy());
8227 return manage(res);
8228 }
8229
factor_range()8230 map map::factor_range() const
8231 {
8232 auto res = isl_map_factor_range(copy());
8233 return manage(res);
8234 }
8235
find_dim_by_id(isl::dim type,const id & id)8236 int map::find_dim_by_id(isl::dim type, const id &id) const
8237 {
8238 auto res = isl_map_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
8239 return res;
8240 }
8241
find_dim_by_name(isl::dim type,const std::string & name)8242 int map::find_dim_by_name(isl::dim type, const std::string &name) const
8243 {
8244 auto res = isl_map_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
8245 return res;
8246 }
8247
fix_si(isl::dim type,unsigned int pos,int value)8248 map map::fix_si(isl::dim type, unsigned int pos, int value) const
8249 {
8250 auto res = isl_map_fix_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
8251 return manage(res);
8252 }
8253
fix_val(isl::dim type,unsigned int pos,val v)8254 map map::fix_val(isl::dim type, unsigned int pos, val v) const
8255 {
8256 auto res = isl_map_fix_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
8257 return manage(res);
8258 }
8259
fixed_power_val(val exp)8260 map map::fixed_power_val(val exp) const
8261 {
8262 auto res = isl_map_fixed_power_val(copy(), exp.release());
8263 return manage(res);
8264 }
8265
flat_domain_product(map map2)8266 map map::flat_domain_product(map map2) const
8267 {
8268 auto res = isl_map_flat_domain_product(copy(), map2.release());
8269 return manage(res);
8270 }
8271
flat_product(map map2)8272 map map::flat_product(map map2) const
8273 {
8274 auto res = isl_map_flat_product(copy(), map2.release());
8275 return manage(res);
8276 }
8277
flat_range_product(map map2)8278 map map::flat_range_product(map map2) const
8279 {
8280 auto res = isl_map_flat_range_product(copy(), map2.release());
8281 return manage(res);
8282 }
8283
flatten()8284 map map::flatten() const
8285 {
8286 auto res = isl_map_flatten(copy());
8287 return manage(res);
8288 }
8289
flatten_domain()8290 map map::flatten_domain() const
8291 {
8292 auto res = isl_map_flatten_domain(copy());
8293 return manage(res);
8294 }
8295
flatten_range()8296 map map::flatten_range() const
8297 {
8298 auto res = isl_map_flatten_range(copy());
8299 return manage(res);
8300 }
8301
floordiv_val(val d)8302 map map::floordiv_val(val d) const
8303 {
8304 auto res = isl_map_floordiv_val(copy(), d.release());
8305 return manage(res);
8306 }
8307
foreach_basic_map(const std::function<stat (basic_map)> & fn)8308 stat map::foreach_basic_map(const std::function<stat(basic_map)> &fn) const
8309 {
8310 struct fn_data {
8311 const std::function<stat(basic_map)> *func;
8312 } fn_data = { &fn };
8313 auto fn_lambda = [](isl_basic_map *arg_0, void *arg_1) -> isl_stat {
8314 auto *data = static_cast<struct fn_data *>(arg_1);
8315 stat ret = (*data->func)(manage(arg_0));
8316 return ret.release();
8317 };
8318 auto res = isl_map_foreach_basic_map(get(), fn_lambda, &fn_data);
8319 return manage(res);
8320 }
8321
from_aff(aff aff)8322 map map::from_aff(aff aff)
8323 {
8324 auto res = isl_map_from_aff(aff.release());
8325 return manage(res);
8326 }
8327
from_domain(set set)8328 map map::from_domain(set set)
8329 {
8330 auto res = isl_map_from_domain(set.release());
8331 return manage(res);
8332 }
8333
from_domain_and_range(set domain,set range)8334 map map::from_domain_and_range(set domain, set range)
8335 {
8336 auto res = isl_map_from_domain_and_range(domain.release(), range.release());
8337 return manage(res);
8338 }
8339
from_multi_aff(multi_aff maff)8340 map map::from_multi_aff(multi_aff maff)
8341 {
8342 auto res = isl_map_from_multi_aff(maff.release());
8343 return manage(res);
8344 }
8345
from_multi_pw_aff(multi_pw_aff mpa)8346 map map::from_multi_pw_aff(multi_pw_aff mpa)
8347 {
8348 auto res = isl_map_from_multi_pw_aff(mpa.release());
8349 return manage(res);
8350 }
8351
from_pw_aff(pw_aff pwaff)8352 map map::from_pw_aff(pw_aff pwaff)
8353 {
8354 auto res = isl_map_from_pw_aff(pwaff.release());
8355 return manage(res);
8356 }
8357
from_pw_multi_aff(pw_multi_aff pma)8358 map map::from_pw_multi_aff(pw_multi_aff pma)
8359 {
8360 auto res = isl_map_from_pw_multi_aff(pma.release());
8361 return manage(res);
8362 }
8363
from_range(set set)8364 map map::from_range(set set)
8365 {
8366 auto res = isl_map_from_range(set.release());
8367 return manage(res);
8368 }
8369
from_union_map(union_map umap)8370 map map::from_union_map(union_map umap)
8371 {
8372 auto res = isl_map_from_union_map(umap.release());
8373 return manage(res);
8374 }
8375
get_basic_map_list()8376 basic_map_list map::get_basic_map_list() const
8377 {
8378 auto res = isl_map_get_basic_map_list(get());
8379 return manage(res);
8380 }
8381
get_dim_id(isl::dim type,unsigned int pos)8382 id map::get_dim_id(isl::dim type, unsigned int pos) const
8383 {
8384 auto res = isl_map_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
8385 return manage(res);
8386 }
8387
get_dim_name(isl::dim type,unsigned int pos)8388 std::string map::get_dim_name(isl::dim type, unsigned int pos) const
8389 {
8390 auto res = isl_map_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
8391 std::string tmp(res);
8392 return tmp;
8393 }
8394
get_hash()8395 uint32_t map::get_hash() const
8396 {
8397 auto res = isl_map_get_hash(get());
8398 return res;
8399 }
8400
get_range_simple_fixed_box_hull()8401 fixed_box map::get_range_simple_fixed_box_hull() const
8402 {
8403 auto res = isl_map_get_range_simple_fixed_box_hull(get());
8404 return manage(res);
8405 }
8406
get_space()8407 space map::get_space() const
8408 {
8409 auto res = isl_map_get_space(get());
8410 return manage(res);
8411 }
8412
get_tuple_id(isl::dim type)8413 id map::get_tuple_id(isl::dim type) const
8414 {
8415 auto res = isl_map_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
8416 return manage(res);
8417 }
8418
get_tuple_name(isl::dim type)8419 std::string map::get_tuple_name(isl::dim type) const
8420 {
8421 auto res = isl_map_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
8422 std::string tmp(res);
8423 return tmp;
8424 }
8425
gist(map context)8426 map map::gist(map context) const
8427 {
8428 auto res = isl_map_gist(copy(), context.release());
8429 return manage(res);
8430 }
8431
gist_basic_map(basic_map context)8432 map map::gist_basic_map(basic_map context) const
8433 {
8434 auto res = isl_map_gist_basic_map(copy(), context.release());
8435 return manage(res);
8436 }
8437
gist_domain(set context)8438 map map::gist_domain(set context) const
8439 {
8440 auto res = isl_map_gist_domain(copy(), context.release());
8441 return manage(res);
8442 }
8443
gist_params(set context)8444 map map::gist_params(set context) const
8445 {
8446 auto res = isl_map_gist_params(copy(), context.release());
8447 return manage(res);
8448 }
8449
gist_range(set context)8450 map map::gist_range(set context) const
8451 {
8452 auto res = isl_map_gist_range(copy(), context.release());
8453 return manage(res);
8454 }
8455
has_dim_id(isl::dim type,unsigned int pos)8456 boolean map::has_dim_id(isl::dim type, unsigned int pos) const
8457 {
8458 auto res = isl_map_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
8459 return manage(res);
8460 }
8461
has_dim_name(isl::dim type,unsigned int pos)8462 boolean map::has_dim_name(isl::dim type, unsigned int pos) const
8463 {
8464 auto res = isl_map_has_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
8465 return manage(res);
8466 }
8467
has_equal_space(const map & map2)8468 boolean map::has_equal_space(const map &map2) const
8469 {
8470 auto res = isl_map_has_equal_space(get(), map2.get());
8471 return manage(res);
8472 }
8473
has_tuple_id(isl::dim type)8474 boolean map::has_tuple_id(isl::dim type) const
8475 {
8476 auto res = isl_map_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
8477 return manage(res);
8478 }
8479
has_tuple_name(isl::dim type)8480 boolean map::has_tuple_name(isl::dim type) const
8481 {
8482 auto res = isl_map_has_tuple_name(get(), static_cast<enum isl_dim_type>(type));
8483 return manage(res);
8484 }
8485
identity(space dim)8486 map map::identity(space dim)
8487 {
8488 auto res = isl_map_identity(dim.release());
8489 return manage(res);
8490 }
8491
insert_dims(isl::dim type,unsigned int pos,unsigned int n)8492 map map::insert_dims(isl::dim type, unsigned int pos, unsigned int n) const
8493 {
8494 auto res = isl_map_insert_dims(copy(), static_cast<enum isl_dim_type>(type), pos, n);
8495 return manage(res);
8496 }
8497
intersect(map map2)8498 map map::intersect(map map2) const
8499 {
8500 auto res = isl_map_intersect(copy(), map2.release());
8501 return manage(res);
8502 }
8503
intersect_domain(set set)8504 map map::intersect_domain(set set) const
8505 {
8506 auto res = isl_map_intersect_domain(copy(), set.release());
8507 return manage(res);
8508 }
8509
intersect_domain_factor_range(map factor)8510 map map::intersect_domain_factor_range(map factor) const
8511 {
8512 auto res = isl_map_intersect_domain_factor_range(copy(), factor.release());
8513 return manage(res);
8514 }
8515
intersect_params(set params)8516 map map::intersect_params(set params) const
8517 {
8518 auto res = isl_map_intersect_params(copy(), params.release());
8519 return manage(res);
8520 }
8521
intersect_range(set set)8522 map map::intersect_range(set set) const
8523 {
8524 auto res = isl_map_intersect_range(copy(), set.release());
8525 return manage(res);
8526 }
8527
intersect_range_factor_range(map factor)8528 map map::intersect_range_factor_range(map factor) const
8529 {
8530 auto res = isl_map_intersect_range_factor_range(copy(), factor.release());
8531 return manage(res);
8532 }
8533
involves_dims(isl::dim type,unsigned int first,unsigned int n)8534 boolean map::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
8535 {
8536 auto res = isl_map_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
8537 return manage(res);
8538 }
8539
is_bijective()8540 boolean map::is_bijective() const
8541 {
8542 auto res = isl_map_is_bijective(get());
8543 return manage(res);
8544 }
8545
is_disjoint(const map & map2)8546 boolean map::is_disjoint(const map &map2) const
8547 {
8548 auto res = isl_map_is_disjoint(get(), map2.get());
8549 return manage(res);
8550 }
8551
is_empty()8552 boolean map::is_empty() const
8553 {
8554 auto res = isl_map_is_empty(get());
8555 return manage(res);
8556 }
8557
is_equal(const map & map2)8558 boolean map::is_equal(const map &map2) const
8559 {
8560 auto res = isl_map_is_equal(get(), map2.get());
8561 return manage(res);
8562 }
8563
is_identity()8564 boolean map::is_identity() const
8565 {
8566 auto res = isl_map_is_identity(get());
8567 return manage(res);
8568 }
8569
is_injective()8570 boolean map::is_injective() const
8571 {
8572 auto res = isl_map_is_injective(get());
8573 return manage(res);
8574 }
8575
is_product()8576 boolean map::is_product() const
8577 {
8578 auto res = isl_map_is_product(get());
8579 return manage(res);
8580 }
8581
is_single_valued()8582 boolean map::is_single_valued() const
8583 {
8584 auto res = isl_map_is_single_valued(get());
8585 return manage(res);
8586 }
8587
is_strict_subset(const map & map2)8588 boolean map::is_strict_subset(const map &map2) const
8589 {
8590 auto res = isl_map_is_strict_subset(get(), map2.get());
8591 return manage(res);
8592 }
8593
is_subset(const map & map2)8594 boolean map::is_subset(const map &map2) const
8595 {
8596 auto res = isl_map_is_subset(get(), map2.get());
8597 return manage(res);
8598 }
8599
is_translation()8600 int map::is_translation() const
8601 {
8602 auto res = isl_map_is_translation(get());
8603 return res;
8604 }
8605
lex_ge(space set_dim)8606 map map::lex_ge(space set_dim)
8607 {
8608 auto res = isl_map_lex_ge(set_dim.release());
8609 return manage(res);
8610 }
8611
lex_ge_first(space dim,unsigned int n)8612 map map::lex_ge_first(space dim, unsigned int n)
8613 {
8614 auto res = isl_map_lex_ge_first(dim.release(), n);
8615 return manage(res);
8616 }
8617
lex_ge_map(map map2)8618 map map::lex_ge_map(map map2) const
8619 {
8620 auto res = isl_map_lex_ge_map(copy(), map2.release());
8621 return manage(res);
8622 }
8623
lex_gt(space set_dim)8624 map map::lex_gt(space set_dim)
8625 {
8626 auto res = isl_map_lex_gt(set_dim.release());
8627 return manage(res);
8628 }
8629
lex_gt_first(space dim,unsigned int n)8630 map map::lex_gt_first(space dim, unsigned int n)
8631 {
8632 auto res = isl_map_lex_gt_first(dim.release(), n);
8633 return manage(res);
8634 }
8635
lex_gt_map(map map2)8636 map map::lex_gt_map(map map2) const
8637 {
8638 auto res = isl_map_lex_gt_map(copy(), map2.release());
8639 return manage(res);
8640 }
8641
lex_le(space set_dim)8642 map map::lex_le(space set_dim)
8643 {
8644 auto res = isl_map_lex_le(set_dim.release());
8645 return manage(res);
8646 }
8647
lex_le_first(space dim,unsigned int n)8648 map map::lex_le_first(space dim, unsigned int n)
8649 {
8650 auto res = isl_map_lex_le_first(dim.release(), n);
8651 return manage(res);
8652 }
8653
lex_le_map(map map2)8654 map map::lex_le_map(map map2) const
8655 {
8656 auto res = isl_map_lex_le_map(copy(), map2.release());
8657 return manage(res);
8658 }
8659
lex_lt(space set_dim)8660 map map::lex_lt(space set_dim)
8661 {
8662 auto res = isl_map_lex_lt(set_dim.release());
8663 return manage(res);
8664 }
8665
lex_lt_first(space dim,unsigned int n)8666 map map::lex_lt_first(space dim, unsigned int n)
8667 {
8668 auto res = isl_map_lex_lt_first(dim.release(), n);
8669 return manage(res);
8670 }
8671
lex_lt_map(map map2)8672 map map::lex_lt_map(map map2) const
8673 {
8674 auto res = isl_map_lex_lt_map(copy(), map2.release());
8675 return manage(res);
8676 }
8677
lexmax()8678 map map::lexmax() const
8679 {
8680 auto res = isl_map_lexmax(copy());
8681 return manage(res);
8682 }
8683
lexmax_pw_multi_aff()8684 pw_multi_aff map::lexmax_pw_multi_aff() const
8685 {
8686 auto res = isl_map_lexmax_pw_multi_aff(copy());
8687 return manage(res);
8688 }
8689
lexmin()8690 map map::lexmin() const
8691 {
8692 auto res = isl_map_lexmin(copy());
8693 return manage(res);
8694 }
8695
lexmin_pw_multi_aff()8696 pw_multi_aff map::lexmin_pw_multi_aff() const
8697 {
8698 auto res = isl_map_lexmin_pw_multi_aff(copy());
8699 return manage(res);
8700 }
8701
lower_bound_si(isl::dim type,unsigned int pos,int value)8702 map map::lower_bound_si(isl::dim type, unsigned int pos, int value) const
8703 {
8704 auto res = isl_map_lower_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
8705 return manage(res);
8706 }
8707
move_dims(isl::dim dst_type,unsigned int dst_pos,isl::dim src_type,unsigned int src_pos,unsigned int n)8708 map map::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
8709 {
8710 auto res = isl_map_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
8711 return manage(res);
8712 }
8713
n_basic_map()8714 int map::n_basic_map() const
8715 {
8716 auto res = isl_map_n_basic_map(get());
8717 return res;
8718 }
8719
nat_universe(space dim)8720 map map::nat_universe(space dim)
8721 {
8722 auto res = isl_map_nat_universe(dim.release());
8723 return manage(res);
8724 }
8725
neg()8726 map map::neg() const
8727 {
8728 auto res = isl_map_neg(copy());
8729 return manage(res);
8730 }
8731
oppose(isl::dim type1,int pos1,isl::dim type2,int pos2)8732 map map::oppose(isl::dim type1, int pos1, isl::dim type2, int pos2) const
8733 {
8734 auto res = isl_map_oppose(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
8735 return manage(res);
8736 }
8737
order_ge(isl::dim type1,int pos1,isl::dim type2,int pos2)8738 map map::order_ge(isl::dim type1, int pos1, isl::dim type2, int pos2) const
8739 {
8740 auto res = isl_map_order_ge(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
8741 return manage(res);
8742 }
8743
order_gt(isl::dim type1,int pos1,isl::dim type2,int pos2)8744 map map::order_gt(isl::dim type1, int pos1, isl::dim type2, int pos2) const
8745 {
8746 auto res = isl_map_order_gt(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
8747 return manage(res);
8748 }
8749
order_le(isl::dim type1,int pos1,isl::dim type2,int pos2)8750 map map::order_le(isl::dim type1, int pos1, isl::dim type2, int pos2) const
8751 {
8752 auto res = isl_map_order_le(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
8753 return manage(res);
8754 }
8755
order_lt(isl::dim type1,int pos1,isl::dim type2,int pos2)8756 map map::order_lt(isl::dim type1, int pos1, isl::dim type2, int pos2) const
8757 {
8758 auto res = isl_map_order_lt(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
8759 return manage(res);
8760 }
8761
params()8762 set map::params() const
8763 {
8764 auto res = isl_map_params(copy());
8765 return manage(res);
8766 }
8767
plain_get_val_if_fixed(isl::dim type,unsigned int pos)8768 val map::plain_get_val_if_fixed(isl::dim type, unsigned int pos) const
8769 {
8770 auto res = isl_map_plain_get_val_if_fixed(get(), static_cast<enum isl_dim_type>(type), pos);
8771 return manage(res);
8772 }
8773
plain_is_empty()8774 boolean map::plain_is_empty() const
8775 {
8776 auto res = isl_map_plain_is_empty(get());
8777 return manage(res);
8778 }
8779
plain_is_equal(const map & map2)8780 boolean map::plain_is_equal(const map &map2) const
8781 {
8782 auto res = isl_map_plain_is_equal(get(), map2.get());
8783 return manage(res);
8784 }
8785
plain_is_injective()8786 boolean map::plain_is_injective() const
8787 {
8788 auto res = isl_map_plain_is_injective(get());
8789 return manage(res);
8790 }
8791
plain_is_single_valued()8792 boolean map::plain_is_single_valued() const
8793 {
8794 auto res = isl_map_plain_is_single_valued(get());
8795 return manage(res);
8796 }
8797
plain_is_universe()8798 boolean map::plain_is_universe() const
8799 {
8800 auto res = isl_map_plain_is_universe(get());
8801 return manage(res);
8802 }
8803
plain_unshifted_simple_hull()8804 basic_map map::plain_unshifted_simple_hull() const
8805 {
8806 auto res = isl_map_plain_unshifted_simple_hull(copy());
8807 return manage(res);
8808 }
8809
polyhedral_hull()8810 basic_map map::polyhedral_hull() const
8811 {
8812 auto res = isl_map_polyhedral_hull(copy());
8813 return manage(res);
8814 }
8815
preimage_domain_multi_aff(multi_aff ma)8816 map map::preimage_domain_multi_aff(multi_aff ma) const
8817 {
8818 auto res = isl_map_preimage_domain_multi_aff(copy(), ma.release());
8819 return manage(res);
8820 }
8821
preimage_domain_multi_pw_aff(multi_pw_aff mpa)8822 map map::preimage_domain_multi_pw_aff(multi_pw_aff mpa) const
8823 {
8824 auto res = isl_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
8825 return manage(res);
8826 }
8827
preimage_domain_pw_multi_aff(pw_multi_aff pma)8828 map map::preimage_domain_pw_multi_aff(pw_multi_aff pma) const
8829 {
8830 auto res = isl_map_preimage_domain_pw_multi_aff(copy(), pma.release());
8831 return manage(res);
8832 }
8833
preimage_range_multi_aff(multi_aff ma)8834 map map::preimage_range_multi_aff(multi_aff ma) const
8835 {
8836 auto res = isl_map_preimage_range_multi_aff(copy(), ma.release());
8837 return manage(res);
8838 }
8839
preimage_range_pw_multi_aff(pw_multi_aff pma)8840 map map::preimage_range_pw_multi_aff(pw_multi_aff pma) const
8841 {
8842 auto res = isl_map_preimage_range_pw_multi_aff(copy(), pma.release());
8843 return manage(res);
8844 }
8845
product(map map2)8846 map map::product(map map2) const
8847 {
8848 auto res = isl_map_product(copy(), map2.release());
8849 return manage(res);
8850 }
8851
project_out(isl::dim type,unsigned int first,unsigned int n)8852 map map::project_out(isl::dim type, unsigned int first, unsigned int n) const
8853 {
8854 auto res = isl_map_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
8855 return manage(res);
8856 }
8857
range()8858 set map::range() const
8859 {
8860 auto res = isl_map_range(copy());
8861 return manage(res);
8862 }
8863
range_curry()8864 map map::range_curry() const
8865 {
8866 auto res = isl_map_range_curry(copy());
8867 return manage(res);
8868 }
8869
range_factor_domain()8870 map map::range_factor_domain() const
8871 {
8872 auto res = isl_map_range_factor_domain(copy());
8873 return manage(res);
8874 }
8875
range_factor_range()8876 map map::range_factor_range() const
8877 {
8878 auto res = isl_map_range_factor_range(copy());
8879 return manage(res);
8880 }
8881
range_is_wrapping()8882 boolean map::range_is_wrapping() const
8883 {
8884 auto res = isl_map_range_is_wrapping(get());
8885 return manage(res);
8886 }
8887
range_map()8888 map map::range_map() const
8889 {
8890 auto res = isl_map_range_map(copy());
8891 return manage(res);
8892 }
8893
range_product(map map2)8894 map map::range_product(map map2) const
8895 {
8896 auto res = isl_map_range_product(copy(), map2.release());
8897 return manage(res);
8898 }
8899
remove_dims(isl::dim type,unsigned int first,unsigned int n)8900 map map::remove_dims(isl::dim type, unsigned int first, unsigned int n) const
8901 {
8902 auto res = isl_map_remove_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
8903 return manage(res);
8904 }
8905
remove_divs()8906 map map::remove_divs() const
8907 {
8908 auto res = isl_map_remove_divs(copy());
8909 return manage(res);
8910 }
8911
remove_divs_involving_dims(isl::dim type,unsigned int first,unsigned int n)8912 map map::remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
8913 {
8914 auto res = isl_map_remove_divs_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
8915 return manage(res);
8916 }
8917
remove_redundancies()8918 map map::remove_redundancies() const
8919 {
8920 auto res = isl_map_remove_redundancies(copy());
8921 return manage(res);
8922 }
8923
remove_unknown_divs()8924 map map::remove_unknown_divs() const
8925 {
8926 auto res = isl_map_remove_unknown_divs(copy());
8927 return manage(res);
8928 }
8929
reset_tuple_id(isl::dim type)8930 map map::reset_tuple_id(isl::dim type) const
8931 {
8932 auto res = isl_map_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
8933 return manage(res);
8934 }
8935
reset_user()8936 map map::reset_user() const
8937 {
8938 auto res = isl_map_reset_user(copy());
8939 return manage(res);
8940 }
8941
reverse()8942 map map::reverse() const
8943 {
8944 auto res = isl_map_reverse(copy());
8945 return manage(res);
8946 }
8947
sample()8948 basic_map map::sample() const
8949 {
8950 auto res = isl_map_sample(copy());
8951 return manage(res);
8952 }
8953
set_dim_id(isl::dim type,unsigned int pos,id id)8954 map map::set_dim_id(isl::dim type, unsigned int pos, id id) const
8955 {
8956 auto res = isl_map_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
8957 return manage(res);
8958 }
8959
set_tuple_id(isl::dim type,id id)8960 map map::set_tuple_id(isl::dim type, id id) const
8961 {
8962 auto res = isl_map_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
8963 return manage(res);
8964 }
8965
set_tuple_name(isl::dim type,const std::string & s)8966 map map::set_tuple_name(isl::dim type, const std::string &s) const
8967 {
8968 auto res = isl_map_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
8969 return manage(res);
8970 }
8971
simple_hull()8972 basic_map map::simple_hull() const
8973 {
8974 auto res = isl_map_simple_hull(copy());
8975 return manage(res);
8976 }
8977
subtract(map map2)8978 map map::subtract(map map2) const
8979 {
8980 auto res = isl_map_subtract(copy(), map2.release());
8981 return manage(res);
8982 }
8983
subtract_domain(set dom)8984 map map::subtract_domain(set dom) const
8985 {
8986 auto res = isl_map_subtract_domain(copy(), dom.release());
8987 return manage(res);
8988 }
8989
subtract_range(set dom)8990 map map::subtract_range(set dom) const
8991 {
8992 auto res = isl_map_subtract_range(copy(), dom.release());
8993 return manage(res);
8994 }
8995
sum(map map2)8996 map map::sum(map map2) const
8997 {
8998 auto res = isl_map_sum(copy(), map2.release());
8999 return manage(res);
9000 }
9001
uncurry()9002 map map::uncurry() const
9003 {
9004 auto res = isl_map_uncurry(copy());
9005 return manage(res);
9006 }
9007
unite(map map2)9008 map map::unite(map map2) const
9009 {
9010 auto res = isl_map_union(copy(), map2.release());
9011 return manage(res);
9012 }
9013
universe(space space)9014 map map::universe(space space)
9015 {
9016 auto res = isl_map_universe(space.release());
9017 return manage(res);
9018 }
9019
unshifted_simple_hull()9020 basic_map map::unshifted_simple_hull() const
9021 {
9022 auto res = isl_map_unshifted_simple_hull(copy());
9023 return manage(res);
9024 }
9025
unshifted_simple_hull_from_map_list(map_list list)9026 basic_map map::unshifted_simple_hull_from_map_list(map_list list) const
9027 {
9028 auto res = isl_map_unshifted_simple_hull_from_map_list(copy(), list.release());
9029 return manage(res);
9030 }
9031
upper_bound_si(isl::dim type,unsigned int pos,int value)9032 map map::upper_bound_si(isl::dim type, unsigned int pos, int value) const
9033 {
9034 auto res = isl_map_upper_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
9035 return manage(res);
9036 }
9037
wrap()9038 set map::wrap() const
9039 {
9040 auto res = isl_map_wrap(copy());
9041 return manage(res);
9042 }
9043
zip()9044 map map::zip() const
9045 {
9046 auto res = isl_map_zip(copy());
9047 return manage(res);
9048 }
9049
9050 // implementations for isl::map_list
manage(__isl_take isl_map_list * ptr)9051 map_list manage(__isl_take isl_map_list *ptr) {
9052 return map_list(ptr);
9053 }
manage_copy(__isl_keep isl_map_list * ptr)9054 map_list manage_copy(__isl_keep isl_map_list *ptr) {
9055 ptr = isl_map_list_copy(ptr);
9056 return map_list(ptr);
9057 }
9058
map_list()9059 map_list::map_list()
9060 : ptr(nullptr) {}
9061
map_list(const map_list & obj)9062 map_list::map_list(const map_list &obj)
9063 : ptr(nullptr)
9064 {
9065 ptr = obj.copy();
9066 }
map_list(std::nullptr_t)9067 map_list::map_list(std::nullptr_t)
9068 : ptr(nullptr) {}
9069
9070
map_list(__isl_take isl_map_list * ptr)9071 map_list::map_list(__isl_take isl_map_list *ptr)
9072 : ptr(ptr) {}
9073
9074
9075 map_list &map_list::operator=(map_list obj) {
9076 std::swap(this->ptr, obj.ptr);
9077 return *this;
9078 }
9079
~map_list()9080 map_list::~map_list() {
9081 if (ptr)
9082 isl_map_list_free(ptr);
9083 }
9084
copy()9085 __isl_give isl_map_list *map_list::copy() const & {
9086 return isl_map_list_copy(ptr);
9087 }
9088
get()9089 __isl_keep isl_map_list *map_list::get() const {
9090 return ptr;
9091 }
9092
release()9093 __isl_give isl_map_list *map_list::release() {
9094 isl_map_list *tmp = ptr;
9095 ptr = nullptr;
9096 return tmp;
9097 }
9098
is_null()9099 bool map_list::is_null() const {
9100 return ptr == nullptr;
9101 }
9102 map_list::operator bool() const {
9103 return !is_null();
9104 }
9105
9106
get_ctx()9107 ctx map_list::get_ctx() const {
9108 return ctx(isl_map_list_get_ctx(ptr));
9109 }
9110
dump()9111 void map_list::dump() const {
9112 isl_map_list_dump(get());
9113 }
9114
9115
add(map el)9116 map_list map_list::add(map el) const
9117 {
9118 auto res = isl_map_list_add(copy(), el.release());
9119 return manage(res);
9120 }
9121
alloc(ctx ctx,int n)9122 map_list map_list::alloc(ctx ctx, int n)
9123 {
9124 auto res = isl_map_list_alloc(ctx.release(), n);
9125 return manage(res);
9126 }
9127
concat(map_list list2)9128 map_list map_list::concat(map_list list2) const
9129 {
9130 auto res = isl_map_list_concat(copy(), list2.release());
9131 return manage(res);
9132 }
9133
drop(unsigned int first,unsigned int n)9134 map_list map_list::drop(unsigned int first, unsigned int n) const
9135 {
9136 auto res = isl_map_list_drop(copy(), first, n);
9137 return manage(res);
9138 }
9139
foreach(const std::function<stat (map)> & fn)9140 stat map_list::foreach(const std::function<stat(map)> &fn) const
9141 {
9142 struct fn_data {
9143 const std::function<stat(map)> *func;
9144 } fn_data = { &fn };
9145 auto fn_lambda = [](isl_map *arg_0, void *arg_1) -> isl_stat {
9146 auto *data = static_cast<struct fn_data *>(arg_1);
9147 stat ret = (*data->func)(manage(arg_0));
9148 return ret.release();
9149 };
9150 auto res = isl_map_list_foreach(get(), fn_lambda, &fn_data);
9151 return manage(res);
9152 }
9153
from_map(map el)9154 map_list map_list::from_map(map el)
9155 {
9156 auto res = isl_map_list_from_map(el.release());
9157 return manage(res);
9158 }
9159
get_at(int index)9160 map map_list::get_at(int index) const
9161 {
9162 auto res = isl_map_list_get_at(get(), index);
9163 return manage(res);
9164 }
9165
get_map(int index)9166 map map_list::get_map(int index) const
9167 {
9168 auto res = isl_map_list_get_map(get(), index);
9169 return manage(res);
9170 }
9171
insert(unsigned int pos,map el)9172 map_list map_list::insert(unsigned int pos, map el) const
9173 {
9174 auto res = isl_map_list_insert(copy(), pos, el.release());
9175 return manage(res);
9176 }
9177
n_map()9178 int map_list::n_map() const
9179 {
9180 auto res = isl_map_list_n_map(get());
9181 return res;
9182 }
9183
reverse()9184 map_list map_list::reverse() const
9185 {
9186 auto res = isl_map_list_reverse(copy());
9187 return manage(res);
9188 }
9189
set_map(int index,map el)9190 map_list map_list::set_map(int index, map el) const
9191 {
9192 auto res = isl_map_list_set_map(copy(), index, el.release());
9193 return manage(res);
9194 }
9195
size()9196 int map_list::size() const
9197 {
9198 auto res = isl_map_list_size(get());
9199 return res;
9200 }
9201
swap(unsigned int pos1,unsigned int pos2)9202 map_list map_list::swap(unsigned int pos1, unsigned int pos2) const
9203 {
9204 auto res = isl_map_list_swap(copy(), pos1, pos2);
9205 return manage(res);
9206 }
9207
9208 // implementations for isl::mat
manage(__isl_take isl_mat * ptr)9209 mat manage(__isl_take isl_mat *ptr) {
9210 return mat(ptr);
9211 }
manage_copy(__isl_keep isl_mat * ptr)9212 mat manage_copy(__isl_keep isl_mat *ptr) {
9213 ptr = isl_mat_copy(ptr);
9214 return mat(ptr);
9215 }
9216
mat()9217 mat::mat()
9218 : ptr(nullptr) {}
9219
mat(const mat & obj)9220 mat::mat(const mat &obj)
9221 : ptr(nullptr)
9222 {
9223 ptr = obj.copy();
9224 }
mat(std::nullptr_t)9225 mat::mat(std::nullptr_t)
9226 : ptr(nullptr) {}
9227
9228
mat(__isl_take isl_mat * ptr)9229 mat::mat(__isl_take isl_mat *ptr)
9230 : ptr(ptr) {}
9231
9232
9233 mat &mat::operator=(mat obj) {
9234 std::swap(this->ptr, obj.ptr);
9235 return *this;
9236 }
9237
~mat()9238 mat::~mat() {
9239 if (ptr)
9240 isl_mat_free(ptr);
9241 }
9242
copy()9243 __isl_give isl_mat *mat::copy() const & {
9244 return isl_mat_copy(ptr);
9245 }
9246
get()9247 __isl_keep isl_mat *mat::get() const {
9248 return ptr;
9249 }
9250
release()9251 __isl_give isl_mat *mat::release() {
9252 isl_mat *tmp = ptr;
9253 ptr = nullptr;
9254 return tmp;
9255 }
9256
is_null()9257 bool mat::is_null() const {
9258 return ptr == nullptr;
9259 }
9260 mat::operator bool() const {
9261 return !is_null();
9262 }
9263
9264
get_ctx()9265 ctx mat::get_ctx() const {
9266 return ctx(isl_mat_get_ctx(ptr));
9267 }
9268
dump()9269 void mat::dump() const {
9270 isl_mat_dump(get());
9271 }
9272
9273
add_rows(unsigned int n)9274 mat mat::add_rows(unsigned int n) const
9275 {
9276 auto res = isl_mat_add_rows(copy(), n);
9277 return manage(res);
9278 }
9279
add_zero_cols(unsigned int n)9280 mat mat::add_zero_cols(unsigned int n) const
9281 {
9282 auto res = isl_mat_add_zero_cols(copy(), n);
9283 return manage(res);
9284 }
9285
add_zero_rows(unsigned int n)9286 mat mat::add_zero_rows(unsigned int n) const
9287 {
9288 auto res = isl_mat_add_zero_rows(copy(), n);
9289 return manage(res);
9290 }
9291
aff_direct_sum(mat right)9292 mat mat::aff_direct_sum(mat right) const
9293 {
9294 auto res = isl_mat_aff_direct_sum(copy(), right.release());
9295 return manage(res);
9296 }
9297
alloc(ctx ctx,unsigned int n_row,unsigned int n_col)9298 mat mat::alloc(ctx ctx, unsigned int n_row, unsigned int n_col)
9299 {
9300 auto res = isl_mat_alloc(ctx.release(), n_row, n_col);
9301 return manage(res);
9302 }
9303
cols()9304 int mat::cols() const
9305 {
9306 auto res = isl_mat_cols(get());
9307 return res;
9308 }
9309
concat(mat bot)9310 mat mat::concat(mat bot) const
9311 {
9312 auto res = isl_mat_concat(copy(), bot.release());
9313 return manage(res);
9314 }
9315
diagonal(mat mat2)9316 mat mat::diagonal(mat mat2) const
9317 {
9318 auto res = isl_mat_diagonal(copy(), mat2.release());
9319 return manage(res);
9320 }
9321
drop_cols(unsigned int col,unsigned int n)9322 mat mat::drop_cols(unsigned int col, unsigned int n) const
9323 {
9324 auto res = isl_mat_drop_cols(copy(), col, n);
9325 return manage(res);
9326 }
9327
drop_rows(unsigned int row,unsigned int n)9328 mat mat::drop_rows(unsigned int row, unsigned int n) const
9329 {
9330 auto res = isl_mat_drop_rows(copy(), row, n);
9331 return manage(res);
9332 }
9333
from_row_vec(vec vec)9334 mat mat::from_row_vec(vec vec)
9335 {
9336 auto res = isl_mat_from_row_vec(vec.release());
9337 return manage(res);
9338 }
9339
get_element_val(int row,int col)9340 val mat::get_element_val(int row, int col) const
9341 {
9342 auto res = isl_mat_get_element_val(get(), row, col);
9343 return manage(res);
9344 }
9345
has_linearly_independent_rows(const mat & mat2)9346 boolean mat::has_linearly_independent_rows(const mat &mat2) const
9347 {
9348 auto res = isl_mat_has_linearly_independent_rows(get(), mat2.get());
9349 return manage(res);
9350 }
9351
initial_non_zero_cols()9352 int mat::initial_non_zero_cols() const
9353 {
9354 auto res = isl_mat_initial_non_zero_cols(get());
9355 return res;
9356 }
9357
insert_cols(unsigned int col,unsigned int n)9358 mat mat::insert_cols(unsigned int col, unsigned int n) const
9359 {
9360 auto res = isl_mat_insert_cols(copy(), col, n);
9361 return manage(res);
9362 }
9363
insert_rows(unsigned int row,unsigned int n)9364 mat mat::insert_rows(unsigned int row, unsigned int n) const
9365 {
9366 auto res = isl_mat_insert_rows(copy(), row, n);
9367 return manage(res);
9368 }
9369
insert_zero_cols(unsigned int first,unsigned int n)9370 mat mat::insert_zero_cols(unsigned int first, unsigned int n) const
9371 {
9372 auto res = isl_mat_insert_zero_cols(copy(), first, n);
9373 return manage(res);
9374 }
9375
insert_zero_rows(unsigned int row,unsigned int n)9376 mat mat::insert_zero_rows(unsigned int row, unsigned int n) const
9377 {
9378 auto res = isl_mat_insert_zero_rows(copy(), row, n);
9379 return manage(res);
9380 }
9381
inverse_product(mat right)9382 mat mat::inverse_product(mat right) const
9383 {
9384 auto res = isl_mat_inverse_product(copy(), right.release());
9385 return manage(res);
9386 }
9387
is_equal(const mat & mat2)9388 boolean mat::is_equal(const mat &mat2) const
9389 {
9390 auto res = isl_mat_is_equal(get(), mat2.get());
9391 return manage(res);
9392 }
9393
lin_to_aff()9394 mat mat::lin_to_aff() const
9395 {
9396 auto res = isl_mat_lin_to_aff(copy());
9397 return manage(res);
9398 }
9399
move_cols(unsigned int dst_col,unsigned int src_col,unsigned int n)9400 mat mat::move_cols(unsigned int dst_col, unsigned int src_col, unsigned int n) const
9401 {
9402 auto res = isl_mat_move_cols(copy(), dst_col, src_col, n);
9403 return manage(res);
9404 }
9405
normalize()9406 mat mat::normalize() const
9407 {
9408 auto res = isl_mat_normalize(copy());
9409 return manage(res);
9410 }
9411
normalize_row(int row)9412 mat mat::normalize_row(int row) const
9413 {
9414 auto res = isl_mat_normalize_row(copy(), row);
9415 return manage(res);
9416 }
9417
product(mat right)9418 mat mat::product(mat right) const
9419 {
9420 auto res = isl_mat_product(copy(), right.release());
9421 return manage(res);
9422 }
9423
rank()9424 int mat::rank() const
9425 {
9426 auto res = isl_mat_rank(get());
9427 return res;
9428 }
9429
right_inverse()9430 mat mat::right_inverse() const
9431 {
9432 auto res = isl_mat_right_inverse(copy());
9433 return manage(res);
9434 }
9435
right_kernel()9436 mat mat::right_kernel() const
9437 {
9438 auto res = isl_mat_right_kernel(copy());
9439 return manage(res);
9440 }
9441
row_basis()9442 mat mat::row_basis() const
9443 {
9444 auto res = isl_mat_row_basis(copy());
9445 return manage(res);
9446 }
9447
row_basis_extension(mat mat2)9448 mat mat::row_basis_extension(mat mat2) const
9449 {
9450 auto res = isl_mat_row_basis_extension(copy(), mat2.release());
9451 return manage(res);
9452 }
9453
rows()9454 int mat::rows() const
9455 {
9456 auto res = isl_mat_rows(get());
9457 return res;
9458 }
9459
set_element_si(int row,int col,int v)9460 mat mat::set_element_si(int row, int col, int v) const
9461 {
9462 auto res = isl_mat_set_element_si(copy(), row, col, v);
9463 return manage(res);
9464 }
9465
set_element_val(int row,int col,val v)9466 mat mat::set_element_val(int row, int col, val v) const
9467 {
9468 auto res = isl_mat_set_element_val(copy(), row, col, v.release());
9469 return manage(res);
9470 }
9471
swap_cols(unsigned int i,unsigned int j)9472 mat mat::swap_cols(unsigned int i, unsigned int j) const
9473 {
9474 auto res = isl_mat_swap_cols(copy(), i, j);
9475 return manage(res);
9476 }
9477
swap_rows(unsigned int i,unsigned int j)9478 mat mat::swap_rows(unsigned int i, unsigned int j) const
9479 {
9480 auto res = isl_mat_swap_rows(copy(), i, j);
9481 return manage(res);
9482 }
9483
transpose()9484 mat mat::transpose() const
9485 {
9486 auto res = isl_mat_transpose(copy());
9487 return manage(res);
9488 }
9489
unimodular_complete(int row)9490 mat mat::unimodular_complete(int row) const
9491 {
9492 auto res = isl_mat_unimodular_complete(copy(), row);
9493 return manage(res);
9494 }
9495
vec_concat(vec bot)9496 mat mat::vec_concat(vec bot) const
9497 {
9498 auto res = isl_mat_vec_concat(copy(), bot.release());
9499 return manage(res);
9500 }
9501
vec_inverse_product(vec vec)9502 vec mat::vec_inverse_product(vec vec) const
9503 {
9504 auto res = isl_mat_vec_inverse_product(copy(), vec.release());
9505 return manage(res);
9506 }
9507
vec_product(vec vec)9508 vec mat::vec_product(vec vec) const
9509 {
9510 auto res = isl_mat_vec_product(copy(), vec.release());
9511 return manage(res);
9512 }
9513
9514 // implementations for isl::multi_aff
manage(__isl_take isl_multi_aff * ptr)9515 multi_aff manage(__isl_take isl_multi_aff *ptr) {
9516 return multi_aff(ptr);
9517 }
manage_copy(__isl_keep isl_multi_aff * ptr)9518 multi_aff manage_copy(__isl_keep isl_multi_aff *ptr) {
9519 ptr = isl_multi_aff_copy(ptr);
9520 return multi_aff(ptr);
9521 }
9522
multi_aff()9523 multi_aff::multi_aff()
9524 : ptr(nullptr) {}
9525
multi_aff(const multi_aff & obj)9526 multi_aff::multi_aff(const multi_aff &obj)
9527 : ptr(nullptr)
9528 {
9529 ptr = obj.copy();
9530 }
multi_aff(std::nullptr_t)9531 multi_aff::multi_aff(std::nullptr_t)
9532 : ptr(nullptr) {}
9533
9534
multi_aff(__isl_take isl_multi_aff * ptr)9535 multi_aff::multi_aff(__isl_take isl_multi_aff *ptr)
9536 : ptr(ptr) {}
9537
multi_aff(aff aff)9538 multi_aff::multi_aff(aff aff)
9539 {
9540 auto res = isl_multi_aff_from_aff(aff.release());
9541 ptr = res;
9542 }
multi_aff(ctx ctx,const std::string & str)9543 multi_aff::multi_aff(ctx ctx, const std::string &str)
9544 {
9545 auto res = isl_multi_aff_read_from_str(ctx.release(), str.c_str());
9546 ptr = res;
9547 }
9548
9549 multi_aff &multi_aff::operator=(multi_aff obj) {
9550 std::swap(this->ptr, obj.ptr);
9551 return *this;
9552 }
9553
~multi_aff()9554 multi_aff::~multi_aff() {
9555 if (ptr)
9556 isl_multi_aff_free(ptr);
9557 }
9558
copy()9559 __isl_give isl_multi_aff *multi_aff::copy() const & {
9560 return isl_multi_aff_copy(ptr);
9561 }
9562
get()9563 __isl_keep isl_multi_aff *multi_aff::get() const {
9564 return ptr;
9565 }
9566
release()9567 __isl_give isl_multi_aff *multi_aff::release() {
9568 isl_multi_aff *tmp = ptr;
9569 ptr = nullptr;
9570 return tmp;
9571 }
9572
is_null()9573 bool multi_aff::is_null() const {
9574 return ptr == nullptr;
9575 }
9576 multi_aff::operator bool() const {
9577 return !is_null();
9578 }
9579
9580
get_ctx()9581 ctx multi_aff::get_ctx() const {
9582 return ctx(isl_multi_aff_get_ctx(ptr));
9583 }
to_str()9584 std::string multi_aff::to_str() const {
9585 char *Tmp = isl_multi_aff_to_str(get());
9586 if (!Tmp)
9587 return "";
9588 std::string S(Tmp);
9589 free(Tmp);
9590 return S;
9591 }
9592
9593
dump()9594 void multi_aff::dump() const {
9595 isl_multi_aff_dump(get());
9596 }
9597
9598
add(multi_aff multi2)9599 multi_aff multi_aff::add(multi_aff multi2) const
9600 {
9601 auto res = isl_multi_aff_add(copy(), multi2.release());
9602 return manage(res);
9603 }
9604
add_dims(isl::dim type,unsigned int n)9605 multi_aff multi_aff::add_dims(isl::dim type, unsigned int n) const
9606 {
9607 auto res = isl_multi_aff_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
9608 return manage(res);
9609 }
9610
align_params(space model)9611 multi_aff multi_aff::align_params(space model) const
9612 {
9613 auto res = isl_multi_aff_align_params(copy(), model.release());
9614 return manage(res);
9615 }
9616
dim(isl::dim type)9617 unsigned int multi_aff::dim(isl::dim type) const
9618 {
9619 auto res = isl_multi_aff_dim(get(), static_cast<enum isl_dim_type>(type));
9620 return res;
9621 }
9622
domain_map(space space)9623 multi_aff multi_aff::domain_map(space space)
9624 {
9625 auto res = isl_multi_aff_domain_map(space.release());
9626 return manage(res);
9627 }
9628
drop_dims(isl::dim type,unsigned int first,unsigned int n)9629 multi_aff multi_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
9630 {
9631 auto res = isl_multi_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
9632 return manage(res);
9633 }
9634
factor_range()9635 multi_aff multi_aff::factor_range() const
9636 {
9637 auto res = isl_multi_aff_factor_range(copy());
9638 return manage(res);
9639 }
9640
find_dim_by_id(isl::dim type,const id & id)9641 int multi_aff::find_dim_by_id(isl::dim type, const id &id) const
9642 {
9643 auto res = isl_multi_aff_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
9644 return res;
9645 }
9646
find_dim_by_name(isl::dim type,const std::string & name)9647 int multi_aff::find_dim_by_name(isl::dim type, const std::string &name) const
9648 {
9649 auto res = isl_multi_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
9650 return res;
9651 }
9652
flat_range_product(multi_aff multi2)9653 multi_aff multi_aff::flat_range_product(multi_aff multi2) const
9654 {
9655 auto res = isl_multi_aff_flat_range_product(copy(), multi2.release());
9656 return manage(res);
9657 }
9658
flatten_domain()9659 multi_aff multi_aff::flatten_domain() const
9660 {
9661 auto res = isl_multi_aff_flatten_domain(copy());
9662 return manage(res);
9663 }
9664
flatten_range()9665 multi_aff multi_aff::flatten_range() const
9666 {
9667 auto res = isl_multi_aff_flatten_range(copy());
9668 return manage(res);
9669 }
9670
floor()9671 multi_aff multi_aff::floor() const
9672 {
9673 auto res = isl_multi_aff_floor(copy());
9674 return manage(res);
9675 }
9676
from_aff_list(space space,aff_list list)9677 multi_aff multi_aff::from_aff_list(space space, aff_list list)
9678 {
9679 auto res = isl_multi_aff_from_aff_list(space.release(), list.release());
9680 return manage(res);
9681 }
9682
from_range()9683 multi_aff multi_aff::from_range() const
9684 {
9685 auto res = isl_multi_aff_from_range(copy());
9686 return manage(res);
9687 }
9688
get_aff(int pos)9689 aff multi_aff::get_aff(int pos) const
9690 {
9691 auto res = isl_multi_aff_get_aff(get(), pos);
9692 return manage(res);
9693 }
9694
get_dim_id(isl::dim type,unsigned int pos)9695 id multi_aff::get_dim_id(isl::dim type, unsigned int pos) const
9696 {
9697 auto res = isl_multi_aff_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
9698 return manage(res);
9699 }
9700
get_domain_space()9701 space multi_aff::get_domain_space() const
9702 {
9703 auto res = isl_multi_aff_get_domain_space(get());
9704 return manage(res);
9705 }
9706
get_space()9707 space multi_aff::get_space() const
9708 {
9709 auto res = isl_multi_aff_get_space(get());
9710 return manage(res);
9711 }
9712
get_tuple_id(isl::dim type)9713 id multi_aff::get_tuple_id(isl::dim type) const
9714 {
9715 auto res = isl_multi_aff_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
9716 return manage(res);
9717 }
9718
get_tuple_name(isl::dim type)9719 std::string multi_aff::get_tuple_name(isl::dim type) const
9720 {
9721 auto res = isl_multi_aff_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
9722 std::string tmp(res);
9723 return tmp;
9724 }
9725
gist(set context)9726 multi_aff multi_aff::gist(set context) const
9727 {
9728 auto res = isl_multi_aff_gist(copy(), context.release());
9729 return manage(res);
9730 }
9731
gist_params(set context)9732 multi_aff multi_aff::gist_params(set context) const
9733 {
9734 auto res = isl_multi_aff_gist_params(copy(), context.release());
9735 return manage(res);
9736 }
9737
has_tuple_id(isl::dim type)9738 boolean multi_aff::has_tuple_id(isl::dim type) const
9739 {
9740 auto res = isl_multi_aff_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
9741 return manage(res);
9742 }
9743
identity(space space)9744 multi_aff multi_aff::identity(space space)
9745 {
9746 auto res = isl_multi_aff_identity(space.release());
9747 return manage(res);
9748 }
9749
insert_dims(isl::dim type,unsigned int first,unsigned int n)9750 multi_aff multi_aff::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
9751 {
9752 auto res = isl_multi_aff_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
9753 return manage(res);
9754 }
9755
involves_dims(isl::dim type,unsigned int first,unsigned int n)9756 boolean multi_aff::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
9757 {
9758 auto res = isl_multi_aff_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
9759 return manage(res);
9760 }
9761
involves_nan()9762 boolean multi_aff::involves_nan() const
9763 {
9764 auto res = isl_multi_aff_involves_nan(get());
9765 return manage(res);
9766 }
9767
lex_ge_set(multi_aff ma2)9768 set multi_aff::lex_ge_set(multi_aff ma2) const
9769 {
9770 auto res = isl_multi_aff_lex_ge_set(copy(), ma2.release());
9771 return manage(res);
9772 }
9773
lex_gt_set(multi_aff ma2)9774 set multi_aff::lex_gt_set(multi_aff ma2) const
9775 {
9776 auto res = isl_multi_aff_lex_gt_set(copy(), ma2.release());
9777 return manage(res);
9778 }
9779
lex_le_set(multi_aff ma2)9780 set multi_aff::lex_le_set(multi_aff ma2) const
9781 {
9782 auto res = isl_multi_aff_lex_le_set(copy(), ma2.release());
9783 return manage(res);
9784 }
9785
lex_lt_set(multi_aff ma2)9786 set multi_aff::lex_lt_set(multi_aff ma2) const
9787 {
9788 auto res = isl_multi_aff_lex_lt_set(copy(), ma2.release());
9789 return manage(res);
9790 }
9791
mod_multi_val(multi_val mv)9792 multi_aff multi_aff::mod_multi_val(multi_val mv) const
9793 {
9794 auto res = isl_multi_aff_mod_multi_val(copy(), mv.release());
9795 return manage(res);
9796 }
9797
move_dims(isl::dim dst_type,unsigned int dst_pos,isl::dim src_type,unsigned int src_pos,unsigned int n)9798 multi_aff multi_aff::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
9799 {
9800 auto res = isl_multi_aff_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
9801 return manage(res);
9802 }
9803
multi_val_on_space(space space,multi_val mv)9804 multi_aff multi_aff::multi_val_on_space(space space, multi_val mv)
9805 {
9806 auto res = isl_multi_aff_multi_val_on_space(space.release(), mv.release());
9807 return manage(res);
9808 }
9809
neg()9810 multi_aff multi_aff::neg() const
9811 {
9812 auto res = isl_multi_aff_neg(copy());
9813 return manage(res);
9814 }
9815
plain_cmp(const multi_aff & multi2)9816 int multi_aff::plain_cmp(const multi_aff &multi2) const
9817 {
9818 auto res = isl_multi_aff_plain_cmp(get(), multi2.get());
9819 return res;
9820 }
9821
plain_is_equal(const multi_aff & multi2)9822 boolean multi_aff::plain_is_equal(const multi_aff &multi2) const
9823 {
9824 auto res = isl_multi_aff_plain_is_equal(get(), multi2.get());
9825 return manage(res);
9826 }
9827
product(multi_aff multi2)9828 multi_aff multi_aff::product(multi_aff multi2) const
9829 {
9830 auto res = isl_multi_aff_product(copy(), multi2.release());
9831 return manage(res);
9832 }
9833
project_domain_on_params()9834 multi_aff multi_aff::project_domain_on_params() const
9835 {
9836 auto res = isl_multi_aff_project_domain_on_params(copy());
9837 return manage(res);
9838 }
9839
project_out_map(space space,isl::dim type,unsigned int first,unsigned int n)9840 multi_aff multi_aff::project_out_map(space space, isl::dim type, unsigned int first, unsigned int n)
9841 {
9842 auto res = isl_multi_aff_project_out_map(space.release(), static_cast<enum isl_dim_type>(type), first, n);
9843 return manage(res);
9844 }
9845
pullback(multi_aff ma2)9846 multi_aff multi_aff::pullback(multi_aff ma2) const
9847 {
9848 auto res = isl_multi_aff_pullback_multi_aff(copy(), ma2.release());
9849 return manage(res);
9850 }
9851
range_factor_domain()9852 multi_aff multi_aff::range_factor_domain() const
9853 {
9854 auto res = isl_multi_aff_range_factor_domain(copy());
9855 return manage(res);
9856 }
9857
range_factor_range()9858 multi_aff multi_aff::range_factor_range() const
9859 {
9860 auto res = isl_multi_aff_range_factor_range(copy());
9861 return manage(res);
9862 }
9863
range_is_wrapping()9864 boolean multi_aff::range_is_wrapping() const
9865 {
9866 auto res = isl_multi_aff_range_is_wrapping(get());
9867 return manage(res);
9868 }
9869
range_map(space space)9870 multi_aff multi_aff::range_map(space space)
9871 {
9872 auto res = isl_multi_aff_range_map(space.release());
9873 return manage(res);
9874 }
9875
range_product(multi_aff multi2)9876 multi_aff multi_aff::range_product(multi_aff multi2) const
9877 {
9878 auto res = isl_multi_aff_range_product(copy(), multi2.release());
9879 return manage(res);
9880 }
9881
range_splice(unsigned int pos,multi_aff multi2)9882 multi_aff multi_aff::range_splice(unsigned int pos, multi_aff multi2) const
9883 {
9884 auto res = isl_multi_aff_range_splice(copy(), pos, multi2.release());
9885 return manage(res);
9886 }
9887
reset_tuple_id(isl::dim type)9888 multi_aff multi_aff::reset_tuple_id(isl::dim type) const
9889 {
9890 auto res = isl_multi_aff_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
9891 return manage(res);
9892 }
9893
reset_user()9894 multi_aff multi_aff::reset_user() const
9895 {
9896 auto res = isl_multi_aff_reset_user(copy());
9897 return manage(res);
9898 }
9899
scale_down_multi_val(multi_val mv)9900 multi_aff multi_aff::scale_down_multi_val(multi_val mv) const
9901 {
9902 auto res = isl_multi_aff_scale_down_multi_val(copy(), mv.release());
9903 return manage(res);
9904 }
9905
scale_down_val(val v)9906 multi_aff multi_aff::scale_down_val(val v) const
9907 {
9908 auto res = isl_multi_aff_scale_down_val(copy(), v.release());
9909 return manage(res);
9910 }
9911
scale_multi_val(multi_val mv)9912 multi_aff multi_aff::scale_multi_val(multi_val mv) const
9913 {
9914 auto res = isl_multi_aff_scale_multi_val(copy(), mv.release());
9915 return manage(res);
9916 }
9917
scale_val(val v)9918 multi_aff multi_aff::scale_val(val v) const
9919 {
9920 auto res = isl_multi_aff_scale_val(copy(), v.release());
9921 return manage(res);
9922 }
9923
set_aff(int pos,aff el)9924 multi_aff multi_aff::set_aff(int pos, aff el) const
9925 {
9926 auto res = isl_multi_aff_set_aff(copy(), pos, el.release());
9927 return manage(res);
9928 }
9929
set_dim_id(isl::dim type,unsigned int pos,id id)9930 multi_aff multi_aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
9931 {
9932 auto res = isl_multi_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
9933 return manage(res);
9934 }
9935
set_tuple_id(isl::dim type,id id)9936 multi_aff multi_aff::set_tuple_id(isl::dim type, id id) const
9937 {
9938 auto res = isl_multi_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
9939 return manage(res);
9940 }
9941
set_tuple_name(isl::dim type,const std::string & s)9942 multi_aff multi_aff::set_tuple_name(isl::dim type, const std::string &s) const
9943 {
9944 auto res = isl_multi_aff_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
9945 return manage(res);
9946 }
9947
splice(unsigned int in_pos,unsigned int out_pos,multi_aff multi2)9948 multi_aff multi_aff::splice(unsigned int in_pos, unsigned int out_pos, multi_aff multi2) const
9949 {
9950 auto res = isl_multi_aff_splice(copy(), in_pos, out_pos, multi2.release());
9951 return manage(res);
9952 }
9953
sub(multi_aff multi2)9954 multi_aff multi_aff::sub(multi_aff multi2) const
9955 {
9956 auto res = isl_multi_aff_sub(copy(), multi2.release());
9957 return manage(res);
9958 }
9959
zero(space space)9960 multi_aff multi_aff::zero(space space)
9961 {
9962 auto res = isl_multi_aff_zero(space.release());
9963 return manage(res);
9964 }
9965
9966 // implementations for isl::multi_pw_aff
manage(__isl_take isl_multi_pw_aff * ptr)9967 multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr) {
9968 return multi_pw_aff(ptr);
9969 }
manage_copy(__isl_keep isl_multi_pw_aff * ptr)9970 multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr) {
9971 ptr = isl_multi_pw_aff_copy(ptr);
9972 return multi_pw_aff(ptr);
9973 }
9974
multi_pw_aff()9975 multi_pw_aff::multi_pw_aff()
9976 : ptr(nullptr) {}
9977
multi_pw_aff(const multi_pw_aff & obj)9978 multi_pw_aff::multi_pw_aff(const multi_pw_aff &obj)
9979 : ptr(nullptr)
9980 {
9981 ptr = obj.copy();
9982 }
multi_pw_aff(std::nullptr_t)9983 multi_pw_aff::multi_pw_aff(std::nullptr_t)
9984 : ptr(nullptr) {}
9985
9986
multi_pw_aff(__isl_take isl_multi_pw_aff * ptr)9987 multi_pw_aff::multi_pw_aff(__isl_take isl_multi_pw_aff *ptr)
9988 : ptr(ptr) {}
9989
multi_pw_aff(multi_aff ma)9990 multi_pw_aff::multi_pw_aff(multi_aff ma)
9991 {
9992 auto res = isl_multi_pw_aff_from_multi_aff(ma.release());
9993 ptr = res;
9994 }
multi_pw_aff(pw_aff pa)9995 multi_pw_aff::multi_pw_aff(pw_aff pa)
9996 {
9997 auto res = isl_multi_pw_aff_from_pw_aff(pa.release());
9998 ptr = res;
9999 }
multi_pw_aff(pw_multi_aff pma)10000 multi_pw_aff::multi_pw_aff(pw_multi_aff pma)
10001 {
10002 auto res = isl_multi_pw_aff_from_pw_multi_aff(pma.release());
10003 ptr = res;
10004 }
multi_pw_aff(ctx ctx,const std::string & str)10005 multi_pw_aff::multi_pw_aff(ctx ctx, const std::string &str)
10006 {
10007 auto res = isl_multi_pw_aff_read_from_str(ctx.release(), str.c_str());
10008 ptr = res;
10009 }
10010
10011 multi_pw_aff &multi_pw_aff::operator=(multi_pw_aff obj) {
10012 std::swap(this->ptr, obj.ptr);
10013 return *this;
10014 }
10015
~multi_pw_aff()10016 multi_pw_aff::~multi_pw_aff() {
10017 if (ptr)
10018 isl_multi_pw_aff_free(ptr);
10019 }
10020
copy()10021 __isl_give isl_multi_pw_aff *multi_pw_aff::copy() const & {
10022 return isl_multi_pw_aff_copy(ptr);
10023 }
10024
get()10025 __isl_keep isl_multi_pw_aff *multi_pw_aff::get() const {
10026 return ptr;
10027 }
10028
release()10029 __isl_give isl_multi_pw_aff *multi_pw_aff::release() {
10030 isl_multi_pw_aff *tmp = ptr;
10031 ptr = nullptr;
10032 return tmp;
10033 }
10034
is_null()10035 bool multi_pw_aff::is_null() const {
10036 return ptr == nullptr;
10037 }
10038 multi_pw_aff::operator bool() const {
10039 return !is_null();
10040 }
10041
10042
get_ctx()10043 ctx multi_pw_aff::get_ctx() const {
10044 return ctx(isl_multi_pw_aff_get_ctx(ptr));
10045 }
to_str()10046 std::string multi_pw_aff::to_str() const {
10047 char *Tmp = isl_multi_pw_aff_to_str(get());
10048 if (!Tmp)
10049 return "";
10050 std::string S(Tmp);
10051 free(Tmp);
10052 return S;
10053 }
10054
10055
dump()10056 void multi_pw_aff::dump() const {
10057 isl_multi_pw_aff_dump(get());
10058 }
10059
10060
add(multi_pw_aff multi2)10061 multi_pw_aff multi_pw_aff::add(multi_pw_aff multi2) const
10062 {
10063 auto res = isl_multi_pw_aff_add(copy(), multi2.release());
10064 return manage(res);
10065 }
10066
add_dims(isl::dim type,unsigned int n)10067 multi_pw_aff multi_pw_aff::add_dims(isl::dim type, unsigned int n) const
10068 {
10069 auto res = isl_multi_pw_aff_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
10070 return manage(res);
10071 }
10072
align_params(space model)10073 multi_pw_aff multi_pw_aff::align_params(space model) const
10074 {
10075 auto res = isl_multi_pw_aff_align_params(copy(), model.release());
10076 return manage(res);
10077 }
10078
coalesce()10079 multi_pw_aff multi_pw_aff::coalesce() const
10080 {
10081 auto res = isl_multi_pw_aff_coalesce(copy());
10082 return manage(res);
10083 }
10084
dim(isl::dim type)10085 unsigned int multi_pw_aff::dim(isl::dim type) const
10086 {
10087 auto res = isl_multi_pw_aff_dim(get(), static_cast<enum isl_dim_type>(type));
10088 return res;
10089 }
10090
domain()10091 set multi_pw_aff::domain() const
10092 {
10093 auto res = isl_multi_pw_aff_domain(copy());
10094 return manage(res);
10095 }
10096
drop_dims(isl::dim type,unsigned int first,unsigned int n)10097 multi_pw_aff multi_pw_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
10098 {
10099 auto res = isl_multi_pw_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
10100 return manage(res);
10101 }
10102
eq_map(multi_pw_aff mpa2)10103 map multi_pw_aff::eq_map(multi_pw_aff mpa2) const
10104 {
10105 auto res = isl_multi_pw_aff_eq_map(copy(), mpa2.release());
10106 return manage(res);
10107 }
10108
factor_range()10109 multi_pw_aff multi_pw_aff::factor_range() const
10110 {
10111 auto res = isl_multi_pw_aff_factor_range(copy());
10112 return manage(res);
10113 }
10114
find_dim_by_id(isl::dim type,const id & id)10115 int multi_pw_aff::find_dim_by_id(isl::dim type, const id &id) const
10116 {
10117 auto res = isl_multi_pw_aff_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
10118 return res;
10119 }
10120
find_dim_by_name(isl::dim type,const std::string & name)10121 int multi_pw_aff::find_dim_by_name(isl::dim type, const std::string &name) const
10122 {
10123 auto res = isl_multi_pw_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
10124 return res;
10125 }
10126
flat_range_product(multi_pw_aff multi2)10127 multi_pw_aff multi_pw_aff::flat_range_product(multi_pw_aff multi2) const
10128 {
10129 auto res = isl_multi_pw_aff_flat_range_product(copy(), multi2.release());
10130 return manage(res);
10131 }
10132
flatten_range()10133 multi_pw_aff multi_pw_aff::flatten_range() const
10134 {
10135 auto res = isl_multi_pw_aff_flatten_range(copy());
10136 return manage(res);
10137 }
10138
from_pw_aff_list(space space,pw_aff_list list)10139 multi_pw_aff multi_pw_aff::from_pw_aff_list(space space, pw_aff_list list)
10140 {
10141 auto res = isl_multi_pw_aff_from_pw_aff_list(space.release(), list.release());
10142 return manage(res);
10143 }
10144
from_range()10145 multi_pw_aff multi_pw_aff::from_range() const
10146 {
10147 auto res = isl_multi_pw_aff_from_range(copy());
10148 return manage(res);
10149 }
10150
get_dim_id(isl::dim type,unsigned int pos)10151 id multi_pw_aff::get_dim_id(isl::dim type, unsigned int pos) const
10152 {
10153 auto res = isl_multi_pw_aff_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
10154 return manage(res);
10155 }
10156
get_domain_space()10157 space multi_pw_aff::get_domain_space() const
10158 {
10159 auto res = isl_multi_pw_aff_get_domain_space(get());
10160 return manage(res);
10161 }
10162
get_hash()10163 uint32_t multi_pw_aff::get_hash() const
10164 {
10165 auto res = isl_multi_pw_aff_get_hash(get());
10166 return res;
10167 }
10168
get_pw_aff(int pos)10169 pw_aff multi_pw_aff::get_pw_aff(int pos) const
10170 {
10171 auto res = isl_multi_pw_aff_get_pw_aff(get(), pos);
10172 return manage(res);
10173 }
10174
get_space()10175 space multi_pw_aff::get_space() const
10176 {
10177 auto res = isl_multi_pw_aff_get_space(get());
10178 return manage(res);
10179 }
10180
get_tuple_id(isl::dim type)10181 id multi_pw_aff::get_tuple_id(isl::dim type) const
10182 {
10183 auto res = isl_multi_pw_aff_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
10184 return manage(res);
10185 }
10186
get_tuple_name(isl::dim type)10187 std::string multi_pw_aff::get_tuple_name(isl::dim type) const
10188 {
10189 auto res = isl_multi_pw_aff_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
10190 std::string tmp(res);
10191 return tmp;
10192 }
10193
gist(set set)10194 multi_pw_aff multi_pw_aff::gist(set set) const
10195 {
10196 auto res = isl_multi_pw_aff_gist(copy(), set.release());
10197 return manage(res);
10198 }
10199
gist_params(set set)10200 multi_pw_aff multi_pw_aff::gist_params(set set) const
10201 {
10202 auto res = isl_multi_pw_aff_gist_params(copy(), set.release());
10203 return manage(res);
10204 }
10205
has_tuple_id(isl::dim type)10206 boolean multi_pw_aff::has_tuple_id(isl::dim type) const
10207 {
10208 auto res = isl_multi_pw_aff_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
10209 return manage(res);
10210 }
10211
identity(space space)10212 multi_pw_aff multi_pw_aff::identity(space space)
10213 {
10214 auto res = isl_multi_pw_aff_identity(space.release());
10215 return manage(res);
10216 }
10217
insert_dims(isl::dim type,unsigned int first,unsigned int n)10218 multi_pw_aff multi_pw_aff::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
10219 {
10220 auto res = isl_multi_pw_aff_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
10221 return manage(res);
10222 }
10223
intersect_domain(set domain)10224 multi_pw_aff multi_pw_aff::intersect_domain(set domain) const
10225 {
10226 auto res = isl_multi_pw_aff_intersect_domain(copy(), domain.release());
10227 return manage(res);
10228 }
10229
intersect_params(set set)10230 multi_pw_aff multi_pw_aff::intersect_params(set set) const
10231 {
10232 auto res = isl_multi_pw_aff_intersect_params(copy(), set.release());
10233 return manage(res);
10234 }
10235
involves_dims(isl::dim type,unsigned int first,unsigned int n)10236 boolean multi_pw_aff::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
10237 {
10238 auto res = isl_multi_pw_aff_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
10239 return manage(res);
10240 }
10241
involves_nan()10242 boolean multi_pw_aff::involves_nan() const
10243 {
10244 auto res = isl_multi_pw_aff_involves_nan(get());
10245 return manage(res);
10246 }
10247
is_cst()10248 boolean multi_pw_aff::is_cst() const
10249 {
10250 auto res = isl_multi_pw_aff_is_cst(get());
10251 return manage(res);
10252 }
10253
is_equal(const multi_pw_aff & mpa2)10254 boolean multi_pw_aff::is_equal(const multi_pw_aff &mpa2) const
10255 {
10256 auto res = isl_multi_pw_aff_is_equal(get(), mpa2.get());
10257 return manage(res);
10258 }
10259
lex_gt_map(multi_pw_aff mpa2)10260 map multi_pw_aff::lex_gt_map(multi_pw_aff mpa2) const
10261 {
10262 auto res = isl_multi_pw_aff_lex_gt_map(copy(), mpa2.release());
10263 return manage(res);
10264 }
10265
lex_lt_map(multi_pw_aff mpa2)10266 map multi_pw_aff::lex_lt_map(multi_pw_aff mpa2) const
10267 {
10268 auto res = isl_multi_pw_aff_lex_lt_map(copy(), mpa2.release());
10269 return manage(res);
10270 }
10271
mod_multi_val(multi_val mv)10272 multi_pw_aff multi_pw_aff::mod_multi_val(multi_val mv) const
10273 {
10274 auto res = isl_multi_pw_aff_mod_multi_val(copy(), mv.release());
10275 return manage(res);
10276 }
10277
move_dims(isl::dim dst_type,unsigned int dst_pos,isl::dim src_type,unsigned int src_pos,unsigned int n)10278 multi_pw_aff multi_pw_aff::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
10279 {
10280 auto res = isl_multi_pw_aff_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
10281 return manage(res);
10282 }
10283
neg()10284 multi_pw_aff multi_pw_aff::neg() const
10285 {
10286 auto res = isl_multi_pw_aff_neg(copy());
10287 return manage(res);
10288 }
10289
plain_is_equal(const multi_pw_aff & multi2)10290 boolean multi_pw_aff::plain_is_equal(const multi_pw_aff &multi2) const
10291 {
10292 auto res = isl_multi_pw_aff_plain_is_equal(get(), multi2.get());
10293 return manage(res);
10294 }
10295
product(multi_pw_aff multi2)10296 multi_pw_aff multi_pw_aff::product(multi_pw_aff multi2) const
10297 {
10298 auto res = isl_multi_pw_aff_product(copy(), multi2.release());
10299 return manage(res);
10300 }
10301
project_domain_on_params()10302 multi_pw_aff multi_pw_aff::project_domain_on_params() const
10303 {
10304 auto res = isl_multi_pw_aff_project_domain_on_params(copy());
10305 return manage(res);
10306 }
10307
pullback(multi_aff ma)10308 multi_pw_aff multi_pw_aff::pullback(multi_aff ma) const
10309 {
10310 auto res = isl_multi_pw_aff_pullback_multi_aff(copy(), ma.release());
10311 return manage(res);
10312 }
10313
pullback(pw_multi_aff pma)10314 multi_pw_aff multi_pw_aff::pullback(pw_multi_aff pma) const
10315 {
10316 auto res = isl_multi_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
10317 return manage(res);
10318 }
10319
pullback(multi_pw_aff mpa2)10320 multi_pw_aff multi_pw_aff::pullback(multi_pw_aff mpa2) const
10321 {
10322 auto res = isl_multi_pw_aff_pullback_multi_pw_aff(copy(), mpa2.release());
10323 return manage(res);
10324 }
10325
range_factor_domain()10326 multi_pw_aff multi_pw_aff::range_factor_domain() const
10327 {
10328 auto res = isl_multi_pw_aff_range_factor_domain(copy());
10329 return manage(res);
10330 }
10331
range_factor_range()10332 multi_pw_aff multi_pw_aff::range_factor_range() const
10333 {
10334 auto res = isl_multi_pw_aff_range_factor_range(copy());
10335 return manage(res);
10336 }
10337
range_is_wrapping()10338 boolean multi_pw_aff::range_is_wrapping() const
10339 {
10340 auto res = isl_multi_pw_aff_range_is_wrapping(get());
10341 return manage(res);
10342 }
10343
range_product(multi_pw_aff multi2)10344 multi_pw_aff multi_pw_aff::range_product(multi_pw_aff multi2) const
10345 {
10346 auto res = isl_multi_pw_aff_range_product(copy(), multi2.release());
10347 return manage(res);
10348 }
10349
range_splice(unsigned int pos,multi_pw_aff multi2)10350 multi_pw_aff multi_pw_aff::range_splice(unsigned int pos, multi_pw_aff multi2) const
10351 {
10352 auto res = isl_multi_pw_aff_range_splice(copy(), pos, multi2.release());
10353 return manage(res);
10354 }
10355
reset_tuple_id(isl::dim type)10356 multi_pw_aff multi_pw_aff::reset_tuple_id(isl::dim type) const
10357 {
10358 auto res = isl_multi_pw_aff_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
10359 return manage(res);
10360 }
10361
reset_user()10362 multi_pw_aff multi_pw_aff::reset_user() const
10363 {
10364 auto res = isl_multi_pw_aff_reset_user(copy());
10365 return manage(res);
10366 }
10367
scale_down_multi_val(multi_val mv)10368 multi_pw_aff multi_pw_aff::scale_down_multi_val(multi_val mv) const
10369 {
10370 auto res = isl_multi_pw_aff_scale_down_multi_val(copy(), mv.release());
10371 return manage(res);
10372 }
10373
scale_down_val(val v)10374 multi_pw_aff multi_pw_aff::scale_down_val(val v) const
10375 {
10376 auto res = isl_multi_pw_aff_scale_down_val(copy(), v.release());
10377 return manage(res);
10378 }
10379
scale_multi_val(multi_val mv)10380 multi_pw_aff multi_pw_aff::scale_multi_val(multi_val mv) const
10381 {
10382 auto res = isl_multi_pw_aff_scale_multi_val(copy(), mv.release());
10383 return manage(res);
10384 }
10385
scale_val(val v)10386 multi_pw_aff multi_pw_aff::scale_val(val v) const
10387 {
10388 auto res = isl_multi_pw_aff_scale_val(copy(), v.release());
10389 return manage(res);
10390 }
10391
set_dim_id(isl::dim type,unsigned int pos,id id)10392 multi_pw_aff multi_pw_aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
10393 {
10394 auto res = isl_multi_pw_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
10395 return manage(res);
10396 }
10397
set_pw_aff(int pos,pw_aff el)10398 multi_pw_aff multi_pw_aff::set_pw_aff(int pos, pw_aff el) const
10399 {
10400 auto res = isl_multi_pw_aff_set_pw_aff(copy(), pos, el.release());
10401 return manage(res);
10402 }
10403
set_tuple_id(isl::dim type,id id)10404 multi_pw_aff multi_pw_aff::set_tuple_id(isl::dim type, id id) const
10405 {
10406 auto res = isl_multi_pw_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
10407 return manage(res);
10408 }
10409
set_tuple_name(isl::dim type,const std::string & s)10410 multi_pw_aff multi_pw_aff::set_tuple_name(isl::dim type, const std::string &s) const
10411 {
10412 auto res = isl_multi_pw_aff_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
10413 return manage(res);
10414 }
10415
splice(unsigned int in_pos,unsigned int out_pos,multi_pw_aff multi2)10416 multi_pw_aff multi_pw_aff::splice(unsigned int in_pos, unsigned int out_pos, multi_pw_aff multi2) const
10417 {
10418 auto res = isl_multi_pw_aff_splice(copy(), in_pos, out_pos, multi2.release());
10419 return manage(res);
10420 }
10421
sub(multi_pw_aff multi2)10422 multi_pw_aff multi_pw_aff::sub(multi_pw_aff multi2) const
10423 {
10424 auto res = isl_multi_pw_aff_sub(copy(), multi2.release());
10425 return manage(res);
10426 }
10427
zero(space space)10428 multi_pw_aff multi_pw_aff::zero(space space)
10429 {
10430 auto res = isl_multi_pw_aff_zero(space.release());
10431 return manage(res);
10432 }
10433
10434 // implementations for isl::multi_union_pw_aff
manage(__isl_take isl_multi_union_pw_aff * ptr)10435 multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr) {
10436 return multi_union_pw_aff(ptr);
10437 }
manage_copy(__isl_keep isl_multi_union_pw_aff * ptr)10438 multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr) {
10439 ptr = isl_multi_union_pw_aff_copy(ptr);
10440 return multi_union_pw_aff(ptr);
10441 }
10442
multi_union_pw_aff()10443 multi_union_pw_aff::multi_union_pw_aff()
10444 : ptr(nullptr) {}
10445
multi_union_pw_aff(const multi_union_pw_aff & obj)10446 multi_union_pw_aff::multi_union_pw_aff(const multi_union_pw_aff &obj)
10447 : ptr(nullptr)
10448 {
10449 ptr = obj.copy();
10450 }
multi_union_pw_aff(std::nullptr_t)10451 multi_union_pw_aff::multi_union_pw_aff(std::nullptr_t)
10452 : ptr(nullptr) {}
10453
10454
multi_union_pw_aff(__isl_take isl_multi_union_pw_aff * ptr)10455 multi_union_pw_aff::multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr)
10456 : ptr(ptr) {}
10457
multi_union_pw_aff(union_pw_aff upa)10458 multi_union_pw_aff::multi_union_pw_aff(union_pw_aff upa)
10459 {
10460 auto res = isl_multi_union_pw_aff_from_union_pw_aff(upa.release());
10461 ptr = res;
10462 }
multi_union_pw_aff(multi_pw_aff mpa)10463 multi_union_pw_aff::multi_union_pw_aff(multi_pw_aff mpa)
10464 {
10465 auto res = isl_multi_union_pw_aff_from_multi_pw_aff(mpa.release());
10466 ptr = res;
10467 }
multi_union_pw_aff(union_pw_multi_aff upma)10468 multi_union_pw_aff::multi_union_pw_aff(union_pw_multi_aff upma)
10469 {
10470 auto res = isl_multi_union_pw_aff_from_union_pw_multi_aff(upma.release());
10471 ptr = res;
10472 }
multi_union_pw_aff(ctx ctx,const std::string & str)10473 multi_union_pw_aff::multi_union_pw_aff(ctx ctx, const std::string &str)
10474 {
10475 auto res = isl_multi_union_pw_aff_read_from_str(ctx.release(), str.c_str());
10476 ptr = res;
10477 }
10478
10479 multi_union_pw_aff &multi_union_pw_aff::operator=(multi_union_pw_aff obj) {
10480 std::swap(this->ptr, obj.ptr);
10481 return *this;
10482 }
10483
~multi_union_pw_aff()10484 multi_union_pw_aff::~multi_union_pw_aff() {
10485 if (ptr)
10486 isl_multi_union_pw_aff_free(ptr);
10487 }
10488
copy()10489 __isl_give isl_multi_union_pw_aff *multi_union_pw_aff::copy() const & {
10490 return isl_multi_union_pw_aff_copy(ptr);
10491 }
10492
get()10493 __isl_keep isl_multi_union_pw_aff *multi_union_pw_aff::get() const {
10494 return ptr;
10495 }
10496
release()10497 __isl_give isl_multi_union_pw_aff *multi_union_pw_aff::release() {
10498 isl_multi_union_pw_aff *tmp = ptr;
10499 ptr = nullptr;
10500 return tmp;
10501 }
10502
is_null()10503 bool multi_union_pw_aff::is_null() const {
10504 return ptr == nullptr;
10505 }
10506 multi_union_pw_aff::operator bool() const {
10507 return !is_null();
10508 }
10509
10510
get_ctx()10511 ctx multi_union_pw_aff::get_ctx() const {
10512 return ctx(isl_multi_union_pw_aff_get_ctx(ptr));
10513 }
to_str()10514 std::string multi_union_pw_aff::to_str() const {
10515 char *Tmp = isl_multi_union_pw_aff_to_str(get());
10516 if (!Tmp)
10517 return "";
10518 std::string S(Tmp);
10519 free(Tmp);
10520 return S;
10521 }
10522
10523
dump()10524 void multi_union_pw_aff::dump() const {
10525 isl_multi_union_pw_aff_dump(get());
10526 }
10527
10528
add(multi_union_pw_aff multi2)10529 multi_union_pw_aff multi_union_pw_aff::add(multi_union_pw_aff multi2) const
10530 {
10531 auto res = isl_multi_union_pw_aff_add(copy(), multi2.release());
10532 return manage(res);
10533 }
10534
align_params(space model)10535 multi_union_pw_aff multi_union_pw_aff::align_params(space model) const
10536 {
10537 auto res = isl_multi_union_pw_aff_align_params(copy(), model.release());
10538 return manage(res);
10539 }
10540
apply_aff(aff aff)10541 union_pw_aff multi_union_pw_aff::apply_aff(aff aff) const
10542 {
10543 auto res = isl_multi_union_pw_aff_apply_aff(copy(), aff.release());
10544 return manage(res);
10545 }
10546
apply_pw_aff(pw_aff pa)10547 union_pw_aff multi_union_pw_aff::apply_pw_aff(pw_aff pa) const
10548 {
10549 auto res = isl_multi_union_pw_aff_apply_pw_aff(copy(), pa.release());
10550 return manage(res);
10551 }
10552
apply_pw_multi_aff(pw_multi_aff pma)10553 multi_union_pw_aff multi_union_pw_aff::apply_pw_multi_aff(pw_multi_aff pma) const
10554 {
10555 auto res = isl_multi_union_pw_aff_apply_pw_multi_aff(copy(), pma.release());
10556 return manage(res);
10557 }
10558
coalesce()10559 multi_union_pw_aff multi_union_pw_aff::coalesce() const
10560 {
10561 auto res = isl_multi_union_pw_aff_coalesce(copy());
10562 return manage(res);
10563 }
10564
dim(isl::dim type)10565 unsigned int multi_union_pw_aff::dim(isl::dim type) const
10566 {
10567 auto res = isl_multi_union_pw_aff_dim(get(), static_cast<enum isl_dim_type>(type));
10568 return res;
10569 }
10570
domain()10571 union_set multi_union_pw_aff::domain() const
10572 {
10573 auto res = isl_multi_union_pw_aff_domain(copy());
10574 return manage(res);
10575 }
10576
drop_dims(isl::dim type,unsigned int first,unsigned int n)10577 multi_union_pw_aff multi_union_pw_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
10578 {
10579 auto res = isl_multi_union_pw_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
10580 return manage(res);
10581 }
10582
extract_multi_pw_aff(space space)10583 multi_pw_aff multi_union_pw_aff::extract_multi_pw_aff(space space) const
10584 {
10585 auto res = isl_multi_union_pw_aff_extract_multi_pw_aff(get(), space.release());
10586 return manage(res);
10587 }
10588
factor_range()10589 multi_union_pw_aff multi_union_pw_aff::factor_range() const
10590 {
10591 auto res = isl_multi_union_pw_aff_factor_range(copy());
10592 return manage(res);
10593 }
10594
find_dim_by_id(isl::dim type,const id & id)10595 int multi_union_pw_aff::find_dim_by_id(isl::dim type, const id &id) const
10596 {
10597 auto res = isl_multi_union_pw_aff_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
10598 return res;
10599 }
10600
find_dim_by_name(isl::dim type,const std::string & name)10601 int multi_union_pw_aff::find_dim_by_name(isl::dim type, const std::string &name) const
10602 {
10603 auto res = isl_multi_union_pw_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
10604 return res;
10605 }
10606
flat_range_product(multi_union_pw_aff multi2)10607 multi_union_pw_aff multi_union_pw_aff::flat_range_product(multi_union_pw_aff multi2) const
10608 {
10609 auto res = isl_multi_union_pw_aff_flat_range_product(copy(), multi2.release());
10610 return manage(res);
10611 }
10612
flatten_range()10613 multi_union_pw_aff multi_union_pw_aff::flatten_range() const
10614 {
10615 auto res = isl_multi_union_pw_aff_flatten_range(copy());
10616 return manage(res);
10617 }
10618
floor()10619 multi_union_pw_aff multi_union_pw_aff::floor() const
10620 {
10621 auto res = isl_multi_union_pw_aff_floor(copy());
10622 return manage(res);
10623 }
10624
from_multi_aff(multi_aff ma)10625 multi_union_pw_aff multi_union_pw_aff::from_multi_aff(multi_aff ma)
10626 {
10627 auto res = isl_multi_union_pw_aff_from_multi_aff(ma.release());
10628 return manage(res);
10629 }
10630
from_range()10631 multi_union_pw_aff multi_union_pw_aff::from_range() const
10632 {
10633 auto res = isl_multi_union_pw_aff_from_range(copy());
10634 return manage(res);
10635 }
10636
from_union_map(union_map umap)10637 multi_union_pw_aff multi_union_pw_aff::from_union_map(union_map umap)
10638 {
10639 auto res = isl_multi_union_pw_aff_from_union_map(umap.release());
10640 return manage(res);
10641 }
10642
from_union_pw_aff_list(space space,union_pw_aff_list list)10643 multi_union_pw_aff multi_union_pw_aff::from_union_pw_aff_list(space space, union_pw_aff_list list)
10644 {
10645 auto res = isl_multi_union_pw_aff_from_union_pw_aff_list(space.release(), list.release());
10646 return manage(res);
10647 }
10648
get_dim_id(isl::dim type,unsigned int pos)10649 id multi_union_pw_aff::get_dim_id(isl::dim type, unsigned int pos) const
10650 {
10651 auto res = isl_multi_union_pw_aff_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
10652 return manage(res);
10653 }
10654
get_domain_space()10655 space multi_union_pw_aff::get_domain_space() const
10656 {
10657 auto res = isl_multi_union_pw_aff_get_domain_space(get());
10658 return manage(res);
10659 }
10660
get_space()10661 space multi_union_pw_aff::get_space() const
10662 {
10663 auto res = isl_multi_union_pw_aff_get_space(get());
10664 return manage(res);
10665 }
10666
get_tuple_id(isl::dim type)10667 id multi_union_pw_aff::get_tuple_id(isl::dim type) const
10668 {
10669 auto res = isl_multi_union_pw_aff_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
10670 return manage(res);
10671 }
10672
get_tuple_name(isl::dim type)10673 std::string multi_union_pw_aff::get_tuple_name(isl::dim type) const
10674 {
10675 auto res = isl_multi_union_pw_aff_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
10676 std::string tmp(res);
10677 return tmp;
10678 }
10679
get_union_pw_aff(int pos)10680 union_pw_aff multi_union_pw_aff::get_union_pw_aff(int pos) const
10681 {
10682 auto res = isl_multi_union_pw_aff_get_union_pw_aff(get(), pos);
10683 return manage(res);
10684 }
10685
gist(union_set context)10686 multi_union_pw_aff multi_union_pw_aff::gist(union_set context) const
10687 {
10688 auto res = isl_multi_union_pw_aff_gist(copy(), context.release());
10689 return manage(res);
10690 }
10691
gist_params(set context)10692 multi_union_pw_aff multi_union_pw_aff::gist_params(set context) const
10693 {
10694 auto res = isl_multi_union_pw_aff_gist_params(copy(), context.release());
10695 return manage(res);
10696 }
10697
has_tuple_id(isl::dim type)10698 boolean multi_union_pw_aff::has_tuple_id(isl::dim type) const
10699 {
10700 auto res = isl_multi_union_pw_aff_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
10701 return manage(res);
10702 }
10703
intersect_domain(union_set uset)10704 multi_union_pw_aff multi_union_pw_aff::intersect_domain(union_set uset) const
10705 {
10706 auto res = isl_multi_union_pw_aff_intersect_domain(copy(), uset.release());
10707 return manage(res);
10708 }
10709
intersect_params(set params)10710 multi_union_pw_aff multi_union_pw_aff::intersect_params(set params) const
10711 {
10712 auto res = isl_multi_union_pw_aff_intersect_params(copy(), params.release());
10713 return manage(res);
10714 }
10715
intersect_range(set set)10716 multi_union_pw_aff multi_union_pw_aff::intersect_range(set set) const
10717 {
10718 auto res = isl_multi_union_pw_aff_intersect_range(copy(), set.release());
10719 return manage(res);
10720 }
10721
involves_nan()10722 boolean multi_union_pw_aff::involves_nan() const
10723 {
10724 auto res = isl_multi_union_pw_aff_involves_nan(get());
10725 return manage(res);
10726 }
10727
max_multi_val()10728 multi_val multi_union_pw_aff::max_multi_val() const
10729 {
10730 auto res = isl_multi_union_pw_aff_max_multi_val(copy());
10731 return manage(res);
10732 }
10733
min_multi_val()10734 multi_val multi_union_pw_aff::min_multi_val() const
10735 {
10736 auto res = isl_multi_union_pw_aff_min_multi_val(copy());
10737 return manage(res);
10738 }
10739
mod_multi_val(multi_val mv)10740 multi_union_pw_aff multi_union_pw_aff::mod_multi_val(multi_val mv) const
10741 {
10742 auto res = isl_multi_union_pw_aff_mod_multi_val(copy(), mv.release());
10743 return manage(res);
10744 }
10745
multi_aff_on_domain(union_set domain,multi_aff ma)10746 multi_union_pw_aff multi_union_pw_aff::multi_aff_on_domain(union_set domain, multi_aff ma)
10747 {
10748 auto res = isl_multi_union_pw_aff_multi_aff_on_domain(domain.release(), ma.release());
10749 return manage(res);
10750 }
10751
multi_val_on_domain(union_set domain,multi_val mv)10752 multi_union_pw_aff multi_union_pw_aff::multi_val_on_domain(union_set domain, multi_val mv)
10753 {
10754 auto res = isl_multi_union_pw_aff_multi_val_on_domain(domain.release(), mv.release());
10755 return manage(res);
10756 }
10757
neg()10758 multi_union_pw_aff multi_union_pw_aff::neg() const
10759 {
10760 auto res = isl_multi_union_pw_aff_neg(copy());
10761 return manage(res);
10762 }
10763
plain_is_equal(const multi_union_pw_aff & multi2)10764 boolean multi_union_pw_aff::plain_is_equal(const multi_union_pw_aff &multi2) const
10765 {
10766 auto res = isl_multi_union_pw_aff_plain_is_equal(get(), multi2.get());
10767 return manage(res);
10768 }
10769
pullback(union_pw_multi_aff upma)10770 multi_union_pw_aff multi_union_pw_aff::pullback(union_pw_multi_aff upma) const
10771 {
10772 auto res = isl_multi_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
10773 return manage(res);
10774 }
10775
pw_multi_aff_on_domain(union_set domain,pw_multi_aff pma)10776 multi_union_pw_aff multi_union_pw_aff::pw_multi_aff_on_domain(union_set domain, pw_multi_aff pma)
10777 {
10778 auto res = isl_multi_union_pw_aff_pw_multi_aff_on_domain(domain.release(), pma.release());
10779 return manage(res);
10780 }
10781
range_factor_domain()10782 multi_union_pw_aff multi_union_pw_aff::range_factor_domain() const
10783 {
10784 auto res = isl_multi_union_pw_aff_range_factor_domain(copy());
10785 return manage(res);
10786 }
10787
range_factor_range()10788 multi_union_pw_aff multi_union_pw_aff::range_factor_range() const
10789 {
10790 auto res = isl_multi_union_pw_aff_range_factor_range(copy());
10791 return manage(res);
10792 }
10793
range_is_wrapping()10794 boolean multi_union_pw_aff::range_is_wrapping() const
10795 {
10796 auto res = isl_multi_union_pw_aff_range_is_wrapping(get());
10797 return manage(res);
10798 }
10799
range_product(multi_union_pw_aff multi2)10800 multi_union_pw_aff multi_union_pw_aff::range_product(multi_union_pw_aff multi2) const
10801 {
10802 auto res = isl_multi_union_pw_aff_range_product(copy(), multi2.release());
10803 return manage(res);
10804 }
10805
range_splice(unsigned int pos,multi_union_pw_aff multi2)10806 multi_union_pw_aff multi_union_pw_aff::range_splice(unsigned int pos, multi_union_pw_aff multi2) const
10807 {
10808 auto res = isl_multi_union_pw_aff_range_splice(copy(), pos, multi2.release());
10809 return manage(res);
10810 }
10811
reset_tuple_id(isl::dim type)10812 multi_union_pw_aff multi_union_pw_aff::reset_tuple_id(isl::dim type) const
10813 {
10814 auto res = isl_multi_union_pw_aff_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
10815 return manage(res);
10816 }
10817
reset_user()10818 multi_union_pw_aff multi_union_pw_aff::reset_user() const
10819 {
10820 auto res = isl_multi_union_pw_aff_reset_user(copy());
10821 return manage(res);
10822 }
10823
scale_down_multi_val(multi_val mv)10824 multi_union_pw_aff multi_union_pw_aff::scale_down_multi_val(multi_val mv) const
10825 {
10826 auto res = isl_multi_union_pw_aff_scale_down_multi_val(copy(), mv.release());
10827 return manage(res);
10828 }
10829
scale_down_val(val v)10830 multi_union_pw_aff multi_union_pw_aff::scale_down_val(val v) const
10831 {
10832 auto res = isl_multi_union_pw_aff_scale_down_val(copy(), v.release());
10833 return manage(res);
10834 }
10835
scale_multi_val(multi_val mv)10836 multi_union_pw_aff multi_union_pw_aff::scale_multi_val(multi_val mv) const
10837 {
10838 auto res = isl_multi_union_pw_aff_scale_multi_val(copy(), mv.release());
10839 return manage(res);
10840 }
10841
scale_val(val v)10842 multi_union_pw_aff multi_union_pw_aff::scale_val(val v) const
10843 {
10844 auto res = isl_multi_union_pw_aff_scale_val(copy(), v.release());
10845 return manage(res);
10846 }
10847
set_dim_id(isl::dim type,unsigned int pos,id id)10848 multi_union_pw_aff multi_union_pw_aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
10849 {
10850 auto res = isl_multi_union_pw_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
10851 return manage(res);
10852 }
10853
set_tuple_id(isl::dim type,id id)10854 multi_union_pw_aff multi_union_pw_aff::set_tuple_id(isl::dim type, id id) const
10855 {
10856 auto res = isl_multi_union_pw_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
10857 return manage(res);
10858 }
10859
set_tuple_name(isl::dim type,const std::string & s)10860 multi_union_pw_aff multi_union_pw_aff::set_tuple_name(isl::dim type, const std::string &s) const
10861 {
10862 auto res = isl_multi_union_pw_aff_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
10863 return manage(res);
10864 }
10865
set_union_pw_aff(int pos,union_pw_aff el)10866 multi_union_pw_aff multi_union_pw_aff::set_union_pw_aff(int pos, union_pw_aff el) const
10867 {
10868 auto res = isl_multi_union_pw_aff_set_union_pw_aff(copy(), pos, el.release());
10869 return manage(res);
10870 }
10871
sub(multi_union_pw_aff multi2)10872 multi_union_pw_aff multi_union_pw_aff::sub(multi_union_pw_aff multi2) const
10873 {
10874 auto res = isl_multi_union_pw_aff_sub(copy(), multi2.release());
10875 return manage(res);
10876 }
10877
union_add(multi_union_pw_aff mupa2)10878 multi_union_pw_aff multi_union_pw_aff::union_add(multi_union_pw_aff mupa2) const
10879 {
10880 auto res = isl_multi_union_pw_aff_union_add(copy(), mupa2.release());
10881 return manage(res);
10882 }
10883
zero(space space)10884 multi_union_pw_aff multi_union_pw_aff::zero(space space)
10885 {
10886 auto res = isl_multi_union_pw_aff_zero(space.release());
10887 return manage(res);
10888 }
10889
zero_union_set()10890 union_set multi_union_pw_aff::zero_union_set() const
10891 {
10892 auto res = isl_multi_union_pw_aff_zero_union_set(copy());
10893 return manage(res);
10894 }
10895
10896 // implementations for isl::multi_val
manage(__isl_take isl_multi_val * ptr)10897 multi_val manage(__isl_take isl_multi_val *ptr) {
10898 return multi_val(ptr);
10899 }
manage_copy(__isl_keep isl_multi_val * ptr)10900 multi_val manage_copy(__isl_keep isl_multi_val *ptr) {
10901 ptr = isl_multi_val_copy(ptr);
10902 return multi_val(ptr);
10903 }
10904
multi_val()10905 multi_val::multi_val()
10906 : ptr(nullptr) {}
10907
multi_val(const multi_val & obj)10908 multi_val::multi_val(const multi_val &obj)
10909 : ptr(nullptr)
10910 {
10911 ptr = obj.copy();
10912 }
multi_val(std::nullptr_t)10913 multi_val::multi_val(std::nullptr_t)
10914 : ptr(nullptr) {}
10915
10916
multi_val(__isl_take isl_multi_val * ptr)10917 multi_val::multi_val(__isl_take isl_multi_val *ptr)
10918 : ptr(ptr) {}
10919
10920
10921 multi_val &multi_val::operator=(multi_val obj) {
10922 std::swap(this->ptr, obj.ptr);
10923 return *this;
10924 }
10925
~multi_val()10926 multi_val::~multi_val() {
10927 if (ptr)
10928 isl_multi_val_free(ptr);
10929 }
10930
copy()10931 __isl_give isl_multi_val *multi_val::copy() const & {
10932 return isl_multi_val_copy(ptr);
10933 }
10934
get()10935 __isl_keep isl_multi_val *multi_val::get() const {
10936 return ptr;
10937 }
10938
release()10939 __isl_give isl_multi_val *multi_val::release() {
10940 isl_multi_val *tmp = ptr;
10941 ptr = nullptr;
10942 return tmp;
10943 }
10944
is_null()10945 bool multi_val::is_null() const {
10946 return ptr == nullptr;
10947 }
10948 multi_val::operator bool() const {
10949 return !is_null();
10950 }
10951
10952
get_ctx()10953 ctx multi_val::get_ctx() const {
10954 return ctx(isl_multi_val_get_ctx(ptr));
10955 }
to_str()10956 std::string multi_val::to_str() const {
10957 char *Tmp = isl_multi_val_to_str(get());
10958 if (!Tmp)
10959 return "";
10960 std::string S(Tmp);
10961 free(Tmp);
10962 return S;
10963 }
10964
10965
dump()10966 void multi_val::dump() const {
10967 isl_multi_val_dump(get());
10968 }
10969
10970
add(multi_val multi2)10971 multi_val multi_val::add(multi_val multi2) const
10972 {
10973 auto res = isl_multi_val_add(copy(), multi2.release());
10974 return manage(res);
10975 }
10976
add_dims(isl::dim type,unsigned int n)10977 multi_val multi_val::add_dims(isl::dim type, unsigned int n) const
10978 {
10979 auto res = isl_multi_val_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
10980 return manage(res);
10981 }
10982
add_val(val v)10983 multi_val multi_val::add_val(val v) const
10984 {
10985 auto res = isl_multi_val_add_val(copy(), v.release());
10986 return manage(res);
10987 }
10988
align_params(space model)10989 multi_val multi_val::align_params(space model) const
10990 {
10991 auto res = isl_multi_val_align_params(copy(), model.release());
10992 return manage(res);
10993 }
10994
dim(isl::dim type)10995 unsigned int multi_val::dim(isl::dim type) const
10996 {
10997 auto res = isl_multi_val_dim(get(), static_cast<enum isl_dim_type>(type));
10998 return res;
10999 }
11000
drop_dims(isl::dim type,unsigned int first,unsigned int n)11001 multi_val multi_val::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
11002 {
11003 auto res = isl_multi_val_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
11004 return manage(res);
11005 }
11006
factor_range()11007 multi_val multi_val::factor_range() const
11008 {
11009 auto res = isl_multi_val_factor_range(copy());
11010 return manage(res);
11011 }
11012
find_dim_by_id(isl::dim type,const id & id)11013 int multi_val::find_dim_by_id(isl::dim type, const id &id) const
11014 {
11015 auto res = isl_multi_val_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
11016 return res;
11017 }
11018
find_dim_by_name(isl::dim type,const std::string & name)11019 int multi_val::find_dim_by_name(isl::dim type, const std::string &name) const
11020 {
11021 auto res = isl_multi_val_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
11022 return res;
11023 }
11024
flat_range_product(multi_val multi2)11025 multi_val multi_val::flat_range_product(multi_val multi2) const
11026 {
11027 auto res = isl_multi_val_flat_range_product(copy(), multi2.release());
11028 return manage(res);
11029 }
11030
flatten_range()11031 multi_val multi_val::flatten_range() const
11032 {
11033 auto res = isl_multi_val_flatten_range(copy());
11034 return manage(res);
11035 }
11036
from_range()11037 multi_val multi_val::from_range() const
11038 {
11039 auto res = isl_multi_val_from_range(copy());
11040 return manage(res);
11041 }
11042
from_val_list(space space,val_list list)11043 multi_val multi_val::from_val_list(space space, val_list list)
11044 {
11045 auto res = isl_multi_val_from_val_list(space.release(), list.release());
11046 return manage(res);
11047 }
11048
get_dim_id(isl::dim type,unsigned int pos)11049 id multi_val::get_dim_id(isl::dim type, unsigned int pos) const
11050 {
11051 auto res = isl_multi_val_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
11052 return manage(res);
11053 }
11054
get_domain_space()11055 space multi_val::get_domain_space() const
11056 {
11057 auto res = isl_multi_val_get_domain_space(get());
11058 return manage(res);
11059 }
11060
get_space()11061 space multi_val::get_space() const
11062 {
11063 auto res = isl_multi_val_get_space(get());
11064 return manage(res);
11065 }
11066
get_tuple_id(isl::dim type)11067 id multi_val::get_tuple_id(isl::dim type) const
11068 {
11069 auto res = isl_multi_val_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
11070 return manage(res);
11071 }
11072
get_tuple_name(isl::dim type)11073 std::string multi_val::get_tuple_name(isl::dim type) const
11074 {
11075 auto res = isl_multi_val_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
11076 std::string tmp(res);
11077 return tmp;
11078 }
11079
get_val(int pos)11080 val multi_val::get_val(int pos) const
11081 {
11082 auto res = isl_multi_val_get_val(get(), pos);
11083 return manage(res);
11084 }
11085
has_tuple_id(isl::dim type)11086 boolean multi_val::has_tuple_id(isl::dim type) const
11087 {
11088 auto res = isl_multi_val_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
11089 return manage(res);
11090 }
11091
insert_dims(isl::dim type,unsigned int first,unsigned int n)11092 multi_val multi_val::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
11093 {
11094 auto res = isl_multi_val_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
11095 return manage(res);
11096 }
11097
involves_dims(isl::dim type,unsigned int first,unsigned int n)11098 boolean multi_val::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
11099 {
11100 auto res = isl_multi_val_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
11101 return manage(res);
11102 }
11103
involves_nan()11104 boolean multi_val::involves_nan() const
11105 {
11106 auto res = isl_multi_val_involves_nan(get());
11107 return manage(res);
11108 }
11109
mod_multi_val(multi_val mv)11110 multi_val multi_val::mod_multi_val(multi_val mv) const
11111 {
11112 auto res = isl_multi_val_mod_multi_val(copy(), mv.release());
11113 return manage(res);
11114 }
11115
mod_val(val v)11116 multi_val multi_val::mod_val(val v) const
11117 {
11118 auto res = isl_multi_val_mod_val(copy(), v.release());
11119 return manage(res);
11120 }
11121
neg()11122 multi_val multi_val::neg() const
11123 {
11124 auto res = isl_multi_val_neg(copy());
11125 return manage(res);
11126 }
11127
plain_is_equal(const multi_val & multi2)11128 boolean multi_val::plain_is_equal(const multi_val &multi2) const
11129 {
11130 auto res = isl_multi_val_plain_is_equal(get(), multi2.get());
11131 return manage(res);
11132 }
11133
product(multi_val multi2)11134 multi_val multi_val::product(multi_val multi2) const
11135 {
11136 auto res = isl_multi_val_product(copy(), multi2.release());
11137 return manage(res);
11138 }
11139
project_domain_on_params()11140 multi_val multi_val::project_domain_on_params() const
11141 {
11142 auto res = isl_multi_val_project_domain_on_params(copy());
11143 return manage(res);
11144 }
11145
range_factor_domain()11146 multi_val multi_val::range_factor_domain() const
11147 {
11148 auto res = isl_multi_val_range_factor_domain(copy());
11149 return manage(res);
11150 }
11151
range_factor_range()11152 multi_val multi_val::range_factor_range() const
11153 {
11154 auto res = isl_multi_val_range_factor_range(copy());
11155 return manage(res);
11156 }
11157
range_is_wrapping()11158 boolean multi_val::range_is_wrapping() const
11159 {
11160 auto res = isl_multi_val_range_is_wrapping(get());
11161 return manage(res);
11162 }
11163
range_product(multi_val multi2)11164 multi_val multi_val::range_product(multi_val multi2) const
11165 {
11166 auto res = isl_multi_val_range_product(copy(), multi2.release());
11167 return manage(res);
11168 }
11169
range_splice(unsigned int pos,multi_val multi2)11170 multi_val multi_val::range_splice(unsigned int pos, multi_val multi2) const
11171 {
11172 auto res = isl_multi_val_range_splice(copy(), pos, multi2.release());
11173 return manage(res);
11174 }
11175
read_from_str(ctx ctx,const std::string & str)11176 multi_val multi_val::read_from_str(ctx ctx, const std::string &str)
11177 {
11178 auto res = isl_multi_val_read_from_str(ctx.release(), str.c_str());
11179 return manage(res);
11180 }
11181
reset_tuple_id(isl::dim type)11182 multi_val multi_val::reset_tuple_id(isl::dim type) const
11183 {
11184 auto res = isl_multi_val_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
11185 return manage(res);
11186 }
11187
reset_user()11188 multi_val multi_val::reset_user() const
11189 {
11190 auto res = isl_multi_val_reset_user(copy());
11191 return manage(res);
11192 }
11193
scale_down_multi_val(multi_val mv)11194 multi_val multi_val::scale_down_multi_val(multi_val mv) const
11195 {
11196 auto res = isl_multi_val_scale_down_multi_val(copy(), mv.release());
11197 return manage(res);
11198 }
11199
scale_down_val(val v)11200 multi_val multi_val::scale_down_val(val v) const
11201 {
11202 auto res = isl_multi_val_scale_down_val(copy(), v.release());
11203 return manage(res);
11204 }
11205
scale_multi_val(multi_val mv)11206 multi_val multi_val::scale_multi_val(multi_val mv) const
11207 {
11208 auto res = isl_multi_val_scale_multi_val(copy(), mv.release());
11209 return manage(res);
11210 }
11211
scale_val(val v)11212 multi_val multi_val::scale_val(val v) const
11213 {
11214 auto res = isl_multi_val_scale_val(copy(), v.release());
11215 return manage(res);
11216 }
11217
set_dim_id(isl::dim type,unsigned int pos,id id)11218 multi_val multi_val::set_dim_id(isl::dim type, unsigned int pos, id id) const
11219 {
11220 auto res = isl_multi_val_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
11221 return manage(res);
11222 }
11223
set_tuple_id(isl::dim type,id id)11224 multi_val multi_val::set_tuple_id(isl::dim type, id id) const
11225 {
11226 auto res = isl_multi_val_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
11227 return manage(res);
11228 }
11229
set_tuple_name(isl::dim type,const std::string & s)11230 multi_val multi_val::set_tuple_name(isl::dim type, const std::string &s) const
11231 {
11232 auto res = isl_multi_val_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
11233 return manage(res);
11234 }
11235
set_val(int pos,val el)11236 multi_val multi_val::set_val(int pos, val el) const
11237 {
11238 auto res = isl_multi_val_set_val(copy(), pos, el.release());
11239 return manage(res);
11240 }
11241
splice(unsigned int in_pos,unsigned int out_pos,multi_val multi2)11242 multi_val multi_val::splice(unsigned int in_pos, unsigned int out_pos, multi_val multi2) const
11243 {
11244 auto res = isl_multi_val_splice(copy(), in_pos, out_pos, multi2.release());
11245 return manage(res);
11246 }
11247
sub(multi_val multi2)11248 multi_val multi_val::sub(multi_val multi2) const
11249 {
11250 auto res = isl_multi_val_sub(copy(), multi2.release());
11251 return manage(res);
11252 }
11253
zero(space space)11254 multi_val multi_val::zero(space space)
11255 {
11256 auto res = isl_multi_val_zero(space.release());
11257 return manage(res);
11258 }
11259
11260 // implementations for isl::point
manage(__isl_take isl_point * ptr)11261 point manage(__isl_take isl_point *ptr) {
11262 return point(ptr);
11263 }
manage_copy(__isl_keep isl_point * ptr)11264 point manage_copy(__isl_keep isl_point *ptr) {
11265 ptr = isl_point_copy(ptr);
11266 return point(ptr);
11267 }
11268
point()11269 point::point()
11270 : ptr(nullptr) {}
11271
point(const point & obj)11272 point::point(const point &obj)
11273 : ptr(nullptr)
11274 {
11275 ptr = obj.copy();
11276 }
point(std::nullptr_t)11277 point::point(std::nullptr_t)
11278 : ptr(nullptr) {}
11279
11280
point(__isl_take isl_point * ptr)11281 point::point(__isl_take isl_point *ptr)
11282 : ptr(ptr) {}
11283
point(space dim)11284 point::point(space dim)
11285 {
11286 auto res = isl_point_zero(dim.release());
11287 ptr = res;
11288 }
11289
11290 point &point::operator=(point obj) {
11291 std::swap(this->ptr, obj.ptr);
11292 return *this;
11293 }
11294
~point()11295 point::~point() {
11296 if (ptr)
11297 isl_point_free(ptr);
11298 }
11299
copy()11300 __isl_give isl_point *point::copy() const & {
11301 return isl_point_copy(ptr);
11302 }
11303
get()11304 __isl_keep isl_point *point::get() const {
11305 return ptr;
11306 }
11307
release()11308 __isl_give isl_point *point::release() {
11309 isl_point *tmp = ptr;
11310 ptr = nullptr;
11311 return tmp;
11312 }
11313
is_null()11314 bool point::is_null() const {
11315 return ptr == nullptr;
11316 }
11317 point::operator bool() const {
11318 return !is_null();
11319 }
11320
11321
get_ctx()11322 ctx point::get_ctx() const {
11323 return ctx(isl_point_get_ctx(ptr));
11324 }
to_str()11325 std::string point::to_str() const {
11326 char *Tmp = isl_point_to_str(get());
11327 if (!Tmp)
11328 return "";
11329 std::string S(Tmp);
11330 free(Tmp);
11331 return S;
11332 }
11333
11334
dump()11335 void point::dump() const {
11336 isl_point_dump(get());
11337 }
11338
11339
add_ui(isl::dim type,int pos,unsigned int val)11340 point point::add_ui(isl::dim type, int pos, unsigned int val) const
11341 {
11342 auto res = isl_point_add_ui(copy(), static_cast<enum isl_dim_type>(type), pos, val);
11343 return manage(res);
11344 }
11345
get_coordinate_val(isl::dim type,int pos)11346 val point::get_coordinate_val(isl::dim type, int pos) const
11347 {
11348 auto res = isl_point_get_coordinate_val(get(), static_cast<enum isl_dim_type>(type), pos);
11349 return manage(res);
11350 }
11351
get_space()11352 space point::get_space() const
11353 {
11354 auto res = isl_point_get_space(get());
11355 return manage(res);
11356 }
11357
set_coordinate_val(isl::dim type,int pos,val v)11358 point point::set_coordinate_val(isl::dim type, int pos, val v) const
11359 {
11360 auto res = isl_point_set_coordinate_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
11361 return manage(res);
11362 }
11363
sub_ui(isl::dim type,int pos,unsigned int val)11364 point point::sub_ui(isl::dim type, int pos, unsigned int val) const
11365 {
11366 auto res = isl_point_sub_ui(copy(), static_cast<enum isl_dim_type>(type), pos, val);
11367 return manage(res);
11368 }
11369
11370 // implementations for isl::pw_aff
manage(__isl_take isl_pw_aff * ptr)11371 pw_aff manage(__isl_take isl_pw_aff *ptr) {
11372 return pw_aff(ptr);
11373 }
manage_copy(__isl_keep isl_pw_aff * ptr)11374 pw_aff manage_copy(__isl_keep isl_pw_aff *ptr) {
11375 ptr = isl_pw_aff_copy(ptr);
11376 return pw_aff(ptr);
11377 }
11378
pw_aff()11379 pw_aff::pw_aff()
11380 : ptr(nullptr) {}
11381
pw_aff(const pw_aff & obj)11382 pw_aff::pw_aff(const pw_aff &obj)
11383 : ptr(nullptr)
11384 {
11385 ptr = obj.copy();
11386 }
pw_aff(std::nullptr_t)11387 pw_aff::pw_aff(std::nullptr_t)
11388 : ptr(nullptr) {}
11389
11390
pw_aff(__isl_take isl_pw_aff * ptr)11391 pw_aff::pw_aff(__isl_take isl_pw_aff *ptr)
11392 : ptr(ptr) {}
11393
pw_aff(aff aff)11394 pw_aff::pw_aff(aff aff)
11395 {
11396 auto res = isl_pw_aff_from_aff(aff.release());
11397 ptr = res;
11398 }
pw_aff(local_space ls)11399 pw_aff::pw_aff(local_space ls)
11400 {
11401 auto res = isl_pw_aff_zero_on_domain(ls.release());
11402 ptr = res;
11403 }
pw_aff(set domain,val v)11404 pw_aff::pw_aff(set domain, val v)
11405 {
11406 auto res = isl_pw_aff_val_on_domain(domain.release(), v.release());
11407 ptr = res;
11408 }
pw_aff(ctx ctx,const std::string & str)11409 pw_aff::pw_aff(ctx ctx, const std::string &str)
11410 {
11411 auto res = isl_pw_aff_read_from_str(ctx.release(), str.c_str());
11412 ptr = res;
11413 }
11414
11415 pw_aff &pw_aff::operator=(pw_aff obj) {
11416 std::swap(this->ptr, obj.ptr);
11417 return *this;
11418 }
11419
~pw_aff()11420 pw_aff::~pw_aff() {
11421 if (ptr)
11422 isl_pw_aff_free(ptr);
11423 }
11424
copy()11425 __isl_give isl_pw_aff *pw_aff::copy() const & {
11426 return isl_pw_aff_copy(ptr);
11427 }
11428
get()11429 __isl_keep isl_pw_aff *pw_aff::get() const {
11430 return ptr;
11431 }
11432
release()11433 __isl_give isl_pw_aff *pw_aff::release() {
11434 isl_pw_aff *tmp = ptr;
11435 ptr = nullptr;
11436 return tmp;
11437 }
11438
is_null()11439 bool pw_aff::is_null() const {
11440 return ptr == nullptr;
11441 }
11442 pw_aff::operator bool() const {
11443 return !is_null();
11444 }
11445
11446
get_ctx()11447 ctx pw_aff::get_ctx() const {
11448 return ctx(isl_pw_aff_get_ctx(ptr));
11449 }
to_str()11450 std::string pw_aff::to_str() const {
11451 char *Tmp = isl_pw_aff_to_str(get());
11452 if (!Tmp)
11453 return "";
11454 std::string S(Tmp);
11455 free(Tmp);
11456 return S;
11457 }
11458
11459
dump()11460 void pw_aff::dump() const {
11461 isl_pw_aff_dump(get());
11462 }
11463
11464
add(pw_aff pwaff2)11465 pw_aff pw_aff::add(pw_aff pwaff2) const
11466 {
11467 auto res = isl_pw_aff_add(copy(), pwaff2.release());
11468 return manage(res);
11469 }
11470
add_dims(isl::dim type,unsigned int n)11471 pw_aff pw_aff::add_dims(isl::dim type, unsigned int n) const
11472 {
11473 auto res = isl_pw_aff_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
11474 return manage(res);
11475 }
11476
align_params(space model)11477 pw_aff pw_aff::align_params(space model) const
11478 {
11479 auto res = isl_pw_aff_align_params(copy(), model.release());
11480 return manage(res);
11481 }
11482
alloc(set set,aff aff)11483 pw_aff pw_aff::alloc(set set, aff aff)
11484 {
11485 auto res = isl_pw_aff_alloc(set.release(), aff.release());
11486 return manage(res);
11487 }
11488
ceil()11489 pw_aff pw_aff::ceil() const
11490 {
11491 auto res = isl_pw_aff_ceil(copy());
11492 return manage(res);
11493 }
11494
coalesce()11495 pw_aff pw_aff::coalesce() const
11496 {
11497 auto res = isl_pw_aff_coalesce(copy());
11498 return manage(res);
11499 }
11500
cond(pw_aff pwaff_true,pw_aff pwaff_false)11501 pw_aff pw_aff::cond(pw_aff pwaff_true, pw_aff pwaff_false) const
11502 {
11503 auto res = isl_pw_aff_cond(copy(), pwaff_true.release(), pwaff_false.release());
11504 return manage(res);
11505 }
11506
dim(isl::dim type)11507 unsigned int pw_aff::dim(isl::dim type) const
11508 {
11509 auto res = isl_pw_aff_dim(get(), static_cast<enum isl_dim_type>(type));
11510 return res;
11511 }
11512
div(pw_aff pa2)11513 pw_aff pw_aff::div(pw_aff pa2) const
11514 {
11515 auto res = isl_pw_aff_div(copy(), pa2.release());
11516 return manage(res);
11517 }
11518
domain()11519 set pw_aff::domain() const
11520 {
11521 auto res = isl_pw_aff_domain(copy());
11522 return manage(res);
11523 }
11524
drop_dims(isl::dim type,unsigned int first,unsigned int n)11525 pw_aff pw_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
11526 {
11527 auto res = isl_pw_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
11528 return manage(res);
11529 }
11530
drop_unused_params()11531 pw_aff pw_aff::drop_unused_params() const
11532 {
11533 auto res = isl_pw_aff_drop_unused_params(copy());
11534 return manage(res);
11535 }
11536
empty(space dim)11537 pw_aff pw_aff::empty(space dim)
11538 {
11539 auto res = isl_pw_aff_empty(dim.release());
11540 return manage(res);
11541 }
11542
eq_map(pw_aff pa2)11543 map pw_aff::eq_map(pw_aff pa2) const
11544 {
11545 auto res = isl_pw_aff_eq_map(copy(), pa2.release());
11546 return manage(res);
11547 }
11548
eq_set(pw_aff pwaff2)11549 set pw_aff::eq_set(pw_aff pwaff2) const
11550 {
11551 auto res = isl_pw_aff_eq_set(copy(), pwaff2.release());
11552 return manage(res);
11553 }
11554
eval(point pnt)11555 val pw_aff::eval(point pnt) const
11556 {
11557 auto res = isl_pw_aff_eval(copy(), pnt.release());
11558 return manage(res);
11559 }
11560
find_dim_by_name(isl::dim type,const std::string & name)11561 int pw_aff::find_dim_by_name(isl::dim type, const std::string &name) const
11562 {
11563 auto res = isl_pw_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
11564 return res;
11565 }
11566
floor()11567 pw_aff pw_aff::floor() const
11568 {
11569 auto res = isl_pw_aff_floor(copy());
11570 return manage(res);
11571 }
11572
foreach_piece(const std::function<stat (set,aff)> & fn)11573 stat pw_aff::foreach_piece(const std::function<stat(set, aff)> &fn) const
11574 {
11575 struct fn_data {
11576 const std::function<stat(set, aff)> *func;
11577 } fn_data = { &fn };
11578 auto fn_lambda = [](isl_set *arg_0, isl_aff *arg_1, void *arg_2) -> isl_stat {
11579 auto *data = static_cast<struct fn_data *>(arg_2);
11580 stat ret = (*data->func)(manage(arg_0), manage(arg_1));
11581 return ret.release();
11582 };
11583 auto res = isl_pw_aff_foreach_piece(get(), fn_lambda, &fn_data);
11584 return manage(res);
11585 }
11586
from_range()11587 pw_aff pw_aff::from_range() const
11588 {
11589 auto res = isl_pw_aff_from_range(copy());
11590 return manage(res);
11591 }
11592
ge_set(pw_aff pwaff2)11593 set pw_aff::ge_set(pw_aff pwaff2) const
11594 {
11595 auto res = isl_pw_aff_ge_set(copy(), pwaff2.release());
11596 return manage(res);
11597 }
11598
get_dim_id(isl::dim type,unsigned int pos)11599 id pw_aff::get_dim_id(isl::dim type, unsigned int pos) const
11600 {
11601 auto res = isl_pw_aff_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
11602 return manage(res);
11603 }
11604
get_dim_name(isl::dim type,unsigned int pos)11605 std::string pw_aff::get_dim_name(isl::dim type, unsigned int pos) const
11606 {
11607 auto res = isl_pw_aff_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
11608 std::string tmp(res);
11609 return tmp;
11610 }
11611
get_domain_space()11612 space pw_aff::get_domain_space() const
11613 {
11614 auto res = isl_pw_aff_get_domain_space(get());
11615 return manage(res);
11616 }
11617
get_hash()11618 uint32_t pw_aff::get_hash() const
11619 {
11620 auto res = isl_pw_aff_get_hash(get());
11621 return res;
11622 }
11623
get_space()11624 space pw_aff::get_space() const
11625 {
11626 auto res = isl_pw_aff_get_space(get());
11627 return manage(res);
11628 }
11629
get_tuple_id(isl::dim type)11630 id pw_aff::get_tuple_id(isl::dim type) const
11631 {
11632 auto res = isl_pw_aff_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
11633 return manage(res);
11634 }
11635
gist(set context)11636 pw_aff pw_aff::gist(set context) const
11637 {
11638 auto res = isl_pw_aff_gist(copy(), context.release());
11639 return manage(res);
11640 }
11641
gist_params(set context)11642 pw_aff pw_aff::gist_params(set context) const
11643 {
11644 auto res = isl_pw_aff_gist_params(copy(), context.release());
11645 return manage(res);
11646 }
11647
gt_map(pw_aff pa2)11648 map pw_aff::gt_map(pw_aff pa2) const
11649 {
11650 auto res = isl_pw_aff_gt_map(copy(), pa2.release());
11651 return manage(res);
11652 }
11653
gt_set(pw_aff pwaff2)11654 set pw_aff::gt_set(pw_aff pwaff2) const
11655 {
11656 auto res = isl_pw_aff_gt_set(copy(), pwaff2.release());
11657 return manage(res);
11658 }
11659
has_dim_id(isl::dim type,unsigned int pos)11660 boolean pw_aff::has_dim_id(isl::dim type, unsigned int pos) const
11661 {
11662 auto res = isl_pw_aff_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
11663 return manage(res);
11664 }
11665
has_tuple_id(isl::dim type)11666 boolean pw_aff::has_tuple_id(isl::dim type) const
11667 {
11668 auto res = isl_pw_aff_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
11669 return manage(res);
11670 }
11671
insert_dims(isl::dim type,unsigned int first,unsigned int n)11672 pw_aff pw_aff::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
11673 {
11674 auto res = isl_pw_aff_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
11675 return manage(res);
11676 }
11677
intersect_domain(set set)11678 pw_aff pw_aff::intersect_domain(set set) const
11679 {
11680 auto res = isl_pw_aff_intersect_domain(copy(), set.release());
11681 return manage(res);
11682 }
11683
intersect_params(set set)11684 pw_aff pw_aff::intersect_params(set set) const
11685 {
11686 auto res = isl_pw_aff_intersect_params(copy(), set.release());
11687 return manage(res);
11688 }
11689
involves_dims(isl::dim type,unsigned int first,unsigned int n)11690 boolean pw_aff::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
11691 {
11692 auto res = isl_pw_aff_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
11693 return manage(res);
11694 }
11695
involves_nan()11696 boolean pw_aff::involves_nan() const
11697 {
11698 auto res = isl_pw_aff_involves_nan(get());
11699 return manage(res);
11700 }
11701
is_cst()11702 boolean pw_aff::is_cst() const
11703 {
11704 auto res = isl_pw_aff_is_cst(get());
11705 return manage(res);
11706 }
11707
is_empty()11708 boolean pw_aff::is_empty() const
11709 {
11710 auto res = isl_pw_aff_is_empty(get());
11711 return manage(res);
11712 }
11713
is_equal(const pw_aff & pa2)11714 boolean pw_aff::is_equal(const pw_aff &pa2) const
11715 {
11716 auto res = isl_pw_aff_is_equal(get(), pa2.get());
11717 return manage(res);
11718 }
11719
le_set(pw_aff pwaff2)11720 set pw_aff::le_set(pw_aff pwaff2) const
11721 {
11722 auto res = isl_pw_aff_le_set(copy(), pwaff2.release());
11723 return manage(res);
11724 }
11725
lt_map(pw_aff pa2)11726 map pw_aff::lt_map(pw_aff pa2) const
11727 {
11728 auto res = isl_pw_aff_lt_map(copy(), pa2.release());
11729 return manage(res);
11730 }
11731
lt_set(pw_aff pwaff2)11732 set pw_aff::lt_set(pw_aff pwaff2) const
11733 {
11734 auto res = isl_pw_aff_lt_set(copy(), pwaff2.release());
11735 return manage(res);
11736 }
11737
max(pw_aff pwaff2)11738 pw_aff pw_aff::max(pw_aff pwaff2) const
11739 {
11740 auto res = isl_pw_aff_max(copy(), pwaff2.release());
11741 return manage(res);
11742 }
11743
min(pw_aff pwaff2)11744 pw_aff pw_aff::min(pw_aff pwaff2) const
11745 {
11746 auto res = isl_pw_aff_min(copy(), pwaff2.release());
11747 return manage(res);
11748 }
11749
mod(val mod)11750 pw_aff pw_aff::mod(val mod) const
11751 {
11752 auto res = isl_pw_aff_mod_val(copy(), mod.release());
11753 return manage(res);
11754 }
11755
move_dims(isl::dim dst_type,unsigned int dst_pos,isl::dim src_type,unsigned int src_pos,unsigned int n)11756 pw_aff pw_aff::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
11757 {
11758 auto res = isl_pw_aff_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
11759 return manage(res);
11760 }
11761
mul(pw_aff pwaff2)11762 pw_aff pw_aff::mul(pw_aff pwaff2) const
11763 {
11764 auto res = isl_pw_aff_mul(copy(), pwaff2.release());
11765 return manage(res);
11766 }
11767
n_piece()11768 int pw_aff::n_piece() const
11769 {
11770 auto res = isl_pw_aff_n_piece(get());
11771 return res;
11772 }
11773
nan_on_domain(local_space ls)11774 pw_aff pw_aff::nan_on_domain(local_space ls)
11775 {
11776 auto res = isl_pw_aff_nan_on_domain(ls.release());
11777 return manage(res);
11778 }
11779
ne_set(pw_aff pwaff2)11780 set pw_aff::ne_set(pw_aff pwaff2) const
11781 {
11782 auto res = isl_pw_aff_ne_set(copy(), pwaff2.release());
11783 return manage(res);
11784 }
11785
neg()11786 pw_aff pw_aff::neg() const
11787 {
11788 auto res = isl_pw_aff_neg(copy());
11789 return manage(res);
11790 }
11791
non_zero_set()11792 set pw_aff::non_zero_set() const
11793 {
11794 auto res = isl_pw_aff_non_zero_set(copy());
11795 return manage(res);
11796 }
11797
nonneg_set()11798 set pw_aff::nonneg_set() const
11799 {
11800 auto res = isl_pw_aff_nonneg_set(copy());
11801 return manage(res);
11802 }
11803
params()11804 set pw_aff::params() const
11805 {
11806 auto res = isl_pw_aff_params(copy());
11807 return manage(res);
11808 }
11809
plain_cmp(const pw_aff & pa2)11810 int pw_aff::plain_cmp(const pw_aff &pa2) const
11811 {
11812 auto res = isl_pw_aff_plain_cmp(get(), pa2.get());
11813 return res;
11814 }
11815
plain_is_equal(const pw_aff & pwaff2)11816 boolean pw_aff::plain_is_equal(const pw_aff &pwaff2) const
11817 {
11818 auto res = isl_pw_aff_plain_is_equal(get(), pwaff2.get());
11819 return manage(res);
11820 }
11821
pos_set()11822 set pw_aff::pos_set() const
11823 {
11824 auto res = isl_pw_aff_pos_set(copy());
11825 return manage(res);
11826 }
11827
project_domain_on_params()11828 pw_aff pw_aff::project_domain_on_params() const
11829 {
11830 auto res = isl_pw_aff_project_domain_on_params(copy());
11831 return manage(res);
11832 }
11833
pullback(multi_aff ma)11834 pw_aff pw_aff::pullback(multi_aff ma) const
11835 {
11836 auto res = isl_pw_aff_pullback_multi_aff(copy(), ma.release());
11837 return manage(res);
11838 }
11839
pullback(pw_multi_aff pma)11840 pw_aff pw_aff::pullback(pw_multi_aff pma) const
11841 {
11842 auto res = isl_pw_aff_pullback_pw_multi_aff(copy(), pma.release());
11843 return manage(res);
11844 }
11845
pullback(multi_pw_aff mpa)11846 pw_aff pw_aff::pullback(multi_pw_aff mpa) const
11847 {
11848 auto res = isl_pw_aff_pullback_multi_pw_aff(copy(), mpa.release());
11849 return manage(res);
11850 }
11851
reset_tuple_id(isl::dim type)11852 pw_aff pw_aff::reset_tuple_id(isl::dim type) const
11853 {
11854 auto res = isl_pw_aff_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
11855 return manage(res);
11856 }
11857
reset_user()11858 pw_aff pw_aff::reset_user() const
11859 {
11860 auto res = isl_pw_aff_reset_user(copy());
11861 return manage(res);
11862 }
11863
scale(val v)11864 pw_aff pw_aff::scale(val v) const
11865 {
11866 auto res = isl_pw_aff_scale_val(copy(), v.release());
11867 return manage(res);
11868 }
11869
scale_down(val f)11870 pw_aff pw_aff::scale_down(val f) const
11871 {
11872 auto res = isl_pw_aff_scale_down_val(copy(), f.release());
11873 return manage(res);
11874 }
11875
set_dim_id(isl::dim type,unsigned int pos,id id)11876 pw_aff pw_aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
11877 {
11878 auto res = isl_pw_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
11879 return manage(res);
11880 }
11881
set_tuple_id(isl::dim type,id id)11882 pw_aff pw_aff::set_tuple_id(isl::dim type, id id) const
11883 {
11884 auto res = isl_pw_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
11885 return manage(res);
11886 }
11887
sub(pw_aff pwaff2)11888 pw_aff pw_aff::sub(pw_aff pwaff2) const
11889 {
11890 auto res = isl_pw_aff_sub(copy(), pwaff2.release());
11891 return manage(res);
11892 }
11893
subtract_domain(set set)11894 pw_aff pw_aff::subtract_domain(set set) const
11895 {
11896 auto res = isl_pw_aff_subtract_domain(copy(), set.release());
11897 return manage(res);
11898 }
11899
tdiv_q(pw_aff pa2)11900 pw_aff pw_aff::tdiv_q(pw_aff pa2) const
11901 {
11902 auto res = isl_pw_aff_tdiv_q(copy(), pa2.release());
11903 return manage(res);
11904 }
11905
tdiv_r(pw_aff pa2)11906 pw_aff pw_aff::tdiv_r(pw_aff pa2) const
11907 {
11908 auto res = isl_pw_aff_tdiv_r(copy(), pa2.release());
11909 return manage(res);
11910 }
11911
union_add(pw_aff pwaff2)11912 pw_aff pw_aff::union_add(pw_aff pwaff2) const
11913 {
11914 auto res = isl_pw_aff_union_add(copy(), pwaff2.release());
11915 return manage(res);
11916 }
11917
union_max(pw_aff pwaff2)11918 pw_aff pw_aff::union_max(pw_aff pwaff2) const
11919 {
11920 auto res = isl_pw_aff_union_max(copy(), pwaff2.release());
11921 return manage(res);
11922 }
11923
union_min(pw_aff pwaff2)11924 pw_aff pw_aff::union_min(pw_aff pwaff2) const
11925 {
11926 auto res = isl_pw_aff_union_min(copy(), pwaff2.release());
11927 return manage(res);
11928 }
11929
var_on_domain(local_space ls,isl::dim type,unsigned int pos)11930 pw_aff pw_aff::var_on_domain(local_space ls, isl::dim type, unsigned int pos)
11931 {
11932 auto res = isl_pw_aff_var_on_domain(ls.release(), static_cast<enum isl_dim_type>(type), pos);
11933 return manage(res);
11934 }
11935
zero_set()11936 set pw_aff::zero_set() const
11937 {
11938 auto res = isl_pw_aff_zero_set(copy());
11939 return manage(res);
11940 }
11941
11942 // implementations for isl::pw_aff_list
manage(__isl_take isl_pw_aff_list * ptr)11943 pw_aff_list manage(__isl_take isl_pw_aff_list *ptr) {
11944 return pw_aff_list(ptr);
11945 }
manage_copy(__isl_keep isl_pw_aff_list * ptr)11946 pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr) {
11947 ptr = isl_pw_aff_list_copy(ptr);
11948 return pw_aff_list(ptr);
11949 }
11950
pw_aff_list()11951 pw_aff_list::pw_aff_list()
11952 : ptr(nullptr) {}
11953
pw_aff_list(const pw_aff_list & obj)11954 pw_aff_list::pw_aff_list(const pw_aff_list &obj)
11955 : ptr(nullptr)
11956 {
11957 ptr = obj.copy();
11958 }
pw_aff_list(std::nullptr_t)11959 pw_aff_list::pw_aff_list(std::nullptr_t)
11960 : ptr(nullptr) {}
11961
11962
pw_aff_list(__isl_take isl_pw_aff_list * ptr)11963 pw_aff_list::pw_aff_list(__isl_take isl_pw_aff_list *ptr)
11964 : ptr(ptr) {}
11965
11966
11967 pw_aff_list &pw_aff_list::operator=(pw_aff_list obj) {
11968 std::swap(this->ptr, obj.ptr);
11969 return *this;
11970 }
11971
~pw_aff_list()11972 pw_aff_list::~pw_aff_list() {
11973 if (ptr)
11974 isl_pw_aff_list_free(ptr);
11975 }
11976
copy()11977 __isl_give isl_pw_aff_list *pw_aff_list::copy() const & {
11978 return isl_pw_aff_list_copy(ptr);
11979 }
11980
get()11981 __isl_keep isl_pw_aff_list *pw_aff_list::get() const {
11982 return ptr;
11983 }
11984
release()11985 __isl_give isl_pw_aff_list *pw_aff_list::release() {
11986 isl_pw_aff_list *tmp = ptr;
11987 ptr = nullptr;
11988 return tmp;
11989 }
11990
is_null()11991 bool pw_aff_list::is_null() const {
11992 return ptr == nullptr;
11993 }
11994 pw_aff_list::operator bool() const {
11995 return !is_null();
11996 }
11997
11998
get_ctx()11999 ctx pw_aff_list::get_ctx() const {
12000 return ctx(isl_pw_aff_list_get_ctx(ptr));
12001 }
12002
dump()12003 void pw_aff_list::dump() const {
12004 isl_pw_aff_list_dump(get());
12005 }
12006
12007
add(pw_aff el)12008 pw_aff_list pw_aff_list::add(pw_aff el) const
12009 {
12010 auto res = isl_pw_aff_list_add(copy(), el.release());
12011 return manage(res);
12012 }
12013
alloc(ctx ctx,int n)12014 pw_aff_list pw_aff_list::alloc(ctx ctx, int n)
12015 {
12016 auto res = isl_pw_aff_list_alloc(ctx.release(), n);
12017 return manage(res);
12018 }
12019
concat(pw_aff_list list2)12020 pw_aff_list pw_aff_list::concat(pw_aff_list list2) const
12021 {
12022 auto res = isl_pw_aff_list_concat(copy(), list2.release());
12023 return manage(res);
12024 }
12025
drop(unsigned int first,unsigned int n)12026 pw_aff_list pw_aff_list::drop(unsigned int first, unsigned int n) const
12027 {
12028 auto res = isl_pw_aff_list_drop(copy(), first, n);
12029 return manage(res);
12030 }
12031
eq_set(pw_aff_list list2)12032 set pw_aff_list::eq_set(pw_aff_list list2) const
12033 {
12034 auto res = isl_pw_aff_list_eq_set(copy(), list2.release());
12035 return manage(res);
12036 }
12037
foreach(const std::function<stat (pw_aff)> & fn)12038 stat pw_aff_list::foreach(const std::function<stat(pw_aff)> &fn) const
12039 {
12040 struct fn_data {
12041 const std::function<stat(pw_aff)> *func;
12042 } fn_data = { &fn };
12043 auto fn_lambda = [](isl_pw_aff *arg_0, void *arg_1) -> isl_stat {
12044 auto *data = static_cast<struct fn_data *>(arg_1);
12045 stat ret = (*data->func)(manage(arg_0));
12046 return ret.release();
12047 };
12048 auto res = isl_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
12049 return manage(res);
12050 }
12051
from_pw_aff(pw_aff el)12052 pw_aff_list pw_aff_list::from_pw_aff(pw_aff el)
12053 {
12054 auto res = isl_pw_aff_list_from_pw_aff(el.release());
12055 return manage(res);
12056 }
12057
ge_set(pw_aff_list list2)12058 set pw_aff_list::ge_set(pw_aff_list list2) const
12059 {
12060 auto res = isl_pw_aff_list_ge_set(copy(), list2.release());
12061 return manage(res);
12062 }
12063
get_at(int index)12064 pw_aff pw_aff_list::get_at(int index) const
12065 {
12066 auto res = isl_pw_aff_list_get_at(get(), index);
12067 return manage(res);
12068 }
12069
get_pw_aff(int index)12070 pw_aff pw_aff_list::get_pw_aff(int index) const
12071 {
12072 auto res = isl_pw_aff_list_get_pw_aff(get(), index);
12073 return manage(res);
12074 }
12075
gt_set(pw_aff_list list2)12076 set pw_aff_list::gt_set(pw_aff_list list2) const
12077 {
12078 auto res = isl_pw_aff_list_gt_set(copy(), list2.release());
12079 return manage(res);
12080 }
12081
insert(unsigned int pos,pw_aff el)12082 pw_aff_list pw_aff_list::insert(unsigned int pos, pw_aff el) const
12083 {
12084 auto res = isl_pw_aff_list_insert(copy(), pos, el.release());
12085 return manage(res);
12086 }
12087
le_set(pw_aff_list list2)12088 set pw_aff_list::le_set(pw_aff_list list2) const
12089 {
12090 auto res = isl_pw_aff_list_le_set(copy(), list2.release());
12091 return manage(res);
12092 }
12093
lt_set(pw_aff_list list2)12094 set pw_aff_list::lt_set(pw_aff_list list2) const
12095 {
12096 auto res = isl_pw_aff_list_lt_set(copy(), list2.release());
12097 return manage(res);
12098 }
12099
max()12100 pw_aff pw_aff_list::max() const
12101 {
12102 auto res = isl_pw_aff_list_max(copy());
12103 return manage(res);
12104 }
12105
min()12106 pw_aff pw_aff_list::min() const
12107 {
12108 auto res = isl_pw_aff_list_min(copy());
12109 return manage(res);
12110 }
12111
n_pw_aff()12112 int pw_aff_list::n_pw_aff() const
12113 {
12114 auto res = isl_pw_aff_list_n_pw_aff(get());
12115 return res;
12116 }
12117
ne_set(pw_aff_list list2)12118 set pw_aff_list::ne_set(pw_aff_list list2) const
12119 {
12120 auto res = isl_pw_aff_list_ne_set(copy(), list2.release());
12121 return manage(res);
12122 }
12123
reverse()12124 pw_aff_list pw_aff_list::reverse() const
12125 {
12126 auto res = isl_pw_aff_list_reverse(copy());
12127 return manage(res);
12128 }
12129
set_pw_aff(int index,pw_aff el)12130 pw_aff_list pw_aff_list::set_pw_aff(int index, pw_aff el) const
12131 {
12132 auto res = isl_pw_aff_list_set_pw_aff(copy(), index, el.release());
12133 return manage(res);
12134 }
12135
size()12136 int pw_aff_list::size() const
12137 {
12138 auto res = isl_pw_aff_list_size(get());
12139 return res;
12140 }
12141
swap(unsigned int pos1,unsigned int pos2)12142 pw_aff_list pw_aff_list::swap(unsigned int pos1, unsigned int pos2) const
12143 {
12144 auto res = isl_pw_aff_list_swap(copy(), pos1, pos2);
12145 return manage(res);
12146 }
12147
12148 // implementations for isl::pw_multi_aff
manage(__isl_take isl_pw_multi_aff * ptr)12149 pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr) {
12150 return pw_multi_aff(ptr);
12151 }
manage_copy(__isl_keep isl_pw_multi_aff * ptr)12152 pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr) {
12153 ptr = isl_pw_multi_aff_copy(ptr);
12154 return pw_multi_aff(ptr);
12155 }
12156
pw_multi_aff()12157 pw_multi_aff::pw_multi_aff()
12158 : ptr(nullptr) {}
12159
pw_multi_aff(const pw_multi_aff & obj)12160 pw_multi_aff::pw_multi_aff(const pw_multi_aff &obj)
12161 : ptr(nullptr)
12162 {
12163 ptr = obj.copy();
12164 }
pw_multi_aff(std::nullptr_t)12165 pw_multi_aff::pw_multi_aff(std::nullptr_t)
12166 : ptr(nullptr) {}
12167
12168
pw_multi_aff(__isl_take isl_pw_multi_aff * ptr)12169 pw_multi_aff::pw_multi_aff(__isl_take isl_pw_multi_aff *ptr)
12170 : ptr(ptr) {}
12171
pw_multi_aff(multi_aff ma)12172 pw_multi_aff::pw_multi_aff(multi_aff ma)
12173 {
12174 auto res = isl_pw_multi_aff_from_multi_aff(ma.release());
12175 ptr = res;
12176 }
pw_multi_aff(pw_aff pa)12177 pw_multi_aff::pw_multi_aff(pw_aff pa)
12178 {
12179 auto res = isl_pw_multi_aff_from_pw_aff(pa.release());
12180 ptr = res;
12181 }
pw_multi_aff(ctx ctx,const std::string & str)12182 pw_multi_aff::pw_multi_aff(ctx ctx, const std::string &str)
12183 {
12184 auto res = isl_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
12185 ptr = res;
12186 }
12187
12188 pw_multi_aff &pw_multi_aff::operator=(pw_multi_aff obj) {
12189 std::swap(this->ptr, obj.ptr);
12190 return *this;
12191 }
12192
~pw_multi_aff()12193 pw_multi_aff::~pw_multi_aff() {
12194 if (ptr)
12195 isl_pw_multi_aff_free(ptr);
12196 }
12197
copy()12198 __isl_give isl_pw_multi_aff *pw_multi_aff::copy() const & {
12199 return isl_pw_multi_aff_copy(ptr);
12200 }
12201
get()12202 __isl_keep isl_pw_multi_aff *pw_multi_aff::get() const {
12203 return ptr;
12204 }
12205
release()12206 __isl_give isl_pw_multi_aff *pw_multi_aff::release() {
12207 isl_pw_multi_aff *tmp = ptr;
12208 ptr = nullptr;
12209 return tmp;
12210 }
12211
is_null()12212 bool pw_multi_aff::is_null() const {
12213 return ptr == nullptr;
12214 }
12215 pw_multi_aff::operator bool() const {
12216 return !is_null();
12217 }
12218
12219
get_ctx()12220 ctx pw_multi_aff::get_ctx() const {
12221 return ctx(isl_pw_multi_aff_get_ctx(ptr));
12222 }
to_str()12223 std::string pw_multi_aff::to_str() const {
12224 char *Tmp = isl_pw_multi_aff_to_str(get());
12225 if (!Tmp)
12226 return "";
12227 std::string S(Tmp);
12228 free(Tmp);
12229 return S;
12230 }
12231
12232
dump()12233 void pw_multi_aff::dump() const {
12234 isl_pw_multi_aff_dump(get());
12235 }
12236
12237
add(pw_multi_aff pma2)12238 pw_multi_aff pw_multi_aff::add(pw_multi_aff pma2) const
12239 {
12240 auto res = isl_pw_multi_aff_add(copy(), pma2.release());
12241 return manage(res);
12242 }
12243
align_params(space model)12244 pw_multi_aff pw_multi_aff::align_params(space model) const
12245 {
12246 auto res = isl_pw_multi_aff_align_params(copy(), model.release());
12247 return manage(res);
12248 }
12249
alloc(set set,multi_aff maff)12250 pw_multi_aff pw_multi_aff::alloc(set set, multi_aff maff)
12251 {
12252 auto res = isl_pw_multi_aff_alloc(set.release(), maff.release());
12253 return manage(res);
12254 }
12255
coalesce()12256 pw_multi_aff pw_multi_aff::coalesce() const
12257 {
12258 auto res = isl_pw_multi_aff_coalesce(copy());
12259 return manage(res);
12260 }
12261
dim(isl::dim type)12262 unsigned int pw_multi_aff::dim(isl::dim type) const
12263 {
12264 auto res = isl_pw_multi_aff_dim(get(), static_cast<enum isl_dim_type>(type));
12265 return res;
12266 }
12267
domain()12268 set pw_multi_aff::domain() const
12269 {
12270 auto res = isl_pw_multi_aff_domain(copy());
12271 return manage(res);
12272 }
12273
drop_dims(isl::dim type,unsigned int first,unsigned int n)12274 pw_multi_aff pw_multi_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
12275 {
12276 auto res = isl_pw_multi_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
12277 return manage(res);
12278 }
12279
drop_unused_params()12280 pw_multi_aff pw_multi_aff::drop_unused_params() const
12281 {
12282 auto res = isl_pw_multi_aff_drop_unused_params(copy());
12283 return manage(res);
12284 }
12285
empty(space space)12286 pw_multi_aff pw_multi_aff::empty(space space)
12287 {
12288 auto res = isl_pw_multi_aff_empty(space.release());
12289 return manage(res);
12290 }
12291
find_dim_by_name(isl::dim type,const std::string & name)12292 int pw_multi_aff::find_dim_by_name(isl::dim type, const std::string &name) const
12293 {
12294 auto res = isl_pw_multi_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
12295 return res;
12296 }
12297
fix_si(isl::dim type,unsigned int pos,int value)12298 pw_multi_aff pw_multi_aff::fix_si(isl::dim type, unsigned int pos, int value) const
12299 {
12300 auto res = isl_pw_multi_aff_fix_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
12301 return manage(res);
12302 }
12303
flat_range_product(pw_multi_aff pma2)12304 pw_multi_aff pw_multi_aff::flat_range_product(pw_multi_aff pma2) const
12305 {
12306 auto res = isl_pw_multi_aff_flat_range_product(copy(), pma2.release());
12307 return manage(res);
12308 }
12309
foreach_piece(const std::function<stat (set,multi_aff)> & fn)12310 stat pw_multi_aff::foreach_piece(const std::function<stat(set, multi_aff)> &fn) const
12311 {
12312 struct fn_data {
12313 const std::function<stat(set, multi_aff)> *func;
12314 } fn_data = { &fn };
12315 auto fn_lambda = [](isl_set *arg_0, isl_multi_aff *arg_1, void *arg_2) -> isl_stat {
12316 auto *data = static_cast<struct fn_data *>(arg_2);
12317 stat ret = (*data->func)(manage(arg_0), manage(arg_1));
12318 return ret.release();
12319 };
12320 auto res = isl_pw_multi_aff_foreach_piece(get(), fn_lambda, &fn_data);
12321 return manage(res);
12322 }
12323
from_domain(set set)12324 pw_multi_aff pw_multi_aff::from_domain(set set)
12325 {
12326 auto res = isl_pw_multi_aff_from_domain(set.release());
12327 return manage(res);
12328 }
12329
from_map(map map)12330 pw_multi_aff pw_multi_aff::from_map(map map)
12331 {
12332 auto res = isl_pw_multi_aff_from_map(map.release());
12333 return manage(res);
12334 }
12335
from_multi_pw_aff(multi_pw_aff mpa)12336 pw_multi_aff pw_multi_aff::from_multi_pw_aff(multi_pw_aff mpa)
12337 {
12338 auto res = isl_pw_multi_aff_from_multi_pw_aff(mpa.release());
12339 return manage(res);
12340 }
12341
from_set(set set)12342 pw_multi_aff pw_multi_aff::from_set(set set)
12343 {
12344 auto res = isl_pw_multi_aff_from_set(set.release());
12345 return manage(res);
12346 }
12347
get_dim_id(isl::dim type,unsigned int pos)12348 id pw_multi_aff::get_dim_id(isl::dim type, unsigned int pos) const
12349 {
12350 auto res = isl_pw_multi_aff_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
12351 return manage(res);
12352 }
12353
get_dim_name(isl::dim type,unsigned int pos)12354 std::string pw_multi_aff::get_dim_name(isl::dim type, unsigned int pos) const
12355 {
12356 auto res = isl_pw_multi_aff_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
12357 std::string tmp(res);
12358 return tmp;
12359 }
12360
get_domain_space()12361 space pw_multi_aff::get_domain_space() const
12362 {
12363 auto res = isl_pw_multi_aff_get_domain_space(get());
12364 return manage(res);
12365 }
12366
get_pw_aff(int pos)12367 pw_aff pw_multi_aff::get_pw_aff(int pos) const
12368 {
12369 auto res = isl_pw_multi_aff_get_pw_aff(get(), pos);
12370 return manage(res);
12371 }
12372
get_space()12373 space pw_multi_aff::get_space() const
12374 {
12375 auto res = isl_pw_multi_aff_get_space(get());
12376 return manage(res);
12377 }
12378
get_tuple_id(isl::dim type)12379 id pw_multi_aff::get_tuple_id(isl::dim type) const
12380 {
12381 auto res = isl_pw_multi_aff_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
12382 return manage(res);
12383 }
12384
get_tuple_name(isl::dim type)12385 std::string pw_multi_aff::get_tuple_name(isl::dim type) const
12386 {
12387 auto res = isl_pw_multi_aff_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
12388 std::string tmp(res);
12389 return tmp;
12390 }
12391
gist(set set)12392 pw_multi_aff pw_multi_aff::gist(set set) const
12393 {
12394 auto res = isl_pw_multi_aff_gist(copy(), set.release());
12395 return manage(res);
12396 }
12397
gist_params(set set)12398 pw_multi_aff pw_multi_aff::gist_params(set set) const
12399 {
12400 auto res = isl_pw_multi_aff_gist_params(copy(), set.release());
12401 return manage(res);
12402 }
12403
has_tuple_id(isl::dim type)12404 boolean pw_multi_aff::has_tuple_id(isl::dim type) const
12405 {
12406 auto res = isl_pw_multi_aff_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
12407 return manage(res);
12408 }
12409
has_tuple_name(isl::dim type)12410 boolean pw_multi_aff::has_tuple_name(isl::dim type) const
12411 {
12412 auto res = isl_pw_multi_aff_has_tuple_name(get(), static_cast<enum isl_dim_type>(type));
12413 return manage(res);
12414 }
12415
identity(space space)12416 pw_multi_aff pw_multi_aff::identity(space space)
12417 {
12418 auto res = isl_pw_multi_aff_identity(space.release());
12419 return manage(res);
12420 }
12421
intersect_domain(set set)12422 pw_multi_aff pw_multi_aff::intersect_domain(set set) const
12423 {
12424 auto res = isl_pw_multi_aff_intersect_domain(copy(), set.release());
12425 return manage(res);
12426 }
12427
intersect_params(set set)12428 pw_multi_aff pw_multi_aff::intersect_params(set set) const
12429 {
12430 auto res = isl_pw_multi_aff_intersect_params(copy(), set.release());
12431 return manage(res);
12432 }
12433
involves_dims(isl::dim type,unsigned int first,unsigned int n)12434 boolean pw_multi_aff::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
12435 {
12436 auto res = isl_pw_multi_aff_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
12437 return manage(res);
12438 }
12439
involves_nan()12440 boolean pw_multi_aff::involves_nan() const
12441 {
12442 auto res = isl_pw_multi_aff_involves_nan(get());
12443 return manage(res);
12444 }
12445
is_equal(const pw_multi_aff & pma2)12446 boolean pw_multi_aff::is_equal(const pw_multi_aff &pma2) const
12447 {
12448 auto res = isl_pw_multi_aff_is_equal(get(), pma2.get());
12449 return manage(res);
12450 }
12451
multi_val_on_domain(set domain,multi_val mv)12452 pw_multi_aff pw_multi_aff::multi_val_on_domain(set domain, multi_val mv)
12453 {
12454 auto res = isl_pw_multi_aff_multi_val_on_domain(domain.release(), mv.release());
12455 return manage(res);
12456 }
12457
n_piece()12458 int pw_multi_aff::n_piece() const
12459 {
12460 auto res = isl_pw_multi_aff_n_piece(get());
12461 return res;
12462 }
12463
neg()12464 pw_multi_aff pw_multi_aff::neg() const
12465 {
12466 auto res = isl_pw_multi_aff_neg(copy());
12467 return manage(res);
12468 }
12469
plain_is_equal(const pw_multi_aff & pma2)12470 boolean pw_multi_aff::plain_is_equal(const pw_multi_aff &pma2) const
12471 {
12472 auto res = isl_pw_multi_aff_plain_is_equal(get(), pma2.get());
12473 return manage(res);
12474 }
12475
product(pw_multi_aff pma2)12476 pw_multi_aff pw_multi_aff::product(pw_multi_aff pma2) const
12477 {
12478 auto res = isl_pw_multi_aff_product(copy(), pma2.release());
12479 return manage(res);
12480 }
12481
project_domain_on_params()12482 pw_multi_aff pw_multi_aff::project_domain_on_params() const
12483 {
12484 auto res = isl_pw_multi_aff_project_domain_on_params(copy());
12485 return manage(res);
12486 }
12487
project_out_map(space space,isl::dim type,unsigned int first,unsigned int n)12488 pw_multi_aff pw_multi_aff::project_out_map(space space, isl::dim type, unsigned int first, unsigned int n)
12489 {
12490 auto res = isl_pw_multi_aff_project_out_map(space.release(), static_cast<enum isl_dim_type>(type), first, n);
12491 return manage(res);
12492 }
12493
pullback(multi_aff ma)12494 pw_multi_aff pw_multi_aff::pullback(multi_aff ma) const
12495 {
12496 auto res = isl_pw_multi_aff_pullback_multi_aff(copy(), ma.release());
12497 return manage(res);
12498 }
12499
pullback(pw_multi_aff pma2)12500 pw_multi_aff pw_multi_aff::pullback(pw_multi_aff pma2) const
12501 {
12502 auto res = isl_pw_multi_aff_pullback_pw_multi_aff(copy(), pma2.release());
12503 return manage(res);
12504 }
12505
range_map(space space)12506 pw_multi_aff pw_multi_aff::range_map(space space)
12507 {
12508 auto res = isl_pw_multi_aff_range_map(space.release());
12509 return manage(res);
12510 }
12511
range_product(pw_multi_aff pma2)12512 pw_multi_aff pw_multi_aff::range_product(pw_multi_aff pma2) const
12513 {
12514 auto res = isl_pw_multi_aff_range_product(copy(), pma2.release());
12515 return manage(res);
12516 }
12517
reset_tuple_id(isl::dim type)12518 pw_multi_aff pw_multi_aff::reset_tuple_id(isl::dim type) const
12519 {
12520 auto res = isl_pw_multi_aff_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
12521 return manage(res);
12522 }
12523
reset_user()12524 pw_multi_aff pw_multi_aff::reset_user() const
12525 {
12526 auto res = isl_pw_multi_aff_reset_user(copy());
12527 return manage(res);
12528 }
12529
scale_down_val(val v)12530 pw_multi_aff pw_multi_aff::scale_down_val(val v) const
12531 {
12532 auto res = isl_pw_multi_aff_scale_down_val(copy(), v.release());
12533 return manage(res);
12534 }
12535
scale_multi_val(multi_val mv)12536 pw_multi_aff pw_multi_aff::scale_multi_val(multi_val mv) const
12537 {
12538 auto res = isl_pw_multi_aff_scale_multi_val(copy(), mv.release());
12539 return manage(res);
12540 }
12541
scale_val(val v)12542 pw_multi_aff pw_multi_aff::scale_val(val v) const
12543 {
12544 auto res = isl_pw_multi_aff_scale_val(copy(), v.release());
12545 return manage(res);
12546 }
12547
set_dim_id(isl::dim type,unsigned int pos,id id)12548 pw_multi_aff pw_multi_aff::set_dim_id(isl::dim type, unsigned int pos, id id) const
12549 {
12550 auto res = isl_pw_multi_aff_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
12551 return manage(res);
12552 }
12553
set_pw_aff(unsigned int pos,pw_aff pa)12554 pw_multi_aff pw_multi_aff::set_pw_aff(unsigned int pos, pw_aff pa) const
12555 {
12556 auto res = isl_pw_multi_aff_set_pw_aff(copy(), pos, pa.release());
12557 return manage(res);
12558 }
12559
set_tuple_id(isl::dim type,id id)12560 pw_multi_aff pw_multi_aff::set_tuple_id(isl::dim type, id id) const
12561 {
12562 auto res = isl_pw_multi_aff_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
12563 return manage(res);
12564 }
12565
sub(pw_multi_aff pma2)12566 pw_multi_aff pw_multi_aff::sub(pw_multi_aff pma2) const
12567 {
12568 auto res = isl_pw_multi_aff_sub(copy(), pma2.release());
12569 return manage(res);
12570 }
12571
subtract_domain(set set)12572 pw_multi_aff pw_multi_aff::subtract_domain(set set) const
12573 {
12574 auto res = isl_pw_multi_aff_subtract_domain(copy(), set.release());
12575 return manage(res);
12576 }
12577
union_add(pw_multi_aff pma2)12578 pw_multi_aff pw_multi_aff::union_add(pw_multi_aff pma2) const
12579 {
12580 auto res = isl_pw_multi_aff_union_add(copy(), pma2.release());
12581 return manage(res);
12582 }
12583
union_lexmax(pw_multi_aff pma2)12584 pw_multi_aff pw_multi_aff::union_lexmax(pw_multi_aff pma2) const
12585 {
12586 auto res = isl_pw_multi_aff_union_lexmax(copy(), pma2.release());
12587 return manage(res);
12588 }
12589
union_lexmin(pw_multi_aff pma2)12590 pw_multi_aff pw_multi_aff::union_lexmin(pw_multi_aff pma2) const
12591 {
12592 auto res = isl_pw_multi_aff_union_lexmin(copy(), pma2.release());
12593 return manage(res);
12594 }
12595
zero(space space)12596 pw_multi_aff pw_multi_aff::zero(space space)
12597 {
12598 auto res = isl_pw_multi_aff_zero(space.release());
12599 return manage(res);
12600 }
12601
12602 // implementations for isl::pw_multi_aff_list
manage(__isl_take isl_pw_multi_aff_list * ptr)12603 pw_multi_aff_list manage(__isl_take isl_pw_multi_aff_list *ptr) {
12604 return pw_multi_aff_list(ptr);
12605 }
manage_copy(__isl_keep isl_pw_multi_aff_list * ptr)12606 pw_multi_aff_list manage_copy(__isl_keep isl_pw_multi_aff_list *ptr) {
12607 ptr = isl_pw_multi_aff_list_copy(ptr);
12608 return pw_multi_aff_list(ptr);
12609 }
12610
pw_multi_aff_list()12611 pw_multi_aff_list::pw_multi_aff_list()
12612 : ptr(nullptr) {}
12613
pw_multi_aff_list(const pw_multi_aff_list & obj)12614 pw_multi_aff_list::pw_multi_aff_list(const pw_multi_aff_list &obj)
12615 : ptr(nullptr)
12616 {
12617 ptr = obj.copy();
12618 }
pw_multi_aff_list(std::nullptr_t)12619 pw_multi_aff_list::pw_multi_aff_list(std::nullptr_t)
12620 : ptr(nullptr) {}
12621
12622
pw_multi_aff_list(__isl_take isl_pw_multi_aff_list * ptr)12623 pw_multi_aff_list::pw_multi_aff_list(__isl_take isl_pw_multi_aff_list *ptr)
12624 : ptr(ptr) {}
12625
12626
12627 pw_multi_aff_list &pw_multi_aff_list::operator=(pw_multi_aff_list obj) {
12628 std::swap(this->ptr, obj.ptr);
12629 return *this;
12630 }
12631
~pw_multi_aff_list()12632 pw_multi_aff_list::~pw_multi_aff_list() {
12633 if (ptr)
12634 isl_pw_multi_aff_list_free(ptr);
12635 }
12636
copy()12637 __isl_give isl_pw_multi_aff_list *pw_multi_aff_list::copy() const & {
12638 return isl_pw_multi_aff_list_copy(ptr);
12639 }
12640
get()12641 __isl_keep isl_pw_multi_aff_list *pw_multi_aff_list::get() const {
12642 return ptr;
12643 }
12644
release()12645 __isl_give isl_pw_multi_aff_list *pw_multi_aff_list::release() {
12646 isl_pw_multi_aff_list *tmp = ptr;
12647 ptr = nullptr;
12648 return tmp;
12649 }
12650
is_null()12651 bool pw_multi_aff_list::is_null() const {
12652 return ptr == nullptr;
12653 }
12654 pw_multi_aff_list::operator bool() const {
12655 return !is_null();
12656 }
12657
12658
get_ctx()12659 ctx pw_multi_aff_list::get_ctx() const {
12660 return ctx(isl_pw_multi_aff_list_get_ctx(ptr));
12661 }
12662
dump()12663 void pw_multi_aff_list::dump() const {
12664 isl_pw_multi_aff_list_dump(get());
12665 }
12666
12667
add(pw_multi_aff el)12668 pw_multi_aff_list pw_multi_aff_list::add(pw_multi_aff el) const
12669 {
12670 auto res = isl_pw_multi_aff_list_add(copy(), el.release());
12671 return manage(res);
12672 }
12673
alloc(ctx ctx,int n)12674 pw_multi_aff_list pw_multi_aff_list::alloc(ctx ctx, int n)
12675 {
12676 auto res = isl_pw_multi_aff_list_alloc(ctx.release(), n);
12677 return manage(res);
12678 }
12679
concat(pw_multi_aff_list list2)12680 pw_multi_aff_list pw_multi_aff_list::concat(pw_multi_aff_list list2) const
12681 {
12682 auto res = isl_pw_multi_aff_list_concat(copy(), list2.release());
12683 return manage(res);
12684 }
12685
drop(unsigned int first,unsigned int n)12686 pw_multi_aff_list pw_multi_aff_list::drop(unsigned int first, unsigned int n) const
12687 {
12688 auto res = isl_pw_multi_aff_list_drop(copy(), first, n);
12689 return manage(res);
12690 }
12691
foreach(const std::function<stat (pw_multi_aff)> & fn)12692 stat pw_multi_aff_list::foreach(const std::function<stat(pw_multi_aff)> &fn) const
12693 {
12694 struct fn_data {
12695 const std::function<stat(pw_multi_aff)> *func;
12696 } fn_data = { &fn };
12697 auto fn_lambda = [](isl_pw_multi_aff *arg_0, void *arg_1) -> isl_stat {
12698 auto *data = static_cast<struct fn_data *>(arg_1);
12699 stat ret = (*data->func)(manage(arg_0));
12700 return ret.release();
12701 };
12702 auto res = isl_pw_multi_aff_list_foreach(get(), fn_lambda, &fn_data);
12703 return manage(res);
12704 }
12705
from_pw_multi_aff(pw_multi_aff el)12706 pw_multi_aff_list pw_multi_aff_list::from_pw_multi_aff(pw_multi_aff el)
12707 {
12708 auto res = isl_pw_multi_aff_list_from_pw_multi_aff(el.release());
12709 return manage(res);
12710 }
12711
get_at(int index)12712 pw_multi_aff pw_multi_aff_list::get_at(int index) const
12713 {
12714 auto res = isl_pw_multi_aff_list_get_at(get(), index);
12715 return manage(res);
12716 }
12717
get_pw_multi_aff(int index)12718 pw_multi_aff pw_multi_aff_list::get_pw_multi_aff(int index) const
12719 {
12720 auto res = isl_pw_multi_aff_list_get_pw_multi_aff(get(), index);
12721 return manage(res);
12722 }
12723
insert(unsigned int pos,pw_multi_aff el)12724 pw_multi_aff_list pw_multi_aff_list::insert(unsigned int pos, pw_multi_aff el) const
12725 {
12726 auto res = isl_pw_multi_aff_list_insert(copy(), pos, el.release());
12727 return manage(res);
12728 }
12729
n_pw_multi_aff()12730 int pw_multi_aff_list::n_pw_multi_aff() const
12731 {
12732 auto res = isl_pw_multi_aff_list_n_pw_multi_aff(get());
12733 return res;
12734 }
12735
reverse()12736 pw_multi_aff_list pw_multi_aff_list::reverse() const
12737 {
12738 auto res = isl_pw_multi_aff_list_reverse(copy());
12739 return manage(res);
12740 }
12741
set_pw_multi_aff(int index,pw_multi_aff el)12742 pw_multi_aff_list pw_multi_aff_list::set_pw_multi_aff(int index, pw_multi_aff el) const
12743 {
12744 auto res = isl_pw_multi_aff_list_set_pw_multi_aff(copy(), index, el.release());
12745 return manage(res);
12746 }
12747
size()12748 int pw_multi_aff_list::size() const
12749 {
12750 auto res = isl_pw_multi_aff_list_size(get());
12751 return res;
12752 }
12753
swap(unsigned int pos1,unsigned int pos2)12754 pw_multi_aff_list pw_multi_aff_list::swap(unsigned int pos1, unsigned int pos2) const
12755 {
12756 auto res = isl_pw_multi_aff_list_swap(copy(), pos1, pos2);
12757 return manage(res);
12758 }
12759
12760 // implementations for isl::pw_qpolynomial
manage(__isl_take isl_pw_qpolynomial * ptr)12761 pw_qpolynomial manage(__isl_take isl_pw_qpolynomial *ptr) {
12762 return pw_qpolynomial(ptr);
12763 }
manage_copy(__isl_keep isl_pw_qpolynomial * ptr)12764 pw_qpolynomial manage_copy(__isl_keep isl_pw_qpolynomial *ptr) {
12765 ptr = isl_pw_qpolynomial_copy(ptr);
12766 return pw_qpolynomial(ptr);
12767 }
12768
pw_qpolynomial()12769 pw_qpolynomial::pw_qpolynomial()
12770 : ptr(nullptr) {}
12771
pw_qpolynomial(const pw_qpolynomial & obj)12772 pw_qpolynomial::pw_qpolynomial(const pw_qpolynomial &obj)
12773 : ptr(nullptr)
12774 {
12775 ptr = obj.copy();
12776 }
pw_qpolynomial(std::nullptr_t)12777 pw_qpolynomial::pw_qpolynomial(std::nullptr_t)
12778 : ptr(nullptr) {}
12779
12780
pw_qpolynomial(__isl_take isl_pw_qpolynomial * ptr)12781 pw_qpolynomial::pw_qpolynomial(__isl_take isl_pw_qpolynomial *ptr)
12782 : ptr(ptr) {}
12783
pw_qpolynomial(ctx ctx,const std::string & str)12784 pw_qpolynomial::pw_qpolynomial(ctx ctx, const std::string &str)
12785 {
12786 auto res = isl_pw_qpolynomial_read_from_str(ctx.release(), str.c_str());
12787 ptr = res;
12788 }
12789
12790 pw_qpolynomial &pw_qpolynomial::operator=(pw_qpolynomial obj) {
12791 std::swap(this->ptr, obj.ptr);
12792 return *this;
12793 }
12794
~pw_qpolynomial()12795 pw_qpolynomial::~pw_qpolynomial() {
12796 if (ptr)
12797 isl_pw_qpolynomial_free(ptr);
12798 }
12799
copy()12800 __isl_give isl_pw_qpolynomial *pw_qpolynomial::copy() const & {
12801 return isl_pw_qpolynomial_copy(ptr);
12802 }
12803
get()12804 __isl_keep isl_pw_qpolynomial *pw_qpolynomial::get() const {
12805 return ptr;
12806 }
12807
release()12808 __isl_give isl_pw_qpolynomial *pw_qpolynomial::release() {
12809 isl_pw_qpolynomial *tmp = ptr;
12810 ptr = nullptr;
12811 return tmp;
12812 }
12813
is_null()12814 bool pw_qpolynomial::is_null() const {
12815 return ptr == nullptr;
12816 }
12817 pw_qpolynomial::operator bool() const {
12818 return !is_null();
12819 }
12820
12821
get_ctx()12822 ctx pw_qpolynomial::get_ctx() const {
12823 return ctx(isl_pw_qpolynomial_get_ctx(ptr));
12824 }
to_str()12825 std::string pw_qpolynomial::to_str() const {
12826 char *Tmp = isl_pw_qpolynomial_to_str(get());
12827 if (!Tmp)
12828 return "";
12829 std::string S(Tmp);
12830 free(Tmp);
12831 return S;
12832 }
12833
12834
dump()12835 void pw_qpolynomial::dump() const {
12836 isl_pw_qpolynomial_dump(get());
12837 }
12838
12839
add(pw_qpolynomial pwqp2)12840 pw_qpolynomial pw_qpolynomial::add(pw_qpolynomial pwqp2) const
12841 {
12842 auto res = isl_pw_qpolynomial_add(copy(), pwqp2.release());
12843 return manage(res);
12844 }
12845
add_dims(isl::dim type,unsigned int n)12846 pw_qpolynomial pw_qpolynomial::add_dims(isl::dim type, unsigned int n) const
12847 {
12848 auto res = isl_pw_qpolynomial_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
12849 return manage(res);
12850 }
12851
alloc(set set,qpolynomial qp)12852 pw_qpolynomial pw_qpolynomial::alloc(set set, qpolynomial qp)
12853 {
12854 auto res = isl_pw_qpolynomial_alloc(set.release(), qp.release());
12855 return manage(res);
12856 }
12857
coalesce()12858 pw_qpolynomial pw_qpolynomial::coalesce() const
12859 {
12860 auto res = isl_pw_qpolynomial_coalesce(copy());
12861 return manage(res);
12862 }
12863
dim(isl::dim type)12864 unsigned int pw_qpolynomial::dim(isl::dim type) const
12865 {
12866 auto res = isl_pw_qpolynomial_dim(get(), static_cast<enum isl_dim_type>(type));
12867 return res;
12868 }
12869
domain()12870 set pw_qpolynomial::domain() const
12871 {
12872 auto res = isl_pw_qpolynomial_domain(copy());
12873 return manage(res);
12874 }
12875
drop_dims(isl::dim type,unsigned int first,unsigned int n)12876 pw_qpolynomial pw_qpolynomial::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
12877 {
12878 auto res = isl_pw_qpolynomial_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
12879 return manage(res);
12880 }
12881
drop_unused_params()12882 pw_qpolynomial pw_qpolynomial::drop_unused_params() const
12883 {
12884 auto res = isl_pw_qpolynomial_drop_unused_params(copy());
12885 return manage(res);
12886 }
12887
eval(point pnt)12888 val pw_qpolynomial::eval(point pnt) const
12889 {
12890 auto res = isl_pw_qpolynomial_eval(copy(), pnt.release());
12891 return manage(res);
12892 }
12893
find_dim_by_name(isl::dim type,const std::string & name)12894 int pw_qpolynomial::find_dim_by_name(isl::dim type, const std::string &name) const
12895 {
12896 auto res = isl_pw_qpolynomial_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
12897 return res;
12898 }
12899
fix_val(isl::dim type,unsigned int n,val v)12900 pw_qpolynomial pw_qpolynomial::fix_val(isl::dim type, unsigned int n, val v) const
12901 {
12902 auto res = isl_pw_qpolynomial_fix_val(copy(), static_cast<enum isl_dim_type>(type), n, v.release());
12903 return manage(res);
12904 }
12905
foreach_piece(const std::function<stat (set,qpolynomial)> & fn)12906 stat pw_qpolynomial::foreach_piece(const std::function<stat(set, qpolynomial)> &fn) const
12907 {
12908 struct fn_data {
12909 const std::function<stat(set, qpolynomial)> *func;
12910 } fn_data = { &fn };
12911 auto fn_lambda = [](isl_set *arg_0, isl_qpolynomial *arg_1, void *arg_2) -> isl_stat {
12912 auto *data = static_cast<struct fn_data *>(arg_2);
12913 stat ret = (*data->func)(manage(arg_0), manage(arg_1));
12914 return ret.release();
12915 };
12916 auto res = isl_pw_qpolynomial_foreach_piece(get(), fn_lambda, &fn_data);
12917 return manage(res);
12918 }
12919
from_pw_aff(pw_aff pwaff)12920 pw_qpolynomial pw_qpolynomial::from_pw_aff(pw_aff pwaff)
12921 {
12922 auto res = isl_pw_qpolynomial_from_pw_aff(pwaff.release());
12923 return manage(res);
12924 }
12925
from_qpolynomial(qpolynomial qp)12926 pw_qpolynomial pw_qpolynomial::from_qpolynomial(qpolynomial qp)
12927 {
12928 auto res = isl_pw_qpolynomial_from_qpolynomial(qp.release());
12929 return manage(res);
12930 }
12931
from_range()12932 pw_qpolynomial pw_qpolynomial::from_range() const
12933 {
12934 auto res = isl_pw_qpolynomial_from_range(copy());
12935 return manage(res);
12936 }
12937
get_domain_space()12938 space pw_qpolynomial::get_domain_space() const
12939 {
12940 auto res = isl_pw_qpolynomial_get_domain_space(get());
12941 return manage(res);
12942 }
12943
get_space()12944 space pw_qpolynomial::get_space() const
12945 {
12946 auto res = isl_pw_qpolynomial_get_space(get());
12947 return manage(res);
12948 }
12949
gist(set context)12950 pw_qpolynomial pw_qpolynomial::gist(set context) const
12951 {
12952 auto res = isl_pw_qpolynomial_gist(copy(), context.release());
12953 return manage(res);
12954 }
12955
gist_params(set context)12956 pw_qpolynomial pw_qpolynomial::gist_params(set context) const
12957 {
12958 auto res = isl_pw_qpolynomial_gist_params(copy(), context.release());
12959 return manage(res);
12960 }
12961
has_equal_space(const pw_qpolynomial & pwqp2)12962 boolean pw_qpolynomial::has_equal_space(const pw_qpolynomial &pwqp2) const
12963 {
12964 auto res = isl_pw_qpolynomial_has_equal_space(get(), pwqp2.get());
12965 return manage(res);
12966 }
12967
insert_dims(isl::dim type,unsigned int first,unsigned int n)12968 pw_qpolynomial pw_qpolynomial::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
12969 {
12970 auto res = isl_pw_qpolynomial_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
12971 return manage(res);
12972 }
12973
intersect_domain(set set)12974 pw_qpolynomial pw_qpolynomial::intersect_domain(set set) const
12975 {
12976 auto res = isl_pw_qpolynomial_intersect_domain(copy(), set.release());
12977 return manage(res);
12978 }
12979
intersect_params(set set)12980 pw_qpolynomial pw_qpolynomial::intersect_params(set set) const
12981 {
12982 auto res = isl_pw_qpolynomial_intersect_params(copy(), set.release());
12983 return manage(res);
12984 }
12985
involves_dims(isl::dim type,unsigned int first,unsigned int n)12986 boolean pw_qpolynomial::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
12987 {
12988 auto res = isl_pw_qpolynomial_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
12989 return manage(res);
12990 }
12991
involves_nan()12992 boolean pw_qpolynomial::involves_nan() const
12993 {
12994 auto res = isl_pw_qpolynomial_involves_nan(get());
12995 return manage(res);
12996 }
12997
is_zero()12998 boolean pw_qpolynomial::is_zero() const
12999 {
13000 auto res = isl_pw_qpolynomial_is_zero(get());
13001 return manage(res);
13002 }
13003
max()13004 val pw_qpolynomial::max() const
13005 {
13006 auto res = isl_pw_qpolynomial_max(copy());
13007 return manage(res);
13008 }
13009
min()13010 val pw_qpolynomial::min() const
13011 {
13012 auto res = isl_pw_qpolynomial_min(copy());
13013 return manage(res);
13014 }
13015
move_dims(isl::dim dst_type,unsigned int dst_pos,isl::dim src_type,unsigned int src_pos,unsigned int n)13016 pw_qpolynomial pw_qpolynomial::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
13017 {
13018 auto res = isl_pw_qpolynomial_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
13019 return manage(res);
13020 }
13021
mul(pw_qpolynomial pwqp2)13022 pw_qpolynomial pw_qpolynomial::mul(pw_qpolynomial pwqp2) const
13023 {
13024 auto res = isl_pw_qpolynomial_mul(copy(), pwqp2.release());
13025 return manage(res);
13026 }
13027
n_piece()13028 int pw_qpolynomial::n_piece() const
13029 {
13030 auto res = isl_pw_qpolynomial_n_piece(get());
13031 return res;
13032 }
13033
neg()13034 pw_qpolynomial pw_qpolynomial::neg() const
13035 {
13036 auto res = isl_pw_qpolynomial_neg(copy());
13037 return manage(res);
13038 }
13039
plain_is_equal(const pw_qpolynomial & pwqp2)13040 boolean pw_qpolynomial::plain_is_equal(const pw_qpolynomial &pwqp2) const
13041 {
13042 auto res = isl_pw_qpolynomial_plain_is_equal(get(), pwqp2.get());
13043 return manage(res);
13044 }
13045
pow(unsigned int exponent)13046 pw_qpolynomial pw_qpolynomial::pow(unsigned int exponent) const
13047 {
13048 auto res = isl_pw_qpolynomial_pow(copy(), exponent);
13049 return manage(res);
13050 }
13051
project_domain_on_params()13052 pw_qpolynomial pw_qpolynomial::project_domain_on_params() const
13053 {
13054 auto res = isl_pw_qpolynomial_project_domain_on_params(copy());
13055 return manage(res);
13056 }
13057
reset_domain_space(space dim)13058 pw_qpolynomial pw_qpolynomial::reset_domain_space(space dim) const
13059 {
13060 auto res = isl_pw_qpolynomial_reset_domain_space(copy(), dim.release());
13061 return manage(res);
13062 }
13063
reset_user()13064 pw_qpolynomial pw_qpolynomial::reset_user() const
13065 {
13066 auto res = isl_pw_qpolynomial_reset_user(copy());
13067 return manage(res);
13068 }
13069
scale_down_val(val v)13070 pw_qpolynomial pw_qpolynomial::scale_down_val(val v) const
13071 {
13072 auto res = isl_pw_qpolynomial_scale_down_val(copy(), v.release());
13073 return manage(res);
13074 }
13075
scale_val(val v)13076 pw_qpolynomial pw_qpolynomial::scale_val(val v) const
13077 {
13078 auto res = isl_pw_qpolynomial_scale_val(copy(), v.release());
13079 return manage(res);
13080 }
13081
split_dims(isl::dim type,unsigned int first,unsigned int n)13082 pw_qpolynomial pw_qpolynomial::split_dims(isl::dim type, unsigned int first, unsigned int n) const
13083 {
13084 auto res = isl_pw_qpolynomial_split_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
13085 return manage(res);
13086 }
13087
split_periods(int max_periods)13088 pw_qpolynomial pw_qpolynomial::split_periods(int max_periods) const
13089 {
13090 auto res = isl_pw_qpolynomial_split_periods(copy(), max_periods);
13091 return manage(res);
13092 }
13093
sub(pw_qpolynomial pwqp2)13094 pw_qpolynomial pw_qpolynomial::sub(pw_qpolynomial pwqp2) const
13095 {
13096 auto res = isl_pw_qpolynomial_sub(copy(), pwqp2.release());
13097 return manage(res);
13098 }
13099
subtract_domain(set set)13100 pw_qpolynomial pw_qpolynomial::subtract_domain(set set) const
13101 {
13102 auto res = isl_pw_qpolynomial_subtract_domain(copy(), set.release());
13103 return manage(res);
13104 }
13105
to_polynomial(int sign)13106 pw_qpolynomial pw_qpolynomial::to_polynomial(int sign) const
13107 {
13108 auto res = isl_pw_qpolynomial_to_polynomial(copy(), sign);
13109 return manage(res);
13110 }
13111
zero(space dim)13112 pw_qpolynomial pw_qpolynomial::zero(space dim)
13113 {
13114 auto res = isl_pw_qpolynomial_zero(dim.release());
13115 return manage(res);
13116 }
13117
13118 // implementations for isl::pw_qpolynomial_fold_list
manage(__isl_take isl_pw_qpolynomial_fold_list * ptr)13119 pw_qpolynomial_fold_list manage(__isl_take isl_pw_qpolynomial_fold_list *ptr) {
13120 return pw_qpolynomial_fold_list(ptr);
13121 }
manage_copy(__isl_keep isl_pw_qpolynomial_fold_list * ptr)13122 pw_qpolynomial_fold_list manage_copy(__isl_keep isl_pw_qpolynomial_fold_list *ptr) {
13123 ptr = isl_pw_qpolynomial_fold_list_copy(ptr);
13124 return pw_qpolynomial_fold_list(ptr);
13125 }
13126
pw_qpolynomial_fold_list()13127 pw_qpolynomial_fold_list::pw_qpolynomial_fold_list()
13128 : ptr(nullptr) {}
13129
pw_qpolynomial_fold_list(const pw_qpolynomial_fold_list & obj)13130 pw_qpolynomial_fold_list::pw_qpolynomial_fold_list(const pw_qpolynomial_fold_list &obj)
13131 : ptr(nullptr)
13132 {
13133 ptr = obj.copy();
13134 }
pw_qpolynomial_fold_list(std::nullptr_t)13135 pw_qpolynomial_fold_list::pw_qpolynomial_fold_list(std::nullptr_t)
13136 : ptr(nullptr) {}
13137
13138
pw_qpolynomial_fold_list(__isl_take isl_pw_qpolynomial_fold_list * ptr)13139 pw_qpolynomial_fold_list::pw_qpolynomial_fold_list(__isl_take isl_pw_qpolynomial_fold_list *ptr)
13140 : ptr(ptr) {}
13141
13142
13143 pw_qpolynomial_fold_list &pw_qpolynomial_fold_list::operator=(pw_qpolynomial_fold_list obj) {
13144 std::swap(this->ptr, obj.ptr);
13145 return *this;
13146 }
13147
~pw_qpolynomial_fold_list()13148 pw_qpolynomial_fold_list::~pw_qpolynomial_fold_list() {
13149 if (ptr)
13150 isl_pw_qpolynomial_fold_list_free(ptr);
13151 }
13152
copy()13153 __isl_give isl_pw_qpolynomial_fold_list *pw_qpolynomial_fold_list::copy() const & {
13154 return isl_pw_qpolynomial_fold_list_copy(ptr);
13155 }
13156
get()13157 __isl_keep isl_pw_qpolynomial_fold_list *pw_qpolynomial_fold_list::get() const {
13158 return ptr;
13159 }
13160
release()13161 __isl_give isl_pw_qpolynomial_fold_list *pw_qpolynomial_fold_list::release() {
13162 isl_pw_qpolynomial_fold_list *tmp = ptr;
13163 ptr = nullptr;
13164 return tmp;
13165 }
13166
is_null()13167 bool pw_qpolynomial_fold_list::is_null() const {
13168 return ptr == nullptr;
13169 }
13170 pw_qpolynomial_fold_list::operator bool() const {
13171 return !is_null();
13172 }
13173
13174
get_ctx()13175 ctx pw_qpolynomial_fold_list::get_ctx() const {
13176 return ctx(isl_pw_qpolynomial_fold_list_get_ctx(ptr));
13177 }
13178
dump()13179 void pw_qpolynomial_fold_list::dump() const {
13180 isl_pw_qpolynomial_fold_list_dump(get());
13181 }
13182
13183
13184
13185 // implementations for isl::pw_qpolynomial_list
manage(__isl_take isl_pw_qpolynomial_list * ptr)13186 pw_qpolynomial_list manage(__isl_take isl_pw_qpolynomial_list *ptr) {
13187 return pw_qpolynomial_list(ptr);
13188 }
manage_copy(__isl_keep isl_pw_qpolynomial_list * ptr)13189 pw_qpolynomial_list manage_copy(__isl_keep isl_pw_qpolynomial_list *ptr) {
13190 ptr = isl_pw_qpolynomial_list_copy(ptr);
13191 return pw_qpolynomial_list(ptr);
13192 }
13193
pw_qpolynomial_list()13194 pw_qpolynomial_list::pw_qpolynomial_list()
13195 : ptr(nullptr) {}
13196
pw_qpolynomial_list(const pw_qpolynomial_list & obj)13197 pw_qpolynomial_list::pw_qpolynomial_list(const pw_qpolynomial_list &obj)
13198 : ptr(nullptr)
13199 {
13200 ptr = obj.copy();
13201 }
pw_qpolynomial_list(std::nullptr_t)13202 pw_qpolynomial_list::pw_qpolynomial_list(std::nullptr_t)
13203 : ptr(nullptr) {}
13204
13205
pw_qpolynomial_list(__isl_take isl_pw_qpolynomial_list * ptr)13206 pw_qpolynomial_list::pw_qpolynomial_list(__isl_take isl_pw_qpolynomial_list *ptr)
13207 : ptr(ptr) {}
13208
13209
13210 pw_qpolynomial_list &pw_qpolynomial_list::operator=(pw_qpolynomial_list obj) {
13211 std::swap(this->ptr, obj.ptr);
13212 return *this;
13213 }
13214
~pw_qpolynomial_list()13215 pw_qpolynomial_list::~pw_qpolynomial_list() {
13216 if (ptr)
13217 isl_pw_qpolynomial_list_free(ptr);
13218 }
13219
copy()13220 __isl_give isl_pw_qpolynomial_list *pw_qpolynomial_list::copy() const & {
13221 return isl_pw_qpolynomial_list_copy(ptr);
13222 }
13223
get()13224 __isl_keep isl_pw_qpolynomial_list *pw_qpolynomial_list::get() const {
13225 return ptr;
13226 }
13227
release()13228 __isl_give isl_pw_qpolynomial_list *pw_qpolynomial_list::release() {
13229 isl_pw_qpolynomial_list *tmp = ptr;
13230 ptr = nullptr;
13231 return tmp;
13232 }
13233
is_null()13234 bool pw_qpolynomial_list::is_null() const {
13235 return ptr == nullptr;
13236 }
13237 pw_qpolynomial_list::operator bool() const {
13238 return !is_null();
13239 }
13240
13241
get_ctx()13242 ctx pw_qpolynomial_list::get_ctx() const {
13243 return ctx(isl_pw_qpolynomial_list_get_ctx(ptr));
13244 }
13245
dump()13246 void pw_qpolynomial_list::dump() const {
13247 isl_pw_qpolynomial_list_dump(get());
13248 }
13249
13250
add(pw_qpolynomial el)13251 pw_qpolynomial_list pw_qpolynomial_list::add(pw_qpolynomial el) const
13252 {
13253 auto res = isl_pw_qpolynomial_list_add(copy(), el.release());
13254 return manage(res);
13255 }
13256
alloc(ctx ctx,int n)13257 pw_qpolynomial_list pw_qpolynomial_list::alloc(ctx ctx, int n)
13258 {
13259 auto res = isl_pw_qpolynomial_list_alloc(ctx.release(), n);
13260 return manage(res);
13261 }
13262
concat(pw_qpolynomial_list list2)13263 pw_qpolynomial_list pw_qpolynomial_list::concat(pw_qpolynomial_list list2) const
13264 {
13265 auto res = isl_pw_qpolynomial_list_concat(copy(), list2.release());
13266 return manage(res);
13267 }
13268
drop(unsigned int first,unsigned int n)13269 pw_qpolynomial_list pw_qpolynomial_list::drop(unsigned int first, unsigned int n) const
13270 {
13271 auto res = isl_pw_qpolynomial_list_drop(copy(), first, n);
13272 return manage(res);
13273 }
13274
foreach(const std::function<stat (pw_qpolynomial)> & fn)13275 stat pw_qpolynomial_list::foreach(const std::function<stat(pw_qpolynomial)> &fn) const
13276 {
13277 struct fn_data {
13278 const std::function<stat(pw_qpolynomial)> *func;
13279 } fn_data = { &fn };
13280 auto fn_lambda = [](isl_pw_qpolynomial *arg_0, void *arg_1) -> isl_stat {
13281 auto *data = static_cast<struct fn_data *>(arg_1);
13282 stat ret = (*data->func)(manage(arg_0));
13283 return ret.release();
13284 };
13285 auto res = isl_pw_qpolynomial_list_foreach(get(), fn_lambda, &fn_data);
13286 return manage(res);
13287 }
13288
from_pw_qpolynomial(pw_qpolynomial el)13289 pw_qpolynomial_list pw_qpolynomial_list::from_pw_qpolynomial(pw_qpolynomial el)
13290 {
13291 auto res = isl_pw_qpolynomial_list_from_pw_qpolynomial(el.release());
13292 return manage(res);
13293 }
13294
get_at(int index)13295 pw_qpolynomial pw_qpolynomial_list::get_at(int index) const
13296 {
13297 auto res = isl_pw_qpolynomial_list_get_at(get(), index);
13298 return manage(res);
13299 }
13300
get_pw_qpolynomial(int index)13301 pw_qpolynomial pw_qpolynomial_list::get_pw_qpolynomial(int index) const
13302 {
13303 auto res = isl_pw_qpolynomial_list_get_pw_qpolynomial(get(), index);
13304 return manage(res);
13305 }
13306
insert(unsigned int pos,pw_qpolynomial el)13307 pw_qpolynomial_list pw_qpolynomial_list::insert(unsigned int pos, pw_qpolynomial el) const
13308 {
13309 auto res = isl_pw_qpolynomial_list_insert(copy(), pos, el.release());
13310 return manage(res);
13311 }
13312
n_pw_qpolynomial()13313 int pw_qpolynomial_list::n_pw_qpolynomial() const
13314 {
13315 auto res = isl_pw_qpolynomial_list_n_pw_qpolynomial(get());
13316 return res;
13317 }
13318
reverse()13319 pw_qpolynomial_list pw_qpolynomial_list::reverse() const
13320 {
13321 auto res = isl_pw_qpolynomial_list_reverse(copy());
13322 return manage(res);
13323 }
13324
set_pw_qpolynomial(int index,pw_qpolynomial el)13325 pw_qpolynomial_list pw_qpolynomial_list::set_pw_qpolynomial(int index, pw_qpolynomial el) const
13326 {
13327 auto res = isl_pw_qpolynomial_list_set_pw_qpolynomial(copy(), index, el.release());
13328 return manage(res);
13329 }
13330
size()13331 int pw_qpolynomial_list::size() const
13332 {
13333 auto res = isl_pw_qpolynomial_list_size(get());
13334 return res;
13335 }
13336
swap(unsigned int pos1,unsigned int pos2)13337 pw_qpolynomial_list pw_qpolynomial_list::swap(unsigned int pos1, unsigned int pos2) const
13338 {
13339 auto res = isl_pw_qpolynomial_list_swap(copy(), pos1, pos2);
13340 return manage(res);
13341 }
13342
13343 // implementations for isl::qpolynomial
manage(__isl_take isl_qpolynomial * ptr)13344 qpolynomial manage(__isl_take isl_qpolynomial *ptr) {
13345 return qpolynomial(ptr);
13346 }
manage_copy(__isl_keep isl_qpolynomial * ptr)13347 qpolynomial manage_copy(__isl_keep isl_qpolynomial *ptr) {
13348 ptr = isl_qpolynomial_copy(ptr);
13349 return qpolynomial(ptr);
13350 }
13351
qpolynomial()13352 qpolynomial::qpolynomial()
13353 : ptr(nullptr) {}
13354
qpolynomial(const qpolynomial & obj)13355 qpolynomial::qpolynomial(const qpolynomial &obj)
13356 : ptr(nullptr)
13357 {
13358 ptr = obj.copy();
13359 }
qpolynomial(std::nullptr_t)13360 qpolynomial::qpolynomial(std::nullptr_t)
13361 : ptr(nullptr) {}
13362
13363
qpolynomial(__isl_take isl_qpolynomial * ptr)13364 qpolynomial::qpolynomial(__isl_take isl_qpolynomial *ptr)
13365 : ptr(ptr) {}
13366
13367
13368 qpolynomial &qpolynomial::operator=(qpolynomial obj) {
13369 std::swap(this->ptr, obj.ptr);
13370 return *this;
13371 }
13372
~qpolynomial()13373 qpolynomial::~qpolynomial() {
13374 if (ptr)
13375 isl_qpolynomial_free(ptr);
13376 }
13377
copy()13378 __isl_give isl_qpolynomial *qpolynomial::copy() const & {
13379 return isl_qpolynomial_copy(ptr);
13380 }
13381
get()13382 __isl_keep isl_qpolynomial *qpolynomial::get() const {
13383 return ptr;
13384 }
13385
release()13386 __isl_give isl_qpolynomial *qpolynomial::release() {
13387 isl_qpolynomial *tmp = ptr;
13388 ptr = nullptr;
13389 return tmp;
13390 }
13391
is_null()13392 bool qpolynomial::is_null() const {
13393 return ptr == nullptr;
13394 }
13395 qpolynomial::operator bool() const {
13396 return !is_null();
13397 }
13398
13399
get_ctx()13400 ctx qpolynomial::get_ctx() const {
13401 return ctx(isl_qpolynomial_get_ctx(ptr));
13402 }
13403
dump()13404 void qpolynomial::dump() const {
13405 isl_qpolynomial_dump(get());
13406 }
13407
13408
add(qpolynomial qp2)13409 qpolynomial qpolynomial::add(qpolynomial qp2) const
13410 {
13411 auto res = isl_qpolynomial_add(copy(), qp2.release());
13412 return manage(res);
13413 }
13414
add_dims(isl::dim type,unsigned int n)13415 qpolynomial qpolynomial::add_dims(isl::dim type, unsigned int n) const
13416 {
13417 auto res = isl_qpolynomial_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
13418 return manage(res);
13419 }
13420
align_params(space model)13421 qpolynomial qpolynomial::align_params(space model) const
13422 {
13423 auto res = isl_qpolynomial_align_params(copy(), model.release());
13424 return manage(res);
13425 }
13426
as_polynomial_on_domain(const basic_set & bset,const std::function<stat (basic_set,qpolynomial)> & fn)13427 stat qpolynomial::as_polynomial_on_domain(const basic_set &bset, const std::function<stat(basic_set, qpolynomial)> &fn) const
13428 {
13429 struct fn_data {
13430 const std::function<stat(basic_set, qpolynomial)> *func;
13431 } fn_data = { &fn };
13432 auto fn_lambda = [](isl_basic_set *arg_0, isl_qpolynomial *arg_1, void *arg_2) -> isl_stat {
13433 auto *data = static_cast<struct fn_data *>(arg_2);
13434 stat ret = (*data->func)(manage(arg_0), manage(arg_1));
13435 return ret.release();
13436 };
13437 auto res = isl_qpolynomial_as_polynomial_on_domain(get(), bset.get(), fn_lambda, &fn_data);
13438 return manage(res);
13439 }
13440
dim(isl::dim type)13441 unsigned int qpolynomial::dim(isl::dim type) const
13442 {
13443 auto res = isl_qpolynomial_dim(get(), static_cast<enum isl_dim_type>(type));
13444 return res;
13445 }
13446
drop_dims(isl::dim type,unsigned int first,unsigned int n)13447 qpolynomial qpolynomial::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
13448 {
13449 auto res = isl_qpolynomial_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
13450 return manage(res);
13451 }
13452
eval(point pnt)13453 val qpolynomial::eval(point pnt) const
13454 {
13455 auto res = isl_qpolynomial_eval(copy(), pnt.release());
13456 return manage(res);
13457 }
13458
foreach_term(const std::function<stat (term)> & fn)13459 stat qpolynomial::foreach_term(const std::function<stat(term)> &fn) const
13460 {
13461 struct fn_data {
13462 const std::function<stat(term)> *func;
13463 } fn_data = { &fn };
13464 auto fn_lambda = [](isl_term *arg_0, void *arg_1) -> isl_stat {
13465 auto *data = static_cast<struct fn_data *>(arg_1);
13466 stat ret = (*data->func)(manage(arg_0));
13467 return ret.release();
13468 };
13469 auto res = isl_qpolynomial_foreach_term(get(), fn_lambda, &fn_data);
13470 return manage(res);
13471 }
13472
from_aff(aff aff)13473 qpolynomial qpolynomial::from_aff(aff aff)
13474 {
13475 auto res = isl_qpolynomial_from_aff(aff.release());
13476 return manage(res);
13477 }
13478
from_constraint(constraint c,isl::dim type,unsigned int pos)13479 qpolynomial qpolynomial::from_constraint(constraint c, isl::dim type, unsigned int pos)
13480 {
13481 auto res = isl_qpolynomial_from_constraint(c.release(), static_cast<enum isl_dim_type>(type), pos);
13482 return manage(res);
13483 }
13484
from_term(term term)13485 qpolynomial qpolynomial::from_term(term term)
13486 {
13487 auto res = isl_qpolynomial_from_term(term.release());
13488 return manage(res);
13489 }
13490
get_constant_val()13491 val qpolynomial::get_constant_val() const
13492 {
13493 auto res = isl_qpolynomial_get_constant_val(get());
13494 return manage(res);
13495 }
13496
get_domain_space()13497 space qpolynomial::get_domain_space() const
13498 {
13499 auto res = isl_qpolynomial_get_domain_space(get());
13500 return manage(res);
13501 }
13502
get_space()13503 space qpolynomial::get_space() const
13504 {
13505 auto res = isl_qpolynomial_get_space(get());
13506 return manage(res);
13507 }
13508
gist(set context)13509 qpolynomial qpolynomial::gist(set context) const
13510 {
13511 auto res = isl_qpolynomial_gist(copy(), context.release());
13512 return manage(res);
13513 }
13514
gist_params(set context)13515 qpolynomial qpolynomial::gist_params(set context) const
13516 {
13517 auto res = isl_qpolynomial_gist_params(copy(), context.release());
13518 return manage(res);
13519 }
13520
homogenize()13521 qpolynomial qpolynomial::homogenize() const
13522 {
13523 auto res = isl_qpolynomial_homogenize(copy());
13524 return manage(res);
13525 }
13526
infty_on_domain(space dim)13527 qpolynomial qpolynomial::infty_on_domain(space dim)
13528 {
13529 auto res = isl_qpolynomial_infty_on_domain(dim.release());
13530 return manage(res);
13531 }
13532
insert_dims(isl::dim type,unsigned int first,unsigned int n)13533 qpolynomial qpolynomial::insert_dims(isl::dim type, unsigned int first, unsigned int n) const
13534 {
13535 auto res = isl_qpolynomial_insert_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
13536 return manage(res);
13537 }
13538
involves_dims(isl::dim type,unsigned int first,unsigned int n)13539 boolean qpolynomial::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
13540 {
13541 auto res = isl_qpolynomial_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
13542 return manage(res);
13543 }
13544
is_infty()13545 boolean qpolynomial::is_infty() const
13546 {
13547 auto res = isl_qpolynomial_is_infty(get());
13548 return manage(res);
13549 }
13550
is_nan()13551 boolean qpolynomial::is_nan() const
13552 {
13553 auto res = isl_qpolynomial_is_nan(get());
13554 return manage(res);
13555 }
13556
is_neginfty()13557 boolean qpolynomial::is_neginfty() const
13558 {
13559 auto res = isl_qpolynomial_is_neginfty(get());
13560 return manage(res);
13561 }
13562
is_zero()13563 boolean qpolynomial::is_zero() const
13564 {
13565 auto res = isl_qpolynomial_is_zero(get());
13566 return manage(res);
13567 }
13568
move_dims(isl::dim dst_type,unsigned int dst_pos,isl::dim src_type,unsigned int src_pos,unsigned int n)13569 qpolynomial qpolynomial::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
13570 {
13571 auto res = isl_qpolynomial_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
13572 return manage(res);
13573 }
13574
mul(qpolynomial qp2)13575 qpolynomial qpolynomial::mul(qpolynomial qp2) const
13576 {
13577 auto res = isl_qpolynomial_mul(copy(), qp2.release());
13578 return manage(res);
13579 }
13580
nan_on_domain(space dim)13581 qpolynomial qpolynomial::nan_on_domain(space dim)
13582 {
13583 auto res = isl_qpolynomial_nan_on_domain(dim.release());
13584 return manage(res);
13585 }
13586
neg()13587 qpolynomial qpolynomial::neg() const
13588 {
13589 auto res = isl_qpolynomial_neg(copy());
13590 return manage(res);
13591 }
13592
neginfty_on_domain(space dim)13593 qpolynomial qpolynomial::neginfty_on_domain(space dim)
13594 {
13595 auto res = isl_qpolynomial_neginfty_on_domain(dim.release());
13596 return manage(res);
13597 }
13598
one_on_domain(space dim)13599 qpolynomial qpolynomial::one_on_domain(space dim)
13600 {
13601 auto res = isl_qpolynomial_one_on_domain(dim.release());
13602 return manage(res);
13603 }
13604
plain_is_equal(const qpolynomial & qp2)13605 boolean qpolynomial::plain_is_equal(const qpolynomial &qp2) const
13606 {
13607 auto res = isl_qpolynomial_plain_is_equal(get(), qp2.get());
13608 return manage(res);
13609 }
13610
pow(unsigned int power)13611 qpolynomial qpolynomial::pow(unsigned int power) const
13612 {
13613 auto res = isl_qpolynomial_pow(copy(), power);
13614 return manage(res);
13615 }
13616
project_domain_on_params()13617 qpolynomial qpolynomial::project_domain_on_params() const
13618 {
13619 auto res = isl_qpolynomial_project_domain_on_params(copy());
13620 return manage(res);
13621 }
13622
scale_down_val(val v)13623 qpolynomial qpolynomial::scale_down_val(val v) const
13624 {
13625 auto res = isl_qpolynomial_scale_down_val(copy(), v.release());
13626 return manage(res);
13627 }
13628
scale_val(val v)13629 qpolynomial qpolynomial::scale_val(val v) const
13630 {
13631 auto res = isl_qpolynomial_scale_val(copy(), v.release());
13632 return manage(res);
13633 }
13634
sgn()13635 int qpolynomial::sgn() const
13636 {
13637 auto res = isl_qpolynomial_sgn(get());
13638 return res;
13639 }
13640
sub(qpolynomial qp2)13641 qpolynomial qpolynomial::sub(qpolynomial qp2) const
13642 {
13643 auto res = isl_qpolynomial_sub(copy(), qp2.release());
13644 return manage(res);
13645 }
13646
val_on_domain(space space,val val)13647 qpolynomial qpolynomial::val_on_domain(space space, val val)
13648 {
13649 auto res = isl_qpolynomial_val_on_domain(space.release(), val.release());
13650 return manage(res);
13651 }
13652
var_on_domain(space dim,isl::dim type,unsigned int pos)13653 qpolynomial qpolynomial::var_on_domain(space dim, isl::dim type, unsigned int pos)
13654 {
13655 auto res = isl_qpolynomial_var_on_domain(dim.release(), static_cast<enum isl_dim_type>(type), pos);
13656 return manage(res);
13657 }
13658
zero_on_domain(space dim)13659 qpolynomial qpolynomial::zero_on_domain(space dim)
13660 {
13661 auto res = isl_qpolynomial_zero_on_domain(dim.release());
13662 return manage(res);
13663 }
13664
13665 // implementations for isl::schedule
manage(__isl_take isl_schedule * ptr)13666 schedule manage(__isl_take isl_schedule *ptr) {
13667 return schedule(ptr);
13668 }
manage_copy(__isl_keep isl_schedule * ptr)13669 schedule manage_copy(__isl_keep isl_schedule *ptr) {
13670 ptr = isl_schedule_copy(ptr);
13671 return schedule(ptr);
13672 }
13673
schedule()13674 schedule::schedule()
13675 : ptr(nullptr) {}
13676
schedule(const schedule & obj)13677 schedule::schedule(const schedule &obj)
13678 : ptr(nullptr)
13679 {
13680 ptr = obj.copy();
13681 }
schedule(std::nullptr_t)13682 schedule::schedule(std::nullptr_t)
13683 : ptr(nullptr) {}
13684
13685
schedule(__isl_take isl_schedule * ptr)13686 schedule::schedule(__isl_take isl_schedule *ptr)
13687 : ptr(ptr) {}
13688
schedule(ctx ctx,const std::string & str)13689 schedule::schedule(ctx ctx, const std::string &str)
13690 {
13691 auto res = isl_schedule_read_from_str(ctx.release(), str.c_str());
13692 ptr = res;
13693 }
13694
13695 schedule &schedule::operator=(schedule obj) {
13696 std::swap(this->ptr, obj.ptr);
13697 return *this;
13698 }
13699
~schedule()13700 schedule::~schedule() {
13701 if (ptr)
13702 isl_schedule_free(ptr);
13703 }
13704
copy()13705 __isl_give isl_schedule *schedule::copy() const & {
13706 return isl_schedule_copy(ptr);
13707 }
13708
get()13709 __isl_keep isl_schedule *schedule::get() const {
13710 return ptr;
13711 }
13712
release()13713 __isl_give isl_schedule *schedule::release() {
13714 isl_schedule *tmp = ptr;
13715 ptr = nullptr;
13716 return tmp;
13717 }
13718
is_null()13719 bool schedule::is_null() const {
13720 return ptr == nullptr;
13721 }
13722 schedule::operator bool() const {
13723 return !is_null();
13724 }
13725
13726
get_ctx()13727 ctx schedule::get_ctx() const {
13728 return ctx(isl_schedule_get_ctx(ptr));
13729 }
to_str()13730 std::string schedule::to_str() const {
13731 char *Tmp = isl_schedule_to_str(get());
13732 if (!Tmp)
13733 return "";
13734 std::string S(Tmp);
13735 free(Tmp);
13736 return S;
13737 }
13738
13739
dump()13740 void schedule::dump() const {
13741 isl_schedule_dump(get());
13742 }
13743
13744
align_params(space space)13745 schedule schedule::align_params(space space) const
13746 {
13747 auto res = isl_schedule_align_params(copy(), space.release());
13748 return manage(res);
13749 }
13750
empty(space space)13751 schedule schedule::empty(space space)
13752 {
13753 auto res = isl_schedule_empty(space.release());
13754 return manage(res);
13755 }
13756
from_domain(union_set domain)13757 schedule schedule::from_domain(union_set domain)
13758 {
13759 auto res = isl_schedule_from_domain(domain.release());
13760 return manage(res);
13761 }
13762
get_domain()13763 union_set schedule::get_domain() const
13764 {
13765 auto res = isl_schedule_get_domain(get());
13766 return manage(res);
13767 }
13768
get_map()13769 union_map schedule::get_map() const
13770 {
13771 auto res = isl_schedule_get_map(get());
13772 return manage(res);
13773 }
13774
get_root()13775 schedule_node schedule::get_root() const
13776 {
13777 auto res = isl_schedule_get_root(get());
13778 return manage(res);
13779 }
13780
gist_domain_params(set context)13781 schedule schedule::gist_domain_params(set context) const
13782 {
13783 auto res = isl_schedule_gist_domain_params(copy(), context.release());
13784 return manage(res);
13785 }
13786
insert_context(set context)13787 schedule schedule::insert_context(set context) const
13788 {
13789 auto res = isl_schedule_insert_context(copy(), context.release());
13790 return manage(res);
13791 }
13792
insert_guard(set guard)13793 schedule schedule::insert_guard(set guard) const
13794 {
13795 auto res = isl_schedule_insert_guard(copy(), guard.release());
13796 return manage(res);
13797 }
13798
insert_partial_schedule(multi_union_pw_aff partial)13799 schedule schedule::insert_partial_schedule(multi_union_pw_aff partial) const
13800 {
13801 auto res = isl_schedule_insert_partial_schedule(copy(), partial.release());
13802 return manage(res);
13803 }
13804
intersect_domain(union_set domain)13805 schedule schedule::intersect_domain(union_set domain) const
13806 {
13807 auto res = isl_schedule_intersect_domain(copy(), domain.release());
13808 return manage(res);
13809 }
13810
plain_is_equal(const schedule & schedule2)13811 boolean schedule::plain_is_equal(const schedule &schedule2) const
13812 {
13813 auto res = isl_schedule_plain_is_equal(get(), schedule2.get());
13814 return manage(res);
13815 }
13816
pullback(union_pw_multi_aff upma)13817 schedule schedule::pullback(union_pw_multi_aff upma) const
13818 {
13819 auto res = isl_schedule_pullback_union_pw_multi_aff(copy(), upma.release());
13820 return manage(res);
13821 }
13822
reset_user()13823 schedule schedule::reset_user() const
13824 {
13825 auto res = isl_schedule_reset_user(copy());
13826 return manage(res);
13827 }
13828
sequence(schedule schedule2)13829 schedule schedule::sequence(schedule schedule2) const
13830 {
13831 auto res = isl_schedule_sequence(copy(), schedule2.release());
13832 return manage(res);
13833 }
13834
13835 // implementations for isl::schedule_constraints
manage(__isl_take isl_schedule_constraints * ptr)13836 schedule_constraints manage(__isl_take isl_schedule_constraints *ptr) {
13837 return schedule_constraints(ptr);
13838 }
manage_copy(__isl_keep isl_schedule_constraints * ptr)13839 schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr) {
13840 ptr = isl_schedule_constraints_copy(ptr);
13841 return schedule_constraints(ptr);
13842 }
13843
schedule_constraints()13844 schedule_constraints::schedule_constraints()
13845 : ptr(nullptr) {}
13846
schedule_constraints(const schedule_constraints & obj)13847 schedule_constraints::schedule_constraints(const schedule_constraints &obj)
13848 : ptr(nullptr)
13849 {
13850 ptr = obj.copy();
13851 }
schedule_constraints(std::nullptr_t)13852 schedule_constraints::schedule_constraints(std::nullptr_t)
13853 : ptr(nullptr) {}
13854
13855
schedule_constraints(__isl_take isl_schedule_constraints * ptr)13856 schedule_constraints::schedule_constraints(__isl_take isl_schedule_constraints *ptr)
13857 : ptr(ptr) {}
13858
schedule_constraints(ctx ctx,const std::string & str)13859 schedule_constraints::schedule_constraints(ctx ctx, const std::string &str)
13860 {
13861 auto res = isl_schedule_constraints_read_from_str(ctx.release(), str.c_str());
13862 ptr = res;
13863 }
13864
13865 schedule_constraints &schedule_constraints::operator=(schedule_constraints obj) {
13866 std::swap(this->ptr, obj.ptr);
13867 return *this;
13868 }
13869
~schedule_constraints()13870 schedule_constraints::~schedule_constraints() {
13871 if (ptr)
13872 isl_schedule_constraints_free(ptr);
13873 }
13874
copy()13875 __isl_give isl_schedule_constraints *schedule_constraints::copy() const & {
13876 return isl_schedule_constraints_copy(ptr);
13877 }
13878
get()13879 __isl_keep isl_schedule_constraints *schedule_constraints::get() const {
13880 return ptr;
13881 }
13882
release()13883 __isl_give isl_schedule_constraints *schedule_constraints::release() {
13884 isl_schedule_constraints *tmp = ptr;
13885 ptr = nullptr;
13886 return tmp;
13887 }
13888
is_null()13889 bool schedule_constraints::is_null() const {
13890 return ptr == nullptr;
13891 }
13892 schedule_constraints::operator bool() const {
13893 return !is_null();
13894 }
13895
13896
get_ctx()13897 ctx schedule_constraints::get_ctx() const {
13898 return ctx(isl_schedule_constraints_get_ctx(ptr));
13899 }
to_str()13900 std::string schedule_constraints::to_str() const {
13901 char *Tmp = isl_schedule_constraints_to_str(get());
13902 if (!Tmp)
13903 return "";
13904 std::string S(Tmp);
13905 free(Tmp);
13906 return S;
13907 }
13908
13909
dump()13910 void schedule_constraints::dump() const {
13911 isl_schedule_constraints_dump(get());
13912 }
13913
13914
apply(union_map umap)13915 schedule_constraints schedule_constraints::apply(union_map umap) const
13916 {
13917 auto res = isl_schedule_constraints_apply(copy(), umap.release());
13918 return manage(res);
13919 }
13920
compute_schedule()13921 schedule schedule_constraints::compute_schedule() const
13922 {
13923 auto res = isl_schedule_constraints_compute_schedule(copy());
13924 return manage(res);
13925 }
13926
get_coincidence()13927 union_map schedule_constraints::get_coincidence() const
13928 {
13929 auto res = isl_schedule_constraints_get_coincidence(get());
13930 return manage(res);
13931 }
13932
get_conditional_validity()13933 union_map schedule_constraints::get_conditional_validity() const
13934 {
13935 auto res = isl_schedule_constraints_get_conditional_validity(get());
13936 return manage(res);
13937 }
13938
get_conditional_validity_condition()13939 union_map schedule_constraints::get_conditional_validity_condition() const
13940 {
13941 auto res = isl_schedule_constraints_get_conditional_validity_condition(get());
13942 return manage(res);
13943 }
13944
get_context()13945 set schedule_constraints::get_context() const
13946 {
13947 auto res = isl_schedule_constraints_get_context(get());
13948 return manage(res);
13949 }
13950
get_domain()13951 union_set schedule_constraints::get_domain() const
13952 {
13953 auto res = isl_schedule_constraints_get_domain(get());
13954 return manage(res);
13955 }
13956
get_proximity()13957 union_map schedule_constraints::get_proximity() const
13958 {
13959 auto res = isl_schedule_constraints_get_proximity(get());
13960 return manage(res);
13961 }
13962
get_validity()13963 union_map schedule_constraints::get_validity() const
13964 {
13965 auto res = isl_schedule_constraints_get_validity(get());
13966 return manage(res);
13967 }
13968
on_domain(union_set domain)13969 schedule_constraints schedule_constraints::on_domain(union_set domain)
13970 {
13971 auto res = isl_schedule_constraints_on_domain(domain.release());
13972 return manage(res);
13973 }
13974
set_coincidence(union_map coincidence)13975 schedule_constraints schedule_constraints::set_coincidence(union_map coincidence) const
13976 {
13977 auto res = isl_schedule_constraints_set_coincidence(copy(), coincidence.release());
13978 return manage(res);
13979 }
13980
set_conditional_validity(union_map condition,union_map validity)13981 schedule_constraints schedule_constraints::set_conditional_validity(union_map condition, union_map validity) const
13982 {
13983 auto res = isl_schedule_constraints_set_conditional_validity(copy(), condition.release(), validity.release());
13984 return manage(res);
13985 }
13986
set_context(set context)13987 schedule_constraints schedule_constraints::set_context(set context) const
13988 {
13989 auto res = isl_schedule_constraints_set_context(copy(), context.release());
13990 return manage(res);
13991 }
13992
set_proximity(union_map proximity)13993 schedule_constraints schedule_constraints::set_proximity(union_map proximity) const
13994 {
13995 auto res = isl_schedule_constraints_set_proximity(copy(), proximity.release());
13996 return manage(res);
13997 }
13998
set_validity(union_map validity)13999 schedule_constraints schedule_constraints::set_validity(union_map validity) const
14000 {
14001 auto res = isl_schedule_constraints_set_validity(copy(), validity.release());
14002 return manage(res);
14003 }
14004
14005 // implementations for isl::schedule_node
manage(__isl_take isl_schedule_node * ptr)14006 schedule_node manage(__isl_take isl_schedule_node *ptr) {
14007 return schedule_node(ptr);
14008 }
manage_copy(__isl_keep isl_schedule_node * ptr)14009 schedule_node manage_copy(__isl_keep isl_schedule_node *ptr) {
14010 ptr = isl_schedule_node_copy(ptr);
14011 return schedule_node(ptr);
14012 }
14013
schedule_node()14014 schedule_node::schedule_node()
14015 : ptr(nullptr) {}
14016
schedule_node(const schedule_node & obj)14017 schedule_node::schedule_node(const schedule_node &obj)
14018 : ptr(nullptr)
14019 {
14020 ptr = obj.copy();
14021 }
schedule_node(std::nullptr_t)14022 schedule_node::schedule_node(std::nullptr_t)
14023 : ptr(nullptr) {}
14024
14025
schedule_node(__isl_take isl_schedule_node * ptr)14026 schedule_node::schedule_node(__isl_take isl_schedule_node *ptr)
14027 : ptr(ptr) {}
14028
14029
14030 schedule_node &schedule_node::operator=(schedule_node obj) {
14031 std::swap(this->ptr, obj.ptr);
14032 return *this;
14033 }
14034
~schedule_node()14035 schedule_node::~schedule_node() {
14036 if (ptr)
14037 isl_schedule_node_free(ptr);
14038 }
14039
copy()14040 __isl_give isl_schedule_node *schedule_node::copy() const & {
14041 return isl_schedule_node_copy(ptr);
14042 }
14043
get()14044 __isl_keep isl_schedule_node *schedule_node::get() const {
14045 return ptr;
14046 }
14047
release()14048 __isl_give isl_schedule_node *schedule_node::release() {
14049 isl_schedule_node *tmp = ptr;
14050 ptr = nullptr;
14051 return tmp;
14052 }
14053
is_null()14054 bool schedule_node::is_null() const {
14055 return ptr == nullptr;
14056 }
14057 schedule_node::operator bool() const {
14058 return !is_null();
14059 }
14060
14061
get_ctx()14062 ctx schedule_node::get_ctx() const {
14063 return ctx(isl_schedule_node_get_ctx(ptr));
14064 }
to_str()14065 std::string schedule_node::to_str() const {
14066 char *Tmp = isl_schedule_node_to_str(get());
14067 if (!Tmp)
14068 return "";
14069 std::string S(Tmp);
14070 free(Tmp);
14071 return S;
14072 }
14073
14074
dump()14075 void schedule_node::dump() const {
14076 isl_schedule_node_dump(get());
14077 }
14078
14079
align_params(space space)14080 schedule_node schedule_node::align_params(space space) const
14081 {
14082 auto res = isl_schedule_node_align_params(copy(), space.release());
14083 return manage(res);
14084 }
14085
ancestor(int generation)14086 schedule_node schedule_node::ancestor(int generation) const
14087 {
14088 auto res = isl_schedule_node_ancestor(copy(), generation);
14089 return manage(res);
14090 }
14091
band_member_get_coincident(int pos)14092 boolean schedule_node::band_member_get_coincident(int pos) const
14093 {
14094 auto res = isl_schedule_node_band_member_get_coincident(get(), pos);
14095 return manage(res);
14096 }
14097
band_member_set_coincident(int pos,int coincident)14098 schedule_node schedule_node::band_member_set_coincident(int pos, int coincident) const
14099 {
14100 auto res = isl_schedule_node_band_member_set_coincident(copy(), pos, coincident);
14101 return manage(res);
14102 }
14103
band_set_ast_build_options(union_set options)14104 schedule_node schedule_node::band_set_ast_build_options(union_set options) const
14105 {
14106 auto res = isl_schedule_node_band_set_ast_build_options(copy(), options.release());
14107 return manage(res);
14108 }
14109
child(int pos)14110 schedule_node schedule_node::child(int pos) const
14111 {
14112 auto res = isl_schedule_node_child(copy(), pos);
14113 return manage(res);
14114 }
14115
context_get_context()14116 set schedule_node::context_get_context() const
14117 {
14118 auto res = isl_schedule_node_context_get_context(get());
14119 return manage(res);
14120 }
14121
cut()14122 schedule_node schedule_node::cut() const
14123 {
14124 auto res = isl_schedule_node_cut(copy());
14125 return manage(res);
14126 }
14127
domain_get_domain()14128 union_set schedule_node::domain_get_domain() const
14129 {
14130 auto res = isl_schedule_node_domain_get_domain(get());
14131 return manage(res);
14132 }
14133
expansion_get_contraction()14134 union_pw_multi_aff schedule_node::expansion_get_contraction() const
14135 {
14136 auto res = isl_schedule_node_expansion_get_contraction(get());
14137 return manage(res);
14138 }
14139
expansion_get_expansion()14140 union_map schedule_node::expansion_get_expansion() const
14141 {
14142 auto res = isl_schedule_node_expansion_get_expansion(get());
14143 return manage(res);
14144 }
14145
extension_get_extension()14146 union_map schedule_node::extension_get_extension() const
14147 {
14148 auto res = isl_schedule_node_extension_get_extension(get());
14149 return manage(res);
14150 }
14151
filter_get_filter()14152 union_set schedule_node::filter_get_filter() const
14153 {
14154 auto res = isl_schedule_node_filter_get_filter(get());
14155 return manage(res);
14156 }
14157
first_child()14158 schedule_node schedule_node::first_child() const
14159 {
14160 auto res = isl_schedule_node_first_child(copy());
14161 return manage(res);
14162 }
14163
foreach_ancestor_top_down(const std::function<stat (schedule_node)> & fn)14164 stat schedule_node::foreach_ancestor_top_down(const std::function<stat(schedule_node)> &fn) const
14165 {
14166 struct fn_data {
14167 const std::function<stat(schedule_node)> *func;
14168 } fn_data = { &fn };
14169 auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_stat {
14170 auto *data = static_cast<struct fn_data *>(arg_1);
14171 stat ret = (*data->func)(manage_copy(arg_0));
14172 return ret.release();
14173 };
14174 auto res = isl_schedule_node_foreach_ancestor_top_down(get(), fn_lambda, &fn_data);
14175 return manage(res);
14176 }
14177
from_domain(union_set domain)14178 schedule_node schedule_node::from_domain(union_set domain)
14179 {
14180 auto res = isl_schedule_node_from_domain(domain.release());
14181 return manage(res);
14182 }
14183
from_extension(union_map extension)14184 schedule_node schedule_node::from_extension(union_map extension)
14185 {
14186 auto res = isl_schedule_node_from_extension(extension.release());
14187 return manage(res);
14188 }
14189
get_ancestor_child_position(const schedule_node & ancestor)14190 int schedule_node::get_ancestor_child_position(const schedule_node &ancestor) const
14191 {
14192 auto res = isl_schedule_node_get_ancestor_child_position(get(), ancestor.get());
14193 return res;
14194 }
14195
get_child(int pos)14196 schedule_node schedule_node::get_child(int pos) const
14197 {
14198 auto res = isl_schedule_node_get_child(get(), pos);
14199 return manage(res);
14200 }
14201
get_child_position()14202 int schedule_node::get_child_position() const
14203 {
14204 auto res = isl_schedule_node_get_child_position(get());
14205 return res;
14206 }
14207
get_domain()14208 union_set schedule_node::get_domain() const
14209 {
14210 auto res = isl_schedule_node_get_domain(get());
14211 return manage(res);
14212 }
14213
get_prefix_schedule_multi_union_pw_aff()14214 multi_union_pw_aff schedule_node::get_prefix_schedule_multi_union_pw_aff() const
14215 {
14216 auto res = isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(get());
14217 return manage(res);
14218 }
14219
get_prefix_schedule_relation()14220 union_map schedule_node::get_prefix_schedule_relation() const
14221 {
14222 auto res = isl_schedule_node_get_prefix_schedule_relation(get());
14223 return manage(res);
14224 }
14225
get_prefix_schedule_union_map()14226 union_map schedule_node::get_prefix_schedule_union_map() const
14227 {
14228 auto res = isl_schedule_node_get_prefix_schedule_union_map(get());
14229 return manage(res);
14230 }
14231
get_prefix_schedule_union_pw_multi_aff()14232 union_pw_multi_aff schedule_node::get_prefix_schedule_union_pw_multi_aff() const
14233 {
14234 auto res = isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(get());
14235 return manage(res);
14236 }
14237
get_schedule()14238 schedule schedule_node::get_schedule() const
14239 {
14240 auto res = isl_schedule_node_get_schedule(get());
14241 return manage(res);
14242 }
14243
get_schedule_depth()14244 int schedule_node::get_schedule_depth() const
14245 {
14246 auto res = isl_schedule_node_get_schedule_depth(get());
14247 return res;
14248 }
14249
get_shared_ancestor(const schedule_node & node2)14250 schedule_node schedule_node::get_shared_ancestor(const schedule_node &node2) const
14251 {
14252 auto res = isl_schedule_node_get_shared_ancestor(get(), node2.get());
14253 return manage(res);
14254 }
14255
get_subtree_contraction()14256 union_pw_multi_aff schedule_node::get_subtree_contraction() const
14257 {
14258 auto res = isl_schedule_node_get_subtree_contraction(get());
14259 return manage(res);
14260 }
14261
get_subtree_expansion()14262 union_map schedule_node::get_subtree_expansion() const
14263 {
14264 auto res = isl_schedule_node_get_subtree_expansion(get());
14265 return manage(res);
14266 }
14267
get_subtree_schedule_union_map()14268 union_map schedule_node::get_subtree_schedule_union_map() const
14269 {
14270 auto res = isl_schedule_node_get_subtree_schedule_union_map(get());
14271 return manage(res);
14272 }
14273
get_tree_depth()14274 int schedule_node::get_tree_depth() const
14275 {
14276 auto res = isl_schedule_node_get_tree_depth(get());
14277 return res;
14278 }
14279
get_universe_domain()14280 union_set schedule_node::get_universe_domain() const
14281 {
14282 auto res = isl_schedule_node_get_universe_domain(get());
14283 return manage(res);
14284 }
14285
graft_after(schedule_node graft)14286 schedule_node schedule_node::graft_after(schedule_node graft) const
14287 {
14288 auto res = isl_schedule_node_graft_after(copy(), graft.release());
14289 return manage(res);
14290 }
14291
graft_before(schedule_node graft)14292 schedule_node schedule_node::graft_before(schedule_node graft) const
14293 {
14294 auto res = isl_schedule_node_graft_before(copy(), graft.release());
14295 return manage(res);
14296 }
14297
group(id group_id)14298 schedule_node schedule_node::group(id group_id) const
14299 {
14300 auto res = isl_schedule_node_group(copy(), group_id.release());
14301 return manage(res);
14302 }
14303
guard_get_guard()14304 set schedule_node::guard_get_guard() const
14305 {
14306 auto res = isl_schedule_node_guard_get_guard(get());
14307 return manage(res);
14308 }
14309
has_children()14310 boolean schedule_node::has_children() const
14311 {
14312 auto res = isl_schedule_node_has_children(get());
14313 return manage(res);
14314 }
14315
has_next_sibling()14316 boolean schedule_node::has_next_sibling() const
14317 {
14318 auto res = isl_schedule_node_has_next_sibling(get());
14319 return manage(res);
14320 }
14321
has_parent()14322 boolean schedule_node::has_parent() const
14323 {
14324 auto res = isl_schedule_node_has_parent(get());
14325 return manage(res);
14326 }
14327
has_previous_sibling()14328 boolean schedule_node::has_previous_sibling() const
14329 {
14330 auto res = isl_schedule_node_has_previous_sibling(get());
14331 return manage(res);
14332 }
14333
insert_context(set context)14334 schedule_node schedule_node::insert_context(set context) const
14335 {
14336 auto res = isl_schedule_node_insert_context(copy(), context.release());
14337 return manage(res);
14338 }
14339
insert_filter(union_set filter)14340 schedule_node schedule_node::insert_filter(union_set filter) const
14341 {
14342 auto res = isl_schedule_node_insert_filter(copy(), filter.release());
14343 return manage(res);
14344 }
14345
insert_guard(set context)14346 schedule_node schedule_node::insert_guard(set context) const
14347 {
14348 auto res = isl_schedule_node_insert_guard(copy(), context.release());
14349 return manage(res);
14350 }
14351
insert_mark(id mark)14352 schedule_node schedule_node::insert_mark(id mark) const
14353 {
14354 auto res = isl_schedule_node_insert_mark(copy(), mark.release());
14355 return manage(res);
14356 }
14357
insert_partial_schedule(multi_union_pw_aff schedule)14358 schedule_node schedule_node::insert_partial_schedule(multi_union_pw_aff schedule) const
14359 {
14360 auto res = isl_schedule_node_insert_partial_schedule(copy(), schedule.release());
14361 return manage(res);
14362 }
14363
insert_sequence(union_set_list filters)14364 schedule_node schedule_node::insert_sequence(union_set_list filters) const
14365 {
14366 auto res = isl_schedule_node_insert_sequence(copy(), filters.release());
14367 return manage(res);
14368 }
14369
insert_set(union_set_list filters)14370 schedule_node schedule_node::insert_set(union_set_list filters) const
14371 {
14372 auto res = isl_schedule_node_insert_set(copy(), filters.release());
14373 return manage(res);
14374 }
14375
is_equal(const schedule_node & node2)14376 boolean schedule_node::is_equal(const schedule_node &node2) const
14377 {
14378 auto res = isl_schedule_node_is_equal(get(), node2.get());
14379 return manage(res);
14380 }
14381
is_subtree_anchored()14382 boolean schedule_node::is_subtree_anchored() const
14383 {
14384 auto res = isl_schedule_node_is_subtree_anchored(get());
14385 return manage(res);
14386 }
14387
mark_get_id()14388 id schedule_node::mark_get_id() const
14389 {
14390 auto res = isl_schedule_node_mark_get_id(get());
14391 return manage(res);
14392 }
14393
n_children()14394 int schedule_node::n_children() const
14395 {
14396 auto res = isl_schedule_node_n_children(get());
14397 return res;
14398 }
14399
next_sibling()14400 schedule_node schedule_node::next_sibling() const
14401 {
14402 auto res = isl_schedule_node_next_sibling(copy());
14403 return manage(res);
14404 }
14405
order_after(union_set filter)14406 schedule_node schedule_node::order_after(union_set filter) const
14407 {
14408 auto res = isl_schedule_node_order_after(copy(), filter.release());
14409 return manage(res);
14410 }
14411
order_before(union_set filter)14412 schedule_node schedule_node::order_before(union_set filter) const
14413 {
14414 auto res = isl_schedule_node_order_before(copy(), filter.release());
14415 return manage(res);
14416 }
14417
parent()14418 schedule_node schedule_node::parent() const
14419 {
14420 auto res = isl_schedule_node_parent(copy());
14421 return manage(res);
14422 }
14423
previous_sibling()14424 schedule_node schedule_node::previous_sibling() const
14425 {
14426 auto res = isl_schedule_node_previous_sibling(copy());
14427 return manage(res);
14428 }
14429
reset_user()14430 schedule_node schedule_node::reset_user() const
14431 {
14432 auto res = isl_schedule_node_reset_user(copy());
14433 return manage(res);
14434 }
14435
root()14436 schedule_node schedule_node::root() const
14437 {
14438 auto res = isl_schedule_node_root(copy());
14439 return manage(res);
14440 }
14441
sequence_splice_child(int pos)14442 schedule_node schedule_node::sequence_splice_child(int pos) const
14443 {
14444 auto res = isl_schedule_node_sequence_splice_child(copy(), pos);
14445 return manage(res);
14446 }
14447
14448 // implementations for isl::set
manage(__isl_take isl_set * ptr)14449 set manage(__isl_take isl_set *ptr) {
14450 return set(ptr);
14451 }
manage_copy(__isl_keep isl_set * ptr)14452 set manage_copy(__isl_keep isl_set *ptr) {
14453 ptr = isl_set_copy(ptr);
14454 return set(ptr);
14455 }
14456
set()14457 set::set()
14458 : ptr(nullptr) {}
14459
set(const set & obj)14460 set::set(const set &obj)
14461 : ptr(nullptr)
14462 {
14463 ptr = obj.copy();
14464 }
set(std::nullptr_t)14465 set::set(std::nullptr_t)
14466 : ptr(nullptr) {}
14467
14468
set(__isl_take isl_set * ptr)14469 set::set(__isl_take isl_set *ptr)
14470 : ptr(ptr) {}
14471
set(ctx ctx,const std::string & str)14472 set::set(ctx ctx, const std::string &str)
14473 {
14474 auto res = isl_set_read_from_str(ctx.release(), str.c_str());
14475 ptr = res;
14476 }
set(basic_set bset)14477 set::set(basic_set bset)
14478 {
14479 auto res = isl_set_from_basic_set(bset.release());
14480 ptr = res;
14481 }
set(point pnt)14482 set::set(point pnt)
14483 {
14484 auto res = isl_set_from_point(pnt.release());
14485 ptr = res;
14486 }
set(union_set uset)14487 set::set(union_set uset)
14488 {
14489 auto res = isl_set_from_union_set(uset.release());
14490 ptr = res;
14491 }
14492
14493 set &set::operator=(set obj) {
14494 std::swap(this->ptr, obj.ptr);
14495 return *this;
14496 }
14497
~set()14498 set::~set() {
14499 if (ptr)
14500 isl_set_free(ptr);
14501 }
14502
copy()14503 __isl_give isl_set *set::copy() const & {
14504 return isl_set_copy(ptr);
14505 }
14506
get()14507 __isl_keep isl_set *set::get() const {
14508 return ptr;
14509 }
14510
release()14511 __isl_give isl_set *set::release() {
14512 isl_set *tmp = ptr;
14513 ptr = nullptr;
14514 return tmp;
14515 }
14516
is_null()14517 bool set::is_null() const {
14518 return ptr == nullptr;
14519 }
14520 set::operator bool() const {
14521 return !is_null();
14522 }
14523
14524
get_ctx()14525 ctx set::get_ctx() const {
14526 return ctx(isl_set_get_ctx(ptr));
14527 }
to_str()14528 std::string set::to_str() const {
14529 char *Tmp = isl_set_to_str(get());
14530 if (!Tmp)
14531 return "";
14532 std::string S(Tmp);
14533 free(Tmp);
14534 return S;
14535 }
14536
14537
dump()14538 void set::dump() const {
14539 isl_set_dump(get());
14540 }
14541
14542
add_constraint(constraint constraint)14543 set set::add_constraint(constraint constraint) const
14544 {
14545 auto res = isl_set_add_constraint(copy(), constraint.release());
14546 return manage(res);
14547 }
14548
add_dims(isl::dim type,unsigned int n)14549 set set::add_dims(isl::dim type, unsigned int n) const
14550 {
14551 auto res = isl_set_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
14552 return manage(res);
14553 }
14554
affine_hull()14555 basic_set set::affine_hull() const
14556 {
14557 auto res = isl_set_affine_hull(copy());
14558 return manage(res);
14559 }
14560
align_params(space model)14561 set set::align_params(space model) const
14562 {
14563 auto res = isl_set_align_params(copy(), model.release());
14564 return manage(res);
14565 }
14566
apply(map map)14567 set set::apply(map map) const
14568 {
14569 auto res = isl_set_apply(copy(), map.release());
14570 return manage(res);
14571 }
14572
bounded_simple_hull()14573 basic_set set::bounded_simple_hull() const
14574 {
14575 auto res = isl_set_bounded_simple_hull(copy());
14576 return manage(res);
14577 }
14578
box_from_points(point pnt1,point pnt2)14579 set set::box_from_points(point pnt1, point pnt2)
14580 {
14581 auto res = isl_set_box_from_points(pnt1.release(), pnt2.release());
14582 return manage(res);
14583 }
14584
coalesce()14585 set set::coalesce() const
14586 {
14587 auto res = isl_set_coalesce(copy());
14588 return manage(res);
14589 }
14590
coefficients()14591 basic_set set::coefficients() const
14592 {
14593 auto res = isl_set_coefficients(copy());
14594 return manage(res);
14595 }
14596
complement()14597 set set::complement() const
14598 {
14599 auto res = isl_set_complement(copy());
14600 return manage(res);
14601 }
14602
convex_hull()14603 basic_set set::convex_hull() const
14604 {
14605 auto res = isl_set_convex_hull(copy());
14606 return manage(res);
14607 }
14608
count_val()14609 val set::count_val() const
14610 {
14611 auto res = isl_set_count_val(get());
14612 return manage(res);
14613 }
14614
detect_equalities()14615 set set::detect_equalities() const
14616 {
14617 auto res = isl_set_detect_equalities(copy());
14618 return manage(res);
14619 }
14620
dim(isl::dim type)14621 unsigned int set::dim(isl::dim type) const
14622 {
14623 auto res = isl_set_dim(get(), static_cast<enum isl_dim_type>(type));
14624 return res;
14625 }
14626
dim_has_any_lower_bound(isl::dim type,unsigned int pos)14627 boolean set::dim_has_any_lower_bound(isl::dim type, unsigned int pos) const
14628 {
14629 auto res = isl_set_dim_has_any_lower_bound(get(), static_cast<enum isl_dim_type>(type), pos);
14630 return manage(res);
14631 }
14632
dim_has_any_upper_bound(isl::dim type,unsigned int pos)14633 boolean set::dim_has_any_upper_bound(isl::dim type, unsigned int pos) const
14634 {
14635 auto res = isl_set_dim_has_any_upper_bound(get(), static_cast<enum isl_dim_type>(type), pos);
14636 return manage(res);
14637 }
14638
dim_has_lower_bound(isl::dim type,unsigned int pos)14639 boolean set::dim_has_lower_bound(isl::dim type, unsigned int pos) const
14640 {
14641 auto res = isl_set_dim_has_lower_bound(get(), static_cast<enum isl_dim_type>(type), pos);
14642 return manage(res);
14643 }
14644
dim_has_upper_bound(isl::dim type,unsigned int pos)14645 boolean set::dim_has_upper_bound(isl::dim type, unsigned int pos) const
14646 {
14647 auto res = isl_set_dim_has_upper_bound(get(), static_cast<enum isl_dim_type>(type), pos);
14648 return manage(res);
14649 }
14650
dim_is_bounded(isl::dim type,unsigned int pos)14651 boolean set::dim_is_bounded(isl::dim type, unsigned int pos) const
14652 {
14653 auto res = isl_set_dim_is_bounded(get(), static_cast<enum isl_dim_type>(type), pos);
14654 return manage(res);
14655 }
14656
dim_max(int pos)14657 pw_aff set::dim_max(int pos) const
14658 {
14659 auto res = isl_set_dim_max(copy(), pos);
14660 return manage(res);
14661 }
14662
dim_min(int pos)14663 pw_aff set::dim_min(int pos) const
14664 {
14665 auto res = isl_set_dim_min(copy(), pos);
14666 return manage(res);
14667 }
14668
drop_constraints_involving_dims(isl::dim type,unsigned int first,unsigned int n)14669 set set::drop_constraints_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
14670 {
14671 auto res = isl_set_drop_constraints_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
14672 return manage(res);
14673 }
14674
drop_constraints_not_involving_dims(isl::dim type,unsigned int first,unsigned int n)14675 set set::drop_constraints_not_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
14676 {
14677 auto res = isl_set_drop_constraints_not_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
14678 return manage(res);
14679 }
14680
drop_unused_params()14681 set set::drop_unused_params() const
14682 {
14683 auto res = isl_set_drop_unused_params(copy());
14684 return manage(res);
14685 }
14686
eliminate(isl::dim type,unsigned int first,unsigned int n)14687 set set::eliminate(isl::dim type, unsigned int first, unsigned int n) const
14688 {
14689 auto res = isl_set_eliminate(copy(), static_cast<enum isl_dim_type>(type), first, n);
14690 return manage(res);
14691 }
14692
empty(space space)14693 set set::empty(space space)
14694 {
14695 auto res = isl_set_empty(space.release());
14696 return manage(res);
14697 }
14698
equate(isl::dim type1,int pos1,isl::dim type2,int pos2)14699 set set::equate(isl::dim type1, int pos1, isl::dim type2, int pos2) const
14700 {
14701 auto res = isl_set_equate(copy(), static_cast<enum isl_dim_type>(type1), pos1, static_cast<enum isl_dim_type>(type2), pos2);
14702 return manage(res);
14703 }
14704
find_dim_by_id(isl::dim type,const id & id)14705 int set::find_dim_by_id(isl::dim type, const id &id) const
14706 {
14707 auto res = isl_set_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
14708 return res;
14709 }
14710
find_dim_by_name(isl::dim type,const std::string & name)14711 int set::find_dim_by_name(isl::dim type, const std::string &name) const
14712 {
14713 auto res = isl_set_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
14714 return res;
14715 }
14716
fix_si(isl::dim type,unsigned int pos,int value)14717 set set::fix_si(isl::dim type, unsigned int pos, int value) const
14718 {
14719 auto res = isl_set_fix_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
14720 return manage(res);
14721 }
14722
fix_val(isl::dim type,unsigned int pos,val v)14723 set set::fix_val(isl::dim type, unsigned int pos, val v) const
14724 {
14725 auto res = isl_set_fix_val(copy(), static_cast<enum isl_dim_type>(type), pos, v.release());
14726 return manage(res);
14727 }
14728
flat_product(set set2)14729 set set::flat_product(set set2) const
14730 {
14731 auto res = isl_set_flat_product(copy(), set2.release());
14732 return manage(res);
14733 }
14734
flatten()14735 set set::flatten() const
14736 {
14737 auto res = isl_set_flatten(copy());
14738 return manage(res);
14739 }
14740
flatten_map()14741 map set::flatten_map() const
14742 {
14743 auto res = isl_set_flatten_map(copy());
14744 return manage(res);
14745 }
14746
follows_at(const set & set2,int pos)14747 int set::follows_at(const set &set2, int pos) const
14748 {
14749 auto res = isl_set_follows_at(get(), set2.get(), pos);
14750 return res;
14751 }
14752
foreach_basic_set(const std::function<stat (basic_set)> & fn)14753 stat set::foreach_basic_set(const std::function<stat(basic_set)> &fn) const
14754 {
14755 struct fn_data {
14756 const std::function<stat(basic_set)> *func;
14757 } fn_data = { &fn };
14758 auto fn_lambda = [](isl_basic_set *arg_0, void *arg_1) -> isl_stat {
14759 auto *data = static_cast<struct fn_data *>(arg_1);
14760 stat ret = (*data->func)(manage(arg_0));
14761 return ret.release();
14762 };
14763 auto res = isl_set_foreach_basic_set(get(), fn_lambda, &fn_data);
14764 return manage(res);
14765 }
14766
foreach_point(const std::function<stat (point)> & fn)14767 stat set::foreach_point(const std::function<stat(point)> &fn) const
14768 {
14769 struct fn_data {
14770 const std::function<stat(point)> *func;
14771 } fn_data = { &fn };
14772 auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
14773 auto *data = static_cast<struct fn_data *>(arg_1);
14774 stat ret = (*data->func)(manage(arg_0));
14775 return ret.release();
14776 };
14777 auto res = isl_set_foreach_point(get(), fn_lambda, &fn_data);
14778 return manage(res);
14779 }
14780
from_multi_aff(multi_aff ma)14781 set set::from_multi_aff(multi_aff ma)
14782 {
14783 auto res = isl_set_from_multi_aff(ma.release());
14784 return manage(res);
14785 }
14786
from_multi_pw_aff(multi_pw_aff mpa)14787 set set::from_multi_pw_aff(multi_pw_aff mpa)
14788 {
14789 auto res = isl_set_from_multi_pw_aff(mpa.release());
14790 return manage(res);
14791 }
14792
from_params()14793 set set::from_params() const
14794 {
14795 auto res = isl_set_from_params(copy());
14796 return manage(res);
14797 }
14798
from_pw_aff(pw_aff pwaff)14799 set set::from_pw_aff(pw_aff pwaff)
14800 {
14801 auto res = isl_set_from_pw_aff(pwaff.release());
14802 return manage(res);
14803 }
14804
from_pw_multi_aff(pw_multi_aff pma)14805 set set::from_pw_multi_aff(pw_multi_aff pma)
14806 {
14807 auto res = isl_set_from_pw_multi_aff(pma.release());
14808 return manage(res);
14809 }
14810
get_basic_set_list()14811 basic_set_list set::get_basic_set_list() const
14812 {
14813 auto res = isl_set_get_basic_set_list(get());
14814 return manage(res);
14815 }
14816
get_dim_id(isl::dim type,unsigned int pos)14817 id set::get_dim_id(isl::dim type, unsigned int pos) const
14818 {
14819 auto res = isl_set_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
14820 return manage(res);
14821 }
14822
get_dim_name(isl::dim type,unsigned int pos)14823 std::string set::get_dim_name(isl::dim type, unsigned int pos) const
14824 {
14825 auto res = isl_set_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
14826 std::string tmp(res);
14827 return tmp;
14828 }
14829
get_space()14830 space set::get_space() const
14831 {
14832 auto res = isl_set_get_space(get());
14833 return manage(res);
14834 }
14835
get_stride(int pos)14836 val set::get_stride(int pos) const
14837 {
14838 auto res = isl_set_get_stride(get(), pos);
14839 return manage(res);
14840 }
14841
get_tuple_id()14842 id set::get_tuple_id() const
14843 {
14844 auto res = isl_set_get_tuple_id(get());
14845 return manage(res);
14846 }
14847
get_tuple_name()14848 std::string set::get_tuple_name() const
14849 {
14850 auto res = isl_set_get_tuple_name(get());
14851 std::string tmp(res);
14852 return tmp;
14853 }
14854
gist(set context)14855 set set::gist(set context) const
14856 {
14857 auto res = isl_set_gist(copy(), context.release());
14858 return manage(res);
14859 }
14860
gist_basic_set(basic_set context)14861 set set::gist_basic_set(basic_set context) const
14862 {
14863 auto res = isl_set_gist_basic_set(copy(), context.release());
14864 return manage(res);
14865 }
14866
gist_params(set context)14867 set set::gist_params(set context) const
14868 {
14869 auto res = isl_set_gist_params(copy(), context.release());
14870 return manage(res);
14871 }
14872
has_dim_id(isl::dim type,unsigned int pos)14873 boolean set::has_dim_id(isl::dim type, unsigned int pos) const
14874 {
14875 auto res = isl_set_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
14876 return manage(res);
14877 }
14878
has_dim_name(isl::dim type,unsigned int pos)14879 boolean set::has_dim_name(isl::dim type, unsigned int pos) const
14880 {
14881 auto res = isl_set_has_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
14882 return manage(res);
14883 }
14884
has_equal_space(const set & set2)14885 boolean set::has_equal_space(const set &set2) const
14886 {
14887 auto res = isl_set_has_equal_space(get(), set2.get());
14888 return manage(res);
14889 }
14890
has_tuple_id()14891 boolean set::has_tuple_id() const
14892 {
14893 auto res = isl_set_has_tuple_id(get());
14894 return manage(res);
14895 }
14896
has_tuple_name()14897 boolean set::has_tuple_name() const
14898 {
14899 auto res = isl_set_has_tuple_name(get());
14900 return manage(res);
14901 }
14902
identity()14903 map set::identity() const
14904 {
14905 auto res = isl_set_identity(copy());
14906 return manage(res);
14907 }
14908
indicator_function()14909 pw_aff set::indicator_function() const
14910 {
14911 auto res = isl_set_indicator_function(copy());
14912 return manage(res);
14913 }
14914
insert_dims(isl::dim type,unsigned int pos,unsigned int n)14915 set set::insert_dims(isl::dim type, unsigned int pos, unsigned int n) const
14916 {
14917 auto res = isl_set_insert_dims(copy(), static_cast<enum isl_dim_type>(type), pos, n);
14918 return manage(res);
14919 }
14920
intersect(set set2)14921 set set::intersect(set set2) const
14922 {
14923 auto res = isl_set_intersect(copy(), set2.release());
14924 return manage(res);
14925 }
14926
intersect_params(set params)14927 set set::intersect_params(set params) const
14928 {
14929 auto res = isl_set_intersect_params(copy(), params.release());
14930 return manage(res);
14931 }
14932
involves_dims(isl::dim type,unsigned int first,unsigned int n)14933 boolean set::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
14934 {
14935 auto res = isl_set_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
14936 return manage(res);
14937 }
14938
is_bounded()14939 boolean set::is_bounded() const
14940 {
14941 auto res = isl_set_is_bounded(get());
14942 return manage(res);
14943 }
14944
is_box()14945 boolean set::is_box() const
14946 {
14947 auto res = isl_set_is_box(get());
14948 return manage(res);
14949 }
14950
is_disjoint(const set & set2)14951 boolean set::is_disjoint(const set &set2) const
14952 {
14953 auto res = isl_set_is_disjoint(get(), set2.get());
14954 return manage(res);
14955 }
14956
is_empty()14957 boolean set::is_empty() const
14958 {
14959 auto res = isl_set_is_empty(get());
14960 return manage(res);
14961 }
14962
is_equal(const set & set2)14963 boolean set::is_equal(const set &set2) const
14964 {
14965 auto res = isl_set_is_equal(get(), set2.get());
14966 return manage(res);
14967 }
14968
is_params()14969 boolean set::is_params() const
14970 {
14971 auto res = isl_set_is_params(get());
14972 return manage(res);
14973 }
14974
is_singleton()14975 boolean set::is_singleton() const
14976 {
14977 auto res = isl_set_is_singleton(get());
14978 return manage(res);
14979 }
14980
is_strict_subset(const set & set2)14981 boolean set::is_strict_subset(const set &set2) const
14982 {
14983 auto res = isl_set_is_strict_subset(get(), set2.get());
14984 return manage(res);
14985 }
14986
is_subset(const set & set2)14987 boolean set::is_subset(const set &set2) const
14988 {
14989 auto res = isl_set_is_subset(get(), set2.get());
14990 return manage(res);
14991 }
14992
is_wrapping()14993 boolean set::is_wrapping() const
14994 {
14995 auto res = isl_set_is_wrapping(get());
14996 return manage(res);
14997 }
14998
lex_ge_set(set set2)14999 map set::lex_ge_set(set set2) const
15000 {
15001 auto res = isl_set_lex_ge_set(copy(), set2.release());
15002 return manage(res);
15003 }
15004
lex_gt_set(set set2)15005 map set::lex_gt_set(set set2) const
15006 {
15007 auto res = isl_set_lex_gt_set(copy(), set2.release());
15008 return manage(res);
15009 }
15010
lex_le_set(set set2)15011 map set::lex_le_set(set set2) const
15012 {
15013 auto res = isl_set_lex_le_set(copy(), set2.release());
15014 return manage(res);
15015 }
15016
lex_lt_set(set set2)15017 map set::lex_lt_set(set set2) const
15018 {
15019 auto res = isl_set_lex_lt_set(copy(), set2.release());
15020 return manage(res);
15021 }
15022
lexmax()15023 set set::lexmax() const
15024 {
15025 auto res = isl_set_lexmax(copy());
15026 return manage(res);
15027 }
15028
lexmax_pw_multi_aff()15029 pw_multi_aff set::lexmax_pw_multi_aff() const
15030 {
15031 auto res = isl_set_lexmax_pw_multi_aff(copy());
15032 return manage(res);
15033 }
15034
lexmin()15035 set set::lexmin() const
15036 {
15037 auto res = isl_set_lexmin(copy());
15038 return manage(res);
15039 }
15040
lexmin_pw_multi_aff()15041 pw_multi_aff set::lexmin_pw_multi_aff() const
15042 {
15043 auto res = isl_set_lexmin_pw_multi_aff(copy());
15044 return manage(res);
15045 }
15046
lower_bound_si(isl::dim type,unsigned int pos,int value)15047 set set::lower_bound_si(isl::dim type, unsigned int pos, int value) const
15048 {
15049 auto res = isl_set_lower_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
15050 return manage(res);
15051 }
15052
lower_bound_val(isl::dim type,unsigned int pos,val value)15053 set set::lower_bound_val(isl::dim type, unsigned int pos, val value) const
15054 {
15055 auto res = isl_set_lower_bound_val(copy(), static_cast<enum isl_dim_type>(type), pos, value.release());
15056 return manage(res);
15057 }
15058
max_val(const aff & obj)15059 val set::max_val(const aff &obj) const
15060 {
15061 auto res = isl_set_max_val(get(), obj.get());
15062 return manage(res);
15063 }
15064
min_val(const aff & obj)15065 val set::min_val(const aff &obj) const
15066 {
15067 auto res = isl_set_min_val(get(), obj.get());
15068 return manage(res);
15069 }
15070
move_dims(isl::dim dst_type,unsigned int dst_pos,isl::dim src_type,unsigned int src_pos,unsigned int n)15071 set set::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
15072 {
15073 auto res = isl_set_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
15074 return manage(res);
15075 }
15076
n_basic_set()15077 int set::n_basic_set() const
15078 {
15079 auto res = isl_set_n_basic_set(get());
15080 return res;
15081 }
15082
n_dim()15083 unsigned int set::n_dim() const
15084 {
15085 auto res = isl_set_n_dim(get());
15086 return res;
15087 }
15088
nat_universe(space dim)15089 set set::nat_universe(space dim)
15090 {
15091 auto res = isl_set_nat_universe(dim.release());
15092 return manage(res);
15093 }
15094
neg()15095 set set::neg() const
15096 {
15097 auto res = isl_set_neg(copy());
15098 return manage(res);
15099 }
15100
params()15101 set set::params() const
15102 {
15103 auto res = isl_set_params(copy());
15104 return manage(res);
15105 }
15106
plain_cmp(const set & set2)15107 int set::plain_cmp(const set &set2) const
15108 {
15109 auto res = isl_set_plain_cmp(get(), set2.get());
15110 return res;
15111 }
15112
plain_get_val_if_fixed(isl::dim type,unsigned int pos)15113 val set::plain_get_val_if_fixed(isl::dim type, unsigned int pos) const
15114 {
15115 auto res = isl_set_plain_get_val_if_fixed(get(), static_cast<enum isl_dim_type>(type), pos);
15116 return manage(res);
15117 }
15118
plain_is_disjoint(const set & set2)15119 boolean set::plain_is_disjoint(const set &set2) const
15120 {
15121 auto res = isl_set_plain_is_disjoint(get(), set2.get());
15122 return manage(res);
15123 }
15124
plain_is_empty()15125 boolean set::plain_is_empty() const
15126 {
15127 auto res = isl_set_plain_is_empty(get());
15128 return manage(res);
15129 }
15130
plain_is_equal(const set & set2)15131 boolean set::plain_is_equal(const set &set2) const
15132 {
15133 auto res = isl_set_plain_is_equal(get(), set2.get());
15134 return manage(res);
15135 }
15136
plain_is_universe()15137 boolean set::plain_is_universe() const
15138 {
15139 auto res = isl_set_plain_is_universe(get());
15140 return manage(res);
15141 }
15142
plain_unshifted_simple_hull()15143 basic_set set::plain_unshifted_simple_hull() const
15144 {
15145 auto res = isl_set_plain_unshifted_simple_hull(copy());
15146 return manage(res);
15147 }
15148
polyhedral_hull()15149 basic_set set::polyhedral_hull() const
15150 {
15151 auto res = isl_set_polyhedral_hull(copy());
15152 return manage(res);
15153 }
15154
preimage_multi_aff(multi_aff ma)15155 set set::preimage_multi_aff(multi_aff ma) const
15156 {
15157 auto res = isl_set_preimage_multi_aff(copy(), ma.release());
15158 return manage(res);
15159 }
15160
preimage_multi_pw_aff(multi_pw_aff mpa)15161 set set::preimage_multi_pw_aff(multi_pw_aff mpa) const
15162 {
15163 auto res = isl_set_preimage_multi_pw_aff(copy(), mpa.release());
15164 return manage(res);
15165 }
15166
preimage_pw_multi_aff(pw_multi_aff pma)15167 set set::preimage_pw_multi_aff(pw_multi_aff pma) const
15168 {
15169 auto res = isl_set_preimage_pw_multi_aff(copy(), pma.release());
15170 return manage(res);
15171 }
15172
product(set set2)15173 set set::product(set set2) const
15174 {
15175 auto res = isl_set_product(copy(), set2.release());
15176 return manage(res);
15177 }
15178
project_onto_map(isl::dim type,unsigned int first,unsigned int n)15179 map set::project_onto_map(isl::dim type, unsigned int first, unsigned int n) const
15180 {
15181 auto res = isl_set_project_onto_map(copy(), static_cast<enum isl_dim_type>(type), first, n);
15182 return manage(res);
15183 }
15184
project_out(isl::dim type,unsigned int first,unsigned int n)15185 set set::project_out(isl::dim type, unsigned int first, unsigned int n) const
15186 {
15187 auto res = isl_set_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
15188 return manage(res);
15189 }
15190
remove_dims(isl::dim type,unsigned int first,unsigned int n)15191 set set::remove_dims(isl::dim type, unsigned int first, unsigned int n) const
15192 {
15193 auto res = isl_set_remove_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
15194 return manage(res);
15195 }
15196
remove_divs()15197 set set::remove_divs() const
15198 {
15199 auto res = isl_set_remove_divs(copy());
15200 return manage(res);
15201 }
15202
remove_divs_involving_dims(isl::dim type,unsigned int first,unsigned int n)15203 set set::remove_divs_involving_dims(isl::dim type, unsigned int first, unsigned int n) const
15204 {
15205 auto res = isl_set_remove_divs_involving_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
15206 return manage(res);
15207 }
15208
remove_redundancies()15209 set set::remove_redundancies() const
15210 {
15211 auto res = isl_set_remove_redundancies(copy());
15212 return manage(res);
15213 }
15214
remove_unknown_divs()15215 set set::remove_unknown_divs() const
15216 {
15217 auto res = isl_set_remove_unknown_divs(copy());
15218 return manage(res);
15219 }
15220
reset_space(space dim)15221 set set::reset_space(space dim) const
15222 {
15223 auto res = isl_set_reset_space(copy(), dim.release());
15224 return manage(res);
15225 }
15226
reset_tuple_id()15227 set set::reset_tuple_id() const
15228 {
15229 auto res = isl_set_reset_tuple_id(copy());
15230 return manage(res);
15231 }
15232
reset_user()15233 set set::reset_user() const
15234 {
15235 auto res = isl_set_reset_user(copy());
15236 return manage(res);
15237 }
15238
sample()15239 basic_set set::sample() const
15240 {
15241 auto res = isl_set_sample(copy());
15242 return manage(res);
15243 }
15244
sample_point()15245 point set::sample_point() const
15246 {
15247 auto res = isl_set_sample_point(copy());
15248 return manage(res);
15249 }
15250
set_dim_id(isl::dim type,unsigned int pos,id id)15251 set set::set_dim_id(isl::dim type, unsigned int pos, id id) const
15252 {
15253 auto res = isl_set_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
15254 return manage(res);
15255 }
15256
set_tuple_id(id id)15257 set set::set_tuple_id(id id) const
15258 {
15259 auto res = isl_set_set_tuple_id(copy(), id.release());
15260 return manage(res);
15261 }
15262
set_tuple_name(const std::string & s)15263 set set::set_tuple_name(const std::string &s) const
15264 {
15265 auto res = isl_set_set_tuple_name(copy(), s.c_str());
15266 return manage(res);
15267 }
15268
simple_hull()15269 basic_set set::simple_hull() const
15270 {
15271 auto res = isl_set_simple_hull(copy());
15272 return manage(res);
15273 }
15274
size()15275 int set::size() const
15276 {
15277 auto res = isl_set_size(get());
15278 return res;
15279 }
15280
solutions()15281 basic_set set::solutions() const
15282 {
15283 auto res = isl_set_solutions(copy());
15284 return manage(res);
15285 }
15286
split_dims(isl::dim type,unsigned int first,unsigned int n)15287 set set::split_dims(isl::dim type, unsigned int first, unsigned int n) const
15288 {
15289 auto res = isl_set_split_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
15290 return manage(res);
15291 }
15292
subtract(set set2)15293 set set::subtract(set set2) const
15294 {
15295 auto res = isl_set_subtract(copy(), set2.release());
15296 return manage(res);
15297 }
15298
sum(set set2)15299 set set::sum(set set2) const
15300 {
15301 auto res = isl_set_sum(copy(), set2.release());
15302 return manage(res);
15303 }
15304
unite(set set2)15305 set set::unite(set set2) const
15306 {
15307 auto res = isl_set_union(copy(), set2.release());
15308 return manage(res);
15309 }
15310
universe(space space)15311 set set::universe(space space)
15312 {
15313 auto res = isl_set_universe(space.release());
15314 return manage(res);
15315 }
15316
unshifted_simple_hull()15317 basic_set set::unshifted_simple_hull() const
15318 {
15319 auto res = isl_set_unshifted_simple_hull(copy());
15320 return manage(res);
15321 }
15322
unshifted_simple_hull_from_set_list(set_list list)15323 basic_set set::unshifted_simple_hull_from_set_list(set_list list) const
15324 {
15325 auto res = isl_set_unshifted_simple_hull_from_set_list(copy(), list.release());
15326 return manage(res);
15327 }
15328
unwrap()15329 map set::unwrap() const
15330 {
15331 auto res = isl_set_unwrap(copy());
15332 return manage(res);
15333 }
15334
upper_bound_si(isl::dim type,unsigned int pos,int value)15335 set set::upper_bound_si(isl::dim type, unsigned int pos, int value) const
15336 {
15337 auto res = isl_set_upper_bound_si(copy(), static_cast<enum isl_dim_type>(type), pos, value);
15338 return manage(res);
15339 }
15340
upper_bound_val(isl::dim type,unsigned int pos,val value)15341 set set::upper_bound_val(isl::dim type, unsigned int pos, val value) const
15342 {
15343 auto res = isl_set_upper_bound_val(copy(), static_cast<enum isl_dim_type>(type), pos, value.release());
15344 return manage(res);
15345 }
15346
wrapped_domain_map()15347 map set::wrapped_domain_map() const
15348 {
15349 auto res = isl_set_wrapped_domain_map(copy());
15350 return manage(res);
15351 }
15352
15353 // implementations for isl::set_list
manage(__isl_take isl_set_list * ptr)15354 set_list manage(__isl_take isl_set_list *ptr) {
15355 return set_list(ptr);
15356 }
manage_copy(__isl_keep isl_set_list * ptr)15357 set_list manage_copy(__isl_keep isl_set_list *ptr) {
15358 ptr = isl_set_list_copy(ptr);
15359 return set_list(ptr);
15360 }
15361
set_list()15362 set_list::set_list()
15363 : ptr(nullptr) {}
15364
set_list(const set_list & obj)15365 set_list::set_list(const set_list &obj)
15366 : ptr(nullptr)
15367 {
15368 ptr = obj.copy();
15369 }
set_list(std::nullptr_t)15370 set_list::set_list(std::nullptr_t)
15371 : ptr(nullptr) {}
15372
15373
set_list(__isl_take isl_set_list * ptr)15374 set_list::set_list(__isl_take isl_set_list *ptr)
15375 : ptr(ptr) {}
15376
15377
15378 set_list &set_list::operator=(set_list obj) {
15379 std::swap(this->ptr, obj.ptr);
15380 return *this;
15381 }
15382
~set_list()15383 set_list::~set_list() {
15384 if (ptr)
15385 isl_set_list_free(ptr);
15386 }
15387
copy()15388 __isl_give isl_set_list *set_list::copy() const & {
15389 return isl_set_list_copy(ptr);
15390 }
15391
get()15392 __isl_keep isl_set_list *set_list::get() const {
15393 return ptr;
15394 }
15395
release()15396 __isl_give isl_set_list *set_list::release() {
15397 isl_set_list *tmp = ptr;
15398 ptr = nullptr;
15399 return tmp;
15400 }
15401
is_null()15402 bool set_list::is_null() const {
15403 return ptr == nullptr;
15404 }
15405 set_list::operator bool() const {
15406 return !is_null();
15407 }
15408
15409
get_ctx()15410 ctx set_list::get_ctx() const {
15411 return ctx(isl_set_list_get_ctx(ptr));
15412 }
15413
dump()15414 void set_list::dump() const {
15415 isl_set_list_dump(get());
15416 }
15417
15418
add(set el)15419 set_list set_list::add(set el) const
15420 {
15421 auto res = isl_set_list_add(copy(), el.release());
15422 return manage(res);
15423 }
15424
alloc(ctx ctx,int n)15425 set_list set_list::alloc(ctx ctx, int n)
15426 {
15427 auto res = isl_set_list_alloc(ctx.release(), n);
15428 return manage(res);
15429 }
15430
concat(set_list list2)15431 set_list set_list::concat(set_list list2) const
15432 {
15433 auto res = isl_set_list_concat(copy(), list2.release());
15434 return manage(res);
15435 }
15436
drop(unsigned int first,unsigned int n)15437 set_list set_list::drop(unsigned int first, unsigned int n) const
15438 {
15439 auto res = isl_set_list_drop(copy(), first, n);
15440 return manage(res);
15441 }
15442
foreach(const std::function<stat (set)> & fn)15443 stat set_list::foreach(const std::function<stat(set)> &fn) const
15444 {
15445 struct fn_data {
15446 const std::function<stat(set)> *func;
15447 } fn_data = { &fn };
15448 auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat {
15449 auto *data = static_cast<struct fn_data *>(arg_1);
15450 stat ret = (*data->func)(manage(arg_0));
15451 return ret.release();
15452 };
15453 auto res = isl_set_list_foreach(get(), fn_lambda, &fn_data);
15454 return manage(res);
15455 }
15456
from_set(set el)15457 set_list set_list::from_set(set el)
15458 {
15459 auto res = isl_set_list_from_set(el.release());
15460 return manage(res);
15461 }
15462
get_at(int index)15463 set set_list::get_at(int index) const
15464 {
15465 auto res = isl_set_list_get_at(get(), index);
15466 return manage(res);
15467 }
15468
get_set(int index)15469 set set_list::get_set(int index) const
15470 {
15471 auto res = isl_set_list_get_set(get(), index);
15472 return manage(res);
15473 }
15474
insert(unsigned int pos,set el)15475 set_list set_list::insert(unsigned int pos, set el) const
15476 {
15477 auto res = isl_set_list_insert(copy(), pos, el.release());
15478 return manage(res);
15479 }
15480
n_set()15481 int set_list::n_set() const
15482 {
15483 auto res = isl_set_list_n_set(get());
15484 return res;
15485 }
15486
reverse()15487 set_list set_list::reverse() const
15488 {
15489 auto res = isl_set_list_reverse(copy());
15490 return manage(res);
15491 }
15492
set_set(int index,set el)15493 set_list set_list::set_set(int index, set el) const
15494 {
15495 auto res = isl_set_list_set_set(copy(), index, el.release());
15496 return manage(res);
15497 }
15498
size()15499 int set_list::size() const
15500 {
15501 auto res = isl_set_list_size(get());
15502 return res;
15503 }
15504
swap(unsigned int pos1,unsigned int pos2)15505 set_list set_list::swap(unsigned int pos1, unsigned int pos2) const
15506 {
15507 auto res = isl_set_list_swap(copy(), pos1, pos2);
15508 return manage(res);
15509 }
15510
unite()15511 set set_list::unite() const
15512 {
15513 auto res = isl_set_list_union(copy());
15514 return manage(res);
15515 }
15516
15517 // implementations for isl::space
manage(__isl_take isl_space * ptr)15518 space manage(__isl_take isl_space *ptr) {
15519 return space(ptr);
15520 }
manage_copy(__isl_keep isl_space * ptr)15521 space manage_copy(__isl_keep isl_space *ptr) {
15522 ptr = isl_space_copy(ptr);
15523 return space(ptr);
15524 }
15525
space()15526 space::space()
15527 : ptr(nullptr) {}
15528
space(const space & obj)15529 space::space(const space &obj)
15530 : ptr(nullptr)
15531 {
15532 ptr = obj.copy();
15533 }
space(std::nullptr_t)15534 space::space(std::nullptr_t)
15535 : ptr(nullptr) {}
15536
15537
space(__isl_take isl_space * ptr)15538 space::space(__isl_take isl_space *ptr)
15539 : ptr(ptr) {}
15540
space(ctx ctx,unsigned int nparam,unsigned int n_in,unsigned int n_out)15541 space::space(ctx ctx, unsigned int nparam, unsigned int n_in, unsigned int n_out)
15542 {
15543 auto res = isl_space_alloc(ctx.release(), nparam, n_in, n_out);
15544 ptr = res;
15545 }
space(ctx ctx,unsigned int nparam,unsigned int dim)15546 space::space(ctx ctx, unsigned int nparam, unsigned int dim)
15547 {
15548 auto res = isl_space_set_alloc(ctx.release(), nparam, dim);
15549 ptr = res;
15550 }
15551
15552 space &space::operator=(space obj) {
15553 std::swap(this->ptr, obj.ptr);
15554 return *this;
15555 }
15556
~space()15557 space::~space() {
15558 if (ptr)
15559 isl_space_free(ptr);
15560 }
15561
copy()15562 __isl_give isl_space *space::copy() const & {
15563 return isl_space_copy(ptr);
15564 }
15565
get()15566 __isl_keep isl_space *space::get() const {
15567 return ptr;
15568 }
15569
release()15570 __isl_give isl_space *space::release() {
15571 isl_space *tmp = ptr;
15572 ptr = nullptr;
15573 return tmp;
15574 }
15575
is_null()15576 bool space::is_null() const {
15577 return ptr == nullptr;
15578 }
15579 space::operator bool() const {
15580 return !is_null();
15581 }
15582
15583
get_ctx()15584 ctx space::get_ctx() const {
15585 return ctx(isl_space_get_ctx(ptr));
15586 }
to_str()15587 std::string space::to_str() const {
15588 char *Tmp = isl_space_to_str(get());
15589 if (!Tmp)
15590 return "";
15591 std::string S(Tmp);
15592 free(Tmp);
15593 return S;
15594 }
15595
15596
dump()15597 void space::dump() const {
15598 isl_space_dump(get());
15599 }
15600
15601
add_dims(isl::dim type,unsigned int n)15602 space space::add_dims(isl::dim type, unsigned int n) const
15603 {
15604 auto res = isl_space_add_dims(copy(), static_cast<enum isl_dim_type>(type), n);
15605 return manage(res);
15606 }
15607
add_param_id(id id)15608 space space::add_param_id(id id) const
15609 {
15610 auto res = isl_space_add_param_id(copy(), id.release());
15611 return manage(res);
15612 }
15613
align_params(space dim2)15614 space space::align_params(space dim2) const
15615 {
15616 auto res = isl_space_align_params(copy(), dim2.release());
15617 return manage(res);
15618 }
15619
can_curry()15620 boolean space::can_curry() const
15621 {
15622 auto res = isl_space_can_curry(get());
15623 return manage(res);
15624 }
15625
can_range_curry()15626 boolean space::can_range_curry() const
15627 {
15628 auto res = isl_space_can_range_curry(get());
15629 return manage(res);
15630 }
15631
can_uncurry()15632 boolean space::can_uncurry() const
15633 {
15634 auto res = isl_space_can_uncurry(get());
15635 return manage(res);
15636 }
15637
can_zip()15638 boolean space::can_zip() const
15639 {
15640 auto res = isl_space_can_zip(get());
15641 return manage(res);
15642 }
15643
curry()15644 space space::curry() const
15645 {
15646 auto res = isl_space_curry(copy());
15647 return manage(res);
15648 }
15649
dim(isl::dim type)15650 unsigned int space::dim(isl::dim type) const
15651 {
15652 auto res = isl_space_dim(get(), static_cast<enum isl_dim_type>(type));
15653 return res;
15654 }
15655
domain()15656 space space::domain() const
15657 {
15658 auto res = isl_space_domain(copy());
15659 return manage(res);
15660 }
15661
domain_factor_domain()15662 space space::domain_factor_domain() const
15663 {
15664 auto res = isl_space_domain_factor_domain(copy());
15665 return manage(res);
15666 }
15667
domain_factor_range()15668 space space::domain_factor_range() const
15669 {
15670 auto res = isl_space_domain_factor_range(copy());
15671 return manage(res);
15672 }
15673
domain_is_wrapping()15674 boolean space::domain_is_wrapping() const
15675 {
15676 auto res = isl_space_domain_is_wrapping(get());
15677 return manage(res);
15678 }
15679
domain_map()15680 space space::domain_map() const
15681 {
15682 auto res = isl_space_domain_map(copy());
15683 return manage(res);
15684 }
15685
domain_product(space right)15686 space space::domain_product(space right) const
15687 {
15688 auto res = isl_space_domain_product(copy(), right.release());
15689 return manage(res);
15690 }
15691
drop_dims(isl::dim type,unsigned int first,unsigned int num)15692 space space::drop_dims(isl::dim type, unsigned int first, unsigned int num) const
15693 {
15694 auto res = isl_space_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, num);
15695 return manage(res);
15696 }
15697
factor_domain()15698 space space::factor_domain() const
15699 {
15700 auto res = isl_space_factor_domain(copy());
15701 return manage(res);
15702 }
15703
factor_range()15704 space space::factor_range() const
15705 {
15706 auto res = isl_space_factor_range(copy());
15707 return manage(res);
15708 }
15709
find_dim_by_id(isl::dim type,const id & id)15710 int space::find_dim_by_id(isl::dim type, const id &id) const
15711 {
15712 auto res = isl_space_find_dim_by_id(get(), static_cast<enum isl_dim_type>(type), id.get());
15713 return res;
15714 }
15715
find_dim_by_name(isl::dim type,const std::string & name)15716 int space::find_dim_by_name(isl::dim type, const std::string &name) const
15717 {
15718 auto res = isl_space_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
15719 return res;
15720 }
15721
flatten_domain()15722 space space::flatten_domain() const
15723 {
15724 auto res = isl_space_flatten_domain(copy());
15725 return manage(res);
15726 }
15727
flatten_range()15728 space space::flatten_range() const
15729 {
15730 auto res = isl_space_flatten_range(copy());
15731 return manage(res);
15732 }
15733
from_domain()15734 space space::from_domain() const
15735 {
15736 auto res = isl_space_from_domain(copy());
15737 return manage(res);
15738 }
15739
from_range()15740 space space::from_range() const
15741 {
15742 auto res = isl_space_from_range(copy());
15743 return manage(res);
15744 }
15745
get_dim_id(isl::dim type,unsigned int pos)15746 id space::get_dim_id(isl::dim type, unsigned int pos) const
15747 {
15748 auto res = isl_space_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
15749 return manage(res);
15750 }
15751
get_dim_name(isl::dim type,unsigned int pos)15752 std::string space::get_dim_name(isl::dim type, unsigned int pos) const
15753 {
15754 auto res = isl_space_get_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
15755 std::string tmp(res);
15756 return tmp;
15757 }
15758
get_tuple_id(isl::dim type)15759 id space::get_tuple_id(isl::dim type) const
15760 {
15761 auto res = isl_space_get_tuple_id(get(), static_cast<enum isl_dim_type>(type));
15762 return manage(res);
15763 }
15764
get_tuple_name(isl::dim type)15765 std::string space::get_tuple_name(isl::dim type) const
15766 {
15767 auto res = isl_space_get_tuple_name(get(), static_cast<enum isl_dim_type>(type));
15768 std::string tmp(res);
15769 return tmp;
15770 }
15771
has_dim_id(isl::dim type,unsigned int pos)15772 boolean space::has_dim_id(isl::dim type, unsigned int pos) const
15773 {
15774 auto res = isl_space_has_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
15775 return manage(res);
15776 }
15777
has_dim_name(isl::dim type,unsigned int pos)15778 boolean space::has_dim_name(isl::dim type, unsigned int pos) const
15779 {
15780 auto res = isl_space_has_dim_name(get(), static_cast<enum isl_dim_type>(type), pos);
15781 return manage(res);
15782 }
15783
has_equal_params(const space & space2)15784 boolean space::has_equal_params(const space &space2) const
15785 {
15786 auto res = isl_space_has_equal_params(get(), space2.get());
15787 return manage(res);
15788 }
15789
has_equal_tuples(const space & space2)15790 boolean space::has_equal_tuples(const space &space2) const
15791 {
15792 auto res = isl_space_has_equal_tuples(get(), space2.get());
15793 return manage(res);
15794 }
15795
has_tuple_id(isl::dim type)15796 boolean space::has_tuple_id(isl::dim type) const
15797 {
15798 auto res = isl_space_has_tuple_id(get(), static_cast<enum isl_dim_type>(type));
15799 return manage(res);
15800 }
15801
has_tuple_name(isl::dim type)15802 boolean space::has_tuple_name(isl::dim type) const
15803 {
15804 auto res = isl_space_has_tuple_name(get(), static_cast<enum isl_dim_type>(type));
15805 return manage(res);
15806 }
15807
insert_dims(isl::dim type,unsigned int pos,unsigned int n)15808 space space::insert_dims(isl::dim type, unsigned int pos, unsigned int n) const
15809 {
15810 auto res = isl_space_insert_dims(copy(), static_cast<enum isl_dim_type>(type), pos, n);
15811 return manage(res);
15812 }
15813
is_domain(const space & space2)15814 boolean space::is_domain(const space &space2) const
15815 {
15816 auto res = isl_space_is_domain(get(), space2.get());
15817 return manage(res);
15818 }
15819
is_equal(const space & space2)15820 boolean space::is_equal(const space &space2) const
15821 {
15822 auto res = isl_space_is_equal(get(), space2.get());
15823 return manage(res);
15824 }
15825
is_map()15826 boolean space::is_map() const
15827 {
15828 auto res = isl_space_is_map(get());
15829 return manage(res);
15830 }
15831
is_params()15832 boolean space::is_params() const
15833 {
15834 auto res = isl_space_is_params(get());
15835 return manage(res);
15836 }
15837
is_product()15838 boolean space::is_product() const
15839 {
15840 auto res = isl_space_is_product(get());
15841 return manage(res);
15842 }
15843
is_range(const space & space2)15844 boolean space::is_range(const space &space2) const
15845 {
15846 auto res = isl_space_is_range(get(), space2.get());
15847 return manage(res);
15848 }
15849
is_set()15850 boolean space::is_set() const
15851 {
15852 auto res = isl_space_is_set(get());
15853 return manage(res);
15854 }
15855
is_wrapping()15856 boolean space::is_wrapping() const
15857 {
15858 auto res = isl_space_is_wrapping(get());
15859 return manage(res);
15860 }
15861
join(space right)15862 space space::join(space right) const
15863 {
15864 auto res = isl_space_join(copy(), right.release());
15865 return manage(res);
15866 }
15867
map_from_domain_and_range(space range)15868 space space::map_from_domain_and_range(space range) const
15869 {
15870 auto res = isl_space_map_from_domain_and_range(copy(), range.release());
15871 return manage(res);
15872 }
15873
map_from_set()15874 space space::map_from_set() const
15875 {
15876 auto res = isl_space_map_from_set(copy());
15877 return manage(res);
15878 }
15879
move_dims(isl::dim dst_type,unsigned int dst_pos,isl::dim src_type,unsigned int src_pos,unsigned int n)15880 space space::move_dims(isl::dim dst_type, unsigned int dst_pos, isl::dim src_type, unsigned int src_pos, unsigned int n) const
15881 {
15882 auto res = isl_space_move_dims(copy(), static_cast<enum isl_dim_type>(dst_type), dst_pos, static_cast<enum isl_dim_type>(src_type), src_pos, n);
15883 return manage(res);
15884 }
15885
params()15886 space space::params() const
15887 {
15888 auto res = isl_space_params(copy());
15889 return manage(res);
15890 }
15891
params_alloc(ctx ctx,unsigned int nparam)15892 space space::params_alloc(ctx ctx, unsigned int nparam)
15893 {
15894 auto res = isl_space_params_alloc(ctx.release(), nparam);
15895 return manage(res);
15896 }
15897
product(space right)15898 space space::product(space right) const
15899 {
15900 auto res = isl_space_product(copy(), right.release());
15901 return manage(res);
15902 }
15903
range()15904 space space::range() const
15905 {
15906 auto res = isl_space_range(copy());
15907 return manage(res);
15908 }
15909
range_curry()15910 space space::range_curry() const
15911 {
15912 auto res = isl_space_range_curry(copy());
15913 return manage(res);
15914 }
15915
range_factor_domain()15916 space space::range_factor_domain() const
15917 {
15918 auto res = isl_space_range_factor_domain(copy());
15919 return manage(res);
15920 }
15921
range_factor_range()15922 space space::range_factor_range() const
15923 {
15924 auto res = isl_space_range_factor_range(copy());
15925 return manage(res);
15926 }
15927
range_is_wrapping()15928 boolean space::range_is_wrapping() const
15929 {
15930 auto res = isl_space_range_is_wrapping(get());
15931 return manage(res);
15932 }
15933
range_map()15934 space space::range_map() const
15935 {
15936 auto res = isl_space_range_map(copy());
15937 return manage(res);
15938 }
15939
range_product(space right)15940 space space::range_product(space right) const
15941 {
15942 auto res = isl_space_range_product(copy(), right.release());
15943 return manage(res);
15944 }
15945
reset_tuple_id(isl::dim type)15946 space space::reset_tuple_id(isl::dim type) const
15947 {
15948 auto res = isl_space_reset_tuple_id(copy(), static_cast<enum isl_dim_type>(type));
15949 return manage(res);
15950 }
15951
reset_user()15952 space space::reset_user() const
15953 {
15954 auto res = isl_space_reset_user(copy());
15955 return manage(res);
15956 }
15957
reverse()15958 space space::reverse() const
15959 {
15960 auto res = isl_space_reverse(copy());
15961 return manage(res);
15962 }
15963
set_dim_id(isl::dim type,unsigned int pos,id id)15964 space space::set_dim_id(isl::dim type, unsigned int pos, id id) const
15965 {
15966 auto res = isl_space_set_dim_id(copy(), static_cast<enum isl_dim_type>(type), pos, id.release());
15967 return manage(res);
15968 }
15969
set_from_params()15970 space space::set_from_params() const
15971 {
15972 auto res = isl_space_set_from_params(copy());
15973 return manage(res);
15974 }
15975
set_tuple_id(isl::dim type,id id)15976 space space::set_tuple_id(isl::dim type, id id) const
15977 {
15978 auto res = isl_space_set_tuple_id(copy(), static_cast<enum isl_dim_type>(type), id.release());
15979 return manage(res);
15980 }
15981
set_tuple_name(isl::dim type,const std::string & s)15982 space space::set_tuple_name(isl::dim type, const std::string &s) const
15983 {
15984 auto res = isl_space_set_tuple_name(copy(), static_cast<enum isl_dim_type>(type), s.c_str());
15985 return manage(res);
15986 }
15987
tuple_is_equal(isl::dim type1,const space & space2,isl::dim type2)15988 boolean space::tuple_is_equal(isl::dim type1, const space &space2, isl::dim type2) const
15989 {
15990 auto res = isl_space_tuple_is_equal(get(), static_cast<enum isl_dim_type>(type1), space2.get(), static_cast<enum isl_dim_type>(type2));
15991 return manage(res);
15992 }
15993
uncurry()15994 space space::uncurry() const
15995 {
15996 auto res = isl_space_uncurry(copy());
15997 return manage(res);
15998 }
15999
unwrap()16000 space space::unwrap() const
16001 {
16002 auto res = isl_space_unwrap(copy());
16003 return manage(res);
16004 }
16005
wrap()16006 space space::wrap() const
16007 {
16008 auto res = isl_space_wrap(copy());
16009 return manage(res);
16010 }
16011
zip()16012 space space::zip() const
16013 {
16014 auto res = isl_space_zip(copy());
16015 return manage(res);
16016 }
16017
16018 // implementations for isl::term
manage(__isl_take isl_term * ptr)16019 term manage(__isl_take isl_term *ptr) {
16020 return term(ptr);
16021 }
manage_copy(__isl_keep isl_term * ptr)16022 term manage_copy(__isl_keep isl_term *ptr) {
16023 ptr = isl_term_copy(ptr);
16024 return term(ptr);
16025 }
16026
term()16027 term::term()
16028 : ptr(nullptr) {}
16029
term(const term & obj)16030 term::term(const term &obj)
16031 : ptr(nullptr)
16032 {
16033 ptr = obj.copy();
16034 }
term(std::nullptr_t)16035 term::term(std::nullptr_t)
16036 : ptr(nullptr) {}
16037
16038
term(__isl_take isl_term * ptr)16039 term::term(__isl_take isl_term *ptr)
16040 : ptr(ptr) {}
16041
16042
16043 term &term::operator=(term obj) {
16044 std::swap(this->ptr, obj.ptr);
16045 return *this;
16046 }
16047
~term()16048 term::~term() {
16049 if (ptr)
16050 isl_term_free(ptr);
16051 }
16052
copy()16053 __isl_give isl_term *term::copy() const & {
16054 return isl_term_copy(ptr);
16055 }
16056
get()16057 __isl_keep isl_term *term::get() const {
16058 return ptr;
16059 }
16060
release()16061 __isl_give isl_term *term::release() {
16062 isl_term *tmp = ptr;
16063 ptr = nullptr;
16064 return tmp;
16065 }
16066
is_null()16067 bool term::is_null() const {
16068 return ptr == nullptr;
16069 }
16070 term::operator bool() const {
16071 return !is_null();
16072 }
16073
16074
get_ctx()16075 ctx term::get_ctx() const {
16076 return ctx(isl_term_get_ctx(ptr));
16077 }
16078
16079
dim(isl::dim type)16080 unsigned int term::dim(isl::dim type) const
16081 {
16082 auto res = isl_term_dim(get(), static_cast<enum isl_dim_type>(type));
16083 return res;
16084 }
16085
get_coefficient_val()16086 val term::get_coefficient_val() const
16087 {
16088 auto res = isl_term_get_coefficient_val(get());
16089 return manage(res);
16090 }
16091
get_div(unsigned int pos)16092 aff term::get_div(unsigned int pos) const
16093 {
16094 auto res = isl_term_get_div(get(), pos);
16095 return manage(res);
16096 }
16097
get_exp(isl::dim type,unsigned int pos)16098 int term::get_exp(isl::dim type, unsigned int pos) const
16099 {
16100 auto res = isl_term_get_exp(get(), static_cast<enum isl_dim_type>(type), pos);
16101 return res;
16102 }
16103
16104 // implementations for isl::union_access_info
manage(__isl_take isl_union_access_info * ptr)16105 union_access_info manage(__isl_take isl_union_access_info *ptr) {
16106 return union_access_info(ptr);
16107 }
manage_copy(__isl_keep isl_union_access_info * ptr)16108 union_access_info manage_copy(__isl_keep isl_union_access_info *ptr) {
16109 ptr = isl_union_access_info_copy(ptr);
16110 return union_access_info(ptr);
16111 }
16112
union_access_info()16113 union_access_info::union_access_info()
16114 : ptr(nullptr) {}
16115
union_access_info(const union_access_info & obj)16116 union_access_info::union_access_info(const union_access_info &obj)
16117 : ptr(nullptr)
16118 {
16119 ptr = obj.copy();
16120 }
union_access_info(std::nullptr_t)16121 union_access_info::union_access_info(std::nullptr_t)
16122 : ptr(nullptr) {}
16123
16124
union_access_info(__isl_take isl_union_access_info * ptr)16125 union_access_info::union_access_info(__isl_take isl_union_access_info *ptr)
16126 : ptr(ptr) {}
16127
union_access_info(union_map sink)16128 union_access_info::union_access_info(union_map sink)
16129 {
16130 auto res = isl_union_access_info_from_sink(sink.release());
16131 ptr = res;
16132 }
16133
16134 union_access_info &union_access_info::operator=(union_access_info obj) {
16135 std::swap(this->ptr, obj.ptr);
16136 return *this;
16137 }
16138
~union_access_info()16139 union_access_info::~union_access_info() {
16140 if (ptr)
16141 isl_union_access_info_free(ptr);
16142 }
16143
copy()16144 __isl_give isl_union_access_info *union_access_info::copy() const & {
16145 return isl_union_access_info_copy(ptr);
16146 }
16147
get()16148 __isl_keep isl_union_access_info *union_access_info::get() const {
16149 return ptr;
16150 }
16151
release()16152 __isl_give isl_union_access_info *union_access_info::release() {
16153 isl_union_access_info *tmp = ptr;
16154 ptr = nullptr;
16155 return tmp;
16156 }
16157
is_null()16158 bool union_access_info::is_null() const {
16159 return ptr == nullptr;
16160 }
16161 union_access_info::operator bool() const {
16162 return !is_null();
16163 }
16164
16165
get_ctx()16166 ctx union_access_info::get_ctx() const {
16167 return ctx(isl_union_access_info_get_ctx(ptr));
16168 }
to_str()16169 std::string union_access_info::to_str() const {
16170 char *Tmp = isl_union_access_info_to_str(get());
16171 if (!Tmp)
16172 return "";
16173 std::string S(Tmp);
16174 free(Tmp);
16175 return S;
16176 }
16177
16178
16179
compute_flow()16180 union_flow union_access_info::compute_flow() const
16181 {
16182 auto res = isl_union_access_info_compute_flow(copy());
16183 return manage(res);
16184 }
16185
set_kill(union_map kill)16186 union_access_info union_access_info::set_kill(union_map kill) const
16187 {
16188 auto res = isl_union_access_info_set_kill(copy(), kill.release());
16189 return manage(res);
16190 }
16191
set_may_source(union_map may_source)16192 union_access_info union_access_info::set_may_source(union_map may_source) const
16193 {
16194 auto res = isl_union_access_info_set_may_source(copy(), may_source.release());
16195 return manage(res);
16196 }
16197
set_must_source(union_map must_source)16198 union_access_info union_access_info::set_must_source(union_map must_source) const
16199 {
16200 auto res = isl_union_access_info_set_must_source(copy(), must_source.release());
16201 return manage(res);
16202 }
16203
set_schedule(schedule schedule)16204 union_access_info union_access_info::set_schedule(schedule schedule) const
16205 {
16206 auto res = isl_union_access_info_set_schedule(copy(), schedule.release());
16207 return manage(res);
16208 }
16209
set_schedule_map(union_map schedule_map)16210 union_access_info union_access_info::set_schedule_map(union_map schedule_map) const
16211 {
16212 auto res = isl_union_access_info_set_schedule_map(copy(), schedule_map.release());
16213 return manage(res);
16214 }
16215
16216 // implementations for isl::union_flow
manage(__isl_take isl_union_flow * ptr)16217 union_flow manage(__isl_take isl_union_flow *ptr) {
16218 return union_flow(ptr);
16219 }
manage_copy(__isl_keep isl_union_flow * ptr)16220 union_flow manage_copy(__isl_keep isl_union_flow *ptr) {
16221 ptr = isl_union_flow_copy(ptr);
16222 return union_flow(ptr);
16223 }
16224
union_flow()16225 union_flow::union_flow()
16226 : ptr(nullptr) {}
16227
union_flow(const union_flow & obj)16228 union_flow::union_flow(const union_flow &obj)
16229 : ptr(nullptr)
16230 {
16231 ptr = obj.copy();
16232 }
union_flow(std::nullptr_t)16233 union_flow::union_flow(std::nullptr_t)
16234 : ptr(nullptr) {}
16235
16236
union_flow(__isl_take isl_union_flow * ptr)16237 union_flow::union_flow(__isl_take isl_union_flow *ptr)
16238 : ptr(ptr) {}
16239
16240
16241 union_flow &union_flow::operator=(union_flow obj) {
16242 std::swap(this->ptr, obj.ptr);
16243 return *this;
16244 }
16245
~union_flow()16246 union_flow::~union_flow() {
16247 if (ptr)
16248 isl_union_flow_free(ptr);
16249 }
16250
copy()16251 __isl_give isl_union_flow *union_flow::copy() const & {
16252 return isl_union_flow_copy(ptr);
16253 }
16254
get()16255 __isl_keep isl_union_flow *union_flow::get() const {
16256 return ptr;
16257 }
16258
release()16259 __isl_give isl_union_flow *union_flow::release() {
16260 isl_union_flow *tmp = ptr;
16261 ptr = nullptr;
16262 return tmp;
16263 }
16264
is_null()16265 bool union_flow::is_null() const {
16266 return ptr == nullptr;
16267 }
16268 union_flow::operator bool() const {
16269 return !is_null();
16270 }
16271
16272
get_ctx()16273 ctx union_flow::get_ctx() const {
16274 return ctx(isl_union_flow_get_ctx(ptr));
16275 }
to_str()16276 std::string union_flow::to_str() const {
16277 char *Tmp = isl_union_flow_to_str(get());
16278 if (!Tmp)
16279 return "";
16280 std::string S(Tmp);
16281 free(Tmp);
16282 return S;
16283 }
16284
16285
16286
get_full_may_dependence()16287 union_map union_flow::get_full_may_dependence() const
16288 {
16289 auto res = isl_union_flow_get_full_may_dependence(get());
16290 return manage(res);
16291 }
16292
get_full_must_dependence()16293 union_map union_flow::get_full_must_dependence() const
16294 {
16295 auto res = isl_union_flow_get_full_must_dependence(get());
16296 return manage(res);
16297 }
16298
get_may_dependence()16299 union_map union_flow::get_may_dependence() const
16300 {
16301 auto res = isl_union_flow_get_may_dependence(get());
16302 return manage(res);
16303 }
16304
get_may_no_source()16305 union_map union_flow::get_may_no_source() const
16306 {
16307 auto res = isl_union_flow_get_may_no_source(get());
16308 return manage(res);
16309 }
16310
get_must_dependence()16311 union_map union_flow::get_must_dependence() const
16312 {
16313 auto res = isl_union_flow_get_must_dependence(get());
16314 return manage(res);
16315 }
16316
get_must_no_source()16317 union_map union_flow::get_must_no_source() const
16318 {
16319 auto res = isl_union_flow_get_must_no_source(get());
16320 return manage(res);
16321 }
16322
16323 // implementations for isl::union_map
manage(__isl_take isl_union_map * ptr)16324 union_map manage(__isl_take isl_union_map *ptr) {
16325 return union_map(ptr);
16326 }
manage_copy(__isl_keep isl_union_map * ptr)16327 union_map manage_copy(__isl_keep isl_union_map *ptr) {
16328 ptr = isl_union_map_copy(ptr);
16329 return union_map(ptr);
16330 }
16331
union_map()16332 union_map::union_map()
16333 : ptr(nullptr) {}
16334
union_map(const union_map & obj)16335 union_map::union_map(const union_map &obj)
16336 : ptr(nullptr)
16337 {
16338 ptr = obj.copy();
16339 }
union_map(std::nullptr_t)16340 union_map::union_map(std::nullptr_t)
16341 : ptr(nullptr) {}
16342
16343
union_map(__isl_take isl_union_map * ptr)16344 union_map::union_map(__isl_take isl_union_map *ptr)
16345 : ptr(ptr) {}
16346
union_map(union_pw_multi_aff upma)16347 union_map::union_map(union_pw_multi_aff upma)
16348 {
16349 auto res = isl_union_map_from_union_pw_multi_aff(upma.release());
16350 ptr = res;
16351 }
union_map(basic_map bmap)16352 union_map::union_map(basic_map bmap)
16353 {
16354 auto res = isl_union_map_from_basic_map(bmap.release());
16355 ptr = res;
16356 }
union_map(map map)16357 union_map::union_map(map map)
16358 {
16359 auto res = isl_union_map_from_map(map.release());
16360 ptr = res;
16361 }
union_map(ctx ctx,const std::string & str)16362 union_map::union_map(ctx ctx, const std::string &str)
16363 {
16364 auto res = isl_union_map_read_from_str(ctx.release(), str.c_str());
16365 ptr = res;
16366 }
16367
16368 union_map &union_map::operator=(union_map obj) {
16369 std::swap(this->ptr, obj.ptr);
16370 return *this;
16371 }
16372
~union_map()16373 union_map::~union_map() {
16374 if (ptr)
16375 isl_union_map_free(ptr);
16376 }
16377
copy()16378 __isl_give isl_union_map *union_map::copy() const & {
16379 return isl_union_map_copy(ptr);
16380 }
16381
get()16382 __isl_keep isl_union_map *union_map::get() const {
16383 return ptr;
16384 }
16385
release()16386 __isl_give isl_union_map *union_map::release() {
16387 isl_union_map *tmp = ptr;
16388 ptr = nullptr;
16389 return tmp;
16390 }
16391
is_null()16392 bool union_map::is_null() const {
16393 return ptr == nullptr;
16394 }
16395 union_map::operator bool() const {
16396 return !is_null();
16397 }
16398
16399
get_ctx()16400 ctx union_map::get_ctx() const {
16401 return ctx(isl_union_map_get_ctx(ptr));
16402 }
to_str()16403 std::string union_map::to_str() const {
16404 char *Tmp = isl_union_map_to_str(get());
16405 if (!Tmp)
16406 return "";
16407 std::string S(Tmp);
16408 free(Tmp);
16409 return S;
16410 }
16411
16412
dump()16413 void union_map::dump() const {
16414 isl_union_map_dump(get());
16415 }
16416
16417
add_map(map map)16418 union_map union_map::add_map(map map) const
16419 {
16420 auto res = isl_union_map_add_map(copy(), map.release());
16421 return manage(res);
16422 }
16423
affine_hull()16424 union_map union_map::affine_hull() const
16425 {
16426 auto res = isl_union_map_affine_hull(copy());
16427 return manage(res);
16428 }
16429
align_params(space model)16430 union_map union_map::align_params(space model) const
16431 {
16432 auto res = isl_union_map_align_params(copy(), model.release());
16433 return manage(res);
16434 }
16435
apply_domain(union_map umap2)16436 union_map union_map::apply_domain(union_map umap2) const
16437 {
16438 auto res = isl_union_map_apply_domain(copy(), umap2.release());
16439 return manage(res);
16440 }
16441
apply_range(union_map umap2)16442 union_map union_map::apply_range(union_map umap2) const
16443 {
16444 auto res = isl_union_map_apply_range(copy(), umap2.release());
16445 return manage(res);
16446 }
16447
coalesce()16448 union_map union_map::coalesce() const
16449 {
16450 auto res = isl_union_map_coalesce(copy());
16451 return manage(res);
16452 }
16453
contains(const space & space)16454 boolean union_map::contains(const space &space) const
16455 {
16456 auto res = isl_union_map_contains(get(), space.get());
16457 return manage(res);
16458 }
16459
curry()16460 union_map union_map::curry() const
16461 {
16462 auto res = isl_union_map_curry(copy());
16463 return manage(res);
16464 }
16465
deltas()16466 union_set union_map::deltas() const
16467 {
16468 auto res = isl_union_map_deltas(copy());
16469 return manage(res);
16470 }
16471
deltas_map()16472 union_map union_map::deltas_map() const
16473 {
16474 auto res = isl_union_map_deltas_map(copy());
16475 return manage(res);
16476 }
16477
detect_equalities()16478 union_map union_map::detect_equalities() const
16479 {
16480 auto res = isl_union_map_detect_equalities(copy());
16481 return manage(res);
16482 }
16483
dim(isl::dim type)16484 unsigned int union_map::dim(isl::dim type) const
16485 {
16486 auto res = isl_union_map_dim(get(), static_cast<enum isl_dim_type>(type));
16487 return res;
16488 }
16489
domain()16490 union_set union_map::domain() const
16491 {
16492 auto res = isl_union_map_domain(copy());
16493 return manage(res);
16494 }
16495
domain_factor_domain()16496 union_map union_map::domain_factor_domain() const
16497 {
16498 auto res = isl_union_map_domain_factor_domain(copy());
16499 return manage(res);
16500 }
16501
domain_factor_range()16502 union_map union_map::domain_factor_range() const
16503 {
16504 auto res = isl_union_map_domain_factor_range(copy());
16505 return manage(res);
16506 }
16507
domain_map()16508 union_map union_map::domain_map() const
16509 {
16510 auto res = isl_union_map_domain_map(copy());
16511 return manage(res);
16512 }
16513
domain_map_union_pw_multi_aff()16514 union_pw_multi_aff union_map::domain_map_union_pw_multi_aff() const
16515 {
16516 auto res = isl_union_map_domain_map_union_pw_multi_aff(copy());
16517 return manage(res);
16518 }
16519
domain_product(union_map umap2)16520 union_map union_map::domain_product(union_map umap2) const
16521 {
16522 auto res = isl_union_map_domain_product(copy(), umap2.release());
16523 return manage(res);
16524 }
16525
empty(space space)16526 union_map union_map::empty(space space)
16527 {
16528 auto res = isl_union_map_empty(space.release());
16529 return manage(res);
16530 }
16531
eq_at(multi_union_pw_aff mupa)16532 union_map union_map::eq_at(multi_union_pw_aff mupa) const
16533 {
16534 auto res = isl_union_map_eq_at_multi_union_pw_aff(copy(), mupa.release());
16535 return manage(res);
16536 }
16537
extract_map(space dim)16538 map union_map::extract_map(space dim) const
16539 {
16540 auto res = isl_union_map_extract_map(get(), dim.release());
16541 return manage(res);
16542 }
16543
factor_domain()16544 union_map union_map::factor_domain() const
16545 {
16546 auto res = isl_union_map_factor_domain(copy());
16547 return manage(res);
16548 }
16549
factor_range()16550 union_map union_map::factor_range() const
16551 {
16552 auto res = isl_union_map_factor_range(copy());
16553 return manage(res);
16554 }
16555
find_dim_by_name(isl::dim type,const std::string & name)16556 int union_map::find_dim_by_name(isl::dim type, const std::string &name) const
16557 {
16558 auto res = isl_union_map_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
16559 return res;
16560 }
16561
fixed_power(val exp)16562 union_map union_map::fixed_power(val exp) const
16563 {
16564 auto res = isl_union_map_fixed_power_val(copy(), exp.release());
16565 return manage(res);
16566 }
16567
flat_domain_product(union_map umap2)16568 union_map union_map::flat_domain_product(union_map umap2) const
16569 {
16570 auto res = isl_union_map_flat_domain_product(copy(), umap2.release());
16571 return manage(res);
16572 }
16573
flat_range_product(union_map umap2)16574 union_map union_map::flat_range_product(union_map umap2) const
16575 {
16576 auto res = isl_union_map_flat_range_product(copy(), umap2.release());
16577 return manage(res);
16578 }
16579
foreach_map(const std::function<stat (map)> & fn)16580 stat union_map::foreach_map(const std::function<stat(map)> &fn) const
16581 {
16582 struct fn_data {
16583 const std::function<stat(map)> *func;
16584 } fn_data = { &fn };
16585 auto fn_lambda = [](isl_map *arg_0, void *arg_1) -> isl_stat {
16586 auto *data = static_cast<struct fn_data *>(arg_1);
16587 stat ret = (*data->func)(manage(arg_0));
16588 return ret.release();
16589 };
16590 auto res = isl_union_map_foreach_map(get(), fn_lambda, &fn_data);
16591 return manage(res);
16592 }
16593
from(multi_union_pw_aff mupa)16594 union_map union_map::from(multi_union_pw_aff mupa)
16595 {
16596 auto res = isl_union_map_from_multi_union_pw_aff(mupa.release());
16597 return manage(res);
16598 }
16599
from_domain(union_set uset)16600 union_map union_map::from_domain(union_set uset)
16601 {
16602 auto res = isl_union_map_from_domain(uset.release());
16603 return manage(res);
16604 }
16605
from_domain_and_range(union_set domain,union_set range)16606 union_map union_map::from_domain_and_range(union_set domain, union_set range)
16607 {
16608 auto res = isl_union_map_from_domain_and_range(domain.release(), range.release());
16609 return manage(res);
16610 }
16611
from_range(union_set uset)16612 union_map union_map::from_range(union_set uset)
16613 {
16614 auto res = isl_union_map_from_range(uset.release());
16615 return manage(res);
16616 }
16617
from_union_pw_aff(union_pw_aff upa)16618 union_map union_map::from_union_pw_aff(union_pw_aff upa)
16619 {
16620 auto res = isl_union_map_from_union_pw_aff(upa.release());
16621 return manage(res);
16622 }
16623
get_dim_id(isl::dim type,unsigned int pos)16624 id union_map::get_dim_id(isl::dim type, unsigned int pos) const
16625 {
16626 auto res = isl_union_map_get_dim_id(get(), static_cast<enum isl_dim_type>(type), pos);
16627 return manage(res);
16628 }
16629
get_hash()16630 uint32_t union_map::get_hash() const
16631 {
16632 auto res = isl_union_map_get_hash(get());
16633 return res;
16634 }
16635
get_map_list()16636 map_list union_map::get_map_list() const
16637 {
16638 auto res = isl_union_map_get_map_list(get());
16639 return manage(res);
16640 }
16641
get_space()16642 space union_map::get_space() const
16643 {
16644 auto res = isl_union_map_get_space(get());
16645 return manage(res);
16646 }
16647
gist(union_map context)16648 union_map union_map::gist(union_map context) const
16649 {
16650 auto res = isl_union_map_gist(copy(), context.release());
16651 return manage(res);
16652 }
16653
gist_domain(union_set uset)16654 union_map union_map::gist_domain(union_set uset) const
16655 {
16656 auto res = isl_union_map_gist_domain(copy(), uset.release());
16657 return manage(res);
16658 }
16659
gist_params(set set)16660 union_map union_map::gist_params(set set) const
16661 {
16662 auto res = isl_union_map_gist_params(copy(), set.release());
16663 return manage(res);
16664 }
16665
gist_range(union_set uset)16666 union_map union_map::gist_range(union_set uset) const
16667 {
16668 auto res = isl_union_map_gist_range(copy(), uset.release());
16669 return manage(res);
16670 }
16671
intersect(union_map umap2)16672 union_map union_map::intersect(union_map umap2) const
16673 {
16674 auto res = isl_union_map_intersect(copy(), umap2.release());
16675 return manage(res);
16676 }
16677
intersect_domain(union_set uset)16678 union_map union_map::intersect_domain(union_set uset) const
16679 {
16680 auto res = isl_union_map_intersect_domain(copy(), uset.release());
16681 return manage(res);
16682 }
16683
intersect_params(set set)16684 union_map union_map::intersect_params(set set) const
16685 {
16686 auto res = isl_union_map_intersect_params(copy(), set.release());
16687 return manage(res);
16688 }
16689
intersect_range(union_set uset)16690 union_map union_map::intersect_range(union_set uset) const
16691 {
16692 auto res = isl_union_map_intersect_range(copy(), uset.release());
16693 return manage(res);
16694 }
16695
intersect_range_factor_range(union_map factor)16696 union_map union_map::intersect_range_factor_range(union_map factor) const
16697 {
16698 auto res = isl_union_map_intersect_range_factor_range(copy(), factor.release());
16699 return manage(res);
16700 }
16701
involves_dims(isl::dim type,unsigned int first,unsigned int n)16702 boolean union_map::involves_dims(isl::dim type, unsigned int first, unsigned int n) const
16703 {
16704 auto res = isl_union_map_involves_dims(get(), static_cast<enum isl_dim_type>(type), first, n);
16705 return manage(res);
16706 }
16707
is_bijective()16708 boolean union_map::is_bijective() const
16709 {
16710 auto res = isl_union_map_is_bijective(get());
16711 return manage(res);
16712 }
16713
is_disjoint(const union_map & umap2)16714 boolean union_map::is_disjoint(const union_map &umap2) const
16715 {
16716 auto res = isl_union_map_is_disjoint(get(), umap2.get());
16717 return manage(res);
16718 }
16719
is_empty()16720 boolean union_map::is_empty() const
16721 {
16722 auto res = isl_union_map_is_empty(get());
16723 return manage(res);
16724 }
16725
is_equal(const union_map & umap2)16726 boolean union_map::is_equal(const union_map &umap2) const
16727 {
16728 auto res = isl_union_map_is_equal(get(), umap2.get());
16729 return manage(res);
16730 }
16731
is_identity()16732 boolean union_map::is_identity() const
16733 {
16734 auto res = isl_union_map_is_identity(get());
16735 return manage(res);
16736 }
16737
is_injective()16738 boolean union_map::is_injective() const
16739 {
16740 auto res = isl_union_map_is_injective(get());
16741 return manage(res);
16742 }
16743
is_single_valued()16744 boolean union_map::is_single_valued() const
16745 {
16746 auto res = isl_union_map_is_single_valued(get());
16747 return manage(res);
16748 }
16749
is_strict_subset(const union_map & umap2)16750 boolean union_map::is_strict_subset(const union_map &umap2) const
16751 {
16752 auto res = isl_union_map_is_strict_subset(get(), umap2.get());
16753 return manage(res);
16754 }
16755
is_subset(const union_map & umap2)16756 boolean union_map::is_subset(const union_map &umap2) const
16757 {
16758 auto res = isl_union_map_is_subset(get(), umap2.get());
16759 return manage(res);
16760 }
16761
lex_ge_union_map(union_map umap2)16762 union_map union_map::lex_ge_union_map(union_map umap2) const
16763 {
16764 auto res = isl_union_map_lex_ge_union_map(copy(), umap2.release());
16765 return manage(res);
16766 }
16767
lex_gt_at_multi_union_pw_aff(multi_union_pw_aff mupa)16768 union_map union_map::lex_gt_at_multi_union_pw_aff(multi_union_pw_aff mupa) const
16769 {
16770 auto res = isl_union_map_lex_gt_at_multi_union_pw_aff(copy(), mupa.release());
16771 return manage(res);
16772 }
16773
lex_gt_union_map(union_map umap2)16774 union_map union_map::lex_gt_union_map(union_map umap2) const
16775 {
16776 auto res = isl_union_map_lex_gt_union_map(copy(), umap2.release());
16777 return manage(res);
16778 }
16779
lex_le_union_map(union_map umap2)16780 union_map union_map::lex_le_union_map(union_map umap2) const
16781 {
16782 auto res = isl_union_map_lex_le_union_map(copy(), umap2.release());
16783 return manage(res);
16784 }
16785
lex_lt_at_multi_union_pw_aff(multi_union_pw_aff mupa)16786 union_map union_map::lex_lt_at_multi_union_pw_aff(multi_union_pw_aff mupa) const
16787 {
16788 auto res = isl_union_map_lex_lt_at_multi_union_pw_aff(copy(), mupa.release());
16789 return manage(res);
16790 }
16791
lex_lt_union_map(union_map umap2)16792 union_map union_map::lex_lt_union_map(union_map umap2) const
16793 {
16794 auto res = isl_union_map_lex_lt_union_map(copy(), umap2.release());
16795 return manage(res);
16796 }
16797
lexmax()16798 union_map union_map::lexmax() const
16799 {
16800 auto res = isl_union_map_lexmax(copy());
16801 return manage(res);
16802 }
16803
lexmin()16804 union_map union_map::lexmin() const
16805 {
16806 auto res = isl_union_map_lexmin(copy());
16807 return manage(res);
16808 }
16809
n_map()16810 int union_map::n_map() const
16811 {
16812 auto res = isl_union_map_n_map(get());
16813 return res;
16814 }
16815
params()16816 set union_map::params() const
16817 {
16818 auto res = isl_union_map_params(copy());
16819 return manage(res);
16820 }
16821
plain_is_empty()16822 boolean union_map::plain_is_empty() const
16823 {
16824 auto res = isl_union_map_plain_is_empty(get());
16825 return manage(res);
16826 }
16827
plain_is_injective()16828 boolean union_map::plain_is_injective() const
16829 {
16830 auto res = isl_union_map_plain_is_injective(get());
16831 return manage(res);
16832 }
16833
polyhedral_hull()16834 union_map union_map::polyhedral_hull() const
16835 {
16836 auto res = isl_union_map_polyhedral_hull(copy());
16837 return manage(res);
16838 }
16839
preimage_domain_multi_aff(multi_aff ma)16840 union_map union_map::preimage_domain_multi_aff(multi_aff ma) const
16841 {
16842 auto res = isl_union_map_preimage_domain_multi_aff(copy(), ma.release());
16843 return manage(res);
16844 }
16845
preimage_domain_multi_pw_aff(multi_pw_aff mpa)16846 union_map union_map::preimage_domain_multi_pw_aff(multi_pw_aff mpa) const
16847 {
16848 auto res = isl_union_map_preimage_domain_multi_pw_aff(copy(), mpa.release());
16849 return manage(res);
16850 }
16851
preimage_domain_pw_multi_aff(pw_multi_aff pma)16852 union_map union_map::preimage_domain_pw_multi_aff(pw_multi_aff pma) const
16853 {
16854 auto res = isl_union_map_preimage_domain_pw_multi_aff(copy(), pma.release());
16855 return manage(res);
16856 }
16857
preimage_domain_union_pw_multi_aff(union_pw_multi_aff upma)16858 union_map union_map::preimage_domain_union_pw_multi_aff(union_pw_multi_aff upma) const
16859 {
16860 auto res = isl_union_map_preimage_domain_union_pw_multi_aff(copy(), upma.release());
16861 return manage(res);
16862 }
16863
preimage_range_multi_aff(multi_aff ma)16864 union_map union_map::preimage_range_multi_aff(multi_aff ma) const
16865 {
16866 auto res = isl_union_map_preimage_range_multi_aff(copy(), ma.release());
16867 return manage(res);
16868 }
16869
preimage_range_pw_multi_aff(pw_multi_aff pma)16870 union_map union_map::preimage_range_pw_multi_aff(pw_multi_aff pma) const
16871 {
16872 auto res = isl_union_map_preimage_range_pw_multi_aff(copy(), pma.release());
16873 return manage(res);
16874 }
16875
preimage_range_union_pw_multi_aff(union_pw_multi_aff upma)16876 union_map union_map::preimage_range_union_pw_multi_aff(union_pw_multi_aff upma) const
16877 {
16878 auto res = isl_union_map_preimage_range_union_pw_multi_aff(copy(), upma.release());
16879 return manage(res);
16880 }
16881
product(union_map umap2)16882 union_map union_map::product(union_map umap2) const
16883 {
16884 auto res = isl_union_map_product(copy(), umap2.release());
16885 return manage(res);
16886 }
16887
project_out(isl::dim type,unsigned int first,unsigned int n)16888 union_map union_map::project_out(isl::dim type, unsigned int first, unsigned int n) const
16889 {
16890 auto res = isl_union_map_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
16891 return manage(res);
16892 }
16893
project_out_all_params()16894 union_map union_map::project_out_all_params() const
16895 {
16896 auto res = isl_union_map_project_out_all_params(copy());
16897 return manage(res);
16898 }
16899
range()16900 union_set union_map::range() const
16901 {
16902 auto res = isl_union_map_range(copy());
16903 return manage(res);
16904 }
16905
range_curry()16906 union_map union_map::range_curry() const
16907 {
16908 auto res = isl_union_map_range_curry(copy());
16909 return manage(res);
16910 }
16911
range_factor_domain()16912 union_map union_map::range_factor_domain() const
16913 {
16914 auto res = isl_union_map_range_factor_domain(copy());
16915 return manage(res);
16916 }
16917
range_factor_range()16918 union_map union_map::range_factor_range() const
16919 {
16920 auto res = isl_union_map_range_factor_range(copy());
16921 return manage(res);
16922 }
16923
range_map()16924 union_map union_map::range_map() const
16925 {
16926 auto res = isl_union_map_range_map(copy());
16927 return manage(res);
16928 }
16929
range_product(union_map umap2)16930 union_map union_map::range_product(union_map umap2) const
16931 {
16932 auto res = isl_union_map_range_product(copy(), umap2.release());
16933 return manage(res);
16934 }
16935
remove_divs()16936 union_map union_map::remove_divs() const
16937 {
16938 auto res = isl_union_map_remove_divs(copy());
16939 return manage(res);
16940 }
16941
remove_redundancies()16942 union_map union_map::remove_redundancies() const
16943 {
16944 auto res = isl_union_map_remove_redundancies(copy());
16945 return manage(res);
16946 }
16947
reset_user()16948 union_map union_map::reset_user() const
16949 {
16950 auto res = isl_union_map_reset_user(copy());
16951 return manage(res);
16952 }
16953
reverse()16954 union_map union_map::reverse() const
16955 {
16956 auto res = isl_union_map_reverse(copy());
16957 return manage(res);
16958 }
16959
sample()16960 basic_map union_map::sample() const
16961 {
16962 auto res = isl_union_map_sample(copy());
16963 return manage(res);
16964 }
16965
simple_hull()16966 union_map union_map::simple_hull() const
16967 {
16968 auto res = isl_union_map_simple_hull(copy());
16969 return manage(res);
16970 }
16971
subtract(union_map umap2)16972 union_map union_map::subtract(union_map umap2) const
16973 {
16974 auto res = isl_union_map_subtract(copy(), umap2.release());
16975 return manage(res);
16976 }
16977
subtract_domain(union_set dom)16978 union_map union_map::subtract_domain(union_set dom) const
16979 {
16980 auto res = isl_union_map_subtract_domain(copy(), dom.release());
16981 return manage(res);
16982 }
16983
subtract_range(union_set dom)16984 union_map union_map::subtract_range(union_set dom) const
16985 {
16986 auto res = isl_union_map_subtract_range(copy(), dom.release());
16987 return manage(res);
16988 }
16989
uncurry()16990 union_map union_map::uncurry() const
16991 {
16992 auto res = isl_union_map_uncurry(copy());
16993 return manage(res);
16994 }
16995
unite(union_map umap2)16996 union_map union_map::unite(union_map umap2) const
16997 {
16998 auto res = isl_union_map_union(copy(), umap2.release());
16999 return manage(res);
17000 }
17001
universe()17002 union_map union_map::universe() const
17003 {
17004 auto res = isl_union_map_universe(copy());
17005 return manage(res);
17006 }
17007
wrap()17008 union_set union_map::wrap() const
17009 {
17010 auto res = isl_union_map_wrap(copy());
17011 return manage(res);
17012 }
17013
zip()17014 union_map union_map::zip() const
17015 {
17016 auto res = isl_union_map_zip(copy());
17017 return manage(res);
17018 }
17019
17020 // implementations for isl::union_map_list
manage(__isl_take isl_union_map_list * ptr)17021 union_map_list manage(__isl_take isl_union_map_list *ptr) {
17022 return union_map_list(ptr);
17023 }
manage_copy(__isl_keep isl_union_map_list * ptr)17024 union_map_list manage_copy(__isl_keep isl_union_map_list *ptr) {
17025 ptr = isl_union_map_list_copy(ptr);
17026 return union_map_list(ptr);
17027 }
17028
union_map_list()17029 union_map_list::union_map_list()
17030 : ptr(nullptr) {}
17031
union_map_list(const union_map_list & obj)17032 union_map_list::union_map_list(const union_map_list &obj)
17033 : ptr(nullptr)
17034 {
17035 ptr = obj.copy();
17036 }
union_map_list(std::nullptr_t)17037 union_map_list::union_map_list(std::nullptr_t)
17038 : ptr(nullptr) {}
17039
17040
union_map_list(__isl_take isl_union_map_list * ptr)17041 union_map_list::union_map_list(__isl_take isl_union_map_list *ptr)
17042 : ptr(ptr) {}
17043
17044
17045 union_map_list &union_map_list::operator=(union_map_list obj) {
17046 std::swap(this->ptr, obj.ptr);
17047 return *this;
17048 }
17049
~union_map_list()17050 union_map_list::~union_map_list() {
17051 if (ptr)
17052 isl_union_map_list_free(ptr);
17053 }
17054
copy()17055 __isl_give isl_union_map_list *union_map_list::copy() const & {
17056 return isl_union_map_list_copy(ptr);
17057 }
17058
get()17059 __isl_keep isl_union_map_list *union_map_list::get() const {
17060 return ptr;
17061 }
17062
release()17063 __isl_give isl_union_map_list *union_map_list::release() {
17064 isl_union_map_list *tmp = ptr;
17065 ptr = nullptr;
17066 return tmp;
17067 }
17068
is_null()17069 bool union_map_list::is_null() const {
17070 return ptr == nullptr;
17071 }
17072 union_map_list::operator bool() const {
17073 return !is_null();
17074 }
17075
17076
get_ctx()17077 ctx union_map_list::get_ctx() const {
17078 return ctx(isl_union_map_list_get_ctx(ptr));
17079 }
17080
dump()17081 void union_map_list::dump() const {
17082 isl_union_map_list_dump(get());
17083 }
17084
17085
add(union_map el)17086 union_map_list union_map_list::add(union_map el) const
17087 {
17088 auto res = isl_union_map_list_add(copy(), el.release());
17089 return manage(res);
17090 }
17091
alloc(ctx ctx,int n)17092 union_map_list union_map_list::alloc(ctx ctx, int n)
17093 {
17094 auto res = isl_union_map_list_alloc(ctx.release(), n);
17095 return manage(res);
17096 }
17097
concat(union_map_list list2)17098 union_map_list union_map_list::concat(union_map_list list2) const
17099 {
17100 auto res = isl_union_map_list_concat(copy(), list2.release());
17101 return manage(res);
17102 }
17103
drop(unsigned int first,unsigned int n)17104 union_map_list union_map_list::drop(unsigned int first, unsigned int n) const
17105 {
17106 auto res = isl_union_map_list_drop(copy(), first, n);
17107 return manage(res);
17108 }
17109
foreach(const std::function<stat (union_map)> & fn)17110 stat union_map_list::foreach(const std::function<stat(union_map)> &fn) const
17111 {
17112 struct fn_data {
17113 const std::function<stat(union_map)> *func;
17114 } fn_data = { &fn };
17115 auto fn_lambda = [](isl_union_map *arg_0, void *arg_1) -> isl_stat {
17116 auto *data = static_cast<struct fn_data *>(arg_1);
17117 stat ret = (*data->func)(manage(arg_0));
17118 return ret.release();
17119 };
17120 auto res = isl_union_map_list_foreach(get(), fn_lambda, &fn_data);
17121 return manage(res);
17122 }
17123
from_union_map(union_map el)17124 union_map_list union_map_list::from_union_map(union_map el)
17125 {
17126 auto res = isl_union_map_list_from_union_map(el.release());
17127 return manage(res);
17128 }
17129
get_at(int index)17130 union_map union_map_list::get_at(int index) const
17131 {
17132 auto res = isl_union_map_list_get_at(get(), index);
17133 return manage(res);
17134 }
17135
get_union_map(int index)17136 union_map union_map_list::get_union_map(int index) const
17137 {
17138 auto res = isl_union_map_list_get_union_map(get(), index);
17139 return manage(res);
17140 }
17141
insert(unsigned int pos,union_map el)17142 union_map_list union_map_list::insert(unsigned int pos, union_map el) const
17143 {
17144 auto res = isl_union_map_list_insert(copy(), pos, el.release());
17145 return manage(res);
17146 }
17147
n_union_map()17148 int union_map_list::n_union_map() const
17149 {
17150 auto res = isl_union_map_list_n_union_map(get());
17151 return res;
17152 }
17153
reverse()17154 union_map_list union_map_list::reverse() const
17155 {
17156 auto res = isl_union_map_list_reverse(copy());
17157 return manage(res);
17158 }
17159
set_union_map(int index,union_map el)17160 union_map_list union_map_list::set_union_map(int index, union_map el) const
17161 {
17162 auto res = isl_union_map_list_set_union_map(copy(), index, el.release());
17163 return manage(res);
17164 }
17165
size()17166 int union_map_list::size() const
17167 {
17168 auto res = isl_union_map_list_size(get());
17169 return res;
17170 }
17171
swap(unsigned int pos1,unsigned int pos2)17172 union_map_list union_map_list::swap(unsigned int pos1, unsigned int pos2) const
17173 {
17174 auto res = isl_union_map_list_swap(copy(), pos1, pos2);
17175 return manage(res);
17176 }
17177
17178 // implementations for isl::union_pw_aff
manage(__isl_take isl_union_pw_aff * ptr)17179 union_pw_aff manage(__isl_take isl_union_pw_aff *ptr) {
17180 return union_pw_aff(ptr);
17181 }
manage_copy(__isl_keep isl_union_pw_aff * ptr)17182 union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr) {
17183 ptr = isl_union_pw_aff_copy(ptr);
17184 return union_pw_aff(ptr);
17185 }
17186
union_pw_aff()17187 union_pw_aff::union_pw_aff()
17188 : ptr(nullptr) {}
17189
union_pw_aff(const union_pw_aff & obj)17190 union_pw_aff::union_pw_aff(const union_pw_aff &obj)
17191 : ptr(nullptr)
17192 {
17193 ptr = obj.copy();
17194 }
union_pw_aff(std::nullptr_t)17195 union_pw_aff::union_pw_aff(std::nullptr_t)
17196 : ptr(nullptr) {}
17197
17198
union_pw_aff(__isl_take isl_union_pw_aff * ptr)17199 union_pw_aff::union_pw_aff(__isl_take isl_union_pw_aff *ptr)
17200 : ptr(ptr) {}
17201
union_pw_aff(pw_aff pa)17202 union_pw_aff::union_pw_aff(pw_aff pa)
17203 {
17204 auto res = isl_union_pw_aff_from_pw_aff(pa.release());
17205 ptr = res;
17206 }
union_pw_aff(union_set domain,val v)17207 union_pw_aff::union_pw_aff(union_set domain, val v)
17208 {
17209 auto res = isl_union_pw_aff_val_on_domain(domain.release(), v.release());
17210 ptr = res;
17211 }
union_pw_aff(ctx ctx,const std::string & str)17212 union_pw_aff::union_pw_aff(ctx ctx, const std::string &str)
17213 {
17214 auto res = isl_union_pw_aff_read_from_str(ctx.release(), str.c_str());
17215 ptr = res;
17216 }
17217
17218 union_pw_aff &union_pw_aff::operator=(union_pw_aff obj) {
17219 std::swap(this->ptr, obj.ptr);
17220 return *this;
17221 }
17222
~union_pw_aff()17223 union_pw_aff::~union_pw_aff() {
17224 if (ptr)
17225 isl_union_pw_aff_free(ptr);
17226 }
17227
copy()17228 __isl_give isl_union_pw_aff *union_pw_aff::copy() const & {
17229 return isl_union_pw_aff_copy(ptr);
17230 }
17231
get()17232 __isl_keep isl_union_pw_aff *union_pw_aff::get() const {
17233 return ptr;
17234 }
17235
release()17236 __isl_give isl_union_pw_aff *union_pw_aff::release() {
17237 isl_union_pw_aff *tmp = ptr;
17238 ptr = nullptr;
17239 return tmp;
17240 }
17241
is_null()17242 bool union_pw_aff::is_null() const {
17243 return ptr == nullptr;
17244 }
17245 union_pw_aff::operator bool() const {
17246 return !is_null();
17247 }
17248
17249
get_ctx()17250 ctx union_pw_aff::get_ctx() const {
17251 return ctx(isl_union_pw_aff_get_ctx(ptr));
17252 }
to_str()17253 std::string union_pw_aff::to_str() const {
17254 char *Tmp = isl_union_pw_aff_to_str(get());
17255 if (!Tmp)
17256 return "";
17257 std::string S(Tmp);
17258 free(Tmp);
17259 return S;
17260 }
17261
17262
dump()17263 void union_pw_aff::dump() const {
17264 isl_union_pw_aff_dump(get());
17265 }
17266
17267
add(union_pw_aff upa2)17268 union_pw_aff union_pw_aff::add(union_pw_aff upa2) const
17269 {
17270 auto res = isl_union_pw_aff_add(copy(), upa2.release());
17271 return manage(res);
17272 }
17273
add_pw_aff(pw_aff pa)17274 union_pw_aff union_pw_aff::add_pw_aff(pw_aff pa) const
17275 {
17276 auto res = isl_union_pw_aff_add_pw_aff(copy(), pa.release());
17277 return manage(res);
17278 }
17279
aff_on_domain(union_set domain,aff aff)17280 union_pw_aff union_pw_aff::aff_on_domain(union_set domain, aff aff)
17281 {
17282 auto res = isl_union_pw_aff_aff_on_domain(domain.release(), aff.release());
17283 return manage(res);
17284 }
17285
align_params(space model)17286 union_pw_aff union_pw_aff::align_params(space model) const
17287 {
17288 auto res = isl_union_pw_aff_align_params(copy(), model.release());
17289 return manage(res);
17290 }
17291
coalesce()17292 union_pw_aff union_pw_aff::coalesce() const
17293 {
17294 auto res = isl_union_pw_aff_coalesce(copy());
17295 return manage(res);
17296 }
17297
dim(isl::dim type)17298 unsigned int union_pw_aff::dim(isl::dim type) const
17299 {
17300 auto res = isl_union_pw_aff_dim(get(), static_cast<enum isl_dim_type>(type));
17301 return res;
17302 }
17303
domain()17304 union_set union_pw_aff::domain() const
17305 {
17306 auto res = isl_union_pw_aff_domain(copy());
17307 return manage(res);
17308 }
17309
drop_dims(isl::dim type,unsigned int first,unsigned int n)17310 union_pw_aff union_pw_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
17311 {
17312 auto res = isl_union_pw_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
17313 return manage(res);
17314 }
17315
empty(space space)17316 union_pw_aff union_pw_aff::empty(space space)
17317 {
17318 auto res = isl_union_pw_aff_empty(space.release());
17319 return manage(res);
17320 }
17321
extract_pw_aff(space space)17322 pw_aff union_pw_aff::extract_pw_aff(space space) const
17323 {
17324 auto res = isl_union_pw_aff_extract_pw_aff(get(), space.release());
17325 return manage(res);
17326 }
17327
find_dim_by_name(isl::dim type,const std::string & name)17328 int union_pw_aff::find_dim_by_name(isl::dim type, const std::string &name) const
17329 {
17330 auto res = isl_union_pw_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
17331 return res;
17332 }
17333
floor()17334 union_pw_aff union_pw_aff::floor() const
17335 {
17336 auto res = isl_union_pw_aff_floor(copy());
17337 return manage(res);
17338 }
17339
foreach_pw_aff(const std::function<stat (pw_aff)> & fn)17340 stat union_pw_aff::foreach_pw_aff(const std::function<stat(pw_aff)> &fn) const
17341 {
17342 struct fn_data {
17343 const std::function<stat(pw_aff)> *func;
17344 } fn_data = { &fn };
17345 auto fn_lambda = [](isl_pw_aff *arg_0, void *arg_1) -> isl_stat {
17346 auto *data = static_cast<struct fn_data *>(arg_1);
17347 stat ret = (*data->func)(manage(arg_0));
17348 return ret.release();
17349 };
17350 auto res = isl_union_pw_aff_foreach_pw_aff(get(), fn_lambda, &fn_data);
17351 return manage(res);
17352 }
17353
get_pw_aff_list()17354 pw_aff_list union_pw_aff::get_pw_aff_list() const
17355 {
17356 auto res = isl_union_pw_aff_get_pw_aff_list(get());
17357 return manage(res);
17358 }
17359
get_space()17360 space union_pw_aff::get_space() const
17361 {
17362 auto res = isl_union_pw_aff_get_space(get());
17363 return manage(res);
17364 }
17365
gist(union_set context)17366 union_pw_aff union_pw_aff::gist(union_set context) const
17367 {
17368 auto res = isl_union_pw_aff_gist(copy(), context.release());
17369 return manage(res);
17370 }
17371
gist_params(set context)17372 union_pw_aff union_pw_aff::gist_params(set context) const
17373 {
17374 auto res = isl_union_pw_aff_gist_params(copy(), context.release());
17375 return manage(res);
17376 }
17377
intersect_domain(union_set uset)17378 union_pw_aff union_pw_aff::intersect_domain(union_set uset) const
17379 {
17380 auto res = isl_union_pw_aff_intersect_domain(copy(), uset.release());
17381 return manage(res);
17382 }
17383
intersect_params(set set)17384 union_pw_aff union_pw_aff::intersect_params(set set) const
17385 {
17386 auto res = isl_union_pw_aff_intersect_params(copy(), set.release());
17387 return manage(res);
17388 }
17389
involves_nan()17390 boolean union_pw_aff::involves_nan() const
17391 {
17392 auto res = isl_union_pw_aff_involves_nan(get());
17393 return manage(res);
17394 }
17395
max_val()17396 val union_pw_aff::max_val() const
17397 {
17398 auto res = isl_union_pw_aff_max_val(copy());
17399 return manage(res);
17400 }
17401
min_val()17402 val union_pw_aff::min_val() const
17403 {
17404 auto res = isl_union_pw_aff_min_val(copy());
17405 return manage(res);
17406 }
17407
mod_val(val f)17408 union_pw_aff union_pw_aff::mod_val(val f) const
17409 {
17410 auto res = isl_union_pw_aff_mod_val(copy(), f.release());
17411 return manage(res);
17412 }
17413
n_pw_aff()17414 int union_pw_aff::n_pw_aff() const
17415 {
17416 auto res = isl_union_pw_aff_n_pw_aff(get());
17417 return res;
17418 }
17419
neg()17420 union_pw_aff union_pw_aff::neg() const
17421 {
17422 auto res = isl_union_pw_aff_neg(copy());
17423 return manage(res);
17424 }
17425
param_on_domain_id(union_set domain,id id)17426 union_pw_aff union_pw_aff::param_on_domain_id(union_set domain, id id)
17427 {
17428 auto res = isl_union_pw_aff_param_on_domain_id(domain.release(), id.release());
17429 return manage(res);
17430 }
17431
plain_is_equal(const union_pw_aff & upa2)17432 boolean union_pw_aff::plain_is_equal(const union_pw_aff &upa2) const
17433 {
17434 auto res = isl_union_pw_aff_plain_is_equal(get(), upa2.get());
17435 return manage(res);
17436 }
17437
pullback(union_pw_multi_aff upma)17438 union_pw_aff union_pw_aff::pullback(union_pw_multi_aff upma) const
17439 {
17440 auto res = isl_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release());
17441 return manage(res);
17442 }
17443
pw_aff_on_domain(union_set domain,pw_aff pa)17444 union_pw_aff union_pw_aff::pw_aff_on_domain(union_set domain, pw_aff pa)
17445 {
17446 auto res = isl_union_pw_aff_pw_aff_on_domain(domain.release(), pa.release());
17447 return manage(res);
17448 }
17449
reset_user()17450 union_pw_aff union_pw_aff::reset_user() const
17451 {
17452 auto res = isl_union_pw_aff_reset_user(copy());
17453 return manage(res);
17454 }
17455
scale_down_val(val v)17456 union_pw_aff union_pw_aff::scale_down_val(val v) const
17457 {
17458 auto res = isl_union_pw_aff_scale_down_val(copy(), v.release());
17459 return manage(res);
17460 }
17461
scale_val(val v)17462 union_pw_aff union_pw_aff::scale_val(val v) const
17463 {
17464 auto res = isl_union_pw_aff_scale_val(copy(), v.release());
17465 return manage(res);
17466 }
17467
sub(union_pw_aff upa2)17468 union_pw_aff union_pw_aff::sub(union_pw_aff upa2) const
17469 {
17470 auto res = isl_union_pw_aff_sub(copy(), upa2.release());
17471 return manage(res);
17472 }
17473
subtract_domain(union_set uset)17474 union_pw_aff union_pw_aff::subtract_domain(union_set uset) const
17475 {
17476 auto res = isl_union_pw_aff_subtract_domain(copy(), uset.release());
17477 return manage(res);
17478 }
17479
union_add(union_pw_aff upa2)17480 union_pw_aff union_pw_aff::union_add(union_pw_aff upa2) const
17481 {
17482 auto res = isl_union_pw_aff_union_add(copy(), upa2.release());
17483 return manage(res);
17484 }
17485
zero_union_set()17486 union_set union_pw_aff::zero_union_set() const
17487 {
17488 auto res = isl_union_pw_aff_zero_union_set(copy());
17489 return manage(res);
17490 }
17491
17492 // implementations for isl::union_pw_aff_list
manage(__isl_take isl_union_pw_aff_list * ptr)17493 union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr) {
17494 return union_pw_aff_list(ptr);
17495 }
manage_copy(__isl_keep isl_union_pw_aff_list * ptr)17496 union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr) {
17497 ptr = isl_union_pw_aff_list_copy(ptr);
17498 return union_pw_aff_list(ptr);
17499 }
17500
union_pw_aff_list()17501 union_pw_aff_list::union_pw_aff_list()
17502 : ptr(nullptr) {}
17503
union_pw_aff_list(const union_pw_aff_list & obj)17504 union_pw_aff_list::union_pw_aff_list(const union_pw_aff_list &obj)
17505 : ptr(nullptr)
17506 {
17507 ptr = obj.copy();
17508 }
union_pw_aff_list(std::nullptr_t)17509 union_pw_aff_list::union_pw_aff_list(std::nullptr_t)
17510 : ptr(nullptr) {}
17511
17512
union_pw_aff_list(__isl_take isl_union_pw_aff_list * ptr)17513 union_pw_aff_list::union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr)
17514 : ptr(ptr) {}
17515
17516
17517 union_pw_aff_list &union_pw_aff_list::operator=(union_pw_aff_list obj) {
17518 std::swap(this->ptr, obj.ptr);
17519 return *this;
17520 }
17521
~union_pw_aff_list()17522 union_pw_aff_list::~union_pw_aff_list() {
17523 if (ptr)
17524 isl_union_pw_aff_list_free(ptr);
17525 }
17526
copy()17527 __isl_give isl_union_pw_aff_list *union_pw_aff_list::copy() const & {
17528 return isl_union_pw_aff_list_copy(ptr);
17529 }
17530
get()17531 __isl_keep isl_union_pw_aff_list *union_pw_aff_list::get() const {
17532 return ptr;
17533 }
17534
release()17535 __isl_give isl_union_pw_aff_list *union_pw_aff_list::release() {
17536 isl_union_pw_aff_list *tmp = ptr;
17537 ptr = nullptr;
17538 return tmp;
17539 }
17540
is_null()17541 bool union_pw_aff_list::is_null() const {
17542 return ptr == nullptr;
17543 }
17544 union_pw_aff_list::operator bool() const {
17545 return !is_null();
17546 }
17547
17548
get_ctx()17549 ctx union_pw_aff_list::get_ctx() const {
17550 return ctx(isl_union_pw_aff_list_get_ctx(ptr));
17551 }
17552
dump()17553 void union_pw_aff_list::dump() const {
17554 isl_union_pw_aff_list_dump(get());
17555 }
17556
17557
add(union_pw_aff el)17558 union_pw_aff_list union_pw_aff_list::add(union_pw_aff el) const
17559 {
17560 auto res = isl_union_pw_aff_list_add(copy(), el.release());
17561 return manage(res);
17562 }
17563
alloc(ctx ctx,int n)17564 union_pw_aff_list union_pw_aff_list::alloc(ctx ctx, int n)
17565 {
17566 auto res = isl_union_pw_aff_list_alloc(ctx.release(), n);
17567 return manage(res);
17568 }
17569
concat(union_pw_aff_list list2)17570 union_pw_aff_list union_pw_aff_list::concat(union_pw_aff_list list2) const
17571 {
17572 auto res = isl_union_pw_aff_list_concat(copy(), list2.release());
17573 return manage(res);
17574 }
17575
drop(unsigned int first,unsigned int n)17576 union_pw_aff_list union_pw_aff_list::drop(unsigned int first, unsigned int n) const
17577 {
17578 auto res = isl_union_pw_aff_list_drop(copy(), first, n);
17579 return manage(res);
17580 }
17581
foreach(const std::function<stat (union_pw_aff)> & fn)17582 stat union_pw_aff_list::foreach(const std::function<stat(union_pw_aff)> &fn) const
17583 {
17584 struct fn_data {
17585 const std::function<stat(union_pw_aff)> *func;
17586 } fn_data = { &fn };
17587 auto fn_lambda = [](isl_union_pw_aff *arg_0, void *arg_1) -> isl_stat {
17588 auto *data = static_cast<struct fn_data *>(arg_1);
17589 stat ret = (*data->func)(manage(arg_0));
17590 return ret.release();
17591 };
17592 auto res = isl_union_pw_aff_list_foreach(get(), fn_lambda, &fn_data);
17593 return manage(res);
17594 }
17595
from_union_pw_aff(union_pw_aff el)17596 union_pw_aff_list union_pw_aff_list::from_union_pw_aff(union_pw_aff el)
17597 {
17598 auto res = isl_union_pw_aff_list_from_union_pw_aff(el.release());
17599 return manage(res);
17600 }
17601
get_at(int index)17602 union_pw_aff union_pw_aff_list::get_at(int index) const
17603 {
17604 auto res = isl_union_pw_aff_list_get_at(get(), index);
17605 return manage(res);
17606 }
17607
get_union_pw_aff(int index)17608 union_pw_aff union_pw_aff_list::get_union_pw_aff(int index) const
17609 {
17610 auto res = isl_union_pw_aff_list_get_union_pw_aff(get(), index);
17611 return manage(res);
17612 }
17613
insert(unsigned int pos,union_pw_aff el)17614 union_pw_aff_list union_pw_aff_list::insert(unsigned int pos, union_pw_aff el) const
17615 {
17616 auto res = isl_union_pw_aff_list_insert(copy(), pos, el.release());
17617 return manage(res);
17618 }
17619
n_union_pw_aff()17620 int union_pw_aff_list::n_union_pw_aff() const
17621 {
17622 auto res = isl_union_pw_aff_list_n_union_pw_aff(get());
17623 return res;
17624 }
17625
reverse()17626 union_pw_aff_list union_pw_aff_list::reverse() const
17627 {
17628 auto res = isl_union_pw_aff_list_reverse(copy());
17629 return manage(res);
17630 }
17631
set_union_pw_aff(int index,union_pw_aff el)17632 union_pw_aff_list union_pw_aff_list::set_union_pw_aff(int index, union_pw_aff el) const
17633 {
17634 auto res = isl_union_pw_aff_list_set_union_pw_aff(copy(), index, el.release());
17635 return manage(res);
17636 }
17637
size()17638 int union_pw_aff_list::size() const
17639 {
17640 auto res = isl_union_pw_aff_list_size(get());
17641 return res;
17642 }
17643
swap(unsigned int pos1,unsigned int pos2)17644 union_pw_aff_list union_pw_aff_list::swap(unsigned int pos1, unsigned int pos2) const
17645 {
17646 auto res = isl_union_pw_aff_list_swap(copy(), pos1, pos2);
17647 return manage(res);
17648 }
17649
17650 // implementations for isl::union_pw_multi_aff
manage(__isl_take isl_union_pw_multi_aff * ptr)17651 union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr) {
17652 return union_pw_multi_aff(ptr);
17653 }
manage_copy(__isl_keep isl_union_pw_multi_aff * ptr)17654 union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr) {
17655 ptr = isl_union_pw_multi_aff_copy(ptr);
17656 return union_pw_multi_aff(ptr);
17657 }
17658
union_pw_multi_aff()17659 union_pw_multi_aff::union_pw_multi_aff()
17660 : ptr(nullptr) {}
17661
union_pw_multi_aff(const union_pw_multi_aff & obj)17662 union_pw_multi_aff::union_pw_multi_aff(const union_pw_multi_aff &obj)
17663 : ptr(nullptr)
17664 {
17665 ptr = obj.copy();
17666 }
union_pw_multi_aff(std::nullptr_t)17667 union_pw_multi_aff::union_pw_multi_aff(std::nullptr_t)
17668 : ptr(nullptr) {}
17669
17670
union_pw_multi_aff(__isl_take isl_union_pw_multi_aff * ptr)17671 union_pw_multi_aff::union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr)
17672 : ptr(ptr) {}
17673
union_pw_multi_aff(aff aff)17674 union_pw_multi_aff::union_pw_multi_aff(aff aff)
17675 {
17676 auto res = isl_union_pw_multi_aff_from_aff(aff.release());
17677 ptr = res;
17678 }
union_pw_multi_aff(pw_multi_aff pma)17679 union_pw_multi_aff::union_pw_multi_aff(pw_multi_aff pma)
17680 {
17681 auto res = isl_union_pw_multi_aff_from_pw_multi_aff(pma.release());
17682 ptr = res;
17683 }
union_pw_multi_aff(union_set uset)17684 union_pw_multi_aff::union_pw_multi_aff(union_set uset)
17685 {
17686 auto res = isl_union_pw_multi_aff_from_domain(uset.release());
17687 ptr = res;
17688 }
union_pw_multi_aff(union_map umap)17689 union_pw_multi_aff::union_pw_multi_aff(union_map umap)
17690 {
17691 auto res = isl_union_pw_multi_aff_from_union_map(umap.release());
17692 ptr = res;
17693 }
union_pw_multi_aff(ctx ctx,const std::string & str)17694 union_pw_multi_aff::union_pw_multi_aff(ctx ctx, const std::string &str)
17695 {
17696 auto res = isl_union_pw_multi_aff_read_from_str(ctx.release(), str.c_str());
17697 ptr = res;
17698 }
union_pw_multi_aff(union_pw_aff upa)17699 union_pw_multi_aff::union_pw_multi_aff(union_pw_aff upa)
17700 {
17701 auto res = isl_union_pw_multi_aff_from_union_pw_aff(upa.release());
17702 ptr = res;
17703 }
union_pw_multi_aff(multi_union_pw_aff mupa)17704 union_pw_multi_aff::union_pw_multi_aff(multi_union_pw_aff mupa)
17705 {
17706 auto res = isl_union_pw_multi_aff_from_multi_union_pw_aff(mupa.release());
17707 ptr = res;
17708 }
17709
17710 union_pw_multi_aff &union_pw_multi_aff::operator=(union_pw_multi_aff obj) {
17711 std::swap(this->ptr, obj.ptr);
17712 return *this;
17713 }
17714
~union_pw_multi_aff()17715 union_pw_multi_aff::~union_pw_multi_aff() {
17716 if (ptr)
17717 isl_union_pw_multi_aff_free(ptr);
17718 }
17719
copy()17720 __isl_give isl_union_pw_multi_aff *union_pw_multi_aff::copy() const & {
17721 return isl_union_pw_multi_aff_copy(ptr);
17722 }
17723
get()17724 __isl_keep isl_union_pw_multi_aff *union_pw_multi_aff::get() const {
17725 return ptr;
17726 }
17727
release()17728 __isl_give isl_union_pw_multi_aff *union_pw_multi_aff::release() {
17729 isl_union_pw_multi_aff *tmp = ptr;
17730 ptr = nullptr;
17731 return tmp;
17732 }
17733
is_null()17734 bool union_pw_multi_aff::is_null() const {
17735 return ptr == nullptr;
17736 }
17737 union_pw_multi_aff::operator bool() const {
17738 return !is_null();
17739 }
17740
17741
get_ctx()17742 ctx union_pw_multi_aff::get_ctx() const {
17743 return ctx(isl_union_pw_multi_aff_get_ctx(ptr));
17744 }
to_str()17745 std::string union_pw_multi_aff::to_str() const {
17746 char *Tmp = isl_union_pw_multi_aff_to_str(get());
17747 if (!Tmp)
17748 return "";
17749 std::string S(Tmp);
17750 free(Tmp);
17751 return S;
17752 }
17753
17754
dump()17755 void union_pw_multi_aff::dump() const {
17756 isl_union_pw_multi_aff_dump(get());
17757 }
17758
17759
add(union_pw_multi_aff upma2)17760 union_pw_multi_aff union_pw_multi_aff::add(union_pw_multi_aff upma2) const
17761 {
17762 auto res = isl_union_pw_multi_aff_add(copy(), upma2.release());
17763 return manage(res);
17764 }
17765
add_pw_multi_aff(pw_multi_aff pma)17766 union_pw_multi_aff union_pw_multi_aff::add_pw_multi_aff(pw_multi_aff pma) const
17767 {
17768 auto res = isl_union_pw_multi_aff_add_pw_multi_aff(copy(), pma.release());
17769 return manage(res);
17770 }
17771
align_params(space model)17772 union_pw_multi_aff union_pw_multi_aff::align_params(space model) const
17773 {
17774 auto res = isl_union_pw_multi_aff_align_params(copy(), model.release());
17775 return manage(res);
17776 }
17777
coalesce()17778 union_pw_multi_aff union_pw_multi_aff::coalesce() const
17779 {
17780 auto res = isl_union_pw_multi_aff_coalesce(copy());
17781 return manage(res);
17782 }
17783
dim(isl::dim type)17784 unsigned int union_pw_multi_aff::dim(isl::dim type) const
17785 {
17786 auto res = isl_union_pw_multi_aff_dim(get(), static_cast<enum isl_dim_type>(type));
17787 return res;
17788 }
17789
domain()17790 union_set union_pw_multi_aff::domain() const
17791 {
17792 auto res = isl_union_pw_multi_aff_domain(copy());
17793 return manage(res);
17794 }
17795
drop_dims(isl::dim type,unsigned int first,unsigned int n)17796 union_pw_multi_aff union_pw_multi_aff::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
17797 {
17798 auto res = isl_union_pw_multi_aff_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
17799 return manage(res);
17800 }
17801
empty(space space)17802 union_pw_multi_aff union_pw_multi_aff::empty(space space)
17803 {
17804 auto res = isl_union_pw_multi_aff_empty(space.release());
17805 return manage(res);
17806 }
17807
extract_pw_multi_aff(space space)17808 pw_multi_aff union_pw_multi_aff::extract_pw_multi_aff(space space) const
17809 {
17810 auto res = isl_union_pw_multi_aff_extract_pw_multi_aff(get(), space.release());
17811 return manage(res);
17812 }
17813
find_dim_by_name(isl::dim type,const std::string & name)17814 int union_pw_multi_aff::find_dim_by_name(isl::dim type, const std::string &name) const
17815 {
17816 auto res = isl_union_pw_multi_aff_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
17817 return res;
17818 }
17819
flat_range_product(union_pw_multi_aff upma2)17820 union_pw_multi_aff union_pw_multi_aff::flat_range_product(union_pw_multi_aff upma2) const
17821 {
17822 auto res = isl_union_pw_multi_aff_flat_range_product(copy(), upma2.release());
17823 return manage(res);
17824 }
17825
foreach_pw_multi_aff(const std::function<stat (pw_multi_aff)> & fn)17826 stat union_pw_multi_aff::foreach_pw_multi_aff(const std::function<stat(pw_multi_aff)> &fn) const
17827 {
17828 struct fn_data {
17829 const std::function<stat(pw_multi_aff)> *func;
17830 } fn_data = { &fn };
17831 auto fn_lambda = [](isl_pw_multi_aff *arg_0, void *arg_1) -> isl_stat {
17832 auto *data = static_cast<struct fn_data *>(arg_1);
17833 stat ret = (*data->func)(manage(arg_0));
17834 return ret.release();
17835 };
17836 auto res = isl_union_pw_multi_aff_foreach_pw_multi_aff(get(), fn_lambda, &fn_data);
17837 return manage(res);
17838 }
17839
from_union_set(union_set uset)17840 union_pw_multi_aff union_pw_multi_aff::from_union_set(union_set uset)
17841 {
17842 auto res = isl_union_pw_multi_aff_from_union_set(uset.release());
17843 return manage(res);
17844 }
17845
get_pw_multi_aff_list()17846 pw_multi_aff_list union_pw_multi_aff::get_pw_multi_aff_list() const
17847 {
17848 auto res = isl_union_pw_multi_aff_get_pw_multi_aff_list(get());
17849 return manage(res);
17850 }
17851
get_space()17852 space union_pw_multi_aff::get_space() const
17853 {
17854 auto res = isl_union_pw_multi_aff_get_space(get());
17855 return manage(res);
17856 }
17857
get_union_pw_aff(int pos)17858 union_pw_aff union_pw_multi_aff::get_union_pw_aff(int pos) const
17859 {
17860 auto res = isl_union_pw_multi_aff_get_union_pw_aff(get(), pos);
17861 return manage(res);
17862 }
17863
gist(union_set context)17864 union_pw_multi_aff union_pw_multi_aff::gist(union_set context) const
17865 {
17866 auto res = isl_union_pw_multi_aff_gist(copy(), context.release());
17867 return manage(res);
17868 }
17869
gist_params(set context)17870 union_pw_multi_aff union_pw_multi_aff::gist_params(set context) const
17871 {
17872 auto res = isl_union_pw_multi_aff_gist_params(copy(), context.release());
17873 return manage(res);
17874 }
17875
intersect_domain(union_set uset)17876 union_pw_multi_aff union_pw_multi_aff::intersect_domain(union_set uset) const
17877 {
17878 auto res = isl_union_pw_multi_aff_intersect_domain(copy(), uset.release());
17879 return manage(res);
17880 }
17881
intersect_params(set set)17882 union_pw_multi_aff union_pw_multi_aff::intersect_params(set set) const
17883 {
17884 auto res = isl_union_pw_multi_aff_intersect_params(copy(), set.release());
17885 return manage(res);
17886 }
17887
involves_nan()17888 boolean union_pw_multi_aff::involves_nan() const
17889 {
17890 auto res = isl_union_pw_multi_aff_involves_nan(get());
17891 return manage(res);
17892 }
17893
multi_val_on_domain(union_set domain,multi_val mv)17894 union_pw_multi_aff union_pw_multi_aff::multi_val_on_domain(union_set domain, multi_val mv)
17895 {
17896 auto res = isl_union_pw_multi_aff_multi_val_on_domain(domain.release(), mv.release());
17897 return manage(res);
17898 }
17899
n_pw_multi_aff()17900 int union_pw_multi_aff::n_pw_multi_aff() const
17901 {
17902 auto res = isl_union_pw_multi_aff_n_pw_multi_aff(get());
17903 return res;
17904 }
17905
neg()17906 union_pw_multi_aff union_pw_multi_aff::neg() const
17907 {
17908 auto res = isl_union_pw_multi_aff_neg(copy());
17909 return manage(res);
17910 }
17911
plain_is_equal(const union_pw_multi_aff & upma2)17912 boolean union_pw_multi_aff::plain_is_equal(const union_pw_multi_aff &upma2) const
17913 {
17914 auto res = isl_union_pw_multi_aff_plain_is_equal(get(), upma2.get());
17915 return manage(res);
17916 }
17917
pullback(union_pw_multi_aff upma2)17918 union_pw_multi_aff union_pw_multi_aff::pullback(union_pw_multi_aff upma2) const
17919 {
17920 auto res = isl_union_pw_multi_aff_pullback_union_pw_multi_aff(copy(), upma2.release());
17921 return manage(res);
17922 }
17923
reset_user()17924 union_pw_multi_aff union_pw_multi_aff::reset_user() const
17925 {
17926 auto res = isl_union_pw_multi_aff_reset_user(copy());
17927 return manage(res);
17928 }
17929
scale_down_val(val val)17930 union_pw_multi_aff union_pw_multi_aff::scale_down_val(val val) const
17931 {
17932 auto res = isl_union_pw_multi_aff_scale_down_val(copy(), val.release());
17933 return manage(res);
17934 }
17935
scale_multi_val(multi_val mv)17936 union_pw_multi_aff union_pw_multi_aff::scale_multi_val(multi_val mv) const
17937 {
17938 auto res = isl_union_pw_multi_aff_scale_multi_val(copy(), mv.release());
17939 return manage(res);
17940 }
17941
scale_val(val val)17942 union_pw_multi_aff union_pw_multi_aff::scale_val(val val) const
17943 {
17944 auto res = isl_union_pw_multi_aff_scale_val(copy(), val.release());
17945 return manage(res);
17946 }
17947
sub(union_pw_multi_aff upma2)17948 union_pw_multi_aff union_pw_multi_aff::sub(union_pw_multi_aff upma2) const
17949 {
17950 auto res = isl_union_pw_multi_aff_sub(copy(), upma2.release());
17951 return manage(res);
17952 }
17953
subtract_domain(union_set uset)17954 union_pw_multi_aff union_pw_multi_aff::subtract_domain(union_set uset) const
17955 {
17956 auto res = isl_union_pw_multi_aff_subtract_domain(copy(), uset.release());
17957 return manage(res);
17958 }
17959
union_add(union_pw_multi_aff upma2)17960 union_pw_multi_aff union_pw_multi_aff::union_add(union_pw_multi_aff upma2) const
17961 {
17962 auto res = isl_union_pw_multi_aff_union_add(copy(), upma2.release());
17963 return manage(res);
17964 }
17965
17966 // implementations for isl::union_pw_multi_aff_list
manage(__isl_take isl_union_pw_multi_aff_list * ptr)17967 union_pw_multi_aff_list manage(__isl_take isl_union_pw_multi_aff_list *ptr) {
17968 return union_pw_multi_aff_list(ptr);
17969 }
manage_copy(__isl_keep isl_union_pw_multi_aff_list * ptr)17970 union_pw_multi_aff_list manage_copy(__isl_keep isl_union_pw_multi_aff_list *ptr) {
17971 ptr = isl_union_pw_multi_aff_list_copy(ptr);
17972 return union_pw_multi_aff_list(ptr);
17973 }
17974
union_pw_multi_aff_list()17975 union_pw_multi_aff_list::union_pw_multi_aff_list()
17976 : ptr(nullptr) {}
17977
union_pw_multi_aff_list(const union_pw_multi_aff_list & obj)17978 union_pw_multi_aff_list::union_pw_multi_aff_list(const union_pw_multi_aff_list &obj)
17979 : ptr(nullptr)
17980 {
17981 ptr = obj.copy();
17982 }
union_pw_multi_aff_list(std::nullptr_t)17983 union_pw_multi_aff_list::union_pw_multi_aff_list(std::nullptr_t)
17984 : ptr(nullptr) {}
17985
17986
union_pw_multi_aff_list(__isl_take isl_union_pw_multi_aff_list * ptr)17987 union_pw_multi_aff_list::union_pw_multi_aff_list(__isl_take isl_union_pw_multi_aff_list *ptr)
17988 : ptr(ptr) {}
17989
17990
17991 union_pw_multi_aff_list &union_pw_multi_aff_list::operator=(union_pw_multi_aff_list obj) {
17992 std::swap(this->ptr, obj.ptr);
17993 return *this;
17994 }
17995
~union_pw_multi_aff_list()17996 union_pw_multi_aff_list::~union_pw_multi_aff_list() {
17997 if (ptr)
17998 isl_union_pw_multi_aff_list_free(ptr);
17999 }
18000
copy()18001 __isl_give isl_union_pw_multi_aff_list *union_pw_multi_aff_list::copy() const & {
18002 return isl_union_pw_multi_aff_list_copy(ptr);
18003 }
18004
get()18005 __isl_keep isl_union_pw_multi_aff_list *union_pw_multi_aff_list::get() const {
18006 return ptr;
18007 }
18008
release()18009 __isl_give isl_union_pw_multi_aff_list *union_pw_multi_aff_list::release() {
18010 isl_union_pw_multi_aff_list *tmp = ptr;
18011 ptr = nullptr;
18012 return tmp;
18013 }
18014
is_null()18015 bool union_pw_multi_aff_list::is_null() const {
18016 return ptr == nullptr;
18017 }
18018 union_pw_multi_aff_list::operator bool() const {
18019 return !is_null();
18020 }
18021
18022
get_ctx()18023 ctx union_pw_multi_aff_list::get_ctx() const {
18024 return ctx(isl_union_pw_multi_aff_list_get_ctx(ptr));
18025 }
18026
dump()18027 void union_pw_multi_aff_list::dump() const {
18028 isl_union_pw_multi_aff_list_dump(get());
18029 }
18030
18031
add(union_pw_multi_aff el)18032 union_pw_multi_aff_list union_pw_multi_aff_list::add(union_pw_multi_aff el) const
18033 {
18034 auto res = isl_union_pw_multi_aff_list_add(copy(), el.release());
18035 return manage(res);
18036 }
18037
alloc(ctx ctx,int n)18038 union_pw_multi_aff_list union_pw_multi_aff_list::alloc(ctx ctx, int n)
18039 {
18040 auto res = isl_union_pw_multi_aff_list_alloc(ctx.release(), n);
18041 return manage(res);
18042 }
18043
concat(union_pw_multi_aff_list list2)18044 union_pw_multi_aff_list union_pw_multi_aff_list::concat(union_pw_multi_aff_list list2) const
18045 {
18046 auto res = isl_union_pw_multi_aff_list_concat(copy(), list2.release());
18047 return manage(res);
18048 }
18049
drop(unsigned int first,unsigned int n)18050 union_pw_multi_aff_list union_pw_multi_aff_list::drop(unsigned int first, unsigned int n) const
18051 {
18052 auto res = isl_union_pw_multi_aff_list_drop(copy(), first, n);
18053 return manage(res);
18054 }
18055
foreach(const std::function<stat (union_pw_multi_aff)> & fn)18056 stat union_pw_multi_aff_list::foreach(const std::function<stat(union_pw_multi_aff)> &fn) const
18057 {
18058 struct fn_data {
18059 const std::function<stat(union_pw_multi_aff)> *func;
18060 } fn_data = { &fn };
18061 auto fn_lambda = [](isl_union_pw_multi_aff *arg_0, void *arg_1) -> isl_stat {
18062 auto *data = static_cast<struct fn_data *>(arg_1);
18063 stat ret = (*data->func)(manage(arg_0));
18064 return ret.release();
18065 };
18066 auto res = isl_union_pw_multi_aff_list_foreach(get(), fn_lambda, &fn_data);
18067 return manage(res);
18068 }
18069
from_union_pw_multi_aff(union_pw_multi_aff el)18070 union_pw_multi_aff_list union_pw_multi_aff_list::from_union_pw_multi_aff(union_pw_multi_aff el)
18071 {
18072 auto res = isl_union_pw_multi_aff_list_from_union_pw_multi_aff(el.release());
18073 return manage(res);
18074 }
18075
get_at(int index)18076 union_pw_multi_aff union_pw_multi_aff_list::get_at(int index) const
18077 {
18078 auto res = isl_union_pw_multi_aff_list_get_at(get(), index);
18079 return manage(res);
18080 }
18081
get_union_pw_multi_aff(int index)18082 union_pw_multi_aff union_pw_multi_aff_list::get_union_pw_multi_aff(int index) const
18083 {
18084 auto res = isl_union_pw_multi_aff_list_get_union_pw_multi_aff(get(), index);
18085 return manage(res);
18086 }
18087
insert(unsigned int pos,union_pw_multi_aff el)18088 union_pw_multi_aff_list union_pw_multi_aff_list::insert(unsigned int pos, union_pw_multi_aff el) const
18089 {
18090 auto res = isl_union_pw_multi_aff_list_insert(copy(), pos, el.release());
18091 return manage(res);
18092 }
18093
n_union_pw_multi_aff()18094 int union_pw_multi_aff_list::n_union_pw_multi_aff() const
18095 {
18096 auto res = isl_union_pw_multi_aff_list_n_union_pw_multi_aff(get());
18097 return res;
18098 }
18099
reverse()18100 union_pw_multi_aff_list union_pw_multi_aff_list::reverse() const
18101 {
18102 auto res = isl_union_pw_multi_aff_list_reverse(copy());
18103 return manage(res);
18104 }
18105
set_union_pw_multi_aff(int index,union_pw_multi_aff el)18106 union_pw_multi_aff_list union_pw_multi_aff_list::set_union_pw_multi_aff(int index, union_pw_multi_aff el) const
18107 {
18108 auto res = isl_union_pw_multi_aff_list_set_union_pw_multi_aff(copy(), index, el.release());
18109 return manage(res);
18110 }
18111
size()18112 int union_pw_multi_aff_list::size() const
18113 {
18114 auto res = isl_union_pw_multi_aff_list_size(get());
18115 return res;
18116 }
18117
swap(unsigned int pos1,unsigned int pos2)18118 union_pw_multi_aff_list union_pw_multi_aff_list::swap(unsigned int pos1, unsigned int pos2) const
18119 {
18120 auto res = isl_union_pw_multi_aff_list_swap(copy(), pos1, pos2);
18121 return manage(res);
18122 }
18123
18124 // implementations for isl::union_pw_qpolynomial
manage(__isl_take isl_union_pw_qpolynomial * ptr)18125 union_pw_qpolynomial manage(__isl_take isl_union_pw_qpolynomial *ptr) {
18126 return union_pw_qpolynomial(ptr);
18127 }
manage_copy(__isl_keep isl_union_pw_qpolynomial * ptr)18128 union_pw_qpolynomial manage_copy(__isl_keep isl_union_pw_qpolynomial *ptr) {
18129 ptr = isl_union_pw_qpolynomial_copy(ptr);
18130 return union_pw_qpolynomial(ptr);
18131 }
18132
union_pw_qpolynomial()18133 union_pw_qpolynomial::union_pw_qpolynomial()
18134 : ptr(nullptr) {}
18135
union_pw_qpolynomial(const union_pw_qpolynomial & obj)18136 union_pw_qpolynomial::union_pw_qpolynomial(const union_pw_qpolynomial &obj)
18137 : ptr(nullptr)
18138 {
18139 ptr = obj.copy();
18140 }
union_pw_qpolynomial(std::nullptr_t)18141 union_pw_qpolynomial::union_pw_qpolynomial(std::nullptr_t)
18142 : ptr(nullptr) {}
18143
18144
union_pw_qpolynomial(__isl_take isl_union_pw_qpolynomial * ptr)18145 union_pw_qpolynomial::union_pw_qpolynomial(__isl_take isl_union_pw_qpolynomial *ptr)
18146 : ptr(ptr) {}
18147
union_pw_qpolynomial(ctx ctx,const std::string & str)18148 union_pw_qpolynomial::union_pw_qpolynomial(ctx ctx, const std::string &str)
18149 {
18150 auto res = isl_union_pw_qpolynomial_read_from_str(ctx.release(), str.c_str());
18151 ptr = res;
18152 }
18153
18154 union_pw_qpolynomial &union_pw_qpolynomial::operator=(union_pw_qpolynomial obj) {
18155 std::swap(this->ptr, obj.ptr);
18156 return *this;
18157 }
18158
~union_pw_qpolynomial()18159 union_pw_qpolynomial::~union_pw_qpolynomial() {
18160 if (ptr)
18161 isl_union_pw_qpolynomial_free(ptr);
18162 }
18163
copy()18164 __isl_give isl_union_pw_qpolynomial *union_pw_qpolynomial::copy() const & {
18165 return isl_union_pw_qpolynomial_copy(ptr);
18166 }
18167
get()18168 __isl_keep isl_union_pw_qpolynomial *union_pw_qpolynomial::get() const {
18169 return ptr;
18170 }
18171
release()18172 __isl_give isl_union_pw_qpolynomial *union_pw_qpolynomial::release() {
18173 isl_union_pw_qpolynomial *tmp = ptr;
18174 ptr = nullptr;
18175 return tmp;
18176 }
18177
is_null()18178 bool union_pw_qpolynomial::is_null() const {
18179 return ptr == nullptr;
18180 }
18181 union_pw_qpolynomial::operator bool() const {
18182 return !is_null();
18183 }
18184
18185
get_ctx()18186 ctx union_pw_qpolynomial::get_ctx() const {
18187 return ctx(isl_union_pw_qpolynomial_get_ctx(ptr));
18188 }
to_str()18189 std::string union_pw_qpolynomial::to_str() const {
18190 char *Tmp = isl_union_pw_qpolynomial_to_str(get());
18191 if (!Tmp)
18192 return "";
18193 std::string S(Tmp);
18194 free(Tmp);
18195 return S;
18196 }
18197
18198
18199
add(union_pw_qpolynomial upwqp2)18200 union_pw_qpolynomial union_pw_qpolynomial::add(union_pw_qpolynomial upwqp2) const
18201 {
18202 auto res = isl_union_pw_qpolynomial_add(copy(), upwqp2.release());
18203 return manage(res);
18204 }
18205
add_pw_qpolynomial(pw_qpolynomial pwqp)18206 union_pw_qpolynomial union_pw_qpolynomial::add_pw_qpolynomial(pw_qpolynomial pwqp) const
18207 {
18208 auto res = isl_union_pw_qpolynomial_add_pw_qpolynomial(copy(), pwqp.release());
18209 return manage(res);
18210 }
18211
align_params(space model)18212 union_pw_qpolynomial union_pw_qpolynomial::align_params(space model) const
18213 {
18214 auto res = isl_union_pw_qpolynomial_align_params(copy(), model.release());
18215 return manage(res);
18216 }
18217
coalesce()18218 union_pw_qpolynomial union_pw_qpolynomial::coalesce() const
18219 {
18220 auto res = isl_union_pw_qpolynomial_coalesce(copy());
18221 return manage(res);
18222 }
18223
dim(isl::dim type)18224 unsigned int union_pw_qpolynomial::dim(isl::dim type) const
18225 {
18226 auto res = isl_union_pw_qpolynomial_dim(get(), static_cast<enum isl_dim_type>(type));
18227 return res;
18228 }
18229
domain()18230 union_set union_pw_qpolynomial::domain() const
18231 {
18232 auto res = isl_union_pw_qpolynomial_domain(copy());
18233 return manage(res);
18234 }
18235
drop_dims(isl::dim type,unsigned int first,unsigned int n)18236 union_pw_qpolynomial union_pw_qpolynomial::drop_dims(isl::dim type, unsigned int first, unsigned int n) const
18237 {
18238 auto res = isl_union_pw_qpolynomial_drop_dims(copy(), static_cast<enum isl_dim_type>(type), first, n);
18239 return manage(res);
18240 }
18241
eval(point pnt)18242 val union_pw_qpolynomial::eval(point pnt) const
18243 {
18244 auto res = isl_union_pw_qpolynomial_eval(copy(), pnt.release());
18245 return manage(res);
18246 }
18247
extract_pw_qpolynomial(space dim)18248 pw_qpolynomial union_pw_qpolynomial::extract_pw_qpolynomial(space dim) const
18249 {
18250 auto res = isl_union_pw_qpolynomial_extract_pw_qpolynomial(get(), dim.release());
18251 return manage(res);
18252 }
18253
find_dim_by_name(isl::dim type,const std::string & name)18254 int union_pw_qpolynomial::find_dim_by_name(isl::dim type, const std::string &name) const
18255 {
18256 auto res = isl_union_pw_qpolynomial_find_dim_by_name(get(), static_cast<enum isl_dim_type>(type), name.c_str());
18257 return res;
18258 }
18259
foreach_pw_qpolynomial(const std::function<stat (pw_qpolynomial)> & fn)18260 stat union_pw_qpolynomial::foreach_pw_qpolynomial(const std::function<stat(pw_qpolynomial)> &fn) const
18261 {
18262 struct fn_data {
18263 const std::function<stat(pw_qpolynomial)> *func;
18264 } fn_data = { &fn };
18265 auto fn_lambda = [](isl_pw_qpolynomial *arg_0, void *arg_1) -> isl_stat {
18266 auto *data = static_cast<struct fn_data *>(arg_1);
18267 stat ret = (*data->func)(manage(arg_0));
18268 return ret.release();
18269 };
18270 auto res = isl_union_pw_qpolynomial_foreach_pw_qpolynomial(get(), fn_lambda, &fn_data);
18271 return manage(res);
18272 }
18273
from_pw_qpolynomial(pw_qpolynomial pwqp)18274 union_pw_qpolynomial union_pw_qpolynomial::from_pw_qpolynomial(pw_qpolynomial pwqp)
18275 {
18276 auto res = isl_union_pw_qpolynomial_from_pw_qpolynomial(pwqp.release());
18277 return manage(res);
18278 }
18279
get_pw_qpolynomial_list()18280 pw_qpolynomial_list union_pw_qpolynomial::get_pw_qpolynomial_list() const
18281 {
18282 auto res = isl_union_pw_qpolynomial_get_pw_qpolynomial_list(get());
18283 return manage(res);
18284 }
18285
get_space()18286 space union_pw_qpolynomial::get_space() const
18287 {
18288 auto res = isl_union_pw_qpolynomial_get_space(get());
18289 return manage(res);
18290 }
18291
gist(union_set context)18292 union_pw_qpolynomial union_pw_qpolynomial::gist(union_set context) const
18293 {
18294 auto res = isl_union_pw_qpolynomial_gist(copy(), context.release());
18295 return manage(res);
18296 }
18297
gist_params(set context)18298 union_pw_qpolynomial union_pw_qpolynomial::gist_params(set context) const
18299 {
18300 auto res = isl_union_pw_qpolynomial_gist_params(copy(), context.release());
18301 return manage(res);
18302 }
18303
intersect_domain(union_set uset)18304 union_pw_qpolynomial union_pw_qpolynomial::intersect_domain(union_set uset) const
18305 {
18306 auto res = isl_union_pw_qpolynomial_intersect_domain(copy(), uset.release());
18307 return manage(res);
18308 }
18309
intersect_params(set set)18310 union_pw_qpolynomial union_pw_qpolynomial::intersect_params(set set) const
18311 {
18312 auto res = isl_union_pw_qpolynomial_intersect_params(copy(), set.release());
18313 return manage(res);
18314 }
18315
involves_nan()18316 boolean union_pw_qpolynomial::involves_nan() const
18317 {
18318 auto res = isl_union_pw_qpolynomial_involves_nan(get());
18319 return manage(res);
18320 }
18321
mul(union_pw_qpolynomial upwqp2)18322 union_pw_qpolynomial union_pw_qpolynomial::mul(union_pw_qpolynomial upwqp2) const
18323 {
18324 auto res = isl_union_pw_qpolynomial_mul(copy(), upwqp2.release());
18325 return manage(res);
18326 }
18327
n_pw_qpolynomial()18328 int union_pw_qpolynomial::n_pw_qpolynomial() const
18329 {
18330 auto res = isl_union_pw_qpolynomial_n_pw_qpolynomial(get());
18331 return res;
18332 }
18333
neg()18334 union_pw_qpolynomial union_pw_qpolynomial::neg() const
18335 {
18336 auto res = isl_union_pw_qpolynomial_neg(copy());
18337 return manage(res);
18338 }
18339
plain_is_equal(const union_pw_qpolynomial & upwqp2)18340 boolean union_pw_qpolynomial::plain_is_equal(const union_pw_qpolynomial &upwqp2) const
18341 {
18342 auto res = isl_union_pw_qpolynomial_plain_is_equal(get(), upwqp2.get());
18343 return manage(res);
18344 }
18345
reset_user()18346 union_pw_qpolynomial union_pw_qpolynomial::reset_user() const
18347 {
18348 auto res = isl_union_pw_qpolynomial_reset_user(copy());
18349 return manage(res);
18350 }
18351
scale_down_val(val v)18352 union_pw_qpolynomial union_pw_qpolynomial::scale_down_val(val v) const
18353 {
18354 auto res = isl_union_pw_qpolynomial_scale_down_val(copy(), v.release());
18355 return manage(res);
18356 }
18357
scale_val(val v)18358 union_pw_qpolynomial union_pw_qpolynomial::scale_val(val v) const
18359 {
18360 auto res = isl_union_pw_qpolynomial_scale_val(copy(), v.release());
18361 return manage(res);
18362 }
18363
sub(union_pw_qpolynomial upwqp2)18364 union_pw_qpolynomial union_pw_qpolynomial::sub(union_pw_qpolynomial upwqp2) const
18365 {
18366 auto res = isl_union_pw_qpolynomial_sub(copy(), upwqp2.release());
18367 return manage(res);
18368 }
18369
subtract_domain(union_set uset)18370 union_pw_qpolynomial union_pw_qpolynomial::subtract_domain(union_set uset) const
18371 {
18372 auto res = isl_union_pw_qpolynomial_subtract_domain(copy(), uset.release());
18373 return manage(res);
18374 }
18375
to_polynomial(int sign)18376 union_pw_qpolynomial union_pw_qpolynomial::to_polynomial(int sign) const
18377 {
18378 auto res = isl_union_pw_qpolynomial_to_polynomial(copy(), sign);
18379 return manage(res);
18380 }
18381
zero(space dim)18382 union_pw_qpolynomial union_pw_qpolynomial::zero(space dim)
18383 {
18384 auto res = isl_union_pw_qpolynomial_zero(dim.release());
18385 return manage(res);
18386 }
18387
18388 // implementations for isl::union_set
manage(__isl_take isl_union_set * ptr)18389 union_set manage(__isl_take isl_union_set *ptr) {
18390 return union_set(ptr);
18391 }
manage_copy(__isl_keep isl_union_set * ptr)18392 union_set manage_copy(__isl_keep isl_union_set *ptr) {
18393 ptr = isl_union_set_copy(ptr);
18394 return union_set(ptr);
18395 }
18396
union_set()18397 union_set::union_set()
18398 : ptr(nullptr) {}
18399
union_set(const union_set & obj)18400 union_set::union_set(const union_set &obj)
18401 : ptr(nullptr)
18402 {
18403 ptr = obj.copy();
18404 }
union_set(std::nullptr_t)18405 union_set::union_set(std::nullptr_t)
18406 : ptr(nullptr) {}
18407
18408
union_set(__isl_take isl_union_set * ptr)18409 union_set::union_set(__isl_take isl_union_set *ptr)
18410 : ptr(ptr) {}
18411
union_set(basic_set bset)18412 union_set::union_set(basic_set bset)
18413 {
18414 auto res = isl_union_set_from_basic_set(bset.release());
18415 ptr = res;
18416 }
union_set(set set)18417 union_set::union_set(set set)
18418 {
18419 auto res = isl_union_set_from_set(set.release());
18420 ptr = res;
18421 }
union_set(point pnt)18422 union_set::union_set(point pnt)
18423 {
18424 auto res = isl_union_set_from_point(pnt.release());
18425 ptr = res;
18426 }
union_set(ctx ctx,const std::string & str)18427 union_set::union_set(ctx ctx, const std::string &str)
18428 {
18429 auto res = isl_union_set_read_from_str(ctx.release(), str.c_str());
18430 ptr = res;
18431 }
18432
18433 union_set &union_set::operator=(union_set obj) {
18434 std::swap(this->ptr, obj.ptr);
18435 return *this;
18436 }
18437
~union_set()18438 union_set::~union_set() {
18439 if (ptr)
18440 isl_union_set_free(ptr);
18441 }
18442
copy()18443 __isl_give isl_union_set *union_set::copy() const & {
18444 return isl_union_set_copy(ptr);
18445 }
18446
get()18447 __isl_keep isl_union_set *union_set::get() const {
18448 return ptr;
18449 }
18450
release()18451 __isl_give isl_union_set *union_set::release() {
18452 isl_union_set *tmp = ptr;
18453 ptr = nullptr;
18454 return tmp;
18455 }
18456
is_null()18457 bool union_set::is_null() const {
18458 return ptr == nullptr;
18459 }
18460 union_set::operator bool() const {
18461 return !is_null();
18462 }
18463
18464
get_ctx()18465 ctx union_set::get_ctx() const {
18466 return ctx(isl_union_set_get_ctx(ptr));
18467 }
to_str()18468 std::string union_set::to_str() const {
18469 char *Tmp = isl_union_set_to_str(get());
18470 if (!Tmp)
18471 return "";
18472 std::string S(Tmp);
18473 free(Tmp);
18474 return S;
18475 }
18476
18477
dump()18478 void union_set::dump() const {
18479 isl_union_set_dump(get());
18480 }
18481
18482
add_set(set set)18483 union_set union_set::add_set(set set) const
18484 {
18485 auto res = isl_union_set_add_set(copy(), set.release());
18486 return manage(res);
18487 }
18488
affine_hull()18489 union_set union_set::affine_hull() const
18490 {
18491 auto res = isl_union_set_affine_hull(copy());
18492 return manage(res);
18493 }
18494
align_params(space model)18495 union_set union_set::align_params(space model) const
18496 {
18497 auto res = isl_union_set_align_params(copy(), model.release());
18498 return manage(res);
18499 }
18500
apply(union_map umap)18501 union_set union_set::apply(union_map umap) const
18502 {
18503 auto res = isl_union_set_apply(copy(), umap.release());
18504 return manage(res);
18505 }
18506
coalesce()18507 union_set union_set::coalesce() const
18508 {
18509 auto res = isl_union_set_coalesce(copy());
18510 return manage(res);
18511 }
18512
coefficients()18513 union_set union_set::coefficients() const
18514 {
18515 auto res = isl_union_set_coefficients(copy());
18516 return manage(res);
18517 }
18518
compute_schedule(union_map validity,union_map proximity)18519 schedule union_set::compute_schedule(union_map validity, union_map proximity) const
18520 {
18521 auto res = isl_union_set_compute_schedule(copy(), validity.release(), proximity.release());
18522 return manage(res);
18523 }
18524
contains(const space & space)18525 boolean union_set::contains(const space &space) const
18526 {
18527 auto res = isl_union_set_contains(get(), space.get());
18528 return manage(res);
18529 }
18530
detect_equalities()18531 union_set union_set::detect_equalities() const
18532 {
18533 auto res = isl_union_set_detect_equalities(copy());
18534 return manage(res);
18535 }
18536
dim(isl::dim type)18537 unsigned int union_set::dim(isl::dim type) const
18538 {
18539 auto res = isl_union_set_dim(get(), static_cast<enum isl_dim_type>(type));
18540 return res;
18541 }
18542
empty(space space)18543 union_set union_set::empty(space space)
18544 {
18545 auto res = isl_union_set_empty(space.release());
18546 return manage(res);
18547 }
18548
extract_set(space dim)18549 set union_set::extract_set(space dim) const
18550 {
18551 auto res = isl_union_set_extract_set(get(), dim.release());
18552 return manage(res);
18553 }
18554
foreach_point(const std::function<stat (point)> & fn)18555 stat union_set::foreach_point(const std::function<stat(point)> &fn) const
18556 {
18557 struct fn_data {
18558 const std::function<stat(point)> *func;
18559 } fn_data = { &fn };
18560 auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat {
18561 auto *data = static_cast<struct fn_data *>(arg_1);
18562 stat ret = (*data->func)(manage(arg_0));
18563 return ret.release();
18564 };
18565 auto res = isl_union_set_foreach_point(get(), fn_lambda, &fn_data);
18566 return manage(res);
18567 }
18568
foreach_set(const std::function<stat (set)> & fn)18569 stat union_set::foreach_set(const std::function<stat(set)> &fn) const
18570 {
18571 struct fn_data {
18572 const std::function<stat(set)> *func;
18573 } fn_data = { &fn };
18574 auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat {
18575 auto *data = static_cast<struct fn_data *>(arg_1);
18576 stat ret = (*data->func)(manage(arg_0));
18577 return ret.release();
18578 };
18579 auto res = isl_union_set_foreach_set(get(), fn_lambda, &fn_data);
18580 return manage(res);
18581 }
18582
get_basic_set_list()18583 basic_set_list union_set::get_basic_set_list() const
18584 {
18585 auto res = isl_union_set_get_basic_set_list(get());
18586 return manage(res);
18587 }
18588
get_hash()18589 uint32_t union_set::get_hash() const
18590 {
18591 auto res = isl_union_set_get_hash(get());
18592 return res;
18593 }
18594
get_set_list()18595 set_list union_set::get_set_list() const
18596 {
18597 auto res = isl_union_set_get_set_list(get());
18598 return manage(res);
18599 }
18600
get_space()18601 space union_set::get_space() const
18602 {
18603 auto res = isl_union_set_get_space(get());
18604 return manage(res);
18605 }
18606
gist(union_set context)18607 union_set union_set::gist(union_set context) const
18608 {
18609 auto res = isl_union_set_gist(copy(), context.release());
18610 return manage(res);
18611 }
18612
gist_params(set set)18613 union_set union_set::gist_params(set set) const
18614 {
18615 auto res = isl_union_set_gist_params(copy(), set.release());
18616 return manage(res);
18617 }
18618
identity()18619 union_map union_set::identity() const
18620 {
18621 auto res = isl_union_set_identity(copy());
18622 return manage(res);
18623 }
18624
identity_union_pw_multi_aff()18625 union_pw_multi_aff union_set::identity_union_pw_multi_aff() const
18626 {
18627 auto res = isl_union_set_identity_union_pw_multi_aff(copy());
18628 return manage(res);
18629 }
18630
intersect(union_set uset2)18631 union_set union_set::intersect(union_set uset2) const
18632 {
18633 auto res = isl_union_set_intersect(copy(), uset2.release());
18634 return manage(res);
18635 }
18636
intersect_params(set set)18637 union_set union_set::intersect_params(set set) const
18638 {
18639 auto res = isl_union_set_intersect_params(copy(), set.release());
18640 return manage(res);
18641 }
18642
is_disjoint(const union_set & uset2)18643 boolean union_set::is_disjoint(const union_set &uset2) const
18644 {
18645 auto res = isl_union_set_is_disjoint(get(), uset2.get());
18646 return manage(res);
18647 }
18648
is_empty()18649 boolean union_set::is_empty() const
18650 {
18651 auto res = isl_union_set_is_empty(get());
18652 return manage(res);
18653 }
18654
is_equal(const union_set & uset2)18655 boolean union_set::is_equal(const union_set &uset2) const
18656 {
18657 auto res = isl_union_set_is_equal(get(), uset2.get());
18658 return manage(res);
18659 }
18660
is_params()18661 boolean union_set::is_params() const
18662 {
18663 auto res = isl_union_set_is_params(get());
18664 return manage(res);
18665 }
18666
is_strict_subset(const union_set & uset2)18667 boolean union_set::is_strict_subset(const union_set &uset2) const
18668 {
18669 auto res = isl_union_set_is_strict_subset(get(), uset2.get());
18670 return manage(res);
18671 }
18672
is_subset(const union_set & uset2)18673 boolean union_set::is_subset(const union_set &uset2) const
18674 {
18675 auto res = isl_union_set_is_subset(get(), uset2.get());
18676 return manage(res);
18677 }
18678
lex_ge_union_set(union_set uset2)18679 union_map union_set::lex_ge_union_set(union_set uset2) const
18680 {
18681 auto res = isl_union_set_lex_ge_union_set(copy(), uset2.release());
18682 return manage(res);
18683 }
18684
lex_gt_union_set(union_set uset2)18685 union_map union_set::lex_gt_union_set(union_set uset2) const
18686 {
18687 auto res = isl_union_set_lex_gt_union_set(copy(), uset2.release());
18688 return manage(res);
18689 }
18690
lex_le_union_set(union_set uset2)18691 union_map union_set::lex_le_union_set(union_set uset2) const
18692 {
18693 auto res = isl_union_set_lex_le_union_set(copy(), uset2.release());
18694 return manage(res);
18695 }
18696
lex_lt_union_set(union_set uset2)18697 union_map union_set::lex_lt_union_set(union_set uset2) const
18698 {
18699 auto res = isl_union_set_lex_lt_union_set(copy(), uset2.release());
18700 return manage(res);
18701 }
18702
lexmax()18703 union_set union_set::lexmax() const
18704 {
18705 auto res = isl_union_set_lexmax(copy());
18706 return manage(res);
18707 }
18708
lexmin()18709 union_set union_set::lexmin() const
18710 {
18711 auto res = isl_union_set_lexmin(copy());
18712 return manage(res);
18713 }
18714
min_multi_union_pw_aff(const multi_union_pw_aff & obj)18715 multi_val union_set::min_multi_union_pw_aff(const multi_union_pw_aff &obj) const
18716 {
18717 auto res = isl_union_set_min_multi_union_pw_aff(get(), obj.get());
18718 return manage(res);
18719 }
18720
n_set()18721 int union_set::n_set() const
18722 {
18723 auto res = isl_union_set_n_set(get());
18724 return res;
18725 }
18726
params()18727 set union_set::params() const
18728 {
18729 auto res = isl_union_set_params(copy());
18730 return manage(res);
18731 }
18732
polyhedral_hull()18733 union_set union_set::polyhedral_hull() const
18734 {
18735 auto res = isl_union_set_polyhedral_hull(copy());
18736 return manage(res);
18737 }
18738
preimage(multi_aff ma)18739 union_set union_set::preimage(multi_aff ma) const
18740 {
18741 auto res = isl_union_set_preimage_multi_aff(copy(), ma.release());
18742 return manage(res);
18743 }
18744
preimage(pw_multi_aff pma)18745 union_set union_set::preimage(pw_multi_aff pma) const
18746 {
18747 auto res = isl_union_set_preimage_pw_multi_aff(copy(), pma.release());
18748 return manage(res);
18749 }
18750
preimage(union_pw_multi_aff upma)18751 union_set union_set::preimage(union_pw_multi_aff upma) const
18752 {
18753 auto res = isl_union_set_preimage_union_pw_multi_aff(copy(), upma.release());
18754 return manage(res);
18755 }
18756
product(union_set uset2)18757 union_set union_set::product(union_set uset2) const
18758 {
18759 auto res = isl_union_set_product(copy(), uset2.release());
18760 return manage(res);
18761 }
18762
project_out(isl::dim type,unsigned int first,unsigned int n)18763 union_set union_set::project_out(isl::dim type, unsigned int first, unsigned int n) const
18764 {
18765 auto res = isl_union_set_project_out(copy(), static_cast<enum isl_dim_type>(type), first, n);
18766 return manage(res);
18767 }
18768
remove_divs()18769 union_set union_set::remove_divs() const
18770 {
18771 auto res = isl_union_set_remove_divs(copy());
18772 return manage(res);
18773 }
18774
remove_redundancies()18775 union_set union_set::remove_redundancies() const
18776 {
18777 auto res = isl_union_set_remove_redundancies(copy());
18778 return manage(res);
18779 }
18780
reset_user()18781 union_set union_set::reset_user() const
18782 {
18783 auto res = isl_union_set_reset_user(copy());
18784 return manage(res);
18785 }
18786
sample()18787 basic_set union_set::sample() const
18788 {
18789 auto res = isl_union_set_sample(copy());
18790 return manage(res);
18791 }
18792
sample_point()18793 point union_set::sample_point() const
18794 {
18795 auto res = isl_union_set_sample_point(copy());
18796 return manage(res);
18797 }
18798
simple_hull()18799 union_set union_set::simple_hull() const
18800 {
18801 auto res = isl_union_set_simple_hull(copy());
18802 return manage(res);
18803 }
18804
solutions()18805 union_set union_set::solutions() const
18806 {
18807 auto res = isl_union_set_solutions(copy());
18808 return manage(res);
18809 }
18810
subtract(union_set uset2)18811 union_set union_set::subtract(union_set uset2) const
18812 {
18813 auto res = isl_union_set_subtract(copy(), uset2.release());
18814 return manage(res);
18815 }
18816
unite(union_set uset2)18817 union_set union_set::unite(union_set uset2) const
18818 {
18819 auto res = isl_union_set_union(copy(), uset2.release());
18820 return manage(res);
18821 }
18822
universe()18823 union_set union_set::universe() const
18824 {
18825 auto res = isl_union_set_universe(copy());
18826 return manage(res);
18827 }
18828
unwrap()18829 union_map union_set::unwrap() const
18830 {
18831 auto res = isl_union_set_unwrap(copy());
18832 return manage(res);
18833 }
18834
wrapped_domain_map()18835 union_map union_set::wrapped_domain_map() const
18836 {
18837 auto res = isl_union_set_wrapped_domain_map(copy());
18838 return manage(res);
18839 }
18840
18841 // implementations for isl::union_set_list
manage(__isl_take isl_union_set_list * ptr)18842 union_set_list manage(__isl_take isl_union_set_list *ptr) {
18843 return union_set_list(ptr);
18844 }
manage_copy(__isl_keep isl_union_set_list * ptr)18845 union_set_list manage_copy(__isl_keep isl_union_set_list *ptr) {
18846 ptr = isl_union_set_list_copy(ptr);
18847 return union_set_list(ptr);
18848 }
18849
union_set_list()18850 union_set_list::union_set_list()
18851 : ptr(nullptr) {}
18852
union_set_list(const union_set_list & obj)18853 union_set_list::union_set_list(const union_set_list &obj)
18854 : ptr(nullptr)
18855 {
18856 ptr = obj.copy();
18857 }
union_set_list(std::nullptr_t)18858 union_set_list::union_set_list(std::nullptr_t)
18859 : ptr(nullptr) {}
18860
18861
union_set_list(__isl_take isl_union_set_list * ptr)18862 union_set_list::union_set_list(__isl_take isl_union_set_list *ptr)
18863 : ptr(ptr) {}
18864
18865
18866 union_set_list &union_set_list::operator=(union_set_list obj) {
18867 std::swap(this->ptr, obj.ptr);
18868 return *this;
18869 }
18870
~union_set_list()18871 union_set_list::~union_set_list() {
18872 if (ptr)
18873 isl_union_set_list_free(ptr);
18874 }
18875
copy()18876 __isl_give isl_union_set_list *union_set_list::copy() const & {
18877 return isl_union_set_list_copy(ptr);
18878 }
18879
get()18880 __isl_keep isl_union_set_list *union_set_list::get() const {
18881 return ptr;
18882 }
18883
release()18884 __isl_give isl_union_set_list *union_set_list::release() {
18885 isl_union_set_list *tmp = ptr;
18886 ptr = nullptr;
18887 return tmp;
18888 }
18889
is_null()18890 bool union_set_list::is_null() const {
18891 return ptr == nullptr;
18892 }
18893 union_set_list::operator bool() const {
18894 return !is_null();
18895 }
18896
18897
get_ctx()18898 ctx union_set_list::get_ctx() const {
18899 return ctx(isl_union_set_list_get_ctx(ptr));
18900 }
18901
dump()18902 void union_set_list::dump() const {
18903 isl_union_set_list_dump(get());
18904 }
18905
18906
add(union_set el)18907 union_set_list union_set_list::add(union_set el) const
18908 {
18909 auto res = isl_union_set_list_add(copy(), el.release());
18910 return manage(res);
18911 }
18912
alloc(ctx ctx,int n)18913 union_set_list union_set_list::alloc(ctx ctx, int n)
18914 {
18915 auto res = isl_union_set_list_alloc(ctx.release(), n);
18916 return manage(res);
18917 }
18918
concat(union_set_list list2)18919 union_set_list union_set_list::concat(union_set_list list2) const
18920 {
18921 auto res = isl_union_set_list_concat(copy(), list2.release());
18922 return manage(res);
18923 }
18924
drop(unsigned int first,unsigned int n)18925 union_set_list union_set_list::drop(unsigned int first, unsigned int n) const
18926 {
18927 auto res = isl_union_set_list_drop(copy(), first, n);
18928 return manage(res);
18929 }
18930
foreach(const std::function<stat (union_set)> & fn)18931 stat union_set_list::foreach(const std::function<stat(union_set)> &fn) const
18932 {
18933 struct fn_data {
18934 const std::function<stat(union_set)> *func;
18935 } fn_data = { &fn };
18936 auto fn_lambda = [](isl_union_set *arg_0, void *arg_1) -> isl_stat {
18937 auto *data = static_cast<struct fn_data *>(arg_1);
18938 stat ret = (*data->func)(manage(arg_0));
18939 return ret.release();
18940 };
18941 auto res = isl_union_set_list_foreach(get(), fn_lambda, &fn_data);
18942 return manage(res);
18943 }
18944
from_union_set(union_set el)18945 union_set_list union_set_list::from_union_set(union_set el)
18946 {
18947 auto res = isl_union_set_list_from_union_set(el.release());
18948 return manage(res);
18949 }
18950
get_at(int index)18951 union_set union_set_list::get_at(int index) const
18952 {
18953 auto res = isl_union_set_list_get_at(get(), index);
18954 return manage(res);
18955 }
18956
get_union_set(int index)18957 union_set union_set_list::get_union_set(int index) const
18958 {
18959 auto res = isl_union_set_list_get_union_set(get(), index);
18960 return manage(res);
18961 }
18962
insert(unsigned int pos,union_set el)18963 union_set_list union_set_list::insert(unsigned int pos, union_set el) const
18964 {
18965 auto res = isl_union_set_list_insert(copy(), pos, el.release());
18966 return manage(res);
18967 }
18968
n_union_set()18969 int union_set_list::n_union_set() const
18970 {
18971 auto res = isl_union_set_list_n_union_set(get());
18972 return res;
18973 }
18974
reverse()18975 union_set_list union_set_list::reverse() const
18976 {
18977 auto res = isl_union_set_list_reverse(copy());
18978 return manage(res);
18979 }
18980
set_union_set(int index,union_set el)18981 union_set_list union_set_list::set_union_set(int index, union_set el) const
18982 {
18983 auto res = isl_union_set_list_set_union_set(copy(), index, el.release());
18984 return manage(res);
18985 }
18986
size()18987 int union_set_list::size() const
18988 {
18989 auto res = isl_union_set_list_size(get());
18990 return res;
18991 }
18992
swap(unsigned int pos1,unsigned int pos2)18993 union_set_list union_set_list::swap(unsigned int pos1, unsigned int pos2) const
18994 {
18995 auto res = isl_union_set_list_swap(copy(), pos1, pos2);
18996 return manage(res);
18997 }
18998
unite()18999 union_set union_set_list::unite() const
19000 {
19001 auto res = isl_union_set_list_union(copy());
19002 return manage(res);
19003 }
19004
19005 // implementations for isl::val
manage(__isl_take isl_val * ptr)19006 val manage(__isl_take isl_val *ptr) {
19007 return val(ptr);
19008 }
manage_copy(__isl_keep isl_val * ptr)19009 val manage_copy(__isl_keep isl_val *ptr) {
19010 ptr = isl_val_copy(ptr);
19011 return val(ptr);
19012 }
19013
val()19014 val::val()
19015 : ptr(nullptr) {}
19016
val(const val & obj)19017 val::val(const val &obj)
19018 : ptr(nullptr)
19019 {
19020 ptr = obj.copy();
19021 }
val(std::nullptr_t)19022 val::val(std::nullptr_t)
19023 : ptr(nullptr) {}
19024
19025
val(__isl_take isl_val * ptr)19026 val::val(__isl_take isl_val *ptr)
19027 : ptr(ptr) {}
19028
val(ctx ctx,const std::string & str)19029 val::val(ctx ctx, const std::string &str)
19030 {
19031 auto res = isl_val_read_from_str(ctx.release(), str.c_str());
19032 ptr = res;
19033 }
val(ctx ctx,long i)19034 val::val(ctx ctx, long i)
19035 {
19036 auto res = isl_val_int_from_si(ctx.release(), i);
19037 ptr = res;
19038 }
19039
19040 val &val::operator=(val obj) {
19041 std::swap(this->ptr, obj.ptr);
19042 return *this;
19043 }
19044
~val()19045 val::~val() {
19046 if (ptr)
19047 isl_val_free(ptr);
19048 }
19049
copy()19050 __isl_give isl_val *val::copy() const & {
19051 return isl_val_copy(ptr);
19052 }
19053
get()19054 __isl_keep isl_val *val::get() const {
19055 return ptr;
19056 }
19057
release()19058 __isl_give isl_val *val::release() {
19059 isl_val *tmp = ptr;
19060 ptr = nullptr;
19061 return tmp;
19062 }
19063
is_null()19064 bool val::is_null() const {
19065 return ptr == nullptr;
19066 }
19067 val::operator bool() const {
19068 return !is_null();
19069 }
19070
19071
get_ctx()19072 ctx val::get_ctx() const {
19073 return ctx(isl_val_get_ctx(ptr));
19074 }
to_str()19075 std::string val::to_str() const {
19076 char *Tmp = isl_val_to_str(get());
19077 if (!Tmp)
19078 return "";
19079 std::string S(Tmp);
19080 free(Tmp);
19081 return S;
19082 }
19083
19084
dump()19085 void val::dump() const {
19086 isl_val_dump(get());
19087 }
19088
19089
abs()19090 val val::abs() const
19091 {
19092 auto res = isl_val_abs(copy());
19093 return manage(res);
19094 }
19095
abs_eq(const val & v2)19096 boolean val::abs_eq(const val &v2) const
19097 {
19098 auto res = isl_val_abs_eq(get(), v2.get());
19099 return manage(res);
19100 }
19101
add(val v2)19102 val val::add(val v2) const
19103 {
19104 auto res = isl_val_add(copy(), v2.release());
19105 return manage(res);
19106 }
19107
add_ui(unsigned long v2)19108 val val::add_ui(unsigned long v2) const
19109 {
19110 auto res = isl_val_add_ui(copy(), v2);
19111 return manage(res);
19112 }
19113
ceil()19114 val val::ceil() const
19115 {
19116 auto res = isl_val_ceil(copy());
19117 return manage(res);
19118 }
19119
cmp_si(long i)19120 int val::cmp_si(long i) const
19121 {
19122 auto res = isl_val_cmp_si(get(), i);
19123 return res;
19124 }
19125
div(val v2)19126 val val::div(val v2) const
19127 {
19128 auto res = isl_val_div(copy(), v2.release());
19129 return manage(res);
19130 }
19131
div_ui(unsigned long v2)19132 val val::div_ui(unsigned long v2) const
19133 {
19134 auto res = isl_val_div_ui(copy(), v2);
19135 return manage(res);
19136 }
19137
eq(const val & v2)19138 boolean val::eq(const val &v2) const
19139 {
19140 auto res = isl_val_eq(get(), v2.get());
19141 return manage(res);
19142 }
19143
floor()19144 val val::floor() const
19145 {
19146 auto res = isl_val_floor(copy());
19147 return manage(res);
19148 }
19149
gcd(val v2)19150 val val::gcd(val v2) const
19151 {
19152 auto res = isl_val_gcd(copy(), v2.release());
19153 return manage(res);
19154 }
19155
ge(const val & v2)19156 boolean val::ge(const val &v2) const
19157 {
19158 auto res = isl_val_ge(get(), v2.get());
19159 return manage(res);
19160 }
19161
get_hash()19162 uint32_t val::get_hash() const
19163 {
19164 auto res = isl_val_get_hash(get());
19165 return res;
19166 }
19167
get_num_si()19168 long val::get_num_si() const
19169 {
19170 auto res = isl_val_get_num_si(get());
19171 return res;
19172 }
19173
gt(const val & v2)19174 boolean val::gt(const val &v2) const
19175 {
19176 auto res = isl_val_gt(get(), v2.get());
19177 return manage(res);
19178 }
19179
gt_si(long i)19180 boolean val::gt_si(long i) const
19181 {
19182 auto res = isl_val_gt_si(get(), i);
19183 return manage(res);
19184 }
19185
infty(ctx ctx)19186 val val::infty(ctx ctx)
19187 {
19188 auto res = isl_val_infty(ctx.release());
19189 return manage(res);
19190 }
19191
int_from_ui(ctx ctx,unsigned long u)19192 val val::int_from_ui(ctx ctx, unsigned long u)
19193 {
19194 auto res = isl_val_int_from_ui(ctx.release(), u);
19195 return manage(res);
19196 }
19197
inv()19198 val val::inv() const
19199 {
19200 auto res = isl_val_inv(copy());
19201 return manage(res);
19202 }
19203
is_divisible_by(const val & v2)19204 boolean val::is_divisible_by(const val &v2) const
19205 {
19206 auto res = isl_val_is_divisible_by(get(), v2.get());
19207 return manage(res);
19208 }
19209
is_infty()19210 boolean val::is_infty() const
19211 {
19212 auto res = isl_val_is_infty(get());
19213 return manage(res);
19214 }
19215
is_int()19216 boolean val::is_int() const
19217 {
19218 auto res = isl_val_is_int(get());
19219 return manage(res);
19220 }
19221
is_nan()19222 boolean val::is_nan() const
19223 {
19224 auto res = isl_val_is_nan(get());
19225 return manage(res);
19226 }
19227
is_neg()19228 boolean val::is_neg() const
19229 {
19230 auto res = isl_val_is_neg(get());
19231 return manage(res);
19232 }
19233
is_neginfty()19234 boolean val::is_neginfty() const
19235 {
19236 auto res = isl_val_is_neginfty(get());
19237 return manage(res);
19238 }
19239
is_negone()19240 boolean val::is_negone() const
19241 {
19242 auto res = isl_val_is_negone(get());
19243 return manage(res);
19244 }
19245
is_nonneg()19246 boolean val::is_nonneg() const
19247 {
19248 auto res = isl_val_is_nonneg(get());
19249 return manage(res);
19250 }
19251
is_nonpos()19252 boolean val::is_nonpos() const
19253 {
19254 auto res = isl_val_is_nonpos(get());
19255 return manage(res);
19256 }
19257
is_one()19258 boolean val::is_one() const
19259 {
19260 auto res = isl_val_is_one(get());
19261 return manage(res);
19262 }
19263
is_pos()19264 boolean val::is_pos() const
19265 {
19266 auto res = isl_val_is_pos(get());
19267 return manage(res);
19268 }
19269
is_rat()19270 boolean val::is_rat() const
19271 {
19272 auto res = isl_val_is_rat(get());
19273 return manage(res);
19274 }
19275
is_zero()19276 boolean val::is_zero() const
19277 {
19278 auto res = isl_val_is_zero(get());
19279 return manage(res);
19280 }
19281
le(const val & v2)19282 boolean val::le(const val &v2) const
19283 {
19284 auto res = isl_val_le(get(), v2.get());
19285 return manage(res);
19286 }
19287
lt(const val & v2)19288 boolean val::lt(const val &v2) const
19289 {
19290 auto res = isl_val_lt(get(), v2.get());
19291 return manage(res);
19292 }
19293
max(val v2)19294 val val::max(val v2) const
19295 {
19296 auto res = isl_val_max(copy(), v2.release());
19297 return manage(res);
19298 }
19299
min(val v2)19300 val val::min(val v2) const
19301 {
19302 auto res = isl_val_min(copy(), v2.release());
19303 return manage(res);
19304 }
19305
mod(val v2)19306 val val::mod(val v2) const
19307 {
19308 auto res = isl_val_mod(copy(), v2.release());
19309 return manage(res);
19310 }
19311
mul(val v2)19312 val val::mul(val v2) const
19313 {
19314 auto res = isl_val_mul(copy(), v2.release());
19315 return manage(res);
19316 }
19317
mul_ui(unsigned long v2)19318 val val::mul_ui(unsigned long v2) const
19319 {
19320 auto res = isl_val_mul_ui(copy(), v2);
19321 return manage(res);
19322 }
19323
n_abs_num_chunks(size_t size)19324 size_t val::n_abs_num_chunks(size_t size) const
19325 {
19326 auto res = isl_val_n_abs_num_chunks(get(), size);
19327 return res;
19328 }
19329
nan(ctx ctx)19330 val val::nan(ctx ctx)
19331 {
19332 auto res = isl_val_nan(ctx.release());
19333 return manage(res);
19334 }
19335
ne(const val & v2)19336 boolean val::ne(const val &v2) const
19337 {
19338 auto res = isl_val_ne(get(), v2.get());
19339 return manage(res);
19340 }
19341
neg()19342 val val::neg() const
19343 {
19344 auto res = isl_val_neg(copy());
19345 return manage(res);
19346 }
19347
neginfty(ctx ctx)19348 val val::neginfty(ctx ctx)
19349 {
19350 auto res = isl_val_neginfty(ctx.release());
19351 return manage(res);
19352 }
19353
negone(ctx ctx)19354 val val::negone(ctx ctx)
19355 {
19356 auto res = isl_val_negone(ctx.release());
19357 return manage(res);
19358 }
19359
one(ctx ctx)19360 val val::one(ctx ctx)
19361 {
19362 auto res = isl_val_one(ctx.release());
19363 return manage(res);
19364 }
19365
pow2()19366 val val::pow2() const
19367 {
19368 auto res = isl_val_pow2(copy());
19369 return manage(res);
19370 }
19371
set_si(long i)19372 val val::set_si(long i) const
19373 {
19374 auto res = isl_val_set_si(copy(), i);
19375 return manage(res);
19376 }
19377
sgn()19378 int val::sgn() const
19379 {
19380 auto res = isl_val_sgn(get());
19381 return res;
19382 }
19383
sub(val v2)19384 val val::sub(val v2) const
19385 {
19386 auto res = isl_val_sub(copy(), v2.release());
19387 return manage(res);
19388 }
19389
sub_ui(unsigned long v2)19390 val val::sub_ui(unsigned long v2) const
19391 {
19392 auto res = isl_val_sub_ui(copy(), v2);
19393 return manage(res);
19394 }
19395
trunc()19396 val val::trunc() const
19397 {
19398 auto res = isl_val_trunc(copy());
19399 return manage(res);
19400 }
19401
zero(ctx ctx)19402 val val::zero(ctx ctx)
19403 {
19404 auto res = isl_val_zero(ctx.release());
19405 return manage(res);
19406 }
19407
19408 // implementations for isl::val_list
manage(__isl_take isl_val_list * ptr)19409 val_list manage(__isl_take isl_val_list *ptr) {
19410 return val_list(ptr);
19411 }
manage_copy(__isl_keep isl_val_list * ptr)19412 val_list manage_copy(__isl_keep isl_val_list *ptr) {
19413 ptr = isl_val_list_copy(ptr);
19414 return val_list(ptr);
19415 }
19416
val_list()19417 val_list::val_list()
19418 : ptr(nullptr) {}
19419
val_list(const val_list & obj)19420 val_list::val_list(const val_list &obj)
19421 : ptr(nullptr)
19422 {
19423 ptr = obj.copy();
19424 }
val_list(std::nullptr_t)19425 val_list::val_list(std::nullptr_t)
19426 : ptr(nullptr) {}
19427
19428
val_list(__isl_take isl_val_list * ptr)19429 val_list::val_list(__isl_take isl_val_list *ptr)
19430 : ptr(ptr) {}
19431
19432
19433 val_list &val_list::operator=(val_list obj) {
19434 std::swap(this->ptr, obj.ptr);
19435 return *this;
19436 }
19437
~val_list()19438 val_list::~val_list() {
19439 if (ptr)
19440 isl_val_list_free(ptr);
19441 }
19442
copy()19443 __isl_give isl_val_list *val_list::copy() const & {
19444 return isl_val_list_copy(ptr);
19445 }
19446
get()19447 __isl_keep isl_val_list *val_list::get() const {
19448 return ptr;
19449 }
19450
release()19451 __isl_give isl_val_list *val_list::release() {
19452 isl_val_list *tmp = ptr;
19453 ptr = nullptr;
19454 return tmp;
19455 }
19456
is_null()19457 bool val_list::is_null() const {
19458 return ptr == nullptr;
19459 }
19460 val_list::operator bool() const {
19461 return !is_null();
19462 }
19463
19464
get_ctx()19465 ctx val_list::get_ctx() const {
19466 return ctx(isl_val_list_get_ctx(ptr));
19467 }
19468
dump()19469 void val_list::dump() const {
19470 isl_val_list_dump(get());
19471 }
19472
19473
add(val el)19474 val_list val_list::add(val el) const
19475 {
19476 auto res = isl_val_list_add(copy(), el.release());
19477 return manage(res);
19478 }
19479
alloc(ctx ctx,int n)19480 val_list val_list::alloc(ctx ctx, int n)
19481 {
19482 auto res = isl_val_list_alloc(ctx.release(), n);
19483 return manage(res);
19484 }
19485
concat(val_list list2)19486 val_list val_list::concat(val_list list2) const
19487 {
19488 auto res = isl_val_list_concat(copy(), list2.release());
19489 return manage(res);
19490 }
19491
drop(unsigned int first,unsigned int n)19492 val_list val_list::drop(unsigned int first, unsigned int n) const
19493 {
19494 auto res = isl_val_list_drop(copy(), first, n);
19495 return manage(res);
19496 }
19497
foreach(const std::function<stat (val)> & fn)19498 stat val_list::foreach(const std::function<stat(val)> &fn) const
19499 {
19500 struct fn_data {
19501 const std::function<stat(val)> *func;
19502 } fn_data = { &fn };
19503 auto fn_lambda = [](isl_val *arg_0, void *arg_1) -> isl_stat {
19504 auto *data = static_cast<struct fn_data *>(arg_1);
19505 stat ret = (*data->func)(manage(arg_0));
19506 return ret.release();
19507 };
19508 auto res = isl_val_list_foreach(get(), fn_lambda, &fn_data);
19509 return manage(res);
19510 }
19511
from_val(val el)19512 val_list val_list::from_val(val el)
19513 {
19514 auto res = isl_val_list_from_val(el.release());
19515 return manage(res);
19516 }
19517
get_at(int index)19518 val val_list::get_at(int index) const
19519 {
19520 auto res = isl_val_list_get_at(get(), index);
19521 return manage(res);
19522 }
19523
get_val(int index)19524 val val_list::get_val(int index) const
19525 {
19526 auto res = isl_val_list_get_val(get(), index);
19527 return manage(res);
19528 }
19529
insert(unsigned int pos,val el)19530 val_list val_list::insert(unsigned int pos, val el) const
19531 {
19532 auto res = isl_val_list_insert(copy(), pos, el.release());
19533 return manage(res);
19534 }
19535
n_val()19536 int val_list::n_val() const
19537 {
19538 auto res = isl_val_list_n_val(get());
19539 return res;
19540 }
19541
reverse()19542 val_list val_list::reverse() const
19543 {
19544 auto res = isl_val_list_reverse(copy());
19545 return manage(res);
19546 }
19547
set_val(int index,val el)19548 val_list val_list::set_val(int index, val el) const
19549 {
19550 auto res = isl_val_list_set_val(copy(), index, el.release());
19551 return manage(res);
19552 }
19553
size()19554 int val_list::size() const
19555 {
19556 auto res = isl_val_list_size(get());
19557 return res;
19558 }
19559
swap(unsigned int pos1,unsigned int pos2)19560 val_list val_list::swap(unsigned int pos1, unsigned int pos2) const
19561 {
19562 auto res = isl_val_list_swap(copy(), pos1, pos2);
19563 return manage(res);
19564 }
19565
19566 // implementations for isl::vec
manage(__isl_take isl_vec * ptr)19567 vec manage(__isl_take isl_vec *ptr) {
19568 return vec(ptr);
19569 }
manage_copy(__isl_keep isl_vec * ptr)19570 vec manage_copy(__isl_keep isl_vec *ptr) {
19571 ptr = isl_vec_copy(ptr);
19572 return vec(ptr);
19573 }
19574
vec()19575 vec::vec()
19576 : ptr(nullptr) {}
19577
vec(const vec & obj)19578 vec::vec(const vec &obj)
19579 : ptr(nullptr)
19580 {
19581 ptr = obj.copy();
19582 }
vec(std::nullptr_t)19583 vec::vec(std::nullptr_t)
19584 : ptr(nullptr) {}
19585
19586
vec(__isl_take isl_vec * ptr)19587 vec::vec(__isl_take isl_vec *ptr)
19588 : ptr(ptr) {}
19589
19590
19591 vec &vec::operator=(vec obj) {
19592 std::swap(this->ptr, obj.ptr);
19593 return *this;
19594 }
19595
~vec()19596 vec::~vec() {
19597 if (ptr)
19598 isl_vec_free(ptr);
19599 }
19600
copy()19601 __isl_give isl_vec *vec::copy() const & {
19602 return isl_vec_copy(ptr);
19603 }
19604
get()19605 __isl_keep isl_vec *vec::get() const {
19606 return ptr;
19607 }
19608
release()19609 __isl_give isl_vec *vec::release() {
19610 isl_vec *tmp = ptr;
19611 ptr = nullptr;
19612 return tmp;
19613 }
19614
is_null()19615 bool vec::is_null() const {
19616 return ptr == nullptr;
19617 }
19618 vec::operator bool() const {
19619 return !is_null();
19620 }
19621
19622
get_ctx()19623 ctx vec::get_ctx() const {
19624 return ctx(isl_vec_get_ctx(ptr));
19625 }
19626
dump()19627 void vec::dump() const {
19628 isl_vec_dump(get());
19629 }
19630
19631
add(vec vec2)19632 vec vec::add(vec vec2) const
19633 {
19634 auto res = isl_vec_add(copy(), vec2.release());
19635 return manage(res);
19636 }
19637
add_els(unsigned int n)19638 vec vec::add_els(unsigned int n) const
19639 {
19640 auto res = isl_vec_add_els(copy(), n);
19641 return manage(res);
19642 }
19643
alloc(ctx ctx,unsigned int size)19644 vec vec::alloc(ctx ctx, unsigned int size)
19645 {
19646 auto res = isl_vec_alloc(ctx.release(), size);
19647 return manage(res);
19648 }
19649
ceil()19650 vec vec::ceil() const
19651 {
19652 auto res = isl_vec_ceil(copy());
19653 return manage(res);
19654 }
19655
clr()19656 vec vec::clr() const
19657 {
19658 auto res = isl_vec_clr(copy());
19659 return manage(res);
19660 }
19661
cmp_element(const vec & vec2,int pos)19662 int vec::cmp_element(const vec &vec2, int pos) const
19663 {
19664 auto res = isl_vec_cmp_element(get(), vec2.get(), pos);
19665 return res;
19666 }
19667
concat(vec vec2)19668 vec vec::concat(vec vec2) const
19669 {
19670 auto res = isl_vec_concat(copy(), vec2.release());
19671 return manage(res);
19672 }
19673
drop_els(unsigned int pos,unsigned int n)19674 vec vec::drop_els(unsigned int pos, unsigned int n) const
19675 {
19676 auto res = isl_vec_drop_els(copy(), pos, n);
19677 return manage(res);
19678 }
19679
extend(unsigned int size)19680 vec vec::extend(unsigned int size) const
19681 {
19682 auto res = isl_vec_extend(copy(), size);
19683 return manage(res);
19684 }
19685
get_element_val(int pos)19686 val vec::get_element_val(int pos) const
19687 {
19688 auto res = isl_vec_get_element_val(get(), pos);
19689 return manage(res);
19690 }
19691
insert_els(unsigned int pos,unsigned int n)19692 vec vec::insert_els(unsigned int pos, unsigned int n) const
19693 {
19694 auto res = isl_vec_insert_els(copy(), pos, n);
19695 return manage(res);
19696 }
19697
insert_zero_els(unsigned int pos,unsigned int n)19698 vec vec::insert_zero_els(unsigned int pos, unsigned int n) const
19699 {
19700 auto res = isl_vec_insert_zero_els(copy(), pos, n);
19701 return manage(res);
19702 }
19703
is_equal(const vec & vec2)19704 boolean vec::is_equal(const vec &vec2) const
19705 {
19706 auto res = isl_vec_is_equal(get(), vec2.get());
19707 return manage(res);
19708 }
19709
mat_product(mat mat)19710 vec vec::mat_product(mat mat) const
19711 {
19712 auto res = isl_vec_mat_product(copy(), mat.release());
19713 return manage(res);
19714 }
19715
move_els(unsigned int dst_col,unsigned int src_col,unsigned int n)19716 vec vec::move_els(unsigned int dst_col, unsigned int src_col, unsigned int n) const
19717 {
19718 auto res = isl_vec_move_els(copy(), dst_col, src_col, n);
19719 return manage(res);
19720 }
19721
neg()19722 vec vec::neg() const
19723 {
19724 auto res = isl_vec_neg(copy());
19725 return manage(res);
19726 }
19727
set_element_si(int pos,int v)19728 vec vec::set_element_si(int pos, int v) const
19729 {
19730 auto res = isl_vec_set_element_si(copy(), pos, v);
19731 return manage(res);
19732 }
19733
set_element_val(int pos,val v)19734 vec vec::set_element_val(int pos, val v) const
19735 {
19736 auto res = isl_vec_set_element_val(copy(), pos, v.release());
19737 return manage(res);
19738 }
19739
set_si(int v)19740 vec vec::set_si(int v) const
19741 {
19742 auto res = isl_vec_set_si(copy(), v);
19743 return manage(res);
19744 }
19745
set_val(val v)19746 vec vec::set_val(val v) const
19747 {
19748 auto res = isl_vec_set_val(copy(), v.release());
19749 return manage(res);
19750 }
19751
size()19752 int vec::size() const
19753 {
19754 auto res = isl_vec_size(get());
19755 return res;
19756 }
19757
sort()19758 vec vec::sort() const
19759 {
19760 auto res = isl_vec_sort(copy());
19761 return manage(res);
19762 }
19763
zero(ctx ctx,unsigned int size)19764 vec vec::zero(ctx ctx, unsigned int size)
19765 {
19766 auto res = isl_vec_zero(ctx.release(), size);
19767 return manage(res);
19768 }
19769
zero_extend(unsigned int size)19770 vec vec::zero_extend(unsigned int size) const
19771 {
19772 auto res = isl_vec_zero_extend(copy(), size);
19773 return manage(res);
19774 }
19775 } // namespace noexceptions
19776 } // namespace isl
19777
19778 #endif /* ISL_CPP_CHECKED */
19779