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
44175197
Commit
44175197
authored
Oct 10, 2013
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Oct 10, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1594 from ilya-lavrenov:ocl_perf
parents
ad1ba56f
39c1e5ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
105 additions
and
0 deletions
+105
-0
perf_arithm.cpp
modules/ocl/perf/perf_arithm.cpp
+105
-0
No files found.
modules/ocl/perf/perf_arithm.cpp
View file @
44175197
...
...
@@ -877,3 +877,108 @@ PERF_TEST_P(AddWeightedFixture, AddWeighted,
else
OCL_PERF_ELSE
}
///////////// Min ////////////////////////
typedef
Size_MatType
MinFixture
;
PERF_TEST_P
(
MinFixture
,
Min
,
::
testing
::
Combine
(
OCL_TYPICAL_MAT_SIZES
,
OCL_PERF_ENUM
(
CV_8UC1
,
CV_32FC1
)))
{
const
Size_MatType_t
params
=
GetParam
();
const
Size
srcSize
=
get
<
0
>
(
params
);
const
int
type
=
get
<
1
>
(
params
);
Mat
src1
(
srcSize
,
type
),
src2
(
srcSize
,
type
),
dst
(
srcSize
,
type
);
declare
.
in
(
src1
,
src2
,
WARMUP_RNG
).
out
(
dst
);
if
(
RUN_OCL_IMPL
)
{
ocl
::
oclMat
oclSrc1
(
src1
),
oclSrc2
(
src2
),
oclDst
(
srcSize
,
type
);
OCL_TEST_CYCLE
()
cv
::
ocl
::
min
(
oclSrc1
,
oclSrc2
,
oclDst
);
oclDst
.
download
(
dst
);
SANITY_CHECK
(
dst
);
}
else
if
(
RUN_PLAIN_IMPL
)
{
TEST_CYCLE
()
dst
=
cv
::
min
(
src1
,
src2
);
SANITY_CHECK
(
dst
);
}
else
OCL_PERF_ELSE
}
///////////// Max ////////////////////////
typedef
Size_MatType
MaxFixture
;
PERF_TEST_P
(
MaxFixture
,
Max
,
::
testing
::
Combine
(
OCL_TYPICAL_MAT_SIZES
,
OCL_PERF_ENUM
(
CV_8UC1
,
CV_32FC1
)))
{
const
Size_MatType_t
params
=
GetParam
();
const
Size
srcSize
=
get
<
0
>
(
params
);
const
int
type
=
get
<
1
>
(
params
);
Mat
src1
(
srcSize
,
type
),
src2
(
srcSize
,
type
),
dst
(
srcSize
,
type
);
declare
.
in
(
src1
,
src2
,
WARMUP_RNG
).
out
(
dst
);
if
(
RUN_OCL_IMPL
)
{
ocl
::
oclMat
oclSrc1
(
src1
),
oclSrc2
(
src2
),
oclDst
(
srcSize
,
type
);
OCL_TEST_CYCLE
()
cv
::
ocl
::
max
(
oclSrc1
,
oclSrc2
,
oclDst
);
oclDst
.
download
(
dst
);
SANITY_CHECK
(
dst
);
}
else
if
(
RUN_PLAIN_IMPL
)
{
TEST_CYCLE
()
dst
=
cv
::
max
(
src1
,
src2
);
SANITY_CHECK
(
dst
);
}
else
OCL_PERF_ELSE
}
///////////// Max ////////////////////////
typedef
Size_MatType
AbsFixture
;
PERF_TEST_P
(
AbsFixture
,
Abs
,
::
testing
::
Combine
(
OCL_TYPICAL_MAT_SIZES
,
OCL_PERF_ENUM
(
CV_8UC1
,
CV_32FC1
)))
{
const
Size_MatType_t
params
=
GetParam
();
const
Size
srcSize
=
get
<
0
>
(
params
);
const
int
type
=
get
<
1
>
(
params
);
Mat
src
(
srcSize
,
type
),
dst
(
srcSize
,
type
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
if
(
RUN_OCL_IMPL
)
{
ocl
::
oclMat
oclSrc
(
src
),
oclDst
(
srcSize
,
type
);
OCL_TEST_CYCLE
()
cv
::
ocl
::
abs
(
oclSrc
,
oclDst
);
oclDst
.
download
(
dst
);
SANITY_CHECK
(
dst
);
}
else
if
(
RUN_PLAIN_IMPL
)
{
TEST_CYCLE
()
dst
=
cv
::
abs
(
src
);
SANITY_CHECK
(
dst
);
}
else
OCL_PERF_ELSE
}
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