class SynapseGroup

Overview

#include <synapseGroup.h>

class SynapseGroup
{
public:
    // enums

    enum SpanType;

    // methods

    SynapseGroup(const SynapseGroup&);
    SynapseGroup();
    void setWUVarLocation(const std::string& varName, VarLocation loc);
    void setWUPreVarLocation(const std::string& varName, VarLocation loc);
    void setWUPostVarLocation(const std::string& varName, VarLocation loc);
    void setWUExtraGlobalParamLocation(const std::string& paramName, VarLocation loc);
    void setPSVarLocation(const std::string& varName, VarLocation loc);
    void setPSExtraGlobalParamLocation(const std::string& paramName, VarLocation loc);
    void setSparseConnectivityExtraGlobalParamLocation(const std::string& paramName, VarLocation loc);
    void setInSynVarLocation(VarLocation loc);
    void setSparseConnectivityLocation(VarLocation loc);
    void setDendriticDelayLocation(VarLocation loc);
    void setMaxConnections(unsigned int maxConnections);
    void setMaxSourceConnections(unsigned int maxPostConnections);
    void setMaxDendriticDelayTimesteps(unsigned int maxDendriticDelay);
    void setSpanType(SpanType spanType);
    void setNumThreadsPerSpike(unsigned int numThreadsPerSpike);
    void setBackPropDelaySteps(unsigned int timesteps);
    const std::string& getName() const;
    SpanType getSpanType() const;
    unsigned int getNumThreadsPerSpike() const;
    unsigned int getDelaySteps() const;
    unsigned int getBackPropDelaySteps() const;
    unsigned int getMaxConnections() const;
    unsigned int getMaxSourceConnections() const;
    unsigned int getMaxDendriticDelayTimesteps() const;
    SynapseMatrixType getMatrixType() const;
    VarLocation getInSynLocation() const;
    VarLocation getSparseConnectivityLocation() const;
    VarLocation getDendriticDelayLocation() const;
    int getClusterHostID() const;
    bool isTrueSpikeRequired() const;
    bool isSpikeEventRequired() const;
    const WeightUpdateModels::Base* getWUModel() const;
    const std::vector<double>& getWUParams() const;
    const std::vector<Models::VarInit>& getWUVarInitialisers() const;
    const std::vector<Models::VarInit>& getWUPreVarInitialisers() const;
    const std::vector<Models::VarInit>& getWUPostVarInitialisers() const;
    const std::vector<double> getWUConstInitVals() const;
    const PostsynapticModels::Base* getPSModel() const;
    const std::vector<double>& getPSParams() const;
    const std::vector<Models::VarInit>& getPSVarInitialisers() const;
    const std::vector<double> getPSConstInitVals() const;
    const InitSparseConnectivitySnippet::Init& getConnectivityInitialiser() const;
    bool isZeroCopyEnabled() const;
    VarLocation getWUVarLocation(const std::string& var) const;
    VarLocation getWUVarLocation(size_t index) const;
    VarLocation getWUPreVarLocation(const std::string& var) const;
    VarLocation getWUPreVarLocation(size_t index) const;
    VarLocation getWUPostVarLocation(const std::string& var) const;
    VarLocation getWUPostVarLocation(size_t index) const;
    VarLocation getWUExtraGlobalParamLocation(const std::string& paramName) const;
    VarLocation getWUExtraGlobalParamLocation(size_t index) const;
    VarLocation getPSVarLocation(const std::string& var) const;
    VarLocation getPSVarLocation(size_t index) const;
    VarLocation getPSExtraGlobalParamLocation(const std::string& paramName) const;
    VarLocation getPSExtraGlobalParamLocation(size_t index) const;
    VarLocation getSparseConnectivityExtraGlobalParamLocation(const std::string& paramName) const;
    VarLocation getSparseConnectivityExtraGlobalParamLocation(size_t index) const;
    bool isDendriticDelayRequired() const;
    bool isPSInitRNGRequired() const;
    bool isWUInitRNGRequired() const;
    bool isWUVarInitRequired() const;
    bool isSparseConnectivityInitRequired() const;
};

// direct descendants

class SynapseGroupInternal;

Detailed Documentation

Methods

void setWUVarLocation(const std::string& varName, VarLocation loc)

Set location of weight update model state variable.

This is ignored for simulations on hardware with a single memory space

void setWUPreVarLocation(const std::string& varName, VarLocation loc)

Set location of weight update model presynaptic state variable.

This is ignored for simulations on hardware with a single memory space

void setWUPostVarLocation(const std::string& varName, VarLocation loc)

Set location of weight update model postsynaptic state variable.

This is ignored for simulations on hardware with a single memory space

void setWUExtraGlobalParamLocation(const std::string& paramName, VarLocation loc)

Set location of weight update model extra global parameter.

This is ignored for simulations on hardware with a single memory space and only applies to extra global parameters which are pointers.

void setPSVarLocation(const std::string& varName, VarLocation loc)

Set location of postsynaptic model state variable.

This is ignored for simulations on hardware with a single memory space

void setPSExtraGlobalParamLocation(const std::string& paramName, VarLocation loc)

Set location of postsynaptic model extra global parameter.

This is ignored for simulations on hardware with a single memory space and only applies to extra global parameters which are pointers.

void setSparseConnectivityExtraGlobalParamLocation(
    const std::string& paramName,
    VarLocation loc
    )

Set location of sparse connectivity initialiser extra global parameter.

This is ignored for simulations on hardware with a single memory space and only applies to extra global parameters which are pointers.

void setInSynVarLocation(VarLocation loc)

Set location of variables used to combine input from this synapse group.

This is ignored for simulations on hardware with a single memory space

void setSparseConnectivityLocation(VarLocation loc)

Set variable mode used for sparse connectivity.

This is ignored for simulations on hardware with a single memory space

void setDendriticDelayLocation(VarLocation loc)

Set variable mode used for this synapse group’s dendritic delay buffers.

void setMaxConnections(unsigned int maxConnections)

Sets the maximum number of target neurons any source neurons can connect to.

Use with synaptic matrix types with SynapseMatrixConnectivity::SPARSE to optimise CUDA implementation

void setMaxSourceConnections(unsigned int maxPostConnections)

Sets the maximum number of source neurons any target neuron can connect to.

Use with synaptic matrix types with SynapseMatrixConnectivity::SPARSE and postsynaptic learning to optimise CUDA implementation

void setMaxDendriticDelayTimesteps(unsigned int maxDendriticDelay)

Sets the maximum dendritic delay for synapses in this synapse group.

void setSpanType(SpanType spanType)

Set how CUDA implementation is parallelised.

with a thread per target neuron (default) or a thread per source spike

void setNumThreadsPerSpike(unsigned int numThreadsPerSpike)

Set how many threads CUDA implementation uses to process each spike when span type is PRESYNAPTIC.

void setBackPropDelaySteps(unsigned int timesteps)

Sets the number of delay steps used to delay postsynaptic spikes travelling back along dendrites to synapses.

VarLocation getInSynLocation() const

Get variable mode used for variables used to combine input from this synapse group.

VarLocation getSparseConnectivityLocation() const

Get variable mode used for sparse connectivity.

VarLocation getDendriticDelayLocation() const

Get variable mode used for this synapse group’s dendritic delay buffers.

bool isTrueSpikeRequired() const

Does synapse group need to handle ‘true’ spikes.

bool isSpikeEventRequired() const

Does synapse group need to handle spike-like events.

VarLocation getWUVarLocation(const std::string& var) const

Get location of weight update model per-synapse state variable by name.

VarLocation getWUVarLocation(size_t index) const

Get location of weight update model per-synapse state variable by index.

VarLocation getWUPreVarLocation(const std::string& var) const

Get location of weight update model presynaptic state variable by name.

VarLocation getWUPreVarLocation(size_t index) const

Get location of weight update model presynaptic state variable by index.

VarLocation getWUPostVarLocation(const std::string& var) const

Get location of weight update model postsynaptic state variable by name.

VarLocation getWUPostVarLocation(size_t index) const

Get location of weight update model postsynaptic state variable by index.

VarLocation getWUExtraGlobalParamLocation(const std::string& paramName) const

Get location of weight update model extra global parameter by name.

This is only used by extra global parameters which are pointers

VarLocation getWUExtraGlobalParamLocation(size_t index) const

Get location of weight update model extra global parameter by index.

This is only used by extra global parameters which are pointers

VarLocation getPSVarLocation(const std::string& var) const

Get location of postsynaptic model state variable.

VarLocation getPSVarLocation(size_t index) const

Get location of postsynaptic model state variable.

VarLocation getPSExtraGlobalParamLocation(const std::string& paramName) const

Get location of postsynaptic model extra global parameter by name.

This is only used by extra global parameters which are pointers

VarLocation getPSExtraGlobalParamLocation(size_t index) const

Get location of postsynaptic model extra global parameter by index.

This is only used by extra global parameters which are pointers

VarLocation getSparseConnectivityExtraGlobalParamLocation(const std::string& paramName) const

Get location of sparse connectivity initialiser extra global parameter by name.

This is only used by extra global parameters which are pointers

VarLocation getSparseConnectivityExtraGlobalParamLocation(size_t index) const

Get location of sparse connectivity initialiser extra global parameter by index.

This is only used by extra global parameters which are pointers

bool isDendriticDelayRequired() const

Does this synapse group require dendritic delay?

bool isPSInitRNGRequired() const

Does this synapse group require an RNG for it’s postsynaptic init code?

bool isWUInitRNGRequired() const

Does this synapse group require an RNG for it’s weight update init code?

bool isWUVarInitRequired() const

Is var init code required for any variables in this synapse group’s weight update model?

bool isSparseConnectivityInitRequired() const

Is sparse connectivity initialisation code required for this synapse group?