From 6668481d55353e0ad856e01c45bc189256526a73 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 6 Aug 2018 15:19:08 +0200 Subject: [PATCH 1/2] Scop::makeScop: only copy dependences if they have been computed The C++ bindings from mainline isl do not allow an object to be explicitly assigned a NULL value. --- tc/core/polyhedral/scop.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tc/core/polyhedral/scop.h b/tc/core/polyhedral/scop.h index 796974d9f..b8d9c7982 100644 --- a/tc/core/polyhedral/scop.h +++ b/tc/core/polyhedral/scop.h @@ -71,7 +71,9 @@ struct Scop { res->parameterValues = scop.parameterValues; res->halide = scop.halide; res->body = scop.body; - res->dependences = scop.dependences; + if (scop.dependences) { + res->dependences = scop.dependences; + } res->scheduleTreeUPtr = detail::ScheduleTree::makeScheduleTree(*scop.scheduleTreeUPtr); res->treeSyncUpdateMap = scop.treeSyncUpdateMap; From 5281e66e321255eb3161187eefd1809be139dabd Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 6 Aug 2018 14:33:00 +0200 Subject: [PATCH 2/2] bump isl for merge of C++ bindings --- isl_interface/CMakeLists.txt | 1 + isl_interface/include/isl/cpp.h | 14348 +++++++++++++++--------------- third-party/islpp | 2 +- 3 files changed, 7251 insertions(+), 7100 deletions(-) diff --git a/isl_interface/CMakeLists.txt b/isl_interface/CMakeLists.txt index e51621299..6ddb04b75 100644 --- a/isl_interface/CMakeLists.txt +++ b/isl_interface/CMakeLists.txt @@ -76,6 +76,7 @@ execute_process(COMMAND include_directories(.) add_executable(extract_isl_interface ${ISL_INTERFACE_DIR}/cpp.cc + ${ISL_INTERFACE_DIR}/cpp_conversion.cc ${ISL_INTERFACE_DIR}/extract_interface.cc ${ISL_INTERFACE_DIR}/generator.cc ${ISL_INTERFACE_DIR}/python.cc diff --git a/isl_interface/include/isl/cpp.h b/isl_interface/include/isl/cpp.h index 0a77dcf19..a08305047 100644 --- a/isl_interface/include/isl/cpp.h +++ b/isl_interface/include/isl/cpp.h @@ -32,6 +32,20 @@ #include #include +/* ISL_USE_EXCEPTIONS should be defined to 1 if exceptions are available. + * gcc and clang define __cpp_exceptions; MSVC and xlC define _CPPUNWIND. + * Older versions of gcc (e.g., 4.9) only define __EXCEPTIONS. + * If exceptions are not available, any error condition will result + * in an abort. + */ +#ifndef ISL_USE_EXCEPTIONS +#if defined(__cpp_exceptions) || defined(_CPPUNWIND) || defined(__EXCEPTIONS) +#define ISL_USE_EXCEPTIONS 1 +#else +#define ISL_USE_EXCEPTIONS 0 +#endif +#endif + namespace isl { class ctx { @@ -48,6 +62,20 @@ class ctx { } }; +/* Macros hiding try/catch. + * If exceptions are not available, then no exceptions will be thrown and + * there is nothing to catch. + */ +#if ISL_USE_EXCEPTIONS +#define ISL_CPP_TRY try +#define ISL_CPP_CATCH_ALL catch (...) +#else +#define ISL_CPP_TRY if (1) +#define ISL_CPP_CATCH_ALL if (0) +#endif + +#if ISL_USE_EXCEPTIONS + /* Class capturing isl errors. * * The what() return value is stored in a reference counted string @@ -67,10 +95,29 @@ class exception : public std::exception { } static inline exception create(enum isl_error error, const char *msg, const char *file, int line); - static inline exception create_from_last_error(isl::ctx ctx); + static inline exception create_from_last_error(ctx ctx); virtual const char *what() const noexcept { return what_str->c_str(); } + + /* Default behavior on error conditions that occur inside isl calls + * performed from inside the bindings. + * In the case exceptions are available, isl should continue + * without printing a warning since the warning message + * will be included in the exception thrown from inside the bindings. + */ + static constexpr auto on_error = ISL_ON_ERROR_CONTINUE; + /* Wrapper for throwing an exception with the given message. + */ + static void throw_invalid(const char *msg, const char *file, int line) { + throw create(isl_error_invalid, msg, file, line); + } + /* Wrapper for throwing an exception corresponding to the last + * error on "ctx". + */ + static void throw_last_error(ctx ctx) { + throw create_from_last_error(ctx); + } }; /* Create an exception of a type described by "what_arg", with @@ -153,7 +200,7 @@ exception exception::create(enum isl_error error, const char *msg, return exception_unsupported(msg, file, line); } - throw exception_invalid("invalid error type", __FILE__, __LINE__); + throw exception_invalid("invalid error type", file, line); } /* Create an exception from the last error that occurred on "ctx" and @@ -162,7 +209,7 @@ exception exception::create(enum isl_error error, const char *msg, * If "ctx" is NULL or if it is not in an error state at the start, * then an invalid argument exception is thrown. */ -exception exception::create_from_last_error(isl::ctx ctx) +exception exception::create_from_last_error(ctx ctx) { enum isl_error error; const char *msg, *file; @@ -177,6 +224,37 @@ exception exception::create_from_last_error(isl::ctx ctx) return create(error, msg, file, line); } +#else + +#include +#include + +class exception { +public: + /* Default behavior on error conditions that occur inside isl calls + * performed from inside the bindings. + * In the case exceptions are not available, isl should abort. + */ + static constexpr auto on_error = ISL_ON_ERROR_ABORT; + /* Wrapper for throwing an exception with the given message. + * In the case exceptions are not available, print an error and abort. + */ + static void throw_invalid(const char *msg, const char *file, int line) { + fprintf(stderr, "%s:%d: %s\n", file, line, msg); + abort(); + } + /* Wrapper for throwing an exception corresponding to the last + * error on "ctx". + * isl should already abort when an error condition occurs, + * so this function should never be called. + */ + static void throw_last_error(ctx ctx) { + abort(); + } +}; + +#endif + /* Helper class for setting the on_error and resetting the option * to the original value when leaving the scope. */ @@ -184,7 +262,7 @@ class options_scoped_set_on_error { isl_ctx *ctx; int saved_on_error; public: - options_scoped_set_on_error(isl::ctx ctx, int on_error) { + options_scoped_set_on_error(class ctx ctx, int on_error) { this->ctx = ctx.get(); saved_on_error = isl_options_get_on_error(this->ctx); isl_options_set_on_error(this->ctx, on_error); @@ -288,12 +366,12 @@ class val; class val_list; // declarations for isl::aff -inline isl::aff manage(__isl_take isl_aff *ptr); -inline isl::aff manage_copy(__isl_keep isl_aff *ptr); +inline aff manage(__isl_take isl_aff *ptr); +inline aff manage_copy(__isl_keep isl_aff *ptr); class aff { - friend inline isl::aff manage(__isl_take isl_aff *ptr); - friend inline isl::aff manage_copy(__isl_keep isl_aff *ptr); + friend inline aff manage(__isl_take isl_aff *ptr); + friend inline aff manage_copy(__isl_keep isl_aff *ptr); protected: isl_aff *ptr = nullptr; @@ -302,11 +380,11 @@ class aff { public: inline /* implicit */ aff(); - inline /* implicit */ aff(const isl::aff &obj); - inline explicit aff(isl::local_space ls); - inline explicit aff(isl::local_space ls, isl::val val); - inline explicit aff(isl::ctx ctx, const std::string &str); - inline isl::aff &operator=(isl::aff obj); + inline /* implicit */ aff(const aff &obj); + inline explicit aff(local_space ls); + inline explicit aff(local_space ls, val val); + inline explicit aff(ctx ctx, const std::string &str); + inline aff &operator=(aff obj); inline ~aff(); inline __isl_give isl_aff *copy() const &; inline __isl_give isl_aff *copy() && = delete; @@ -314,52 +392,52 @@ class aff { inline __isl_give isl_aff *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::aff add(isl::aff aff2) const; - inline isl::aff add_constant(isl::val v) const; - inline isl::aff add_constant_si(int v) const; - inline isl::aff ceil() const; - inline isl::aff div(isl::aff aff2) const; - inline isl::set eq_set(isl::aff aff2) const; - inline isl::val eval(isl::point pnt) const; - inline isl::aff floor() const; - inline isl::set ge_set(isl::aff aff2) const; - inline isl::val get_constant_val() const; - inline isl::val get_denominator_val() const; - inline isl::aff get_div(int pos) const; - inline isl::local_space get_local_space() const; - inline isl::space get_space() const; - inline isl::set gt_set(isl::aff aff2) const; - inline isl::set le_set(isl::aff aff2) const; - inline isl::set lt_set(isl::aff aff2) const; - inline isl::aff mod(isl::val mod) const; - inline isl::aff mul(isl::aff aff2) const; - inline isl::set ne_set(isl::aff aff2) const; - inline isl::aff neg() const; - static inline isl::aff param_on_domain_space(isl::space space, isl::id id); - inline bool plain_is_equal(const isl::aff &aff2) const; - inline isl::aff project_domain_on_params() const; - inline isl::aff pullback(isl::multi_aff ma) const; - inline isl::aff scale(isl::val v) const; - inline isl::aff scale_down(isl::val v) const; - inline isl::aff scale_down_ui(unsigned int f) const; - inline isl::aff set_constant_si(int v) const; - inline isl::aff set_constant_val(isl::val v) const; - inline isl::aff sub(isl::aff aff2) const; - inline isl::aff unbind_params_insert_domain(isl::multi_id domain) const; - static inline isl::aff zero_on_domain(isl::space space); + inline aff add(aff aff2) const; + inline aff add_constant(val v) const; + inline aff add_constant_si(int v) const; + inline aff ceil() const; + inline aff div(aff aff2) const; + inline set eq_set(aff aff2) const; + inline val eval(point pnt) const; + inline aff floor() const; + inline set ge_set(aff aff2) const; + inline val get_constant_val() const; + inline val get_denominator_val() const; + inline aff get_div(int pos) const; + inline local_space get_local_space() const; + inline space get_space() const; + inline set gt_set(aff aff2) const; + inline set le_set(aff aff2) const; + inline set lt_set(aff aff2) const; + inline aff mod(val mod) const; + inline aff mul(aff aff2) const; + inline set ne_set(aff aff2) const; + inline aff neg() const; + static inline aff param_on_domain_space(space space, id id); + inline bool plain_is_equal(const aff &aff2) const; + inline aff project_domain_on_params() const; + inline aff pullback(multi_aff ma) const; + inline aff scale(val v) const; + inline aff scale_down(val v) const; + inline aff scale_down_ui(unsigned int f) const; + inline aff set_constant_si(int v) const; + inline aff set_constant_val(val v) const; + inline aff sub(aff aff2) const; + inline aff unbind_params_insert_domain(multi_id domain) const; + static inline aff zero_on_domain(space space); typedef isl_aff* isl_ptr_t; }; // declarations for isl::aff_list -inline isl::aff_list manage(__isl_take isl_aff_list *ptr); -inline isl::aff_list manage_copy(__isl_keep isl_aff_list *ptr); +inline aff_list manage(__isl_take isl_aff_list *ptr); +inline aff_list manage_copy(__isl_keep isl_aff_list *ptr); class aff_list { - friend inline isl::aff_list manage(__isl_take isl_aff_list *ptr); - friend inline isl::aff_list manage_copy(__isl_keep isl_aff_list *ptr); + friend inline aff_list manage(__isl_take isl_aff_list *ptr); + friend inline aff_list manage_copy(__isl_keep isl_aff_list *ptr); protected: isl_aff_list *ptr = nullptr; @@ -368,10 +446,10 @@ class aff_list { public: inline /* implicit */ aff_list(); - inline /* implicit */ aff_list(const isl::aff_list &obj); - inline explicit aff_list(isl::aff el); - inline explicit aff_list(isl::ctx ctx, int n); - inline isl::aff_list &operator=(isl::aff_list obj); + inline /* implicit */ aff_list(const aff_list &obj); + inline explicit aff_list(aff el); + inline explicit aff_list(ctx ctx, int n); + inline aff_list &operator=(aff_list obj); inline ~aff_list(); inline __isl_give isl_aff_list *copy() const &; inline __isl_give isl_aff_list *copy() && = delete; @@ -379,25 +457,25 @@ class aff_list { inline __isl_give isl_aff_list *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::aff_list add(isl::aff el) const; - inline isl::aff_list concat(isl::aff_list list2) const; - inline isl::aff_list drop(unsigned int first, unsigned int n) const; - inline void foreach(const std::function &fn) const; - inline isl::aff get_at(int index) const; - inline isl::aff_list reverse() const; + inline ctx get_ctx() const; + + inline aff_list add(aff el) const; + inline aff_list concat(aff_list list2) const; + inline aff_list drop(unsigned int first, unsigned int n) const; + inline void foreach(const std::function &fn) const; + inline aff get_at(int index) const; + inline aff_list reverse() const; inline int size() const; typedef isl_aff_list* isl_ptr_t; }; // declarations for isl::ast_build -inline isl::ast_build manage(__isl_take isl_ast_build *ptr); -inline isl::ast_build manage_copy(__isl_keep isl_ast_build *ptr); +inline ast_build manage(__isl_take isl_ast_build *ptr); +inline ast_build manage_copy(__isl_keep isl_ast_build *ptr); class ast_build { - friend inline isl::ast_build manage(__isl_take isl_ast_build *ptr); - friend inline isl::ast_build manage_copy(__isl_keep isl_ast_build *ptr); + friend inline ast_build manage(__isl_take isl_ast_build *ptr); + friend inline ast_build manage_copy(__isl_keep isl_ast_build *ptr); protected: isl_ast_build *ptr = nullptr; @@ -406,9 +484,9 @@ class ast_build { public: inline /* implicit */ ast_build(); - inline /* implicit */ ast_build(const isl::ast_build &obj); - inline explicit ast_build(isl::ctx ctx); - inline isl::ast_build &operator=(isl::ast_build obj); + inline /* implicit */ ast_build(const ast_build &obj); + inline explicit ast_build(ctx ctx); + inline ast_build &operator=(ast_build obj); inline ~ast_build(); inline __isl_give isl_ast_build *copy() const &; inline __isl_give isl_ast_build *copy() && = delete; @@ -416,42 +494,42 @@ class ast_build { inline __isl_give isl_ast_build *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; private: - inline isl::ast_build ©_callbacks(const isl::ast_build &obj); + inline ast_build ©_callbacks(const ast_build &obj); struct at_each_domain_data { - std::function func; + std::function func; std::exception_ptr eptr; }; std::shared_ptr at_each_domain_data; static inline isl_ast_node *at_each_domain(isl_ast_node *arg_0, isl_ast_build *arg_1, void *arg_2); - inline void set_at_each_domain_data(const std::function &fn); + inline void set_at_each_domain_data(const std::function &fn); public: - inline isl::ast_build set_at_each_domain(const std::function &fn) const; - inline isl::ast_expr access_from(isl::pw_multi_aff pma) const; - inline isl::ast_expr access_from(isl::multi_pw_aff mpa) const; - inline isl::ast_node ast_from_schedule(isl::union_map schedule) const; - inline isl::ast_expr call_from(isl::pw_multi_aff pma) const; - inline isl::ast_expr call_from(isl::multi_pw_aff mpa) const; - inline isl::ast_expr expr_from(isl::set set) const; - inline isl::ast_expr expr_from(isl::pw_aff pa) const; - static inline isl::ast_build from_context(isl::set set); - inline isl::union_map get_schedule() const; - inline isl::space get_schedule_space() const; - inline isl::ast_node node_from(isl::schedule schedule) const; - inline isl::ast_node node_from_schedule_map(isl::union_map schedule) const; - inline isl::ast_build set_iterators(isl::id_list iterators) const; + inline ast_build set_at_each_domain(const std::function &fn) const; + inline ast_expr access_from(pw_multi_aff pma) const; + inline ast_expr access_from(multi_pw_aff mpa) const; + inline ast_node ast_from_schedule(union_map schedule) const; + inline ast_expr call_from(pw_multi_aff pma) const; + inline ast_expr call_from(multi_pw_aff mpa) const; + inline ast_expr expr_from(set set) const; + inline ast_expr expr_from(pw_aff pa) const; + static inline ast_build from_context(set set); + inline union_map get_schedule() const; + inline space get_schedule_space() const; + inline ast_node node_from(schedule schedule) const; + inline ast_node node_from_schedule_map(union_map schedule) const; + inline ast_build set_iterators(id_list iterators) const; typedef isl_ast_build* isl_ptr_t; }; // declarations for isl::ast_expr -inline isl::ast_expr manage(__isl_take isl_ast_expr *ptr); -inline isl::ast_expr manage_copy(__isl_keep isl_ast_expr *ptr); +inline ast_expr manage(__isl_take isl_ast_expr *ptr); +inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr); class ast_expr { - friend inline isl::ast_expr manage(__isl_take isl_ast_expr *ptr); - friend inline isl::ast_expr manage_copy(__isl_keep isl_ast_expr *ptr); + friend inline ast_expr manage(__isl_take isl_ast_expr *ptr); + friend inline ast_expr manage_copy(__isl_keep isl_ast_expr *ptr); protected: isl_ast_expr *ptr = nullptr; @@ -460,8 +538,8 @@ class ast_expr { public: inline /* implicit */ ast_expr(); - inline /* implicit */ ast_expr(const isl::ast_expr &obj); - inline isl::ast_expr &operator=(isl::ast_expr obj); + inline /* implicit */ ast_expr(const ast_expr &obj); + inline ast_expr &operator=(ast_expr obj); inline ~ast_expr(); inline __isl_give isl_ast_expr *copy() const &; inline __isl_give isl_ast_expr *copy() && = delete; @@ -471,11 +549,11 @@ class ast_expr { inline explicit operator bool() const; template inline bool isa(); template inline T as(); - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline bool is_equal(const isl::ast_expr &expr2) const; - inline isl::ast_expr set_op_arg(int pos, isl::ast_expr arg) const; + inline bool is_equal(const ast_expr &expr2) const; + inline ast_expr set_op_arg(int pos, ast_expr arg) const; inline std::string to_C_str() const; typedef isl_ast_expr* isl_ptr_t; }; @@ -492,12 +570,12 @@ class ast_expr_id : public ast_expr { public: inline /* implicit */ ast_expr_id(); - inline /* implicit */ ast_expr_id(const isl::ast_expr_id &obj); - inline isl::ast_expr_id &operator=(isl::ast_expr_id obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_expr_id(const ast_expr_id &obj); + inline ast_expr_id &operator=(ast_expr_id obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::id get_id() const; + inline id get_id() const; typedef isl_ast_expr* isl_ptr_t; }; @@ -513,12 +591,12 @@ class ast_expr_int : public ast_expr { public: inline /* implicit */ ast_expr_int(); - inline /* implicit */ ast_expr_int(const isl::ast_expr_int &obj); - inline isl::ast_expr_int &operator=(isl::ast_expr_int obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_expr_int(const ast_expr_int &obj); + inline ast_expr_int &operator=(ast_expr_int obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::val get_val() const; + inline val get_val() const; typedef isl_ast_expr* isl_ptr_t; }; @@ -534,25 +612,25 @@ class ast_expr_op : public ast_expr { public: inline /* implicit */ ast_expr_op(); - inline /* implicit */ ast_expr_op(const isl::ast_expr_op &obj); - inline isl::ast_expr_op &operator=(isl::ast_expr_op obj); + inline /* implicit */ ast_expr_op(const ast_expr_op &obj); + inline ast_expr_op &operator=(ast_expr_op obj); template inline bool isa(); template inline T as(); - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::ast_expr get_arg(int pos) const; + inline ast_expr get_arg(int pos) const; inline int get_n_arg() const; typedef isl_ast_expr* isl_ptr_t; }; // declarations for isl::ast_node -inline isl::ast_node manage(__isl_take isl_ast_node *ptr); -inline isl::ast_node manage_copy(__isl_keep isl_ast_node *ptr); +inline ast_node manage(__isl_take isl_ast_node *ptr); +inline ast_node manage_copy(__isl_keep isl_ast_node *ptr); class ast_node { - friend inline isl::ast_node manage(__isl_take isl_ast_node *ptr); - friend inline isl::ast_node manage_copy(__isl_keep isl_ast_node *ptr); + friend inline ast_node manage(__isl_take isl_ast_node *ptr); + friend inline ast_node manage_copy(__isl_keep isl_ast_node *ptr); protected: isl_ast_node *ptr = nullptr; @@ -561,8 +639,8 @@ class ast_node { public: inline /* implicit */ ast_node(); - inline /* implicit */ ast_node(const isl::ast_node &obj); - inline isl::ast_node &operator=(isl::ast_node obj); + inline /* implicit */ ast_node(const ast_node &obj); + inline ast_node &operator=(ast_node obj); inline ~ast_node(); inline __isl_give isl_ast_node *copy() const &; inline __isl_give isl_ast_node *copy() && = delete; @@ -572,11 +650,11 @@ class ast_node { inline explicit operator bool() const; template inline bool isa(); template inline T as(); - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::id get_annotation() const; - inline isl::ast_node set_annotation(isl::id annotation) const; + inline id get_annotation() const; + inline ast_node set_annotation(id annotation) const; inline std::string to_C_str() const; typedef isl_ast_node* isl_ptr_t; }; @@ -593,12 +671,12 @@ class ast_node_block : public ast_node { public: inline /* implicit */ ast_node_block(); - inline /* implicit */ ast_node_block(const isl::ast_node_block &obj); - inline isl::ast_node_block &operator=(isl::ast_node_block obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_node_block(const ast_node_block &obj); + inline ast_node_block &operator=(ast_node_block obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::ast_node_list get_children() const; + inline ast_node_list get_children() const; typedef isl_ast_node* isl_ptr_t; }; @@ -614,16 +692,16 @@ class ast_node_for : public ast_node { public: inline /* implicit */ ast_node_for(); - inline /* implicit */ ast_node_for(const isl::ast_node_for &obj); - inline isl::ast_node_for &operator=(isl::ast_node_for obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_node_for(const ast_node_for &obj); + inline ast_node_for &operator=(ast_node_for obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::ast_node get_body() const; - inline isl::ast_expr get_cond() const; - inline isl::ast_expr get_inc() const; - inline isl::ast_expr get_init() const; - inline isl::ast_expr get_iterator() const; + inline ast_node get_body() const; + inline ast_expr get_cond() const; + inline ast_expr get_inc() const; + inline ast_expr get_init() const; + inline ast_expr get_iterator() const; inline bool is_coincident() const; inline bool is_degenerate() const; typedef isl_ast_node* isl_ptr_t; @@ -641,25 +719,25 @@ class ast_node_if : public ast_node { public: inline /* implicit */ ast_node_if(); - inline /* implicit */ ast_node_if(const isl::ast_node_if &obj); - inline isl::ast_node_if &operator=(isl::ast_node_if obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_node_if(const ast_node_if &obj); + inline ast_node_if &operator=(ast_node_if obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::ast_expr get_cond() const; - inline isl::ast_node get_else() const; - inline isl::ast_node get_then() const; + inline ast_expr get_cond() const; + inline ast_node get_else() const; + inline ast_node get_then() const; inline bool has_else() const; typedef isl_ast_node* isl_ptr_t; }; // declarations for isl::ast_node_list -inline isl::ast_node_list manage(__isl_take isl_ast_node_list *ptr); -inline isl::ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr); +inline ast_node_list manage(__isl_take isl_ast_node_list *ptr); +inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr); class ast_node_list { - friend inline isl::ast_node_list manage(__isl_take isl_ast_node_list *ptr); - friend inline isl::ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr); + friend inline ast_node_list manage(__isl_take isl_ast_node_list *ptr); + friend inline ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr); protected: isl_ast_node_list *ptr = nullptr; @@ -668,10 +746,10 @@ class ast_node_list { public: inline /* implicit */ ast_node_list(); - inline /* implicit */ ast_node_list(const isl::ast_node_list &obj); - inline explicit ast_node_list(isl::ast_node el); - inline explicit ast_node_list(isl::ctx ctx, int n); - inline isl::ast_node_list &operator=(isl::ast_node_list obj); + inline /* implicit */ ast_node_list(const ast_node_list &obj); + inline explicit ast_node_list(ast_node el); + inline explicit ast_node_list(ctx ctx, int n); + inline ast_node_list &operator=(ast_node_list obj); inline ~ast_node_list(); inline __isl_give isl_ast_node_list *copy() const &; inline __isl_give isl_ast_node_list *copy() && = delete; @@ -679,14 +757,14 @@ class ast_node_list { inline __isl_give isl_ast_node_list *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::ast_node_list add(isl::ast_node el) const; - inline isl::ast_node_list concat(isl::ast_node_list list2) const; - inline isl::ast_node_list drop(unsigned int first, unsigned int n) const; - inline void foreach(const std::function &fn) const; - inline isl::ast_node get_at(int index) const; - inline isl::ast_node_list reverse() const; + inline ctx get_ctx() const; + + inline ast_node_list add(ast_node el) const; + inline ast_node_list concat(ast_node_list list2) const; + inline ast_node_list drop(unsigned int first, unsigned int n) const; + inline void foreach(const std::function &fn) const; + inline ast_node get_at(int index) const; + inline ast_node_list reverse() const; inline int size() const; typedef isl_ast_node_list* isl_ptr_t; }; @@ -703,13 +781,13 @@ class ast_node_mark : public ast_node { public: inline /* implicit */ ast_node_mark(); - inline /* implicit */ ast_node_mark(const isl::ast_node_mark &obj); - inline isl::ast_node_mark &operator=(isl::ast_node_mark obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_node_mark(const ast_node_mark &obj); + inline ast_node_mark &operator=(ast_node_mark obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::id get_id() const; - inline isl::ast_node get_node() const; + inline id get_id() const; + inline ast_node get_node() const; typedef isl_ast_node* isl_ptr_t; }; @@ -725,12 +803,12 @@ class ast_node_user : public ast_node { public: inline /* implicit */ ast_node_user(); - inline /* implicit */ ast_node_user(const isl::ast_node_user &obj); - inline isl::ast_node_user &operator=(isl::ast_node_user obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_node_user(const ast_node_user &obj); + inline ast_node_user &operator=(ast_node_user obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::ast_expr get_expr() const; + inline ast_expr get_expr() const; typedef isl_ast_node* isl_ptr_t; }; @@ -746,9 +824,9 @@ class ast_op_access : public ast_expr_op { public: inline /* implicit */ ast_op_access(); - inline /* implicit */ ast_op_access(const isl::ast_op_access &obj); - inline isl::ast_op_access &operator=(isl::ast_op_access obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_access(const ast_op_access &obj); + inline ast_op_access &operator=(ast_op_access obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -766,9 +844,9 @@ class ast_op_add : public ast_expr_op { public: inline /* implicit */ ast_op_add(); - inline /* implicit */ ast_op_add(const isl::ast_op_add &obj); - inline isl::ast_op_add &operator=(isl::ast_op_add obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_add(const ast_op_add &obj); + inline ast_op_add &operator=(ast_op_add obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -786,9 +864,9 @@ class ast_op_address_of : public ast_expr_op { public: inline /* implicit */ ast_op_address_of(); - inline /* implicit */ ast_op_address_of(const isl::ast_op_address_of &obj); - inline isl::ast_op_address_of &operator=(isl::ast_op_address_of obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_address_of(const ast_op_address_of &obj); + inline ast_op_address_of &operator=(ast_op_address_of obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -806,9 +884,9 @@ class ast_op_and : public ast_expr_op { public: inline /* implicit */ ast_op_and(); - inline /* implicit */ ast_op_and(const isl::ast_op_and &obj); - inline isl::ast_op_and &operator=(isl::ast_op_and obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_and(const ast_op_and &obj); + inline ast_op_and &operator=(ast_op_and obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -826,9 +904,9 @@ class ast_op_and_then : public ast_expr_op { public: inline /* implicit */ ast_op_and_then(); - inline /* implicit */ ast_op_and_then(const isl::ast_op_and_then &obj); - inline isl::ast_op_and_then &operator=(isl::ast_op_and_then obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_and_then(const ast_op_and_then &obj); + inline ast_op_and_then &operator=(ast_op_and_then obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -846,9 +924,9 @@ class ast_op_call : public ast_expr_op { public: inline /* implicit */ ast_op_call(); - inline /* implicit */ ast_op_call(const isl::ast_op_call &obj); - inline isl::ast_op_call &operator=(isl::ast_op_call obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_call(const ast_op_call &obj); + inline ast_op_call &operator=(ast_op_call obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -866,9 +944,9 @@ class ast_op_cond : public ast_expr_op { public: inline /* implicit */ ast_op_cond(); - inline /* implicit */ ast_op_cond(const isl::ast_op_cond &obj); - inline isl::ast_op_cond &operator=(isl::ast_op_cond obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_cond(const ast_op_cond &obj); + inline ast_op_cond &operator=(ast_op_cond obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -886,9 +964,9 @@ class ast_op_div : public ast_expr_op { public: inline /* implicit */ ast_op_div(); - inline /* implicit */ ast_op_div(const isl::ast_op_div &obj); - inline isl::ast_op_div &operator=(isl::ast_op_div obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_div(const ast_op_div &obj); + inline ast_op_div &operator=(ast_op_div obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -906,9 +984,9 @@ class ast_op_eq : public ast_expr_op { public: inline /* implicit */ ast_op_eq(); - inline /* implicit */ ast_op_eq(const isl::ast_op_eq &obj); - inline isl::ast_op_eq &operator=(isl::ast_op_eq obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_eq(const ast_op_eq &obj); + inline ast_op_eq &operator=(ast_op_eq obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -926,9 +1004,9 @@ class ast_op_fdiv_q : public ast_expr_op { public: inline /* implicit */ ast_op_fdiv_q(); - inline /* implicit */ ast_op_fdiv_q(const isl::ast_op_fdiv_q &obj); - inline isl::ast_op_fdiv_q &operator=(isl::ast_op_fdiv_q obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_fdiv_q(const ast_op_fdiv_q &obj); + inline ast_op_fdiv_q &operator=(ast_op_fdiv_q obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -946,9 +1024,9 @@ class ast_op_ge : public ast_expr_op { public: inline /* implicit */ ast_op_ge(); - inline /* implicit */ ast_op_ge(const isl::ast_op_ge &obj); - inline isl::ast_op_ge &operator=(isl::ast_op_ge obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_ge(const ast_op_ge &obj); + inline ast_op_ge &operator=(ast_op_ge obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -966,9 +1044,9 @@ class ast_op_gt : public ast_expr_op { public: inline /* implicit */ ast_op_gt(); - inline /* implicit */ ast_op_gt(const isl::ast_op_gt &obj); - inline isl::ast_op_gt &operator=(isl::ast_op_gt obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_gt(const ast_op_gt &obj); + inline ast_op_gt &operator=(ast_op_gt obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -986,9 +1064,9 @@ class ast_op_le : public ast_expr_op { public: inline /* implicit */ ast_op_le(); - inline /* implicit */ ast_op_le(const isl::ast_op_le &obj); - inline isl::ast_op_le &operator=(isl::ast_op_le obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_le(const ast_op_le &obj); + inline ast_op_le &operator=(ast_op_le obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1006,9 +1084,9 @@ class ast_op_lt : public ast_expr_op { public: inline /* implicit */ ast_op_lt(); - inline /* implicit */ ast_op_lt(const isl::ast_op_lt &obj); - inline isl::ast_op_lt &operator=(isl::ast_op_lt obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_lt(const ast_op_lt &obj); + inline ast_op_lt &operator=(ast_op_lt obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1026,9 +1104,9 @@ class ast_op_max : public ast_expr_op { public: inline /* implicit */ ast_op_max(); - inline /* implicit */ ast_op_max(const isl::ast_op_max &obj); - inline isl::ast_op_max &operator=(isl::ast_op_max obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_max(const ast_op_max &obj); + inline ast_op_max &operator=(ast_op_max obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1046,9 +1124,9 @@ class ast_op_member : public ast_expr_op { public: inline /* implicit */ ast_op_member(); - inline /* implicit */ ast_op_member(const isl::ast_op_member &obj); - inline isl::ast_op_member &operator=(isl::ast_op_member obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_member(const ast_op_member &obj); + inline ast_op_member &operator=(ast_op_member obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1066,9 +1144,9 @@ class ast_op_min : public ast_expr_op { public: inline /* implicit */ ast_op_min(); - inline /* implicit */ ast_op_min(const isl::ast_op_min &obj); - inline isl::ast_op_min &operator=(isl::ast_op_min obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_min(const ast_op_min &obj); + inline ast_op_min &operator=(ast_op_min obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1086,9 +1164,9 @@ class ast_op_minus : public ast_expr_op { public: inline /* implicit */ ast_op_minus(); - inline /* implicit */ ast_op_minus(const isl::ast_op_minus &obj); - inline isl::ast_op_minus &operator=(isl::ast_op_minus obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_minus(const ast_op_minus &obj); + inline ast_op_minus &operator=(ast_op_minus obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1106,9 +1184,9 @@ class ast_op_mul : public ast_expr_op { public: inline /* implicit */ ast_op_mul(); - inline /* implicit */ ast_op_mul(const isl::ast_op_mul &obj); - inline isl::ast_op_mul &operator=(isl::ast_op_mul obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_mul(const ast_op_mul &obj); + inline ast_op_mul &operator=(ast_op_mul obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1126,9 +1204,9 @@ class ast_op_or : public ast_expr_op { public: inline /* implicit */ ast_op_or(); - inline /* implicit */ ast_op_or(const isl::ast_op_or &obj); - inline isl::ast_op_or &operator=(isl::ast_op_or obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_or(const ast_op_or &obj); + inline ast_op_or &operator=(ast_op_or obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1146,9 +1224,9 @@ class ast_op_or_else : public ast_expr_op { public: inline /* implicit */ ast_op_or_else(); - inline /* implicit */ ast_op_or_else(const isl::ast_op_or_else &obj); - inline isl::ast_op_or_else &operator=(isl::ast_op_or_else obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_or_else(const ast_op_or_else &obj); + inline ast_op_or_else &operator=(ast_op_or_else obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1166,9 +1244,9 @@ class ast_op_pdiv_q : public ast_expr_op { public: inline /* implicit */ ast_op_pdiv_q(); - inline /* implicit */ ast_op_pdiv_q(const isl::ast_op_pdiv_q &obj); - inline isl::ast_op_pdiv_q &operator=(isl::ast_op_pdiv_q obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_pdiv_q(const ast_op_pdiv_q &obj); + inline ast_op_pdiv_q &operator=(ast_op_pdiv_q obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1186,9 +1264,9 @@ class ast_op_pdiv_r : public ast_expr_op { public: inline /* implicit */ ast_op_pdiv_r(); - inline /* implicit */ ast_op_pdiv_r(const isl::ast_op_pdiv_r &obj); - inline isl::ast_op_pdiv_r &operator=(isl::ast_op_pdiv_r obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_pdiv_r(const ast_op_pdiv_r &obj); + inline ast_op_pdiv_r &operator=(ast_op_pdiv_r obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1206,9 +1284,9 @@ class ast_op_select : public ast_expr_op { public: inline /* implicit */ ast_op_select(); - inline /* implicit */ ast_op_select(const isl::ast_op_select &obj); - inline isl::ast_op_select &operator=(isl::ast_op_select obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_select(const ast_op_select &obj); + inline ast_op_select &operator=(ast_op_select obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1226,9 +1304,9 @@ class ast_op_sub : public ast_expr_op { public: inline /* implicit */ ast_op_sub(); - inline /* implicit */ ast_op_sub(const isl::ast_op_sub &obj); - inline isl::ast_op_sub &operator=(isl::ast_op_sub obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_sub(const ast_op_sub &obj); + inline ast_op_sub &operator=(ast_op_sub obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; @@ -1246,21 +1324,21 @@ class ast_op_zdiv_r : public ast_expr_op { public: inline /* implicit */ ast_op_zdiv_r(); - inline /* implicit */ ast_op_zdiv_r(const isl::ast_op_zdiv_r &obj); - inline isl::ast_op_zdiv_r &operator=(isl::ast_op_zdiv_r obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ ast_op_zdiv_r(const ast_op_zdiv_r &obj); + inline ast_op_zdiv_r &operator=(ast_op_zdiv_r obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_ast_expr* isl_ptr_t; }; // declarations for isl::basic_map -inline isl::basic_map manage(__isl_take isl_basic_map *ptr); -inline isl::basic_map manage_copy(__isl_keep isl_basic_map *ptr); +inline basic_map manage(__isl_take isl_basic_map *ptr); +inline basic_map manage_copy(__isl_keep isl_basic_map *ptr); class basic_map { - friend inline isl::basic_map manage(__isl_take isl_basic_map *ptr); - friend inline isl::basic_map manage_copy(__isl_keep isl_basic_map *ptr); + friend inline basic_map manage(__isl_take isl_basic_map *ptr); + friend inline basic_map manage_copy(__isl_keep isl_basic_map *ptr); protected: isl_basic_map *ptr = nullptr; @@ -1269,12 +1347,12 @@ class basic_map { public: inline /* implicit */ basic_map(); - inline /* implicit */ basic_map(const isl::basic_map &obj); - inline explicit basic_map(isl::ctx ctx, const std::string &str); - inline explicit basic_map(isl::basic_set domain, isl::basic_set range); - inline explicit basic_map(isl::aff aff); - inline explicit basic_map(isl::multi_aff maff); - inline isl::basic_map &operator=(isl::basic_map obj); + inline /* implicit */ basic_map(const basic_map &obj); + inline explicit basic_map(ctx ctx, const std::string &str); + inline explicit basic_map(basic_set domain, basic_set range); + inline explicit basic_map(aff aff); + inline explicit basic_map(multi_aff maff); + inline basic_map &operator=(basic_map obj); inline ~basic_map(); inline __isl_give isl_basic_map *copy() const &; inline __isl_give isl_basic_map *copy() && = delete; @@ -1282,49 +1360,49 @@ class basic_map { inline __isl_give isl_basic_map *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::basic_map affine_hull() const; - inline isl::basic_map apply_domain(isl::basic_map bmap2) const; - inline isl::basic_map apply_range(isl::basic_map bmap2) const; + inline basic_map affine_hull() const; + inline basic_map apply_domain(basic_map bmap2) const; + inline basic_map apply_range(basic_map bmap2) const; inline bool can_curry() const; inline bool can_uncurry() const; - inline isl::basic_map curry() const; - inline isl::basic_set deltas() const; - inline isl::basic_map detect_equalities() const; - inline isl::basic_set domain() const; - static inline isl::basic_map empty(isl::space space); - inline isl::basic_map flatten() const; - inline isl::basic_map flatten_domain() const; - inline isl::basic_map flatten_range() const; - static inline isl::basic_map from_domain(isl::basic_set bset); - static inline isl::basic_map from_range(isl::basic_set bset); - inline isl::space get_space() const; - inline isl::basic_map gist(isl::basic_map context) const; - inline isl::basic_map intersect(isl::basic_map bmap2) const; - inline isl::basic_map intersect_domain(isl::basic_set bset) const; - inline isl::basic_map intersect_range(isl::basic_set bset) const; + inline basic_map curry() const; + inline basic_set deltas() const; + inline basic_map detect_equalities() const; + inline basic_set domain() const; + static inline basic_map empty(space space); + inline basic_map flatten() const; + inline basic_map flatten_domain() const; + inline basic_map flatten_range() const; + static inline basic_map from_domain(basic_set bset); + static inline basic_map from_range(basic_set bset); + inline space get_space() const; + inline basic_map gist(basic_map context) const; + inline basic_map intersect(basic_map bmap2) const; + inline basic_map intersect_domain(basic_set bset) const; + inline basic_map intersect_range(basic_set bset) const; inline bool is_empty() const; - inline bool is_equal(const isl::basic_map &bmap2) const; - inline bool is_subset(const isl::basic_map &bmap2) const; - inline isl::map lexmax() const; - inline isl::map lexmin() const; - inline isl::basic_map reverse() const; - inline isl::basic_map sample() const; - inline isl::basic_map uncurry() const; - inline isl::map unite(isl::basic_map bmap2) const; - inline isl::basic_set wrap() const; + inline bool is_equal(const basic_map &bmap2) const; + inline bool is_subset(const basic_map &bmap2) const; + inline map lexmax() const; + inline map lexmin() const; + inline basic_map reverse() const; + inline basic_map sample() const; + inline basic_map uncurry() const; + inline map unite(basic_map bmap2) const; + inline basic_set wrap() const; typedef isl_basic_map* isl_ptr_t; }; // declarations for isl::basic_map_list -inline isl::basic_map_list manage(__isl_take isl_basic_map_list *ptr); -inline isl::basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr); +inline basic_map_list manage(__isl_take isl_basic_map_list *ptr); +inline basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr); class basic_map_list { - friend inline isl::basic_map_list manage(__isl_take isl_basic_map_list *ptr); - friend inline isl::basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr); + friend inline basic_map_list manage(__isl_take isl_basic_map_list *ptr); + friend inline basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr); protected: isl_basic_map_list *ptr = nullptr; @@ -1333,10 +1411,10 @@ class basic_map_list { public: inline /* implicit */ basic_map_list(); - inline /* implicit */ basic_map_list(const isl::basic_map_list &obj); - inline explicit basic_map_list(isl::basic_map el); - inline explicit basic_map_list(isl::ctx ctx, int n); - inline isl::basic_map_list &operator=(isl::basic_map_list obj); + inline /* implicit */ basic_map_list(const basic_map_list &obj); + inline explicit basic_map_list(basic_map el); + inline explicit basic_map_list(ctx ctx, int n); + inline basic_map_list &operator=(basic_map_list obj); inline ~basic_map_list(); inline __isl_give isl_basic_map_list *copy() const &; inline __isl_give isl_basic_map_list *copy() && = delete; @@ -1344,26 +1422,26 @@ class basic_map_list { inline __isl_give isl_basic_map_list *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::basic_map_list add(isl::basic_map el) const; - inline isl::basic_map_list concat(isl::basic_map_list list2) const; - inline isl::basic_map_list drop(unsigned int first, unsigned int n) const; - inline void foreach(const std::function &fn) const; - inline isl::basic_map get_at(int index) const; - inline isl::basic_map intersect() const; - inline isl::basic_map_list reverse() const; + inline ctx get_ctx() const; + + inline basic_map_list add(basic_map el) const; + inline basic_map_list concat(basic_map_list list2) const; + inline basic_map_list drop(unsigned int first, unsigned int n) const; + inline void foreach(const std::function &fn) const; + inline basic_map get_at(int index) const; + inline basic_map intersect() const; + inline basic_map_list reverse() const; inline int size() const; typedef isl_basic_map_list* isl_ptr_t; }; // declarations for isl::basic_set -inline isl::basic_set manage(__isl_take isl_basic_set *ptr); -inline isl::basic_set manage_copy(__isl_keep isl_basic_set *ptr); +inline basic_set manage(__isl_take isl_basic_set *ptr); +inline basic_set manage_copy(__isl_keep isl_basic_set *ptr); class basic_set { - friend inline isl::basic_set manage(__isl_take isl_basic_set *ptr); - friend inline isl::basic_set manage_copy(__isl_keep isl_basic_set *ptr); + friend inline basic_set manage(__isl_take isl_basic_set *ptr); + friend inline basic_set manage_copy(__isl_keep isl_basic_set *ptr); protected: isl_basic_set *ptr = nullptr; @@ -1372,10 +1450,10 @@ class basic_set { public: inline /* implicit */ basic_set(); - inline /* implicit */ basic_set(const isl::basic_set &obj); - inline /* implicit */ basic_set(isl::point pnt); - inline explicit basic_set(isl::ctx ctx, const std::string &str); - inline isl::basic_set &operator=(isl::basic_set obj); + inline /* implicit */ basic_set(const basic_set &obj); + inline /* implicit */ basic_set(point pnt); + inline explicit basic_set(ctx ctx, const std::string &str); + inline basic_set &operator=(basic_set obj); inline ~basic_set(); inline __isl_give isl_basic_set *copy() const &; inline __isl_give isl_basic_set *copy() && = delete; @@ -1383,49 +1461,49 @@ class basic_set { inline __isl_give isl_basic_set *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::basic_set affine_hull() const; - inline isl::basic_set apply(isl::basic_map bmap) const; - inline isl::set compute_divs() const; - inline isl::basic_set detect_equalities() const; - inline isl::val dim_max_val(int pos) const; - inline isl::basic_set flatten() const; - inline isl::basic_set from_params() const; - inline isl::space get_space() const; - inline isl::basic_set gist(isl::basic_set context) const; - inline isl::basic_set intersect(isl::basic_set bset2) const; - inline isl::basic_set intersect_params(isl::basic_set bset2) const; + inline basic_set affine_hull() const; + inline basic_set apply(basic_map bmap) const; + inline set compute_divs() const; + inline basic_set detect_equalities() const; + inline val dim_max_val(int pos) const; + inline basic_set flatten() const; + inline basic_set from_params() const; + inline space get_space() const; + inline basic_set gist(basic_set context) const; + inline basic_set intersect(basic_set bset2) const; + inline basic_set intersect_params(basic_set bset2) const; inline bool is_empty() const; - inline bool is_equal(const isl::basic_set &bset2) const; - inline bool is_subset(const isl::basic_set &bset2) const; + inline bool is_equal(const basic_set &bset2) const; + inline bool is_subset(const basic_set &bset2) const; inline bool is_universe() const; inline bool is_wrapping() const; - inline isl::set lexmax() const; - inline isl::set lexmin() const; - inline isl::val max_val(const isl::aff &obj) const; + inline set lexmax() const; + inline set lexmin() const; + inline val max_val(const aff &obj) const; inline unsigned int n_dim() const; inline unsigned int n_param() const; - static inline isl::basic_set nat_universe(isl::space dim); - inline isl::basic_set params() const; + static inline basic_set nat_universe(space dim); + inline basic_set params() const; inline bool plain_is_universe() const; - inline isl::basic_set sample() const; - inline isl::point sample_point() const; - inline isl::basic_set set_tuple_id(isl::id id) const; - inline isl::set unite(isl::basic_set bset2) const; - static inline isl::basic_set universe(isl::space space); - inline isl::basic_map unwrap() const; + inline basic_set sample() const; + inline point sample_point() const; + inline basic_set set_tuple_id(id id) const; + inline set unite(basic_set bset2) const; + static inline basic_set universe(space space); + inline basic_map unwrap() const; typedef isl_basic_set* isl_ptr_t; }; // declarations for isl::basic_set_list -inline isl::basic_set_list manage(__isl_take isl_basic_set_list *ptr); -inline isl::basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr); +inline basic_set_list manage(__isl_take isl_basic_set_list *ptr); +inline basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr); class basic_set_list { - friend inline isl::basic_set_list manage(__isl_take isl_basic_set_list *ptr); - friend inline isl::basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr); + friend inline basic_set_list manage(__isl_take isl_basic_set_list *ptr); + friend inline basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr); protected: isl_basic_set_list *ptr = nullptr; @@ -1434,10 +1512,10 @@ class basic_set_list { public: inline /* implicit */ basic_set_list(); - inline /* implicit */ basic_set_list(const isl::basic_set_list &obj); - inline explicit basic_set_list(isl::basic_set el); - inline explicit basic_set_list(isl::ctx ctx, int n); - inline isl::basic_set_list &operator=(isl::basic_set_list obj); + inline /* implicit */ basic_set_list(const basic_set_list &obj); + inline explicit basic_set_list(basic_set el); + inline explicit basic_set_list(ctx ctx, int n); + inline basic_set_list &operator=(basic_set_list obj); inline ~basic_set_list(); inline __isl_give isl_basic_set_list *copy() const &; inline __isl_give isl_basic_set_list *copy() && = delete; @@ -1445,25 +1523,25 @@ class basic_set_list { inline __isl_give isl_basic_set_list *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::basic_set_list add(isl::basic_set el) const; - inline isl::basic_set_list concat(isl::basic_set_list list2) const; - inline isl::basic_set_list drop(unsigned int first, unsigned int n) const; - inline void foreach(const std::function &fn) const; - inline isl::basic_set get_at(int index) const; - inline isl::basic_set_list reverse() const; + inline ctx get_ctx() const; + + inline basic_set_list add(basic_set el) const; + inline basic_set_list concat(basic_set_list list2) const; + inline basic_set_list drop(unsigned int first, unsigned int n) const; + inline void foreach(const std::function &fn) const; + inline basic_set get_at(int index) const; + inline basic_set_list reverse() const; inline int size() const; typedef isl_basic_set_list* isl_ptr_t; }; // declarations for isl::fixed_box -inline isl::fixed_box manage(__isl_take isl_fixed_box *ptr); -inline isl::fixed_box manage_copy(__isl_keep isl_fixed_box *ptr); +inline fixed_box manage(__isl_take isl_fixed_box *ptr); +inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr); class fixed_box { - friend inline isl::fixed_box manage(__isl_take isl_fixed_box *ptr); - friend inline isl::fixed_box manage_copy(__isl_keep isl_fixed_box *ptr); + friend inline fixed_box manage(__isl_take isl_fixed_box *ptr); + friend inline fixed_box manage_copy(__isl_keep isl_fixed_box *ptr); protected: isl_fixed_box *ptr = nullptr; @@ -1472,8 +1550,8 @@ class fixed_box { public: inline /* implicit */ fixed_box(); - inline /* implicit */ fixed_box(const isl::fixed_box &obj); - inline isl::fixed_box &operator=(isl::fixed_box obj); + inline /* implicit */ fixed_box(const fixed_box &obj); + inline fixed_box &operator=(fixed_box obj); inline ~fixed_box(); inline __isl_give isl_fixed_box *copy() const &; inline __isl_give isl_fixed_box *copy() && = delete; @@ -1481,22 +1559,22 @@ class fixed_box { inline __isl_give isl_fixed_box *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; - inline isl::multi_aff get_offset() const; - inline isl::multi_val get_size() const; - inline isl::space get_space() const; + inline multi_aff get_offset() const; + inline multi_val get_size() const; + inline space get_space() const; inline bool is_valid() const; typedef isl_fixed_box* isl_ptr_t; }; // declarations for isl::id -inline isl::id manage(__isl_take isl_id *ptr); -inline isl::id manage_copy(__isl_keep isl_id *ptr); +inline id manage(__isl_take isl_id *ptr); +inline id manage_copy(__isl_keep isl_id *ptr); class id { - friend inline isl::id manage(__isl_take isl_id *ptr); - friend inline isl::id manage_copy(__isl_keep isl_id *ptr); + friend inline id manage(__isl_take isl_id *ptr); + friend inline id manage_copy(__isl_keep isl_id *ptr); protected: isl_id *ptr = nullptr; @@ -1505,9 +1583,9 @@ class id { public: inline /* implicit */ id(); - inline /* implicit */ id(const isl::id &obj); - inline explicit id(isl::ctx ctx, const std::string &str); - inline isl::id &operator=(isl::id obj); + inline /* implicit */ id(const id &obj); + inline explicit id(ctx ctx, const std::string &str); + inline id &operator=(id obj); inline ~id(); inline __isl_give isl_id *copy() const &; inline __isl_give isl_id *copy() && = delete; @@ -1515,7 +1593,7 @@ class id { inline __isl_give isl_id *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; inline std::string get_name() const; @@ -1523,12 +1601,12 @@ class id { }; // declarations for isl::id_list -inline isl::id_list manage(__isl_take isl_id_list *ptr); -inline isl::id_list manage_copy(__isl_keep isl_id_list *ptr); +inline id_list manage(__isl_take isl_id_list *ptr); +inline id_list manage_copy(__isl_keep isl_id_list *ptr); class id_list { - friend inline isl::id_list manage(__isl_take isl_id_list *ptr); - friend inline isl::id_list manage_copy(__isl_keep isl_id_list *ptr); + friend inline id_list manage(__isl_take isl_id_list *ptr); + friend inline id_list manage_copy(__isl_keep isl_id_list *ptr); protected: isl_id_list *ptr = nullptr; @@ -1537,10 +1615,10 @@ class id_list { public: inline /* implicit */ id_list(); - inline /* implicit */ id_list(const isl::id_list &obj); - inline explicit id_list(isl::id el); - inline explicit id_list(isl::ctx ctx, int n); - inline isl::id_list &operator=(isl::id_list obj); + inline /* implicit */ id_list(const id_list &obj); + inline explicit id_list(id el); + inline explicit id_list(ctx ctx, int n); + inline id_list &operator=(id_list obj); inline ~id_list(); inline __isl_give isl_id_list *copy() const &; inline __isl_give isl_id_list *copy() && = delete; @@ -1548,25 +1626,25 @@ class id_list { inline __isl_give isl_id_list *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::id_list add(isl::id el) const; - inline isl::id_list concat(isl::id_list list2) const; - inline isl::id_list drop(unsigned int first, unsigned int n) const; - inline void foreach(const std::function &fn) const; - inline isl::id get_at(int index) const; - inline isl::id_list reverse() const; + inline ctx get_ctx() const; + + inline id_list add(id el) const; + inline id_list concat(id_list list2) const; + inline id_list drop(unsigned int first, unsigned int n) const; + inline void foreach(const std::function &fn) const; + inline id get_at(int index) const; + inline id_list reverse() const; inline int size() const; typedef isl_id_list* isl_ptr_t; }; // declarations for isl::local_space -inline isl::local_space manage(__isl_take isl_local_space *ptr); -inline isl::local_space manage_copy(__isl_keep isl_local_space *ptr); +inline local_space manage(__isl_take isl_local_space *ptr); +inline local_space manage_copy(__isl_keep isl_local_space *ptr); class local_space { - friend inline isl::local_space manage(__isl_take isl_local_space *ptr); - friend inline isl::local_space manage_copy(__isl_keep isl_local_space *ptr); + friend inline local_space manage(__isl_take isl_local_space *ptr); + friend inline local_space manage_copy(__isl_keep isl_local_space *ptr); protected: isl_local_space *ptr = nullptr; @@ -1575,9 +1653,9 @@ class local_space { public: inline /* implicit */ local_space(); - inline /* implicit */ local_space(const isl::local_space &obj); - inline explicit local_space(isl::space dim); - inline isl::local_space &operator=(isl::local_space obj); + inline /* implicit */ local_space(const local_space &obj); + inline explicit local_space(space dim); + inline local_space &operator=(local_space obj); inline ~local_space(); inline __isl_give isl_local_space *copy() const &; inline __isl_give isl_local_space *copy() && = delete; @@ -1585,31 +1663,31 @@ class local_space { inline __isl_give isl_local_space *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::local_space domain() const; - inline isl::local_space flatten_domain() const; - inline isl::local_space flatten_range() const; - inline isl::local_space from_domain() const; - inline isl::aff get_div(int pos) const; - inline isl::space get_space() const; - inline isl::local_space intersect(isl::local_space ls2) const; - inline bool is_equal(const isl::local_space &ls2) const; + inline ctx get_ctx() const; + + inline local_space domain() const; + inline local_space flatten_domain() const; + inline local_space flatten_range() const; + inline local_space from_domain() const; + inline aff get_div(int pos) const; + inline space get_space() const; + inline local_space intersect(local_space ls2) const; + inline bool is_equal(const local_space &ls2) const; inline bool is_params() const; inline bool is_set() const; - inline isl::basic_map lifting() const; - inline isl::local_space range() const; - inline isl::local_space wrap() const; + inline basic_map lifting() const; + inline local_space range() const; + inline local_space wrap() const; typedef isl_local_space* isl_ptr_t; }; // declarations for isl::map -inline isl::map manage(__isl_take isl_map *ptr); -inline isl::map manage_copy(__isl_keep isl_map *ptr); +inline map manage(__isl_take isl_map *ptr); +inline map manage_copy(__isl_keep isl_map *ptr); class map { - friend inline isl::map manage(__isl_take isl_map *ptr); - friend inline isl::map manage_copy(__isl_keep isl_map *ptr); + friend inline map manage(__isl_take isl_map *ptr); + friend inline map manage_copy(__isl_keep isl_map *ptr); protected: isl_map *ptr = nullptr; @@ -1618,13 +1696,13 @@ class map { public: inline /* implicit */ map(); - inline /* implicit */ map(const isl::map &obj); - inline explicit map(isl::ctx ctx, const std::string &str); - inline /* implicit */ map(isl::basic_map bmap); - inline explicit map(isl::set domain, isl::set range); - inline explicit map(isl::aff aff); - inline explicit map(isl::multi_aff maff); - inline isl::map &operator=(isl::map obj); + inline /* implicit */ map(const map &obj); + inline explicit map(ctx ctx, const std::string &str); + inline /* implicit */ map(basic_map bmap); + inline explicit map(set domain, set range); + inline explicit map(aff aff); + inline explicit map(multi_aff maff); + inline map &operator=(map obj); inline ~map(); inline __isl_give isl_map *copy() const &; inline __isl_give isl_map *copy() && = delete; @@ -1632,89 +1710,90 @@ class map { inline __isl_give isl_map *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::basic_map affine_hull() const; - inline isl::map apply_domain(isl::map map2) const; - inline isl::map apply_range(isl::map map2) const; + inline basic_map affine_hull() const; + inline map apply_domain(map map2) const; + inline map apply_range(map map2) const; inline bool can_curry() const; inline bool can_range_curry() const; inline bool can_uncurry() const; - inline isl::map coalesce() const; - inline isl::map complement() const; - inline isl::map compute_divs() const; - inline isl::map curry() const; - inline isl::set deltas() const; - inline isl::map detect_equalities() const; - inline isl::set domain() const; - inline isl::map domain_factor_domain() const; - inline isl::map domain_factor_range() const; - inline isl::map domain_map() const; - inline isl::map domain_product(isl::map map2) const; - static inline isl::map empty(isl::space space); - inline isl::map flatten() const; - inline isl::map flatten_domain() const; - inline isl::map flatten_range() const; - inline void foreach_basic_map(const std::function &fn) const; - static inline isl::map from(isl::pw_multi_aff pma); - static inline isl::map from(isl::union_map umap); - static inline isl::map from_domain(isl::set set); - static inline isl::map from_range(isl::set set); - inline isl::basic_map_list get_basic_map_list() const; - inline isl::fixed_box get_range_simple_fixed_box_hull() const; - inline isl::stride_info get_range_stride_info(int pos) const; - inline isl::id get_range_tuple_id() const; - inline isl::space get_space() const; - inline isl::map gist(isl::map context) const; - inline isl::map gist_domain(isl::set context) const; - static inline isl::map identity(isl::space dim); - inline isl::map intersect(isl::map map2) const; - inline isl::map intersect_domain(isl::set set) const; - inline isl::map intersect_params(isl::set params) const; - inline isl::map intersect_range(isl::set set) const; + inline map coalesce() const; + inline map complement() const; + inline map compute_divs() const; + inline map curry() const; + inline set deltas() const; + inline map detect_equalities() const; + inline set domain() const; + inline map domain_factor_domain() const; + inline map domain_factor_range() const; + inline map domain_map() const; + inline map domain_product(map map2) const; + static inline map empty(space space); + inline map flatten() const; + inline map flatten_domain() const; + inline map flatten_range() const; + inline void foreach_basic_map(const std::function &fn) const; + static inline map from(pw_multi_aff pma); + static inline map from(union_map umap); + static inline map from_domain(set set); + static inline map from_range(set set); + inline basic_map_list get_basic_map_list() const; + inline fixed_box get_range_simple_fixed_box_hull() const; + inline stride_info get_range_stride_info(int pos) const; + inline id get_range_tuple_id() const; + inline space get_space() const; + inline map gist(map context) const; + inline map gist_domain(set context) const; + static inline map identity(space dim); + inline map intersect(map map2) const; + inline map intersect_domain(set set) const; + inline map intersect_params(set params) const; + inline map intersect_range(set set) const; inline bool is_bijective() const; - inline bool is_disjoint(const isl::map &map2) const; + inline bool is_disjoint(const map &map2) const; inline bool is_empty() const; - inline bool is_equal(const isl::map &map2) const; + inline bool is_equal(const map &map2) const; inline bool is_injective() const; inline bool is_single_valued() const; - inline bool is_strict_subset(const isl::map &map2) const; - inline bool is_subset(const isl::map &map2) const; - inline isl::map lexmax() const; - inline isl::map lexmin() const; + inline bool is_strict_subset(const map &map2) const; + inline bool is_subset(const map &map2) const; + inline map lexmax() const; + inline map lexmin() const; inline int n_basic_map() const; - inline isl::set params() const; - inline isl::basic_map polyhedral_hull() const; - inline isl::map preimage_domain(isl::multi_aff ma) const; - inline isl::map preimage_range(isl::multi_aff ma) const; - inline isl::set range() const; - inline isl::map range_curry() const; - inline isl::map range_factor_domain() const; - inline isl::map range_factor_range() const; - inline isl::map range_map() const; - inline isl::map range_product(isl::map map2) const; - inline isl::map reverse() const; - inline isl::basic_map sample() const; - inline isl::map set_range_tuple_id(isl::id id) const; - inline isl::basic_map simple_hull() const; - inline isl::map subtract(isl::map map2) const; - inline isl::map sum(isl::map map2) const; - inline isl::map uncurry() const; - inline isl::map unite(isl::map map2) const; - static inline isl::map universe(isl::space space); - inline isl::basic_map unshifted_simple_hull() const; - inline isl::set wrap() const; + inline set params() const; + inline basic_map polyhedral_hull() const; + inline map preimage_domain(multi_aff ma) const; + inline map preimage_range(multi_aff ma) const; + inline set range() const; + inline map range_curry() const; + inline map range_factor_domain() const; + inline map range_factor_range() const; + inline map range_map() const; + inline map range_product(map map2) const; + inline map reverse() const; + inline basic_map sample() const; + inline map set_range_tuple_id(id id) const; + inline basic_map simple_hull() const; + inline map subtract(map map2) const; + inline map sum(map map2) const; + inline map uncurry() const; + inline map unite(map map2) const; + static inline map universe(space space); + inline basic_map unshifted_simple_hull() const; + inline set wrap() const; + inline map zip() const; typedef isl_map* isl_ptr_t; }; // declarations for isl::map_list -inline isl::map_list manage(__isl_take isl_map_list *ptr); -inline isl::map_list manage_copy(__isl_keep isl_map_list *ptr); +inline map_list manage(__isl_take isl_map_list *ptr); +inline map_list manage_copy(__isl_keep isl_map_list *ptr); class map_list { - friend inline isl::map_list manage(__isl_take isl_map_list *ptr); - friend inline isl::map_list manage_copy(__isl_keep isl_map_list *ptr); + friend inline map_list manage(__isl_take isl_map_list *ptr); + friend inline map_list manage_copy(__isl_keep isl_map_list *ptr); protected: isl_map_list *ptr = nullptr; @@ -1723,10 +1802,10 @@ class map_list { public: inline /* implicit */ map_list(); - inline /* implicit */ map_list(const isl::map_list &obj); - inline explicit map_list(isl::map el); - inline explicit map_list(isl::ctx ctx, int n); - inline isl::map_list &operator=(isl::map_list obj); + inline /* implicit */ map_list(const map_list &obj); + inline explicit map_list(map el); + inline explicit map_list(ctx ctx, int n); + inline map_list &operator=(map_list obj); inline ~map_list(); inline __isl_give isl_map_list *copy() const &; inline __isl_give isl_map_list *copy() && = delete; @@ -1734,25 +1813,25 @@ class map_list { inline __isl_give isl_map_list *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::map_list add(isl::map el) const; - inline isl::map_list concat(isl::map_list list2) const; - inline isl::map_list drop(unsigned int first, unsigned int n) const; - inline void foreach(const std::function &fn) const; - inline isl::map get_at(int index) const; - inline isl::map_list reverse() const; + inline ctx get_ctx() const; + + inline map_list add(map el) const; + inline map_list concat(map_list list2) const; + inline map_list drop(unsigned int first, unsigned int n) const; + inline void foreach(const std::function &fn) const; + inline map get_at(int index) const; + inline map_list reverse() const; inline int size() const; typedef isl_map_list* isl_ptr_t; }; // declarations for isl::multi_aff -inline isl::multi_aff manage(__isl_take isl_multi_aff *ptr); -inline isl::multi_aff manage_copy(__isl_keep isl_multi_aff *ptr); +inline multi_aff manage(__isl_take isl_multi_aff *ptr); +inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr); class multi_aff { - friend inline isl::multi_aff manage(__isl_take isl_multi_aff *ptr); - friend inline isl::multi_aff manage_copy(__isl_keep isl_multi_aff *ptr); + friend inline multi_aff manage(__isl_take isl_multi_aff *ptr); + friend inline multi_aff manage_copy(__isl_keep isl_multi_aff *ptr); protected: isl_multi_aff *ptr = nullptr; @@ -1761,11 +1840,11 @@ class multi_aff { public: inline /* implicit */ multi_aff(); - inline /* implicit */ multi_aff(const isl::multi_aff &obj); - inline /* implicit */ multi_aff(isl::aff aff); - inline explicit multi_aff(isl::ctx ctx, const std::string &str); - inline explicit multi_aff(isl::space space, isl::aff_list list); - inline isl::multi_aff &operator=(isl::multi_aff obj); + inline /* implicit */ multi_aff(const multi_aff &obj); + inline explicit multi_aff(ctx ctx, const std::string &str); + inline explicit multi_aff(space space, aff_list list); + inline /* implicit */ multi_aff(aff aff); + inline multi_aff &operator=(multi_aff obj); inline ~multi_aff(); inline __isl_give isl_multi_aff *copy() const &; inline __isl_give isl_multi_aff *copy() && = delete; @@ -1773,55 +1852,55 @@ class multi_aff { inline __isl_give isl_multi_aff *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::multi_aff add(isl::multi_aff multi2) const; - inline isl::multi_aff align_params(isl::space model) const; - static inline isl::multi_aff domain_map(isl::space space); - inline isl::multi_aff factor_domain() const; - inline isl::multi_aff factor_range() const; - inline isl::multi_aff flat_range_product(isl::multi_aff multi2) const; - inline isl::multi_aff flatten_range() const; - inline isl::multi_aff floor() const; - inline isl::multi_aff from_range() const; - inline isl::aff get_aff(int pos) const; - inline isl::aff_list get_aff_list() const; - inline isl::space get_domain_space() const; - inline isl::id get_range_tuple_id() const; - inline isl::space get_space() const; - static inline isl::multi_aff identity(isl::space space); - inline isl::multi_aff mod(isl::multi_val mv) const; - inline isl::multi_aff neg() const; - inline isl::multi_aff product(isl::multi_aff multi2) const; - inline isl::multi_aff pullback(isl::multi_aff ma2) const; - inline isl::multi_aff range_factor_domain() const; - inline isl::multi_aff range_factor_range() const; - static inline isl::multi_aff range_map(isl::space space); - inline isl::multi_aff range_product(isl::multi_aff multi2) const; - inline isl::multi_aff range_splice(unsigned int pos, isl::multi_aff multi2) const; - inline isl::multi_aff reset_user() const; - inline isl::multi_aff scale(isl::val v) const; - inline isl::multi_aff scale(isl::multi_val mv) const; - inline isl::multi_aff scale_down(isl::val v) const; - inline isl::multi_aff scale_down(isl::multi_val mv) const; - inline isl::multi_aff set_aff(int pos, isl::aff el) const; - inline isl::multi_aff set_range_tuple_id(isl::id id) const; + inline multi_aff add(multi_aff multi2) const; + inline multi_aff align_params(space model) const; + static inline multi_aff domain_map(space space); + inline multi_aff factor_domain() const; + inline multi_aff factor_range() const; + inline multi_aff flat_range_product(multi_aff multi2) const; + inline multi_aff flatten_range() const; + inline multi_aff floor() const; + inline multi_aff from_range() const; + inline aff get_aff(int pos) const; + inline aff_list get_aff_list() const; + inline space get_domain_space() const; + inline id get_range_tuple_id() const; + inline space get_space() const; + static inline multi_aff identity(space space); + inline multi_aff mod(multi_val mv) const; + inline multi_aff neg() const; + inline multi_aff product(multi_aff multi2) const; + inline multi_aff pullback(multi_aff ma2) const; + inline multi_aff range_factor_domain() const; + inline multi_aff range_factor_range() const; + static inline multi_aff range_map(space space); + inline multi_aff range_product(multi_aff multi2) const; + inline multi_aff range_splice(unsigned int pos, multi_aff multi2) const; + inline multi_aff reset_user() const; + inline multi_aff scale(val v) const; + inline multi_aff scale(multi_val mv) const; + inline multi_aff scale_down(val v) const; + inline multi_aff scale_down(multi_val mv) const; + inline multi_aff set_aff(int pos, aff el) const; + inline multi_aff set_range_tuple_id(id id) const; inline int size() const; - inline isl::multi_aff splice(unsigned int in_pos, unsigned int out_pos, isl::multi_aff multi2) const; - inline isl::multi_aff sub(isl::multi_aff multi2) const; - static inline isl::multi_aff wrapped_range_map(isl::space space); - static inline isl::multi_aff zero(isl::space space); + inline multi_aff splice(unsigned int in_pos, unsigned int out_pos, multi_aff multi2) const; + inline multi_aff sub(multi_aff multi2) const; + static inline multi_aff wrapped_range_map(space space); + static inline multi_aff zero(space space); typedef isl_multi_aff* isl_ptr_t; }; // declarations for isl::multi_id -inline isl::multi_id manage(__isl_take isl_multi_id *ptr); -inline isl::multi_id manage_copy(__isl_keep isl_multi_id *ptr); +inline multi_id manage(__isl_take isl_multi_id *ptr); +inline multi_id manage_copy(__isl_keep isl_multi_id *ptr); class multi_id { - friend inline isl::multi_id manage(__isl_take isl_multi_id *ptr); - friend inline isl::multi_id manage_copy(__isl_keep isl_multi_id *ptr); + friend inline multi_id manage(__isl_take isl_multi_id *ptr); + friend inline multi_id manage_copy(__isl_keep isl_multi_id *ptr); protected: isl_multi_id *ptr = nullptr; @@ -1830,9 +1909,9 @@ class multi_id { public: inline /* implicit */ multi_id(); - inline /* implicit */ multi_id(const isl::multi_id &obj); - inline explicit multi_id(isl::space space, isl::id_list list); - inline isl::multi_id &operator=(isl::multi_id obj); + inline /* implicit */ multi_id(const multi_id &obj); + inline explicit multi_id(space space, id_list list); + inline multi_id &operator=(multi_id obj); inline ~multi_id(); inline __isl_give isl_multi_id *copy() const &; inline __isl_give isl_multi_id *copy() && = delete; @@ -1840,35 +1919,35 @@ class multi_id { inline __isl_give isl_multi_id *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::multi_id align_params(isl::space model) const; - inline isl::multi_id factor_domain() const; - inline isl::multi_id factor_range() const; - inline isl::multi_id flat_range_product(isl::multi_id multi2) const; - inline isl::multi_id flatten_range() const; - inline isl::multi_id from_range() const; - inline isl::space get_domain_space() const; - inline isl::id get_id(int pos) const; - inline isl::id_list get_id_list() const; - inline isl::space get_space() const; - inline isl::multi_id range_factor_domain() const; - inline isl::multi_id range_factor_range() const; - inline isl::multi_id range_product(isl::multi_id multi2) const; - inline isl::multi_id range_splice(unsigned int pos, isl::multi_id multi2) const; - inline isl::multi_id reset_user() const; - inline isl::multi_id set_id(int pos, isl::id el) const; + inline ctx get_ctx() const; + + inline multi_id align_params(space model) const; + inline multi_id factor_domain() const; + inline multi_id factor_range() const; + inline multi_id flat_range_product(multi_id multi2) const; + inline multi_id flatten_range() const; + inline multi_id from_range() const; + inline space get_domain_space() const; + inline id get_id(int pos) const; + inline id_list get_id_list() const; + inline space get_space() const; + inline multi_id range_factor_domain() const; + inline multi_id range_factor_range() const; + inline multi_id range_product(multi_id multi2) const; + inline multi_id range_splice(unsigned int pos, multi_id multi2) const; + inline multi_id reset_user() const; + inline multi_id set_id(int pos, id el) const; inline int size() const; typedef isl_multi_id* isl_ptr_t; }; // declarations for isl::multi_pw_aff -inline isl::multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr); -inline isl::multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr); +inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr); +inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr); class multi_pw_aff { - friend inline isl::multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr); - friend inline isl::multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr); + friend inline multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr); + friend inline multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr); protected: isl_multi_pw_aff *ptr = nullptr; @@ -1877,13 +1956,13 @@ class multi_pw_aff { public: inline /* implicit */ multi_pw_aff(); - inline /* implicit */ multi_pw_aff(const isl::multi_pw_aff &obj); - inline explicit multi_pw_aff(isl::space space, isl::pw_aff_list list); - inline /* implicit */ multi_pw_aff(isl::multi_aff ma); - inline /* implicit */ multi_pw_aff(isl::pw_aff pa); - inline /* implicit */ multi_pw_aff(isl::pw_multi_aff pma); - inline explicit multi_pw_aff(isl::ctx ctx, const std::string &str); - inline isl::multi_pw_aff &operator=(isl::multi_pw_aff obj); + inline /* implicit */ multi_pw_aff(const multi_pw_aff &obj); + inline explicit multi_pw_aff(space space, pw_aff_list list); + inline /* implicit */ multi_pw_aff(multi_aff ma); + inline /* implicit */ multi_pw_aff(pw_aff pa); + inline /* implicit */ multi_pw_aff(pw_multi_aff pma); + inline explicit multi_pw_aff(ctx ctx, const std::string &str); + inline multi_pw_aff &operator=(multi_pw_aff obj); inline ~multi_pw_aff(); inline __isl_give isl_multi_pw_aff *copy() const &; inline __isl_give isl_multi_pw_aff *copy() && = delete; @@ -1891,55 +1970,55 @@ class multi_pw_aff { inline __isl_give isl_multi_pw_aff *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::multi_pw_aff add(isl::multi_pw_aff multi2) const; - inline isl::multi_pw_aff align_params(isl::space model) const; - inline isl::set domain() const; - inline isl::multi_pw_aff factor_domain() const; - inline isl::multi_pw_aff factor_range() const; - inline isl::multi_pw_aff flat_range_product(isl::multi_pw_aff multi2) const; - inline isl::multi_pw_aff flatten_range() const; - inline isl::multi_pw_aff from_range() const; - inline isl::space get_domain_space() const; - inline isl::pw_aff get_pw_aff(int pos) const; - inline isl::pw_aff_list get_pw_aff_list() const; - inline isl::id get_range_tuple_id() const; - inline isl::space get_space() const; - static inline isl::multi_pw_aff identity(isl::space space); - inline bool is_equal(const isl::multi_pw_aff &mpa2) const; - inline isl::multi_pw_aff mod(isl::multi_val mv) const; - inline isl::multi_pw_aff neg() const; - inline isl::multi_pw_aff product(isl::multi_pw_aff multi2) const; - inline isl::multi_pw_aff pullback(isl::multi_aff ma) const; - inline isl::multi_pw_aff pullback(isl::pw_multi_aff pma) const; - inline isl::multi_pw_aff pullback(isl::multi_pw_aff mpa2) const; - inline isl::multi_pw_aff range_factor_domain() const; - inline isl::multi_pw_aff range_factor_range() const; - inline isl::multi_pw_aff range_product(isl::multi_pw_aff multi2) const; - inline isl::multi_pw_aff range_splice(unsigned int pos, isl::multi_pw_aff multi2) const; - inline isl::multi_pw_aff reset_user() const; - inline isl::multi_pw_aff scale(isl::val v) const; - inline isl::multi_pw_aff scale(isl::multi_val mv) const; - inline isl::multi_pw_aff scale_down(isl::val v) const; - inline isl::multi_pw_aff scale_down(isl::multi_val mv) const; - inline isl::multi_pw_aff set_pw_aff(int pos, isl::pw_aff el) const; - inline isl::multi_pw_aff set_range_tuple_id(isl::id id) const; + inline multi_pw_aff add(multi_pw_aff multi2) const; + inline multi_pw_aff align_params(space model) const; + inline set domain() const; + inline multi_pw_aff factor_domain() const; + inline multi_pw_aff factor_range() const; + inline multi_pw_aff flat_range_product(multi_pw_aff multi2) const; + inline multi_pw_aff flatten_range() const; + inline multi_pw_aff from_range() const; + inline space get_domain_space() const; + inline pw_aff get_pw_aff(int pos) const; + inline pw_aff_list get_pw_aff_list() const; + inline id get_range_tuple_id() const; + inline space get_space() const; + static inline multi_pw_aff identity(space space); + inline bool is_equal(const multi_pw_aff &mpa2) const; + inline multi_pw_aff mod(multi_val mv) const; + inline multi_pw_aff neg() const; + inline multi_pw_aff product(multi_pw_aff multi2) const; + inline multi_pw_aff pullback(multi_aff ma) const; + inline multi_pw_aff pullback(pw_multi_aff pma) const; + inline multi_pw_aff pullback(multi_pw_aff mpa2) const; + inline multi_pw_aff range_factor_domain() const; + inline multi_pw_aff range_factor_range() const; + inline multi_pw_aff range_product(multi_pw_aff multi2) const; + inline multi_pw_aff range_splice(unsigned int pos, multi_pw_aff multi2) const; + inline multi_pw_aff reset_user() const; + inline multi_pw_aff scale(val v) const; + inline multi_pw_aff scale(multi_val mv) const; + inline multi_pw_aff scale_down(val v) const; + inline multi_pw_aff scale_down(multi_val mv) const; + inline multi_pw_aff set_pw_aff(int pos, pw_aff el) const; + inline multi_pw_aff set_range_tuple_id(id id) const; inline int size() const; - inline isl::multi_pw_aff splice(unsigned int in_pos, unsigned int out_pos, isl::multi_pw_aff multi2) const; - inline isl::multi_pw_aff sub(isl::multi_pw_aff multi2) const; - static inline isl::multi_pw_aff zero(isl::space space); + inline multi_pw_aff splice(unsigned int in_pos, unsigned int out_pos, multi_pw_aff multi2) const; + inline multi_pw_aff sub(multi_pw_aff multi2) const; + static inline multi_pw_aff zero(space space); typedef isl_multi_pw_aff* isl_ptr_t; }; // declarations for isl::multi_union_pw_aff -inline isl::multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr); -inline isl::multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr); +inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr); +inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr); class multi_union_pw_aff { - friend inline isl::multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr); - friend inline isl::multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr); + friend inline multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr); + friend inline multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr); protected: isl_multi_union_pw_aff *ptr = nullptr; @@ -1948,14 +2027,14 @@ class multi_union_pw_aff { public: inline /* implicit */ multi_union_pw_aff(); - inline /* implicit */ multi_union_pw_aff(const isl::multi_union_pw_aff &obj); - inline explicit multi_union_pw_aff(isl::space space, isl::union_pw_aff_list list); - inline /* implicit */ multi_union_pw_aff(isl::union_pw_aff upa); - inline /* implicit */ multi_union_pw_aff(isl::multi_pw_aff mpa); - inline explicit multi_union_pw_aff(isl::union_set domain, isl::multi_val mv); - inline explicit multi_union_pw_aff(isl::union_set domain, isl::multi_aff ma); - inline explicit multi_union_pw_aff(isl::ctx ctx, const std::string &str); - inline isl::multi_union_pw_aff &operator=(isl::multi_union_pw_aff obj); + inline /* implicit */ multi_union_pw_aff(const multi_union_pw_aff &obj); + inline /* implicit */ multi_union_pw_aff(union_pw_aff upa); + inline /* implicit */ multi_union_pw_aff(multi_pw_aff mpa); + inline explicit multi_union_pw_aff(union_set domain, multi_val mv); + inline explicit multi_union_pw_aff(union_set domain, multi_aff ma); + inline explicit multi_union_pw_aff(space space, union_pw_aff_list list); + inline explicit multi_union_pw_aff(ctx ctx, const std::string &str); + inline multi_union_pw_aff &operator=(multi_union_pw_aff obj); inline ~multi_union_pw_aff(); inline __isl_give isl_multi_union_pw_aff *copy() const &; inline __isl_give isl_multi_union_pw_aff *copy() && = delete; @@ -1963,62 +2042,62 @@ class multi_union_pw_aff { inline __isl_give isl_multi_union_pw_aff *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::multi_union_pw_aff add(isl::multi_union_pw_aff multi2) const; - inline isl::multi_union_pw_aff align_params(isl::space model) const; - inline isl::multi_union_pw_aff apply(isl::multi_aff ma) const; - inline isl::multi_union_pw_aff apply(isl::pw_multi_aff pma) const; - inline isl::union_set domain() const; - inline isl::multi_pw_aff extract_multi_pw_aff(isl::space space) const; - inline isl::multi_union_pw_aff factor_domain() const; - inline isl::multi_union_pw_aff factor_range() const; - inline isl::multi_union_pw_aff flat_range_product(isl::multi_union_pw_aff multi2) const; - inline isl::multi_union_pw_aff flatten_range() const; - inline isl::multi_union_pw_aff floor() const; - inline isl::multi_union_pw_aff from_range() const; - static inline isl::multi_union_pw_aff from_union_map(isl::union_map umap); - inline isl::space get_domain_space() const; - inline isl::id get_range_tuple_id() const; - inline isl::space get_space() const; - inline isl::union_pw_aff get_union_pw_aff(int pos) const; - inline isl::union_pw_aff_list get_union_pw_aff_list() const; - inline isl::multi_union_pw_aff gist(isl::union_set context) const; - inline isl::multi_union_pw_aff intersect_domain(isl::union_set uset) const; - inline isl::multi_union_pw_aff intersect_params(isl::set params) const; - inline bool involves_param(const isl::id &id) const; - inline isl::multi_val max_multi_val() const; - inline isl::multi_val min_multi_val() const; - inline isl::multi_union_pw_aff mod(isl::multi_val mv) const; - inline isl::multi_union_pw_aff neg() const; - inline isl::multi_union_pw_aff pullback(isl::union_pw_multi_aff upma) const; - inline isl::multi_union_pw_aff range_factor_domain() const; - inline isl::multi_union_pw_aff range_factor_range() const; - inline isl::multi_union_pw_aff range_product(isl::multi_union_pw_aff multi2) const; - inline isl::multi_union_pw_aff range_splice(unsigned int pos, isl::multi_union_pw_aff multi2) const; - inline isl::multi_union_pw_aff reset_user() const; - inline isl::multi_union_pw_aff scale(isl::val v) const; - inline isl::multi_union_pw_aff scale(isl::multi_val mv) const; - inline isl::multi_union_pw_aff scale_down(isl::val v) const; - inline isl::multi_union_pw_aff scale_down(isl::multi_val mv) const; - inline isl::multi_union_pw_aff set_range_tuple_id(isl::id id) const; - inline isl::multi_union_pw_aff set_union_pw_aff(int pos, isl::union_pw_aff el) const; + inline multi_union_pw_aff add(multi_union_pw_aff multi2) const; + inline multi_union_pw_aff align_params(space model) const; + inline multi_union_pw_aff apply(multi_aff ma) const; + inline multi_union_pw_aff apply(pw_multi_aff pma) const; + inline union_set domain() const; + inline multi_pw_aff extract_multi_pw_aff(space space) const; + inline multi_union_pw_aff factor_domain() const; + inline multi_union_pw_aff factor_range() const; + inline multi_union_pw_aff flat_range_product(multi_union_pw_aff multi2) const; + inline multi_union_pw_aff flatten_range() const; + inline multi_union_pw_aff floor() const; + inline multi_union_pw_aff from_range() const; + static inline multi_union_pw_aff from_union_map(union_map umap); + inline space get_domain_space() const; + inline id get_range_tuple_id() const; + inline space get_space() const; + inline union_pw_aff get_union_pw_aff(int pos) const; + inline union_pw_aff_list get_union_pw_aff_list() const; + inline multi_union_pw_aff gist(union_set context) const; + inline multi_union_pw_aff intersect_domain(union_set uset) const; + inline multi_union_pw_aff intersect_params(set params) const; + inline bool involves_param(const id &id) const; + inline multi_val max_multi_val() const; + inline multi_val min_multi_val() const; + inline multi_union_pw_aff mod(multi_val mv) const; + inline multi_union_pw_aff neg() const; + inline multi_union_pw_aff pullback(union_pw_multi_aff upma) const; + inline multi_union_pw_aff range_factor_domain() const; + inline multi_union_pw_aff range_factor_range() const; + inline multi_union_pw_aff range_product(multi_union_pw_aff multi2) const; + inline multi_union_pw_aff range_splice(unsigned int pos, multi_union_pw_aff multi2) const; + inline multi_union_pw_aff reset_user() const; + inline multi_union_pw_aff scale(val v) const; + inline multi_union_pw_aff scale(multi_val mv) const; + inline multi_union_pw_aff scale_down(val v) const; + inline multi_union_pw_aff scale_down(multi_val mv) const; + inline multi_union_pw_aff set_range_tuple_id(id id) const; + inline multi_union_pw_aff set_union_pw_aff(int pos, union_pw_aff el) const; inline int size() const; - inline isl::multi_union_pw_aff sub(isl::multi_union_pw_aff multi2) const; - inline isl::multi_union_pw_aff union_add(isl::multi_union_pw_aff mupa2) const; - static inline isl::multi_union_pw_aff zero(isl::space space); - inline isl::union_set zero_union_set() const; + inline multi_union_pw_aff sub(multi_union_pw_aff multi2) const; + inline multi_union_pw_aff union_add(multi_union_pw_aff mupa2) const; + static inline multi_union_pw_aff zero(space space); + inline union_set zero_union_set() const; typedef isl_multi_union_pw_aff* isl_ptr_t; }; // declarations for isl::multi_val -inline isl::multi_val manage(__isl_take isl_multi_val *ptr); -inline isl::multi_val manage_copy(__isl_keep isl_multi_val *ptr); +inline multi_val manage(__isl_take isl_multi_val *ptr); +inline multi_val manage_copy(__isl_keep isl_multi_val *ptr); class multi_val { - friend inline isl::multi_val manage(__isl_take isl_multi_val *ptr); - friend inline isl::multi_val manage_copy(__isl_keep isl_multi_val *ptr); + friend inline multi_val manage(__isl_take isl_multi_val *ptr); + friend inline multi_val manage_copy(__isl_keep isl_multi_val *ptr); protected: isl_multi_val *ptr = nullptr; @@ -2027,9 +2106,9 @@ class multi_val { public: inline /* implicit */ multi_val(); - inline /* implicit */ multi_val(const isl::multi_val &obj); - inline explicit multi_val(isl::space space, isl::val_list list); - inline isl::multi_val &operator=(isl::multi_val obj); + inline /* implicit */ multi_val(const multi_val &obj); + inline explicit multi_val(space space, val_list list); + inline multi_val &operator=(multi_val obj); inline ~multi_val(); inline __isl_give isl_multi_val *copy() const &; inline __isl_give isl_multi_val *copy() && = delete; @@ -2037,49 +2116,49 @@ class multi_val { inline __isl_give isl_multi_val *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::multi_val add(isl::multi_val multi2) const; - inline isl::multi_val align_params(isl::space model) const; - inline isl::multi_val factor_domain() const; - inline isl::multi_val factor_range() const; - inline isl::multi_val flat_range_product(isl::multi_val multi2) const; - inline isl::multi_val flatten_range() const; - inline isl::multi_val from_range() const; - inline isl::space get_domain_space() const; - inline isl::id get_range_tuple_id() const; - inline isl::space get_space() const; - inline isl::val get_val(int pos) const; - inline isl::val_list get_val_list() const; - inline isl::multi_val mod(isl::multi_val mv) const; - inline isl::multi_val neg() const; - inline isl::multi_val product(isl::multi_val multi2) const; - inline isl::multi_val range_factor_domain() const; - inline isl::multi_val range_factor_range() const; - inline isl::multi_val range_product(isl::multi_val multi2) const; - inline isl::multi_val range_splice(unsigned int pos, isl::multi_val multi2) const; - inline isl::multi_val reset_user() const; - inline isl::multi_val scale(isl::val v) const; - inline isl::multi_val scale(isl::multi_val mv) const; - inline isl::multi_val scale_down(isl::val v) const; - inline isl::multi_val scale_down(isl::multi_val mv) const; - inline isl::multi_val set_range_tuple_id(isl::id id) const; - inline isl::multi_val set_val(int pos, isl::val el) const; + inline multi_val add(multi_val multi2) const; + inline multi_val align_params(space model) const; + inline multi_val factor_domain() const; + inline multi_val factor_range() const; + inline multi_val flat_range_product(multi_val multi2) const; + inline multi_val flatten_range() const; + inline multi_val from_range() const; + inline space get_domain_space() const; + inline id get_range_tuple_id() const; + inline space get_space() const; + inline val get_val(int pos) const; + inline val_list get_val_list() const; + inline multi_val mod(multi_val mv) const; + inline multi_val neg() const; + inline multi_val product(multi_val multi2) const; + inline multi_val range_factor_domain() const; + inline multi_val range_factor_range() const; + inline multi_val range_product(multi_val multi2) const; + inline multi_val range_splice(unsigned int pos, multi_val multi2) const; + inline multi_val reset_user() const; + inline multi_val scale(val v) const; + inline multi_val scale(multi_val mv) const; + inline multi_val scale_down(val v) const; + inline multi_val scale_down(multi_val mv) const; + inline multi_val set_range_tuple_id(id id) const; + inline multi_val set_val(int pos, val el) const; inline int size() const; - inline isl::multi_val splice(unsigned int in_pos, unsigned int out_pos, isl::multi_val multi2) const; - inline isl::multi_val sub(isl::multi_val multi2) const; - static inline isl::multi_val zero(isl::space space); + inline multi_val splice(unsigned int in_pos, unsigned int out_pos, multi_val multi2) const; + inline multi_val sub(multi_val multi2) const; + static inline multi_val zero(space space); typedef isl_multi_val* isl_ptr_t; }; // declarations for isl::point -inline isl::point manage(__isl_take isl_point *ptr); -inline isl::point manage_copy(__isl_keep isl_point *ptr); +inline point manage(__isl_take isl_point *ptr); +inline point manage_copy(__isl_keep isl_point *ptr); class point { - friend inline isl::point manage(__isl_take isl_point *ptr); - friend inline isl::point manage_copy(__isl_keep isl_point *ptr); + friend inline point manage(__isl_take isl_point *ptr); + friend inline point manage_copy(__isl_keep isl_point *ptr); protected: isl_point *ptr = nullptr; @@ -2088,9 +2167,9 @@ class point { public: inline /* implicit */ point(); - inline /* implicit */ point(const isl::point &obj); - inline explicit point(isl::space dim); - inline isl::point &operator=(isl::point obj); + inline /* implicit */ point(const point &obj); + inline explicit point(space dim); + inline point &operator=(point obj); inline ~point(); inline __isl_give isl_point *copy() const &; inline __isl_give isl_point *copy() && = delete; @@ -2098,21 +2177,21 @@ class point { inline __isl_give isl_point *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::space get_space() const; + inline space get_space() const; inline bool is_void() const; typedef isl_point* isl_ptr_t; }; // declarations for isl::pw_aff -inline isl::pw_aff manage(__isl_take isl_pw_aff *ptr); -inline isl::pw_aff manage_copy(__isl_keep isl_pw_aff *ptr); +inline pw_aff manage(__isl_take isl_pw_aff *ptr); +inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr); class pw_aff { - friend inline isl::pw_aff manage(__isl_take isl_pw_aff *ptr); - friend inline isl::pw_aff manage_copy(__isl_keep isl_pw_aff *ptr); + friend inline pw_aff manage(__isl_take isl_pw_aff *ptr); + friend inline pw_aff manage_copy(__isl_keep isl_pw_aff *ptr); protected: isl_pw_aff *ptr = nullptr; @@ -2121,12 +2200,12 @@ class pw_aff { public: inline /* implicit */ pw_aff(); - inline /* implicit */ pw_aff(const isl::pw_aff &obj); - inline /* implicit */ pw_aff(isl::aff aff); - inline explicit pw_aff(isl::local_space ls); - inline explicit pw_aff(isl::set domain, isl::val v); - inline explicit pw_aff(isl::ctx ctx, const std::string &str); - inline isl::pw_aff &operator=(isl::pw_aff obj); + inline /* implicit */ pw_aff(const pw_aff &obj); + inline /* implicit */ pw_aff(aff aff); + inline explicit pw_aff(local_space ls); + inline explicit pw_aff(set domain, val v); + inline explicit pw_aff(ctx ctx, const std::string &str); + inline pw_aff &operator=(pw_aff obj); inline ~pw_aff(); inline __isl_give isl_pw_aff *copy() const &; inline __isl_give isl_pw_aff *copy() && = delete; @@ -2134,61 +2213,61 @@ class pw_aff { inline __isl_give isl_pw_aff *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::pw_aff add(isl::pw_aff pwaff2) const; - inline isl::pw_aff ceil() const; - inline isl::pw_aff cond(isl::pw_aff pwaff_true, isl::pw_aff pwaff_false) const; - inline isl::pw_aff div(isl::pw_aff pa2) const; - inline isl::set domain() const; - inline isl::map eq_map(isl::pw_aff pa2) const; - inline isl::set eq_set(isl::pw_aff pwaff2) const; - inline isl::pw_aff floor() const; - inline void foreach_piece(const std::function &fn) const; - inline isl::set ge_set(isl::pw_aff pwaff2) const; - inline isl::space get_space() const; - inline isl::map gt_map(isl::pw_aff pa2) const; - inline isl::set gt_set(isl::pw_aff pwaff2) const; - inline isl::pw_aff intersect_domain(isl::set set) const; - inline isl::pw_aff intersect_params(isl::set set) const; + inline pw_aff add(pw_aff pwaff2) const; + inline pw_aff ceil() const; + inline pw_aff cond(pw_aff pwaff_true, pw_aff pwaff_false) const; + inline pw_aff div(pw_aff pa2) const; + inline set domain() const; + inline map eq_map(pw_aff pa2) const; + inline set eq_set(pw_aff pwaff2) const; + inline pw_aff floor() const; + inline void foreach_piece(const std::function &fn) const; + inline set ge_set(pw_aff pwaff2) const; + inline space get_space() const; + inline map gt_map(pw_aff pa2) const; + inline set gt_set(pw_aff pwaff2) const; + inline pw_aff intersect_domain(set set) const; + inline pw_aff intersect_params(set set) const; inline bool involves_nan() const; inline bool is_cst() const; - inline bool is_equal(const isl::pw_aff &pa2) const; - inline isl::set le_set(isl::pw_aff pwaff2) const; - inline isl::map lt_map(isl::pw_aff pa2) const; - inline isl::set lt_set(isl::pw_aff pwaff2) const; - inline isl::pw_aff max(isl::pw_aff pwaff2) const; - inline isl::pw_aff min(isl::pw_aff pwaff2) const; - inline isl::pw_aff mod(isl::val mod) const; - inline isl::pw_aff mul(isl::pw_aff pwaff2) const; + inline bool is_equal(const pw_aff &pa2) const; + inline set le_set(pw_aff pwaff2) const; + inline map lt_map(pw_aff pa2) const; + inline set lt_set(pw_aff pwaff2) const; + inline pw_aff max(pw_aff pwaff2) const; + inline pw_aff min(pw_aff pwaff2) const; + inline pw_aff mod(val mod) const; + inline pw_aff mul(pw_aff pwaff2) const; inline int n_piece() const; - inline isl::set ne_set(isl::pw_aff pwaff2) const; - inline isl::pw_aff neg() const; - inline isl::set nonneg_set() const; - inline isl::set params() const; - inline isl::set pos_set() const; - inline isl::pw_aff project_domain_on_params() const; - inline isl::pw_aff pullback(isl::multi_aff ma) const; - inline isl::pw_aff pullback(isl::pw_multi_aff pma) const; - inline isl::pw_aff pullback(isl::multi_pw_aff mpa) const; - inline isl::pw_aff scale(isl::val v) const; - inline isl::pw_aff scale_down(isl::val f) const; - inline isl::pw_aff sub(isl::pw_aff pwaff2) const; - inline isl::pw_aff tdiv_q(isl::pw_aff pa2) const; - inline isl::pw_aff tdiv_r(isl::pw_aff pa2) const; - inline isl::pw_aff union_add(isl::pw_aff pwaff2) const; - inline isl::set zero_set() const; + inline set ne_set(pw_aff pwaff2) const; + inline pw_aff neg() const; + inline set nonneg_set() const; + inline set params() const; + inline set pos_set() const; + inline pw_aff project_domain_on_params() const; + inline pw_aff pullback(multi_aff ma) const; + inline pw_aff pullback(pw_multi_aff pma) const; + inline pw_aff pullback(multi_pw_aff mpa) const; + inline pw_aff scale(val v) const; + inline pw_aff scale_down(val f) const; + inline pw_aff sub(pw_aff pwaff2) const; + inline pw_aff tdiv_q(pw_aff pa2) const; + inline pw_aff tdiv_r(pw_aff pa2) const; + inline pw_aff union_add(pw_aff pwaff2) const; + inline set zero_set() const; typedef isl_pw_aff* isl_ptr_t; }; // declarations for isl::pw_aff_list -inline isl::pw_aff_list manage(__isl_take isl_pw_aff_list *ptr); -inline isl::pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr); +inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr); +inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr); class pw_aff_list { - friend inline isl::pw_aff_list manage(__isl_take isl_pw_aff_list *ptr); - friend inline isl::pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr); + friend inline pw_aff_list manage(__isl_take isl_pw_aff_list *ptr); + friend inline pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr); protected: isl_pw_aff_list *ptr = nullptr; @@ -2197,10 +2276,10 @@ class pw_aff_list { public: inline /* implicit */ pw_aff_list(); - inline /* implicit */ pw_aff_list(const isl::pw_aff_list &obj); - inline explicit pw_aff_list(isl::pw_aff el); - inline explicit pw_aff_list(isl::ctx ctx, int n); - inline isl::pw_aff_list &operator=(isl::pw_aff_list obj); + inline /* implicit */ pw_aff_list(const pw_aff_list &obj); + inline explicit pw_aff_list(pw_aff el); + inline explicit pw_aff_list(ctx ctx, int n); + inline pw_aff_list &operator=(pw_aff_list obj); inline ~pw_aff_list(); inline __isl_give isl_pw_aff_list *copy() const &; inline __isl_give isl_pw_aff_list *copy() && = delete; @@ -2208,25 +2287,25 @@ class pw_aff_list { inline __isl_give isl_pw_aff_list *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::pw_aff_list add(isl::pw_aff el) const; - inline isl::pw_aff_list concat(isl::pw_aff_list list2) const; - inline isl::pw_aff_list drop(unsigned int first, unsigned int n) const; - inline void foreach(const std::function &fn) const; - inline isl::pw_aff get_at(int index) const; - inline isl::pw_aff_list reverse() const; + inline ctx get_ctx() const; + + inline pw_aff_list add(pw_aff el) const; + inline pw_aff_list concat(pw_aff_list list2) const; + inline pw_aff_list drop(unsigned int first, unsigned int n) const; + inline void foreach(const std::function &fn) const; + inline pw_aff get_at(int index) const; + inline pw_aff_list reverse() const; inline int size() const; typedef isl_pw_aff_list* isl_ptr_t; }; // declarations for isl::pw_multi_aff -inline isl::pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr); -inline isl::pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr); +inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr); +inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr); class pw_multi_aff { - friend inline isl::pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr); - friend inline isl::pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr); + friend inline pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr); + friend inline pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr); protected: isl_pw_multi_aff *ptr = nullptr; @@ -2235,13 +2314,13 @@ class pw_multi_aff { public: inline /* implicit */ pw_multi_aff(); - inline /* implicit */ pw_multi_aff(const isl::pw_multi_aff &obj); - inline /* implicit */ pw_multi_aff(isl::multi_aff ma); - inline /* implicit */ pw_multi_aff(isl::pw_aff pa); - inline explicit pw_multi_aff(isl::set domain, isl::multi_val mv); - inline explicit pw_multi_aff(isl::map map); - inline explicit pw_multi_aff(isl::ctx ctx, const std::string &str); - inline isl::pw_multi_aff &operator=(isl::pw_multi_aff obj); + inline /* implicit */ pw_multi_aff(const pw_multi_aff &obj); + inline /* implicit */ pw_multi_aff(multi_aff ma); + inline /* implicit */ pw_multi_aff(pw_aff pa); + inline explicit pw_multi_aff(set domain, multi_val mv); + inline explicit pw_multi_aff(map map); + inline explicit pw_multi_aff(ctx ctx, const std::string &str); + inline pw_multi_aff &operator=(pw_multi_aff obj); inline ~pw_multi_aff(); inline __isl_give isl_pw_multi_aff *copy() const &; inline __isl_give isl_pw_multi_aff *copy() && = delete; @@ -2249,41 +2328,41 @@ class pw_multi_aff { inline __isl_give isl_pw_multi_aff *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::pw_multi_aff add(isl::pw_multi_aff pma2) const; - inline isl::set domain() const; - inline isl::pw_multi_aff flat_range_product(isl::pw_multi_aff pma2) const; - inline void foreach_piece(const std::function &fn) const; - static inline isl::pw_multi_aff from(isl::multi_pw_aff mpa); - inline isl::pw_aff get_pw_aff(int pos) const; - inline isl::id get_range_tuple_id() const; - inline isl::space get_space() const; - static inline isl::pw_multi_aff identity(isl::space space); - inline bool is_equal(const isl::pw_multi_aff &pma2) const; + inline pw_multi_aff add(pw_multi_aff pma2) const; + inline set domain() const; + inline pw_multi_aff flat_range_product(pw_multi_aff pma2) const; + inline void foreach_piece(const std::function &fn) const; + static inline pw_multi_aff from(multi_pw_aff mpa); + inline pw_aff get_pw_aff(int pos) const; + inline id get_range_tuple_id() const; + inline space get_space() const; + static inline pw_multi_aff identity(space space); + inline bool is_equal(const pw_multi_aff &pma2) const; inline int n_piece() const; - inline isl::pw_multi_aff product(isl::pw_multi_aff pma2) const; - inline isl::pw_multi_aff project_domain_on_params() const; - inline isl::pw_multi_aff pullback(isl::multi_aff ma) const; - inline isl::pw_multi_aff pullback(isl::pw_multi_aff pma2) const; - inline isl::pw_multi_aff range_factor_domain() const; - inline isl::pw_multi_aff range_factor_range() const; - inline isl::pw_multi_aff range_product(isl::pw_multi_aff pma2) const; - inline isl::pw_multi_aff scale(isl::val v) const; - inline isl::pw_multi_aff scale_down(isl::val v) const; - inline isl::pw_multi_aff set_pw_aff(unsigned int pos, isl::pw_aff pa) const; - inline isl::pw_multi_aff union_add(isl::pw_multi_aff pma2) const; + inline pw_multi_aff product(pw_multi_aff pma2) const; + inline pw_multi_aff project_domain_on_params() const; + inline pw_multi_aff pullback(multi_aff ma) const; + inline pw_multi_aff pullback(pw_multi_aff pma2) const; + inline pw_multi_aff range_factor_domain() const; + inline pw_multi_aff range_factor_range() const; + inline pw_multi_aff range_product(pw_multi_aff pma2) const; + inline pw_multi_aff scale(val v) const; + inline pw_multi_aff scale_down(val v) const; + inline pw_multi_aff set_pw_aff(unsigned int pos, pw_aff pa) const; + inline pw_multi_aff union_add(pw_multi_aff pma2) const; typedef isl_pw_multi_aff* isl_ptr_t; }; // declarations for isl::schedule -inline isl::schedule manage(__isl_take isl_schedule *ptr); -inline isl::schedule manage_copy(__isl_keep isl_schedule *ptr); +inline schedule manage(__isl_take isl_schedule *ptr); +inline schedule manage_copy(__isl_keep isl_schedule *ptr); class schedule { - friend inline isl::schedule manage(__isl_take isl_schedule *ptr); - friend inline isl::schedule manage_copy(__isl_keep isl_schedule *ptr); + friend inline schedule manage(__isl_take isl_schedule *ptr); + friend inline schedule manage_copy(__isl_keep isl_schedule *ptr); protected: isl_schedule *ptr = nullptr; @@ -2292,9 +2371,9 @@ class schedule { public: inline /* implicit */ schedule(); - inline /* implicit */ schedule(const isl::schedule &obj); - inline explicit schedule(isl::ctx ctx, const std::string &str); - inline isl::schedule &operator=(isl::schedule obj); + inline /* implicit */ schedule(const schedule &obj); + inline explicit schedule(ctx ctx, const std::string &str); + inline schedule &operator=(schedule obj); inline ~schedule(); inline __isl_give isl_schedule *copy() const &; inline __isl_give isl_schedule *copy() && = delete; @@ -2302,29 +2381,29 @@ class schedule { inline __isl_give isl_schedule *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - static inline isl::schedule from_domain(isl::union_set domain); - inline isl::union_set get_domain() const; - inline isl::union_map get_map() const; - inline isl::schedule_node get_root() const; - inline isl::schedule insert_partial_schedule(isl::multi_union_pw_aff partial) const; - inline bool plain_is_equal(const isl::schedule &schedule2) const; - inline isl::schedule pullback(isl::union_pw_multi_aff upma) const; - inline isl::schedule reset_user() const; - inline isl::schedule sequence(isl::schedule schedule2) const; - inline isl::schedule set(isl::schedule schedule2) const; + static inline schedule from_domain(union_set domain); + inline union_set get_domain() const; + inline union_map get_map() const; + inline schedule_node get_root() const; + inline schedule insert_partial_schedule(multi_union_pw_aff partial) const; + inline bool plain_is_equal(const schedule &schedule2) const; + inline schedule pullback(union_pw_multi_aff upma) const; + inline schedule reset_user() const; + inline schedule sequence(schedule schedule2) const; + inline schedule set(schedule schedule2) const; typedef isl_schedule* isl_ptr_t; }; // declarations for isl::schedule_constraints -inline isl::schedule_constraints manage(__isl_take isl_schedule_constraints *ptr); -inline isl::schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr); +inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr); +inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr); class schedule_constraints { - friend inline isl::schedule_constraints manage(__isl_take isl_schedule_constraints *ptr); - friend inline isl::schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr); + friend inline schedule_constraints manage(__isl_take isl_schedule_constraints *ptr); + friend inline schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr); protected: isl_schedule_constraints *ptr = nullptr; @@ -2333,9 +2412,9 @@ class schedule_constraints { public: inline /* implicit */ schedule_constraints(); - inline /* implicit */ schedule_constraints(const isl::schedule_constraints &obj); - inline explicit schedule_constraints(isl::ctx ctx, const std::string &str); - inline isl::schedule_constraints &operator=(isl::schedule_constraints obj); + inline /* implicit */ schedule_constraints(const schedule_constraints &obj); + inline explicit schedule_constraints(ctx ctx, const std::string &str); + inline schedule_constraints &operator=(schedule_constraints obj); inline ~schedule_constraints(); inline __isl_give isl_schedule_constraints *copy() const &; inline __isl_give isl_schedule_constraints *copy() && = delete; @@ -2343,36 +2422,36 @@ class schedule_constraints { inline __isl_give isl_schedule_constraints *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::schedule compute_schedule() const; - inline isl::union_map get_coincidence() const; - inline isl::union_map get_conditional_validity() const; - inline isl::union_map get_conditional_validity_condition() const; - inline isl::set get_context() const; - inline isl::union_set get_domain() const; - inline isl::multi_union_pw_aff get_prefix() const; - inline isl::union_map get_proximity() const; - inline isl::union_map get_validity() const; - inline isl::schedule_constraints intersect_domain(isl::union_set domain) const; - static inline isl::schedule_constraints on_domain(isl::union_set domain); - inline isl::schedule_constraints set_coincidence(isl::union_map coincidence) const; - inline isl::schedule_constraints set_conditional_validity(isl::union_map condition, isl::union_map validity) const; - inline isl::schedule_constraints set_context(isl::set context) const; - inline isl::schedule_constraints set_prefix(isl::multi_union_pw_aff prefix) const; - inline isl::schedule_constraints set_proximity(isl::union_map proximity) const; - inline isl::schedule_constraints set_validity(isl::union_map validity) const; + inline schedule compute_schedule() const; + inline union_map get_coincidence() const; + inline union_map get_conditional_validity() const; + inline union_map get_conditional_validity_condition() const; + inline set get_context() const; + inline union_set get_domain() const; + inline multi_union_pw_aff get_prefix() const; + inline union_map get_proximity() const; + inline union_map get_validity() const; + inline schedule_constraints intersect_domain(union_set domain) const; + static inline schedule_constraints on_domain(union_set domain); + inline schedule_constraints set_coincidence(union_map coincidence) const; + inline schedule_constraints set_conditional_validity(union_map condition, union_map validity) const; + inline schedule_constraints set_context(set context) const; + inline schedule_constraints set_prefix(multi_union_pw_aff prefix) const; + inline schedule_constraints set_proximity(union_map proximity) const; + inline schedule_constraints set_validity(union_map validity) const; typedef isl_schedule_constraints* isl_ptr_t; }; // declarations for isl::schedule_node -inline isl::schedule_node manage(__isl_take isl_schedule_node *ptr); -inline isl::schedule_node manage_copy(__isl_keep isl_schedule_node *ptr); +inline schedule_node manage(__isl_take isl_schedule_node *ptr); +inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr); class schedule_node { - friend inline isl::schedule_node manage(__isl_take isl_schedule_node *ptr); - friend inline isl::schedule_node manage_copy(__isl_keep isl_schedule_node *ptr); + friend inline schedule_node manage(__isl_take isl_schedule_node *ptr); + friend inline schedule_node manage_copy(__isl_keep isl_schedule_node *ptr); protected: isl_schedule_node *ptr = nullptr; @@ -2381,8 +2460,8 @@ class schedule_node { public: inline /* implicit */ schedule_node(); - inline /* implicit */ schedule_node(const isl::schedule_node &obj); - inline isl::schedule_node &operator=(isl::schedule_node obj); + inline /* implicit */ schedule_node(const schedule_node &obj); + inline schedule_node &operator=(schedule_node obj); inline ~schedule_node(); inline __isl_give isl_schedule_node *copy() const &; inline __isl_give isl_schedule_node *copy() && = delete; @@ -2392,54 +2471,54 @@ class schedule_node { inline explicit operator bool() const; template inline bool isa(); template inline T as(); - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::schedule_node ancestor(int generation) const; - inline isl::schedule_node child(int pos) const; - inline isl::schedule_node cut() const; - inline isl::schedule_node del() const; - inline bool every_descendant(const std::function &test) const; - inline isl::schedule_node first_child() const; - inline void foreach_descendant_top_down(const std::function &fn) const; - static inline isl::schedule_node from_domain(isl::union_set domain); - static inline isl::schedule_node from_extension(isl::union_map extension); - inline int get_ancestor_child_position(const isl::schedule_node &ancestor) const; - inline isl::schedule_node get_child(int pos) const; + inline schedule_node ancestor(int generation) const; + inline schedule_node child(int pos) const; + inline schedule_node cut() const; + inline schedule_node del() const; + inline bool every_descendant(const std::function &test) const; + inline schedule_node first_child() const; + inline void foreach_descendant_top_down(const std::function &fn) const; + static inline schedule_node from_domain(union_set domain); + static inline schedule_node from_extension(union_map extension); + inline int get_ancestor_child_position(const schedule_node &ancestor) const; + inline schedule_node get_child(int pos) const; inline int get_child_position() const; - inline isl::union_set get_domain() const; - inline isl::multi_union_pw_aff get_prefix_schedule_multi_union_pw_aff() const; - inline isl::union_map get_prefix_schedule_relation() const; - inline isl::union_map get_prefix_schedule_union_map() const; - inline isl::union_pw_multi_aff get_prefix_schedule_union_pw_multi_aff() const; - inline isl::schedule get_schedule() const; + inline union_set get_domain() const; + inline multi_union_pw_aff get_prefix_schedule_multi_union_pw_aff() const; + inline union_map get_prefix_schedule_relation() const; + inline union_map get_prefix_schedule_union_map() const; + inline union_pw_multi_aff get_prefix_schedule_union_pw_multi_aff() const; + inline schedule get_schedule() const; inline int get_schedule_depth() const; - inline isl::schedule_node get_shared_ancestor(const isl::schedule_node &node2) const; + inline schedule_node get_shared_ancestor(const schedule_node &node2) const; inline int get_tree_depth() const; - inline isl::union_set get_universe_domain() const; - inline isl::schedule_node graft_after(isl::schedule_node graft) const; - inline isl::schedule_node graft_before(isl::schedule_node graft) const; + inline union_set get_universe_domain() const; + inline schedule_node graft_after(schedule_node graft) const; + inline schedule_node graft_before(schedule_node graft) const; inline bool has_children() const; inline bool has_next_sibling() const; inline bool has_parent() const; inline bool has_previous_sibling() const; - inline isl::schedule_node insert_context(isl::set context) const; - inline isl::schedule_node insert_filter(isl::union_set filter) const; - inline isl::schedule_node insert_guard(isl::set context) const; - inline isl::schedule_node insert_mark(isl::id mark) const; - inline isl::schedule_node insert_partial_schedule(isl::multi_union_pw_aff schedule) const; - inline isl::schedule_node insert_sequence(isl::union_set_list filters) const; - inline isl::schedule_node insert_set(isl::union_set_list filters) const; - inline bool is_equal(const isl::schedule_node &node2) const; + inline schedule_node insert_context(set context) const; + inline schedule_node insert_filter(union_set filter) const; + inline schedule_node insert_guard(set context) const; + inline schedule_node insert_mark(id mark) const; + inline schedule_node insert_partial_schedule(multi_union_pw_aff schedule) const; + inline schedule_node insert_sequence(union_set_list filters) const; + inline schedule_node insert_set(union_set_list filters) const; + inline bool is_equal(const schedule_node &node2) const; inline bool is_subtree_anchored() const; - inline isl::schedule_node map_descendant_bottom_up(const std::function &fn) const; + inline schedule_node map_descendant_bottom_up(const std::function &fn) const; inline int n_children() const; - inline isl::schedule_node next_sibling() const; - inline isl::schedule_node order_after(isl::union_set filter) const; - inline isl::schedule_node order_before(isl::union_set filter) const; - inline isl::schedule_node parent() const; - inline isl::schedule_node previous_sibling() const; - inline isl::schedule_node root() const; + inline schedule_node next_sibling() const; + inline schedule_node order_after(union_set filter) const; + inline schedule_node order_before(union_set filter) const; + inline schedule_node parent() const; + inline schedule_node previous_sibling() const; + inline schedule_node root() const; typedef isl_schedule_node* isl_ptr_t; }; @@ -2455,36 +2534,36 @@ class schedule_node_band : public schedule_node { public: inline /* implicit */ schedule_node_band(); - inline /* implicit */ schedule_node_band(const isl::schedule_node_band &obj); - inline isl::schedule_node_band &operator=(isl::schedule_node_band obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ schedule_node_band(const schedule_node_band &obj); + inline schedule_node_band &operator=(schedule_node_band obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::union_set get_ast_build_options() const; - inline isl::set get_ast_isolate_option() const; - inline isl::multi_union_pw_aff get_partial_schedule() const; - inline isl::union_map get_partial_schedule_union_map() const; + inline union_set get_ast_build_options() const; + inline set get_ast_isolate_option() const; + inline multi_union_pw_aff get_partial_schedule() const; + inline union_map get_partial_schedule_union_map() const; inline bool get_permutable() const; - inline isl::space get_space() const; + inline space get_space() const; inline bool member_get_coincident(int pos) const; - inline isl::schedule_node_band member_set_coincident(int pos, int coincident) const; - inline isl::schedule_node_band mod(isl::multi_val mv) const; + inline schedule_node_band member_set_coincident(int pos, int coincident) const; + inline schedule_node_band mod(multi_val mv) const; inline unsigned int n_member() const; - inline isl::schedule_node_band scale(isl::multi_val mv) const; - inline isl::schedule_node_band scale_down(isl::multi_val mv) const; - inline isl::schedule_node_band set_ast_build_options(isl::union_set options) const; - inline isl::schedule_node_band set_permutable(int permutable) const; - inline isl::schedule_node_band shift(isl::multi_union_pw_aff shift) const; - inline isl::schedule_node_band split(int pos) const; - inline isl::schedule_node_band tile(isl::multi_val sizes) const; - inline isl::schedule_node_band member_set_ast_loop_default(int pos) const; - inline isl::schedule_node_band member_set_ast_loop_atomic(int pos) const; - inline isl::schedule_node_band member_set_ast_loop_unroll(int pos) const; - inline isl::schedule_node_band member_set_ast_loop_separate(int pos) const; - inline isl::schedule_node_band member_set_isolate_ast_loop_default(int pos) const; - inline isl::schedule_node_band member_set_isolate_ast_loop_atomic(int pos) const; - inline isl::schedule_node_band member_set_isolate_ast_loop_unroll(int pos) const; - inline isl::schedule_node_band member_set_isolate_ast_loop_separate(int pos) const; + inline schedule_node_band scale(multi_val mv) const; + inline schedule_node_band scale_down(multi_val mv) const; + inline schedule_node_band set_ast_build_options(union_set options) const; + inline schedule_node_band set_permutable(int permutable) const; + inline schedule_node_band shift(multi_union_pw_aff shift) const; + inline schedule_node_band split(int pos) const; + inline schedule_node_band tile(multi_val sizes) const; + inline schedule_node_band member_set_ast_loop_default(int pos) const; + inline schedule_node_band member_set_ast_loop_atomic(int pos) const; + inline schedule_node_band member_set_ast_loop_unroll(int pos) const; + inline schedule_node_band member_set_ast_loop_separate(int pos) const; + inline schedule_node_band member_set_isolate_ast_loop_default(int pos) const; + inline schedule_node_band member_set_isolate_ast_loop_atomic(int pos) const; + inline schedule_node_band member_set_isolate_ast_loop_unroll(int pos) const; + inline schedule_node_band member_set_isolate_ast_loop_separate(int pos) const; typedef isl_schedule_node* isl_ptr_t; }; @@ -2500,12 +2579,12 @@ class schedule_node_context : public schedule_node { public: inline /* implicit */ schedule_node_context(); - inline /* implicit */ schedule_node_context(const isl::schedule_node_context &obj); - inline isl::schedule_node_context &operator=(isl::schedule_node_context obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ schedule_node_context(const schedule_node_context &obj); + inline schedule_node_context &operator=(schedule_node_context obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::set get_context() const; + inline set get_context() const; typedef isl_schedule_node* isl_ptr_t; }; @@ -2521,12 +2600,12 @@ class schedule_node_domain : public schedule_node { public: inline /* implicit */ schedule_node_domain(); - inline /* implicit */ schedule_node_domain(const isl::schedule_node_domain &obj); - inline isl::schedule_node_domain &operator=(isl::schedule_node_domain obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ schedule_node_domain(const schedule_node_domain &obj); + inline schedule_node_domain &operator=(schedule_node_domain obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::union_set get_domain() const; + inline union_set get_domain() const; typedef isl_schedule_node* isl_ptr_t; }; @@ -2542,13 +2621,13 @@ class schedule_node_expansion : public schedule_node { public: inline /* implicit */ schedule_node_expansion(); - inline /* implicit */ schedule_node_expansion(const isl::schedule_node_expansion &obj); - inline isl::schedule_node_expansion &operator=(isl::schedule_node_expansion obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ schedule_node_expansion(const schedule_node_expansion &obj); + inline schedule_node_expansion &operator=(schedule_node_expansion obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::union_pw_multi_aff get_contraction() const; - inline isl::union_map get_expansion() const; + inline union_pw_multi_aff get_contraction() const; + inline union_map get_expansion() const; typedef isl_schedule_node* isl_ptr_t; }; @@ -2564,12 +2643,12 @@ class schedule_node_extension : public schedule_node { public: inline /* implicit */ schedule_node_extension(); - inline /* implicit */ schedule_node_extension(const isl::schedule_node_extension &obj); - inline isl::schedule_node_extension &operator=(isl::schedule_node_extension obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ schedule_node_extension(const schedule_node_extension &obj); + inline schedule_node_extension &operator=(schedule_node_extension obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::union_map get_extension() const; + inline union_map get_extension() const; typedef isl_schedule_node* isl_ptr_t; }; @@ -2585,12 +2664,12 @@ class schedule_node_filter : public schedule_node { public: inline /* implicit */ schedule_node_filter(); - inline /* implicit */ schedule_node_filter(const isl::schedule_node_filter &obj); - inline isl::schedule_node_filter &operator=(isl::schedule_node_filter obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ schedule_node_filter(const schedule_node_filter &obj); + inline schedule_node_filter &operator=(schedule_node_filter obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::union_set get_filter() const; + inline union_set get_filter() const; typedef isl_schedule_node* isl_ptr_t; }; @@ -2606,12 +2685,12 @@ class schedule_node_guard : public schedule_node { public: inline /* implicit */ schedule_node_guard(); - inline /* implicit */ schedule_node_guard(const isl::schedule_node_guard &obj); - inline isl::schedule_node_guard &operator=(isl::schedule_node_guard obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ schedule_node_guard(const schedule_node_guard &obj); + inline schedule_node_guard &operator=(schedule_node_guard obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::set get_guard() const; + inline set get_guard() const; typedef isl_schedule_node* isl_ptr_t; }; @@ -2627,9 +2706,9 @@ class schedule_node_leaf : public schedule_node { public: inline /* implicit */ schedule_node_leaf(); - inline /* implicit */ schedule_node_leaf(const isl::schedule_node_leaf &obj); - inline isl::schedule_node_leaf &operator=(isl::schedule_node_leaf obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ schedule_node_leaf(const schedule_node_leaf &obj); + inline schedule_node_leaf &operator=(schedule_node_leaf obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_schedule_node* isl_ptr_t; @@ -2647,12 +2726,12 @@ class schedule_node_mark : public schedule_node { public: inline /* implicit */ schedule_node_mark(); - inline /* implicit */ schedule_node_mark(const isl::schedule_node_mark &obj); - inline isl::schedule_node_mark &operator=(isl::schedule_node_mark obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ schedule_node_mark(const schedule_node_mark &obj); + inline schedule_node_mark &operator=(schedule_node_mark obj); + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::id get_id() const; + inline id get_id() const; typedef isl_schedule_node* isl_ptr_t; }; @@ -2668,9 +2747,9 @@ class schedule_node_sequence : public schedule_node { public: inline /* implicit */ schedule_node_sequence(); - inline /* implicit */ schedule_node_sequence(const isl::schedule_node_sequence &obj); - inline isl::schedule_node_sequence &operator=(isl::schedule_node_sequence obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ schedule_node_sequence(const schedule_node_sequence &obj); + inline schedule_node_sequence &operator=(schedule_node_sequence obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_schedule_node* isl_ptr_t; @@ -2688,21 +2767,21 @@ class schedule_node_set : public schedule_node { public: inline /* implicit */ schedule_node_set(); - inline /* implicit */ schedule_node_set(const isl::schedule_node_set &obj); - inline isl::schedule_node_set &operator=(isl::schedule_node_set obj); - inline isl::ctx get_ctx() const; + inline /* implicit */ schedule_node_set(const schedule_node_set &obj); + inline schedule_node_set &operator=(schedule_node_set obj); + inline ctx get_ctx() const; inline std::string to_str() const; typedef isl_schedule_node* isl_ptr_t; }; // declarations for isl::set -inline isl::set manage(__isl_take isl_set *ptr); -inline isl::set manage_copy(__isl_keep isl_set *ptr); +inline set manage(__isl_take isl_set *ptr); +inline set manage_copy(__isl_keep isl_set *ptr); class set { - friend inline isl::set manage(__isl_take isl_set *ptr); - friend inline isl::set manage_copy(__isl_keep isl_set *ptr); + friend inline set manage(__isl_take isl_set *ptr); + friend inline set manage_copy(__isl_keep isl_set *ptr); protected: isl_set *ptr = nullptr; @@ -2711,11 +2790,11 @@ class set { public: inline /* implicit */ set(); - inline /* implicit */ set(const isl::set &obj); - inline /* implicit */ set(isl::point pnt); - inline explicit set(isl::ctx ctx, const std::string &str); - inline /* implicit */ set(isl::basic_set bset); - inline isl::set &operator=(isl::set obj); + inline /* implicit */ set(const set &obj); + inline /* implicit */ set(point pnt); + inline explicit set(ctx ctx, const std::string &str); + inline /* implicit */ set(basic_set bset); + inline set &operator=(set obj); inline ~set(); inline __isl_give isl_set *copy() const &; inline __isl_give isl_set *copy() && = delete; @@ -2723,81 +2802,81 @@ class set { inline __isl_give isl_set *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::basic_set affine_hull() const; - inline isl::set align_params(isl::space model) const; - inline isl::set apply(isl::map map) const; - inline isl::set coalesce() const; - inline isl::set complement() const; - inline isl::set compute_divs() const; - inline isl::set detect_equalities() const; - inline isl::pw_aff dim_max(int pos) const; - inline isl::pw_aff dim_min(int pos) const; - static inline isl::set empty(isl::space space); - inline isl::set flatten() const; - inline isl::map flatten_map() const; - inline void foreach_basic_set(const std::function &fn) const; - static inline isl::set from(isl::multi_aff ma); - inline isl::set from_params() const; - static inline isl::set from_union_set(isl::union_set uset); - inline isl::basic_set_list get_basic_set_list() const; - inline isl::space get_space() const; - inline isl::val get_stride(int pos) const; - inline isl::id get_tuple_id() const; + inline basic_set affine_hull() const; + inline set align_params(space model) const; + inline set apply(map map) const; + inline set coalesce() const; + inline set complement() const; + inline set compute_divs() const; + inline set detect_equalities() const; + inline pw_aff dim_max(int pos) const; + inline pw_aff dim_min(int pos) const; + static inline set empty(space space); + inline set flatten() const; + inline map flatten_map() const; + inline void foreach_basic_set(const std::function &fn) const; + static inline set from(multi_aff ma); + inline set from_params() const; + static inline set from_union_set(union_set uset); + inline basic_set_list get_basic_set_list() const; + inline space get_space() const; + inline val get_stride(int pos) const; + inline id get_tuple_id() const; inline std::string get_tuple_name() const; - inline isl::set gist(isl::set context) const; + inline set gist(set context) const; inline bool has_tuple_id() const; inline bool has_tuple_name() const; - inline isl::map identity() const; - inline isl::set intersect(isl::set set2) const; - inline isl::set intersect_params(isl::set params) const; - inline bool involves_param(const isl::id &id) const; - inline bool is_disjoint(const isl::set &set2) const; + inline map identity() const; + inline set intersect(set set2) const; + inline set intersect_params(set params) const; + inline bool involves_param(const id &id) const; + inline bool is_disjoint(const set &set2) const; inline bool is_empty() const; - inline bool is_equal(const isl::set &set2) const; + inline bool is_equal(const set &set2) const; inline bool is_singleton() const; - inline bool is_strict_subset(const isl::set &set2) const; - inline bool is_subset(const isl::set &set2) const; + inline bool is_strict_subset(const set &set2) const; + inline bool is_subset(const set &set2) const; inline bool is_wrapping() const; - inline isl::set lexmax() const; - inline isl::set lexmin() const; - inline isl::val max_val(const isl::aff &obj) const; - inline isl::val min_val(const isl::aff &obj) const; + inline set lexmax() const; + inline set lexmin() const; + inline val max_val(const aff &obj) const; + inline val min_val(const aff &obj) const; inline int n_basic_set() const; inline unsigned int n_dim() const; inline unsigned int n_param() const; - static inline isl::set nat_universe(isl::space dim); - inline isl::set params() const; + static inline set nat_universe(space dim); + inline set params() const; inline bool plain_is_universe() const; - inline isl::basic_set polyhedral_hull() const; - inline isl::set preimage_multi_aff(isl::multi_aff ma) const; - inline isl::set product(isl::set set2) const; - inline isl::set reset_tuple_id() const; - inline isl::basic_set sample() const; - inline isl::point sample_point() const; - inline isl::set set_tuple_id(isl::id id) const; - inline isl::set set_tuple_name(const std::string &s) const; - inline isl::basic_set simple_hull() const; - inline isl::set subtract(isl::set set2) const; - inline isl::set unbind_params(isl::multi_id tuple) const; - inline isl::map unbind_params_insert_domain(isl::multi_id domain) const; - inline isl::set unite(isl::set set2) const; - static inline isl::set universe(isl::space space); - inline isl::basic_set unshifted_simple_hull() const; - inline isl::map unwrap() const; - inline isl::map wrapped_domain_map() const; + inline basic_set polyhedral_hull() const; + inline set preimage_multi_aff(multi_aff ma) const; + inline set product(set set2) const; + inline set reset_tuple_id() const; + inline basic_set sample() const; + inline point sample_point() const; + inline set set_tuple_id(id id) const; + inline set set_tuple_name(const std::string &s) const; + inline basic_set simple_hull() const; + inline set subtract(set set2) const; + inline set unbind_params(multi_id tuple) const; + inline map unbind_params_insert_domain(multi_id domain) const; + inline set unite(set set2) const; + static inline set universe(space space); + inline basic_set unshifted_simple_hull() const; + inline map unwrap() const; + inline map wrapped_domain_map() const; typedef isl_set* isl_ptr_t; }; // declarations for isl::set_list -inline isl::set_list manage(__isl_take isl_set_list *ptr); -inline isl::set_list manage_copy(__isl_keep isl_set_list *ptr); +inline set_list manage(__isl_take isl_set_list *ptr); +inline set_list manage_copy(__isl_keep isl_set_list *ptr); class set_list { - friend inline isl::set_list manage(__isl_take isl_set_list *ptr); - friend inline isl::set_list manage_copy(__isl_keep isl_set_list *ptr); + friend inline set_list manage(__isl_take isl_set_list *ptr); + friend inline set_list manage_copy(__isl_keep isl_set_list *ptr); protected: isl_set_list *ptr = nullptr; @@ -2806,10 +2885,10 @@ class set_list { public: inline /* implicit */ set_list(); - inline /* implicit */ set_list(const isl::set_list &obj); - inline explicit set_list(isl::set el); - inline explicit set_list(isl::ctx ctx, int n); - inline isl::set_list &operator=(isl::set_list obj); + inline /* implicit */ set_list(const set_list &obj); + inline explicit set_list(set el); + inline explicit set_list(ctx ctx, int n); + inline set_list &operator=(set_list obj); inline ~set_list(); inline __isl_give isl_set_list *copy() const &; inline __isl_give isl_set_list *copy() && = delete; @@ -2817,25 +2896,25 @@ class set_list { inline __isl_give isl_set_list *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::set_list add(isl::set el) const; - inline isl::set_list concat(isl::set_list list2) const; - inline isl::set_list drop(unsigned int first, unsigned int n) const; - inline void foreach(const std::function &fn) const; - inline isl::set get_at(int index) const; - inline isl::set_list reverse() const; + inline ctx get_ctx() const; + + inline set_list add(set el) const; + inline set_list concat(set_list list2) const; + inline set_list drop(unsigned int first, unsigned int n) const; + inline void foreach(const std::function &fn) const; + inline set get_at(int index) const; + inline set_list reverse() const; inline int size() const; typedef isl_set_list* isl_ptr_t; }; // declarations for isl::space -inline isl::space manage(__isl_take isl_space *ptr); -inline isl::space manage_copy(__isl_keep isl_space *ptr); +inline space manage(__isl_take isl_space *ptr); +inline space manage_copy(__isl_keep isl_space *ptr); class space { - friend inline isl::space manage(__isl_take isl_space *ptr); - friend inline isl::space manage_copy(__isl_keep isl_space *ptr); + friend inline space manage(__isl_take isl_space *ptr); + friend inline space manage_copy(__isl_keep isl_space *ptr); protected: isl_space *ptr = nullptr; @@ -2844,11 +2923,11 @@ class space { public: inline /* implicit */ space(); - inline /* implicit */ space(const isl::space &obj); - inline explicit space(isl::ctx ctx, unsigned int nparam, unsigned int n_in, unsigned int n_out); - inline explicit space(isl::ctx ctx, unsigned int nparam, unsigned int dim); - inline explicit space(isl::ctx ctx, unsigned int nparam); - inline isl::space &operator=(isl::space obj); + inline /* implicit */ space(const space &obj); + inline explicit space(ctx ctx, unsigned int nparam, unsigned int n_in, unsigned int n_out); + inline explicit space(ctx ctx, unsigned int nparam, unsigned int dim); + inline explicit space(ctx ctx, unsigned int nparam); + inline space &operator=(space obj); inline ~space(); inline __isl_give isl_space *copy() const &; inline __isl_give isl_space *copy() && = delete; @@ -2856,51 +2935,51 @@ class space { inline __isl_give isl_space *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::space add_named_tuple_id_ui(isl::id tuple_id, unsigned int dim) const; - inline isl::space add_param(isl::id id) const; - inline isl::space add_unnamed_tuple_ui(unsigned int dim) const; - inline isl::space align_params(isl::space dim2) const; + inline space add_named_tuple_id_ui(id tuple_id, unsigned int dim) const; + inline space add_param(id id) const; + inline space add_unnamed_tuple_ui(unsigned int dim) const; + inline space align_params(space dim2) const; inline bool can_curry() const; inline bool can_uncurry() const; - inline isl::space curry() const; - inline isl::space domain() const; - inline isl::space domain_map() const; - inline isl::space domain_product(isl::space right) const; - inline isl::space from_domain() const; - inline isl::space from_range() const; - inline isl::id get_map_range_tuple_id() const; - inline bool has_equal_params(const isl::space &space2) const; - inline bool has_equal_tuples(const isl::space &space2) const; - inline bool has_param(const isl::id &id) const; - inline bool is_equal(const isl::space &space2) const; + inline space curry() const; + inline space domain() const; + inline space domain_map() const; + inline space domain_product(space right) const; + inline space from_domain() const; + inline space from_range() const; + inline id get_map_range_tuple_id() const; + inline bool has_equal_params(const space &space2) const; + inline bool has_equal_tuples(const space &space2) const; + inline bool has_param(const id &id) const; + inline bool is_equal(const space &space2) const; inline bool is_params() const; inline bool is_set() const; inline bool is_wrapping() const; - inline isl::space map_from_domain_and_range(isl::space range) const; - inline isl::space map_from_set() const; - inline isl::space params() const; - inline isl::space product(isl::space right) const; - inline isl::space range() const; - inline isl::space range_map() const; - inline isl::space range_product(isl::space right) const; - inline isl::space set_from_params() const; - inline isl::space set_set_tuple_id(isl::id id) const; - inline isl::space uncurry() const; - inline isl::space unwrap() const; - inline isl::space wrap() const; + inline space map_from_domain_and_range(space range) const; + inline space map_from_set() const; + inline space params() const; + inline space product(space right) const; + inline space range() const; + inline space range_map() const; + inline space range_product(space right) const; + inline space set_from_params() const; + inline space set_set_tuple_id(id id) const; + inline space uncurry() const; + inline space unwrap() const; + inline space wrap() const; typedef isl_space* isl_ptr_t; }; // declarations for isl::stride_info -inline isl::stride_info manage(__isl_take isl_stride_info *ptr); -inline isl::stride_info manage_copy(__isl_keep isl_stride_info *ptr); +inline stride_info manage(__isl_take isl_stride_info *ptr); +inline stride_info manage_copy(__isl_keep isl_stride_info *ptr); class stride_info { - friend inline isl::stride_info manage(__isl_take isl_stride_info *ptr); - friend inline isl::stride_info manage_copy(__isl_keep isl_stride_info *ptr); + friend inline stride_info manage(__isl_take isl_stride_info *ptr); + friend inline stride_info manage_copy(__isl_keep isl_stride_info *ptr); protected: isl_stride_info *ptr = nullptr; @@ -2909,8 +2988,8 @@ class stride_info { public: inline /* implicit */ stride_info(); - inline /* implicit */ stride_info(const isl::stride_info &obj); - inline isl::stride_info &operator=(isl::stride_info obj); + inline /* implicit */ stride_info(const stride_info &obj); + inline stride_info &operator=(stride_info obj); inline ~stride_info(); inline __isl_give isl_stride_info *copy() const &; inline __isl_give isl_stride_info *copy() && = delete; @@ -2918,20 +2997,20 @@ class stride_info { inline __isl_give isl_stride_info *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; - inline isl::aff get_offset() const; - inline isl::val get_stride() const; + inline aff get_offset() const; + inline val get_stride() const; typedef isl_stride_info* isl_ptr_t; }; // declarations for isl::union_access_info -inline isl::union_access_info manage(__isl_take isl_union_access_info *ptr); -inline isl::union_access_info manage_copy(__isl_keep isl_union_access_info *ptr); +inline union_access_info manage(__isl_take isl_union_access_info *ptr); +inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr); class union_access_info { - friend inline isl::union_access_info manage(__isl_take isl_union_access_info *ptr); - friend inline isl::union_access_info manage_copy(__isl_keep isl_union_access_info *ptr); + friend inline union_access_info manage(__isl_take isl_union_access_info *ptr); + friend inline union_access_info manage_copy(__isl_keep isl_union_access_info *ptr); protected: isl_union_access_info *ptr = nullptr; @@ -2940,9 +3019,9 @@ class union_access_info { public: inline /* implicit */ union_access_info(); - inline /* implicit */ union_access_info(const isl::union_access_info &obj); - inline explicit union_access_info(isl::union_map sink); - inline isl::union_access_info &operator=(isl::union_access_info obj); + inline /* implicit */ union_access_info(const union_access_info &obj); + inline explicit union_access_info(union_map sink); + inline union_access_info &operator=(union_access_info obj); inline ~union_access_info(); inline __isl_give isl_union_access_info *copy() const &; inline __isl_give isl_union_access_info *copy() && = delete; @@ -2950,25 +3029,25 @@ class union_access_info { inline __isl_give isl_union_access_info *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::union_flow compute_flow() const; - inline isl::union_access_info set_kill(isl::union_map kill) const; - inline isl::union_access_info set_may_source(isl::union_map may_source) const; - inline isl::union_access_info set_must_source(isl::union_map must_source) const; - inline isl::union_access_info set_schedule(isl::schedule schedule) const; - inline isl::union_access_info set_schedule_map(isl::union_map schedule_map) const; + inline union_flow compute_flow() const; + inline union_access_info set_kill(union_map kill) const; + inline union_access_info set_may_source(union_map may_source) const; + inline union_access_info set_must_source(union_map must_source) const; + inline union_access_info set_schedule(schedule schedule) const; + inline union_access_info set_schedule_map(union_map schedule_map) const; typedef isl_union_access_info* isl_ptr_t; }; // declarations for isl::union_flow -inline isl::union_flow manage(__isl_take isl_union_flow *ptr); -inline isl::union_flow manage_copy(__isl_keep isl_union_flow *ptr); +inline union_flow manage(__isl_take isl_union_flow *ptr); +inline union_flow manage_copy(__isl_keep isl_union_flow *ptr); class union_flow { - friend inline isl::union_flow manage(__isl_take isl_union_flow *ptr); - friend inline isl::union_flow manage_copy(__isl_keep isl_union_flow *ptr); + friend inline union_flow manage(__isl_take isl_union_flow *ptr); + friend inline union_flow manage_copy(__isl_keep isl_union_flow *ptr); protected: isl_union_flow *ptr = nullptr; @@ -2977,8 +3056,8 @@ class union_flow { public: inline /* implicit */ union_flow(); - inline /* implicit */ union_flow(const isl::union_flow &obj); - inline isl::union_flow &operator=(isl::union_flow obj); + inline /* implicit */ union_flow(const union_flow &obj); + inline union_flow &operator=(union_flow obj); inline ~union_flow(); inline __isl_give isl_union_flow *copy() const &; inline __isl_give isl_union_flow *copy() && = delete; @@ -2986,25 +3065,25 @@ class union_flow { inline __isl_give isl_union_flow *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::union_map get_full_may_dependence() const; - inline isl::union_map get_full_must_dependence() const; - inline isl::union_map get_may_dependence() const; - inline isl::union_map get_may_no_source() const; - inline isl::union_map get_must_dependence() const; - inline isl::union_map get_must_no_source() const; + inline union_map get_full_may_dependence() const; + inline union_map get_full_must_dependence() const; + inline union_map get_may_dependence() const; + inline union_map get_may_no_source() const; + inline union_map get_must_dependence() const; + inline union_map get_must_no_source() const; typedef isl_union_flow* isl_ptr_t; }; // declarations for isl::union_map -inline isl::union_map manage(__isl_take isl_union_map *ptr); -inline isl::union_map manage_copy(__isl_keep isl_union_map *ptr); +inline union_map manage(__isl_take isl_union_map *ptr); +inline union_map manage_copy(__isl_keep isl_union_map *ptr); class union_map { - friend inline isl::union_map manage(__isl_take isl_union_map *ptr); - friend inline isl::union_map manage_copy(__isl_keep isl_union_map *ptr); + friend inline union_map manage(__isl_take isl_union_map *ptr); + friend inline union_map manage_copy(__isl_keep isl_union_map *ptr); protected: isl_union_map *ptr = nullptr; @@ -3013,11 +3092,11 @@ class union_map { public: inline /* implicit */ union_map(); - inline /* implicit */ union_map(const isl::union_map &obj); - inline /* implicit */ union_map(isl::basic_map bmap); - inline /* implicit */ union_map(isl::map map); - inline explicit union_map(isl::ctx ctx, const std::string &str); - inline isl::union_map &operator=(isl::union_map obj); + inline /* implicit */ union_map(const union_map &obj); + inline /* implicit */ union_map(basic_map bmap); + inline /* implicit */ union_map(map map); + inline explicit union_map(ctx ctx, const std::string &str); + inline union_map &operator=(union_map obj); inline ~union_map(); inline __isl_give isl_union_map *copy() const &; inline __isl_give isl_union_map *copy() && = delete; @@ -3025,87 +3104,87 @@ class union_map { inline __isl_give isl_union_map *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::union_map add_map(isl::map map) const; - inline isl::union_map affine_hull() const; - inline isl::union_map apply_domain(isl::union_map umap2) const; - inline isl::union_map apply_range(isl::union_map umap2) const; - inline isl::union_map coalesce() const; - inline isl::union_map compute_divs() const; - inline isl::union_map curry() const; - inline isl::union_set deltas() const; - inline isl::union_map detect_equalities() const; - inline isl::union_set domain() const; - inline isl::union_map domain_factor_domain() const; - inline isl::union_map domain_factor_range() const; - inline isl::union_map domain_map() const; - inline isl::union_pw_multi_aff domain_map_union_pw_multi_aff() const; - inline isl::union_map domain_product(isl::union_map umap2) const; - static inline isl::union_map empty(isl::space space); - inline isl::union_map eq_at(isl::multi_union_pw_aff mupa) const; - inline isl::map extract_map(isl::space dim) const; - inline isl::union_map factor_domain() const; - inline isl::union_map factor_range() const; - inline isl::union_map fixed_power(isl::val exp) const; - inline isl::union_map flat_range_product(isl::union_map umap2) const; - inline void foreach_map(const std::function &fn) const; - static inline isl::union_map from(isl::union_pw_multi_aff upma); - static inline isl::union_map from(isl::multi_union_pw_aff mupa); - static inline isl::union_map from_domain(isl::union_set uset); - static inline isl::union_map from_domain_and_range(isl::union_set domain, isl::union_set range); - static inline isl::union_map from_range(isl::union_set uset); - inline isl::map_list get_map_list() const; - inline isl::space get_space() const; - inline isl::union_map gist(isl::union_map context) const; - inline isl::union_map gist_domain(isl::union_set uset) const; - inline isl::union_map gist_params(isl::set set) const; - inline isl::union_map gist_range(isl::union_set uset) const; - inline isl::union_map intersect(isl::union_map umap2) const; - inline isl::union_map intersect_domain(isl::union_set uset) const; - inline isl::union_map intersect_params(isl::set set) const; - inline isl::union_map intersect_range(isl::union_set uset) const; + inline union_map add_map(map map) const; + inline union_map affine_hull() const; + inline union_map apply_domain(union_map umap2) const; + inline union_map apply_range(union_map umap2) const; + inline union_map coalesce() const; + inline union_map compute_divs() const; + inline union_map curry() const; + inline union_set deltas() const; + inline union_map detect_equalities() const; + inline union_set domain() const; + inline union_map domain_factor_domain() const; + inline union_map domain_factor_range() const; + inline union_map domain_map() const; + inline union_pw_multi_aff domain_map_union_pw_multi_aff() const; + inline union_map domain_product(union_map umap2) const; + static inline union_map empty(space space); + inline union_map eq_at(multi_union_pw_aff mupa) const; + inline map extract_map(space dim) const; + inline union_map factor_domain() const; + inline union_map factor_range() const; + inline union_map fixed_power(val exp) const; + inline union_map flat_range_product(union_map umap2) const; + inline void foreach_map(const std::function &fn) const; + static inline union_map from(union_pw_multi_aff upma); + static inline union_map from(multi_union_pw_aff mupa); + static inline union_map from_domain(union_set uset); + static inline union_map from_domain_and_range(union_set domain, union_set range); + static inline union_map from_range(union_set uset); + inline map_list get_map_list() const; + inline space get_space() const; + inline union_map gist(union_map context) const; + inline union_map gist_domain(union_set uset) const; + inline union_map gist_params(set set) const; + inline union_map gist_range(union_set uset) const; + inline union_map intersect(union_map umap2) const; + inline union_map intersect_domain(union_set uset) const; + inline union_map intersect_params(set set) const; + inline union_map intersect_range(union_set uset) const; inline bool is_bijective() const; inline bool is_empty() const; - inline bool is_equal(const isl::union_map &umap2) const; + inline bool is_equal(const union_map &umap2) const; inline bool is_injective() const; inline bool is_single_valued() const; - inline bool is_strict_subset(const isl::union_map &umap2) const; - inline bool is_subset(const isl::union_map &umap2) const; - inline isl::union_map lex_gt_at(isl::multi_union_pw_aff mupa) const; - inline isl::union_map lex_lt_at(isl::multi_union_pw_aff mupa) const; - inline isl::union_map lexmax() const; - inline isl::union_map lexmin() const; + inline bool is_strict_subset(const union_map &umap2) const; + inline bool is_subset(const union_map &umap2) const; + inline union_map lex_gt_at(multi_union_pw_aff mupa) const; + inline union_map lex_lt_at(multi_union_pw_aff mupa) const; + inline union_map lexmax() const; + inline union_map lexmin() const; inline int n_map() const; - inline isl::union_map polyhedral_hull() const; - inline isl::union_map preimage_range_multi_aff(isl::multi_aff ma) const; - inline isl::union_map product(isl::union_map umap2) const; - inline isl::union_map project_out_all_params() const; - inline isl::union_set range() const; - inline isl::union_map range_factor_domain() const; - inline isl::union_map range_factor_range() const; - inline isl::union_map range_map() const; - inline isl::union_map range_product(isl::union_map umap2) const; - inline isl::union_map reverse() const; - inline isl::union_map subtract(isl::union_map umap2) const; - inline isl::union_map subtract_domain(isl::union_set dom) const; - inline isl::union_map subtract_range(isl::union_set dom) const; - inline isl::union_map uncurry() const; - inline isl::union_map unite(isl::union_map umap2) const; - inline isl::union_map universe() const; - inline isl::union_set wrap() const; - inline isl::union_map zip() const; + inline union_map polyhedral_hull() const; + inline union_map preimage_range_multi_aff(multi_aff ma) const; + inline union_map product(union_map umap2) const; + inline union_map project_out_all_params() const; + inline union_set range() const; + inline union_map range_factor_domain() const; + inline union_map range_factor_range() const; + inline union_map range_map() const; + inline union_map range_product(union_map umap2) const; + inline union_map reverse() const; + inline union_map subtract(union_map umap2) const; + inline union_map subtract_domain(union_set dom) const; + inline union_map subtract_range(union_set dom) const; + inline union_map uncurry() const; + inline union_map unite(union_map umap2) const; + inline union_map universe() const; + inline union_set wrap() const; + inline union_map zip() const; typedef isl_union_map* isl_ptr_t; }; // declarations for isl::union_pw_aff -inline isl::union_pw_aff manage(__isl_take isl_union_pw_aff *ptr); -inline isl::union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr); +inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr); +inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr); class union_pw_aff { - friend inline isl::union_pw_aff manage(__isl_take isl_union_pw_aff *ptr); - friend inline isl::union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr); + friend inline union_pw_aff manage(__isl_take isl_union_pw_aff *ptr); + friend inline union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr); protected: isl_union_pw_aff *ptr = nullptr; @@ -3114,12 +3193,12 @@ class union_pw_aff { public: inline /* implicit */ union_pw_aff(); - inline /* implicit */ union_pw_aff(const isl::union_pw_aff &obj); - inline /* implicit */ union_pw_aff(isl::pw_aff pa); - inline explicit union_pw_aff(isl::union_set domain, isl::val v); - inline explicit union_pw_aff(isl::union_set domain, isl::aff aff); - inline explicit union_pw_aff(isl::ctx ctx, const std::string &str); - inline isl::union_pw_aff &operator=(isl::union_pw_aff obj); + inline /* implicit */ union_pw_aff(const union_pw_aff &obj); + inline /* implicit */ union_pw_aff(pw_aff pa); + inline explicit union_pw_aff(union_set domain, val v); + inline explicit union_pw_aff(union_set domain, aff aff); + inline explicit union_pw_aff(ctx ctx, const std::string &str); + inline union_pw_aff &operator=(union_pw_aff obj); inline ~union_pw_aff(); inline __isl_give isl_union_pw_aff *copy() const &; inline __isl_give isl_union_pw_aff *copy() && = delete; @@ -3127,42 +3206,42 @@ class union_pw_aff { inline __isl_give isl_union_pw_aff *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::union_pw_aff add(isl::union_pw_aff upa2) const; - inline isl::union_set domain() const; - static inline isl::union_pw_aff empty(isl::space space); - inline isl::pw_aff extract_on_domain(isl::space space) const; - inline isl::pw_aff extract_pw_aff(isl::space space) const; - inline isl::union_pw_aff floor() const; - inline void foreach_pw_aff(const std::function &fn) const; - inline isl::pw_aff_list get_pw_aff_list() const; - inline isl::space get_space() const; - inline isl::union_pw_aff intersect_domain(isl::union_set uset) const; - inline bool involves_param(const isl::id &id) const; - inline isl::val max_val() const; - inline isl::val min_val() const; - inline isl::union_pw_aff mod(isl::val f) const; + inline union_pw_aff add(union_pw_aff upa2) const; + inline union_set domain() const; + static inline union_pw_aff empty(space space); + inline pw_aff extract_on_domain(space space) const; + inline pw_aff extract_pw_aff(space space) const; + inline union_pw_aff floor() const; + inline void foreach_pw_aff(const std::function &fn) const; + inline pw_aff_list get_pw_aff_list() const; + inline space get_space() const; + inline union_pw_aff intersect_domain(union_set uset) const; + inline bool involves_param(const id &id) const; + inline val max_val() const; + inline val min_val() const; + inline union_pw_aff mod(val f) const; inline int n_pw_aff() const; - static inline isl::union_pw_aff param_on_domain(isl::union_set domain, isl::id id); - inline bool plain_is_equal(const isl::union_pw_aff &upa2) const; - inline isl::union_pw_aff pullback(isl::union_pw_multi_aff upma) const; - inline isl::union_pw_aff scale(isl::val v) const; - inline isl::union_pw_aff scale_down(isl::val v) const; - inline isl::union_pw_aff sub(isl::union_pw_aff upa2) const; - inline isl::union_pw_aff union_add(isl::union_pw_aff upa2) const; - inline isl::union_set zero_union_set() const; + static inline union_pw_aff param_on_domain(union_set domain, id id); + inline bool plain_is_equal(const union_pw_aff &upa2) const; + inline union_pw_aff pullback(union_pw_multi_aff upma) const; + inline union_pw_aff scale(val v) const; + inline union_pw_aff scale_down(val v) const; + inline union_pw_aff sub(union_pw_aff upa2) const; + inline union_pw_aff union_add(union_pw_aff upa2) const; + inline union_set zero_union_set() const; typedef isl_union_pw_aff* isl_ptr_t; }; // declarations for isl::union_pw_aff_list -inline isl::union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr); -inline isl::union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr); +inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr); +inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr); class union_pw_aff_list { - friend inline isl::union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr); - friend inline isl::union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr); + friend inline union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr); + friend inline union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr); protected: isl_union_pw_aff_list *ptr = nullptr; @@ -3171,10 +3250,10 @@ class union_pw_aff_list { public: inline /* implicit */ union_pw_aff_list(); - inline /* implicit */ union_pw_aff_list(const isl::union_pw_aff_list &obj); - inline explicit union_pw_aff_list(isl::union_pw_aff el); - inline explicit union_pw_aff_list(isl::ctx ctx, int n); - inline isl::union_pw_aff_list &operator=(isl::union_pw_aff_list obj); + inline /* implicit */ union_pw_aff_list(const union_pw_aff_list &obj); + inline explicit union_pw_aff_list(union_pw_aff el); + inline explicit union_pw_aff_list(ctx ctx, int n); + inline union_pw_aff_list &operator=(union_pw_aff_list obj); inline ~union_pw_aff_list(); inline __isl_give isl_union_pw_aff_list *copy() const &; inline __isl_give isl_union_pw_aff_list *copy() && = delete; @@ -3182,25 +3261,25 @@ class union_pw_aff_list { inline __isl_give isl_union_pw_aff_list *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::union_pw_aff_list add(isl::union_pw_aff el) const; - inline isl::union_pw_aff_list concat(isl::union_pw_aff_list list2) const; - inline isl::union_pw_aff_list drop(unsigned int first, unsigned int n) const; - inline void foreach(const std::function &fn) const; - inline isl::union_pw_aff get_at(int index) const; - inline isl::union_pw_aff_list reverse() const; + inline ctx get_ctx() const; + + inline union_pw_aff_list add(union_pw_aff el) const; + inline union_pw_aff_list concat(union_pw_aff_list list2) const; + inline union_pw_aff_list drop(unsigned int first, unsigned int n) const; + inline void foreach(const std::function &fn) const; + inline union_pw_aff get_at(int index) const; + inline union_pw_aff_list reverse() const; inline int size() const; typedef isl_union_pw_aff_list* isl_ptr_t; }; // declarations for isl::union_pw_multi_aff -inline isl::union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr); -inline isl::union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr); +inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr); +inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr); class union_pw_multi_aff { - friend inline isl::union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr); - friend inline isl::union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr); + friend inline union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr); + friend inline union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr); protected: isl_union_pw_multi_aff *ptr = nullptr; @@ -3209,12 +3288,12 @@ class union_pw_multi_aff { public: inline /* implicit */ union_pw_multi_aff(); - inline /* implicit */ union_pw_multi_aff(const isl::union_pw_multi_aff &obj); - inline /* implicit */ union_pw_multi_aff(isl::pw_multi_aff pma); - inline explicit union_pw_multi_aff(isl::union_set domain, isl::multi_val mv); - inline explicit union_pw_multi_aff(isl::ctx ctx, const std::string &str); - inline /* implicit */ union_pw_multi_aff(isl::union_pw_aff upa); - inline isl::union_pw_multi_aff &operator=(isl::union_pw_multi_aff obj); + inline /* implicit */ union_pw_multi_aff(const union_pw_multi_aff &obj); + inline /* implicit */ union_pw_multi_aff(pw_multi_aff pma); + inline explicit union_pw_multi_aff(union_set domain, multi_val mv); + inline explicit union_pw_multi_aff(ctx ctx, const std::string &str); + inline /* implicit */ union_pw_multi_aff(union_pw_aff upa); + inline union_pw_multi_aff &operator=(union_pw_multi_aff obj); inline ~union_pw_multi_aff(); inline __isl_give isl_union_pw_multi_aff *copy() const &; inline __isl_give isl_union_pw_multi_aff *copy() && = delete; @@ -3222,33 +3301,33 @@ class union_pw_multi_aff { inline __isl_give isl_union_pw_multi_aff *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::union_pw_multi_aff add(isl::union_pw_multi_aff upma2) const; - inline isl::union_set domain() const; - inline isl::pw_multi_aff extract_pw_multi_aff(isl::space space) const; - inline isl::union_pw_multi_aff flat_range_product(isl::union_pw_multi_aff upma2) const; - inline void foreach_pw_multi_aff(const std::function &fn) const; - static inline isl::union_pw_multi_aff from(isl::union_map umap); - static inline isl::union_pw_multi_aff from_multi_union_pw_aff(isl::multi_union_pw_aff mupa); - inline isl::space get_space() const; - inline isl::union_pw_aff get_union_pw_aff(int pos) const; + inline union_pw_multi_aff add(union_pw_multi_aff upma2) const; + inline union_set domain() const; + inline pw_multi_aff extract_pw_multi_aff(space space) const; + inline union_pw_multi_aff flat_range_product(union_pw_multi_aff upma2) const; + inline void foreach_pw_multi_aff(const std::function &fn) const; + static inline union_pw_multi_aff from(union_map umap); + static inline union_pw_multi_aff from_multi_union_pw_aff(multi_union_pw_aff mupa); + inline space get_space() const; + inline union_pw_aff get_union_pw_aff(int pos) const; inline int n_pw_multi_aff() const; - inline isl::union_pw_multi_aff pullback(isl::union_pw_multi_aff upma2) const; - inline isl::union_pw_multi_aff scale(isl::val val) const; - inline isl::union_pw_multi_aff scale_down(isl::val val) const; - inline isl::union_pw_multi_aff union_add(isl::union_pw_multi_aff upma2) const; + inline union_pw_multi_aff pullback(union_pw_multi_aff upma2) const; + inline union_pw_multi_aff scale(val val) const; + inline union_pw_multi_aff scale_down(val val) const; + inline union_pw_multi_aff union_add(union_pw_multi_aff upma2) const; typedef isl_union_pw_multi_aff* isl_ptr_t; }; // declarations for isl::union_set -inline isl::union_set manage(__isl_take isl_union_set *ptr); -inline isl::union_set manage_copy(__isl_keep isl_union_set *ptr); +inline union_set manage(__isl_take isl_union_set *ptr); +inline union_set manage_copy(__isl_keep isl_union_set *ptr); class union_set { - friend inline isl::union_set manage(__isl_take isl_union_set *ptr); - friend inline isl::union_set manage_copy(__isl_keep isl_union_set *ptr); + friend inline union_set manage(__isl_take isl_union_set *ptr); + friend inline union_set manage_copy(__isl_keep isl_union_set *ptr); protected: isl_union_set *ptr = nullptr; @@ -3257,12 +3336,12 @@ class union_set { public: inline /* implicit */ union_set(); - inline /* implicit */ union_set(const isl::union_set &obj); - inline /* implicit */ union_set(isl::basic_set bset); - inline /* implicit */ union_set(isl::set set); - inline /* implicit */ union_set(isl::point pnt); - inline explicit union_set(isl::ctx ctx, const std::string &str); - inline isl::union_set &operator=(isl::union_set obj); + inline /* implicit */ union_set(const union_set &obj); + inline /* implicit */ union_set(basic_set bset); + inline /* implicit */ union_set(set set); + inline /* implicit */ union_set(point pnt); + inline explicit union_set(ctx ctx, const std::string &str); + inline union_set &operator=(union_set obj); inline ~union_set(); inline __isl_give isl_union_set *copy() const &; inline __isl_give isl_union_set *copy() && = delete; @@ -3270,58 +3349,58 @@ class union_set { inline __isl_give isl_union_set *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::union_set add_set(isl::set set) const; - inline isl::union_set affine_hull() const; - inline isl::union_set apply(isl::union_map umap) const; - inline isl::union_set coalesce() const; - inline isl::union_set compute_divs() const; - inline isl::union_set detect_equalities() const; - static inline isl::union_set empty(isl::space space); - inline bool every_set(const std::function &test) const; - inline isl::set extract_set(isl::space dim) const; - inline void foreach_point(const std::function &fn) const; - inline void foreach_set(const std::function &fn) const; - inline isl::set_list get_set_list() const; - inline isl::space get_space() const; - inline isl::union_set gist(isl::union_set context) const; - inline isl::union_set gist_params(isl::set set) const; - inline isl::union_map identity() const; - inline isl::union_set intersect(isl::union_set uset2) const; - inline isl::union_set intersect_params(isl::set set) const; - inline bool involves_param(const isl::id &id) const; - inline bool is_disjoint(const isl::union_set &uset2) const; + inline union_set add_set(set set) const; + inline union_set affine_hull() const; + inline union_set apply(union_map umap) const; + inline union_set coalesce() const; + inline union_set compute_divs() const; + inline union_set detect_equalities() const; + static inline union_set empty(space space); + inline bool every_set(const std::function &test) const; + inline set extract_set(space dim) const; + inline void foreach_point(const std::function &fn) const; + inline void foreach_set(const std::function &fn) const; + inline set_list get_set_list() const; + inline space get_space() const; + inline union_set gist(union_set context) const; + inline union_set gist_params(set set) const; + inline union_map identity() const; + inline union_set intersect(union_set uset2) const; + inline union_set intersect_params(set set) const; + inline bool involves_param(const id &id) const; + inline bool is_disjoint(const union_set &uset2) const; inline bool is_empty() const; - inline bool is_equal(const isl::union_set &uset2) const; + inline bool is_equal(const union_set &uset2) const; inline bool is_params() const; - inline bool is_strict_subset(const isl::union_set &uset2) const; - inline bool is_subset(const isl::union_set &uset2) const; - inline isl::union_set lexmax() const; - inline isl::union_set lexmin() const; + inline bool is_strict_subset(const union_set &uset2) const; + inline bool is_subset(const union_set &uset2) const; + inline union_set lexmax() const; + inline union_set lexmin() const; inline int n_set() const; - inline isl::set params() const; - inline isl::union_set polyhedral_hull() const; - inline isl::union_set preimage(isl::multi_aff ma) const; - inline isl::union_set preimage(isl::pw_multi_aff pma) const; - inline isl::union_set preimage(isl::union_pw_multi_aff upma) const; - inline isl::point sample_point() const; - inline isl::union_set subtract(isl::union_set uset2) const; - inline isl::union_set unite(isl::union_set uset2) const; - inline isl::union_set universe() const; - inline isl::union_map unwrap() const; - inline isl::union_map wrapped_domain_map() const; + inline set params() const; + inline union_set polyhedral_hull() const; + inline union_set preimage(multi_aff ma) const; + inline union_set preimage(pw_multi_aff pma) const; + inline union_set preimage(union_pw_multi_aff upma) const; + inline point sample_point() const; + inline union_set subtract(union_set uset2) const; + inline union_set unite(union_set uset2) const; + inline union_set universe() const; + inline union_map unwrap() const; + inline union_map wrapped_domain_map() const; typedef isl_union_set* isl_ptr_t; }; // declarations for isl::union_set_list -inline isl::union_set_list manage(__isl_take isl_union_set_list *ptr); -inline isl::union_set_list manage_copy(__isl_keep isl_union_set_list *ptr); +inline union_set_list manage(__isl_take isl_union_set_list *ptr); +inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr); class union_set_list { - friend inline isl::union_set_list manage(__isl_take isl_union_set_list *ptr); - friend inline isl::union_set_list manage_copy(__isl_keep isl_union_set_list *ptr); + friend inline union_set_list manage(__isl_take isl_union_set_list *ptr); + friend inline union_set_list manage_copy(__isl_keep isl_union_set_list *ptr); protected: isl_union_set_list *ptr = nullptr; @@ -3330,10 +3409,10 @@ class union_set_list { public: inline /* implicit */ union_set_list(); - inline /* implicit */ union_set_list(const isl::union_set_list &obj); - inline explicit union_set_list(isl::union_set el); - inline explicit union_set_list(isl::ctx ctx, int n); - inline isl::union_set_list &operator=(isl::union_set_list obj); + inline /* implicit */ union_set_list(const union_set_list &obj); + inline explicit union_set_list(union_set el); + inline explicit union_set_list(ctx ctx, int n); + inline union_set_list &operator=(union_set_list obj); inline ~union_set_list(); inline __isl_give isl_union_set_list *copy() const &; inline __isl_give isl_union_set_list *copy() && = delete; @@ -3341,25 +3420,25 @@ class union_set_list { inline __isl_give isl_union_set_list *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::union_set_list add(isl::union_set el) const; - inline isl::union_set_list concat(isl::union_set_list list2) const; - inline isl::union_set_list drop(unsigned int first, unsigned int n) const; - inline void foreach(const std::function &fn) const; - inline isl::union_set get_at(int index) const; - inline isl::union_set_list reverse() const; + inline ctx get_ctx() const; + + inline union_set_list add(union_set el) const; + inline union_set_list concat(union_set_list list2) const; + inline union_set_list drop(unsigned int first, unsigned int n) const; + inline void foreach(const std::function &fn) const; + inline union_set get_at(int index) const; + inline union_set_list reverse() const; inline int size() const; typedef isl_union_set_list* isl_ptr_t; }; // declarations for isl::val -inline isl::val manage(__isl_take isl_val *ptr); -inline isl::val manage_copy(__isl_keep isl_val *ptr); +inline val manage(__isl_take isl_val *ptr); +inline val manage_copy(__isl_keep isl_val *ptr); class val { - friend inline isl::val manage(__isl_take isl_val *ptr); - friend inline isl::val manage_copy(__isl_keep isl_val *ptr); + friend inline val manage(__isl_take isl_val *ptr); + friend inline val manage_copy(__isl_keep isl_val *ptr); protected: isl_val *ptr = nullptr; @@ -3368,10 +3447,10 @@ class val { public: inline /* implicit */ val(); - inline /* implicit */ val(const isl::val &obj); - inline explicit val(isl::ctx ctx, const std::string &str); - inline explicit val(isl::ctx ctx, long i); - inline isl::val &operator=(isl::val obj); + inline /* implicit */ val(const val &obj); + inline explicit val(ctx ctx, const std::string &str); + inline explicit val(ctx ctx, long i); + inline val &operator=(val obj); inline ~val(); inline __isl_give isl_val *copy() const &; inline __isl_give isl_val *copy() && = delete; @@ -3379,25 +3458,25 @@ class val { inline __isl_give isl_val *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; + inline ctx get_ctx() const; inline std::string to_str() const; - inline isl::val abs() const; - inline bool abs_eq(const isl::val &v2) const; - inline isl::val add(isl::val v2) const; - inline isl::val ceil() const; + inline val abs() const; + inline bool abs_eq(const val &v2) const; + inline val add(val v2) const; + inline val ceil() const; inline int cmp_si(long i) const; - inline isl::val div(isl::val v2) const; - inline bool eq(const isl::val &v2) const; - inline isl::val floor() const; - inline isl::val gcd(isl::val v2) const; - inline bool ge(const isl::val &v2) const; + inline val div(val v2) const; + inline bool eq(const val &v2) const; + inline val floor() const; + inline val gcd(val v2) const; + inline bool ge(const val &v2) const; inline long get_den_si() const; inline long get_num_si() const; - inline bool gt(const isl::val &v2) const; - static inline isl::val infty(isl::ctx ctx); - inline isl::val inv() const; - inline bool is_divisible_by(const isl::val &v2) const; + inline bool gt(const val &v2) const; + static inline val infty(ctx ctx); + inline val inv() const; + inline bool is_divisible_by(const val &v2) const; inline bool is_infty() const; inline bool is_int() const; inline bool is_nan() const; @@ -3410,32 +3489,32 @@ class val { inline bool is_pos() const; inline bool is_rat() const; inline bool is_zero() const; - inline bool le(const isl::val &v2) const; - inline bool lt(const isl::val &v2) const; - inline isl::val max(isl::val v2) const; - inline isl::val min(isl::val v2) const; - inline isl::val mod(isl::val v2) const; - inline isl::val mul(isl::val v2) const; - static inline isl::val nan(isl::ctx ctx); - inline bool ne(const isl::val &v2) const; - inline isl::val neg() const; - static inline isl::val neginfty(isl::ctx ctx); - static inline isl::val negone(isl::ctx ctx); - static inline isl::val one(isl::ctx ctx); + inline bool le(const val &v2) const; + inline bool lt(const val &v2) const; + inline val max(val v2) const; + inline val min(val v2) const; + inline val mod(val v2) const; + inline val mul(val v2) const; + static inline val nan(ctx ctx); + inline bool ne(const val &v2) const; + inline val neg() const; + static inline val neginfty(ctx ctx); + static inline val negone(ctx ctx); + static inline val one(ctx ctx); inline int sgn() const; - inline isl::val sub(isl::val v2) const; - inline isl::val trunc() const; - static inline isl::val zero(isl::ctx ctx); + inline val sub(val v2) const; + inline val trunc() const; + static inline val zero(ctx ctx); typedef isl_val* isl_ptr_t; }; // declarations for isl::val_list -inline isl::val_list manage(__isl_take isl_val_list *ptr); -inline isl::val_list manage_copy(__isl_keep isl_val_list *ptr); +inline val_list manage(__isl_take isl_val_list *ptr); +inline val_list manage_copy(__isl_keep isl_val_list *ptr); class val_list { - friend inline isl::val_list manage(__isl_take isl_val_list *ptr); - friend inline isl::val_list manage_copy(__isl_keep isl_val_list *ptr); + friend inline val_list manage(__isl_take isl_val_list *ptr); + friend inline val_list manage_copy(__isl_keep isl_val_list *ptr); protected: isl_val_list *ptr = nullptr; @@ -3444,10 +3523,10 @@ class val_list { public: inline /* implicit */ val_list(); - inline /* implicit */ val_list(const isl::val_list &obj); - inline explicit val_list(isl::val el); - inline explicit val_list(isl::ctx ctx, int n); - inline isl::val_list &operator=(isl::val_list obj); + inline /* implicit */ val_list(const val_list &obj); + inline explicit val_list(val el); + inline explicit val_list(ctx ctx, int n); + inline val_list &operator=(val_list obj); inline ~val_list(); inline __isl_give isl_val_list *copy() const &; inline __isl_give isl_val_list *copy() && = delete; @@ -3455,83 +3534,85 @@ class val_list { inline __isl_give isl_val_list *release(); inline bool is_null() const; inline explicit operator bool() const; - inline isl::ctx get_ctx() const; - - inline isl::val_list add(isl::val el) const; - inline isl::val_list concat(isl::val_list list2) const; - inline isl::val_list drop(unsigned int first, unsigned int n) const; - inline void foreach(const std::function &fn) const; - inline isl::val get_at(int index) const; - inline isl::val_list reverse() const; + inline ctx get_ctx() const; + + inline val_list add(val el) const; + inline val_list concat(val_list list2) const; + inline val_list drop(unsigned int first, unsigned int n) const; + inline void foreach(const std::function &fn) const; + inline val get_at(int index) const; + inline val_list reverse() const; inline int size() const; typedef isl_val_list* isl_ptr_t; }; // implementations for isl::aff -isl::aff manage(__isl_take isl_aff *ptr) { +aff manage(__isl_take isl_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return aff(ptr); } -isl::aff manage_copy(__isl_keep isl_aff *ptr) { +aff manage_copy(__isl_keep isl_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_aff_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_aff_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return aff(ptr); } aff::aff() : ptr(nullptr) {} -aff::aff(const isl::aff &obj) - : ptr(obj.copy()) +aff::aff(const aff &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_aff_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_aff_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } aff::aff(__isl_take isl_aff *ptr) : ptr(ptr) {} -aff::aff(isl::local_space ls) +aff::aff(local_space ls) { if (ls.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = ls.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_zero_on_domain(ls.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -aff::aff(isl::local_space ls, isl::val val) +aff::aff(local_space ls, val val) { if (ls.is_null() || val.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = ls.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_val_on_domain(ls.release(), val.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -aff::aff(isl::ctx ctx, const std::string &str) +aff::aff(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -aff &aff::operator=(isl::aff obj) { +aff &aff::operator=(aff obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -3579,461 +3660,462 @@ std::string aff::to_str() const { } -isl::ctx aff::get_ctx() const { - return isl::ctx(isl_aff_get_ctx(ptr)); +ctx aff::get_ctx() const { + return ctx(isl_aff_get_ctx(ptr)); } -isl::aff aff::add(isl::aff aff2) const +aff aff::add(aff aff2) const { if (!ptr || aff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_add(copy(), aff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::add_constant(isl::val v) const +aff aff::add_constant(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_add_constant_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::add_constant_si(int v) const +aff aff::add_constant_si(int v) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_add_constant_si(copy(), v); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::ceil() const +aff aff::ceil() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_ceil(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::div(isl::aff aff2) const +aff aff::div(aff aff2) const { if (!ptr || aff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_div(copy(), aff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set aff::eq_set(isl::aff aff2) const +set aff::eq_set(aff aff2) const { if (!ptr || aff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_eq_set(copy(), aff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val aff::eval(isl::point pnt) const +val aff::eval(point pnt) const { if (!ptr || pnt.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_eval(copy(), pnt.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::floor() const +aff aff::floor() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_floor(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set aff::ge_set(isl::aff aff2) const +set aff::ge_set(aff aff2) const { if (!ptr || aff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_ge_set(copy(), aff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val aff::get_constant_val() const +val aff::get_constant_val() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_get_constant_val(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val aff::get_denominator_val() const +val aff::get_denominator_val() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_get_denominator_val(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::get_div(int pos) const +aff aff::get_div(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_get_div(get(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::local_space aff::get_local_space() const +local_space aff::get_local_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_get_local_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space aff::get_space() const +space aff::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set aff::gt_set(isl::aff aff2) const +set aff::gt_set(aff aff2) const { if (!ptr || aff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_gt_set(copy(), aff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set aff::le_set(isl::aff aff2) const +set aff::le_set(aff aff2) const { if (!ptr || aff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_le_set(copy(), aff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set aff::lt_set(isl::aff aff2) const +set aff::lt_set(aff aff2) const { if (!ptr || aff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_lt_set(copy(), aff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::mod(isl::val mod) const +aff aff::mod(val mod) const { if (!ptr || mod.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_mod_val(copy(), mod.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::mul(isl::aff aff2) const +aff aff::mul(aff aff2) const { if (!ptr || aff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_mul(copy(), aff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set aff::ne_set(isl::aff aff2) const +set aff::ne_set(aff aff2) const { if (!ptr || aff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_ne_set(copy(), aff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::neg() const +aff aff::neg() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_neg(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::param_on_domain_space(isl::space space, isl::id id) +aff aff::param_on_domain_space(space space, id id) { if (space.is_null() || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_param_on_domain_space_id(space.release(), id.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -bool aff::plain_is_equal(const isl::aff &aff2) const +bool aff::plain_is_equal(const aff &aff2) const { if (!ptr || aff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_plain_is_equal(get(), aff2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::aff aff::project_domain_on_params() const +aff aff::project_domain_on_params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_project_domain_on_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::pullback(isl::multi_aff ma) const +aff aff::pullback(multi_aff ma) const { if (!ptr || ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_pullback_multi_aff(copy(), ma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::scale(isl::val v) const +aff aff::scale(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_scale_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::scale_down(isl::val v) const +aff aff::scale_down(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_scale_down_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::scale_down_ui(unsigned int f) const +aff aff::scale_down_ui(unsigned int f) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_scale_down_ui(copy(), f); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::set_constant_si(int v) const +aff aff::set_constant_si(int v) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_set_constant_si(copy(), v); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::set_constant_val(isl::val v) const +aff aff::set_constant_val(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_set_constant_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::sub(isl::aff aff2) const +aff aff::sub(aff aff2) const { if (!ptr || aff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_sub(copy(), aff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::unbind_params_insert_domain(isl::multi_id domain) const +aff aff::unbind_params_insert_domain(multi_id domain) const { if (!ptr || domain.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_unbind_params_insert_domain(copy(), domain.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff aff::zero_on_domain(isl::space space) +aff aff::zero_on_domain(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_zero_on_domain_space(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::aff_list -isl::aff_list manage(__isl_take isl_aff_list *ptr) { +aff_list manage(__isl_take isl_aff_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return aff_list(ptr); } -isl::aff_list manage_copy(__isl_keep isl_aff_list *ptr) { +aff_list manage_copy(__isl_keep isl_aff_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_aff_list_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_aff_list_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return aff_list(ptr); } aff_list::aff_list() : ptr(nullptr) {} -aff_list::aff_list(const isl::aff_list &obj) - : ptr(obj.copy()) +aff_list::aff_list(const aff_list &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_aff_list_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_aff_list_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } aff_list::aff_list(__isl_take isl_aff_list *ptr) : ptr(ptr) {} -aff_list::aff_list(isl::aff el) +aff_list::aff_list(aff el) { if (el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = el.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_list_from_aff(el.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -aff_list::aff_list(isl::ctx ctx, int n) +aff_list::aff_list(ctx ctx, int n) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_list_alloc(ctx.release(), n); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -aff_list &aff_list::operator=(isl::aff_list obj) { +aff_list &aff_list::operator=(aff_list obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -4067,62 +4149,62 @@ aff_list::operator bool() const -isl::ctx aff_list::get_ctx() const { - return isl::ctx(isl_aff_list_get_ctx(ptr)); +ctx aff_list::get_ctx() const { + return ctx(isl_aff_list_get_ctx(ptr)); } -isl::aff_list aff_list::add(isl::aff el) const +aff_list aff_list::add(aff el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_list_add(copy(), el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff_list aff_list::concat(isl::aff_list list2) const +aff_list aff_list::concat(aff_list list2) const { if (!ptr || list2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_list_concat(copy(), list2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff_list aff_list::drop(unsigned int first, unsigned int n) const +aff_list aff_list::drop(unsigned int first, unsigned int n) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_list_drop(copy(), first, n); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void aff_list::foreach(const std::function &fn) const +void aff_list::foreach(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_aff *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -4131,86 +4213,90 @@ void aff_list::foreach(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::aff aff_list::get_at(int index) const +aff aff_list::get_at(int index) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_list_get_at(get(), index); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff_list aff_list::reverse() const +aff_list aff_list::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_list_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int aff_list::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_aff_list_size(get()); return res; } // implementations for isl::ast_build -isl::ast_build manage(__isl_take isl_ast_build *ptr) { +ast_build manage(__isl_take isl_ast_build *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return ast_build(ptr); } -isl::ast_build manage_copy(__isl_keep isl_ast_build *ptr) { +ast_build manage_copy(__isl_keep isl_ast_build *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_ast_build_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_ast_build_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return ast_build(ptr); } ast_build::ast_build() : ptr(nullptr) {} -ast_build::ast_build(const isl::ast_build &obj) - : ptr(obj.copy()) +ast_build::ast_build(const ast_build &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_ast_build_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); copy_callbacks(obj); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_ast_build_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } ast_build::ast_build(__isl_take isl_ast_build *ptr) : ptr(ptr) {} -ast_build::ast_build(isl::ctx ctx) +ast_build::ast_build(ctx ctx) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_alloc(ctx.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -ast_build &ast_build::operator=(isl::ast_build obj) { +ast_build &ast_build::operator=(ast_build obj) { std::swap(this->ptr, obj.ptr); copy_callbacks(obj); return *this; @@ -4231,8 +4317,7 @@ __isl_keep isl_ast_build *ast_build::get() const { __isl_give isl_ast_build *ast_build::release() { if (at_each_domain_data) - throw isl::exception::create(isl_error_invalid, - "cannot release object with persistent callbacks", __FILE__, __LINE__); + exception::throw_invalid("cannot release object with persistent callbacks", __FILE__, __LINE__); isl_ast_build *tmp = ptr; ptr = nullptr; return tmp; @@ -4248,11 +4333,11 @@ ast_build::operator bool() const -isl::ctx ast_build::get_ctx() const { - return isl::ctx(isl_ast_build_get_ctx(ptr)); +ctx ast_build::get_ctx() const { + return ctx(isl_ast_build_get_ctx(ptr)); } -ast_build &ast_build::copy_callbacks(const isl::ast_build &obj) +ast_build &ast_build::copy_callbacks(const ast_build &obj) { at_each_domain_data = obj.at_each_domain_data; return *this; @@ -4261,41 +4346,41 @@ ast_build &ast_build::copy_callbacks(const isl::ast_build &obj) isl_ast_node *ast_build::at_each_domain(isl_ast_node *arg_0, isl_ast_build *arg_1, void *arg_2) { auto *data = static_cast(arg_2); - try { - auto ret = (data->func)(isl::manage(arg_0), isl::manage_copy(arg_1)); + ISL_CPP_TRY { + auto ret = (data->func)(manage(arg_0), manage_copy(arg_1)); return ret.release(); - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return NULL; } } -void ast_build::set_at_each_domain_data(const std::function &fn) +void ast_build::set_at_each_domain_data(const std::function &fn) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_ast_build_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); at_each_domain_data = std::make_shared(); at_each_domain_data->func = fn; ptr = isl_ast_build_set_at_each_domain(ptr, &at_each_domain, at_each_domain_data.get()); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); } -isl::ast_build ast_build::set_at_each_domain(const std::function &fn) const +ast_build ast_build::set_at_each_domain(const std::function &fn) const { auto copy = *this; copy.set_at_each_domain_data(fn); return copy; } -isl::ast_expr ast_build::access_from(isl::pw_multi_aff pma) const +ast_expr ast_build::access_from(pw_multi_aff pma) const { if (!ptr || pma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_access_from_pw_multi_aff(get(), pma.release()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4303,16 +4388,16 @@ isl::ast_expr ast_build::access_from(isl::pw_multi_aff pma) const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_expr ast_build::access_from(isl::multi_pw_aff mpa) const +ast_expr ast_build::access_from(multi_pw_aff mpa) const { if (!ptr || mpa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_access_from_multi_pw_aff(get(), mpa.release()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4320,16 +4405,16 @@ isl::ast_expr ast_build::access_from(isl::multi_pw_aff mpa) const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_node ast_build::ast_from_schedule(isl::union_map schedule) const +ast_node ast_build::ast_from_schedule(union_map schedule) const { if (!ptr || schedule.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_ast_from_schedule(get(), schedule.release()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4337,16 +4422,16 @@ isl::ast_node ast_build::ast_from_schedule(isl::union_map schedule) const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_expr ast_build::call_from(isl::pw_multi_aff pma) const +ast_expr ast_build::call_from(pw_multi_aff pma) const { if (!ptr || pma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_call_from_pw_multi_aff(get(), pma.release()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4354,16 +4439,16 @@ isl::ast_expr ast_build::call_from(isl::pw_multi_aff pma) const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_expr ast_build::call_from(isl::multi_pw_aff mpa) const +ast_expr ast_build::call_from(multi_pw_aff mpa) const { if (!ptr || mpa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_call_from_multi_pw_aff(get(), mpa.release()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4371,16 +4456,16 @@ isl::ast_expr ast_build::call_from(isl::multi_pw_aff mpa) const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_expr ast_build::expr_from(isl::set set) const +ast_expr ast_build::expr_from(set set) const { if (!ptr || set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_expr_from_set(get(), set.release()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4388,16 +4473,16 @@ isl::ast_expr ast_build::expr_from(isl::set set) const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_expr ast_build::expr_from(isl::pw_aff pa) const +ast_expr ast_build::expr_from(pw_aff pa) const { if (!ptr || pa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_expr_from_pw_aff(get(), pa.release()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4405,29 +4490,28 @@ isl::ast_expr ast_build::expr_from(isl::pw_aff pa) const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_build ast_build::from_context(isl::set set) +ast_build ast_build::from_context(set set) { if (set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = set.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_from_context(set.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map ast_build::get_schedule() const +union_map ast_build::get_schedule() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_get_schedule(get()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4435,16 +4519,16 @@ isl::union_map ast_build::get_schedule() const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space ast_build::get_schedule_space() const +space ast_build::get_schedule_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_get_schedule_space(get()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4452,16 +4536,16 @@ isl::space ast_build::get_schedule_space() const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_node ast_build::node_from(isl::schedule schedule) const +ast_node ast_build::node_from(schedule schedule) const { if (!ptr || schedule.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_node_from_schedule(get(), schedule.release()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4469,16 +4553,16 @@ isl::ast_node ast_build::node_from(isl::schedule schedule) const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_node ast_build::node_from_schedule_map(isl::union_map schedule) const +ast_node ast_build::node_from_schedule_map(union_map schedule) const { if (!ptr || schedule.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_node_from_schedule_map(get(), schedule.release()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4486,16 +4570,16 @@ isl::ast_node ast_build::node_from_schedule_map(isl::union_map schedule) const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_build ast_build::set_iterators(isl::id_list iterators) const +ast_build ast_build::set_iterators(id_list iterators) const { if (!ptr || iterators.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_build_set_iterators(copy(), iterators.release()); if (at_each_domain_data && at_each_domain_data->eptr) { std::exception_ptr eptr = at_each_domain_data->eptr; @@ -4503,43 +4587,47 @@ isl::ast_build ast_build::set_iterators(isl::id_list iterators) const std::rethrow_exception(eptr); } if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res).copy_callbacks(*this); } // implementations for isl::ast_expr -isl::ast_expr manage(__isl_take isl_ast_expr *ptr) { +ast_expr manage(__isl_take isl_ast_expr *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return ast_expr(ptr); } -isl::ast_expr manage_copy(__isl_keep isl_ast_expr *ptr) { +ast_expr manage_copy(__isl_keep isl_ast_expr *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_ast_expr_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_ast_expr_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return ast_expr(ptr); } ast_expr::ast_expr() : ptr(nullptr) {} -ast_expr::ast_expr(const isl::ast_expr &obj) - : ptr(obj.copy()) +ast_expr::ast_expr(const ast_expr &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_ast_expr_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_ast_expr_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } ast_expr::ast_expr(__isl_take isl_ast_expr *ptr) : ptr(ptr) {} -ast_expr &ast_expr::operator=(isl::ast_expr obj) { +ast_expr &ast_expr::operator=(ast_expr obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -4595,8 +4683,7 @@ template bool ast_expr::isa() { if (is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return isl_ast_expr_get_type(get()) == T::type; } template @@ -4605,40 +4692,40 @@ T ast_expr::as() return isa() ? T(copy()) : T(); } -isl::ctx ast_expr::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_expr::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } -bool ast_expr::is_equal(const isl::ast_expr &expr2) const +bool ast_expr::is_equal(const ast_expr &expr2) const { if (!ptr || expr2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_expr_is_equal(get(), expr2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::ast_expr ast_expr::set_op_arg(int pos, isl::ast_expr arg) const +ast_expr ast_expr::set_op_arg(int pos, ast_expr arg) const { if (!ptr || arg.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_expr_set_op_arg(copy(), pos, arg.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } std::string ast_expr::to_C_str() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_expr_to_C_str(get()); std::string tmp(res); free(res); @@ -4650,7 +4737,7 @@ std::string ast_expr::to_C_str() const ast_expr_id::ast_expr_id() : ast_expr() {} -ast_expr_id::ast_expr_id(const isl::ast_expr_id &obj) +ast_expr_id::ast_expr_id(const ast_expr_id &obj) : ast_expr(obj) { } @@ -4659,7 +4746,7 @@ ast_expr_id::ast_expr_id(__isl_take isl_ast_expr *ptr) : ast_expr(ptr) {} -ast_expr_id &ast_expr_id::operator=(isl::ast_expr_id obj) { +ast_expr_id &ast_expr_id::operator=(ast_expr_id obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -4686,19 +4773,19 @@ std::string ast_expr_id::to_str() const { } -isl::ctx ast_expr_id::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_expr_id::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } -isl::id ast_expr_id::get_id() const +id ast_expr_id::get_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_expr_id_get_id(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -4707,7 +4794,7 @@ isl::id ast_expr_id::get_id() const ast_expr_int::ast_expr_int() : ast_expr() {} -ast_expr_int::ast_expr_int(const isl::ast_expr_int &obj) +ast_expr_int::ast_expr_int(const ast_expr_int &obj) : ast_expr(obj) { } @@ -4716,7 +4803,7 @@ ast_expr_int::ast_expr_int(__isl_take isl_ast_expr *ptr) : ast_expr(ptr) {} -ast_expr_int &ast_expr_int::operator=(isl::ast_expr_int obj) { +ast_expr_int &ast_expr_int::operator=(ast_expr_int obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -4743,19 +4830,19 @@ std::string ast_expr_int::to_str() const { } -isl::ctx ast_expr_int::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_expr_int::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } -isl::val ast_expr_int::get_val() const +val ast_expr_int::get_val() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_expr_int_get_val(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -4764,7 +4851,7 @@ isl::val ast_expr_int::get_val() const ast_expr_op::ast_expr_op() : ast_expr() {} -ast_expr_op::ast_expr_op(const isl::ast_expr_op &obj) +ast_expr_op::ast_expr_op(const ast_expr_op &obj) : ast_expr(obj) { } @@ -4773,7 +4860,7 @@ ast_expr_op::ast_expr_op(__isl_take isl_ast_expr *ptr) : ast_expr(ptr) {} -ast_expr_op &ast_expr_op::operator=(isl::ast_expr_op obj) { +ast_expr_op &ast_expr_op::operator=(ast_expr_op obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -4804,8 +4891,7 @@ template bool ast_expr_op::isa() { if (is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return isl_ast_expr_op_get_type(get()) == T::type; } template @@ -4814,65 +4900,69 @@ T ast_expr_op::as() return isa() ? T(copy()) : T(); } -isl::ctx ast_expr_op::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_expr_op::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } -isl::ast_expr ast_expr_op::get_arg(int pos) const +ast_expr ast_expr_op::get_arg(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_expr_op_get_arg(get(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int ast_expr_op::get_n_arg() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_expr_op_get_n_arg(get()); return res; } // implementations for isl::ast_node -isl::ast_node manage(__isl_take isl_ast_node *ptr) { +ast_node manage(__isl_take isl_ast_node *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return ast_node(ptr); } -isl::ast_node manage_copy(__isl_keep isl_ast_node *ptr) { +ast_node manage_copy(__isl_keep isl_ast_node *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_ast_node_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_ast_node_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return ast_node(ptr); } ast_node::ast_node() : ptr(nullptr) {} -ast_node::ast_node(const isl::ast_node &obj) - : ptr(obj.copy()) +ast_node::ast_node(const ast_node &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_ast_node_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_ast_node_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } ast_node::ast_node(__isl_take isl_ast_node *ptr) : ptr(ptr) {} -ast_node &ast_node::operator=(isl::ast_node obj) { +ast_node &ast_node::operator=(ast_node obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -4924,8 +5014,7 @@ template bool ast_node::isa() { if (is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return isl_ast_node_get_type(get()) == T::type; } template @@ -4934,40 +5023,40 @@ T ast_node::as() return isa() ? T(copy()) : T(); } -isl::ctx ast_node::get_ctx() const { - return isl::ctx(isl_ast_node_get_ctx(ptr)); +ctx ast_node::get_ctx() const { + return ctx(isl_ast_node_get_ctx(ptr)); } -isl::id ast_node::get_annotation() const +id ast_node::get_annotation() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_get_annotation(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_node ast_node::set_annotation(isl::id annotation) const +ast_node ast_node::set_annotation(id annotation) const { if (!ptr || annotation.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_set_annotation(copy(), annotation.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } std::string ast_node::to_C_str() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_to_C_str(get()); std::string tmp(res); free(res); @@ -4979,7 +5068,7 @@ std::string ast_node::to_C_str() const ast_node_block::ast_node_block() : ast_node() {} -ast_node_block::ast_node_block(const isl::ast_node_block &obj) +ast_node_block::ast_node_block(const ast_node_block &obj) : ast_node(obj) { } @@ -4988,7 +5077,7 @@ ast_node_block::ast_node_block(__isl_take isl_ast_node *ptr) : ast_node(ptr) {} -ast_node_block &ast_node_block::operator=(isl::ast_node_block obj) { +ast_node_block &ast_node_block::operator=(ast_node_block obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5011,19 +5100,19 @@ std::string ast_node_block::to_str() const { } -isl::ctx ast_node_block::get_ctx() const { - return isl::ctx(isl_ast_node_get_ctx(ptr)); +ctx ast_node_block::get_ctx() const { + return ctx(isl_ast_node_get_ctx(ptr)); } -isl::ast_node_list ast_node_block::get_children() const +ast_node_list ast_node_block::get_children() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_block_get_children(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -5032,7 +5121,7 @@ isl::ast_node_list ast_node_block::get_children() const ast_node_for::ast_node_for() : ast_node() {} -ast_node_for::ast_node_for(const isl::ast_node_for &obj) +ast_node_for::ast_node_for(const ast_node_for &obj) : ast_node(obj) { } @@ -5041,7 +5130,7 @@ ast_node_for::ast_node_for(__isl_take isl_ast_node *ptr) : ast_node(ptr) {} -ast_node_for &ast_node_for::operator=(isl::ast_node_for obj) { +ast_node_for &ast_node_for::operator=(ast_node_for obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5064,91 +5153,91 @@ std::string ast_node_for::to_str() const { } -isl::ctx ast_node_for::get_ctx() const { - return isl::ctx(isl_ast_node_get_ctx(ptr)); +ctx ast_node_for::get_ctx() const { + return ctx(isl_ast_node_get_ctx(ptr)); } -isl::ast_node ast_node_for::get_body() const +ast_node ast_node_for::get_body() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_for_get_body(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_expr ast_node_for::get_cond() const +ast_expr ast_node_for::get_cond() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_for_get_cond(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_expr ast_node_for::get_inc() const +ast_expr ast_node_for::get_inc() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_for_get_inc(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_expr ast_node_for::get_init() const +ast_expr ast_node_for::get_init() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_for_get_init(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_expr ast_node_for::get_iterator() const +ast_expr ast_node_for::get_iterator() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_for_get_iterator(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool ast_node_for::is_coincident() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_for_is_coincident(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool ast_node_for::is_degenerate() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_for_is_degenerate(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } @@ -5157,7 +5246,7 @@ bool ast_node_for::is_degenerate() const ast_node_if::ast_node_if() : ast_node() {} -ast_node_if::ast_node_if(const isl::ast_node_if &obj) +ast_node_if::ast_node_if(const ast_node_if &obj) : ast_node(obj) { } @@ -5166,7 +5255,7 @@ ast_node_if::ast_node_if(__isl_take isl_ast_node *ptr) : ast_node(ptr) {} -ast_node_if &ast_node_if::operator=(isl::ast_node_if obj) { +ast_node_if &ast_node_if::operator=(ast_node_if obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5189,111 +5278,114 @@ std::string ast_node_if::to_str() const { } -isl::ctx ast_node_if::get_ctx() const { - return isl::ctx(isl_ast_node_get_ctx(ptr)); +ctx ast_node_if::get_ctx() const { + return ctx(isl_ast_node_get_ctx(ptr)); } -isl::ast_expr ast_node_if::get_cond() const +ast_expr ast_node_if::get_cond() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_if_get_cond(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_node ast_node_if::get_else() const +ast_node ast_node_if::get_else() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_if_get_else(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_node ast_node_if::get_then() const +ast_node ast_node_if::get_then() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_if_get_then(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool ast_node_if::has_else() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_if_has_else(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } // implementations for isl::ast_node_list -isl::ast_node_list manage(__isl_take isl_ast_node_list *ptr) { +ast_node_list manage(__isl_take isl_ast_node_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return ast_node_list(ptr); } -isl::ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr) { +ast_node_list manage_copy(__isl_keep isl_ast_node_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_ast_node_list_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_ast_node_list_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return ast_node_list(ptr); } ast_node_list::ast_node_list() : ptr(nullptr) {} -ast_node_list::ast_node_list(const isl::ast_node_list &obj) - : ptr(obj.copy()) +ast_node_list::ast_node_list(const ast_node_list &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_ast_node_list_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_ast_node_list_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } ast_node_list::ast_node_list(__isl_take isl_ast_node_list *ptr) : ptr(ptr) {} -ast_node_list::ast_node_list(isl::ast_node el) +ast_node_list::ast_node_list(ast_node el) { if (el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = el.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_list_from_ast_node(el.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -ast_node_list::ast_node_list(isl::ctx ctx, int n) +ast_node_list::ast_node_list(ctx ctx, int n) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_list_alloc(ctx.release(), n); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -ast_node_list &ast_node_list::operator=(isl::ast_node_list obj) { +ast_node_list &ast_node_list::operator=(ast_node_list obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5327,62 +5419,62 @@ ast_node_list::operator bool() const -isl::ctx ast_node_list::get_ctx() const { - return isl::ctx(isl_ast_node_list_get_ctx(ptr)); +ctx ast_node_list::get_ctx() const { + return ctx(isl_ast_node_list_get_ctx(ptr)); } -isl::ast_node_list ast_node_list::add(isl::ast_node el) const +ast_node_list ast_node_list::add(ast_node el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_list_add(copy(), el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_node_list ast_node_list::concat(isl::ast_node_list list2) const +ast_node_list ast_node_list::concat(ast_node_list list2) const { if (!ptr || list2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_list_concat(copy(), list2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_node_list ast_node_list::drop(unsigned int first, unsigned int n) const +ast_node_list ast_node_list::drop(unsigned int first, unsigned int n) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_list_drop(copy(), first, n); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void ast_node_list::foreach(const std::function &fn) const +void ast_node_list::foreach(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_ast_node *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -5391,40 +5483,40 @@ void ast_node_list::foreach(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::ast_node ast_node_list::get_at(int index) const +ast_node ast_node_list::get_at(int index) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_list_get_at(get(), index); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_node_list ast_node_list::reverse() const +ast_node_list ast_node_list::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_list_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int ast_node_list::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_list_size(get()); return res; } @@ -5434,7 +5526,7 @@ int ast_node_list::size() const ast_node_mark::ast_node_mark() : ast_node() {} -ast_node_mark::ast_node_mark(const isl::ast_node_mark &obj) +ast_node_mark::ast_node_mark(const ast_node_mark &obj) : ast_node(obj) { } @@ -5443,7 +5535,7 @@ ast_node_mark::ast_node_mark(__isl_take isl_ast_node *ptr) : ast_node(ptr) {} -ast_node_mark &ast_node_mark::operator=(isl::ast_node_mark obj) { +ast_node_mark &ast_node_mark::operator=(ast_node_mark obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5466,31 +5558,31 @@ std::string ast_node_mark::to_str() const { } -isl::ctx ast_node_mark::get_ctx() const { - return isl::ctx(isl_ast_node_get_ctx(ptr)); +ctx ast_node_mark::get_ctx() const { + return ctx(isl_ast_node_get_ctx(ptr)); } -isl::id ast_node_mark::get_id() const +id ast_node_mark::get_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_mark_get_id(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::ast_node ast_node_mark::get_node() const +ast_node ast_node_mark::get_node() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_mark_get_node(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -5499,7 +5591,7 @@ isl::ast_node ast_node_mark::get_node() const ast_node_user::ast_node_user() : ast_node() {} -ast_node_user::ast_node_user(const isl::ast_node_user &obj) +ast_node_user::ast_node_user(const ast_node_user &obj) : ast_node(obj) { } @@ -5508,7 +5600,7 @@ ast_node_user::ast_node_user(__isl_take isl_ast_node *ptr) : ast_node(ptr) {} -ast_node_user &ast_node_user::operator=(isl::ast_node_user obj) { +ast_node_user &ast_node_user::operator=(ast_node_user obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5531,19 +5623,19 @@ std::string ast_node_user::to_str() const { } -isl::ctx ast_node_user::get_ctx() const { - return isl::ctx(isl_ast_node_get_ctx(ptr)); +ctx ast_node_user::get_ctx() const { + return ctx(isl_ast_node_get_ctx(ptr)); } -isl::ast_expr ast_node_user::get_expr() const +ast_expr ast_node_user::get_expr() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_ast_node_user_get_expr(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -5552,7 +5644,7 @@ isl::ast_expr ast_node_user::get_expr() const ast_op_access::ast_op_access() : ast_expr_op() {} -ast_op_access::ast_op_access(const isl::ast_op_access &obj) +ast_op_access::ast_op_access(const ast_op_access &obj) : ast_expr_op(obj) { } @@ -5561,7 +5653,7 @@ ast_op_access::ast_op_access(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_access &ast_op_access::operator=(isl::ast_op_access obj) { +ast_op_access &ast_op_access::operator=(ast_op_access obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5588,8 +5680,8 @@ std::string ast_op_access::to_str() const { } -isl::ctx ast_op_access::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_access::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -5598,7 +5690,7 @@ isl::ctx ast_op_access::get_ctx() const { ast_op_add::ast_op_add() : ast_expr_op() {} -ast_op_add::ast_op_add(const isl::ast_op_add &obj) +ast_op_add::ast_op_add(const ast_op_add &obj) : ast_expr_op(obj) { } @@ -5607,7 +5699,7 @@ ast_op_add::ast_op_add(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_add &ast_op_add::operator=(isl::ast_op_add obj) { +ast_op_add &ast_op_add::operator=(ast_op_add obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5634,8 +5726,8 @@ std::string ast_op_add::to_str() const { } -isl::ctx ast_op_add::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_add::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -5644,7 +5736,7 @@ isl::ctx ast_op_add::get_ctx() const { ast_op_address_of::ast_op_address_of() : ast_expr_op() {} -ast_op_address_of::ast_op_address_of(const isl::ast_op_address_of &obj) +ast_op_address_of::ast_op_address_of(const ast_op_address_of &obj) : ast_expr_op(obj) { } @@ -5653,7 +5745,7 @@ ast_op_address_of::ast_op_address_of(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_address_of &ast_op_address_of::operator=(isl::ast_op_address_of obj) { +ast_op_address_of &ast_op_address_of::operator=(ast_op_address_of obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5680,8 +5772,8 @@ std::string ast_op_address_of::to_str() const { } -isl::ctx ast_op_address_of::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_address_of::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -5690,7 +5782,7 @@ isl::ctx ast_op_address_of::get_ctx() const { ast_op_and::ast_op_and() : ast_expr_op() {} -ast_op_and::ast_op_and(const isl::ast_op_and &obj) +ast_op_and::ast_op_and(const ast_op_and &obj) : ast_expr_op(obj) { } @@ -5699,7 +5791,7 @@ ast_op_and::ast_op_and(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_and &ast_op_and::operator=(isl::ast_op_and obj) { +ast_op_and &ast_op_and::operator=(ast_op_and obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5726,8 +5818,8 @@ std::string ast_op_and::to_str() const { } -isl::ctx ast_op_and::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_and::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -5736,7 +5828,7 @@ isl::ctx ast_op_and::get_ctx() const { ast_op_and_then::ast_op_and_then() : ast_expr_op() {} -ast_op_and_then::ast_op_and_then(const isl::ast_op_and_then &obj) +ast_op_and_then::ast_op_and_then(const ast_op_and_then &obj) : ast_expr_op(obj) { } @@ -5745,7 +5837,7 @@ ast_op_and_then::ast_op_and_then(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_and_then &ast_op_and_then::operator=(isl::ast_op_and_then obj) { +ast_op_and_then &ast_op_and_then::operator=(ast_op_and_then obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5772,8 +5864,8 @@ std::string ast_op_and_then::to_str() const { } -isl::ctx ast_op_and_then::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_and_then::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -5782,7 +5874,7 @@ isl::ctx ast_op_and_then::get_ctx() const { ast_op_call::ast_op_call() : ast_expr_op() {} -ast_op_call::ast_op_call(const isl::ast_op_call &obj) +ast_op_call::ast_op_call(const ast_op_call &obj) : ast_expr_op(obj) { } @@ -5791,7 +5883,7 @@ ast_op_call::ast_op_call(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_call &ast_op_call::operator=(isl::ast_op_call obj) { +ast_op_call &ast_op_call::operator=(ast_op_call obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5818,8 +5910,8 @@ std::string ast_op_call::to_str() const { } -isl::ctx ast_op_call::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_call::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -5828,7 +5920,7 @@ isl::ctx ast_op_call::get_ctx() const { ast_op_cond::ast_op_cond() : ast_expr_op() {} -ast_op_cond::ast_op_cond(const isl::ast_op_cond &obj) +ast_op_cond::ast_op_cond(const ast_op_cond &obj) : ast_expr_op(obj) { } @@ -5837,7 +5929,7 @@ ast_op_cond::ast_op_cond(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_cond &ast_op_cond::operator=(isl::ast_op_cond obj) { +ast_op_cond &ast_op_cond::operator=(ast_op_cond obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5864,8 +5956,8 @@ std::string ast_op_cond::to_str() const { } -isl::ctx ast_op_cond::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_cond::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -5874,7 +5966,7 @@ isl::ctx ast_op_cond::get_ctx() const { ast_op_div::ast_op_div() : ast_expr_op() {} -ast_op_div::ast_op_div(const isl::ast_op_div &obj) +ast_op_div::ast_op_div(const ast_op_div &obj) : ast_expr_op(obj) { } @@ -5883,7 +5975,7 @@ ast_op_div::ast_op_div(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_div &ast_op_div::operator=(isl::ast_op_div obj) { +ast_op_div &ast_op_div::operator=(ast_op_div obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5910,8 +6002,8 @@ std::string ast_op_div::to_str() const { } -isl::ctx ast_op_div::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_div::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -5920,7 +6012,7 @@ isl::ctx ast_op_div::get_ctx() const { ast_op_eq::ast_op_eq() : ast_expr_op() {} -ast_op_eq::ast_op_eq(const isl::ast_op_eq &obj) +ast_op_eq::ast_op_eq(const ast_op_eq &obj) : ast_expr_op(obj) { } @@ -5929,7 +6021,7 @@ ast_op_eq::ast_op_eq(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_eq &ast_op_eq::operator=(isl::ast_op_eq obj) { +ast_op_eq &ast_op_eq::operator=(ast_op_eq obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -5956,8 +6048,8 @@ std::string ast_op_eq::to_str() const { } -isl::ctx ast_op_eq::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_eq::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -5966,7 +6058,7 @@ isl::ctx ast_op_eq::get_ctx() const { ast_op_fdiv_q::ast_op_fdiv_q() : ast_expr_op() {} -ast_op_fdiv_q::ast_op_fdiv_q(const isl::ast_op_fdiv_q &obj) +ast_op_fdiv_q::ast_op_fdiv_q(const ast_op_fdiv_q &obj) : ast_expr_op(obj) { } @@ -5975,7 +6067,7 @@ ast_op_fdiv_q::ast_op_fdiv_q(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_fdiv_q &ast_op_fdiv_q::operator=(isl::ast_op_fdiv_q obj) { +ast_op_fdiv_q &ast_op_fdiv_q::operator=(ast_op_fdiv_q obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6002,8 +6094,8 @@ std::string ast_op_fdiv_q::to_str() const { } -isl::ctx ast_op_fdiv_q::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_fdiv_q::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6012,7 +6104,7 @@ isl::ctx ast_op_fdiv_q::get_ctx() const { ast_op_ge::ast_op_ge() : ast_expr_op() {} -ast_op_ge::ast_op_ge(const isl::ast_op_ge &obj) +ast_op_ge::ast_op_ge(const ast_op_ge &obj) : ast_expr_op(obj) { } @@ -6021,7 +6113,7 @@ ast_op_ge::ast_op_ge(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_ge &ast_op_ge::operator=(isl::ast_op_ge obj) { +ast_op_ge &ast_op_ge::operator=(ast_op_ge obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6048,8 +6140,8 @@ std::string ast_op_ge::to_str() const { } -isl::ctx ast_op_ge::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_ge::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6058,7 +6150,7 @@ isl::ctx ast_op_ge::get_ctx() const { ast_op_gt::ast_op_gt() : ast_expr_op() {} -ast_op_gt::ast_op_gt(const isl::ast_op_gt &obj) +ast_op_gt::ast_op_gt(const ast_op_gt &obj) : ast_expr_op(obj) { } @@ -6067,7 +6159,7 @@ ast_op_gt::ast_op_gt(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_gt &ast_op_gt::operator=(isl::ast_op_gt obj) { +ast_op_gt &ast_op_gt::operator=(ast_op_gt obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6094,8 +6186,8 @@ std::string ast_op_gt::to_str() const { } -isl::ctx ast_op_gt::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_gt::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6104,7 +6196,7 @@ isl::ctx ast_op_gt::get_ctx() const { ast_op_le::ast_op_le() : ast_expr_op() {} -ast_op_le::ast_op_le(const isl::ast_op_le &obj) +ast_op_le::ast_op_le(const ast_op_le &obj) : ast_expr_op(obj) { } @@ -6113,7 +6205,7 @@ ast_op_le::ast_op_le(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_le &ast_op_le::operator=(isl::ast_op_le obj) { +ast_op_le &ast_op_le::operator=(ast_op_le obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6140,8 +6232,8 @@ std::string ast_op_le::to_str() const { } -isl::ctx ast_op_le::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_le::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6150,7 +6242,7 @@ isl::ctx ast_op_le::get_ctx() const { ast_op_lt::ast_op_lt() : ast_expr_op() {} -ast_op_lt::ast_op_lt(const isl::ast_op_lt &obj) +ast_op_lt::ast_op_lt(const ast_op_lt &obj) : ast_expr_op(obj) { } @@ -6159,7 +6251,7 @@ ast_op_lt::ast_op_lt(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_lt &ast_op_lt::operator=(isl::ast_op_lt obj) { +ast_op_lt &ast_op_lt::operator=(ast_op_lt obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6186,8 +6278,8 @@ std::string ast_op_lt::to_str() const { } -isl::ctx ast_op_lt::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_lt::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6196,7 +6288,7 @@ isl::ctx ast_op_lt::get_ctx() const { ast_op_max::ast_op_max() : ast_expr_op() {} -ast_op_max::ast_op_max(const isl::ast_op_max &obj) +ast_op_max::ast_op_max(const ast_op_max &obj) : ast_expr_op(obj) { } @@ -6205,7 +6297,7 @@ ast_op_max::ast_op_max(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_max &ast_op_max::operator=(isl::ast_op_max obj) { +ast_op_max &ast_op_max::operator=(ast_op_max obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6232,8 +6324,8 @@ std::string ast_op_max::to_str() const { } -isl::ctx ast_op_max::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_max::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6242,7 +6334,7 @@ isl::ctx ast_op_max::get_ctx() const { ast_op_member::ast_op_member() : ast_expr_op() {} -ast_op_member::ast_op_member(const isl::ast_op_member &obj) +ast_op_member::ast_op_member(const ast_op_member &obj) : ast_expr_op(obj) { } @@ -6251,7 +6343,7 @@ ast_op_member::ast_op_member(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_member &ast_op_member::operator=(isl::ast_op_member obj) { +ast_op_member &ast_op_member::operator=(ast_op_member obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6278,8 +6370,8 @@ std::string ast_op_member::to_str() const { } -isl::ctx ast_op_member::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_member::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6288,7 +6380,7 @@ isl::ctx ast_op_member::get_ctx() const { ast_op_min::ast_op_min() : ast_expr_op() {} -ast_op_min::ast_op_min(const isl::ast_op_min &obj) +ast_op_min::ast_op_min(const ast_op_min &obj) : ast_expr_op(obj) { } @@ -6297,7 +6389,7 @@ ast_op_min::ast_op_min(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_min &ast_op_min::operator=(isl::ast_op_min obj) { +ast_op_min &ast_op_min::operator=(ast_op_min obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6324,8 +6416,8 @@ std::string ast_op_min::to_str() const { } -isl::ctx ast_op_min::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_min::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6334,7 +6426,7 @@ isl::ctx ast_op_min::get_ctx() const { ast_op_minus::ast_op_minus() : ast_expr_op() {} -ast_op_minus::ast_op_minus(const isl::ast_op_minus &obj) +ast_op_minus::ast_op_minus(const ast_op_minus &obj) : ast_expr_op(obj) { } @@ -6343,7 +6435,7 @@ ast_op_minus::ast_op_minus(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_minus &ast_op_minus::operator=(isl::ast_op_minus obj) { +ast_op_minus &ast_op_minus::operator=(ast_op_minus obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6370,8 +6462,8 @@ std::string ast_op_minus::to_str() const { } -isl::ctx ast_op_minus::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_minus::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6380,7 +6472,7 @@ isl::ctx ast_op_minus::get_ctx() const { ast_op_mul::ast_op_mul() : ast_expr_op() {} -ast_op_mul::ast_op_mul(const isl::ast_op_mul &obj) +ast_op_mul::ast_op_mul(const ast_op_mul &obj) : ast_expr_op(obj) { } @@ -6389,7 +6481,7 @@ ast_op_mul::ast_op_mul(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_mul &ast_op_mul::operator=(isl::ast_op_mul obj) { +ast_op_mul &ast_op_mul::operator=(ast_op_mul obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6416,8 +6508,8 @@ std::string ast_op_mul::to_str() const { } -isl::ctx ast_op_mul::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_mul::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6426,7 +6518,7 @@ isl::ctx ast_op_mul::get_ctx() const { ast_op_or::ast_op_or() : ast_expr_op() {} -ast_op_or::ast_op_or(const isl::ast_op_or &obj) +ast_op_or::ast_op_or(const ast_op_or &obj) : ast_expr_op(obj) { } @@ -6435,7 +6527,7 @@ ast_op_or::ast_op_or(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_or &ast_op_or::operator=(isl::ast_op_or obj) { +ast_op_or &ast_op_or::operator=(ast_op_or obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6462,8 +6554,8 @@ std::string ast_op_or::to_str() const { } -isl::ctx ast_op_or::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_or::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6472,7 +6564,7 @@ isl::ctx ast_op_or::get_ctx() const { ast_op_or_else::ast_op_or_else() : ast_expr_op() {} -ast_op_or_else::ast_op_or_else(const isl::ast_op_or_else &obj) +ast_op_or_else::ast_op_or_else(const ast_op_or_else &obj) : ast_expr_op(obj) { } @@ -6481,7 +6573,7 @@ ast_op_or_else::ast_op_or_else(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_or_else &ast_op_or_else::operator=(isl::ast_op_or_else obj) { +ast_op_or_else &ast_op_or_else::operator=(ast_op_or_else obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6508,8 +6600,8 @@ std::string ast_op_or_else::to_str() const { } -isl::ctx ast_op_or_else::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_or_else::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6518,7 +6610,7 @@ isl::ctx ast_op_or_else::get_ctx() const { ast_op_pdiv_q::ast_op_pdiv_q() : ast_expr_op() {} -ast_op_pdiv_q::ast_op_pdiv_q(const isl::ast_op_pdiv_q &obj) +ast_op_pdiv_q::ast_op_pdiv_q(const ast_op_pdiv_q &obj) : ast_expr_op(obj) { } @@ -6527,7 +6619,7 @@ ast_op_pdiv_q::ast_op_pdiv_q(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_pdiv_q &ast_op_pdiv_q::operator=(isl::ast_op_pdiv_q obj) { +ast_op_pdiv_q &ast_op_pdiv_q::operator=(ast_op_pdiv_q obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6554,8 +6646,8 @@ std::string ast_op_pdiv_q::to_str() const { } -isl::ctx ast_op_pdiv_q::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_pdiv_q::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6564,7 +6656,7 @@ isl::ctx ast_op_pdiv_q::get_ctx() const { ast_op_pdiv_r::ast_op_pdiv_r() : ast_expr_op() {} -ast_op_pdiv_r::ast_op_pdiv_r(const isl::ast_op_pdiv_r &obj) +ast_op_pdiv_r::ast_op_pdiv_r(const ast_op_pdiv_r &obj) : ast_expr_op(obj) { } @@ -6573,7 +6665,7 @@ ast_op_pdiv_r::ast_op_pdiv_r(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_pdiv_r &ast_op_pdiv_r::operator=(isl::ast_op_pdiv_r obj) { +ast_op_pdiv_r &ast_op_pdiv_r::operator=(ast_op_pdiv_r obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6600,8 +6692,8 @@ std::string ast_op_pdiv_r::to_str() const { } -isl::ctx ast_op_pdiv_r::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_pdiv_r::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6610,7 +6702,7 @@ isl::ctx ast_op_pdiv_r::get_ctx() const { ast_op_select::ast_op_select() : ast_expr_op() {} -ast_op_select::ast_op_select(const isl::ast_op_select &obj) +ast_op_select::ast_op_select(const ast_op_select &obj) : ast_expr_op(obj) { } @@ -6619,7 +6711,7 @@ ast_op_select::ast_op_select(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_select &ast_op_select::operator=(isl::ast_op_select obj) { +ast_op_select &ast_op_select::operator=(ast_op_select obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6646,8 +6738,8 @@ std::string ast_op_select::to_str() const { } -isl::ctx ast_op_select::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_select::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6656,7 +6748,7 @@ isl::ctx ast_op_select::get_ctx() const { ast_op_sub::ast_op_sub() : ast_expr_op() {} -ast_op_sub::ast_op_sub(const isl::ast_op_sub &obj) +ast_op_sub::ast_op_sub(const ast_op_sub &obj) : ast_expr_op(obj) { } @@ -6665,7 +6757,7 @@ ast_op_sub::ast_op_sub(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_sub &ast_op_sub::operator=(isl::ast_op_sub obj) { +ast_op_sub &ast_op_sub::operator=(ast_op_sub obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6692,8 +6784,8 @@ std::string ast_op_sub::to_str() const { } -isl::ctx ast_op_sub::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_sub::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } @@ -6702,7 +6794,7 @@ isl::ctx ast_op_sub::get_ctx() const { ast_op_zdiv_r::ast_op_zdiv_r() : ast_expr_op() {} -ast_op_zdiv_r::ast_op_zdiv_r(const isl::ast_op_zdiv_r &obj) +ast_op_zdiv_r::ast_op_zdiv_r(const ast_op_zdiv_r &obj) : ast_expr_op(obj) { } @@ -6711,7 +6803,7 @@ ast_op_zdiv_r::ast_op_zdiv_r(__isl_take isl_ast_expr *ptr) : ast_expr_op(ptr) {} -ast_op_zdiv_r &ast_op_zdiv_r::operator=(isl::ast_op_zdiv_r obj) { +ast_op_zdiv_r &ast_op_zdiv_r::operator=(ast_op_zdiv_r obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6738,88 +6830,89 @@ std::string ast_op_zdiv_r::to_str() const { } -isl::ctx ast_op_zdiv_r::get_ctx() const { - return isl::ctx(isl_ast_expr_get_ctx(ptr)); +ctx ast_op_zdiv_r::get_ctx() const { + return ctx(isl_ast_expr_get_ctx(ptr)); } // implementations for isl::basic_map -isl::basic_map manage(__isl_take isl_basic_map *ptr) { +basic_map manage(__isl_take isl_basic_map *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return basic_map(ptr); } -isl::basic_map manage_copy(__isl_keep isl_basic_map *ptr) { +basic_map manage_copy(__isl_keep isl_basic_map *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_basic_map_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_basic_map_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return basic_map(ptr); } basic_map::basic_map() : ptr(nullptr) {} -basic_map::basic_map(const isl::basic_map &obj) - : ptr(obj.copy()) +basic_map::basic_map(const basic_map &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_basic_map_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_basic_map_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } basic_map::basic_map(__isl_take isl_basic_map *ptr) : ptr(ptr) {} -basic_map::basic_map(isl::ctx ctx, const std::string &str) +basic_map::basic_map(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -basic_map::basic_map(isl::basic_set domain, isl::basic_set range) +basic_map::basic_map(basic_set domain, basic_set range) { if (domain.is_null() || range.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_from_domain_and_range(domain.release(), range.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -basic_map::basic_map(isl::aff aff) +basic_map::basic_map(aff aff) { if (aff.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = aff.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_from_aff(aff.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -basic_map::basic_map(isl::multi_aff maff) +basic_map::basic_map(multi_aff maff) { if (maff.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = maff.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_from_multi_aff(maff.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -basic_map &basic_map::operator=(isl::basic_map obj) { +basic_map &basic_map::operator=(basic_map obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -6871,426 +6964,426 @@ std::string basic_map::to_str() const { } -isl::ctx basic_map::get_ctx() const { - return isl::ctx(isl_basic_map_get_ctx(ptr)); +ctx basic_map::get_ctx() const { + return ctx(isl_basic_map_get_ctx(ptr)); } -isl::basic_map basic_map::affine_hull() const +basic_map basic_map::affine_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_affine_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::apply_domain(isl::basic_map bmap2) const +basic_map basic_map::apply_domain(basic_map bmap2) const { if (!ptr || bmap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_apply_domain(copy(), bmap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::apply_range(isl::basic_map bmap2) const +basic_map basic_map::apply_range(basic_map bmap2) const { if (!ptr || bmap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_apply_range(copy(), bmap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool basic_map::can_curry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_can_curry(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool basic_map::can_uncurry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_can_uncurry(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::basic_map basic_map::curry() const +basic_map basic_map::curry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_curry(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_map::deltas() const +basic_set basic_map::deltas() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_deltas(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::detect_equalities() const +basic_map basic_map::detect_equalities() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_detect_equalities(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_map::domain() const +basic_set basic_map::domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::empty(isl::space space) +basic_map basic_map::empty(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_empty(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::flatten() const +basic_map basic_map::flatten() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_flatten(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::flatten_domain() const +basic_map basic_map::flatten_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_flatten_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::flatten_range() const +basic_map basic_map::flatten_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_flatten_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::from_domain(isl::basic_set bset) +basic_map basic_map::from_domain(basic_set bset) { if (bset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = bset.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_from_domain(bset.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::from_range(isl::basic_set bset) +basic_map basic_map::from_range(basic_set bset) { if (bset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = bset.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_from_range(bset.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::space basic_map::get_space() const +space basic_map::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::gist(isl::basic_map context) const +basic_map basic_map::gist(basic_map context) const { if (!ptr || context.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_gist(copy(), context.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::intersect(isl::basic_map bmap2) const +basic_map basic_map::intersect(basic_map bmap2) const { if (!ptr || bmap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_intersect(copy(), bmap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::intersect_domain(isl::basic_set bset) const +basic_map basic_map::intersect_domain(basic_set bset) const { if (!ptr || bset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_intersect_domain(copy(), bset.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::intersect_range(isl::basic_set bset) const +basic_map basic_map::intersect_range(basic_set bset) const { if (!ptr || bset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_intersect_range(copy(), bset.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool basic_map::is_empty() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_is_empty(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool basic_map::is_equal(const isl::basic_map &bmap2) const +bool basic_map::is_equal(const basic_map &bmap2) const { if (!ptr || bmap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_is_equal(get(), bmap2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool basic_map::is_subset(const isl::basic_map &bmap2) const +bool basic_map::is_subset(const basic_map &bmap2) const { if (!ptr || bmap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_is_subset(get(), bmap2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::map basic_map::lexmax() const +map basic_map::lexmax() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_lexmax(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map basic_map::lexmin() const +map basic_map::lexmin() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_lexmin(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::reverse() const +basic_map basic_map::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::sample() const +basic_map basic_map::sample() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_sample(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map::uncurry() const +basic_map basic_map::uncurry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_uncurry(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map basic_map::unite(isl::basic_map bmap2) const +map basic_map::unite(basic_map bmap2) const { if (!ptr || bmap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_union(copy(), bmap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_map::wrap() const +basic_set basic_map::wrap() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_wrap(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::basic_map_list -isl::basic_map_list manage(__isl_take isl_basic_map_list *ptr) { +basic_map_list manage(__isl_take isl_basic_map_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return basic_map_list(ptr); } -isl::basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr) { +basic_map_list manage_copy(__isl_keep isl_basic_map_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_basic_map_list_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_basic_map_list_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return basic_map_list(ptr); } basic_map_list::basic_map_list() : ptr(nullptr) {} -basic_map_list::basic_map_list(const isl::basic_map_list &obj) - : ptr(obj.copy()) +basic_map_list::basic_map_list(const basic_map_list &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_basic_map_list_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_basic_map_list_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } basic_map_list::basic_map_list(__isl_take isl_basic_map_list *ptr) : ptr(ptr) {} -basic_map_list::basic_map_list(isl::basic_map el) +basic_map_list::basic_map_list(basic_map el) { if (el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = el.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_list_from_basic_map(el.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -basic_map_list::basic_map_list(isl::ctx ctx, int n) +basic_map_list::basic_map_list(ctx ctx, int n) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_list_alloc(ctx.release(), n); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -basic_map_list &basic_map_list::operator=(isl::basic_map_list obj) { +basic_map_list &basic_map_list::operator=(basic_map_list obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -7324,62 +7417,62 @@ basic_map_list::operator bool() const -isl::ctx basic_map_list::get_ctx() const { - return isl::ctx(isl_basic_map_list_get_ctx(ptr)); +ctx basic_map_list::get_ctx() const { + return ctx(isl_basic_map_list_get_ctx(ptr)); } -isl::basic_map_list basic_map_list::add(isl::basic_map el) const +basic_map_list basic_map_list::add(basic_map el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_list_add(copy(), el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map_list basic_map_list::concat(isl::basic_map_list list2) const +basic_map_list basic_map_list::concat(basic_map_list list2) const { if (!ptr || list2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_list_concat(copy(), list2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map_list basic_map_list::drop(unsigned int first, unsigned int n) const +basic_map_list basic_map_list::drop(unsigned int first, unsigned int n) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_list_drop(copy(), first, n); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void basic_map_list::foreach(const std::function &fn) const +void basic_map_list::foreach(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_basic_map *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -7388,109 +7481,112 @@ void basic_map_list::foreach(const std::function &fn) cons if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::basic_map basic_map_list::get_at(int index) const +basic_map basic_map_list::get_at(int index) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_list_get_at(get(), index); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_map_list::intersect() const +basic_map basic_map_list::intersect() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_list_intersect(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map_list basic_map_list::reverse() const +basic_map_list basic_map_list::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_list_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int basic_map_list::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_map_list_size(get()); return res; } // implementations for isl::basic_set -isl::basic_set manage(__isl_take isl_basic_set *ptr) { +basic_set manage(__isl_take isl_basic_set *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return basic_set(ptr); } -isl::basic_set manage_copy(__isl_keep isl_basic_set *ptr) { +basic_set manage_copy(__isl_keep isl_basic_set *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_basic_set_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_basic_set_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return basic_set(ptr); } basic_set::basic_set() : ptr(nullptr) {} -basic_set::basic_set(const isl::basic_set &obj) - : ptr(obj.copy()) +basic_set::basic_set(const basic_set &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_basic_set_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_basic_set_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } basic_set::basic_set(__isl_take isl_basic_set *ptr) : ptr(ptr) {} -basic_set::basic_set(isl::point pnt) +basic_set::basic_set(point pnt) { if (pnt.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = pnt.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_from_point(pnt.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -basic_set::basic_set(isl::ctx ctx, const std::string &str) +basic_set::basic_set(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -basic_set &basic_set::operator=(isl::basic_set obj) { +basic_set &basic_set::operator=(basic_set obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -7542,244 +7638,244 @@ std::string basic_set::to_str() const { } -isl::ctx basic_set::get_ctx() const { - return isl::ctx(isl_basic_set_get_ctx(ptr)); +ctx basic_set::get_ctx() const { + return ctx(isl_basic_set_get_ctx(ptr)); } -isl::basic_set basic_set::affine_hull() const +basic_set basic_set::affine_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_affine_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_set::apply(isl::basic_map bmap) const +basic_set basic_set::apply(basic_map bmap) const { if (!ptr || bmap.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_apply(copy(), bmap.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set basic_set::compute_divs() const +set basic_set::compute_divs() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_compute_divs(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_set::detect_equalities() const +basic_set basic_set::detect_equalities() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_detect_equalities(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val basic_set::dim_max_val(int pos) const +val basic_set::dim_max_val(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_dim_max_val(copy(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_set::flatten() const +basic_set basic_set::flatten() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_flatten(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_set::from_params() const +basic_set basic_set::from_params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_from_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space basic_set::get_space() const +space basic_set::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_set::gist(isl::basic_set context) const +basic_set basic_set::gist(basic_set context) const { if (!ptr || context.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_gist(copy(), context.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_set::intersect(isl::basic_set bset2) const +basic_set basic_set::intersect(basic_set bset2) const { if (!ptr || bset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_intersect(copy(), bset2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_set::intersect_params(isl::basic_set bset2) const +basic_set basic_set::intersect_params(basic_set bset2) const { if (!ptr || bset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_intersect_params(copy(), bset2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool basic_set::is_empty() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_is_empty(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool basic_set::is_equal(const isl::basic_set &bset2) const +bool basic_set::is_equal(const basic_set &bset2) const { if (!ptr || bset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_is_equal(get(), bset2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool basic_set::is_subset(const isl::basic_set &bset2) const +bool basic_set::is_subset(const basic_set &bset2) const { if (!ptr || bset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_is_subset(get(), bset2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool basic_set::is_universe() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_is_universe(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool basic_set::is_wrapping() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_is_wrapping(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::set basic_set::lexmax() const +set basic_set::lexmax() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_lexmax(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set basic_set::lexmin() const +set basic_set::lexmin() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_lexmin(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val basic_set::max_val(const isl::aff &obj) const +val basic_set::max_val(const aff &obj) const { if (!ptr || obj.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_max_val(get(), obj.get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } unsigned int basic_set::n_dim() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_n_dim(get()); return res; } @@ -7787,176 +7883,177 @@ unsigned int basic_set::n_dim() const unsigned int basic_set::n_param() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_n_param(get()); return res; } -isl::basic_set basic_set::nat_universe(isl::space dim) +basic_set basic_set::nat_universe(space dim) { if (dim.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = dim.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_nat_universe(dim.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_set::params() const +basic_set basic_set::params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool basic_set::plain_is_universe() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_plain_is_universe(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::basic_set basic_set::sample() const +basic_set basic_set::sample() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_sample(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::point basic_set::sample_point() const +point basic_set::sample_point() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_sample_point(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_set::set_tuple_id(isl::id id) const +basic_set basic_set::set_tuple_id(id id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_set_tuple_id(copy(), id.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set basic_set::unite(isl::basic_set bset2) const +set basic_set::unite(basic_set bset2) const { if (!ptr || bset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_union(copy(), bset2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set basic_set::universe(isl::space space) +basic_set basic_set::universe(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_universe(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map basic_set::unwrap() const +basic_map basic_set::unwrap() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_unwrap(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::basic_set_list -isl::basic_set_list manage(__isl_take isl_basic_set_list *ptr) { +basic_set_list manage(__isl_take isl_basic_set_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return basic_set_list(ptr); } -isl::basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr) { +basic_set_list manage_copy(__isl_keep isl_basic_set_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_basic_set_list_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_basic_set_list_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return basic_set_list(ptr); } basic_set_list::basic_set_list() : ptr(nullptr) {} -basic_set_list::basic_set_list(const isl::basic_set_list &obj) - : ptr(obj.copy()) +basic_set_list::basic_set_list(const basic_set_list &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_basic_set_list_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_basic_set_list_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } basic_set_list::basic_set_list(__isl_take isl_basic_set_list *ptr) : ptr(ptr) {} -basic_set_list::basic_set_list(isl::basic_set el) +basic_set_list::basic_set_list(basic_set el) { if (el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = el.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_list_from_basic_set(el.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -basic_set_list::basic_set_list(isl::ctx ctx, int n) +basic_set_list::basic_set_list(ctx ctx, int n) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_list_alloc(ctx.release(), n); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -basic_set_list &basic_set_list::operator=(isl::basic_set_list obj) { +basic_set_list &basic_set_list::operator=(basic_set_list obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -7990,62 +8087,62 @@ basic_set_list::operator bool() const -isl::ctx basic_set_list::get_ctx() const { - return isl::ctx(isl_basic_set_list_get_ctx(ptr)); +ctx basic_set_list::get_ctx() const { + return ctx(isl_basic_set_list_get_ctx(ptr)); } -isl::basic_set_list basic_set_list::add(isl::basic_set el) const +basic_set_list basic_set_list::add(basic_set el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_list_add(copy(), el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set_list basic_set_list::concat(isl::basic_set_list list2) const +basic_set_list basic_set_list::concat(basic_set_list list2) const { if (!ptr || list2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_list_concat(copy(), list2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set_list basic_set_list::drop(unsigned int first, unsigned int n) const +basic_set_list basic_set_list::drop(unsigned int first, unsigned int n) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_list_drop(copy(), first, n); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void basic_set_list::foreach(const std::function &fn) const +void basic_set_list::foreach(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_basic_set *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -8054,77 +8151,81 @@ void basic_set_list::foreach(const std::function &fn) cons if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::basic_set basic_set_list::get_at(int index) const +basic_set basic_set_list::get_at(int index) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_list_get_at(get(), index); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set_list basic_set_list::reverse() const +basic_set_list basic_set_list::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_list_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int basic_set_list::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_basic_set_list_size(get()); return res; } // implementations for isl::fixed_box -isl::fixed_box manage(__isl_take isl_fixed_box *ptr) { +fixed_box manage(__isl_take isl_fixed_box *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return fixed_box(ptr); } -isl::fixed_box manage_copy(__isl_keep isl_fixed_box *ptr) { +fixed_box manage_copy(__isl_keep isl_fixed_box *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_fixed_box_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_fixed_box_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return fixed_box(ptr); } fixed_box::fixed_box() : ptr(nullptr) {} -fixed_box::fixed_box(const isl::fixed_box &obj) - : ptr(obj.copy()) +fixed_box::fixed_box(const fixed_box &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_fixed_box_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_fixed_box_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } fixed_box::fixed_box(__isl_take isl_fixed_box *ptr) : ptr(ptr) {} -fixed_box &fixed_box::operator=(isl::fixed_box obj) { +fixed_box &fixed_box::operator=(fixed_box obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -8158,99 +8259,103 @@ fixed_box::operator bool() const -isl::ctx fixed_box::get_ctx() const { - return isl::ctx(isl_fixed_box_get_ctx(ptr)); +ctx fixed_box::get_ctx() const { + return ctx(isl_fixed_box_get_ctx(ptr)); } -isl::multi_aff fixed_box::get_offset() const +multi_aff fixed_box::get_offset() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_fixed_box_get_offset(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val fixed_box::get_size() const +multi_val fixed_box::get_size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_fixed_box_get_size(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space fixed_box::get_space() const +space fixed_box::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_fixed_box_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool fixed_box::is_valid() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_fixed_box_is_valid(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } // implementations for isl::id -isl::id manage(__isl_take isl_id *ptr) { +id manage(__isl_take isl_id *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return id(ptr); } -isl::id manage_copy(__isl_keep isl_id *ptr) { +id manage_copy(__isl_keep isl_id *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_id_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_id_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return id(ptr); } id::id() : ptr(nullptr) {} -id::id(const isl::id &obj) - : ptr(obj.copy()) +id::id(const id &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_id_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_id_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } id::id(__isl_take isl_id *ptr) : ptr(ptr) {} -id::id(isl::ctx ctx, const std::string &str) +id::id(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_id_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -id &id::operator=(isl::id obj) { +id &id::operator=(id obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -8298,74 +8403,77 @@ std::string id::to_str() const { } -isl::ctx id::get_ctx() const { - return isl::ctx(isl_id_get_ctx(ptr)); +ctx id::get_ctx() const { + return ctx(isl_id_get_ctx(ptr)); } std::string id::get_name() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_id_get_name(get()); std::string tmp(res); return tmp; } // implementations for isl::id_list -isl::id_list manage(__isl_take isl_id_list *ptr) { +id_list manage(__isl_take isl_id_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return id_list(ptr); } -isl::id_list manage_copy(__isl_keep isl_id_list *ptr) { +id_list manage_copy(__isl_keep isl_id_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_id_list_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_id_list_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return id_list(ptr); } id_list::id_list() : ptr(nullptr) {} -id_list::id_list(const isl::id_list &obj) - : ptr(obj.copy()) +id_list::id_list(const id_list &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_id_list_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_id_list_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } id_list::id_list(__isl_take isl_id_list *ptr) : ptr(ptr) {} -id_list::id_list(isl::id el) +id_list::id_list(id el) { if (el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = el.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_id_list_from_id(el.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -id_list::id_list(isl::ctx ctx, int n) +id_list::id_list(ctx ctx, int n) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_id_list_alloc(ctx.release(), n); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -id_list &id_list::operator=(isl::id_list obj) { +id_list &id_list::operator=(id_list obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -8399,62 +8507,62 @@ id_list::operator bool() const -isl::ctx id_list::get_ctx() const { - return isl::ctx(isl_id_list_get_ctx(ptr)); +ctx id_list::get_ctx() const { + return ctx(isl_id_list_get_ctx(ptr)); } -isl::id_list id_list::add(isl::id el) const +id_list id_list::add(id el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_id_list_add(copy(), el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id_list id_list::concat(isl::id_list list2) const +id_list id_list::concat(id_list list2) const { if (!ptr || list2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_id_list_concat(copy(), list2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id_list id_list::drop(unsigned int first, unsigned int n) const +id_list id_list::drop(unsigned int first, unsigned int n) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_id_list_drop(copy(), first, n); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void id_list::foreach(const std::function &fn) const +void id_list::foreach(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_id *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -8463,89 +8571,92 @@ void id_list::foreach(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::id id_list::get_at(int index) const +id id_list::get_at(int index) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_id_list_get_at(get(), index); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id_list id_list::reverse() const +id_list id_list::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_id_list_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int id_list::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_id_list_size(get()); return res; } // implementations for isl::local_space -isl::local_space manage(__isl_take isl_local_space *ptr) { +local_space manage(__isl_take isl_local_space *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return local_space(ptr); } -isl::local_space manage_copy(__isl_keep isl_local_space *ptr) { +local_space manage_copy(__isl_keep isl_local_space *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_local_space_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_local_space_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return local_space(ptr); } local_space::local_space() : ptr(nullptr) {} -local_space::local_space(const isl::local_space &obj) - : ptr(obj.copy()) +local_space::local_space(const local_space &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_local_space_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_local_space_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } local_space::local_space(__isl_take isl_local_space *ptr) : ptr(ptr) {} -local_space::local_space(isl::space dim) +local_space::local_space(space dim) { if (dim.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = dim.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_from_space(dim.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -local_space &local_space::operator=(isl::local_space obj) { +local_space &local_space::operator=(local_space obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -8583,255 +8694,255 @@ inline bool operator==(const local_space& C1, const local_space& C2) { -isl::ctx local_space::get_ctx() const { - return isl::ctx(isl_local_space_get_ctx(ptr)); +ctx local_space::get_ctx() const { + return ctx(isl_local_space_get_ctx(ptr)); } -isl::local_space local_space::domain() const +local_space local_space::domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::local_space local_space::flatten_domain() const +local_space local_space::flatten_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_flatten_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::local_space local_space::flatten_range() const +local_space local_space::flatten_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_flatten_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::local_space local_space::from_domain() const +local_space local_space::from_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_from_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff local_space::get_div(int pos) const +aff local_space::get_div(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_get_div(get(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space local_space::get_space() const +space local_space::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::local_space local_space::intersect(isl::local_space ls2) const +local_space local_space::intersect(local_space ls2) const { if (!ptr || ls2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_intersect(copy(), ls2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool local_space::is_equal(const isl::local_space &ls2) const +bool local_space::is_equal(const local_space &ls2) const { if (!ptr || ls2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_is_equal(get(), ls2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool local_space::is_params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_is_params(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool local_space::is_set() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_is_set(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::basic_map local_space::lifting() const +basic_map local_space::lifting() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_lifting(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::local_space local_space::range() const +local_space local_space::range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::local_space local_space::wrap() const +local_space local_space::wrap() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_local_space_wrap(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::map -isl::map manage(__isl_take isl_map *ptr) { +map manage(__isl_take isl_map *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return map(ptr); } -isl::map manage_copy(__isl_keep isl_map *ptr) { +map manage_copy(__isl_keep isl_map *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_map_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_map_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return map(ptr); } map::map() : ptr(nullptr) {} -map::map(const isl::map &obj) - : ptr(obj.copy()) +map::map(const map &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_map_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_map_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } map::map(__isl_take isl_map *ptr) : ptr(ptr) {} -map::map(isl::ctx ctx, const std::string &str) +map::map(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -map::map(isl::basic_map bmap) +map::map(basic_map bmap) { if (bmap.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = bmap.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_from_basic_map(bmap.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -map::map(isl::set domain, isl::set range) +map::map(set domain, set range) { if (domain.is_null() || range.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_from_domain_and_range(domain.release(), range.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -map::map(isl::aff aff) +map::map(aff aff) { if (aff.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = aff.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_from_aff(aff.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -map::map(isl::multi_aff maff) +map::map(multi_aff maff) { if (maff.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = maff.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_from_multi_aff(maff.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -map &map::operator=(isl::map obj) { +map &map::operator=(map obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -8883,279 +8994,278 @@ std::string map::to_str() const { } -isl::ctx map::get_ctx() const { - return isl::ctx(isl_map_get_ctx(ptr)); +ctx map::get_ctx() const { + return ctx(isl_map_get_ctx(ptr)); } -isl::basic_map map::affine_hull() const +basic_map map::affine_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_affine_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::apply_domain(isl::map map2) const +map map::apply_domain(map map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_apply_domain(copy(), map2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::apply_range(isl::map map2) const +map map::apply_range(map map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_apply_range(copy(), map2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool map::can_curry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_can_curry(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool map::can_range_curry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_can_range_curry(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool map::can_uncurry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_can_uncurry(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::map map::coalesce() const +map map::coalesce() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_coalesce(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::complement() const +map map::complement() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_complement(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::compute_divs() const +map map::compute_divs() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_compute_divs(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::curry() const +map map::curry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_curry(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set map::deltas() const +set map::deltas() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_deltas(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::detect_equalities() const +map map::detect_equalities() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_detect_equalities(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set map::domain() const +set map::domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::domain_factor_domain() const +map map::domain_factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_domain_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::domain_factor_range() const +map map::domain_factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_domain_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::domain_map() const +map map::domain_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_domain_map(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::domain_product(isl::map map2) const +map map::domain_product(map map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_domain_product(copy(), map2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::empty(isl::space space) +map map::empty(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_empty(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::flatten() const +map map::flatten() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_flatten(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::flatten_domain() const +map map::flatten_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_flatten_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::flatten_range() const +map map::flatten_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_flatten_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void map::foreach_basic_map(const std::function &fn) const +void map::foreach_basic_map(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_basic_map *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -9164,643 +9274,652 @@ void map::foreach_basic_map(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::map map::from(isl::pw_multi_aff pma) +map map::from(pw_multi_aff pma) { if (pma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = pma.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_from_pw_multi_aff(pma.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::from(isl::union_map umap) +map map::from(union_map umap) { if (umap.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = umap.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_from_union_map(umap.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::from_domain(isl::set set) +map map::from_domain(set set) { if (set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = set.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_from_domain(set.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::from_range(isl::set set) +map map::from_range(set set) { if (set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = set.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_from_range(set.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map_list map::get_basic_map_list() const +basic_map_list map::get_basic_map_list() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_get_basic_map_list(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::fixed_box map::get_range_simple_fixed_box_hull() const +fixed_box map::get_range_simple_fixed_box_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_get_range_simple_fixed_box_hull(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::stride_info map::get_range_stride_info(int pos) const +stride_info map::get_range_stride_info(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_get_range_stride_info(get(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id map::get_range_tuple_id() const +id map::get_range_tuple_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_get_range_tuple_id(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space map::get_space() const +space map::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::gist(isl::map context) const +map map::gist(map context) const { if (!ptr || context.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_gist(copy(), context.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::gist_domain(isl::set context) const +map map::gist_domain(set context) const { if (!ptr || context.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_gist_domain(copy(), context.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::identity(isl::space dim) +map map::identity(space dim) { if (dim.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = dim.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_identity(dim.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::intersect(isl::map map2) const +map map::intersect(map map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_intersect(copy(), map2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::intersect_domain(isl::set set) const +map map::intersect_domain(set set) const { if (!ptr || set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_intersect_domain(copy(), set.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::intersect_params(isl::set params) const +map map::intersect_params(set params) const { if (!ptr || params.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_intersect_params(copy(), params.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::intersect_range(isl::set set) const +map map::intersect_range(set set) const { if (!ptr || set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_intersect_range(copy(), set.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool map::is_bijective() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_is_bijective(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool map::is_disjoint(const isl::map &map2) const +bool map::is_disjoint(const map &map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_is_disjoint(get(), map2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool map::is_empty() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_is_empty(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool map::is_equal(const isl::map &map2) const +bool map::is_equal(const map &map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_is_equal(get(), map2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool map::is_injective() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_is_injective(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool map::is_single_valued() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_is_single_valued(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool map::is_strict_subset(const isl::map &map2) const +bool map::is_strict_subset(const map &map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_is_strict_subset(get(), map2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool map::is_subset(const isl::map &map2) const +bool map::is_subset(const map &map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_is_subset(get(), map2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::map map::lexmax() const +map map::lexmax() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_lexmax(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::lexmin() const +map map::lexmin() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_lexmin(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int map::n_basic_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_n_basic_map(get()); return res; } -isl::set map::params() const +set map::params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map map::polyhedral_hull() const +basic_map map::polyhedral_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_polyhedral_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::preimage_domain(isl::multi_aff ma) const +map map::preimage_domain(multi_aff ma) const { if (!ptr || ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_preimage_domain_multi_aff(copy(), ma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::preimage_range(isl::multi_aff ma) const +map map::preimage_range(multi_aff ma) const { if (!ptr || ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_preimage_range_multi_aff(copy(), ma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set map::range() const +set map::range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::range_curry() const +map map::range_curry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_range_curry(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::range_factor_domain() const +map map::range_factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_range_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::range_factor_range() const +map map::range_factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_range_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::range_map() const +map map::range_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_range_map(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::range_product(isl::map map2) const +map map::range_product(map map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_range_product(copy(), map2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::reverse() const +map map::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map map::sample() const +basic_map map::sample() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_sample(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::set_range_tuple_id(isl::id id) const +map map::set_range_tuple_id(id id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_set_range_tuple_id(copy(), id.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map map::simple_hull() const +basic_map map::simple_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_simple_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::subtract(isl::map map2) const +map map::subtract(map map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_subtract(copy(), map2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::sum(isl::map map2) const +map map::sum(map map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_sum(copy(), map2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::uncurry() const +map map::uncurry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_uncurry(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::unite(isl::map map2) const +map map::unite(map map2) const { if (!ptr || map2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_union(copy(), map2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map map::universe(isl::space space) +map map::universe(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_universe(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_map map::unshifted_simple_hull() const +basic_map map::unshifted_simple_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_unshifted_simple_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set map::wrap() const +set map::wrap() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_wrap(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); + return manage(res); +} + +map map::zip() const +{ + if (!ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + auto res = isl_map_zip(copy()); + if (!res) + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::map_list -isl::map_list manage(__isl_take isl_map_list *ptr) { +map_list manage(__isl_take isl_map_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return map_list(ptr); } -isl::map_list manage_copy(__isl_keep isl_map_list *ptr) { +map_list manage_copy(__isl_keep isl_map_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_map_list_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_map_list_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return map_list(ptr); } map_list::map_list() : ptr(nullptr) {} -map_list::map_list(const isl::map_list &obj) - : ptr(obj.copy()) +map_list::map_list(const map_list &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_map_list_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_map_list_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } map_list::map_list(__isl_take isl_map_list *ptr) : ptr(ptr) {} -map_list::map_list(isl::map el) +map_list::map_list(map el) { if (el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = el.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_list_from_map(el.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -map_list::map_list(isl::ctx ctx, int n) +map_list::map_list(ctx ctx, int n) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_list_alloc(ctx.release(), n); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -map_list &map_list::operator=(isl::map_list obj) { +map_list &map_list::operator=(map_list obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -9834,62 +9953,62 @@ map_list::operator bool() const -isl::ctx map_list::get_ctx() const { - return isl::ctx(isl_map_list_get_ctx(ptr)); +ctx map_list::get_ctx() const { + return ctx(isl_map_list_get_ctx(ptr)); } -isl::map_list map_list::add(isl::map el) const +map_list map_list::add(map el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_list_add(copy(), el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map_list map_list::concat(isl::map_list list2) const +map_list map_list::concat(map_list list2) const { if (!ptr || list2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_list_concat(copy(), list2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map_list map_list::drop(unsigned int first, unsigned int n) const +map_list map_list::drop(unsigned int first, unsigned int n) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_list_drop(copy(), first, n); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void map_list::foreach(const std::function &fn) const +void map_list::foreach(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_map *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -9898,109 +10017,111 @@ void map_list::foreach(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::map map_list::get_at(int index) const +map map_list::get_at(int index) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_list_get_at(get(), index); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map_list map_list::reverse() const +map_list map_list::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_list_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int map_list::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_map_list_size(get()); return res; } // implementations for isl::multi_aff -isl::multi_aff manage(__isl_take isl_multi_aff *ptr) { +multi_aff manage(__isl_take isl_multi_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return multi_aff(ptr); } -isl::multi_aff manage_copy(__isl_keep isl_multi_aff *ptr) { +multi_aff manage_copy(__isl_keep isl_multi_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_multi_aff_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_multi_aff_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return multi_aff(ptr); } multi_aff::multi_aff() : ptr(nullptr) {} -multi_aff::multi_aff(const isl::multi_aff &obj) - : ptr(obj.copy()) +multi_aff::multi_aff(const multi_aff &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_multi_aff_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_multi_aff_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } multi_aff::multi_aff(__isl_take isl_multi_aff *ptr) : ptr(ptr) {} -multi_aff::multi_aff(isl::aff aff) -{ - if (aff.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - auto ctx = aff.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); - auto res = isl_multi_aff_from_aff(aff.release()); - if (!res) - throw exception::create_from_last_error(ctx); - ptr = res; -} -multi_aff::multi_aff(isl::ctx ctx, const std::string &str) +multi_aff::multi_aff(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_aff::multi_aff(isl::space space, isl::aff_list list) +multi_aff::multi_aff(space space, aff_list list) { if (space.is_null() || list.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_from_aff_list(space.release(), list.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); + ptr = res; +} +multi_aff::multi_aff(aff aff) +{ + if (aff.is_null()) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = aff.get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + auto res = isl_multi_aff_from_aff(aff.release()); + if (!res) + exception::throw_last_error(ctx); ptr = res; } -multi_aff &multi_aff::operator=(isl::multi_aff obj) { +multi_aff &multi_aff::operator=(multi_aff obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -10048,490 +10169,488 @@ std::string multi_aff::to_str() const { } -isl::ctx multi_aff::get_ctx() const { - return isl::ctx(isl_multi_aff_get_ctx(ptr)); +ctx multi_aff::get_ctx() const { + return ctx(isl_multi_aff_get_ctx(ptr)); } -isl::multi_aff multi_aff::add(isl::multi_aff multi2) const +multi_aff multi_aff::add(multi_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_add(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::align_params(isl::space model) const +multi_aff multi_aff::align_params(space model) const { if (!ptr || model.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_align_params(copy(), model.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::domain_map(isl::space space) +multi_aff multi_aff::domain_map(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_domain_map(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::factor_domain() const +multi_aff multi_aff::factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::factor_range() const +multi_aff multi_aff::factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::flat_range_product(isl::multi_aff multi2) const +multi_aff multi_aff::flat_range_product(multi_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_flat_range_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::flatten_range() const +multi_aff multi_aff::flatten_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_flatten_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::floor() const +multi_aff multi_aff::floor() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_floor(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::from_range() const +multi_aff multi_aff::from_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_from_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff multi_aff::get_aff(int pos) const +aff multi_aff::get_aff(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_get_aff(get(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::aff_list multi_aff::get_aff_list() const +aff_list multi_aff::get_aff_list() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_get_aff_list(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space multi_aff::get_domain_space() const +space multi_aff::get_domain_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_get_domain_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id multi_aff::get_range_tuple_id() const +id multi_aff::get_range_tuple_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_get_range_tuple_id(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space multi_aff::get_space() const +space multi_aff::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::identity(isl::space space) +multi_aff multi_aff::identity(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_identity(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::mod(isl::multi_val mv) const +multi_aff multi_aff::mod(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_mod_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::neg() const +multi_aff multi_aff::neg() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_neg(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::product(isl::multi_aff multi2) const +multi_aff multi_aff::product(multi_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::pullback(isl::multi_aff ma2) const +multi_aff multi_aff::pullback(multi_aff ma2) const { if (!ptr || ma2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_pullback_multi_aff(copy(), ma2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::range_factor_domain() const +multi_aff multi_aff::range_factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_range_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::range_factor_range() const +multi_aff multi_aff::range_factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_range_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::range_map(isl::space space) +multi_aff multi_aff::range_map(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_range_map(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::range_product(isl::multi_aff multi2) const +multi_aff multi_aff::range_product(multi_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_range_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::range_splice(unsigned int pos, isl::multi_aff multi2) const +multi_aff multi_aff::range_splice(unsigned int pos, multi_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_range_splice(copy(), pos, multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::reset_user() const +multi_aff multi_aff::reset_user() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_reset_user(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::scale(isl::val v) const +multi_aff multi_aff::scale(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_scale_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::scale(isl::multi_val mv) const +multi_aff multi_aff::scale(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_scale_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::scale_down(isl::val v) const +multi_aff multi_aff::scale_down(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_scale_down_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::scale_down(isl::multi_val mv) const +multi_aff multi_aff::scale_down(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_scale_down_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::set_aff(int pos, isl::aff el) const +multi_aff multi_aff::set_aff(int pos, aff el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_set_aff(copy(), pos, el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::set_range_tuple_id(isl::id id) const +multi_aff multi_aff::set_range_tuple_id(id id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_set_range_tuple_id(copy(), id.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int multi_aff::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_size(get()); return res; } -isl::multi_aff multi_aff::splice(unsigned int in_pos, unsigned int out_pos, isl::multi_aff multi2) const +multi_aff multi_aff::splice(unsigned int in_pos, unsigned int out_pos, multi_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_splice(copy(), in_pos, out_pos, multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::sub(isl::multi_aff multi2) const +multi_aff multi_aff::sub(multi_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_sub(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::wrapped_range_map(isl::space space) +multi_aff multi_aff::wrapped_range_map(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_wrapped_range_map(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_aff multi_aff::zero(isl::space space) +multi_aff multi_aff::zero(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_aff_zero(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::multi_id -isl::multi_id manage(__isl_take isl_multi_id *ptr) { +multi_id manage(__isl_take isl_multi_id *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return multi_id(ptr); } -isl::multi_id manage_copy(__isl_keep isl_multi_id *ptr) { +multi_id manage_copy(__isl_keep isl_multi_id *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_multi_id_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_multi_id_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return multi_id(ptr); } multi_id::multi_id() : ptr(nullptr) {} -multi_id::multi_id(const isl::multi_id &obj) - : ptr(obj.copy()) +multi_id::multi_id(const multi_id &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_multi_id_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_multi_id_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } multi_id::multi_id(__isl_take isl_multi_id *ptr) : ptr(ptr) {} -multi_id::multi_id(isl::space space, isl::id_list list) +multi_id::multi_id(space space, id_list list) { if (space.is_null() || list.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_from_id_list(space.release(), list.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_id &multi_id::operator=(isl::multi_id obj) { +multi_id &multi_id::operator=(multi_id obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -10565,301 +10684,301 @@ multi_id::operator bool() const -isl::ctx multi_id::get_ctx() const { - return isl::ctx(isl_multi_id_get_ctx(ptr)); +ctx multi_id::get_ctx() const { + return ctx(isl_multi_id_get_ctx(ptr)); } -isl::multi_id multi_id::align_params(isl::space model) const +multi_id multi_id::align_params(space model) const { if (!ptr || model.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_align_params(copy(), model.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_id multi_id::factor_domain() const +multi_id multi_id::factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_id multi_id::factor_range() const +multi_id multi_id::factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_id multi_id::flat_range_product(isl::multi_id multi2) const +multi_id multi_id::flat_range_product(multi_id multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_flat_range_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_id multi_id::flatten_range() const +multi_id multi_id::flatten_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_flatten_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_id multi_id::from_range() const +multi_id multi_id::from_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_from_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space multi_id::get_domain_space() const +space multi_id::get_domain_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_get_domain_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id multi_id::get_id(int pos) const +id multi_id::get_id(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_get_id(get(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id_list multi_id::get_id_list() const +id_list multi_id::get_id_list() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_get_id_list(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space multi_id::get_space() const +space multi_id::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_id multi_id::range_factor_domain() const +multi_id multi_id::range_factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_range_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_id multi_id::range_factor_range() const +multi_id multi_id::range_factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_range_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_id multi_id::range_product(isl::multi_id multi2) const +multi_id multi_id::range_product(multi_id multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_range_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_id multi_id::range_splice(unsigned int pos, isl::multi_id multi2) const +multi_id multi_id::range_splice(unsigned int pos, multi_id multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_range_splice(copy(), pos, multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_id multi_id::reset_user() const +multi_id multi_id::reset_user() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_reset_user(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_id multi_id::set_id(int pos, isl::id el) const +multi_id multi_id::set_id(int pos, id el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_set_id(copy(), pos, el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int multi_id::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_id_size(get()); return res; } // implementations for isl::multi_pw_aff -isl::multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr) { +multi_pw_aff manage(__isl_take isl_multi_pw_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return multi_pw_aff(ptr); } -isl::multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr) { +multi_pw_aff manage_copy(__isl_keep isl_multi_pw_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_multi_pw_aff_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_multi_pw_aff_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return multi_pw_aff(ptr); } multi_pw_aff::multi_pw_aff() : ptr(nullptr) {} -multi_pw_aff::multi_pw_aff(const isl::multi_pw_aff &obj) - : ptr(obj.copy()) +multi_pw_aff::multi_pw_aff(const multi_pw_aff &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_multi_pw_aff_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_multi_pw_aff_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } multi_pw_aff::multi_pw_aff(__isl_take isl_multi_pw_aff *ptr) : ptr(ptr) {} -multi_pw_aff::multi_pw_aff(isl::space space, isl::pw_aff_list list) +multi_pw_aff::multi_pw_aff(space space, pw_aff_list list) { if (space.is_null() || list.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_from_pw_aff_list(space.release(), list.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_pw_aff::multi_pw_aff(isl::multi_aff ma) +multi_pw_aff::multi_pw_aff(multi_aff ma) { if (ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = ma.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_from_multi_aff(ma.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_pw_aff::multi_pw_aff(isl::pw_aff pa) +multi_pw_aff::multi_pw_aff(pw_aff pa) { if (pa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = pa.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_from_pw_aff(pa.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_pw_aff::multi_pw_aff(isl::pw_multi_aff pma) +multi_pw_aff::multi_pw_aff(pw_multi_aff pma) { if (pma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = pma.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_from_pw_multi_aff(pma.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_pw_aff::multi_pw_aff(isl::ctx ctx, const std::string &str) +multi_pw_aff::multi_pw_aff(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_pw_aff &multi_pw_aff::operator=(isl::multi_pw_aff obj) { +multi_pw_aff &multi_pw_aff::operator=(multi_pw_aff obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -10911,543 +11030,540 @@ std::string multi_pw_aff::to_str() const { } -isl::ctx multi_pw_aff::get_ctx() const { - return isl::ctx(isl_multi_pw_aff_get_ctx(ptr)); +ctx multi_pw_aff::get_ctx() const { + return ctx(isl_multi_pw_aff_get_ctx(ptr)); } -isl::multi_pw_aff multi_pw_aff::add(isl::multi_pw_aff multi2) const +multi_pw_aff multi_pw_aff::add(multi_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_add(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::align_params(isl::space model) const +multi_pw_aff multi_pw_aff::align_params(space model) const { if (!ptr || model.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_align_params(copy(), model.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set multi_pw_aff::domain() const +set multi_pw_aff::domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::factor_domain() const +multi_pw_aff multi_pw_aff::factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::factor_range() const +multi_pw_aff multi_pw_aff::factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::flat_range_product(isl::multi_pw_aff multi2) const +multi_pw_aff multi_pw_aff::flat_range_product(multi_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_flat_range_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::flatten_range() const +multi_pw_aff multi_pw_aff::flatten_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_flatten_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::from_range() const +multi_pw_aff multi_pw_aff::from_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_from_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space multi_pw_aff::get_domain_space() const +space multi_pw_aff::get_domain_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_get_domain_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff multi_pw_aff::get_pw_aff(int pos) const +pw_aff multi_pw_aff::get_pw_aff(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_get_pw_aff(get(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff_list multi_pw_aff::get_pw_aff_list() const +pw_aff_list multi_pw_aff::get_pw_aff_list() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_get_pw_aff_list(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id multi_pw_aff::get_range_tuple_id() const +id multi_pw_aff::get_range_tuple_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_get_range_tuple_id(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space multi_pw_aff::get_space() const +space multi_pw_aff::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::identity(isl::space space) +multi_pw_aff multi_pw_aff::identity(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_identity(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -bool multi_pw_aff::is_equal(const isl::multi_pw_aff &mpa2) const +bool multi_pw_aff::is_equal(const multi_pw_aff &mpa2) const { if (!ptr || mpa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_is_equal(get(), mpa2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::multi_pw_aff multi_pw_aff::mod(isl::multi_val mv) const +multi_pw_aff multi_pw_aff::mod(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_mod_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::neg() const +multi_pw_aff multi_pw_aff::neg() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_neg(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::product(isl::multi_pw_aff multi2) const +multi_pw_aff multi_pw_aff::product(multi_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::pullback(isl::multi_aff ma) const +multi_pw_aff multi_pw_aff::pullback(multi_aff ma) const { if (!ptr || ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_pullback_multi_aff(copy(), ma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::pullback(isl::pw_multi_aff pma) const +multi_pw_aff multi_pw_aff::pullback(pw_multi_aff pma) const { if (!ptr || pma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_pullback_pw_multi_aff(copy(), pma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::pullback(isl::multi_pw_aff mpa2) const +multi_pw_aff multi_pw_aff::pullback(multi_pw_aff mpa2) const { if (!ptr || mpa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_pullback_multi_pw_aff(copy(), mpa2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::range_factor_domain() const +multi_pw_aff multi_pw_aff::range_factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_range_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::range_factor_range() const +multi_pw_aff multi_pw_aff::range_factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_range_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::range_product(isl::multi_pw_aff multi2) const +multi_pw_aff multi_pw_aff::range_product(multi_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_range_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::range_splice(unsigned int pos, isl::multi_pw_aff multi2) const +multi_pw_aff multi_pw_aff::range_splice(unsigned int pos, multi_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_range_splice(copy(), pos, multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::reset_user() const +multi_pw_aff multi_pw_aff::reset_user() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_reset_user(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::scale(isl::val v) const +multi_pw_aff multi_pw_aff::scale(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_scale_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::scale(isl::multi_val mv) const +multi_pw_aff multi_pw_aff::scale(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_scale_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::scale_down(isl::val v) const +multi_pw_aff multi_pw_aff::scale_down(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_scale_down_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::scale_down(isl::multi_val mv) const +multi_pw_aff multi_pw_aff::scale_down(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_scale_down_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::set_pw_aff(int pos, isl::pw_aff el) const +multi_pw_aff multi_pw_aff::set_pw_aff(int pos, pw_aff el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_set_pw_aff(copy(), pos, el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::set_range_tuple_id(isl::id id) const +multi_pw_aff multi_pw_aff::set_range_tuple_id(id id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_set_range_tuple_id(copy(), id.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int multi_pw_aff::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_size(get()); return res; } -isl::multi_pw_aff multi_pw_aff::splice(unsigned int in_pos, unsigned int out_pos, isl::multi_pw_aff multi2) const +multi_pw_aff multi_pw_aff::splice(unsigned int in_pos, unsigned int out_pos, multi_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_splice(copy(), in_pos, out_pos, multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::sub(isl::multi_pw_aff multi2) const +multi_pw_aff multi_pw_aff::sub(multi_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_sub(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_pw_aff::zero(isl::space space) +multi_pw_aff multi_pw_aff::zero(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_pw_aff_zero(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::multi_union_pw_aff -isl::multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr) { +multi_union_pw_aff manage(__isl_take isl_multi_union_pw_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return multi_union_pw_aff(ptr); } -isl::multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr) { +multi_union_pw_aff manage_copy(__isl_keep isl_multi_union_pw_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_multi_union_pw_aff_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_multi_union_pw_aff_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return multi_union_pw_aff(ptr); } multi_union_pw_aff::multi_union_pw_aff() : ptr(nullptr) {} -multi_union_pw_aff::multi_union_pw_aff(const isl::multi_union_pw_aff &obj) - : ptr(obj.copy()) +multi_union_pw_aff::multi_union_pw_aff(const multi_union_pw_aff &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_multi_union_pw_aff_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_multi_union_pw_aff_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } multi_union_pw_aff::multi_union_pw_aff(__isl_take isl_multi_union_pw_aff *ptr) : ptr(ptr) {} -multi_union_pw_aff::multi_union_pw_aff(isl::space space, isl::union_pw_aff_list list) -{ - if (space.is_null() || list.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); - auto res = isl_multi_union_pw_aff_from_union_pw_aff_list(space.release(), list.release()); - if (!res) - throw exception::create_from_last_error(ctx); - ptr = res; -} -multi_union_pw_aff::multi_union_pw_aff(isl::union_pw_aff upa) +multi_union_pw_aff::multi_union_pw_aff(union_pw_aff upa) { if (upa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = upa.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_from_union_pw_aff(upa.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_union_pw_aff::multi_union_pw_aff(isl::multi_pw_aff mpa) +multi_union_pw_aff::multi_union_pw_aff(multi_pw_aff mpa) { if (mpa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = mpa.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_from_multi_pw_aff(mpa.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_union_pw_aff::multi_union_pw_aff(isl::union_set domain, isl::multi_val mv) +multi_union_pw_aff::multi_union_pw_aff(union_set domain, multi_val mv) { if (domain.is_null() || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_multi_val_on_domain(domain.release(), mv.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_union_pw_aff::multi_union_pw_aff(isl::union_set domain, isl::multi_aff ma) +multi_union_pw_aff::multi_union_pw_aff(union_set domain, multi_aff ma) { if (domain.is_null() || ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_multi_aff_on_domain(domain.release(), ma.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); + ptr = res; +} +multi_union_pw_aff::multi_union_pw_aff(space space, union_pw_aff_list list) +{ + if (space.is_null() || list.is_null()) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = space.get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + auto res = isl_multi_union_pw_aff_from_union_pw_aff_list(space.release(), list.release()); + if (!res) + exception::throw_last_error(ctx); ptr = res; } -multi_union_pw_aff::multi_union_pw_aff(isl::ctx ctx, const std::string &str) +multi_union_pw_aff::multi_union_pw_aff(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_union_pw_aff &multi_union_pw_aff::operator=(isl::multi_union_pw_aff obj) { +multi_union_pw_aff &multi_union_pw_aff::operator=(multi_union_pw_aff obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -11495,571 +11611,572 @@ std::string multi_union_pw_aff::to_str() const { } -isl::ctx multi_union_pw_aff::get_ctx() const { - return isl::ctx(isl_multi_union_pw_aff_get_ctx(ptr)); +ctx multi_union_pw_aff::get_ctx() const { + return ctx(isl_multi_union_pw_aff_get_ctx(ptr)); } -isl::multi_union_pw_aff multi_union_pw_aff::add(isl::multi_union_pw_aff multi2) const +multi_union_pw_aff multi_union_pw_aff::add(multi_union_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_add(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::align_params(isl::space model) const +multi_union_pw_aff multi_union_pw_aff::align_params(space model) const { if (!ptr || model.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_align_params(copy(), model.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::apply(isl::multi_aff ma) const +multi_union_pw_aff multi_union_pw_aff::apply(multi_aff ma) const { if (!ptr || ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_apply_multi_aff(copy(), ma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::apply(isl::pw_multi_aff pma) const +multi_union_pw_aff multi_union_pw_aff::apply(pw_multi_aff pma) const { if (!ptr || pma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_apply_pw_multi_aff(copy(), pma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set multi_union_pw_aff::domain() const +union_set multi_union_pw_aff::domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_pw_aff multi_union_pw_aff::extract_multi_pw_aff(isl::space space) const +multi_pw_aff multi_union_pw_aff::extract_multi_pw_aff(space space) const { if (!ptr || space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_extract_multi_pw_aff(get(), space.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::factor_domain() const +multi_union_pw_aff multi_union_pw_aff::factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::factor_range() const +multi_union_pw_aff multi_union_pw_aff::factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::flat_range_product(isl::multi_union_pw_aff multi2) const +multi_union_pw_aff multi_union_pw_aff::flat_range_product(multi_union_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_flat_range_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::flatten_range() const +multi_union_pw_aff multi_union_pw_aff::flatten_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_flatten_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::floor() const +multi_union_pw_aff multi_union_pw_aff::floor() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_floor(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::from_range() const +multi_union_pw_aff multi_union_pw_aff::from_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_from_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::from_union_map(isl::union_map umap) +multi_union_pw_aff multi_union_pw_aff::from_union_map(union_map umap) { if (umap.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = umap.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_from_union_map(umap.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::space multi_union_pw_aff::get_domain_space() const +space multi_union_pw_aff::get_domain_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_get_domain_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id multi_union_pw_aff::get_range_tuple_id() const +id multi_union_pw_aff::get_range_tuple_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_get_range_tuple_id(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space multi_union_pw_aff::get_space() const +space multi_union_pw_aff::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff multi_union_pw_aff::get_union_pw_aff(int pos) const +union_pw_aff multi_union_pw_aff::get_union_pw_aff(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_get_union_pw_aff(get(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff_list multi_union_pw_aff::get_union_pw_aff_list() const +union_pw_aff_list multi_union_pw_aff::get_union_pw_aff_list() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_get_union_pw_aff_list(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::gist(isl::union_set context) const +multi_union_pw_aff multi_union_pw_aff::gist(union_set context) const { if (!ptr || context.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_gist(copy(), context.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::intersect_domain(isl::union_set uset) const +multi_union_pw_aff multi_union_pw_aff::intersect_domain(union_set uset) const { if (!ptr || uset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_intersect_domain(copy(), uset.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::intersect_params(isl::set params) const +multi_union_pw_aff multi_union_pw_aff::intersect_params(set params) const { if (!ptr || params.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_intersect_params(copy(), params.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool multi_union_pw_aff::involves_param(const isl::id &id) const +bool multi_union_pw_aff::involves_param(const id &id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_involves_param_id(get(), id.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::multi_val multi_union_pw_aff::max_multi_val() const +multi_val multi_union_pw_aff::max_multi_val() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_max_multi_val(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_union_pw_aff::min_multi_val() const +multi_val multi_union_pw_aff::min_multi_val() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_min_multi_val(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::mod(isl::multi_val mv) const +multi_union_pw_aff multi_union_pw_aff::mod(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_mod_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::neg() const +multi_union_pw_aff multi_union_pw_aff::neg() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_neg(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::pullback(isl::union_pw_multi_aff upma) const +multi_union_pw_aff multi_union_pw_aff::pullback(union_pw_multi_aff upma) const { if (!ptr || upma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::range_factor_domain() const +multi_union_pw_aff multi_union_pw_aff::range_factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_range_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::range_factor_range() const +multi_union_pw_aff multi_union_pw_aff::range_factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_range_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::range_product(isl::multi_union_pw_aff multi2) const +multi_union_pw_aff multi_union_pw_aff::range_product(multi_union_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_range_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::range_splice(unsigned int pos, isl::multi_union_pw_aff multi2) const +multi_union_pw_aff multi_union_pw_aff::range_splice(unsigned int pos, multi_union_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_range_splice(copy(), pos, multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::reset_user() const +multi_union_pw_aff multi_union_pw_aff::reset_user() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_reset_user(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::scale(isl::val v) const +multi_union_pw_aff multi_union_pw_aff::scale(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_scale_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::scale(isl::multi_val mv) const +multi_union_pw_aff multi_union_pw_aff::scale(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_scale_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::scale_down(isl::val v) const +multi_union_pw_aff multi_union_pw_aff::scale_down(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_scale_down_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::scale_down(isl::multi_val mv) const +multi_union_pw_aff multi_union_pw_aff::scale_down(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_scale_down_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::set_range_tuple_id(isl::id id) const +multi_union_pw_aff multi_union_pw_aff::set_range_tuple_id(id id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_set_range_tuple_id(copy(), id.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::set_union_pw_aff(int pos, isl::union_pw_aff el) const +multi_union_pw_aff multi_union_pw_aff::set_union_pw_aff(int pos, union_pw_aff el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_set_union_pw_aff(copy(), pos, el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int multi_union_pw_aff::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_size(get()); return res; } -isl::multi_union_pw_aff multi_union_pw_aff::sub(isl::multi_union_pw_aff multi2) const +multi_union_pw_aff multi_union_pw_aff::sub(multi_union_pw_aff multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_sub(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::union_add(isl::multi_union_pw_aff mupa2) const +multi_union_pw_aff multi_union_pw_aff::union_add(multi_union_pw_aff mupa2) const { if (!ptr || mupa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_union_add(copy(), mupa2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff multi_union_pw_aff::zero(isl::space space) +multi_union_pw_aff multi_union_pw_aff::zero(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_zero(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set multi_union_pw_aff::zero_union_set() const +union_set multi_union_pw_aff::zero_union_set() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_union_pw_aff_zero_union_set(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::multi_val -isl::multi_val manage(__isl_take isl_multi_val *ptr) { +multi_val manage(__isl_take isl_multi_val *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return multi_val(ptr); } -isl::multi_val manage_copy(__isl_keep isl_multi_val *ptr) { +multi_val manage_copy(__isl_keep isl_multi_val *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_multi_val_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_multi_val_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return multi_val(ptr); } multi_val::multi_val() : ptr(nullptr) {} -multi_val::multi_val(const isl::multi_val &obj) - : ptr(obj.copy()) +multi_val::multi_val(const multi_val &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_multi_val_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_multi_val_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } multi_val::multi_val(__isl_take isl_multi_val *ptr) : ptr(ptr) {} -multi_val::multi_val(isl::space space, isl::val_list list) +multi_val::multi_val(space space, val_list list) { if (space.is_null() || list.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_from_val_list(space.release(), list.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -multi_val &multi_val::operator=(isl::multi_val obj) { +multi_val &multi_val::operator=(multi_val obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -12107,414 +12224,416 @@ std::string multi_val::to_str() const { } -isl::ctx multi_val::get_ctx() const { - return isl::ctx(isl_multi_val_get_ctx(ptr)); +ctx multi_val::get_ctx() const { + return ctx(isl_multi_val_get_ctx(ptr)); } -isl::multi_val multi_val::add(isl::multi_val multi2) const +multi_val multi_val::add(multi_val multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_add(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::align_params(isl::space model) const +multi_val multi_val::align_params(space model) const { if (!ptr || model.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_align_params(copy(), model.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::factor_domain() const +multi_val multi_val::factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::factor_range() const +multi_val multi_val::factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::flat_range_product(isl::multi_val multi2) const +multi_val multi_val::flat_range_product(multi_val multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_flat_range_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::flatten_range() const +multi_val multi_val::flatten_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_flatten_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::from_range() const +multi_val multi_val::from_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_from_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space multi_val::get_domain_space() const +space multi_val::get_domain_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_get_domain_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id multi_val::get_range_tuple_id() const +id multi_val::get_range_tuple_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_get_range_tuple_id(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space multi_val::get_space() const +space multi_val::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val multi_val::get_val(int pos) const +val multi_val::get_val(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_get_val(get(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val_list multi_val::get_val_list() const +val_list multi_val::get_val_list() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_get_val_list(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::mod(isl::multi_val mv) const +multi_val multi_val::mod(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_mod_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::neg() const +multi_val multi_val::neg() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_neg(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::product(isl::multi_val multi2) const +multi_val multi_val::product(multi_val multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::range_factor_domain() const +multi_val multi_val::range_factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_range_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::range_factor_range() const +multi_val multi_val::range_factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_range_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::range_product(isl::multi_val multi2) const +multi_val multi_val::range_product(multi_val multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_range_product(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::range_splice(unsigned int pos, isl::multi_val multi2) const +multi_val multi_val::range_splice(unsigned int pos, multi_val multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_range_splice(copy(), pos, multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::reset_user() const +multi_val multi_val::reset_user() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_reset_user(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::scale(isl::val v) const +multi_val multi_val::scale(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_scale_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::scale(isl::multi_val mv) const +multi_val multi_val::scale(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_scale_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::scale_down(isl::val v) const +multi_val multi_val::scale_down(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_scale_down_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::scale_down(isl::multi_val mv) const +multi_val multi_val::scale_down(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_scale_down_multi_val(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::set_range_tuple_id(isl::id id) const +multi_val multi_val::set_range_tuple_id(id id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_set_range_tuple_id(copy(), id.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::set_val(int pos, isl::val el) const +multi_val multi_val::set_val(int pos, val el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_set_val(copy(), pos, el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int multi_val::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_size(get()); return res; } -isl::multi_val multi_val::splice(unsigned int in_pos, unsigned int out_pos, isl::multi_val multi2) const +multi_val multi_val::splice(unsigned int in_pos, unsigned int out_pos, multi_val multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_splice(copy(), in_pos, out_pos, multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::sub(isl::multi_val multi2) const +multi_val multi_val::sub(multi_val multi2) const { if (!ptr || multi2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_sub(copy(), multi2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_val multi_val::zero(isl::space space) +multi_val multi_val::zero(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_multi_val_zero(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::point -isl::point manage(__isl_take isl_point *ptr) { +point manage(__isl_take isl_point *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return point(ptr); } -isl::point manage_copy(__isl_keep isl_point *ptr) { +point manage_copy(__isl_keep isl_point *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_point_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_point_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return point(ptr); } point::point() : ptr(nullptr) {} -point::point(const isl::point &obj) - : ptr(obj.copy()) +point::point(const point &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_point_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_point_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } point::point(__isl_take isl_point *ptr) : ptr(ptr) {} -point::point(isl::space dim) +point::point(space dim) { if (dim.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = dim.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_point_zero(dim.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -point &point::operator=(isl::point obj) { +point &point::operator=(point obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -12562,111 +12681,112 @@ std::string point::to_str() const { } -isl::ctx point::get_ctx() const { - return isl::ctx(isl_point_get_ctx(ptr)); +ctx point::get_ctx() const { + return ctx(isl_point_get_ctx(ptr)); } -isl::space point::get_space() const +space point::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_point_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool point::is_void() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_point_is_void(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } // implementations for isl::pw_aff -isl::pw_aff manage(__isl_take isl_pw_aff *ptr) { +pw_aff manage(__isl_take isl_pw_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return pw_aff(ptr); } -isl::pw_aff manage_copy(__isl_keep isl_pw_aff *ptr) { +pw_aff manage_copy(__isl_keep isl_pw_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_pw_aff_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_pw_aff_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return pw_aff(ptr); } pw_aff::pw_aff() : ptr(nullptr) {} -pw_aff::pw_aff(const isl::pw_aff &obj) - : ptr(obj.copy()) +pw_aff::pw_aff(const pw_aff &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_pw_aff_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_pw_aff_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } pw_aff::pw_aff(__isl_take isl_pw_aff *ptr) : ptr(ptr) {} -pw_aff::pw_aff(isl::aff aff) +pw_aff::pw_aff(aff aff) { if (aff.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = aff.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_from_aff(aff.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -pw_aff::pw_aff(isl::local_space ls) +pw_aff::pw_aff(local_space ls) { if (ls.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = ls.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_zero_on_domain(ls.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -pw_aff::pw_aff(isl::set domain, isl::val v) +pw_aff::pw_aff(set domain, val v) { if (domain.is_null() || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_val_on_domain(domain.release(), v.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -pw_aff::pw_aff(isl::ctx ctx, const std::string &str) +pw_aff::pw_aff(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -pw_aff &pw_aff::operator=(isl::pw_aff obj) { +pw_aff &pw_aff::operator=(pw_aff obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -12718,122 +12838,122 @@ std::string pw_aff::to_str() const { } -isl::ctx pw_aff::get_ctx() const { - return isl::ctx(isl_pw_aff_get_ctx(ptr)); +ctx pw_aff::get_ctx() const { + return ctx(isl_pw_aff_get_ctx(ptr)); } -isl::pw_aff pw_aff::add(isl::pw_aff pwaff2) const +pw_aff pw_aff::add(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_add(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::ceil() const +pw_aff pw_aff::ceil() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_ceil(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::cond(isl::pw_aff pwaff_true, isl::pw_aff pwaff_false) const +pw_aff pw_aff::cond(pw_aff pwaff_true, pw_aff pwaff_false) const { if (!ptr || pwaff_true.is_null() || pwaff_false.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_cond(copy(), pwaff_true.release(), pwaff_false.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::div(isl::pw_aff pa2) const +pw_aff pw_aff::div(pw_aff pa2) const { if (!ptr || pa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_div(copy(), pa2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set pw_aff::domain() const +set pw_aff::domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map pw_aff::eq_map(isl::pw_aff pa2) const +map pw_aff::eq_map(pw_aff pa2) const { if (!ptr || pa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_eq_map(copy(), pa2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set pw_aff::eq_set(isl::pw_aff pwaff2) const +set pw_aff::eq_set(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_eq_set(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::floor() const +pw_aff pw_aff::floor() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_floor(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void pw_aff::foreach_piece(const std::function &fn) const +void pw_aff::foreach_piece(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_set *arg_0, isl_aff *arg_1, void *arg_2) -> isl_stat { auto *data = static_cast(arg_2); - try { - (data->func)(isl::manage(arg_0), isl::manage(arg_1)); + ISL_CPP_TRY { + (data->func)(manage(arg_0), manage(arg_1)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -12842,457 +12962,460 @@ void pw_aff::foreach_piece(const std::function &fn) co if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::set pw_aff::ge_set(isl::pw_aff pwaff2) const +set pw_aff::ge_set(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_ge_set(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space pw_aff::get_space() const +space pw_aff::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map pw_aff::gt_map(isl::pw_aff pa2) const +map pw_aff::gt_map(pw_aff pa2) const { if (!ptr || pa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_gt_map(copy(), pa2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set pw_aff::gt_set(isl::pw_aff pwaff2) const +set pw_aff::gt_set(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_gt_set(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::intersect_domain(isl::set set) const +pw_aff pw_aff::intersect_domain(set set) const { if (!ptr || set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_intersect_domain(copy(), set.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::intersect_params(isl::set set) const +pw_aff pw_aff::intersect_params(set set) const { if (!ptr || set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_intersect_params(copy(), set.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool pw_aff::involves_nan() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_involves_nan(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool pw_aff::is_cst() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_is_cst(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool pw_aff::is_equal(const isl::pw_aff &pa2) const +bool pw_aff::is_equal(const pw_aff &pa2) const { if (!ptr || pa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_is_equal(get(), pa2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::set pw_aff::le_set(isl::pw_aff pwaff2) const +set pw_aff::le_set(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_le_set(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map pw_aff::lt_map(isl::pw_aff pa2) const +map pw_aff::lt_map(pw_aff pa2) const { if (!ptr || pa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_lt_map(copy(), pa2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set pw_aff::lt_set(isl::pw_aff pwaff2) const +set pw_aff::lt_set(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_lt_set(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::max(isl::pw_aff pwaff2) const +pw_aff pw_aff::max(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_max(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::min(isl::pw_aff pwaff2) const +pw_aff pw_aff::min(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_min(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::mod(isl::val mod) const +pw_aff pw_aff::mod(val mod) const { if (!ptr || mod.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_mod_val(copy(), mod.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::mul(isl::pw_aff pwaff2) const +pw_aff pw_aff::mul(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_mul(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int pw_aff::n_piece() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_n_piece(get()); return res; } -isl::set pw_aff::ne_set(isl::pw_aff pwaff2) const +set pw_aff::ne_set(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_ne_set(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::neg() const +pw_aff pw_aff::neg() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_neg(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set pw_aff::nonneg_set() const +set pw_aff::nonneg_set() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_nonneg_set(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set pw_aff::params() const +set pw_aff::params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set pw_aff::pos_set() const +set pw_aff::pos_set() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_pos_set(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::project_domain_on_params() const +pw_aff pw_aff::project_domain_on_params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_project_domain_on_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::pullback(isl::multi_aff ma) const +pw_aff pw_aff::pullback(multi_aff ma) const { if (!ptr || ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_pullback_multi_aff(copy(), ma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::pullback(isl::pw_multi_aff pma) const +pw_aff pw_aff::pullback(pw_multi_aff pma) const { if (!ptr || pma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_pullback_pw_multi_aff(copy(), pma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::pullback(isl::multi_pw_aff mpa) const +pw_aff pw_aff::pullback(multi_pw_aff mpa) const { if (!ptr || mpa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_pullback_multi_pw_aff(copy(), mpa.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::scale(isl::val v) const +pw_aff pw_aff::scale(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_scale_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::scale_down(isl::val f) const +pw_aff pw_aff::scale_down(val f) const { if (!ptr || f.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_scale_down_val(copy(), f.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::sub(isl::pw_aff pwaff2) const +pw_aff pw_aff::sub(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_sub(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::tdiv_q(isl::pw_aff pa2) const +pw_aff pw_aff::tdiv_q(pw_aff pa2) const { if (!ptr || pa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_tdiv_q(copy(), pa2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::tdiv_r(isl::pw_aff pa2) const +pw_aff pw_aff::tdiv_r(pw_aff pa2) const { if (!ptr || pa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_tdiv_r(copy(), pa2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff pw_aff::union_add(isl::pw_aff pwaff2) const +pw_aff pw_aff::union_add(pw_aff pwaff2) const { if (!ptr || pwaff2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_union_add(copy(), pwaff2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set pw_aff::zero_set() const +set pw_aff::zero_set() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_zero_set(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::pw_aff_list -isl::pw_aff_list manage(__isl_take isl_pw_aff_list *ptr) { +pw_aff_list manage(__isl_take isl_pw_aff_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return pw_aff_list(ptr); } -isl::pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr) { +pw_aff_list manage_copy(__isl_keep isl_pw_aff_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_pw_aff_list_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_pw_aff_list_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return pw_aff_list(ptr); } pw_aff_list::pw_aff_list() : ptr(nullptr) {} -pw_aff_list::pw_aff_list(const isl::pw_aff_list &obj) - : ptr(obj.copy()) +pw_aff_list::pw_aff_list(const pw_aff_list &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_pw_aff_list_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_pw_aff_list_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } pw_aff_list::pw_aff_list(__isl_take isl_pw_aff_list *ptr) : ptr(ptr) {} -pw_aff_list::pw_aff_list(isl::pw_aff el) +pw_aff_list::pw_aff_list(pw_aff el) { if (el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = el.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_list_from_pw_aff(el.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -pw_aff_list::pw_aff_list(isl::ctx ctx, int n) +pw_aff_list::pw_aff_list(ctx ctx, int n) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_list_alloc(ctx.release(), n); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -pw_aff_list &pw_aff_list::operator=(isl::pw_aff_list obj) { +pw_aff_list &pw_aff_list::operator=(pw_aff_list obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -13326,62 +13449,62 @@ pw_aff_list::operator bool() const -isl::ctx pw_aff_list::get_ctx() const { - return isl::ctx(isl_pw_aff_list_get_ctx(ptr)); +ctx pw_aff_list::get_ctx() const { + return ctx(isl_pw_aff_list_get_ctx(ptr)); } -isl::pw_aff_list pw_aff_list::add(isl::pw_aff el) const +pw_aff_list pw_aff_list::add(pw_aff el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_list_add(copy(), el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff_list pw_aff_list::concat(isl::pw_aff_list list2) const +pw_aff_list pw_aff_list::concat(pw_aff_list list2) const { if (!ptr || list2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_list_concat(copy(), list2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff_list pw_aff_list::drop(unsigned int first, unsigned int n) const +pw_aff_list pw_aff_list::drop(unsigned int first, unsigned int n) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_list_drop(copy(), first, n); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void pw_aff_list::foreach(const std::function &fn) const +void pw_aff_list::foreach(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_pw_aff *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -13390,133 +13513,133 @@ void pw_aff_list::foreach(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::pw_aff pw_aff_list::get_at(int index) const +pw_aff pw_aff_list::get_at(int index) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_list_get_at(get(), index); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff_list pw_aff_list::reverse() const +pw_aff_list pw_aff_list::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_list_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int pw_aff_list::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_aff_list_size(get()); return res; } // implementations for isl::pw_multi_aff -isl::pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr) { +pw_multi_aff manage(__isl_take isl_pw_multi_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return pw_multi_aff(ptr); } -isl::pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr) { +pw_multi_aff manage_copy(__isl_keep isl_pw_multi_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_pw_multi_aff_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_pw_multi_aff_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return pw_multi_aff(ptr); } pw_multi_aff::pw_multi_aff() : ptr(nullptr) {} -pw_multi_aff::pw_multi_aff(const isl::pw_multi_aff &obj) - : ptr(obj.copy()) +pw_multi_aff::pw_multi_aff(const pw_multi_aff &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_pw_multi_aff_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_pw_multi_aff_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } pw_multi_aff::pw_multi_aff(__isl_take isl_pw_multi_aff *ptr) : ptr(ptr) {} -pw_multi_aff::pw_multi_aff(isl::multi_aff ma) +pw_multi_aff::pw_multi_aff(multi_aff ma) { if (ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = ma.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_multi_aff_from_multi_aff(ma.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -pw_multi_aff::pw_multi_aff(isl::pw_aff pa) +pw_multi_aff::pw_multi_aff(pw_aff pa) { if (pa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = pa.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_multi_aff_from_pw_aff(pa.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -pw_multi_aff::pw_multi_aff(isl::set domain, isl::multi_val mv) +pw_multi_aff::pw_multi_aff(set domain, multi_val mv) { if (domain.is_null() || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_multi_aff_multi_val_on_domain(domain.release(), mv.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -pw_multi_aff::pw_multi_aff(isl::map map) +pw_multi_aff::pw_multi_aff(map map) { if (map.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = map.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_multi_aff_from_map(map.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -pw_multi_aff::pw_multi_aff(isl::ctx ctx, const std::string &str) +pw_multi_aff::pw_multi_aff(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_multi_aff_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -pw_multi_aff &pw_multi_aff::operator=(isl::pw_multi_aff obj) { +pw_multi_aff &pw_multi_aff::operator=(pw_multi_aff obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -13568,62 +13691,62 @@ std::string pw_multi_aff::to_str() const { } -isl::ctx pw_multi_aff::get_ctx() const { - return isl::ctx(isl_pw_multi_aff_get_ctx(ptr)); +ctx pw_multi_aff::get_ctx() const { + return ctx(isl_pw_multi_aff_get_ctx(ptr)); } -isl::pw_multi_aff pw_multi_aff::add(isl::pw_multi_aff pma2) const +pw_multi_aff pw_multi_aff::add(pw_multi_aff pma2) const { if (!ptr || pma2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_multi_aff_add(copy(), pma2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set pw_multi_aff::domain() const +set pw_multi_aff::domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_multi_aff_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_multi_aff pw_multi_aff::flat_range_product(isl::pw_multi_aff pma2) const +pw_multi_aff pw_multi_aff::flat_range_product(pw_multi_aff pma2) const { if (!ptr || pma2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_pw_multi_aff_flat_range_product(copy(), pma2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void pw_multi_aff::foreach_piece(const std::function &fn) const +void pw_multi_aff::foreach_piece(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_set *arg_0, isl_multi_aff *arg_1, void *arg_2) -> isl_stat { auto *data = static_cast(arg_2); - try { - (data->func)(isl::manage(arg_0), isl::manage(arg_1)); + ISL_CPP_TRY { + (data->func)(manage(arg_0), manage(arg_1)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -13632,267 +13755,269 @@ void pw_multi_aff::foreach_piece(const std::functionptr, obj.ptr); return *this; } @@ -13940,172 +14065,175 @@ std::string schedule::to_str() const { } -isl::ctx schedule::get_ctx() const { - return isl::ctx(isl_schedule_get_ctx(ptr)); +ctx schedule::get_ctx() const { + return ctx(isl_schedule_get_ctx(ptr)); } -isl::schedule schedule::from_domain(isl::union_set domain) +schedule schedule::from_domain(union_set domain) { if (domain.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_from_domain(domain.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set schedule::get_domain() const +union_set schedule::get_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_get_domain(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map schedule::get_map() const +union_map schedule::get_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_get_map(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_node schedule::get_root() const +schedule_node schedule::get_root() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_get_root(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule schedule::insert_partial_schedule(isl::multi_union_pw_aff partial) const +schedule schedule::insert_partial_schedule(multi_union_pw_aff partial) const { if (!ptr || partial.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_insert_partial_schedule(copy(), partial.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool schedule::plain_is_equal(const isl::schedule &schedule2) const +bool schedule::plain_is_equal(const schedule &schedule2) const { if (!ptr || schedule2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_plain_is_equal(get(), schedule2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::schedule schedule::pullback(isl::union_pw_multi_aff upma) const +schedule schedule::pullback(union_pw_multi_aff upma) const { if (!ptr || upma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_pullback_union_pw_multi_aff(copy(), upma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule schedule::reset_user() const +schedule schedule::reset_user() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_reset_user(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule schedule::sequence(isl::schedule schedule2) const +schedule schedule::sequence(schedule schedule2) const { if (!ptr || schedule2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_sequence(copy(), schedule2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule schedule::set(isl::schedule schedule2) const +schedule schedule::set(schedule schedule2) const { if (!ptr || schedule2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_set(copy(), schedule2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::schedule_constraints -isl::schedule_constraints manage(__isl_take isl_schedule_constraints *ptr) { +schedule_constraints manage(__isl_take isl_schedule_constraints *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return schedule_constraints(ptr); } -isl::schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr) { +schedule_constraints manage_copy(__isl_keep isl_schedule_constraints *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_schedule_constraints_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_schedule_constraints_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return schedule_constraints(ptr); } schedule_constraints::schedule_constraints() : ptr(nullptr) {} -schedule_constraints::schedule_constraints(const isl::schedule_constraints &obj) - : ptr(obj.copy()) +schedule_constraints::schedule_constraints(const schedule_constraints &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_schedule_constraints_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_schedule_constraints_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } schedule_constraints::schedule_constraints(__isl_take isl_schedule_constraints *ptr) : ptr(ptr) {} -schedule_constraints::schedule_constraints(isl::ctx ctx, const std::string &str) +schedule_constraints::schedule_constraints(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -schedule_constraints &schedule_constraints::operator=(isl::schedule_constraints obj) { +schedule_constraints &schedule_constraints::operator=(schedule_constraints obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -14153,248 +14281,251 @@ std::string schedule_constraints::to_str() const { } -isl::ctx schedule_constraints::get_ctx() const { - return isl::ctx(isl_schedule_constraints_get_ctx(ptr)); +ctx schedule_constraints::get_ctx() const { + return ctx(isl_schedule_constraints_get_ctx(ptr)); } -isl::schedule schedule_constraints::compute_schedule() const +schedule schedule_constraints::compute_schedule() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_compute_schedule(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map schedule_constraints::get_coincidence() const +union_map schedule_constraints::get_coincidence() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_get_coincidence(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map schedule_constraints::get_conditional_validity() const +union_map schedule_constraints::get_conditional_validity() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_get_conditional_validity(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map schedule_constraints::get_conditional_validity_condition() const +union_map schedule_constraints::get_conditional_validity_condition() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_get_conditional_validity_condition(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set schedule_constraints::get_context() const +set schedule_constraints::get_context() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_get_context(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set schedule_constraints::get_domain() const +union_set schedule_constraints::get_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_get_domain(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff schedule_constraints::get_prefix() const +multi_union_pw_aff schedule_constraints::get_prefix() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_get_prefix(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map schedule_constraints::get_proximity() const +union_map schedule_constraints::get_proximity() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_get_proximity(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map schedule_constraints::get_validity() const +union_map schedule_constraints::get_validity() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_get_validity(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_constraints schedule_constraints::intersect_domain(isl::union_set domain) const +schedule_constraints schedule_constraints::intersect_domain(union_set domain) const { if (!ptr || domain.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_intersect_domain(copy(), domain.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_constraints schedule_constraints::on_domain(isl::union_set domain) +schedule_constraints schedule_constraints::on_domain(union_set domain) { if (domain.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_on_domain(domain.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_constraints schedule_constraints::set_coincidence(isl::union_map coincidence) const +schedule_constraints schedule_constraints::set_coincidence(union_map coincidence) const { if (!ptr || coincidence.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_set_coincidence(copy(), coincidence.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_constraints schedule_constraints::set_conditional_validity(isl::union_map condition, isl::union_map validity) const +schedule_constraints schedule_constraints::set_conditional_validity(union_map condition, union_map validity) const { if (!ptr || condition.is_null() || validity.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_set_conditional_validity(copy(), condition.release(), validity.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_constraints schedule_constraints::set_context(isl::set context) const +schedule_constraints schedule_constraints::set_context(set context) const { if (!ptr || context.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_set_context(copy(), context.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_constraints schedule_constraints::set_prefix(isl::multi_union_pw_aff prefix) const +schedule_constraints schedule_constraints::set_prefix(multi_union_pw_aff prefix) const { if (!ptr || prefix.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_set_prefix(copy(), prefix.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_constraints schedule_constraints::set_proximity(isl::union_map proximity) const +schedule_constraints schedule_constraints::set_proximity(union_map proximity) const { if (!ptr || proximity.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_set_proximity(copy(), proximity.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_constraints schedule_constraints::set_validity(isl::union_map validity) const +schedule_constraints schedule_constraints::set_validity(union_map validity) const { if (!ptr || validity.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_constraints_set_validity(copy(), validity.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::schedule_node -isl::schedule_node manage(__isl_take isl_schedule_node *ptr) { +schedule_node manage(__isl_take isl_schedule_node *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return schedule_node(ptr); } -isl::schedule_node manage_copy(__isl_keep isl_schedule_node *ptr) { +schedule_node manage_copy(__isl_keep isl_schedule_node *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_schedule_node_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_schedule_node_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return schedule_node(ptr); } schedule_node::schedule_node() : ptr(nullptr) {} -schedule_node::schedule_node(const isl::schedule_node &obj) - : ptr(obj.copy()) +schedule_node::schedule_node(const schedule_node &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_schedule_node_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_schedule_node_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } schedule_node::schedule_node(__isl_take isl_schedule_node *ptr) : ptr(ptr) {} -schedule_node &schedule_node::operator=(isl::schedule_node obj) { +schedule_node &schedule_node::operator=(schedule_node obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -14450,8 +14581,7 @@ template bool schedule_node::isa() { if (is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return isl_schedule_node_get_type(get()) == T::type; } template @@ -14460,74 +14590,74 @@ T schedule_node::as() return isa() ? T(copy()) : T(); } -isl::ctx schedule_node::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } -isl::schedule_node schedule_node::ancestor(int generation) const +schedule_node schedule_node::ancestor(int generation) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_ancestor(copy(), generation); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_node schedule_node::child(int pos) const +schedule_node schedule_node::child(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_child(copy(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_node schedule_node::cut() const +schedule_node schedule_node::cut() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_cut(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::schedule_node schedule_node::del() const +schedule_node schedule_node::del() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_delete(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool schedule_node::every_descendant(const std::function &test) const +bool schedule_node::every_descendant(const std::function &test) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct test_data { - std::function func; + std::function func; std::exception_ptr eptr; } test_data = { test }; auto test_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_bool { auto *data = static_cast(arg_1); - try { - auto ret = (data->func)(isl::manage_copy(arg_0)); + ISL_CPP_TRY { + auto ret = (data->func)(manage_copy(arg_0)); return ret ? isl_bool_true : isl_bool_false; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_bool_error; } @@ -14536,38 +14666,38 @@ bool schedule_node::every_descendant(const std::function &fn) const +void schedule_node::foreach_descendant_top_down(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_bool { auto *data = static_cast(arg_1); - try { - auto ret = (data->func)(isl::manage_copy(arg_0)); + ISL_CPP_TRY { + auto ret = (data->func)(manage_copy(arg_0)); return ret ? isl_bool_true : isl_bool_false; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_bool_error; } @@ -14576,380 +14706,378 @@ void schedule_node::foreach_descendant_top_down(const std::function &fn) const +schedule_node schedule_node::map_descendant_bottom_up(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_schedule_node *arg_0, void *arg_1) -> isl_schedule_node * { auto *data = static_cast(arg_1); - try { - auto ret = (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + auto ret = (data->func)(manage(arg_0)); return ret.release(); - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return NULL; } @@ -14958,89 +15086,89 @@ isl::schedule_node schedule_node::map_descendant_bottom_up(const std::functionptr, obj.ptr); return *this; } @@ -15085,306 +15213,306 @@ std::string schedule_node_band::to_str() const { } -isl::ctx schedule_node_band::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node_band::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } -isl::union_set schedule_node_band::get_ast_build_options() const +union_set schedule_node_band::get_ast_build_options() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_get_ast_build_options(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set schedule_node_band::get_ast_isolate_option() const +set schedule_node_band::get_ast_isolate_option() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_get_ast_isolate_option(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::multi_union_pw_aff schedule_node_band::get_partial_schedule() const +multi_union_pw_aff schedule_node_band::get_partial_schedule() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_get_partial_schedule(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map schedule_node_band::get_partial_schedule_union_map() const +union_map schedule_node_band::get_partial_schedule_union_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_get_partial_schedule_union_map(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool schedule_node_band::get_permutable() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_get_permutable(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::space schedule_node_band::get_space() const +space schedule_node_band::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool schedule_node_band::member_get_coincident(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_member_get_coincident(get(), pos); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::schedule_node_band schedule_node_band::member_set_coincident(int pos, int coincident) const +schedule_node_band schedule_node_band::member_set_coincident(int pos, int coincident) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_member_set_coincident(copy(), pos, coincident); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::mod(isl::multi_val mv) const +schedule_node_band schedule_node_band::mod(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_mod(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } unsigned int schedule_node_band::n_member() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_n_member(get()); return res; } -isl::schedule_node_band schedule_node_band::scale(isl::multi_val mv) const +schedule_node_band schedule_node_band::scale(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_scale(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::scale_down(isl::multi_val mv) const +schedule_node_band schedule_node_band::scale_down(multi_val mv) const { if (!ptr || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_scale_down(copy(), mv.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::set_ast_build_options(isl::union_set options) const +schedule_node_band schedule_node_band::set_ast_build_options(union_set options) const { if (!ptr || options.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_set_ast_build_options(copy(), options.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::set_permutable(int permutable) const +schedule_node_band schedule_node_band::set_permutable(int permutable) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_set_permutable(copy(), permutable); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::shift(isl::multi_union_pw_aff shift) const +schedule_node_band schedule_node_band::shift(multi_union_pw_aff shift) const { if (!ptr || shift.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_shift(copy(), shift.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::split(int pos) const +schedule_node_band schedule_node_band::split(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_split(copy(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::tile(isl::multi_val sizes) const +schedule_node_band schedule_node_band::tile(multi_val sizes) const { if (!ptr || sizes.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_tile(copy(), sizes.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::member_set_ast_loop_default(int pos) const +schedule_node_band schedule_node_band::member_set_ast_loop_default(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_default); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::member_set_ast_loop_atomic(int pos) const +schedule_node_band schedule_node_band::member_set_ast_loop_atomic(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_atomic); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::member_set_ast_loop_unroll(int pos) const +schedule_node_band schedule_node_band::member_set_ast_loop_unroll(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_unroll); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::member_set_ast_loop_separate(int pos) const +schedule_node_band schedule_node_band::member_set_ast_loop_separate(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_member_set_ast_loop_type(copy(), pos, isl_ast_loop_separate); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::member_set_isolate_ast_loop_default(int pos) const +schedule_node_band schedule_node_band::member_set_isolate_ast_loop_default(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_member_set_isolate_ast_loop_type(copy(), pos, isl_ast_loop_default); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::member_set_isolate_ast_loop_atomic(int pos) const +schedule_node_band schedule_node_band::member_set_isolate_ast_loop_atomic(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_member_set_isolate_ast_loop_type(copy(), pos, isl_ast_loop_atomic); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::member_set_isolate_ast_loop_unroll(int pos) const +schedule_node_band schedule_node_band::member_set_isolate_ast_loop_unroll(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_member_set_isolate_ast_loop_type(copy(), pos, isl_ast_loop_unroll); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } -isl::schedule_node_band schedule_node_band::member_set_isolate_ast_loop_separate(int pos) const +schedule_node_band schedule_node_band::member_set_isolate_ast_loop_separate(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_band_member_set_isolate_ast_loop_type(copy(), pos, isl_ast_loop_separate); if (!res) - throw exception::create_from_last_error(get_ctx()); - return manage(res).as(); + exception::throw_last_error(ctx); + return manage(res).as(); } // implementations for isl::schedule_node_context @@ -15392,7 +15520,7 @@ isl::schedule_node_band schedule_node_band::member_set_isolate_ast_loop_separate schedule_node_context::schedule_node_context() : schedule_node() {} -schedule_node_context::schedule_node_context(const isl::schedule_node_context &obj) +schedule_node_context::schedule_node_context(const schedule_node_context &obj) : schedule_node(obj) { } @@ -15401,7 +15529,7 @@ schedule_node_context::schedule_node_context(__isl_take isl_schedule_node *ptr) : schedule_node(ptr) {} -schedule_node_context &schedule_node_context::operator=(isl::schedule_node_context obj) { +schedule_node_context &schedule_node_context::operator=(schedule_node_context obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -15428,19 +15556,19 @@ std::string schedule_node_context::to_str() const { } -isl::ctx schedule_node_context::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node_context::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } -isl::set schedule_node_context::get_context() const +set schedule_node_context::get_context() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_context_get_context(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -15449,7 +15577,7 @@ isl::set schedule_node_context::get_context() const schedule_node_domain::schedule_node_domain() : schedule_node() {} -schedule_node_domain::schedule_node_domain(const isl::schedule_node_domain &obj) +schedule_node_domain::schedule_node_domain(const schedule_node_domain &obj) : schedule_node(obj) { } @@ -15458,7 +15586,7 @@ schedule_node_domain::schedule_node_domain(__isl_take isl_schedule_node *ptr) : schedule_node(ptr) {} -schedule_node_domain &schedule_node_domain::operator=(isl::schedule_node_domain obj) { +schedule_node_domain &schedule_node_domain::operator=(schedule_node_domain obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -15485,19 +15613,19 @@ std::string schedule_node_domain::to_str() const { } -isl::ctx schedule_node_domain::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node_domain::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } -isl::union_set schedule_node_domain::get_domain() const +union_set schedule_node_domain::get_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_domain_get_domain(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -15506,7 +15634,7 @@ isl::union_set schedule_node_domain::get_domain() const schedule_node_expansion::schedule_node_expansion() : schedule_node() {} -schedule_node_expansion::schedule_node_expansion(const isl::schedule_node_expansion &obj) +schedule_node_expansion::schedule_node_expansion(const schedule_node_expansion &obj) : schedule_node(obj) { } @@ -15515,7 +15643,7 @@ schedule_node_expansion::schedule_node_expansion(__isl_take isl_schedule_node *p : schedule_node(ptr) {} -schedule_node_expansion &schedule_node_expansion::operator=(isl::schedule_node_expansion obj) { +schedule_node_expansion &schedule_node_expansion::operator=(schedule_node_expansion obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -15542,31 +15670,31 @@ std::string schedule_node_expansion::to_str() const { } -isl::ctx schedule_node_expansion::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node_expansion::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } -isl::union_pw_multi_aff schedule_node_expansion::get_contraction() const +union_pw_multi_aff schedule_node_expansion::get_contraction() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_expansion_get_contraction(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map schedule_node_expansion::get_expansion() const +union_map schedule_node_expansion::get_expansion() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_expansion_get_expansion(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -15575,7 +15703,7 @@ isl::union_map schedule_node_expansion::get_expansion() const schedule_node_extension::schedule_node_extension() : schedule_node() {} -schedule_node_extension::schedule_node_extension(const isl::schedule_node_extension &obj) +schedule_node_extension::schedule_node_extension(const schedule_node_extension &obj) : schedule_node(obj) { } @@ -15584,7 +15712,7 @@ schedule_node_extension::schedule_node_extension(__isl_take isl_schedule_node *p : schedule_node(ptr) {} -schedule_node_extension &schedule_node_extension::operator=(isl::schedule_node_extension obj) { +schedule_node_extension &schedule_node_extension::operator=(schedule_node_extension obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -15611,19 +15739,19 @@ std::string schedule_node_extension::to_str() const { } -isl::ctx schedule_node_extension::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node_extension::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } -isl::union_map schedule_node_extension::get_extension() const +union_map schedule_node_extension::get_extension() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_extension_get_extension(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -15632,7 +15760,7 @@ isl::union_map schedule_node_extension::get_extension() const schedule_node_filter::schedule_node_filter() : schedule_node() {} -schedule_node_filter::schedule_node_filter(const isl::schedule_node_filter &obj) +schedule_node_filter::schedule_node_filter(const schedule_node_filter &obj) : schedule_node(obj) { } @@ -15641,7 +15769,7 @@ schedule_node_filter::schedule_node_filter(__isl_take isl_schedule_node *ptr) : schedule_node(ptr) {} -schedule_node_filter &schedule_node_filter::operator=(isl::schedule_node_filter obj) { +schedule_node_filter &schedule_node_filter::operator=(schedule_node_filter obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -15668,19 +15796,19 @@ std::string schedule_node_filter::to_str() const { } -isl::ctx schedule_node_filter::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node_filter::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } -isl::union_set schedule_node_filter::get_filter() const +union_set schedule_node_filter::get_filter() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_filter_get_filter(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -15689,7 +15817,7 @@ isl::union_set schedule_node_filter::get_filter() const schedule_node_guard::schedule_node_guard() : schedule_node() {} -schedule_node_guard::schedule_node_guard(const isl::schedule_node_guard &obj) +schedule_node_guard::schedule_node_guard(const schedule_node_guard &obj) : schedule_node(obj) { } @@ -15698,7 +15826,7 @@ schedule_node_guard::schedule_node_guard(__isl_take isl_schedule_node *ptr) : schedule_node(ptr) {} -schedule_node_guard &schedule_node_guard::operator=(isl::schedule_node_guard obj) { +schedule_node_guard &schedule_node_guard::operator=(schedule_node_guard obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -15725,19 +15853,19 @@ std::string schedule_node_guard::to_str() const { } -isl::ctx schedule_node_guard::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node_guard::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } -isl::set schedule_node_guard::get_guard() const +set schedule_node_guard::get_guard() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_guard_get_guard(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -15746,7 +15874,7 @@ isl::set schedule_node_guard::get_guard() const schedule_node_leaf::schedule_node_leaf() : schedule_node() {} -schedule_node_leaf::schedule_node_leaf(const isl::schedule_node_leaf &obj) +schedule_node_leaf::schedule_node_leaf(const schedule_node_leaf &obj) : schedule_node(obj) { } @@ -15755,7 +15883,7 @@ schedule_node_leaf::schedule_node_leaf(__isl_take isl_schedule_node *ptr) : schedule_node(ptr) {} -schedule_node_leaf &schedule_node_leaf::operator=(isl::schedule_node_leaf obj) { +schedule_node_leaf &schedule_node_leaf::operator=(schedule_node_leaf obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -15782,8 +15910,8 @@ std::string schedule_node_leaf::to_str() const { } -isl::ctx schedule_node_leaf::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node_leaf::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } @@ -15792,7 +15920,7 @@ isl::ctx schedule_node_leaf::get_ctx() const { schedule_node_mark::schedule_node_mark() : schedule_node() {} -schedule_node_mark::schedule_node_mark(const isl::schedule_node_mark &obj) +schedule_node_mark::schedule_node_mark(const schedule_node_mark &obj) : schedule_node(obj) { } @@ -15801,7 +15929,7 @@ schedule_node_mark::schedule_node_mark(__isl_take isl_schedule_node *ptr) : schedule_node(ptr) {} -schedule_node_mark &schedule_node_mark::operator=(isl::schedule_node_mark obj) { +schedule_node_mark &schedule_node_mark::operator=(schedule_node_mark obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -15828,19 +15956,19 @@ std::string schedule_node_mark::to_str() const { } -isl::ctx schedule_node_mark::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node_mark::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } -isl::id schedule_node_mark::get_id() const +id schedule_node_mark::get_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_schedule_node_mark_get_id(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } @@ -15849,7 +15977,7 @@ isl::id schedule_node_mark::get_id() const schedule_node_sequence::schedule_node_sequence() : schedule_node() {} -schedule_node_sequence::schedule_node_sequence(const isl::schedule_node_sequence &obj) +schedule_node_sequence::schedule_node_sequence(const schedule_node_sequence &obj) : schedule_node(obj) { } @@ -15858,7 +15986,7 @@ schedule_node_sequence::schedule_node_sequence(__isl_take isl_schedule_node *ptr : schedule_node(ptr) {} -schedule_node_sequence &schedule_node_sequence::operator=(isl::schedule_node_sequence obj) { +schedule_node_sequence &schedule_node_sequence::operator=(schedule_node_sequence obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -15885,8 +16013,8 @@ std::string schedule_node_sequence::to_str() const { } -isl::ctx schedule_node_sequence::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node_sequence::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } @@ -15895,7 +16023,7 @@ isl::ctx schedule_node_sequence::get_ctx() const { schedule_node_set::schedule_node_set() : schedule_node() {} -schedule_node_set::schedule_node_set(const isl::schedule_node_set &obj) +schedule_node_set::schedule_node_set(const schedule_node_set &obj) : schedule_node(obj) { } @@ -15904,7 +16032,7 @@ schedule_node_set::schedule_node_set(__isl_take isl_schedule_node *ptr) : schedule_node(ptr) {} -schedule_node_set &schedule_node_set::operator=(isl::schedule_node_set obj) { +schedule_node_set &schedule_node_set::operator=(schedule_node_set obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -15931,76 +16059,78 @@ std::string schedule_node_set::to_str() const { } -isl::ctx schedule_node_set::get_ctx() const { - return isl::ctx(isl_schedule_node_get_ctx(ptr)); +ctx schedule_node_set::get_ctx() const { + return ctx(isl_schedule_node_get_ctx(ptr)); } // implementations for isl::set -isl::set manage(__isl_take isl_set *ptr) { +set manage(__isl_take isl_set *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return set(ptr); } -isl::set manage_copy(__isl_keep isl_set *ptr) { +set manage_copy(__isl_keep isl_set *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_set_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_set_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return set(ptr); } set::set() : ptr(nullptr) {} -set::set(const isl::set &obj) - : ptr(obj.copy()) +set::set(const set &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_set_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_set_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } set::set(__isl_take isl_set *ptr) : ptr(ptr) {} -set::set(isl::point pnt) +set::set(point pnt) { if (pnt.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = pnt.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_from_point(pnt.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -set::set(isl::ctx ctx, const std::string &str) +set::set(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -set::set(isl::basic_set bset) +set::set(basic_set bset) { if (bset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = bset.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_from_basic_set(bset.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -set &set::operator=(isl::set obj) { +set &set::operator=(set obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -16052,171 +16182,170 @@ std::string set::to_str() const { } -isl::ctx set::get_ctx() const { - return isl::ctx(isl_set_get_ctx(ptr)); +ctx set::get_ctx() const { + return ctx(isl_set_get_ctx(ptr)); } -isl::basic_set set::affine_hull() const +basic_set set::affine_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_affine_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::align_params(isl::space model) const +set set::align_params(space model) const { if (!ptr || model.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_align_params(copy(), model.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::apply(isl::map map) const +set set::apply(map map) const { if (!ptr || map.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_apply(copy(), map.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::coalesce() const +set set::coalesce() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_coalesce(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::complement() const +set set::complement() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_complement(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::compute_divs() const +set set::compute_divs() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_compute_divs(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::detect_equalities() const +set set::detect_equalities() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_detect_equalities(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff set::dim_max(int pos) const +pw_aff set::dim_max(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_dim_max(copy(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff set::dim_min(int pos) const +pw_aff set::dim_min(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_dim_min(copy(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::empty(isl::space space) +set set::empty(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_empty(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::flatten() const +set set::flatten() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_flatten(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map set::flatten_map() const +map set::flatten_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_flatten_map(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void set::foreach_basic_set(const std::function &fn) const +void set::foreach_basic_set(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_basic_set *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -16225,329 +16354,327 @@ void set::foreach_basic_set(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::set set::from(isl::multi_aff ma) +set set::from(multi_aff ma) { if (ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = ma.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_from_multi_aff(ma.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::from_params() const +set set::from_params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_from_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::from_union_set(isl::union_set uset) +set set::from_union_set(union_set uset) { if (uset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = uset.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_from_union_set(uset.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set_list set::get_basic_set_list() const +basic_set_list set::get_basic_set_list() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_get_basic_set_list(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space set::get_space() const +space set::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val set::get_stride(int pos) const +val set::get_stride(int pos) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_get_stride(get(), pos); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id set::get_tuple_id() const +id set::get_tuple_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_get_tuple_id(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } std::string set::get_tuple_name() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_get_tuple_name(get()); std::string tmp(res); return tmp; } -isl::set set::gist(isl::set context) const +set set::gist(set context) const { if (!ptr || context.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_gist(copy(), context.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool set::has_tuple_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_has_tuple_id(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool set::has_tuple_name() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_has_tuple_name(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::map set::identity() const +map set::identity() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_identity(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::intersect(isl::set set2) const +set set::intersect(set set2) const { if (!ptr || set2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_intersect(copy(), set2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::intersect_params(isl::set params) const +set set::intersect_params(set params) const { if (!ptr || params.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_intersect_params(copy(), params.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool set::involves_param(const isl::id &id) const +bool set::involves_param(const id &id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_involves_param_id(get(), id.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool set::is_disjoint(const isl::set &set2) const +bool set::is_disjoint(const set &set2) const { if (!ptr || set2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_is_disjoint(get(), set2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool set::is_empty() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_is_empty(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool set::is_equal(const isl::set &set2) const +bool set::is_equal(const set &set2) const { if (!ptr || set2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_is_equal(get(), set2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool set::is_singleton() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_is_singleton(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool set::is_strict_subset(const isl::set &set2) const +bool set::is_strict_subset(const set &set2) const { if (!ptr || set2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_is_strict_subset(get(), set2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool set::is_subset(const isl::set &set2) const +bool set::is_subset(const set &set2) const { if (!ptr || set2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_is_subset(get(), set2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool set::is_wrapping() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_is_wrapping(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::set set::lexmax() const +set set::lexmax() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_lexmax(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::lexmin() const +set set::lexmin() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_lexmin(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val set::max_val(const isl::aff &obj) const +val set::max_val(const aff &obj) const { if (!ptr || obj.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_max_val(get(), obj.get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val set::min_val(const isl::aff &obj) const +val set::min_val(const aff &obj) const { if (!ptr || obj.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_min_val(get(), obj.get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int set::n_basic_set() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_n_basic_set(get()); return res; } @@ -16555,9 +16682,9 @@ int set::n_basic_set() const unsigned int set::n_dim() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_n_dim(get()); return res; } @@ -16565,308 +16692,309 @@ unsigned int set::n_dim() const unsigned int set::n_param() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_n_param(get()); return res; } -isl::set set::nat_universe(isl::space dim) +set set::nat_universe(space dim) { if (dim.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = dim.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_nat_universe(dim.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::params() const +set set::params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool set::plain_is_universe() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_plain_is_universe(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::basic_set set::polyhedral_hull() const +basic_set set::polyhedral_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_polyhedral_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::preimage_multi_aff(isl::multi_aff ma) const +set set::preimage_multi_aff(multi_aff ma) const { if (!ptr || ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_preimage_multi_aff(copy(), ma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::product(isl::set set2) const +set set::product(set set2) const { if (!ptr || set2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_product(copy(), set2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::reset_tuple_id() const +set set::reset_tuple_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_reset_tuple_id(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set set::sample() const +basic_set set::sample() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_sample(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::point set::sample_point() const +point set::sample_point() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_sample_point(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::set_tuple_id(isl::id id) const +set set::set_tuple_id(id id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_set_tuple_id(copy(), id.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::set_tuple_name(const std::string &s) const +set set::set_tuple_name(const std::string &s) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_set_tuple_name(copy(), s.c_str()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set set::simple_hull() const +basic_set set::simple_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_simple_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::subtract(isl::set set2) const +set set::subtract(set set2) const { if (!ptr || set2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_subtract(copy(), set2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::unbind_params(isl::multi_id tuple) const +set set::unbind_params(multi_id tuple) const { if (!ptr || tuple.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_unbind_params(copy(), tuple.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map set::unbind_params_insert_domain(isl::multi_id domain) const +map set::unbind_params_insert_domain(multi_id domain) const { if (!ptr || domain.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_unbind_params_insert_domain(copy(), domain.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::unite(isl::set set2) const +set set::unite(set set2) const { if (!ptr || set2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_union(copy(), set2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set set::universe(isl::space space) +set set::universe(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_universe(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::basic_set set::unshifted_simple_hull() const +basic_set set::unshifted_simple_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_unshifted_simple_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map set::unwrap() const +map set::unwrap() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_unwrap(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map set::wrapped_domain_map() const +map set::wrapped_domain_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_wrapped_domain_map(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::set_list -isl::set_list manage(__isl_take isl_set_list *ptr) { +set_list manage(__isl_take isl_set_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return set_list(ptr); } -isl::set_list manage_copy(__isl_keep isl_set_list *ptr) { +set_list manage_copy(__isl_keep isl_set_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_set_list_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_set_list_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return set_list(ptr); } set_list::set_list() : ptr(nullptr) {} -set_list::set_list(const isl::set_list &obj) - : ptr(obj.copy()) +set_list::set_list(const set_list &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_set_list_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_set_list_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } set_list::set_list(__isl_take isl_set_list *ptr) : ptr(ptr) {} -set_list::set_list(isl::set el) +set_list::set_list(set el) { if (el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = el.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_list_from_set(el.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -set_list::set_list(isl::ctx ctx, int n) +set_list::set_list(ctx ctx, int n) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_list_alloc(ctx.release(), n); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -set_list &set_list::operator=(isl::set_list obj) { +set_list &set_list::operator=(set_list obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -16900,62 +17028,62 @@ set_list::operator bool() const -isl::ctx set_list::get_ctx() const { - return isl::ctx(isl_set_list_get_ctx(ptr)); +ctx set_list::get_ctx() const { + return ctx(isl_set_list_get_ctx(ptr)); } -isl::set_list set_list::add(isl::set el) const +set_list set_list::add(set el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_list_add(copy(), el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set_list set_list::concat(isl::set_list list2) const +set_list set_list::concat(set_list list2) const { if (!ptr || list2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_list_concat(copy(), list2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set_list set_list::drop(unsigned int first, unsigned int n) const +set_list set_list::drop(unsigned int first, unsigned int n) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_list_drop(copy(), first, n); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void set_list::foreach(const std::function &fn) const +void set_list::foreach(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -16964,101 +17092,105 @@ void set_list::foreach(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::set set_list::get_at(int index) const +set set_list::get_at(int index) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_list_get_at(get(), index); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::set_list set_list::reverse() const +set_list set_list::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_list_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int set_list::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_set_list_size(get()); return res; } // implementations for isl::space -isl::space manage(__isl_take isl_space *ptr) { +space manage(__isl_take isl_space *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return space(ptr); } -isl::space manage_copy(__isl_keep isl_space *ptr) { +space manage_copy(__isl_keep isl_space *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_space_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_space_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return space(ptr); } space::space() : ptr(nullptr) {} -space::space(const isl::space &obj) - : ptr(obj.copy()) +space::space(const space &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_space_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_space_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } space::space(__isl_take isl_space *ptr) : ptr(ptr) {} -space::space(isl::ctx ctx, unsigned int nparam, unsigned int n_in, unsigned int n_out) +space::space(ctx ctx, unsigned int nparam, unsigned int n_in, unsigned int n_out) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_alloc(ctx.release(), nparam, n_in, n_out); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -space::space(isl::ctx ctx, unsigned int nparam, unsigned int dim) +space::space(ctx ctx, unsigned int nparam, unsigned int dim) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_set_alloc(ctx.release(), nparam, dim); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -space::space(isl::ctx ctx, unsigned int nparam) +space::space(ctx ctx, unsigned int nparam) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_params_alloc(ctx.release(), nparam); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -space &space::operator=(isl::space obj) { +space &space::operator=(space obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -17110,427 +17242,431 @@ std::string space::to_str() const { } -isl::ctx space::get_ctx() const { - return isl::ctx(isl_space_get_ctx(ptr)); +ctx space::get_ctx() const { + return ctx(isl_space_get_ctx(ptr)); } -isl::space space::add_named_tuple_id_ui(isl::id tuple_id, unsigned int dim) const +space space::add_named_tuple_id_ui(id tuple_id, unsigned int dim) const { if (!ptr || tuple_id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_add_named_tuple_id_ui(copy(), tuple_id.release(), dim); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::add_param(isl::id id) const +space space::add_param(id id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_add_param_id(copy(), id.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::add_unnamed_tuple_ui(unsigned int dim) const +space space::add_unnamed_tuple_ui(unsigned int dim) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_add_unnamed_tuple_ui(copy(), dim); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::align_params(isl::space dim2) const +space space::align_params(space dim2) const { if (!ptr || dim2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_align_params(copy(), dim2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool space::can_curry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_can_curry(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool space::can_uncurry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_can_uncurry(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::space space::curry() const +space space::curry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_curry(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::domain() const +space space::domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::domain_map() const +space space::domain_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_domain_map(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::domain_product(isl::space right) const +space space::domain_product(space right) const { if (!ptr || right.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_domain_product(copy(), right.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::from_domain() const +space space::from_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_from_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::from_range() const +space space::from_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_from_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::id space::get_map_range_tuple_id() const +id space::get_map_range_tuple_id() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_get_map_range_tuple_id(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool space::has_equal_params(const isl::space &space2) const +bool space::has_equal_params(const space &space2) const { if (!ptr || space2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_has_equal_params(get(), space2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool space::has_equal_tuples(const isl::space &space2) const +bool space::has_equal_tuples(const space &space2) const { if (!ptr || space2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_has_equal_tuples(get(), space2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool space::has_param(const isl::id &id) const +bool space::has_param(const id &id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_has_param_id(get(), id.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool space::is_equal(const isl::space &space2) const +bool space::is_equal(const space &space2) const { if (!ptr || space2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_is_equal(get(), space2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool space::is_params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_is_params(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool space::is_set() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_is_set(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool space::is_wrapping() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_is_wrapping(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::space space::map_from_domain_and_range(isl::space range) const +space space::map_from_domain_and_range(space range) const { if (!ptr || range.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_map_from_domain_and_range(copy(), range.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::map_from_set() const +space space::map_from_set() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_map_from_set(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::params() const +space space::params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::product(isl::space right) const +space space::product(space right) const { if (!ptr || right.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_product(copy(), right.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::range() const +space space::range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::range_map() const +space space::range_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_range_map(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::range_product(isl::space right) const +space space::range_product(space right) const { if (!ptr || right.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_range_product(copy(), right.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::set_from_params() const +space space::set_from_params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_set_from_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::set_set_tuple_id(isl::id id) const +space space::set_set_tuple_id(id id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_set_set_tuple_id(copy(), id.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::uncurry() const +space space::uncurry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_uncurry(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::unwrap() const +space space::unwrap() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_unwrap(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space space::wrap() const +space space::wrap() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_space_wrap(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::stride_info -isl::stride_info manage(__isl_take isl_stride_info *ptr) { +stride_info manage(__isl_take isl_stride_info *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return stride_info(ptr); } -isl::stride_info manage_copy(__isl_keep isl_stride_info *ptr) { +stride_info manage_copy(__isl_keep isl_stride_info *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_stride_info_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_stride_info_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return stride_info(ptr); } stride_info::stride_info() : ptr(nullptr) {} -stride_info::stride_info(const isl::stride_info &obj) - : ptr(obj.copy()) +stride_info::stride_info(const stride_info &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_stride_info_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_stride_info_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } stride_info::stride_info(__isl_take isl_stride_info *ptr) : ptr(ptr) {} -stride_info &stride_info::operator=(isl::stride_info obj) { +stride_info &stride_info::operator=(stride_info obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -17564,79 +17700,82 @@ stride_info::operator bool() const -isl::ctx stride_info::get_ctx() const { - return isl::ctx(isl_stride_info_get_ctx(ptr)); +ctx stride_info::get_ctx() const { + return ctx(isl_stride_info_get_ctx(ptr)); } -isl::aff stride_info::get_offset() const +aff stride_info::get_offset() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_stride_info_get_offset(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val stride_info::get_stride() const +val stride_info::get_stride() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_stride_info_get_stride(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::union_access_info -isl::union_access_info manage(__isl_take isl_union_access_info *ptr) { +union_access_info manage(__isl_take isl_union_access_info *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return union_access_info(ptr); } -isl::union_access_info manage_copy(__isl_keep isl_union_access_info *ptr) { +union_access_info manage_copy(__isl_keep isl_union_access_info *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_union_access_info_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_union_access_info_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return union_access_info(ptr); } union_access_info::union_access_info() : ptr(nullptr) {} -union_access_info::union_access_info(const isl::union_access_info &obj) - : ptr(obj.copy()) +union_access_info::union_access_info(const union_access_info &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_union_access_info_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_union_access_info_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } union_access_info::union_access_info(__isl_take isl_union_access_info *ptr) : ptr(ptr) {} -union_access_info::union_access_info(isl::union_map sink) +union_access_info::union_access_info(union_map sink) { if (sink.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = sink.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_access_info_from_sink(sink.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_access_info &union_access_info::operator=(isl::union_access_info obj) { +union_access_info &union_access_info::operator=(union_access_info obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -17684,115 +17823,119 @@ std::string union_access_info::to_str() const { } -isl::ctx union_access_info::get_ctx() const { - return isl::ctx(isl_union_access_info_get_ctx(ptr)); +ctx union_access_info::get_ctx() const { + return ctx(isl_union_access_info_get_ctx(ptr)); } -isl::union_flow union_access_info::compute_flow() const +union_flow union_access_info::compute_flow() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_access_info_compute_flow(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_access_info union_access_info::set_kill(isl::union_map kill) const +union_access_info union_access_info::set_kill(union_map kill) const { if (!ptr || kill.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_access_info_set_kill(copy(), kill.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_access_info union_access_info::set_may_source(isl::union_map may_source) const +union_access_info union_access_info::set_may_source(union_map may_source) const { if (!ptr || may_source.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_access_info_set_may_source(copy(), may_source.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_access_info union_access_info::set_must_source(isl::union_map must_source) const +union_access_info union_access_info::set_must_source(union_map must_source) const { if (!ptr || must_source.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_access_info_set_must_source(copy(), must_source.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_access_info union_access_info::set_schedule(isl::schedule schedule) const +union_access_info union_access_info::set_schedule(schedule schedule) const { if (!ptr || schedule.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_access_info_set_schedule(copy(), schedule.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_access_info union_access_info::set_schedule_map(isl::union_map schedule_map) const +union_access_info union_access_info::set_schedule_map(union_map schedule_map) const { if (!ptr || schedule_map.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_access_info_set_schedule_map(copy(), schedule_map.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::union_flow -isl::union_flow manage(__isl_take isl_union_flow *ptr) { +union_flow manage(__isl_take isl_union_flow *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return union_flow(ptr); } -isl::union_flow manage_copy(__isl_keep isl_union_flow *ptr) { +union_flow manage_copy(__isl_keep isl_union_flow *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_union_flow_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_union_flow_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return union_flow(ptr); } union_flow::union_flow() : ptr(nullptr) {} -union_flow::union_flow(const isl::union_flow &obj) - : ptr(obj.copy()) +union_flow::union_flow(const union_flow &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_union_flow_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_union_flow_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } union_flow::union_flow(__isl_take isl_union_flow *ptr) : ptr(ptr) {} -union_flow &union_flow::operator=(isl::union_flow obj) { +union_flow &union_flow::operator=(union_flow obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -17840,147 +17983,149 @@ std::string union_flow::to_str() const { } -isl::ctx union_flow::get_ctx() const { - return isl::ctx(isl_union_flow_get_ctx(ptr)); +ctx union_flow::get_ctx() const { + return ctx(isl_union_flow_get_ctx(ptr)); } -isl::union_map union_flow::get_full_may_dependence() const +union_map union_flow::get_full_may_dependence() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_flow_get_full_may_dependence(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_flow::get_full_must_dependence() const +union_map union_flow::get_full_must_dependence() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_flow_get_full_must_dependence(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_flow::get_may_dependence() const +union_map union_flow::get_may_dependence() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_flow_get_may_dependence(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_flow::get_may_no_source() const +union_map union_flow::get_may_no_source() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_flow_get_may_no_source(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_flow::get_must_dependence() const +union_map union_flow::get_must_dependence() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_flow_get_must_dependence(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_flow::get_must_no_source() const +union_map union_flow::get_must_no_source() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_flow_get_must_no_source(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::union_map -isl::union_map manage(__isl_take isl_union_map *ptr) { +union_map manage(__isl_take isl_union_map *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return union_map(ptr); } -isl::union_map manage_copy(__isl_keep isl_union_map *ptr) { +union_map manage_copy(__isl_keep isl_union_map *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_union_map_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_union_map_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return union_map(ptr); } union_map::union_map() : ptr(nullptr) {} -union_map::union_map(const isl::union_map &obj) - : ptr(obj.copy()) +union_map::union_map(const union_map &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_union_map_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_union_map_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } union_map::union_map(__isl_take isl_union_map *ptr) : ptr(ptr) {} -union_map::union_map(isl::basic_map bmap) +union_map::union_map(basic_map bmap) { if (bmap.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = bmap.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_from_basic_map(bmap.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_map::union_map(isl::map map) +union_map::union_map(map map) { if (map.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = map.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_from_map(map.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_map::union_map(isl::ctx ctx, const std::string &str) +union_map::union_map(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_map &union_map::operator=(isl::union_map obj) { +union_map &union_map::operator=(union_map obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -18032,291 +18177,290 @@ std::string union_map::to_str() const { } -isl::ctx union_map::get_ctx() const { - return isl::ctx(isl_union_map_get_ctx(ptr)); +ctx union_map::get_ctx() const { + return ctx(isl_union_map_get_ctx(ptr)); } -isl::union_map union_map::add_map(isl::map map) const +union_map union_map::add_map(map map) const { if (!ptr || map.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_add_map(copy(), map.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::affine_hull() const +union_map union_map::affine_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_affine_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::apply_domain(isl::union_map umap2) const +union_map union_map::apply_domain(union_map umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_apply_domain(copy(), umap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::apply_range(isl::union_map umap2) const +union_map union_map::apply_range(union_map umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_apply_range(copy(), umap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::coalesce() const +union_map union_map::coalesce() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_coalesce(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::compute_divs() const +union_map union_map::compute_divs() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_compute_divs(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::curry() const +union_map union_map::curry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_curry(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_map::deltas() const +union_set union_map::deltas() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_deltas(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::detect_equalities() const +union_map union_map::detect_equalities() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_detect_equalities(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_map::domain() const +union_set union_map::domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::domain_factor_domain() const +union_map union_map::domain_factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_domain_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::domain_factor_range() const +union_map union_map::domain_factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_domain_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::domain_map() const +union_map union_map::domain_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_domain_map(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_multi_aff union_map::domain_map_union_pw_multi_aff() const +union_pw_multi_aff union_map::domain_map_union_pw_multi_aff() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_domain_map_union_pw_multi_aff(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::domain_product(isl::union_map umap2) const +union_map union_map::domain_product(union_map umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_domain_product(copy(), umap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::empty(isl::space space) +union_map union_map::empty(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_empty(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::eq_at(isl::multi_union_pw_aff mupa) const +union_map union_map::eq_at(multi_union_pw_aff mupa) const { if (!ptr || mupa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_eq_at_multi_union_pw_aff(copy(), mupa.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::map union_map::extract_map(isl::space dim) const +map union_map::extract_map(space dim) const { if (!ptr || dim.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_extract_map(get(), dim.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::factor_domain() const +union_map union_map::factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::factor_range() const +union_map union_map::factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::fixed_power(isl::val exp) const +union_map union_map::fixed_power(val exp) const { if (!ptr || exp.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_fixed_power_val(copy(), exp.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::flat_range_product(isl::union_map umap2) const +union_map union_map::flat_range_product(union_map umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_flat_range_product(copy(), umap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void union_map::foreach_map(const std::function &fn) const +void union_map::foreach_map(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_map *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -18325,630 +18469,626 @@ void union_map::foreach_map(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::union_map union_map::from(isl::union_pw_multi_aff upma) +union_map union_map::from(union_pw_multi_aff upma) { if (upma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = upma.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_from_union_pw_multi_aff(upma.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::from(isl::multi_union_pw_aff mupa) +union_map union_map::from(multi_union_pw_aff mupa) { if (mupa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = mupa.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_from_multi_union_pw_aff(mupa.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::from_domain(isl::union_set uset) +union_map union_map::from_domain(union_set uset) { if (uset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = uset.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_from_domain(uset.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::from_domain_and_range(isl::union_set domain, isl::union_set range) +union_map union_map::from_domain_and_range(union_set domain, union_set range) { if (domain.is_null() || range.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_from_domain_and_range(domain.release(), range.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::from_range(isl::union_set uset) +union_map union_map::from_range(union_set uset) { if (uset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = uset.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_from_range(uset.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::map_list union_map::get_map_list() const +map_list union_map::get_map_list() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_get_map_list(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space union_map::get_space() const +space union_map::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::gist(isl::union_map context) const +union_map union_map::gist(union_map context) const { if (!ptr || context.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_gist(copy(), context.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::gist_domain(isl::union_set uset) const +union_map union_map::gist_domain(union_set uset) const { if (!ptr || uset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_gist_domain(copy(), uset.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::gist_params(isl::set set) const +union_map union_map::gist_params(set set) const { if (!ptr || set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_gist_params(copy(), set.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::gist_range(isl::union_set uset) const +union_map union_map::gist_range(union_set uset) const { if (!ptr || uset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_gist_range(copy(), uset.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::intersect(isl::union_map umap2) const +union_map union_map::intersect(union_map umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_intersect(copy(), umap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::intersect_domain(isl::union_set uset) const +union_map union_map::intersect_domain(union_set uset) const { if (!ptr || uset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_intersect_domain(copy(), uset.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::intersect_params(isl::set set) const +union_map union_map::intersect_params(set set) const { if (!ptr || set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_intersect_params(copy(), set.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::intersect_range(isl::union_set uset) const +union_map union_map::intersect_range(union_set uset) const { if (!ptr || uset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_intersect_range(copy(), uset.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } bool union_map::is_bijective() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_is_bijective(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool union_map::is_empty() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_is_empty(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool union_map::is_equal(const isl::union_map &umap2) const +bool union_map::is_equal(const union_map &umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_is_equal(get(), umap2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool union_map::is_injective() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_is_injective(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool union_map::is_single_valued() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_is_single_valued(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool union_map::is_strict_subset(const isl::union_map &umap2) const +bool union_map::is_strict_subset(const union_map &umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_is_strict_subset(get(), umap2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool union_map::is_subset(const isl::union_map &umap2) const +bool union_map::is_subset(const union_map &umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_is_subset(get(), umap2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::union_map union_map::lex_gt_at(isl::multi_union_pw_aff mupa) const +union_map union_map::lex_gt_at(multi_union_pw_aff mupa) const { if (!ptr || mupa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_lex_gt_at_multi_union_pw_aff(copy(), mupa.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::lex_lt_at(isl::multi_union_pw_aff mupa) const +union_map union_map::lex_lt_at(multi_union_pw_aff mupa) const { if (!ptr || mupa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_lex_lt_at_multi_union_pw_aff(copy(), mupa.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::lexmax() const +union_map union_map::lexmax() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_lexmax(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::lexmin() const +union_map union_map::lexmin() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_lexmin(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int union_map::n_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_n_map(get()); return res; } -isl::union_map union_map::polyhedral_hull() const +union_map union_map::polyhedral_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_polyhedral_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::preimage_range_multi_aff(isl::multi_aff ma) const +union_map union_map::preimage_range_multi_aff(multi_aff ma) const { if (!ptr || ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_preimage_range_multi_aff(copy(), ma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::product(isl::union_map umap2) const +union_map union_map::product(union_map umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_product(copy(), umap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::project_out_all_params() const +union_map union_map::project_out_all_params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_project_out_all_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_map::range() const +union_set union_map::range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::range_factor_domain() const +union_map union_map::range_factor_domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_range_factor_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::range_factor_range() const +union_map union_map::range_factor_range() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_range_factor_range(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::range_map() const +union_map union_map::range_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_range_map(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::range_product(isl::union_map umap2) const +union_map union_map::range_product(union_map umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_range_product(copy(), umap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::reverse() const +union_map union_map::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::subtract(isl::union_map umap2) const +union_map union_map::subtract(union_map umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_subtract(copy(), umap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::subtract_domain(isl::union_set dom) const +union_map union_map::subtract_domain(union_set dom) const { if (!ptr || dom.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_subtract_domain(copy(), dom.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::subtract_range(isl::union_set dom) const +union_map union_map::subtract_range(union_set dom) const { if (!ptr || dom.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_subtract_range(copy(), dom.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::uncurry() const +union_map union_map::uncurry() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_uncurry(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::unite(isl::union_map umap2) const +union_map union_map::unite(union_map umap2) const { if (!ptr || umap2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_union(copy(), umap2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::universe() const +union_map union_map::universe() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_universe(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_map::wrap() const +union_set union_map::wrap() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_wrap(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_map::zip() const +union_map union_map::zip() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_map_zip(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::union_pw_aff -isl::union_pw_aff manage(__isl_take isl_union_pw_aff *ptr) { +union_pw_aff manage(__isl_take isl_union_pw_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return union_pw_aff(ptr); } -isl::union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr) { +union_pw_aff manage_copy(__isl_keep isl_union_pw_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_union_pw_aff_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_union_pw_aff_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return union_pw_aff(ptr); } union_pw_aff::union_pw_aff() : ptr(nullptr) {} -union_pw_aff::union_pw_aff(const isl::union_pw_aff &obj) - : ptr(obj.copy()) +union_pw_aff::union_pw_aff(const union_pw_aff &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_union_pw_aff_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_union_pw_aff_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } union_pw_aff::union_pw_aff(__isl_take isl_union_pw_aff *ptr) : ptr(ptr) {} -union_pw_aff::union_pw_aff(isl::pw_aff pa) +union_pw_aff::union_pw_aff(pw_aff pa) { if (pa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = pa.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_from_pw_aff(pa.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_pw_aff::union_pw_aff(isl::union_set domain, isl::val v) +union_pw_aff::union_pw_aff(union_set domain, val v) { if (domain.is_null() || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_val_on_domain(domain.release(), v.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_pw_aff::union_pw_aff(isl::union_set domain, isl::aff aff) +union_pw_aff::union_pw_aff(union_set domain, aff aff) { if (domain.is_null() || aff.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_aff_on_domain(domain.release(), aff.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_pw_aff::union_pw_aff(isl::ctx ctx, const std::string &str) +union_pw_aff::union_pw_aff(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_pw_aff &union_pw_aff::operator=(isl::union_pw_aff obj) { +union_pw_aff &union_pw_aff::operator=(union_pw_aff obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -18996,99 +19136,98 @@ std::string union_pw_aff::to_str() const { } -isl::ctx union_pw_aff::get_ctx() const { - return isl::ctx(isl_union_pw_aff_get_ctx(ptr)); +ctx union_pw_aff::get_ctx() const { + return ctx(isl_union_pw_aff_get_ctx(ptr)); } -isl::union_pw_aff union_pw_aff::add(isl::union_pw_aff upa2) const +union_pw_aff union_pw_aff::add(union_pw_aff upa2) const { if (!ptr || upa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_add(copy(), upa2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_pw_aff::domain() const +union_set union_pw_aff::domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff union_pw_aff::empty(isl::space space) +union_pw_aff union_pw_aff::empty(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_empty(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff union_pw_aff::extract_on_domain(isl::space space) const +pw_aff union_pw_aff::extract_on_domain(space space) const { if (!ptr || space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_extract_on_domain_space(get(), space.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_aff union_pw_aff::extract_pw_aff(isl::space space) const +pw_aff union_pw_aff::extract_pw_aff(space space) const { if (!ptr || space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_extract_pw_aff(get(), space.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff union_pw_aff::floor() const +union_pw_aff union_pw_aff::floor() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_floor(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void union_pw_aff::foreach_pw_aff(const std::function &fn) const +void union_pw_aff::foreach_pw_aff(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_pw_aff *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -19097,254 +19236,256 @@ void union_pw_aff::foreach_pw_aff(const std::function &fn) co if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::pw_aff_list union_pw_aff::get_pw_aff_list() const +pw_aff_list union_pw_aff::get_pw_aff_list() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_get_pw_aff_list(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space union_pw_aff::get_space() const +space union_pw_aff::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff union_pw_aff::intersect_domain(isl::union_set uset) const +union_pw_aff union_pw_aff::intersect_domain(union_set uset) const { if (!ptr || uset.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_intersect_domain(copy(), uset.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool union_pw_aff::involves_param(const isl::id &id) const +bool union_pw_aff::involves_param(const id &id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_involves_param_id(get(), id.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::val union_pw_aff::max_val() const +val union_pw_aff::max_val() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_max_val(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val union_pw_aff::min_val() const +val union_pw_aff::min_val() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_min_val(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff union_pw_aff::mod(isl::val f) const +union_pw_aff union_pw_aff::mod(val f) const { if (!ptr || f.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_mod_val(copy(), f.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int union_pw_aff::n_pw_aff() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_n_pw_aff(get()); return res; } -isl::union_pw_aff union_pw_aff::param_on_domain(isl::union_set domain, isl::id id) +union_pw_aff union_pw_aff::param_on_domain(union_set domain, id id) { if (domain.is_null() || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_param_on_domain_id(domain.release(), id.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -bool union_pw_aff::plain_is_equal(const isl::union_pw_aff &upa2) const +bool union_pw_aff::plain_is_equal(const union_pw_aff &upa2) const { if (!ptr || upa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_plain_is_equal(get(), upa2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::union_pw_aff union_pw_aff::pullback(isl::union_pw_multi_aff upma) const +union_pw_aff union_pw_aff::pullback(union_pw_multi_aff upma) const { if (!ptr || upma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_pullback_union_pw_multi_aff(copy(), upma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff union_pw_aff::scale(isl::val v) const +union_pw_aff union_pw_aff::scale(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_scale_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff union_pw_aff::scale_down(isl::val v) const +union_pw_aff union_pw_aff::scale_down(val v) const { if (!ptr || v.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_scale_down_val(copy(), v.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff union_pw_aff::sub(isl::union_pw_aff upa2) const +union_pw_aff union_pw_aff::sub(union_pw_aff upa2) const { if (!ptr || upa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_sub(copy(), upa2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff union_pw_aff::union_add(isl::union_pw_aff upa2) const +union_pw_aff union_pw_aff::union_add(union_pw_aff upa2) const { if (!ptr || upa2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_union_add(copy(), upa2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_pw_aff::zero_union_set() const +union_set union_pw_aff::zero_union_set() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_zero_union_set(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::union_pw_aff_list -isl::union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr) { +union_pw_aff_list manage(__isl_take isl_union_pw_aff_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return union_pw_aff_list(ptr); } -isl::union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr) { +union_pw_aff_list manage_copy(__isl_keep isl_union_pw_aff_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_union_pw_aff_list_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_union_pw_aff_list_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return union_pw_aff_list(ptr); } union_pw_aff_list::union_pw_aff_list() : ptr(nullptr) {} -union_pw_aff_list::union_pw_aff_list(const isl::union_pw_aff_list &obj) - : ptr(obj.copy()) +union_pw_aff_list::union_pw_aff_list(const union_pw_aff_list &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_union_pw_aff_list_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_union_pw_aff_list_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } union_pw_aff_list::union_pw_aff_list(__isl_take isl_union_pw_aff_list *ptr) : ptr(ptr) {} -union_pw_aff_list::union_pw_aff_list(isl::union_pw_aff el) +union_pw_aff_list::union_pw_aff_list(union_pw_aff el) { if (el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = el.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_list_from_union_pw_aff(el.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_pw_aff_list::union_pw_aff_list(isl::ctx ctx, int n) +union_pw_aff_list::union_pw_aff_list(ctx ctx, int n) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_list_alloc(ctx.release(), n); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_pw_aff_list &union_pw_aff_list::operator=(isl::union_pw_aff_list obj) { +union_pw_aff_list &union_pw_aff_list::operator=(union_pw_aff_list obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -19378,62 +19519,62 @@ union_pw_aff_list::operator bool() const -isl::ctx union_pw_aff_list::get_ctx() const { - return isl::ctx(isl_union_pw_aff_list_get_ctx(ptr)); +ctx union_pw_aff_list::get_ctx() const { + return ctx(isl_union_pw_aff_list_get_ctx(ptr)); } -isl::union_pw_aff_list union_pw_aff_list::add(isl::union_pw_aff el) const +union_pw_aff_list union_pw_aff_list::add(union_pw_aff el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_list_add(copy(), el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff_list union_pw_aff_list::concat(isl::union_pw_aff_list list2) const +union_pw_aff_list union_pw_aff_list::concat(union_pw_aff_list list2) const { if (!ptr || list2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_list_concat(copy(), list2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff_list union_pw_aff_list::drop(unsigned int first, unsigned int n) const +union_pw_aff_list union_pw_aff_list::drop(unsigned int first, unsigned int n) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_list_drop(copy(), first, n); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void union_pw_aff_list::foreach(const std::function &fn) const +void union_pw_aff_list::foreach(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_union_pw_aff *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -19442,121 +19583,122 @@ void union_pw_aff_list::foreach(const std::function &fn if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::union_pw_aff union_pw_aff_list::get_at(int index) const +union_pw_aff union_pw_aff_list::get_at(int index) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_list_get_at(get(), index); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_aff_list union_pw_aff_list::reverse() const +union_pw_aff_list union_pw_aff_list::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_list_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int union_pw_aff_list::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_aff_list_size(get()); return res; } // implementations for isl::union_pw_multi_aff -isl::union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr) { +union_pw_multi_aff manage(__isl_take isl_union_pw_multi_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return union_pw_multi_aff(ptr); } -isl::union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr) { +union_pw_multi_aff manage_copy(__isl_keep isl_union_pw_multi_aff *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_union_pw_multi_aff_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_union_pw_multi_aff_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return union_pw_multi_aff(ptr); } union_pw_multi_aff::union_pw_multi_aff() : ptr(nullptr) {} -union_pw_multi_aff::union_pw_multi_aff(const isl::union_pw_multi_aff &obj) - : ptr(obj.copy()) +union_pw_multi_aff::union_pw_multi_aff(const union_pw_multi_aff &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_union_pw_multi_aff_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_union_pw_multi_aff_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } union_pw_multi_aff::union_pw_multi_aff(__isl_take isl_union_pw_multi_aff *ptr) : ptr(ptr) {} -union_pw_multi_aff::union_pw_multi_aff(isl::pw_multi_aff pma) +union_pw_multi_aff::union_pw_multi_aff(pw_multi_aff pma) { if (pma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = pma.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_multi_aff_from_pw_multi_aff(pma.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_pw_multi_aff::union_pw_multi_aff(isl::union_set domain, isl::multi_val mv) +union_pw_multi_aff::union_pw_multi_aff(union_set domain, multi_val mv) { if (domain.is_null() || mv.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = domain.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_multi_aff_multi_val_on_domain(domain.release(), mv.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_pw_multi_aff::union_pw_multi_aff(isl::ctx ctx, const std::string &str) +union_pw_multi_aff::union_pw_multi_aff(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_multi_aff_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_pw_multi_aff::union_pw_multi_aff(isl::union_pw_aff upa) +union_pw_multi_aff::union_pw_multi_aff(union_pw_aff upa) { if (upa.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = upa.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_multi_aff_from_union_pw_aff(upa.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_pw_multi_aff &union_pw_multi_aff::operator=(isl::union_pw_multi_aff obj) { +union_pw_multi_aff &union_pw_multi_aff::operator=(union_pw_multi_aff obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -19604,74 +19746,74 @@ std::string union_pw_multi_aff::to_str() const { } -isl::ctx union_pw_multi_aff::get_ctx() const { - return isl::ctx(isl_union_pw_multi_aff_get_ctx(ptr)); +ctx union_pw_multi_aff::get_ctx() const { + return ctx(isl_union_pw_multi_aff_get_ctx(ptr)); } -isl::union_pw_multi_aff union_pw_multi_aff::add(isl::union_pw_multi_aff upma2) const +union_pw_multi_aff union_pw_multi_aff::add(union_pw_multi_aff upma2) const { if (!ptr || upma2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_multi_aff_add(copy(), upma2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_pw_multi_aff::domain() const +union_set union_pw_multi_aff::domain() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_multi_aff_domain(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::pw_multi_aff union_pw_multi_aff::extract_pw_multi_aff(isl::space space) const +pw_multi_aff union_pw_multi_aff::extract_pw_multi_aff(space space) const { if (!ptr || space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_multi_aff_extract_pw_multi_aff(get(), space.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_pw_multi_aff union_pw_multi_aff::flat_range_product(isl::union_pw_multi_aff upma2) const +union_pw_multi_aff union_pw_multi_aff::flat_range_product(union_pw_multi_aff upma2) const { if (!ptr || upma2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_pw_multi_aff_flat_range_product(copy(), upma2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void union_pw_multi_aff::foreach_pw_multi_aff(const std::function &fn) const +void union_pw_multi_aff::foreach_pw_multi_aff(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_pw_multi_aff *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -19680,195 +19822,194 @@ void union_pw_multi_aff::foreach_pw_multi_aff(const std::functionptr, obj.ptr); return *this; } @@ -19920,111 +20061,110 @@ std::string union_set::to_str() const { } -isl::ctx union_set::get_ctx() const { - return isl::ctx(isl_union_set_get_ctx(ptr)); +ctx union_set::get_ctx() const { + return ctx(isl_union_set_get_ctx(ptr)); } -isl::union_set union_set::add_set(isl::set set) const +union_set union_set::add_set(set set) const { if (!ptr || set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_add_set(copy(), set.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::affine_hull() const +union_set union_set::affine_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_affine_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::apply(isl::union_map umap) const +union_set union_set::apply(union_map umap) const { if (!ptr || umap.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_apply(copy(), umap.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::coalesce() const +union_set union_set::coalesce() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_coalesce(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::compute_divs() const +union_set union_set::compute_divs() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_compute_divs(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::detect_equalities() const +union_set union_set::detect_equalities() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_detect_equalities(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::empty(isl::space space) +union_set union_set::empty(space space) { if (space.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = space.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_empty(space.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -bool union_set::every_set(const std::function &test) const +bool union_set::every_set(const std::function &test) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct test_data { - std::function func; + std::function func; std::exception_ptr eptr; } test_data = { test }; auto test_lambda = [](isl_set *arg_0, void *arg_1) -> isl_bool { auto *data = static_cast(arg_1); - try { - auto ret = (data->func)(isl::manage_copy(arg_0)); + ISL_CPP_TRY { + auto ret = (data->func)(manage_copy(arg_0)); return ret ? isl_bool_true : isl_bool_false; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_bool_error; } @@ -20033,38 +20173,38 @@ bool union_set::every_set(const std::function &test) const if (test_data.eptr) std::rethrow_exception(test_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::set union_set::extract_set(isl::space dim) const +set union_set::extract_set(space dim) const { if (!ptr || dim.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_extract_set(get(), dim.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void union_set::foreach_point(const std::function &fn) const +void union_set::foreach_point(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_point *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -20073,26 +20213,26 @@ void union_set::foreach_point(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -void union_set::foreach_set(const std::function &fn) const +void union_set::foreach_set(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -20101,397 +20241,400 @@ void union_set::foreach_set(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::set_list union_set::get_set_list() const +set_list union_set::get_set_list() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_get_set_list(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::space union_set::get_space() const +space union_set::get_space() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_get_space(get()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::gist(isl::union_set context) const +union_set union_set::gist(union_set context) const { if (!ptr || context.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_gist(copy(), context.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::gist_params(isl::set set) const +union_set union_set::gist_params(set set) const { if (!ptr || set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_gist_params(copy(), set.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_set::identity() const +union_map union_set::identity() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_identity(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::intersect(isl::union_set uset2) const +union_set union_set::intersect(union_set uset2) const { if (!ptr || uset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_intersect(copy(), uset2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::intersect_params(isl::set set) const +union_set union_set::intersect_params(set set) const { if (!ptr || set.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_intersect_params(copy(), set.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool union_set::involves_param(const isl::id &id) const +bool union_set::involves_param(const id &id) const { if (!ptr || id.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_involves_param_id(get(), id.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool union_set::is_disjoint(const isl::union_set &uset2) const +bool union_set::is_disjoint(const union_set &uset2) const { if (!ptr || uset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_is_disjoint(get(), uset2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool union_set::is_empty() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_is_empty(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool union_set::is_equal(const isl::union_set &uset2) const +bool union_set::is_equal(const union_set &uset2) const { if (!ptr || uset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_is_equal(get(), uset2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool union_set::is_params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_is_params(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool union_set::is_strict_subset(const isl::union_set &uset2) const +bool union_set::is_strict_subset(const union_set &uset2) const { if (!ptr || uset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_is_strict_subset(get(), uset2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool union_set::is_subset(const isl::union_set &uset2) const +bool union_set::is_subset(const union_set &uset2) const { if (!ptr || uset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_is_subset(get(), uset2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::union_set union_set::lexmax() const +union_set union_set::lexmax() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_lexmax(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::lexmin() const +union_set union_set::lexmin() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_lexmin(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int union_set::n_set() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_n_set(get()); return res; } -isl::set union_set::params() const +set union_set::params() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_params(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::polyhedral_hull() const +union_set union_set::polyhedral_hull() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_polyhedral_hull(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::preimage(isl::multi_aff ma) const +union_set union_set::preimage(multi_aff ma) const { if (!ptr || ma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_preimage_multi_aff(copy(), ma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::preimage(isl::pw_multi_aff pma) const +union_set union_set::preimage(pw_multi_aff pma) const { if (!ptr || pma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_preimage_pw_multi_aff(copy(), pma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::preimage(isl::union_pw_multi_aff upma) const +union_set union_set::preimage(union_pw_multi_aff upma) const { if (!ptr || upma.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_preimage_union_pw_multi_aff(copy(), upma.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::point union_set::sample_point() const +point union_set::sample_point() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_sample_point(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::subtract(isl::union_set uset2) const +union_set union_set::subtract(union_set uset2) const { if (!ptr || uset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_subtract(copy(), uset2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::unite(isl::union_set uset2) const +union_set union_set::unite(union_set uset2) const { if (!ptr || uset2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_union(copy(), uset2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set union_set::universe() const +union_set union_set::universe() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_universe(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_set::unwrap() const +union_map union_set::unwrap() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_unwrap(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_map union_set::wrapped_domain_map() const +union_map union_set::wrapped_domain_map() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_wrapped_domain_map(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::union_set_list -isl::union_set_list manage(__isl_take isl_union_set_list *ptr) { +union_set_list manage(__isl_take isl_union_set_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return union_set_list(ptr); } -isl::union_set_list manage_copy(__isl_keep isl_union_set_list *ptr) { +union_set_list manage_copy(__isl_keep isl_union_set_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_union_set_list_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_union_set_list_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return union_set_list(ptr); } union_set_list::union_set_list() : ptr(nullptr) {} -union_set_list::union_set_list(const isl::union_set_list &obj) - : ptr(obj.copy()) +union_set_list::union_set_list(const union_set_list &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_union_set_list_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_union_set_list_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } union_set_list::union_set_list(__isl_take isl_union_set_list *ptr) : ptr(ptr) {} -union_set_list::union_set_list(isl::union_set el) +union_set_list::union_set_list(union_set el) { if (el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = el.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_list_from_union_set(el.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_set_list::union_set_list(isl::ctx ctx, int n) +union_set_list::union_set_list(ctx ctx, int n) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_list_alloc(ctx.release(), n); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -union_set_list &union_set_list::operator=(isl::union_set_list obj) { +union_set_list &union_set_list::operator=(union_set_list obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -20525,62 +20668,62 @@ union_set_list::operator bool() const -isl::ctx union_set_list::get_ctx() const { - return isl::ctx(isl_union_set_list_get_ctx(ptr)); +ctx union_set_list::get_ctx() const { + return ctx(isl_union_set_list_get_ctx(ptr)); } -isl::union_set_list union_set_list::add(isl::union_set el) const +union_set_list union_set_list::add(union_set el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_list_add(copy(), el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set_list union_set_list::concat(isl::union_set_list list2) const +union_set_list union_set_list::concat(union_set_list list2) const { if (!ptr || list2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_list_concat(copy(), list2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set_list union_set_list::drop(unsigned int first, unsigned int n) const +union_set_list union_set_list::drop(unsigned int first, unsigned int n) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_list_drop(copy(), first, n); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void union_set_list::foreach(const std::function &fn) const +void union_set_list::foreach(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_union_set *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -20589,93 +20732,97 @@ void union_set_list::foreach(const std::function &fn) cons if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::union_set union_set_list::get_at(int index) const +union_set union_set_list::get_at(int index) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_list_get_at(get(), index); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::union_set_list union_set_list::reverse() const +union_set_list union_set_list::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_list_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int union_set_list::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_union_set_list_size(get()); return res; } // implementations for isl::val -isl::val manage(__isl_take isl_val *ptr) { +val manage(__isl_take isl_val *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return val(ptr); } -isl::val manage_copy(__isl_keep isl_val *ptr) { +val manage_copy(__isl_keep isl_val *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_val_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_val_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return val(ptr); } val::val() : ptr(nullptr) {} -val::val(const isl::val &obj) - : ptr(obj.copy()) +val::val(const val &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_val_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_val_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } val::val(__isl_take isl_val *ptr) : ptr(ptr) {} -val::val(isl::ctx ctx, const std::string &str) +val::val(ctx ctx, const std::string &str) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_read_from_str(ctx.release(), str.c_str()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -val::val(isl::ctx ctx, long i) +val::val(ctx ctx, long i) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_int_from_si(ctx.release(), i); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -val &val::operator=(isl::val obj) { +val &val::operator=(val obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -20723,134 +20870,134 @@ std::string val::to_str() const { } -isl::ctx val::get_ctx() const { - return isl::ctx(isl_val_get_ctx(ptr)); +ctx val::get_ctx() const { + return ctx(isl_val_get_ctx(ptr)); } -isl::val val::abs() const +val val::abs() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_abs(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool val::abs_eq(const isl::val &v2) const +bool val::abs_eq(const val &v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_abs_eq(get(), v2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::val val::add(isl::val v2) const +val val::add(val v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_add(copy(), v2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::ceil() const +val val::ceil() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_ceil(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int val::cmp_si(long i) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_cmp_si(get(), i); return res; } -isl::val val::div(isl::val v2) const +val val::div(val v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_div(copy(), v2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool val::eq(const isl::val &v2) const +bool val::eq(const val &v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_eq(get(), v2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::val val::floor() const +val val::floor() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_floor(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::gcd(isl::val v2) const +val val::gcd(val v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_gcd(copy(), v2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool val::ge(const isl::val &v2) const +bool val::ge(const val &v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_ge(get(), v2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } long val::get_den_si() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_get_den_si(get()); return res; } @@ -20858,430 +21005,433 @@ long val::get_den_si() const long val::get_num_si() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_get_num_si(get()); return res; } -bool val::gt(const isl::val &v2) const +bool val::gt(const val &v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_gt(get(), v2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::val val::infty(isl::ctx ctx) +val val::infty(ctx ctx) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_infty(ctx.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::inv() const +val val::inv() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_inv(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -bool val::is_divisible_by(const isl::val &v2) const +bool val::is_divisible_by(const val &v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_divisible_by(get(), v2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_infty() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_infty(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_int() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_int(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_nan() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_nan(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_neg() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_neg(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_neginfty() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_neginfty(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_negone() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_negone(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_nonneg() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_nonneg(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_nonpos() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_nonpos(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_one() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_one(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_pos() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_pos(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_rat() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_rat(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } bool val::is_zero() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_is_zero(get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool val::le(const isl::val &v2) const +bool val::le(const val &v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_le(get(), v2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -bool val::lt(const isl::val &v2) const +bool val::lt(const val &v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_lt(get(), v2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::val val::max(isl::val v2) const +val val::max(val v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_max(copy(), v2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::min(isl::val v2) const +val val::min(val v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_min(copy(), v2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::mod(isl::val v2) const +val val::mod(val v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_mod(copy(), v2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::mul(isl::val v2) const +val val::mul(val v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_mul(copy(), v2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::nan(isl::ctx ctx) +val val::nan(ctx ctx) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_nan(ctx.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -bool val::ne(const isl::val &v2) const +bool val::ne(const val &v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_ne(get(), v2.get()); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return bool(res); } -isl::val val::neg() const +val val::neg() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_neg(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::neginfty(isl::ctx ctx) +val val::neginfty(ctx ctx) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_neginfty(ctx.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::negone(isl::ctx ctx) +val val::negone(ctx ctx) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_negone(ctx.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::one(isl::ctx ctx) +val val::one(ctx ctx) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_one(ctx.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } int val::sgn() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_sgn(get()); return res; } -isl::val val::sub(isl::val v2) const +val val::sub(val v2) const { if (!ptr || v2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_sub(copy(), v2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::trunc() const +val val::trunc() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_trunc(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val val::zero(isl::ctx ctx) +val val::zero(ctx ctx) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_zero(ctx.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return manage(res); } // implementations for isl::val_list -isl::val_list manage(__isl_take isl_val_list *ptr) { +val_list manage(__isl_take isl_val_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); return val_list(ptr); } -isl::val_list manage_copy(__isl_keep isl_val_list *ptr) { +val_list manage_copy(__isl_keep isl_val_list *ptr) { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = isl_val_list_get_ctx(ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); ptr = isl_val_list_copy(ptr); if (!ptr) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); return val_list(ptr); } val_list::val_list() : ptr(nullptr) {} -val_list::val_list(const isl::val_list &obj) - : ptr(obj.copy()) +val_list::val_list(const val_list &obj) + : ptr(nullptr) { + if (!obj.ptr) + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = isl_val_list_get_ctx(obj.ptr); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); + ptr = obj.copy(); if (obj.ptr && !ptr) - throw exception::create_from_last_error(isl_val_list_get_ctx(obj.ptr)); + exception::throw_last_error(ctx); } val_list::val_list(__isl_take isl_val_list *ptr) : ptr(ptr) {} -val_list::val_list(isl::val el) +val_list::val_list(val el) { if (el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); + exception::throw_invalid("NULL input", __FILE__, __LINE__); auto ctx = el.get_ctx(); - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_list_from_val(el.release()); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -val_list::val_list(isl::ctx ctx, int n) +val_list::val_list(ctx ctx, int n) { - options_scoped_set_on_error saved_on_error(ctx, ISL_ON_ERROR_CONTINUE); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_list_alloc(ctx.release(), n); if (!res) - throw exception::create_from_last_error(ctx); + exception::throw_last_error(ctx); ptr = res; } -val_list &val_list::operator=(isl::val_list obj) { +val_list &val_list::operator=(val_list obj) { std::swap(this->ptr, obj.ptr); return *this; } @@ -21315,62 +21465,62 @@ val_list::operator bool() const -isl::ctx val_list::get_ctx() const { - return isl::ctx(isl_val_list_get_ctx(ptr)); +ctx val_list::get_ctx() const { + return ctx(isl_val_list_get_ctx(ptr)); } -isl::val_list val_list::add(isl::val el) const +val_list val_list::add(val el) const { if (!ptr || el.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_list_add(copy(), el.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val_list val_list::concat(isl::val_list list2) const +val_list val_list::concat(val_list list2) const { if (!ptr || list2.is_null()) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_list_concat(copy(), list2.release()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val_list val_list::drop(unsigned int first, unsigned int n) const +val_list val_list::drop(unsigned int first, unsigned int n) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_list_drop(copy(), first, n); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -void val_list::foreach(const std::function &fn) const +void val_list::foreach(const std::function &fn) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); struct fn_data { - std::function func; + std::function func; std::exception_ptr eptr; } fn_data = { fn }; auto fn_lambda = [](isl_val *arg_0, void *arg_1) -> isl_stat { auto *data = static_cast(arg_1); - try { - (data->func)(isl::manage(arg_0)); + ISL_CPP_TRY { + (data->func)(manage(arg_0)); return isl_stat_ok; - } catch (...) { + } ISL_CPP_CATCH_ALL { data->eptr = std::current_exception(); return isl_stat_error; } @@ -21379,40 +21529,40 @@ void val_list::foreach(const std::function &fn) const if (fn_data.eptr) std::rethrow_exception(fn_data.eptr); if (res < 0) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return void(res); } -isl::val val_list::get_at(int index) const +val val_list::get_at(int index) const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_list_get_at(get(), index); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } -isl::val_list val_list::reverse() const +val_list val_list::reverse() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_list_reverse(copy()); if (!res) - throw exception::create_from_last_error(get_ctx()); + exception::throw_last_error(ctx); return manage(res); } int val_list::size() const { if (!ptr) - throw isl::exception::create(isl_error_invalid, - "NULL input", __FILE__, __LINE__); - options_scoped_set_on_error saved_on_error(get_ctx(), ISL_ON_ERROR_CONTINUE); + exception::throw_invalid("NULL input", __FILE__, __LINE__); + auto ctx = get_ctx(); + options_scoped_set_on_error saved_on_error(ctx, exception::on_error); auto res = isl_val_list_size(get()); return res; } diff --git a/third-party/islpp b/third-party/islpp index 6771372d7..96fef8767 160000 --- a/third-party/islpp +++ b/third-party/islpp @@ -1 +1 @@ -Subproject commit 6771372d7b0f792f05609b2da9a84a71af3aac05 +Subproject commit 96fef8767ee8823d0316e040c827c78b28802ce9