Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MPIBP-Hummer
BioEM
Commits
27a1ff28
Commit
27a1ff28
authored
Apr 06, 2014
by
qon
Browse files
fix asynchronous GPU processing, synchronization was one step too late before
parent
6532f7f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
0%
Try again
or
attach a new 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