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
5fd7cfbc
Commit
5fd7cfbc
authored
Jun 13, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnn: add runtime parameter OPENCV_DNN_BACKEND_DEFAULT
to control DNN_BACKEND_DEFAULT enumeration value behavior
parent
1c2ee8a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
dnn.cpp
modules/dnn/src/dnn.cpp
+11
-5
No files found.
modules/dnn/src/dnn.cpp
View file @
5fd7cfbc
...
...
@@ -66,6 +66,15 @@ static bool DNN_DISABLE_MEMORY_OPTIMIZATIONS = utils::getConfigurationParameterB
static
bool
DNN_OPENCL_ALLOW_ALL_DEVICES
=
utils
::
getConfigurationParameterBool
(
"OPENCV_DNN_OPENCL_ALLOW_ALL_DEVICES"
,
false
);
#endif
static
int
PARAM_DNN_BACKEND_DEFAULT
=
(
int
)
utils
::
getConfigurationParameterSizeT
(
"OPENCV_DNN_BACKEND_DEFAULT"
,
#ifdef HAVE_INF_ENGINE
(
size_t
)
DNN_BACKEND_INFERENCE_ENGINE
#else
(
size_t
)
DNN_BACKEND_OPENCV
#endif
);
using
std
::
vector
;
using
std
::
map
;
using
std
::
make_pair
;
...
...
@@ -851,11 +860,8 @@ struct Net::Impl
CV_TRACE_FUNCTION
();
if
(
preferableBackend
==
DNN_BACKEND_DEFAULT
)
#ifdef HAVE_INF_ENGINE
preferableBackend
=
DNN_BACKEND_INFERENCE_ENGINE
;
#else
preferableBackend
=
DNN_BACKEND_OPENCV
;
#endif
preferableBackend
=
(
Backend
)
PARAM_DNN_BACKEND_DEFAULT
;
CV_Assert
(
preferableBackend
!=
DNN_BACKEND_OPENCV
||
preferableTarget
==
DNN_TARGET_CPU
||
preferableTarget
==
DNN_TARGET_OPENCL
||
...
...
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