From 9b45cc2e843ec3062224bb5a4873ea97ce3faf07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Oberhuber?= <oberhuber.tomas@gmail.com>
Date: Mon, 30 Dec 2019 17:10:43 +0100
Subject: [PATCH] Ignoring flag compute in SlicedEllpack -> it makes
 SlicedEllpack faster.

---
 src/TNL/Containers/Segments/SlicedEllpack.hpp     | 4 ++--
 src/TNL/Containers/Segments/SlicedEllpackView.hpp | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/TNL/Containers/Segments/SlicedEllpack.hpp b/src/TNL/Containers/Segments/SlicedEllpack.hpp
index ecd32abb25..b58b6a954f 100644
--- a/src/TNL/Containers/Segments/SlicedEllpack.hpp
+++ b/src/TNL/Containers/Segments/SlicedEllpack.hpp
@@ -354,7 +354,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red
          const IndexType end = begin + segmentSize;
          RealType aux( zero );
          bool compute( true );
-         for( IndexType globalIdx = begin; globalIdx< end && compute; globalIdx++  )
+         for( IndexType globalIdx = begin; globalIdx< end; globalIdx++  )
             reduction( aux, fetch( segmentIdx, globalIdx, compute, args... ) );
          keeper( segmentIdx, aux );
       };
@@ -370,7 +370,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red
          const IndexType end = sliceOffsets_view[ sliceIdx + 1 ];
          RealType aux( zero );
          bool compute( true );
-         for( IndexType globalIdx = begin; globalIdx < end && compute; globalIdx += SliceSize  )
+         for( IndexType globalIdx = begin; globalIdx < end; globalIdx += SliceSize  )
             reduction( aux, fetch( segmentIdx, globalIdx, compute, args... ) );
          keeper( segmentIdx, aux );
       };
diff --git a/src/TNL/Containers/Segments/SlicedEllpackView.hpp b/src/TNL/Containers/Segments/SlicedEllpackView.hpp
index 41b49ed150..82570664fa 100644
--- a/src/TNL/Containers/Segments/SlicedEllpackView.hpp
+++ b/src/TNL/Containers/Segments/SlicedEllpackView.hpp
@@ -306,7 +306,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red
          const IndexType end = begin + segmentSize;
          RealType aux( zero );
          bool compute( true );
-         for( IndexType globalIdx = begin; globalIdx< end && compute; globalIdx++  )
+         for( IndexType globalIdx = begin; globalIdx< end; globalIdx++  )
             reduction( aux, fetch( segmentIdx, globalIdx, compute, args... ) );
          keeper( segmentIdx, aux );
       };
@@ -322,7 +322,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red
          const IndexType end = sliceOffsets_view[ sliceIdx + 1 ];
          RealType aux( zero );
          bool compute( true );
-         for( IndexType globalIdx = begin; globalIdx < end && compute; globalIdx += SliceSize  )
+         for( IndexType globalIdx = begin; globalIdx < end; globalIdx += SliceSize  )
             reduction( aux, fetch( segmentIdx, globalIdx, compute, args... ) );
          keeper( segmentIdx, aux );
       };
-- 
GitLab