Adding all possible data type interactions to the perf tests since some use SIMD acceleration and others do not.#15440
Conversation
use SIMD acceleration and others do not.
| CV_32F64F, | ||
| CV_64F64F}; | ||
|
|
||
| CV_ENUM(SqSizes, CV_32S32S, CV_32S32F, CV_32S64F, CV_32F32F, CV_32F64F, CV_64F64F); |
There was a problem hiding this comment.
SqSizes
This doesn't look as "sizes". Perhaps it should be IntergralOutputDepths
Also it is better to replace CV_ prefix to avoid confusion with public OpenCV API.
| testing::Values(TYPICAL_MAT_SIZES), | ||
| testing::Values(CV_8UC1, CV_8UC2, CV_8UC3, CV_8UC4), | ||
| testing::Values(CV_32S, CV_32F, CV_64F) | ||
| testing::Values(0,1,2,3,4,5) |
There was a problem hiding this comment.
Avoid using of magic numbers. Use enum constants identifiers instead.
| TEST_CYCLE() integral(src, sum, sqsum, sdepth, sqdepth); | ||
|
|
||
| SANITY_CHECK(sum, 1e-6); | ||
| SANITY_CHECK(sqsum, 1e-6); |
There was a problem hiding this comment.
You don't have sanity data for this test (in opencv_extra repositry). Replace these 2 lines by SANITY_CHECK_NOTHING();
There was a problem hiding this comment.
Thanks for the feedback, just made the changes you requested.
performance tests for the integral function.
|
|
||
| SANITY_CHECK_NOTHING(); | ||
| SANITY_CHECK_NOTHING(); | ||
|
|
| testing::Values(CV_8UC1, CV_8UC2, CV_8UC3, CV_8UC4), | ||
| testing::Values(CV_32S, CV_32F, CV_64F) | ||
| ) | ||
| ) |
| SZ_32F64F, | ||
| SZ_64F64F}; | ||
|
|
||
| CV_ENUM(IntegralOutputDepths, SZ_32S32S, SZ_32S32F, SZ_32S64F, SZ_32F32F, SZ_32F64F, SZ_64F64F); |
There was a problem hiding this comment.
SZ_
What is the meaning of this?
Depth != Size (size is usually associated with image size in pixels, not a "size" of type)
DEPTH_32S_32S?
| SANITY_CHECK(sqsum, 1e-6); | ||
| } | ||
|
|
||
| int vals[6][2] = {{CV_32S, CV_32S}, {CV_32S, CV_32F}, {CV_32S, CV_64F}, {CV_32F, CV_32F}, {CV_32F, CV_64F}, {CV_64F, CV_64F}}; |
There was a problem hiding this comment.
This should be close to related enumeration above.
This should be properly named.
This must be "static" or in anonymous namespace due its "local" usage (we don't want conflicts especially on such common name).
|
Changed the names per request, made the array static and moved the definition closer to the enum. |
resolves #15439
This pullrequest changes
This PR is changing modules/imgproc/perf/perf_integral.cpp if you look at sumpixels.cpp there are several possible combinations of matrix sizes for the integral function. The performance tests do not cover all possibilities even with some of them being optimised with HAL instructions so it's impossible to analyse improvements made for those combinations.