return OS;
}
+/// Enumerate all isl_basic_maps of an isl_map.
+///
+/// This basically wraps isl_map_foreach_basic_map() and allows to call back
+/// C++11 closures.
+void foreachElt(NonowningIslPtr<isl_map> Map,
+ const std::function<void(IslPtr<isl_basic_map>)> &F);
+
+/// Enumerate all isl_basic_sets of an isl_set.
+///
+/// This basically wraps isl_set_foreach_basic_set() and allows to call back
+/// C++11 closures.
+void foreachElt(NonowningIslPtr<isl_set> Set,
+ const std::function<void(IslPtr<isl_basic_set>)> &F);
+
/// Enumerate all isl_maps of an isl_union_map.
///
/// This basically wraps isl_union_map_foreach_map() and allows to call back
void foreachElt(NonowningIslPtr<isl_union_map> UMap,
const std::function<void(IslPtr<isl_map> Map)> &F);
+/// Enumerate all isl_sets of an isl_union_set.
+///
+/// This basically wraps isl_union_set_foreach_set() and allows to call back
+/// C++11 closures.
+void foreachElt(NonowningIslPtr<isl_union_set> USet,
+ const std::function<void(IslPtr<isl_set> Set)> &F);
+
/// Enumerate all isl_pw_aff of an isl_union_pw_aff.
///
/// This basically wraps isl_union_pw_aff(), but also allows to call back C++11
DEFINE_ISLPTR(union_pw_multi_aff)
}
+void polly::foreachElt(NonowningIslPtr<isl_map> Map,
+ const std::function<void(IslPtr<isl_basic_map>)> &F) {
+ isl_map_foreach_basic_map(
+ Map.keep(),
+ [](__isl_take isl_basic_map *BMap, void *User) -> isl_stat {
+ auto &F =
+ *static_cast<const std::function<void(IslPtr<isl_basic_map>)> *>(
+ User);
+ F(give(BMap));
+ return isl_stat_ok;
+ },
+ const_cast<void *>(static_cast<const void *>(&F)));
+}
+
+void polly::foreachElt(NonowningIslPtr<isl_set> Set,
+ const std::function<void(IslPtr<isl_basic_set>)> &F) {
+ isl_set_foreach_basic_set(
+ Set.keep(),
+ [](__isl_take isl_basic_set *BSet, void *User) -> isl_stat {
+ auto &F =
+ *static_cast<const std::function<void(IslPtr<isl_basic_set>)> *>(
+ User);
+ F(give(BSet));
+ return isl_stat_ok;
+ },
+ const_cast<void *>(static_cast<const void *>(&F)));
+}
+
void polly::foreachElt(NonowningIslPtr<isl_union_map> UMap,
const std::function<void(IslPtr<isl_map> Map)> &F) {
isl_union_map_foreach_map(
const_cast<void *>(static_cast<const void *>(&F)));
}
+void polly::foreachElt(NonowningIslPtr<isl_union_set> USet,
+ const std::function<void(IslPtr<isl_set> Set)> &F) {
+ isl_union_set_foreach_set(
+ USet.keep(),
+ [](__isl_take isl_set *Set, void *User) -> isl_stat {
+ auto &F =
+ *static_cast<const std::function<void(IslPtr<isl_set>)> *>(User);
+ F(give(Set));
+ return isl_stat_ok;
+ },
+ const_cast<void *>(static_cast<const void *>(&F)));
+}
+
void polly::foreachElt(NonowningIslPtr<isl_union_pw_aff> UPwAff,
const std::function<void(IslPtr<isl_pw_aff>)> &F) {
isl_union_pw_aff_foreach_pw_aff(