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 Intel Corporation
8 #include "../test_precomp.hpp"
9 #include "../common/gapi_operators_tests.hpp"
10 #include <opencv2/gapi/cpu/core.hpp>
14 #define CORE_CPU [] () { return cv::compile_args(cv::gapi::core::cpu::kernels()); }
15 } // anonymous namespace
20 // FIXME: CPU test runs are disabled since Fluid is an exclusive plugin now!
21 INSTANTIATE_TEST_CASE_P(MathOperatorTestCPU, MathOperatorMatMatTest,
22 Combine(Values(CV_8UC1, CV_16SC1, CV_32FC1),
23 Values(cv::Size(1280, 720),
26 Values(-1, CV_8U, CV_32F),
28 Values(AbsExact().to_compare_obj()),
29 Values( opPlusM, opMinusM, opDivM,
30 opGreater, opLess, opGreaterEq, opLessEq, opEq, opNotEq)));
32 INSTANTIATE_TEST_CASE_P(MathOperatorTestCPU, MathOperatorMatScalarTest,
33 Combine(Values(CV_8UC1, CV_16SC1, CV_32FC1),
34 Values(cv::Size(1280, 720),
37 Values(-1, CV_8U, CV_32F),
39 Values(AbsExact().to_compare_obj()),
40 Values( opPlus, opPlusR, opMinus, opMinusR, opMul, opMulR, // FIXIT avoid division by values near zero: opDiv, opDivR,
41 opGT, opLT, opGE, opLE, opEQ, opNE,
42 opGTR, opLTR, opGER, opLER, opEQR, opNER)));
44 INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestCPU, MathOperatorMatMatTest,
45 Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
46 Values(cv::Size(1280, 720),
51 Values(AbsExact().to_compare_obj()),
52 Values( opAnd, opOr, opXor )));
54 INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestCPU, MathOperatorMatScalarTest,
55 Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
56 Values(cv::Size(1280, 720),
61 Values(AbsExact().to_compare_obj()),
62 Values( opAND, opOR, opXOR, opANDR, opORR, opXORR )));
64 INSTANTIATE_TEST_CASE_P(BitwiseNotOperatorTestCPU, NotOperatorTest,
65 Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
66 Values(cv::Size(1280, 720),