class WeightUpdateModels::Base

Overview

Base class for all weight update models. More…

#include <weightUpdateModels.h>

class Base: public Models::Base
{
public:
    // methods

    virtual std::string getSimCode() const;
    virtual std::string getEventCode() const;
    virtual std::string getLearnPostCode() const;
    virtual std::string getSynapseDynamicsCode() const;
    virtual std::string getEventThresholdConditionCode() const;
    virtual std::string getSimSupportCode() const;
    virtual std::string getLearnPostSupportCode() const;
    virtual std::string getSynapseDynamicsSuppportCode() const;
    virtual std::string getPreSpikeCode() const;
    virtual std::string getPostSpikeCode() const;
    virtual VarVec getPreVars() const;
    virtual VarVec getPostVars() const;
    virtual bool isPreSpikeTimeRequired() const;
    virtual bool isPostSpikeTimeRequired() const;
    size_t getPreVarIndex(const std::string& varName) const;
    size_t getPostVarIndex(const std::string& varName) const;
};

// direct descendants

class PiecewiseSTDP;
class StaticGraded;
class StaticPulse;
class StaticPulseDendriticDelay;

Inherited Members

public:
    // typedefs

    typedef std::vector<std::string> StringVec;
    typedef std::vector<EGP> EGPVec;
    typedef std::vector<ParamVal> ParamValVec;
    typedef std::vector<DerivedParam> DerivedParamVec;
    typedef std::vector<Var> VarVec;

    // structs

    struct DerivedParam;
    struct EGP;
    struct ParamVal;
    struct Var;

    // methods

    virtual ~Base();
    virtual StringVec getParamNames() const;
    virtual DerivedParamVec getDerivedParams() const;
    virtual VarVec getVars() const;
    virtual EGPVec getExtraGlobalParams() const;
    size_t getVarIndex(const std::string& varName) const;
    size_t getExtraGlobalParamIndex(const std::string& paramName) const;

Detailed Documentation

Base class for all weight update models.

Methods

virtual std::string getSimCode() const

Gets simulation code run when ‘true’ spikes are received.

virtual std::string getEventCode() const

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

virtual std::string getLearnPostCode() const

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.

virtual std::string getSynapseDynamicsCode() const

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

virtual std::string getEventThresholdConditionCode() const

Gets codes to test for events.

virtual std::string getSimSupportCode() const

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

virtual std::string getLearnPostSupportCode() const

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.

virtual std::string getSynapseDynamicsSuppportCode() const

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.

virtual std::string getPreSpikeCode() const

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

virtual std::string getPostSpikeCode() const

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

virtual VarVec getPreVars() const

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

virtual VarVec getPostVars() const

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

virtual bool isPreSpikeTimeRequired() const

Whether presynaptic spike times are needed or not.

virtual bool isPostSpikeTimeRequired() const

Whether postsynaptic spike times are needed or not.

size_t getPreVarIndex(const std::string& varName) const

Find the index of a named presynaptic variable.

size_t getPostVarIndex(const std::string& varName) const

Find the index of a named postsynaptic variable.