@@ -72,7 +72,7 @@ void validate(const detail::ScheduleTree* root) {
7272 root);
7373}
7474
75- bool anyNonCoincidentMember (const detail::ScheduleTreeElemBand * band) {
75+ bool anyNonCoincidentMember (const detail::ScheduleTreeBand * band) {
7676 return band->nOuterCoincident () < band->nMember ();
7777}
7878
@@ -140,7 +140,7 @@ detail::ScheduleTree* MappedScop::map(
140140detail::ScheduleTree* MappedScop::mapBlocksForward (
141141 detail::ScheduleTree* band,
142142 size_t nToMap) {
143- auto bandNode = band->elemAs <detail::ScheduleTreeElemBand >();
143+ auto bandNode = band->as <detail::ScheduleTreeBand >();
144144 TC_CHECK (bandNode) << " expected a band, got " << *band;
145145
146146 auto list = bandNode->mupa_ .get_union_pw_aff_list ();
@@ -155,7 +155,7 @@ void MappedScop::mapToBlocksAndScaleBand(
155155 std::vector<size_t > tileSizes) {
156156 using namespace tc ::polyhedral::detail;
157157
158- auto bandNode = band->elemAs <ScheduleTreeElemBand >();
158+ auto bandNode = band->as <ScheduleTreeBand >();
159159 TC_CHECK (bandNode->permutable_ ) << " cannot map non-permutable band to blocks" ;
160160
161161 auto nBlocksToMap = bandNode->nOuterCoincident ();
@@ -235,7 +235,7 @@ bool MappedScop::detectReductions(detail::ScheduleTree* tree) {
235235 for (auto c : tree->children ()) {
236236 found |= detectReductions (c);
237237 }
238- auto band = tree->elemAs <detail::ScheduleTreeElemBand >();
238+ auto band = tree->as <detail::ScheduleTreeBand >();
239239 // Nested reductions are not currently supported.
240240 if (!band || found) {
241241 return found;
@@ -296,7 +296,7 @@ bool MappedScop::needReductionSeparation(const detail::ScheduleTree* st) {
296296isl::multi_union_pw_aff MappedScop::reductionMapSchedule (
297297 const detail::ScheduleTree* st) {
298298 TC_CHECK (reductionBandUpdates_.count (st) == 1 );
299- auto reductionBand = st->elemAs <detail::ScheduleTreeElemBand >();
299+ auto reductionBand = st->as <detail::ScheduleTreeBand >();
300300 TC_CHECK (reductionBand);
301301
302302 auto nMember = reductionBand->nMember ();
@@ -359,7 +359,7 @@ detail::ScheduleTree* MappedScop::separateReduction(detail::ScheduleTree* st) {
359359
360360detail::ScheduleTree* MappedScop::mapThreadsBackward (
361361 detail::ScheduleTree* band) {
362- auto bandNode = band->elemAs <detail::ScheduleTreeElemBand >();
362+ auto bandNode = band->as <detail::ScheduleTreeBand >();
363363 TC_CHECK (bandNode);
364364 auto nMember = bandNode->nMember ();
365365 auto nToMap = std::min (nMember, numThreads.view .size ());
@@ -376,7 +376,7 @@ detail::ScheduleTree* MappedScop::mapThreadsBackward(
376376size_t MappedScop::mapToThreads (detail::ScheduleTree* band) {
377377 using namespace tc ::polyhedral::detail;
378378
379- auto bandNode = band->elemAs <ScheduleTreeElemBand >();
379+ auto bandNode = band->as <ScheduleTreeBand >();
380380 // Cannot map non-permutable bands.
381381 if (!bandNode->permutable_ ) {
382382 return 0 ;
@@ -417,7 +417,7 @@ size_t MappedScop::mapToThreads(detail::ScheduleTree* band) {
417417 reductionBandUpdates_.erase (band);
418418 }
419419 band = child;
420- bandNode = band->elemAs <ScheduleTreeElemBand >();
420+ bandNode = band->as <ScheduleTreeBand >();
421421 }
422422
423423 if (nMappedThreads < bandNode->nMember ()) {
@@ -450,11 +450,11 @@ bool hasOuterSequentialMember(
450450 auto ancestors = st->ancestors (root);
451451 std::reverse (ancestors.begin (), ancestors.end ());
452452 for (auto a : ancestors) {
453- auto band = a->elemAs <detail::ScheduleTreeElemBand >();
453+ auto band = a->as <detail::ScheduleTreeBand >();
454454 if (band && band->nMember () > band->nOuterCoincident ()) {
455455 return true ;
456456 }
457- if (a->elemAs <detail::ScheduleTreeElemSequence >()) {
457+ if (a->as <detail::ScheduleTreeSequence >()) {
458458 return false ;
459459 }
460460 }
@@ -542,7 +542,7 @@ Scop::SyncLevel MappedScop::findBestSync(
542542
543543 TC_CHECK_LE (1u , scop_->scheduleRoot ()->children ().size ());
544544 auto contextSt = scop_->scheduleRoot ()->children ()[0 ];
545- auto contextElem = contextSt->elemAs <detail::ScheduleTreeElemContext >();
545+ auto contextElem = contextSt->as <detail::ScheduleTreeContext >();
546546 TC_CHECK (nullptr != contextElem);
547547 dependences = dependences.intersect_params (contextElem->context_ );
548548
@@ -705,7 +705,7 @@ std::vector<std::pair<int, int>> MappedScop::findBestSyncConfigInSeq(
705705}
706706
707707void MappedScop::insertBestSyncInSeq (detail::ScheduleTree* seq) {
708- TC_CHECK (seq->elemAs <detail::ScheduleTreeElemSequence >());
708+ TC_CHECK (seq->as <detail::ScheduleTreeSequence >());
709709
710710 auto children = seq->children ();
711711 auto nChildren = children.size ();
@@ -779,7 +779,7 @@ size_t MappedScop::mapInnermostBandsToThreads(detail::ScheduleTree* st) {
779779 }
780780 auto n = nChildren > 0 ? *std::max_element (nInner.begin (), nInner.end ()) : 0 ;
781781 if (nChildren > 1 ) {
782- auto needSync = st->elemAs <detail::ScheduleTreeElemSequence >() && n > 0 ;
782+ auto needSync = st->as <detail::ScheduleTreeSequence >() && n > 0 ;
783783 if (n > 0 ) {
784784 for (size_t i = 0 ; i < nChildren; ++i) {
785785 fixThreadsBelow (*this , children[i], nInner[i]);
@@ -790,7 +790,7 @@ size_t MappedScop::mapInnermostBandsToThreads(detail::ScheduleTree* st) {
790790 }
791791 }
792792
793- if (auto band = st->elemAs <detail::ScheduleTreeElemBand >()) {
793+ if (auto band = st->as <detail::ScheduleTreeBand >()) {
794794 if (n == 0 ) {
795795 // If children were not mapped to threads, the current band can be mapped.
796796 // First, map the coincidence and reduction dimension to threads.
@@ -1040,7 +1040,7 @@ std::unique_ptr<MappedScop> MappedScop::makeWithOuterBlockInnerThreadStrategy(
10401040 sharedMemorySize -= reductionMemoryRequirement;
10411041 }
10421042
1043- auto band = outerBand->elemAs <ScheduleTreeElemBand >();
1043+ auto band = outerBand->as <ScheduleTreeBand >();
10441044 LOG_IF (WARNING, FLAGS_debug_tc_mapper && band->nMember () == 0 )
10451045 << " Aborting memory promotion because outer band has 0 members (NYI)" ;
10461046 if (band->nMember () > 0 && sharedMemorySize > 0 ) {
0 commit comments