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
e726c909
Commit
e726c909
authored
Feb 04, 2016
by
Peter Eastman
Browse files
Fixed compilation error in double precision mode
parent
73a59c33
Changes
3
Hide 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 @
e726c909
...
@@ -351,7 +351,7 @@ void CudaExpressionUtilities::processExpression(stringstream& out, const Express
...
@@ -351,7 +351,7 @@ void CudaExpressionUtilities::processExpression(stringstream& out, const Express
break
;
break
;
}
}
case
Operation
::
POWER
:
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
;
break
;
case
Operation
::
NEGATE
:
case
Operation
::
NEGATE
:
out
<<
"-"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
);
out
<<
"-"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
);
...
@@ -488,14 +488,14 @@ void CudaExpressionUtilities::processExpression(stringstream& out, const Express
...
@@ -488,14 +488,14 @@ void CudaExpressionUtilities::processExpression(stringstream& out, const Express
out
<<
"}"
;
out
<<
"}"
;
}
}
else
else
out
<<
"pow("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
", "
<<
context
.
doubleToString
(
exponent
)
<<
")"
;
out
<<
"pow(
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
",
("
<<
tempType
<<
")
"
<<
context
.
doubleToString
(
exponent
)
<<
")"
;
break
;
break
;
}
}
case
Operation
::
MIN
:
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
;
break
;
case
Operation
::
MAX
:
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
;
break
;
case
Operation
::
ABS
:
case
Operation
::
ABS
:
out
<<
"fabs("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
out
<<
"fabs("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
...
...
platforms/opencl/include/OpenCLExpressionUtilities.h
View file @
e726c909
...
@@ -74,7 +74,7 @@ public:
...
@@ -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
,
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
::
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.
* Calculate the spline coefficients for a tabulated function that appears in expressions.
*
*
...
...
platforms/opencl/src/OpenCLExpressionUtilities.cpp
View file @
e726c909
...
@@ -343,7 +343,7 @@ void OpenCLExpressionUtilities::processExpression(stringstream& out, const Expre
...
@@ -343,7 +343,7 @@ void OpenCLExpressionUtilities::processExpression(stringstream& out, const Expre
break
;
break
;
}
}
case
Operation
::
POWER
:
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
;
break
;
case
Operation
::
NEGATE
:
case
Operation
::
NEGATE
:
out
<<
"-"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
);
out
<<
"-"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
);
...
@@ -480,14 +480,14 @@ void OpenCLExpressionUtilities::processExpression(stringstream& out, const Expre
...
@@ -480,14 +480,14 @@ void OpenCLExpressionUtilities::processExpression(stringstream& out, const Expre
out
<<
"}"
;
out
<<
"}"
;
}
}
else
else
out
<<
"pow("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
", "
<<
context
.
doubleToString
(
exponent
)
<<
")"
;
out
<<
"pow(
("
<<
tempType
<<
")
"
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
",
("
<<
tempType
<<
")
"
<<
context
.
doubleToString
(
exponent
)
<<
")"
;
break
;
break
;
}
}
case
Operation
::
MIN
:
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
;
break
;
case
Operation
::
MAX
:
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
;
break
;
case
Operation
::
ABS
:
case
Operation
::
ABS
:
out
<<
"fabs("
<<
getTempName
(
node
.
getChildren
()[
0
],
temps
)
<<
")"
;
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