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
f820e172
Commit
f820e172
authored
Jan 09, 2012
by
Peter Eastman
Browse files
Fixed compilation error when using double precision for CustomIntegrator
parent
9e4cf579
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
platforms/opencl/src/OpenCLKernels.cpp
platforms/opencl/src/OpenCLKernels.cpp
+6
-2
No files found.
platforms/opencl/src/OpenCLKernels.cpp
View file @
f820e172
...
@@ -3677,8 +3677,12 @@ void OpenCLIntegrateCustomStepKernel::execute(ContextImpl& context, CustomIntegr
...
@@ -3677,8 +3677,12 @@ void OpenCLIntegrateCustomStepKernel::execute(ContextImpl& context, CustomIntegr
compute
<<
createPerDofComputation
(
stepType
[
step
]
==
CustomIntegrator
::
ComputePerDof
?
variable
[
step
]
:
""
,
expression
[
step
],
i
,
integrator
);
compute
<<
createPerDofComputation
(
stepType
[
step
]
==
CustomIntegrator
::
ComputePerDof
?
variable
[
step
]
:
""
,
expression
[
step
],
i
,
integrator
);
string
convert
=
(
cl
.
getSupportsDoublePrecision
()
?
"convert_float4("
:
"("
);
string
convert
=
(
cl
.
getSupportsDoublePrecision
()
?
"convert_float4("
:
"("
);
if
(
variable
[
step
]
==
"x"
)
{
if
(
variable
[
step
]
==
"x"
)
{
if
(
storePosAsDelta
[
step
])
if
(
storePosAsDelta
[
step
])
{
compute
<<
"posDelta[index] = "
<<
convert
<<
"position-posq[index]);
\n
"
;
if
(
cl
.
getSupportsDoublePrecision
())
compute
<<
"posDelta[index] = convert_float4(position-convert_double4(posq[index]));
\n
"
;
else
compute
<<
"posDelta[index] = position-posq[index];
\n
"
;
}
else
else
compute
<<
"posq[index] = "
<<
convert
<<
"position);
\n
"
;
compute
<<
"posq[index] = "
<<
convert
<<
"position);
\n
"
;
}
}
...
...
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