|
Nengo.ca | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.nengo.util.impl.NodeThreadPool
public class NodeThreadPool
A pool of threads for running nodes in. All interaction with the threads is done through this class.
Field Summary | |
---|---|
protected static int |
defaultNumJavaThreads
|
protected static int |
maxNumJavaThreads
|
protected double |
myAverageTimePerStep
|
protected static boolean |
myCollectTimings
|
protected float |
myEndTime
|
protected java.lang.Object |
myLock
|
protected Node[] |
myNodes
|
protected static int |
myNumJavaThreads
|
protected int |
myNumSteps
|
protected int |
myNumThreads
|
protected Projection[] |
myProjections
|
protected long |
myRunStartTime
|
protected float |
myStartTime
|
protected ThreadTask[] |
myTasks
|
protected NodeThread[] |
myThreads
|
protected int |
numThreadsComplete
|
protected int |
numThreadsWaiting
|
protected boolean |
runFinished
|
protected boolean |
threadsRunning
|
Constructor Summary | |
---|---|
protected |
NodeThreadPool()
|
|
NodeThreadPool(Network network,
java.util.List<ThreadTask> threadTasks)
|
Method Summary | |
---|---|
static java.util.List<Node> |
collectNodes(Node[] startingNodes,
boolean breakDownNetworkArrays)
Return all the nodes in the network except subnetworks. |
static java.util.List<Projection> |
collectProjections(Node[] startingNodes,
Projection[] startingProjections)
Return all the projections in the network. |
static java.util.List<ThreadTask> |
collectTasks(Node[] startingNodes)
Return all the tasks in the network. |
float |
getEndTime()
|
static int |
getMaxNumJavaThreads()
|
static int |
getNumJavaThreads()
|
boolean |
getRunFinished()
|
float |
getStartTime()
|
protected void |
initialize(Network network,
java.util.List<ThreadTask> threadTasks)
1. |
static boolean |
isCollectingTimings()
|
static boolean |
isMultithreading()
|
void |
kill()
Kill the threads in the pool by interrupting them. |
static void |
setCollectTimings(boolean collectTimings)
|
static void |
setNumJavaThreads(int value)
|
void |
step(float startTime,
float endTime)
Tell the threads in the current thread pool to take a step. |
void |
threadFinished()
Called by the threads in this pool to signal that they are done a phase. |
void |
threadWait()
Called by the threads in this node pool. |
static void |
turnOffMultithreading()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int maxNumJavaThreads
protected static final int defaultNumJavaThreads
protected static int myNumJavaThreads
protected int myNumThreads
protected NodeThread[] myThreads
protected java.lang.Object myLock
protected Node[] myNodes
protected Projection[] myProjections
protected ThreadTask[] myTasks
protected volatile int numThreadsComplete
protected volatile int numThreadsWaiting
protected volatile boolean threadsRunning
protected volatile boolean runFinished
protected float myStartTime
protected float myEndTime
protected static boolean myCollectTimings
protected long myRunStartTime
protected double myAverageTimePerStep
protected int myNumSteps
Constructor Detail |
---|
protected NodeThreadPool()
public NodeThreadPool(Network network, java.util.List<ThreadTask> threadTasks)
Method Detail |
---|
public static int getNumJavaThreads()
public static void setNumJavaThreads(int value)
public static int getMaxNumJavaThreads()
public static boolean isMultithreading()
public static void turnOffMultithreading()
public static boolean isCollectingTimings()
public static void setCollectTimings(boolean collectTimings)
public float getStartTime()
public float getEndTime()
public boolean getRunFinished()
protected void initialize(Network network, java.util.List<ThreadTask> threadTasks)
public void step(float startTime, float endTime)
public void threadWait() throws java.lang.InterruptedException
java.lang.InterruptedException
public void threadFinished() throws java.lang.InterruptedException
java.lang.InterruptedException
public void kill()
public static java.util.List<Node> collectNodes(Node[] startingNodes, boolean breakDownNetworkArrays)
public static java.util.List<Projection> collectProjections(Node[] startingNodes, Projection[] startingProjections)
public static java.util.List<ThreadTask> collectTasks(Node[] startingNodes)
|
Nengo.ca | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |