Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
Loading...
Searching...
No Matches
AllSpikingSynapses Class Reference
Inheritance diagram for AllSpikingSynapses:
Collaboration diagram for AllSpikingSynapses:

Public Member Functions

 AllSpikingSynapses (int numVertices, int maxEdges)
 
virtual void setupEdges () override
 Setup the internal structure of the class (allocate memories and initialize them).
 
virtual void resetEdge (BGSIZE iEdg, BGFLOAT deltaT) override
 
virtual void loadParameters () override
 Load member variables from configuration file. Registered to OperationManager as Operation::op::loadParameters.
 
virtual void printParameters () const override
 
virtual void createEdge (BGSIZE iEdg, int srcVertex, int destVertex, BGFLOAT deltaT, edgeType type) override
 
virtual bool allowBackPropagation ()
 
virtual void printSynapsesProps () const
 Prints SynapsesProps data to console.
 
template<class Archive >
void serialize (Archive &archive)
 Cereal serialization method.
 
virtual void advanceEdge (BGSIZE iEdg, AllVertices &neurons) override
 
virtual void preSpikeHit (BGSIZE iEdg)
 
virtual void postSpikeHit (BGSIZE iEdg)
 
- Public Member Functions inherited from AllNeuroEdges
int edgSign (const edgeType type)
 
template<class Archive >
void serialize (Archive &archive)
 Cereal serialization method.
 
- Public Member Functions inherited from AllEdges
 AllEdges (int numVertices, int maxEdges)
 
virtual BGSIZE addEdge (edgeType type, int srcVertex, int destVertex, BGFLOAT deltaT)
 
virtual void createEdgeIndexMap (EdgeIndexMap &edgeIndexMap)
 Populate a edge index map.
 
template<class Archive >
void serialize (Archive &archive)
 Cereal serialization method.
 
virtual void advanceEdges (AllVertices &vertices, EdgeIndexMap &edgeIndexMap)
 
virtual void eraseEdge (int neuronIndex, BGSIZE iEdg)
 

Static Public Member Functions

static AllEdgesCreate ()
 

Public Attributes

vector< BGFLOAT > decay_
 The decay for the psr.
 
vector< BGFLOAT > tau_
 The synaptic time constant $\tau$ [units=sec; range=(0,100)].
 
BGFLOAT tau_II_
 
BGFLOAT tau_IE_
 
BGFLOAT tau_EI_
 
BGFLOAT tau_EE_
 
BGFLOAT delay_II_
 
BGFLOAT delay_IE_
 
BGFLOAT delay_EI_
 
BGFLOAT delay_EE_
 
vector< int > totalDelay_
 The synaptic transmission delay, descretized into time steps.
 
vector< uint32_t > delayQueue_
 Pointer to the delayed queue.
 
vector< int > delayIndex_
 
vector< int > delayQueueLength_
 Length of the delayed queue.
 
- Public Attributes inherited from AllNeuroEdges
vector< BGFLOAT > psr_
 
- Public Attributes inherited from AllEdges
vector< int > sourceVertexIndex_
 The location of the edge.
 
vector< int > destVertexIndex_
 The coordinates of the summation point.
 
vector< BGFLOAT > W_
 The weight (scaling factor, strength, maximal amplitude) of the edge.
 
vector< edgeType > type_
 Synapse type.
 
vector< unsigned char > inUse_
 The value indicating the entry in the array is in use.
 
vector< BGSIZE > edgeCounts_
 
BGSIZE totalEdgeCount_
 The total number of active edges.
 
BGSIZE maxEdgesPerVertex_
 The maximum number of edges for each vertex.
 
int countVertices_
 

Protected Member Functions

virtual void setupEdges (int numVertices, int maxEdges)
 
virtual void initSpikeQueue (BGSIZE iEdg)
 
bool updateDecay (BGSIZE iEdg, BGFLOAT deltaT)
 defined(USE_GPU)
 
virtual void readEdge (istream &input, BGSIZE iEdg) override
 
virtual void writeEdge (ostream &output, BGSIZE iEdg) const override
 
bool isSpikeQueue (BGSIZE iEdg)
 
virtual void changePSR (BGSIZE iEdg, BGFLOAT deltaT)
 
- Protected Member Functions inherited from AllNeuroEdges
- Protected Member Functions inherited from AllEdges
edgeType edgeOrdinalToType (int typeOrdinal)
 

Additional Inherited Members

- Static Public Attributes inherited from AllNeuroEdges
static constexpr BGFLOAT SYNAPSE_STRENGTH_ADJUSTMENT = 1.0e-8
 The factor to adjust overlapping area to edge weight.
 
- Protected Attributes inherited from AllEdges
log4cplus::Logger fileLogger_
 Loggers used to print to using log4cplus logging macros, prints to Results/Debug/logging.txt.
 
log4cplus::Logger edgeLogger_
 

Detailed Description

Definition at line 39 of file AllSpikingSynapses.h.

Constructor & Destructor Documentation

◆ AllSpikingSynapses() [1/2]

AllSpikingSynapses::AllSpikingSynapses ( )

Definition at line 15 of file AllSpikingSynapses.cpp.

◆ AllSpikingSynapses() [2/2]

AllSpikingSynapses::AllSpikingSynapses ( int numVertices,
int maxEdges )

Definition at line 27 of file AllSpikingSynapses.cpp.

Member Function Documentation

◆ advanceEdge()

void AllSpikingSynapses::advanceEdge ( BGSIZE iEdg,
AllVertices & neurons )
overridevirtual

Advance one specific Synapse.

Parameters
iEdgIndex of the Synapse to connect to.
neuronsThe Neuron list to search from.

Implements AllEdges.

Reimplemented in AllSTDPSynapses.

Definition at line 272 of file AllSpikingSynapses.cpp.

◆ allowBackPropagation()

bool AllSpikingSynapses::allowBackPropagation ( )
virtual

Check if the back propagation (notify a spike event to the pre neuron) is allowed in the synapse class.

Returns
true if the back propagation is allowed.

Reimplemented in AllSTDPSynapses.

Definition at line 331 of file AllSpikingSynapses.cpp.

◆ changePSR()

void AllSpikingSynapses::changePSR ( BGSIZE iEdg,
BGFLOAT deltaT )
protectedvirtual

Calculate the post synapse response after a spike.

Parameters
iEdgIndex of the synapse to set.
deltaTInner simulation step duration.

Reimplemented in AllDSSynapses, and AllDynamicSTDPSynapses.

Definition at line 300 of file AllSpikingSynapses.cpp.

◆ Create()

static AllEdges * AllSpikingSynapses::Create ( )
inlinestatic

Definition at line 47 of file AllSpikingSynapses.h.

◆ createEdge()

void AllSpikingSynapses::createEdge ( BGSIZE iEdg,
int srcVertex,
int destVertex,
BGFLOAT deltaT,
edgeType type )
overridevirtual

Create a Synapse and connect it to the model.

Parameters
iEdgIndex of the synapse to set.
srcVertexIndex of the source Neuron.
destVertexIndex of the destination Neuron.
deltaTInner simulation step duration.
typeType of the Synapse to create.

Implements AllEdges.

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, and AllSTDPSynapses.

Definition at line 169 of file AllSpikingSynapses.cpp.

◆ initSpikeQueue()

void AllSpikingSynapses::initSpikeQueue ( BGSIZE iEdg)
protectedvirtual

Initializes the queues for the Synapse.

Parameters
iEdgindex of the synapse to set.

Reimplemented in AllSTDPSynapses.

Definition at line 62 of file AllSpikingSynapses.cpp.

◆ isSpikeQueue()

bool AllSpikingSynapses::isSpikeQueue ( BGSIZE iEdg)
protected

Checks if there is an input spike in the queue.

Parameters
iEdgIndex of the Synapse to connect to.
Returns
true if there is an input spike event.

Definition at line 219 of file AllSpikingSynapses.cpp.

◆ loadParameters()

void AllSpikingSynapses::loadParameters ( )
overridevirtual

Load member variables from configuration file. Registered to OperationManager as Operation::op::loadParameters.

Reimplemented from AllEdges.

Reimplemented in AllSTDPSynapses.

Definition at line 88 of file AllSpikingSynapses.cpp.

◆ postSpikeHit()

void AllSpikingSynapses::postSpikeHit ( BGSIZE iEdg)
virtual

Prepares Synapse for a spike hit (for back propagation).

Parameters
iEdgIndex of the Synapse to update.

Reimplemented in AllSTDPSynapses.

Definition at line 264 of file AllSpikingSynapses.cpp.

◆ preSpikeHit()

void AllSpikingSynapses::preSpikeHit ( BGSIZE iEdg)
virtual

Prepares Synapse for a spike hit.

Parameters
iEdgIndex of the Synapse to update.

Definition at line 236 of file AllSpikingSynapses.cpp.

◆ printParameters()

void AllSpikingSynapses::printParameters ( ) const
overridevirtual

Prints out all parameters to logging file. Registered to OperationManager as Operation::printParameters

Reimplemented from AllEdges.

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, and AllSTDPSynapses.

Definition at line 102 of file AllSpikingSynapses.cpp.

◆ printSynapsesProps()

void AllSpikingSynapses::printSynapsesProps ( ) const
virtual

Prints SynapsesProps data to console.

Reimplemented from AllNeuroEdges.

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, and AllSTDPSynapses.

Definition at line 337 of file AllSpikingSynapses.cpp.

◆ readEdge()

void AllSpikingSynapses::readEdge ( istream & input,
BGSIZE iEdg )
overrideprotectedvirtual

Sets the data for Synapse to input's data.

Parameters
inputistream to read from.
iEdgIndex of the synapse to set.

Reimplemented from AllNeuroEdges.

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, and AllSTDPSynapses.

Definition at line 127 of file AllSpikingSynapses.cpp.

◆ resetEdge()

void AllSpikingSynapses::resetEdge ( BGSIZE iEdg,
BGFLOAT deltaT )
overridevirtual

Reset time varying state vars and recompute decay.

Parameters
iEdgIndex of the synapse to set.
deltaTInner simulation step duration

Reimplemented from AllNeuroEdges.

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, and AllSTDPSynapses.

Definition at line 80 of file AllSpikingSynapses.cpp.

◆ serialize()

template<class Archive >
void AllSpikingSynapses::serialize ( Archive & archive)

Cereal serialization method.

Definition at line 337 of file AllSpikingSynapses.h.

◆ setupEdges() [1/2]

void AllSpikingSynapses::setupEdges ( )
overridevirtual

Setup the internal structure of the class (allocate memories and initialize them).

Reimplemented from AllNeuroEdges.

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, and AllSTDPSynapses.

Definition at line 33 of file AllSpikingSynapses.cpp.

◆ setupEdges() [2/2]

void AllSpikingSynapses::setupEdges ( int numVertices,
int maxEdges )
protectedvirtual

Setup the internal structure of the class (allocate memories and initialize them).

Parameters
numVerticesTotal number of vertices in the network.
maxEdgesMaximum number of synapses per neuron.

Reimplemented from AllNeuroEdges.

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, and AllSTDPSynapses.

Definition at line 43 of file AllSpikingSynapses.cpp.

◆ updateDecay()

bool AllSpikingSynapses::updateDecay ( BGSIZE iEdg,
BGFLOAT deltaT )
protected

defined(USE_GPU)

Updates the decay if the synapse selected.

Parameters
iEdgIndex of the synapse to set.
deltaTInner simulation step duration
Returns
true is success.

Updates the decay if the synapse selected.

Parameters
iEdgIndex of the synapse to set.
deltaTInner simulation step duration

Definition at line 315 of file AllSpikingSynapses.cpp.

◆ writeEdge()

void AllSpikingSynapses::writeEdge ( ostream & output,
BGSIZE iEdg ) const
overrideprotectedvirtual

Write the synapse data to the stream.

Parameters
outputstream to print out to.
iEdgIndex of the synapse to print out.

Reimplemented from AllNeuroEdges.

Reimplemented in AllDSSynapses, AllDynamicSTDPSynapses, and AllSTDPSynapses.

Definition at line 150 of file AllSpikingSynapses.cpp.

Member Data Documentation

◆ decay_

vector<BGFLOAT> AllSpikingSynapses::decay_

The decay for the psr.

Definition at line 268 of file AllSpikingSynapses.h.

◆ delay_EE_

BGFLOAT AllSpikingSynapses::delay_EE_

Definition at line 280 of file AllSpikingSynapses.h.

◆ delay_EI_

BGFLOAT AllSpikingSynapses::delay_EI_

Definition at line 279 of file AllSpikingSynapses.h.

◆ delay_IE_

BGFLOAT AllSpikingSynapses::delay_IE_

Definition at line 278 of file AllSpikingSynapses.h.

◆ delay_II_

BGFLOAT AllSpikingSynapses::delay_II_

Definition at line 277 of file AllSpikingSynapses.h.

◆ delayIndex_

vector<int> AllSpikingSynapses::delayIndex_

The index indicating the current time slot in the delayed queue Note: This variable is used in GpuSim_struct.cu but I am not sure if it is actually from a synapse. Will need a little help here. -Aaron Note: This variable can be GLOBAL VARIABLE, but need to modify the code.

Definition at line 295 of file AllSpikingSynapses.h.

◆ delayQueue_

vector<uint32_t> AllSpikingSynapses::delayQueue_

Pointer to the delayed queue.

Definition at line 289 of file AllSpikingSynapses.h.

◆ delayQueueLength_

vector<int> AllSpikingSynapses::delayQueueLength_

Length of the delayed queue.

Definition at line 298 of file AllSpikingSynapses.h.

◆ tau_

vector<BGFLOAT> AllSpikingSynapses::tau_

The synaptic time constant $\tau$ [units=sec; range=(0,100)].

Definition at line 271 of file AllSpikingSynapses.h.

◆ tau_EE_

BGFLOAT AllSpikingSynapses::tau_EE_

Definition at line 276 of file AllSpikingSynapses.h.

◆ tau_EI_

BGFLOAT AllSpikingSynapses::tau_EI_

Definition at line 275 of file AllSpikingSynapses.h.

◆ tau_IE_

BGFLOAT AllSpikingSynapses::tau_IE_

Definition at line 274 of file AllSpikingSynapses.h.

◆ tau_II_

BGFLOAT AllSpikingSynapses::tau_II_

Definition at line 273 of file AllSpikingSynapses.h.

◆ totalDelay_

vector<int> AllSpikingSynapses::totalDelay_

The synaptic transmission delay, descretized into time steps.

Definition at line 286 of file AllSpikingSynapses.h.


The documentation for this class was generated from the following files: