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
9b381947
Commit
9b381947
authored
May 09, 2018
by
peastman
Browse files
Fixed test failure in mixed precision mode
parent
cb92103e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
platforms/opencl/src/OpenCLExpressionUtilities.cpp
platforms/opencl/src/OpenCLExpressionUtilities.cpp
+5
-4
No files found.
platforms/opencl/src/OpenCLExpressionUtilities.cpp
View file @
9b381947
...
...
@@ -69,6 +69,7 @@ void OpenCLExpressionUtilities::processExpression(stringstream& out, const Expre
processExpression
(
out
,
node
.
getChildren
()[
i
],
temps
,
functions
,
functionNames
,
prefix
,
functionParams
,
allExpressions
,
tempType
);
string
name
=
prefix
+
context
.
intToString
(
temps
.
size
());
bool
hasRecordedNode
=
false
;
bool
isDouble
=
(
tempType
[
0
]
==
'd'
);
out
<<
tempType
<<
" "
<<
name
<<
" = "
;
switch
(
node
.
getOperation
().
getId
())
{
...
...
@@ -427,13 +428,13 @@ void OpenCLExpressionUtilities::processExpression(stringstream& out, const Expre
out
<<
"-"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
);
break
;
case
Operation
::
SQRT
:
out
<<
"sqrt("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
out
<<
(
isDouble
?
"sqrt("
:
"SQRT("
)
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
break
;
case
Operation
::
EXP
:
out
<<
"EXP("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
out
<<
(
isDouble
?
"exp("
:
"EXP("
)
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
break
;
case
Operation
::
LOG
:
out
<<
"LOG("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
out
<<
(
isDouble
?
"log("
:
"LOG("
)
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
break
;
case
Operation
::
SIN
:
out
<<
"sin("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
...
...
@@ -496,7 +497,7 @@ void OpenCLExpressionUtilities::processExpression(stringstream& out, const Expre
break
;
}
case
Operation
::
RECIPROCAL
:
out
<<
"RECIP("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
out
<<
(
isDouble
?
"1.0/("
:
"RECIP("
)
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
break
;
case
Operation
::
ADD_CONSTANT
:
out
<<
context
.
doubleToString
(
dynamic_cast
<
const
Operation
::
AddConstant
*>
(
&
node
.
getOperation
())
->
getValue
())
<<
"+"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
);
...
...
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