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

Wrapper around legacy weight update models stored in weightUpdateModels array of weightUpdateModel objects. More...

#include <newWeightUpdateModels.h>

Inheritance diagram for WeightUpdateModels::LegacyWrapper:
NewModels::LegacyWrapper< Base, weightUpdateModel, weightUpdateModels > NewModels::Base Snippet::Base

Public Member Functions

 LegacyWrapper (unsigned int legacyTypeIndex)
 
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 NewModels::Base::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...
 
- Public Member Functions inherited from NewModels::LegacyWrapper< Base, weightUpdateModel, weightUpdateModels >
 LegacyWrapper (unsigned int legacyTypeIndex)
 
virtual StringVec getParamNames () const
 Gets names of of (independent) model parameters. More...
 
virtual DerivedParamVec getDerivedParams () const
 
virtual StringPairVec getVars () const
 Gets names and types (as strings) of model variables. More...
 
- Public Member Functions inherited from NewModels::Base
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 ()
 

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::LegacyWrapper< Base, weightUpdateModel, weightUpdateModels >
static StringPairVec zipStringVectors (const StringVec &a, const StringVec &b)
 
- Static Protected Member Functions inherited from NewModels::Base
static size_t getVarIndex (const std::string &varName, const StringPairVec &vars)
 
- Protected Attributes inherited from NewModels::LegacyWrapper< Base, weightUpdateModel, weightUpdateModels >
const unsigned int m_LegacyTypeIndex
 Index into the array of legacy models. More...
 

Detailed Description

Wrapper around legacy weight update models stored in weightUpdateModels array of weightUpdateModel objects.

Constructor & Destructor Documentation

◆ LegacyWrapper()

WeightUpdateModels::LegacyWrapper::LegacyWrapper ( unsigned int  legacyTypeIndex)
inline

Member Function Documentation

◆ getEventCode()

std::string WeightUpdateModels::LegacyWrapper::getEventCode ( ) const
virtual

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

◆ getEventThresholdConditionCode()

std::string WeightUpdateModels::LegacyWrapper::getEventThresholdConditionCode ( ) const
virtual

Gets codes to test for events.

◆ getExtraGlobalParams()

NewModels::Base::StringPairVec WeightUpdateModels::LegacyWrapper::getExtraGlobalParams ( ) const
virtual

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

◆ getLearnPostCode()

std::string WeightUpdateModels::LegacyWrapper::getLearnPostCode ( ) const
virtual

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.

◆ getLearnPostSupportCode()

std::string WeightUpdateModels::LegacyWrapper::getLearnPostSupportCode ( ) const
virtual

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.

◆ getSimCode()

std::string WeightUpdateModels::LegacyWrapper::getSimCode ( ) const
virtual

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

◆ getSimSupportCode()

std::string WeightUpdateModels::LegacyWrapper::getSimSupportCode ( ) const
virtual

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()

std::string WeightUpdateModels::LegacyWrapper::getSynapseDynamicsCode ( ) const
virtual

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

◆ getSynapseDynamicsSuppportCode()

std::string WeightUpdateModels::LegacyWrapper::getSynapseDynamicsSuppportCode ( ) const
virtual

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()

bool WeightUpdateModels::LegacyWrapper::isPostSpikeTimeRequired ( ) const
virtual

Whether postsynaptic spike times are needed or not.

◆ isPreSpikeTimeRequired()

bool WeightUpdateModels::LegacyWrapper::isPreSpikeTimeRequired ( ) const
virtual

Whether presynaptic spike times are needed or not.


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