Skip to content

Commit 54a18da

Browse files
committed
Reuse Intervals.numElements
1 parent 5b07795 commit 54a18da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/imglib2/algorithm/convolution/LineConvolution.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public static void forEachIntervalElementInParallel( ExecutorService service, in
9999
{
100100
long[] min = Intervals.minAsLongArray( interval );
101101
long[] dim = Intervals.dimensionsAsLongArray( interval );
102-
long size = LongStream.of( dim ).reduce( 1, ( a, b ) -> a * b );
102+
long size = Intervals.numElements( dim );
103103
final long endIndex = size;
104104
final long taskSize = ( size + numTasks - 1 ) / numTasks; // round up
105105
final ArrayList< Callable< Void > > callables = new ArrayList<>();

0 commit comments

Comments
 (0)