20 #include <isl/interface/isl.h>
102 struct MV : std::vector<isl::val> {
103 explicit MV(isl::multi_val mv_) :
mv(mv_) {
104 this->reserve(
mv.dim(isl::dim_type::set));
105 for (
size_t i = 0; i <
mv.dim(isl::dim_type::set); ++i) {
106 this->push_back(
mv.get_val(i));
116 struct MA : std::vector<isl::aff> {
117 explicit MA(isl::multi_aff ma_) :
ma(ma_) {
118 this->reserve(
ma.dim(isl::dim_type::set));
119 for (
size_t i = 0; i <
ma.dim(isl::dim_type::set); ++i) {
120 this->push_back(
ma.get_aff(i));
127 struct PA : std::vector<std::pair<isl::set, isl::aff>> {
128 explicit PA(isl::pw_aff pa_) :
pa(pa_) {
129 this->reserve(
pa.n_piece());
130 auto f = [&](isl::set s, isl::aff a) {
131 this->push_back(std::make_pair(s, a));
139 struct PMA : std::vector<std::pair<isl::set, isl::multi_aff>> {
140 explicit PMA(isl::pw_multi_aff pma_) :
pma(pma_) {
141 this->reserve(
pma.n_piece());
142 auto f = [&](isl::set s, isl::multi_aff ma) {
143 this->push_back(std::make_pair(s, ma));
145 pma.foreach_piece(f);
151 struct UPA : std::vector<PA> {
152 explicit UPA(isl::union_pw_aff upa_) :
upa(upa_) {
154 auto f = [&](isl::pw_aff pa) { this->push_back(
PA(pa)); };
155 upa.foreach_pw_aff(f);
158 return PA(
upa.extract_pw_aff(s));
163 struct MPA : std::vector<PA> {
164 explicit MPA(isl::multi_pw_aff mpa_) :
mpa(mpa_) {
165 this->reserve(
mpa.dim(isl::dim_type::set));
166 for (
size_t i = 0; i <
mpa.dim(isl::dim_type::set); ++i) {
167 this->push_back(
PA(
mpa.get_pw_aff(i)));
174 struct UPMA : std::vector<UPA> {
175 explicit UPMA(isl::union_pw_multi_aff upma_) :
upma(upma_) {
176 this->reserve(
upma.dim(isl::dim_type::set));
177 for (
size_t i = 0; i <
upma.dim(isl::dim_type::set); ++i) {
178 this->push_back(
UPA(
upma.get_union_pw_aff(i)));
181 std::vector<PMA>
pmas(isl::union_pw_multi_aff
upma)
const {
182 std::vector<PMA> res;
183 auto f = [&](isl::pw_multi_aff pma) { res.push_back(
PMA(pma)); };
184 upma.foreach_pw_multi_aff(f);
188 return PMA(
upma.extract_pw_multi_aff(s));
194 struct MUPA : std::vector<UPA> {
195 explicit MUPA(isl::multi_union_pw_aff mupa_) :
mupa(mupa_) {
196 this->reserve(
mupa.dim(isl::dim_type::set));
197 for (
size_t i = 0; i <
mupa.dim(isl::dim_type::set); ++i) {
198 this->push_back(
UPA(
mupa.get_union_pw_aff(i)));
202 return MPA(
mupa.extract_multi_pw_aff(s));
210 us_.foreach_set([&](isl::set s) { this->push_back(s); });
215 template <
typename T, isl::dim_type DT>
216 struct DimIds :
public std::vector<isl::id> {
218 this->reserve(s.dim(DT));
219 for (
size_t i = 0; i < s.dim(DT); ++i) {
220 this->push_back(s.get_dim_id(DT, i));
Definition: isl_mu_wrappers.h:216
Definition: isl_mu_wrappers.h:174
Definition: isl_mu_wrappers.h:163
UNION_SET(isl::union_set us_)
Definition: isl_mu_wrappers.h:209
isl::union_set us
Definition: isl_mu_wrappers.h:212
Definition: isl_mu_wrappers.h:116
PA extract(isl::space s) const
Definition: isl_mu_wrappers.h:157
isl::multi_val mv
Definition: isl_mu_wrappers.h:109
UPMA(isl::union_pw_multi_aff upma_)
Definition: isl_mu_wrappers.h:175
isl::pw_aff pa
Definition: isl_mu_wrappers.h:135
MA(isl::multi_aff ma_)
Definition: isl_mu_wrappers.h:117
Definition: isl_mu_wrappers.h:194
MPA(isl::multi_pw_aff mpa_)
Definition: isl_mu_wrappers.h:164
isl::multi_union_pw_aff mupa
Definition: isl_mu_wrappers.h:204
UPA(isl::union_pw_aff upa_)
Definition: isl_mu_wrappers.h:152
PMA(isl::pw_multi_aff pma_)
Definition: isl_mu_wrappers.h:140
Definition: isl_mu_wrappers.h:151
isl::pw_multi_aff pma
Definition: isl_mu_wrappers.h:147
Definition: isl_mu_wrappers.h:102
isl::union_pw_aff upa
Definition: isl_mu_wrappers.h:160
PMA extract(isl::space s) const
Definition: isl_mu_wrappers.h:187
Definition: isl_mu_wrappers.h:139
isl::multi_aff ma
Definition: isl_mu_wrappers.h:123
DimIds(T s)
Definition: isl_mu_wrappers.h:217
Definition: isl_mu_wrappers.h:208
isl::multi_pw_aff mpa
Definition: isl_mu_wrappers.h:170
std::vector< PMA > pmas(isl::union_pw_multi_aff upma) const
Definition: isl_mu_wrappers.h:181
PA(isl::pw_aff pa_)
Definition: isl_mu_wrappers.h:128
MUPA(isl::multi_union_pw_aff mupa_)
Definition: isl_mu_wrappers.h:195
isl::union_pw_multi_aff upma
Definition: isl_mu_wrappers.h:190
MPA extract(isl::space s) const
Definition: isl_mu_wrappers.h:201
Definition: isl_mu_wrappers.h:127
MV(isl::multi_val mv_)
Definition: isl_mu_wrappers.h:103