Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / fluid / modules / gapi / test / cpu / gapi_operators_tests_cpu.cpp
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.
4 //
5 // Copyright (C) 2018-2019 Intel Corporation
6
7
8 #include "../test_precomp.hpp"
9 #include "../common/gapi_operators_tests.hpp"
10 #include "opencv2/gapi/cpu/core.hpp"
11
12 #define CORE_CPU cv::gapi::core::cpu::kernels()
13
14 namespace opencv_test
15 {
16
17
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),
25                                cv::Size(640, 480),
26                                cv::Size(128, 128)),
27                             Values(-1, CV_8U, CV_32F),
28 /*init output matrices or not*/ testing::Bool(),
29                             Values(cv::compile_args(CORE_CPU))));
30
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),
38                                        cv::Size(640, 480),
39                                        cv::Size(128, 128)),
40                                 Values(-1, CV_8U, CV_32F),
41 /*init output matrices or not*/ testing::Bool(),
42                                 Values(cv::compile_args(CORE_CPU))));
43
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),
49                                    cv::Size(640, 480),
50                                    cv::Size(128, 128)),
51                                 Values(-1),
52 /*init output matrices or not*/ testing::Bool(),
53                                 Values(cv::compile_args(CORE_CPU))));
54
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),
60                                        cv::Size(640, 480),
61                                        cv::Size(128, 128)),
62                                 Values(-1),
63 /*init output matrices or not*/ testing::Bool(),
64                                 Values(cv::compile_args(CORE_CPU))));
65
66 INSTANTIATE_TEST_CASE_P(BitwiseNotOperatorTestCPU, NotOperatorTest,
67                         Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
68                                 Values(cv::Size(1280, 720),
69                                        cv::Size(640, 480),
70                                        cv::Size(128, 128)),
71 /*init output matrices or not*/ testing::Bool(),
72                                 Values(cv::compile_args(CORE_CPU))));
73 }