1 // This file is part of OpenCV project.
2 // It is subject to the license terms in the LICENSE file found in the top-level directory
3 // of this distribution and at http://opencv.org/license.html.
5 // Copyright (C) 2018-2019 Intel Corporation
8 #include "../test_precomp.hpp"
9 #include "../common/gapi_operators_tests.hpp"
10 #include "opencv2/gapi/cpu/core.hpp"
12 #define CORE_CPU cv::gapi::core::cpu::kernels()
18 // FIXME: CPU test runs are disabled since Fluid is an exclusive plugin now!
19 INSTANTIATE_TEST_CASE_P(MathOperatorTestCPU, MathOperatorMatMatTest,
20 Combine(Values(AbsExact().to_compare_f()),
21 Values( opPlusM, opMinusM, opDivM,
22 opGreater, opLess, opGreaterEq, opLessEq, opEq, opNotEq),
23 Values(CV_8UC1, CV_16SC1, CV_32FC1),
24 Values(cv::Size(1280, 720),
27 Values(-1, CV_8U, CV_32F),
28 /*init output matrices or not*/ testing::Bool(),
29 Values(cv::compile_args(CORE_CPU))));
31 INSTANTIATE_TEST_CASE_P(MathOperatorTestCPU, MathOperatorMatScalarTest,
32 Combine(Values(AbsExact().to_compare_f()),
33 Values( opPlus, opPlusR, opMinus, opMinusR, opMul, opMulR, // FIXIT avoid division by values near zero: opDiv, opDivR,
34 opGT, opLT, opGE, opLE, opEQ, opNE,
35 opGTR, opLTR, opGER, opLER, opEQR, opNER),
36 Values(CV_8UC1, CV_16SC1, CV_32FC1),
37 Values(cv::Size(1280, 720),
40 Values(-1, CV_8U, CV_32F),
41 /*init output matrices or not*/ testing::Bool(),
42 Values(cv::compile_args(CORE_CPU))));
44 INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestCPU, MathOperatorMatMatTest,
45 Combine(Values(AbsExact().to_compare_f()),
46 Values( opAnd, opOr, opXor ),
47 Values(CV_8UC1, CV_16UC1, CV_16SC1),
48 Values(cv::Size(1280, 720),
52 /*init output matrices or not*/ testing::Bool(),
53 Values(cv::compile_args(CORE_CPU))));
55 INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestCPU, MathOperatorMatScalarTest,
56 Combine(Values(AbsExact().to_compare_f()),
57 Values( opAND, opOR, opXOR, opANDR, opORR, opXORR ),
58 Values(CV_8UC1, CV_16UC1, CV_16SC1),
59 Values(cv::Size(1280, 720),
63 /*init output matrices or not*/ testing::Bool(),
64 Values(cv::compile_args(CORE_CPU))));
66 INSTANTIATE_TEST_CASE_P(BitwiseNotOperatorTestCPU, NotOperatorTest,
67 Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
68 Values(cv::Size(1280, 720),
71 /*init output matrices or not*/ testing::Bool(),
72 Values(cv::compile_args(CORE_CPU))));