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
7f15ec9d
Commit
7f15ec9d
authored
Oct 14, 2013
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Oct 14, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1617 from ilya-lavrenov:ocl_info
parents
9e12306d
ca260284
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
2 deletions
+33
-2
opencl_dumpinfo.hpp
modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp
+33
-2
No files found.
modules/ocl/include/opencv2/ocl/private/opencl_dumpinfo.hpp
View file @
7f15ec9d
...
...
@@ -51,6 +51,35 @@
#define DUMP_INFO_XML(...)
#endif
#include <sstream>
static
std
::
string
bytesToStringRepr
(
size_t
value
)
{
size_t
b
=
value
%
1024
;
value
/=
1024
;
size_t
kb
=
value
%
1024
;
value
/=
1024
;
size_t
mb
=
value
%
1024
;
value
/=
1024
;
size_t
gb
=
value
;
std
::
ostringstream
stream
;
if
(
gb
>
0
)
stream
<<
gb
<<
" GB "
;
if
(
mb
>
0
)
stream
<<
mb
<<
" MB "
;
if
(
kb
>
0
)
stream
<<
kb
<<
" kB "
;
if
(
b
>
0
)
stream
<<
b
<<
" B"
;
return
stream
.
str
();
}
static
void
dumpOpenCLDevice
()
{
using
namespace
cv
::
ocl
;
...
...
@@ -79,10 +108,12 @@ static void dumpOpenCLDevice()
DUMP_INFO_STDOUT
(
"Max work group size"
,
deviceInfo
.
maxWorkGroupSize
);
DUMP_INFO_XML
(
"cv_ocl_maxWorkGroupSize"
,
deviceInfo
.
maxWorkGroupSize
);
DUMP_INFO_STDOUT
(
"Local memory size"
,
deviceInfo
.
localMemorySize
);
std
::
string
localMemorySizeStr
=
bytesToStringRepr
(
deviceInfo
.
localMemorySize
);
DUMP_INFO_STDOUT
(
"Local memory size"
,
localMemorySizeStr
.
c_str
());
DUMP_INFO_XML
(
"cv_ocl_localMemorySize"
,
deviceInfo
.
localMemorySize
);
DUMP_INFO_STDOUT
(
"Max memory allocation size"
,
deviceInfo
.
maxMemAllocSize
);
std
::
string
maxMemAllocSizeStr
=
bytesToStringRepr
(
deviceInfo
.
maxMemAllocSize
);
DUMP_INFO_STDOUT
(
"Max memory allocation size"
,
maxMemAllocSizeStr
.
c_str
());
DUMP_INFO_XML
(
"cv_ocl_maxMemAllocSize"
,
deviceInfo
.
maxMemAllocSize
);
const
char
*
doubleSupportStr
=
deviceInfo
.
haveDoubleSupport
?
"Yes"
:
"No"
;
...
...
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