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
3d36f904
Commit
3d36f904
authored
Mar 12, 2020
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opencv_version: dump threads information
parent
3a99ebb4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
opencv_version.cpp
apps/version/opencv_version.cpp
+23
-0
No files found.
apps/version/opencv_version.cpp
View file @
3d36f904
...
...
@@ -14,6 +14,11 @@
#include <windows.h>
#endif
// defined in core/private.hpp
namespace
cv
{
CV_EXPORTS
const
char
*
currentParallelFramework
();
}
static
void
dumpHWFeatures
(
bool
showAll
=
false
)
{
std
::
cout
<<
"OpenCV's HW features list:"
<<
std
::
endl
;
...
...
@@ -34,6 +39,16 @@ static void dumpHWFeatures(bool showAll = false)
std
::
cout
<<
"Total available: "
<<
count
<<
std
::
endl
;
}
static
void
dumpParallelFramework
()
{
const
char
*
parallelFramework
=
cv
::
currentParallelFramework
();
if
(
parallelFramework
)
{
int
threads
=
cv
::
getNumThreads
();
std
::
cout
<<
"Parallel framework: "
<<
parallelFramework
<<
" (nthreads="
<<
threads
<<
")"
<<
std
::
endl
;
}
}
int
main
(
int
argc
,
const
char
**
argv
)
{
CV_TRACE_FUNCTION
();
...
...
@@ -47,6 +62,7 @@ int main(int argc, const char** argv)
"{ verbose v | | show build configuration log }"
"{ opencl | | show information about OpenCL (available platforms/devices, default selected device) }"
"{ hw | | show detected HW features (see cv::checkHardwareSupport() function). Use --hw=0 to show available features only }"
"{ threads | | show configured parallel framework and number of active threads }"
);
if
(
parser
.
has
(
"help"
))
...
...
@@ -73,10 +89,17 @@ int main(int argc, const char** argv)
{
dumpHWFeatures
(
parser
.
get
<
bool
>
(
"hw"
));
}
if
(
parser
.
has
(
"threads"
))
{
dumpParallelFramework
();
}
#else
std
::
cout
<<
cv
::
getBuildInformation
().
c_str
()
<<
std
::
endl
;
cv
::
dumpOpenCLInformation
();
dumpHWFeatures
();
dumpParallelFramework
();
MessageBoxA
(
NULL
,
"Check console window output"
,
"OpenCV("
CV_VERSION
")"
,
MB_ICONINFORMATION
|
MB_OK
);
#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