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
bd90425f
Commit
bd90425f
authored
Jun 22, 2015
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4136 from alalek:fix_matallocator_destruction
parents
a1cdbd4d
032b6322
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
matrix.cpp
modules/core/src/matrix.cpp
+6
-2
ocl.cpp
modules/core/src/ocl.cpp
+7
-2
No files found.
modules/core/src/matrix.cpp
View file @
bd90425f
...
...
@@ -222,10 +222,14 @@ public:
}
};
static
StdMatAllocator
*
mat_allocator
=
NULL
;
MatAllocator
*
Mat
::
getStdAllocator
()
{
static
StdMatAllocator
allocator
;
return
&
allocator
;
if
(
mat_allocator
==
NULL
)
{
mat_allocator
=
new
StdMatAllocator
();
}
return
mat_allocator
;
}
void
swap
(
Mat
&
a
,
Mat
&
b
)
...
...
modules/core/src/ocl.cpp
View file @
bd90425f
...
...
@@ -5237,10 +5237,15 @@ public:
MatAllocator
*
matStdAllocator
;
};
// This line should not force OpenCL runtime initialization! (don't put "new OpenCLAllocator()" here)
static
MatAllocator
*
ocl_allocator
=
NULL
;
MatAllocator
*
getOpenCLAllocator
()
{
static
MatAllocator
*
allocator
=
new
OpenCLAllocator
();
return
allocator
;
if
(
ocl_allocator
==
NULL
)
{
ocl_allocator
=
new
OpenCLAllocator
();
}
return
ocl_allocator
;
}
}}
// namespace cv::ocl
...
...
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