32 #define POISSONNEURON 1
35 #define IZHIKEVICH_V 4
36 #define MAXNRN 5 // maximum number of neuron types: SpineML needs to know this
42 #define NGRADSYNAPSE 1
43 #define LEARN1SYNAPSE 2
44 #define USERDEFSYNAPSE 3
68 #define INDIVIDUALID 2
90 #define SPK_THRESH_STDP 0.0f
91 //#define MAXSPKCNT 50000
94 #define EXPDECAY 0 //default - how it is in the original version
95 #define IZHIKEVICH_PS 1 //empty postsynaptic rule for the Izhikevich model.
97 #define MAXPOSTSYN 2 // maximum number of postsynaptic integration: SpineML needs to know this
173 vector<vector<float> >
dnp;
175 vector<vector<unsigned int> >
inSyn;
205 vector<vector<float> >
dsp;
225 void setNeuronName(
unsigned int,
const string);
226 void setNeuronN(
unsigned int,
unsigned int);
227 void setNeuronType(
unsigned int,
unsigned int);
228 void setNeuronPara(
unsigned int,
float*);
229 void setNeuronIni(
unsigned int,
float*);
230 unsigned int findNeuronGrp(
const string);
231 void initDerivedNeuronPara(
unsigned int);
232 void initNeuronSpecs(
unsigned int);
238 void setSynapseName(
unsigned int,
const string);
239 void setSynapseType(
unsigned int,
unsigned int);
240 void setSynapseSource(
unsigned int,
unsigned int);
241 void setSynapseTarget(
unsigned int,
unsigned int);
242 void setSynapsePara(
unsigned int,
float*);
243 void setSynapseConnType(
unsigned int,
unsigned int);
244 void setSynapseGType(
unsigned int,
unsigned int);
245 unsigned int findSynapseGrp(
const string);
246 void initDerivedSynapsePara(
unsigned int);
247 void initDerivedPostSynapsePara(
unsigned int);
261 void checkSizes(
unsigned int *,
unsigned int *,
unsigned int *);
286 void addSynapsePopulation(
const string name,
unsigned int syntype,
unsigned int conntype,
unsigned int gtype,
const string src,
const string trg,
float *p) __attribute__ ((deprecated));
288 void addSynapsePopulation(
const char *,
unsigned int,
unsigned int,
unsigned int,
unsigned int,
unsigned int,
const char *,
const char *,
float *,
float *,
float *);
290 void addSynapsePopulation(
const string,
unsigned int,
unsigned int,
unsigned int,
unsigned int,
unsigned int,
const string,
const string,
float *,
float *,
float *);
int chooseGPUDevice
Definition: modelSpec.h:160
unsigned int synapseGrpN
Number of synapse groups.
Definition: modelSpec.h:192
void setSynapseG(const string, float)
Method for setting the conductance (g) value for a synapse population with "GLOBALG" charactertistic...
Definition: modelSpec.cc:453
vector< string > varNames
Names of the variables in the postsynaptic model.
Definition: modelSpec.h:134
vector< unsigned int > maxConn
Padded summed maximum number of connections for a neuron in the neuron groups.
Definition: modelSpec.h:196
vector< int > neuronHostID
The ID of the cluster node which the neuron groups are computed on.
Definition: modelSpec.h:179
vector< unsigned int > synapseSource
Presynaptic neuron groups.
Definition: modelSpec.h:201
void setName(const string)
Method to set the neuronal network model name.
Definition: modelSpec.cc:40
vector< string > pNames
Names of (independent) parameters of the model. These are assumed to be always of type "float"...
Definition: modelSpec.h:118
vector< unsigned int > synapseConnType
Connectivity type of synapses.
Definition: modelSpec.h:199
vector< string > extraGlobalNeuronKernelParameters
Additional parameter in the neuron kernel; it is translated to a population specific name but otherwi...
Definition: modelSpec.h:123
#define SYNTYPENO
Definition: modelSpec.h:38
void addSynapsePopulation(const string name, unsigned int syntype, unsigned int conntype, unsigned int gtype, const string src, const string trg, float *p) __attribute__((deprecated))
Overload of method for backwards compatibility.
Definition: modelSpec.cc:339
vector< unsigned int > padSumLearnN
Padded summed neuron numbers of learn group source populations.
Definition: modelSpec.h:213
vector< unsigned int > neuronN
Number of neurons in group.
Definition: modelSpec.h:167
Definition: modelSpec.h:147
vector< vector< unsigned int > > inSyn
The ids of the incoming synapse groups.
Definition: modelSpec.h:175
void setMaxConn(const string, unsigned int)
This function defines the maximum number of connections for a neuron in the population.
Definition: modelSpec.cc:525
void checkSizes(unsigned int *, unsigned int *, unsigned int *)
This function checks if the number of parameters and variables that are defined by the user are of co...
Definition: modelSpec.cc:300
vector< unsigned int > padSumSynapseTrgN
"Padded" summed target neuron numbers
Definition: modelSpec.h:195
unsigned int needSynapseDelay
Whether delayed synapse conductance is required in the network.
Definition: modelSpec.h:159
vector< unsigned int > lrnSynGrp
Enumeration of the IDs of synapse groups that learn.
Definition: modelSpec.h:214
vector< string > pNames
Names of (independent) parameters of the model. These are assumed to be always of type "float"...
Definition: modelSpec.h:136
vector< vector< float > > dsp
Derived synapse parameters.
Definition: modelSpec.h:205
vector< vector< float > > postSynapsePara
parameters of postsynapses
Definition: modelSpec.h:207
vector< int > receivesInputCurrent
flags whether neurons of a population receive explicit input currents
Definition: modelSpec.h:176
void setGPUDevice(int)
Method to choose the GPU to be used for the model. If "AUTODEVICE' (-1), GeNN will choose the device ...
Definition: modelSpec.cc:576
vector< unsigned int > padSumNeuronN
Padded summed neuron numbers.
Definition: modelSpec.h:169
string simCode
Code that defines the execution of one timestep of integration of the neuron model.
Definition: modelSpec.h:109
void addNeuronPopulation(const char *, unsigned int, unsigned int, float *, float *)
Method for adding a neuron population to a neuronal network model, using C style character array for ...
Definition: modelSpec.cc:244
vector< unsigned int > neuronType
Postsynaptic methods to the neuron.
Definition: modelSpec.h:171
Global header file containing a few global variables. Part of the code generation section...
vector< float > g0
Global synapse conductance if GLOBALG is chosen.
Definition: modelSpec.h:210
vector< string > tmpVarTypes
never used
Definition: modelSpec.h:117
vector< string > extraGlobalNeuronKernelParameterTypes
Additional parameters in the neuron kernel; they are translated to a population specific name but oth...
Definition: modelSpec.h:125
vector< unsigned int > sumSynapseTrgN
Summed naumber of target neurons.
Definition: modelSpec.h:194
vector< int > neuronDeviceID
The ID of the CUDA device which the neuron groups are comnputed on.
Definition: modelSpec.h:180
void setSynapseClusterIndex(const string synapseGroup, int hostID, int deviceID)
Function for setting which host and which device a synapse group will be simulated on...
Definition: modelSpec.cc:229
vector< string > dpNames
Names of dependent parameters of the model. These are assumed to be always of type "float"...
Definition: modelSpec.h:137
vector< string > tmpVarNames
never used
Definition: modelSpec.h:115
vector< int > synapseDeviceID
The ID of the CUDA device which the synapse groups are comnputed on.
Definition: modelSpec.h:217
vector< unsigned int > synapseTarget
Postsynaptic neuron groups.
Definition: modelSpec.h:202
dpclass()
Definition: modelSpec.h:101
void setNeuronClusterIndex(const string neuronGroup, int hostID, int deviceID)
Function for setting which host and which device a neuron group will be simulated on...
Definition: modelSpec.cc:197
vector< unsigned int > synapseInSynNo
IDs of the target neurons' incoming synapse variables for each synapse group.
Definition: modelSpec.h:203
unsigned int needSt
Whether last spike times are needed at all in this network model (related to STDP) ...
Definition: modelSpec.h:158
vector< string > neuronName
Names of neuron groups.
Definition: modelSpec.h:165
vector< unsigned int > neuronDelaySlots
The number of slots needed in the synapse delay queues of a neuron group.
Definition: modelSpec.h:178
string thresholdConditionCode
Code evaluating to a bool (e.g. "V > 20") that defines the condition for a true spike in the describe...
Definition: modelSpec.h:112
vector< unsigned int > sumNeuronN
Summed neuron numbers.
Definition: modelSpec.h:168
vector< float > nSpkEvntThreshold
Definition: modelSpec.h:185
Definition: modelSpec.h:99
unsigned int lrnGroups
Number of synapse groups with learning.
Definition: modelSpec.h:212
vector< string > varTypes
Types of the variable named above, e.g. "float". Names and types are matched by their order of occurr...
Definition: modelSpec.h:116
string postSyntoCurrent
Definition: modelSpec.h:132
Definition: modelSpec.h:130
string postSynDecay
Definition: modelSpec.h:133
string ftype
Numerical precision of the floating point variables.
Definition: modelSpec.h:156
vector< vector< float > > dnp
Derived neuron parameters.
Definition: modelSpec.h:173
vector< vector< float > > neuronIni
Initial values of neurons.
Definition: modelSpec.h:174
vector< vector< float > > neuronPara
Parameters of neurons.
Definition: modelSpec.h:172
virtual float calculateDerivedParameter(int index, vector< float > pars, float dt=1.0)
Definition: modelSpec.h:102
~NNmodel()
Definition: modelSpec.cc:36
void setPrecision(unsigned int)
This function sets the numerical precision of floating type variables. By default, it is float.
Definition: modelSpec.cc:502
vector< string > synapseName
Names of synapse groups.
Definition: modelSpec.h:191
vector< int > synapseHostID
The ID of the cluster node which the synapse groups are computed on.
Definition: modelSpec.h:216
string name
Name of the neuronal newtwork model.
Definition: modelSpec.h:155
dpclass * dps
Definition: modelSpec.h:138
vector< unsigned int > neuronPostSyn
Definition: modelSpec.h:170
void setConstInp(const string, float)
Method for setting the global input value for a neuron population if CONSTINP.
Definition: modelSpec.cc:467
vector< vector< float > > synapsePara
parameters of synapses
Definition: modelSpec.h:204
vector< unsigned int > neuronNeedSt
Whether last spike time needs to be saved for each indivual neuron type.
Definition: modelSpec.h:177
vector< vector< float > > dpsp
Derived postsynapse parameters.
Definition: modelSpec.h:209
vector< string > varTypes
Types of the variable named above, e.g. "float". Names and types are matched by their order of occurr...
Definition: modelSpec.h:135
vector< unsigned int > synapseGType
Type of specification method for synaptic conductance.
Definition: modelSpec.h:200
vector< vector< float > > postSynIni
Initial values of postsynaptic variables.
Definition: modelSpec.h:208
class (struct) for specifying a neuron model.
Definition: modelSpec.h:107
vector< unsigned int > postSynapseType
Types of synapses.
Definition: modelSpec.h:206
vector< unsigned int > synapseType
Types of synapses.
Definition: modelSpec.h:198
vector< unsigned int > padSumSynapseKrnl
Definition: modelSpec.h:197
NNmodel()
Definition: modelSpec.cc:24
vector< unsigned int > synapseDelay
Global synaptic conductance delay for the group (in time steps)
Definition: modelSpec.h:215
unsigned int SYNPNO[SYNTYPENO]
Global constant integer array containing the number of parameters of each of the predefined synapse t...
Definition: modelSpec.h:53
string resetCode
Code that defines the reset action taken after a spike occurred. This can be empty.
Definition: modelSpec.h:113
int valid
Flag for whether the model has been validated (unused?)
Definition: modelSpec.h:157
void resetPaddedSums()
Re-calculates the block-size-padded sum of threads needed to compute the groups of neurons and synaps...
Definition: modelSpec.cc:484
vector< string > varNames
Names of the variables in the neuron model.
Definition: modelSpec.h:114
void activateDirectInput(const string, unsigned int)
This function defines the type of the explicit input to the neuron model. Current options are common ...
Definition: modelSpec.cc:327
vector< float > globalInp
Global explicit input if CONSTINP is chosen.
Definition: modelSpec.h:211
unsigned int neuronGrpN
Number of neuron groups.
Definition: modelSpec.h:166
vector< string > dpNames
Names of dependent parameters of the model. These are assumed to be always of type "float"...
Definition: modelSpec.h:119
dpclass * dps
Definition: modelSpec.h:126