44 void setWUVarLocation(
const std::string &varName,
VarLocation loc);
48 void setWUPreVarLocation(
const std::string &varName,
VarLocation loc);
52 void setWUPostVarLocation(
const std::string &varName,
VarLocation loc);
57 void setWUExtraGlobalParamLocation(
const std::string ¶mName,
VarLocation loc);
61 void setPSVarLocation(
const std::string &varName,
VarLocation loc);
66 void setPSExtraGlobalParamLocation(
const std::string ¶mName,
VarLocation loc);
70 void setPSTargetVar(
const std::string &varName);
74 void setPreTargetVar(
const std::string &varName);
79 void setSparseConnectivityExtraGlobalParamLocation(
const std::string ¶mName,
VarLocation loc);
87 void setSparseConnectivityLocation(
VarLocation loc);
94 void setMaxConnections(
unsigned int maxConnections);
98 void setMaxSourceConnections(
unsigned int maxPostConnections);
101 void setMaxDendriticDelayTimesteps(
unsigned int maxDendriticDelay);
105 void setSpanType(
SpanType spanType);
109 void setNumThreadsPerSpike(
unsigned int numThreadsPerSpike);
112 void setBackPropDelaySteps(
unsigned int timesteps);
115 void setNarrowSparseIndEnabled(
bool enabled);
120 const std::string &
getName()
const{
return m_Name; }
126 unsigned int getMaxConnections()
const;
127 unsigned int getMaxSourceConnections()
const;
130 const std::vector<unsigned int> &
getKernelSize()
const {
return m_KernelSize; }
131 size_t getKernelSizeFlattened()
const;
143 bool isTrueSpikeRequired()
const;
146 bool isSpikeEventRequired()
const;
167 std::string getSparseIndType()
const;
171 const std::vector<double> &
getWUParams()
const{
return m_WUParams; }
175 const std::vector<double> getWUConstInitVals()
const;
179 const std::vector<double> &
getPSParams()
const{
return m_PSParams; }
181 const std::vector<double> getPSConstInitVals()
const;
186 bool isZeroCopyEnabled()
const;
189 VarLocation getWUVarLocation(
const std::string &var)
const;
195 VarLocation getWUPreVarLocation(
const std::string &var)
const;
201 VarLocation getWUPostVarLocation(
const std::string &var)
const;
208 VarLocation getWUExtraGlobalParamLocation(
const std::string ¶mName)
const;
215 VarLocation getPSVarLocation(
const std::string &var)
const;
222 VarLocation getPSExtraGlobalParamLocation(
const std::string ¶mName)
const;
238 VarLocation getSparseConnectivityExtraGlobalParamLocation(
const std::string ¶mName)
const;
242 VarLocation getSparseConnectivityExtraGlobalParamLocation(
size_t index)
const;
245 bool isDendriticDelayRequired()
const;
248 bool isPresynapticOutputRequired()
const;
251 bool isProceduralConnectivityRNGRequired()
const;
254 bool isPSInitRNGRequired()
const;
257 bool isWUInitRNGRequired()
const;
260 bool isWUPreInitRNGRequired()
const;
263 bool isWUPostInitRNGRequired()
const;
266 bool isHostInitRNGRequired()
const;
269 bool isWUVarInitRequired()
const;
272 bool isSparseConnectivityInitRequired()
const;
276 const WeightUpdateModels::Base *wu,
const std::vector<double> &wuParams,
const std::vector<Models::VarInit> &wuVarInitialisers,
const std::vector<Models::VarInit> &wuPreVarInitialisers,
const std::vector<Models::VarInit> &wuPostVarInitialisers,
277 const PostsynapticModels::Base *ps,
const std::vector<double> &psParams,
const std::vector<Models::VarInit> &psVarInitialisers,
282 VarLocation defaultSparseConnectivityLocation,
bool defaultNarrowSparseIndEnabled);
300 void initDerivedParams(
double dt);
326 bool canPSBeFused()
const;
329 bool canWUMPreUpdateBeFused()
const;
332 bool canPreOutputBeFused()
const;
335 bool canWUMPostUpdateBeFused()
const;
339 boost::uuids::detail::sha1::digest_type getWUHashDigest()
const;
343 boost::uuids::detail::sha1::digest_type getWUPreHashDigest()
const;
347 boost::uuids::detail::sha1::digest_type getWUPostHashDigest()
const;
351 boost::uuids::detail::sha1::digest_type getPSHashDigest()
const;
356 boost::uuids::detail::sha1::digest_type getWUPreFuseHashDigest()
const;
361 boost::uuids::detail::sha1::digest_type getWUPostFuseHashDigest()
const;
366 boost::uuids::detail::sha1::digest_type getPSFuseHashDigest()
const;
370 boost::uuids::detail::sha1::digest_type getPreOutputHashDigest()
const;
372 boost::uuids::detail::sha1::digest_type getDendriticDelayUpdateHashDigest()
const;
376 boost::uuids::detail::sha1::digest_type getWUInitHashDigest()
const;
380 boost::uuids::detail::sha1::digest_type getWUPreInitHashDigest()
const;
384 boost::uuids::detail::sha1::digest_type getWUPostInitHashDigest()
const;
388 boost::uuids::detail::sha1::digest_type getPSInitHashDigest()
const;
392 boost::uuids::detail::sha1::digest_type getPreOutputInitHashDigest()
const;
396 boost::uuids::detail::sha1::digest_type getConnectivityInitHashDigest()
const;
400 boost::uuids::detail::sha1::digest_type getConnectivityHostInitHashDigest()
const;
402 boost::uuids::detail::sha1::digest_type getVarLocationHashDigest()
const;
408 const std::string m_Name;
414 unsigned int m_NumThreadsPerSpike;
417 unsigned int m_DelaySteps;
420 unsigned int m_BackPropDelaySteps;
423 unsigned int m_MaxConnections;
426 unsigned int m_MaxSourceConnections;
429 unsigned int m_MaxDendriticDelayTimesteps;
432 std::vector<unsigned int> m_KernelSize;
448 bool m_EventThresholdReTestRequired;
451 bool m_NarrowSparseIndEnabled;
454 bool m_WUVarReferencedByCustomUpdate;
466 const std::vector<double> m_WUParams;
469 std::vector<double> m_WUDerivedParams;
472 std::vector<Models::VarInit> m_WUVarInitialisers;
475 std::vector<Models::VarInit> m_WUPreVarInitialisers;
478 std::vector<Models::VarInit> m_WUPostVarInitialisers;
484 const std::vector<double> m_PSParams;
487 std::vector<double> m_PSDerivedParams;
490 std::vector<Models::VarInit> m_PSVarInitialisers;
493 std::vector<VarLocation> m_WUVarLocation;
496 std::vector<VarLocation> m_WUPreVarLocation;
499 std::vector<VarLocation> m_WUPostVarLocation;
502 std::vector<VarLocation> m_WUExtraGlobalParamLocation;
505 std::vector<VarLocation> m_PSVarLocation;
508 std::vector<VarLocation> m_PSExtraGlobalParamLocation;
520 std::vector<VarLocation> m_ConnectivityExtraGlobalParamLocation;
524 std::string m_FusedPSVarSuffix;
528 std::string m_FusedWUPreVarSuffix;
532 std::string m_FusedWUPostVarSuffix;
536 std::string m_FusedPreOutputSuffix;
540 std::string m_PSTargetVar;
544 std::string m_PreTargetVar;
Definition: neuronGroupInternal.h:9
VarLocation getInSynLocation() const
Get variable mode used for variables used to combine input from this synapse group.
Definition: synapseGroup.h:134
void setFusedWUPreVarSuffix(const std::string &suffix)
Definition: synapseGroup.h:296
NeuronGroupInternal * getSrcNeuronGroup()
Definition: synapseGroup.h:287
VarLocation getPSVarLocation(size_t index) const
Get location of postsynaptic model state variable.
Definition: synapseGroup.h:218
const PostsynapticModels::Base * getPSModel() const
Definition: synapseGroup.h:177
const std::vector< Models::VarInit > & getWUVarInitialisers() const
Definition: synapseGroup.h:172
VarLocation
< Flags defining which memory space variables should be allocated in
Definition: variableMode.h:10
bool isWUPreModelFused() const
Definition: synapseGroup.h:158
Definition: initSparseConnectivitySnippet.h:81
const std::vector< Models::VarInit > & getWUPostVarInitialisers() const
Definition: synapseGroup.h:174
const std::string & getPSTargetVar() const
Get name of neuron input variable postsynaptic model will target.
Definition: synapseGroup.h:230
#define GENN_EXPORT
Definition: gennExport.h:13
unsigned int getNumThreadsPerSpike() const
Definition: synapseGroup.h:123
bool isPSModelFused() const
Has this synapse group's postsynaptic model been fused with those from other synapse groups...
Definition: synapseGroup.h:153
unsigned int getDelaySteps() const
Definition: synapseGroup.h:124
Definition: initToeplitzConnectivitySnippet.h:66
VarLocation getWUExtraGlobalParamLocation(size_t index) const
Get location of weight update model extra global parameter by index.
Definition: synapseGroup.h:212
const std::vector< Models::VarInit > & getWUPreVarInitialisers() const
Definition: synapseGroup.h:173
Base class for all postsynaptic models.
Definition: postsynapticModels.h:23
SpanType
Definition: synapseGroup.h:33
const std::vector< double > & getWUDerivedParams() const
Definition: synapseGroup.h:308
bool isEventThresholdReTestRequired() const
Definition: synapseGroup.h:315
NeuronGroupInternal * getTrgNeuronGroup()
Definition: synapseGroup.h:288
Definition: synapseGroupInternal.h:9
const SynapseGroupInternal * getWeightSharingMaster() const
Does the event threshold needs to be retested in the synapse kernel?
Definition: synapseGroup.h:311
const std::vector< Models::VarInit > & getPSVarInitialisers() const
Definition: synapseGroup.h:180
Base class for all weight update models.
Definition: weightUpdateModels.h:46
unsigned int getBackPropDelaySteps() const
Definition: synapseGroup.h:125
const std::vector< unsigned int > & getKernelSize() const
Definition: synapseGroup.h:130
VarLocation getWUPreVarLocation(size_t index) const
Get location of weight update model presynaptic state variable by index.
Definition: synapseGroup.h:198
Definition: synapseGroup.h:24
const std::string & getFusedWUPostVarSuffix() const
Definition: synapseGroup.h:319
void setInSynVarLocation(VarLocation loc)
Set location of variables used to combine input from this synapse group.
Definition: synapseGroup.h:83
const InitSparseConnectivitySnippet::Init & getConnectivityInitialiser() const
Definition: synapseGroup.h:183
const std::string & getFusedPSVarSuffix() const
Definition: synapseGroup.h:317
void setEventThresholdReTestRequired(bool req)
Definition: synapseGroup.h:290
const std::vector< double > & getPSParams() const
Definition: synapseGroup.h:179
bool areWUVarReferencedByCustomUpdate() const
Are any of this synapse group's weight update model variables referenced by a custom update...
Definition: synapseGroup.h:323
const NeuronGroupInternal * getSrcNeuronGroup() const
Definition: synapseGroup.h:305
VarLocation getWUPostVarLocation(size_t index) const
Get location of weight update model postsynaptic state variable by index.
Definition: synapseGroup.h:204
void setFusedWUPostVarSuffix(const std::string &suffix)
Definition: synapseGroup.h:297
unsigned int getMaxDendriticDelayTimesteps() const
Definition: synapseGroup.h:128
VarLocation getPSExtraGlobalParamLocation(size_t index) const
Get location of postsynaptic model extra global parameter by index.
Definition: synapseGroup.h:226
bool isWUPostModelFused() const
Definition: synapseGroup.h:163
VarLocation getDendriticDelayLocation() const
Get variable mode used for this synapse group's dendritic delay buffers.
Definition: synapseGroup.h:140
const std::string & getName() const
Definition: synapseGroup.h:120
void setFusedPreOutputSuffix(const std::string &suffix)
Definition: synapseGroup.h:298
const std::vector< double > & getWUParams() const
Definition: synapseGroup.h:171
bool isWeightSharingSlave() const
Is this synapse group a weight-sharing slave.
Definition: synapseGroup.h:149
SynapseMatrixType
Supported combinations of SynapticMatrixConnectivity and SynapticMatrixWeight.
Definition: synapseMatrixType.h:27
const InitToeplitzConnectivitySnippet::Init & getToeplitzConnectivityInitialiser() const
Definition: synapseGroup.h:184
SynapseMatrixType getMatrixType() const
Definition: synapseGroup.h:129
void setFusedPSVarSuffix(const std::string &suffix)
Definition: synapseGroup.h:295
SpanType getSpanType() const
Definition: synapseGroup.h:122
void setDendriticDelayLocation(VarLocation loc)
Set variable mode used for this synapse group's dendritic delay buffers.
Definition: synapseGroup.h:90
const std::string & getFusedPreOutputSuffix() const
Definition: synapseGroup.h:320
const WeightUpdateModels::Base * getWUModel() const
Definition: synapseGroup.h:169
const std::string & getFusedWUPreVarSuffix() const
Definition: synapseGroup.h:318
const NeuronGroupInternal * getTrgNeuronGroup() const
Definition: synapseGroup.h:306
const std::string & getPreTargetVar() const
Get name of neuron input variable which a presynaptic output specified with will target...
Definition: synapseGroup.h:234
void setWUVarReferencedByCustomUpdate(bool ref)
Set if any of this synapse group's weight update model variables referenced by a custom update...
Definition: synapseGroup.h:293
const std::vector< double > & getPSDerivedParams() const
Definition: synapseGroup.h:309