mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
[Polly][Isl] Update isl to isl-0.24-52-gd7be01f7
This is needed because the functions `isl_union_{set,map}_get_{set,map}_list` have been exposed to the C++ interface
This commit is contained in:
parent
3485e9bfbd
commit
dddb225acf
2
polly/lib/External/isl/GIT_HEAD_ID
vendored
2
polly/lib/External/isl/GIT_HEAD_ID
vendored
@ -1 +1 @@
|
||||
isl-0.24-47-g8853f375
|
||||
isl-0.24-52-gd7be01f7
|
||||
|
1
polly/lib/External/isl/doc/SubmittingPatches
vendored
1
polly/lib/External/isl/doc/SubmittingPatches
vendored
@ -11,6 +11,7 @@
|
||||
- the body should provide a meaningful commit message, which
|
||||
includes motivation for the change, and contrasts
|
||||
its implementation with previous behaviour
|
||||
- the lines of this body should have at most 76 columns
|
||||
- if you want your work included in isl.git, add a
|
||||
"Signed-off-by: Your Name <you@example.com>" line to the
|
||||
commit message (or just use the option "-s" when
|
||||
|
6
polly/lib/External/isl/doc/user.pod
vendored
6
polly/lib/External/isl/doc/user.pod
vendored
@ -9411,7 +9411,7 @@ in isl format.
|
||||
An C<isl_val_list>, C<isl_id_list>,
|
||||
C<isl_aff_list>, C<isl_pw_aff_list>, C<isl_pw_multi_aff_list>,
|
||||
C<isl_union_pw_aff_list>,
|
||||
C<isl_map_list> or C<isl_union_set_list> object
|
||||
C<isl_set_list>, C<isl_map_list> or C<isl_union_set_list> object
|
||||
can also be read from input using the following functions.
|
||||
|
||||
#include <isl/val.h>
|
||||
@ -9436,6 +9436,10 @@ can also be read from input using the following functions.
|
||||
isl_union_pw_aff_list_read_from_str(isl_ctx *ctx,
|
||||
const char *str);
|
||||
|
||||
#include <isl/set.h>
|
||||
__isl_give isl_set_list *isl_set_list_read_from_str(
|
||||
isl_ctx *ctx, const char *str);
|
||||
|
||||
#include <isl/map.h>
|
||||
__isl_give isl_map_list *isl_map_list_read_from_str(
|
||||
isl_ctx *ctx, const char *str);
|
||||
|
@ -590,6 +590,14 @@ set uncheck(checked::set obj) {
|
||||
return manage(obj.copy());
|
||||
}
|
||||
|
||||
checked::set_list check(set_list obj) {
|
||||
return checked::manage(obj.copy());
|
||||
}
|
||||
|
||||
set_list uncheck(checked::set_list obj) {
|
||||
return manage(obj.copy());
|
||||
}
|
||||
|
||||
checked::space check(space obj) {
|
||||
return checked::manage(obj.copy());
|
||||
}
|
||||
|
230
polly/lib/External/isl/include/isl/cpp-checked.h
vendored
230
polly/lib/External/isl/include/isl/cpp-checked.h
vendored
@ -280,6 +280,7 @@ class schedule_node_mark;
|
||||
class schedule_node_sequence;
|
||||
class schedule_node_set;
|
||||
class set;
|
||||
class set_list;
|
||||
class space;
|
||||
class union_access_info;
|
||||
class union_flow;
|
||||
@ -1637,12 +1638,13 @@ public:
|
||||
inline isl::checked::pw_multi_aff pw_multi_aff_on_domain(const isl::checked::multi_val &mv) const;
|
||||
inline isl::checked::basic_set sample() const;
|
||||
inline isl::checked::point sample_point() const;
|
||||
inline isl::checked::set_list set_list() const;
|
||||
inline isl::checked::fixed_box simple_fixed_box_hull() const;
|
||||
inline isl::checked::space space() const;
|
||||
inline isl::checked::val stride(int pos) const;
|
||||
inline isl::checked::set subtract(const isl::checked::set &set2) const;
|
||||
inline isl::checked::union_set subtract(const isl::checked::union_set &uset2) const;
|
||||
inline isl::checked::union_set_list to_list() const;
|
||||
inline isl::checked::set_list to_list() const;
|
||||
inline isl::checked::set to_set() const;
|
||||
inline isl::checked::union_set to_union_set() const;
|
||||
inline isl::checked::map translation() const;
|
||||
@ -2555,12 +2557,13 @@ public:
|
||||
inline isl::checked::pw_multi_aff pw_multi_aff_on_domain(const isl::checked::multi_val &mv) const;
|
||||
inline isl::checked::basic_set sample() const;
|
||||
inline isl::checked::point sample_point() const;
|
||||
inline isl::checked::set_list set_list() const;
|
||||
inline isl::checked::fixed_box simple_fixed_box_hull() const;
|
||||
inline isl::checked::space space() const;
|
||||
inline isl::checked::val stride(int pos) const;
|
||||
inline isl::checked::set subtract(const isl::checked::set &set2) const;
|
||||
inline isl::checked::union_set subtract(const isl::checked::union_set &uset2) const;
|
||||
inline isl::checked::union_set_list to_list() const;
|
||||
inline isl::checked::set_list to_list() const;
|
||||
inline isl::checked::set to_set() const;
|
||||
inline isl::checked::union_set to_union_set() const;
|
||||
inline isl::checked::map translation() const;
|
||||
@ -3501,6 +3504,7 @@ public:
|
||||
inline isl::checked::pw_multi_aff pw_multi_aff_on_domain(isl::checked::multi_val mv) const;
|
||||
inline isl::checked::basic_set sample() const;
|
||||
inline isl::checked::point sample_point() const;
|
||||
inline isl::checked::set_list set_list() const;
|
||||
inline isl::checked::fixed_box simple_fixed_box_hull() const;
|
||||
inline isl::checked::fixed_box get_simple_fixed_box_hull() const;
|
||||
inline isl::checked::space space() const;
|
||||
@ -3511,7 +3515,7 @@ public:
|
||||
inline isl::checked::union_set subtract(const isl::checked::union_set &uset2) const;
|
||||
inline isl::checked::set subtract(const isl::checked::basic_set &set2) const;
|
||||
inline isl::checked::set subtract(const isl::checked::point &set2) const;
|
||||
inline isl::checked::union_set_list to_list() const;
|
||||
inline isl::checked::set_list to_list() const;
|
||||
inline isl::checked::union_set to_union_set() const;
|
||||
inline isl::checked::map translation() const;
|
||||
inline class size tuple_dim() const;
|
||||
@ -3528,6 +3532,45 @@ public:
|
||||
inline isl::checked::set upper_bound(isl::checked::multi_val upper) const;
|
||||
};
|
||||
|
||||
// declarations for isl::set_list
|
||||
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 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;
|
||||
|
||||
inline explicit set_list(__isl_take isl_set_list *ptr);
|
||||
|
||||
public:
|
||||
inline /* implicit */ set_list();
|
||||
inline /* implicit */ set_list(const set_list &obj);
|
||||
inline explicit set_list(isl::checked::ctx ctx, int n);
|
||||
inline explicit set_list(isl::checked::set el);
|
||||
inline explicit set_list(isl::checked::ctx ctx, const std::string &str);
|
||||
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;
|
||||
inline __isl_keep isl_set_list *get() const;
|
||||
inline __isl_give isl_set_list *release();
|
||||
inline bool is_null() const;
|
||||
inline isl::checked::ctx ctx() const;
|
||||
|
||||
inline isl::checked::set_list add(isl::checked::set el) const;
|
||||
inline isl::checked::set at(int index) const;
|
||||
inline isl::checked::set get_at(int index) const;
|
||||
inline isl::checked::set_list clear() const;
|
||||
inline isl::checked::set_list concat(isl::checked::set_list list2) const;
|
||||
inline isl::checked::set_list drop(unsigned int first, unsigned int n) const;
|
||||
inline stat foreach(const std::function<stat(isl::checked::set)> &fn) const;
|
||||
inline isl::checked::set_list insert(unsigned int pos, isl::checked::set el) const;
|
||||
inline class size size() const;
|
||||
};
|
||||
|
||||
// declarations for isl::space
|
||||
inline space manage(__isl_take isl_space *ptr);
|
||||
inline space manage_copy(__isl_keep isl_space *ptr);
|
||||
@ -4053,6 +4096,8 @@ public:
|
||||
inline isl::checked::union_set preimage(isl::checked::pw_multi_aff pma) const;
|
||||
inline isl::checked::union_set preimage(isl::checked::union_pw_multi_aff upma) const;
|
||||
inline isl::checked::point sample_point() const;
|
||||
inline isl::checked::set_list set_list() const;
|
||||
inline isl::checked::set_list get_set_list() const;
|
||||
inline isl::checked::space space() const;
|
||||
inline isl::checked::space get_space() const;
|
||||
inline isl::checked::union_set subtract(isl::checked::union_set uset2) const;
|
||||
@ -8324,6 +8369,11 @@ isl::checked::point basic_set::sample_point() const
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::checked::set_list basic_set::set_list() const
|
||||
{
|
||||
return isl::checked::set(*this).set_list();
|
||||
}
|
||||
|
||||
isl::checked::fixed_box basic_set::simple_fixed_box_hull() const
|
||||
{
|
||||
return isl::checked::set(*this).simple_fixed_box_hull();
|
||||
@ -8349,7 +8399,7 @@ isl::checked::union_set basic_set::subtract(const isl::checked::union_set &uset2
|
||||
return isl::checked::set(*this).subtract(uset2);
|
||||
}
|
||||
|
||||
isl::checked::union_set_list basic_set::to_list() const
|
||||
isl::checked::set_list basic_set::to_list() const
|
||||
{
|
||||
return isl::checked::set(*this).to_list();
|
||||
}
|
||||
@ -12464,6 +12514,11 @@ isl::checked::point point::sample_point() const
|
||||
return isl::checked::basic_set(*this).sample_point();
|
||||
}
|
||||
|
||||
isl::checked::set_list point::set_list() const
|
||||
{
|
||||
return isl::checked::basic_set(*this).set_list();
|
||||
}
|
||||
|
||||
isl::checked::fixed_box point::simple_fixed_box_hull() const
|
||||
{
|
||||
return isl::checked::basic_set(*this).simple_fixed_box_hull();
|
||||
@ -12489,7 +12544,7 @@ isl::checked::union_set point::subtract(const isl::checked::union_set &uset2) co
|
||||
return isl::checked::basic_set(*this).subtract(uset2);
|
||||
}
|
||||
|
||||
isl::checked::union_set_list point::to_list() const
|
||||
isl::checked::set_list point::to_list() const
|
||||
{
|
||||
return isl::checked::basic_set(*this).to_list();
|
||||
}
|
||||
@ -16255,6 +16310,11 @@ isl::checked::point set::sample_point() const
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::checked::set_list set::set_list() const
|
||||
{
|
||||
return isl::checked::union_set(*this).set_list();
|
||||
}
|
||||
|
||||
isl::checked::fixed_box set::simple_fixed_box_hull() const
|
||||
{
|
||||
auto res = isl_set_get_simple_fixed_box_hull(get());
|
||||
@ -16309,9 +16369,10 @@ isl::checked::set set::subtract(const isl::checked::point &set2) const
|
||||
return this->subtract(isl::checked::set(set2));
|
||||
}
|
||||
|
||||
isl::checked::union_set_list set::to_list() const
|
||||
isl::checked::set_list set::to_list() const
|
||||
{
|
||||
return isl::checked::union_set(*this).to_list();
|
||||
auto res = isl_set_to_list(copy());
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::checked::union_set set::to_union_set() const
|
||||
@ -16407,6 +16468,150 @@ inline std::ostream &operator<<(std::ostream &os, const set &obj)
|
||||
return os;
|
||||
}
|
||||
|
||||
// implementations for isl::set_list
|
||||
set_list manage(__isl_take isl_set_list *ptr) {
|
||||
return set_list(ptr);
|
||||
}
|
||||
set_list manage_copy(__isl_keep isl_set_list *ptr) {
|
||||
ptr = isl_set_list_copy(ptr);
|
||||
return set_list(ptr);
|
||||
}
|
||||
|
||||
set_list::set_list()
|
||||
: ptr(nullptr) {}
|
||||
|
||||
set_list::set_list(const set_list &obj)
|
||||
: ptr(nullptr)
|
||||
{
|
||||
ptr = obj.copy();
|
||||
}
|
||||
|
||||
set_list::set_list(__isl_take isl_set_list *ptr)
|
||||
: ptr(ptr) {}
|
||||
|
||||
set_list::set_list(isl::checked::ctx ctx, int n)
|
||||
{
|
||||
auto res = isl_set_list_alloc(ctx.release(), n);
|
||||
ptr = res;
|
||||
}
|
||||
|
||||
set_list::set_list(isl::checked::set el)
|
||||
{
|
||||
auto res = isl_set_list_from_set(el.release());
|
||||
ptr = res;
|
||||
}
|
||||
|
||||
set_list::set_list(isl::checked::ctx ctx, const std::string &str)
|
||||
{
|
||||
auto res = isl_set_list_read_from_str(ctx.release(), str.c_str());
|
||||
ptr = res;
|
||||
}
|
||||
|
||||
set_list &set_list::operator=(set_list obj) {
|
||||
std::swap(this->ptr, obj.ptr);
|
||||
return *this;
|
||||
}
|
||||
|
||||
set_list::~set_list() {
|
||||
if (ptr)
|
||||
isl_set_list_free(ptr);
|
||||
}
|
||||
|
||||
__isl_give isl_set_list *set_list::copy() const & {
|
||||
return isl_set_list_copy(ptr);
|
||||
}
|
||||
|
||||
__isl_keep isl_set_list *set_list::get() const {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
__isl_give isl_set_list *set_list::release() {
|
||||
isl_set_list *tmp = ptr;
|
||||
ptr = nullptr;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
bool set_list::is_null() const {
|
||||
return ptr == nullptr;
|
||||
}
|
||||
|
||||
isl::checked::ctx set_list::ctx() const {
|
||||
return isl::checked::ctx(isl_set_list_get_ctx(ptr));
|
||||
}
|
||||
|
||||
isl::checked::set_list set_list::add(isl::checked::set el) const
|
||||
{
|
||||
auto res = isl_set_list_add(copy(), el.release());
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::checked::set set_list::at(int index) const
|
||||
{
|
||||
auto res = isl_set_list_get_at(get(), index);
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::checked::set set_list::get_at(int index) const
|
||||
{
|
||||
return at(index);
|
||||
}
|
||||
|
||||
isl::checked::set_list set_list::clear() const
|
||||
{
|
||||
auto res = isl_set_list_clear(copy());
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::checked::set_list set_list::concat(isl::checked::set_list list2) const
|
||||
{
|
||||
auto res = isl_set_list_concat(copy(), list2.release());
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::checked::set_list set_list::drop(unsigned int first, unsigned int n) const
|
||||
{
|
||||
auto res = isl_set_list_drop(copy(), first, n);
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
stat set_list::foreach(const std::function<stat(isl::checked::set)> &fn) const
|
||||
{
|
||||
struct fn_data {
|
||||
std::function<stat(isl::checked::set)> func;
|
||||
} fn_data = { fn };
|
||||
auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat {
|
||||
auto *data = static_cast<struct fn_data *>(arg_1);
|
||||
auto ret = (data->func)(manage(arg_0));
|
||||
return ret.release();
|
||||
};
|
||||
auto res = isl_set_list_foreach(get(), fn_lambda, &fn_data);
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::checked::set_list set_list::insert(unsigned int pos, isl::checked::set el) const
|
||||
{
|
||||
auto res = isl_set_list_insert(copy(), pos, el.release());
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
class size set_list::size() const
|
||||
{
|
||||
auto res = isl_set_list_size(get());
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &os, const set_list &obj)
|
||||
{
|
||||
char *str = isl_set_list_to_str(obj.get());
|
||||
if (!str) {
|
||||
os.setstate(std::ios_base::badbit);
|
||||
return os;
|
||||
}
|
||||
os << str;
|
||||
free(str);
|
||||
return os;
|
||||
}
|
||||
|
||||
// implementations for isl::space
|
||||
space manage(__isl_take isl_space *ptr) {
|
||||
return space(ptr);
|
||||
@ -18761,6 +18966,17 @@ isl::checked::point union_set::sample_point() const
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::checked::set_list union_set::set_list() const
|
||||
{
|
||||
auto res = isl_union_set_get_set_list(get());
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::checked::set_list union_set::get_set_list() const
|
||||
{
|
||||
return set_list();
|
||||
}
|
||||
|
||||
isl::checked::space union_set::space() const
|
||||
{
|
||||
auto res = isl_union_set_get_space(get());
|
||||
|
332
polly/lib/External/isl/include/isl/cpp.h
vendored
332
polly/lib/External/isl/include/isl/cpp.h
vendored
@ -344,6 +344,7 @@ class schedule_node_mark;
|
||||
class schedule_node_sequence;
|
||||
class schedule_node_set;
|
||||
class set;
|
||||
class set_list;
|
||||
class space;
|
||||
class union_access_info;
|
||||
class union_flow;
|
||||
@ -1702,12 +1703,13 @@ public:
|
||||
inline isl::pw_multi_aff pw_multi_aff_on_domain(const isl::multi_val &mv) const;
|
||||
inline isl::basic_set sample() const;
|
||||
inline isl::point sample_point() const;
|
||||
inline isl::set_list set_list() const;
|
||||
inline isl::fixed_box simple_fixed_box_hull() const;
|
||||
inline isl::space space() const;
|
||||
inline isl::val stride(int pos) const;
|
||||
inline isl::set subtract(const isl::set &set2) const;
|
||||
inline isl::union_set subtract(const isl::union_set &uset2) const;
|
||||
inline isl::union_set_list to_list() const;
|
||||
inline isl::set_list to_list() const;
|
||||
inline isl::set to_set() const;
|
||||
inline isl::union_set to_union_set() const;
|
||||
inline isl::map translation() const;
|
||||
@ -2620,12 +2622,13 @@ public:
|
||||
inline isl::pw_multi_aff pw_multi_aff_on_domain(const isl::multi_val &mv) const;
|
||||
inline isl::basic_set sample() const;
|
||||
inline isl::point sample_point() const;
|
||||
inline isl::set_list set_list() const;
|
||||
inline isl::fixed_box simple_fixed_box_hull() const;
|
||||
inline isl::space space() const;
|
||||
inline isl::val stride(int pos) const;
|
||||
inline isl::set subtract(const isl::set &set2) const;
|
||||
inline isl::union_set subtract(const isl::union_set &uset2) const;
|
||||
inline isl::union_set_list to_list() const;
|
||||
inline isl::set_list to_list() const;
|
||||
inline isl::set to_set() const;
|
||||
inline isl::union_set to_union_set() const;
|
||||
inline isl::map translation() const;
|
||||
@ -3566,6 +3569,7 @@ public:
|
||||
inline isl::pw_multi_aff pw_multi_aff_on_domain(isl::multi_val mv) const;
|
||||
inline isl::basic_set sample() const;
|
||||
inline isl::point sample_point() const;
|
||||
inline isl::set_list set_list() const;
|
||||
inline isl::fixed_box simple_fixed_box_hull() const;
|
||||
inline isl::fixed_box get_simple_fixed_box_hull() const;
|
||||
inline isl::space space() const;
|
||||
@ -3576,7 +3580,7 @@ public:
|
||||
inline isl::union_set subtract(const isl::union_set &uset2) const;
|
||||
inline isl::set subtract(const isl::basic_set &set2) const;
|
||||
inline isl::set subtract(const isl::point &set2) const;
|
||||
inline isl::union_set_list to_list() const;
|
||||
inline isl::set_list to_list() const;
|
||||
inline isl::union_set to_union_set() const;
|
||||
inline isl::map translation() const;
|
||||
inline unsigned tuple_dim() const;
|
||||
@ -3593,6 +3597,45 @@ public:
|
||||
inline isl::set upper_bound(isl::multi_val upper) const;
|
||||
};
|
||||
|
||||
// declarations for isl::set_list
|
||||
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 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;
|
||||
|
||||
inline explicit set_list(__isl_take isl_set_list *ptr);
|
||||
|
||||
public:
|
||||
inline /* implicit */ set_list();
|
||||
inline /* implicit */ set_list(const set_list &obj);
|
||||
inline explicit set_list(isl::ctx ctx, int n);
|
||||
inline explicit set_list(isl::set el);
|
||||
inline explicit set_list(isl::ctx ctx, const std::string &str);
|
||||
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;
|
||||
inline __isl_keep isl_set_list *get() const;
|
||||
inline __isl_give isl_set_list *release();
|
||||
inline bool is_null() const;
|
||||
inline isl::ctx ctx() const;
|
||||
|
||||
inline isl::set_list add(isl::set el) const;
|
||||
inline isl::set at(int index) const;
|
||||
inline isl::set get_at(int index) const;
|
||||
inline isl::set_list clear() 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<void(isl::set)> &fn) const;
|
||||
inline isl::set_list insert(unsigned int pos, isl::set el) const;
|
||||
inline unsigned size() const;
|
||||
};
|
||||
|
||||
// declarations for isl::space
|
||||
inline space manage(__isl_take isl_space *ptr);
|
||||
inline space manage_copy(__isl_keep isl_space *ptr);
|
||||
@ -4118,6 +4161,8 @@ public:
|
||||
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::set_list set_list() const;
|
||||
inline isl::set_list get_set_list() const;
|
||||
inline isl::space space() const;
|
||||
inline isl::space get_space() const;
|
||||
inline isl::union_set subtract(isl::union_set uset2) const;
|
||||
@ -9971,6 +10016,13 @@ isl::point basic_set::sample_point() const
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::set_list basic_set::set_list() const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
return isl::set(*this).set_list();
|
||||
}
|
||||
|
||||
isl::fixed_box basic_set::simple_fixed_box_hull() const
|
||||
{
|
||||
if (!ptr)
|
||||
@ -10006,7 +10058,7 @@ isl::union_set basic_set::subtract(const isl::union_set &uset2) const
|
||||
return isl::set(*this).subtract(uset2);
|
||||
}
|
||||
|
||||
isl::union_set_list basic_set::to_list() const
|
||||
isl::set_list basic_set::to_list() const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
@ -16645,6 +16697,13 @@ isl::point point::sample_point() const
|
||||
return isl::basic_set(*this).sample_point();
|
||||
}
|
||||
|
||||
isl::set_list point::set_list() const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
return isl::basic_set(*this).set_list();
|
||||
}
|
||||
|
||||
isl::fixed_box point::simple_fixed_box_hull() const
|
||||
{
|
||||
if (!ptr)
|
||||
@ -16680,7 +16739,7 @@ isl::union_set point::subtract(const isl::union_set &uset2) const
|
||||
return isl::basic_set(*this).subtract(uset2);
|
||||
}
|
||||
|
||||
isl::union_set_list point::to_list() const
|
||||
isl::set_list point::to_list() const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
@ -22618,6 +22677,13 @@ isl::point set::sample_point() const
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::set_list set::set_list() const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
return isl::union_set(*this).set_list();
|
||||
}
|
||||
|
||||
isl::fixed_box set::simple_fixed_box_hull() const
|
||||
{
|
||||
if (!ptr)
|
||||
@ -22702,11 +22768,16 @@ isl::set set::subtract(const isl::point &set2) const
|
||||
return this->subtract(isl::set(set2));
|
||||
}
|
||||
|
||||
isl::union_set_list set::to_list() const
|
||||
isl::set_list set::to_list() const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
return isl::union_set(*this).to_list();
|
||||
auto saved_ctx = ctx();
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_set_to_list(copy());
|
||||
if (!res)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::union_set set::to_union_set() const
|
||||
@ -22876,6 +22947,236 @@ inline std::ostream &operator<<(std::ostream &os, const set &obj)
|
||||
return os;
|
||||
}
|
||||
|
||||
// implementations for isl::set_list
|
||||
set_list manage(__isl_take isl_set_list *ptr) {
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
return set_list(ptr);
|
||||
}
|
||||
set_list manage_copy(__isl_keep isl_set_list *ptr) {
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = isl_set_list_get_ctx(ptr);
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
ptr = isl_set_list_copy(ptr);
|
||||
if (!ptr)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
return set_list(ptr);
|
||||
}
|
||||
|
||||
set_list::set_list()
|
||||
: ptr(nullptr) {}
|
||||
|
||||
set_list::set_list(const set_list &obj)
|
||||
: ptr(nullptr)
|
||||
{
|
||||
if (!obj.ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = isl_set_list_get_ctx(obj.ptr);
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
ptr = obj.copy();
|
||||
if (!ptr)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
}
|
||||
|
||||
set_list::set_list(__isl_take isl_set_list *ptr)
|
||||
: ptr(ptr) {}
|
||||
|
||||
set_list::set_list(isl::ctx ctx, int n)
|
||||
{
|
||||
auto saved_ctx = ctx;
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_set_list_alloc(ctx.release(), n);
|
||||
if (!res)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
ptr = res;
|
||||
}
|
||||
|
||||
set_list::set_list(isl::set el)
|
||||
{
|
||||
if (el.is_null())
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = el.ctx();
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_set_list_from_set(el.release());
|
||||
if (!res)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
ptr = res;
|
||||
}
|
||||
|
||||
set_list::set_list(isl::ctx ctx, const std::string &str)
|
||||
{
|
||||
auto saved_ctx = ctx;
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_set_list_read_from_str(ctx.release(), str.c_str());
|
||||
if (!res)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
ptr = res;
|
||||
}
|
||||
|
||||
set_list &set_list::operator=(set_list obj) {
|
||||
std::swap(this->ptr, obj.ptr);
|
||||
return *this;
|
||||
}
|
||||
|
||||
set_list::~set_list() {
|
||||
if (ptr)
|
||||
isl_set_list_free(ptr);
|
||||
}
|
||||
|
||||
__isl_give isl_set_list *set_list::copy() const & {
|
||||
return isl_set_list_copy(ptr);
|
||||
}
|
||||
|
||||
__isl_keep isl_set_list *set_list::get() const {
|
||||
return ptr;
|
||||
}
|
||||
|
||||
__isl_give isl_set_list *set_list::release() {
|
||||
isl_set_list *tmp = ptr;
|
||||
ptr = nullptr;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
bool set_list::is_null() const {
|
||||
return ptr == nullptr;
|
||||
}
|
||||
|
||||
isl::ctx set_list::ctx() const {
|
||||
return isl::ctx(isl_set_list_get_ctx(ptr));
|
||||
}
|
||||
|
||||
isl::set_list set_list::add(isl::set el) const
|
||||
{
|
||||
if (!ptr || el.is_null())
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = ctx();
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_set_list_add(copy(), el.release());
|
||||
if (!res)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::set set_list::at(int index) const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = ctx();
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_set_list_get_at(get(), index);
|
||||
if (!res)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::set set_list::get_at(int index) const
|
||||
{
|
||||
return at(index);
|
||||
}
|
||||
|
||||
isl::set_list set_list::clear() const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = ctx();
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_set_list_clear(copy());
|
||||
if (!res)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::set_list set_list::concat(isl::set_list list2) const
|
||||
{
|
||||
if (!ptr || list2.is_null())
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = ctx();
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_set_list_concat(copy(), list2.release());
|
||||
if (!res)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::set_list set_list::drop(unsigned int first, unsigned int n) const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = ctx();
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_set_list_drop(copy(), first, n);
|
||||
if (!res)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
void set_list::foreach(const std::function<void(isl::set)> &fn) const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = ctx();
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
struct fn_data {
|
||||
std::function<void(isl::set)> func;
|
||||
std::exception_ptr eptr;
|
||||
} fn_data = { fn };
|
||||
auto fn_lambda = [](isl_set *arg_0, void *arg_1) -> isl_stat {
|
||||
auto *data = static_cast<struct fn_data *>(arg_1);
|
||||
ISL_CPP_TRY {
|
||||
(data->func)(manage(arg_0));
|
||||
return isl_stat_ok;
|
||||
} ISL_CPP_CATCH_ALL {
|
||||
data->eptr = std::current_exception();
|
||||
return isl_stat_error;
|
||||
}
|
||||
};
|
||||
auto res = isl_set_list_foreach(get(), fn_lambda, &fn_data);
|
||||
if (fn_data.eptr)
|
||||
std::rethrow_exception(fn_data.eptr);
|
||||
if (res < 0)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
isl::set_list set_list::insert(unsigned int pos, isl::set el) const
|
||||
{
|
||||
if (!ptr || el.is_null())
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = ctx();
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_set_list_insert(copy(), pos, el.release());
|
||||
if (!res)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
unsigned set_list::size() const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = ctx();
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_set_list_size(get());
|
||||
if (res < 0)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
return res;
|
||||
}
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &os, const set_list &obj)
|
||||
{
|
||||
if (!obj.get())
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = isl_set_list_get_ctx(obj.get());
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
char *str = isl_set_list_to_str(obj.get());
|
||||
if (!str)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
os << str;
|
||||
free(str);
|
||||
return os;
|
||||
}
|
||||
|
||||
// implementations for isl::space
|
||||
space manage(__isl_take isl_space *ptr) {
|
||||
if (!ptr)
|
||||
@ -26950,6 +27251,23 @@ isl::point union_set::sample_point() const
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::set_list union_set::set_list() const
|
||||
{
|
||||
if (!ptr)
|
||||
exception::throw_invalid("NULL input", __FILE__, __LINE__);
|
||||
auto saved_ctx = ctx();
|
||||
options_scoped_set_on_error saved_on_error(saved_ctx, exception::on_error);
|
||||
auto res = isl_union_set_get_set_list(get());
|
||||
if (!res)
|
||||
exception::throw_last_error(saved_ctx);
|
||||
return manage(res);
|
||||
}
|
||||
|
||||
isl::set_list union_set::get_set_list() const
|
||||
{
|
||||
return set_list();
|
||||
}
|
||||
|
||||
isl::space union_set::space() const
|
||||
{
|
||||
if (!ptr)
|
||||
|
@ -24,11 +24,12 @@ ISL_DECLARE_LIST_TYPE(basic_set)
|
||||
#ifndef isl_set
|
||||
struct __isl_subclass(isl_union_set) isl_set;
|
||||
typedef struct isl_set isl_set;
|
||||
ISL_DECLARE_LIST_TYPE(set)
|
||||
ISL_DECLARE_EXPORTED_LIST_TYPE(set)
|
||||
#endif
|
||||
|
||||
ISL_DECLARE_LIST_FN(basic_set)
|
||||
ISL_DECLARE_LIST_FN(set)
|
||||
ISL_DECLARE_EXPORTED_LIST_FN(set)
|
||||
ISL_DECLARE_EXPORTED_LIST_FN_READ(set)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
552
polly/lib/External/isl/include/isl/typed_cpp.h
vendored
552
polly/lib/External/isl/include/isl/typed_cpp.h
vendored
File diff suppressed because it is too large
Load Diff
@ -135,6 +135,7 @@ isl_bool isl_union_set_every_set(__isl_keep isl_union_set *uset,
|
||||
isl_bool (*test)(__isl_keep isl_set *set, void *user), void *user);
|
||||
__isl_give isl_basic_set_list *isl_union_set_get_basic_set_list(
|
||||
__isl_keep isl_union_set *uset);
|
||||
__isl_export
|
||||
__isl_give isl_set_list *isl_union_set_get_set_list(
|
||||
__isl_keep isl_union_set *uset);
|
||||
isl_bool isl_union_set_contains(__isl_keep isl_union_set *uset,
|
||||
|
203
polly/lib/External/isl/interface/isl.py
vendored
203
polly/lib/External/isl/interface/isl.py
vendored
@ -9880,6 +9880,18 @@ class union_set(object):
|
||||
res = isl.isl_union_set_sample_point(isl.isl_union_set_copy(arg0.ptr))
|
||||
obj = point(ctx=ctx, ptr=res)
|
||||
return obj
|
||||
def set_list(arg0):
|
||||
try:
|
||||
if not arg0.__class__ is union_set:
|
||||
arg0 = union_set(arg0)
|
||||
except:
|
||||
raise
|
||||
ctx = arg0.ctx
|
||||
res = isl.isl_union_set_get_set_list(arg0.ptr)
|
||||
obj = set_list(ctx=ctx, ptr=res)
|
||||
return obj
|
||||
def get_set_list(arg0):
|
||||
return arg0.set_list()
|
||||
def space(arg0):
|
||||
try:
|
||||
if not arg0.__class__ is union_set:
|
||||
@ -10010,6 +10022,8 @@ isl.isl_union_set_preimage_union_pw_multi_aff.restype = c_void_p
|
||||
isl.isl_union_set_preimage_union_pw_multi_aff.argtypes = [c_void_p, c_void_p]
|
||||
isl.isl_union_set_sample_point.restype = c_void_p
|
||||
isl.isl_union_set_sample_point.argtypes = [c_void_p]
|
||||
isl.isl_union_set_get_set_list.restype = c_void_p
|
||||
isl.isl_union_set_get_set_list.argtypes = [c_void_p]
|
||||
isl.isl_union_set_get_space.restype = c_void_p
|
||||
isl.isl_union_set_get_space.argtypes = [c_void_p]
|
||||
isl.isl_union_set_subtract.restype = c_void_p
|
||||
@ -10694,6 +10708,16 @@ class set(union_set):
|
||||
res = isl.isl_set_subtract(isl.isl_set_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
|
||||
obj = set(ctx=ctx, ptr=res)
|
||||
return obj
|
||||
def to_list(arg0):
|
||||
try:
|
||||
if not arg0.__class__ is set:
|
||||
arg0 = set(arg0)
|
||||
except:
|
||||
raise
|
||||
ctx = arg0.ctx
|
||||
res = isl.isl_set_to_list(isl.isl_set_copy(arg0.ptr))
|
||||
obj = set_list(ctx=ctx, ptr=res)
|
||||
return obj
|
||||
def to_union_set(arg0):
|
||||
try:
|
||||
if not arg0.__class__ is set:
|
||||
@ -10918,6 +10942,8 @@ isl.isl_set_get_stride.restype = c_void_p
|
||||
isl.isl_set_get_stride.argtypes = [c_void_p, c_int]
|
||||
isl.isl_set_subtract.restype = c_void_p
|
||||
isl.isl_set_subtract.argtypes = [c_void_p, c_void_p]
|
||||
isl.isl_set_to_list.restype = c_void_p
|
||||
isl.isl_set_to_list.argtypes = [c_void_p]
|
||||
isl.isl_set_to_union_set.restype = c_void_p
|
||||
isl.isl_set_to_union_set.argtypes = [c_void_p]
|
||||
isl.isl_set_translation.restype = c_void_p
|
||||
@ -14568,6 +14594,183 @@ isl.isl_schedule_node_free.argtypes = [c_void_p]
|
||||
isl.isl_schedule_node_to_str.restype = POINTER(c_char)
|
||||
isl.isl_schedule_node_to_str.argtypes = [c_void_p]
|
||||
|
||||
class set_list(object):
|
||||
def __init__(self, *args, **keywords):
|
||||
if "ptr" in keywords:
|
||||
self.ctx = keywords["ctx"]
|
||||
self.ptr = keywords["ptr"]
|
||||
return
|
||||
if len(args) == 1 and type(args[0]) == int:
|
||||
self.ctx = Context.getDefaultInstance()
|
||||
self.ptr = isl.isl_set_list_alloc(self.ctx, args[0])
|
||||
return
|
||||
if len(args) == 1 and args[0].__class__ is set:
|
||||
self.ctx = Context.getDefaultInstance()
|
||||
self.ptr = isl.isl_set_list_from_set(isl.isl_set_copy(args[0].ptr))
|
||||
return
|
||||
if len(args) == 1 and type(args[0]) == str:
|
||||
self.ctx = Context.getDefaultInstance()
|
||||
self.ptr = isl.isl_set_list_read_from_str(self.ctx, args[0].encode('ascii'))
|
||||
return
|
||||
raise Error
|
||||
def __del__(self):
|
||||
if hasattr(self, 'ptr'):
|
||||
isl.isl_set_list_free(self.ptr)
|
||||
def __str__(arg0):
|
||||
try:
|
||||
if not arg0.__class__ is set_list:
|
||||
arg0 = set_list(arg0)
|
||||
except:
|
||||
raise
|
||||
ptr = isl.isl_set_list_to_str(arg0.ptr)
|
||||
res = cast(ptr, c_char_p).value.decode('ascii')
|
||||
libc.free(ptr)
|
||||
return res
|
||||
def __repr__(self):
|
||||
s = str(self)
|
||||
if '"' in s:
|
||||
return 'isl.set_list("""%s""")' % s
|
||||
else:
|
||||
return 'isl.set_list("%s")' % s
|
||||
def add(arg0, arg1):
|
||||
try:
|
||||
if not arg0.__class__ is set_list:
|
||||
arg0 = set_list(arg0)
|
||||
except:
|
||||
raise
|
||||
try:
|
||||
if not arg1.__class__ is set:
|
||||
arg1 = set(arg1)
|
||||
except:
|
||||
raise
|
||||
ctx = arg0.ctx
|
||||
res = isl.isl_set_list_add(isl.isl_set_list_copy(arg0.ptr), isl.isl_set_copy(arg1.ptr))
|
||||
obj = set_list(ctx=ctx, ptr=res)
|
||||
return obj
|
||||
def at(arg0, arg1):
|
||||
try:
|
||||
if not arg0.__class__ is set_list:
|
||||
arg0 = set_list(arg0)
|
||||
except:
|
||||
raise
|
||||
ctx = arg0.ctx
|
||||
res = isl.isl_set_list_get_at(arg0.ptr, arg1)
|
||||
obj = set(ctx=ctx, ptr=res)
|
||||
return obj
|
||||
def get_at(arg0, arg1):
|
||||
return arg0.at(arg1)
|
||||
def clear(arg0):
|
||||
try:
|
||||
if not arg0.__class__ is set_list:
|
||||
arg0 = set_list(arg0)
|
||||
except:
|
||||
raise
|
||||
ctx = arg0.ctx
|
||||
res = isl.isl_set_list_clear(isl.isl_set_list_copy(arg0.ptr))
|
||||
obj = set_list(ctx=ctx, ptr=res)
|
||||
return obj
|
||||
def concat(arg0, arg1):
|
||||
try:
|
||||
if not arg0.__class__ is set_list:
|
||||
arg0 = set_list(arg0)
|
||||
except:
|
||||
raise
|
||||
try:
|
||||
if not arg1.__class__ is set_list:
|
||||
arg1 = set_list(arg1)
|
||||
except:
|
||||
raise
|
||||
ctx = arg0.ctx
|
||||
res = isl.isl_set_list_concat(isl.isl_set_list_copy(arg0.ptr), isl.isl_set_list_copy(arg1.ptr))
|
||||
obj = set_list(ctx=ctx, ptr=res)
|
||||
return obj
|
||||
def drop(arg0, arg1, arg2):
|
||||
try:
|
||||
if not arg0.__class__ is set_list:
|
||||
arg0 = set_list(arg0)
|
||||
except:
|
||||
raise
|
||||
ctx = arg0.ctx
|
||||
res = isl.isl_set_list_drop(isl.isl_set_list_copy(arg0.ptr), arg1, arg2)
|
||||
obj = set_list(ctx=ctx, ptr=res)
|
||||
return obj
|
||||
def foreach(arg0, arg1):
|
||||
try:
|
||||
if not arg0.__class__ is set_list:
|
||||
arg0 = set_list(arg0)
|
||||
except:
|
||||
raise
|
||||
exc_info = [None]
|
||||
fn = CFUNCTYPE(c_int, c_void_p, c_void_p)
|
||||
def cb_func(cb_arg0, cb_arg1):
|
||||
cb_arg0 = set(ctx=arg0.ctx, ptr=(cb_arg0))
|
||||
try:
|
||||
arg1(cb_arg0)
|
||||
except BaseException as e:
|
||||
exc_info[0] = e
|
||||
return -1
|
||||
return 0
|
||||
cb = fn(cb_func)
|
||||
ctx = arg0.ctx
|
||||
res = isl.isl_set_list_foreach(arg0.ptr, cb, None)
|
||||
if exc_info[0] is not None:
|
||||
raise exc_info[0]
|
||||
if res < 0:
|
||||
raise
|
||||
def insert(arg0, arg1, arg2):
|
||||
try:
|
||||
if not arg0.__class__ is set_list:
|
||||
arg0 = set_list(arg0)
|
||||
except:
|
||||
raise
|
||||
try:
|
||||
if not arg2.__class__ is set:
|
||||
arg2 = set(arg2)
|
||||
except:
|
||||
raise
|
||||
ctx = arg0.ctx
|
||||
res = isl.isl_set_list_insert(isl.isl_set_list_copy(arg0.ptr), arg1, isl.isl_set_copy(arg2.ptr))
|
||||
obj = set_list(ctx=ctx, ptr=res)
|
||||
return obj
|
||||
def size(arg0):
|
||||
try:
|
||||
if not arg0.__class__ is set_list:
|
||||
arg0 = set_list(arg0)
|
||||
except:
|
||||
raise
|
||||
ctx = arg0.ctx
|
||||
res = isl.isl_set_list_size(arg0.ptr)
|
||||
if res < 0:
|
||||
raise
|
||||
return int(res)
|
||||
|
||||
isl.isl_set_list_alloc.restype = c_void_p
|
||||
isl.isl_set_list_alloc.argtypes = [Context, c_int]
|
||||
isl.isl_set_list_from_set.restype = c_void_p
|
||||
isl.isl_set_list_from_set.argtypes = [c_void_p]
|
||||
isl.isl_set_list_read_from_str.restype = c_void_p
|
||||
isl.isl_set_list_read_from_str.argtypes = [Context, c_char_p]
|
||||
isl.isl_set_list_add.restype = c_void_p
|
||||
isl.isl_set_list_add.argtypes = [c_void_p, c_void_p]
|
||||
isl.isl_set_list_get_at.restype = c_void_p
|
||||
isl.isl_set_list_get_at.argtypes = [c_void_p, c_int]
|
||||
isl.isl_set_list_clear.restype = c_void_p
|
||||
isl.isl_set_list_clear.argtypes = [c_void_p]
|
||||
isl.isl_set_list_concat.restype = c_void_p
|
||||
isl.isl_set_list_concat.argtypes = [c_void_p, c_void_p]
|
||||
isl.isl_set_list_drop.restype = c_void_p
|
||||
isl.isl_set_list_drop.argtypes = [c_void_p, c_int, c_int]
|
||||
isl.isl_set_list_foreach.argtypes = [c_void_p, c_void_p, c_void_p]
|
||||
isl.isl_set_list_insert.restype = c_void_p
|
||||
isl.isl_set_list_insert.argtypes = [c_void_p, c_int, c_void_p]
|
||||
isl.isl_set_list_size.argtypes = [c_void_p]
|
||||
isl.isl_set_list_copy.restype = c_void_p
|
||||
isl.isl_set_list_copy.argtypes = [c_void_p]
|
||||
isl.isl_set_list_free.restype = c_void_p
|
||||
isl.isl_set_list_free.argtypes = [c_void_p]
|
||||
isl.isl_set_list_to_str.restype = POINTER(c_char)
|
||||
isl.isl_set_list_to_str.argtypes = [c_void_p]
|
||||
|
||||
class space(object):
|
||||
def __init__(self, *args, **keywords):
|
||||
if "ptr" in keywords:
|
||||
|
2
polly/lib/External/isl/isl_list_read_templ.c
vendored
2
polly/lib/External/isl/isl_list_read_templ.c
vendored
@ -29,6 +29,8 @@ static __isl_give LIST(EL) *FN(isl_stream_read,LIST(EL_BASE))(isl_stream *s)
|
||||
return NULL;
|
||||
if (isl_stream_eat(s, '(') < 0)
|
||||
return FN(LIST(EL),free)(list);
|
||||
if (isl_stream_eat_if_available(s, ')'))
|
||||
return list;
|
||||
do {
|
||||
EL *el;
|
||||
|
||||
|
1
polly/lib/External/isl/isl_set_list.c
vendored
1
polly/lib/External/isl/isl_set_list.c
vendored
@ -25,6 +25,7 @@
|
||||
#define EL_BASE set
|
||||
|
||||
#include <isl_list_templ.c>
|
||||
#include <isl_list_read_templ.c>
|
||||
|
||||
#undef EL_BASE
|
||||
#define EL_BASE union_set
|
||||
|
Loading…
Reference in New Issue
Block a user