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
64277440
Commit
64277440
authored
Aug 05, 2019
by
Dmitry Budnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf tests are added
parent
290078e0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
0 deletions
+45
-0
gapi_core_perf_tests.hpp
modules/gapi/perf/common/gapi_core_perf_tests.hpp
+1
-0
gapi_core_perf_tests_inl.hpp
modules/gapi/perf/common/gapi_core_perf_tests_inl.hpp
+34
-0
gapi_core_perf_tests_cpu.cpp
modules/gapi/perf/cpu/gapi_core_perf_tests_cpu.cpp
+5
-0
gapi_core_perf_tests_gpu.cpp
modules/gapi/perf/gpu/gapi_core_perf_tests_gpu.cpp
+5
-0
No files found.
modules/gapi/perf/common/gapi_core_perf_tests.hpp
View file @
64277440
...
...
@@ -64,6 +64,7 @@ namespace opencv_test
class
RemapPerfTest
:
public
TestPerfParams
<
tuple
<
cv
::
Size
,
MatType
,
cv
::
GCompileArgs
>>
{};
class
FlipPerfTest
:
public
TestPerfParams
<
tuple
<
cv
::
Size
,
MatType
,
int
,
cv
::
GCompileArgs
>>
{};
class
CropPerfTest
:
public
TestPerfParams
<
tuple
<
cv
::
Size
,
MatType
,
cv
::
Rect
,
cv
::
GCompileArgs
>>
{};
class
CopyPerfTest
:
public
TestPerfParams
<
tuple
<
cv
::
Size
,
MatType
,
cv
::
GCompileArgs
>>
{};
class
ConcatHorPerfTest
:
public
TestPerfParams
<
tuple
<
cv
::
Size
,
MatType
,
cv
::
GCompileArgs
>>
{};
class
ConcatHorVecPerfTest
:
public
TestPerfParams
<
tuple
<
cv
::
Size
,
MatType
,
cv
::
GCompileArgs
>>
{};
class
ConcatVertPerfTest
:
public
TestPerfParams
<
tuple
<
cv
::
Size
,
MatType
,
cv
::
GCompileArgs
>>
{};
...
...
modules/gapi/perf/common/gapi_core_perf_tests_inl.hpp
View file @
64277440
...
...
@@ -1440,6 +1440,40 @@ PERF_TEST_P_(CropPerfTest, TestPerformance)
//------------------------------------------------------------------------------
PERF_TEST_P_
(
CopyPerfTest
,
TestPerformance
)
{
cv
::
Size
sz_in
=
get
<
0
>
(
GetParam
());
MatType
type
=
get
<
1
>
(
GetParam
());
cv
::
GCompileArgs
compile_args
=
get
<
2
>
(
GetParam
());
initMatrixRandU
(
type
,
sz_in
,
type
,
false
);
cv
::
Size
sz_out
=
sz_in
;
// OpenCV code ///////////////////////////////////////////////////////////
cv
::
Mat
(
in_mat1
).
copyTo
(
out_mat_ocv
);
// G-API code ////////////////////////////////////////////////////////////
cv
::
GMat
in
;
auto
out
=
cv
::
gapi
::
copy
(
in
);
cv
::
GComputation
c
(
in
,
out
);
// Warm-up graph engine:
c
.
apply
(
in_mat1
,
out_mat_gapi
,
std
::
move
(
compile_args
));
TEST_CYCLE
()
{
c
.
apply
(
in_mat1
,
out_mat_gapi
,
std
::
move
(
compile_args
));
}
// Comparison ////////////////////////////////////////////////////////////
EXPECT_EQ
(
0
,
cv
::
norm
(
out_mat_ocv
,
out_mat_gapi
,
NORM_INF
));
EXPECT_EQ
(
out_mat_gapi
.
size
(),
sz_out
);
SANITY_CHECK_NOTHING
();
}
//------------------------------------------------------------------------------
PERF_TEST_P_
(
ConcatHorPerfTest
,
TestPerformance
)
{
cv
::
Size
sz_out
=
get
<
0
>
(
GetParam
());
...
...
modules/gapi/perf/cpu/gapi_core_perf_tests_cpu.cpp
View file @
64277440
...
...
@@ -227,6 +227,11 @@ INSTANTIATE_TEST_CASE_P(CropPerfTestCPU, CropPerfTest,
Values
(
cv
::
Rect
(
10
,
8
,
20
,
35
),
cv
::
Rect
(
4
,
10
,
37
,
50
)),
Values
(
cv
::
compile_args
(
CORE_CPU
))));
INSTANTIATE_TEST_CASE_P
(
CopyPerfTestCPU
,
CopyPerfTest
,
Combine
(
Values
(
szSmall128
,
szVGA
,
sz720p
,
sz1080p
),
Values
(
CV_8UC1
,
CV_8UC3
,
CV_16UC1
,
CV_16SC1
,
CV_32FC1
),
Values
(
cv
::
compile_args
(
CORE_CPU
))));
INSTANTIATE_TEST_CASE_P
(
ConcatHorPerfTestCPU
,
ConcatHorPerfTest
,
Combine
(
Values
(
szSmall128
,
szVGA
,
sz720p
,
sz1080p
),
Values
(
CV_8UC1
,
CV_8UC3
,
CV_16UC1
,
CV_16SC1
,
CV_32FC1
),
...
...
modules/gapi/perf/gpu/gapi_core_perf_tests_gpu.cpp
View file @
64277440
...
...
@@ -226,6 +226,11 @@ INSTANTIATE_TEST_CASE_P(CropPerfTestGPU, CropPerfTest,
Values
(
cv
::
Rect
(
10
,
8
,
20
,
35
),
cv
::
Rect
(
4
,
10
,
37
,
50
)),
Values
(
cv
::
compile_args
(
CORE_GPU
))));
INSTANTIATE_TEST_CASE_P
(
CopyPerfTestGPU
,
CopyPerfTest
,
Combine
(
Values
(
szSmall128
,
szVGA
,
sz720p
,
sz1080p
),
Values
(
CV_8UC1
,
CV_8UC3
,
CV_16UC1
,
CV_16SC1
,
CV_32FC1
),
Values
(
cv
::
compile_args
(
CORE_GPU
))));
INSTANTIATE_TEST_CASE_P
(
ConcatHorPerfTestGPU
,
ConcatHorPerfTest
,
Combine
(
Values
(
szSmall128
,
szVGA
,
sz720p
,
sz1080p
),
Values
(
CV_8UC1
,
CV_8UC3
,
CV_16UC1
,
CV_16SC1
,
CV_32FC1
),
...
...
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