Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gauthier Quesnel
irritator
Commits
3c9ec198
Commit
3c9ec198
authored
Nov 20, 2020
by
Gauthier Quesnel
Browse files
auditory: fix unsigned integer types in loop
parent
945b7d47
Pipeline
#21979
passed with stage
in 2 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/test/auditory.cpp
View file @
3c9ec198
...
...
@@ -198,7 +198,7 @@ struct synapse
};
struct
neuron
make_neuron
(
irt
::
simulation
*
sim
,
long
unsigned
in
t
i
)
noexcept
make_neuron
(
irt
::
simulation
*
sim
,
size_
t
i
)
noexcept
{
using
namespace
boost
::
ut
;
double
tau_lif
=
1.5
*
0.001
;
...
...
@@ -478,21 +478,21 @@ main()
irt
::
simulation
sim
;
// Neuron constants
long
unsigned
in
t
N
=
sound_data
.
size
();
long
unsigned
in
t
M
=
link_data
[
0
].
size
();
size_
t
N
=
sound_data
.
size
();
size_
t
M
=
link_data
[
0
].
size
();
expect
(
irt
::
is_success
(
sim
.
init
(
1000000lu
,
100000lu
)));
// Neurons
std
::
vector
<
struct
neuron
>
first_layer_neurons
;
for
(
long
unsigned
in
t
i
=
0
;
i
<
N
;
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
N
;
i
++
)
{
struct
neuron
neuron_model
=
make_neuron
(
&
sim
,
i
);
first_layer_neurons
.
emplace_back
(
neuron_model
);
}
std
::
vector
<
struct
neuron_adaptive
>
second_layer_neurons
;
for
(
long
unsigned
in
t
i
=
0
;
i
<
M
;
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
M
;
i
++
)
{
struct
neuron_adaptive
neuron_adaptive_model
=
make_neuron_adaptive
(
&
sim
);
...
...
@@ -500,8 +500,8 @@ main()
}
std
::
vector
<
struct
synapse
>
synapses
;
for
(
long
unsigned
in
t
i
=
0
;
i
<
N
;
i
++
)
{
for
(
long
unsigned
in
t
j
=
0
;
j
<
M
;
j
++
)
{
for
(
size_
t
i
=
0
;
i
<
N
;
i
++
)
{
for
(
size_
t
j
=
0
;
j
<
M
;
j
++
)
{
if
(
link_data
[
i
][
j
]
==
1.0
)
{
// printf("%ld is linked to %ld\n",i,j);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment