Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
c6df2891
Unverified
Commit
c6df2891
authored
Mar 13, 2018
by
peastman
Committed by
GitHub
Mar 13, 2018
Browse files
Merge pull request #2016 from peastman/nan
Fixed uninitialized memory
parents
2305f05f
98b4d1b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
platforms/cpu/src/CpuGBSAOBCForce.cpp
platforms/cpu/src/CpuGBSAOBCForce.cpp
+8
-2
No files found.
platforms/cpu/src/CpuGBSAOBCForce.cpp
View file @
c6df2891
...
@@ -143,7 +143,10 @@ void CpuGBSAOBCForce::threadComputeForce(ThreadPool& threads, int threadIndex) {
...
@@ -143,7 +143,10 @@ void CpuGBSAOBCForce::threadComputeForce(ThreadPool& threads, int threadIndex) {
break
;
break
;
int
numInBlock
=
min
(
4
,
numParticles
-
blockStart
);
int
numInBlock
=
min
(
4
,
numParticles
-
blockStart
);
ivec4
blockAtomIndex
(
blockStart
,
blockStart
+
1
,
blockStart
+
2
,
blockStart
+
3
);
ivec4
blockAtomIndex
(
blockStart
,
blockStart
+
1
,
blockStart
+
2
,
blockStart
+
3
);
float
atomRadius
[
4
],
atomx
[
4
],
atomy
[
4
],
atomz
[
4
];
float
atomRadius
[
4
]
=
{
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
};
float
atomx
[
4
]
=
{
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
};
float
atomy
[
4
]
=
{
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
};
float
atomz
[
4
]
=
{
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
};
int
blockMask
[
4
]
=
{
0
,
0
,
0
,
0
};
int
blockMask
[
4
]
=
{
0
,
0
,
0
,
0
};
for
(
int
i
=
0
;
i
<
numInBlock
;
i
++
)
{
for
(
int
i
=
0
;
i
<
numInBlock
;
i
++
)
{
int
atomIndex
=
blockStart
+
i
;
int
atomIndex
=
blockStart
+
i
;
...
@@ -242,7 +245,10 @@ void CpuGBSAOBCForce::threadComputeForce(ThreadPool& threads, int threadIndex) {
...
@@ -242,7 +245,10 @@ void CpuGBSAOBCForce::threadComputeForce(ThreadPool& threads, int threadIndex) {
break
;
break
;
int
numInBlock
=
min
(
4
,
numParticles
-
blockStart
);
int
numInBlock
=
min
(
4
,
numParticles
-
blockStart
);
ivec4
blockAtomIndex
(
blockStart
,
blockStart
+
1
,
blockStart
+
2
,
blockStart
+
3
);
ivec4
blockAtomIndex
(
blockStart
,
blockStart
+
1
,
blockStart
+
2
,
blockStart
+
3
);
float
atomCharge
[
4
],
atomx
[
4
],
atomy
[
4
],
atomz
[
4
];
float
atomCharge
[
4
]
=
{
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
};
float
atomx
[
4
]
=
{
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
};
float
atomy
[
4
]
=
{
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
};
float
atomz
[
4
]
=
{
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
};
int
blockMask
[
4
]
=
{
0
,
0
,
0
,
0
};
int
blockMask
[
4
]
=
{
0
,
0
,
0
,
0
};
fvec4
blockAtomForceX
(
0.0
f
),
blockAtomForceY
(
0.0
f
),
blockAtomForceZ
(
0.0
f
),
blockAtomBornForce
(
0.0
f
);
fvec4
blockAtomForceX
(
0.0
f
),
blockAtomForceY
(
0.0
f
),
blockAtomForceZ
(
0.0
f
),
blockAtomBornForce
(
0.0
f
);
for
(
int
i
=
0
;
i
<
numInBlock
;
i
++
)
{
for
(
int
i
=
0
;
i
<
numInBlock
;
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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