Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / fluid / modules / gapi / test / gapi_fluid_test_kernels.hpp
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 #ifndef GAPI_FLUID_TEST_KERNELS_HPP
9 #define GAPI_FLUID_TEST_KERNELS_HPP
10
11 #include "opencv2/gapi/fluid/gfluidkernel.hpp"
12
13 namespace cv
14 {
15 namespace gapi_test_kernels
16 {
17
18 G_TYPED_KERNEL(TAddSimple, <GMat(GMat, GMat)>, "test.fluid.add_simple") {
19     static cv::GMatDesc outMeta(cv::GMatDesc a, cv::GMatDesc) {
20         return a;
21     }
22 };
23
24 G_TYPED_KERNEL(TAddCSimple, <GMat(GMat,int)>, "test.fluid.addc_simple")
25 {
26     static GMatDesc outMeta(const cv::GMatDesc &in, int) {
27         return in;
28     }
29 };
30
31 G_TYPED_KERNEL(TAddScalar, <GMat(GMat,GScalar)>, "test.fluid.addc_scalar")
32 {
33     static GMatDesc outMeta(const cv::GMatDesc &in, const cv::GScalarDesc&) {
34         return in;
35     }
36 };
37
38 G_TYPED_KERNEL(TAddScalarToMat, <GMat(GScalar,GMat)>, "test.fluid.add_scalar_to_mat")
39 {
40     static GMatDesc outMeta(const cv::GScalarDesc&, const cv::GMatDesc &in) {
41         return in;
42     }
43 };
44
45 G_TYPED_KERNEL(TBlur1x1, <GMat(GMat,int,Scalar)>, "org.opencv.imgproc.filters.blur1x1"){
46     static GMatDesc outMeta(GMatDesc in, int, Scalar) {
47         return in;
48     }
49 };
50
51 G_TYPED_KERNEL(TBlur3x3, <GMat(GMat,int,Scalar)>, "org.opencv.imgproc.filters.blur3x3"){
52     static GMatDesc outMeta(GMatDesc in, int, Scalar) {
53         return in;
54     }
55 };
56
57 G_TYPED_KERNEL(TBlur5x5, <GMat(GMat,int,Scalar)>, "org.opencv.imgproc.filters.blur5x5"){
58     static GMatDesc outMeta(GMatDesc in, int, Scalar) {
59         return in;
60     }
61 };
62
63 G_TYPED_KERNEL(TBlur3x3_2lpi, <GMat(GMat,int,Scalar)>, "org.opencv.imgproc.filters.blur3x3_2lpi"){
64     static GMatDesc outMeta(GMatDesc in, int, Scalar) {
65         return in;
66     }
67 };
68
69 G_TYPED_KERNEL(TBlur5x5_2lpi, <GMat(GMat,int,Scalar)>, "org.opencv.imgproc.filters.blur5x5_2lpi"){
70     static GMatDesc outMeta(GMatDesc in, int, Scalar) {
71         return in;
72     }
73 };
74
75 G_TYPED_KERNEL(TId, <GMat(GMat)>, "test.fluid.identity") {
76     static cv::GMatDesc outMeta(cv::GMatDesc a) {
77         return a;
78     }
79 };
80
81 G_TYPED_KERNEL(TId7x7, <GMat(GMat)>, "test.fluid.identity7x7") {
82     static cv::GMatDesc outMeta(cv::GMatDesc a) {
83         return a;
84     }
85 };
86
87 G_TYPED_KERNEL(TPlusRow0, <GMat(GMat)>, "test.fluid.plus_row0") {
88     static cv::GMatDesc outMeta(cv::GMatDesc a) {
89         return a;
90     }
91 };
92
93 G_TYPED_KERNEL(TSum2MatsAndScalar, <GMat(GMat,GScalar,GMat)>, "test.fluid.sum_2_mats_and_scalar")
94 {
95     static GMatDesc outMeta(const cv::GMatDesc &in, const cv::GScalarDesc&, const cv::GMatDesc&) {
96         return in;
97     }
98 };
99
100 extern cv::gapi::GKernelPackage fluidTestPackage;
101
102 } // namespace gapi_test_kernels
103 } // namespace cv
104
105 #endif // GAPI_FLUID_TEST_KERNELS_HPP