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
0ce8f1d5
Commit
0ce8f1d5
authored
Mar 13, 2014
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Mar 13, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2477 from alalek:ocl_cleanup_workarounds
parents
c5bf1c10
48196ad1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
ocl.cpp
modules/core/src/ocl.cpp
+13
-8
No files found.
modules/core/src/ocl.cpp
View file @
0ce8f1d5
...
...
@@ -2476,23 +2476,23 @@ const Device& Context::device(size_t idx) const
Context
&
Context
::
getDefault
(
bool
initialize
)
{
static
Context
ctx
;
if
(
!
ctx
.
p
&&
haveOpenCL
())
static
Context
*
ctx
=
new
Context
()
;
if
(
!
ctx
->
p
&&
haveOpenCL
())
{
if
(
!
ctx
.
p
)
ctx
.
p
=
new
Impl
();
if
(
!
ctx
->
p
)
ctx
->
p
=
new
Impl
();
if
(
initialize
)
{
// do not create new Context right away.
// First, try to retrieve existing context of the same type.
// In its turn, Platform::getContext() may call Context::create()
// if there is no such context.
if
(
ctx
.
p
->
handle
==
NULL
)
ctx
.
p
->
setDefault
();
if
(
ctx
->
p
->
handle
==
NULL
)
ctx
->
p
->
setDefault
();
}
}
return
ctx
;
return
*
ctx
;
}
Program
Context
::
getProg
(
const
ProgramSource
&
prog
,
...
...
@@ -3122,7 +3122,12 @@ struct Program::Impl
{
if
(
handle
)
{
clReleaseProgram
(
handle
);
#ifdef _WIN32
if
(
!
cv
::
__termination
)
#endif
{
clReleaseProgram
(
handle
);
}
handle
=
NULL
;
}
}
...
...
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