org.knowceans.topics.cgen
Class BerndParallelFor

java.lang.Object
  extended by org.knowceans.topics.cgen.BerndParallelFor

public class BerndParallelFor
extends java.lang.Object


Nested Class Summary
static interface BerndParallelFor.IntLoopCode
           
static class BerndParallelFor.Method
           
 
Field Summary
 BerndParallelFor.Method method
           
 
Constructor Summary
BerndParallelFor(BerndParallelFor.Method method)
           
 
Method Summary
 void execute(int threadCount, int from, int to, int step, BerndParallelFor.IntLoopCode code)
          execute a parallel loop function is thread-safe
static void main(java.lang.String[] args)
           
 void shutdown()
          shut down the thread pool after final usage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

method

public BerndParallelFor.Method method
Constructor Detail

BerndParallelFor

public BerndParallelFor(BerndParallelFor.Method method)
Method Detail

execute

public void execute(int threadCount,
                    int from,
                    int to,
                    int step,
                    BerndParallelFor.IntLoopCode code)
             throws java.lang.InterruptedException
execute a parallel loop function is thread-safe

Throws:
java.lang.InterruptedException

shutdown

public void shutdown()
shut down the thread pool after final usage


main

public static void main(java.lang.String[] args)
                 throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException