1 /// These are automatically generated C++ bindings for isl.
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
16 #include <isl/union_set.h>
17 #include <isl/union_map.h>
19 #include <isl/schedule.h>
20 #include <isl/schedule_node.h>
21 #include <isl/ast_build.h>
24 #include <isl/options.h>
31 /* ISL_USE_EXCEPTIONS should be defined to 1 if exceptions are available.
32 * gcc and clang define __cpp_exceptions; MSVC and xlC define _CPPUNWIND.
33 * If exceptions are not available, any error condition will result
36 #ifndef ISL_USE_EXCEPTIONS
37 #if defined(__cpp_exceptions) || defined(_CPPUNWIND)
38 #define ISL_USE_EXCEPTIONS 1
40 #define ISL_USE_EXCEPTIONS 0
49 /* implicit */ ctx(isl_ctx
*ctx
) : ptr(ctx
) {}
60 /* Macros hiding try/catch.
61 * If exceptions are not available, then no exceptions will be thrown and
62 * there is nothing to catch.
64 #if ISL_USE_EXCEPTIONS
65 #define ISL_CPP_TRY try
66 #define ISL_CPP_CATCH_ALL catch (...)
68 #define ISL_CPP_TRY if (1)
69 #define ISL_CPP_CATCH_ALL if (0)
72 #if ISL_USE_EXCEPTIONS
74 /* Class capturing isl errors.
76 * The what() return value is stored in a reference counted string
77 * to ensure that the copy constructor and the assignment operator
78 * do not throw any exceptions.
80 class exception
: public std::exception
{
81 std::shared_ptr
<std::string
> what_str
;
84 inline exception(const char *what_arg
, const char *msg
,
85 const char *file
, int line
);
88 exception(const char *what_arg
) {
89 what_str
= std::make_shared
<std::string
>(what_arg
);
91 static inline void throw_error(enum isl_error error
, const char *msg
,
92 const char *file
, int line
);
93 virtual const char *what() const noexcept
{
94 return what_str
->c_str();
97 /* Default behavior on error conditions that occur inside isl calls
98 * performed from inside the bindings.
99 * In the case exceptions are available, isl should continue
100 * without printing a warning since the warning message
101 * will be included in the exception thrown from inside the bindings.
103 static constexpr auto on_error
= ISL_ON_ERROR_CONTINUE
;
104 /* Wrapper for throwing an exception on NULL input.
106 static void throw_NULL_input(const char *file
, int line
) {
107 throw_error(isl_error_invalid
, "NULL input", file
, line
);
109 static inline void throw_last_error(ctx ctx
);
112 /* Create an exception of a type described by "what_arg", with
113 * error message "msg" in line "line" of file "file".
115 * Create a string holding the what() return value that
116 * corresponds to what isl would have printed.
117 * If no error message or no error file was set, then use "what_arg" instead.
119 exception::exception(const char *what_arg
, const char *msg
, const char *file
,
123 what_str
= std::make_shared
<std::string
>(what_arg
);
125 what_str
= std::make_shared
<std::string
>(std::string(file
) +
126 ":" + std::to_string(line
) + ": " + msg
);
129 class exception_abort
: public exception
{
131 exception_abort(const char *msg
, const char *file
, int line
) :
132 exception("execution aborted", msg
, file
, line
) {}
135 class exception_alloc
: public exception
{
137 exception_alloc(const char *msg
, const char *file
, int line
) :
138 exception("memory allocation failure", msg
, file
, line
) {}
141 class exception_unknown
: public exception
{
143 exception_unknown(const char *msg
, const char *file
, int line
) :
144 exception("unknown failure", msg
, file
, line
) {}
147 class exception_internal
: public exception
{
149 exception_internal(const char *msg
, const char *file
, int line
) :
150 exception("internal error", msg
, file
, line
) {}
153 class exception_invalid
: public exception
{
155 exception_invalid(const char *msg
, const char *file
, int line
) :
156 exception("invalid argument", msg
, file
, line
) {}
159 class exception_quota
: public exception
{
161 exception_quota(const char *msg
, const char *file
, int line
) :
162 exception("quota exceeded", msg
, file
, line
) {}
165 class exception_unsupported
: public exception
{
167 exception_unsupported(const char *msg
, const char *file
, int line
) :
168 exception("unsupported operation", msg
, file
, line
) {}
171 /* Throw an exception of the class that corresponds to "error", with
172 * error message "msg" in line "line" of file "file".
174 * isl_error_none is treated as an invalid error type.
176 void exception::throw_error(enum isl_error error
, const char *msg
,
177 const char *file
, int line
)
182 case isl_error_abort
: throw exception_abort(msg
, file
, line
);
183 case isl_error_alloc
: throw exception_alloc(msg
, file
, line
);
184 case isl_error_unknown
: throw exception_unknown(msg
, file
, line
);
185 case isl_error_internal
: throw exception_internal(msg
, file
, line
);
186 case isl_error_invalid
: throw exception_invalid(msg
, file
, line
);
187 case isl_error_quota
: throw exception_quota(msg
, file
, line
);
188 case isl_error_unsupported
:
189 throw exception_unsupported(msg
, file
, line
);
192 throw exception_invalid("invalid error type", file
, line
);
195 /* Throw an exception corresponding to the last error on "ctx" and
198 * If "ctx" is NULL or if it is not in an error state at the start,
199 * then an invalid argument exception is thrown.
201 void exception::throw_last_error(ctx ctx
)
203 enum isl_error error
;
204 const char *msg
, *file
;
207 error
= isl_ctx_last_error(ctx
.get());
208 msg
= isl_ctx_last_error_msg(ctx
.get());
209 file
= isl_ctx_last_error_file(ctx
.get());
210 line
= isl_ctx_last_error_line(ctx
.get());
211 isl_ctx_reset_error(ctx
.get());
213 throw_error(error
, msg
, file
, line
);
223 /* Default behavior on error conditions that occur inside isl calls
224 * performed from inside the bindings.
225 * In the case exceptions are not available, isl should abort.
227 static constexpr auto on_error
= ISL_ON_ERROR_ABORT
;
228 /* Wrapper for throwing an exception on NULL input.
229 * In the case exceptions are not available, print an error and abort.
231 static void throw_NULL_input(const char *file
, int line
) {
232 fprintf(stderr
, "%s:%d: NULL input\n", file
, line
);
235 /* Throw an exception corresponding to the last
237 * isl should already abort when an error condition occurs,
238 * so this function should never be called.
240 static void throw_last_error(ctx ctx
) {
247 /* Helper class for setting the on_error and resetting the option
248 * to the original value when leaving the scope.
250 class options_scoped_set_on_error
{
254 options_scoped_set_on_error(class ctx ctx
, int on_error
) {
255 this->ctx
= ctx
.get();
256 saved_on_error
= isl_options_get_on_error(this->ctx
);
257 isl_options_set_on_error(this->ctx
, on_error
);
259 ~options_scoped_set_on_error() {
260 isl_options_set_on_error(ctx
, saved_on_error
);
268 // forward declarations
278 class multi_union_pw_aff
;
284 class schedule_constraints
;
287 class union_access_info
;
291 class union_pw_multi_aff
;
295 // declarations for isl::aff
296 inline aff
manage(__isl_take isl_aff
*ptr
);
297 inline aff
manage_copy(__isl_keep isl_aff
*ptr
);
300 friend inline aff
manage(__isl_take isl_aff
*ptr
);
301 friend inline aff
manage_copy(__isl_keep isl_aff
*ptr
);
303 isl_aff
*ptr
= nullptr;
305 inline explicit aff(__isl_take isl_aff
*ptr
);
308 inline /* implicit */ aff();
309 inline /* implicit */ aff(const aff
&obj
);
310 inline explicit aff(ctx ctx
, const std::string
&str
);
311 inline aff
&operator=(aff obj
);
313 inline __isl_give isl_aff
*copy() const &;
314 inline __isl_give isl_aff
*copy() && = delete;
315 inline __isl_keep isl_aff
*get() const;
316 inline __isl_give isl_aff
*release();
317 inline bool is_null() const;
318 inline ctx
get_ctx() const;
320 inline aff
add(aff aff2
) const;
321 inline aff
ceil() const;
322 inline aff
div(aff aff2
) const;
323 inline set
eq_set(aff aff2
) const;
324 inline aff
floor() const;
325 inline set
ge_set(aff aff2
) const;
326 inline set
gt_set(aff aff2
) const;
327 inline set
le_set(aff aff2
) const;
328 inline set
lt_set(aff aff2
) const;
329 inline aff
mod(val mod
) const;
330 inline aff
mul(aff aff2
) const;
331 inline set
ne_set(aff aff2
) const;
332 inline aff
neg() const;
333 inline aff
pullback(multi_aff ma
) const;
334 inline aff
scale(val v
) const;
335 inline aff
scale_down(val v
) const;
336 inline aff
sub(aff aff2
) const;
339 // declarations for isl::ast_build
340 inline ast_build
manage(__isl_take isl_ast_build
*ptr
);
341 inline ast_build
manage_copy(__isl_keep isl_ast_build
*ptr
);
344 friend inline ast_build
manage(__isl_take isl_ast_build
*ptr
);
345 friend inline ast_build
manage_copy(__isl_keep isl_ast_build
*ptr
);
347 isl_ast_build
*ptr
= nullptr;
349 inline explicit ast_build(__isl_take isl_ast_build
*ptr
);
352 inline /* implicit */ ast_build();
353 inline /* implicit */ ast_build(const ast_build
&obj
);
354 inline explicit ast_build(ctx ctx
);
355 inline ast_build
&operator=(ast_build obj
);
357 inline __isl_give isl_ast_build
*copy() const &;
358 inline __isl_give isl_ast_build
*copy() && = delete;
359 inline __isl_keep isl_ast_build
*get() const;
360 inline __isl_give isl_ast_build
*release();
361 inline bool is_null() const;
362 inline ctx
get_ctx() const;
364 inline ast_expr
access_from(pw_multi_aff pma
) const;
365 inline ast_expr
access_from(multi_pw_aff mpa
) const;
366 inline ast_expr
call_from(pw_multi_aff pma
) const;
367 inline ast_expr
call_from(multi_pw_aff mpa
) const;
368 inline ast_expr
expr_from(set set
) const;
369 inline ast_expr
expr_from(pw_aff pa
) const;
370 static inline ast_build
from_context(set set
);
371 inline ast_node
node_from_schedule_map(union_map schedule
) const;
374 // declarations for isl::ast_expr
375 inline ast_expr
manage(__isl_take isl_ast_expr
*ptr
);
376 inline ast_expr
manage_copy(__isl_keep isl_ast_expr
*ptr
);
379 friend inline ast_expr
manage(__isl_take isl_ast_expr
*ptr
);
380 friend inline ast_expr
manage_copy(__isl_keep isl_ast_expr
*ptr
);
382 isl_ast_expr
*ptr
= nullptr;
384 inline explicit ast_expr(__isl_take isl_ast_expr
*ptr
);
387 inline /* implicit */ ast_expr();
388 inline /* implicit */ ast_expr(const ast_expr
&obj
);
389 inline ast_expr
&operator=(ast_expr obj
);
391 inline __isl_give isl_ast_expr
*copy() const &;
392 inline __isl_give isl_ast_expr
*copy() && = delete;
393 inline __isl_keep isl_ast_expr
*get() const;
394 inline __isl_give isl_ast_expr
*release();
395 inline bool is_null() const;
396 inline ctx
get_ctx() const;
398 inline std::string
to_C_str() const;
401 // declarations for isl::ast_node
402 inline ast_node
manage(__isl_take isl_ast_node
*ptr
);
403 inline ast_node
manage_copy(__isl_keep isl_ast_node
*ptr
);
406 friend inline ast_node
manage(__isl_take isl_ast_node
*ptr
);
407 friend inline ast_node
manage_copy(__isl_keep isl_ast_node
*ptr
);
409 isl_ast_node
*ptr
= nullptr;
411 inline explicit ast_node(__isl_take isl_ast_node
*ptr
);
414 inline /* implicit */ ast_node();
415 inline /* implicit */ ast_node(const ast_node
&obj
);
416 inline ast_node
&operator=(ast_node obj
);
418 inline __isl_give isl_ast_node
*copy() const &;
419 inline __isl_give isl_ast_node
*copy() && = delete;
420 inline __isl_keep isl_ast_node
*get() const;
421 inline __isl_give isl_ast_node
*release();
422 inline bool is_null() const;
423 inline ctx
get_ctx() const;
425 inline std::string
to_C_str() const;
428 // declarations for isl::basic_map
429 inline basic_map
manage(__isl_take isl_basic_map
*ptr
);
430 inline basic_map
manage_copy(__isl_keep isl_basic_map
*ptr
);
433 friend inline basic_map
manage(__isl_take isl_basic_map
*ptr
);
434 friend inline basic_map
manage_copy(__isl_keep isl_basic_map
*ptr
);
436 isl_basic_map
*ptr
= nullptr;
438 inline explicit basic_map(__isl_take isl_basic_map
*ptr
);
441 inline /* implicit */ basic_map();
442 inline /* implicit */ basic_map(const basic_map
&obj
);
443 inline explicit basic_map(ctx ctx
, const std::string
&str
);
444 inline basic_map
&operator=(basic_map obj
);
446 inline __isl_give isl_basic_map
*copy() const &;
447 inline __isl_give isl_basic_map
*copy() && = delete;
448 inline __isl_keep isl_basic_map
*get() const;
449 inline __isl_give isl_basic_map
*release();
450 inline bool is_null() const;
451 inline ctx
get_ctx() const;
453 inline basic_map
affine_hull() const;
454 inline basic_map
apply_domain(basic_map bmap2
) const;
455 inline basic_map
apply_range(basic_map bmap2
) const;
456 inline basic_set
deltas() const;
457 inline basic_map
detect_equalities() const;
458 inline basic_map
flatten() const;
459 inline basic_map
flatten_domain() const;
460 inline basic_map
flatten_range() const;
461 inline basic_map
gist(basic_map context
) const;
462 inline basic_map
intersect(basic_map bmap2
) const;
463 inline basic_map
intersect_domain(basic_set bset
) const;
464 inline basic_map
intersect_range(basic_set bset
) const;
465 inline bool is_empty() const;
466 inline bool is_equal(const basic_map
&bmap2
) const;
467 inline bool is_subset(const basic_map
&bmap2
) const;
468 inline map
lexmax() const;
469 inline map
lexmin() const;
470 inline basic_map
reverse() const;
471 inline basic_map
sample() const;
472 inline map
unite(basic_map bmap2
) const;
475 // declarations for isl::basic_set
476 inline basic_set
manage(__isl_take isl_basic_set
*ptr
);
477 inline basic_set
manage_copy(__isl_keep isl_basic_set
*ptr
);
480 friend inline basic_set
manage(__isl_take isl_basic_set
*ptr
);
481 friend inline basic_set
manage_copy(__isl_keep isl_basic_set
*ptr
);
483 isl_basic_set
*ptr
= nullptr;
485 inline explicit basic_set(__isl_take isl_basic_set
*ptr
);
488 inline /* implicit */ basic_set();
489 inline /* implicit */ basic_set(const basic_set
&obj
);
490 inline explicit basic_set(ctx ctx
, const std::string
&str
);
491 inline /* implicit */ basic_set(point pnt
);
492 inline basic_set
&operator=(basic_set obj
);
494 inline __isl_give isl_basic_set
*copy() const &;
495 inline __isl_give isl_basic_set
*copy() && = delete;
496 inline __isl_keep isl_basic_set
*get() const;
497 inline __isl_give isl_basic_set
*release();
498 inline bool is_null() const;
499 inline ctx
get_ctx() const;
501 inline basic_set
affine_hull() const;
502 inline basic_set
apply(basic_map bmap
) const;
503 inline basic_set
detect_equalities() const;
504 inline val
dim_max_val(int pos
) const;
505 inline basic_set
flatten() const;
506 inline basic_set
gist(basic_set context
) const;
507 inline basic_set
intersect(basic_set bset2
) const;
508 inline basic_set
intersect_params(basic_set bset2
) const;
509 inline bool is_empty() const;
510 inline bool is_equal(const basic_set
&bset2
) const;
511 inline bool is_subset(const basic_set
&bset2
) const;
512 inline bool is_wrapping() const;
513 inline set
lexmax() const;
514 inline set
lexmin() const;
515 inline basic_set
sample() const;
516 inline point
sample_point() const;
517 inline set
unite(basic_set bset2
) const;
520 // declarations for isl::map
521 inline map
manage(__isl_take isl_map
*ptr
);
522 inline map
manage_copy(__isl_keep isl_map
*ptr
);
525 friend inline map
manage(__isl_take isl_map
*ptr
);
526 friend inline map
manage_copy(__isl_keep isl_map
*ptr
);
528 isl_map
*ptr
= nullptr;
530 inline explicit map(__isl_take isl_map
*ptr
);
533 inline /* implicit */ map();
534 inline /* implicit */ map(const map
&obj
);
535 inline explicit map(ctx ctx
, const std::string
&str
);
536 inline /* implicit */ map(basic_map bmap
);
537 inline map
&operator=(map obj
);
539 inline __isl_give isl_map
*copy() const &;
540 inline __isl_give isl_map
*copy() && = delete;
541 inline __isl_keep isl_map
*get() const;
542 inline __isl_give isl_map
*release();
543 inline bool is_null() const;
544 inline ctx
get_ctx() const;
546 inline basic_map
affine_hull() const;
547 inline map
apply_domain(map map2
) const;
548 inline map
apply_range(map map2
) const;
549 inline map
coalesce() const;
550 inline map
complement() const;
551 inline set
deltas() const;
552 inline map
detect_equalities() const;
553 inline map
flatten() const;
554 inline map
flatten_domain() const;
555 inline map
flatten_range() const;
556 inline void foreach_basic_map(const std::function
<void(basic_map
)> &fn
) const;
557 inline map
gist(map context
) const;
558 inline map
gist_domain(set context
) const;
559 inline map
intersect(map map2
) const;
560 inline map
intersect_domain(set set
) const;
561 inline map
intersect_params(set params
) const;
562 inline map
intersect_range(set set
) const;
563 inline bool is_bijective() const;
564 inline bool is_disjoint(const map
&map2
) const;
565 inline bool is_empty() const;
566 inline bool is_equal(const map
&map2
) const;
567 inline bool is_injective() const;
568 inline bool is_single_valued() const;
569 inline bool is_strict_subset(const map
&map2
) const;
570 inline bool is_subset(const map
&map2
) const;
571 inline map
lexmax() const;
572 inline map
lexmin() const;
573 inline basic_map
polyhedral_hull() const;
574 inline map
reverse() const;
575 inline basic_map
sample() const;
576 inline map
subtract(map map2
) const;
577 inline map
unite(map map2
) const;
578 inline basic_map
unshifted_simple_hull() const;
581 // declarations for isl::multi_aff
582 inline multi_aff
manage(__isl_take isl_multi_aff
*ptr
);
583 inline multi_aff
manage_copy(__isl_keep isl_multi_aff
*ptr
);
586 friend inline multi_aff
manage(__isl_take isl_multi_aff
*ptr
);
587 friend inline multi_aff
manage_copy(__isl_keep isl_multi_aff
*ptr
);
589 isl_multi_aff
*ptr
= nullptr;
591 inline explicit multi_aff(__isl_take isl_multi_aff
*ptr
);
594 inline /* implicit */ multi_aff();
595 inline /* implicit */ multi_aff(const multi_aff
&obj
);
596 inline /* implicit */ multi_aff(aff aff
);
597 inline explicit multi_aff(ctx ctx
, const std::string
&str
);
598 inline multi_aff
&operator=(multi_aff obj
);
600 inline __isl_give isl_multi_aff
*copy() const &;
601 inline __isl_give isl_multi_aff
*copy() && = delete;
602 inline __isl_keep isl_multi_aff
*get() const;
603 inline __isl_give isl_multi_aff
*release();
604 inline bool is_null() const;
605 inline ctx
get_ctx() const;
607 inline multi_aff
add(multi_aff multi2
) const;
608 inline multi_aff
flat_range_product(multi_aff multi2
) const;
609 inline multi_aff
product(multi_aff multi2
) const;
610 inline multi_aff
pullback(multi_aff ma2
) const;
611 inline multi_aff
range_product(multi_aff multi2
) const;
614 // declarations for isl::multi_pw_aff
615 inline multi_pw_aff
manage(__isl_take isl_multi_pw_aff
*ptr
);
616 inline multi_pw_aff
manage_copy(__isl_keep isl_multi_pw_aff
*ptr
);
619 friend inline multi_pw_aff
manage(__isl_take isl_multi_pw_aff
*ptr
);
620 friend inline multi_pw_aff
manage_copy(__isl_keep isl_multi_pw_aff
*ptr
);
622 isl_multi_pw_aff
*ptr
= nullptr;
624 inline explicit multi_pw_aff(__isl_take isl_multi_pw_aff
*ptr
);
627 inline /* implicit */ multi_pw_aff();
628 inline /* implicit */ multi_pw_aff(const multi_pw_aff
&obj
);
629 inline /* implicit */ multi_pw_aff(multi_aff ma
);
630 inline /* implicit */ multi_pw_aff(pw_aff pa
);
631 inline /* implicit */ multi_pw_aff(pw_multi_aff pma
);
632 inline explicit multi_pw_aff(ctx ctx
, const std::string
&str
);
633 inline multi_pw_aff
&operator=(multi_pw_aff obj
);
634 inline ~multi_pw_aff();
635 inline __isl_give isl_multi_pw_aff
*copy() const &;
636 inline __isl_give isl_multi_pw_aff
*copy() && = delete;
637 inline __isl_keep isl_multi_pw_aff
*get() const;
638 inline __isl_give isl_multi_pw_aff
*release();
639 inline bool is_null() const;
640 inline ctx
get_ctx() const;
642 inline multi_pw_aff
add(multi_pw_aff multi2
) const;
643 inline multi_pw_aff
flat_range_product(multi_pw_aff multi2
) const;
644 inline multi_pw_aff
product(multi_pw_aff multi2
) const;
645 inline multi_pw_aff
pullback(multi_aff ma
) const;
646 inline multi_pw_aff
pullback(pw_multi_aff pma
) const;
647 inline multi_pw_aff
pullback(multi_pw_aff mpa2
) const;
648 inline multi_pw_aff
range_product(multi_pw_aff multi2
) const;
651 // declarations for isl::multi_union_pw_aff
652 inline multi_union_pw_aff
manage(__isl_take isl_multi_union_pw_aff
*ptr
);
653 inline multi_union_pw_aff
manage_copy(__isl_keep isl_multi_union_pw_aff
*ptr
);
655 class multi_union_pw_aff
{
656 friend inline multi_union_pw_aff
manage(__isl_take isl_multi_union_pw_aff
*ptr
);
657 friend inline multi_union_pw_aff
manage_copy(__isl_keep isl_multi_union_pw_aff
*ptr
);
659 isl_multi_union_pw_aff
*ptr
= nullptr;
661 inline explicit multi_union_pw_aff(__isl_take isl_multi_union_pw_aff
*ptr
);
664 inline /* implicit */ multi_union_pw_aff();
665 inline /* implicit */ multi_union_pw_aff(const multi_union_pw_aff
&obj
);
666 inline /* implicit */ multi_union_pw_aff(union_pw_aff upa
);
667 inline /* implicit */ multi_union_pw_aff(multi_pw_aff mpa
);
668 inline explicit multi_union_pw_aff(ctx ctx
, const std::string
&str
);
669 inline multi_union_pw_aff
&operator=(multi_union_pw_aff obj
);
670 inline ~multi_union_pw_aff();
671 inline __isl_give isl_multi_union_pw_aff
*copy() const &;
672 inline __isl_give isl_multi_union_pw_aff
*copy() && = delete;
673 inline __isl_keep isl_multi_union_pw_aff
*get() const;
674 inline __isl_give isl_multi_union_pw_aff
*release();
675 inline bool is_null() const;
676 inline ctx
get_ctx() const;
678 inline multi_union_pw_aff
add(multi_union_pw_aff multi2
) const;
679 inline multi_union_pw_aff
flat_range_product(multi_union_pw_aff multi2
) const;
680 inline multi_union_pw_aff
pullback(union_pw_multi_aff upma
) const;
681 inline multi_union_pw_aff
range_product(multi_union_pw_aff multi2
) const;
682 inline multi_union_pw_aff
union_add(multi_union_pw_aff mupa2
) const;
685 // declarations for isl::multi_val
686 inline multi_val
manage(__isl_take isl_multi_val
*ptr
);
687 inline multi_val
manage_copy(__isl_keep isl_multi_val
*ptr
);
690 friend inline multi_val
manage(__isl_take isl_multi_val
*ptr
);
691 friend inline multi_val
manage_copy(__isl_keep isl_multi_val
*ptr
);
693 isl_multi_val
*ptr
= nullptr;
695 inline explicit multi_val(__isl_take isl_multi_val
*ptr
);
698 inline /* implicit */ multi_val();
699 inline /* implicit */ multi_val(const multi_val
&obj
);
700 inline multi_val
&operator=(multi_val obj
);
702 inline __isl_give isl_multi_val
*copy() const &;
703 inline __isl_give isl_multi_val
*copy() && = delete;
704 inline __isl_keep isl_multi_val
*get() const;
705 inline __isl_give isl_multi_val
*release();
706 inline bool is_null() const;
707 inline ctx
get_ctx() const;
709 inline multi_val
add(multi_val multi2
) const;
710 inline multi_val
flat_range_product(multi_val multi2
) const;
711 inline multi_val
product(multi_val multi2
) const;
712 inline multi_val
range_product(multi_val multi2
) const;
715 // declarations for isl::point
716 inline point
manage(__isl_take isl_point
*ptr
);
717 inline point
manage_copy(__isl_keep isl_point
*ptr
);
720 friend inline point
manage(__isl_take isl_point
*ptr
);
721 friend inline point
manage_copy(__isl_keep isl_point
*ptr
);
723 isl_point
*ptr
= nullptr;
725 inline explicit point(__isl_take isl_point
*ptr
);
728 inline /* implicit */ point();
729 inline /* implicit */ point(const point
&obj
);
730 inline point
&operator=(point obj
);
732 inline __isl_give isl_point
*copy() const &;
733 inline __isl_give isl_point
*copy() && = delete;
734 inline __isl_keep isl_point
*get() const;
735 inline __isl_give isl_point
*release();
736 inline bool is_null() const;
737 inline ctx
get_ctx() const;
741 // declarations for isl::pw_aff
742 inline pw_aff
manage(__isl_take isl_pw_aff
*ptr
);
743 inline pw_aff
manage_copy(__isl_keep isl_pw_aff
*ptr
);
746 friend inline pw_aff
manage(__isl_take isl_pw_aff
*ptr
);
747 friend inline pw_aff
manage_copy(__isl_keep isl_pw_aff
*ptr
);
749 isl_pw_aff
*ptr
= nullptr;
751 inline explicit pw_aff(__isl_take isl_pw_aff
*ptr
);
754 inline /* implicit */ pw_aff();
755 inline /* implicit */ pw_aff(const pw_aff
&obj
);
756 inline /* implicit */ pw_aff(aff aff
);
757 inline explicit pw_aff(ctx ctx
, const std::string
&str
);
758 inline pw_aff
&operator=(pw_aff obj
);
760 inline __isl_give isl_pw_aff
*copy() const &;
761 inline __isl_give isl_pw_aff
*copy() && = delete;
762 inline __isl_keep isl_pw_aff
*get() const;
763 inline __isl_give isl_pw_aff
*release();
764 inline bool is_null() const;
765 inline ctx
get_ctx() const;
767 inline pw_aff
add(pw_aff pwaff2
) const;
768 inline pw_aff
ceil() const;
769 inline pw_aff
cond(pw_aff pwaff_true
, pw_aff pwaff_false
) const;
770 inline pw_aff
div(pw_aff pa2
) const;
771 inline set
eq_set(pw_aff pwaff2
) const;
772 inline pw_aff
floor() const;
773 inline set
ge_set(pw_aff pwaff2
) const;
774 inline set
gt_set(pw_aff pwaff2
) const;
775 inline set
le_set(pw_aff pwaff2
) const;
776 inline set
lt_set(pw_aff pwaff2
) const;
777 inline pw_aff
max(pw_aff pwaff2
) const;
778 inline pw_aff
min(pw_aff pwaff2
) const;
779 inline pw_aff
mod(val mod
) const;
780 inline pw_aff
mul(pw_aff pwaff2
) const;
781 inline set
ne_set(pw_aff pwaff2
) const;
782 inline pw_aff
neg() const;
783 inline pw_aff
pullback(multi_aff ma
) const;
784 inline pw_aff
pullback(pw_multi_aff pma
) const;
785 inline pw_aff
pullback(multi_pw_aff mpa
) const;
786 inline pw_aff
scale(val v
) const;
787 inline pw_aff
scale_down(val f
) const;
788 inline pw_aff
sub(pw_aff pwaff2
) const;
789 inline pw_aff
tdiv_q(pw_aff pa2
) const;
790 inline pw_aff
tdiv_r(pw_aff pa2
) const;
791 inline pw_aff
union_add(pw_aff pwaff2
) const;
794 // declarations for isl::pw_multi_aff
795 inline pw_multi_aff
manage(__isl_take isl_pw_multi_aff
*ptr
);
796 inline pw_multi_aff
manage_copy(__isl_keep isl_pw_multi_aff
*ptr
);
799 friend inline pw_multi_aff
manage(__isl_take isl_pw_multi_aff
*ptr
);
800 friend inline pw_multi_aff
manage_copy(__isl_keep isl_pw_multi_aff
*ptr
);
802 isl_pw_multi_aff
*ptr
= nullptr;
804 inline explicit pw_multi_aff(__isl_take isl_pw_multi_aff
*ptr
);
807 inline /* implicit */ pw_multi_aff();
808 inline /* implicit */ pw_multi_aff(const pw_multi_aff
&obj
);
809 inline /* implicit */ pw_multi_aff(multi_aff ma
);
810 inline /* implicit */ pw_multi_aff(pw_aff pa
);
811 inline explicit pw_multi_aff(ctx ctx
, const std::string
&str
);
812 inline pw_multi_aff
&operator=(pw_multi_aff obj
);
813 inline ~pw_multi_aff();
814 inline __isl_give isl_pw_multi_aff
*copy() const &;
815 inline __isl_give isl_pw_multi_aff
*copy() && = delete;
816 inline __isl_keep isl_pw_multi_aff
*get() const;
817 inline __isl_give isl_pw_multi_aff
*release();
818 inline bool is_null() const;
819 inline ctx
get_ctx() const;
821 inline pw_multi_aff
add(pw_multi_aff pma2
) const;
822 inline pw_multi_aff
flat_range_product(pw_multi_aff pma2
) const;
823 inline pw_multi_aff
product(pw_multi_aff pma2
) const;
824 inline pw_multi_aff
pullback(multi_aff ma
) const;
825 inline pw_multi_aff
pullback(pw_multi_aff pma2
) const;
826 inline pw_multi_aff
range_product(pw_multi_aff pma2
) const;
827 inline pw_multi_aff
union_add(pw_multi_aff pma2
) const;
830 // declarations for isl::schedule
831 inline schedule
manage(__isl_take isl_schedule
*ptr
);
832 inline schedule
manage_copy(__isl_keep isl_schedule
*ptr
);
835 friend inline schedule
manage(__isl_take isl_schedule
*ptr
);
836 friend inline schedule
manage_copy(__isl_keep isl_schedule
*ptr
);
838 isl_schedule
*ptr
= nullptr;
840 inline explicit schedule(__isl_take isl_schedule
*ptr
);
843 inline /* implicit */ schedule();
844 inline /* implicit */ schedule(const schedule
&obj
);
845 inline explicit schedule(ctx ctx
, const std::string
&str
);
846 inline schedule
&operator=(schedule obj
);
848 inline __isl_give isl_schedule
*copy() const &;
849 inline __isl_give isl_schedule
*copy() && = delete;
850 inline __isl_keep isl_schedule
*get() const;
851 inline __isl_give isl_schedule
*release();
852 inline bool is_null() const;
853 inline ctx
get_ctx() const;
855 inline union_map
get_map() const;
856 inline schedule_node
get_root() const;
857 inline schedule
pullback(union_pw_multi_aff upma
) const;
860 // declarations for isl::schedule_constraints
861 inline schedule_constraints
manage(__isl_take isl_schedule_constraints
*ptr
);
862 inline schedule_constraints
manage_copy(__isl_keep isl_schedule_constraints
*ptr
);
864 class schedule_constraints
{
865 friend inline schedule_constraints
manage(__isl_take isl_schedule_constraints
*ptr
);
866 friend inline schedule_constraints
manage_copy(__isl_keep isl_schedule_constraints
*ptr
);
868 isl_schedule_constraints
*ptr
= nullptr;
870 inline explicit schedule_constraints(__isl_take isl_schedule_constraints
*ptr
);
873 inline /* implicit */ schedule_constraints();
874 inline /* implicit */ schedule_constraints(const schedule_constraints
&obj
);
875 inline explicit schedule_constraints(ctx ctx
, const std::string
&str
);
876 inline schedule_constraints
&operator=(schedule_constraints obj
);
877 inline ~schedule_constraints();
878 inline __isl_give isl_schedule_constraints
*copy() const &;
879 inline __isl_give isl_schedule_constraints
*copy() && = delete;
880 inline __isl_keep isl_schedule_constraints
*get() const;
881 inline __isl_give isl_schedule_constraints
*release();
882 inline bool is_null() const;
883 inline ctx
get_ctx() const;
885 inline schedule
compute_schedule() const;
886 inline union_map
get_coincidence() const;
887 inline union_map
get_conditional_validity() const;
888 inline union_map
get_conditional_validity_condition() const;
889 inline set
get_context() const;
890 inline union_set
get_domain() const;
891 inline union_map
get_proximity() const;
892 inline union_map
get_validity() const;
893 static inline schedule_constraints
on_domain(union_set domain
);
894 inline schedule_constraints
set_coincidence(union_map coincidence
) const;
895 inline schedule_constraints
set_conditional_validity(union_map condition
, union_map validity
) const;
896 inline schedule_constraints
set_context(set context
) const;
897 inline schedule_constraints
set_proximity(union_map proximity
) const;
898 inline schedule_constraints
set_validity(union_map validity
) const;
901 // declarations for isl::schedule_node
902 inline schedule_node
manage(__isl_take isl_schedule_node
*ptr
);
903 inline schedule_node
manage_copy(__isl_keep isl_schedule_node
*ptr
);
905 class schedule_node
{
906 friend inline schedule_node
manage(__isl_take isl_schedule_node
*ptr
);
907 friend inline schedule_node
manage_copy(__isl_keep isl_schedule_node
*ptr
);
909 isl_schedule_node
*ptr
= nullptr;
911 inline explicit schedule_node(__isl_take isl_schedule_node
*ptr
);
914 inline /* implicit */ schedule_node();
915 inline /* implicit */ schedule_node(const schedule_node
&obj
);
916 inline schedule_node
&operator=(schedule_node obj
);
917 inline ~schedule_node();
918 inline __isl_give isl_schedule_node
*copy() const &;
919 inline __isl_give isl_schedule_node
*copy() && = delete;
920 inline __isl_keep isl_schedule_node
*get() const;
921 inline __isl_give isl_schedule_node
*release();
922 inline bool is_null() const;
923 inline ctx
get_ctx() const;
925 inline bool band_member_get_coincident(int pos
) const;
926 inline schedule_node
band_member_set_coincident(int pos
, int coincident
) const;
927 inline schedule_node
child(int pos
) const;
928 inline multi_union_pw_aff
get_prefix_schedule_multi_union_pw_aff() const;
929 inline union_map
get_prefix_schedule_union_map() const;
930 inline union_pw_multi_aff
get_prefix_schedule_union_pw_multi_aff() const;
931 inline schedule
get_schedule() const;
932 inline schedule_node
parent() const;
935 // declarations for isl::set
936 inline set
manage(__isl_take isl_set
*ptr
);
937 inline set
manage_copy(__isl_keep isl_set
*ptr
);
940 friend inline set
manage(__isl_take isl_set
*ptr
);
941 friend inline set
manage_copy(__isl_keep isl_set
*ptr
);
943 isl_set
*ptr
= nullptr;
945 inline explicit set(__isl_take isl_set
*ptr
);
948 inline /* implicit */ set();
949 inline /* implicit */ set(const set
&obj
);
950 inline explicit set(ctx ctx
, const std::string
&str
);
951 inline /* implicit */ set(basic_set bset
);
952 inline /* implicit */ set(point pnt
);
953 inline set
&operator=(set obj
);
955 inline __isl_give isl_set
*copy() const &;
956 inline __isl_give isl_set
*copy() && = delete;
957 inline __isl_keep isl_set
*get() const;
958 inline __isl_give isl_set
*release();
959 inline bool is_null() const;
960 inline ctx
get_ctx() const;
962 inline basic_set
affine_hull() const;
963 inline set
apply(map map
) const;
964 inline set
coalesce() const;
965 inline set
complement() const;
966 inline set
detect_equalities() const;
967 inline set
flatten() const;
968 inline void foreach_basic_set(const std::function
<void(basic_set
)> &fn
) const;
969 inline val
get_stride(int pos
) const;
970 inline set
gist(set context
) const;
971 inline map
identity() const;
972 inline set
intersect(set set2
) const;
973 inline set
intersect_params(set params
) const;
974 inline bool is_disjoint(const set
&set2
) const;
975 inline bool is_empty() const;
976 inline bool is_equal(const set
&set2
) const;
977 inline bool is_strict_subset(const set
&set2
) const;
978 inline bool is_subset(const set
&set2
) const;
979 inline bool is_wrapping() const;
980 inline set
lexmax() const;
981 inline set
lexmin() const;
982 inline val
max_val(const aff
&obj
) const;
983 inline val
min_val(const aff
&obj
) const;
984 inline basic_set
polyhedral_hull() const;
985 inline basic_set
sample() const;
986 inline point
sample_point() const;
987 inline set
subtract(set set2
) const;
988 inline set
unite(set set2
) const;
989 inline basic_set
unshifted_simple_hull() const;
992 // declarations for isl::union_access_info
993 inline union_access_info
manage(__isl_take isl_union_access_info
*ptr
);
994 inline union_access_info
manage_copy(__isl_keep isl_union_access_info
*ptr
);
996 class union_access_info
{
997 friend inline union_access_info
manage(__isl_take isl_union_access_info
*ptr
);
998 friend inline union_access_info
manage_copy(__isl_keep isl_union_access_info
*ptr
);
1000 isl_union_access_info
*ptr
= nullptr;
1002 inline explicit union_access_info(__isl_take isl_union_access_info
*ptr
);
1005 inline /* implicit */ union_access_info();
1006 inline /* implicit */ union_access_info(const union_access_info
&obj
);
1007 inline explicit union_access_info(union_map sink
);
1008 inline union_access_info
&operator=(union_access_info obj
);
1009 inline ~union_access_info();
1010 inline __isl_give isl_union_access_info
*copy() const &;
1011 inline __isl_give isl_union_access_info
*copy() && = delete;
1012 inline __isl_keep isl_union_access_info
*get() const;
1013 inline __isl_give isl_union_access_info
*release();
1014 inline bool is_null() const;
1015 inline ctx
get_ctx() const;
1017 inline union_flow
compute_flow() const;
1018 inline union_access_info
set_kill(union_map kill
) const;
1019 inline union_access_info
set_may_source(union_map may_source
) const;
1020 inline union_access_info
set_must_source(union_map must_source
) const;
1021 inline union_access_info
set_schedule(schedule schedule
) const;
1022 inline union_access_info
set_schedule_map(union_map schedule_map
) const;
1025 // declarations for isl::union_flow
1026 inline union_flow
manage(__isl_take isl_union_flow
*ptr
);
1027 inline union_flow
manage_copy(__isl_keep isl_union_flow
*ptr
);
1030 friend inline union_flow
manage(__isl_take isl_union_flow
*ptr
);
1031 friend inline union_flow
manage_copy(__isl_keep isl_union_flow
*ptr
);
1033 isl_union_flow
*ptr
= nullptr;
1035 inline explicit union_flow(__isl_take isl_union_flow
*ptr
);
1038 inline /* implicit */ union_flow();
1039 inline /* implicit */ union_flow(const union_flow
&obj
);
1040 inline union_flow
&operator=(union_flow obj
);
1041 inline ~union_flow();
1042 inline __isl_give isl_union_flow
*copy() const &;
1043 inline __isl_give isl_union_flow
*copy() && = delete;
1044 inline __isl_keep isl_union_flow
*get() const;
1045 inline __isl_give isl_union_flow
*release();
1046 inline bool is_null() const;
1047 inline ctx
get_ctx() const;
1049 inline union_map
get_full_may_dependence() const;
1050 inline union_map
get_full_must_dependence() const;
1051 inline union_map
get_may_dependence() const;
1052 inline union_map
get_may_no_source() const;
1053 inline union_map
get_must_dependence() const;
1054 inline union_map
get_must_no_source() const;
1057 // declarations for isl::union_map
1058 inline union_map
manage(__isl_take isl_union_map
*ptr
);
1059 inline union_map
manage_copy(__isl_keep isl_union_map
*ptr
);
1062 friend inline union_map
manage(__isl_take isl_union_map
*ptr
);
1063 friend inline union_map
manage_copy(__isl_keep isl_union_map
*ptr
);
1065 isl_union_map
*ptr
= nullptr;
1067 inline explicit union_map(__isl_take isl_union_map
*ptr
);
1070 inline /* implicit */ union_map();
1071 inline /* implicit */ union_map(const union_map
&obj
);
1072 inline /* implicit */ union_map(basic_map bmap
);
1073 inline /* implicit */ union_map(map map
);
1074 inline explicit union_map(ctx ctx
, const std::string
&str
);
1075 inline union_map
&operator=(union_map obj
);
1076 inline ~union_map();
1077 inline __isl_give isl_union_map
*copy() const &;
1078 inline __isl_give isl_union_map
*copy() && = delete;
1079 inline __isl_keep isl_union_map
*get() const;
1080 inline __isl_give isl_union_map
*release();
1081 inline bool is_null() const;
1082 inline ctx
get_ctx() const;
1084 inline union_map
affine_hull() const;
1085 inline union_map
apply_domain(union_map umap2
) const;
1086 inline union_map
apply_range(union_map umap2
) const;
1087 inline union_map
coalesce() const;
1088 inline union_map
compute_divs() const;
1089 inline union_set
deltas() const;
1090 inline union_map
detect_equalities() const;
1091 inline union_set
domain() const;
1092 inline union_map
domain_factor_domain() const;
1093 inline union_map
domain_factor_range() const;
1094 inline union_map
domain_map() const;
1095 inline union_pw_multi_aff
domain_map_union_pw_multi_aff() const;
1096 inline union_map
domain_product(union_map umap2
) const;
1097 inline union_map
eq_at(multi_union_pw_aff mupa
) const;
1098 inline union_map
factor_domain() const;
1099 inline union_map
factor_range() const;
1100 inline union_map
fixed_power(val exp
) const;
1101 inline void foreach_map(const std::function
<void(map
)> &fn
) const;
1102 static inline union_map
from(union_pw_multi_aff upma
);
1103 static inline union_map
from(multi_union_pw_aff mupa
);
1104 static inline union_map
from_domain(union_set uset
);
1105 static inline union_map
from_domain_and_range(union_set domain
, union_set range
);
1106 static inline union_map
from_range(union_set uset
);
1107 inline union_map
gist(union_map context
) const;
1108 inline union_map
gist_domain(union_set uset
) const;
1109 inline union_map
gist_params(set set
) const;
1110 inline union_map
gist_range(union_set uset
) const;
1111 inline union_map
intersect(union_map umap2
) const;
1112 inline union_map
intersect_domain(union_set uset
) const;
1113 inline union_map
intersect_params(set set
) const;
1114 inline union_map
intersect_range(union_set uset
) const;
1115 inline bool is_bijective() const;
1116 inline bool is_empty() const;
1117 inline bool is_equal(const union_map
&umap2
) const;
1118 inline bool is_injective() const;
1119 inline bool is_single_valued() const;
1120 inline bool is_strict_subset(const union_map
&umap2
) const;
1121 inline bool is_subset(const union_map
&umap2
) const;
1122 inline union_map
lexmax() const;
1123 inline union_map
lexmin() const;
1124 inline union_map
polyhedral_hull() const;
1125 inline union_map
product(union_map umap2
) const;
1126 inline union_map
project_out_all_params() const;
1127 inline union_set
range() const;
1128 inline union_map
range_factor_domain() const;
1129 inline union_map
range_factor_range() const;
1130 inline union_map
range_map() const;
1131 inline union_map
range_product(union_map umap2
) const;
1132 inline union_map
reverse() const;
1133 inline union_map
subtract(union_map umap2
) const;
1134 inline union_map
subtract_domain(union_set dom
) const;
1135 inline union_map
subtract_range(union_set dom
) const;
1136 inline union_map
unite(union_map umap2
) const;
1137 inline union_set
wrap() const;
1138 inline union_map
zip() const;
1141 // declarations for isl::union_pw_aff
1142 inline union_pw_aff
manage(__isl_take isl_union_pw_aff
*ptr
);
1143 inline union_pw_aff
manage_copy(__isl_keep isl_union_pw_aff
*ptr
);
1145 class union_pw_aff
{
1146 friend inline union_pw_aff
manage(__isl_take isl_union_pw_aff
*ptr
);
1147 friend inline union_pw_aff
manage_copy(__isl_keep isl_union_pw_aff
*ptr
);
1149 isl_union_pw_aff
*ptr
= nullptr;
1151 inline explicit union_pw_aff(__isl_take isl_union_pw_aff
*ptr
);
1154 inline /* implicit */ union_pw_aff();
1155 inline /* implicit */ union_pw_aff(const union_pw_aff
&obj
);
1156 inline /* implicit */ union_pw_aff(pw_aff pa
);
1157 inline explicit union_pw_aff(ctx ctx
, const std::string
&str
);
1158 inline union_pw_aff
&operator=(union_pw_aff obj
);
1159 inline ~union_pw_aff();
1160 inline __isl_give isl_union_pw_aff
*copy() const &;
1161 inline __isl_give isl_union_pw_aff
*copy() && = delete;
1162 inline __isl_keep isl_union_pw_aff
*get() const;
1163 inline __isl_give isl_union_pw_aff
*release();
1164 inline bool is_null() const;
1165 inline ctx
get_ctx() const;
1167 inline union_pw_aff
add(union_pw_aff upa2
) const;
1168 inline union_pw_aff
pullback(union_pw_multi_aff upma
) const;
1169 inline union_pw_aff
union_add(union_pw_aff upa2
) const;
1172 // declarations for isl::union_pw_multi_aff
1173 inline union_pw_multi_aff
manage(__isl_take isl_union_pw_multi_aff
*ptr
);
1174 inline union_pw_multi_aff
manage_copy(__isl_keep isl_union_pw_multi_aff
*ptr
);
1176 class union_pw_multi_aff
{
1177 friend inline union_pw_multi_aff
manage(__isl_take isl_union_pw_multi_aff
*ptr
);
1178 friend inline union_pw_multi_aff
manage_copy(__isl_keep isl_union_pw_multi_aff
*ptr
);
1180 isl_union_pw_multi_aff
*ptr
= nullptr;
1182 inline explicit union_pw_multi_aff(__isl_take isl_union_pw_multi_aff
*ptr
);
1185 inline /* implicit */ union_pw_multi_aff();
1186 inline /* implicit */ union_pw_multi_aff(const union_pw_multi_aff
&obj
);
1187 inline /* implicit */ union_pw_multi_aff(pw_multi_aff pma
);
1188 inline explicit union_pw_multi_aff(ctx ctx
, const std::string
&str
);
1189 inline /* implicit */ union_pw_multi_aff(union_pw_aff upa
);
1190 inline union_pw_multi_aff
&operator=(union_pw_multi_aff obj
);
1191 inline ~union_pw_multi_aff();
1192 inline __isl_give isl_union_pw_multi_aff
*copy() const &;
1193 inline __isl_give isl_union_pw_multi_aff
*copy() && = delete;
1194 inline __isl_keep isl_union_pw_multi_aff
*get() const;
1195 inline __isl_give isl_union_pw_multi_aff
*release();
1196 inline bool is_null() const;
1197 inline ctx
get_ctx() const;
1199 inline union_pw_multi_aff
add(union_pw_multi_aff upma2
) const;
1200 inline union_pw_multi_aff
flat_range_product(union_pw_multi_aff upma2
) const;
1201 inline union_pw_multi_aff
pullback(union_pw_multi_aff upma2
) const;
1202 inline union_pw_multi_aff
union_add(union_pw_multi_aff upma2
) const;
1205 // declarations for isl::union_set
1206 inline union_set
manage(__isl_take isl_union_set
*ptr
);
1207 inline union_set
manage_copy(__isl_keep isl_union_set
*ptr
);
1210 friend inline union_set
manage(__isl_take isl_union_set
*ptr
);
1211 friend inline union_set
manage_copy(__isl_keep isl_union_set
*ptr
);
1213 isl_union_set
*ptr
= nullptr;
1215 inline explicit union_set(__isl_take isl_union_set
*ptr
);
1218 inline /* implicit */ union_set();
1219 inline /* implicit */ union_set(const union_set
&obj
);
1220 inline /* implicit */ union_set(basic_set bset
);
1221 inline /* implicit */ union_set(set set
);
1222 inline /* implicit */ union_set(point pnt
);
1223 inline explicit union_set(ctx ctx
, const std::string
&str
);
1224 inline union_set
&operator=(union_set obj
);
1225 inline ~union_set();
1226 inline __isl_give isl_union_set
*copy() const &;
1227 inline __isl_give isl_union_set
*copy() && = delete;
1228 inline __isl_keep isl_union_set
*get() const;
1229 inline __isl_give isl_union_set
*release();
1230 inline bool is_null() const;
1231 inline ctx
get_ctx() const;
1233 inline union_set
affine_hull() const;
1234 inline union_set
apply(union_map umap
) const;
1235 inline union_set
coalesce() const;
1236 inline union_set
compute_divs() const;
1237 inline union_set
detect_equalities() const;
1238 inline void foreach_point(const std::function
<void(point
)> &fn
) const;
1239 inline void foreach_set(const std::function
<void(set
)> &fn
) const;
1240 inline union_set
gist(union_set context
) const;
1241 inline union_set
gist_params(set set
) const;
1242 inline union_map
identity() const;
1243 inline union_set
intersect(union_set uset2
) const;
1244 inline union_set
intersect_params(set set
) const;
1245 inline bool is_empty() const;
1246 inline bool is_equal(const union_set
&uset2
) const;
1247 inline bool is_strict_subset(const union_set
&uset2
) const;
1248 inline bool is_subset(const union_set
&uset2
) const;
1249 inline union_set
lexmax() const;
1250 inline union_set
lexmin() const;
1251 inline union_set
polyhedral_hull() const;
1252 inline union_set
preimage(multi_aff ma
) const;
1253 inline union_set
preimage(pw_multi_aff pma
) const;
1254 inline union_set
preimage(union_pw_multi_aff upma
) const;
1255 inline point
sample_point() const;
1256 inline union_set
subtract(union_set uset2
) const;
1257 inline union_set
unite(union_set uset2
) const;
1258 inline union_map
unwrap() const;
1261 // declarations for isl::val
1262 inline val
manage(__isl_take isl_val
*ptr
);
1263 inline val
manage_copy(__isl_keep isl_val
*ptr
);
1266 friend inline val
manage(__isl_take isl_val
*ptr
);
1267 friend inline val
manage_copy(__isl_keep isl_val
*ptr
);
1269 isl_val
*ptr
= nullptr;
1271 inline explicit val(__isl_take isl_val
*ptr
);
1274 inline /* implicit */ val();
1275 inline /* implicit */ val(const val
&obj
);
1276 inline explicit val(ctx ctx
, const std::string
&str
);
1277 inline explicit val(ctx ctx
, long i
);
1278 inline val
&operator=(val obj
);
1280 inline __isl_give isl_val
*copy() const &;
1281 inline __isl_give isl_val
*copy() && = delete;
1282 inline __isl_keep isl_val
*get() const;
1283 inline __isl_give isl_val
*release();
1284 inline bool is_null() const;
1285 inline ctx
get_ctx() const;
1287 inline val
abs() const;
1288 inline bool abs_eq(const val
&v2
) const;
1289 inline val
add(val v2
) const;
1290 inline val
ceil() const;
1291 inline int cmp_si(long i
) const;
1292 inline val
div(val v2
) const;
1293 inline bool eq(const val
&v2
) const;
1294 inline val
floor() const;
1295 inline val
gcd(val v2
) const;
1296 inline bool ge(const val
&v2
) const;
1297 inline bool gt(const val
&v2
) const;
1298 static inline val
infty(ctx ctx
);
1299 inline val
inv() const;
1300 inline bool is_divisible_by(const val
&v2
) const;
1301 inline bool is_infty() const;
1302 inline bool is_int() const;
1303 inline bool is_nan() const;
1304 inline bool is_neg() const;
1305 inline bool is_neginfty() const;
1306 inline bool is_negone() const;
1307 inline bool is_nonneg() const;
1308 inline bool is_nonpos() const;
1309 inline bool is_one() const;
1310 inline bool is_pos() const;
1311 inline bool is_rat() const;
1312 inline bool is_zero() const;
1313 inline bool le(const val
&v2
) const;
1314 inline bool lt(const val
&v2
) const;
1315 inline val
max(val v2
) const;
1316 inline val
min(val v2
) const;
1317 inline val
mod(val v2
) const;
1318 inline val
mul(val v2
) const;
1319 static inline val
nan(ctx ctx
);
1320 inline bool ne(const val
&v2
) const;
1321 inline val
neg() const;
1322 static inline val
neginfty(ctx ctx
);
1323 static inline val
negone(ctx ctx
);
1324 static inline val
one(ctx ctx
);
1325 inline val
pow2() const;
1326 inline int sgn() const;
1327 inline val
sub(val v2
) const;
1328 inline val
trunc() const;
1329 static inline val
zero(ctx ctx
);
1332 // implementations for isl::aff
1333 aff
manage(__isl_take isl_aff
*ptr
) {
1335 exception::throw_NULL_input(__FILE__
, __LINE__
);
1338 aff
manage_copy(__isl_keep isl_aff
*ptr
) {
1340 exception::throw_NULL_input(__FILE__
, __LINE__
);
1341 auto ctx
= isl_aff_get_ctx(ptr
);
1342 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1343 ptr
= isl_aff_copy(ptr
);
1345 exception::throw_last_error(ctx
);
1352 aff::aff(const aff
&obj
)
1356 exception::throw_NULL_input(__FILE__
, __LINE__
);
1357 auto ctx
= isl_aff_get_ctx(obj
.ptr
);
1358 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1361 exception::throw_last_error(ctx
);
1364 aff::aff(__isl_take isl_aff
*ptr
)
1367 aff::aff(ctx ctx
, const std::string
&str
)
1369 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1370 auto res
= isl_aff_read_from_str(ctx
.release(), str
.c_str());
1372 exception::throw_last_error(ctx
);
1376 aff
&aff::operator=(aff obj
) {
1377 std::swap(this->ptr
, obj
.ptr
);
1386 __isl_give isl_aff
*aff::copy() const & {
1387 return isl_aff_copy(ptr
);
1390 __isl_keep isl_aff
*aff::get() const {
1394 __isl_give isl_aff
*aff::release() {
1400 bool aff::is_null() const {
1401 return ptr
== nullptr;
1404 ctx
aff::get_ctx() const {
1405 return ctx(isl_aff_get_ctx(ptr
));
1408 aff
aff::add(aff aff2
) const
1410 if (!ptr
|| aff2
.is_null())
1411 exception::throw_NULL_input(__FILE__
, __LINE__
);
1412 auto ctx
= get_ctx();
1413 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1414 auto res
= isl_aff_add(copy(), aff2
.release());
1416 exception::throw_last_error(ctx
);
1420 aff
aff::ceil() const
1423 exception::throw_NULL_input(__FILE__
, __LINE__
);
1424 auto ctx
= get_ctx();
1425 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1426 auto res
= isl_aff_ceil(copy());
1428 exception::throw_last_error(ctx
);
1432 aff
aff::div(aff aff2
) const
1434 if (!ptr
|| aff2
.is_null())
1435 exception::throw_NULL_input(__FILE__
, __LINE__
);
1436 auto ctx
= get_ctx();
1437 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1438 auto res
= isl_aff_div(copy(), aff2
.release());
1440 exception::throw_last_error(ctx
);
1444 set
aff::eq_set(aff aff2
) const
1446 if (!ptr
|| aff2
.is_null())
1447 exception::throw_NULL_input(__FILE__
, __LINE__
);
1448 auto ctx
= get_ctx();
1449 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1450 auto res
= isl_aff_eq_set(copy(), aff2
.release());
1452 exception::throw_last_error(ctx
);
1456 aff
aff::floor() const
1459 exception::throw_NULL_input(__FILE__
, __LINE__
);
1460 auto ctx
= get_ctx();
1461 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1462 auto res
= isl_aff_floor(copy());
1464 exception::throw_last_error(ctx
);
1468 set
aff::ge_set(aff aff2
) const
1470 if (!ptr
|| aff2
.is_null())
1471 exception::throw_NULL_input(__FILE__
, __LINE__
);
1472 auto ctx
= get_ctx();
1473 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1474 auto res
= isl_aff_ge_set(copy(), aff2
.release());
1476 exception::throw_last_error(ctx
);
1480 set
aff::gt_set(aff aff2
) const
1482 if (!ptr
|| aff2
.is_null())
1483 exception::throw_NULL_input(__FILE__
, __LINE__
);
1484 auto ctx
= get_ctx();
1485 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1486 auto res
= isl_aff_gt_set(copy(), aff2
.release());
1488 exception::throw_last_error(ctx
);
1492 set
aff::le_set(aff aff2
) const
1494 if (!ptr
|| aff2
.is_null())
1495 exception::throw_NULL_input(__FILE__
, __LINE__
);
1496 auto ctx
= get_ctx();
1497 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1498 auto res
= isl_aff_le_set(copy(), aff2
.release());
1500 exception::throw_last_error(ctx
);
1504 set
aff::lt_set(aff aff2
) const
1506 if (!ptr
|| aff2
.is_null())
1507 exception::throw_NULL_input(__FILE__
, __LINE__
);
1508 auto ctx
= get_ctx();
1509 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1510 auto res
= isl_aff_lt_set(copy(), aff2
.release());
1512 exception::throw_last_error(ctx
);
1516 aff
aff::mod(val mod
) const
1518 if (!ptr
|| mod
.is_null())
1519 exception::throw_NULL_input(__FILE__
, __LINE__
);
1520 auto ctx
= get_ctx();
1521 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1522 auto res
= isl_aff_mod_val(copy(), mod
.release());
1524 exception::throw_last_error(ctx
);
1528 aff
aff::mul(aff aff2
) const
1530 if (!ptr
|| aff2
.is_null())
1531 exception::throw_NULL_input(__FILE__
, __LINE__
);
1532 auto ctx
= get_ctx();
1533 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1534 auto res
= isl_aff_mul(copy(), aff2
.release());
1536 exception::throw_last_error(ctx
);
1540 set
aff::ne_set(aff aff2
) const
1542 if (!ptr
|| aff2
.is_null())
1543 exception::throw_NULL_input(__FILE__
, __LINE__
);
1544 auto ctx
= get_ctx();
1545 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1546 auto res
= isl_aff_ne_set(copy(), aff2
.release());
1548 exception::throw_last_error(ctx
);
1552 aff
aff::neg() const
1555 exception::throw_NULL_input(__FILE__
, __LINE__
);
1556 auto ctx
= get_ctx();
1557 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1558 auto res
= isl_aff_neg(copy());
1560 exception::throw_last_error(ctx
);
1564 aff
aff::pullback(multi_aff ma
) const
1566 if (!ptr
|| ma
.is_null())
1567 exception::throw_NULL_input(__FILE__
, __LINE__
);
1568 auto ctx
= get_ctx();
1569 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1570 auto res
= isl_aff_pullback_multi_aff(copy(), ma
.release());
1572 exception::throw_last_error(ctx
);
1576 aff
aff::scale(val v
) const
1578 if (!ptr
|| v
.is_null())
1579 exception::throw_NULL_input(__FILE__
, __LINE__
);
1580 auto ctx
= get_ctx();
1581 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1582 auto res
= isl_aff_scale_val(copy(), v
.release());
1584 exception::throw_last_error(ctx
);
1588 aff
aff::scale_down(val v
) const
1590 if (!ptr
|| v
.is_null())
1591 exception::throw_NULL_input(__FILE__
, __LINE__
);
1592 auto ctx
= get_ctx();
1593 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1594 auto res
= isl_aff_scale_down_val(copy(), v
.release());
1596 exception::throw_last_error(ctx
);
1600 aff
aff::sub(aff aff2
) const
1602 if (!ptr
|| aff2
.is_null())
1603 exception::throw_NULL_input(__FILE__
, __LINE__
);
1604 auto ctx
= get_ctx();
1605 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1606 auto res
= isl_aff_sub(copy(), aff2
.release());
1608 exception::throw_last_error(ctx
);
1612 // implementations for isl::ast_build
1613 ast_build
manage(__isl_take isl_ast_build
*ptr
) {
1615 exception::throw_NULL_input(__FILE__
, __LINE__
);
1616 return ast_build(ptr
);
1618 ast_build
manage_copy(__isl_keep isl_ast_build
*ptr
) {
1620 exception::throw_NULL_input(__FILE__
, __LINE__
);
1621 auto ctx
= isl_ast_build_get_ctx(ptr
);
1622 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1623 ptr
= isl_ast_build_copy(ptr
);
1625 exception::throw_last_error(ctx
);
1626 return ast_build(ptr
);
1629 ast_build::ast_build()
1632 ast_build::ast_build(const ast_build
&obj
)
1636 exception::throw_NULL_input(__FILE__
, __LINE__
);
1637 auto ctx
= isl_ast_build_get_ctx(obj
.ptr
);
1638 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1641 exception::throw_last_error(ctx
);
1644 ast_build::ast_build(__isl_take isl_ast_build
*ptr
)
1647 ast_build::ast_build(ctx ctx
)
1649 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1650 auto res
= isl_ast_build_alloc(ctx
.release());
1652 exception::throw_last_error(ctx
);
1656 ast_build
&ast_build::operator=(ast_build obj
) {
1657 std::swap(this->ptr
, obj
.ptr
);
1661 ast_build::~ast_build() {
1663 isl_ast_build_free(ptr
);
1666 __isl_give isl_ast_build
*ast_build::copy() const & {
1667 return isl_ast_build_copy(ptr
);
1670 __isl_keep isl_ast_build
*ast_build::get() const {
1674 __isl_give isl_ast_build
*ast_build::release() {
1675 isl_ast_build
*tmp
= ptr
;
1680 bool ast_build::is_null() const {
1681 return ptr
== nullptr;
1684 ctx
ast_build::get_ctx() const {
1685 return ctx(isl_ast_build_get_ctx(ptr
));
1688 ast_expr
ast_build::access_from(pw_multi_aff pma
) const
1690 if (!ptr
|| pma
.is_null())
1691 exception::throw_NULL_input(__FILE__
, __LINE__
);
1692 auto ctx
= get_ctx();
1693 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1694 auto res
= isl_ast_build_access_from_pw_multi_aff(get(), pma
.release());
1696 exception::throw_last_error(ctx
);
1700 ast_expr
ast_build::access_from(multi_pw_aff mpa
) const
1702 if (!ptr
|| mpa
.is_null())
1703 exception::throw_NULL_input(__FILE__
, __LINE__
);
1704 auto ctx
= get_ctx();
1705 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1706 auto res
= isl_ast_build_access_from_multi_pw_aff(get(), mpa
.release());
1708 exception::throw_last_error(ctx
);
1712 ast_expr
ast_build::call_from(pw_multi_aff pma
) const
1714 if (!ptr
|| pma
.is_null())
1715 exception::throw_NULL_input(__FILE__
, __LINE__
);
1716 auto ctx
= get_ctx();
1717 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1718 auto res
= isl_ast_build_call_from_pw_multi_aff(get(), pma
.release());
1720 exception::throw_last_error(ctx
);
1724 ast_expr
ast_build::call_from(multi_pw_aff mpa
) const
1726 if (!ptr
|| mpa
.is_null())
1727 exception::throw_NULL_input(__FILE__
, __LINE__
);
1728 auto ctx
= get_ctx();
1729 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1730 auto res
= isl_ast_build_call_from_multi_pw_aff(get(), mpa
.release());
1732 exception::throw_last_error(ctx
);
1736 ast_expr
ast_build::expr_from(set set
) const
1738 if (!ptr
|| set
.is_null())
1739 exception::throw_NULL_input(__FILE__
, __LINE__
);
1740 auto ctx
= get_ctx();
1741 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1742 auto res
= isl_ast_build_expr_from_set(get(), set
.release());
1744 exception::throw_last_error(ctx
);
1748 ast_expr
ast_build::expr_from(pw_aff pa
) const
1750 if (!ptr
|| pa
.is_null())
1751 exception::throw_NULL_input(__FILE__
, __LINE__
);
1752 auto ctx
= get_ctx();
1753 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1754 auto res
= isl_ast_build_expr_from_pw_aff(get(), pa
.release());
1756 exception::throw_last_error(ctx
);
1760 ast_build
ast_build::from_context(set set
)
1763 exception::throw_NULL_input(__FILE__
, __LINE__
);
1764 auto ctx
= set
.get_ctx();
1765 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1766 auto res
= isl_ast_build_from_context(set
.release());
1768 exception::throw_last_error(ctx
);
1772 ast_node
ast_build::node_from_schedule_map(union_map schedule
) const
1774 if (!ptr
|| schedule
.is_null())
1775 exception::throw_NULL_input(__FILE__
, __LINE__
);
1776 auto ctx
= get_ctx();
1777 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1778 auto res
= isl_ast_build_node_from_schedule_map(get(), schedule
.release());
1780 exception::throw_last_error(ctx
);
1784 // implementations for isl::ast_expr
1785 ast_expr
manage(__isl_take isl_ast_expr
*ptr
) {
1787 exception::throw_NULL_input(__FILE__
, __LINE__
);
1788 return ast_expr(ptr
);
1790 ast_expr
manage_copy(__isl_keep isl_ast_expr
*ptr
) {
1792 exception::throw_NULL_input(__FILE__
, __LINE__
);
1793 auto ctx
= isl_ast_expr_get_ctx(ptr
);
1794 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1795 ptr
= isl_ast_expr_copy(ptr
);
1797 exception::throw_last_error(ctx
);
1798 return ast_expr(ptr
);
1801 ast_expr::ast_expr()
1804 ast_expr::ast_expr(const ast_expr
&obj
)
1808 exception::throw_NULL_input(__FILE__
, __LINE__
);
1809 auto ctx
= isl_ast_expr_get_ctx(obj
.ptr
);
1810 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1813 exception::throw_last_error(ctx
);
1816 ast_expr::ast_expr(__isl_take isl_ast_expr
*ptr
)
1820 ast_expr
&ast_expr::operator=(ast_expr obj
) {
1821 std::swap(this->ptr
, obj
.ptr
);
1825 ast_expr::~ast_expr() {
1827 isl_ast_expr_free(ptr
);
1830 __isl_give isl_ast_expr
*ast_expr::copy() const & {
1831 return isl_ast_expr_copy(ptr
);
1834 __isl_keep isl_ast_expr
*ast_expr::get() const {
1838 __isl_give isl_ast_expr
*ast_expr::release() {
1839 isl_ast_expr
*tmp
= ptr
;
1844 bool ast_expr::is_null() const {
1845 return ptr
== nullptr;
1848 ctx
ast_expr::get_ctx() const {
1849 return ctx(isl_ast_expr_get_ctx(ptr
));
1852 std::string
ast_expr::to_C_str() const
1855 exception::throw_NULL_input(__FILE__
, __LINE__
);
1856 auto ctx
= get_ctx();
1857 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1858 auto res
= isl_ast_expr_to_C_str(get());
1859 std::string
tmp(res
);
1864 // implementations for isl::ast_node
1865 ast_node
manage(__isl_take isl_ast_node
*ptr
) {
1867 exception::throw_NULL_input(__FILE__
, __LINE__
);
1868 return ast_node(ptr
);
1870 ast_node
manage_copy(__isl_keep isl_ast_node
*ptr
) {
1872 exception::throw_NULL_input(__FILE__
, __LINE__
);
1873 auto ctx
= isl_ast_node_get_ctx(ptr
);
1874 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1875 ptr
= isl_ast_node_copy(ptr
);
1877 exception::throw_last_error(ctx
);
1878 return ast_node(ptr
);
1881 ast_node::ast_node()
1884 ast_node::ast_node(const ast_node
&obj
)
1888 exception::throw_NULL_input(__FILE__
, __LINE__
);
1889 auto ctx
= isl_ast_node_get_ctx(obj
.ptr
);
1890 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1893 exception::throw_last_error(ctx
);
1896 ast_node::ast_node(__isl_take isl_ast_node
*ptr
)
1900 ast_node
&ast_node::operator=(ast_node obj
) {
1901 std::swap(this->ptr
, obj
.ptr
);
1905 ast_node::~ast_node() {
1907 isl_ast_node_free(ptr
);
1910 __isl_give isl_ast_node
*ast_node::copy() const & {
1911 return isl_ast_node_copy(ptr
);
1914 __isl_keep isl_ast_node
*ast_node::get() const {
1918 __isl_give isl_ast_node
*ast_node::release() {
1919 isl_ast_node
*tmp
= ptr
;
1924 bool ast_node::is_null() const {
1925 return ptr
== nullptr;
1928 ctx
ast_node::get_ctx() const {
1929 return ctx(isl_ast_node_get_ctx(ptr
));
1932 std::string
ast_node::to_C_str() const
1935 exception::throw_NULL_input(__FILE__
, __LINE__
);
1936 auto ctx
= get_ctx();
1937 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1938 auto res
= isl_ast_node_to_C_str(get());
1939 std::string
tmp(res
);
1944 // implementations for isl::basic_map
1945 basic_map
manage(__isl_take isl_basic_map
*ptr
) {
1947 exception::throw_NULL_input(__FILE__
, __LINE__
);
1948 return basic_map(ptr
);
1950 basic_map
manage_copy(__isl_keep isl_basic_map
*ptr
) {
1952 exception::throw_NULL_input(__FILE__
, __LINE__
);
1953 auto ctx
= isl_basic_map_get_ctx(ptr
);
1954 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1955 ptr
= isl_basic_map_copy(ptr
);
1957 exception::throw_last_error(ctx
);
1958 return basic_map(ptr
);
1961 basic_map::basic_map()
1964 basic_map::basic_map(const basic_map
&obj
)
1968 exception::throw_NULL_input(__FILE__
, __LINE__
);
1969 auto ctx
= isl_basic_map_get_ctx(obj
.ptr
);
1970 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1973 exception::throw_last_error(ctx
);
1976 basic_map::basic_map(__isl_take isl_basic_map
*ptr
)
1979 basic_map::basic_map(ctx ctx
, const std::string
&str
)
1981 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
1982 auto res
= isl_basic_map_read_from_str(ctx
.release(), str
.c_str());
1984 exception::throw_last_error(ctx
);
1988 basic_map
&basic_map::operator=(basic_map obj
) {
1989 std::swap(this->ptr
, obj
.ptr
);
1993 basic_map::~basic_map() {
1995 isl_basic_map_free(ptr
);
1998 __isl_give isl_basic_map
*basic_map::copy() const & {
1999 return isl_basic_map_copy(ptr
);
2002 __isl_keep isl_basic_map
*basic_map::get() const {
2006 __isl_give isl_basic_map
*basic_map::release() {
2007 isl_basic_map
*tmp
= ptr
;
2012 bool basic_map::is_null() const {
2013 return ptr
== nullptr;
2016 ctx
basic_map::get_ctx() const {
2017 return ctx(isl_basic_map_get_ctx(ptr
));
2020 basic_map
basic_map::affine_hull() const
2023 exception::throw_NULL_input(__FILE__
, __LINE__
);
2024 auto ctx
= get_ctx();
2025 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2026 auto res
= isl_basic_map_affine_hull(copy());
2028 exception::throw_last_error(ctx
);
2032 basic_map
basic_map::apply_domain(basic_map bmap2
) const
2034 if (!ptr
|| bmap2
.is_null())
2035 exception::throw_NULL_input(__FILE__
, __LINE__
);
2036 auto ctx
= get_ctx();
2037 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2038 auto res
= isl_basic_map_apply_domain(copy(), bmap2
.release());
2040 exception::throw_last_error(ctx
);
2044 basic_map
basic_map::apply_range(basic_map bmap2
) const
2046 if (!ptr
|| bmap2
.is_null())
2047 exception::throw_NULL_input(__FILE__
, __LINE__
);
2048 auto ctx
= get_ctx();
2049 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2050 auto res
= isl_basic_map_apply_range(copy(), bmap2
.release());
2052 exception::throw_last_error(ctx
);
2056 basic_set
basic_map::deltas() const
2059 exception::throw_NULL_input(__FILE__
, __LINE__
);
2060 auto ctx
= get_ctx();
2061 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2062 auto res
= isl_basic_map_deltas(copy());
2064 exception::throw_last_error(ctx
);
2068 basic_map
basic_map::detect_equalities() const
2071 exception::throw_NULL_input(__FILE__
, __LINE__
);
2072 auto ctx
= get_ctx();
2073 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2074 auto res
= isl_basic_map_detect_equalities(copy());
2076 exception::throw_last_error(ctx
);
2080 basic_map
basic_map::flatten() const
2083 exception::throw_NULL_input(__FILE__
, __LINE__
);
2084 auto ctx
= get_ctx();
2085 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2086 auto res
= isl_basic_map_flatten(copy());
2088 exception::throw_last_error(ctx
);
2092 basic_map
basic_map::flatten_domain() const
2095 exception::throw_NULL_input(__FILE__
, __LINE__
);
2096 auto ctx
= get_ctx();
2097 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2098 auto res
= isl_basic_map_flatten_domain(copy());
2100 exception::throw_last_error(ctx
);
2104 basic_map
basic_map::flatten_range() const
2107 exception::throw_NULL_input(__FILE__
, __LINE__
);
2108 auto ctx
= get_ctx();
2109 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2110 auto res
= isl_basic_map_flatten_range(copy());
2112 exception::throw_last_error(ctx
);
2116 basic_map
basic_map::gist(basic_map context
) const
2118 if (!ptr
|| context
.is_null())
2119 exception::throw_NULL_input(__FILE__
, __LINE__
);
2120 auto ctx
= get_ctx();
2121 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2122 auto res
= isl_basic_map_gist(copy(), context
.release());
2124 exception::throw_last_error(ctx
);
2128 basic_map
basic_map::intersect(basic_map bmap2
) const
2130 if (!ptr
|| bmap2
.is_null())
2131 exception::throw_NULL_input(__FILE__
, __LINE__
);
2132 auto ctx
= get_ctx();
2133 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2134 auto res
= isl_basic_map_intersect(copy(), bmap2
.release());
2136 exception::throw_last_error(ctx
);
2140 basic_map
basic_map::intersect_domain(basic_set bset
) const
2142 if (!ptr
|| bset
.is_null())
2143 exception::throw_NULL_input(__FILE__
, __LINE__
);
2144 auto ctx
= get_ctx();
2145 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2146 auto res
= isl_basic_map_intersect_domain(copy(), bset
.release());
2148 exception::throw_last_error(ctx
);
2152 basic_map
basic_map::intersect_range(basic_set bset
) const
2154 if (!ptr
|| bset
.is_null())
2155 exception::throw_NULL_input(__FILE__
, __LINE__
);
2156 auto ctx
= get_ctx();
2157 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2158 auto res
= isl_basic_map_intersect_range(copy(), bset
.release());
2160 exception::throw_last_error(ctx
);
2164 bool basic_map::is_empty() const
2167 exception::throw_NULL_input(__FILE__
, __LINE__
);
2168 auto ctx
= get_ctx();
2169 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2170 auto res
= isl_basic_map_is_empty(get());
2172 exception::throw_last_error(ctx
);
2176 bool basic_map::is_equal(const basic_map
&bmap2
) const
2178 if (!ptr
|| bmap2
.is_null())
2179 exception::throw_NULL_input(__FILE__
, __LINE__
);
2180 auto ctx
= get_ctx();
2181 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2182 auto res
= isl_basic_map_is_equal(get(), bmap2
.get());
2184 exception::throw_last_error(ctx
);
2188 bool basic_map::is_subset(const basic_map
&bmap2
) const
2190 if (!ptr
|| bmap2
.is_null())
2191 exception::throw_NULL_input(__FILE__
, __LINE__
);
2192 auto ctx
= get_ctx();
2193 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2194 auto res
= isl_basic_map_is_subset(get(), bmap2
.get());
2196 exception::throw_last_error(ctx
);
2200 map
basic_map::lexmax() const
2203 exception::throw_NULL_input(__FILE__
, __LINE__
);
2204 auto ctx
= get_ctx();
2205 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2206 auto res
= isl_basic_map_lexmax(copy());
2208 exception::throw_last_error(ctx
);
2212 map
basic_map::lexmin() const
2215 exception::throw_NULL_input(__FILE__
, __LINE__
);
2216 auto ctx
= get_ctx();
2217 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2218 auto res
= isl_basic_map_lexmin(copy());
2220 exception::throw_last_error(ctx
);
2224 basic_map
basic_map::reverse() const
2227 exception::throw_NULL_input(__FILE__
, __LINE__
);
2228 auto ctx
= get_ctx();
2229 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2230 auto res
= isl_basic_map_reverse(copy());
2232 exception::throw_last_error(ctx
);
2236 basic_map
basic_map::sample() const
2239 exception::throw_NULL_input(__FILE__
, __LINE__
);
2240 auto ctx
= get_ctx();
2241 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2242 auto res
= isl_basic_map_sample(copy());
2244 exception::throw_last_error(ctx
);
2248 map
basic_map::unite(basic_map bmap2
) const
2250 if (!ptr
|| bmap2
.is_null())
2251 exception::throw_NULL_input(__FILE__
, __LINE__
);
2252 auto ctx
= get_ctx();
2253 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2254 auto res
= isl_basic_map_union(copy(), bmap2
.release());
2256 exception::throw_last_error(ctx
);
2260 // implementations for isl::basic_set
2261 basic_set
manage(__isl_take isl_basic_set
*ptr
) {
2263 exception::throw_NULL_input(__FILE__
, __LINE__
);
2264 return basic_set(ptr
);
2266 basic_set
manage_copy(__isl_keep isl_basic_set
*ptr
) {
2268 exception::throw_NULL_input(__FILE__
, __LINE__
);
2269 auto ctx
= isl_basic_set_get_ctx(ptr
);
2270 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2271 ptr
= isl_basic_set_copy(ptr
);
2273 exception::throw_last_error(ctx
);
2274 return basic_set(ptr
);
2277 basic_set::basic_set()
2280 basic_set::basic_set(const basic_set
&obj
)
2284 exception::throw_NULL_input(__FILE__
, __LINE__
);
2285 auto ctx
= isl_basic_set_get_ctx(obj
.ptr
);
2286 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2289 exception::throw_last_error(ctx
);
2292 basic_set::basic_set(__isl_take isl_basic_set
*ptr
)
2295 basic_set::basic_set(ctx ctx
, const std::string
&str
)
2297 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2298 auto res
= isl_basic_set_read_from_str(ctx
.release(), str
.c_str());
2300 exception::throw_last_error(ctx
);
2303 basic_set::basic_set(point pnt
)
2306 exception::throw_NULL_input(__FILE__
, __LINE__
);
2307 auto ctx
= pnt
.get_ctx();
2308 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2309 auto res
= isl_basic_set_from_point(pnt
.release());
2311 exception::throw_last_error(ctx
);
2315 basic_set
&basic_set::operator=(basic_set obj
) {
2316 std::swap(this->ptr
, obj
.ptr
);
2320 basic_set::~basic_set() {
2322 isl_basic_set_free(ptr
);
2325 __isl_give isl_basic_set
*basic_set::copy() const & {
2326 return isl_basic_set_copy(ptr
);
2329 __isl_keep isl_basic_set
*basic_set::get() const {
2333 __isl_give isl_basic_set
*basic_set::release() {
2334 isl_basic_set
*tmp
= ptr
;
2339 bool basic_set::is_null() const {
2340 return ptr
== nullptr;
2343 ctx
basic_set::get_ctx() const {
2344 return ctx(isl_basic_set_get_ctx(ptr
));
2347 basic_set
basic_set::affine_hull() const
2350 exception::throw_NULL_input(__FILE__
, __LINE__
);
2351 auto ctx
= get_ctx();
2352 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2353 auto res
= isl_basic_set_affine_hull(copy());
2355 exception::throw_last_error(ctx
);
2359 basic_set
basic_set::apply(basic_map bmap
) const
2361 if (!ptr
|| bmap
.is_null())
2362 exception::throw_NULL_input(__FILE__
, __LINE__
);
2363 auto ctx
= get_ctx();
2364 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2365 auto res
= isl_basic_set_apply(copy(), bmap
.release());
2367 exception::throw_last_error(ctx
);
2371 basic_set
basic_set::detect_equalities() const
2374 exception::throw_NULL_input(__FILE__
, __LINE__
);
2375 auto ctx
= get_ctx();
2376 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2377 auto res
= isl_basic_set_detect_equalities(copy());
2379 exception::throw_last_error(ctx
);
2383 val
basic_set::dim_max_val(int pos
) const
2386 exception::throw_NULL_input(__FILE__
, __LINE__
);
2387 auto ctx
= get_ctx();
2388 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2389 auto res
= isl_basic_set_dim_max_val(copy(), pos
);
2391 exception::throw_last_error(ctx
);
2395 basic_set
basic_set::flatten() const
2398 exception::throw_NULL_input(__FILE__
, __LINE__
);
2399 auto ctx
= get_ctx();
2400 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2401 auto res
= isl_basic_set_flatten(copy());
2403 exception::throw_last_error(ctx
);
2407 basic_set
basic_set::gist(basic_set context
) const
2409 if (!ptr
|| context
.is_null())
2410 exception::throw_NULL_input(__FILE__
, __LINE__
);
2411 auto ctx
= get_ctx();
2412 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2413 auto res
= isl_basic_set_gist(copy(), context
.release());
2415 exception::throw_last_error(ctx
);
2419 basic_set
basic_set::intersect(basic_set bset2
) const
2421 if (!ptr
|| bset2
.is_null())
2422 exception::throw_NULL_input(__FILE__
, __LINE__
);
2423 auto ctx
= get_ctx();
2424 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2425 auto res
= isl_basic_set_intersect(copy(), bset2
.release());
2427 exception::throw_last_error(ctx
);
2431 basic_set
basic_set::intersect_params(basic_set bset2
) const
2433 if (!ptr
|| bset2
.is_null())
2434 exception::throw_NULL_input(__FILE__
, __LINE__
);
2435 auto ctx
= get_ctx();
2436 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2437 auto res
= isl_basic_set_intersect_params(copy(), bset2
.release());
2439 exception::throw_last_error(ctx
);
2443 bool basic_set::is_empty() const
2446 exception::throw_NULL_input(__FILE__
, __LINE__
);
2447 auto ctx
= get_ctx();
2448 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2449 auto res
= isl_basic_set_is_empty(get());
2451 exception::throw_last_error(ctx
);
2455 bool basic_set::is_equal(const basic_set
&bset2
) const
2457 if (!ptr
|| bset2
.is_null())
2458 exception::throw_NULL_input(__FILE__
, __LINE__
);
2459 auto ctx
= get_ctx();
2460 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2461 auto res
= isl_basic_set_is_equal(get(), bset2
.get());
2463 exception::throw_last_error(ctx
);
2467 bool basic_set::is_subset(const basic_set
&bset2
) const
2469 if (!ptr
|| bset2
.is_null())
2470 exception::throw_NULL_input(__FILE__
, __LINE__
);
2471 auto ctx
= get_ctx();
2472 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2473 auto res
= isl_basic_set_is_subset(get(), bset2
.get());
2475 exception::throw_last_error(ctx
);
2479 bool basic_set::is_wrapping() const
2482 exception::throw_NULL_input(__FILE__
, __LINE__
);
2483 auto ctx
= get_ctx();
2484 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2485 auto res
= isl_basic_set_is_wrapping(get());
2487 exception::throw_last_error(ctx
);
2491 set
basic_set::lexmax() const
2494 exception::throw_NULL_input(__FILE__
, __LINE__
);
2495 auto ctx
= get_ctx();
2496 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2497 auto res
= isl_basic_set_lexmax(copy());
2499 exception::throw_last_error(ctx
);
2503 set
basic_set::lexmin() const
2506 exception::throw_NULL_input(__FILE__
, __LINE__
);
2507 auto ctx
= get_ctx();
2508 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2509 auto res
= isl_basic_set_lexmin(copy());
2511 exception::throw_last_error(ctx
);
2515 basic_set
basic_set::sample() const
2518 exception::throw_NULL_input(__FILE__
, __LINE__
);
2519 auto ctx
= get_ctx();
2520 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2521 auto res
= isl_basic_set_sample(copy());
2523 exception::throw_last_error(ctx
);
2527 point
basic_set::sample_point() const
2530 exception::throw_NULL_input(__FILE__
, __LINE__
);
2531 auto ctx
= get_ctx();
2532 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2533 auto res
= isl_basic_set_sample_point(copy());
2535 exception::throw_last_error(ctx
);
2539 set
basic_set::unite(basic_set bset2
) const
2541 if (!ptr
|| bset2
.is_null())
2542 exception::throw_NULL_input(__FILE__
, __LINE__
);
2543 auto ctx
= get_ctx();
2544 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2545 auto res
= isl_basic_set_union(copy(), bset2
.release());
2547 exception::throw_last_error(ctx
);
2551 // implementations for isl::map
2552 map
manage(__isl_take isl_map
*ptr
) {
2554 exception::throw_NULL_input(__FILE__
, __LINE__
);
2557 map
manage_copy(__isl_keep isl_map
*ptr
) {
2559 exception::throw_NULL_input(__FILE__
, __LINE__
);
2560 auto ctx
= isl_map_get_ctx(ptr
);
2561 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2562 ptr
= isl_map_copy(ptr
);
2564 exception::throw_last_error(ctx
);
2571 map::map(const map
&obj
)
2575 exception::throw_NULL_input(__FILE__
, __LINE__
);
2576 auto ctx
= isl_map_get_ctx(obj
.ptr
);
2577 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2580 exception::throw_last_error(ctx
);
2583 map::map(__isl_take isl_map
*ptr
)
2586 map::map(ctx ctx
, const std::string
&str
)
2588 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2589 auto res
= isl_map_read_from_str(ctx
.release(), str
.c_str());
2591 exception::throw_last_error(ctx
);
2594 map::map(basic_map bmap
)
2597 exception::throw_NULL_input(__FILE__
, __LINE__
);
2598 auto ctx
= bmap
.get_ctx();
2599 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2600 auto res
= isl_map_from_basic_map(bmap
.release());
2602 exception::throw_last_error(ctx
);
2606 map
&map::operator=(map obj
) {
2607 std::swap(this->ptr
, obj
.ptr
);
2616 __isl_give isl_map
*map::copy() const & {
2617 return isl_map_copy(ptr
);
2620 __isl_keep isl_map
*map::get() const {
2624 __isl_give isl_map
*map::release() {
2630 bool map::is_null() const {
2631 return ptr
== nullptr;
2634 ctx
map::get_ctx() const {
2635 return ctx(isl_map_get_ctx(ptr
));
2638 basic_map
map::affine_hull() const
2641 exception::throw_NULL_input(__FILE__
, __LINE__
);
2642 auto ctx
= get_ctx();
2643 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2644 auto res
= isl_map_affine_hull(copy());
2646 exception::throw_last_error(ctx
);
2650 map
map::apply_domain(map map2
) const
2652 if (!ptr
|| map2
.is_null())
2653 exception::throw_NULL_input(__FILE__
, __LINE__
);
2654 auto ctx
= get_ctx();
2655 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2656 auto res
= isl_map_apply_domain(copy(), map2
.release());
2658 exception::throw_last_error(ctx
);
2662 map
map::apply_range(map map2
) const
2664 if (!ptr
|| map2
.is_null())
2665 exception::throw_NULL_input(__FILE__
, __LINE__
);
2666 auto ctx
= get_ctx();
2667 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2668 auto res
= isl_map_apply_range(copy(), map2
.release());
2670 exception::throw_last_error(ctx
);
2674 map
map::coalesce() const
2677 exception::throw_NULL_input(__FILE__
, __LINE__
);
2678 auto ctx
= get_ctx();
2679 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2680 auto res
= isl_map_coalesce(copy());
2682 exception::throw_last_error(ctx
);
2686 map
map::complement() const
2689 exception::throw_NULL_input(__FILE__
, __LINE__
);
2690 auto ctx
= get_ctx();
2691 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2692 auto res
= isl_map_complement(copy());
2694 exception::throw_last_error(ctx
);
2698 set
map::deltas() const
2701 exception::throw_NULL_input(__FILE__
, __LINE__
);
2702 auto ctx
= get_ctx();
2703 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2704 auto res
= isl_map_deltas(copy());
2706 exception::throw_last_error(ctx
);
2710 map
map::detect_equalities() const
2713 exception::throw_NULL_input(__FILE__
, __LINE__
);
2714 auto ctx
= get_ctx();
2715 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2716 auto res
= isl_map_detect_equalities(copy());
2718 exception::throw_last_error(ctx
);
2722 map
map::flatten() const
2725 exception::throw_NULL_input(__FILE__
, __LINE__
);
2726 auto ctx
= get_ctx();
2727 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2728 auto res
= isl_map_flatten(copy());
2730 exception::throw_last_error(ctx
);
2734 map
map::flatten_domain() const
2737 exception::throw_NULL_input(__FILE__
, __LINE__
);
2738 auto ctx
= get_ctx();
2739 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2740 auto res
= isl_map_flatten_domain(copy());
2742 exception::throw_last_error(ctx
);
2746 map
map::flatten_range() const
2749 exception::throw_NULL_input(__FILE__
, __LINE__
);
2750 auto ctx
= get_ctx();
2751 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2752 auto res
= isl_map_flatten_range(copy());
2754 exception::throw_last_error(ctx
);
2758 void map::foreach_basic_map(const std::function
<void(basic_map
)> &fn
) const
2761 exception::throw_NULL_input(__FILE__
, __LINE__
);
2762 auto ctx
= get_ctx();
2763 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2765 const std::function
<void(basic_map
)> *func
;
2766 std::exception_ptr eptr
;
2767 } fn_data
= { &fn
};
2768 auto fn_lambda
= [](isl_basic_map
*arg_0
, void *arg_1
) -> isl_stat
{
2769 auto *data
= static_cast<struct fn_data
*>(arg_1
);
2771 (*data
->func
)(manage(arg_0
));
2773 } ISL_CPP_CATCH_ALL
{
2774 data
->eptr
= std::current_exception();
2775 return isl_stat_error
;
2778 auto res
= isl_map_foreach_basic_map(get(), fn_lambda
, &fn_data
);
2780 std::rethrow_exception(fn_data
.eptr
);
2782 exception::throw_last_error(ctx
);
2786 map
map::gist(map context
) const
2788 if (!ptr
|| context
.is_null())
2789 exception::throw_NULL_input(__FILE__
, __LINE__
);
2790 auto ctx
= get_ctx();
2791 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2792 auto res
= isl_map_gist(copy(), context
.release());
2794 exception::throw_last_error(ctx
);
2798 map
map::gist_domain(set context
) const
2800 if (!ptr
|| context
.is_null())
2801 exception::throw_NULL_input(__FILE__
, __LINE__
);
2802 auto ctx
= get_ctx();
2803 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2804 auto res
= isl_map_gist_domain(copy(), context
.release());
2806 exception::throw_last_error(ctx
);
2810 map
map::intersect(map map2
) const
2812 if (!ptr
|| map2
.is_null())
2813 exception::throw_NULL_input(__FILE__
, __LINE__
);
2814 auto ctx
= get_ctx();
2815 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2816 auto res
= isl_map_intersect(copy(), map2
.release());
2818 exception::throw_last_error(ctx
);
2822 map
map::intersect_domain(set set
) const
2824 if (!ptr
|| set
.is_null())
2825 exception::throw_NULL_input(__FILE__
, __LINE__
);
2826 auto ctx
= get_ctx();
2827 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2828 auto res
= isl_map_intersect_domain(copy(), set
.release());
2830 exception::throw_last_error(ctx
);
2834 map
map::intersect_params(set params
) const
2836 if (!ptr
|| params
.is_null())
2837 exception::throw_NULL_input(__FILE__
, __LINE__
);
2838 auto ctx
= get_ctx();
2839 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2840 auto res
= isl_map_intersect_params(copy(), params
.release());
2842 exception::throw_last_error(ctx
);
2846 map
map::intersect_range(set set
) const
2848 if (!ptr
|| set
.is_null())
2849 exception::throw_NULL_input(__FILE__
, __LINE__
);
2850 auto ctx
= get_ctx();
2851 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2852 auto res
= isl_map_intersect_range(copy(), set
.release());
2854 exception::throw_last_error(ctx
);
2858 bool map::is_bijective() const
2861 exception::throw_NULL_input(__FILE__
, __LINE__
);
2862 auto ctx
= get_ctx();
2863 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2864 auto res
= isl_map_is_bijective(get());
2866 exception::throw_last_error(ctx
);
2870 bool map::is_disjoint(const map
&map2
) const
2872 if (!ptr
|| map2
.is_null())
2873 exception::throw_NULL_input(__FILE__
, __LINE__
);
2874 auto ctx
= get_ctx();
2875 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2876 auto res
= isl_map_is_disjoint(get(), map2
.get());
2878 exception::throw_last_error(ctx
);
2882 bool map::is_empty() const
2885 exception::throw_NULL_input(__FILE__
, __LINE__
);
2886 auto ctx
= get_ctx();
2887 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2888 auto res
= isl_map_is_empty(get());
2890 exception::throw_last_error(ctx
);
2894 bool map::is_equal(const map
&map2
) const
2896 if (!ptr
|| map2
.is_null())
2897 exception::throw_NULL_input(__FILE__
, __LINE__
);
2898 auto ctx
= get_ctx();
2899 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2900 auto res
= isl_map_is_equal(get(), map2
.get());
2902 exception::throw_last_error(ctx
);
2906 bool map::is_injective() const
2909 exception::throw_NULL_input(__FILE__
, __LINE__
);
2910 auto ctx
= get_ctx();
2911 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2912 auto res
= isl_map_is_injective(get());
2914 exception::throw_last_error(ctx
);
2918 bool map::is_single_valued() const
2921 exception::throw_NULL_input(__FILE__
, __LINE__
);
2922 auto ctx
= get_ctx();
2923 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2924 auto res
= isl_map_is_single_valued(get());
2926 exception::throw_last_error(ctx
);
2930 bool map::is_strict_subset(const map
&map2
) const
2932 if (!ptr
|| map2
.is_null())
2933 exception::throw_NULL_input(__FILE__
, __LINE__
);
2934 auto ctx
= get_ctx();
2935 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2936 auto res
= isl_map_is_strict_subset(get(), map2
.get());
2938 exception::throw_last_error(ctx
);
2942 bool map::is_subset(const map
&map2
) const
2944 if (!ptr
|| map2
.is_null())
2945 exception::throw_NULL_input(__FILE__
, __LINE__
);
2946 auto ctx
= get_ctx();
2947 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2948 auto res
= isl_map_is_subset(get(), map2
.get());
2950 exception::throw_last_error(ctx
);
2954 map
map::lexmax() const
2957 exception::throw_NULL_input(__FILE__
, __LINE__
);
2958 auto ctx
= get_ctx();
2959 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2960 auto res
= isl_map_lexmax(copy());
2962 exception::throw_last_error(ctx
);
2966 map
map::lexmin() const
2969 exception::throw_NULL_input(__FILE__
, __LINE__
);
2970 auto ctx
= get_ctx();
2971 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2972 auto res
= isl_map_lexmin(copy());
2974 exception::throw_last_error(ctx
);
2978 basic_map
map::polyhedral_hull() const
2981 exception::throw_NULL_input(__FILE__
, __LINE__
);
2982 auto ctx
= get_ctx();
2983 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2984 auto res
= isl_map_polyhedral_hull(copy());
2986 exception::throw_last_error(ctx
);
2990 map
map::reverse() const
2993 exception::throw_NULL_input(__FILE__
, __LINE__
);
2994 auto ctx
= get_ctx();
2995 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
2996 auto res
= isl_map_reverse(copy());
2998 exception::throw_last_error(ctx
);
3002 basic_map
map::sample() const
3005 exception::throw_NULL_input(__FILE__
, __LINE__
);
3006 auto ctx
= get_ctx();
3007 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3008 auto res
= isl_map_sample(copy());
3010 exception::throw_last_error(ctx
);
3014 map
map::subtract(map map2
) const
3016 if (!ptr
|| map2
.is_null())
3017 exception::throw_NULL_input(__FILE__
, __LINE__
);
3018 auto ctx
= get_ctx();
3019 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3020 auto res
= isl_map_subtract(copy(), map2
.release());
3022 exception::throw_last_error(ctx
);
3026 map
map::unite(map map2
) const
3028 if (!ptr
|| map2
.is_null())
3029 exception::throw_NULL_input(__FILE__
, __LINE__
);
3030 auto ctx
= get_ctx();
3031 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3032 auto res
= isl_map_union(copy(), map2
.release());
3034 exception::throw_last_error(ctx
);
3038 basic_map
map::unshifted_simple_hull() const
3041 exception::throw_NULL_input(__FILE__
, __LINE__
);
3042 auto ctx
= get_ctx();
3043 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3044 auto res
= isl_map_unshifted_simple_hull(copy());
3046 exception::throw_last_error(ctx
);
3050 // implementations for isl::multi_aff
3051 multi_aff
manage(__isl_take isl_multi_aff
*ptr
) {
3053 exception::throw_NULL_input(__FILE__
, __LINE__
);
3054 return multi_aff(ptr
);
3056 multi_aff
manage_copy(__isl_keep isl_multi_aff
*ptr
) {
3058 exception::throw_NULL_input(__FILE__
, __LINE__
);
3059 auto ctx
= isl_multi_aff_get_ctx(ptr
);
3060 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3061 ptr
= isl_multi_aff_copy(ptr
);
3063 exception::throw_last_error(ctx
);
3064 return multi_aff(ptr
);
3067 multi_aff::multi_aff()
3070 multi_aff::multi_aff(const multi_aff
&obj
)
3074 exception::throw_NULL_input(__FILE__
, __LINE__
);
3075 auto ctx
= isl_multi_aff_get_ctx(obj
.ptr
);
3076 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3079 exception::throw_last_error(ctx
);
3082 multi_aff::multi_aff(__isl_take isl_multi_aff
*ptr
)
3085 multi_aff::multi_aff(aff aff
)
3088 exception::throw_NULL_input(__FILE__
, __LINE__
);
3089 auto ctx
= aff
.get_ctx();
3090 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3091 auto res
= isl_multi_aff_from_aff(aff
.release());
3093 exception::throw_last_error(ctx
);
3096 multi_aff::multi_aff(ctx ctx
, const std::string
&str
)
3098 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3099 auto res
= isl_multi_aff_read_from_str(ctx
.release(), str
.c_str());
3101 exception::throw_last_error(ctx
);
3105 multi_aff
&multi_aff::operator=(multi_aff obj
) {
3106 std::swap(this->ptr
, obj
.ptr
);
3110 multi_aff::~multi_aff() {
3112 isl_multi_aff_free(ptr
);
3115 __isl_give isl_multi_aff
*multi_aff::copy() const & {
3116 return isl_multi_aff_copy(ptr
);
3119 __isl_keep isl_multi_aff
*multi_aff::get() const {
3123 __isl_give isl_multi_aff
*multi_aff::release() {
3124 isl_multi_aff
*tmp
= ptr
;
3129 bool multi_aff::is_null() const {
3130 return ptr
== nullptr;
3133 ctx
multi_aff::get_ctx() const {
3134 return ctx(isl_multi_aff_get_ctx(ptr
));
3137 multi_aff
multi_aff::add(multi_aff multi2
) const
3139 if (!ptr
|| multi2
.is_null())
3140 exception::throw_NULL_input(__FILE__
, __LINE__
);
3141 auto ctx
= get_ctx();
3142 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3143 auto res
= isl_multi_aff_add(copy(), multi2
.release());
3145 exception::throw_last_error(ctx
);
3149 multi_aff
multi_aff::flat_range_product(multi_aff multi2
) const
3151 if (!ptr
|| multi2
.is_null())
3152 exception::throw_NULL_input(__FILE__
, __LINE__
);
3153 auto ctx
= get_ctx();
3154 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3155 auto res
= isl_multi_aff_flat_range_product(copy(), multi2
.release());
3157 exception::throw_last_error(ctx
);
3161 multi_aff
multi_aff::product(multi_aff multi2
) const
3163 if (!ptr
|| multi2
.is_null())
3164 exception::throw_NULL_input(__FILE__
, __LINE__
);
3165 auto ctx
= get_ctx();
3166 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3167 auto res
= isl_multi_aff_product(copy(), multi2
.release());
3169 exception::throw_last_error(ctx
);
3173 multi_aff
multi_aff::pullback(multi_aff ma2
) const
3175 if (!ptr
|| ma2
.is_null())
3176 exception::throw_NULL_input(__FILE__
, __LINE__
);
3177 auto ctx
= get_ctx();
3178 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3179 auto res
= isl_multi_aff_pullback_multi_aff(copy(), ma2
.release());
3181 exception::throw_last_error(ctx
);
3185 multi_aff
multi_aff::range_product(multi_aff multi2
) const
3187 if (!ptr
|| multi2
.is_null())
3188 exception::throw_NULL_input(__FILE__
, __LINE__
);
3189 auto ctx
= get_ctx();
3190 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3191 auto res
= isl_multi_aff_range_product(copy(), multi2
.release());
3193 exception::throw_last_error(ctx
);
3197 // implementations for isl::multi_pw_aff
3198 multi_pw_aff
manage(__isl_take isl_multi_pw_aff
*ptr
) {
3200 exception::throw_NULL_input(__FILE__
, __LINE__
);
3201 return multi_pw_aff(ptr
);
3203 multi_pw_aff
manage_copy(__isl_keep isl_multi_pw_aff
*ptr
) {
3205 exception::throw_NULL_input(__FILE__
, __LINE__
);
3206 auto ctx
= isl_multi_pw_aff_get_ctx(ptr
);
3207 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3208 ptr
= isl_multi_pw_aff_copy(ptr
);
3210 exception::throw_last_error(ctx
);
3211 return multi_pw_aff(ptr
);
3214 multi_pw_aff::multi_pw_aff()
3217 multi_pw_aff::multi_pw_aff(const multi_pw_aff
&obj
)
3221 exception::throw_NULL_input(__FILE__
, __LINE__
);
3222 auto ctx
= isl_multi_pw_aff_get_ctx(obj
.ptr
);
3223 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3226 exception::throw_last_error(ctx
);
3229 multi_pw_aff::multi_pw_aff(__isl_take isl_multi_pw_aff
*ptr
)
3232 multi_pw_aff::multi_pw_aff(multi_aff ma
)
3235 exception::throw_NULL_input(__FILE__
, __LINE__
);
3236 auto ctx
= ma
.get_ctx();
3237 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3238 auto res
= isl_multi_pw_aff_from_multi_aff(ma
.release());
3240 exception::throw_last_error(ctx
);
3243 multi_pw_aff::multi_pw_aff(pw_aff pa
)
3246 exception::throw_NULL_input(__FILE__
, __LINE__
);
3247 auto ctx
= pa
.get_ctx();
3248 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3249 auto res
= isl_multi_pw_aff_from_pw_aff(pa
.release());
3251 exception::throw_last_error(ctx
);
3254 multi_pw_aff::multi_pw_aff(pw_multi_aff pma
)
3257 exception::throw_NULL_input(__FILE__
, __LINE__
);
3258 auto ctx
= pma
.get_ctx();
3259 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3260 auto res
= isl_multi_pw_aff_from_pw_multi_aff(pma
.release());
3262 exception::throw_last_error(ctx
);
3265 multi_pw_aff::multi_pw_aff(ctx ctx
, const std::string
&str
)
3267 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3268 auto res
= isl_multi_pw_aff_read_from_str(ctx
.release(), str
.c_str());
3270 exception::throw_last_error(ctx
);
3274 multi_pw_aff
&multi_pw_aff::operator=(multi_pw_aff obj
) {
3275 std::swap(this->ptr
, obj
.ptr
);
3279 multi_pw_aff::~multi_pw_aff() {
3281 isl_multi_pw_aff_free(ptr
);
3284 __isl_give isl_multi_pw_aff
*multi_pw_aff::copy() const & {
3285 return isl_multi_pw_aff_copy(ptr
);
3288 __isl_keep isl_multi_pw_aff
*multi_pw_aff::get() const {
3292 __isl_give isl_multi_pw_aff
*multi_pw_aff::release() {
3293 isl_multi_pw_aff
*tmp
= ptr
;
3298 bool multi_pw_aff::is_null() const {
3299 return ptr
== nullptr;
3302 ctx
multi_pw_aff::get_ctx() const {
3303 return ctx(isl_multi_pw_aff_get_ctx(ptr
));
3306 multi_pw_aff
multi_pw_aff::add(multi_pw_aff multi2
) const
3308 if (!ptr
|| multi2
.is_null())
3309 exception::throw_NULL_input(__FILE__
, __LINE__
);
3310 auto ctx
= get_ctx();
3311 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3312 auto res
= isl_multi_pw_aff_add(copy(), multi2
.release());
3314 exception::throw_last_error(ctx
);
3318 multi_pw_aff
multi_pw_aff::flat_range_product(multi_pw_aff multi2
) const
3320 if (!ptr
|| multi2
.is_null())
3321 exception::throw_NULL_input(__FILE__
, __LINE__
);
3322 auto ctx
= get_ctx();
3323 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3324 auto res
= isl_multi_pw_aff_flat_range_product(copy(), multi2
.release());
3326 exception::throw_last_error(ctx
);
3330 multi_pw_aff
multi_pw_aff::product(multi_pw_aff multi2
) const
3332 if (!ptr
|| multi2
.is_null())
3333 exception::throw_NULL_input(__FILE__
, __LINE__
);
3334 auto ctx
= get_ctx();
3335 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3336 auto res
= isl_multi_pw_aff_product(copy(), multi2
.release());
3338 exception::throw_last_error(ctx
);
3342 multi_pw_aff
multi_pw_aff::pullback(multi_aff ma
) const
3344 if (!ptr
|| ma
.is_null())
3345 exception::throw_NULL_input(__FILE__
, __LINE__
);
3346 auto ctx
= get_ctx();
3347 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3348 auto res
= isl_multi_pw_aff_pullback_multi_aff(copy(), ma
.release());
3350 exception::throw_last_error(ctx
);
3354 multi_pw_aff
multi_pw_aff::pullback(pw_multi_aff pma
) const
3356 if (!ptr
|| pma
.is_null())
3357 exception::throw_NULL_input(__FILE__
, __LINE__
);
3358 auto ctx
= get_ctx();
3359 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3360 auto res
= isl_multi_pw_aff_pullback_pw_multi_aff(copy(), pma
.release());
3362 exception::throw_last_error(ctx
);
3366 multi_pw_aff
multi_pw_aff::pullback(multi_pw_aff mpa2
) const
3368 if (!ptr
|| mpa2
.is_null())
3369 exception::throw_NULL_input(__FILE__
, __LINE__
);
3370 auto ctx
= get_ctx();
3371 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3372 auto res
= isl_multi_pw_aff_pullback_multi_pw_aff(copy(), mpa2
.release());
3374 exception::throw_last_error(ctx
);
3378 multi_pw_aff
multi_pw_aff::range_product(multi_pw_aff multi2
) const
3380 if (!ptr
|| multi2
.is_null())
3381 exception::throw_NULL_input(__FILE__
, __LINE__
);
3382 auto ctx
= get_ctx();
3383 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3384 auto res
= isl_multi_pw_aff_range_product(copy(), multi2
.release());
3386 exception::throw_last_error(ctx
);
3390 // implementations for isl::multi_union_pw_aff
3391 multi_union_pw_aff
manage(__isl_take isl_multi_union_pw_aff
*ptr
) {
3393 exception::throw_NULL_input(__FILE__
, __LINE__
);
3394 return multi_union_pw_aff(ptr
);
3396 multi_union_pw_aff
manage_copy(__isl_keep isl_multi_union_pw_aff
*ptr
) {
3398 exception::throw_NULL_input(__FILE__
, __LINE__
);
3399 auto ctx
= isl_multi_union_pw_aff_get_ctx(ptr
);
3400 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3401 ptr
= isl_multi_union_pw_aff_copy(ptr
);
3403 exception::throw_last_error(ctx
);
3404 return multi_union_pw_aff(ptr
);
3407 multi_union_pw_aff::multi_union_pw_aff()
3410 multi_union_pw_aff::multi_union_pw_aff(const multi_union_pw_aff
&obj
)
3414 exception::throw_NULL_input(__FILE__
, __LINE__
);
3415 auto ctx
= isl_multi_union_pw_aff_get_ctx(obj
.ptr
);
3416 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3419 exception::throw_last_error(ctx
);
3422 multi_union_pw_aff::multi_union_pw_aff(__isl_take isl_multi_union_pw_aff
*ptr
)
3425 multi_union_pw_aff::multi_union_pw_aff(union_pw_aff upa
)
3428 exception::throw_NULL_input(__FILE__
, __LINE__
);
3429 auto ctx
= upa
.get_ctx();
3430 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3431 auto res
= isl_multi_union_pw_aff_from_union_pw_aff(upa
.release());
3433 exception::throw_last_error(ctx
);
3436 multi_union_pw_aff::multi_union_pw_aff(multi_pw_aff mpa
)
3439 exception::throw_NULL_input(__FILE__
, __LINE__
);
3440 auto ctx
= mpa
.get_ctx();
3441 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3442 auto res
= isl_multi_union_pw_aff_from_multi_pw_aff(mpa
.release());
3444 exception::throw_last_error(ctx
);
3447 multi_union_pw_aff::multi_union_pw_aff(ctx ctx
, const std::string
&str
)
3449 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3450 auto res
= isl_multi_union_pw_aff_read_from_str(ctx
.release(), str
.c_str());
3452 exception::throw_last_error(ctx
);
3456 multi_union_pw_aff
&multi_union_pw_aff::operator=(multi_union_pw_aff obj
) {
3457 std::swap(this->ptr
, obj
.ptr
);
3461 multi_union_pw_aff::~multi_union_pw_aff() {
3463 isl_multi_union_pw_aff_free(ptr
);
3466 __isl_give isl_multi_union_pw_aff
*multi_union_pw_aff::copy() const & {
3467 return isl_multi_union_pw_aff_copy(ptr
);
3470 __isl_keep isl_multi_union_pw_aff
*multi_union_pw_aff::get() const {
3474 __isl_give isl_multi_union_pw_aff
*multi_union_pw_aff::release() {
3475 isl_multi_union_pw_aff
*tmp
= ptr
;
3480 bool multi_union_pw_aff::is_null() const {
3481 return ptr
== nullptr;
3484 ctx
multi_union_pw_aff::get_ctx() const {
3485 return ctx(isl_multi_union_pw_aff_get_ctx(ptr
));
3488 multi_union_pw_aff
multi_union_pw_aff::add(multi_union_pw_aff multi2
) const
3490 if (!ptr
|| multi2
.is_null())
3491 exception::throw_NULL_input(__FILE__
, __LINE__
);
3492 auto ctx
= get_ctx();
3493 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3494 auto res
= isl_multi_union_pw_aff_add(copy(), multi2
.release());
3496 exception::throw_last_error(ctx
);
3500 multi_union_pw_aff
multi_union_pw_aff::flat_range_product(multi_union_pw_aff multi2
) const
3502 if (!ptr
|| multi2
.is_null())
3503 exception::throw_NULL_input(__FILE__
, __LINE__
);
3504 auto ctx
= get_ctx();
3505 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3506 auto res
= isl_multi_union_pw_aff_flat_range_product(copy(), multi2
.release());
3508 exception::throw_last_error(ctx
);
3512 multi_union_pw_aff
multi_union_pw_aff::pullback(union_pw_multi_aff upma
) const
3514 if (!ptr
|| upma
.is_null())
3515 exception::throw_NULL_input(__FILE__
, __LINE__
);
3516 auto ctx
= get_ctx();
3517 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3518 auto res
= isl_multi_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma
.release());
3520 exception::throw_last_error(ctx
);
3524 multi_union_pw_aff
multi_union_pw_aff::range_product(multi_union_pw_aff multi2
) const
3526 if (!ptr
|| multi2
.is_null())
3527 exception::throw_NULL_input(__FILE__
, __LINE__
);
3528 auto ctx
= get_ctx();
3529 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3530 auto res
= isl_multi_union_pw_aff_range_product(copy(), multi2
.release());
3532 exception::throw_last_error(ctx
);
3536 multi_union_pw_aff
multi_union_pw_aff::union_add(multi_union_pw_aff mupa2
) const
3538 if (!ptr
|| mupa2
.is_null())
3539 exception::throw_NULL_input(__FILE__
, __LINE__
);
3540 auto ctx
= get_ctx();
3541 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3542 auto res
= isl_multi_union_pw_aff_union_add(copy(), mupa2
.release());
3544 exception::throw_last_error(ctx
);
3548 // implementations for isl::multi_val
3549 multi_val
manage(__isl_take isl_multi_val
*ptr
) {
3551 exception::throw_NULL_input(__FILE__
, __LINE__
);
3552 return multi_val(ptr
);
3554 multi_val
manage_copy(__isl_keep isl_multi_val
*ptr
) {
3556 exception::throw_NULL_input(__FILE__
, __LINE__
);
3557 auto ctx
= isl_multi_val_get_ctx(ptr
);
3558 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3559 ptr
= isl_multi_val_copy(ptr
);
3561 exception::throw_last_error(ctx
);
3562 return multi_val(ptr
);
3565 multi_val::multi_val()
3568 multi_val::multi_val(const multi_val
&obj
)
3572 exception::throw_NULL_input(__FILE__
, __LINE__
);
3573 auto ctx
= isl_multi_val_get_ctx(obj
.ptr
);
3574 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3577 exception::throw_last_error(ctx
);
3580 multi_val::multi_val(__isl_take isl_multi_val
*ptr
)
3584 multi_val
&multi_val::operator=(multi_val obj
) {
3585 std::swap(this->ptr
, obj
.ptr
);
3589 multi_val::~multi_val() {
3591 isl_multi_val_free(ptr
);
3594 __isl_give isl_multi_val
*multi_val::copy() const & {
3595 return isl_multi_val_copy(ptr
);
3598 __isl_keep isl_multi_val
*multi_val::get() const {
3602 __isl_give isl_multi_val
*multi_val::release() {
3603 isl_multi_val
*tmp
= ptr
;
3608 bool multi_val::is_null() const {
3609 return ptr
== nullptr;
3612 ctx
multi_val::get_ctx() const {
3613 return ctx(isl_multi_val_get_ctx(ptr
));
3616 multi_val
multi_val::add(multi_val multi2
) const
3618 if (!ptr
|| multi2
.is_null())
3619 exception::throw_NULL_input(__FILE__
, __LINE__
);
3620 auto ctx
= get_ctx();
3621 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3622 auto res
= isl_multi_val_add(copy(), multi2
.release());
3624 exception::throw_last_error(ctx
);
3628 multi_val
multi_val::flat_range_product(multi_val multi2
) const
3630 if (!ptr
|| multi2
.is_null())
3631 exception::throw_NULL_input(__FILE__
, __LINE__
);
3632 auto ctx
= get_ctx();
3633 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3634 auto res
= isl_multi_val_flat_range_product(copy(), multi2
.release());
3636 exception::throw_last_error(ctx
);
3640 multi_val
multi_val::product(multi_val multi2
) const
3642 if (!ptr
|| multi2
.is_null())
3643 exception::throw_NULL_input(__FILE__
, __LINE__
);
3644 auto ctx
= get_ctx();
3645 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3646 auto res
= isl_multi_val_product(copy(), multi2
.release());
3648 exception::throw_last_error(ctx
);
3652 multi_val
multi_val::range_product(multi_val multi2
) const
3654 if (!ptr
|| multi2
.is_null())
3655 exception::throw_NULL_input(__FILE__
, __LINE__
);
3656 auto ctx
= get_ctx();
3657 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3658 auto res
= isl_multi_val_range_product(copy(), multi2
.release());
3660 exception::throw_last_error(ctx
);
3664 // implementations for isl::point
3665 point
manage(__isl_take isl_point
*ptr
) {
3667 exception::throw_NULL_input(__FILE__
, __LINE__
);
3670 point
manage_copy(__isl_keep isl_point
*ptr
) {
3672 exception::throw_NULL_input(__FILE__
, __LINE__
);
3673 auto ctx
= isl_point_get_ctx(ptr
);
3674 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3675 ptr
= isl_point_copy(ptr
);
3677 exception::throw_last_error(ctx
);
3684 point::point(const point
&obj
)
3688 exception::throw_NULL_input(__FILE__
, __LINE__
);
3689 auto ctx
= isl_point_get_ctx(obj
.ptr
);
3690 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3693 exception::throw_last_error(ctx
);
3696 point::point(__isl_take isl_point
*ptr
)
3700 point
&point::operator=(point obj
) {
3701 std::swap(this->ptr
, obj
.ptr
);
3707 isl_point_free(ptr
);
3710 __isl_give isl_point
*point::copy() const & {
3711 return isl_point_copy(ptr
);
3714 __isl_keep isl_point
*point::get() const {
3718 __isl_give isl_point
*point::release() {
3719 isl_point
*tmp
= ptr
;
3724 bool point::is_null() const {
3725 return ptr
== nullptr;
3728 ctx
point::get_ctx() const {
3729 return ctx(isl_point_get_ctx(ptr
));
3733 // implementations for isl::pw_aff
3734 pw_aff
manage(__isl_take isl_pw_aff
*ptr
) {
3736 exception::throw_NULL_input(__FILE__
, __LINE__
);
3739 pw_aff
manage_copy(__isl_keep isl_pw_aff
*ptr
) {
3741 exception::throw_NULL_input(__FILE__
, __LINE__
);
3742 auto ctx
= isl_pw_aff_get_ctx(ptr
);
3743 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3744 ptr
= isl_pw_aff_copy(ptr
);
3746 exception::throw_last_error(ctx
);
3753 pw_aff::pw_aff(const pw_aff
&obj
)
3757 exception::throw_NULL_input(__FILE__
, __LINE__
);
3758 auto ctx
= isl_pw_aff_get_ctx(obj
.ptr
);
3759 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3762 exception::throw_last_error(ctx
);
3765 pw_aff::pw_aff(__isl_take isl_pw_aff
*ptr
)
3768 pw_aff::pw_aff(aff aff
)
3771 exception::throw_NULL_input(__FILE__
, __LINE__
);
3772 auto ctx
= aff
.get_ctx();
3773 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3774 auto res
= isl_pw_aff_from_aff(aff
.release());
3776 exception::throw_last_error(ctx
);
3779 pw_aff::pw_aff(ctx ctx
, const std::string
&str
)
3781 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3782 auto res
= isl_pw_aff_read_from_str(ctx
.release(), str
.c_str());
3784 exception::throw_last_error(ctx
);
3788 pw_aff
&pw_aff::operator=(pw_aff obj
) {
3789 std::swap(this->ptr
, obj
.ptr
);
3795 isl_pw_aff_free(ptr
);
3798 __isl_give isl_pw_aff
*pw_aff::copy() const & {
3799 return isl_pw_aff_copy(ptr
);
3802 __isl_keep isl_pw_aff
*pw_aff::get() const {
3806 __isl_give isl_pw_aff
*pw_aff::release() {
3807 isl_pw_aff
*tmp
= ptr
;
3812 bool pw_aff::is_null() const {
3813 return ptr
== nullptr;
3816 ctx
pw_aff::get_ctx() const {
3817 return ctx(isl_pw_aff_get_ctx(ptr
));
3820 pw_aff
pw_aff::add(pw_aff pwaff2
) const
3822 if (!ptr
|| pwaff2
.is_null())
3823 exception::throw_NULL_input(__FILE__
, __LINE__
);
3824 auto ctx
= get_ctx();
3825 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3826 auto res
= isl_pw_aff_add(copy(), pwaff2
.release());
3828 exception::throw_last_error(ctx
);
3832 pw_aff
pw_aff::ceil() const
3835 exception::throw_NULL_input(__FILE__
, __LINE__
);
3836 auto ctx
= get_ctx();
3837 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3838 auto res
= isl_pw_aff_ceil(copy());
3840 exception::throw_last_error(ctx
);
3844 pw_aff
pw_aff::cond(pw_aff pwaff_true
, pw_aff pwaff_false
) const
3846 if (!ptr
|| pwaff_true
.is_null() || pwaff_false
.is_null())
3847 exception::throw_NULL_input(__FILE__
, __LINE__
);
3848 auto ctx
= get_ctx();
3849 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3850 auto res
= isl_pw_aff_cond(copy(), pwaff_true
.release(), pwaff_false
.release());
3852 exception::throw_last_error(ctx
);
3856 pw_aff
pw_aff::div(pw_aff pa2
) const
3858 if (!ptr
|| pa2
.is_null())
3859 exception::throw_NULL_input(__FILE__
, __LINE__
);
3860 auto ctx
= get_ctx();
3861 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3862 auto res
= isl_pw_aff_div(copy(), pa2
.release());
3864 exception::throw_last_error(ctx
);
3868 set
pw_aff::eq_set(pw_aff pwaff2
) const
3870 if (!ptr
|| pwaff2
.is_null())
3871 exception::throw_NULL_input(__FILE__
, __LINE__
);
3872 auto ctx
= get_ctx();
3873 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3874 auto res
= isl_pw_aff_eq_set(copy(), pwaff2
.release());
3876 exception::throw_last_error(ctx
);
3880 pw_aff
pw_aff::floor() const
3883 exception::throw_NULL_input(__FILE__
, __LINE__
);
3884 auto ctx
= get_ctx();
3885 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3886 auto res
= isl_pw_aff_floor(copy());
3888 exception::throw_last_error(ctx
);
3892 set
pw_aff::ge_set(pw_aff pwaff2
) const
3894 if (!ptr
|| pwaff2
.is_null())
3895 exception::throw_NULL_input(__FILE__
, __LINE__
);
3896 auto ctx
= get_ctx();
3897 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3898 auto res
= isl_pw_aff_ge_set(copy(), pwaff2
.release());
3900 exception::throw_last_error(ctx
);
3904 set
pw_aff::gt_set(pw_aff pwaff2
) const
3906 if (!ptr
|| pwaff2
.is_null())
3907 exception::throw_NULL_input(__FILE__
, __LINE__
);
3908 auto ctx
= get_ctx();
3909 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3910 auto res
= isl_pw_aff_gt_set(copy(), pwaff2
.release());
3912 exception::throw_last_error(ctx
);
3916 set
pw_aff::le_set(pw_aff pwaff2
) const
3918 if (!ptr
|| pwaff2
.is_null())
3919 exception::throw_NULL_input(__FILE__
, __LINE__
);
3920 auto ctx
= get_ctx();
3921 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3922 auto res
= isl_pw_aff_le_set(copy(), pwaff2
.release());
3924 exception::throw_last_error(ctx
);
3928 set
pw_aff::lt_set(pw_aff pwaff2
) const
3930 if (!ptr
|| pwaff2
.is_null())
3931 exception::throw_NULL_input(__FILE__
, __LINE__
);
3932 auto ctx
= get_ctx();
3933 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3934 auto res
= isl_pw_aff_lt_set(copy(), pwaff2
.release());
3936 exception::throw_last_error(ctx
);
3940 pw_aff
pw_aff::max(pw_aff pwaff2
) const
3942 if (!ptr
|| pwaff2
.is_null())
3943 exception::throw_NULL_input(__FILE__
, __LINE__
);
3944 auto ctx
= get_ctx();
3945 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3946 auto res
= isl_pw_aff_max(copy(), pwaff2
.release());
3948 exception::throw_last_error(ctx
);
3952 pw_aff
pw_aff::min(pw_aff pwaff2
) const
3954 if (!ptr
|| pwaff2
.is_null())
3955 exception::throw_NULL_input(__FILE__
, __LINE__
);
3956 auto ctx
= get_ctx();
3957 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3958 auto res
= isl_pw_aff_min(copy(), pwaff2
.release());
3960 exception::throw_last_error(ctx
);
3964 pw_aff
pw_aff::mod(val mod
) const
3966 if (!ptr
|| mod
.is_null())
3967 exception::throw_NULL_input(__FILE__
, __LINE__
);
3968 auto ctx
= get_ctx();
3969 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3970 auto res
= isl_pw_aff_mod_val(copy(), mod
.release());
3972 exception::throw_last_error(ctx
);
3976 pw_aff
pw_aff::mul(pw_aff pwaff2
) const
3978 if (!ptr
|| pwaff2
.is_null())
3979 exception::throw_NULL_input(__FILE__
, __LINE__
);
3980 auto ctx
= get_ctx();
3981 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3982 auto res
= isl_pw_aff_mul(copy(), pwaff2
.release());
3984 exception::throw_last_error(ctx
);
3988 set
pw_aff::ne_set(pw_aff pwaff2
) const
3990 if (!ptr
|| pwaff2
.is_null())
3991 exception::throw_NULL_input(__FILE__
, __LINE__
);
3992 auto ctx
= get_ctx();
3993 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
3994 auto res
= isl_pw_aff_ne_set(copy(), pwaff2
.release());
3996 exception::throw_last_error(ctx
);
4000 pw_aff
pw_aff::neg() const
4003 exception::throw_NULL_input(__FILE__
, __LINE__
);
4004 auto ctx
= get_ctx();
4005 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4006 auto res
= isl_pw_aff_neg(copy());
4008 exception::throw_last_error(ctx
);
4012 pw_aff
pw_aff::pullback(multi_aff ma
) const
4014 if (!ptr
|| ma
.is_null())
4015 exception::throw_NULL_input(__FILE__
, __LINE__
);
4016 auto ctx
= get_ctx();
4017 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4018 auto res
= isl_pw_aff_pullback_multi_aff(copy(), ma
.release());
4020 exception::throw_last_error(ctx
);
4024 pw_aff
pw_aff::pullback(pw_multi_aff pma
) const
4026 if (!ptr
|| pma
.is_null())
4027 exception::throw_NULL_input(__FILE__
, __LINE__
);
4028 auto ctx
= get_ctx();
4029 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4030 auto res
= isl_pw_aff_pullback_pw_multi_aff(copy(), pma
.release());
4032 exception::throw_last_error(ctx
);
4036 pw_aff
pw_aff::pullback(multi_pw_aff mpa
) const
4038 if (!ptr
|| mpa
.is_null())
4039 exception::throw_NULL_input(__FILE__
, __LINE__
);
4040 auto ctx
= get_ctx();
4041 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4042 auto res
= isl_pw_aff_pullback_multi_pw_aff(copy(), mpa
.release());
4044 exception::throw_last_error(ctx
);
4048 pw_aff
pw_aff::scale(val v
) const
4050 if (!ptr
|| v
.is_null())
4051 exception::throw_NULL_input(__FILE__
, __LINE__
);
4052 auto ctx
= get_ctx();
4053 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4054 auto res
= isl_pw_aff_scale_val(copy(), v
.release());
4056 exception::throw_last_error(ctx
);
4060 pw_aff
pw_aff::scale_down(val f
) const
4062 if (!ptr
|| f
.is_null())
4063 exception::throw_NULL_input(__FILE__
, __LINE__
);
4064 auto ctx
= get_ctx();
4065 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4066 auto res
= isl_pw_aff_scale_down_val(copy(), f
.release());
4068 exception::throw_last_error(ctx
);
4072 pw_aff
pw_aff::sub(pw_aff pwaff2
) const
4074 if (!ptr
|| pwaff2
.is_null())
4075 exception::throw_NULL_input(__FILE__
, __LINE__
);
4076 auto ctx
= get_ctx();
4077 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4078 auto res
= isl_pw_aff_sub(copy(), pwaff2
.release());
4080 exception::throw_last_error(ctx
);
4084 pw_aff
pw_aff::tdiv_q(pw_aff pa2
) const
4086 if (!ptr
|| pa2
.is_null())
4087 exception::throw_NULL_input(__FILE__
, __LINE__
);
4088 auto ctx
= get_ctx();
4089 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4090 auto res
= isl_pw_aff_tdiv_q(copy(), pa2
.release());
4092 exception::throw_last_error(ctx
);
4096 pw_aff
pw_aff::tdiv_r(pw_aff pa2
) const
4098 if (!ptr
|| pa2
.is_null())
4099 exception::throw_NULL_input(__FILE__
, __LINE__
);
4100 auto ctx
= get_ctx();
4101 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4102 auto res
= isl_pw_aff_tdiv_r(copy(), pa2
.release());
4104 exception::throw_last_error(ctx
);
4108 pw_aff
pw_aff::union_add(pw_aff pwaff2
) const
4110 if (!ptr
|| pwaff2
.is_null())
4111 exception::throw_NULL_input(__FILE__
, __LINE__
);
4112 auto ctx
= get_ctx();
4113 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4114 auto res
= isl_pw_aff_union_add(copy(), pwaff2
.release());
4116 exception::throw_last_error(ctx
);
4120 // implementations for isl::pw_multi_aff
4121 pw_multi_aff
manage(__isl_take isl_pw_multi_aff
*ptr
) {
4123 exception::throw_NULL_input(__FILE__
, __LINE__
);
4124 return pw_multi_aff(ptr
);
4126 pw_multi_aff
manage_copy(__isl_keep isl_pw_multi_aff
*ptr
) {
4128 exception::throw_NULL_input(__FILE__
, __LINE__
);
4129 auto ctx
= isl_pw_multi_aff_get_ctx(ptr
);
4130 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4131 ptr
= isl_pw_multi_aff_copy(ptr
);
4133 exception::throw_last_error(ctx
);
4134 return pw_multi_aff(ptr
);
4137 pw_multi_aff::pw_multi_aff()
4140 pw_multi_aff::pw_multi_aff(const pw_multi_aff
&obj
)
4144 exception::throw_NULL_input(__FILE__
, __LINE__
);
4145 auto ctx
= isl_pw_multi_aff_get_ctx(obj
.ptr
);
4146 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4149 exception::throw_last_error(ctx
);
4152 pw_multi_aff::pw_multi_aff(__isl_take isl_pw_multi_aff
*ptr
)
4155 pw_multi_aff::pw_multi_aff(multi_aff ma
)
4158 exception::throw_NULL_input(__FILE__
, __LINE__
);
4159 auto ctx
= ma
.get_ctx();
4160 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4161 auto res
= isl_pw_multi_aff_from_multi_aff(ma
.release());
4163 exception::throw_last_error(ctx
);
4166 pw_multi_aff::pw_multi_aff(pw_aff pa
)
4169 exception::throw_NULL_input(__FILE__
, __LINE__
);
4170 auto ctx
= pa
.get_ctx();
4171 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4172 auto res
= isl_pw_multi_aff_from_pw_aff(pa
.release());
4174 exception::throw_last_error(ctx
);
4177 pw_multi_aff::pw_multi_aff(ctx ctx
, const std::string
&str
)
4179 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4180 auto res
= isl_pw_multi_aff_read_from_str(ctx
.release(), str
.c_str());
4182 exception::throw_last_error(ctx
);
4186 pw_multi_aff
&pw_multi_aff::operator=(pw_multi_aff obj
) {
4187 std::swap(this->ptr
, obj
.ptr
);
4191 pw_multi_aff::~pw_multi_aff() {
4193 isl_pw_multi_aff_free(ptr
);
4196 __isl_give isl_pw_multi_aff
*pw_multi_aff::copy() const & {
4197 return isl_pw_multi_aff_copy(ptr
);
4200 __isl_keep isl_pw_multi_aff
*pw_multi_aff::get() const {
4204 __isl_give isl_pw_multi_aff
*pw_multi_aff::release() {
4205 isl_pw_multi_aff
*tmp
= ptr
;
4210 bool pw_multi_aff::is_null() const {
4211 return ptr
== nullptr;
4214 ctx
pw_multi_aff::get_ctx() const {
4215 return ctx(isl_pw_multi_aff_get_ctx(ptr
));
4218 pw_multi_aff
pw_multi_aff::add(pw_multi_aff pma2
) const
4220 if (!ptr
|| pma2
.is_null())
4221 exception::throw_NULL_input(__FILE__
, __LINE__
);
4222 auto ctx
= get_ctx();
4223 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4224 auto res
= isl_pw_multi_aff_add(copy(), pma2
.release());
4226 exception::throw_last_error(ctx
);
4230 pw_multi_aff
pw_multi_aff::flat_range_product(pw_multi_aff pma2
) const
4232 if (!ptr
|| pma2
.is_null())
4233 exception::throw_NULL_input(__FILE__
, __LINE__
);
4234 auto ctx
= get_ctx();
4235 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4236 auto res
= isl_pw_multi_aff_flat_range_product(copy(), pma2
.release());
4238 exception::throw_last_error(ctx
);
4242 pw_multi_aff
pw_multi_aff::product(pw_multi_aff pma2
) const
4244 if (!ptr
|| pma2
.is_null())
4245 exception::throw_NULL_input(__FILE__
, __LINE__
);
4246 auto ctx
= get_ctx();
4247 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4248 auto res
= isl_pw_multi_aff_product(copy(), pma2
.release());
4250 exception::throw_last_error(ctx
);
4254 pw_multi_aff
pw_multi_aff::pullback(multi_aff ma
) const
4256 if (!ptr
|| ma
.is_null())
4257 exception::throw_NULL_input(__FILE__
, __LINE__
);
4258 auto ctx
= get_ctx();
4259 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4260 auto res
= isl_pw_multi_aff_pullback_multi_aff(copy(), ma
.release());
4262 exception::throw_last_error(ctx
);
4266 pw_multi_aff
pw_multi_aff::pullback(pw_multi_aff pma2
) const
4268 if (!ptr
|| pma2
.is_null())
4269 exception::throw_NULL_input(__FILE__
, __LINE__
);
4270 auto ctx
= get_ctx();
4271 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4272 auto res
= isl_pw_multi_aff_pullback_pw_multi_aff(copy(), pma2
.release());
4274 exception::throw_last_error(ctx
);
4278 pw_multi_aff
pw_multi_aff::range_product(pw_multi_aff pma2
) const
4280 if (!ptr
|| pma2
.is_null())
4281 exception::throw_NULL_input(__FILE__
, __LINE__
);
4282 auto ctx
= get_ctx();
4283 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4284 auto res
= isl_pw_multi_aff_range_product(copy(), pma2
.release());
4286 exception::throw_last_error(ctx
);
4290 pw_multi_aff
pw_multi_aff::union_add(pw_multi_aff pma2
) const
4292 if (!ptr
|| pma2
.is_null())
4293 exception::throw_NULL_input(__FILE__
, __LINE__
);
4294 auto ctx
= get_ctx();
4295 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4296 auto res
= isl_pw_multi_aff_union_add(copy(), pma2
.release());
4298 exception::throw_last_error(ctx
);
4302 // implementations for isl::schedule
4303 schedule
manage(__isl_take isl_schedule
*ptr
) {
4305 exception::throw_NULL_input(__FILE__
, __LINE__
);
4306 return schedule(ptr
);
4308 schedule
manage_copy(__isl_keep isl_schedule
*ptr
) {
4310 exception::throw_NULL_input(__FILE__
, __LINE__
);
4311 auto ctx
= isl_schedule_get_ctx(ptr
);
4312 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4313 ptr
= isl_schedule_copy(ptr
);
4315 exception::throw_last_error(ctx
);
4316 return schedule(ptr
);
4319 schedule::schedule()
4322 schedule::schedule(const schedule
&obj
)
4326 exception::throw_NULL_input(__FILE__
, __LINE__
);
4327 auto ctx
= isl_schedule_get_ctx(obj
.ptr
);
4328 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4331 exception::throw_last_error(ctx
);
4334 schedule::schedule(__isl_take isl_schedule
*ptr
)
4337 schedule::schedule(ctx ctx
, const std::string
&str
)
4339 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4340 auto res
= isl_schedule_read_from_str(ctx
.release(), str
.c_str());
4342 exception::throw_last_error(ctx
);
4346 schedule
&schedule::operator=(schedule obj
) {
4347 std::swap(this->ptr
, obj
.ptr
);
4351 schedule::~schedule() {
4353 isl_schedule_free(ptr
);
4356 __isl_give isl_schedule
*schedule::copy() const & {
4357 return isl_schedule_copy(ptr
);
4360 __isl_keep isl_schedule
*schedule::get() const {
4364 __isl_give isl_schedule
*schedule::release() {
4365 isl_schedule
*tmp
= ptr
;
4370 bool schedule::is_null() const {
4371 return ptr
== nullptr;
4374 ctx
schedule::get_ctx() const {
4375 return ctx(isl_schedule_get_ctx(ptr
));
4378 union_map
schedule::get_map() const
4381 exception::throw_NULL_input(__FILE__
, __LINE__
);
4382 auto ctx
= get_ctx();
4383 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4384 auto res
= isl_schedule_get_map(get());
4386 exception::throw_last_error(ctx
);
4390 schedule_node
schedule::get_root() const
4393 exception::throw_NULL_input(__FILE__
, __LINE__
);
4394 auto ctx
= get_ctx();
4395 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4396 auto res
= isl_schedule_get_root(get());
4398 exception::throw_last_error(ctx
);
4402 schedule
schedule::pullback(union_pw_multi_aff upma
) const
4404 if (!ptr
|| upma
.is_null())
4405 exception::throw_NULL_input(__FILE__
, __LINE__
);
4406 auto ctx
= get_ctx();
4407 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4408 auto res
= isl_schedule_pullback_union_pw_multi_aff(copy(), upma
.release());
4410 exception::throw_last_error(ctx
);
4414 // implementations for isl::schedule_constraints
4415 schedule_constraints
manage(__isl_take isl_schedule_constraints
*ptr
) {
4417 exception::throw_NULL_input(__FILE__
, __LINE__
);
4418 return schedule_constraints(ptr
);
4420 schedule_constraints
manage_copy(__isl_keep isl_schedule_constraints
*ptr
) {
4422 exception::throw_NULL_input(__FILE__
, __LINE__
);
4423 auto ctx
= isl_schedule_constraints_get_ctx(ptr
);
4424 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4425 ptr
= isl_schedule_constraints_copy(ptr
);
4427 exception::throw_last_error(ctx
);
4428 return schedule_constraints(ptr
);
4431 schedule_constraints::schedule_constraints()
4434 schedule_constraints::schedule_constraints(const schedule_constraints
&obj
)
4438 exception::throw_NULL_input(__FILE__
, __LINE__
);
4439 auto ctx
= isl_schedule_constraints_get_ctx(obj
.ptr
);
4440 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4443 exception::throw_last_error(ctx
);
4446 schedule_constraints::schedule_constraints(__isl_take isl_schedule_constraints
*ptr
)
4449 schedule_constraints::schedule_constraints(ctx ctx
, const std::string
&str
)
4451 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4452 auto res
= isl_schedule_constraints_read_from_str(ctx
.release(), str
.c_str());
4454 exception::throw_last_error(ctx
);
4458 schedule_constraints
&schedule_constraints::operator=(schedule_constraints obj
) {
4459 std::swap(this->ptr
, obj
.ptr
);
4463 schedule_constraints::~schedule_constraints() {
4465 isl_schedule_constraints_free(ptr
);
4468 __isl_give isl_schedule_constraints
*schedule_constraints::copy() const & {
4469 return isl_schedule_constraints_copy(ptr
);
4472 __isl_keep isl_schedule_constraints
*schedule_constraints::get() const {
4476 __isl_give isl_schedule_constraints
*schedule_constraints::release() {
4477 isl_schedule_constraints
*tmp
= ptr
;
4482 bool schedule_constraints::is_null() const {
4483 return ptr
== nullptr;
4486 ctx
schedule_constraints::get_ctx() const {
4487 return ctx(isl_schedule_constraints_get_ctx(ptr
));
4490 schedule
schedule_constraints::compute_schedule() const
4493 exception::throw_NULL_input(__FILE__
, __LINE__
);
4494 auto ctx
= get_ctx();
4495 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4496 auto res
= isl_schedule_constraints_compute_schedule(copy());
4498 exception::throw_last_error(ctx
);
4502 union_map
schedule_constraints::get_coincidence() const
4505 exception::throw_NULL_input(__FILE__
, __LINE__
);
4506 auto ctx
= get_ctx();
4507 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4508 auto res
= isl_schedule_constraints_get_coincidence(get());
4510 exception::throw_last_error(ctx
);
4514 union_map
schedule_constraints::get_conditional_validity() const
4517 exception::throw_NULL_input(__FILE__
, __LINE__
);
4518 auto ctx
= get_ctx();
4519 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4520 auto res
= isl_schedule_constraints_get_conditional_validity(get());
4522 exception::throw_last_error(ctx
);
4526 union_map
schedule_constraints::get_conditional_validity_condition() const
4529 exception::throw_NULL_input(__FILE__
, __LINE__
);
4530 auto ctx
= get_ctx();
4531 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4532 auto res
= isl_schedule_constraints_get_conditional_validity_condition(get());
4534 exception::throw_last_error(ctx
);
4538 set
schedule_constraints::get_context() const
4541 exception::throw_NULL_input(__FILE__
, __LINE__
);
4542 auto ctx
= get_ctx();
4543 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4544 auto res
= isl_schedule_constraints_get_context(get());
4546 exception::throw_last_error(ctx
);
4550 union_set
schedule_constraints::get_domain() const
4553 exception::throw_NULL_input(__FILE__
, __LINE__
);
4554 auto ctx
= get_ctx();
4555 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4556 auto res
= isl_schedule_constraints_get_domain(get());
4558 exception::throw_last_error(ctx
);
4562 union_map
schedule_constraints::get_proximity() const
4565 exception::throw_NULL_input(__FILE__
, __LINE__
);
4566 auto ctx
= get_ctx();
4567 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4568 auto res
= isl_schedule_constraints_get_proximity(get());
4570 exception::throw_last_error(ctx
);
4574 union_map
schedule_constraints::get_validity() const
4577 exception::throw_NULL_input(__FILE__
, __LINE__
);
4578 auto ctx
= get_ctx();
4579 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4580 auto res
= isl_schedule_constraints_get_validity(get());
4582 exception::throw_last_error(ctx
);
4586 schedule_constraints
schedule_constraints::on_domain(union_set domain
)
4588 if (domain
.is_null())
4589 exception::throw_NULL_input(__FILE__
, __LINE__
);
4590 auto ctx
= domain
.get_ctx();
4591 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4592 auto res
= isl_schedule_constraints_on_domain(domain
.release());
4594 exception::throw_last_error(ctx
);
4598 schedule_constraints
schedule_constraints::set_coincidence(union_map coincidence
) const
4600 if (!ptr
|| coincidence
.is_null())
4601 exception::throw_NULL_input(__FILE__
, __LINE__
);
4602 auto ctx
= get_ctx();
4603 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4604 auto res
= isl_schedule_constraints_set_coincidence(copy(), coincidence
.release());
4606 exception::throw_last_error(ctx
);
4610 schedule_constraints
schedule_constraints::set_conditional_validity(union_map condition
, union_map validity
) const
4612 if (!ptr
|| condition
.is_null() || validity
.is_null())
4613 exception::throw_NULL_input(__FILE__
, __LINE__
);
4614 auto ctx
= get_ctx();
4615 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4616 auto res
= isl_schedule_constraints_set_conditional_validity(copy(), condition
.release(), validity
.release());
4618 exception::throw_last_error(ctx
);
4622 schedule_constraints
schedule_constraints::set_context(set context
) const
4624 if (!ptr
|| context
.is_null())
4625 exception::throw_NULL_input(__FILE__
, __LINE__
);
4626 auto ctx
= get_ctx();
4627 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4628 auto res
= isl_schedule_constraints_set_context(copy(), context
.release());
4630 exception::throw_last_error(ctx
);
4634 schedule_constraints
schedule_constraints::set_proximity(union_map proximity
) const
4636 if (!ptr
|| proximity
.is_null())
4637 exception::throw_NULL_input(__FILE__
, __LINE__
);
4638 auto ctx
= get_ctx();
4639 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4640 auto res
= isl_schedule_constraints_set_proximity(copy(), proximity
.release());
4642 exception::throw_last_error(ctx
);
4646 schedule_constraints
schedule_constraints::set_validity(union_map validity
) const
4648 if (!ptr
|| validity
.is_null())
4649 exception::throw_NULL_input(__FILE__
, __LINE__
);
4650 auto ctx
= get_ctx();
4651 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4652 auto res
= isl_schedule_constraints_set_validity(copy(), validity
.release());
4654 exception::throw_last_error(ctx
);
4658 // implementations for isl::schedule_node
4659 schedule_node
manage(__isl_take isl_schedule_node
*ptr
) {
4661 exception::throw_NULL_input(__FILE__
, __LINE__
);
4662 return schedule_node(ptr
);
4664 schedule_node
manage_copy(__isl_keep isl_schedule_node
*ptr
) {
4666 exception::throw_NULL_input(__FILE__
, __LINE__
);
4667 auto ctx
= isl_schedule_node_get_ctx(ptr
);
4668 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4669 ptr
= isl_schedule_node_copy(ptr
);
4671 exception::throw_last_error(ctx
);
4672 return schedule_node(ptr
);
4675 schedule_node::schedule_node()
4678 schedule_node::schedule_node(const schedule_node
&obj
)
4682 exception::throw_NULL_input(__FILE__
, __LINE__
);
4683 auto ctx
= isl_schedule_node_get_ctx(obj
.ptr
);
4684 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4687 exception::throw_last_error(ctx
);
4690 schedule_node::schedule_node(__isl_take isl_schedule_node
*ptr
)
4694 schedule_node
&schedule_node::operator=(schedule_node obj
) {
4695 std::swap(this->ptr
, obj
.ptr
);
4699 schedule_node::~schedule_node() {
4701 isl_schedule_node_free(ptr
);
4704 __isl_give isl_schedule_node
*schedule_node::copy() const & {
4705 return isl_schedule_node_copy(ptr
);
4708 __isl_keep isl_schedule_node
*schedule_node::get() const {
4712 __isl_give isl_schedule_node
*schedule_node::release() {
4713 isl_schedule_node
*tmp
= ptr
;
4718 bool schedule_node::is_null() const {
4719 return ptr
== nullptr;
4722 ctx
schedule_node::get_ctx() const {
4723 return ctx(isl_schedule_node_get_ctx(ptr
));
4726 bool schedule_node::band_member_get_coincident(int pos
) const
4729 exception::throw_NULL_input(__FILE__
, __LINE__
);
4730 auto ctx
= get_ctx();
4731 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4732 auto res
= isl_schedule_node_band_member_get_coincident(get(), pos
);
4734 exception::throw_last_error(ctx
);
4738 schedule_node
schedule_node::band_member_set_coincident(int pos
, int coincident
) const
4741 exception::throw_NULL_input(__FILE__
, __LINE__
);
4742 auto ctx
= get_ctx();
4743 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4744 auto res
= isl_schedule_node_band_member_set_coincident(copy(), pos
, coincident
);
4746 exception::throw_last_error(ctx
);
4750 schedule_node
schedule_node::child(int pos
) const
4753 exception::throw_NULL_input(__FILE__
, __LINE__
);
4754 auto ctx
= get_ctx();
4755 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4756 auto res
= isl_schedule_node_child(copy(), pos
);
4758 exception::throw_last_error(ctx
);
4762 multi_union_pw_aff
schedule_node::get_prefix_schedule_multi_union_pw_aff() const
4765 exception::throw_NULL_input(__FILE__
, __LINE__
);
4766 auto ctx
= get_ctx();
4767 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4768 auto res
= isl_schedule_node_get_prefix_schedule_multi_union_pw_aff(get());
4770 exception::throw_last_error(ctx
);
4774 union_map
schedule_node::get_prefix_schedule_union_map() const
4777 exception::throw_NULL_input(__FILE__
, __LINE__
);
4778 auto ctx
= get_ctx();
4779 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4780 auto res
= isl_schedule_node_get_prefix_schedule_union_map(get());
4782 exception::throw_last_error(ctx
);
4786 union_pw_multi_aff
schedule_node::get_prefix_schedule_union_pw_multi_aff() const
4789 exception::throw_NULL_input(__FILE__
, __LINE__
);
4790 auto ctx
= get_ctx();
4791 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4792 auto res
= isl_schedule_node_get_prefix_schedule_union_pw_multi_aff(get());
4794 exception::throw_last_error(ctx
);
4798 schedule
schedule_node::get_schedule() const
4801 exception::throw_NULL_input(__FILE__
, __LINE__
);
4802 auto ctx
= get_ctx();
4803 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4804 auto res
= isl_schedule_node_get_schedule(get());
4806 exception::throw_last_error(ctx
);
4810 schedule_node
schedule_node::parent() const
4813 exception::throw_NULL_input(__FILE__
, __LINE__
);
4814 auto ctx
= get_ctx();
4815 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4816 auto res
= isl_schedule_node_parent(copy());
4818 exception::throw_last_error(ctx
);
4822 // implementations for isl::set
4823 set
manage(__isl_take isl_set
*ptr
) {
4825 exception::throw_NULL_input(__FILE__
, __LINE__
);
4828 set
manage_copy(__isl_keep isl_set
*ptr
) {
4830 exception::throw_NULL_input(__FILE__
, __LINE__
);
4831 auto ctx
= isl_set_get_ctx(ptr
);
4832 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4833 ptr
= isl_set_copy(ptr
);
4835 exception::throw_last_error(ctx
);
4842 set::set(const set
&obj
)
4846 exception::throw_NULL_input(__FILE__
, __LINE__
);
4847 auto ctx
= isl_set_get_ctx(obj
.ptr
);
4848 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4851 exception::throw_last_error(ctx
);
4854 set::set(__isl_take isl_set
*ptr
)
4857 set::set(ctx ctx
, const std::string
&str
)
4859 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4860 auto res
= isl_set_read_from_str(ctx
.release(), str
.c_str());
4862 exception::throw_last_error(ctx
);
4865 set::set(basic_set bset
)
4868 exception::throw_NULL_input(__FILE__
, __LINE__
);
4869 auto ctx
= bset
.get_ctx();
4870 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4871 auto res
= isl_set_from_basic_set(bset
.release());
4873 exception::throw_last_error(ctx
);
4879 exception::throw_NULL_input(__FILE__
, __LINE__
);
4880 auto ctx
= pnt
.get_ctx();
4881 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4882 auto res
= isl_set_from_point(pnt
.release());
4884 exception::throw_last_error(ctx
);
4888 set
&set::operator=(set obj
) {
4889 std::swap(this->ptr
, obj
.ptr
);
4898 __isl_give isl_set
*set::copy() const & {
4899 return isl_set_copy(ptr
);
4902 __isl_keep isl_set
*set::get() const {
4906 __isl_give isl_set
*set::release() {
4912 bool set::is_null() const {
4913 return ptr
== nullptr;
4916 ctx
set::get_ctx() const {
4917 return ctx(isl_set_get_ctx(ptr
));
4920 basic_set
set::affine_hull() const
4923 exception::throw_NULL_input(__FILE__
, __LINE__
);
4924 auto ctx
= get_ctx();
4925 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4926 auto res
= isl_set_affine_hull(copy());
4928 exception::throw_last_error(ctx
);
4932 set
set::apply(map map
) const
4934 if (!ptr
|| map
.is_null())
4935 exception::throw_NULL_input(__FILE__
, __LINE__
);
4936 auto ctx
= get_ctx();
4937 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4938 auto res
= isl_set_apply(copy(), map
.release());
4940 exception::throw_last_error(ctx
);
4944 set
set::coalesce() const
4947 exception::throw_NULL_input(__FILE__
, __LINE__
);
4948 auto ctx
= get_ctx();
4949 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4950 auto res
= isl_set_coalesce(copy());
4952 exception::throw_last_error(ctx
);
4956 set
set::complement() const
4959 exception::throw_NULL_input(__FILE__
, __LINE__
);
4960 auto ctx
= get_ctx();
4961 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4962 auto res
= isl_set_complement(copy());
4964 exception::throw_last_error(ctx
);
4968 set
set::detect_equalities() const
4971 exception::throw_NULL_input(__FILE__
, __LINE__
);
4972 auto ctx
= get_ctx();
4973 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4974 auto res
= isl_set_detect_equalities(copy());
4976 exception::throw_last_error(ctx
);
4980 set
set::flatten() const
4983 exception::throw_NULL_input(__FILE__
, __LINE__
);
4984 auto ctx
= get_ctx();
4985 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4986 auto res
= isl_set_flatten(copy());
4988 exception::throw_last_error(ctx
);
4992 void set::foreach_basic_set(const std::function
<void(basic_set
)> &fn
) const
4995 exception::throw_NULL_input(__FILE__
, __LINE__
);
4996 auto ctx
= get_ctx();
4997 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
4999 const std::function
<void(basic_set
)> *func
;
5000 std::exception_ptr eptr
;
5001 } fn_data
= { &fn
};
5002 auto fn_lambda
= [](isl_basic_set
*arg_0
, void *arg_1
) -> isl_stat
{
5003 auto *data
= static_cast<struct fn_data
*>(arg_1
);
5005 (*data
->func
)(manage(arg_0
));
5007 } ISL_CPP_CATCH_ALL
{
5008 data
->eptr
= std::current_exception();
5009 return isl_stat_error
;
5012 auto res
= isl_set_foreach_basic_set(get(), fn_lambda
, &fn_data
);
5014 std::rethrow_exception(fn_data
.eptr
);
5016 exception::throw_last_error(ctx
);
5020 val
set::get_stride(int pos
) const
5023 exception::throw_NULL_input(__FILE__
, __LINE__
);
5024 auto ctx
= get_ctx();
5025 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5026 auto res
= isl_set_get_stride(get(), pos
);
5028 exception::throw_last_error(ctx
);
5032 set
set::gist(set context
) const
5034 if (!ptr
|| context
.is_null())
5035 exception::throw_NULL_input(__FILE__
, __LINE__
);
5036 auto ctx
= get_ctx();
5037 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5038 auto res
= isl_set_gist(copy(), context
.release());
5040 exception::throw_last_error(ctx
);
5044 map
set::identity() const
5047 exception::throw_NULL_input(__FILE__
, __LINE__
);
5048 auto ctx
= get_ctx();
5049 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5050 auto res
= isl_set_identity(copy());
5052 exception::throw_last_error(ctx
);
5056 set
set::intersect(set set2
) const
5058 if (!ptr
|| set2
.is_null())
5059 exception::throw_NULL_input(__FILE__
, __LINE__
);
5060 auto ctx
= get_ctx();
5061 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5062 auto res
= isl_set_intersect(copy(), set2
.release());
5064 exception::throw_last_error(ctx
);
5068 set
set::intersect_params(set params
) const
5070 if (!ptr
|| params
.is_null())
5071 exception::throw_NULL_input(__FILE__
, __LINE__
);
5072 auto ctx
= get_ctx();
5073 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5074 auto res
= isl_set_intersect_params(copy(), params
.release());
5076 exception::throw_last_error(ctx
);
5080 bool set::is_disjoint(const set
&set2
) const
5082 if (!ptr
|| set2
.is_null())
5083 exception::throw_NULL_input(__FILE__
, __LINE__
);
5084 auto ctx
= get_ctx();
5085 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5086 auto res
= isl_set_is_disjoint(get(), set2
.get());
5088 exception::throw_last_error(ctx
);
5092 bool set::is_empty() const
5095 exception::throw_NULL_input(__FILE__
, __LINE__
);
5096 auto ctx
= get_ctx();
5097 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5098 auto res
= isl_set_is_empty(get());
5100 exception::throw_last_error(ctx
);
5104 bool set::is_equal(const set
&set2
) const
5106 if (!ptr
|| set2
.is_null())
5107 exception::throw_NULL_input(__FILE__
, __LINE__
);
5108 auto ctx
= get_ctx();
5109 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5110 auto res
= isl_set_is_equal(get(), set2
.get());
5112 exception::throw_last_error(ctx
);
5116 bool set::is_strict_subset(const set
&set2
) const
5118 if (!ptr
|| set2
.is_null())
5119 exception::throw_NULL_input(__FILE__
, __LINE__
);
5120 auto ctx
= get_ctx();
5121 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5122 auto res
= isl_set_is_strict_subset(get(), set2
.get());
5124 exception::throw_last_error(ctx
);
5128 bool set::is_subset(const set
&set2
) const
5130 if (!ptr
|| set2
.is_null())
5131 exception::throw_NULL_input(__FILE__
, __LINE__
);
5132 auto ctx
= get_ctx();
5133 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5134 auto res
= isl_set_is_subset(get(), set2
.get());
5136 exception::throw_last_error(ctx
);
5140 bool set::is_wrapping() const
5143 exception::throw_NULL_input(__FILE__
, __LINE__
);
5144 auto ctx
= get_ctx();
5145 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5146 auto res
= isl_set_is_wrapping(get());
5148 exception::throw_last_error(ctx
);
5152 set
set::lexmax() const
5155 exception::throw_NULL_input(__FILE__
, __LINE__
);
5156 auto ctx
= get_ctx();
5157 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5158 auto res
= isl_set_lexmax(copy());
5160 exception::throw_last_error(ctx
);
5164 set
set::lexmin() const
5167 exception::throw_NULL_input(__FILE__
, __LINE__
);
5168 auto ctx
= get_ctx();
5169 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5170 auto res
= isl_set_lexmin(copy());
5172 exception::throw_last_error(ctx
);
5176 val
set::max_val(const aff
&obj
) const
5178 if (!ptr
|| obj
.is_null())
5179 exception::throw_NULL_input(__FILE__
, __LINE__
);
5180 auto ctx
= get_ctx();
5181 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5182 auto res
= isl_set_max_val(get(), obj
.get());
5184 exception::throw_last_error(ctx
);
5188 val
set::min_val(const aff
&obj
) const
5190 if (!ptr
|| obj
.is_null())
5191 exception::throw_NULL_input(__FILE__
, __LINE__
);
5192 auto ctx
= get_ctx();
5193 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5194 auto res
= isl_set_min_val(get(), obj
.get());
5196 exception::throw_last_error(ctx
);
5200 basic_set
set::polyhedral_hull() const
5203 exception::throw_NULL_input(__FILE__
, __LINE__
);
5204 auto ctx
= get_ctx();
5205 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5206 auto res
= isl_set_polyhedral_hull(copy());
5208 exception::throw_last_error(ctx
);
5212 basic_set
set::sample() const
5215 exception::throw_NULL_input(__FILE__
, __LINE__
);
5216 auto ctx
= get_ctx();
5217 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5218 auto res
= isl_set_sample(copy());
5220 exception::throw_last_error(ctx
);
5224 point
set::sample_point() const
5227 exception::throw_NULL_input(__FILE__
, __LINE__
);
5228 auto ctx
= get_ctx();
5229 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5230 auto res
= isl_set_sample_point(copy());
5232 exception::throw_last_error(ctx
);
5236 set
set::subtract(set set2
) const
5238 if (!ptr
|| set2
.is_null())
5239 exception::throw_NULL_input(__FILE__
, __LINE__
);
5240 auto ctx
= get_ctx();
5241 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5242 auto res
= isl_set_subtract(copy(), set2
.release());
5244 exception::throw_last_error(ctx
);
5248 set
set::unite(set set2
) const
5250 if (!ptr
|| set2
.is_null())
5251 exception::throw_NULL_input(__FILE__
, __LINE__
);
5252 auto ctx
= get_ctx();
5253 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5254 auto res
= isl_set_union(copy(), set2
.release());
5256 exception::throw_last_error(ctx
);
5260 basic_set
set::unshifted_simple_hull() const
5263 exception::throw_NULL_input(__FILE__
, __LINE__
);
5264 auto ctx
= get_ctx();
5265 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5266 auto res
= isl_set_unshifted_simple_hull(copy());
5268 exception::throw_last_error(ctx
);
5272 // implementations for isl::union_access_info
5273 union_access_info
manage(__isl_take isl_union_access_info
*ptr
) {
5275 exception::throw_NULL_input(__FILE__
, __LINE__
);
5276 return union_access_info(ptr
);
5278 union_access_info
manage_copy(__isl_keep isl_union_access_info
*ptr
) {
5280 exception::throw_NULL_input(__FILE__
, __LINE__
);
5281 auto ctx
= isl_union_access_info_get_ctx(ptr
);
5282 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5283 ptr
= isl_union_access_info_copy(ptr
);
5285 exception::throw_last_error(ctx
);
5286 return union_access_info(ptr
);
5289 union_access_info::union_access_info()
5292 union_access_info::union_access_info(const union_access_info
&obj
)
5296 exception::throw_NULL_input(__FILE__
, __LINE__
);
5297 auto ctx
= isl_union_access_info_get_ctx(obj
.ptr
);
5298 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5301 exception::throw_last_error(ctx
);
5304 union_access_info::union_access_info(__isl_take isl_union_access_info
*ptr
)
5307 union_access_info::union_access_info(union_map sink
)
5310 exception::throw_NULL_input(__FILE__
, __LINE__
);
5311 auto ctx
= sink
.get_ctx();
5312 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5313 auto res
= isl_union_access_info_from_sink(sink
.release());
5315 exception::throw_last_error(ctx
);
5319 union_access_info
&union_access_info::operator=(union_access_info obj
) {
5320 std::swap(this->ptr
, obj
.ptr
);
5324 union_access_info::~union_access_info() {
5326 isl_union_access_info_free(ptr
);
5329 __isl_give isl_union_access_info
*union_access_info::copy() const & {
5330 return isl_union_access_info_copy(ptr
);
5333 __isl_keep isl_union_access_info
*union_access_info::get() const {
5337 __isl_give isl_union_access_info
*union_access_info::release() {
5338 isl_union_access_info
*tmp
= ptr
;
5343 bool union_access_info::is_null() const {
5344 return ptr
== nullptr;
5347 ctx
union_access_info::get_ctx() const {
5348 return ctx(isl_union_access_info_get_ctx(ptr
));
5351 union_flow
union_access_info::compute_flow() const
5354 exception::throw_NULL_input(__FILE__
, __LINE__
);
5355 auto ctx
= get_ctx();
5356 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5357 auto res
= isl_union_access_info_compute_flow(copy());
5359 exception::throw_last_error(ctx
);
5363 union_access_info
union_access_info::set_kill(union_map kill
) const
5365 if (!ptr
|| kill
.is_null())
5366 exception::throw_NULL_input(__FILE__
, __LINE__
);
5367 auto ctx
= get_ctx();
5368 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5369 auto res
= isl_union_access_info_set_kill(copy(), kill
.release());
5371 exception::throw_last_error(ctx
);
5375 union_access_info
union_access_info::set_may_source(union_map may_source
) const
5377 if (!ptr
|| may_source
.is_null())
5378 exception::throw_NULL_input(__FILE__
, __LINE__
);
5379 auto ctx
= get_ctx();
5380 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5381 auto res
= isl_union_access_info_set_may_source(copy(), may_source
.release());
5383 exception::throw_last_error(ctx
);
5387 union_access_info
union_access_info::set_must_source(union_map must_source
) const
5389 if (!ptr
|| must_source
.is_null())
5390 exception::throw_NULL_input(__FILE__
, __LINE__
);
5391 auto ctx
= get_ctx();
5392 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5393 auto res
= isl_union_access_info_set_must_source(copy(), must_source
.release());
5395 exception::throw_last_error(ctx
);
5399 union_access_info
union_access_info::set_schedule(schedule schedule
) const
5401 if (!ptr
|| schedule
.is_null())
5402 exception::throw_NULL_input(__FILE__
, __LINE__
);
5403 auto ctx
= get_ctx();
5404 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5405 auto res
= isl_union_access_info_set_schedule(copy(), schedule
.release());
5407 exception::throw_last_error(ctx
);
5411 union_access_info
union_access_info::set_schedule_map(union_map schedule_map
) const
5413 if (!ptr
|| schedule_map
.is_null())
5414 exception::throw_NULL_input(__FILE__
, __LINE__
);
5415 auto ctx
= get_ctx();
5416 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5417 auto res
= isl_union_access_info_set_schedule_map(copy(), schedule_map
.release());
5419 exception::throw_last_error(ctx
);
5423 // implementations for isl::union_flow
5424 union_flow
manage(__isl_take isl_union_flow
*ptr
) {
5426 exception::throw_NULL_input(__FILE__
, __LINE__
);
5427 return union_flow(ptr
);
5429 union_flow
manage_copy(__isl_keep isl_union_flow
*ptr
) {
5431 exception::throw_NULL_input(__FILE__
, __LINE__
);
5432 auto ctx
= isl_union_flow_get_ctx(ptr
);
5433 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5434 ptr
= isl_union_flow_copy(ptr
);
5436 exception::throw_last_error(ctx
);
5437 return union_flow(ptr
);
5440 union_flow::union_flow()
5443 union_flow::union_flow(const union_flow
&obj
)
5447 exception::throw_NULL_input(__FILE__
, __LINE__
);
5448 auto ctx
= isl_union_flow_get_ctx(obj
.ptr
);
5449 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5452 exception::throw_last_error(ctx
);
5455 union_flow::union_flow(__isl_take isl_union_flow
*ptr
)
5459 union_flow
&union_flow::operator=(union_flow obj
) {
5460 std::swap(this->ptr
, obj
.ptr
);
5464 union_flow::~union_flow() {
5466 isl_union_flow_free(ptr
);
5469 __isl_give isl_union_flow
*union_flow::copy() const & {
5470 return isl_union_flow_copy(ptr
);
5473 __isl_keep isl_union_flow
*union_flow::get() const {
5477 __isl_give isl_union_flow
*union_flow::release() {
5478 isl_union_flow
*tmp
= ptr
;
5483 bool union_flow::is_null() const {
5484 return ptr
== nullptr;
5487 ctx
union_flow::get_ctx() const {
5488 return ctx(isl_union_flow_get_ctx(ptr
));
5491 union_map
union_flow::get_full_may_dependence() const
5494 exception::throw_NULL_input(__FILE__
, __LINE__
);
5495 auto ctx
= get_ctx();
5496 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5497 auto res
= isl_union_flow_get_full_may_dependence(get());
5499 exception::throw_last_error(ctx
);
5503 union_map
union_flow::get_full_must_dependence() const
5506 exception::throw_NULL_input(__FILE__
, __LINE__
);
5507 auto ctx
= get_ctx();
5508 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5509 auto res
= isl_union_flow_get_full_must_dependence(get());
5511 exception::throw_last_error(ctx
);
5515 union_map
union_flow::get_may_dependence() const
5518 exception::throw_NULL_input(__FILE__
, __LINE__
);
5519 auto ctx
= get_ctx();
5520 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5521 auto res
= isl_union_flow_get_may_dependence(get());
5523 exception::throw_last_error(ctx
);
5527 union_map
union_flow::get_may_no_source() const
5530 exception::throw_NULL_input(__FILE__
, __LINE__
);
5531 auto ctx
= get_ctx();
5532 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5533 auto res
= isl_union_flow_get_may_no_source(get());
5535 exception::throw_last_error(ctx
);
5539 union_map
union_flow::get_must_dependence() const
5542 exception::throw_NULL_input(__FILE__
, __LINE__
);
5543 auto ctx
= get_ctx();
5544 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5545 auto res
= isl_union_flow_get_must_dependence(get());
5547 exception::throw_last_error(ctx
);
5551 union_map
union_flow::get_must_no_source() const
5554 exception::throw_NULL_input(__FILE__
, __LINE__
);
5555 auto ctx
= get_ctx();
5556 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5557 auto res
= isl_union_flow_get_must_no_source(get());
5559 exception::throw_last_error(ctx
);
5563 // implementations for isl::union_map
5564 union_map
manage(__isl_take isl_union_map
*ptr
) {
5566 exception::throw_NULL_input(__FILE__
, __LINE__
);
5567 return union_map(ptr
);
5569 union_map
manage_copy(__isl_keep isl_union_map
*ptr
) {
5571 exception::throw_NULL_input(__FILE__
, __LINE__
);
5572 auto ctx
= isl_union_map_get_ctx(ptr
);
5573 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5574 ptr
= isl_union_map_copy(ptr
);
5576 exception::throw_last_error(ctx
);
5577 return union_map(ptr
);
5580 union_map::union_map()
5583 union_map::union_map(const union_map
&obj
)
5587 exception::throw_NULL_input(__FILE__
, __LINE__
);
5588 auto ctx
= isl_union_map_get_ctx(obj
.ptr
);
5589 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5592 exception::throw_last_error(ctx
);
5595 union_map::union_map(__isl_take isl_union_map
*ptr
)
5598 union_map::union_map(basic_map bmap
)
5601 exception::throw_NULL_input(__FILE__
, __LINE__
);
5602 auto ctx
= bmap
.get_ctx();
5603 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5604 auto res
= isl_union_map_from_basic_map(bmap
.release());
5606 exception::throw_last_error(ctx
);
5609 union_map::union_map(map map
)
5612 exception::throw_NULL_input(__FILE__
, __LINE__
);
5613 auto ctx
= map
.get_ctx();
5614 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5615 auto res
= isl_union_map_from_map(map
.release());
5617 exception::throw_last_error(ctx
);
5620 union_map::union_map(ctx ctx
, const std::string
&str
)
5622 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5623 auto res
= isl_union_map_read_from_str(ctx
.release(), str
.c_str());
5625 exception::throw_last_error(ctx
);
5629 union_map
&union_map::operator=(union_map obj
) {
5630 std::swap(this->ptr
, obj
.ptr
);
5634 union_map::~union_map() {
5636 isl_union_map_free(ptr
);
5639 __isl_give isl_union_map
*union_map::copy() const & {
5640 return isl_union_map_copy(ptr
);
5643 __isl_keep isl_union_map
*union_map::get() const {
5647 __isl_give isl_union_map
*union_map::release() {
5648 isl_union_map
*tmp
= ptr
;
5653 bool union_map::is_null() const {
5654 return ptr
== nullptr;
5657 ctx
union_map::get_ctx() const {
5658 return ctx(isl_union_map_get_ctx(ptr
));
5661 union_map
union_map::affine_hull() const
5664 exception::throw_NULL_input(__FILE__
, __LINE__
);
5665 auto ctx
= get_ctx();
5666 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5667 auto res
= isl_union_map_affine_hull(copy());
5669 exception::throw_last_error(ctx
);
5673 union_map
union_map::apply_domain(union_map umap2
) const
5675 if (!ptr
|| umap2
.is_null())
5676 exception::throw_NULL_input(__FILE__
, __LINE__
);
5677 auto ctx
= get_ctx();
5678 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5679 auto res
= isl_union_map_apply_domain(copy(), umap2
.release());
5681 exception::throw_last_error(ctx
);
5685 union_map
union_map::apply_range(union_map umap2
) const
5687 if (!ptr
|| umap2
.is_null())
5688 exception::throw_NULL_input(__FILE__
, __LINE__
);
5689 auto ctx
= get_ctx();
5690 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5691 auto res
= isl_union_map_apply_range(copy(), umap2
.release());
5693 exception::throw_last_error(ctx
);
5697 union_map
union_map::coalesce() const
5700 exception::throw_NULL_input(__FILE__
, __LINE__
);
5701 auto ctx
= get_ctx();
5702 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5703 auto res
= isl_union_map_coalesce(copy());
5705 exception::throw_last_error(ctx
);
5709 union_map
union_map::compute_divs() const
5712 exception::throw_NULL_input(__FILE__
, __LINE__
);
5713 auto ctx
= get_ctx();
5714 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5715 auto res
= isl_union_map_compute_divs(copy());
5717 exception::throw_last_error(ctx
);
5721 union_set
union_map::deltas() const
5724 exception::throw_NULL_input(__FILE__
, __LINE__
);
5725 auto ctx
= get_ctx();
5726 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5727 auto res
= isl_union_map_deltas(copy());
5729 exception::throw_last_error(ctx
);
5733 union_map
union_map::detect_equalities() const
5736 exception::throw_NULL_input(__FILE__
, __LINE__
);
5737 auto ctx
= get_ctx();
5738 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5739 auto res
= isl_union_map_detect_equalities(copy());
5741 exception::throw_last_error(ctx
);
5745 union_set
union_map::domain() const
5748 exception::throw_NULL_input(__FILE__
, __LINE__
);
5749 auto ctx
= get_ctx();
5750 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5751 auto res
= isl_union_map_domain(copy());
5753 exception::throw_last_error(ctx
);
5757 union_map
union_map::domain_factor_domain() const
5760 exception::throw_NULL_input(__FILE__
, __LINE__
);
5761 auto ctx
= get_ctx();
5762 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5763 auto res
= isl_union_map_domain_factor_domain(copy());
5765 exception::throw_last_error(ctx
);
5769 union_map
union_map::domain_factor_range() const
5772 exception::throw_NULL_input(__FILE__
, __LINE__
);
5773 auto ctx
= get_ctx();
5774 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5775 auto res
= isl_union_map_domain_factor_range(copy());
5777 exception::throw_last_error(ctx
);
5781 union_map
union_map::domain_map() const
5784 exception::throw_NULL_input(__FILE__
, __LINE__
);
5785 auto ctx
= get_ctx();
5786 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5787 auto res
= isl_union_map_domain_map(copy());
5789 exception::throw_last_error(ctx
);
5793 union_pw_multi_aff
union_map::domain_map_union_pw_multi_aff() const
5796 exception::throw_NULL_input(__FILE__
, __LINE__
);
5797 auto ctx
= get_ctx();
5798 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5799 auto res
= isl_union_map_domain_map_union_pw_multi_aff(copy());
5801 exception::throw_last_error(ctx
);
5805 union_map
union_map::domain_product(union_map umap2
) const
5807 if (!ptr
|| umap2
.is_null())
5808 exception::throw_NULL_input(__FILE__
, __LINE__
);
5809 auto ctx
= get_ctx();
5810 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5811 auto res
= isl_union_map_domain_product(copy(), umap2
.release());
5813 exception::throw_last_error(ctx
);
5817 union_map
union_map::eq_at(multi_union_pw_aff mupa
) const
5819 if (!ptr
|| mupa
.is_null())
5820 exception::throw_NULL_input(__FILE__
, __LINE__
);
5821 auto ctx
= get_ctx();
5822 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5823 auto res
= isl_union_map_eq_at_multi_union_pw_aff(copy(), mupa
.release());
5825 exception::throw_last_error(ctx
);
5829 union_map
union_map::factor_domain() const
5832 exception::throw_NULL_input(__FILE__
, __LINE__
);
5833 auto ctx
= get_ctx();
5834 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5835 auto res
= isl_union_map_factor_domain(copy());
5837 exception::throw_last_error(ctx
);
5841 union_map
union_map::factor_range() const
5844 exception::throw_NULL_input(__FILE__
, __LINE__
);
5845 auto ctx
= get_ctx();
5846 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5847 auto res
= isl_union_map_factor_range(copy());
5849 exception::throw_last_error(ctx
);
5853 union_map
union_map::fixed_power(val exp
) const
5855 if (!ptr
|| exp
.is_null())
5856 exception::throw_NULL_input(__FILE__
, __LINE__
);
5857 auto ctx
= get_ctx();
5858 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5859 auto res
= isl_union_map_fixed_power_val(copy(), exp
.release());
5861 exception::throw_last_error(ctx
);
5865 void union_map::foreach_map(const std::function
<void(map
)> &fn
) const
5868 exception::throw_NULL_input(__FILE__
, __LINE__
);
5869 auto ctx
= get_ctx();
5870 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5872 const std::function
<void(map
)> *func
;
5873 std::exception_ptr eptr
;
5874 } fn_data
= { &fn
};
5875 auto fn_lambda
= [](isl_map
*arg_0
, void *arg_1
) -> isl_stat
{
5876 auto *data
= static_cast<struct fn_data
*>(arg_1
);
5878 (*data
->func
)(manage(arg_0
));
5880 } ISL_CPP_CATCH_ALL
{
5881 data
->eptr
= std::current_exception();
5882 return isl_stat_error
;
5885 auto res
= isl_union_map_foreach_map(get(), fn_lambda
, &fn_data
);
5887 std::rethrow_exception(fn_data
.eptr
);
5889 exception::throw_last_error(ctx
);
5893 union_map
union_map::from(union_pw_multi_aff upma
)
5896 exception::throw_NULL_input(__FILE__
, __LINE__
);
5897 auto ctx
= upma
.get_ctx();
5898 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5899 auto res
= isl_union_map_from_union_pw_multi_aff(upma
.release());
5901 exception::throw_last_error(ctx
);
5905 union_map
union_map::from(multi_union_pw_aff mupa
)
5908 exception::throw_NULL_input(__FILE__
, __LINE__
);
5909 auto ctx
= mupa
.get_ctx();
5910 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5911 auto res
= isl_union_map_from_multi_union_pw_aff(mupa
.release());
5913 exception::throw_last_error(ctx
);
5917 union_map
union_map::from_domain(union_set uset
)
5920 exception::throw_NULL_input(__FILE__
, __LINE__
);
5921 auto ctx
= uset
.get_ctx();
5922 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5923 auto res
= isl_union_map_from_domain(uset
.release());
5925 exception::throw_last_error(ctx
);
5929 union_map
union_map::from_domain_and_range(union_set domain
, union_set range
)
5931 if (domain
.is_null() || range
.is_null())
5932 exception::throw_NULL_input(__FILE__
, __LINE__
);
5933 auto ctx
= domain
.get_ctx();
5934 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5935 auto res
= isl_union_map_from_domain_and_range(domain
.release(), range
.release());
5937 exception::throw_last_error(ctx
);
5941 union_map
union_map::from_range(union_set uset
)
5944 exception::throw_NULL_input(__FILE__
, __LINE__
);
5945 auto ctx
= uset
.get_ctx();
5946 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5947 auto res
= isl_union_map_from_range(uset
.release());
5949 exception::throw_last_error(ctx
);
5953 union_map
union_map::gist(union_map context
) const
5955 if (!ptr
|| context
.is_null())
5956 exception::throw_NULL_input(__FILE__
, __LINE__
);
5957 auto ctx
= get_ctx();
5958 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5959 auto res
= isl_union_map_gist(copy(), context
.release());
5961 exception::throw_last_error(ctx
);
5965 union_map
union_map::gist_domain(union_set uset
) const
5967 if (!ptr
|| uset
.is_null())
5968 exception::throw_NULL_input(__FILE__
, __LINE__
);
5969 auto ctx
= get_ctx();
5970 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5971 auto res
= isl_union_map_gist_domain(copy(), uset
.release());
5973 exception::throw_last_error(ctx
);
5977 union_map
union_map::gist_params(set set
) const
5979 if (!ptr
|| set
.is_null())
5980 exception::throw_NULL_input(__FILE__
, __LINE__
);
5981 auto ctx
= get_ctx();
5982 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5983 auto res
= isl_union_map_gist_params(copy(), set
.release());
5985 exception::throw_last_error(ctx
);
5989 union_map
union_map::gist_range(union_set uset
) const
5991 if (!ptr
|| uset
.is_null())
5992 exception::throw_NULL_input(__FILE__
, __LINE__
);
5993 auto ctx
= get_ctx();
5994 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
5995 auto res
= isl_union_map_gist_range(copy(), uset
.release());
5997 exception::throw_last_error(ctx
);
6001 union_map
union_map::intersect(union_map umap2
) const
6003 if (!ptr
|| umap2
.is_null())
6004 exception::throw_NULL_input(__FILE__
, __LINE__
);
6005 auto ctx
= get_ctx();
6006 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6007 auto res
= isl_union_map_intersect(copy(), umap2
.release());
6009 exception::throw_last_error(ctx
);
6013 union_map
union_map::intersect_domain(union_set uset
) const
6015 if (!ptr
|| uset
.is_null())
6016 exception::throw_NULL_input(__FILE__
, __LINE__
);
6017 auto ctx
= get_ctx();
6018 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6019 auto res
= isl_union_map_intersect_domain(copy(), uset
.release());
6021 exception::throw_last_error(ctx
);
6025 union_map
union_map::intersect_params(set set
) const
6027 if (!ptr
|| set
.is_null())
6028 exception::throw_NULL_input(__FILE__
, __LINE__
);
6029 auto ctx
= get_ctx();
6030 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6031 auto res
= isl_union_map_intersect_params(copy(), set
.release());
6033 exception::throw_last_error(ctx
);
6037 union_map
union_map::intersect_range(union_set uset
) const
6039 if (!ptr
|| uset
.is_null())
6040 exception::throw_NULL_input(__FILE__
, __LINE__
);
6041 auto ctx
= get_ctx();
6042 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6043 auto res
= isl_union_map_intersect_range(copy(), uset
.release());
6045 exception::throw_last_error(ctx
);
6049 bool union_map::is_bijective() const
6052 exception::throw_NULL_input(__FILE__
, __LINE__
);
6053 auto ctx
= get_ctx();
6054 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6055 auto res
= isl_union_map_is_bijective(get());
6057 exception::throw_last_error(ctx
);
6061 bool union_map::is_empty() const
6064 exception::throw_NULL_input(__FILE__
, __LINE__
);
6065 auto ctx
= get_ctx();
6066 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6067 auto res
= isl_union_map_is_empty(get());
6069 exception::throw_last_error(ctx
);
6073 bool union_map::is_equal(const union_map
&umap2
) const
6075 if (!ptr
|| umap2
.is_null())
6076 exception::throw_NULL_input(__FILE__
, __LINE__
);
6077 auto ctx
= get_ctx();
6078 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6079 auto res
= isl_union_map_is_equal(get(), umap2
.get());
6081 exception::throw_last_error(ctx
);
6085 bool union_map::is_injective() const
6088 exception::throw_NULL_input(__FILE__
, __LINE__
);
6089 auto ctx
= get_ctx();
6090 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6091 auto res
= isl_union_map_is_injective(get());
6093 exception::throw_last_error(ctx
);
6097 bool union_map::is_single_valued() const
6100 exception::throw_NULL_input(__FILE__
, __LINE__
);
6101 auto ctx
= get_ctx();
6102 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6103 auto res
= isl_union_map_is_single_valued(get());
6105 exception::throw_last_error(ctx
);
6109 bool union_map::is_strict_subset(const union_map
&umap2
) const
6111 if (!ptr
|| umap2
.is_null())
6112 exception::throw_NULL_input(__FILE__
, __LINE__
);
6113 auto ctx
= get_ctx();
6114 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6115 auto res
= isl_union_map_is_strict_subset(get(), umap2
.get());
6117 exception::throw_last_error(ctx
);
6121 bool union_map::is_subset(const union_map
&umap2
) const
6123 if (!ptr
|| umap2
.is_null())
6124 exception::throw_NULL_input(__FILE__
, __LINE__
);
6125 auto ctx
= get_ctx();
6126 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6127 auto res
= isl_union_map_is_subset(get(), umap2
.get());
6129 exception::throw_last_error(ctx
);
6133 union_map
union_map::lexmax() const
6136 exception::throw_NULL_input(__FILE__
, __LINE__
);
6137 auto ctx
= get_ctx();
6138 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6139 auto res
= isl_union_map_lexmax(copy());
6141 exception::throw_last_error(ctx
);
6145 union_map
union_map::lexmin() const
6148 exception::throw_NULL_input(__FILE__
, __LINE__
);
6149 auto ctx
= get_ctx();
6150 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6151 auto res
= isl_union_map_lexmin(copy());
6153 exception::throw_last_error(ctx
);
6157 union_map
union_map::polyhedral_hull() const
6160 exception::throw_NULL_input(__FILE__
, __LINE__
);
6161 auto ctx
= get_ctx();
6162 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6163 auto res
= isl_union_map_polyhedral_hull(copy());
6165 exception::throw_last_error(ctx
);
6169 union_map
union_map::product(union_map umap2
) const
6171 if (!ptr
|| umap2
.is_null())
6172 exception::throw_NULL_input(__FILE__
, __LINE__
);
6173 auto ctx
= get_ctx();
6174 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6175 auto res
= isl_union_map_product(copy(), umap2
.release());
6177 exception::throw_last_error(ctx
);
6181 union_map
union_map::project_out_all_params() const
6184 exception::throw_NULL_input(__FILE__
, __LINE__
);
6185 auto ctx
= get_ctx();
6186 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6187 auto res
= isl_union_map_project_out_all_params(copy());
6189 exception::throw_last_error(ctx
);
6193 union_set
union_map::range() const
6196 exception::throw_NULL_input(__FILE__
, __LINE__
);
6197 auto ctx
= get_ctx();
6198 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6199 auto res
= isl_union_map_range(copy());
6201 exception::throw_last_error(ctx
);
6205 union_map
union_map::range_factor_domain() const
6208 exception::throw_NULL_input(__FILE__
, __LINE__
);
6209 auto ctx
= get_ctx();
6210 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6211 auto res
= isl_union_map_range_factor_domain(copy());
6213 exception::throw_last_error(ctx
);
6217 union_map
union_map::range_factor_range() const
6220 exception::throw_NULL_input(__FILE__
, __LINE__
);
6221 auto ctx
= get_ctx();
6222 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6223 auto res
= isl_union_map_range_factor_range(copy());
6225 exception::throw_last_error(ctx
);
6229 union_map
union_map::range_map() const
6232 exception::throw_NULL_input(__FILE__
, __LINE__
);
6233 auto ctx
= get_ctx();
6234 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6235 auto res
= isl_union_map_range_map(copy());
6237 exception::throw_last_error(ctx
);
6241 union_map
union_map::range_product(union_map umap2
) const
6243 if (!ptr
|| umap2
.is_null())
6244 exception::throw_NULL_input(__FILE__
, __LINE__
);
6245 auto ctx
= get_ctx();
6246 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6247 auto res
= isl_union_map_range_product(copy(), umap2
.release());
6249 exception::throw_last_error(ctx
);
6253 union_map
union_map::reverse() const
6256 exception::throw_NULL_input(__FILE__
, __LINE__
);
6257 auto ctx
= get_ctx();
6258 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6259 auto res
= isl_union_map_reverse(copy());
6261 exception::throw_last_error(ctx
);
6265 union_map
union_map::subtract(union_map umap2
) const
6267 if (!ptr
|| umap2
.is_null())
6268 exception::throw_NULL_input(__FILE__
, __LINE__
);
6269 auto ctx
= get_ctx();
6270 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6271 auto res
= isl_union_map_subtract(copy(), umap2
.release());
6273 exception::throw_last_error(ctx
);
6277 union_map
union_map::subtract_domain(union_set dom
) const
6279 if (!ptr
|| dom
.is_null())
6280 exception::throw_NULL_input(__FILE__
, __LINE__
);
6281 auto ctx
= get_ctx();
6282 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6283 auto res
= isl_union_map_subtract_domain(copy(), dom
.release());
6285 exception::throw_last_error(ctx
);
6289 union_map
union_map::subtract_range(union_set dom
) const
6291 if (!ptr
|| dom
.is_null())
6292 exception::throw_NULL_input(__FILE__
, __LINE__
);
6293 auto ctx
= get_ctx();
6294 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6295 auto res
= isl_union_map_subtract_range(copy(), dom
.release());
6297 exception::throw_last_error(ctx
);
6301 union_map
union_map::unite(union_map umap2
) const
6303 if (!ptr
|| umap2
.is_null())
6304 exception::throw_NULL_input(__FILE__
, __LINE__
);
6305 auto ctx
= get_ctx();
6306 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6307 auto res
= isl_union_map_union(copy(), umap2
.release());
6309 exception::throw_last_error(ctx
);
6313 union_set
union_map::wrap() const
6316 exception::throw_NULL_input(__FILE__
, __LINE__
);
6317 auto ctx
= get_ctx();
6318 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6319 auto res
= isl_union_map_wrap(copy());
6321 exception::throw_last_error(ctx
);
6325 union_map
union_map::zip() const
6328 exception::throw_NULL_input(__FILE__
, __LINE__
);
6329 auto ctx
= get_ctx();
6330 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6331 auto res
= isl_union_map_zip(copy());
6333 exception::throw_last_error(ctx
);
6337 // implementations for isl::union_pw_aff
6338 union_pw_aff
manage(__isl_take isl_union_pw_aff
*ptr
) {
6340 exception::throw_NULL_input(__FILE__
, __LINE__
);
6341 return union_pw_aff(ptr
);
6343 union_pw_aff
manage_copy(__isl_keep isl_union_pw_aff
*ptr
) {
6345 exception::throw_NULL_input(__FILE__
, __LINE__
);
6346 auto ctx
= isl_union_pw_aff_get_ctx(ptr
);
6347 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6348 ptr
= isl_union_pw_aff_copy(ptr
);
6350 exception::throw_last_error(ctx
);
6351 return union_pw_aff(ptr
);
6354 union_pw_aff::union_pw_aff()
6357 union_pw_aff::union_pw_aff(const union_pw_aff
&obj
)
6361 exception::throw_NULL_input(__FILE__
, __LINE__
);
6362 auto ctx
= isl_union_pw_aff_get_ctx(obj
.ptr
);
6363 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6366 exception::throw_last_error(ctx
);
6369 union_pw_aff::union_pw_aff(__isl_take isl_union_pw_aff
*ptr
)
6372 union_pw_aff::union_pw_aff(pw_aff pa
)
6375 exception::throw_NULL_input(__FILE__
, __LINE__
);
6376 auto ctx
= pa
.get_ctx();
6377 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6378 auto res
= isl_union_pw_aff_from_pw_aff(pa
.release());
6380 exception::throw_last_error(ctx
);
6383 union_pw_aff::union_pw_aff(ctx ctx
, const std::string
&str
)
6385 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6386 auto res
= isl_union_pw_aff_read_from_str(ctx
.release(), str
.c_str());
6388 exception::throw_last_error(ctx
);
6392 union_pw_aff
&union_pw_aff::operator=(union_pw_aff obj
) {
6393 std::swap(this->ptr
, obj
.ptr
);
6397 union_pw_aff::~union_pw_aff() {
6399 isl_union_pw_aff_free(ptr
);
6402 __isl_give isl_union_pw_aff
*union_pw_aff::copy() const & {
6403 return isl_union_pw_aff_copy(ptr
);
6406 __isl_keep isl_union_pw_aff
*union_pw_aff::get() const {
6410 __isl_give isl_union_pw_aff
*union_pw_aff::release() {
6411 isl_union_pw_aff
*tmp
= ptr
;
6416 bool union_pw_aff::is_null() const {
6417 return ptr
== nullptr;
6420 ctx
union_pw_aff::get_ctx() const {
6421 return ctx(isl_union_pw_aff_get_ctx(ptr
));
6424 union_pw_aff
union_pw_aff::add(union_pw_aff upa2
) const
6426 if (!ptr
|| upa2
.is_null())
6427 exception::throw_NULL_input(__FILE__
, __LINE__
);
6428 auto ctx
= get_ctx();
6429 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6430 auto res
= isl_union_pw_aff_add(copy(), upa2
.release());
6432 exception::throw_last_error(ctx
);
6436 union_pw_aff
union_pw_aff::pullback(union_pw_multi_aff upma
) const
6438 if (!ptr
|| upma
.is_null())
6439 exception::throw_NULL_input(__FILE__
, __LINE__
);
6440 auto ctx
= get_ctx();
6441 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6442 auto res
= isl_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma
.release());
6444 exception::throw_last_error(ctx
);
6448 union_pw_aff
union_pw_aff::union_add(union_pw_aff upa2
) const
6450 if (!ptr
|| upa2
.is_null())
6451 exception::throw_NULL_input(__FILE__
, __LINE__
);
6452 auto ctx
= get_ctx();
6453 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6454 auto res
= isl_union_pw_aff_union_add(copy(), upa2
.release());
6456 exception::throw_last_error(ctx
);
6460 // implementations for isl::union_pw_multi_aff
6461 union_pw_multi_aff
manage(__isl_take isl_union_pw_multi_aff
*ptr
) {
6463 exception::throw_NULL_input(__FILE__
, __LINE__
);
6464 return union_pw_multi_aff(ptr
);
6466 union_pw_multi_aff
manage_copy(__isl_keep isl_union_pw_multi_aff
*ptr
) {
6468 exception::throw_NULL_input(__FILE__
, __LINE__
);
6469 auto ctx
= isl_union_pw_multi_aff_get_ctx(ptr
);
6470 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6471 ptr
= isl_union_pw_multi_aff_copy(ptr
);
6473 exception::throw_last_error(ctx
);
6474 return union_pw_multi_aff(ptr
);
6477 union_pw_multi_aff::union_pw_multi_aff()
6480 union_pw_multi_aff::union_pw_multi_aff(const union_pw_multi_aff
&obj
)
6484 exception::throw_NULL_input(__FILE__
, __LINE__
);
6485 auto ctx
= isl_union_pw_multi_aff_get_ctx(obj
.ptr
);
6486 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6489 exception::throw_last_error(ctx
);
6492 union_pw_multi_aff::union_pw_multi_aff(__isl_take isl_union_pw_multi_aff
*ptr
)
6495 union_pw_multi_aff::union_pw_multi_aff(pw_multi_aff pma
)
6498 exception::throw_NULL_input(__FILE__
, __LINE__
);
6499 auto ctx
= pma
.get_ctx();
6500 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6501 auto res
= isl_union_pw_multi_aff_from_pw_multi_aff(pma
.release());
6503 exception::throw_last_error(ctx
);
6506 union_pw_multi_aff::union_pw_multi_aff(ctx ctx
, const std::string
&str
)
6508 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6509 auto res
= isl_union_pw_multi_aff_read_from_str(ctx
.release(), str
.c_str());
6511 exception::throw_last_error(ctx
);
6514 union_pw_multi_aff::union_pw_multi_aff(union_pw_aff upa
)
6517 exception::throw_NULL_input(__FILE__
, __LINE__
);
6518 auto ctx
= upa
.get_ctx();
6519 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6520 auto res
= isl_union_pw_multi_aff_from_union_pw_aff(upa
.release());
6522 exception::throw_last_error(ctx
);
6526 union_pw_multi_aff
&union_pw_multi_aff::operator=(union_pw_multi_aff obj
) {
6527 std::swap(this->ptr
, obj
.ptr
);
6531 union_pw_multi_aff::~union_pw_multi_aff() {
6533 isl_union_pw_multi_aff_free(ptr
);
6536 __isl_give isl_union_pw_multi_aff
*union_pw_multi_aff::copy() const & {
6537 return isl_union_pw_multi_aff_copy(ptr
);
6540 __isl_keep isl_union_pw_multi_aff
*union_pw_multi_aff::get() const {
6544 __isl_give isl_union_pw_multi_aff
*union_pw_multi_aff::release() {
6545 isl_union_pw_multi_aff
*tmp
= ptr
;
6550 bool union_pw_multi_aff::is_null() const {
6551 return ptr
== nullptr;
6554 ctx
union_pw_multi_aff::get_ctx() const {
6555 return ctx(isl_union_pw_multi_aff_get_ctx(ptr
));
6558 union_pw_multi_aff
union_pw_multi_aff::add(union_pw_multi_aff upma2
) const
6560 if (!ptr
|| upma2
.is_null())
6561 exception::throw_NULL_input(__FILE__
, __LINE__
);
6562 auto ctx
= get_ctx();
6563 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6564 auto res
= isl_union_pw_multi_aff_add(copy(), upma2
.release());
6566 exception::throw_last_error(ctx
);
6570 union_pw_multi_aff
union_pw_multi_aff::flat_range_product(union_pw_multi_aff upma2
) const
6572 if (!ptr
|| upma2
.is_null())
6573 exception::throw_NULL_input(__FILE__
, __LINE__
);
6574 auto ctx
= get_ctx();
6575 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6576 auto res
= isl_union_pw_multi_aff_flat_range_product(copy(), upma2
.release());
6578 exception::throw_last_error(ctx
);
6582 union_pw_multi_aff
union_pw_multi_aff::pullback(union_pw_multi_aff upma2
) const
6584 if (!ptr
|| upma2
.is_null())
6585 exception::throw_NULL_input(__FILE__
, __LINE__
);
6586 auto ctx
= get_ctx();
6587 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6588 auto res
= isl_union_pw_multi_aff_pullback_union_pw_multi_aff(copy(), upma2
.release());
6590 exception::throw_last_error(ctx
);
6594 union_pw_multi_aff
union_pw_multi_aff::union_add(union_pw_multi_aff upma2
) const
6596 if (!ptr
|| upma2
.is_null())
6597 exception::throw_NULL_input(__FILE__
, __LINE__
);
6598 auto ctx
= get_ctx();
6599 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6600 auto res
= isl_union_pw_multi_aff_union_add(copy(), upma2
.release());
6602 exception::throw_last_error(ctx
);
6606 // implementations for isl::union_set
6607 union_set
manage(__isl_take isl_union_set
*ptr
) {
6609 exception::throw_NULL_input(__FILE__
, __LINE__
);
6610 return union_set(ptr
);
6612 union_set
manage_copy(__isl_keep isl_union_set
*ptr
) {
6614 exception::throw_NULL_input(__FILE__
, __LINE__
);
6615 auto ctx
= isl_union_set_get_ctx(ptr
);
6616 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6617 ptr
= isl_union_set_copy(ptr
);
6619 exception::throw_last_error(ctx
);
6620 return union_set(ptr
);
6623 union_set::union_set()
6626 union_set::union_set(const union_set
&obj
)
6630 exception::throw_NULL_input(__FILE__
, __LINE__
);
6631 auto ctx
= isl_union_set_get_ctx(obj
.ptr
);
6632 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6635 exception::throw_last_error(ctx
);
6638 union_set::union_set(__isl_take isl_union_set
*ptr
)
6641 union_set::union_set(basic_set bset
)
6644 exception::throw_NULL_input(__FILE__
, __LINE__
);
6645 auto ctx
= bset
.get_ctx();
6646 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6647 auto res
= isl_union_set_from_basic_set(bset
.release());
6649 exception::throw_last_error(ctx
);
6652 union_set::union_set(set set
)
6655 exception::throw_NULL_input(__FILE__
, __LINE__
);
6656 auto ctx
= set
.get_ctx();
6657 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6658 auto res
= isl_union_set_from_set(set
.release());
6660 exception::throw_last_error(ctx
);
6663 union_set::union_set(point pnt
)
6666 exception::throw_NULL_input(__FILE__
, __LINE__
);
6667 auto ctx
= pnt
.get_ctx();
6668 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6669 auto res
= isl_union_set_from_point(pnt
.release());
6671 exception::throw_last_error(ctx
);
6674 union_set::union_set(ctx ctx
, const std::string
&str
)
6676 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6677 auto res
= isl_union_set_read_from_str(ctx
.release(), str
.c_str());
6679 exception::throw_last_error(ctx
);
6683 union_set
&union_set::operator=(union_set obj
) {
6684 std::swap(this->ptr
, obj
.ptr
);
6688 union_set::~union_set() {
6690 isl_union_set_free(ptr
);
6693 __isl_give isl_union_set
*union_set::copy() const & {
6694 return isl_union_set_copy(ptr
);
6697 __isl_keep isl_union_set
*union_set::get() const {
6701 __isl_give isl_union_set
*union_set::release() {
6702 isl_union_set
*tmp
= ptr
;
6707 bool union_set::is_null() const {
6708 return ptr
== nullptr;
6711 ctx
union_set::get_ctx() const {
6712 return ctx(isl_union_set_get_ctx(ptr
));
6715 union_set
union_set::affine_hull() const
6718 exception::throw_NULL_input(__FILE__
, __LINE__
);
6719 auto ctx
= get_ctx();
6720 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6721 auto res
= isl_union_set_affine_hull(copy());
6723 exception::throw_last_error(ctx
);
6727 union_set
union_set::apply(union_map umap
) const
6729 if (!ptr
|| umap
.is_null())
6730 exception::throw_NULL_input(__FILE__
, __LINE__
);
6731 auto ctx
= get_ctx();
6732 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6733 auto res
= isl_union_set_apply(copy(), umap
.release());
6735 exception::throw_last_error(ctx
);
6739 union_set
union_set::coalesce() const
6742 exception::throw_NULL_input(__FILE__
, __LINE__
);
6743 auto ctx
= get_ctx();
6744 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6745 auto res
= isl_union_set_coalesce(copy());
6747 exception::throw_last_error(ctx
);
6751 union_set
union_set::compute_divs() const
6754 exception::throw_NULL_input(__FILE__
, __LINE__
);
6755 auto ctx
= get_ctx();
6756 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6757 auto res
= isl_union_set_compute_divs(copy());
6759 exception::throw_last_error(ctx
);
6763 union_set
union_set::detect_equalities() const
6766 exception::throw_NULL_input(__FILE__
, __LINE__
);
6767 auto ctx
= get_ctx();
6768 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6769 auto res
= isl_union_set_detect_equalities(copy());
6771 exception::throw_last_error(ctx
);
6775 void union_set::foreach_point(const std::function
<void(point
)> &fn
) const
6778 exception::throw_NULL_input(__FILE__
, __LINE__
);
6779 auto ctx
= get_ctx();
6780 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6782 const std::function
<void(point
)> *func
;
6783 std::exception_ptr eptr
;
6784 } fn_data
= { &fn
};
6785 auto fn_lambda
= [](isl_point
*arg_0
, void *arg_1
) -> isl_stat
{
6786 auto *data
= static_cast<struct fn_data
*>(arg_1
);
6788 (*data
->func
)(manage(arg_0
));
6790 } ISL_CPP_CATCH_ALL
{
6791 data
->eptr
= std::current_exception();
6792 return isl_stat_error
;
6795 auto res
= isl_union_set_foreach_point(get(), fn_lambda
, &fn_data
);
6797 std::rethrow_exception(fn_data
.eptr
);
6799 exception::throw_last_error(ctx
);
6803 void union_set::foreach_set(const std::function
<void(set
)> &fn
) const
6806 exception::throw_NULL_input(__FILE__
, __LINE__
);
6807 auto ctx
= get_ctx();
6808 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6810 const std::function
<void(set
)> *func
;
6811 std::exception_ptr eptr
;
6812 } fn_data
= { &fn
};
6813 auto fn_lambda
= [](isl_set
*arg_0
, void *arg_1
) -> isl_stat
{
6814 auto *data
= static_cast<struct fn_data
*>(arg_1
);
6816 (*data
->func
)(manage(arg_0
));
6818 } ISL_CPP_CATCH_ALL
{
6819 data
->eptr
= std::current_exception();
6820 return isl_stat_error
;
6823 auto res
= isl_union_set_foreach_set(get(), fn_lambda
, &fn_data
);
6825 std::rethrow_exception(fn_data
.eptr
);
6827 exception::throw_last_error(ctx
);
6831 union_set
union_set::gist(union_set context
) const
6833 if (!ptr
|| context
.is_null())
6834 exception::throw_NULL_input(__FILE__
, __LINE__
);
6835 auto ctx
= get_ctx();
6836 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6837 auto res
= isl_union_set_gist(copy(), context
.release());
6839 exception::throw_last_error(ctx
);
6843 union_set
union_set::gist_params(set set
) const
6845 if (!ptr
|| set
.is_null())
6846 exception::throw_NULL_input(__FILE__
, __LINE__
);
6847 auto ctx
= get_ctx();
6848 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6849 auto res
= isl_union_set_gist_params(copy(), set
.release());
6851 exception::throw_last_error(ctx
);
6855 union_map
union_set::identity() const
6858 exception::throw_NULL_input(__FILE__
, __LINE__
);
6859 auto ctx
= get_ctx();
6860 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6861 auto res
= isl_union_set_identity(copy());
6863 exception::throw_last_error(ctx
);
6867 union_set
union_set::intersect(union_set uset2
) const
6869 if (!ptr
|| uset2
.is_null())
6870 exception::throw_NULL_input(__FILE__
, __LINE__
);
6871 auto ctx
= get_ctx();
6872 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6873 auto res
= isl_union_set_intersect(copy(), uset2
.release());
6875 exception::throw_last_error(ctx
);
6879 union_set
union_set::intersect_params(set set
) const
6881 if (!ptr
|| set
.is_null())
6882 exception::throw_NULL_input(__FILE__
, __LINE__
);
6883 auto ctx
= get_ctx();
6884 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6885 auto res
= isl_union_set_intersect_params(copy(), set
.release());
6887 exception::throw_last_error(ctx
);
6891 bool union_set::is_empty() const
6894 exception::throw_NULL_input(__FILE__
, __LINE__
);
6895 auto ctx
= get_ctx();
6896 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6897 auto res
= isl_union_set_is_empty(get());
6899 exception::throw_last_error(ctx
);
6903 bool union_set::is_equal(const union_set
&uset2
) const
6905 if (!ptr
|| uset2
.is_null())
6906 exception::throw_NULL_input(__FILE__
, __LINE__
);
6907 auto ctx
= get_ctx();
6908 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6909 auto res
= isl_union_set_is_equal(get(), uset2
.get());
6911 exception::throw_last_error(ctx
);
6915 bool union_set::is_strict_subset(const union_set
&uset2
) const
6917 if (!ptr
|| uset2
.is_null())
6918 exception::throw_NULL_input(__FILE__
, __LINE__
);
6919 auto ctx
= get_ctx();
6920 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6921 auto res
= isl_union_set_is_strict_subset(get(), uset2
.get());
6923 exception::throw_last_error(ctx
);
6927 bool union_set::is_subset(const union_set
&uset2
) const
6929 if (!ptr
|| uset2
.is_null())
6930 exception::throw_NULL_input(__FILE__
, __LINE__
);
6931 auto ctx
= get_ctx();
6932 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6933 auto res
= isl_union_set_is_subset(get(), uset2
.get());
6935 exception::throw_last_error(ctx
);
6939 union_set
union_set::lexmax() const
6942 exception::throw_NULL_input(__FILE__
, __LINE__
);
6943 auto ctx
= get_ctx();
6944 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6945 auto res
= isl_union_set_lexmax(copy());
6947 exception::throw_last_error(ctx
);
6951 union_set
union_set::lexmin() const
6954 exception::throw_NULL_input(__FILE__
, __LINE__
);
6955 auto ctx
= get_ctx();
6956 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6957 auto res
= isl_union_set_lexmin(copy());
6959 exception::throw_last_error(ctx
);
6963 union_set
union_set::polyhedral_hull() const
6966 exception::throw_NULL_input(__FILE__
, __LINE__
);
6967 auto ctx
= get_ctx();
6968 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6969 auto res
= isl_union_set_polyhedral_hull(copy());
6971 exception::throw_last_error(ctx
);
6975 union_set
union_set::preimage(multi_aff ma
) const
6977 if (!ptr
|| ma
.is_null())
6978 exception::throw_NULL_input(__FILE__
, __LINE__
);
6979 auto ctx
= get_ctx();
6980 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6981 auto res
= isl_union_set_preimage_multi_aff(copy(), ma
.release());
6983 exception::throw_last_error(ctx
);
6987 union_set
union_set::preimage(pw_multi_aff pma
) const
6989 if (!ptr
|| pma
.is_null())
6990 exception::throw_NULL_input(__FILE__
, __LINE__
);
6991 auto ctx
= get_ctx();
6992 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
6993 auto res
= isl_union_set_preimage_pw_multi_aff(copy(), pma
.release());
6995 exception::throw_last_error(ctx
);
6999 union_set
union_set::preimage(union_pw_multi_aff upma
) const
7001 if (!ptr
|| upma
.is_null())
7002 exception::throw_NULL_input(__FILE__
, __LINE__
);
7003 auto ctx
= get_ctx();
7004 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7005 auto res
= isl_union_set_preimage_union_pw_multi_aff(copy(), upma
.release());
7007 exception::throw_last_error(ctx
);
7011 point
union_set::sample_point() const
7014 exception::throw_NULL_input(__FILE__
, __LINE__
);
7015 auto ctx
= get_ctx();
7016 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7017 auto res
= isl_union_set_sample_point(copy());
7019 exception::throw_last_error(ctx
);
7023 union_set
union_set::subtract(union_set uset2
) const
7025 if (!ptr
|| uset2
.is_null())
7026 exception::throw_NULL_input(__FILE__
, __LINE__
);
7027 auto ctx
= get_ctx();
7028 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7029 auto res
= isl_union_set_subtract(copy(), uset2
.release());
7031 exception::throw_last_error(ctx
);
7035 union_set
union_set::unite(union_set uset2
) const
7037 if (!ptr
|| uset2
.is_null())
7038 exception::throw_NULL_input(__FILE__
, __LINE__
);
7039 auto ctx
= get_ctx();
7040 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7041 auto res
= isl_union_set_union(copy(), uset2
.release());
7043 exception::throw_last_error(ctx
);
7047 union_map
union_set::unwrap() const
7050 exception::throw_NULL_input(__FILE__
, __LINE__
);
7051 auto ctx
= get_ctx();
7052 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7053 auto res
= isl_union_set_unwrap(copy());
7055 exception::throw_last_error(ctx
);
7059 // implementations for isl::val
7060 val
manage(__isl_take isl_val
*ptr
) {
7062 exception::throw_NULL_input(__FILE__
, __LINE__
);
7065 val
manage_copy(__isl_keep isl_val
*ptr
) {
7067 exception::throw_NULL_input(__FILE__
, __LINE__
);
7068 auto ctx
= isl_val_get_ctx(ptr
);
7069 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7070 ptr
= isl_val_copy(ptr
);
7072 exception::throw_last_error(ctx
);
7079 val::val(const val
&obj
)
7083 exception::throw_NULL_input(__FILE__
, __LINE__
);
7084 auto ctx
= isl_val_get_ctx(obj
.ptr
);
7085 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7088 exception::throw_last_error(ctx
);
7091 val::val(__isl_take isl_val
*ptr
)
7094 val::val(ctx ctx
, const std::string
&str
)
7096 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7097 auto res
= isl_val_read_from_str(ctx
.release(), str
.c_str());
7099 exception::throw_last_error(ctx
);
7102 val::val(ctx ctx
, long i
)
7104 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7105 auto res
= isl_val_int_from_si(ctx
.release(), i
);
7107 exception::throw_last_error(ctx
);
7111 val
&val::operator=(val obj
) {
7112 std::swap(this->ptr
, obj
.ptr
);
7121 __isl_give isl_val
*val::copy() const & {
7122 return isl_val_copy(ptr
);
7125 __isl_keep isl_val
*val::get() const {
7129 __isl_give isl_val
*val::release() {
7135 bool val::is_null() const {
7136 return ptr
== nullptr;
7139 ctx
val::get_ctx() const {
7140 return ctx(isl_val_get_ctx(ptr
));
7143 val
val::abs() const
7146 exception::throw_NULL_input(__FILE__
, __LINE__
);
7147 auto ctx
= get_ctx();
7148 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7149 auto res
= isl_val_abs(copy());
7151 exception::throw_last_error(ctx
);
7155 bool val::abs_eq(const val
&v2
) const
7157 if (!ptr
|| v2
.is_null())
7158 exception::throw_NULL_input(__FILE__
, __LINE__
);
7159 auto ctx
= get_ctx();
7160 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7161 auto res
= isl_val_abs_eq(get(), v2
.get());
7163 exception::throw_last_error(ctx
);
7167 val
val::add(val v2
) const
7169 if (!ptr
|| v2
.is_null())
7170 exception::throw_NULL_input(__FILE__
, __LINE__
);
7171 auto ctx
= get_ctx();
7172 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7173 auto res
= isl_val_add(copy(), v2
.release());
7175 exception::throw_last_error(ctx
);
7179 val
val::ceil() const
7182 exception::throw_NULL_input(__FILE__
, __LINE__
);
7183 auto ctx
= get_ctx();
7184 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7185 auto res
= isl_val_ceil(copy());
7187 exception::throw_last_error(ctx
);
7191 int val::cmp_si(long i
) const
7194 exception::throw_NULL_input(__FILE__
, __LINE__
);
7195 auto ctx
= get_ctx();
7196 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7197 auto res
= isl_val_cmp_si(get(), i
);
7201 val
val::div(val v2
) const
7203 if (!ptr
|| v2
.is_null())
7204 exception::throw_NULL_input(__FILE__
, __LINE__
);
7205 auto ctx
= get_ctx();
7206 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7207 auto res
= isl_val_div(copy(), v2
.release());
7209 exception::throw_last_error(ctx
);
7213 bool val::eq(const val
&v2
) const
7215 if (!ptr
|| v2
.is_null())
7216 exception::throw_NULL_input(__FILE__
, __LINE__
);
7217 auto ctx
= get_ctx();
7218 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7219 auto res
= isl_val_eq(get(), v2
.get());
7221 exception::throw_last_error(ctx
);
7225 val
val::floor() const
7228 exception::throw_NULL_input(__FILE__
, __LINE__
);
7229 auto ctx
= get_ctx();
7230 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7231 auto res
= isl_val_floor(copy());
7233 exception::throw_last_error(ctx
);
7237 val
val::gcd(val v2
) const
7239 if (!ptr
|| v2
.is_null())
7240 exception::throw_NULL_input(__FILE__
, __LINE__
);
7241 auto ctx
= get_ctx();
7242 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7243 auto res
= isl_val_gcd(copy(), v2
.release());
7245 exception::throw_last_error(ctx
);
7249 bool val::ge(const val
&v2
) const
7251 if (!ptr
|| v2
.is_null())
7252 exception::throw_NULL_input(__FILE__
, __LINE__
);
7253 auto ctx
= get_ctx();
7254 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7255 auto res
= isl_val_ge(get(), v2
.get());
7257 exception::throw_last_error(ctx
);
7261 bool val::gt(const val
&v2
) const
7263 if (!ptr
|| v2
.is_null())
7264 exception::throw_NULL_input(__FILE__
, __LINE__
);
7265 auto ctx
= get_ctx();
7266 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7267 auto res
= isl_val_gt(get(), v2
.get());
7269 exception::throw_last_error(ctx
);
7273 val
val::infty(ctx ctx
)
7275 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7276 auto res
= isl_val_infty(ctx
.release());
7278 exception::throw_last_error(ctx
);
7282 val
val::inv() const
7285 exception::throw_NULL_input(__FILE__
, __LINE__
);
7286 auto ctx
= get_ctx();
7287 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7288 auto res
= isl_val_inv(copy());
7290 exception::throw_last_error(ctx
);
7294 bool val::is_divisible_by(const val
&v2
) const
7296 if (!ptr
|| v2
.is_null())
7297 exception::throw_NULL_input(__FILE__
, __LINE__
);
7298 auto ctx
= get_ctx();
7299 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7300 auto res
= isl_val_is_divisible_by(get(), v2
.get());
7302 exception::throw_last_error(ctx
);
7306 bool val::is_infty() const
7309 exception::throw_NULL_input(__FILE__
, __LINE__
);
7310 auto ctx
= get_ctx();
7311 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7312 auto res
= isl_val_is_infty(get());
7314 exception::throw_last_error(ctx
);
7318 bool val::is_int() const
7321 exception::throw_NULL_input(__FILE__
, __LINE__
);
7322 auto ctx
= get_ctx();
7323 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7324 auto res
= isl_val_is_int(get());
7326 exception::throw_last_error(ctx
);
7330 bool val::is_nan() const
7333 exception::throw_NULL_input(__FILE__
, __LINE__
);
7334 auto ctx
= get_ctx();
7335 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7336 auto res
= isl_val_is_nan(get());
7338 exception::throw_last_error(ctx
);
7342 bool val::is_neg() const
7345 exception::throw_NULL_input(__FILE__
, __LINE__
);
7346 auto ctx
= get_ctx();
7347 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7348 auto res
= isl_val_is_neg(get());
7350 exception::throw_last_error(ctx
);
7354 bool val::is_neginfty() const
7357 exception::throw_NULL_input(__FILE__
, __LINE__
);
7358 auto ctx
= get_ctx();
7359 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7360 auto res
= isl_val_is_neginfty(get());
7362 exception::throw_last_error(ctx
);
7366 bool val::is_negone() const
7369 exception::throw_NULL_input(__FILE__
, __LINE__
);
7370 auto ctx
= get_ctx();
7371 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7372 auto res
= isl_val_is_negone(get());
7374 exception::throw_last_error(ctx
);
7378 bool val::is_nonneg() const
7381 exception::throw_NULL_input(__FILE__
, __LINE__
);
7382 auto ctx
= get_ctx();
7383 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7384 auto res
= isl_val_is_nonneg(get());
7386 exception::throw_last_error(ctx
);
7390 bool val::is_nonpos() const
7393 exception::throw_NULL_input(__FILE__
, __LINE__
);
7394 auto ctx
= get_ctx();
7395 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7396 auto res
= isl_val_is_nonpos(get());
7398 exception::throw_last_error(ctx
);
7402 bool val::is_one() const
7405 exception::throw_NULL_input(__FILE__
, __LINE__
);
7406 auto ctx
= get_ctx();
7407 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7408 auto res
= isl_val_is_one(get());
7410 exception::throw_last_error(ctx
);
7414 bool val::is_pos() const
7417 exception::throw_NULL_input(__FILE__
, __LINE__
);
7418 auto ctx
= get_ctx();
7419 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7420 auto res
= isl_val_is_pos(get());
7422 exception::throw_last_error(ctx
);
7426 bool val::is_rat() const
7429 exception::throw_NULL_input(__FILE__
, __LINE__
);
7430 auto ctx
= get_ctx();
7431 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7432 auto res
= isl_val_is_rat(get());
7434 exception::throw_last_error(ctx
);
7438 bool val::is_zero() const
7441 exception::throw_NULL_input(__FILE__
, __LINE__
);
7442 auto ctx
= get_ctx();
7443 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7444 auto res
= isl_val_is_zero(get());
7446 exception::throw_last_error(ctx
);
7450 bool val::le(const val
&v2
) const
7452 if (!ptr
|| v2
.is_null())
7453 exception::throw_NULL_input(__FILE__
, __LINE__
);
7454 auto ctx
= get_ctx();
7455 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7456 auto res
= isl_val_le(get(), v2
.get());
7458 exception::throw_last_error(ctx
);
7462 bool val::lt(const val
&v2
) const
7464 if (!ptr
|| v2
.is_null())
7465 exception::throw_NULL_input(__FILE__
, __LINE__
);
7466 auto ctx
= get_ctx();
7467 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7468 auto res
= isl_val_lt(get(), v2
.get());
7470 exception::throw_last_error(ctx
);
7474 val
val::max(val v2
) const
7476 if (!ptr
|| v2
.is_null())
7477 exception::throw_NULL_input(__FILE__
, __LINE__
);
7478 auto ctx
= get_ctx();
7479 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7480 auto res
= isl_val_max(copy(), v2
.release());
7482 exception::throw_last_error(ctx
);
7486 val
val::min(val v2
) const
7488 if (!ptr
|| v2
.is_null())
7489 exception::throw_NULL_input(__FILE__
, __LINE__
);
7490 auto ctx
= get_ctx();
7491 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7492 auto res
= isl_val_min(copy(), v2
.release());
7494 exception::throw_last_error(ctx
);
7498 val
val::mod(val v2
) const
7500 if (!ptr
|| v2
.is_null())
7501 exception::throw_NULL_input(__FILE__
, __LINE__
);
7502 auto ctx
= get_ctx();
7503 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7504 auto res
= isl_val_mod(copy(), v2
.release());
7506 exception::throw_last_error(ctx
);
7510 val
val::mul(val v2
) const
7512 if (!ptr
|| v2
.is_null())
7513 exception::throw_NULL_input(__FILE__
, __LINE__
);
7514 auto ctx
= get_ctx();
7515 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7516 auto res
= isl_val_mul(copy(), v2
.release());
7518 exception::throw_last_error(ctx
);
7522 val
val::nan(ctx ctx
)
7524 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7525 auto res
= isl_val_nan(ctx
.release());
7527 exception::throw_last_error(ctx
);
7531 bool val::ne(const val
&v2
) const
7533 if (!ptr
|| v2
.is_null())
7534 exception::throw_NULL_input(__FILE__
, __LINE__
);
7535 auto ctx
= get_ctx();
7536 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7537 auto res
= isl_val_ne(get(), v2
.get());
7539 exception::throw_last_error(ctx
);
7543 val
val::neg() const
7546 exception::throw_NULL_input(__FILE__
, __LINE__
);
7547 auto ctx
= get_ctx();
7548 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7549 auto res
= isl_val_neg(copy());
7551 exception::throw_last_error(ctx
);
7555 val
val::neginfty(ctx ctx
)
7557 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7558 auto res
= isl_val_neginfty(ctx
.release());
7560 exception::throw_last_error(ctx
);
7564 val
val::negone(ctx ctx
)
7566 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7567 auto res
= isl_val_negone(ctx
.release());
7569 exception::throw_last_error(ctx
);
7573 val
val::one(ctx ctx
)
7575 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7576 auto res
= isl_val_one(ctx
.release());
7578 exception::throw_last_error(ctx
);
7582 val
val::pow2() const
7585 exception::throw_NULL_input(__FILE__
, __LINE__
);
7586 auto ctx
= get_ctx();
7587 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7588 auto res
= isl_val_pow2(copy());
7590 exception::throw_last_error(ctx
);
7594 int val::sgn() const
7597 exception::throw_NULL_input(__FILE__
, __LINE__
);
7598 auto ctx
= get_ctx();
7599 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7600 auto res
= isl_val_sgn(get());
7604 val
val::sub(val v2
) const
7606 if (!ptr
|| v2
.is_null())
7607 exception::throw_NULL_input(__FILE__
, __LINE__
);
7608 auto ctx
= get_ctx();
7609 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7610 auto res
= isl_val_sub(copy(), v2
.release());
7612 exception::throw_last_error(ctx
);
7616 val
val::trunc() const
7619 exception::throw_NULL_input(__FILE__
, __LINE__
);
7620 auto ctx
= get_ctx();
7621 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7622 auto res
= isl_val_trunc(copy());
7624 exception::throw_last_error(ctx
);
7628 val
val::zero(ctx ctx
)
7630 options_scoped_set_on_error
saved_on_error(ctx
, exception::on_error
);
7631 auto res
= isl_val_zero(ctx
.release());
7633 exception::throw_last_error(ctx
);
7638 #endif /* ISL_CPP */