ini.trakem2.parallel
Class Process

java.lang.Object
  extended by ini.trakem2.parallel.Process

public class Process
extends java.lang.Object

For all methods, if the number of processors given as argument is zero or larger than the maximum available plus 2, the number of processors will be adjusted to fall within the range [1, max+2].


Field Summary
static int NUM_PROCESSORS
           
 
Constructor Summary
Process()
           
 
Method Summary
static
<I,O> void
progressive(java.lang.Iterable<I> inputs, TaskFactory<I,O> generator)
          Takes a Collection of inputs, applies a function to each created by the generator.
static
<I,O> void
progressive(java.lang.Iterable<I> inputs, TaskFactory<I,O> generator, java.util.Collection<O> outputs)
          Takes a Collection of inputs, applies a function to each created by the generator, and places their output in outputs in the same order as each input was retrieved from inputs.
static
<I,O> void
progressive(java.lang.Iterable<I> inputs, TaskFactory<I,O> generator, java.util.Collection<O> outputs, int n_proc)
          Takes a Collection of inputs, applies a function to each created by the generator, and places their output in outputs in the same order as each input was retrieved from inputs.
static
<I,O> void
progressive(java.lang.Iterable<I> inputs, TaskFactory<I,O> generator, int n_proc)
           
static
<I,O> void
unbound(java.lang.Iterable<I> inputs, TaskFactory<I,O> generator)
           
static
<I,O> void
unbound(java.lang.Iterable<I> inputs, TaskFactory<I,O> generator, java.util.Collection<O> outputs, int n_proc)
          Takes a Collection of inputs, applies a function to each created by the generator, and places their output in outputs in the same order as each input was retrieved from inputs; will not wait for executing tasks to finish before creating and submitting new tasks.
static
<I,O> void
unbound(java.lang.Iterable<I> inputs, TaskFactory<I,O> generator, int n_proc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NUM_PROCESSORS

public static final int NUM_PROCESSORS
Constructor Detail

Process

public Process()
Method Detail

progressive

public static final <I,O> void progressive(java.lang.Iterable<I> inputs,
                                           TaskFactory<I,O> generator,
                                           java.util.Collection<O> outputs)
                              throws java.lang.Exception
Takes a Collection of inputs, applies a function to each created by the generator, and places their output in outputs in the same order as each input was retrieved from inputs.

Throws:
java.lang.Exception

progressive

public static final <I,O> void progressive(java.lang.Iterable<I> inputs,
                                           TaskFactory<I,O> generator,
                                           java.util.Collection<O> outputs,
                                           int n_proc)
                              throws java.lang.Exception
Takes a Collection of inputs, applies a function to each created by the generator, and places their output in outputs in the same order as each input was retrieved from inputs.

Throws:
java.lang.Exception

unbound

public static final <I,O> void unbound(java.lang.Iterable<I> inputs,
                                       TaskFactory<I,O> generator,
                                       java.util.Collection<O> outputs,
                                       int n_proc)
                          throws java.lang.Exception
Takes a Collection of inputs, applies a function to each created by the generator, and places their output in outputs in the same order as each input was retrieved from inputs; will not wait for executing tasks to finish before creating and submitting new tasks.

Throws:
java.lang.Exception

progressive

public static final <I,O> void progressive(java.lang.Iterable<I> inputs,
                                           TaskFactory<I,O> generator)
                              throws java.lang.Exception
Takes a Collection of inputs, applies a function to each created by the generator.

Throws:
java.lang.Exception

progressive

public static final <I,O> void progressive(java.lang.Iterable<I> inputs,
                                           TaskFactory<I,O> generator,
                                           int n_proc)
                              throws java.lang.Exception
Throws:
java.lang.Exception

unbound

public static final <I,O> void unbound(java.lang.Iterable<I> inputs,
                                       TaskFactory<I,O> generator)
                          throws java.lang.Exception
Throws:
java.lang.Exception

unbound

public static final <I,O> void unbound(java.lang.Iterable<I> inputs,
                                       TaskFactory<I,O> generator,
                                       int n_proc)
                          throws java.lang.Exception
Throws:
java.lang.Exception