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
394551cc
Commit
394551cc
authored
Feb 04, 2016
by
peastman
Browse files
Merge pull request #1382 from peastman/temptype
Fixed compilation error in double precision mode
parents
4beb144e
e726c909
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
platforms/cuda/src/CudaExpressionUtilities.cpp
platforms/cuda/src/CudaExpressionUtilities.cpp
+4
-4
platforms/opencl/include/OpenCLExpressionUtilities.h
platforms/opencl/include/OpenCLExpressionUtilities.h
+1
-1
platforms/opencl/src/OpenCLExpressionUtilities.cpp
platforms/opencl/src/OpenCLExpressionUtilities.cpp
+4
-4
No files found.
platforms/cuda/src/CudaExpressionUtilities.cpp
View file @
394551cc
...
...
@@ -351,7 +351,7 @@ void CudaExpressionUtilities::processExpression(stringstream& out, const Express
break
;
}
case
Operation
::
POWER
:
out
<<
"pow("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
", "
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
out
<<
"pow(
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
",
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
break
;
case
Operation
::
NEGATE
:
out
<<
"-"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
);
...
...
@@ -488,14 +488,14 @@ void CudaExpressionUtilities::processExpression(stringstream& out, const Express
out
<<
"}"
;
}
else
out
<<
"pow("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
", "
<<
context
.
doubleToString
(
exponent
)
<<
")"
;
out
<<
"pow(
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
",
("
<<
tempType
<<
")
"
<<
context
.
doubleToString
(
exponent
)
<<
")"
;
break
;
}
case
Operation
::
MIN
:
out
<<
"min("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
", "
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
out
<<
"min(
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
",
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
break
;
case
Operation
::
MAX
:
out
<<
"max("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
", "
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
out
<<
"max(
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
",
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
break
;
case
Operation
::
ABS
:
out
<<
"fabs("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
...
...
platforms/opencl/include/OpenCLExpressionUtilities.h
View file @
394551cc
...
...
@@ -74,7 +74,7 @@ public:
*/
std
::
string
createExpressions
(
const
std
::
map
<
std
::
string
,
Lepton
::
ParsedExpression
>&
expressions
,
const
std
::
vector
<
std
::
pair
<
Lepton
::
ExpressionTreeNode
,
std
::
string
>
>&
variables
,
const
std
::
vector
<
const
TabulatedFunction
*>&
functions
,
const
std
::
vector
<
std
::
pair
<
std
::
string
,
std
::
string
>
>&
functionNames
,
const
std
::
string
&
prefix
,
const
std
::
string
&
tempType
=
"
float
"
);
const
std
::
string
&
prefix
,
const
std
::
string
&
tempType
=
"
real
"
);
/**
* Calculate the spline coefficients for a tabulated function that appears in expressions.
*
...
...
platforms/opencl/src/OpenCLExpressionUtilities.cpp
View file @
394551cc
...
...
@@ -343,7 +343,7 @@ void OpenCLExpressionUtilities::processExpression(stringstream& out, const Expre
break
;
}
case
Operation
::
POWER
:
out
<<
"pow("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
", "
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
out
<<
"pow(
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
",
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
break
;
case
Operation
::
NEGATE
:
out
<<
"-"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
);
...
...
@@ -480,14 +480,14 @@ void OpenCLExpressionUtilities::processExpression(stringstream& out, const Expre
out
<<
"}"
;
}
else
out
<<
"pow("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
", "
<<
context
.
doubleToString
(
exponent
)
<<
")"
;
out
<<
"pow(
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
",
("
<<
tempType
<<
")
"
<<
context
.
doubleToString
(
exponent
)
<<
")"
;
break
;
}
case
Operation
::
MIN
:
out
<<
"min("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
", "
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
out
<<
"min(
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
",
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
break
;
case
Operation
::
MAX
:
out
<<
"max("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
", "
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
out
<<
"max(
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
",
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
1
],
temps
)
<<
")"
;
break
;
case
Operation
::
ABS
:
out
<<
"fabs("
<<
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