GeNN
1.1
GPU enhanced Neuronal Networks (GeNN)
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Macros
Pages
extra_neurons.h
Go to the documentation of this file.
1
2
3
// Add new neuron type - LIntF:
4
n.varNames.clear();
5
n.varTypes.clear();
6
7
n.varNames.push_back(
tS
(
"V"
));
8
n.varTypes.push_back(
tS
(
"float"
));
9
n.varNames.push_back(
tS
(
"V_NB"
));
10
n.varTypes.push_back(
tS
(
"float"
));
11
n.varNames.push_back(
tS
(
"tSpike_NB"
));
12
n.varTypes.push_back(
tS
(
"float"
));
13
n.varNames.push_back(
tS
(
"__regime_val"
));
14
n.varTypes.push_back(
tS
(
"int"
));
15
n.pNames.clear();
16
17
n.pNames.push_back(
tS
(
"VReset_NB"
));
18
n.pNames.push_back(
tS
(
"VThresh_NB"
));
19
n.pNames.push_back(
tS
(
"tRefrac_NB"
));
20
n.pNames.push_back(
tS
(
"VRest_NB"
));
21
n.pNames.push_back(
tS
(
"TAUm_NB"
));
22
n.pNames.push_back(
tS
(
"Cm_NB"
));
23
n.dpNames.clear();
24
25
n.simCode =
tS
(
" \
26
$(V) = -1000000; \
27
if ($(__regime_val)==1) { \n \
28
$(V_NB) += (Isyn_NB/$(Cm_NB)+($(VRest_NB)-$(V_NB))/$(TAUm_NB))*DT; \n \
29
if ($(V_NB)>$(VThresh_NB)) { \n \
30
$(V_NB) = $(VReset_NB); \n \
31
$(tSpike_NB) = t; \n \
32
$(V) = 100000; \
33
$(__regime_val) = 2; \n \
34
} \n \
35
} \n \
36
if ($(__regime_val)==2) { \n \
37
if (t-$(tSpike_NB) > $(tRefrac_NB)) { \n \
38
$(__regime_val) = 1; \n \
39
} \n \
40
} \n \
41
"
);
42
43
nModels
.push_back(n);
44
45
46
47
// Add new neuron type - regular spike:
48
n.varNames.clear();
49
n.varTypes.clear();
50
51
n.varNames.push_back(
tS
(
"V"
));
52
n.varTypes.push_back(
tS
(
"float"
));
53
n.varNames.push_back(
tS
(
"count_t_NB"
));
54
n.varTypes.push_back(
tS
(
"float"
));
55
n.varNames.push_back(
tS
(
"__regime_val"
));
56
n.varTypes.push_back(
tS
(
"int"
));
57
n.pNames.clear();
58
59
n.pNames.push_back(
tS
(
"max_t_NB"
));
60
n.dpNames.clear();
61
62
n.simCode =
tS
(
" \
63
$(V) = -1000000; \
64
if ($(__regime_val)==1) { \n \
65
$(count_t_NB) += (1)*DT; \n \
66
if ($(count_t_NB) > $(max_t_NB)-0.0001) { \n \
67
$(count_t_NB) = 0; \n \
68
$(V) = 100000; \
69
$(__regime_val) = 1; \n \
70
} \n \
71
} \n \
72
"
);
73
74
nModels
.push_back(n);
75
76
77
78
// Add new neuron type - LInt:
79
n.varNames.clear();
80
n.varTypes.clear();
81
82
n.varNames.push_back(
tS
(
"V"
));
83
n.varTypes.push_back(
tS
(
"float"
));
84
n.varNames.push_back(
tS
(
"V_NB"
));
85
n.varTypes.push_back(
tS
(
"float"
));
86
n.varNames.push_back(
tS
(
"tSpike_NB"
));
87
n.varTypes.push_back(
tS
(
"float"
));
88
n.varNames.push_back(
tS
(
"__regime_val"
));
89
n.varTypes.push_back(
tS
(
"int"
));
90
n.pNames.clear();
91
92
n.pNames.push_back(
tS
(
"VReset_NB"
));
93
n.pNames.push_back(
tS
(
"VThresh_NB"
));
94
n.pNames.push_back(
tS
(
"tRefrac_NB"
));
95
n.pNames.push_back(
tS
(
"VRest_NB"
));
96
n.pNames.push_back(
tS
(
"TAUm_NB"
));
97
n.pNames.push_back(
tS
(
"Cm_NB"
));
98
n.dpNames.clear();
99
100
n.simCode =
tS
(
" \
101
$(V) = -1000000; \
102
if ($(__regime_val)==1) { \n \
103
$(V_NB) += (Isyn_NB/$(Cm_NB)+($(VRest_NB)-$(V_NB))/$(TAUm_NB))*DT; \n \
104
if ($(V_NB)>$(VThresh_NB)) { \n \
105
$(V_NB) = $(VReset_NB); \n \
106
$(tSpike_NB) = t; \n \
107
$(V) = 100000; \
108
$(__regime_val) = 2; \n \
109
} \n \
110
} \n \
111
if ($(__regime_val)==2) { \n \
112
if (t-$(tSpike_NB) > $(tRefrac_NB)) { \n \
113
$(__regime_val) = 1; \n \
114
} \n \
115
} \n \
116
"
);
117
118
nModels
.push_back(n);
119
120
tS
#define tS(X)
Macro providing the abbreviated syntax tS() instead of toString().
Definition:
toString.h:43
nModels
vector< neuronModel > nModels
Global c++ vector containing all neuron model descriptions.
Definition:
utils.h:166
lib
include
extra_neurons.h
Generated on Tue Aug 19 2014 17:57:23 for GeNN by
1.8.6