File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/test/java/net/imglib2/algorithm/convolution Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,12 @@ public class GaussBenchmark
4040 public void benchmarkSeparableKernelConvolution ()
4141 {
4242 double [][] halfKernels = Gauss3 .halfkernels ( new double [] { sigma , sigma , sigma } );
43- SeparableKernelConvolution .convolution ( Kernel1D .symmetric ( halfKernels ) ).process ( inImage , outImage );
43+ final int numthreads = Runtime .getRuntime ().availableProcessors ();
44+ final ExecutorService service = Executors .newFixedThreadPool ( numthreads );
45+ final Convolution < NumericType < ? > > convolution = SeparableKernelConvolution .convolution ( Kernel1D .symmetric ( halfKernels ) );
46+ convolution .setExecutor ( service );
47+ convolution .process ( inImage , outImage );
48+ service .shutdown ();
4449 }
4550
4651 @ Benchmark
You can’t perform that action at this time.
0 commit comments