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
7b0f018a
Commit
7b0f018a
authored
Oct 30, 2013
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocl: adjust worksize for filter2D and boxFilter
parent
8a4f1bbb
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
util.hpp
modules/ocl/include/opencv2/ocl/private/util.hpp
+4
-0
cl_operations.cpp
modules/ocl/src/cl_operations.cpp
+16
-4
filtering.cpp
modules/ocl/src/filtering.cpp
+0
-0
No files found.
modules/ocl/include/opencv2/ocl/private/util.hpp
View file @
7b0f018a
...
...
@@ -103,7 +103,11 @@ CV_EXPORTS cl_kernel openCLGetKernelFromSource(const Context *clCxt,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
);
CV_EXPORTS
cl_kernel
openCLGetKernelFromSource
(
const
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
const
char
*
build_options
);
CV_EXPORTS
cl_kernel
openCLGetKernelFromSource
(
Context
*
ctx
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
string
kernelName
,
int
channels
,
int
depth
,
const
char
*
build_options
);
CV_EXPORTS
void
openCLVerifyKernel
(
const
Context
*
clCxt
,
cl_kernel
kernel
,
size_t
*
localThreads
);
CV_EXPORTS
void
openCLExecuteKernel
(
Context
*
ctx
,
cl_kernel
kernel
,
size_t
globalThreads
[
3
],
size_t
localThreads
[
3
],
std
::
vector
<
std
::
pair
<
size_t
,
const
void
*>
>
&
args
);
CV_EXPORTS
void
openCLExecuteKernel
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
string
kernelName
,
std
::
vector
<
std
::
pair
<
size_t
,
const
void
*>
>
&
args
,
int
globalcols
,
int
globalrows
,
size_t
blockSize
=
16
,
int
kernel_expand_depth
=
-
1
,
int
kernel_expand_channel
=
-
1
);
CV_EXPORTS
void
openCLExecuteKernel_
(
Context
*
clCxt
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
std
::
string
kernelName
,
...
...
modules/ocl/src/cl_operations.cpp
View file @
7b0f018a
...
...
@@ -336,8 +336,7 @@ static std::string removeDuplicatedWhiteSpaces(const char * buildOptions)
return
opt
;
}
void
openCLExecuteKernel_
(
Context
*
ctx
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
string
kernelName
,
size_t
globalThreads
[
3
],
size_t
localThreads
[
3
],
vector
<
pair
<
size_t
,
const
void
*>
>
&
args
,
int
channels
,
cl_kernel
openCLGetKernelFromSource
(
Context
*
ctx
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
string
kernelName
,
int
channels
,
int
depth
,
const
char
*
build_options
)
{
//construct kernel name
...
...
@@ -350,10 +349,14 @@ void openCLExecuteKernel_(Context *ctx, const cv::ocl::ProgramEntry* source, str
idxStr
<<
"_D"
<<
depth
;
kernelName
+=
idxStr
.
str
();
cl_kernel
kernel
;
std
::
string
fixedOptions
=
removeDuplicatedWhiteSpaces
(
build_options
);
kernel
=
openCLGetKernelFromSource
(
ctx
,
source
,
kernelName
,
fixedOptions
.
c_str
());
cl_kernel
kernel
=
openCLGetKernelFromSource
(
ctx
,
source
,
kernelName
,
fixedOptions
.
c_str
());
return
kernel
;
}
void
openCLExecuteKernel
(
Context
*
ctx
,
cl_kernel
kernel
,
size_t
globalThreads
[
3
],
size_t
localThreads
[
3
],
vector
<
pair
<
size_t
,
const
void
*>
>
&
args
)
{
if
(
localThreads
!=
NULL
)
{
globalThreads
[
0
]
=
roundUp
(
globalThreads
[
0
],
localThreads
[
0
]);
...
...
@@ -399,6 +402,15 @@ void openCLExecuteKernel_(Context *ctx, const cv::ocl::ProgramEntry* source, str
openCLSafeCall
(
clReleaseKernel
(
kernel
));
}
void
openCLExecuteKernel_
(
Context
*
ctx
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
string
kernelName
,
size_t
globalThreads
[
3
],
size_t
localThreads
[
3
],
vector
<
pair
<
size_t
,
const
void
*>
>
&
args
,
int
channels
,
int
depth
,
const
char
*
build_options
)
{
cl_kernel
kernel
=
openCLGetKernelFromSource
(
ctx
,
source
,
kernelName
,
channels
,
depth
,
build_options
);
openCLExecuteKernel
(
ctx
,
kernel
,
globalThreads
,
localThreads
,
args
);
}
void
openCLExecuteKernel
(
Context
*
ctx
,
const
cv
::
ocl
::
ProgramEntry
*
source
,
string
kernelName
,
size_t
globalThreads
[
3
],
size_t
localThreads
[
3
],
vector
<
pair
<
size_t
,
const
void
*>
>
&
args
,
int
channels
,
int
depth
)
...
...
modules/ocl/src/filtering.cpp
View file @
7b0f018a
This diff is collapsed.
Click to expand it.
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