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
ee88cc2c
Commit
ee88cc2c
authored
Jan 23, 2014
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Jan 23, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2110 from hmax:master
parents
ba777199
d8e5f161
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
perf_arithm.cpp
modules/core/perf/perf_arithm.cpp
+40
-0
No files found.
modules/core/perf/perf_arithm.cpp
View file @
ee88cc2c
...
...
@@ -202,3 +202,43 @@ PERF_TEST_P(Size_MatType, subtractScalar, TYPICAL_MATS_CORE_ARITHM)
SANITY_CHECK
(
c
,
1e-8
);
}
PERF_TEST_P
(
Size_MatType
,
multiply
,
TYPICAL_MATS_CORE_ARITHM
)
{
Size
sz
=
get
<
0
>
(
GetParam
());
int
type
=
get
<
1
>
(
GetParam
());
cv
::
Mat
a
(
sz
,
type
),
b
(
sz
,
type
),
c
(
sz
,
type
);
declare
.
in
(
a
,
b
,
WARMUP_RNG
).
out
(
c
);
if
(
CV_MAT_DEPTH
(
type
)
==
CV_32S
)
{
//According to docs, saturation is not applied when result is 32bit integer
a
/=
(
2
<<
16
);
b
/=
(
2
<<
16
);
}
TEST_CYCLE
()
multiply
(
a
,
b
,
c
);
SANITY_CHECK
(
c
,
1e-8
);
}
PERF_TEST_P
(
Size_MatType
,
multiplyScale
,
TYPICAL_MATS_CORE_ARITHM
)
{
Size
sz
=
get
<
0
>
(
GetParam
());
int
type
=
get
<
1
>
(
GetParam
());
cv
::
Mat
a
(
sz
,
type
),
b
(
sz
,
type
),
c
(
sz
,
type
);
double
scale
=
0.5
;
declare
.
in
(
a
,
b
,
WARMUP_RNG
).
out
(
c
);
if
(
CV_MAT_DEPTH
(
type
)
==
CV_32S
)
{
//According to docs, saturation is not applied when result is 32bit integer
a
/=
(
2
<<
16
);
b
/=
(
2
<<
16
);
}
TEST_CYCLE
()
multiply
(
a
,
b
,
c
,
scale
);
SANITY_CHECK
(
c
,
1e-8
);
}
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