Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / fluid / modules / gapi / test / cpu / gapi_operators_tests_fluid.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
11 #define CORE_FLUID cv::gapi::core::fluid::kernels()
12
13 namespace opencv_test
14 {
15
16 INSTANTIATE_TEST_CASE_P(MathOperatorTestFluid, MathOperatorMatMatTest,
17                         Combine(Values(AbsExact().to_compare_f()),
18                                 Values( opPlusM, opMinusM, opDivM,
19                                         opGreater, opLess, opGreaterEq, opLessEq, opEq, opNotEq),
20                                 Values(CV_8UC1, CV_16SC1, CV_32FC1),
21                                 Values(cv::Size(1280, 720),
22                                    cv::Size(640, 480),
23                                    cv::Size(128, 128)),
24                                 Values(-1, CV_8U, CV_32F),
25 /*init output matrices or not*/ testing::Bool(),
26                                 Values(cv::compile_args(CORE_FLUID))));
27
28 //FIXME: Some Mat/Scalar Fluid kernels are not there yet!
29 INSTANTIATE_TEST_CASE_P(DISABLED_MathOperatorTestFluid, MathOperatorMatScalarTest,
30                         Combine(Values(AbsExact().to_compare_f()),
31                                 Values( opPlus, opPlusR, opMinus, opMinusR, opMul, opMulR,  // FIXIT avoid division by values near zero: opDiv, opDivR,
32                                         opGT, opLT, opGE, opLE, opEQ, opNE,
33                                         opGTR, opLTR, opGER, opLER, opEQR, opNER),
34                                 Values(CV_8UC1, CV_16SC1, CV_32FC1),
35                                 Values(cv::Size(1280, 720),
36                                        cv::Size(640, 480),
37                                        cv::Size(128, 128)),
38                                 Values(-1, CV_8U, CV_32F),
39 /*init output matrices or not*/ testing::Bool(),
40                                 Values(cv::compile_args(CORE_FLUID))));
41
42 INSTANTIATE_TEST_CASE_P(BitwiseOperatorTestFluid, MathOperatorMatMatTest,
43                         Combine(Values(AbsExact().to_compare_f()),
44                                 Values( opAnd, opOr, opXor ),
45                                 Values(CV_8UC1, CV_16UC1, CV_16SC1),
46                                 Values(cv::Size(1280, 720),
47                                    cv::Size(640, 480),
48                                    cv::Size(128, 128)),
49                                 Values(-1),
50 /*init output matrices or not*/ testing::Bool(),
51                                 Values(cv::compile_args(CORE_FLUID))));
52
53 //FIXME: Some Mat/Scalar Fluid kernels are not there yet!
54 INSTANTIATE_TEST_CASE_P(DISABLED_BitwiseOperatorTestFluid, MathOperatorMatScalarTest,
55                         Combine(Values(AbsExact().to_compare_f()),
56                                 Values( opAND, opOR, opXOR, opANDR, opORR, opXORR ),
57                                 Values(CV_8UC1, CV_16UC1, CV_16SC1),
58                                 Values(cv::Size(1280, 720),
59                                        cv::Size(640, 480),
60                                        cv::Size(128, 128)),
61                                 Values(-1),
62 /*init output matrices or not*/ testing::Bool(),
63                                 Values(cv::compile_args(CORE_FLUID))));
64
65 INSTANTIATE_TEST_CASE_P(BitwiseNotOperatorTestFluid, NotOperatorTest,
66                     Combine(Values(CV_8UC1, CV_16UC1, CV_16SC1),
67                             Values(cv::Size(1280, 720),
68                                    cv::Size(640, 480),
69                                    cv::Size(128, 128)),
70 /*init output matrices or not*/ testing::Bool(),
71                                 Values(cv::compile_args(CORE_FLUID))));
72 }