GeNN  3.3.0
GPU enhanced Neuronal Networks (GeNN)
StandardSubstitutions Namespace Reference

Functions

void postSynapseApplyInput (std::string &psCode, const SynapseGroup *sg, const NeuronGroup &ng, const VarNameIterCtx &nmVars, const DerivedParamNameIterCtx &nmDerivedParams, const ExtraGlobalParamNameIterCtx &nmExtraGlobalParams, const std::vector< FunctionTemplate > &functions, const std::string &ftype, const std::string &rng)
 Applies standard set of variable substitutions to postsynaptic model's "apply input" code. More...
 
void postSynapseDecay (std::string &pdCode, const SynapseGroup *sg, const NeuronGroup &ng, const VarNameIterCtx &nmVars, const DerivedParamNameIterCtx &nmDerivedParams, const ExtraGlobalParamNameIterCtx &nmExtraGlobalParams, const std::vector< FunctionTemplate > &functions, const std::string &ftype, const std::string &rng)
 Name of the RNG to use for any probabilistic operations. More...
 
void neuronThresholdCondition (std::string &thCode, const NeuronGroup &ng, const VarNameIterCtx &nmVars, const DerivedParamNameIterCtx &nmDerivedParams, const ExtraGlobalParamNameIterCtx &nmExtraGlobalParams, const std::vector< FunctionTemplate > &functions, const std::string &ftype, const std::string &rng)
 Applies standard set of variable substitutions to neuron model's "threshold condition" code. More...
 
void neuronSim (std::string &sCode, const NeuronGroup &ng, const VarNameIterCtx &nmVars, const DerivedParamNameIterCtx &nmDerivedParams, const ExtraGlobalParamNameIterCtx &nmExtraGlobalParams, const std::vector< FunctionTemplate > &functions, const std::string &ftype, const std::string &rng)
 
void neuronSpikeEventCondition (std::string &eCode, const NeuronGroup &ng, const VarNameIterCtx &nmVars, const ExtraGlobalParamNameIterCtx &nmExtraGlobalParams, const std::vector< FunctionTemplate > &functions, const std::string &ftype, const std::string &rng)
 
void neuronReset (std::string &rCode, const NeuronGroup &ng, const VarNameIterCtx &nmVars, const DerivedParamNameIterCtx &nmDerivedParams, const ExtraGlobalParamNameIterCtx &nmExtraGlobalParams, const std::vector< FunctionTemplate > &functions, const std::string &ftype, const std::string &rng)
 
void weightUpdateThresholdCondition (std::string &eCode, const SynapseGroup &sg, const DerivedParamNameIterCtx &wuDerivedParams, const ExtraGlobalParamNameIterCtx &wuExtraGlobalParams, const string &preIdx, const string &postIdx, const string &devPrefix, const std::vector< FunctionTemplate > &functions, const std::string &ftype, double dt)
 
void weightUpdateSim (std::string &wCode, const SynapseGroup &sg, const VarNameIterCtx &wuVars, const VarNameIterCtx &wuPreVars, const VarNameIterCtx &wuPostVars, const DerivedParamNameIterCtx &wuDerivedParams, const ExtraGlobalParamNameIterCtx &wuExtraGlobalParams, const string &preIdx, const string &postIdx, const string &devPrefix, const std::vector< FunctionTemplate > &functions, const std::string &ftype, double dt)
 
void weightUpdateDynamics (std::string &SDcode, const SynapseGroup *sg, const VarNameIterCtx &wuVars, const VarNameIterCtx &wuPreVars, const VarNameIterCtx &wuPostVars, const DerivedParamNameIterCtx &wuDerivedParams, const ExtraGlobalParamNameIterCtx &wuExtraGlobalParams, const string &preIdx, const string &postIdx, const string &devPrefix, const std::vector< FunctionTemplate > &functions, const std::string &ftype, double dt)
 
void weightUpdatePostLearn (std::string &code, const SynapseGroup *sg, const VarNameIterCtx &wuPreVars, const VarNameIterCtx &wuPostVars, const DerivedParamNameIterCtx &wuDerivedParams, const ExtraGlobalParamNameIterCtx &wuExtraGlobalParams, const string &preIdx, const string &postIdx, const string &devPrefix, const std::vector< FunctionTemplate > &functions, const std::string &ftype, double dt, const string &preVarPrefix="", const string &preVarSuffix="", const string &postVarPrefix="", const string &postVarSuffix="")
 suffix to be used for postsynaptic variable accesses - typically combined with prefix to wrap in function call such as __ldg(&XXX) More...
 
void weightUpdatePreSpike (std::string &code, const SynapseGroup *sg, const string &preIdx, const string &devPrefix, const std::vector< FunctionTemplate > &functions, const std::string &ftype)
 
void weightUpdatePostSpike (std::string &code, const SynapseGroup *sg, const string &postIdx, const string &devPrefix, const std::vector< FunctionTemplate > &functions, const std::string &ftype)
 
std::string initNeuronVariable (const NewModels::VarInit &varInit, const std::string &varName, const std::vector< FunctionTemplate > &functions, const std::string &idx, const std::string &ftype, const std::string &rng)
 
std::string initWeightUpdateVariable (const NewModels::VarInit &varInit, const std::string &varName, const std::vector< FunctionTemplate > &functions, const std::string &preIdx, const std::string &postIdx, const std::string &ftype, const std::string &rng)
 
std::string initSparseConnectivity (const SynapseGroup &sg, const std::string &addSynapseFunctionTemplate, unsigned int numTrgNeurons, const std::string &preIdx, const std::vector< FunctionTemplate > &functions, const std::string &ftype, const std::string &rng)
 
void currentSourceInjection (std::string &code, const CurrentSource *sc, const VarNameIterCtx &scmVars, const DerivedParamNameIterCtx &scmDerivedParams, const ExtraGlobalParamNameIterCtx &scmExtraGlobalParams, const std::vector< FunctionTemplate > &functions, const std::string &ftype, const std::string &rng)
 

Function Documentation

◆ currentSourceInjection()

void StandardSubstitutions::currentSourceInjection ( std::string &  code,
const CurrentSource sc,
const VarNameIterCtx scmVars,
const DerivedParamNameIterCtx scmDerivedParams,
const ExtraGlobalParamNameIterCtx scmExtraGlobalParams,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
const std::string &  rng 
)

◆ initNeuronVariable()

std::string StandardSubstitutions::initNeuronVariable ( const NewModels::VarInit varInit,
const std::string &  varName,
const std::vector< FunctionTemplate > &  functions,
const std::string &  idx,
const std::string &  ftype,
const std::string &  rng 
)

◆ initSparseConnectivity()

std::string StandardSubstitutions::initSparseConnectivity ( const SynapseGroup sg,
const std::string &  addSynapseFunctionTemplate,
unsigned int  numTrgNeurons,
const std::string &  preIdx,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
const std::string &  rng 
)

◆ initWeightUpdateVariable()

std::string StandardSubstitutions::initWeightUpdateVariable ( const NewModels::VarInit varInit,
const std::string &  varName,
const std::vector< FunctionTemplate > &  functions,
const std::string &  preIdx,
const std::string &  postIdx,
const std::string &  ftype,
const std::string &  rng 
)

◆ neuronReset()

void StandardSubstitutions::neuronReset ( std::string &  rCode,
const NeuronGroup ng,
const VarNameIterCtx nmVars,
const DerivedParamNameIterCtx nmDerivedParams,
const ExtraGlobalParamNameIterCtx nmExtraGlobalParams,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
const std::string &  rng 
)

◆ neuronSim()

void StandardSubstitutions::neuronSim ( std::string &  sCode,
const NeuronGroup ng,
const VarNameIterCtx nmVars,
const DerivedParamNameIterCtx nmDerivedParams,
const ExtraGlobalParamNameIterCtx nmExtraGlobalParams,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
const std::string &  rng 
)

◆ neuronSpikeEventCondition()

void StandardSubstitutions::neuronSpikeEventCondition ( std::string &  eCode,
const NeuronGroup ng,
const VarNameIterCtx nmVars,
const ExtraGlobalParamNameIterCtx nmExtraGlobalParams,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
const std::string &  rng 
)

◆ neuronThresholdCondition()

void StandardSubstitutions::neuronThresholdCondition ( std::string &  thCode,
const NeuronGroup ng,
const VarNameIterCtx nmVars,
const DerivedParamNameIterCtx nmDerivedParams,
const ExtraGlobalParamNameIterCtx nmExtraGlobalParams,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
const std::string &  rng 
)

Applies standard set of variable substitutions to neuron model's "threshold condition" code.

◆ postSynapseApplyInput()

void StandardSubstitutions::postSynapseApplyInput ( std::string &  psCode,
const SynapseGroup sg,
const NeuronGroup ng,
const VarNameIterCtx nmVars,
const DerivedParamNameIterCtx nmDerivedParams,
const ExtraGlobalParamNameIterCtx nmExtraGlobalParams,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
const std::string &  rng 
)

Applies standard set of variable substitutions to postsynaptic model's "apply input" code.

Parameters
psCodethe code string to work on
ngSynapse group postsynaptic model is used in
nmVarsThe postsynaptic neuron group
ftypeAppropriate array of platform-specific function templates used to implement platform-specific functions e.g. gennrand_uniform
rngFloating point type used by model e.g. "float"

◆ postSynapseDecay()

void StandardSubstitutions::postSynapseDecay ( std::string &  pdCode,
const SynapseGroup sg,
const NeuronGroup ng,
const VarNameIterCtx nmVars,
const DerivedParamNameIterCtx nmDerivedParams,
const ExtraGlobalParamNameIterCtx nmExtraGlobalParams,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
const std::string &  rng 
)

Name of the RNG to use for any probabilistic operations.

Applies standard set of variable substitutions to postsynaptic model's "decay" code

◆ weightUpdateDynamics()

void StandardSubstitutions::weightUpdateDynamics ( std::string &  SDcode,
const SynapseGroup sg,
const VarNameIterCtx wuVars,
const VarNameIterCtx wuPreVars,
const VarNameIterCtx wuPostVars,
const DerivedParamNameIterCtx wuDerivedParams,
const ExtraGlobalParamNameIterCtx wuExtraGlobalParams,
const string &  preIdx,
const string &  postIdx,
const string &  devPrefix,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
double  dt 
)
Parameters
preIdxindex of the pre-synaptic neuron to be accessed for _pre variables; differs for different Span)
postIdxindex of the post-synaptic neuron to be accessed for _post variables; differs for different Span)

◆ weightUpdatePostLearn()

void StandardSubstitutions::weightUpdatePostLearn ( std::string &  code,
const SynapseGroup sg,
const VarNameIterCtx wuPreVars,
const VarNameIterCtx wuPostVars,
const DerivedParamNameIterCtx wuDerivedParams,
const ExtraGlobalParamNameIterCtx wuExtraGlobalParams,
const string &  preIdx,
const string &  postIdx,
const string &  devPrefix,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
double  dt,
const string &  preVarPrefix = "",
const string &  preVarSuffix = "",
const string &  postVarPrefix = "",
const string &  postVarSuffix = "" 
)

suffix to be used for postsynaptic variable accesses - typically combined with prefix to wrap in function call such as __ldg(&XXX)

Parameters
preIdxindex of the pre-synaptic neuron to be accessed for _pre variables; differs for different Span)
postIdxindex of the post-synaptic neuron to be accessed for _post variables; differs for different Span)
preVarPrefixprefix to be used for presynaptic variable accesses - typically combined with suffix to wrap in function call such as __ldg(&XXX)
preVarSuffixsuffix to be used for presynaptic variable accesses - typically combined with prefix to wrap in function call such as __ldg(&XXX)
postVarPrefixprefix to be used for postsynaptic variable accesses - typically combined with suffix to wrap in function call such as __ldg(&XXX)
postVarSuffixsuffix to be used for postsynaptic variable accesses - typically combined with prefix to wrap in function call such as __ldg(&XXX)

◆ weightUpdatePostSpike()

void StandardSubstitutions::weightUpdatePostSpike ( std::string &  code,
const SynapseGroup sg,
const string &  postIdx,
const string &  devPrefix,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype 
)
Parameters
postIdxindex of the post-synaptic neuron to be accessed for _post variables; differs for different Span)

◆ weightUpdatePreSpike()

void StandardSubstitutions::weightUpdatePreSpike ( std::string &  code,
const SynapseGroup sg,
const string &  preIdx,
const string &  devPrefix,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype 
)
Parameters
preIdxindex of the pre-synaptic neuron to be accessed for _pre variables; differs for different Span)

◆ weightUpdateSim()

void StandardSubstitutions::weightUpdateSim ( std::string &  wCode,
const SynapseGroup sg,
const VarNameIterCtx wuVars,
const VarNameIterCtx wuPreVars,
const VarNameIterCtx wuPostVars,
const DerivedParamNameIterCtx wuDerivedParams,
const ExtraGlobalParamNameIterCtx wuExtraGlobalParams,
const string &  preIdx,
const string &  postIdx,
const string &  devPrefix,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
double  dt 
)
Parameters
preIdxindex of the pre-synaptic neuron to be accessed for _pre variables; differs for different Span)
postIdxindex of the post-synaptic neuron to be accessed for _post variables; differs for different Span)

◆ weightUpdateThresholdCondition()

void StandardSubstitutions::weightUpdateThresholdCondition ( std::string &  eCode,
const SynapseGroup sg,
const DerivedParamNameIterCtx wuDerivedParams,
const ExtraGlobalParamNameIterCtx wuExtraGlobalParams,
const string &  preIdx,
const string &  postIdx,
const string &  devPrefix,
const std::vector< FunctionTemplate > &  functions,
const std::string &  ftype,
double  dt 
)
Parameters
preIdxindex of the pre-synaptic neuron to be accessed for _pre variables; differs for different Span)
postIdxindex of the post-synaptic neuron to be accessed for _post variables; differs for different Span)