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
3940b616
Commit
3940b616
authored
Mar 17, 2014
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove intel guard since the code is 2 times faster on AMD too
parent
836635d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
perf_filters.cpp
modules/ocl/perf/perf_filters.cpp
+3
-3
filtering.cpp
modules/ocl/src/filtering.cpp
+3
-3
filtering_sep_filter_singlepass.cl
modules/ocl/src/opencl/filtering_sep_filter_singlepass.cl
+2
-0
No files found.
modules/ocl/perf/perf_filters.cpp
View file @
3940b616
...
...
@@ -262,13 +262,13 @@ OCL_PERF_TEST_P(SobelFixture, Sobel,
oclDst
.
download
(
dst
);
SANITY_CHECK
(
dst
);
SANITY_CHECK
(
dst
,
1e-3
);
}
else
if
(
RUN_PLAIN_IMPL
)
{
TEST_CYCLE
()
cv
::
Sobel
(
src
,
dst
,
-
1
,
dx
,
dy
);
SANITY_CHECK
(
dst
);
SANITY_CHECK
(
dst
,
1e-3
);
}
else
OCL_PERF_ELSE
...
...
@@ -326,7 +326,7 @@ OCL_PERF_TEST_P(GaussianBlurFixture, GaussianBlur,
Mat
src
(
srcSize
,
type
),
dst
(
srcSize
,
type
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
const
double
eps
=
src
.
depth
()
==
CV_8U
?
1
+
DBL_EPSILON
:
3
e-4
;
const
double
eps
=
src
.
depth
()
==
CV_8U
?
1
+
DBL_EPSILON
:
5
e-4
;
if
(
RUN_OCL_IMPL
)
{
...
...
modules/ocl/src/filtering.cpp
View file @
3940b616
...
...
@@ -774,12 +774,12 @@ static void sepFilter2D_SinglePass(const oclMat &src, oclMat &dst,
option
+=
" -D KERNEL_MATRIX_X="
;
for
(
int
i
=
0
;
i
<
row_kernel
.
rows
;
i
++
)
option
+=
cv
::
format
(
"
0x%x,
"
,
*
reinterpret_cast
<
const
unsigned
int
*>
(
&
row_kernel
.
at
<
float
>
(
i
)
)
);
option
+=
cv
::
format
(
"
DIG(0x%x)
"
,
*
reinterpret_cast
<
const
unsigned
int
*>
(
&
row_kernel
.
at
<
float
>
(
i
)
)
);
option
+=
"0x0"
;
option
+=
" -D KERNEL_MATRIX_Y="
;
for
(
int
i
=
0
;
i
<
col_kernel
.
rows
;
i
++
)
option
+=
cv
::
format
(
"
0x%x,
"
,
*
reinterpret_cast
<
const
unsigned
int
*>
(
&
col_kernel
.
at
<
float
>
(
i
)
)
);
option
+=
cv
::
format
(
"
DIG(0x%x)
"
,
*
reinterpret_cast
<
const
unsigned
int
*>
(
&
col_kernel
.
at
<
float
>
(
i
)
)
);
option
+=
"0x0"
;
switch
(
src
.
type
())
...
...
@@ -1410,7 +1410,7 @@ Ptr<FilterEngine_GPU> cv::ocl::createSeparableLinearFilter_GPU(int srcType, int
//if image size is non-degenerate and large enough
//and if filter support is reasonable to satisfy larger local memory requirements,
//then we can use single pass routine to avoid extra runtime calls overhead
if
(
clCxt
&&
clCxt
->
supportsFeature
(
FEATURE_CL_INTEL_DEVICE
)
&&
if
(
clCxt
&&
rowKernel
.
rows
<=
21
&&
columnKernel
.
rows
<=
21
&&
(
rowKernel
.
rows
&
1
)
==
1
&&
(
columnKernel
.
rows
&
1
)
==
1
&&
imgSize
.
width
>
optimizedSepFilterLocalSize
+
(
rowKernel
.
rows
>>
1
)
&&
...
...
modules/ocl/src/opencl/filtering_sep_filter_singlepass.cl
View file @
3940b616
...
...
@@ -84,6 +84,8 @@
#define DST(_x,_y) (((global DSTTYPE*)(Dst+DstOffset+(_y)*DstPitch))[_x])
#define DIG(a) a,
//horizontal and vertical filter kernels
//should be defined on host during compile time to avoid overhead
__constant uint mat_kernelX[] = {KERNEL_MATRIX_X};
...
...
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