edu.jhu.cs.cisst.algorithms.optimize.fmg.parallel
Class ParallelRunner

java.lang.Object
  extended by java.lang.Thread
      extended by edu.jhu.cs.cisst.algorithms.optimize.fmg.parallel.ParallelRunner
All Implemented Interfaces:
java.lang.Runnable

public class ParallelRunner
extends java.lang.Thread

Customized implementation of class Thread that works closely with class Parallelizer and actually calls the parallel algorithm in each thread.

Author:
Gerald Loeffler (Gerald.Loeffler@univie.ac.at)

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ParallelRunner(Parallelizer p, int num)
          create a new thread working with the given Parallelizer and having the given thread number.
 
Method Summary
 void run()
          the Threads main method.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParallelRunner

public ParallelRunner(Parallelizer p,
                      int num)
create a new thread working with the given Parallelizer and having the given thread number.

Parameters:
p - the parallelizer to work with
num - the number of this thread (0 <= num < total number of threads)
Method Detail

run

public void run()
the Threads main method.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread