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
6ff2ae1d
Commit
6ff2ae1d
authored
Sep 14, 2011
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tegra-optimized minMaxLoc/minMaxIdx
parent
82da7f18
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
perf_stat.cpp
modules/core/perf/perf_stat.cpp
+12
-2
stat.cpp
modules/core/src/stat.cpp
+9
-0
No files found.
modules/core/perf/perf_stat.cpp
View file @
6ff2ae1d
...
...
@@ -345,7 +345,9 @@ PERF_TEST_P( Size_MatType, countNonZero, TYPICAL_MATS_C1 )
/*
// void minMaxLoc(InputArray src, double* minVal, double* maxVal=0, Point* minLoc=0, Point* maxLoc=0, InputArray mask=noArray())
*/
PERF_TEST_P
(
Size_MatType
,
minMaxLoc
,
TYPICAL_MATS_C1
)
PERF_TEST_P
(
Size_MatType
,
minMaxLoc
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_8UC1
,
CV_8SC1
,
CV_16UC1
,
CV_16SC1
,
CV_32SC1
,
CV_32FC1
,
CV_64FC1
)
)
)
{
Size
sz
=
std
::
tr1
::
get
<
0
>
(
GetParam
());
int
matType
=
std
::
tr1
::
get
<
1
>
(
GetParam
());
...
...
@@ -354,7 +356,15 @@ PERF_TEST_P( Size_MatType, minMaxLoc, TYPICAL_MATS_C1 )
double
minVal
,
maxVal
;
Point
minLoc
,
maxLoc
;
declare
.
in
(
src
,
WARMUP_RNG
);
// avoid early exit on 1 byte data
if
(
matType
==
CV_8U
)
randu
(
src
,
1
,
254
);
else
if
(
matType
==
CV_8S
)
randu
(
src
,
-
127
,
126
);
else
warmup
(
src
,
WARMUP_RNG
);
declare
.
in
(
src
);
TEST_CYCLE
(
100
)
{
minMaxLoc
(
src
,
&
minVal
,
&
maxVal
,
&
minLoc
,
&
maxLoc
);
}
...
...
modules/core/src/stat.cpp
View file @
6ff2ae1d
...
...
@@ -702,12 +702,21 @@ static void minMaxIdx_64f(const double* src, const uchar* mask, double* minval,
typedef
void
(
*
MinMaxIdxFunc
)(
const
uchar
*
,
const
uchar
*
,
int
*
,
int
*
,
size_t
*
,
size_t
*
,
int
,
size_t
);
#ifdef HAVE_TEGRA_OPTIMIZATION
static
MinMaxIdxFunc
minmaxTab
[]
=
{
(
MinMaxIdxFunc
)
tegra
::
minMaxIdx_8u
,
(
MinMaxIdxFunc
)
tegra
::
minMaxIdx_8s
,
(
MinMaxIdxFunc
)
tegra
::
minMaxIdx_16u
,
(
MinMaxIdxFunc
)
tegra
::
minMaxIdx_16s
,
(
MinMaxIdxFunc
)
tegra
::
minMaxIdx_32s
,
(
MinMaxIdxFunc
)
tegra
::
minMaxIdx_32f
,
(
MinMaxIdxFunc
)
tegra
::
minMaxIdx_64f
,
0
};
#else
static
MinMaxIdxFunc
minmaxTab
[]
=
{
(
MinMaxIdxFunc
)
minMaxIdx_8u
,
(
MinMaxIdxFunc
)
minMaxIdx_8s
,
(
MinMaxIdxFunc
)
minMaxIdx_16u
,
(
MinMaxIdxFunc
)
minMaxIdx_16s
,
(
MinMaxIdxFunc
)
minMaxIdx_32s
,
(
MinMaxIdxFunc
)
minMaxIdx_32f
,
(
MinMaxIdxFunc
)
minMaxIdx_64f
,
0
};
#endif
static
void
ofs2idx
(
const
Mat
&
a
,
size_t
ofs
,
int
*
idx
)
{
...
...
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