Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
38cf0a69
Commit
38cf0a69
authored
Jul 01, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Jul 01, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1055 from pengx17:2.4_ocl_hang_workaround
parents
a4c38196
b2da1cdc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
24 deletions
+2
-24
initialization.cpp
modules/ocl/src/initialization.cpp
+2
-24
No files found.
modules/ocl/src/initialization.cpp
View file @
38cf0a69
...
...
@@ -198,7 +198,8 @@ namespace cv
if
(
clCmdQueue
)
{
openCLSafeCall
(
clReleaseCommandQueue
(
clCmdQueue
));
//temporarily disable command queue release as it causes program hang at exit
//openCLSafeCall(clReleaseCommandQueue(clCmdQueue));
clCmdQueue
=
0
;
}
...
...
@@ -1075,26 +1076,3 @@ namespace cv
}
//namespace ocl
}
//namespace cv
#if defined BUILD_SHARED_LIBS && defined CVAPI_EXPORTS && defined WIN32 && !defined WINCE
#include <windows.h>
BOOL
WINAPI
DllMain
(
HINSTANCE
,
DWORD
fdwReason
,
LPVOID
);
BOOL
WINAPI
DllMain
(
HINSTANCE
,
DWORD
fdwReason
,
LPVOID
)
{
if
(
fdwReason
==
DLL_PROCESS_DETACH
)
{
// application hangs if call clReleaseCommandQueue here, so release context only
// without context release application hangs as well
context_tear_down
=
1
;
Context
*
cv_ctx
=
Context
::
getContext
();
if
(
cv_ctx
)
{
cl_context
ctx
=
cv_ctx
->
impl
->
oclcontext
;
if
(
ctx
)
openCLSafeCall
(
clReleaseContext
(
ctx
));
}
}
return
TRUE
;
}
#endif
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