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
98b4d1b7
"platforms/vscode:/vscode.git/clone" did not exist on "a4f7077b27d2ae3ad8b8265b013a2a931983e11a"
Commit
98b4d1b7
authored
Mar 13, 2018
by
peastman
Browse files
Fixed uninitialized memory
parent
8bddf3fe
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 @
98b4d1b7
...
...
@@ -143,7 +143,10 @@ void CpuGBSAOBCForce::threadComputeForce(ThreadPool& threads, int threadIndex) {
break
;
int
numInBlock
=
min
(
4
,
numParticles
-
blockStart
);
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
};
for
(
int
i
=
0
;
i
<
numInBlock
;
i
++
)
{
int
atomIndex
=
blockStart
+
i
;
...
...
@@ -242,7 +245,10 @@ void CpuGBSAOBCForce::threadComputeForce(ThreadPool& threads, int threadIndex) {
break
;
int
numInBlock
=
min
(
4
,
numParticles
-
blockStart
);
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
};
fvec4
blockAtomForceX
(
0.0
f
),
blockAtomForceY
(
0.0
f
),
blockAtomForceZ
(
0.0
f
),
blockAtomBornForce
(
0.0
f
);
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