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
eded2c6c
Commit
eded2c6c
authored
Feb 26, 2013
by
Yutong Zhao
Browse files
No commit message
No commit message
parent
0637a4ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
platforms/cuda/src/CudaIntegrationUtilities.cpp
platforms/cuda/src/CudaIntegrationUtilities.cpp
+4
-0
platforms/opencl/src/OpenCLIntegrationUtilities.cpp
platforms/opencl/src/OpenCLIntegrationUtilities.cpp
+4
-0
No files found.
platforms/cuda/src/CudaIntegrationUtilities.cpp
View file @
eded2c6c
...
@@ -833,6 +833,8 @@ int CudaIntegrationUtilities::prepareRandomNumbers(int numValues) {
...
@@ -833,6 +833,8 @@ int CudaIntegrationUtilities::prepareRandomNumbers(int numValues) {
}
}
void
CudaIntegrationUtilities
::
createCheckpoint
(
ostream
&
stream
)
{
void
CudaIntegrationUtilities
::
createCheckpoint
(
ostream
&
stream
)
{
if
(
random
==
NULL
)
return
;
stream
.
write
((
char
*
)
&
randomPos
,
sizeof
(
int
));
stream
.
write
((
char
*
)
&
randomPos
,
sizeof
(
int
));
vector
<
float4
>
randomVec
;
vector
<
float4
>
randomVec
;
random
->
download
(
randomVec
);
random
->
download
(
randomVec
);
...
@@ -843,6 +845,8 @@ void CudaIntegrationUtilities::createCheckpoint(ostream& stream) {
...
@@ -843,6 +845,8 @@ void CudaIntegrationUtilities::createCheckpoint(ostream& stream) {
}
}
void
CudaIntegrationUtilities
::
loadCheckpoint
(
istream
&
stream
)
{
void
CudaIntegrationUtilities
::
loadCheckpoint
(
istream
&
stream
)
{
if
(
random
==
NULL
)
return
;
stream
.
read
((
char
*
)
&
randomPos
,
sizeof
(
int
));
stream
.
read
((
char
*
)
&
randomPos
,
sizeof
(
int
));
vector
<
float4
>
randomVec
(
random
->
getSize
());
vector
<
float4
>
randomVec
(
random
->
getSize
());
stream
.
read
((
char
*
)
&
randomVec
[
0
],
sizeof
(
float4
)
*
random
->
getSize
());
stream
.
read
((
char
*
)
&
randomVec
[
0
],
sizeof
(
float4
)
*
random
->
getSize
());
...
...
platforms/opencl/src/OpenCLIntegrationUtilities.cpp
View file @
eded2c6c
...
@@ -920,6 +920,8 @@ int OpenCLIntegrationUtilities::prepareRandomNumbers(int numValues) {
...
@@ -920,6 +920,8 @@ int OpenCLIntegrationUtilities::prepareRandomNumbers(int numValues) {
}
}
void
OpenCLIntegrationUtilities
::
createCheckpoint
(
ostream
&
stream
)
{
void
OpenCLIntegrationUtilities
::
createCheckpoint
(
ostream
&
stream
)
{
if
(
random
==
NULL
)
return
;
stream
.
write
((
char
*
)
&
randomPos
,
sizeof
(
int
));
stream
.
write
((
char
*
)
&
randomPos
,
sizeof
(
int
));
vector
<
mm_float4
>
randomVec
;
vector
<
mm_float4
>
randomVec
;
random
->
download
(
randomVec
);
random
->
download
(
randomVec
);
...
@@ -930,6 +932,8 @@ void OpenCLIntegrationUtilities::createCheckpoint(ostream& stream) {
...
@@ -930,6 +932,8 @@ void OpenCLIntegrationUtilities::createCheckpoint(ostream& stream) {
}
}
void
OpenCLIntegrationUtilities
::
loadCheckpoint
(
istream
&
stream
)
{
void
OpenCLIntegrationUtilities
::
loadCheckpoint
(
istream
&
stream
)
{
if
(
random
==
NULL
)
return
;
stream
.
read
((
char
*
)
&
randomPos
,
sizeof
(
int
));
stream
.
read
((
char
*
)
&
randomPos
,
sizeof
(
int
));
vector
<
mm_float4
>
randomVec
(
random
->
getSize
());
vector
<
mm_float4
>
randomVec
(
random
->
getSize
());
stream
.
read
((
char
*
)
&
randomVec
[
0
],
sizeof
(
mm_float4
)
*
random
->
getSize
());
stream
.
read
((
char
*
)
&
randomVec
[
0
],
sizeof
(
mm_float4
)
*
random
->
getSize
());
...
...
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