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
e6b18fc4
Commit
e6b18fc4
authored
Jun 14, 2013
by
peng xiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug caused by NDEBUG macro; it is now removed.
Revise some descriptions of the enums.
parent
c8398c9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
ocl.hpp
modules/ocl/include/opencv2/ocl/ocl.hpp
+13
-8
initialization.cpp
modules/ocl/src/initialization.cpp
+1
-1
No files found.
modules/ocl/include/opencv2/ocl/ocl.hpp
View file @
e6b18fc4
...
...
@@ -179,16 +179,21 @@ namespace cv
bool
cleanUp
=
true
);
//! Enable or disable OpenCL program binary caching onto local disk
// After a program (*.cl files in opencl/ folder) is built at runtime, we allow the compiled program to be
// cached onto local disk automatically, which may accelerate subsequent runs.
// Caching mode is controlled by the following enum
// Note, the feature is by default enabled when OpenCV is built in release mode.
// After a program (*.cl files in opencl/ folder) is built at runtime, we allow the
// compiled OpenCL program to be cached to the path automatically as "path/*.clb"
// binary file, which will be reused when the OpenCV executable is started again.
//
// Caching mode is controlled by the following enums
// Notes
// 1. the feature is by default enabled when OpenCV is built in release mode.
// 2. the CACHE_DEBUG / CACHE_RELEASE flags only effectively work with MSVC compiler;
// for GNU compilers, the function always treats the build as release mode (enabled by default).
enum
{
CACHE_NONE
=
0
,
CACHE_DEBUG
=
0x1
<<
0
,
CACHE_RELEASE
=
0x1
<<
1
,
CACHE_ALL
=
CACHE_DEBUG
|
CACHE_RELEASE
,
CACHE_NONE
=
0
,
// do not cache OpenCL binary
CACHE_DEBUG
=
0x1
<<
0
,
// cache OpenCL binary when built in debug mode (only work with MSVC)
CACHE_RELEASE
=
0x1
<<
1
,
// default behavior, only cache when built in release mode (only work with MSVC)
CACHE_ALL
=
CACHE_DEBUG
|
CACHE_RELEASE
,
// always cache opencl binary
CACHE_UPDATE
=
0x1
<<
2
// if the binary cache file with the same name is already on the disk, it will be updated.
};
CV_EXPORTS
void
setBinaryDiskCache
(
int
mode
=
CACHE_RELEASE
,
cv
::
String
path
=
"./"
);
...
...
modules/ocl/src/initialization.cpp
View file @
e6b18fc4
...
...
@@ -508,7 +508,7 @@ namespace cv
{
impl
->
update_disk_cache
=
(
mode
&
CACHE_UPDATE
)
==
CACHE_UPDATE
;
impl
->
enable_disk_cache
=
#if
!defined(NDEBUG) || defined(_DEBUG)
#if
def _DEBUG
(
mode
&
CACHE_DEBUG
)
==
CACHE_DEBUG
;
#else
(
mode
&
CACHE_RELEASE
)
==
CACHE_RELEASE
;
...
...
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