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
b45e0d8e
Commit
b45e0d8e
authored
Jan 11, 2012
by
Peter Eastman
Browse files
Computing energy without forces caused the array of forces to be overwritten
parent
5f95295e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
platforms/opencl/src/OpenCLKernels.cpp
platforms/opencl/src/OpenCLKernels.cpp
+1
-2
No files found.
platforms/opencl/src/OpenCLKernels.cpp
View file @
b45e0d8e
...
...
@@ -107,8 +107,7 @@ void OpenCLCalcForcesAndEnergyKernel::beginComputation(ContextImpl& context, boo
double
OpenCLCalcForcesAndEnergyKernel
::
finishComputation
(
ContextImpl
&
context
,
bool
includeForces
,
bool
includeEnergy
)
{
cl
.
getBondedUtilities
().
computeInteractions
();
cl
.
getNonbondedUtilities
().
computeInteractions
();
if
(
includeForces
)
cl
.
reduceForces
();
cl
.
reduceForces
();
double
sum
=
0.0
f
;
if
(
includeEnergy
)
{
OpenCLArray
<
cl_float
>&
energy
=
cl
.
getEnergyBuffer
();
...
...
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