Nengo.ca

ca.nengo.util.impl
Class NodeThread

java.lang.Object
  extended by java.lang.Thread
      extended by ca.nengo.util.impl.NodeThread
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
GPUThread

public class NodeThread
extends java.lang.Thread

A thread for running projections, nodes and tasks in. Projections are all runs before nodes, nodes before tasks.


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
NodeThread(NodeThreadPool nodePool, Node[] nodes, int startIndexInNodes, int endIndexInNodes, Projection[] projections, int startIndexInProjections, int endIndexInProjections, ThreadTask[] tasks, int startIndexInTasks, int endIndexInTasks)
           
 
Method Summary
 void finished()
           
 double getMyAverageTimeOnNodesPerStep()
           
 double getMyAverageTimeOnProjectionsPerStep()
           
 double getMyAverageTimeOnTasksPerStep()
           
protected  void kill()
           
 void run()
           
protected  void runNodes(float startTime, float endTime)
           
protected  void runProjections(float startTime, float endTime)
           
protected  void runTasks(float startTime, float endTime)
           
 void setCollectTimings(boolean myCollectTimings)
           
 void waitForPool()
           
 
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

NodeThread

public NodeThread(NodeThreadPool nodePool,
                  Node[] nodes,
                  int startIndexInNodes,
                  int endIndexInNodes,
                  Projection[] projections,
                  int startIndexInProjections,
                  int endIndexInProjections,
                  ThreadTask[] tasks,
                  int startIndexInTasks,
                  int endIndexInTasks)
Method Detail

waitForPool

public void waitForPool()

finished

public void finished()

runProjections

protected void runProjections(float startTime,
                              float endTime)
                       throws SimulationException
Throws:
SimulationException

runNodes

protected void runNodes(float startTime,
                        float endTime)
                 throws SimulationException
Throws:
SimulationException

runTasks

protected void runTasks(float startTime,
                        float endTime)
                 throws SimulationException
Throws:
SimulationException

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

kill

protected void kill()

setCollectTimings

public void setCollectTimings(boolean myCollectTimings)

getMyAverageTimeOnProjectionsPerStep

public double getMyAverageTimeOnProjectionsPerStep()

getMyAverageTimeOnNodesPerStep

public double getMyAverageTimeOnNodesPerStep()

getMyAverageTimeOnTasksPerStep

public double getMyAverageTimeOnTasksPerStep()

Nengo.ca