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 +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -423,6 +423,8 @@ detail::ScheduleTree* setPermutable(detail::ScheduleTree* tree) {
423
423
return tree;
424
424
}
425
425
426
+ } // namespace
427
+
426
428
/*
427
429
* Return the outermost band in the schedule tree with the given root.
428
430
* If there is no single outermost band, then insert a (permutable)
@@ -431,7 +433,8 @@ detail::ScheduleTree* setPermutable(detail::ScheduleTree* tree) {
431
433
* insert the band in the leaf. If branching is encountered, then
432
434
* insert the band above the branching.
433
435
*/
434
- detail::ScheduleTree* obtainOuterBand (detail::ScheduleTree* root) {
436
+ detail::ScheduleTree* Scop::obtainOuterBand () {
437
+ auto root = scheduleRoot ();
435
438
auto tree = root;
436
439
while (!tree->elemAs <ScheduleTreeElemBand>()) {
437
440
auto n = tree->numChildren ();
@@ -449,11 +452,10 @@ detail::ScheduleTree* obtainOuterBand(detail::ScheduleTree* root) {
449
452
}
450
453
return tree;
451
454
}
452
- } // namespace
453
455
454
456
detail::ScheduleTree* Scop::tileOuterBand (const TilingView& tileSizes) {
455
457
using namespace tc ::polyhedral::detail;
456
- auto band = obtainOuterBand (scheduleRoot () );
458
+ auto band = obtainOuterBand ();
457
459
auto bandNode = band->elemAs <ScheduleTreeElemBand>();
458
460
std::vector<size_t > sizes = tileSizes.extractVector ();
459
461
if (bandNode->nMember () < sizes.size ()) {
Original file line number Diff line number Diff line change @@ -394,6 +394,10 @@ struct Scop {
394
394
static std::unique_ptr<Scop> makeScheduled (
395
395
const Scop& scop,
396
396
const SchedulerOptionsView& schedulerOptions);
397
+ // Return the outermost band in the schedule tree with the given root.
398
+ // If there is no single outermost band, then insert a (permutable)
399
+ // zero-dimensional band and return that.
400
+ detail::ScheduleTree* obtainOuterBand ();
397
401
// Tile the outermost band.
398
402
// Splits the band into tile loop band and point loop band where point loops
399
403
// have fixed trip counts specified in "tiling", and returns a pointer to the
You can’t perform that action at this time.
0 commit comments