mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Merge pull request #18257 from OrestChura:oc/fluid_operator_bitwise_and_scalar
[G-API]: Add Fluid bitwise operations implementation for (GMat, GScalar) * Added Fluid `bitwise` with `Scalar` + acc.tests - simple loop implementation for Fluid used (no `hal`); - `Scalar` is casted to `int` in the beginning - tests just modified to work with `Scalar` - expected output in operators' tests fixed (operators can't change Mat's depth) - `float` `Scalar` `RNG` added, `RNG` reworked (`time` is used now), initialization of test fixtures reworked - if input or output is `float` Scalar is initialized by `float` - some problems with Fluid/OCV floating-point comparison difference stashed by `AbsSimilarPoints()` usage, FIXME added - divide-by-zero is now fixed differently and everywhere * - Added perf_tests for bitwise_Scalar operations - due to errors of Fluid floating-point comparison operations, added support of different validation in Cmp perf_tests; added FIXME - reworked integral initialization of Scalar * Addressing comments - NULL -> nullptr - Scalar convertion moved to the function - avoid -> avoiding * Addressing comments * CV_assert -> GAPI_assert * Addressed DM comments - refactored convertScalarForBitwise() - removed unnecessary braces for switch * Changed the operators tests - switch via `enum` implemented - infrastructure for that refactored
This commit is contained in:
@@ -108,13 +108,15 @@ INSTANTIATE_TEST_CASE_P(CmpPerfTestGPU, CmpPerfTest,
|
||||
Values(cv::compile_args(CORE_GPU))));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(CmpWithScalarPerfTestGPU, CmpWithScalarPerfTest,
|
||||
Combine(Values(CMP_EQ, CMP_GE, CMP_NE, CMP_GT, CMP_LT, CMP_LE),
|
||||
Combine(Values(AbsExact().to_compare_f()),
|
||||
Values(CMP_EQ, CMP_GE, CMP_NE, CMP_GT, CMP_LT, CMP_LE),
|
||||
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(BitwisePerfTestGPU, BitwisePerfTest,
|
||||
Combine(Values(AND, OR, XOR),
|
||||
testing::Bool(),
|
||||
Values( szSmall128, szVGA, sz720p, sz1080p ),
|
||||
Values( CV_8UC1, CV_8UC3, CV_16UC1, CV_16SC1),
|
||||
Values(cv::compile_args(CORE_GPU))));
|
||||
|
||||
Reference in New Issue
Block a user