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
17c06daa
"...git@developer.sourcefind.cn:2222/OpenDAS/flashmla.git" did not exist on "c85c787e5c0a02dcca86f0f932dbfa39acfa8947"
Commit
17c06daa
authored
Jan 07, 2015
by
Peter Eastman
Browse files
Fixed some methods that should have been marked const
parent
e7eb7852
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
platforms/cuda/include/CudaContext.h
platforms/cuda/include/CudaContext.h
+5
-5
platforms/cuda/src/CudaContext.cpp
platforms/cuda/src/CudaContext.cpp
+2
-2
No files found.
platforms/cuda/include/CudaContext.h
View file @
17c06daa
...
@@ -352,30 +352,30 @@ public:
...
@@ -352,30 +352,30 @@ public:
/**
/**
* Get whether double precision is being used.
* Get whether double precision is being used.
*/
*/
bool
getUseDoublePrecision
()
{
bool
getUseDoublePrecision
()
const
{
return
useDoublePrecision
;
return
useDoublePrecision
;
}
}
/**
/**
* Get whether mixed precision is being used.
* Get whether mixed precision is being used.
*/
*/
bool
getUseMixedPrecision
()
{
bool
getUseMixedPrecision
()
const
{
return
useMixedPrecision
;
return
useMixedPrecision
;
}
}
/**
/**
* Get whether the periodic box is triclinic.
* Get whether the periodic box is triclinic.
*/
*/
bool
getBoxIsTriclinic
()
{
bool
getBoxIsTriclinic
()
const
{
return
boxIsTriclinic
;
return
boxIsTriclinic
;
}
}
/**
/**
* Convert a number to a string in a format suitable for including in a kernel.
* Convert a number to a string in a format suitable for including in a kernel.
* This takes into account whether the context uses single or double precision.
* This takes into account whether the context uses single or double precision.
*/
*/
std
::
string
doubleToString
(
double
value
);
std
::
string
doubleToString
(
double
value
)
const
;
/**
/**
* Convert a number to a string in a format suitable for including in a kernel.
* Convert a number to a string in a format suitable for including in a kernel.
*/
*/
std
::
string
intToString
(
int
value
);
std
::
string
intToString
(
int
value
)
const
;
/**
/**
* Convert a CUDA result code to the corresponding string description.
* Convert a CUDA result code to the corresponding string description.
*/
*/
...
...
platforms/cuda/src/CudaContext.cpp
View file @
17c06daa
...
@@ -594,7 +594,7 @@ void CudaContext::restoreDefaultStream() {
...
@@ -594,7 +594,7 @@ void CudaContext::restoreDefaultStream() {
setCurrentStream
(
0
);
setCurrentStream
(
0
);
}
}
string
CudaContext
::
doubleToString
(
double
value
)
{
string
CudaContext
::
doubleToString
(
double
value
)
const
{
stringstream
s
;
stringstream
s
;
s
.
precision
(
useDoublePrecision
?
16
:
8
);
s
.
precision
(
useDoublePrecision
?
16
:
8
);
s
<<
scientific
<<
value
;
s
<<
scientific
<<
value
;
...
@@ -603,7 +603,7 @@ string CudaContext::doubleToString(double value) {
...
@@ -603,7 +603,7 @@ string CudaContext::doubleToString(double value) {
return
s
.
str
();
return
s
.
str
();
}
}
string
CudaContext
::
intToString
(
int
value
)
{
string
CudaContext
::
intToString
(
int
value
)
const
{
stringstream
s
;
stringstream
s
;
s
<<
value
;
s
<<
value
;
return
s
.
str
();
return
s
.
str
();
...
...
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