This repository was archived by the owner on Apr 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ bool MappedScop::detectReductions(detail::ScheduleTree* tree) {
239
239
if (!inits.is_empty ()) {
240
240
orderBefore (scop_->scheduleRoot (), tree, inits);
241
241
}
242
- reductionBandUpdates_.emplace (tree, Reduction (updateIds, reductionDim ));
242
+ reductionBandUpdates_.emplace (tree, Reduction (updateIds));
243
243
return true ;
244
244
}
245
245
@@ -261,11 +261,9 @@ isl::multi_union_pw_aff MappedScop::reductionMapSchedule(
261
261
// mapped to threads.
262
262
auto reductionSchedule = reductionBand->mupa_ ;
263
263
auto nMember = reductionBand->nMember ();
264
- auto reductionDim = reductionBandUpdates_.at (st).reductionDim ;
265
- auto nMappedThreads =
266
- std::min (numThreads.view .size (), reductionBand->nOuterCoincident () + 1 );
264
+ auto reductionDim = reductionBand->nOuterCoincident ();
265
+ auto nMappedThreads = std::min (numThreads.view .size (), reductionDim + 1 );
267
266
CHECK_GE (nMember, reductionDim);
268
- CHECK_GE (reductionDim + 1 , nMappedThreads);
269
267
reductionSchedule = reductionSchedule.drop_dims (
270
268
isl::dim_type::set, reductionDim + 1 , nMember - (reductionDim + 1 ));
271
269
reductionSchedule = reductionSchedule.drop_dims (
Original file line number Diff line number Diff line change @@ -187,14 +187,11 @@ class MappedScop {
187
187
// Information about a detected reduction that can potentially
188
188
// be mapped to a library call.
189
189
struct Reduction {
190
- Reduction (std::vector<isl::id> ids, size_t index)
191
- : ids(ids), separated(false ), reductionDim(index) {}
190
+ Reduction (std::vector<isl::id> ids) : ids(ids), separated(false ) {}
192
191
// The statement identifiers of the reduction update statements.
193
192
std::vector<isl::id> ids;
194
193
// Has the reduction been separated out as a full block?
195
194
bool separated;
196
- // Index of the band member in which the reduction was detected.
197
- size_t reductionDim;
198
195
};
199
196
// Map isolated innermost reduction band members to information
200
197
// about the detected reduction.
You can’t perform that action at this time.
0 commit comments