nareshmlx/opencv-pr huggingface dataset:
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 495

**Code Changes:**
```diff
+    }
+
+    return 0;
+}
+#endif
+
 template<typename DST, typename SRC1, typename SRC2>
 static void run_arithm(Buffer &dst, const View &src1, const View &src2, Arithm arithm,
                        double scale=1)
@@ -168,29 +510,37 @@ static void run_arithm(Buffer &dst, const View &src1, const View &src2, Arithm a
     // NB: assume in/out types are not 64-bits
```

Review comment:
I think it is not so important.
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 495

**Code Changes:**
```diff
+    }
+
+    return 0;
+}
+#endif
+
 template<typename DST, typename SRC1, typename SRC2>
 static void run_arithm(Buffer &dst, const View &src1, const View &src2, Arithm arithm,
                        double scale=1)
@@ -168,29 +510,37 @@ static void run_arithm(Buffer &dst, const View &src1, const View &src2, Arithm a
     // NB: assume in/out types are not 64-bits
```

Review comment:
Would agree with that
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...

**Code Changes:**
```diff
@@ -151,6 +151,348 @@ GAPI_FLUID_KERNEL(GFluidAddW, cv::gapi::core::GAddW, false)
 
 enum Arithm { ARITHM_ABSDIFF, ARITHM_ADD, ARITHM_SUBTRACT, ARITHM_MULTIPLY, ARITHM_DIVIDE };
 
+#if CV_SIMD
+CV_ALWAYS_INLINE void absdiff_store(short out[], const v_int16& a, const v_int16& b, int x)
+{
+    vx_store(&out[x], v_absdiffs(a, b));
+}
+
```

Review comment:
refactored, as I see
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...

**Code Changes:**
```diff
@@ -151,6 +151,348 @@ GAPI_FLUID_KERNEL(GFluidAddW, cv::gapi::core::GAddW, false)
 
 enum Arithm { ARITHM_ABSDIFF, ARITHM_ADD, ARITHM_SUBTRACT, ARITHM_MULTIPLY, ARITHM_DIVIDE };
 
+#if CV_SIMD
+CV_ALWAYS_INLINE void absdiff_store(short out[], const v_int16& a, const v_int16& b, int x)
+{
+    vx_store(&out[x], v_absdiffs(a, b));
+}
+
```

Review comment:
Lets's keep the structure of the function - i.e. move this into specialization of `add_simd_sametype` to call it here
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...

**Code Changes:**
```diff
@@ -151,6 +151,348 @@ GAPI_FLUID_KERNEL(GFluidAddW, cv::gapi::core::GAddW, false)
 
 enum Arithm { ARITHM_ABSDIFF, ARITHM_ADD, ARITHM_SUBTRACT, ARITHM_MULTIPLY, ARITHM_DIVIDE };
 
+#if CV_SIMD
+CV_ALWAYS_INLINE void absdiff_store(short out[], const v_int16& a, const v_int16& b, int x)
+{
+    vx_store(&out[x], v_absdiffs(a, b));
+}
+
```

Review comment:
please move this into specialization of `add_simd_sametype` to call it here
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...

**Code Changes:**
```diff
@@ -151,6 +151,348 @@ GAPI_FLUID_KERNEL(GFluidAddW, cv::gapi::core::GAddW, false)
 
 enum Arithm { ARITHM_ABSDIFF, ARITHM_ADD, ARITHM_SUBTRACT, ARITHM_MULTIPLY, ARITHM_DIVIDE };
 
+#if CV_SIMD
+CV_ALWAYS_INLINE void absdiff_store(short out[], const v_int16& a, const v_int16& b, int x)
+{
+    vx_store(&out[x], v_absdiffs(a, b));
+}
+
```

Review comment:
move into specialization of `sub_simd_sametype`
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...

**Code Changes:**
```diff
@@ -151,6 +151,348 @@ GAPI_FLUID_KERNEL(GFluidAddW, cv::gapi::core::GAddW, false)
 
 enum Arithm { ARITHM_ABSDIFF, ARITHM_ADD, ARITHM_SUBTRACT, ARITHM_MULTIPLY, ARITHM_DIVIDE };
 
+#if CV_SIMD
+CV_ALWAYS_INLINE void absdiff_store(short out[], const v_int16& a, const v_int16& b, int x)
+{
+    vx_store(&out[x], v_absdiffs(a, b));
+}
+
```

Review comment:
I don't see any sense. Please explain? Template `sub_simd_sametype()` was writed only for cases when both input types and output type are the same. In the case mentioned above input and output types are different. So they require another handling.
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...

**Code Changes:**
```diff
@@ -151,6 +151,348 @@ GAPI_FLUID_KERNEL(GFluidAddW, cv::gapi::core::GAddW, false)
 
 enum Arithm { ARITHM_ABSDIFF, ARITHM_ADD, ARITHM_SUBTRACT, ARITHM_MULTIPLY, ARITHM_DIVIDE };
 
+#if CV_SIMD
+CV_ALWAYS_INLINE void absdiff_store(short out[], const v_int16& a, const v_int16& b, int x)
+{
+    vx_store(&out[x], v_absdiffs(a, b));
+}
+
```

Review comment:
I don't see any sense. Please explain? Template `add_simd_sametype()` was writed only for cases when both input types and output type are the same. In the case mentioned above input and output types are different. So they required another handling.
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...

**Code Changes:**
```diff
@@ -151,6 +151,348 @@ GAPI_FLUID_KERNEL(GFluidAddW, cv::gapi::core::GAddW, false)
 
 enum Arithm { ARITHM_ABSDIFF, ARITHM_ADD, ARITHM_SUBTRACT, ARITHM_MULTIPLY, ARITHM_DIVIDE };
 
+#if CV_SIMD
+CV_ALWAYS_INLINE void absdiff_store(short out[], const v_int16& a, const v_int16& b, int x)
+{
+    vx_store(&out[x], v_absdiffs(a, b));
+}
+
```

Review comment:
I don't see any sense. Please explain? Template `add_simd_sametype()` was writed only for cases when both input types and output type are the same. In the case mentioned above input and output types are different. So they require another handling.
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...

**Code Changes:**
```diff
@@ -151,6 +151,348 @@ GAPI_FLUID_KERNEL(GFluidAddW, cv::gapi::core::GAddW, false)
 
 enum Arithm { ARITHM_ABSDIFF, ARITHM_ADD, ARITHM_SUBTRACT, ARITHM_MULTIPLY, ARITHM_DIVIDE };
 
+#if CV_SIMD
+CV_ALWAYS_INLINE void absdiff_store(short out[], const v_int16& a, const v_int16& b, int x)
+{
+    vx_store(&out[x], v_absdiffs(a, b));
+}
+
```

Review comment:
IMHO casts can be moved inside `absdiff_impl` to state it once (and make the code here a bit shorter)
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 308

**Code Changes:**
```diff
+                v_int16 a1 = vx_load(reinterpret_cast<const short*>(&in1[x]));
+                v_int16 a2 = vx_load(reinterpret_cast<const short*>(&in1[x + nlanes / 2]));
+                v_int16 b1 = vx_load(reinterpret_cast<const short*>(&in2[x]));
+                v_int16 b2 = vx_load(reinterpret_cast<const short*>(&in2[x + nlanes / 2]));
+
+                vx_store(reinterpret_cast<uchar*>(&out[x]), v_pack_u(a1 + b1, a2 + b2));
+            }
+
+            if (x < length)
+            {
+                CV_DbgAssert((reinterpret_cast<const short*>(in1) != reinterpret_cast<const short*>(out)) &&
```

Review comment:
What is about saturation rules?
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...

**Code Changes:**
```diff
@@ -151,6 +151,348 @@ GAPI_FLUID_KERNEL(GFluidAddW, cv::gapi::core::GAddW, false)
 
 enum Arithm { ARITHM_ABSDIFF, ARITHM_ADD, ARITHM_SUBTRACT, ARITHM_MULTIPLY, ARITHM_DIVIDE };
 
+#if CV_SIMD
+CV_ALWAYS_INLINE void absdiff_store(short out[], const v_int16& a, const v_int16& b, int x)
+{
+    vx_store(&out[x], v_absdiffs(a, b));
+}
+
```

Review comment:
> void ... int& x It is better to "return x" instead (avoid code which may block compiler optimizations).
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...

**Code Changes:**
```diff
@@ -151,6 +151,348 @@ GAPI_FLUID_KERNEL(GFluidAddW, cv::gapi::core::GAddW, false)
 
 enum Arithm { ARITHM_ABSDIFF, ARITHM_ADD, ARITHM_SUBTRACT, ARITHM_MULTIPLY, ARITHM_DIVIDE };
 
+#if CV_SIMD
+CV_ALWAYS_INLINE void absdiff_store(short out[], const v_int16& a, const v_int16& b, int x)
+{
+    vx_store(&out[x], v_absdiffs(a, b));
+}
+
```

Review comment:
Suggested variant doesn't compile.
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 308

**Code Changes:**
```diff
+                v_int16 a1 = vx_load(reinterpret_cast<const short*>(&in1[x]));
+                v_int16 a2 = vx_load(reinterpret_cast<const short*>(&in1[x + nlanes / 2]));
+                v_int16 b1 = vx_load(reinterpret_cast<const short*>(&in2[x]));
+                v_int16 b2 = vx_load(reinterpret_cast<const short*>(&in2[x + nlanes / 2]));
+
+                vx_store(reinterpret_cast<uchar*>(&out[x]), v_pack_u(a1 + b1, a2 + b2));
+            }
+
+            if (x < length)
+            {
+                CV_DbgAssert((reinterpret_cast<const short*>(in1) != reinterpret_cast<const short*>(out)) &&
```

Review comment:
`+` is overloaded operation with saturation.
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 195

**Code Changes:**
```diff
+            absdiff_store(out, a, b, x);
+        }
+
+        if (x < length && (in1 != out) && (in2 != out))
+        {
+            x = length - nlanes;
+            continue;  // process one more time (unaligned tail)
+        }
+        break;
+    }
+
```

Review comment:
Such tail processing requires that in != out. (However that's ok if such a check is performed somewhere higher by call stack)
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 195

**Code Changes:**
```diff
+            absdiff_store(out, a, b, x);
+        }
+
+        if (x < length && (in1 != out) && (in2 != out))
+        {
+            x = length - nlanes;
+            continue;  // process one more time (unaligned tail)
+        }
+        break;
+    }
+
```

Review comment:
Ok. Add check for cases when input and output types are the same.
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 195

**Code Changes:**
```diff
+            absdiff_store(out, a, b, x);
+        }
+
+        if (x < length && (in1 != out) && (in2 != out))
+        {
+            x = length - nlanes;
+            continue;  // process one more time (unaligned tail)
+        }
+        break;
+    }
+
```

Review comment:
> Does G-API support inplace processing? Yes, we _have_ to support inplace processing at least to avoid copy when calling `cv::gapi::wip::draw::render()`. Not sure if Fluid have ever been tested with such type of inplace execution, but the Fluid itself never forces input and output buffer to be the same.
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 195

**Code Changes:**
```diff
+            absdiff_store(out, a, b, x);
+        }
+
+        if (x < length && (in1 != out) && (in2 != out))
+        {
+            x = length - nlanes;
+            continue;  // process one more time (unaligned tail)
+        }
+        break;
+    }
+
```

Review comment:
Anyway, I would suggest to put `CV_DbgAssert()` for other cases. > when input and output types are the same to catch cases when different types are inplaced (e.g. both `float` and `int` are 32-bit)
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 195

**Code Changes:**
```diff
+            absdiff_store(out, a, b, x);
+        }
+
+        if (x < length && (in1 != out) && (in2 != out))
+        {
+            x = length - nlanes;
+            continue;  // process one more time (unaligned tail)
+        }
+        break;
+    }
+
```

Review comment:
... for now. Assertions verify assumptions which are required by related code below. It is a really powerful tool. This helps with investigations in the future through emitting error messages. This reduces annoying debugging process of related problems.
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 190

**Code Changes:**
```diff
+    {
+        for (; x <= length - nlanes; x += nlanes)
+        {
+            VT a = vx_load(&in1[x]);
+            VT b = vx_load(&in2[x]);
+            absdiff_store(out, a, b, x);
+        }
+
+        if (x < length && (in1 != out) && (in2 != out))
+        {
+            x = length - nlanes;
```

Review comment:
Is it the only place where `absdiff_store` is used, or did I miss something ? If so - that is the point of separate function for this , why not inline it's body here ?
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 195

**Code Changes:**
```diff
+            absdiff_store(out, a, b, x);
+        }
+
+        if (x < length && (in1 != out) && (in2 != out))
+        {
+            x = length - nlanes;
+            continue;  // process one more time (unaligned tail)
+        }
+        break;
+    }
+
```

Review comment:
> Anyway, I would suggest to put `CV_DbgAssert()` for other cases. > > > when input and output types are the same > > to catch cases when different types are inplaced (e.g. both `float` and `int` are 32-bit) I've already put checks for inplace when input and output types are the same.
**File:** modules/gapi/src/backends/fluid/gfluidcore.cpp
**Change Type:** modified
**Context:** PR #18338: Univ Intrinsics implementation of Add, Sub, Absdiff kernels - Performance report: [AbsDiff_Add_Sub_perf_report.xlsx](https://github.com/ope...
**Review Line:** 195

**Code Changes:**
```diff
+            absdiff_store(out, a, b, x);
+        }
+
+        if (x < length && (in1 != out) && (in2 != out))
+        {
+            x = length - nlanes;
+            continue;  // process one more time (unaligned tail)
+        }
+        break;
+    }
+
```

Review comment:
> I've already put checks for inplace when input and output types are the same. Please open an issue internally to start checking for inplace at the Fluid backend level. Then we could remove such checks from the kernels (where it may be costly given that kernels are called for every line of an image)
**File:** modules/objc/generator/templates/cmakelists.template
**Change Type:** added
**Context:** PR #17165: Objc binding

**Code Changes:**
```diff
@@ -0,0 +1,59 @@
+cmake_minimum_required(VERSION 3.15)
+
+project($framework)
+
+set(MODULES "$modules")
+
+# Enable C++11
+set (CMAKE_CXX_STANDARD 11)
+set (CMAKE_CXX_STANDARD_REQUIRED TRUE)
```

Review comment:
Can we require lower version of CMake? What CMake functionality is required here? These artictles about Swift say about CMake 3.15: - https://forums.swift.org/t/announcing-swift-support-in-cmake/24792 - https://forums.swift.org/t/bumping-cmake-minimum-to-3-15/28179
**File:** modules/core/misc/objc/common/IntVectorExt.swift
**Change Type:** added
**Context:** PR #17165: Objc binding
**Review Line:** 18

**Code Changes:**
```diff
+    }
+
+    subscript(index: Int) -> Int32 {
+        get {
+            return self.get(index)
+        }
+    }
+
+    var array: [Int32] {
+        get {
+            var ret = Array<Int32>(repeating: 0, count: data.count/MemoryLayout<Int32>.stride)
```

Review comment:
> IntVectorExt.swift:18:9: error: missing return in a function expected to return Observed on Mac Mini with OSX 10.14, Xcode 10.0.1.10010046 and CMake 3.15
**File:** modules/objc/generator/templates/cmakelists.template
**Change Type:** added
**Context:** PR #17165: Objc binding

**Code Changes:**
```diff
@@ -0,0 +1,59 @@
+cmake_minimum_required(VERSION 3.15)
+
+project($framework)
+
+set(MODULES "$modules")
+
+# Enable C++11
+set (CMAKE_CXX_STANDARD 11)
+set (CMAKE_CXX_STANDARD_REQUIRED TRUE)
```

Review comment:
Let me try and find a cmake 3.15 and see if it works
**File:** modules/gapi/include/opencv2/gapi/gtyped.hpp
**Change Type:** modified
**Context:** PR #17871: GAPI: Overload for `GArray<GMat>` ProtoParam
**Review Line:** 29

**Code Changes:**
```diff
@@ -26,6 +26,7 @@ namespace detail
     template<> struct ProtoToParam<cv::GMat>    { using type = cv::Mat; };
     template<> struct ProtoToParam<cv::GScalar> { using type = cv::Scalar; };
     template<typename U> struct ProtoToParam<cv::GArray<U> >  { using type = std::vector<U>; };
+    template<> struct ProtoToParam<cv::GArray<cv::GMat>>      { using type = std::vector<cv::Mat>; };
     template<typename U> struct ProtoToParam<cv::GOpaque<U> > { using type = U; };
     template<typename T> using ProtoToParamT = typename ProtoToParam<T>::type;
 
@@ -132,12 +133,20 @@ template<typename R, typename... Args> class GComputationT<R(Args...)>
     {
```

Review comment:
maybe it is woth aligning by ProtoToParam<> too.
**File:** modules/gapi/include/opencv2/gapi/gtyped.hpp
**Change Type:** modified
**Context:** PR #17871: GAPI: Overload for `GArray<GMat>` ProtoParam
**Review Line:** 29

**Code Changes:**
```diff
@@ -26,6 +26,7 @@ namespace detail
     template<> struct ProtoToParam<cv::GMat>    { using type = cv::Mat; };
     template<> struct ProtoToParam<cv::GScalar> { using type = cv::Scalar; };
     template<typename U> struct ProtoToParam<cv::GArray<U> >  { using type = std::vector<U>; };
+    template<> struct ProtoToParam<cv::GArray<cv::GMat>>      { using type = std::vector<cv::Mat>; };
     template<typename U> struct ProtoToParam<cv::GOpaque<U> > { using type = U; };
     template<typename T> using ProtoToParamT = typename ProtoToParam<T>::type;
 
@@ -132,12 +133,20 @@ template<typename R, typename... Args> class GComputationT<R(Args...)>
     {
```

Review comment:
I decided not to align like that because the line will be too long otherwise
**File:** modules/gapi/perf/common/gapi_render_perf_tests.hpp
**Change Type:** added
**Context:** PR #16772: Added g-api render performance tests

**Code Changes:**
```diff
@@ -0,0 +1,43 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2020 Intel Corporation
+
+
+#ifndef OPENCV_GAPI_RENDER_PERF_TESTS_HPP
+#define OPENCV_GAPI_RENDER_PERF_TESTS_HPP
```

Review comment:
Could you add to test with multiple primitives. For example: n - `Rect` n - `Mosaic` inside of `Rects` m - `Text` k - `Image` n, m, k - number of each primitive (`Hint`: you can make it as a test parameters )
**File:** modules/gapi/perf/common/gapi_render_perf_tests_inl.hpp
**Change Type:** added
**Context:** PR #16772: Added g-api render performance tests
**Review Line:** 1

**Code Changes:**
```diff
@@ -0,0 +1,827 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2020 Intel Corporation
+
```

Review comment:
You don't need this file in the `common` part, because it can only be used by one backend You can put the test definition and its instance together in the same file (as for unit tests)
**File:** modules/gapi/perf/common/gapi_render_perf_tests_inl.hpp
**Change Type:** added
**Context:** PR #16772: Added g-api render performance tests

**Code Changes:**
```diff
@@ -0,0 +1,827 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2020 Intel Corporation
+
+
+#include "gapi_render_perf_tests.hpp"
+
```

Review comment:
Put a comment about code duplication here
**File:** modules/gapi/perf/common/gapi_render_perf_tests_inl.hpp
**Change Type:** added
**Context:** PR #16772: Added g-api render performance tests

**Code Changes:**
```diff
@@ -0,0 +1,827 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2020 Intel Corporation
+
+
+#include "gapi_render_perf_tests.hpp"
+
```

Review comment:
I think this should be a test parameter
**File:** modules/gapi/perf/common/gapi_render_perf_tests.hpp
**Change Type:** added
**Context:** PR #16772: Added g-api render performance tests

**Code Changes:**
```diff
@@ -0,0 +1,43 @@
+// This file is part of OpenCV project.
+// It is subject to the license terms in the LICENSE file found in the top-level directory
+// of this distribution and at http://opencv.org/license.html.
+//
+// Copyright (C) 2020 Intel Corporation
+
+
+#ifndef OPENCV_GAPI_RENDER_PERF_TESTS_HPP
+#define OPENCV_GAPI_RENDER_PERF_TESTS_HPP
```

Review comment:
I did this test, but now it is red in the case of a 640x480 matrix. I'm working on it. But you can look at this test, did I understand you correctly?