@@ -482,10 +482,10 @@ class Sptrsv {
482482 do {
483483 step--;
484484 const auto &localBoundsArrayU = procLocalBoundsArrayU[step];
485- const std:: size_t boundsStrSize = localBoundsArrayU.size ();
486- for (std:: size_t index = 0 ; index < boundsStrSize ; ++index ) {
487- EigenIdxType node = localBoundsArrayU[index] + 1 ;
488- const EigenIdxType lowerB = localBoundsArrayU[++index] ;
485+ const auto idxItEnd = localBoundsArrayU.cend ();
486+ for (auto idxIt = localBoundsArrayU. cbegin (); idxIt != idxItEnd ; ++idxIt ) {
487+ EigenIdxType node = (*idxIt) + 1 ;
488+ const EigenIdxType lowerB = *(++idxIt) ;
489489
490490 do {
491491 node--;
@@ -528,9 +528,10 @@ class Sptrsv {
528528 step--;
529529 const auto &localBoundsArrayU = procLocalBoundsArrayU[step];
530530 const std::size_t boundsStrSize = localBoundsArrayU.size ();
531- for (std::size_t index = 0 ; index < boundsStrSize; ++index) {
532- EigenIdxType node = localBoundsArrayU[index] + 1 ;
533- const EigenIdxType lowerB = localBoundsArrayU[++index];
531+ const auto idxItEnd = localBoundsArrayU.cend ();
532+ for (auto idxIt = localBoundsArrayU.cbegin (); idxIt != idxItEnd; ++idxIt) {
533+ EigenIdxType node = (*idxIt) + 1 ;
534+ const EigenIdxType lowerB = *(++idxIt);
534535
535536 do {
536537 node--;
@@ -755,14 +756,16 @@ class Sptrsv {
755756 do {
756757 step--;
757758 const auto &localBoundsArrayU = procLocalBoundsArrayU[step];
758- const std::size_t boundsStrSize = localBoundsArrayU.size ();
759- if (boundsStrSize > 0U ) {
759+ auto idxIt = localBoundsArrayU.cbegin ();
760+ const auto idxItEnd = localBoundsArrayU.cend ();
761+
762+ if (idxIt != idxItEnd) {
760763 barrier.Wait (proc, staleness - 1U );
761764 }
762765
763- for (std:: size_t index = 0 ; index < boundsStrSize; ++index ) {
764- EigenIdxType node = localBoundsArrayU[index] + 1 ;
765- const EigenIdxType lowerB = localBoundsArrayU[++index] ;
766+ for (; idxIt != idxItEnd; ++idxIt ) {
767+ EigenIdxType node = (*idxIt) + 1 ;
768+ const EigenIdxType lowerB = *(++idxIt) ;
766769
767770 do {
768771 node--;
0 commit comments