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
76780eef
Unverified
Commit
76780eef
authored
Oct 06, 2018
by
peastman
Committed by
GitHub
Oct 06, 2018
Browse files
Merge pull request #2182 from andysim/posqfix
Fix uninitialized variable when Coulomb terms are missing
parents
6fb038b9
63ea7033
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
platforms/cuda/src/CudaKernels.cpp
platforms/cuda/src/CudaKernels.cpp
+2
-2
platforms/opencl/src/OpenCLKernels.cpp
platforms/opencl/src/OpenCLKernels.cpp
+1
-2
No files found.
platforms/cuda/src/CudaKernels.cpp
View file @
76780eef
...
...
@@ -1628,8 +1628,8 @@ void CudaCalcNonbondedForceKernel::initialize(const System& system, const Nonbon
bool useCutoff = (nonbondedMethod != NoCutoff);
bool usePeriodic = (nonbondedMethod != NoCutoff && nonbondedMethod != CutoffNonPeriodic);
doLJPME = (nonbondedMethod == LJPME && hasLJ);
if (hasCoulomb)
usePosqCharges = cu.requestPosqCharges();
usePosqCharges = hasCoulomb ? cu.requestPosqCharges() : false;
map<string, string> defines;
defines["HAS_COULOMB"] = (hasCoulomb ? "1" : "0");
defines["HAS_LENNARD_JONES"] = (hasLJ ? "1" : "0");
...
...
platforms/opencl/src/OpenCLKernels.cpp
View file @
76780eef
...
...
@@ -1620,8 +1620,7 @@ void OpenCLCalcNonbondedForceKernel::initialize(const System& system, const Nonb
bool useCutoff = (nonbondedMethod != NoCutoff);
bool usePeriodic = (nonbondedMethod != NoCutoff && nonbondedMethod != CutoffNonPeriodic);
doLJPME = (nonbondedMethod == LJPME && hasLJ);
if (hasCoulomb)
usePosqCharges = cl.requestPosqCharges();
usePosqCharges = hasCoulomb ? cl.requestPosqCharges() : false;
map<string, string> defines;
defines["HAS_COULOMB"] = (hasCoulomb ? "1" : "0");
defines["HAS_LENNARD_JONES"] = (hasLJ ? "1" : "0");
...
...
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