Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
MPIBP-Hummer
BioEM
Commits
27a1ff28
Commit
27a1ff28
authored
Apr 06, 2014
by
qon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix asynchronous GPU processing, synchronization was one step too late before
parent
6532f7f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
bioem_cuda.cu
bioem_cuda.cu
+8
-2
No files found.
bioem_cuda.cu
View file @
27a1ff28
...
...
@@ -84,7 +84,6 @@ int bioem_cuda::compareRefMaps(int iProjectionOut, int iConv, const bioem_map& c
if
(
GPUAsync
)
{
checkCudaErrors
(
cudaEventSynchronize
(
cudaEvent
[
iConv
&
1
]));
checkCudaErrors
(
cudaEventRecord
(
cudaEvent
[
iConv
&
1
],
cudaStream
));
}
checkCudaErrors
(
cudaMemcpyAsync
(
pConvMap_device
[
iConv
&
1
],
&
conv_map
,
sizeof
(
bioem_map
),
cudaMemcpyHostToDevice
,
cudaStream
));
...
...
@@ -133,7 +132,14 @@ int bioem_cuda::compareRefMaps(int iProjectionOut, int iConv, const bioem_map& c
cout
<<
"Invalid GPU Algorithm selected
\n
"
;
exit
(
1
);
}
if
(
GPUAsync
==
0
)
checkCudaErrors
(
cudaStreamSynchronize
(
cudaStream
));
if
(
GPUAsync
)
{
checkCudaErrors
(
cudaEventRecord
(
cudaEvent
[
iConv
&
1
],
cudaStream
));
}
else
{
checkCudaErrors
(
cudaStreamSynchronize
(
cudaStream
));
}
return
(
0
);
}
...
...
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