jAER project on SourceForge

org.ine.telluride.jaer.cuda
Class CUDAObjectTrackerControl

java.lang.Object
  extended by net.sf.jaer.eventprocessing.EventFilter
      extended by net.sf.jaer.eventprocessing.EventFilter2D
          extended by org.ine.telluride.jaer.cuda.CUDAObjectTrackerControl

public class CUDAObjectTrackerControl
extends EventFilter2D

Allows control of remote CUDA process for filtering jAER data.

This filter does not process events at all. Rather it opens a TCP stream socket connection to a remote (maybe on the same machine) process which is a CUDA GPGPU program which accepts AEs from jAER and which sends its output back to jAER for visualization.

The stream socket works with text command lines as though it were a terminal.

Author:
tobi/yingxue/jay

Nested Class Summary
 class CUDAObjectTrackerControl.CUDACommand
           
 class CUDAObjectTrackerControl.CUDAParameter
           
static class CUDAObjectTrackerControl.KernelShape
           
 
Field Summary
 int CONTROL_PORT_DEFAULT
           
 
Fields inherited from class net.sf.jaer.eventprocessing.EventFilter2D
enclosedFilter, out
 
Fields inherited from class net.sf.jaer.eventprocessing.EventFilter
annotationEnabled, chip, enclosedFilterChain, filterEnabled, log, perf, propertyTooltipMap, support
 
Constructor Summary
CUDAObjectTrackerControl(AEChip chip)
           
 
Method Summary
 void doKillCUDA()
           
 void doLaunchCUDA()
          Launches the CUDA process, then sends parameters to it.
 void doSelectCUDAExecutable()
           
 void doSendParameters()
           
 EventPacket<?> filterPacket(EventPacket<?> in)
          Reconstructs a raw event packet, sends it to jaercuda, reads the output from jaercuda, extracts this raw packet, and then returns the events.
 int getControlPort()
           
 java.lang.String getCudaEnvironmentPath()
           
 java.lang.String getCudaExecutablePath()
           
 int getDebugLevel()
           
 int getDeltaTimeUs()
           
 float geteISynWeight()
           
 java.lang.Object getFilterState()
          should return the filter state in some useful form
 java.lang.String getHostname()
           
 float getiESynWeight()
           
 int getInputPort()
           
 CUDAObjectTrackerControl.KernelShape getKernelShape()
           
 int getMaxXmitIntervalMs()
           
 float getMembranePotentialMin()
           
 float getMembraneTauUs()
           
 float getMinFiringTimeDiff()
           
 int getNumObject()
           
 int getOutputPort()
           
 float getThreshold()
           
 void initFilter()
          this should allocate and initialize memory: it may be called when the chip e.g.
 boolean isCudaEnabled()
           
 void resetFilter()
          should reset the filter to initial state
 void setControlPort(int port)
           
 void setCudaEnabled(boolean cudaEnabled)
           
 void setCudaEnvironmentPath(java.lang.String cudaEnvironmentPath)
           
 void setCudaExecutablePath(java.lang.String cudaExecutablePath)
           
 void setDebugLevel(int debugLevel)
           
 void setDeltaTimeUs(int deltaTimeUs)
           
 void seteISynWeight(float eISynWeight)
           
 void setFilterEnabled(boolean yes)
          Resets the filter
 void setHostname(java.lang.String hostname)
           
 void setiESynWeight(float iESynWeight)
           
 void setInputPort(int inputPort)
           
 void setKernelShape(CUDAObjectTrackerControl.KernelShape kernelShape)
           
 void setMaxXmitIntervalMs(int maxXmitIntervalMs)
           
 void setMembranePotentialMin(float membranePotentialMin)
           
 void setMembraneTauUs(float membraneTauUs)
           
 void setMinFiringTimeDiff(float minFiringTimeDiff)
           
 void setNumObject(int numObject)
           
 void setOutputPort(int outputPort)
           
 void setThreshold(float threshold)
           
 
Methods inherited from class net.sf.jaer.eventprocessing.EventFilter2D
checkOutputPacketEventType, checkOutputPacketEventType, getEnclosedFilter, resetOut, setEnclosedFilter
 
Methods inherited from class net.sf.jaer.eventprocessing.EventFilter
getChip, getDescription, getEnclosedFilterChain, getEnclosingFilter, getPrefs, getPropertyChangeSupport, getPropertyTooltip, isAnnotationEnabled, isEnclosed, isFilterEnabled, prefsEnabledKey, setAnnotationEnabled, setChip, setEnclosed, setEnclosedFilter, setEnclosedFilterChain, setEnclosingFilter, setPreferredEnabledState, setPrefs, setPropertyTooltip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTROL_PORT_DEFAULT

public final int CONTROL_PORT_DEFAULT
See Also:
Constant Field Values
Constructor Detail

CUDAObjectTrackerControl

public CUDAObjectTrackerControl(AEChip chip)
Method Detail

doKillCUDA

public void doKillCUDA()

doLaunchCUDA

public void doLaunchCUDA()
Launches the CUDA process, then sends parameters to it. When the CUDA process is launched externally, we don't know if it's running and it will not have commands from us initially.


doSelectCUDAExecutable

public void doSelectCUDAExecutable()

doSendParameters

public void doSendParameters()

filterPacket

public EventPacket<?> filterPacket(EventPacket<?> in)
Reconstructs a raw event packet, sends it to jaercuda, reads the output from jaercuda, extracts this raw packet, and then returns the events.

Specified by:
filterPacket in class EventFilter2D
Parameters:
in - the input packets.
Returns:
the output packet.

setFilterEnabled

public void setFilterEnabled(boolean yes)
Description copied from class: EventFilter2D
Resets the filter

Overrides:
setFilterEnabled in class EventFilter2D
Parameters:
yes - true to reset
See Also:
EventFilter.setPreferredEnabledState()

getFilterState

public java.lang.Object getFilterState()
Description copied from class: EventFilter
should return the filter state in some useful form

Specified by:
getFilterState in class EventFilter

resetFilter

public void resetFilter()
Description copied from class: EventFilter
should reset the filter to initial state

Specified by:
resetFilter in class EventFilter

initFilter

public void initFilter()
Description copied from class: EventFilter
this should allocate and initialize memory: it may be called when the chip e.g. size parameters are changed after creation of the filter

Specified by:
initFilter in class EventFilter

getControlPort

public int getControlPort()

setControlPort

public void setControlPort(int port)

getInputPort

public int getInputPort()
Returns:
the inputPort

setInputPort

public void setInputPort(int inputPort)
Parameters:
inputPort - the inputPort to set

getOutputPort

public int getOutputPort()
Returns:
the outputPort

setOutputPort

public void setOutputPort(int outputPort)
Parameters:
outputPort - the outputPort to set

getHostname

public java.lang.String getHostname()

setHostname

public void setHostname(java.lang.String hostname)

getThreshold

public float getThreshold()

setThreshold

public void setThreshold(float threshold)

getCudaExecutablePath

public java.lang.String getCudaExecutablePath()
Returns:
the cudaExecutablePath

setCudaExecutablePath

public void setCudaExecutablePath(java.lang.String cudaExecutablePath)
Parameters:
cudaExecutablePath - the cudaExecutablePath to set

getCudaEnvironmentPath

public java.lang.String getCudaEnvironmentPath()
Returns:
the cudaEnvironmentPath

setCudaEnvironmentPath

public void setCudaEnvironmentPath(java.lang.String cudaEnvironmentPath)
Parameters:
cudaEnvironmentPath - the cudaEnvironmentPath to set

getMembraneTauUs

public float getMembraneTauUs()
Returns:
the membraneTauUs

setMembraneTauUs

public void setMembraneTauUs(float membraneTauUs)
Parameters:
membraneTauUs - the membraneTauUs to set

getMembranePotentialMin

public float getMembranePotentialMin()
Returns:
the membranePotentialMin

setMembranePotentialMin

public void setMembranePotentialMin(float membranePotentialMin)
Parameters:
membranePotentialMin - the membranePotentialMin to set

getMinFiringTimeDiff

public float getMinFiringTimeDiff()
Returns:
the minFiringTimeDiff

setMinFiringTimeDiff

public void setMinFiringTimeDiff(float minFiringTimeDiff)
Parameters:
minFiringTimeDiff - the minFiringTimeDiff to set

geteISynWeight

public float geteISynWeight()
Returns:
the eISynWeight

seteISynWeight

public void seteISynWeight(float eISynWeight)
Parameters:
eISynWeight - the eISynWeight to set, this is weight from template LIF neurons to global WTA neuron

getiESynWeight

public float getiESynWeight()
Returns:
the iESynWeight

setiESynWeight

public void setiESynWeight(float iESynWeight)
Parameters:
iESynWeight - the iESynWeight to set

getKernelShape

public CUDAObjectTrackerControl.KernelShape getKernelShape()
Returns:
the kernelShape

setKernelShape

public void setKernelShape(CUDAObjectTrackerControl.KernelShape kernelShape)
Parameters:
kernelShape - the kernelShape to set

isCudaEnabled

public boolean isCudaEnabled()
Returns:
the cudaEnabled

setCudaEnabled

public void setCudaEnabled(boolean cudaEnabled)
Parameters:
cudaEnabled - the cudaEnabled to set

getDebugLevel

public int getDebugLevel()
Returns:
the debugLevel

setDebugLevel

public void setDebugLevel(int debugLevel)
Parameters:
debugLevel - the debugLevel to set

getMaxXmitIntervalMs

public int getMaxXmitIntervalMs()
Returns:
the maxXmitIntervalMs

setMaxXmitIntervalMs

public void setMaxXmitIntervalMs(int maxXmitIntervalMs)
Parameters:
maxXmitIntervalMs - the maxXmitIntervalMs to set

getDeltaTimeUs

public int getDeltaTimeUs()
Returns:
the deltaTimeUs

setDeltaTimeUs

public void setDeltaTimeUs(int deltaTimeUs)
Parameters:
deltaTimeUs - the deltaTimeUs to set

getNumObject

public int getNumObject()
Returns:
the numObject

setNumObject

public void setNumObject(int numObject)
Parameters:
numObject - the numObject to set

jAER project on SourceForge