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
55634c1f
Commit
55634c1f
authored
Dec 30, 2013
by
Konstantin Matskevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a70a8e86
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
ocl.hpp
modules/core/include/opencv2/core/ocl.hpp
+1
-0
ocl.cpp
modules/core/src/ocl.cpp
+10
-0
clahe.cpp
modules/imgproc/src/clahe.cpp
+3
-1
No files found.
modules/core/include/opencv2/core/ocl.hpp
View file @
55634c1f
...
...
@@ -489,6 +489,7 @@ public:
bool
runTask
(
bool
sync
,
const
Queue
&
q
=
Queue
());
size_t
workGroupSize
()
const
;
size_t
preferedWorkGroupSizeMultiple
()
const
;
bool
compileWorkGroupSize
(
size_t
wsz
[])
const
;
size_t
localMemSize
()
const
;
...
...
modules/core/src/ocl.cpp
View file @
55634c1f
...
...
@@ -2813,6 +2813,16 @@ size_t Kernel::workGroupSize() const
sizeof
(
val
),
&
val
,
&
retsz
)
>=
0
?
val
:
0
;
}
size_t
Kernel
::
preferedWorkGroupSizeMultiple
()
const
{
if
(
!
p
)
return
0
;
size_t
val
=
0
,
retsz
=
0
;
cl_device_id
dev
=
(
cl_device_id
)
Device
::
getDefault
().
ptr
();
return
clGetKernelWorkGroupInfo
(
p
->
handle
,
dev
,
CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
,
sizeof
(
val
),
&
val
,
&
retsz
)
>=
0
?
val
:
0
;
}
bool
Kernel
::
compileWorkGroupSize
(
size_t
wsz
[])
const
{
if
(
!
p
||
!
wsz
)
...
...
modules/imgproc/src/clahe.cpp
View file @
55634c1f
...
...
@@ -51,12 +51,14 @@ namespace clahe
const
int
tilesX
,
const
int
tilesY
,
const
cv
::
Size
tileSize
,
const
int
clipLimit
,
const
float
lutScale
)
{
cv
::
ocl
::
Kernel
_k
(
"calcLut"
,
cv
::
ocl
::
imgproc
::
clahe_oclsrc
);
bool
is_cpu
=
cv
::
ocl
::
Device
::
getDefault
().
type
()
==
cv
::
ocl
::
Device
::
TYPE_CPU
;
cv
::
String
opts
;
if
(
is_cpu
)
opts
=
"-D CPU "
;
else
opts
=
cv
::
format
(
"-D WAVE_SIZE=%d"
,
cv
::
ocl
::
Device
::
getDefault
().
maxWorkGroupSiz
e
());
opts
=
cv
::
format
(
"-D WAVE_SIZE=%d"
,
_k
.
preferedWorkGroupSizeMultipl
e
());
cv
::
ocl
::
Kernel
k
(
"calcLut"
,
cv
::
ocl
::
imgproc
::
clahe_oclsrc
,
opts
);
if
(
k
.
empty
())
...
...
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