Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nmsdk-pulselib
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nmsdk
nmsdk-pulselib
Commits
47c8ebca0b8e
Commit
47c8ebca0b8e
authored
4 years ago
by
f.gundelakh
Browse files
Options
Downloads
Patches
Plain Diff
1) Added divide by zero checks.
2) Inputs processing fix. --HG-- branch : FixingIoRefactoring2
parent
73fe5ab3620f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Core/NPac.cpp
+1
-1
1 addition, 1 deletion
Core/NPac.cpp
Core/NPulseChannel.cpp
+1
-1
1 addition, 1 deletion
Core/NPulseChannel.cpp
Core/NPulseSynChannel.cpp
+2
-2
2 additions, 2 deletions
Core/NPulseSynChannel.cpp
with
4 additions
and
4 deletions
Core/NPac.cpp
+
1
−
1
View file @
47c8ebca
...
...
@@ -157,7 +157,7 @@ bool NPac::ACalculate(void)
if
(
Inputs
->
size
()
>
0
)
{
min_input_data_size
=
Inputs
[
0
]
->
GetCols
();
for
(
int
i
=
1
;
i
<
Num
Inputs
;
i
++
)
for
(
int
i
=
1
;
i
<
Inputs
->
size
()
;
i
++
)
if
(
min_input_data_size
>
Inputs
[
i
]
->
GetCols
())
min_input_data_size
=
Inputs
[
i
]
->
GetCols
();
}
...
...
This diff is collapsed.
Click to expand it.
Core/NPulseChannel.cpp
+
1
−
1
View file @
47c8ebca
...
...
@@ -237,7 +237,7 @@ bool NPulseChannel::ACalculate2(void)
channel_input
+=*
data
;
}
if
(
UseAveragePotential
)
if
(
UseAveragePotential
&&
full_inp_data_size
>
0
)
channel_input
/=
full_inp_data_size
;
}
...
...
This diff is collapsed.
Click to expand it.
Core/NPulseSynChannel.cpp
+
2
−
2
View file @
47c8ebca
...
...
@@ -326,7 +326,7 @@ bool NPulseSynChannel::ACalculate2(void)
}
NumConnectedSynapsis
=
num_connected_synapsis
;
if
(
UseAveragePotential
)
if
(
UseAveragePotential
&&
num_connected_channels
>
0
)
channel_input
/=
num_connected_channels
;
if
(
UseAverageSynapsis
&&
num_connected_synapsis
>
0
)
...
...
@@ -650,7 +650,7 @@ bool NContinuesSynChannel::ACalculate2(void)
}
NumConnectedSynapsis
=
num_connected_synapsis
;
if
(
UseAveragePotential
)
if
(
UseAveragePotential
&&
num_connected_channels
>
0
)
channel_input
/=
num_connected_channels
;
if
(
UseAverageSynapsis
&&
num_connected_synapsis
>
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment