GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
WeightUpdateModels::Base Class Reference

Base class for all weight update models. More...

#include <newWeightUpdateModels.h>

Inheritance diagram for WeightUpdateModels::Base:
NewModels::Base Snippet::Base WeightUpdateModels::PiecewiseSTDP WeightUpdateModels::StaticGraded WeightUpdateModels::StaticPulse WeightUpdateModels::StaticPulseDendriticDelay

Public Member Functions

virtual std::string getSimCode () const
 Gets simulation code run when 'true' spikes are received. More...
 
virtual std::string getEventCode () const
 Gets code run when events (all the instances where event threshold condition is met) are received. More...
 
virtual std::string getLearnPostCode () const
 Gets code to include in the learnSynapsesPost kernel/function. More...
 
virtual std::string getSynapseDynamicsCode () const
 Gets code for synapse dynamics which are independent of spike detection. More...
 
virtual std::string getEventThresholdConditionCode () const
 Gets codes to test for events. More...
 
virtual std::string getSimSupportCode () const
 Gets support code to be made available within the synapse kernel/function. More...
 
virtual std::string getLearnPostSupportCode () const
 Gets support code to be made available within learnSynapsesPost kernel/function. More...
 
virtual std::string getSynapseDynamicsSuppportCode () const
 Gets support code to be made available within the synapse dynamics kernel/function. More...
 
virtual std::string getPreSpikeCode () const
 
virtual std::string getPostSpikeCode () const
 
virtual StringPairVec getPreVars () const
 
virtual StringPairVec getPostVars () const
 
virtual StringPairVec getExtraGlobalParams () const
 
virtual bool isPreSpikeTimeRequired () const
 Whether presynaptic spike times are needed or not. More...
 
virtual bool isPostSpikeTimeRequired () const
 Whether postsynaptic spike times are needed or not. More...
 
size_t getPreVarIndex (const std::string &varName) const
 Find the index of a named presynaptic variable. More...
 
size_t getPostVarIndex (const std::string &varName) const
 Find the index of a named postsynaptic variable. More...
 
- Public Member Functions inherited from NewModels::Base
virtual StringPairVec getVars () const
 Gets names and types (as strings) of model variables. More...
 
size_t getVarIndex (const std::string &varName) const
 Find the index of a named variable. More...
 
- Public Member Functions inherited from Snippet::Base
virtual ~Base ()
 
virtual StringVec getParamNames () const
 Gets names of of (independent) model parameters. More...
 
virtual DerivedParamVec getDerivedParams () const
 

Additional Inherited Members

- Public Types inherited from Snippet::Base
typedef std::function< double(const std::vector< double > &, double)> DerivedParamFunc
 
typedef std::vector< std::string > StringVec
 
typedef std::vector< std::pair< std::string, std::string > > StringPairVec
 
typedef std::vector< std::pair< std::string, std::pair< std::string, double > > > NameTypeValVec
 
typedef std::vector< std::pair< std::string, DerivedParamFunc > > DerivedParamVec
 
- Static Protected Member Functions inherited from NewModels::Base
static size_t getVarIndex (const std::string &varName, const StringPairVec &vars)
 

Detailed Description

Base class for all weight update models.

Member Function Documentation

◆ getEventCode()

virtual std::string WeightUpdateModels::Base::getEventCode ( ) const
inlinevirtual

Gets code run when events (all the instances where event threshold condition is met) are received.

Reimplemented in WeightUpdateModels::StaticGraded.

◆ getEventThresholdConditionCode()

virtual std::string WeightUpdateModels::Base::getEventThresholdConditionCode ( ) const
inlinevirtual

Gets codes to test for events.

Reimplemented in WeightUpdateModels::StaticGraded.

◆ getExtraGlobalParams()

virtual StringPairVec WeightUpdateModels::Base::getExtraGlobalParams ( ) const
inlinevirtual

Gets names and types (as strings) of additional per-population parameters for the weight update model.

◆ getLearnPostCode()

virtual std::string WeightUpdateModels::Base::getLearnPostCode ( ) const
inlinevirtual

Gets code to include in the learnSynapsesPost kernel/function.

For examples when modelling STDP, this is where the effect of postsynaptic spikes which occur after presynaptic spikes are applied.

Reimplemented in WeightUpdateModels::PiecewiseSTDP.

◆ getLearnPostSupportCode()

virtual std::string WeightUpdateModels::Base::getLearnPostSupportCode ( ) const
inlinevirtual

Gets support code to be made available within learnSynapsesPost kernel/function.

Preprocessor defines are also allowed if appropriately safeguarded against multiple definition by using ifndef; functions should be declared as "__host__ __device__" to be available for both GPU and CPU versions.

◆ getPostSpikeCode()

virtual std::string WeightUpdateModels::Base::getPostSpikeCode ( ) const
inlinevirtual

Gets code to be run once per spiking postsynaptic neuron before learn post code is run on synapses

This is typically for the code to update postsynaptic variables. Presynaptic and synapse variables are not accesible from within this code

◆ getPostVarIndex()

size_t WeightUpdateModels::Base::getPostVarIndex ( const std::string &  varName) const
inline

Find the index of a named postsynaptic variable.

◆ getPostVars()

virtual StringPairVec WeightUpdateModels::Base::getPostVars ( ) const
inlinevirtual

Gets names and types (as strings) of state variables that are common across all synapses going to the same postsynaptic neuron

◆ getPreSpikeCode()

virtual std::string WeightUpdateModels::Base::getPreSpikeCode ( ) const
inlinevirtual

Gets code to be run once per spiking presynaptic neuron before sim code is run on synapses

This is typically for the code to update presynaptic variables. Postsynaptic and synapse variables are not accesible from within this code

◆ getPreVarIndex()

size_t WeightUpdateModels::Base::getPreVarIndex ( const std::string &  varName) const
inline

Find the index of a named presynaptic variable.

◆ getPreVars()

virtual StringPairVec WeightUpdateModels::Base::getPreVars ( ) const
inlinevirtual

Gets names and types (as strings) of state variables that are common across all synapses coming from the same presynaptic neuron

◆ getSimCode()

virtual std::string WeightUpdateModels::Base::getSimCode ( ) const
inlinevirtual

Gets simulation code run when 'true' spikes are received.

Reimplemented in WeightUpdateModels::PiecewiseSTDP, WeightUpdateModels::StaticPulseDendriticDelay, and WeightUpdateModels::StaticPulse.

◆ getSimSupportCode()

virtual std::string WeightUpdateModels::Base::getSimSupportCode ( ) const
inlinevirtual

Gets support code to be made available within the synapse kernel/function.

This is intended to contain user defined device functions that are used in the weight update code. Preprocessor defines are also allowed if appropriately safeguarded against multiple definition by using ifndef; functions should be declared as "__host__ __device__" to be available for both GPU and CPU versions; note that this support code is available to sim, event threshold and event code

◆ getSynapseDynamicsCode()

virtual std::string WeightUpdateModels::Base::getSynapseDynamicsCode ( ) const
inlinevirtual

Gets code for synapse dynamics which are independent of spike detection.

◆ getSynapseDynamicsSuppportCode()

virtual std::string WeightUpdateModels::Base::getSynapseDynamicsSuppportCode ( ) const
inlinevirtual

Gets support code to be made available within the synapse dynamics kernel/function.

Preprocessor defines are also allowed if appropriately safeguarded against multiple definition by using ifndef; functions should be declared as "__host__ __device__" to be available for both GPU and CPU versions.

◆ isPostSpikeTimeRequired()

virtual bool WeightUpdateModels::Base::isPostSpikeTimeRequired ( ) const
inlinevirtual

Whether postsynaptic spike times are needed or not.

Reimplemented in WeightUpdateModels::PiecewiseSTDP.

◆ isPreSpikeTimeRequired()

virtual bool WeightUpdateModels::Base::isPreSpikeTimeRequired ( ) const
inlinevirtual

Whether presynaptic spike times are needed or not.

Reimplemented in WeightUpdateModels::PiecewiseSTDP.


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