Skip to content
Snippets Groups Projects
Commit 9b45cc2e authored by Tomáš Oberhuber's avatar Tomáš Oberhuber Committed by Tomáš Oberhuber
Browse files

Ignoring flag compute in SlicedEllpack -> it makes SlicedEllpack faster.

parent e07a0168
No related branches found
No related tags found
1 merge request!48Segments
...@@ -354,7 +354,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red ...@@ -354,7 +354,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red
const IndexType end = begin + segmentSize; const IndexType end = begin + segmentSize;
RealType aux( zero ); RealType aux( zero );
bool compute( true ); 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... ) ); reduction( aux, fetch( segmentIdx, globalIdx, compute, args... ) );
keeper( segmentIdx, aux ); keeper( segmentIdx, aux );
}; };
...@@ -370,7 +370,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red ...@@ -370,7 +370,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red
const IndexType end = sliceOffsets_view[ sliceIdx + 1 ]; const IndexType end = sliceOffsets_view[ sliceIdx + 1 ];
RealType aux( zero ); RealType aux( zero );
bool compute( true ); 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... ) ); reduction( aux, fetch( segmentIdx, globalIdx, compute, args... ) );
keeper( segmentIdx, aux ); keeper( segmentIdx, aux );
}; };
......
...@@ -306,7 +306,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red ...@@ -306,7 +306,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red
const IndexType end = begin + segmentSize; const IndexType end = begin + segmentSize;
RealType aux( zero ); RealType aux( zero );
bool compute( true ); 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... ) ); reduction( aux, fetch( segmentIdx, globalIdx, compute, args... ) );
keeper( segmentIdx, aux ); keeper( segmentIdx, aux );
}; };
...@@ -322,7 +322,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red ...@@ -322,7 +322,7 @@ segmentsReduction( IndexType first, IndexType last, Fetch& fetch, Reduction& red
const IndexType end = sliceOffsets_view[ sliceIdx + 1 ]; const IndexType end = sliceOffsets_view[ sliceIdx + 1 ];
RealType aux( zero ); RealType aux( zero );
bool compute( true ); 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... ) ); reduction( aux, fetch( segmentIdx, globalIdx, compute, args... ) );
keeper( segmentIdx, aux ); keeper( segmentIdx, aux );
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment