public class ParallelizeOverBlocks extends Object
Constructor and Description |
---|
ParallelizeOverBlocks() |
Modifier and Type | Method and Description |
---|---|
static <T> Function<T,Void> |
ofConsumer(Consumer<T> consumer)
|
static <T> List<Future<List<T>>> |
parallelize(Function<Interval,T> func,
Interval interval,
int[] blockSize,
ExecutorService es,
int numTasks)
Submit blocked tasks and wait for execution.
|
static <T> List<Future<List<T>>> |
parallelize(Function<Interval,T> func,
List<Interval> blocks,
ExecutorService es,
int numTasks)
Submit blocked tasks and wait for execution.
|
static <T> List<Future<List<T>>> |
parallelize(Function<Interval,T> func,
long[] min,
long[] max,
int[] blockSize,
ExecutorService es,
int numTasks)
Submit blocked tasks and wait for execution.
|
static <T> List<T> |
parallelizeAndWait(Function<Interval,T> func,
Interval interval,
int[] blockSize,
ExecutorService es,
int numTasks)
Submit blocked tasks and wait for execution.
|
static <T> List<T> |
parallelizeAndWait(Function<Interval,T> func,
List<Interval> blocks,
ExecutorService es,
int numTasks)
Submit blocked tasks and wait for execution.
|
static <T> List<T> |
parallelizeAndWait(Function<Interval,T> func,
long[] min,
long[] max,
int[] blockSize,
ExecutorService es,
int numTasks)
Submit blocked tasks and wait for execution.
|
public static <T> List<T> parallelizeAndWait(Function<Interval,T> func, Interval interval, int[] blockSize, ExecutorService es, int numTasks) throws InterruptedException, ExecutionException
func
- Function
to be applied to each block as specified by
first parameter Interval
.interval
- blockSize
- es
- numTasks
- List
of results of computation. Note that for
computations that return void, this should be a list of
Void
.InterruptedException
ExecutionException
public static <T> List<Future<List<T>>> parallelize(Function<Interval,T> func, Interval interval, int[] blockSize, ExecutorService es, int numTasks)
public static <T> List<T> parallelizeAndWait(Function<Interval,T> func, long[] min, long[] max, int[] blockSize, ExecutorService es, int numTasks) throws InterruptedException, ExecutionException
func
- Function
to be applied to each block as specified by
first parameter Interval
.min
- max
- blockSize
- es
- numTasks
- List
of results of computation. Note that for
computations that return void, this should be a list of
Void
.InterruptedException
ExecutionException
public static <T> List<Future<List<T>>> parallelize(Function<Interval,T> func, long[] min, long[] max, int[] blockSize, ExecutorService es, int numTasks)
public static <T> List<T> parallelizeAndWait(Function<Interval,T> func, List<Interval> blocks, ExecutorService es, int numTasks) throws InterruptedException, ExecutionException
func
- Function
to be applied to each block as specified by
first parameter Interval
.blocks
- es
- numTasks
- List
of results of computation. Note that for
computations that return void, this should be a list of
Void
.InterruptedException
ExecutionException
public static <T> List<Future<List<T>>> parallelize(Function<Interval,T> func, List<Interval> blocks, ExecutorService es, int numTasks)
Copyright © 2015–2022 ImgLib2. All rights reserved.