From 95dd4b3f27bda8bcf1bbf8ec7babdc923fdd7c39 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 24 Jul 2018 18:31:40 +0000 Subject: [PATCH 01/27] bindings: add debug helpers for args conversions --- .../include/opencv2/core/bindings_utils.hpp | 23 +++ modules/core/src/bindings_utils.cpp | 145 ++++++++++++++++++ modules/python/test/test_misc.py | 39 +++++ modules/python/test/tests_common.py | 4 +- 4 files changed, 210 insertions(+), 1 deletion(-) create mode 100644 modules/core/include/opencv2/core/bindings_utils.hpp create mode 100644 modules/core/src/bindings_utils.cpp diff --git a/modules/core/include/opencv2/core/bindings_utils.hpp b/modules/core/include/opencv2/core/bindings_utils.hpp new file mode 100644 index 0000000000..c1123f2b0e --- /dev/null +++ b/modules/core/include/opencv2/core/bindings_utils.hpp @@ -0,0 +1,23 @@ +// 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. + +#ifndef OPENCV_CORE_BINDINGS_UTILS_HPP +#define OPENCV_CORE_BINDINGS_UTILS_HPP + +namespace cv { namespace utils { +//! @addtogroup core_utils +//! @{ + +CV_EXPORTS_W String dumpInputArray(InputArray argument); + +CV_EXPORTS_W String dumpInputArrayOfArrays(InputArrayOfArrays argument); + +CV_EXPORTS_W String dumpInputOutputArray(InputOutputArray argument); + +CV_EXPORTS_W String dumpInputOutputArrayOfArrays(InputOutputArrayOfArrays argument); + +//! @} +}} // namespace + +#endif // OPENCV_CORE_BINDINGS_UTILS_HPP diff --git a/modules/core/src/bindings_utils.cpp b/modules/core/src/bindings_utils.cpp new file mode 100644 index 0000000000..c1a549c218 --- /dev/null +++ b/modules/core/src/bindings_utils.cpp @@ -0,0 +1,145 @@ +// 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. + +#include "precomp.hpp" +#include "opencv2/core/bindings_utils.hpp" +#include + +namespace cv { namespace utils { + +String dumpInputArray(InputArray argument) +{ + if (&argument == &noArray()) + return "InputArray: noArray()"; + std::ostringstream ss; + ss << "InputArray:"; + try { + do { + ss << (argument.empty() ? " empty()=true" : " empty()=false"); + ss << cv::format(" kind=0x%08llx", (long long int)argument.kind()); + ss << cv::format(" flags=0x%08llx", (long long int)argument.getFlags()); + if (argument.getObj() == NULL) + { + ss << " obj=NULL"; + break; // done + } + ss << cv::format(" total(-1)=%lld", (long long int)argument.total(-1)); + ss << cv::format(" dims(-1)=%d", argument.dims(-1)); + Size size = argument.size(-1); + ss << cv::format(" size(-1)=%dx%d", size.width, size.height); + ss << " type(-1)=" << cv::typeToString(argument.type(-1)); + } while (0); + } + catch (...) + { + ss << " ERROR: exception occured, dump is non-complete"; // need to properly support different kinds + } + return ss.str(); +} + +CV_EXPORTS_W String dumpInputArrayOfArrays(InputArrayOfArrays argument) +{ + if (&argument == &noArray()) + return "InputArrayOfArrays: noArray()"; + std::ostringstream ss; + ss << "InputArrayOfArrays:"; + try { + do { + ss << (argument.empty() ? " empty()=true" : " empty()=false"); + ss << cv::format(" kind=0x%08llx", (long long int)argument.kind()); + ss << cv::format(" flags=0x%08llx", (long long int)argument.getFlags()); + if (argument.getObj() == NULL) + { + ss << " obj=NULL"; + break; // done + } + ss << cv::format(" total(-1)=%lld", (long long int)argument.total(-1)); + ss << cv::format(" dims(-1)=%d", argument.dims(-1)); + Size size = argument.size(-1); + ss << cv::format(" size(-1)=%dx%d", size.width, size.height); + if (argument.total(-1) > 0) + { + ss << " type(0)=" << cv::typeToString(argument.type(0)); + ss << cv::format(" dims(0)=%d", argument.dims(0)); + size = argument.size(0); + ss << cv::format(" size(0)=%dx%d", size.width, size.height); + ss << " type(0)=" << cv::typeToString(argument.type(0)); + } + } while (0); + } + catch (...) + { + ss << " ERROR: exception occured, dump is non-complete"; // need to properly support different kinds + } + return ss.str(); +} + +CV_EXPORTS_W String dumpInputOutputArray(InputOutputArray argument) +{ + if (&argument == &noArray()) + return "InputOutputArray: noArray()"; + std::ostringstream ss; + ss << "InputOutputArray:"; + try { + do { + ss << (argument.empty() ? " empty()=true" : " empty()=false"); + ss << cv::format(" kind=0x%08llx", (long long int)argument.kind()); + ss << cv::format(" flags=0x%08llx", (long long int)argument.getFlags()); + if (argument.getObj() == NULL) + { + ss << " obj=NULL"; + break; // done + } + ss << cv::format(" total(-1)=%lld", (long long int)argument.total(-1)); + ss << cv::format(" dims(-1)=%d", argument.dims(-1)); + Size size = argument.size(-1); + ss << cv::format(" size(-1)=%dx%d", size.width, size.height); + ss << " type(-1)=" << cv::typeToString(argument.type(-1)); + } while (0); + } + catch (...) + { + ss << " ERROR: exception occured, dump is non-complete"; // need to properly support different kinds + } + return ss.str(); +} + +CV_EXPORTS_W String dumpInputOutputArrayOfArrays(InputOutputArrayOfArrays argument) +{ + if (&argument == &noArray()) + return "InputOutputArrayOfArrays: noArray()"; + std::ostringstream ss; + ss << "InputOutputArrayOfArrays:"; + try { + do { + ss << (argument.empty() ? " empty()=true" : " empty()=false"); + ss << cv::format(" kind=0x%08llx", (long long int)argument.kind()); + ss << cv::format(" flags=0x%08llx", (long long int)argument.getFlags()); + if (argument.getObj() == NULL) + { + ss << " obj=NULL"; + break; // done + } + ss << cv::format(" total(-1)=%lld", (long long int)argument.total(-1)); + ss << cv::format(" dims(-1)=%d", argument.dims(-1)); + Size size = argument.size(-1); + ss << cv::format(" size(-1)=%dx%d", size.width, size.height); + if (argument.total(-1) > 0) + { + ss << " type(0)=" << cv::typeToString(argument.type(0)); + ss << cv::format(" dims(0)=%d", argument.dims(0)); + size = argument.size(0); + ss << cv::format(" size(0)=%dx%d", size.width, size.height); + ss << " type(0)=" << cv::typeToString(argument.type(0)); + } + } while (0); + } + catch (...) + { + ss << " ERROR: exception occured, dump is non-complete"; // need to properly support different kinds + } + return ss.str(); +} + +}} // namespace diff --git a/modules/python/test/test_misc.py b/modules/python/test/test_misc.py index 5f07d733f2..e84de50247 100644 --- a/modules/python/test/test_misc.py +++ b/modules/python/test/test_misc.py @@ -46,5 +46,44 @@ class Bindings(NewOpenCVTests): pass +class Arguments(NewOpenCVTests): + + def test_InputArray(self): + res1 = cv.utils.dumpInputArray(None) + #self.assertEqual(res1, "InputArray: noArray()") # not supported + self.assertEqual(res1, "InputArray: empty()=true kind=0x00010000 flags=0x01010000 total(-1)=0 dims(-1)=0 size(-1)=0x0 type(-1)=CV_8UC1") + res2_1 = cv.utils.dumpInputArray((1, 2)) + self.assertEqual(res2_1, "InputArray: empty()=false kind=0x00010000 flags=0x01010000 total(-1)=2 dims(-1)=2 size(-1)=1x2 type(-1)=CV_64FC1") + res2_2 = cv.utils.dumpInputArray(1.5) # Scalar(1.5, 1.5, 1.5, 1.5) + self.assertEqual(res2_2, "InputArray: empty()=false kind=0x00010000 flags=0x01010000 total(-1)=4 dims(-1)=2 size(-1)=1x4 type(-1)=CV_64FC1") + a = np.array([[1,2],[3,4],[5,6]]) + res3 = cv.utils.dumpInputArray(a) # 32SC1 + self.assertEqual(res3, "InputArray: empty()=false kind=0x00010000 flags=0x01010000 total(-1)=6 dims(-1)=2 size(-1)=2x3 type(-1)=CV_32SC1") + a = np.array([[[1,2],[3,4],[5,6]]], dtype='f') + res4 = cv.utils.dumpInputArray(a) # 32FC2 + self.assertEqual(res4, "InputArray: empty()=false kind=0x00010000 flags=0x01010000 total(-1)=3 dims(-1)=2 size(-1)=3x1 type(-1)=CV_32FC2") + a = np.array([[[1,2]],[[3,4]],[[5,6]]], dtype=float) + res5 = cv.utils.dumpInputArray(a) # 64FC2 + self.assertEqual(res5, "InputArray: empty()=false kind=0x00010000 flags=0x01010000 total(-1)=3 dims(-1)=2 size(-1)=1x3 type(-1)=CV_64FC2") + + + def test_InputArrayOfArrays(self): + res1 = cv.utils.dumpInputArrayOfArrays(None) + #self.assertEqual(res1, "InputArray: noArray()") # not supported + self.assertEqual(res1, "InputArrayOfArrays: empty()=true kind=0x00050000 flags=0x01050000 total(-1)=0 dims(-1)=1 size(-1)=0x0") + res2_1 = cv.utils.dumpInputArrayOfArrays((1, 2)) # { Scalar:all(1), Scalar::all(2) } + self.assertEqual(res2_1, "InputArrayOfArrays: empty()=false kind=0x00050000 flags=0x01050000 total(-1)=2 dims(-1)=1 size(-1)=2x1 type(0)=CV_64FC1 dims(0)=2 size(0)=1x4 type(0)=CV_64FC1") + res2_2 = cv.utils.dumpInputArrayOfArrays([1.5]) + self.assertEqual(res2_2, "InputArrayOfArrays: empty()=false kind=0x00050000 flags=0x01050000 total(-1)=1 dims(-1)=1 size(-1)=1x1 type(0)=CV_64FC1 dims(0)=2 size(0)=1x4 type(0)=CV_64FC1") + a = np.array([[1,2],[3,4],[5,6]]) + b = np.array([[1,2,3],[4,5,6],[7,8,9]]) + res3 = cv.utils.dumpInputArrayOfArrays([a, b]) + self.assertEqual(res3, "InputArrayOfArrays: empty()=false kind=0x00050000 flags=0x01050000 total(-1)=2 dims(-1)=1 size(-1)=2x1 type(0)=CV_32SC1 dims(0)=2 size(0)=2x3 type(0)=CV_32SC1") + c = np.array([[[1,2],[3,4],[5,6]]], dtype='f') + res4 = cv.utils.dumpInputArrayOfArrays([c, a, b]) + self.assertEqual(res4, "InputArrayOfArrays: empty()=false kind=0x00050000 flags=0x01050000 total(-1)=3 dims(-1)=1 size(-1)=3x1 type(0)=CV_32FC2 dims(0)=2 size(0)=3x1 type(0)=CV_32FC2") + + + if __name__ == '__main__': NewOpenCVTests.bootstrap() diff --git a/modules/python/test/tests_common.py b/modules/python/test/tests_common.py index 93c7b2f346..e6539ae7f4 100644 --- a/modules/python/test/tests_common.py +++ b/modules/python/test/tests_common.py @@ -26,7 +26,9 @@ class NewOpenCVTests(unittest.TestCase): # github repository url repoUrl = 'https://raw.github.com/opencv/opencv/master' - def get_sample(self, filename, iscolor = cv.IMREAD_COLOR): + def get_sample(self, filename, iscolor = None): + if iscolor is None: + iscolor = cv.IMREAD_COLOR if not filename in self.image_cache: filedata = None if NewOpenCVTests.repoPath is not None: From 8e0781648bef4ad45b691e9ad5fba5ff3df0fd76 Mon Sep 17 00:00:00 2001 From: George Mironov Date: Mon, 10 Sep 2018 16:09:45 +0300 Subject: [PATCH 02/27] Fix include paths when building with external protobuf --- cmake/OpenCVFindProtobuf.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake index b9171f14f0..289fa60641 100644 --- a/cmake/OpenCVFindProtobuf.cmake +++ b/cmake/OpenCVFindProtobuf.cmake @@ -50,7 +50,8 @@ else() add_library(libprotobuf UNKNOWN IMPORTED) set_target_properties(libprotobuf PROPERTIES IMPORTED_LOCATION "${Protobuf_LIBRARY}" - INTERFACE_INCLUDE_SYSTEM_DIRECTORIES "${Protobuf_INCLUDE_DIR}" + INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}" + INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}" ) get_protobuf_version(Protobuf_VERSION "${Protobuf_INCLUDE_DIR}") endif() From 30a4e2f7ac7356999df5b5bac6fbbe489958a4d9 Mon Sep 17 00:00:00 2001 From: Suleyman TURKMEN Date: Mon, 10 Sep 2018 04:02:27 +0300 Subject: [PATCH 03/27] Update hog.cpp --- modules/objdetect/src/hog.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/objdetect/src/hog.cpp b/modules/objdetect/src/hog.cpp index 4bd9596c1d..72ac32782f 100644 --- a/modules/objdetect/src/hog.cpp +++ b/modules/objdetect/src/hog.cpp @@ -163,8 +163,9 @@ bool HOGDescriptor::read(FileNode& obj) FileNode vecNode = obj["SVMDetector"]; if( vecNode.isSeq() ) { - vecNode >> svmDetector; - CV_Assert(checkDetectorSize()); + std::vector _svmDetector; + vecNode >> _svmDetector; + setSVMDetector(_svmDetector); } return true; } From 2f929376ec9046fb01b9eb271dead01e418ab29b Mon Sep 17 00:00:00 2001 From: Vitaly Tuzov Date: Mon, 10 Sep 2018 20:05:45 +0300 Subject: [PATCH 04/27] Fixed meanStdDev() implementation for the case input matrix has more than 4 channels --- modules/core/src/mean.cpp | 14 +++++++------- modules/core/test/test_arithm.cpp | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/modules/core/src/mean.cpp b/modules/core/src/mean.cpp index 30959f3bf9..e17875c08b 100644 --- a/modules/core/src/mean.cpp +++ b/modules/core/src/mean.cpp @@ -306,14 +306,14 @@ static int sumsqr_(const T* src0, const uchar* mask, ST* sum, SQT* sqsum, int le if( !mask ) { SumSqr_SIMD vop; - int i = vop(src0, mask, sum, sqsum, len, cn), k = cn % 4; - src += i * cn; + int x = vop(src0, mask, sum, sqsum, len, cn), k = cn % 4; + src = src0 + x * cn; if( k == 1 ) { ST s0 = sum[0]; SQT sq0 = sqsum[0]; - for( ; i < len; i++, src += cn ) + for(int i = x; i < len; i++, src += cn ) { T v = src[0]; s0 += v; sq0 += (SQT)v*v; @@ -325,7 +325,7 @@ static int sumsqr_(const T* src0, const uchar* mask, ST* sum, SQT* sqsum, int le { ST s0 = sum[0], s1 = sum[1]; SQT sq0 = sqsum[0], sq1 = sqsum[1]; - for( ; i < len; i++, src += cn ) + for(int i = x; i < len; i++, src += cn ) { T v0 = src[0], v1 = src[1]; s0 += v0; sq0 += (SQT)v0*v0; @@ -338,7 +338,7 @@ static int sumsqr_(const T* src0, const uchar* mask, ST* sum, SQT* sqsum, int le { ST s0 = sum[0], s1 = sum[1], s2 = sum[2]; SQT sq0 = sqsum[0], sq1 = sqsum[1], sq2 = sqsum[2]; - for( ; i < len; i++, src += cn ) + for(int i = x; i < len; i++, src += cn ) { T v0 = src[0], v1 = src[1], v2 = src[2]; s0 += v0; sq0 += (SQT)v0*v0; @@ -351,10 +351,10 @@ static int sumsqr_(const T* src0, const uchar* mask, ST* sum, SQT* sqsum, int le for( ; k < cn; k += 4 ) { - src = src0 + k; + src = src0 + x * cn + k; ST s0 = sum[k], s1 = sum[k+1], s2 = sum[k+2], s3 = sum[k+3]; SQT sq0 = sqsum[k], sq1 = sqsum[k+1], sq2 = sqsum[k+2], sq3 = sqsum[k+3]; - for( ; i < len; i++, src += cn ) + for(int i = x; i < len; i++, src += cn ) { T v0, v1; v0 = src[0], v1 = src[1]; diff --git a/modules/core/test/test_arithm.cpp b/modules/core/test/test_arithm.cpp index 049c86dd0d..8b84436140 100644 --- a/modules/core/test/test_arithm.cpp +++ b/modules/core/test/test_arithm.cpp @@ -2184,4 +2184,21 @@ TEST(Core_ConvertTo, regression_12121) } } +TEST(Core_MeanStdDev, regression_multichannel) +{ + { + uchar buf[] = { 1, 2, 3, 4, 5, 6, 7, 8, + 3, 4, 5, 6, 7, 8, 9, 10 }; + double ref_buf[] = { 2., 3., 4., 5., 6., 7., 8., 9., + 1., 1., 1., 1., 1., 1., 1., 1. }; + Mat src(1, 2, CV_MAKETYPE(CV_8U, 8), buf); + Mat ref_m(8, 1, CV_64FC1, ref_buf); + Mat ref_sd(8, 1, CV_64FC1, ref_buf + 8); + Mat dst_m, dst_sd; + meanStdDev(src, dst_m, dst_sd); + EXPECT_EQ(0, cv::norm(dst_m, ref_m, NORM_L1)); + EXPECT_EQ(0, cv::norm(dst_sd, ref_sd, NORM_L1)); + } +} + }} // namespace From 0a5bd0ac8b575918962775ac4c89b10545cdc6ed Mon Sep 17 00:00:00 2001 From: Vitaly Tuzov Date: Tue, 4 Sep 2018 16:37:39 +0300 Subject: [PATCH 05/27] sum() implementation updated to use wide universal intrinsics --- modules/core/src/sum.cpp | 369 ++++++++++++++++++++------------------- 1 file changed, 192 insertions(+), 177 deletions(-) diff --git a/modules/core/src/sum.cpp b/modules/core/src/sum.cpp index 660e176777..519ab1ee0f 100644 --- a/modules/core/src/sum.cpp +++ b/modules/core/src/sum.cpp @@ -19,115 +19,7 @@ struct Sum_SIMD } }; -template -inline void addChannels(DT * dst, ST * buf, int cn) -{ - for (int i = 0; i < 4; ++i) - dst[i % cn] += buf[i]; -} - -#if CV_SSE2 - -template <> -struct Sum_SIMD -{ - int operator () (const schar * src0, const uchar * mask, int * dst, int len, int cn) const - { - if (mask || (cn != 1 && cn != 2 && cn != 4) || !USE_SSE2) - return 0; - - int x = 0; - __m128i v_zero = _mm_setzero_si128(), v_sum = v_zero; - - for ( ; x <= len - 16; x += 16) - { - __m128i v_src = _mm_loadu_si128((const __m128i *)(src0 + x)); - __m128i v_half = _mm_srai_epi16(_mm_unpacklo_epi8(v_zero, v_src), 8); - - v_sum = _mm_add_epi32(v_sum, _mm_srai_epi32(_mm_unpacklo_epi16(v_zero, v_half), 16)); - v_sum = _mm_add_epi32(v_sum, _mm_srai_epi32(_mm_unpackhi_epi16(v_zero, v_half), 16)); - - v_half = _mm_srai_epi16(_mm_unpackhi_epi8(v_zero, v_src), 8); - v_sum = _mm_add_epi32(v_sum, _mm_srai_epi32(_mm_unpacklo_epi16(v_zero, v_half), 16)); - v_sum = _mm_add_epi32(v_sum, _mm_srai_epi32(_mm_unpackhi_epi16(v_zero, v_half), 16)); - } - - for ( ; x <= len - 8; x += 8) - { - __m128i v_src = _mm_srai_epi16(_mm_unpacklo_epi8(v_zero, _mm_loadl_epi64((__m128i const *)(src0 + x))), 8); - - v_sum = _mm_add_epi32(v_sum, _mm_srai_epi32(_mm_unpacklo_epi16(v_zero, v_src), 16)); - v_sum = _mm_add_epi32(v_sum, _mm_srai_epi32(_mm_unpackhi_epi16(v_zero, v_src), 16)); - } - - int CV_DECL_ALIGNED(16) ar[4]; - _mm_store_si128((__m128i*)ar, v_sum); - - addChannels(dst, ar, cn); - - return x / cn; - } -}; - -template <> -struct Sum_SIMD -{ - int operator () (const int * src0, const uchar * mask, double * dst, int len, int cn) const - { - if (mask || (cn != 1 && cn != 2 && cn != 4) || !USE_SSE2) - return 0; - - int x = 0; - __m128d v_zero = _mm_setzero_pd(), v_sum0 = v_zero, v_sum1 = v_zero; - - for ( ; x <= len - 4; x += 4) - { - __m128i v_src = _mm_loadu_si128((__m128i const *)(src0 + x)); - v_sum0 = _mm_add_pd(v_sum0, _mm_cvtepi32_pd(v_src)); - v_sum1 = _mm_add_pd(v_sum1, _mm_cvtepi32_pd(_mm_srli_si128(v_src, 8))); - } - - double CV_DECL_ALIGNED(16) ar[4]; - _mm_store_pd(ar, v_sum0); - _mm_store_pd(ar + 2, v_sum1); - - addChannels(dst, ar, cn); - - return x / cn; - } -}; - -template <> -struct Sum_SIMD -{ - int operator () (const float * src0, const uchar * mask, double * dst, int len, int cn) const - { - if (mask || (cn != 1 && cn != 2 && cn != 4) || !USE_SSE2) - return 0; - - int x = 0; - __m128d v_zero = _mm_setzero_pd(), v_sum0 = v_zero, v_sum1 = v_zero; - - for ( ; x <= len - 4; x += 4) - { - __m128 v_src = _mm_loadu_ps(src0 + x); - v_sum0 = _mm_add_pd(v_sum0, _mm_cvtps_pd(v_src)); - v_src = _mm_castsi128_ps(_mm_srli_si128(_mm_castps_si128(v_src), 8)); - v_sum1 = _mm_add_pd(v_sum1, _mm_cvtps_pd(v_src)); - } - - double CV_DECL_ALIGNED(16) ar[4]; - _mm_store_pd(ar, v_sum0); - _mm_store_pd(ar + 2, v_sum1); - - addChannels(dst, ar, cn); - - return x / cn; - } -}; - - -#elif CV_NEON +#if CV_SIMD template <> struct Sum_SIMD @@ -136,35 +28,49 @@ struct Sum_SIMD { if (mask || (cn != 1 && cn != 2 && cn != 4)) return 0; + len *= cn; int x = 0; - uint32x4_t v_sum = vdupq_n_u32(0u); + v_uint32 v_sum = vx_setzero_u32(); - for ( ; x <= len - 16; x += 16) + int len0 = len & -v_uint8::nlanes; + while (x < len0) { - uint8x16_t v_src = vld1q_u8(src0 + x); - uint16x8_t v_half = vmovl_u8(vget_low_u8(v_src)); - - v_sum = vaddw_u16(v_sum, vget_low_u16(v_half)); - v_sum = vaddw_u16(v_sum, vget_high_u16(v_half)); - - v_half = vmovl_u8(vget_high_u8(v_src)); - v_sum = vaddw_u16(v_sum, vget_low_u16(v_half)); - v_sum = vaddw_u16(v_sum, vget_high_u16(v_half)); + const int len_tmp = min(x + 256*v_uint16::nlanes, len0); + v_uint16 v_sum16 = vx_setzero_u16(); + for (; x < len_tmp; x += v_uint8::nlanes) + { + v_uint16 v_src0, v_src1; + v_expand(vx_load(src0 + x), v_src0, v_src1); + v_sum16 += v_src0 + v_src1; + } + v_uint32 v_half0, v_half1; + v_expand(v_sum16, v_half0, v_half1); + v_sum += v_half0 + v_half1; + } + if (x <= len - v_uint16::nlanes) + { + v_uint32 v_half0, v_half1; + v_expand(vx_load_expand(src0 + x), v_half0, v_half1); + v_sum += v_half0 + v_half1; + x += v_uint16::nlanes; + } + if (x <= len - v_uint32::nlanes) + { + v_sum += vx_load_expand_q(src0 + x); + x += v_uint32::nlanes; } - for ( ; x <= len - 8; x += 8) + if (cn == 1) + *dst += v_reduce_sum(v_sum); + else { - uint16x8_t v_src = vmovl_u8(vld1_u8(src0 + x)); - - v_sum = vaddw_u16(v_sum, vget_low_u16(v_src)); - v_sum = vaddw_u16(v_sum, vget_high_u16(v_src)); + uint32_t CV_DECL_ALIGNED(CV_SIMD_WIDTH) ar[v_uint32::nlanes]; + v_store_aligned(ar, v_sum); + for (int i = 0; i < v_uint32::nlanes; ++i) + dst[i % cn] += ar[i]; } - - unsigned int CV_DECL_ALIGNED(16) ar[4]; - vst1q_u32(ar, v_sum); - - addChannels(dst, ar, cn); + v_cleanup(); return x / cn; } @@ -177,35 +83,49 @@ struct Sum_SIMD { if (mask || (cn != 1 && cn != 2 && cn != 4)) return 0; + len *= cn; int x = 0; - int32x4_t v_sum = vdupq_n_s32(0); + v_int32 v_sum = vx_setzero_s32(); - for ( ; x <= len - 16; x += 16) + int len0 = len & -v_int8::nlanes; + while (x < len0) { - int8x16_t v_src = vld1q_s8(src0 + x); - int16x8_t v_half = vmovl_s8(vget_low_s8(v_src)); - - v_sum = vaddw_s16(v_sum, vget_low_s16(v_half)); - v_sum = vaddw_s16(v_sum, vget_high_s16(v_half)); - - v_half = vmovl_s8(vget_high_s8(v_src)); - v_sum = vaddw_s16(v_sum, vget_low_s16(v_half)); - v_sum = vaddw_s16(v_sum, vget_high_s16(v_half)); + const int len_tmp = min(x + 256*v_int16::nlanes, len0); + v_int16 v_sum16 = vx_setzero_s16(); + for (; x < len_tmp; x += v_int8::nlanes) + { + v_int16 v_src0, v_src1; + v_expand(vx_load(src0 + x), v_src0, v_src1); + v_sum16 += v_src0 + v_src1; + } + v_int32 v_half0, v_half1; + v_expand(v_sum16, v_half0, v_half1); + v_sum += v_half0 + v_half1; + } + if (x <= len - v_int16::nlanes) + { + v_int32 v_half0, v_half1; + v_expand(vx_load_expand(src0 + x), v_half0, v_half1); + v_sum += v_half0 + v_half1; + x += v_int16::nlanes; + } + if (x <= len - v_int32::nlanes) + { + v_sum += vx_load_expand_q(src0 + x); + x += v_int32::nlanes; } - for ( ; x <= len - 8; x += 8) + if (cn == 1) + *dst += v_reduce_sum(v_sum); + else { - int16x8_t v_src = vmovl_s8(vld1_s8(src0 + x)); - - v_sum = vaddw_s16(v_sum, vget_low_s16(v_src)); - v_sum = vaddw_s16(v_sum, vget_high_s16(v_src)); + int32_t CV_DECL_ALIGNED(CV_SIMD_WIDTH) ar[v_int32::nlanes]; + v_store_aligned(ar, v_sum); + for (int i = 0; i < v_int32::nlanes; ++i) + dst[i % cn] += ar[i]; } - - int CV_DECL_ALIGNED(16) ar[4]; - vst1q_s32(ar, v_sum); - - addChannels(dst, ar, cn); + v_cleanup(); return x / cn; } @@ -218,25 +138,33 @@ struct Sum_SIMD { if (mask || (cn != 1 && cn != 2 && cn != 4)) return 0; + len *= cn; int x = 0; - uint32x4_t v_sum = vdupq_n_u32(0u); + v_uint32 v_sum = vx_setzero_u32(); - for ( ; x <= len - 8; x += 8) + for (; x <= len - v_uint16::nlanes; x += v_uint16::nlanes) { - uint16x8_t v_src = vld1q_u16(src0 + x); - - v_sum = vaddw_u16(v_sum, vget_low_u16(v_src)); - v_sum = vaddw_u16(v_sum, vget_high_u16(v_src)); + v_uint32 v_src0, v_src1; + v_expand(vx_load(src0 + x), v_src0, v_src1); + v_sum += v_src0 + v_src1; + } + if (x <= len - v_uint32::nlanes) + { + v_sum += vx_load_expand(src0 + x); + x += v_uint32::nlanes; } - for ( ; x <= len - 4; x += 4) - v_sum = vaddw_u16(v_sum, vld1_u16(src0 + x)); - - unsigned int CV_DECL_ALIGNED(16) ar[4]; - vst1q_u32(ar, v_sum); - - addChannels(dst, ar, cn); + if (cn == 1) + *dst += v_reduce_sum(v_sum); + else + { + uint32_t CV_DECL_ALIGNED(CV_SIMD_WIDTH) ar[v_uint32::nlanes]; + v_store_aligned(ar, v_sum); + for (int i = 0; i < v_uint32::nlanes; ++i) + dst[i % cn] += ar[i]; + } + v_cleanup(); return x / cn; } @@ -249,30 +177,117 @@ struct Sum_SIMD { if (mask || (cn != 1 && cn != 2 && cn != 4)) return 0; + len *= cn; int x = 0; - int32x4_t v_sum = vdupq_n_s32(0u); + v_int32 v_sum = vx_setzero_s32(); - for ( ; x <= len - 8; x += 8) + for (; x <= len - v_int16::nlanes; x += v_int16::nlanes) { - int16x8_t v_src = vld1q_s16(src0 + x); - - v_sum = vaddw_s16(v_sum, vget_low_s16(v_src)); - v_sum = vaddw_s16(v_sum, vget_high_s16(v_src)); + v_int32 v_src0, v_src1; + v_expand(vx_load(src0 + x), v_src0, v_src1); + v_sum += v_src0 + v_src1; + } + if (x <= len - v_int32::nlanes) + { + v_sum += vx_load_expand(src0 + x); + x += v_int32::nlanes; } - for ( ; x <= len - 4; x += 4) - v_sum = vaddw_s16(v_sum, vld1_s16(src0 + x)); - - int CV_DECL_ALIGNED(16) ar[4]; - vst1q_s32(ar, v_sum); - - addChannels(dst, ar, cn); + if (cn == 1) + *dst += v_reduce_sum(v_sum); + else + { + int32_t CV_DECL_ALIGNED(CV_SIMD_WIDTH) ar[v_int32::nlanes]; + v_store_aligned(ar, v_sum); + for (int i = 0; i < v_int32::nlanes; ++i) + dst[i % cn] += ar[i]; + } + v_cleanup(); return x / cn; } }; +#if CV_SIMD_64F +template <> +struct Sum_SIMD +{ + int operator () (const int * src0, const uchar * mask, double * dst, int len, int cn) const + { + if (mask || (cn != 1 && cn != 2 && cn != 4)) + return 0; + len *= cn; + + int x = 0; + v_float64 v_sum0 = vx_setzero_f64(); + v_float64 v_sum1 = vx_setzero_f64(); + + for (; x <= len - 2 * v_int32::nlanes; x += 2 * v_int32::nlanes) + { + v_int32 v_src0 = vx_load(src0 + x); + v_int32 v_src1 = vx_load(src0 + x + v_int32::nlanes); + v_sum0 += v_cvt_f64(v_src0) + v_cvt_f64(v_src1); + v_sum1 += v_cvt_f64_high(v_src0) + v_cvt_f64_high(v_src1); + } + +#if CV_SIMD256 || CV_SIMD512 + double CV_DECL_ALIGNED(CV_SIMD_WIDTH) ar[v_float64::nlanes]; + v_store_aligned(ar, v_sum0 + v_sum1); + for (int i = 0; i < v_float64::nlanes; ++i) + dst[i % cn] += ar[i]; +#else + double CV_DECL_ALIGNED(CV_SIMD_WIDTH) ar[2 * v_float64::nlanes]; + v_store_aligned(ar, v_sum0); + v_store_aligned(ar + v_float64::nlanes, v_sum1); + for (int i = 0; i < 2 * v_float64::nlanes; ++i) + dst[i % cn] += ar[i]; +#endif + v_cleanup(); + + return x / cn; + } +}; + +template <> +struct Sum_SIMD +{ + int operator () (const float * src0, const uchar * mask, double * dst, int len, int cn) const + { + if (mask || (cn != 1 && cn != 2 && cn != 4)) + return 0; + len *= cn; + + int x = 0; + v_float64 v_sum0 = vx_setzero_f64(); + v_float64 v_sum1 = vx_setzero_f64(); + + for (; x <= len - 2 * v_float32::nlanes; x += 2 * v_float32::nlanes) + { + v_float32 v_src0 = vx_load(src0 + x); + v_float32 v_src1 = vx_load(src0 + x + v_float32::nlanes); + v_sum0 += v_cvt_f64(v_src0) + v_cvt_f64(v_src1); + v_sum1 += v_cvt_f64_high(v_src0) + v_cvt_f64_high(v_src1); + } + +#if CV_SIMD256 || CV_SIMD512 + double CV_DECL_ALIGNED(CV_SIMD_WIDTH) ar[v_float64::nlanes]; + v_store_aligned(ar, v_sum0 + v_sum1); + for (int i = 0; i < v_float64::nlanes; ++i) + dst[i % cn] += ar[i]; +#else + double CV_DECL_ALIGNED(CV_SIMD_WIDTH) ar[2 * v_float64::nlanes]; + v_store_aligned(ar, v_sum0); + v_store_aligned(ar + v_float64::nlanes, v_sum1); + for (int i = 0; i < 2 * v_float64::nlanes; ++i) + dst[i % cn] += ar[i]; +#endif + v_cleanup(); + + return x / cn; + } +}; +#endif #endif template From 0c8590027f3c1b9f1f6b50d71b42ba3bbfbaa11c Mon Sep 17 00:00:00 2001 From: Lubov Batanina Date: Mon, 10 Sep 2018 21:07:51 +0300 Subject: [PATCH 06/27] Merge pull request #12071 from l-bat/l-bat:onnx_parser * Add Squeezenet support in ONNX * Add AlexNet support in ONNX * Add Googlenet support in ONNX * Add CaffeNet and RCNN support in ONNX * Add VGG16 and VGG16 with batch normalization support in ONNX * Add RCNN, ZFNet, ResNet18v1 and ResNet50v1 support in ONNX * Add ResNet101_DUC_HDC * Add Tiny Yolov2 * Add CNN_MNIST, MobileNetv2 and LResNet100 support in ONNX * Add ONNX models for emotion recognition * Add DenseNet121 support in ONNX * Add Inception v1 support in ONNX * Refactoring * Fix tests * Fix tests * Skip unstable test * Modify Reshape operation --- modules/dnn/CMakeLists.txt | 8 +- modules/dnn/include/opencv2/dnn/dict.hpp | 3 + modules/dnn/include/opencv2/dnn/dnn.hpp | 12 + modules/dnn/include/opencv2/dnn/dnn.inl.hpp | 5 + modules/dnn/misc/onnx/opencv-onnx.pb.cc | 6977 +++++++++++++++++++ modules/dnn/misc/onnx/opencv-onnx.pb.h | 5849 ++++++++++++++++ modules/dnn/src/dnn.cpp | 4 + modules/dnn/src/onnx/onnx_importer.cpp | 585 ++ modules/dnn/src/onnx/opencv-onnx.proto | 446 ++ modules/dnn/test/test_onnx_importer.cpp | 344 + 10 files changed, 14229 insertions(+), 4 deletions(-) create mode 100644 modules/dnn/misc/onnx/opencv-onnx.pb.cc create mode 100644 modules/dnn/misc/onnx/opencv-onnx.pb.h create mode 100644 modules/dnn/src/onnx/onnx_importer.cpp create mode 100644 modules/dnn/src/onnx/opencv-onnx.proto create mode 100644 modules/dnn/test/test_onnx_importer.cpp diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt index 40b573f45a..52416731ff 100644 --- a/modules/dnn/CMakeLists.txt +++ b/modules/dnn/CMakeLists.txt @@ -67,13 +67,13 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS ) if(PROTOBUF_UPDATE_FILES) - file(GLOB proto_files "${CMAKE_CURRENT_LIST_DIR}/src/tensorflow/*.proto" "${CMAKE_CURRENT_LIST_DIR}/src/caffe/opencv-caffe.proto") + file(GLOB proto_files "${CMAKE_CURRENT_LIST_DIR}/src/tensorflow/*.proto" "${CMAKE_CURRENT_LIST_DIR}/src/caffe/opencv-caffe.proto" "${CMAKE_CURRENT_LIST_DIR}/src/onnx/opencv-onnx.proto") set(PROTOBUF_GENERATE_CPP_APPEND_PATH ON) # required for tensorflow protobuf_generate_cpp(fw_srcs fw_hdrs ${proto_files}) else() - file(GLOB fw_srcs "${CMAKE_CURRENT_LIST_DIR}/misc/tensorflow/*.cc" "${CMAKE_CURRENT_LIST_DIR}/misc/caffe/opencv-caffe.pb.cc") - file(GLOB fw_hdrs "${CMAKE_CURRENT_LIST_DIR}/misc/tensorflow/*.h" "${CMAKE_CURRENT_LIST_DIR}/misc/caffe/opencv-caffe.pb.h") - set(fw_inc "${CMAKE_CURRENT_LIST_DIR}/misc/caffe" "${CMAKE_CURRENT_LIST_DIR}/misc/tensorflow") + file(GLOB fw_srcs "${CMAKE_CURRENT_LIST_DIR}/misc/tensorflow/*.cc" "${CMAKE_CURRENT_LIST_DIR}/misc/caffe/opencv-caffe.pb.cc" "${CMAKE_CURRENT_LIST_DIR}/misc/onnx/opencv-onnx.pb.cc") + file(GLOB fw_hdrs "${CMAKE_CURRENT_LIST_DIR}/misc/tensorflow/*.h" "${CMAKE_CURRENT_LIST_DIR}/misc/caffe/opencv-caffe.pb.h" "${CMAKE_CURRENT_LIST_DIR}/misc/onnx/opencv-onnx.pb.h") + set(fw_inc "${CMAKE_CURRENT_LIST_DIR}/misc/caffe" "${CMAKE_CURRENT_LIST_DIR}/misc/tensorflow" "${CMAKE_CURRENT_LIST_DIR}/misc/onnx") endif() set(include_dirs ${fw_inc}) diff --git a/modules/dnn/include/opencv2/dnn/dict.hpp b/modules/dnn/include/opencv2/dnn/dict.hpp index 69287dc1cc..850e17f0b2 100644 --- a/modules/dnn/include/opencv2/dnn/dict.hpp +++ b/modules/dnn/include/opencv2/dnn/dict.hpp @@ -141,6 +141,9 @@ public: template const T &set(const String &key, const T &value); + //! Erase @p key from the dictionary. + void erase(const String &key); + friend std::ostream &operator<<(std::ostream &stream, const Dict &dict); std::map::const_iterator begin() const; diff --git a/modules/dnn/include/opencv2/dnn/dnn.hpp b/modules/dnn/include/opencv2/dnn/dnn.hpp index 0736e8aa4a..ccb4c85635 100644 --- a/modules/dnn/include/opencv2/dnn/dnn.hpp +++ b/modules/dnn/include/opencv2/dnn/dnn.hpp @@ -814,6 +814,18 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN */ CV_EXPORTS_W Net readNetFromModelOptimizer(const String &xml, const String &bin); + /** @brief Reads a network model ONNX. + * @param onnxFile path to the .onnx file with text description of the network architecture. + * @returns Network object that ready to do forward, throw an exception in failure cases. + */ + CV_EXPORTS_W Net readNetFromONNX(const String &onnxFile); + + /** @brief Creates blob from .pb file. + * @param path to the .pb file with input tensor. + * @returns Mat. + */ + CV_EXPORTS_W Mat readTensorFromONNX(const String& path); + /** @brief Creates 4-dimensional blob from image. Optionally resizes and crops @p image from center, * subtract @p mean values, scales values by @p scalefactor, swap Blue and Red channels. * @param image input image (with 1-, 3- or 4-channels). diff --git a/modules/dnn/include/opencv2/dnn/dnn.inl.hpp b/modules/dnn/include/opencv2/dnn/dnn.inl.hpp index 4231896187..17d4c200bd 100644 --- a/modules/dnn/include/opencv2/dnn/dnn.inl.hpp +++ b/modules/dnn/include/opencv2/dnn/dnn.inl.hpp @@ -364,6 +364,11 @@ inline const T &Dict::set(const String &key, const T &value) return value; } +inline void Dict::erase(const String &key) +{ + dict.erase(key); +} + inline std::ostream &operator<<(std::ostream &stream, const Dict &dict) { Dict::_Dict::const_iterator it; diff --git a/modules/dnn/misc/onnx/opencv-onnx.pb.cc b/modules/dnn/misc/onnx/opencv-onnx.pb.cc new file mode 100644 index 0000000000..6d7049623d --- /dev/null +++ b/modules/dnn/misc/onnx/opencv-onnx.pb.cc @@ -0,0 +1,6977 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: opencv-onnx.proto + +#include "opencv-onnx.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// This is a temporary google only hack +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS +#include "third_party/protobuf/version.h" +#endif +// @@protoc_insertion_point(includes) +namespace opencv_onnx { +class AttributeProtoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _AttributeProto_default_instance_; +class ValueInfoProtoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _ValueInfoProto_default_instance_; +class NodeProtoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _NodeProto_default_instance_; +class ModelProtoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _ModelProto_default_instance_; +class StringStringEntryProtoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _StringStringEntryProto_default_instance_; +class GraphProtoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _GraphProto_default_instance_; +class TensorProto_SegmentDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _TensorProto_Segment_default_instance_; +class TensorProtoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _TensorProto_default_instance_; +class TensorShapeProto_DimensionDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; + ::google::protobuf::int64 dim_value_; + ::google::protobuf::internal::ArenaStringPtr dim_param_; +} _TensorShapeProto_Dimension_default_instance_; +class TensorShapeProtoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _TensorShapeProto_default_instance_; +class TypeProto_TensorDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _TypeProto_Tensor_default_instance_; +class TypeProtoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; + const ::opencv_onnx::TypeProto_Tensor* tensor_type_; +} _TypeProto_default_instance_; +class OperatorSetIdProtoDefaultTypeInternal { + public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; +} _OperatorSetIdProto_default_instance_; +} // namespace opencv_onnx +namespace protobuf_opencv_2donnx_2eproto { +void InitDefaultsAttributeProtoImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto(); + protobuf_opencv_2donnx_2eproto::InitDefaultsValueInfoProto(); + { + void* ptr = &::opencv_onnx::_AttributeProto_default_instance_; + new (ptr) ::opencv_onnx::AttributeProto(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + { + void* ptr = &::opencv_onnx::_NodeProto_default_instance_; + new (ptr) ::opencv_onnx::NodeProto(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + { + void* ptr = &::opencv_onnx::_GraphProto_default_instance_; + new (ptr) ::opencv_onnx::GraphProto(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::opencv_onnx::AttributeProto::InitAsDefaultInstance(); + ::opencv_onnx::NodeProto::InitAsDefaultInstance(); + ::opencv_onnx::GraphProto::InitAsDefaultInstance(); +} + +void InitDefaultsAttributeProto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsAttributeProtoImpl); +} + +void InitDefaultsValueInfoProtoImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto(); + { + void* ptr = &::opencv_onnx::_ValueInfoProto_default_instance_; + new (ptr) ::opencv_onnx::ValueInfoProto(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::opencv_onnx::ValueInfoProto::InitAsDefaultInstance(); +} + +void InitDefaultsValueInfoProto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsValueInfoProtoImpl); +} + +void InitDefaultsModelProtoImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + protobuf_opencv_2donnx_2eproto::InitDefaultsOperatorSetIdProto(); + protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto(); + protobuf_opencv_2donnx_2eproto::InitDefaultsStringStringEntryProto(); + { + void* ptr = &::opencv_onnx::_ModelProto_default_instance_; + new (ptr) ::opencv_onnx::ModelProto(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::opencv_onnx::ModelProto::InitAsDefaultInstance(); +} + +void InitDefaultsModelProto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsModelProtoImpl); +} + +void InitDefaultsStringStringEntryProtoImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + { + void* ptr = &::opencv_onnx::_StringStringEntryProto_default_instance_; + new (ptr) ::opencv_onnx::StringStringEntryProto(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::opencv_onnx::StringStringEntryProto::InitAsDefaultInstance(); +} + +void InitDefaultsStringStringEntryProto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStringStringEntryProtoImpl); +} + +void InitDefaultsTensorProto_SegmentImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + { + void* ptr = &::opencv_onnx::_TensorProto_Segment_default_instance_; + new (ptr) ::opencv_onnx::TensorProto_Segment(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::opencv_onnx::TensorProto_Segment::InitAsDefaultInstance(); +} + +void InitDefaultsTensorProto_Segment() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorProto_SegmentImpl); +} + +void InitDefaultsTensorProtoImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto_Segment(); + { + void* ptr = &::opencv_onnx::_TensorProto_default_instance_; + new (ptr) ::opencv_onnx::TensorProto(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::opencv_onnx::TensorProto::InitAsDefaultInstance(); +} + +void InitDefaultsTensorProto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorProtoImpl); +} + +void InitDefaultsTensorShapeProto_DimensionImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + { + void* ptr = &::opencv_onnx::_TensorShapeProto_Dimension_default_instance_; + new (ptr) ::opencv_onnx::TensorShapeProto_Dimension(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::opencv_onnx::TensorShapeProto_Dimension::InitAsDefaultInstance(); +} + +void InitDefaultsTensorShapeProto_Dimension() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorShapeProto_DimensionImpl); +} + +void InitDefaultsTensorShapeProtoImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto_Dimension(); + { + void* ptr = &::opencv_onnx::_TensorShapeProto_default_instance_; + new (ptr) ::opencv_onnx::TensorShapeProto(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::opencv_onnx::TensorShapeProto::InitAsDefaultInstance(); +} + +void InitDefaultsTensorShapeProto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorShapeProtoImpl); +} + +void InitDefaultsTypeProto_TensorImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto(); + { + void* ptr = &::opencv_onnx::_TypeProto_Tensor_default_instance_; + new (ptr) ::opencv_onnx::TypeProto_Tensor(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::opencv_onnx::TypeProto_Tensor::InitAsDefaultInstance(); +} + +void InitDefaultsTypeProto_Tensor() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTypeProto_TensorImpl); +} + +void InitDefaultsTypeProtoImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto_Tensor(); + { + void* ptr = &::opencv_onnx::_TypeProto_default_instance_; + new (ptr) ::opencv_onnx::TypeProto(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::opencv_onnx::TypeProto::InitAsDefaultInstance(); +} + +void InitDefaultsTypeProto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTypeProtoImpl); +} + +void InitDefaultsOperatorSetIdProtoImpl() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + +#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + ::google::protobuf::internal::InitProtobufDefaultsForceUnique(); +#else + ::google::protobuf::internal::InitProtobufDefaults(); +#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS + { + void* ptr = &::opencv_onnx::_OperatorSetIdProto_default_instance_; + new (ptr) ::opencv_onnx::OperatorSetIdProto(); + ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + } + ::opencv_onnx::OperatorSetIdProto::InitAsDefaultInstance(); +} + +void InitDefaultsOperatorSetIdProto() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsOperatorSetIdProtoImpl); +} + +::google::protobuf::Metadata file_level_metadata[13]; +const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[3]; + +const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, ref_attr_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, doc_string_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, f_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, i_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, s_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, t_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, g_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, floats_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, ints_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, strings_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, tensors_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, graphs_), + 0, + 3, + 2, + 8, + 7, + 6, + 1, + 4, + 5, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, doc_string_), + 0, + 2, + 1, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, input_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, output_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, op_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, domain_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, attribute_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, doc_string_), + ~0u, + ~0u, + 0, + 1, + 3, + ~0u, + 2, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, ir_version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, opset_import_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, domain_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, model_version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, doc_string_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, graph_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, metadata_props_), + 5, + ~0u, + 0, + 1, + 2, + 6, + 3, + 4, + ~0u, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, key_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, value_), + 0, + 1, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, node_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, initializer_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, doc_string_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, input_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, output_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, value_info_), + ~0u, + 0, + ~0u, + 1, + ~0u, + ~0u, + ~0u, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, begin_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, end_), + 0, + 1, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, dims_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, data_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, segment_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, float_data_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, int32_data_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, string_data_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, int64_data_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, doc_string_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, raw_data_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, double_data_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, uint64_data_), + ~0u, + 4, + 3, + ~0u, + ~0u, + ~0u, + ~0u, + 0, + 2, + 1, + ~0u, + ~0u, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _internal_metadata_), + ~0u, // no _extensions_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _oneof_case_[0]), + ~0u, // no _weak_field_map_ + offsetof(::opencv_onnx::TensorShapeProto_DimensionDefaultTypeInternal, dim_value_), + offsetof(::opencv_onnx::TensorShapeProto_DimensionDefaultTypeInternal, dim_param_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, denotation_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, value_), + ~0u, + ~0u, + 0, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, dim_), + ~0u, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, elem_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, shape_), + 1, + 0, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, _internal_metadata_), + ~0u, // no _extensions_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, _oneof_case_[0]), + ~0u, // no _weak_field_map_ + offsetof(::opencv_onnx::TypeProtoDefaultTypeInternal, tensor_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, denotation_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, value_), + ~0u, + 0, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, domain_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, version_), + 0, + 1, +}; +static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + { 0, 19, sizeof(::opencv_onnx::AttributeProto)}, + { 33, 41, sizeof(::opencv_onnx::ValueInfoProto)}, + { 44, 56, sizeof(::opencv_onnx::NodeProto)}, + { 63, 77, sizeof(::opencv_onnx::ModelProto)}, + { 86, 93, sizeof(::opencv_onnx::StringStringEntryProto)}, + { 95, 107, sizeof(::opencv_onnx::GraphProto)}, + { 114, 121, sizeof(::opencv_onnx::TensorProto_Segment)}, + { 123, 140, sizeof(::opencv_onnx::TensorProto)}, + { 152, 161, sizeof(::opencv_onnx::TensorShapeProto_Dimension)}, + { 164, 170, sizeof(::opencv_onnx::TensorShapeProto)}, + { 171, 178, sizeof(::opencv_onnx::TypeProto_Tensor)}, + { 180, 188, sizeof(::opencv_onnx::TypeProto)}, + { 190, 197, sizeof(::opencv_onnx::OperatorSetIdProto)}, +}; + +static ::google::protobuf::Message const * const file_default_instances[] = { + reinterpret_cast(&::opencv_onnx::_AttributeProto_default_instance_), + reinterpret_cast(&::opencv_onnx::_ValueInfoProto_default_instance_), + reinterpret_cast(&::opencv_onnx::_NodeProto_default_instance_), + reinterpret_cast(&::opencv_onnx::_ModelProto_default_instance_), + reinterpret_cast(&::opencv_onnx::_StringStringEntryProto_default_instance_), + reinterpret_cast(&::opencv_onnx::_GraphProto_default_instance_), + reinterpret_cast(&::opencv_onnx::_TensorProto_Segment_default_instance_), + reinterpret_cast(&::opencv_onnx::_TensorProto_default_instance_), + reinterpret_cast(&::opencv_onnx::_TensorShapeProto_Dimension_default_instance_), + reinterpret_cast(&::opencv_onnx::_TensorShapeProto_default_instance_), + reinterpret_cast(&::opencv_onnx::_TypeProto_Tensor_default_instance_), + reinterpret_cast(&::opencv_onnx::_TypeProto_default_instance_), + reinterpret_cast(&::opencv_onnx::_OperatorSetIdProto_default_instance_), +}; + +void protobuf_AssignDescriptors() { + AddDescriptors(); + ::google::protobuf::MessageFactory* factory = NULL; + AssignDescriptors( + "opencv-onnx.proto", schemas, file_default_instances, TableStruct::offsets, factory, + file_level_metadata, file_level_enum_descriptors, NULL); +} + +void protobuf_AssignDescriptorsOnce() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors); +} + +void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD; +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 13); +} + +void AddDescriptorsImpl() { + InitDefaults(); + static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + "\n\021opencv-onnx.proto\022\013opencv_onnx\"\203\004\n\016Att" + "ributeProto\022\014\n\004name\030\001 \001(\t\022\025\n\rref_attr_na" + "me\030\025 \001(\t\022\022\n\ndoc_string\030\r \001(\t\0227\n\004type\030\024 \001" + "(\0162).opencv_onnx.AttributeProto.Attribut" + "eType\022\t\n\001f\030\002 \001(\002\022\t\n\001i\030\003 \001(\003\022\t\n\001s\030\004 \001(\014\022#" + "\n\001t\030\005 \001(\0132\030.opencv_onnx.TensorProto\022\"\n\001g" + "\030\006 \001(\0132\027.opencv_onnx.GraphProto\022\016\n\006float" + "s\030\007 \003(\002\022\014\n\004ints\030\010 \003(\003\022\017\n\007strings\030\t \003(\014\022)" + "\n\007tensors\030\n \003(\0132\030.opencv_onnx.TensorProt" + "o\022\'\n\006graphs\030\013 \003(\0132\027.opencv_onnx.GraphPro" + "to\"\221\001\n\rAttributeType\022\r\n\tUNDEFINED\020\000\022\t\n\005F" + "LOAT\020\001\022\007\n\003INT\020\002\022\n\n\006STRING\020\003\022\n\n\006TENSOR\020\004\022" + "\t\n\005GRAPH\020\005\022\n\n\006FLOATS\020\006\022\010\n\004INTS\020\007\022\013\n\007STRI" + "NGS\020\010\022\013\n\007TENSORS\020\t\022\n\n\006GRAPHS\020\n\"X\n\016ValueI" + "nfoProto\022\014\n\004name\030\001 \001(\t\022$\n\004type\030\002 \001(\0132\026.o" + "pencv_onnx.TypeProto\022\022\n\ndoc_string\030\003 \001(\t" + "\"\235\001\n\tNodeProto\022\r\n\005input\030\001 \003(\t\022\016\n\006output\030" + "\002 \003(\t\022\014\n\004name\030\003 \001(\t\022\017\n\007op_type\030\004 \001(\t\022\016\n\006" + "domain\030\007 \001(\t\022.\n\tattribute\030\005 \003(\0132\033.opencv" + "_onnx.AttributeProto\022\022\n\ndoc_string\030\006 \001(\t" + "\"\250\002\n\nModelProto\022\022\n\nir_version\030\001 \001(\003\0225\n\014o" + "pset_import\030\010 \003(\0132\037.opencv_onnx.Operator" + "SetIdProto\022\025\n\rproducer_name\030\002 \001(\t\022\030\n\020pro" + "ducer_version\030\003 \001(\t\022\016\n\006domain\030\004 \001(\t\022\025\n\rm" + "odel_version\030\005 \001(\003\022\022\n\ndoc_string\030\006 \001(\t\022&" + "\n\005graph\030\007 \001(\0132\027.opencv_onnx.GraphProto\022;" + "\n\016metadata_props\030\016 \003(\0132#.opencv_onnx.Str" + "ingStringEntryProto\"4\n\026StringStringEntry" + "Proto\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\215\002\n\nGr" + "aphProto\022$\n\004node\030\001 \003(\0132\026.opencv_onnx.Nod" + "eProto\022\014\n\004name\030\002 \001(\t\022-\n\013initializer\030\005 \003(" + "\0132\030.opencv_onnx.TensorProto\022\022\n\ndoc_strin" + "g\030\n \001(\t\022*\n\005input\030\013 \003(\0132\033.opencv_onnx.Val" + "ueInfoProto\022+\n\006output\030\014 \003(\0132\033.opencv_onn" + "x.ValueInfoProto\022/\n\nvalue_info\030\r \003(\0132\033.o" + "pencv_onnx.ValueInfoProto\"\275\004\n\013TensorProt" + "o\022\014\n\004dims\030\001 \003(\003\0224\n\tdata_type\030\002 \001(\0162!.ope" + "ncv_onnx.TensorProto.DataType\0221\n\007segment" + "\030\003 \001(\0132 .opencv_onnx.TensorProto.Segment" + "\022\026\n\nfloat_data\030\004 \003(\002B\002\020\001\022\026\n\nint32_data\030\005" + " \003(\005B\002\020\001\022\023\n\013string_data\030\006 \003(\014\022\026\n\nint64_d" + "ata\030\007 \003(\003B\002\020\001\022\014\n\004name\030\010 \001(\t\022\022\n\ndoc_strin" + "g\030\014 \001(\t\022\020\n\010raw_data\030\t \001(\014\022\027\n\013double_data" + "\030\n \003(\001B\002\020\001\022\027\n\013uint64_data\030\013 \003(\004B\002\020\001\032%\n\007S" + "egment\022\r\n\005begin\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\"\314\001\n\010D" + "ataType\022\r\n\tUNDEFINED\020\000\022\t\n\005FLOAT\020\001\022\t\n\005UIN" + "T8\020\002\022\010\n\004INT8\020\003\022\n\n\006UINT16\020\004\022\t\n\005INT16\020\005\022\t\n" + "\005INT32\020\006\022\t\n\005INT64\020\007\022\n\n\006STRING\020\010\022\010\n\004BOOL\020" + "\t\022\013\n\007FLOAT16\020\n\022\n\n\006DOUBLE\020\013\022\n\n\006UINT32\020\014\022\n" + "\n\006UINT64\020\r\022\r\n\tCOMPLEX64\020\016\022\016\n\nCOMPLEX128\020" + "\017\"\234\001\n\020TensorShapeProto\0224\n\003dim\030\001 \003(\0132\'.op" + "encv_onnx.TensorShapeProto.Dimension\032R\n\t" + "Dimension\022\023\n\tdim_value\030\001 \001(\003H\000\022\023\n\tdim_pa" + "ram\030\002 \001(\tH\000\022\022\n\ndenotation\030\003 \001(\tB\007\n\005value" + "\"\314\001\n\tTypeProto\0224\n\013tensor_type\030\001 \001(\0132\035.op" + "encv_onnx.TypeProto.TensorH\000\022\022\n\ndenotati" + "on\030\006 \001(\t\032l\n\006Tensor\0224\n\telem_type\030\001 \001(\0162!." + "opencv_onnx.TensorProto.DataType\022,\n\005shap" + "e\030\002 \001(\0132\035.opencv_onnx.TensorShapeProtoB\007" + "\n\005value\"5\n\022OperatorSetIdProto\022\016\n\006domain\030" + "\001 \001(\t\022\017\n\007version\030\002 \001(\003*c\n\007Version\022\022\n\016_ST" + "ART_VERSION\020\000\022\031\n\025IR_VERSION_2017_10_10\020\001" + "\022\031\n\025IR_VERSION_2017_10_30\020\002\022\016\n\nIR_VERSIO" + "N\020\003" + }; + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + descriptor, 2523); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "opencv-onnx.proto", &protobuf_RegisterTypes); +} + +void AddDescriptors() { + static GOOGLE_PROTOBUF_DECLARE_ONCE(once); + ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl); +} +// Force AddDescriptors() to be called at dynamic initialization time. +struct StaticDescriptorInitializer { + StaticDescriptorInitializer() { + AddDescriptors(); + } +} static_descriptor_initializer; +} // namespace protobuf_opencv_2donnx_2eproto +namespace opencv_onnx { +const ::google::protobuf::EnumDescriptor* AttributeProto_AttributeType_descriptor() { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_opencv_2donnx_2eproto::file_level_enum_descriptors[0]; +} +bool AttributeProto_AttributeType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + return true; + default: + return false; + } +} + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const AttributeProto_AttributeType AttributeProto::UNDEFINED; +const AttributeProto_AttributeType AttributeProto::FLOAT; +const AttributeProto_AttributeType AttributeProto::INT; +const AttributeProto_AttributeType AttributeProto::STRING; +const AttributeProto_AttributeType AttributeProto::TENSOR; +const AttributeProto_AttributeType AttributeProto::GRAPH; +const AttributeProto_AttributeType AttributeProto::FLOATS; +const AttributeProto_AttributeType AttributeProto::INTS; +const AttributeProto_AttributeType AttributeProto::STRINGS; +const AttributeProto_AttributeType AttributeProto::TENSORS; +const AttributeProto_AttributeType AttributeProto::GRAPHS; +const AttributeProto_AttributeType AttributeProto::AttributeType_MIN; +const AttributeProto_AttributeType AttributeProto::AttributeType_MAX; +const int AttributeProto::AttributeType_ARRAYSIZE; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +const ::google::protobuf::EnumDescriptor* TensorProto_DataType_descriptor() { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_opencv_2donnx_2eproto::file_level_enum_descriptors[1]; +} +bool TensorProto_DataType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + return true; + default: + return false; + } +} + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const TensorProto_DataType TensorProto::UNDEFINED; +const TensorProto_DataType TensorProto::FLOAT; +const TensorProto_DataType TensorProto::UINT8; +const TensorProto_DataType TensorProto::INT8; +const TensorProto_DataType TensorProto::UINT16; +const TensorProto_DataType TensorProto::INT16; +const TensorProto_DataType TensorProto::INT32; +const TensorProto_DataType TensorProto::INT64; +const TensorProto_DataType TensorProto::STRING; +const TensorProto_DataType TensorProto::BOOL; +const TensorProto_DataType TensorProto::FLOAT16; +const TensorProto_DataType TensorProto::DOUBLE; +const TensorProto_DataType TensorProto::UINT32; +const TensorProto_DataType TensorProto::UINT64; +const TensorProto_DataType TensorProto::COMPLEX64; +const TensorProto_DataType TensorProto::COMPLEX128; +const TensorProto_DataType TensorProto::DataType_MIN; +const TensorProto_DataType TensorProto::DataType_MAX; +const int TensorProto::DataType_ARRAYSIZE; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 +const ::google::protobuf::EnumDescriptor* Version_descriptor() { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_opencv_2donnx_2eproto::file_level_enum_descriptors[2]; +} +bool Version_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + + +// =================================================================== + +void AttributeProto::InitAsDefaultInstance() { + ::opencv_onnx::_AttributeProto_default_instance_._instance.get_mutable()->t_ = const_cast< ::opencv_onnx::TensorProto*>( + ::opencv_onnx::TensorProto::internal_default_instance()); + ::opencv_onnx::_AttributeProto_default_instance_._instance.get_mutable()->g_ = const_cast< ::opencv_onnx::GraphProto*>( + ::opencv_onnx::GraphProto::internal_default_instance()); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int AttributeProto::kNameFieldNumber; +const int AttributeProto::kRefAttrNameFieldNumber; +const int AttributeProto::kDocStringFieldNumber; +const int AttributeProto::kTypeFieldNumber; +const int AttributeProto::kFFieldNumber; +const int AttributeProto::kIFieldNumber; +const int AttributeProto::kSFieldNumber; +const int AttributeProto::kTFieldNumber; +const int AttributeProto::kGFieldNumber; +const int AttributeProto::kFloatsFieldNumber; +const int AttributeProto::kIntsFieldNumber; +const int AttributeProto::kStringsFieldNumber; +const int AttributeProto::kTensorsFieldNumber; +const int AttributeProto::kGraphsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +AttributeProto::AttributeProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.AttributeProto) +} +AttributeProto::AttributeProto(const AttributeProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + floats_(from.floats_), + ints_(from.ints_), + strings_(from.strings_), + tensors_(from.tensors_), + graphs_(from.graphs_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_name()) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_s()) { + s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_); + } + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_doc_string()) { + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + ref_attr_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_ref_attr_name()) { + ref_attr_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ref_attr_name_); + } + if (from.has_t()) { + t_ = new ::opencv_onnx::TensorProto(*from.t_); + } else { + t_ = NULL; + } + if (from.has_g()) { + g_ = new ::opencv_onnx::GraphProto(*from.g_); + } else { + g_ = NULL; + } + ::memcpy(&i_, &from.i_, + static_cast(reinterpret_cast(&type_) - + reinterpret_cast(&i_)) + sizeof(type_)); + // @@protoc_insertion_point(copy_constructor:opencv_onnx.AttributeProto) +} + +void AttributeProto::SharedCtor() { + _cached_size_ = 0; + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ref_attr_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&t_, 0, static_cast( + reinterpret_cast(&type_) - + reinterpret_cast(&t_)) + sizeof(type_)); +} + +AttributeProto::~AttributeProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.AttributeProto) + SharedDtor(); +} + +void AttributeProto::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + s_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ref_attr_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete t_; + if (this != internal_default_instance()) delete g_; +} + +void AttributeProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* AttributeProto::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const AttributeProto& AttributeProto::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto(); + return *internal_default_instance(); +} + +AttributeProto* AttributeProto::New(::google::protobuf::Arena* arena) const { + AttributeProto* n = new AttributeProto; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void AttributeProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.AttributeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + floats_.Clear(); + ints_.Clear(); + strings_.Clear(); + tensors_.Clear(); + graphs_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 63u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*name_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(!s_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*s_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*doc_string_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(!ref_attr_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*ref_attr_name_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000010u) { + GOOGLE_DCHECK(t_ != NULL); + t_->Clear(); + } + if (cached_has_bits & 0x00000020u) { + GOOGLE_DCHECK(g_ != NULL); + g_->Clear(); + } + } + if (cached_has_bits & 192u) { + ::memset(&i_, 0, static_cast( + reinterpret_cast(&f_) - + reinterpret_cast(&i_)) + sizeof(f_)); + } + type_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool AttributeProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.AttributeProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.AttributeProto.name"); + } else { + goto handle_unusual; + } + break; + } + + // optional float f = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) { + set_has_f(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, &f_))); + } else { + goto handle_unusual; + } + break; + } + + // optional int64 i = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { + set_has_i(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &i_))); + } else { + goto handle_unusual; + } + break; + } + + // optional bytes s = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_s())); + } else { + goto handle_unusual; + } + break; + } + + // optional .opencv_onnx.TensorProto t = 5; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_t())); + } else { + goto handle_unusual; + } + break; + } + + // optional .opencv_onnx.GraphProto g = 6; + case 6: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_g())); + } else { + goto handle_unusual; + } + break; + } + + // repeated float floats = 7; + case 7: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + 1, 61u, input, this->mutable_floats()))); + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, this->mutable_floats()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated int64 ints = 8; + case 8: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + 1, 64u, input, this->mutable_ints()))); + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, this->mutable_ints()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated bytes strings = 9; + case 9: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->add_strings())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .opencv_onnx.TensorProto tensors = 10; + case 10: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_tensors())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .opencv_onnx.GraphProto graphs = 11; + case 11: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_graphs())); + } else { + goto handle_unusual; + } + break; + } + + // optional string doc_string = 13; + case 13: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_doc_string())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.AttributeProto.doc_string"); + } else { + goto handle_unusual; + } + break; + } + + // optional .opencv_onnx.AttributeProto.AttributeType type = 20; + case 20: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(160u /* 160 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::opencv_onnx::AttributeProto_AttributeType_IsValid(value)) { + set_type(static_cast< ::opencv_onnx::AttributeProto_AttributeType >(value)); + } else { + mutable_unknown_fields()->AddVarint( + 20, static_cast< ::google::protobuf::uint64>(value)); + } + } else { + goto handle_unusual; + } + break; + } + + // optional string ref_attr_name = 21; + case 21: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_ref_attr_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->ref_attr_name().data(), static_cast(this->ref_attr_name().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.AttributeProto.ref_attr_name"); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.AttributeProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.AttributeProto) + return false; +#undef DO_ +} + +void AttributeProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.AttributeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.AttributeProto.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // optional float f = 2; + if (cached_has_bits & 0x00000080u) { + ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->f(), output); + } + + // optional int64 i = 3; + if (cached_has_bits & 0x00000040u) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->i(), output); + } + + // optional bytes s = 4; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 4, this->s(), output); + } + + // optional .opencv_onnx.TensorProto t = 5; + if (cached_has_bits & 0x00000010u) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *this->t_, output); + } + + // optional .opencv_onnx.GraphProto g = 6; + if (cached_has_bits & 0x00000020u) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 6, *this->g_, output); + } + + // repeated float floats = 7; + for (int i = 0, n = this->floats_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteFloat( + 7, this->floats(i), output); + } + + // repeated int64 ints = 8; + for (int i = 0, n = this->ints_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt64( + 8, this->ints(i), output); + } + + // repeated bytes strings = 9; + for (int i = 0, n = this->strings_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 9, this->strings(i), output); + } + + // repeated .opencv_onnx.TensorProto tensors = 10; + for (unsigned int i = 0, + n = static_cast(this->tensors_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 10, this->tensors(static_cast(i)), output); + } + + // repeated .opencv_onnx.GraphProto graphs = 11; + for (unsigned int i = 0, + n = static_cast(this->graphs_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 11, this->graphs(static_cast(i)), output); + } + + // optional string doc_string = 13; + if (cached_has_bits & 0x00000004u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.AttributeProto.doc_string"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 13, this->doc_string(), output); + } + + // optional .opencv_onnx.AttributeProto.AttributeType type = 20; + if (cached_has_bits & 0x00000100u) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 20, this->type(), output); + } + + // optional string ref_attr_name = 21; + if (cached_has_bits & 0x00000008u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->ref_attr_name().data(), static_cast(this->ref_attr_name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.AttributeProto.ref_attr_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 21, this->ref_attr_name(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.AttributeProto) +} + +::google::protobuf::uint8* AttributeProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.AttributeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.AttributeProto.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // optional float f = 2; + if (cached_has_bits & 0x00000080u) { + target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->f(), target); + } + + // optional int64 i = 3; + if (cached_has_bits & 0x00000040u) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->i(), target); + } + + // optional bytes s = 4; + if (cached_has_bits & 0x00000002u) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 4, this->s(), target); + } + + // optional .opencv_onnx.TensorProto t = 5; + if (cached_has_bits & 0x00000010u) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 5, *this->t_, deterministic, target); + } + + // optional .opencv_onnx.GraphProto g = 6; + if (cached_has_bits & 0x00000020u) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 6, *this->g_, deterministic, target); + } + + // repeated float floats = 7; + target = ::google::protobuf::internal::WireFormatLite:: + WriteFloatToArray(7, this->floats_, target); + + // repeated int64 ints = 8; + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArray(8, this->ints_, target); + + // repeated bytes strings = 9; + for (int i = 0, n = this->strings_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteBytesToArray(9, this->strings(i), target); + } + + // repeated .opencv_onnx.TensorProto tensors = 10; + for (unsigned int i = 0, + n = static_cast(this->tensors_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 10, this->tensors(static_cast(i)), deterministic, target); + } + + // repeated .opencv_onnx.GraphProto graphs = 11; + for (unsigned int i = 0, + n = static_cast(this->graphs_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 11, this->graphs(static_cast(i)), deterministic, target); + } + + // optional string doc_string = 13; + if (cached_has_bits & 0x00000004u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.AttributeProto.doc_string"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 13, this->doc_string(), target); + } + + // optional .opencv_onnx.AttributeProto.AttributeType type = 20; + if (cached_has_bits & 0x00000100u) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 20, this->type(), target); + } + + // optional string ref_attr_name = 21; + if (cached_has_bits & 0x00000008u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->ref_attr_name().data(), static_cast(this->ref_attr_name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.AttributeProto.ref_attr_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 21, this->ref_attr_name(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.AttributeProto) + return target; +} + +size_t AttributeProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.AttributeProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + // repeated float floats = 7; + { + unsigned int count = static_cast(this->floats_size()); + size_t data_size = 4UL * count; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->floats_size()); + total_size += data_size; + } + + // repeated int64 ints = 8; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int64Size(this->ints_); + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->ints_size()); + total_size += data_size; + } + + // repeated bytes strings = 9; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->strings_size()); + for (int i = 0, n = this->strings_size(); i < n; i++) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + this->strings(i)); + } + + // repeated .opencv_onnx.TensorProto tensors = 10; + { + unsigned int count = static_cast(this->tensors_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->tensors(static_cast(i))); + } + } + + // repeated .opencv_onnx.GraphProto graphs = 11; + { + unsigned int count = static_cast(this->graphs_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->graphs(static_cast(i))); + } + } + + if (_has_bits_[0 / 32] & 255u) { + // optional string name = 1; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional bytes s = 4; + if (has_s()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->s()); + } + + // optional string doc_string = 13; + if (has_doc_string()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->doc_string()); + } + + // optional string ref_attr_name = 21; + if (has_ref_attr_name()) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->ref_attr_name()); + } + + // optional .opencv_onnx.TensorProto t = 5; + if (has_t()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *this->t_); + } + + // optional .opencv_onnx.GraphProto g = 6; + if (has_g()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *this->g_); + } + + // optional int64 i = 3; + if (has_i()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->i()); + } + + // optional float f = 2; + if (has_f()) { + total_size += 1 + 4; + } + + } + // optional .opencv_onnx.AttributeProto.AttributeType type = 20; + if (has_type()) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void AttributeProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.AttributeProto) + GOOGLE_DCHECK_NE(&from, this); + const AttributeProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.AttributeProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.AttributeProto) + MergeFrom(*source); + } +} + +void AttributeProto::MergeFrom(const AttributeProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.AttributeProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + floats_.MergeFrom(from.floats_); + ints_.MergeFrom(from.ints_); + strings_.MergeFrom(from.strings_); + tensors_.MergeFrom(from.tensors_); + graphs_.MergeFrom(from.graphs_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 255u) { + if (cached_has_bits & 0x00000001u) { + set_has_name(); + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (cached_has_bits & 0x00000002u) { + set_has_s(); + s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_); + } + if (cached_has_bits & 0x00000004u) { + set_has_doc_string(); + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + if (cached_has_bits & 0x00000008u) { + set_has_ref_attr_name(); + ref_attr_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ref_attr_name_); + } + if (cached_has_bits & 0x00000010u) { + mutable_t()->::opencv_onnx::TensorProto::MergeFrom(from.t()); + } + if (cached_has_bits & 0x00000020u) { + mutable_g()->::opencv_onnx::GraphProto::MergeFrom(from.g()); + } + if (cached_has_bits & 0x00000040u) { + i_ = from.i_; + } + if (cached_has_bits & 0x00000080u) { + f_ = from.f_; + } + _has_bits_[0] |= cached_has_bits; + } + if (cached_has_bits & 0x00000100u) { + set_type(from.type()); + } +} + +void AttributeProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.AttributeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void AttributeProto::CopyFrom(const AttributeProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.AttributeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool AttributeProto::IsInitialized() const { + return true; +} + +void AttributeProto::Swap(AttributeProto* other) { + if (other == this) return; + InternalSwap(other); +} +void AttributeProto::InternalSwap(AttributeProto* other) { + using std::swap; + floats_.InternalSwap(&other->floats_); + ints_.InternalSwap(&other->ints_); + strings_.InternalSwap(&other->strings_); + tensors_.InternalSwap(&other->tensors_); + graphs_.InternalSwap(&other->graphs_); + name_.Swap(&other->name_); + s_.Swap(&other->s_); + doc_string_.Swap(&other->doc_string_); + ref_attr_name_.Swap(&other->ref_attr_name_); + swap(t_, other->t_); + swap(g_, other->g_); + swap(i_, other->i_); + swap(f_, other->f_); + swap(type_, other->type_); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata AttributeProto::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void ValueInfoProto::InitAsDefaultInstance() { + ::opencv_onnx::_ValueInfoProto_default_instance_._instance.get_mutable()->type_ = const_cast< ::opencv_onnx::TypeProto*>( + ::opencv_onnx::TypeProto::internal_default_instance()); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ValueInfoProto::kNameFieldNumber; +const int ValueInfoProto::kTypeFieldNumber; +const int ValueInfoProto::kDocStringFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ValueInfoProto::ValueInfoProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsValueInfoProto(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.ValueInfoProto) +} +ValueInfoProto::ValueInfoProto(const ValueInfoProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_name()) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_doc_string()) { + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + if (from.has_type()) { + type_ = new ::opencv_onnx::TypeProto(*from.type_); + } else { + type_ = NULL; + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.ValueInfoProto) +} + +void ValueInfoProto::SharedCtor() { + _cached_size_ = 0; + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + type_ = NULL; +} + +ValueInfoProto::~ValueInfoProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.ValueInfoProto) + SharedDtor(); +} + +void ValueInfoProto::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete type_; +} + +void ValueInfoProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ValueInfoProto::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const ValueInfoProto& ValueInfoProto::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsValueInfoProto(); + return *internal_default_instance(); +} + +ValueInfoProto* ValueInfoProto::New(::google::protobuf::Arena* arena) const { + ValueInfoProto* n = new ValueInfoProto; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ValueInfoProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.ValueInfoProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 7u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*name_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*doc_string_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(type_ != NULL); + type_->Clear(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool ValueInfoProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.ValueInfoProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string name = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.ValueInfoProto.name"); + } else { + goto handle_unusual; + } + break; + } + + // optional .opencv_onnx.TypeProto type = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_type())); + } else { + goto handle_unusual; + } + break; + } + + // optional string doc_string = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_doc_string())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.ValueInfoProto.doc_string"); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.ValueInfoProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.ValueInfoProto) + return false; +#undef DO_ +} + +void ValueInfoProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.ValueInfoProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ValueInfoProto.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // optional .opencv_onnx.TypeProto type = 2; + if (cached_has_bits & 0x00000004u) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, *this->type_, output); + } + + // optional string doc_string = 3; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ValueInfoProto.doc_string"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->doc_string(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.ValueInfoProto) +} + +::google::protobuf::uint8* ValueInfoProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ValueInfoProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ValueInfoProto.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // optional .opencv_onnx.TypeProto type = 2; + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, *this->type_, deterministic, target); + } + + // optional string doc_string = 3; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ValueInfoProto.doc_string"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->doc_string(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ValueInfoProto) + return target; +} + +size_t ValueInfoProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ValueInfoProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + if (_has_bits_[0 / 32] & 7u) { + // optional string name = 1; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional string doc_string = 3; + if (has_doc_string()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->doc_string()); + } + + // optional .opencv_onnx.TypeProto type = 2; + if (has_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *this->type_); + } + + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ValueInfoProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.ValueInfoProto) + GOOGLE_DCHECK_NE(&from, this); + const ValueInfoProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.ValueInfoProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.ValueInfoProto) + MergeFrom(*source); + } +} + +void ValueInfoProto::MergeFrom(const ValueInfoProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ValueInfoProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 7u) { + if (cached_has_bits & 0x00000001u) { + set_has_name(); + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (cached_has_bits & 0x00000002u) { + set_has_doc_string(); + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + if (cached_has_bits & 0x00000004u) { + mutable_type()->::opencv_onnx::TypeProto::MergeFrom(from.type()); + } + } +} + +void ValueInfoProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.ValueInfoProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ValueInfoProto::CopyFrom(const ValueInfoProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ValueInfoProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ValueInfoProto::IsInitialized() const { + return true; +} + +void ValueInfoProto::Swap(ValueInfoProto* other) { + if (other == this) return; + InternalSwap(other); +} +void ValueInfoProto::InternalSwap(ValueInfoProto* other) { + using std::swap; + name_.Swap(&other->name_); + doc_string_.Swap(&other->doc_string_); + swap(type_, other->type_); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ValueInfoProto::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void NodeProto::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int NodeProto::kInputFieldNumber; +const int NodeProto::kOutputFieldNumber; +const int NodeProto::kNameFieldNumber; +const int NodeProto::kOpTypeFieldNumber; +const int NodeProto::kDomainFieldNumber; +const int NodeProto::kAttributeFieldNumber; +const int NodeProto::kDocStringFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +NodeProto::NodeProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.NodeProto) +} +NodeProto::NodeProto(const NodeProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + input_(from.input_), + output_(from.output_), + attribute_(from.attribute_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_name()) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + op_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_op_type()) { + op_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.op_type_); + } + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_doc_string()) { + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_domain()) { + domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_); + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.NodeProto) +} + +void NodeProto::SharedCtor() { + _cached_size_ = 0; + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + op_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +NodeProto::~NodeProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.NodeProto) + SharedDtor(); +} + +void NodeProto::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + op_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void NodeProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* NodeProto::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const NodeProto& NodeProto::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto(); + return *internal_default_instance(); +} + +NodeProto* NodeProto::New(::google::protobuf::Arena* arena) const { + NodeProto* n = new NodeProto; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void NodeProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.NodeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + input_.Clear(); + output_.Clear(); + attribute_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 15u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*name_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(!op_type_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*op_type_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*doc_string_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(!domain_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*domain_.UnsafeRawStringPointer())->clear(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool NodeProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.NodeProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated string input = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_input())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->input(this->input_size() - 1).data(), + static_cast(this->input(this->input_size() - 1).length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.NodeProto.input"); + } else { + goto handle_unusual; + } + break; + } + + // repeated string output = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_output())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->output(this->output_size() - 1).data(), + static_cast(this->output(this->output_size() - 1).length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.NodeProto.output"); + } else { + goto handle_unusual; + } + break; + } + + // optional string name = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.NodeProto.name"); + } else { + goto handle_unusual; + } + break; + } + + // optional string op_type = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_op_type())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->op_type().data(), static_cast(this->op_type().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.NodeProto.op_type"); + } else { + goto handle_unusual; + } + break; + } + + // repeated .opencv_onnx.AttributeProto attribute = 5; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_attribute())); + } else { + goto handle_unusual; + } + break; + } + + // optional string doc_string = 6; + case 6: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_doc_string())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.NodeProto.doc_string"); + } else { + goto handle_unusual; + } + break; + } + + // optional string domain = 7; + case 7: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_domain())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->domain().data(), static_cast(this->domain().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.NodeProto.domain"); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.NodeProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.NodeProto) + return false; +#undef DO_ +} + +void NodeProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.NodeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated string input = 1; + for (int i = 0, n = this->input_size(); i < n; i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->input(i).data(), static_cast(this->input(i).length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.input"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->input(i), output); + } + + // repeated string output = 2; + for (int i = 0, n = this->output_size(); i < n; i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->output(i).data(), static_cast(this->output(i).length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.output"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 2, this->output(i), output); + } + + cached_has_bits = _has_bits_[0]; + // optional string name = 3; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->name(), output); + } + + // optional string op_type = 4; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->op_type().data(), static_cast(this->op_type().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.op_type"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->op_type(), output); + } + + // repeated .opencv_onnx.AttributeProto attribute = 5; + for (unsigned int i = 0, + n = static_cast(this->attribute_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, this->attribute(static_cast(i)), output); + } + + // optional string doc_string = 6; + if (cached_has_bits & 0x00000004u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.doc_string"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->doc_string(), output); + } + + // optional string domain = 7; + if (cached_has_bits & 0x00000008u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->domain().data(), static_cast(this->domain().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.domain"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 7, this->domain(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.NodeProto) +} + +::google::protobuf::uint8* NodeProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.NodeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated string input = 1; + for (int i = 0, n = this->input_size(); i < n; i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->input(i).data(), static_cast(this->input(i).length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.input"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(1, this->input(i), target); + } + + // repeated string output = 2; + for (int i = 0, n = this->output_size(); i < n; i++) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->output(i).data(), static_cast(this->output(i).length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.output"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(2, this->output(i), target); + } + + cached_has_bits = _has_bits_[0]; + // optional string name = 3; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->name(), target); + } + + // optional string op_type = 4; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->op_type().data(), static_cast(this->op_type().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.op_type"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->op_type(), target); + } + + // repeated .opencv_onnx.AttributeProto attribute = 5; + for (unsigned int i = 0, + n = static_cast(this->attribute_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 5, this->attribute(static_cast(i)), deterministic, target); + } + + // optional string doc_string = 6; + if (cached_has_bits & 0x00000004u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.doc_string"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->doc_string(), target); + } + + // optional string domain = 7; + if (cached_has_bits & 0x00000008u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->domain().data(), static_cast(this->domain().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.NodeProto.domain"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 7, this->domain(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.NodeProto) + return target; +} + +size_t NodeProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.NodeProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + // repeated string input = 1; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->input_size()); + for (int i = 0, n = this->input_size(); i < n; i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->input(i)); + } + + // repeated string output = 2; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->output_size()); + for (int i = 0, n = this->output_size(); i < n; i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->output(i)); + } + + // repeated .opencv_onnx.AttributeProto attribute = 5; + { + unsigned int count = static_cast(this->attribute_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->attribute(static_cast(i))); + } + } + + if (_has_bits_[0 / 32] & 15u) { + // optional string name = 3; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional string op_type = 4; + if (has_op_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->op_type()); + } + + // optional string doc_string = 6; + if (has_doc_string()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->doc_string()); + } + + // optional string domain = 7; + if (has_domain()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->domain()); + } + + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void NodeProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.NodeProto) + GOOGLE_DCHECK_NE(&from, this); + const NodeProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.NodeProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.NodeProto) + MergeFrom(*source); + } +} + +void NodeProto::MergeFrom(const NodeProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.NodeProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + input_.MergeFrom(from.input_); + output_.MergeFrom(from.output_); + attribute_.MergeFrom(from.attribute_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 15u) { + if (cached_has_bits & 0x00000001u) { + set_has_name(); + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (cached_has_bits & 0x00000002u) { + set_has_op_type(); + op_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.op_type_); + } + if (cached_has_bits & 0x00000004u) { + set_has_doc_string(); + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + if (cached_has_bits & 0x00000008u) { + set_has_domain(); + domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_); + } + } +} + +void NodeProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.NodeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void NodeProto::CopyFrom(const NodeProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.NodeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool NodeProto::IsInitialized() const { + return true; +} + +void NodeProto::Swap(NodeProto* other) { + if (other == this) return; + InternalSwap(other); +} +void NodeProto::InternalSwap(NodeProto* other) { + using std::swap; + input_.InternalSwap(&other->input_); + output_.InternalSwap(&other->output_); + attribute_.InternalSwap(&other->attribute_); + name_.Swap(&other->name_); + op_type_.Swap(&other->op_type_); + doc_string_.Swap(&other->doc_string_); + domain_.Swap(&other->domain_); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata NodeProto::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void ModelProto::InitAsDefaultInstance() { + ::opencv_onnx::_ModelProto_default_instance_._instance.get_mutable()->graph_ = const_cast< ::opencv_onnx::GraphProto*>( + ::opencv_onnx::GraphProto::internal_default_instance()); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ModelProto::kIrVersionFieldNumber; +const int ModelProto::kOpsetImportFieldNumber; +const int ModelProto::kProducerNameFieldNumber; +const int ModelProto::kProducerVersionFieldNumber; +const int ModelProto::kDomainFieldNumber; +const int ModelProto::kModelVersionFieldNumber; +const int ModelProto::kDocStringFieldNumber; +const int ModelProto::kGraphFieldNumber; +const int ModelProto::kMetadataPropsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ModelProto::ModelProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsModelProto(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.ModelProto) +} +ModelProto::ModelProto(const ModelProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + opset_import_(from.opset_import_), + metadata_props_(from.metadata_props_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + producer_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_producer_name()) { + producer_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_name_); + } + producer_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_producer_version()) { + producer_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_version_); + } + domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_domain()) { + domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_); + } + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_doc_string()) { + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + if (from.has_graph()) { + graph_ = new ::opencv_onnx::GraphProto(*from.graph_); + } else { + graph_ = NULL; + } + ::memcpy(&ir_version_, &from.ir_version_, + static_cast(reinterpret_cast(&model_version_) - + reinterpret_cast(&ir_version_)) + sizeof(model_version_)); + // @@protoc_insertion_point(copy_constructor:opencv_onnx.ModelProto) +} + +void ModelProto::SharedCtor() { + _cached_size_ = 0; + producer_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + producer_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&graph_, 0, static_cast( + reinterpret_cast(&model_version_) - + reinterpret_cast(&graph_)) + sizeof(model_version_)); +} + +ModelProto::~ModelProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.ModelProto) + SharedDtor(); +} + +void ModelProto::SharedDtor() { + producer_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + producer_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete graph_; +} + +void ModelProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ModelProto::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const ModelProto& ModelProto::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsModelProto(); + return *internal_default_instance(); +} + +ModelProto* ModelProto::New(::google::protobuf::Arena* arena) const { + ModelProto* n = new ModelProto; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ModelProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.ModelProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + opset_import_.Clear(); + metadata_props_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 31u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(!producer_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*producer_name_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(!producer_version_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*producer_version_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(!domain_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*domain_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*doc_string_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000010u) { + GOOGLE_DCHECK(graph_ != NULL); + graph_->Clear(); + } + } + if (cached_has_bits & 96u) { + ::memset(&ir_version_, 0, static_cast( + reinterpret_cast(&model_version_) - + reinterpret_cast(&ir_version_)) + sizeof(model_version_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool ModelProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.ModelProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int64 ir_version = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + set_has_ir_version(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &ir_version_))); + } else { + goto handle_unusual; + } + break; + } + + // optional string producer_name = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_producer_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->producer_name().data(), static_cast(this->producer_name().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.ModelProto.producer_name"); + } else { + goto handle_unusual; + } + break; + } + + // optional string producer_version = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_producer_version())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->producer_version().data(), static_cast(this->producer_version().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.ModelProto.producer_version"); + } else { + goto handle_unusual; + } + break; + } + + // optional string domain = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_domain())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->domain().data(), static_cast(this->domain().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.ModelProto.domain"); + } else { + goto handle_unusual; + } + break; + } + + // optional int64 model_version = 5; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { + set_has_model_version(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &model_version_))); + } else { + goto handle_unusual; + } + break; + } + + // optional string doc_string = 6; + case 6: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_doc_string())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.ModelProto.doc_string"); + } else { + goto handle_unusual; + } + break; + } + + // optional .opencv_onnx.GraphProto graph = 7; + case 7: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_graph())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8; + case 8: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_opset_import())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14; + case 14: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_metadata_props())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.ModelProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.ModelProto) + return false; +#undef DO_ +} + +void ModelProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.ModelProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 ir_version = 1; + if (cached_has_bits & 0x00000020u) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->ir_version(), output); + } + + // optional string producer_name = 2; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->producer_name().data(), static_cast(this->producer_name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ModelProto.producer_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->producer_name(), output); + } + + // optional string producer_version = 3; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->producer_version().data(), static_cast(this->producer_version().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ModelProto.producer_version"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->producer_version(), output); + } + + // optional string domain = 4; + if (cached_has_bits & 0x00000004u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->domain().data(), static_cast(this->domain().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ModelProto.domain"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->domain(), output); + } + + // optional int64 model_version = 5; + if (cached_has_bits & 0x00000040u) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->model_version(), output); + } + + // optional string doc_string = 6; + if (cached_has_bits & 0x00000008u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ModelProto.doc_string"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->doc_string(), output); + } + + // optional .opencv_onnx.GraphProto graph = 7; + if (cached_has_bits & 0x00000010u) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 7, *this->graph_, output); + } + + // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8; + for (unsigned int i = 0, + n = static_cast(this->opset_import_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 8, this->opset_import(static_cast(i)), output); + } + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14; + for (unsigned int i = 0, + n = static_cast(this->metadata_props_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 14, this->metadata_props(static_cast(i)), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.ModelProto) +} + +::google::protobuf::uint8* ModelProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ModelProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 ir_version = 1; + if (cached_has_bits & 0x00000020u) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->ir_version(), target); + } + + // optional string producer_name = 2; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->producer_name().data(), static_cast(this->producer_name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ModelProto.producer_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->producer_name(), target); + } + + // optional string producer_version = 3; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->producer_version().data(), static_cast(this->producer_version().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ModelProto.producer_version"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->producer_version(), target); + } + + // optional string domain = 4; + if (cached_has_bits & 0x00000004u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->domain().data(), static_cast(this->domain().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ModelProto.domain"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->domain(), target); + } + + // optional int64 model_version = 5; + if (cached_has_bits & 0x00000040u) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->model_version(), target); + } + + // optional string doc_string = 6; + if (cached_has_bits & 0x00000008u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.ModelProto.doc_string"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->doc_string(), target); + } + + // optional .opencv_onnx.GraphProto graph = 7; + if (cached_has_bits & 0x00000010u) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 7, *this->graph_, deterministic, target); + } + + // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8; + for (unsigned int i = 0, + n = static_cast(this->opset_import_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 8, this->opset_import(static_cast(i)), deterministic, target); + } + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14; + for (unsigned int i = 0, + n = static_cast(this->metadata_props_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 14, this->metadata_props(static_cast(i)), deterministic, target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ModelProto) + return target; +} + +size_t ModelProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ModelProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8; + { + unsigned int count = static_cast(this->opset_import_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->opset_import(static_cast(i))); + } + } + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14; + { + unsigned int count = static_cast(this->metadata_props_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->metadata_props(static_cast(i))); + } + } + + if (_has_bits_[0 / 32] & 127u) { + // optional string producer_name = 2; + if (has_producer_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->producer_name()); + } + + // optional string producer_version = 3; + if (has_producer_version()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->producer_version()); + } + + // optional string domain = 4; + if (has_domain()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->domain()); + } + + // optional string doc_string = 6; + if (has_doc_string()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->doc_string()); + } + + // optional .opencv_onnx.GraphProto graph = 7; + if (has_graph()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *this->graph_); + } + + // optional int64 ir_version = 1; + if (has_ir_version()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->ir_version()); + } + + // optional int64 model_version = 5; + if (has_model_version()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->model_version()); + } + + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ModelProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.ModelProto) + GOOGLE_DCHECK_NE(&from, this); + const ModelProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.ModelProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.ModelProto) + MergeFrom(*source); + } +} + +void ModelProto::MergeFrom(const ModelProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ModelProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + opset_import_.MergeFrom(from.opset_import_); + metadata_props_.MergeFrom(from.metadata_props_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 127u) { + if (cached_has_bits & 0x00000001u) { + set_has_producer_name(); + producer_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_name_); + } + if (cached_has_bits & 0x00000002u) { + set_has_producer_version(); + producer_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_version_); + } + if (cached_has_bits & 0x00000004u) { + set_has_domain(); + domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_); + } + if (cached_has_bits & 0x00000008u) { + set_has_doc_string(); + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + if (cached_has_bits & 0x00000010u) { + mutable_graph()->::opencv_onnx::GraphProto::MergeFrom(from.graph()); + } + if (cached_has_bits & 0x00000020u) { + ir_version_ = from.ir_version_; + } + if (cached_has_bits & 0x00000040u) { + model_version_ = from.model_version_; + } + _has_bits_[0] |= cached_has_bits; + } +} + +void ModelProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.ModelProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ModelProto::CopyFrom(const ModelProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ModelProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ModelProto::IsInitialized() const { + return true; +} + +void ModelProto::Swap(ModelProto* other) { + if (other == this) return; + InternalSwap(other); +} +void ModelProto::InternalSwap(ModelProto* other) { + using std::swap; + opset_import_.InternalSwap(&other->opset_import_); + metadata_props_.InternalSwap(&other->metadata_props_); + producer_name_.Swap(&other->producer_name_); + producer_version_.Swap(&other->producer_version_); + domain_.Swap(&other->domain_); + doc_string_.Swap(&other->doc_string_); + swap(graph_, other->graph_); + swap(ir_version_, other->ir_version_); + swap(model_version_, other->model_version_); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ModelProto::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void StringStringEntryProto::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int StringStringEntryProto::kKeyFieldNumber; +const int StringStringEntryProto::kValueFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +StringStringEntryProto::StringStringEntryProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsStringStringEntryProto(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.StringStringEntryProto) +} +StringStringEntryProto::StringStringEntryProto(const StringStringEntryProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_key()) { + key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_); + } + value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_value()) { + value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.StringStringEntryProto) +} + +void StringStringEntryProto::SharedCtor() { + _cached_size_ = 0; + key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +StringStringEntryProto::~StringStringEntryProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.StringStringEntryProto) + SharedDtor(); +} + +void StringStringEntryProto::SharedDtor() { + key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void StringStringEntryProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* StringStringEntryProto::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const StringStringEntryProto& StringStringEntryProto::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsStringStringEntryProto(); + return *internal_default_instance(); +} + +StringStringEntryProto* StringStringEntryProto::New(::google::protobuf::Arena* arena) const { + StringStringEntryProto* n = new StringStringEntryProto; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void StringStringEntryProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.StringStringEntryProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(!key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*key_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(!value_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*value_.UnsafeRawStringPointer())->clear(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool StringStringEntryProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.StringStringEntryProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string key = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_key())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->key().data(), static_cast(this->key().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.StringStringEntryProto.key"); + } else { + goto handle_unusual; + } + break; + } + + // optional string value = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_value())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->value().data(), static_cast(this->value().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.StringStringEntryProto.value"); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.StringStringEntryProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.StringStringEntryProto) + return false; +#undef DO_ +} + +void StringStringEntryProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.StringStringEntryProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string key = 1; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->key().data(), static_cast(this->key().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.StringStringEntryProto.key"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->key(), output); + } + + // optional string value = 2; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->value().data(), static_cast(this->value().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.StringStringEntryProto.value"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->value(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.StringStringEntryProto) +} + +::google::protobuf::uint8* StringStringEntryProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.StringStringEntryProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string key = 1; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->key().data(), static_cast(this->key().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.StringStringEntryProto.key"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->key(), target); + } + + // optional string value = 2; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->value().data(), static_cast(this->value().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.StringStringEntryProto.value"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->value(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.StringStringEntryProto) + return target; +} + +size_t StringStringEntryProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.StringStringEntryProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + if (_has_bits_[0 / 32] & 3u) { + // optional string key = 1; + if (has_key()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->key()); + } + + // optional string value = 2; + if (has_value()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->value()); + } + + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void StringStringEntryProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.StringStringEntryProto) + GOOGLE_DCHECK_NE(&from, this); + const StringStringEntryProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.StringStringEntryProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.StringStringEntryProto) + MergeFrom(*source); + } +} + +void StringStringEntryProto::MergeFrom(const StringStringEntryProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.StringStringEntryProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { + set_has_key(); + key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_); + } + if (cached_has_bits & 0x00000002u) { + set_has_value(); + value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_); + } + } +} + +void StringStringEntryProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.StringStringEntryProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void StringStringEntryProto::CopyFrom(const StringStringEntryProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.StringStringEntryProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StringStringEntryProto::IsInitialized() const { + return true; +} + +void StringStringEntryProto::Swap(StringStringEntryProto* other) { + if (other == this) return; + InternalSwap(other); +} +void StringStringEntryProto::InternalSwap(StringStringEntryProto* other) { + using std::swap; + key_.Swap(&other->key_); + value_.Swap(&other->value_); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata StringStringEntryProto::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void GraphProto::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int GraphProto::kNodeFieldNumber; +const int GraphProto::kNameFieldNumber; +const int GraphProto::kInitializerFieldNumber; +const int GraphProto::kDocStringFieldNumber; +const int GraphProto::kInputFieldNumber; +const int GraphProto::kOutputFieldNumber; +const int GraphProto::kValueInfoFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +GraphProto::GraphProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.GraphProto) +} +GraphProto::GraphProto(const GraphProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + node_(from.node_), + initializer_(from.initializer_), + input_(from.input_), + output_(from.output_), + value_info_(from.value_info_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_name()) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_doc_string()) { + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.GraphProto) +} + +void GraphProto::SharedCtor() { + _cached_size_ = 0; + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +GraphProto::~GraphProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.GraphProto) + SharedDtor(); +} + +void GraphProto::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void GraphProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* GraphProto::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const GraphProto& GraphProto::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto(); + return *internal_default_instance(); +} + +GraphProto* GraphProto::New(::google::protobuf::Arena* arena) const { + GraphProto* n = new GraphProto; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void GraphProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.GraphProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + node_.Clear(); + initializer_.Clear(); + input_.Clear(); + output_.Clear(); + value_info_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*name_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*doc_string_.UnsafeRawStringPointer())->clear(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool GraphProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.GraphProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .opencv_onnx.NodeProto node = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_node())); + } else { + goto handle_unusual; + } + break; + } + + // optional string name = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.GraphProto.name"); + } else { + goto handle_unusual; + } + break; + } + + // repeated .opencv_onnx.TensorProto initializer = 5; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_initializer())); + } else { + goto handle_unusual; + } + break; + } + + // optional string doc_string = 10; + case 10: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_doc_string())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.GraphProto.doc_string"); + } else { + goto handle_unusual; + } + break; + } + + // repeated .opencv_onnx.ValueInfoProto input = 11; + case 11: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_input())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .opencv_onnx.ValueInfoProto output = 12; + case 12: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_output())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .opencv_onnx.ValueInfoProto value_info = 13; + case 13: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_value_info())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.GraphProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.GraphProto) + return false; +#undef DO_ +} + +void GraphProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.GraphProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .opencv_onnx.NodeProto node = 1; + for (unsigned int i = 0, + n = static_cast(this->node_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->node(static_cast(i)), output); + } + + cached_has_bits = _has_bits_[0]; + // optional string name = 2; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.GraphProto.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->name(), output); + } + + // repeated .opencv_onnx.TensorProto initializer = 5; + for (unsigned int i = 0, + n = static_cast(this->initializer_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, this->initializer(static_cast(i)), output); + } + + // optional string doc_string = 10; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.GraphProto.doc_string"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 10, this->doc_string(), output); + } + + // repeated .opencv_onnx.ValueInfoProto input = 11; + for (unsigned int i = 0, + n = static_cast(this->input_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 11, this->input(static_cast(i)), output); + } + + // repeated .opencv_onnx.ValueInfoProto output = 12; + for (unsigned int i = 0, + n = static_cast(this->output_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 12, this->output(static_cast(i)), output); + } + + // repeated .opencv_onnx.ValueInfoProto value_info = 13; + for (unsigned int i = 0, + n = static_cast(this->value_info_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 13, this->value_info(static_cast(i)), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.GraphProto) +} + +::google::protobuf::uint8* GraphProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.GraphProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .opencv_onnx.NodeProto node = 1; + for (unsigned int i = 0, + n = static_cast(this->node_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, this->node(static_cast(i)), deterministic, target); + } + + cached_has_bits = _has_bits_[0]; + // optional string name = 2; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.GraphProto.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->name(), target); + } + + // repeated .opencv_onnx.TensorProto initializer = 5; + for (unsigned int i = 0, + n = static_cast(this->initializer_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 5, this->initializer(static_cast(i)), deterministic, target); + } + + // optional string doc_string = 10; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.GraphProto.doc_string"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 10, this->doc_string(), target); + } + + // repeated .opencv_onnx.ValueInfoProto input = 11; + for (unsigned int i = 0, + n = static_cast(this->input_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 11, this->input(static_cast(i)), deterministic, target); + } + + // repeated .opencv_onnx.ValueInfoProto output = 12; + for (unsigned int i = 0, + n = static_cast(this->output_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 12, this->output(static_cast(i)), deterministic, target); + } + + // repeated .opencv_onnx.ValueInfoProto value_info = 13; + for (unsigned int i = 0, + n = static_cast(this->value_info_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 13, this->value_info(static_cast(i)), deterministic, target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.GraphProto) + return target; +} + +size_t GraphProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.GraphProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + // repeated .opencv_onnx.NodeProto node = 1; + { + unsigned int count = static_cast(this->node_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->node(static_cast(i))); + } + } + + // repeated .opencv_onnx.TensorProto initializer = 5; + { + unsigned int count = static_cast(this->initializer_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->initializer(static_cast(i))); + } + } + + // repeated .opencv_onnx.ValueInfoProto input = 11; + { + unsigned int count = static_cast(this->input_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->input(static_cast(i))); + } + } + + // repeated .opencv_onnx.ValueInfoProto output = 12; + { + unsigned int count = static_cast(this->output_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->output(static_cast(i))); + } + } + + // repeated .opencv_onnx.ValueInfoProto value_info = 13; + { + unsigned int count = static_cast(this->value_info_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->value_info(static_cast(i))); + } + } + + if (_has_bits_[0 / 32] & 3u) { + // optional string name = 2; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional string doc_string = 10; + if (has_doc_string()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->doc_string()); + } + + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void GraphProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.GraphProto) + GOOGLE_DCHECK_NE(&from, this); + const GraphProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.GraphProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.GraphProto) + MergeFrom(*source); + } +} + +void GraphProto::MergeFrom(const GraphProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.GraphProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + node_.MergeFrom(from.node_); + initializer_.MergeFrom(from.initializer_); + input_.MergeFrom(from.input_); + output_.MergeFrom(from.output_); + value_info_.MergeFrom(from.value_info_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { + set_has_name(); + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (cached_has_bits & 0x00000002u) { + set_has_doc_string(); + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + } +} + +void GraphProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.GraphProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void GraphProto::CopyFrom(const GraphProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.GraphProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GraphProto::IsInitialized() const { + return true; +} + +void GraphProto::Swap(GraphProto* other) { + if (other == this) return; + InternalSwap(other); +} +void GraphProto::InternalSwap(GraphProto* other) { + using std::swap; + node_.InternalSwap(&other->node_); + initializer_.InternalSwap(&other->initializer_); + input_.InternalSwap(&other->input_); + output_.InternalSwap(&other->output_); + value_info_.InternalSwap(&other->value_info_); + name_.Swap(&other->name_); + doc_string_.Swap(&other->doc_string_); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata GraphProto::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void TensorProto_Segment::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TensorProto_Segment::kBeginFieldNumber; +const int TensorProto_Segment::kEndFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TensorProto_Segment::TensorProto_Segment() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto_Segment(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.TensorProto.Segment) +} +TensorProto_Segment::TensorProto_Segment(const TensorProto_Segment& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::memcpy(&begin_, &from.begin_, + static_cast(reinterpret_cast(&end_) - + reinterpret_cast(&begin_)) + sizeof(end_)); + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto.Segment) +} + +void TensorProto_Segment::SharedCtor() { + _cached_size_ = 0; + ::memset(&begin_, 0, static_cast( + reinterpret_cast(&end_) - + reinterpret_cast(&begin_)) + sizeof(end_)); +} + +TensorProto_Segment::~TensorProto_Segment() { + // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto.Segment) + SharedDtor(); +} + +void TensorProto_Segment::SharedDtor() { +} + +void TensorProto_Segment::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TensorProto_Segment::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const TensorProto_Segment& TensorProto_Segment::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto_Segment(); + return *internal_default_instance(); +} + +TensorProto_Segment* TensorProto_Segment::New(::google::protobuf::Arena* arena) const { + TensorProto_Segment* n = new TensorProto_Segment; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void TensorProto_Segment::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto.Segment) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 3u) { + ::memset(&begin_, 0, static_cast( + reinterpret_cast(&end_) - + reinterpret_cast(&begin_)) + sizeof(end_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool TensorProto_Segment::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.TensorProto.Segment) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int64 begin = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + set_has_begin(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &begin_))); + } else { + goto handle_unusual; + } + break; + } + + // optional int64 end = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + set_has_end(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &end_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.TensorProto.Segment) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.TensorProto.Segment) + return false; +#undef DO_ +} + +void TensorProto_Segment::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.TensorProto.Segment) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 begin = 1; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->begin(), output); + } + + // optional int64 end = 2; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->end(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.TensorProto.Segment) +} + +::google::protobuf::uint8* TensorProto_Segment::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto.Segment) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 begin = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->begin(), target); + } + + // optional int64 end = 2; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->end(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto.Segment) + return target; +} + +size_t TensorProto_Segment::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto.Segment) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + if (_has_bits_[0 / 32] & 3u) { + // optional int64 begin = 1; + if (has_begin()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->begin()); + } + + // optional int64 end = 2; + if (has_end()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->end()); + } + + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void TensorProto_Segment::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorProto.Segment) + GOOGLE_DCHECK_NE(&from, this); + const TensorProto_Segment* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorProto.Segment) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorProto.Segment) + MergeFrom(*source); + } +} + +void TensorProto_Segment::MergeFrom(const TensorProto_Segment& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto.Segment) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { + begin_ = from.begin_; + } + if (cached_has_bits & 0x00000002u) { + end_ = from.end_; + } + _has_bits_[0] |= cached_has_bits; + } +} + +void TensorProto_Segment::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorProto.Segment) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TensorProto_Segment::CopyFrom(const TensorProto_Segment& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorProto.Segment) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TensorProto_Segment::IsInitialized() const { + return true; +} + +void TensorProto_Segment::Swap(TensorProto_Segment* other) { + if (other == this) return; + InternalSwap(other); +} +void TensorProto_Segment::InternalSwap(TensorProto_Segment* other) { + using std::swap; + swap(begin_, other->begin_); + swap(end_, other->end_); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata TensorProto_Segment::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void TensorProto::InitAsDefaultInstance() { + ::opencv_onnx::_TensorProto_default_instance_._instance.get_mutable()->segment_ = const_cast< ::opencv_onnx::TensorProto_Segment*>( + ::opencv_onnx::TensorProto_Segment::internal_default_instance()); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TensorProto::kDimsFieldNumber; +const int TensorProto::kDataTypeFieldNumber; +const int TensorProto::kSegmentFieldNumber; +const int TensorProto::kFloatDataFieldNumber; +const int TensorProto::kInt32DataFieldNumber; +const int TensorProto::kStringDataFieldNumber; +const int TensorProto::kInt64DataFieldNumber; +const int TensorProto::kNameFieldNumber; +const int TensorProto::kDocStringFieldNumber; +const int TensorProto::kRawDataFieldNumber; +const int TensorProto::kDoubleDataFieldNumber; +const int TensorProto::kUint64DataFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TensorProto::TensorProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.TensorProto) +} +TensorProto::TensorProto(const TensorProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + dims_(from.dims_), + float_data_(from.float_data_), + int32_data_(from.int32_data_), + string_data_(from.string_data_), + int64_data_(from.int64_data_), + double_data_(from.double_data_), + uint64_data_(from.uint64_data_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_name()) { + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + raw_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_raw_data()) { + raw_data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.raw_data_); + } + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_doc_string()) { + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + if (from.has_segment()) { + segment_ = new ::opencv_onnx::TensorProto_Segment(*from.segment_); + } else { + segment_ = NULL; + } + data_type_ = from.data_type_; + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto) +} + +void TensorProto::SharedCtor() { + _cached_size_ = 0; + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + raw_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(&segment_, 0, static_cast( + reinterpret_cast(&data_type_) - + reinterpret_cast(&segment_)) + sizeof(data_type_)); +} + +TensorProto::~TensorProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto) + SharedDtor(); +} + +void TensorProto::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + raw_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete segment_; +} + +void TensorProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TensorProto::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const TensorProto& TensorProto::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto(); + return *internal_default_instance(); +} + +TensorProto* TensorProto::New(::google::protobuf::Arena* arena) const { + TensorProto* n = new TensorProto; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void TensorProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + dims_.Clear(); + float_data_.Clear(); + int32_data_.Clear(); + string_data_.Clear(); + int64_data_.Clear(); + double_data_.Clear(); + uint64_data_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 15u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*name_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(!raw_data_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*raw_data_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*doc_string_.UnsafeRawStringPointer())->clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(segment_ != NULL); + segment_->Clear(); + } + } + data_type_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool TensorProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.TensorProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated int64 dims = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + 1, 8u, input, this->mutable_dims()))); + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, this->mutable_dims()))); + } else { + goto handle_unusual; + } + break; + } + + // optional .opencv_onnx.TensorProto.DataType data_type = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::opencv_onnx::TensorProto_DataType_IsValid(value)) { + set_data_type(static_cast< ::opencv_onnx::TensorProto_DataType >(value)); + } else { + mutable_unknown_fields()->AddVarint( + 2, static_cast< ::google::protobuf::uint64>(value)); + } + } else { + goto handle_unusual; + } + break; + } + + // optional .opencv_onnx.TensorProto.Segment segment = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_segment())); + } else { + goto handle_unusual; + } + break; + } + + // repeated float float_data = 4 [packed = true]; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + input, this->mutable_float_data()))); + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(37u /* 37 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( + 1, 34u, input, this->mutable_float_data()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated int32 int32_data = 5 [packed = true]; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_int32_data()))); + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 42u, input, this->mutable_int32_data()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated bytes string_data = 6; + case 6: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->add_string_data())); + } else { + goto handle_unusual; + } + break; + } + + // repeated int64 int64_data = 7 [packed = true]; + case 7: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, this->mutable_int64_data()))); + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + 1, 58u, input, this->mutable_int64_data()))); + } else { + goto handle_unusual; + } + break; + } + + // optional string name = 8; + case 8: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.TensorProto.name"); + } else { + goto handle_unusual; + } + break; + } + + // optional bytes raw_data = 9; + case 9: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_raw_data())); + } else { + goto handle_unusual; + } + break; + } + + // repeated double double_data = 10 [packed = true]; + case 10: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + input, this->mutable_double_data()))); + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( + 1, 82u, input, this->mutable_double_data()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated uint64 uint64_data = 11 [packed = true]; + case 11: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + input, this->mutable_uint64_data()))); + } else if ( + static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(88u /* 88 & 0xFF */)) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>( + 1, 90u, input, this->mutable_uint64_data()))); + } else { + goto handle_unusual; + } + break; + } + + // optional string doc_string = 12; + case 12: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_doc_string())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.TensorProto.doc_string"); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.TensorProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.TensorProto) + return false; +#undef DO_ +} + +void TensorProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.TensorProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated int64 dims = 1; + for (int i = 0, n = this->dims_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt64( + 1, this->dims(i), output); + } + + cached_has_bits = _has_bits_[0]; + // optional .opencv_onnx.TensorProto.DataType data_type = 2; + if (cached_has_bits & 0x00000010u) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 2, this->data_type(), output); + } + + // optional .opencv_onnx.TensorProto.Segment segment = 3; + if (cached_has_bits & 0x00000008u) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, *this->segment_, output); + } + + // repeated float float_data = 4 [packed = true]; + if (this->float_data_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(4, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(static_cast< ::google::protobuf::uint32>( + _float_data_cached_byte_size_)); + ::google::protobuf::internal::WireFormatLite::WriteFloatArray( + this->float_data().data(), this->float_data_size(), output); + } + + // repeated int32 int32_data = 5 [packed = true]; + if (this->int32_data_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(static_cast< ::google::protobuf::uint32>( + _int32_data_cached_byte_size_)); + } + for (int i = 0, n = this->int32_data_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->int32_data(i), output); + } + + // repeated bytes string_data = 6; + for (int i = 0, n = this->string_data_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 6, this->string_data(i), output); + } + + // repeated int64 int64_data = 7 [packed = true]; + if (this->int64_data_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(7, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(static_cast< ::google::protobuf::uint32>( + _int64_data_cached_byte_size_)); + } + for (int i = 0, n = this->int64_data_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag( + this->int64_data(i), output); + } + + // optional string name = 8; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.TensorProto.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 8, this->name(), output); + } + + // optional bytes raw_data = 9; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 9, this->raw_data(), output); + } + + // repeated double double_data = 10 [packed = true]; + if (this->double_data_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(10, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(static_cast< ::google::protobuf::uint32>( + _double_data_cached_byte_size_)); + ::google::protobuf::internal::WireFormatLite::WriteDoubleArray( + this->double_data().data(), this->double_data_size(), output); + } + + // repeated uint64 uint64_data = 11 [packed = true]; + if (this->uint64_data_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(11, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(static_cast< ::google::protobuf::uint32>( + _uint64_data_cached_byte_size_)); + } + for (int i = 0, n = this->uint64_data_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag( + this->uint64_data(i), output); + } + + // optional string doc_string = 12; + if (cached_has_bits & 0x00000004u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.TensorProto.doc_string"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 12, this->doc_string(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.TensorProto) +} + +::google::protobuf::uint8* TensorProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated int64 dims = 1; + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64ToArray(1, this->dims_, target); + + cached_has_bits = _has_bits_[0]; + // optional .opencv_onnx.TensorProto.DataType data_type = 2; + if (cached_has_bits & 0x00000010u) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 2, this->data_type(), target); + } + + // optional .opencv_onnx.TensorProto.Segment segment = 3; + if (cached_has_bits & 0x00000008u) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 3, *this->segment_, deterministic, target); + } + + // repeated float float_data = 4 [packed = true]; + if (this->float_data_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 4, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + static_cast< ::google::protobuf::int32>( + _float_data_cached_byte_size_), target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteFloatNoTagToArray(this->float_data_, target); + } + + // repeated int32 int32_data = 5 [packed = true]; + if (this->int32_data_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 5, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + static_cast< ::google::protobuf::int32>( + _int32_data_cached_byte_size_), target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->int32_data_, target); + } + + // repeated bytes string_data = 6; + for (int i = 0, n = this->string_data_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteBytesToArray(6, this->string_data(i), target); + } + + // repeated int64 int64_data = 7 [packed = true]; + if (this->int64_data_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 7, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + static_cast< ::google::protobuf::int32>( + _int64_data_cached_byte_size_), target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt64NoTagToArray(this->int64_data_, target); + } + + // optional string name = 8; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->name().data(), static_cast(this->name().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.TensorProto.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 8, this->name(), target); + } + + // optional bytes raw_data = 9; + if (cached_has_bits & 0x00000002u) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 9, this->raw_data(), target); + } + + // repeated double double_data = 10 [packed = true]; + if (this->double_data_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 10, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + static_cast< ::google::protobuf::int32>( + _double_data_cached_byte_size_), target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteDoubleNoTagToArray(this->double_data_, target); + } + + // repeated uint64 uint64_data = 11 [packed = true]; + if (this->uint64_data_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 11, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + static_cast< ::google::protobuf::int32>( + _uint64_data_cached_byte_size_), target); + target = ::google::protobuf::internal::WireFormatLite:: + WriteUInt64NoTagToArray(this->uint64_data_, target); + } + + // optional string doc_string = 12; + if (cached_has_bits & 0x00000004u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->doc_string().data(), static_cast(this->doc_string().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.TensorProto.doc_string"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 12, this->doc_string(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto) + return target; +} + +size_t TensorProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + // repeated int64 dims = 1; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int64Size(this->dims_); + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->dims_size()); + total_size += data_size; + } + + // repeated float float_data = 4 [packed = true]; + { + unsigned int count = static_cast(this->float_data_size()); + size_t data_size = 4UL * count; + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + static_cast< ::google::protobuf::int32>(data_size)); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _float_data_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated int32 int32_data = 5 [packed = true]; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->int32_data_); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + static_cast< ::google::protobuf::int32>(data_size)); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _int32_data_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated bytes string_data = 6; + total_size += 1 * + ::google::protobuf::internal::FromIntSize(this->string_data_size()); + for (int i = 0, n = this->string_data_size(); i < n; i++) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + this->string_data(i)); + } + + // repeated int64 int64_data = 7 [packed = true]; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + Int64Size(this->int64_data_); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + static_cast< ::google::protobuf::int32>(data_size)); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _int64_data_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated double double_data = 10 [packed = true]; + { + unsigned int count = static_cast(this->double_data_size()); + size_t data_size = 8UL * count; + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + static_cast< ::google::protobuf::int32>(data_size)); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _double_data_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + // repeated uint64 uint64_data = 11 [packed = true]; + { + size_t data_size = ::google::protobuf::internal::WireFormatLite:: + UInt64Size(this->uint64_data_); + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + static_cast< ::google::protobuf::int32>(data_size)); + } + int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _uint64_data_cached_byte_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + if (_has_bits_[0 / 32] & 31u) { + // optional string name = 8; + if (has_name()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + // optional bytes raw_data = 9; + if (has_raw_data()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->raw_data()); + } + + // optional string doc_string = 12; + if (has_doc_string()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->doc_string()); + } + + // optional .opencv_onnx.TensorProto.Segment segment = 3; + if (has_segment()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *this->segment_); + } + + // optional .opencv_onnx.TensorProto.DataType data_type = 2; + if (has_data_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->data_type()); + } + + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void TensorProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorProto) + GOOGLE_DCHECK_NE(&from, this); + const TensorProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorProto) + MergeFrom(*source); + } +} + +void TensorProto::MergeFrom(const TensorProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + dims_.MergeFrom(from.dims_); + float_data_.MergeFrom(from.float_data_); + int32_data_.MergeFrom(from.int32_data_); + string_data_.MergeFrom(from.string_data_); + int64_data_.MergeFrom(from.int64_data_); + double_data_.MergeFrom(from.double_data_); + uint64_data_.MergeFrom(from.uint64_data_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 31u) { + if (cached_has_bits & 0x00000001u) { + set_has_name(); + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } + if (cached_has_bits & 0x00000002u) { + set_has_raw_data(); + raw_data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.raw_data_); + } + if (cached_has_bits & 0x00000004u) { + set_has_doc_string(); + doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_); + } + if (cached_has_bits & 0x00000008u) { + mutable_segment()->::opencv_onnx::TensorProto_Segment::MergeFrom(from.segment()); + } + if (cached_has_bits & 0x00000010u) { + data_type_ = from.data_type_; + } + _has_bits_[0] |= cached_has_bits; + } +} + +void TensorProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TensorProto::CopyFrom(const TensorProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TensorProto::IsInitialized() const { + return true; +} + +void TensorProto::Swap(TensorProto* other) { + if (other == this) return; + InternalSwap(other); +} +void TensorProto::InternalSwap(TensorProto* other) { + using std::swap; + dims_.InternalSwap(&other->dims_); + float_data_.InternalSwap(&other->float_data_); + int32_data_.InternalSwap(&other->int32_data_); + string_data_.InternalSwap(&other->string_data_); + int64_data_.InternalSwap(&other->int64_data_); + double_data_.InternalSwap(&other->double_data_); + uint64_data_.InternalSwap(&other->uint64_data_); + name_.Swap(&other->name_); + raw_data_.Swap(&other->raw_data_); + doc_string_.Swap(&other->doc_string_); + swap(segment_, other->segment_); + swap(data_type_, other->data_type_); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata TensorProto::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void TensorShapeProto_Dimension::InitAsDefaultInstance() { + ::opencv_onnx::_TensorShapeProto_Dimension_default_instance_.dim_value_ = GOOGLE_LONGLONG(0); + ::opencv_onnx::_TensorShapeProto_Dimension_default_instance_.dim_param_.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TensorShapeProto_Dimension::kDimValueFieldNumber; +const int TensorShapeProto_Dimension::kDimParamFieldNumber; +const int TensorShapeProto_Dimension::kDenotationFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TensorShapeProto_Dimension::TensorShapeProto_Dimension() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto_Dimension(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.TensorShapeProto.Dimension) +} +TensorShapeProto_Dimension::TensorShapeProto_Dimension(const TensorShapeProto_Dimension& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_denotation()) { + denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_); + } + clear_has_value(); + switch (from.value_case()) { + case kDimValue: { + set_dim_value(from.dim_value()); + break; + } + case kDimParam: { + set_dim_param(from.dim_param()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto.Dimension) +} + +void TensorShapeProto_Dimension::SharedCtor() { + _cached_size_ = 0; + denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_value(); +} + +TensorShapeProto_Dimension::~TensorShapeProto_Dimension() { + // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto.Dimension) + SharedDtor(); +} + +void TensorShapeProto_Dimension::SharedDtor() { + denotation_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_value()) { + clear_value(); + } +} + +void TensorShapeProto_Dimension::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TensorShapeProto_Dimension::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const TensorShapeProto_Dimension& TensorShapeProto_Dimension::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto_Dimension(); + return *internal_default_instance(); +} + +TensorShapeProto_Dimension* TensorShapeProto_Dimension::New(::google::protobuf::Arena* arena) const { + TensorShapeProto_Dimension* n = new TensorShapeProto_Dimension; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void TensorShapeProto_Dimension::clear_value() { +// @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TensorShapeProto.Dimension) + switch (value_case()) { + case kDimValue: { + // No need to clear + break; + } + case kDimParam: { + value_.dim_param_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + _oneof_case_[0] = VALUE_NOT_SET; +} + + +void TensorShapeProto_Dimension::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto.Dimension) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(!denotation_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*denotation_.UnsafeRawStringPointer())->clear(); + } + clear_value(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool TensorShapeProto_Dimension::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.TensorShapeProto.Dimension) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int64 dim_value = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + clear_value(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &value_.dim_value_))); + set_has_dim_value(); + } else { + goto handle_unusual; + } + break; + } + + // optional string dim_param = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_dim_param())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->dim_param().data(), static_cast(this->dim_param().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.TensorShapeProto.Dimension.dim_param"); + } else { + goto handle_unusual; + } + break; + } + + // optional string denotation = 3; + case 3: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_denotation())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->denotation().data(), static_cast(this->denotation().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.TensorShapeProto.Dimension.denotation"); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.TensorShapeProto.Dimension) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.TensorShapeProto.Dimension) + return false; +#undef DO_ +} + +void TensorShapeProto_Dimension::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.TensorShapeProto.Dimension) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + switch (value_case()) { + case kDimValue: + ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->dim_value(), output); + break; + case kDimParam: + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->dim_param().data(), static_cast(this->dim_param().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.TensorShapeProto.Dimension.dim_param"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->dim_param(), output); + break; + default: ; + } + cached_has_bits = _has_bits_[0]; + // optional string denotation = 3; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->denotation().data(), static_cast(this->denotation().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.TensorShapeProto.Dimension.denotation"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->denotation(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.TensorShapeProto.Dimension) +} + +::google::protobuf::uint8* TensorShapeProto_Dimension::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto.Dimension) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + switch (value_case()) { + case kDimValue: + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->dim_value(), target); + break; + case kDimParam: + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->dim_param().data(), static_cast(this->dim_param().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.TensorShapeProto.Dimension.dim_param"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->dim_param(), target); + break; + default: ; + } + cached_has_bits = _has_bits_[0]; + // optional string denotation = 3; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->denotation().data(), static_cast(this->denotation().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.TensorShapeProto.Dimension.denotation"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->denotation(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto.Dimension) + return target; +} + +size_t TensorShapeProto_Dimension::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorShapeProto.Dimension) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + // optional string denotation = 3; + if (has_denotation()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->denotation()); + } + + switch (value_case()) { + // optional int64 dim_value = 1; + case kDimValue: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->dim_value()); + break; + } + // optional string dim_param = 2; + case kDimParam: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->dim_param()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void TensorShapeProto_Dimension::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorShapeProto.Dimension) + GOOGLE_DCHECK_NE(&from, this); + const TensorShapeProto_Dimension* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorShapeProto.Dimension) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorShapeProto.Dimension) + MergeFrom(*source); + } +} + +void TensorShapeProto_Dimension::MergeFrom(const TensorShapeProto_Dimension& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto.Dimension) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_denotation()) { + set_has_denotation(); + denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_); + } + switch (from.value_case()) { + case kDimValue: { + set_dim_value(from.dim_value()); + break; + } + case kDimParam: { + set_dim_param(from.dim_param()); + break; + } + case VALUE_NOT_SET: { + break; + } + } +} + +void TensorShapeProto_Dimension::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorShapeProto.Dimension) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TensorShapeProto_Dimension::CopyFrom(const TensorShapeProto_Dimension& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorShapeProto.Dimension) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TensorShapeProto_Dimension::IsInitialized() const { + return true; +} + +void TensorShapeProto_Dimension::Swap(TensorShapeProto_Dimension* other) { + if (other == this) return; + InternalSwap(other); +} +void TensorShapeProto_Dimension::InternalSwap(TensorShapeProto_Dimension* other) { + using std::swap; + denotation_.Swap(&other->denotation_); + swap(value_, other->value_); + swap(_oneof_case_[0], other->_oneof_case_[0]); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata TensorShapeProto_Dimension::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void TensorShapeProto::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TensorShapeProto::kDimFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TensorShapeProto::TensorShapeProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.TensorShapeProto) +} +TensorShapeProto::TensorShapeProto(const TensorShapeProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0), + dim_(from.dim_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto) +} + +void TensorShapeProto::SharedCtor() { + _cached_size_ = 0; +} + +TensorShapeProto::~TensorShapeProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto) + SharedDtor(); +} + +void TensorShapeProto::SharedDtor() { +} + +void TensorShapeProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TensorShapeProto::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const TensorShapeProto& TensorShapeProto::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto(); + return *internal_default_instance(); +} + +TensorShapeProto* TensorShapeProto::New(::google::protobuf::Arena* arena) const { + TensorShapeProto* n = new TensorShapeProto; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void TensorShapeProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + dim_.Clear(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool TensorShapeProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.TensorShapeProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_dim())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.TensorShapeProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.TensorShapeProto) + return false; +#undef DO_ +} + +void TensorShapeProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.TensorShapeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1; + for (unsigned int i = 0, + n = static_cast(this->dim_size()); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->dim(static_cast(i)), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.TensorShapeProto) +} + +::google::protobuf::uint8* TensorShapeProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1; + for (unsigned int i = 0, + n = static_cast(this->dim_size()); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, this->dim(static_cast(i)), deterministic, target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto) + return target; +} + +size_t TensorShapeProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorShapeProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1; + { + unsigned int count = static_cast(this->dim_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize( + this->dim(static_cast(i))); + } + } + + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void TensorShapeProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorShapeProto) + GOOGLE_DCHECK_NE(&from, this); + const TensorShapeProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorShapeProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorShapeProto) + MergeFrom(*source); + } +} + +void TensorShapeProto::MergeFrom(const TensorShapeProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + dim_.MergeFrom(from.dim_); +} + +void TensorShapeProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorShapeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TensorShapeProto::CopyFrom(const TensorShapeProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorShapeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TensorShapeProto::IsInitialized() const { + return true; +} + +void TensorShapeProto::Swap(TensorShapeProto* other) { + if (other == this) return; + InternalSwap(other); +} +void TensorShapeProto::InternalSwap(TensorShapeProto* other) { + using std::swap; + dim_.InternalSwap(&other->dim_); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata TensorShapeProto::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void TypeProto_Tensor::InitAsDefaultInstance() { + ::opencv_onnx::_TypeProto_Tensor_default_instance_._instance.get_mutable()->shape_ = const_cast< ::opencv_onnx::TensorShapeProto*>( + ::opencv_onnx::TensorShapeProto::internal_default_instance()); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TypeProto_Tensor::kElemTypeFieldNumber; +const int TypeProto_Tensor::kShapeFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TypeProto_Tensor::TypeProto_Tensor() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto_Tensor(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.TypeProto.Tensor) +} +TypeProto_Tensor::TypeProto_Tensor(const TypeProto_Tensor& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from.has_shape()) { + shape_ = new ::opencv_onnx::TensorShapeProto(*from.shape_); + } else { + shape_ = NULL; + } + elem_type_ = from.elem_type_; + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Tensor) +} + +void TypeProto_Tensor::SharedCtor() { + _cached_size_ = 0; + ::memset(&shape_, 0, static_cast( + reinterpret_cast(&elem_type_) - + reinterpret_cast(&shape_)) + sizeof(elem_type_)); +} + +TypeProto_Tensor::~TypeProto_Tensor() { + // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Tensor) + SharedDtor(); +} + +void TypeProto_Tensor::SharedDtor() { + if (this != internal_default_instance()) delete shape_; +} + +void TypeProto_Tensor::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TypeProto_Tensor::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const TypeProto_Tensor& TypeProto_Tensor::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto_Tensor(); + return *internal_default_instance(); +} + +TypeProto_Tensor* TypeProto_Tensor::New(::google::protobuf::Arena* arena) const { + TypeProto_Tensor* n = new TypeProto_Tensor; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void TypeProto_Tensor::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto.Tensor) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(shape_ != NULL); + shape_->Clear(); + } + elem_type_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool TypeProto_Tensor::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.TypeProto.Tensor) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional .opencv_onnx.TensorProto.DataType elem_type = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { + int value; + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + if (::opencv_onnx::TensorProto_DataType_IsValid(value)) { + set_elem_type(static_cast< ::opencv_onnx::TensorProto_DataType >(value)); + } else { + mutable_unknown_fields()->AddVarint( + 1, static_cast< ::google::protobuf::uint64>(value)); + } + } else { + goto handle_unusual; + } + break; + } + + // optional .opencv_onnx.TensorShapeProto shape = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_shape())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.TypeProto.Tensor) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.TypeProto.Tensor) + return false; +#undef DO_ +} + +void TypeProto_Tensor::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.TypeProto.Tensor) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .opencv_onnx.TensorProto.DataType elem_type = 1; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormatLite::WriteEnum( + 1, this->elem_type(), output); + } + + // optional .opencv_onnx.TensorShapeProto shape = 2; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, *this->shape_, output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.TypeProto.Tensor) +} + +::google::protobuf::uint8* TypeProto_Tensor::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto.Tensor) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .opencv_onnx.TensorProto.DataType elem_type = 1; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( + 1, this->elem_type(), target); + } + + // optional .opencv_onnx.TensorShapeProto shape = 2; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, *this->shape_, deterministic, target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Tensor) + return target; +} + +size_t TypeProto_Tensor::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Tensor) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + if (_has_bits_[0 / 32] & 3u) { + // optional .opencv_onnx.TensorShapeProto shape = 2; + if (has_shape()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *this->shape_); + } + + // optional .opencv_onnx.TensorProto.DataType elem_type = 1; + if (has_elem_type()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::EnumSize(this->elem_type()); + } + + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void TypeProto_Tensor::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TypeProto.Tensor) + GOOGLE_DCHECK_NE(&from, this); + const TypeProto_Tensor* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TypeProto.Tensor) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TypeProto.Tensor) + MergeFrom(*source); + } +} + +void TypeProto_Tensor::MergeFrom(const TypeProto_Tensor& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Tensor) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { + mutable_shape()->::opencv_onnx::TensorShapeProto::MergeFrom(from.shape()); + } + if (cached_has_bits & 0x00000002u) { + elem_type_ = from.elem_type_; + } + _has_bits_[0] |= cached_has_bits; + } +} + +void TypeProto_Tensor::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TypeProto.Tensor) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TypeProto_Tensor::CopyFrom(const TypeProto_Tensor& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto.Tensor) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TypeProto_Tensor::IsInitialized() const { + return true; +} + +void TypeProto_Tensor::Swap(TypeProto_Tensor* other) { + if (other == this) return; + InternalSwap(other); +} +void TypeProto_Tensor::InternalSwap(TypeProto_Tensor* other) { + using std::swap; + swap(shape_, other->shape_); + swap(elem_type_, other->elem_type_); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata TypeProto_Tensor::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void TypeProto::InitAsDefaultInstance() { + ::opencv_onnx::_TypeProto_default_instance_.tensor_type_ = const_cast< ::opencv_onnx::TypeProto_Tensor*>( + ::opencv_onnx::TypeProto_Tensor::internal_default_instance()); +} +void TypeProto::set_allocated_tensor_type(::opencv_onnx::TypeProto_Tensor* tensor_type) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + clear_value(); + if (tensor_type) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + tensor_type = ::google::protobuf::internal::GetOwnedMessage( + message_arena, tensor_type, submessage_arena); + } + set_has_tensor_type(); + value_.tensor_type_ = tensor_type; + } + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.tensor_type) +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TypeProto::kTensorTypeFieldNumber; +const int TypeProto::kDenotationFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TypeProto::TypeProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.TypeProto) +} +TypeProto::TypeProto(const TypeProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_denotation()) { + denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_); + } + clear_has_value(); + switch (from.value_case()) { + case kTensorType: { + mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from.tensor_type()); + break; + } + case VALUE_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto) +} + +void TypeProto::SharedCtor() { + _cached_size_ = 0; + denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_value(); +} + +TypeProto::~TypeProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto) + SharedDtor(); +} + +void TypeProto::SharedDtor() { + denotation_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_value()) { + clear_value(); + } +} + +void TypeProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TypeProto::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const TypeProto& TypeProto::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto(); + return *internal_default_instance(); +} + +TypeProto* TypeProto::New(::google::protobuf::Arena* arena) const { + TypeProto* n = new TypeProto; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void TypeProto::clear_value() { +// @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TypeProto) + switch (value_case()) { + case kTensorType: { + delete value_.tensor_type_; + break; + } + case VALUE_NOT_SET: { + break; + } + } + _oneof_case_[0] = VALUE_NOT_SET; +} + + +void TypeProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(!denotation_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*denotation_.UnsafeRawStringPointer())->clear(); + } + clear_value(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool TypeProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.TypeProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional .opencv_onnx.TypeProto.Tensor tensor_type = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_tensor_type())); + } else { + goto handle_unusual; + } + break; + } + + // optional string denotation = 6; + case 6: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_denotation())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->denotation().data(), static_cast(this->denotation().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.TypeProto.denotation"); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.TypeProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.TypeProto) + return false; +#undef DO_ +} + +void TypeProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.TypeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // optional .opencv_onnx.TypeProto.Tensor tensor_type = 1; + if (has_tensor_type()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, *value_.tensor_type_, output); + } + + cached_has_bits = _has_bits_[0]; + // optional string denotation = 6; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->denotation().data(), static_cast(this->denotation().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.TypeProto.denotation"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->denotation(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.TypeProto) +} + +::google::protobuf::uint8* TypeProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // optional .opencv_onnx.TypeProto.Tensor tensor_type = 1; + if (has_tensor_type()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, *value_.tensor_type_, deterministic, target); + } + + cached_has_bits = _has_bits_[0]; + // optional string denotation = 6; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->denotation().data(), static_cast(this->denotation().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.TypeProto.denotation"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->denotation(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto) + return target; +} + +size_t TypeProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + // optional string denotation = 6; + if (has_denotation()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->denotation()); + } + + switch (value_case()) { + // optional .opencv_onnx.TypeProto.Tensor tensor_type = 1; + case kTensorType: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *value_.tensor_type_); + break; + } + case VALUE_NOT_SET: { + break; + } + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void TypeProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TypeProto) + GOOGLE_DCHECK_NE(&from, this); + const TypeProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TypeProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TypeProto) + MergeFrom(*source); + } +} + +void TypeProto::MergeFrom(const TypeProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.has_denotation()) { + set_has_denotation(); + denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_); + } + switch (from.value_case()) { + case kTensorType: { + mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from.tensor_type()); + break; + } + case VALUE_NOT_SET: { + break; + } + } +} + +void TypeProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TypeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TypeProto::CopyFrom(const TypeProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TypeProto::IsInitialized() const { + return true; +} + +void TypeProto::Swap(TypeProto* other) { + if (other == this) return; + InternalSwap(other); +} +void TypeProto::InternalSwap(TypeProto* other) { + using std::swap; + denotation_.Swap(&other->denotation_); + swap(value_, other->value_); + swap(_oneof_case_[0], other->_oneof_case_[0]); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata TypeProto::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// =================================================================== + +void OperatorSetIdProto::InitAsDefaultInstance() { +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int OperatorSetIdProto::kDomainFieldNumber; +const int OperatorSetIdProto::kVersionFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +OperatorSetIdProto::OperatorSetIdProto() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsOperatorSetIdProto(); + } + SharedCtor(); + // @@protoc_insertion_point(constructor:opencv_onnx.OperatorSetIdProto) +} +OperatorSetIdProto::OperatorSetIdProto(const OperatorSetIdProto& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL), + _has_bits_(from._has_bits_), + _cached_size_(0) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (from.has_domain()) { + domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_); + } + version_ = from.version_; + // @@protoc_insertion_point(copy_constructor:opencv_onnx.OperatorSetIdProto) +} + +void OperatorSetIdProto::SharedCtor() { + _cached_size_ = 0; + domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + version_ = GOOGLE_LONGLONG(0); +} + +OperatorSetIdProto::~OperatorSetIdProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.OperatorSetIdProto) + SharedDtor(); +} + +void OperatorSetIdProto::SharedDtor() { + domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +void OperatorSetIdProto::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* OperatorSetIdProto::descriptor() { + ::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; +} + +const OperatorSetIdProto& OperatorSetIdProto::default_instance() { + ::protobuf_opencv_2donnx_2eproto::InitDefaultsOperatorSetIdProto(); + return *internal_default_instance(); +} + +OperatorSetIdProto* OperatorSetIdProto::New(::google::protobuf::Arena* arena) const { + OperatorSetIdProto* n = new OperatorSetIdProto; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void OperatorSetIdProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.OperatorSetIdProto) + ::google::protobuf::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(!domain_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited())); + (*domain_.UnsafeRawStringPointer())->clear(); + } + version_ = GOOGLE_LONGLONG(0); + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +bool OperatorSetIdProto::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:opencv_onnx.OperatorSetIdProto) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string domain = 1; + case 1: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_domain())); + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->domain().data(), static_cast(this->domain().length()), + ::google::protobuf::internal::WireFormat::PARSE, + "opencv_onnx.OperatorSetIdProto.domain"); + } else { + goto handle_unusual; + } + break; + } + + // optional int64 version = 2; + case 2: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { + set_has_version(); + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, &version_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::google::protobuf::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:opencv_onnx.OperatorSetIdProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:opencv_onnx.OperatorSetIdProto) + return false; +#undef DO_ +} + +void OperatorSetIdProto::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:opencv_onnx.OperatorSetIdProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string domain = 1; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->domain().data(), static_cast(this->domain().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.OperatorSetIdProto.domain"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->domain(), output); + } + + // optional int64 version = 2; + if (cached_has_bits & 0x00000002u) { + ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->version(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::google::protobuf::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:opencv_onnx.OperatorSetIdProto) +} + +::google::protobuf::uint8* OperatorSetIdProto::InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const { + (void)deterministic; // Unused + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.OperatorSetIdProto) + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string domain = 1; + if (cached_has_bits & 0x00000001u) { + ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( + this->domain().data(), static_cast(this->domain().length()), + ::google::protobuf::internal::WireFormat::SERIALIZE, + "opencv_onnx.OperatorSetIdProto.domain"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->domain(), target); + } + + // optional int64 version = 2; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->version(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.OperatorSetIdProto) + return target; +} + +size_t OperatorSetIdProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.OperatorSetIdProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + if (_has_bits_[0 / 32] & 3u) { + // optional string domain = 1; + if (has_domain()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->domain()); + } + + // optional int64 version = 2; + if (has_version()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int64Size( + this->version()); + } + + } + int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = cached_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void OperatorSetIdProto::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.OperatorSetIdProto) + GOOGLE_DCHECK_NE(&from, this); + const OperatorSetIdProto* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.OperatorSetIdProto) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.OperatorSetIdProto) + MergeFrom(*source); + } +} + +void OperatorSetIdProto::MergeFrom(const OperatorSetIdProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.OperatorSetIdProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::google::protobuf::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 3u) { + if (cached_has_bits & 0x00000001u) { + set_has_domain(); + domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_); + } + if (cached_has_bits & 0x00000002u) { + version_ = from.version_; + } + _has_bits_[0] |= cached_has_bits; + } +} + +void OperatorSetIdProto::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.OperatorSetIdProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void OperatorSetIdProto::CopyFrom(const OperatorSetIdProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.OperatorSetIdProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool OperatorSetIdProto::IsInitialized() const { + return true; +} + +void OperatorSetIdProto::Swap(OperatorSetIdProto* other) { + if (other == this) return; + InternalSwap(other); +} +void OperatorSetIdProto::InternalSwap(OperatorSetIdProto* other) { + using std::swap; + domain_.Swap(&other->domain_); + swap(version_, other->version_); + swap(_has_bits_[0], other->_has_bits_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata OperatorSetIdProto::GetMetadata() const { + protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages]; +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace opencv_onnx + +// @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/onnx/opencv-onnx.pb.h b/modules/dnn/misc/onnx/opencv-onnx.pb.h new file mode 100644 index 0000000000..9959d493e2 --- /dev/null +++ b/modules/dnn/misc/onnx/opencv-onnx.pb.h @@ -0,0 +1,5849 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: opencv-onnx.proto + +#ifndef PROTOBUF_opencv_2donnx_2eproto__INCLUDED +#define PROTOBUF_opencv_2donnx_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3005000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) + +namespace protobuf_opencv_2donnx_2eproto { +// Internal implementation detail -- do not use these members. +struct TableStruct { + static const ::google::protobuf::internal::ParseTableField entries[]; + static const ::google::protobuf::internal::AuxillaryParseTableField aux[]; + static const ::google::protobuf::internal::ParseTable schema[13]; + static const ::google::protobuf::internal::FieldMetadata field_metadata[]; + static const ::google::protobuf::internal::SerializationTable serialization_table[]; + static const ::google::protobuf::uint32 offsets[]; +}; +void AddDescriptors(); +void InitDefaultsAttributeProtoImpl(); +void InitDefaultsAttributeProto(); +void InitDefaultsValueInfoProtoImpl(); +void InitDefaultsValueInfoProto(); +void InitDefaultsModelProtoImpl(); +void InitDefaultsModelProto(); +void InitDefaultsStringStringEntryProtoImpl(); +void InitDefaultsStringStringEntryProto(); +void InitDefaultsTensorProto_SegmentImpl(); +void InitDefaultsTensorProto_Segment(); +void InitDefaultsTensorProtoImpl(); +void InitDefaultsTensorProto(); +void InitDefaultsTensorShapeProto_DimensionImpl(); +void InitDefaultsTensorShapeProto_Dimension(); +void InitDefaultsTensorShapeProtoImpl(); +void InitDefaultsTensorShapeProto(); +void InitDefaultsTypeProto_TensorImpl(); +void InitDefaultsTypeProto_Tensor(); +void InitDefaultsTypeProtoImpl(); +void InitDefaultsTypeProto(); +void InitDefaultsOperatorSetIdProtoImpl(); +void InitDefaultsOperatorSetIdProto(); +inline void InitDefaults() { + InitDefaultsAttributeProto(); + InitDefaultsValueInfoProto(); + InitDefaultsModelProto(); + InitDefaultsStringStringEntryProto(); + InitDefaultsTensorProto_Segment(); + InitDefaultsTensorProto(); + InitDefaultsTensorShapeProto_Dimension(); + InitDefaultsTensorShapeProto(); + InitDefaultsTypeProto_Tensor(); + InitDefaultsTypeProto(); + InitDefaultsOperatorSetIdProto(); +} +} // namespace protobuf_opencv_2donnx_2eproto +namespace opencv_onnx { +class AttributeProto; +class AttributeProtoDefaultTypeInternal; +extern AttributeProtoDefaultTypeInternal _AttributeProto_default_instance_; +class GraphProto; +class GraphProtoDefaultTypeInternal; +extern GraphProtoDefaultTypeInternal _GraphProto_default_instance_; +class ModelProto; +class ModelProtoDefaultTypeInternal; +extern ModelProtoDefaultTypeInternal _ModelProto_default_instance_; +class NodeProto; +class NodeProtoDefaultTypeInternal; +extern NodeProtoDefaultTypeInternal _NodeProto_default_instance_; +class OperatorSetIdProto; +class OperatorSetIdProtoDefaultTypeInternal; +extern OperatorSetIdProtoDefaultTypeInternal _OperatorSetIdProto_default_instance_; +class StringStringEntryProto; +class StringStringEntryProtoDefaultTypeInternal; +extern StringStringEntryProtoDefaultTypeInternal _StringStringEntryProto_default_instance_; +class TensorProto; +class TensorProtoDefaultTypeInternal; +extern TensorProtoDefaultTypeInternal _TensorProto_default_instance_; +class TensorProto_Segment; +class TensorProto_SegmentDefaultTypeInternal; +extern TensorProto_SegmentDefaultTypeInternal _TensorProto_Segment_default_instance_; +class TensorShapeProto; +class TensorShapeProtoDefaultTypeInternal; +extern TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_; +class TensorShapeProto_Dimension; +class TensorShapeProto_DimensionDefaultTypeInternal; +extern TensorShapeProto_DimensionDefaultTypeInternal _TensorShapeProto_Dimension_default_instance_; +class TypeProto; +class TypeProtoDefaultTypeInternal; +extern TypeProtoDefaultTypeInternal _TypeProto_default_instance_; +class TypeProto_Tensor; +class TypeProto_TensorDefaultTypeInternal; +extern TypeProto_TensorDefaultTypeInternal _TypeProto_Tensor_default_instance_; +class ValueInfoProto; +class ValueInfoProtoDefaultTypeInternal; +extern ValueInfoProtoDefaultTypeInternal _ValueInfoProto_default_instance_; +} // namespace opencv_onnx +namespace opencv_onnx { + +enum AttributeProto_AttributeType { + AttributeProto_AttributeType_UNDEFINED = 0, + AttributeProto_AttributeType_FLOAT = 1, + AttributeProto_AttributeType_INT = 2, + AttributeProto_AttributeType_STRING = 3, + AttributeProto_AttributeType_TENSOR = 4, + AttributeProto_AttributeType_GRAPH = 5, + AttributeProto_AttributeType_FLOATS = 6, + AttributeProto_AttributeType_INTS = 7, + AttributeProto_AttributeType_STRINGS = 8, + AttributeProto_AttributeType_TENSORS = 9, + AttributeProto_AttributeType_GRAPHS = 10 +}; +bool AttributeProto_AttributeType_IsValid(int value); +const AttributeProto_AttributeType AttributeProto_AttributeType_AttributeType_MIN = AttributeProto_AttributeType_UNDEFINED; +const AttributeProto_AttributeType AttributeProto_AttributeType_AttributeType_MAX = AttributeProto_AttributeType_GRAPHS; +const int AttributeProto_AttributeType_AttributeType_ARRAYSIZE = AttributeProto_AttributeType_AttributeType_MAX + 1; + +const ::google::protobuf::EnumDescriptor* AttributeProto_AttributeType_descriptor(); +inline const ::std::string& AttributeProto_AttributeType_Name(AttributeProto_AttributeType value) { + return ::google::protobuf::internal::NameOfEnum( + AttributeProto_AttributeType_descriptor(), value); +} +inline bool AttributeProto_AttributeType_Parse( + const ::std::string& name, AttributeProto_AttributeType* value) { + return ::google::protobuf::internal::ParseNamedEnum( + AttributeProto_AttributeType_descriptor(), name, value); +} +enum TensorProto_DataType { + TensorProto_DataType_UNDEFINED = 0, + TensorProto_DataType_FLOAT = 1, + TensorProto_DataType_UINT8 = 2, + TensorProto_DataType_INT8 = 3, + TensorProto_DataType_UINT16 = 4, + TensorProto_DataType_INT16 = 5, + TensorProto_DataType_INT32 = 6, + TensorProto_DataType_INT64 = 7, + TensorProto_DataType_STRING = 8, + TensorProto_DataType_BOOL = 9, + TensorProto_DataType_FLOAT16 = 10, + TensorProto_DataType_DOUBLE = 11, + TensorProto_DataType_UINT32 = 12, + TensorProto_DataType_UINT64 = 13, + TensorProto_DataType_COMPLEX64 = 14, + TensorProto_DataType_COMPLEX128 = 15 +}; +bool TensorProto_DataType_IsValid(int value); +const TensorProto_DataType TensorProto_DataType_DataType_MIN = TensorProto_DataType_UNDEFINED; +const TensorProto_DataType TensorProto_DataType_DataType_MAX = TensorProto_DataType_COMPLEX128; +const int TensorProto_DataType_DataType_ARRAYSIZE = TensorProto_DataType_DataType_MAX + 1; + +const ::google::protobuf::EnumDescriptor* TensorProto_DataType_descriptor(); +inline const ::std::string& TensorProto_DataType_Name(TensorProto_DataType value) { + return ::google::protobuf::internal::NameOfEnum( + TensorProto_DataType_descriptor(), value); +} +inline bool TensorProto_DataType_Parse( + const ::std::string& name, TensorProto_DataType* value) { + return ::google::protobuf::internal::ParseNamedEnum( + TensorProto_DataType_descriptor(), name, value); +} +enum Version { + _START_VERSION = 0, + IR_VERSION_2017_10_10 = 1, + IR_VERSION_2017_10_30 = 2, + IR_VERSION = 3 +}; +bool Version_IsValid(int value); +const Version Version_MIN = _START_VERSION; +const Version Version_MAX = IR_VERSION; +const int Version_ARRAYSIZE = Version_MAX + 1; + +const ::google::protobuf::EnumDescriptor* Version_descriptor(); +inline const ::std::string& Version_Name(Version value) { + return ::google::protobuf::internal::NameOfEnum( + Version_descriptor(), value); +} +inline bool Version_Parse( + const ::std::string& name, Version* value) { + return ::google::protobuf::internal::ParseNamedEnum( + Version_descriptor(), name, value); +} +// =================================================================== + +class AttributeProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.AttributeProto) */ { + public: + AttributeProto(); + virtual ~AttributeProto(); + + AttributeProto(const AttributeProto& from); + + inline AttributeProto& operator=(const AttributeProto& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + AttributeProto(AttributeProto&& from) noexcept + : AttributeProto() { + *this = ::std::move(from); + } + + inline AttributeProto& operator=(AttributeProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const AttributeProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const AttributeProto* internal_default_instance() { + return reinterpret_cast( + &_AttributeProto_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 0; + + void Swap(AttributeProto* other); + friend void swap(AttributeProto& a, AttributeProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline AttributeProto* New() const PROTOBUF_FINAL { return New(NULL); } + + AttributeProto* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const AttributeProto& from); + void MergeFrom(const AttributeProto& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(AttributeProto* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + typedef AttributeProto_AttributeType AttributeType; + static const AttributeType UNDEFINED = + AttributeProto_AttributeType_UNDEFINED; + static const AttributeType FLOAT = + AttributeProto_AttributeType_FLOAT; + static const AttributeType INT = + AttributeProto_AttributeType_INT; + static const AttributeType STRING = + AttributeProto_AttributeType_STRING; + static const AttributeType TENSOR = + AttributeProto_AttributeType_TENSOR; + static const AttributeType GRAPH = + AttributeProto_AttributeType_GRAPH; + static const AttributeType FLOATS = + AttributeProto_AttributeType_FLOATS; + static const AttributeType INTS = + AttributeProto_AttributeType_INTS; + static const AttributeType STRINGS = + AttributeProto_AttributeType_STRINGS; + static const AttributeType TENSORS = + AttributeProto_AttributeType_TENSORS; + static const AttributeType GRAPHS = + AttributeProto_AttributeType_GRAPHS; + static inline bool AttributeType_IsValid(int value) { + return AttributeProto_AttributeType_IsValid(value); + } + static const AttributeType AttributeType_MIN = + AttributeProto_AttributeType_AttributeType_MIN; + static const AttributeType AttributeType_MAX = + AttributeProto_AttributeType_AttributeType_MAX; + static const int AttributeType_ARRAYSIZE = + AttributeProto_AttributeType_AttributeType_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + AttributeType_descriptor() { + return AttributeProto_AttributeType_descriptor(); + } + static inline const ::std::string& AttributeType_Name(AttributeType value) { + return AttributeProto_AttributeType_Name(value); + } + static inline bool AttributeType_Parse(const ::std::string& name, + AttributeType* value) { + return AttributeProto_AttributeType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // repeated float floats = 7; + int floats_size() const; + void clear_floats(); + static const int kFloatsFieldNumber = 7; + float floats(int index) const; + void set_floats(int index, float value); + void add_floats(float value); + const ::google::protobuf::RepeatedField< float >& + floats() const; + ::google::protobuf::RepeatedField< float >* + mutable_floats(); + + // repeated int64 ints = 8; + int ints_size() const; + void clear_ints(); + static const int kIntsFieldNumber = 8; + ::google::protobuf::int64 ints(int index) const; + void set_ints(int index, ::google::protobuf::int64 value); + void add_ints(::google::protobuf::int64 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& + ints() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* + mutable_ints(); + + // repeated bytes strings = 9; + int strings_size() const; + void clear_strings(); + static const int kStringsFieldNumber = 9; + const ::std::string& strings(int index) const; + ::std::string* mutable_strings(int index); + void set_strings(int index, const ::std::string& value); + #if LANG_CXX11 + void set_strings(int index, ::std::string&& value); + #endif + void set_strings(int index, const char* value); + void set_strings(int index, const void* value, size_t size); + ::std::string* add_strings(); + void add_strings(const ::std::string& value); + #if LANG_CXX11 + void add_strings(::std::string&& value); + #endif + void add_strings(const char* value); + void add_strings(const void* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& strings() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_strings(); + + // repeated .opencv_onnx.TensorProto tensors = 10; + int tensors_size() const; + void clear_tensors(); + static const int kTensorsFieldNumber = 10; + const ::opencv_onnx::TensorProto& tensors(int index) const; + ::opencv_onnx::TensorProto* mutable_tensors(int index); + ::opencv_onnx::TensorProto* add_tensors(); + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorProto >* + mutable_tensors(); + const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorProto >& + tensors() const; + + // repeated .opencv_onnx.GraphProto graphs = 11; + int graphs_size() const; + void clear_graphs(); + static const int kGraphsFieldNumber = 11; + const ::opencv_onnx::GraphProto& graphs(int index) const; + ::opencv_onnx::GraphProto* mutable_graphs(int index); + ::opencv_onnx::GraphProto* add_graphs(); + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::GraphProto >* + mutable_graphs(); + const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::GraphProto >& + graphs() const; + + // optional string name = 1; + bool has_name() const; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // optional bytes s = 4; + bool has_s() const; + void clear_s(); + static const int kSFieldNumber = 4; + const ::std::string& s() const; + void set_s(const ::std::string& value); + #if LANG_CXX11 + void set_s(::std::string&& value); + #endif + void set_s(const char* value); + void set_s(const void* value, size_t size); + ::std::string* mutable_s(); + ::std::string* release_s(); + void set_allocated_s(::std::string* s); + + // optional string doc_string = 13; + bool has_doc_string() const; + void clear_doc_string(); + static const int kDocStringFieldNumber = 13; + const ::std::string& doc_string() const; + void set_doc_string(const ::std::string& value); + #if LANG_CXX11 + void set_doc_string(::std::string&& value); + #endif + void set_doc_string(const char* value); + void set_doc_string(const char* value, size_t size); + ::std::string* mutable_doc_string(); + ::std::string* release_doc_string(); + void set_allocated_doc_string(::std::string* doc_string); + + // optional string ref_attr_name = 21; + bool has_ref_attr_name() const; + void clear_ref_attr_name(); + static const int kRefAttrNameFieldNumber = 21; + const ::std::string& ref_attr_name() const; + void set_ref_attr_name(const ::std::string& value); + #if LANG_CXX11 + void set_ref_attr_name(::std::string&& value); + #endif + void set_ref_attr_name(const char* value); + void set_ref_attr_name(const char* value, size_t size); + ::std::string* mutable_ref_attr_name(); + ::std::string* release_ref_attr_name(); + void set_allocated_ref_attr_name(::std::string* ref_attr_name); + + // optional .opencv_onnx.TensorProto t = 5; + bool has_t() const; + void clear_t(); + static const int kTFieldNumber = 5; + const ::opencv_onnx::TensorProto& t() const; + ::opencv_onnx::TensorProto* release_t(); + ::opencv_onnx::TensorProto* mutable_t(); + void set_allocated_t(::opencv_onnx::TensorProto* t); + + // optional .opencv_onnx.GraphProto g = 6; + bool has_g() const; + void clear_g(); + static const int kGFieldNumber = 6; + const ::opencv_onnx::GraphProto& g() const; + ::opencv_onnx::GraphProto* release_g(); + ::opencv_onnx::GraphProto* mutable_g(); + void set_allocated_g(::opencv_onnx::GraphProto* g); + + // optional int64 i = 3; + bool has_i() const; + void clear_i(); + static const int kIFieldNumber = 3; + ::google::protobuf::int64 i() const; + void set_i(::google::protobuf::int64 value); + + // optional float f = 2; + bool has_f() const; + void clear_f(); + static const int kFFieldNumber = 2; + float f() const; + void set_f(float value); + + // optional .opencv_onnx.AttributeProto.AttributeType type = 20; + bool has_type() const; + void clear_type(); + static const int kTypeFieldNumber = 20; + ::opencv_onnx::AttributeProto_AttributeType type() const; + void set_type(::opencv_onnx::AttributeProto_AttributeType value); + + // @@protoc_insertion_point(class_scope:opencv_onnx.AttributeProto) + private: + void set_has_name(); + void clear_has_name(); + void set_has_ref_attr_name(); + void clear_has_ref_attr_name(); + void set_has_doc_string(); + void clear_has_doc_string(); + void set_has_type(); + void clear_has_type(); + void set_has_f(); + void clear_has_f(); + void set_has_i(); + void clear_has_i(); + void set_has_s(); + void clear_has_s(); + void set_has_t(); + void clear_has_t(); + void set_has_g(); + void clear_has_g(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::RepeatedField< float > floats_; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 > ints_; + ::google::protobuf::RepeatedPtrField< ::std::string> strings_; + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorProto > tensors_; + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::GraphProto > graphs_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr s_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + ::google::protobuf::internal::ArenaStringPtr ref_attr_name_; + ::opencv_onnx::TensorProto* t_; + ::opencv_onnx::GraphProto* g_; + ::google::protobuf::int64 i_; + float f_; + int type_; + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProtoImpl(); +}; +// ------------------------------------------------------------------- + +class ValueInfoProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.ValueInfoProto) */ { + public: + ValueInfoProto(); + virtual ~ValueInfoProto(); + + ValueInfoProto(const ValueInfoProto& from); + + inline ValueInfoProto& operator=(const ValueInfoProto& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + ValueInfoProto(ValueInfoProto&& from) noexcept + : ValueInfoProto() { + *this = ::std::move(from); + } + + inline ValueInfoProto& operator=(ValueInfoProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ValueInfoProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ValueInfoProto* internal_default_instance() { + return reinterpret_cast( + &_ValueInfoProto_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 1; + + void Swap(ValueInfoProto* other); + friend void swap(ValueInfoProto& a, ValueInfoProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline ValueInfoProto* New() const PROTOBUF_FINAL { return New(NULL); } + + ValueInfoProto* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const ValueInfoProto& from); + void MergeFrom(const ValueInfoProto& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(ValueInfoProto* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string name = 1; + bool has_name() const; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // optional string doc_string = 3; + bool has_doc_string() const; + void clear_doc_string(); + static const int kDocStringFieldNumber = 3; + const ::std::string& doc_string() const; + void set_doc_string(const ::std::string& value); + #if LANG_CXX11 + void set_doc_string(::std::string&& value); + #endif + void set_doc_string(const char* value); + void set_doc_string(const char* value, size_t size); + ::std::string* mutable_doc_string(); + ::std::string* release_doc_string(); + void set_allocated_doc_string(::std::string* doc_string); + + // optional .opencv_onnx.TypeProto type = 2; + bool has_type() const; + void clear_type(); + static const int kTypeFieldNumber = 2; + const ::opencv_onnx::TypeProto& type() const; + ::opencv_onnx::TypeProto* release_type(); + ::opencv_onnx::TypeProto* mutable_type(); + void set_allocated_type(::opencv_onnx::TypeProto* type); + + // @@protoc_insertion_point(class_scope:opencv_onnx.ValueInfoProto) + private: + void set_has_name(); + void clear_has_name(); + void set_has_type(); + void clear_has_type(); + void set_has_doc_string(); + void clear_has_doc_string(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + ::opencv_onnx::TypeProto* type_; + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsValueInfoProtoImpl(); +}; +// ------------------------------------------------------------------- + +class NodeProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.NodeProto) */ { + public: + NodeProto(); + virtual ~NodeProto(); + + NodeProto(const NodeProto& from); + + inline NodeProto& operator=(const NodeProto& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + NodeProto(NodeProto&& from) noexcept + : NodeProto() { + *this = ::std::move(from); + } + + inline NodeProto& operator=(NodeProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const NodeProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const NodeProto* internal_default_instance() { + return reinterpret_cast( + &_NodeProto_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 2; + + void Swap(NodeProto* other); + friend void swap(NodeProto& a, NodeProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline NodeProto* New() const PROTOBUF_FINAL { return New(NULL); } + + NodeProto* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const NodeProto& from); + void MergeFrom(const NodeProto& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(NodeProto* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated string input = 1; + int input_size() const; + void clear_input(); + static const int kInputFieldNumber = 1; + const ::std::string& input(int index) const; + ::std::string* mutable_input(int index); + void set_input(int index, const ::std::string& value); + #if LANG_CXX11 + void set_input(int index, ::std::string&& value); + #endif + void set_input(int index, const char* value); + void set_input(int index, const char* value, size_t size); + ::std::string* add_input(); + void add_input(const ::std::string& value); + #if LANG_CXX11 + void add_input(::std::string&& value); + #endif + void add_input(const char* value); + void add_input(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& input() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_input(); + + // repeated string output = 2; + int output_size() const; + void clear_output(); + static const int kOutputFieldNumber = 2; + const ::std::string& output(int index) const; + ::std::string* mutable_output(int index); + void set_output(int index, const ::std::string& value); + #if LANG_CXX11 + void set_output(int index, ::std::string&& value); + #endif + void set_output(int index, const char* value); + void set_output(int index, const char* value, size_t size); + ::std::string* add_output(); + void add_output(const ::std::string& value); + #if LANG_CXX11 + void add_output(::std::string&& value); + #endif + void add_output(const char* value); + void add_output(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& output() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_output(); + + // repeated .opencv_onnx.AttributeProto attribute = 5; + int attribute_size() const; + void clear_attribute(); + static const int kAttributeFieldNumber = 5; + const ::opencv_onnx::AttributeProto& attribute(int index) const; + ::opencv_onnx::AttributeProto* mutable_attribute(int index); + ::opencv_onnx::AttributeProto* add_attribute(); + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::AttributeProto >* + mutable_attribute(); + const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::AttributeProto >& + attribute() const; + + // optional string name = 3; + bool has_name() const; + void clear_name(); + static const int kNameFieldNumber = 3; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // optional string op_type = 4; + bool has_op_type() const; + void clear_op_type(); + static const int kOpTypeFieldNumber = 4; + const ::std::string& op_type() const; + void set_op_type(const ::std::string& value); + #if LANG_CXX11 + void set_op_type(::std::string&& value); + #endif + void set_op_type(const char* value); + void set_op_type(const char* value, size_t size); + ::std::string* mutable_op_type(); + ::std::string* release_op_type(); + void set_allocated_op_type(::std::string* op_type); + + // optional string doc_string = 6; + bool has_doc_string() const; + void clear_doc_string(); + static const int kDocStringFieldNumber = 6; + const ::std::string& doc_string() const; + void set_doc_string(const ::std::string& value); + #if LANG_CXX11 + void set_doc_string(::std::string&& value); + #endif + void set_doc_string(const char* value); + void set_doc_string(const char* value, size_t size); + ::std::string* mutable_doc_string(); + ::std::string* release_doc_string(); + void set_allocated_doc_string(::std::string* doc_string); + + // optional string domain = 7; + bool has_domain() const; + void clear_domain(); + static const int kDomainFieldNumber = 7; + const ::std::string& domain() const; + void set_domain(const ::std::string& value); + #if LANG_CXX11 + void set_domain(::std::string&& value); + #endif + void set_domain(const char* value); + void set_domain(const char* value, size_t size); + ::std::string* mutable_domain(); + ::std::string* release_domain(); + void set_allocated_domain(::std::string* domain); + + // @@protoc_insertion_point(class_scope:opencv_onnx.NodeProto) + private: + void set_has_name(); + void clear_has_name(); + void set_has_op_type(); + void clear_has_op_type(); + void set_has_domain(); + void clear_has_domain(); + void set_has_doc_string(); + void clear_has_doc_string(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::std::string> input_; + ::google::protobuf::RepeatedPtrField< ::std::string> output_; + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::AttributeProto > attribute_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr op_type_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + ::google::protobuf::internal::ArenaStringPtr domain_; + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProtoImpl(); +}; +// ------------------------------------------------------------------- + +class ModelProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.ModelProto) */ { + public: + ModelProto(); + virtual ~ModelProto(); + + ModelProto(const ModelProto& from); + + inline ModelProto& operator=(const ModelProto& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + ModelProto(ModelProto&& from) noexcept + : ModelProto() { + *this = ::std::move(from); + } + + inline ModelProto& operator=(ModelProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ModelProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ModelProto* internal_default_instance() { + return reinterpret_cast( + &_ModelProto_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 3; + + void Swap(ModelProto* other); + friend void swap(ModelProto& a, ModelProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline ModelProto* New() const PROTOBUF_FINAL { return New(NULL); } + + ModelProto* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const ModelProto& from); + void MergeFrom(const ModelProto& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(ModelProto* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .opencv_onnx.OperatorSetIdProto opset_import = 8; + int opset_import_size() const; + void clear_opset_import(); + static const int kOpsetImportFieldNumber = 8; + const ::opencv_onnx::OperatorSetIdProto& opset_import(int index) const; + ::opencv_onnx::OperatorSetIdProto* mutable_opset_import(int index); + ::opencv_onnx::OperatorSetIdProto* add_opset_import(); + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::OperatorSetIdProto >* + mutable_opset_import(); + const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::OperatorSetIdProto >& + opset_import() const; + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14; + int metadata_props_size() const; + void clear_metadata_props(); + static const int kMetadataPropsFieldNumber = 14; + const ::opencv_onnx::StringStringEntryProto& metadata_props(int index) const; + ::opencv_onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::opencv_onnx::StringStringEntryProto* add_metadata_props(); + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* + mutable_metadata_props(); + const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& + metadata_props() const; + + // optional string producer_name = 2; + bool has_producer_name() const; + void clear_producer_name(); + static const int kProducerNameFieldNumber = 2; + const ::std::string& producer_name() const; + void set_producer_name(const ::std::string& value); + #if LANG_CXX11 + void set_producer_name(::std::string&& value); + #endif + void set_producer_name(const char* value); + void set_producer_name(const char* value, size_t size); + ::std::string* mutable_producer_name(); + ::std::string* release_producer_name(); + void set_allocated_producer_name(::std::string* producer_name); + + // optional string producer_version = 3; + bool has_producer_version() const; + void clear_producer_version(); + static const int kProducerVersionFieldNumber = 3; + const ::std::string& producer_version() const; + void set_producer_version(const ::std::string& value); + #if LANG_CXX11 + void set_producer_version(::std::string&& value); + #endif + void set_producer_version(const char* value); + void set_producer_version(const char* value, size_t size); + ::std::string* mutable_producer_version(); + ::std::string* release_producer_version(); + void set_allocated_producer_version(::std::string* producer_version); + + // optional string domain = 4; + bool has_domain() const; + void clear_domain(); + static const int kDomainFieldNumber = 4; + const ::std::string& domain() const; + void set_domain(const ::std::string& value); + #if LANG_CXX11 + void set_domain(::std::string&& value); + #endif + void set_domain(const char* value); + void set_domain(const char* value, size_t size); + ::std::string* mutable_domain(); + ::std::string* release_domain(); + void set_allocated_domain(::std::string* domain); + + // optional string doc_string = 6; + bool has_doc_string() const; + void clear_doc_string(); + static const int kDocStringFieldNumber = 6; + const ::std::string& doc_string() const; + void set_doc_string(const ::std::string& value); + #if LANG_CXX11 + void set_doc_string(::std::string&& value); + #endif + void set_doc_string(const char* value); + void set_doc_string(const char* value, size_t size); + ::std::string* mutable_doc_string(); + ::std::string* release_doc_string(); + void set_allocated_doc_string(::std::string* doc_string); + + // optional .opencv_onnx.GraphProto graph = 7; + bool has_graph() const; + void clear_graph(); + static const int kGraphFieldNumber = 7; + const ::opencv_onnx::GraphProto& graph() const; + ::opencv_onnx::GraphProto* release_graph(); + ::opencv_onnx::GraphProto* mutable_graph(); + void set_allocated_graph(::opencv_onnx::GraphProto* graph); + + // optional int64 ir_version = 1; + bool has_ir_version() const; + void clear_ir_version(); + static const int kIrVersionFieldNumber = 1; + ::google::protobuf::int64 ir_version() const; + void set_ir_version(::google::protobuf::int64 value); + + // optional int64 model_version = 5; + bool has_model_version() const; + void clear_model_version(); + static const int kModelVersionFieldNumber = 5; + ::google::protobuf::int64 model_version() const; + void set_model_version(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:opencv_onnx.ModelProto) + private: + void set_has_ir_version(); + void clear_has_ir_version(); + void set_has_producer_name(); + void clear_has_producer_name(); + void set_has_producer_version(); + void clear_has_producer_version(); + void set_has_domain(); + void clear_has_domain(); + void set_has_model_version(); + void clear_has_model_version(); + void set_has_doc_string(); + void clear_has_doc_string(); + void set_has_graph(); + void clear_has_graph(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::OperatorSetIdProto > opset_import_; + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto > metadata_props_; + ::google::protobuf::internal::ArenaStringPtr producer_name_; + ::google::protobuf::internal::ArenaStringPtr producer_version_; + ::google::protobuf::internal::ArenaStringPtr domain_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + ::opencv_onnx::GraphProto* graph_; + ::google::protobuf::int64 ir_version_; + ::google::protobuf::int64 model_version_; + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsModelProtoImpl(); +}; +// ------------------------------------------------------------------- + +class StringStringEntryProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.StringStringEntryProto) */ { + public: + StringStringEntryProto(); + virtual ~StringStringEntryProto(); + + StringStringEntryProto(const StringStringEntryProto& from); + + inline StringStringEntryProto& operator=(const StringStringEntryProto& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + StringStringEntryProto(StringStringEntryProto&& from) noexcept + : StringStringEntryProto() { + *this = ::std::move(from); + } + + inline StringStringEntryProto& operator=(StringStringEntryProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const StringStringEntryProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const StringStringEntryProto* internal_default_instance() { + return reinterpret_cast( + &_StringStringEntryProto_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 4; + + void Swap(StringStringEntryProto* other); + friend void swap(StringStringEntryProto& a, StringStringEntryProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline StringStringEntryProto* New() const PROTOBUF_FINAL { return New(NULL); } + + StringStringEntryProto* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const StringStringEntryProto& from); + void MergeFrom(const StringStringEntryProto& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(StringStringEntryProto* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string key = 1; + bool has_key() const; + void clear_key(); + static const int kKeyFieldNumber = 1; + const ::std::string& key() const; + void set_key(const ::std::string& value); + #if LANG_CXX11 + void set_key(::std::string&& value); + #endif + void set_key(const char* value); + void set_key(const char* value, size_t size); + ::std::string* mutable_key(); + ::std::string* release_key(); + void set_allocated_key(::std::string* key); + + // optional string value = 2; + bool has_value() const; + void clear_value(); + static const int kValueFieldNumber = 2; + const ::std::string& value() const; + void set_value(const ::std::string& value); + #if LANG_CXX11 + void set_value(::std::string&& value); + #endif + void set_value(const char* value); + void set_value(const char* value, size_t size); + ::std::string* mutable_value(); + ::std::string* release_value(); + void set_allocated_value(::std::string* value); + + // @@protoc_insertion_point(class_scope:opencv_onnx.StringStringEntryProto) + private: + void set_has_key(); + void clear_has_key(); + void set_has_value(); + void clear_has_value(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::internal::ArenaStringPtr key_; + ::google::protobuf::internal::ArenaStringPtr value_; + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsStringStringEntryProtoImpl(); +}; +// ------------------------------------------------------------------- + +class GraphProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.GraphProto) */ { + public: + GraphProto(); + virtual ~GraphProto(); + + GraphProto(const GraphProto& from); + + inline GraphProto& operator=(const GraphProto& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + GraphProto(GraphProto&& from) noexcept + : GraphProto() { + *this = ::std::move(from); + } + + inline GraphProto& operator=(GraphProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const GraphProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const GraphProto* internal_default_instance() { + return reinterpret_cast( + &_GraphProto_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 5; + + void Swap(GraphProto* other); + friend void swap(GraphProto& a, GraphProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline GraphProto* New() const PROTOBUF_FINAL { return New(NULL); } + + GraphProto* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const GraphProto& from); + void MergeFrom(const GraphProto& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(GraphProto* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .opencv_onnx.NodeProto node = 1; + int node_size() const; + void clear_node(); + static const int kNodeFieldNumber = 1; + const ::opencv_onnx::NodeProto& node(int index) const; + ::opencv_onnx::NodeProto* mutable_node(int index); + ::opencv_onnx::NodeProto* add_node(); + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::NodeProto >* + mutable_node(); + const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::NodeProto >& + node() const; + + // repeated .opencv_onnx.TensorProto initializer = 5; + int initializer_size() const; + void clear_initializer(); + static const int kInitializerFieldNumber = 5; + const ::opencv_onnx::TensorProto& initializer(int index) const; + ::opencv_onnx::TensorProto* mutable_initializer(int index); + ::opencv_onnx::TensorProto* add_initializer(); + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorProto >* + mutable_initializer(); + const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorProto >& + initializer() const; + + // repeated .opencv_onnx.ValueInfoProto input = 11; + int input_size() const; + void clear_input(); + static const int kInputFieldNumber = 11; + const ::opencv_onnx::ValueInfoProto& input(int index) const; + ::opencv_onnx::ValueInfoProto* mutable_input(int index); + ::opencv_onnx::ValueInfoProto* add_input(); + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >* + mutable_input(); + const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >& + input() const; + + // repeated .opencv_onnx.ValueInfoProto output = 12; + int output_size() const; + void clear_output(); + static const int kOutputFieldNumber = 12; + const ::opencv_onnx::ValueInfoProto& output(int index) const; + ::opencv_onnx::ValueInfoProto* mutable_output(int index); + ::opencv_onnx::ValueInfoProto* add_output(); + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >* + mutable_output(); + const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >& + output() const; + + // repeated .opencv_onnx.ValueInfoProto value_info = 13; + int value_info_size() const; + void clear_value_info(); + static const int kValueInfoFieldNumber = 13; + const ::opencv_onnx::ValueInfoProto& value_info(int index) const; + ::opencv_onnx::ValueInfoProto* mutable_value_info(int index); + ::opencv_onnx::ValueInfoProto* add_value_info(); + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >* + mutable_value_info(); + const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >& + value_info() const; + + // optional string name = 2; + bool has_name() const; + void clear_name(); + static const int kNameFieldNumber = 2; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // optional string doc_string = 10; + bool has_doc_string() const; + void clear_doc_string(); + static const int kDocStringFieldNumber = 10; + const ::std::string& doc_string() const; + void set_doc_string(const ::std::string& value); + #if LANG_CXX11 + void set_doc_string(::std::string&& value); + #endif + void set_doc_string(const char* value); + void set_doc_string(const char* value, size_t size); + ::std::string* mutable_doc_string(); + ::std::string* release_doc_string(); + void set_allocated_doc_string(::std::string* doc_string); + + // @@protoc_insertion_point(class_scope:opencv_onnx.GraphProto) + private: + void set_has_name(); + void clear_has_name(); + void set_has_doc_string(); + void clear_has_doc_string(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::NodeProto > node_; + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorProto > initializer_; + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto > input_; + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto > output_; + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto > value_info_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProtoImpl(); +}; +// ------------------------------------------------------------------- + +class TensorProto_Segment : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorProto.Segment) */ { + public: + TensorProto_Segment(); + virtual ~TensorProto_Segment(); + + TensorProto_Segment(const TensorProto_Segment& from); + + inline TensorProto_Segment& operator=(const TensorProto_Segment& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + TensorProto_Segment(TensorProto_Segment&& from) noexcept + : TensorProto_Segment() { + *this = ::std::move(from); + } + + inline TensorProto_Segment& operator=(TensorProto_Segment&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const TensorProto_Segment& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TensorProto_Segment* internal_default_instance() { + return reinterpret_cast( + &_TensorProto_Segment_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 6; + + void Swap(TensorProto_Segment* other); + friend void swap(TensorProto_Segment& a, TensorProto_Segment& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TensorProto_Segment* New() const PROTOBUF_FINAL { return New(NULL); } + + TensorProto_Segment* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const TensorProto_Segment& from); + void MergeFrom(const TensorProto_Segment& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(TensorProto_Segment* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional int64 begin = 1; + bool has_begin() const; + void clear_begin(); + static const int kBeginFieldNumber = 1; + ::google::protobuf::int64 begin() const; + void set_begin(::google::protobuf::int64 value); + + // optional int64 end = 2; + bool has_end() const; + void clear_end(); + static const int kEndFieldNumber = 2; + ::google::protobuf::int64 end() const; + void set_end(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:opencv_onnx.TensorProto.Segment) + private: + void set_has_begin(); + void clear_has_begin(); + void set_has_end(); + void clear_has_end(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::int64 begin_; + ::google::protobuf::int64 end_; + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto_SegmentImpl(); +}; +// ------------------------------------------------------------------- + +class TensorProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorProto) */ { + public: + TensorProto(); + virtual ~TensorProto(); + + TensorProto(const TensorProto& from); + + inline TensorProto& operator=(const TensorProto& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + TensorProto(TensorProto&& from) noexcept + : TensorProto() { + *this = ::std::move(from); + } + + inline TensorProto& operator=(TensorProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const TensorProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TensorProto* internal_default_instance() { + return reinterpret_cast( + &_TensorProto_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 7; + + void Swap(TensorProto* other); + friend void swap(TensorProto& a, TensorProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TensorProto* New() const PROTOBUF_FINAL { return New(NULL); } + + TensorProto* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const TensorProto& from); + void MergeFrom(const TensorProto& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(TensorProto* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + typedef TensorProto_Segment Segment; + + typedef TensorProto_DataType DataType; + static const DataType UNDEFINED = + TensorProto_DataType_UNDEFINED; + static const DataType FLOAT = + TensorProto_DataType_FLOAT; + static const DataType UINT8 = + TensorProto_DataType_UINT8; + static const DataType INT8 = + TensorProto_DataType_INT8; + static const DataType UINT16 = + TensorProto_DataType_UINT16; + static const DataType INT16 = + TensorProto_DataType_INT16; + static const DataType INT32 = + TensorProto_DataType_INT32; + static const DataType INT64 = + TensorProto_DataType_INT64; + static const DataType STRING = + TensorProto_DataType_STRING; + static const DataType BOOL = + TensorProto_DataType_BOOL; + static const DataType FLOAT16 = + TensorProto_DataType_FLOAT16; + static const DataType DOUBLE = + TensorProto_DataType_DOUBLE; + static const DataType UINT32 = + TensorProto_DataType_UINT32; + static const DataType UINT64 = + TensorProto_DataType_UINT64; + static const DataType COMPLEX64 = + TensorProto_DataType_COMPLEX64; + static const DataType COMPLEX128 = + TensorProto_DataType_COMPLEX128; + static inline bool DataType_IsValid(int value) { + return TensorProto_DataType_IsValid(value); + } + static const DataType DataType_MIN = + TensorProto_DataType_DataType_MIN; + static const DataType DataType_MAX = + TensorProto_DataType_DataType_MAX; + static const int DataType_ARRAYSIZE = + TensorProto_DataType_DataType_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* + DataType_descriptor() { + return TensorProto_DataType_descriptor(); + } + static inline const ::std::string& DataType_Name(DataType value) { + return TensorProto_DataType_Name(value); + } + static inline bool DataType_Parse(const ::std::string& name, + DataType* value) { + return TensorProto_DataType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + // repeated int64 dims = 1; + int dims_size() const; + void clear_dims(); + static const int kDimsFieldNumber = 1; + ::google::protobuf::int64 dims(int index) const; + void set_dims(int index, ::google::protobuf::int64 value); + void add_dims(::google::protobuf::int64 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& + dims() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* + mutable_dims(); + + // repeated float float_data = 4 [packed = true]; + int float_data_size() const; + void clear_float_data(); + static const int kFloatDataFieldNumber = 4; + float float_data(int index) const; + void set_float_data(int index, float value); + void add_float_data(float value); + const ::google::protobuf::RepeatedField< float >& + float_data() const; + ::google::protobuf::RepeatedField< float >* + mutable_float_data(); + + // repeated int32 int32_data = 5 [packed = true]; + int int32_data_size() const; + void clear_int32_data(); + static const int kInt32DataFieldNumber = 5; + ::google::protobuf::int32 int32_data(int index) const; + void set_int32_data(int index, ::google::protobuf::int32 value); + void add_int32_data(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + int32_data() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_int32_data(); + + // repeated bytes string_data = 6; + int string_data_size() const; + void clear_string_data(); + static const int kStringDataFieldNumber = 6; + const ::std::string& string_data(int index) const; + ::std::string* mutable_string_data(int index); + void set_string_data(int index, const ::std::string& value); + #if LANG_CXX11 + void set_string_data(int index, ::std::string&& value); + #endif + void set_string_data(int index, const char* value); + void set_string_data(int index, const void* value, size_t size); + ::std::string* add_string_data(); + void add_string_data(const ::std::string& value); + #if LANG_CXX11 + void add_string_data(::std::string&& value); + #endif + void add_string_data(const char* value); + void add_string_data(const void* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& string_data() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_string_data(); + + // repeated int64 int64_data = 7 [packed = true]; + int int64_data_size() const; + void clear_int64_data(); + static const int kInt64DataFieldNumber = 7; + ::google::protobuf::int64 int64_data(int index) const; + void set_int64_data(int index, ::google::protobuf::int64 value); + void add_int64_data(::google::protobuf::int64 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& + int64_data() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* + mutable_int64_data(); + + // repeated double double_data = 10 [packed = true]; + int double_data_size() const; + void clear_double_data(); + static const int kDoubleDataFieldNumber = 10; + double double_data(int index) const; + void set_double_data(int index, double value); + void add_double_data(double value); + const ::google::protobuf::RepeatedField< double >& + double_data() const; + ::google::protobuf::RepeatedField< double >* + mutable_double_data(); + + // repeated uint64 uint64_data = 11 [packed = true]; + int uint64_data_size() const; + void clear_uint64_data(); + static const int kUint64DataFieldNumber = 11; + ::google::protobuf::uint64 uint64_data(int index) const; + void set_uint64_data(int index, ::google::protobuf::uint64 value); + void add_uint64_data(::google::protobuf::uint64 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >& + uint64_data() const; + ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >* + mutable_uint64_data(); + + // optional string name = 8; + bool has_name() const; + void clear_name(); + static const int kNameFieldNumber = 8; + const ::std::string& name() const; + void set_name(const ::std::string& value); + #if LANG_CXX11 + void set_name(::std::string&& value); + #endif + void set_name(const char* value); + void set_name(const char* value, size_t size); + ::std::string* mutable_name(); + ::std::string* release_name(); + void set_allocated_name(::std::string* name); + + // optional bytes raw_data = 9; + bool has_raw_data() const; + void clear_raw_data(); + static const int kRawDataFieldNumber = 9; + const ::std::string& raw_data() const; + void set_raw_data(const ::std::string& value); + #if LANG_CXX11 + void set_raw_data(::std::string&& value); + #endif + void set_raw_data(const char* value); + void set_raw_data(const void* value, size_t size); + ::std::string* mutable_raw_data(); + ::std::string* release_raw_data(); + void set_allocated_raw_data(::std::string* raw_data); + + // optional string doc_string = 12; + bool has_doc_string() const; + void clear_doc_string(); + static const int kDocStringFieldNumber = 12; + const ::std::string& doc_string() const; + void set_doc_string(const ::std::string& value); + #if LANG_CXX11 + void set_doc_string(::std::string&& value); + #endif + void set_doc_string(const char* value); + void set_doc_string(const char* value, size_t size); + ::std::string* mutable_doc_string(); + ::std::string* release_doc_string(); + void set_allocated_doc_string(::std::string* doc_string); + + // optional .opencv_onnx.TensorProto.Segment segment = 3; + bool has_segment() const; + void clear_segment(); + static const int kSegmentFieldNumber = 3; + const ::opencv_onnx::TensorProto_Segment& segment() const; + ::opencv_onnx::TensorProto_Segment* release_segment(); + ::opencv_onnx::TensorProto_Segment* mutable_segment(); + void set_allocated_segment(::opencv_onnx::TensorProto_Segment* segment); + + // optional .opencv_onnx.TensorProto.DataType data_type = 2; + bool has_data_type() const; + void clear_data_type(); + static const int kDataTypeFieldNumber = 2; + ::opencv_onnx::TensorProto_DataType data_type() const; + void set_data_type(::opencv_onnx::TensorProto_DataType value); + + // @@protoc_insertion_point(class_scope:opencv_onnx.TensorProto) + private: + void set_has_data_type(); + void clear_has_data_type(); + void set_has_segment(); + void clear_has_segment(); + void set_has_name(); + void clear_has_name(); + void set_has_doc_string(); + void clear_has_doc_string(); + void set_has_raw_data(); + void clear_has_raw_data(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 > dims_; + ::google::protobuf::RepeatedField< float > float_data_; + mutable int _float_data_cached_byte_size_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > int32_data_; + mutable int _int32_data_cached_byte_size_; + ::google::protobuf::RepeatedPtrField< ::std::string> string_data_; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 > int64_data_; + mutable int _int64_data_cached_byte_size_; + ::google::protobuf::RepeatedField< double > double_data_; + mutable int _double_data_cached_byte_size_; + ::google::protobuf::RepeatedField< ::google::protobuf::uint64 > uint64_data_; + mutable int _uint64_data_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr raw_data_; + ::google::protobuf::internal::ArenaStringPtr doc_string_; + ::opencv_onnx::TensorProto_Segment* segment_; + int data_type_; + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProtoImpl(); +}; +// ------------------------------------------------------------------- + +class TensorShapeProto_Dimension : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorShapeProto.Dimension) */ { + public: + TensorShapeProto_Dimension(); + virtual ~TensorShapeProto_Dimension(); + + TensorShapeProto_Dimension(const TensorShapeProto_Dimension& from); + + inline TensorShapeProto_Dimension& operator=(const TensorShapeProto_Dimension& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + TensorShapeProto_Dimension(TensorShapeProto_Dimension&& from) noexcept + : TensorShapeProto_Dimension() { + *this = ::std::move(from); + } + + inline TensorShapeProto_Dimension& operator=(TensorShapeProto_Dimension&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const TensorShapeProto_Dimension& default_instance(); + + enum ValueCase { + kDimValue = 1, + kDimParam = 2, + VALUE_NOT_SET = 0, + }; + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TensorShapeProto_Dimension* internal_default_instance() { + return reinterpret_cast( + &_TensorShapeProto_Dimension_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 8; + + void Swap(TensorShapeProto_Dimension* other); + friend void swap(TensorShapeProto_Dimension& a, TensorShapeProto_Dimension& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TensorShapeProto_Dimension* New() const PROTOBUF_FINAL { return New(NULL); } + + TensorShapeProto_Dimension* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const TensorShapeProto_Dimension& from); + void MergeFrom(const TensorShapeProto_Dimension& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(TensorShapeProto_Dimension* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string denotation = 3; + bool has_denotation() const; + void clear_denotation(); + static const int kDenotationFieldNumber = 3; + const ::std::string& denotation() const; + void set_denotation(const ::std::string& value); + #if LANG_CXX11 + void set_denotation(::std::string&& value); + #endif + void set_denotation(const char* value); + void set_denotation(const char* value, size_t size); + ::std::string* mutable_denotation(); + ::std::string* release_denotation(); + void set_allocated_denotation(::std::string* denotation); + + // optional int64 dim_value = 1; + bool has_dim_value() const; + void clear_dim_value(); + static const int kDimValueFieldNumber = 1; + ::google::protobuf::int64 dim_value() const; + void set_dim_value(::google::protobuf::int64 value); + + // optional string dim_param = 2; + bool has_dim_param() const; + void clear_dim_param(); + static const int kDimParamFieldNumber = 2; + const ::std::string& dim_param() const; + void set_dim_param(const ::std::string& value); + #if LANG_CXX11 + void set_dim_param(::std::string&& value); + #endif + void set_dim_param(const char* value); + void set_dim_param(const char* value, size_t size); + ::std::string* mutable_dim_param(); + ::std::string* release_dim_param(); + void set_allocated_dim_param(::std::string* dim_param); + + ValueCase value_case() const; + // @@protoc_insertion_point(class_scope:opencv_onnx.TensorShapeProto.Dimension) + private: + void set_has_dim_value(); + void set_has_dim_param(); + void set_has_denotation(); + void clear_has_denotation(); + + inline bool has_value() const; + void clear_value(); + inline void clear_has_value(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::internal::ArenaStringPtr denotation_; + union ValueUnion { + ValueUnion() {} + ::google::protobuf::int64 dim_value_; + ::google::protobuf::internal::ArenaStringPtr dim_param_; + } value_; + ::google::protobuf::uint32 _oneof_case_[1]; + + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto_DimensionImpl(); +}; +// ------------------------------------------------------------------- + +class TensorShapeProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorShapeProto) */ { + public: + TensorShapeProto(); + virtual ~TensorShapeProto(); + + TensorShapeProto(const TensorShapeProto& from); + + inline TensorShapeProto& operator=(const TensorShapeProto& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + TensorShapeProto(TensorShapeProto&& from) noexcept + : TensorShapeProto() { + *this = ::std::move(from); + } + + inline TensorShapeProto& operator=(TensorShapeProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const TensorShapeProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TensorShapeProto* internal_default_instance() { + return reinterpret_cast( + &_TensorShapeProto_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 9; + + void Swap(TensorShapeProto* other); + friend void swap(TensorShapeProto& a, TensorShapeProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TensorShapeProto* New() const PROTOBUF_FINAL { return New(NULL); } + + TensorShapeProto* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const TensorShapeProto& from); + void MergeFrom(const TensorShapeProto& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(TensorShapeProto* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + typedef TensorShapeProto_Dimension Dimension; + + // accessors ------------------------------------------------------- + + // repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1; + int dim_size() const; + void clear_dim(); + static const int kDimFieldNumber = 1; + const ::opencv_onnx::TensorShapeProto_Dimension& dim(int index) const; + ::opencv_onnx::TensorShapeProto_Dimension* mutable_dim(int index); + ::opencv_onnx::TensorShapeProto_Dimension* add_dim(); + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorShapeProto_Dimension >* + mutable_dim(); + const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorShapeProto_Dimension >& + dim() const; + + // @@protoc_insertion_point(class_scope:opencv_onnx.TensorShapeProto) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorShapeProto_Dimension > dim_; + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProtoImpl(); +}; +// ------------------------------------------------------------------- + +class TypeProto_Tensor : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TypeProto.Tensor) */ { + public: + TypeProto_Tensor(); + virtual ~TypeProto_Tensor(); + + TypeProto_Tensor(const TypeProto_Tensor& from); + + inline TypeProto_Tensor& operator=(const TypeProto_Tensor& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + TypeProto_Tensor(TypeProto_Tensor&& from) noexcept + : TypeProto_Tensor() { + *this = ::std::move(from); + } + + inline TypeProto_Tensor& operator=(TypeProto_Tensor&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const TypeProto_Tensor& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TypeProto_Tensor* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_Tensor_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 10; + + void Swap(TypeProto_Tensor* other); + friend void swap(TypeProto_Tensor& a, TypeProto_Tensor& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TypeProto_Tensor* New() const PROTOBUF_FINAL { return New(NULL); } + + TypeProto_Tensor* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const TypeProto_Tensor& from); + void MergeFrom(const TypeProto_Tensor& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(TypeProto_Tensor* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional .opencv_onnx.TensorShapeProto shape = 2; + bool has_shape() const; + void clear_shape(); + static const int kShapeFieldNumber = 2; + const ::opencv_onnx::TensorShapeProto& shape() const; + ::opencv_onnx::TensorShapeProto* release_shape(); + ::opencv_onnx::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::opencv_onnx::TensorShapeProto* shape); + + // optional .opencv_onnx.TensorProto.DataType elem_type = 1; + bool has_elem_type() const; + void clear_elem_type(); + static const int kElemTypeFieldNumber = 1; + ::opencv_onnx::TensorProto_DataType elem_type() const; + void set_elem_type(::opencv_onnx::TensorProto_DataType value); + + // @@protoc_insertion_point(class_scope:opencv_onnx.TypeProto.Tensor) + private: + void set_has_elem_type(); + void clear_has_elem_type(); + void set_has_shape(); + void clear_has_shape(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::opencv_onnx::TensorShapeProto* shape_; + int elem_type_; + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto_TensorImpl(); +}; +// ------------------------------------------------------------------- + +class TypeProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TypeProto) */ { + public: + TypeProto(); + virtual ~TypeProto(); + + TypeProto(const TypeProto& from); + + inline TypeProto& operator=(const TypeProto& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + TypeProto(TypeProto&& from) noexcept + : TypeProto() { + *this = ::std::move(from); + } + + inline TypeProto& operator=(TypeProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const TypeProto& default_instance(); + + enum ValueCase { + kTensorType = 1, + VALUE_NOT_SET = 0, + }; + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TypeProto* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 11; + + void Swap(TypeProto* other); + friend void swap(TypeProto& a, TypeProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TypeProto* New() const PROTOBUF_FINAL { return New(NULL); } + + TypeProto* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const TypeProto& from); + void MergeFrom(const TypeProto& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(TypeProto* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + typedef TypeProto_Tensor Tensor; + + // accessors ------------------------------------------------------- + + // optional string denotation = 6; + bool has_denotation() const; + void clear_denotation(); + static const int kDenotationFieldNumber = 6; + const ::std::string& denotation() const; + void set_denotation(const ::std::string& value); + #if LANG_CXX11 + void set_denotation(::std::string&& value); + #endif + void set_denotation(const char* value); + void set_denotation(const char* value, size_t size); + ::std::string* mutable_denotation(); + ::std::string* release_denotation(); + void set_allocated_denotation(::std::string* denotation); + + // optional .opencv_onnx.TypeProto.Tensor tensor_type = 1; + bool has_tensor_type() const; + void clear_tensor_type(); + static const int kTensorTypeFieldNumber = 1; + const ::opencv_onnx::TypeProto_Tensor& tensor_type() const; + ::opencv_onnx::TypeProto_Tensor* release_tensor_type(); + ::opencv_onnx::TypeProto_Tensor* mutable_tensor_type(); + void set_allocated_tensor_type(::opencv_onnx::TypeProto_Tensor* tensor_type); + + ValueCase value_case() const; + // @@protoc_insertion_point(class_scope:opencv_onnx.TypeProto) + private: + void set_has_tensor_type(); + void set_has_denotation(); + void clear_has_denotation(); + + inline bool has_value() const; + void clear_value(); + inline void clear_has_value(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::internal::ArenaStringPtr denotation_; + union ValueUnion { + ValueUnion() {} + ::opencv_onnx::TypeProto_Tensor* tensor_type_; + } value_; + ::google::protobuf::uint32 _oneof_case_[1]; + + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProtoImpl(); +}; +// ------------------------------------------------------------------- + +class OperatorSetIdProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.OperatorSetIdProto) */ { + public: + OperatorSetIdProto(); + virtual ~OperatorSetIdProto(); + + OperatorSetIdProto(const OperatorSetIdProto& from); + + inline OperatorSetIdProto& operator=(const OperatorSetIdProto& from) { + CopyFrom(from); + return *this; + } + #if LANG_CXX11 + OperatorSetIdProto(OperatorSetIdProto&& from) noexcept + : OperatorSetIdProto() { + *this = ::std::move(from); + } + + inline OperatorSetIdProto& operator=(OperatorSetIdProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + #endif + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields(); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const OperatorSetIdProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const OperatorSetIdProto* internal_default_instance() { + return reinterpret_cast( + &_OperatorSetIdProto_default_instance_); + } + static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = + 12; + + void Swap(OperatorSetIdProto* other); + friend void swap(OperatorSetIdProto& a, OperatorSetIdProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline OperatorSetIdProto* New() const PROTOBUF_FINAL { return New(NULL); } + + OperatorSetIdProto* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; + void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; + void CopyFrom(const OperatorSetIdProto& from); + void MergeFrom(const OperatorSetIdProto& from); + void Clear() PROTOBUF_FINAL; + bool IsInitialized() const PROTOBUF_FINAL; + + size_t ByteSizeLong() const PROTOBUF_FINAL; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; + ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( + bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; + int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const PROTOBUF_FINAL; + void InternalSwap(OperatorSetIdProto* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return NULL; + } + inline void* MaybeArenaPtr() const { + return NULL; + } + public: + + ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string domain = 1; + bool has_domain() const; + void clear_domain(); + static const int kDomainFieldNumber = 1; + const ::std::string& domain() const; + void set_domain(const ::std::string& value); + #if LANG_CXX11 + void set_domain(::std::string&& value); + #endif + void set_domain(const char* value); + void set_domain(const char* value, size_t size); + ::std::string* mutable_domain(); + ::std::string* release_domain(); + void set_allocated_domain(::std::string* domain); + + // optional int64 version = 2; + bool has_version() const; + void clear_version(); + static const int kVersionFieldNumber = 2; + ::google::protobuf::int64 version() const; + void set_version(::google::protobuf::int64 value); + + // @@protoc_insertion_point(class_scope:opencv_onnx.OperatorSetIdProto) + private: + void set_has_domain(); + void clear_has_domain(); + void set_has_version(); + void clear_has_version(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable int _cached_size_; + ::google::protobuf::internal::ArenaStringPtr domain_; + ::google::protobuf::int64 version_; + friend struct ::protobuf_opencv_2donnx_2eproto::TableStruct; + friend void ::protobuf_opencv_2donnx_2eproto::InitDefaultsOperatorSetIdProtoImpl(); +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// AttributeProto + +// optional string name = 1; +inline bool AttributeProto::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void AttributeProto::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void AttributeProto::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void AttributeProto::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_name(); +} +inline const ::std::string& AttributeProto::name() const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.name) + return name_.GetNoArena(); +} +inline void AttributeProto::set_name(const ::std::string& value) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.AttributeProto.name) +} +#if LANG_CXX11 +inline void AttributeProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.AttributeProto.name) +} +#endif +inline void AttributeProto::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.AttributeProto.name) +} +inline void AttributeProto::set_name(const char* value, size_t size) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.AttributeProto.name) +} +inline ::std::string* AttributeProto::mutable_name() { + set_has_name(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* AttributeProto::release_name() { + // @@protoc_insertion_point(field_release:opencv_onnx.AttributeProto.name) + clear_has_name(); + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void AttributeProto::set_allocated_name(::std::string* name) { + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.AttributeProto.name) +} + +// optional string ref_attr_name = 21; +inline bool AttributeProto::has_ref_attr_name() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void AttributeProto::set_has_ref_attr_name() { + _has_bits_[0] |= 0x00000008u; +} +inline void AttributeProto::clear_has_ref_attr_name() { + _has_bits_[0] &= ~0x00000008u; +} +inline void AttributeProto::clear_ref_attr_name() { + ref_attr_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_ref_attr_name(); +} +inline const ::std::string& AttributeProto::ref_attr_name() const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.ref_attr_name) + return ref_attr_name_.GetNoArena(); +} +inline void AttributeProto::set_ref_attr_name(const ::std::string& value) { + set_has_ref_attr_name(); + ref_attr_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.AttributeProto.ref_attr_name) +} +#if LANG_CXX11 +inline void AttributeProto::set_ref_attr_name(::std::string&& value) { + set_has_ref_attr_name(); + ref_attr_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.AttributeProto.ref_attr_name) +} +#endif +inline void AttributeProto::set_ref_attr_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_ref_attr_name(); + ref_attr_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.AttributeProto.ref_attr_name) +} +inline void AttributeProto::set_ref_attr_name(const char* value, size_t size) { + set_has_ref_attr_name(); + ref_attr_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.AttributeProto.ref_attr_name) +} +inline ::std::string* AttributeProto::mutable_ref_attr_name() { + set_has_ref_attr_name(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.ref_attr_name) + return ref_attr_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* AttributeProto::release_ref_attr_name() { + // @@protoc_insertion_point(field_release:opencv_onnx.AttributeProto.ref_attr_name) + clear_has_ref_attr_name(); + return ref_attr_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void AttributeProto::set_allocated_ref_attr_name(::std::string* ref_attr_name) { + if (ref_attr_name != NULL) { + set_has_ref_attr_name(); + } else { + clear_has_ref_attr_name(); + } + ref_attr_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ref_attr_name); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.AttributeProto.ref_attr_name) +} + +// optional string doc_string = 13; +inline bool AttributeProto::has_doc_string() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void AttributeProto::set_has_doc_string() { + _has_bits_[0] |= 0x00000004u; +} +inline void AttributeProto::clear_has_doc_string() { + _has_bits_[0] &= ~0x00000004u; +} +inline void AttributeProto::clear_doc_string() { + doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_doc_string(); +} +inline const ::std::string& AttributeProto::doc_string() const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.doc_string) + return doc_string_.GetNoArena(); +} +inline void AttributeProto::set_doc_string(const ::std::string& value) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.AttributeProto.doc_string) +} +#if LANG_CXX11 +inline void AttributeProto::set_doc_string(::std::string&& value) { + set_has_doc_string(); + doc_string_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.AttributeProto.doc_string) +} +#endif +inline void AttributeProto::set_doc_string(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.AttributeProto.doc_string) +} +inline void AttributeProto::set_doc_string(const char* value, size_t size) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.AttributeProto.doc_string) +} +inline ::std::string* AttributeProto::mutable_doc_string() { + set_has_doc_string(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.doc_string) + return doc_string_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* AttributeProto::release_doc_string() { + // @@protoc_insertion_point(field_release:opencv_onnx.AttributeProto.doc_string) + clear_has_doc_string(); + return doc_string_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void AttributeProto::set_allocated_doc_string(::std::string* doc_string) { + if (doc_string != NULL) { + set_has_doc_string(); + } else { + clear_has_doc_string(); + } + doc_string_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), doc_string); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.AttributeProto.doc_string) +} + +// optional .opencv_onnx.AttributeProto.AttributeType type = 20; +inline bool AttributeProto::has_type() const { + return (_has_bits_[0] & 0x00000100u) != 0; +} +inline void AttributeProto::set_has_type() { + _has_bits_[0] |= 0x00000100u; +} +inline void AttributeProto::clear_has_type() { + _has_bits_[0] &= ~0x00000100u; +} +inline void AttributeProto::clear_type() { + type_ = 0; + clear_has_type(); +} +inline ::opencv_onnx::AttributeProto_AttributeType AttributeProto::type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.type) + return static_cast< ::opencv_onnx::AttributeProto_AttributeType >(type_); +} +inline void AttributeProto::set_type(::opencv_onnx::AttributeProto_AttributeType value) { + assert(::opencv_onnx::AttributeProto_AttributeType_IsValid(value)); + set_has_type(); + type_ = value; + // @@protoc_insertion_point(field_set:opencv_onnx.AttributeProto.type) +} + +// optional float f = 2; +inline bool AttributeProto::has_f() const { + return (_has_bits_[0] & 0x00000080u) != 0; +} +inline void AttributeProto::set_has_f() { + _has_bits_[0] |= 0x00000080u; +} +inline void AttributeProto::clear_has_f() { + _has_bits_[0] &= ~0x00000080u; +} +inline void AttributeProto::clear_f() { + f_ = 0; + clear_has_f(); +} +inline float AttributeProto::f() const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.f) + return f_; +} +inline void AttributeProto::set_f(float value) { + set_has_f(); + f_ = value; + // @@protoc_insertion_point(field_set:opencv_onnx.AttributeProto.f) +} + +// optional int64 i = 3; +inline bool AttributeProto::has_i() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +inline void AttributeProto::set_has_i() { + _has_bits_[0] |= 0x00000040u; +} +inline void AttributeProto::clear_has_i() { + _has_bits_[0] &= ~0x00000040u; +} +inline void AttributeProto::clear_i() { + i_ = GOOGLE_LONGLONG(0); + clear_has_i(); +} +inline ::google::protobuf::int64 AttributeProto::i() const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.i) + return i_; +} +inline void AttributeProto::set_i(::google::protobuf::int64 value) { + set_has_i(); + i_ = value; + // @@protoc_insertion_point(field_set:opencv_onnx.AttributeProto.i) +} + +// optional bytes s = 4; +inline bool AttributeProto::has_s() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void AttributeProto::set_has_s() { + _has_bits_[0] |= 0x00000002u; +} +inline void AttributeProto::clear_has_s() { + _has_bits_[0] &= ~0x00000002u; +} +inline void AttributeProto::clear_s() { + s_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_s(); +} +inline const ::std::string& AttributeProto::s() const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.s) + return s_.GetNoArena(); +} +inline void AttributeProto::set_s(const ::std::string& value) { + set_has_s(); + s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.AttributeProto.s) +} +#if LANG_CXX11 +inline void AttributeProto::set_s(::std::string&& value) { + set_has_s(); + s_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.AttributeProto.s) +} +#endif +inline void AttributeProto::set_s(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_s(); + s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.AttributeProto.s) +} +inline void AttributeProto::set_s(const void* value, size_t size) { + set_has_s(); + s_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.AttributeProto.s) +} +inline ::std::string* AttributeProto::mutable_s() { + set_has_s(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.s) + return s_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* AttributeProto::release_s() { + // @@protoc_insertion_point(field_release:opencv_onnx.AttributeProto.s) + clear_has_s(); + return s_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void AttributeProto::set_allocated_s(::std::string* s) { + if (s != NULL) { + set_has_s(); + } else { + clear_has_s(); + } + s_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.AttributeProto.s) +} + +// optional .opencv_onnx.TensorProto t = 5; +inline bool AttributeProto::has_t() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void AttributeProto::set_has_t() { + _has_bits_[0] |= 0x00000010u; +} +inline void AttributeProto::clear_has_t() { + _has_bits_[0] &= ~0x00000010u; +} +inline void AttributeProto::clear_t() { + if (t_ != NULL) t_->Clear(); + clear_has_t(); +} +inline const ::opencv_onnx::TensorProto& AttributeProto::t() const { + const ::opencv_onnx::TensorProto* p = t_; + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.t) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_onnx::_TensorProto_default_instance_); +} +inline ::opencv_onnx::TensorProto* AttributeProto::release_t() { + // @@protoc_insertion_point(field_release:opencv_onnx.AttributeProto.t) + clear_has_t(); + ::opencv_onnx::TensorProto* temp = t_; + t_ = NULL; + return temp; +} +inline ::opencv_onnx::TensorProto* AttributeProto::mutable_t() { + set_has_t(); + if (t_ == NULL) { + t_ = new ::opencv_onnx::TensorProto; + } + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.t) + return t_; +} +inline void AttributeProto::set_allocated_t(::opencv_onnx::TensorProto* t) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete t_; + } + if (t) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + t = ::google::protobuf::internal::GetOwnedMessage( + message_arena, t, submessage_arena); + } + set_has_t(); + } else { + clear_has_t(); + } + t_ = t; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.AttributeProto.t) +} + +// optional .opencv_onnx.GraphProto g = 6; +inline bool AttributeProto::has_g() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void AttributeProto::set_has_g() { + _has_bits_[0] |= 0x00000020u; +} +inline void AttributeProto::clear_has_g() { + _has_bits_[0] &= ~0x00000020u; +} +inline void AttributeProto::clear_g() { + if (g_ != NULL) g_->Clear(); + clear_has_g(); +} +inline const ::opencv_onnx::GraphProto& AttributeProto::g() const { + const ::opencv_onnx::GraphProto* p = g_; + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.g) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_onnx::_GraphProto_default_instance_); +} +inline ::opencv_onnx::GraphProto* AttributeProto::release_g() { + // @@protoc_insertion_point(field_release:opencv_onnx.AttributeProto.g) + clear_has_g(); + ::opencv_onnx::GraphProto* temp = g_; + g_ = NULL; + return temp; +} +inline ::opencv_onnx::GraphProto* AttributeProto::mutable_g() { + set_has_g(); + if (g_ == NULL) { + g_ = new ::opencv_onnx::GraphProto; + } + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.g) + return g_; +} +inline void AttributeProto::set_allocated_g(::opencv_onnx::GraphProto* g) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete g_; + } + if (g) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + g = ::google::protobuf::internal::GetOwnedMessage( + message_arena, g, submessage_arena); + } + set_has_g(); + } else { + clear_has_g(); + } + g_ = g; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.AttributeProto.g) +} + +// repeated float floats = 7; +inline int AttributeProto::floats_size() const { + return floats_.size(); +} +inline void AttributeProto::clear_floats() { + floats_.Clear(); +} +inline float AttributeProto::floats(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.floats) + return floats_.Get(index); +} +inline void AttributeProto::set_floats(int index, float value) { + floats_.Set(index, value); + // @@protoc_insertion_point(field_set:opencv_onnx.AttributeProto.floats) +} +inline void AttributeProto::add_floats(float value) { + floats_.Add(value); + // @@protoc_insertion_point(field_add:opencv_onnx.AttributeProto.floats) +} +inline const ::google::protobuf::RepeatedField< float >& +AttributeProto::floats() const { + // @@protoc_insertion_point(field_list:opencv_onnx.AttributeProto.floats) + return floats_; +} +inline ::google::protobuf::RepeatedField< float >* +AttributeProto::mutable_floats() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.AttributeProto.floats) + return &floats_; +} + +// repeated int64 ints = 8; +inline int AttributeProto::ints_size() const { + return ints_.size(); +} +inline void AttributeProto::clear_ints() { + ints_.Clear(); +} +inline ::google::protobuf::int64 AttributeProto::ints(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.ints) + return ints_.Get(index); +} +inline void AttributeProto::set_ints(int index, ::google::protobuf::int64 value) { + ints_.Set(index, value); + // @@protoc_insertion_point(field_set:opencv_onnx.AttributeProto.ints) +} +inline void AttributeProto::add_ints(::google::protobuf::int64 value) { + ints_.Add(value); + // @@protoc_insertion_point(field_add:opencv_onnx.AttributeProto.ints) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +AttributeProto::ints() const { + // @@protoc_insertion_point(field_list:opencv_onnx.AttributeProto.ints) + return ints_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +AttributeProto::mutable_ints() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.AttributeProto.ints) + return &ints_; +} + +// repeated bytes strings = 9; +inline int AttributeProto::strings_size() const { + return strings_.size(); +} +inline void AttributeProto::clear_strings() { + strings_.Clear(); +} +inline const ::std::string& AttributeProto::strings(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.strings) + return strings_.Get(index); +} +inline ::std::string* AttributeProto::mutable_strings(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.strings) + return strings_.Mutable(index); +} +inline void AttributeProto::set_strings(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:opencv_onnx.AttributeProto.strings) + strings_.Mutable(index)->assign(value); +} +#if LANG_CXX11 +inline void AttributeProto::set_strings(int index, ::std::string&& value) { + // @@protoc_insertion_point(field_set:opencv_onnx.AttributeProto.strings) + strings_.Mutable(index)->assign(std::move(value)); +} +#endif +inline void AttributeProto::set_strings(int index, const char* value) { + GOOGLE_DCHECK(value != NULL); + strings_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:opencv_onnx.AttributeProto.strings) +} +inline void AttributeProto::set_strings(int index, const void* value, size_t size) { + strings_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.AttributeProto.strings) +} +inline ::std::string* AttributeProto::add_strings() { + // @@protoc_insertion_point(field_add_mutable:opencv_onnx.AttributeProto.strings) + return strings_.Add(); +} +inline void AttributeProto::add_strings(const ::std::string& value) { + strings_.Add()->assign(value); + // @@protoc_insertion_point(field_add:opencv_onnx.AttributeProto.strings) +} +#if LANG_CXX11 +inline void AttributeProto::add_strings(::std::string&& value) { + strings_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:opencv_onnx.AttributeProto.strings) +} +#endif +inline void AttributeProto::add_strings(const char* value) { + GOOGLE_DCHECK(value != NULL); + strings_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:opencv_onnx.AttributeProto.strings) +} +inline void AttributeProto::add_strings(const void* value, size_t size) { + strings_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:opencv_onnx.AttributeProto.strings) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +AttributeProto::strings() const { + // @@protoc_insertion_point(field_list:opencv_onnx.AttributeProto.strings) + return strings_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +AttributeProto::mutable_strings() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.AttributeProto.strings) + return &strings_; +} + +// repeated .opencv_onnx.TensorProto tensors = 10; +inline int AttributeProto::tensors_size() const { + return tensors_.size(); +} +inline void AttributeProto::clear_tensors() { + tensors_.Clear(); +} +inline const ::opencv_onnx::TensorProto& AttributeProto::tensors(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.tensors) + return tensors_.Get(index); +} +inline ::opencv_onnx::TensorProto* AttributeProto::mutable_tensors(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.tensors) + return tensors_.Mutable(index); +} +inline ::opencv_onnx::TensorProto* AttributeProto::add_tensors() { + // @@protoc_insertion_point(field_add:opencv_onnx.AttributeProto.tensors) + return tensors_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorProto >* +AttributeProto::mutable_tensors() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.AttributeProto.tensors) + return &tensors_; +} +inline const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorProto >& +AttributeProto::tensors() const { + // @@protoc_insertion_point(field_list:opencv_onnx.AttributeProto.tensors) + return tensors_; +} + +// repeated .opencv_onnx.GraphProto graphs = 11; +inline int AttributeProto::graphs_size() const { + return graphs_.size(); +} +inline void AttributeProto::clear_graphs() { + graphs_.Clear(); +} +inline const ::opencv_onnx::GraphProto& AttributeProto::graphs(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.graphs) + return graphs_.Get(index); +} +inline ::opencv_onnx::GraphProto* AttributeProto::mutable_graphs(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.graphs) + return graphs_.Mutable(index); +} +inline ::opencv_onnx::GraphProto* AttributeProto::add_graphs() { + // @@protoc_insertion_point(field_add:opencv_onnx.AttributeProto.graphs) + return graphs_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::opencv_onnx::GraphProto >* +AttributeProto::mutable_graphs() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.AttributeProto.graphs) + return &graphs_; +} +inline const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::GraphProto >& +AttributeProto::graphs() const { + // @@protoc_insertion_point(field_list:opencv_onnx.AttributeProto.graphs) + return graphs_; +} + +// ------------------------------------------------------------------- + +// ValueInfoProto + +// optional string name = 1; +inline bool ValueInfoProto::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ValueInfoProto::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void ValueInfoProto::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ValueInfoProto::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_name(); +} +inline const ::std::string& ValueInfoProto::name() const { + // @@protoc_insertion_point(field_get:opencv_onnx.ValueInfoProto.name) + return name_.GetNoArena(); +} +inline void ValueInfoProto::set_name(const ::std::string& value) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.ValueInfoProto.name) +} +#if LANG_CXX11 +inline void ValueInfoProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.ValueInfoProto.name) +} +#endif +inline void ValueInfoProto::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.ValueInfoProto.name) +} +inline void ValueInfoProto::set_name(const char* value, size_t size) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.ValueInfoProto.name) +} +inline ::std::string* ValueInfoProto::mutable_name() { + set_has_name(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.ValueInfoProto.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ValueInfoProto::release_name() { + // @@protoc_insertion_point(field_release:opencv_onnx.ValueInfoProto.name) + clear_has_name(); + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ValueInfoProto::set_allocated_name(::std::string* name) { + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.ValueInfoProto.name) +} + +// optional .opencv_onnx.TypeProto type = 2; +inline bool ValueInfoProto::has_type() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void ValueInfoProto::set_has_type() { + _has_bits_[0] |= 0x00000004u; +} +inline void ValueInfoProto::clear_has_type() { + _has_bits_[0] &= ~0x00000004u; +} +inline void ValueInfoProto::clear_type() { + if (type_ != NULL) type_->Clear(); + clear_has_type(); +} +inline const ::opencv_onnx::TypeProto& ValueInfoProto::type() const { + const ::opencv_onnx::TypeProto* p = type_; + // @@protoc_insertion_point(field_get:opencv_onnx.ValueInfoProto.type) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_onnx::_TypeProto_default_instance_); +} +inline ::opencv_onnx::TypeProto* ValueInfoProto::release_type() { + // @@protoc_insertion_point(field_release:opencv_onnx.ValueInfoProto.type) + clear_has_type(); + ::opencv_onnx::TypeProto* temp = type_; + type_ = NULL; + return temp; +} +inline ::opencv_onnx::TypeProto* ValueInfoProto::mutable_type() { + set_has_type(); + if (type_ == NULL) { + type_ = new ::opencv_onnx::TypeProto; + } + // @@protoc_insertion_point(field_mutable:opencv_onnx.ValueInfoProto.type) + return type_; +} +inline void ValueInfoProto::set_allocated_type(::opencv_onnx::TypeProto* type) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete type_; + } + if (type) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + type = ::google::protobuf::internal::GetOwnedMessage( + message_arena, type, submessage_arena); + } + set_has_type(); + } else { + clear_has_type(); + } + type_ = type; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.ValueInfoProto.type) +} + +// optional string doc_string = 3; +inline bool ValueInfoProto::has_doc_string() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void ValueInfoProto::set_has_doc_string() { + _has_bits_[0] |= 0x00000002u; +} +inline void ValueInfoProto::clear_has_doc_string() { + _has_bits_[0] &= ~0x00000002u; +} +inline void ValueInfoProto::clear_doc_string() { + doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_doc_string(); +} +inline const ::std::string& ValueInfoProto::doc_string() const { + // @@protoc_insertion_point(field_get:opencv_onnx.ValueInfoProto.doc_string) + return doc_string_.GetNoArena(); +} +inline void ValueInfoProto::set_doc_string(const ::std::string& value) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.ValueInfoProto.doc_string) +} +#if LANG_CXX11 +inline void ValueInfoProto::set_doc_string(::std::string&& value) { + set_has_doc_string(); + doc_string_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.ValueInfoProto.doc_string) +} +#endif +inline void ValueInfoProto::set_doc_string(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.ValueInfoProto.doc_string) +} +inline void ValueInfoProto::set_doc_string(const char* value, size_t size) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.ValueInfoProto.doc_string) +} +inline ::std::string* ValueInfoProto::mutable_doc_string() { + set_has_doc_string(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.ValueInfoProto.doc_string) + return doc_string_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ValueInfoProto::release_doc_string() { + // @@protoc_insertion_point(field_release:opencv_onnx.ValueInfoProto.doc_string) + clear_has_doc_string(); + return doc_string_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ValueInfoProto::set_allocated_doc_string(::std::string* doc_string) { + if (doc_string != NULL) { + set_has_doc_string(); + } else { + clear_has_doc_string(); + } + doc_string_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), doc_string); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.ValueInfoProto.doc_string) +} + +// ------------------------------------------------------------------- + +// NodeProto + +// repeated string input = 1; +inline int NodeProto::input_size() const { + return input_.size(); +} +inline void NodeProto::clear_input() { + input_.Clear(); +} +inline const ::std::string& NodeProto::input(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeProto.input) + return input_.Get(index); +} +inline ::std::string* NodeProto::mutable_input(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeProto.input) + return input_.Mutable(index); +} +inline void NodeProto::set_input(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:opencv_onnx.NodeProto.input) + input_.Mutable(index)->assign(value); +} +#if LANG_CXX11 +inline void NodeProto::set_input(int index, ::std::string&& value) { + // @@protoc_insertion_point(field_set:opencv_onnx.NodeProto.input) + input_.Mutable(index)->assign(std::move(value)); +} +#endif +inline void NodeProto::set_input(int index, const char* value) { + GOOGLE_DCHECK(value != NULL); + input_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:opencv_onnx.NodeProto.input) +} +inline void NodeProto::set_input(int index, const char* value, size_t size) { + input_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.NodeProto.input) +} +inline ::std::string* NodeProto::add_input() { + // @@protoc_insertion_point(field_add_mutable:opencv_onnx.NodeProto.input) + return input_.Add(); +} +inline void NodeProto::add_input(const ::std::string& value) { + input_.Add()->assign(value); + // @@protoc_insertion_point(field_add:opencv_onnx.NodeProto.input) +} +#if LANG_CXX11 +inline void NodeProto::add_input(::std::string&& value) { + input_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:opencv_onnx.NodeProto.input) +} +#endif +inline void NodeProto::add_input(const char* value) { + GOOGLE_DCHECK(value != NULL); + input_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:opencv_onnx.NodeProto.input) +} +inline void NodeProto::add_input(const char* value, size_t size) { + input_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:opencv_onnx.NodeProto.input) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +NodeProto::input() const { + // @@protoc_insertion_point(field_list:opencv_onnx.NodeProto.input) + return input_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +NodeProto::mutable_input() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.NodeProto.input) + return &input_; +} + +// repeated string output = 2; +inline int NodeProto::output_size() const { + return output_.size(); +} +inline void NodeProto::clear_output() { + output_.Clear(); +} +inline const ::std::string& NodeProto::output(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeProto.output) + return output_.Get(index); +} +inline ::std::string* NodeProto::mutable_output(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeProto.output) + return output_.Mutable(index); +} +inline void NodeProto::set_output(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:opencv_onnx.NodeProto.output) + output_.Mutable(index)->assign(value); +} +#if LANG_CXX11 +inline void NodeProto::set_output(int index, ::std::string&& value) { + // @@protoc_insertion_point(field_set:opencv_onnx.NodeProto.output) + output_.Mutable(index)->assign(std::move(value)); +} +#endif +inline void NodeProto::set_output(int index, const char* value) { + GOOGLE_DCHECK(value != NULL); + output_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:opencv_onnx.NodeProto.output) +} +inline void NodeProto::set_output(int index, const char* value, size_t size) { + output_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.NodeProto.output) +} +inline ::std::string* NodeProto::add_output() { + // @@protoc_insertion_point(field_add_mutable:opencv_onnx.NodeProto.output) + return output_.Add(); +} +inline void NodeProto::add_output(const ::std::string& value) { + output_.Add()->assign(value); + // @@protoc_insertion_point(field_add:opencv_onnx.NodeProto.output) +} +#if LANG_CXX11 +inline void NodeProto::add_output(::std::string&& value) { + output_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:opencv_onnx.NodeProto.output) +} +#endif +inline void NodeProto::add_output(const char* value) { + GOOGLE_DCHECK(value != NULL); + output_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:opencv_onnx.NodeProto.output) +} +inline void NodeProto::add_output(const char* value, size_t size) { + output_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:opencv_onnx.NodeProto.output) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +NodeProto::output() const { + // @@protoc_insertion_point(field_list:opencv_onnx.NodeProto.output) + return output_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +NodeProto::mutable_output() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.NodeProto.output) + return &output_; +} + +// optional string name = 3; +inline bool NodeProto::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void NodeProto::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void NodeProto::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void NodeProto::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_name(); +} +inline const ::std::string& NodeProto::name() const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeProto.name) + return name_.GetNoArena(); +} +inline void NodeProto::set_name(const ::std::string& value) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.NodeProto.name) +} +#if LANG_CXX11 +inline void NodeProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.NodeProto.name) +} +#endif +inline void NodeProto::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.NodeProto.name) +} +inline void NodeProto::set_name(const char* value, size_t size) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.NodeProto.name) +} +inline ::std::string* NodeProto::mutable_name() { + set_has_name(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeProto.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* NodeProto::release_name() { + // @@protoc_insertion_point(field_release:opencv_onnx.NodeProto.name) + clear_has_name(); + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void NodeProto::set_allocated_name(::std::string* name) { + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.NodeProto.name) +} + +// optional string op_type = 4; +inline bool NodeProto::has_op_type() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void NodeProto::set_has_op_type() { + _has_bits_[0] |= 0x00000002u; +} +inline void NodeProto::clear_has_op_type() { + _has_bits_[0] &= ~0x00000002u; +} +inline void NodeProto::clear_op_type() { + op_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_op_type(); +} +inline const ::std::string& NodeProto::op_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeProto.op_type) + return op_type_.GetNoArena(); +} +inline void NodeProto::set_op_type(const ::std::string& value) { + set_has_op_type(); + op_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.NodeProto.op_type) +} +#if LANG_CXX11 +inline void NodeProto::set_op_type(::std::string&& value) { + set_has_op_type(); + op_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.NodeProto.op_type) +} +#endif +inline void NodeProto::set_op_type(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_op_type(); + op_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.NodeProto.op_type) +} +inline void NodeProto::set_op_type(const char* value, size_t size) { + set_has_op_type(); + op_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.NodeProto.op_type) +} +inline ::std::string* NodeProto::mutable_op_type() { + set_has_op_type(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeProto.op_type) + return op_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* NodeProto::release_op_type() { + // @@protoc_insertion_point(field_release:opencv_onnx.NodeProto.op_type) + clear_has_op_type(); + return op_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void NodeProto::set_allocated_op_type(::std::string* op_type) { + if (op_type != NULL) { + set_has_op_type(); + } else { + clear_has_op_type(); + } + op_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), op_type); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.NodeProto.op_type) +} + +// optional string domain = 7; +inline bool NodeProto::has_domain() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void NodeProto::set_has_domain() { + _has_bits_[0] |= 0x00000008u; +} +inline void NodeProto::clear_has_domain() { + _has_bits_[0] &= ~0x00000008u; +} +inline void NodeProto::clear_domain() { + domain_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_domain(); +} +inline const ::std::string& NodeProto::domain() const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeProto.domain) + return domain_.GetNoArena(); +} +inline void NodeProto::set_domain(const ::std::string& value) { + set_has_domain(); + domain_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.NodeProto.domain) +} +#if LANG_CXX11 +inline void NodeProto::set_domain(::std::string&& value) { + set_has_domain(); + domain_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.NodeProto.domain) +} +#endif +inline void NodeProto::set_domain(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_domain(); + domain_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.NodeProto.domain) +} +inline void NodeProto::set_domain(const char* value, size_t size) { + set_has_domain(); + domain_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.NodeProto.domain) +} +inline ::std::string* NodeProto::mutable_domain() { + set_has_domain(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeProto.domain) + return domain_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* NodeProto::release_domain() { + // @@protoc_insertion_point(field_release:opencv_onnx.NodeProto.domain) + clear_has_domain(); + return domain_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void NodeProto::set_allocated_domain(::std::string* domain) { + if (domain != NULL) { + set_has_domain(); + } else { + clear_has_domain(); + } + domain_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), domain); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.NodeProto.domain) +} + +// repeated .opencv_onnx.AttributeProto attribute = 5; +inline int NodeProto::attribute_size() const { + return attribute_.size(); +} +inline void NodeProto::clear_attribute() { + attribute_.Clear(); +} +inline const ::opencv_onnx::AttributeProto& NodeProto::attribute(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeProto.attribute) + return attribute_.Get(index); +} +inline ::opencv_onnx::AttributeProto* NodeProto::mutable_attribute(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeProto.attribute) + return attribute_.Mutable(index); +} +inline ::opencv_onnx::AttributeProto* NodeProto::add_attribute() { + // @@protoc_insertion_point(field_add:opencv_onnx.NodeProto.attribute) + return attribute_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::opencv_onnx::AttributeProto >* +NodeProto::mutable_attribute() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.NodeProto.attribute) + return &attribute_; +} +inline const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::AttributeProto >& +NodeProto::attribute() const { + // @@protoc_insertion_point(field_list:opencv_onnx.NodeProto.attribute) + return attribute_; +} + +// optional string doc_string = 6; +inline bool NodeProto::has_doc_string() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void NodeProto::set_has_doc_string() { + _has_bits_[0] |= 0x00000004u; +} +inline void NodeProto::clear_has_doc_string() { + _has_bits_[0] &= ~0x00000004u; +} +inline void NodeProto::clear_doc_string() { + doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_doc_string(); +} +inline const ::std::string& NodeProto::doc_string() const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeProto.doc_string) + return doc_string_.GetNoArena(); +} +inline void NodeProto::set_doc_string(const ::std::string& value) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.NodeProto.doc_string) +} +#if LANG_CXX11 +inline void NodeProto::set_doc_string(::std::string&& value) { + set_has_doc_string(); + doc_string_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.NodeProto.doc_string) +} +#endif +inline void NodeProto::set_doc_string(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.NodeProto.doc_string) +} +inline void NodeProto::set_doc_string(const char* value, size_t size) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.NodeProto.doc_string) +} +inline ::std::string* NodeProto::mutable_doc_string() { + set_has_doc_string(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeProto.doc_string) + return doc_string_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* NodeProto::release_doc_string() { + // @@protoc_insertion_point(field_release:opencv_onnx.NodeProto.doc_string) + clear_has_doc_string(); + return doc_string_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void NodeProto::set_allocated_doc_string(::std::string* doc_string) { + if (doc_string != NULL) { + set_has_doc_string(); + } else { + clear_has_doc_string(); + } + doc_string_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), doc_string); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.NodeProto.doc_string) +} + +// ------------------------------------------------------------------- + +// ModelProto + +// optional int64 ir_version = 1; +inline bool ModelProto::has_ir_version() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void ModelProto::set_has_ir_version() { + _has_bits_[0] |= 0x00000020u; +} +inline void ModelProto::clear_has_ir_version() { + _has_bits_[0] &= ~0x00000020u; +} +inline void ModelProto::clear_ir_version() { + ir_version_ = GOOGLE_LONGLONG(0); + clear_has_ir_version(); +} +inline ::google::protobuf::int64 ModelProto::ir_version() const { + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.ir_version) + return ir_version_; +} +inline void ModelProto::set_ir_version(::google::protobuf::int64 value) { + set_has_ir_version(); + ir_version_ = value; + // @@protoc_insertion_point(field_set:opencv_onnx.ModelProto.ir_version) +} + +// repeated .opencv_onnx.OperatorSetIdProto opset_import = 8; +inline int ModelProto::opset_import_size() const { + return opset_import_.size(); +} +inline void ModelProto::clear_opset_import() { + opset_import_.Clear(); +} +inline const ::opencv_onnx::OperatorSetIdProto& ModelProto::opset_import(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.opset_import) + return opset_import_.Get(index); +} +inline ::opencv_onnx::OperatorSetIdProto* ModelProto::mutable_opset_import(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.ModelProto.opset_import) + return opset_import_.Mutable(index); +} +inline ::opencv_onnx::OperatorSetIdProto* ModelProto::add_opset_import() { + // @@protoc_insertion_point(field_add:opencv_onnx.ModelProto.opset_import) + return opset_import_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::opencv_onnx::OperatorSetIdProto >* +ModelProto::mutable_opset_import() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.ModelProto.opset_import) + return &opset_import_; +} +inline const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::OperatorSetIdProto >& +ModelProto::opset_import() const { + // @@protoc_insertion_point(field_list:opencv_onnx.ModelProto.opset_import) + return opset_import_; +} + +// optional string producer_name = 2; +inline bool ModelProto::has_producer_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ModelProto::set_has_producer_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void ModelProto::clear_has_producer_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ModelProto::clear_producer_name() { + producer_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_producer_name(); +} +inline const ::std::string& ModelProto::producer_name() const { + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.producer_name) + return producer_name_.GetNoArena(); +} +inline void ModelProto::set_producer_name(const ::std::string& value) { + set_has_producer_name(); + producer_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.ModelProto.producer_name) +} +#if LANG_CXX11 +inline void ModelProto::set_producer_name(::std::string&& value) { + set_has_producer_name(); + producer_name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.ModelProto.producer_name) +} +#endif +inline void ModelProto::set_producer_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_producer_name(); + producer_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.ModelProto.producer_name) +} +inline void ModelProto::set_producer_name(const char* value, size_t size) { + set_has_producer_name(); + producer_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.ModelProto.producer_name) +} +inline ::std::string* ModelProto::mutable_producer_name() { + set_has_producer_name(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.ModelProto.producer_name) + return producer_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ModelProto::release_producer_name() { + // @@protoc_insertion_point(field_release:opencv_onnx.ModelProto.producer_name) + clear_has_producer_name(); + return producer_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ModelProto::set_allocated_producer_name(::std::string* producer_name) { + if (producer_name != NULL) { + set_has_producer_name(); + } else { + clear_has_producer_name(); + } + producer_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), producer_name); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.ModelProto.producer_name) +} + +// optional string producer_version = 3; +inline bool ModelProto::has_producer_version() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void ModelProto::set_has_producer_version() { + _has_bits_[0] |= 0x00000002u; +} +inline void ModelProto::clear_has_producer_version() { + _has_bits_[0] &= ~0x00000002u; +} +inline void ModelProto::clear_producer_version() { + producer_version_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_producer_version(); +} +inline const ::std::string& ModelProto::producer_version() const { + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.producer_version) + return producer_version_.GetNoArena(); +} +inline void ModelProto::set_producer_version(const ::std::string& value) { + set_has_producer_version(); + producer_version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.ModelProto.producer_version) +} +#if LANG_CXX11 +inline void ModelProto::set_producer_version(::std::string&& value) { + set_has_producer_version(); + producer_version_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.ModelProto.producer_version) +} +#endif +inline void ModelProto::set_producer_version(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_producer_version(); + producer_version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.ModelProto.producer_version) +} +inline void ModelProto::set_producer_version(const char* value, size_t size) { + set_has_producer_version(); + producer_version_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.ModelProto.producer_version) +} +inline ::std::string* ModelProto::mutable_producer_version() { + set_has_producer_version(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.ModelProto.producer_version) + return producer_version_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ModelProto::release_producer_version() { + // @@protoc_insertion_point(field_release:opencv_onnx.ModelProto.producer_version) + clear_has_producer_version(); + return producer_version_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ModelProto::set_allocated_producer_version(::std::string* producer_version) { + if (producer_version != NULL) { + set_has_producer_version(); + } else { + clear_has_producer_version(); + } + producer_version_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), producer_version); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.ModelProto.producer_version) +} + +// optional string domain = 4; +inline bool ModelProto::has_domain() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void ModelProto::set_has_domain() { + _has_bits_[0] |= 0x00000004u; +} +inline void ModelProto::clear_has_domain() { + _has_bits_[0] &= ~0x00000004u; +} +inline void ModelProto::clear_domain() { + domain_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_domain(); +} +inline const ::std::string& ModelProto::domain() const { + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.domain) + return domain_.GetNoArena(); +} +inline void ModelProto::set_domain(const ::std::string& value) { + set_has_domain(); + domain_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.ModelProto.domain) +} +#if LANG_CXX11 +inline void ModelProto::set_domain(::std::string&& value) { + set_has_domain(); + domain_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.ModelProto.domain) +} +#endif +inline void ModelProto::set_domain(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_domain(); + domain_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.ModelProto.domain) +} +inline void ModelProto::set_domain(const char* value, size_t size) { + set_has_domain(); + domain_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.ModelProto.domain) +} +inline ::std::string* ModelProto::mutable_domain() { + set_has_domain(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.ModelProto.domain) + return domain_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ModelProto::release_domain() { + // @@protoc_insertion_point(field_release:opencv_onnx.ModelProto.domain) + clear_has_domain(); + return domain_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ModelProto::set_allocated_domain(::std::string* domain) { + if (domain != NULL) { + set_has_domain(); + } else { + clear_has_domain(); + } + domain_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), domain); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.ModelProto.domain) +} + +// optional int64 model_version = 5; +inline bool ModelProto::has_model_version() const { + return (_has_bits_[0] & 0x00000040u) != 0; +} +inline void ModelProto::set_has_model_version() { + _has_bits_[0] |= 0x00000040u; +} +inline void ModelProto::clear_has_model_version() { + _has_bits_[0] &= ~0x00000040u; +} +inline void ModelProto::clear_model_version() { + model_version_ = GOOGLE_LONGLONG(0); + clear_has_model_version(); +} +inline ::google::protobuf::int64 ModelProto::model_version() const { + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.model_version) + return model_version_; +} +inline void ModelProto::set_model_version(::google::protobuf::int64 value) { + set_has_model_version(); + model_version_ = value; + // @@protoc_insertion_point(field_set:opencv_onnx.ModelProto.model_version) +} + +// optional string doc_string = 6; +inline bool ModelProto::has_doc_string() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void ModelProto::set_has_doc_string() { + _has_bits_[0] |= 0x00000008u; +} +inline void ModelProto::clear_has_doc_string() { + _has_bits_[0] &= ~0x00000008u; +} +inline void ModelProto::clear_doc_string() { + doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_doc_string(); +} +inline const ::std::string& ModelProto::doc_string() const { + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.doc_string) + return doc_string_.GetNoArena(); +} +inline void ModelProto::set_doc_string(const ::std::string& value) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.ModelProto.doc_string) +} +#if LANG_CXX11 +inline void ModelProto::set_doc_string(::std::string&& value) { + set_has_doc_string(); + doc_string_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.ModelProto.doc_string) +} +#endif +inline void ModelProto::set_doc_string(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.ModelProto.doc_string) +} +inline void ModelProto::set_doc_string(const char* value, size_t size) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.ModelProto.doc_string) +} +inline ::std::string* ModelProto::mutable_doc_string() { + set_has_doc_string(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.ModelProto.doc_string) + return doc_string_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ModelProto::release_doc_string() { + // @@protoc_insertion_point(field_release:opencv_onnx.ModelProto.doc_string) + clear_has_doc_string(); + return doc_string_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ModelProto::set_allocated_doc_string(::std::string* doc_string) { + if (doc_string != NULL) { + set_has_doc_string(); + } else { + clear_has_doc_string(); + } + doc_string_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), doc_string); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.ModelProto.doc_string) +} + +// optional .opencv_onnx.GraphProto graph = 7; +inline bool ModelProto::has_graph() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void ModelProto::set_has_graph() { + _has_bits_[0] |= 0x00000010u; +} +inline void ModelProto::clear_has_graph() { + _has_bits_[0] &= ~0x00000010u; +} +inline void ModelProto::clear_graph() { + if (graph_ != NULL) graph_->Clear(); + clear_has_graph(); +} +inline const ::opencv_onnx::GraphProto& ModelProto::graph() const { + const ::opencv_onnx::GraphProto* p = graph_; + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.graph) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_onnx::_GraphProto_default_instance_); +} +inline ::opencv_onnx::GraphProto* ModelProto::release_graph() { + // @@protoc_insertion_point(field_release:opencv_onnx.ModelProto.graph) + clear_has_graph(); + ::opencv_onnx::GraphProto* temp = graph_; + graph_ = NULL; + return temp; +} +inline ::opencv_onnx::GraphProto* ModelProto::mutable_graph() { + set_has_graph(); + if (graph_ == NULL) { + graph_ = new ::opencv_onnx::GraphProto; + } + // @@protoc_insertion_point(field_mutable:opencv_onnx.ModelProto.graph) + return graph_; +} +inline void ModelProto::set_allocated_graph(::opencv_onnx::GraphProto* graph) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete graph_; + } + if (graph) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + graph = ::google::protobuf::internal::GetOwnedMessage( + message_arena, graph, submessage_arena); + } + set_has_graph(); + } else { + clear_has_graph(); + } + graph_ = graph; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.ModelProto.graph) +} + +// repeated .opencv_onnx.StringStringEntryProto metadata_props = 14; +inline int ModelProto::metadata_props_size() const { + return metadata_props_.size(); +} +inline void ModelProto::clear_metadata_props() { + metadata_props_.Clear(); +} +inline const ::opencv_onnx::StringStringEntryProto& ModelProto::metadata_props(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.metadata_props) + return metadata_props_.Get(index); +} +inline ::opencv_onnx::StringStringEntryProto* ModelProto::mutable_metadata_props(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.ModelProto.metadata_props) + return metadata_props_.Mutable(index); +} +inline ::opencv_onnx::StringStringEntryProto* ModelProto::add_metadata_props() { + // @@protoc_insertion_point(field_add:opencv_onnx.ModelProto.metadata_props) + return metadata_props_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* +ModelProto::mutable_metadata_props() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.ModelProto.metadata_props) + return &metadata_props_; +} +inline const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& +ModelProto::metadata_props() const { + // @@protoc_insertion_point(field_list:opencv_onnx.ModelProto.metadata_props) + return metadata_props_; +} + +// ------------------------------------------------------------------- + +// StringStringEntryProto + +// optional string key = 1; +inline bool StringStringEntryProto::has_key() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void StringStringEntryProto::set_has_key() { + _has_bits_[0] |= 0x00000001u; +} +inline void StringStringEntryProto::clear_has_key() { + _has_bits_[0] &= ~0x00000001u; +} +inline void StringStringEntryProto::clear_key() { + key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_key(); +} +inline const ::std::string& StringStringEntryProto::key() const { + // @@protoc_insertion_point(field_get:opencv_onnx.StringStringEntryProto.key) + return key_.GetNoArena(); +} +inline void StringStringEntryProto::set_key(const ::std::string& value) { + set_has_key(); + key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.StringStringEntryProto.key) +} +#if LANG_CXX11 +inline void StringStringEntryProto::set_key(::std::string&& value) { + set_has_key(); + key_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.StringStringEntryProto.key) +} +#endif +inline void StringStringEntryProto::set_key(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_key(); + key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.StringStringEntryProto.key) +} +inline void StringStringEntryProto::set_key(const char* value, size_t size) { + set_has_key(); + key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.StringStringEntryProto.key) +} +inline ::std::string* StringStringEntryProto::mutable_key() { + set_has_key(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.StringStringEntryProto.key) + return key_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* StringStringEntryProto::release_key() { + // @@protoc_insertion_point(field_release:opencv_onnx.StringStringEntryProto.key) + clear_has_key(); + return key_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void StringStringEntryProto::set_allocated_key(::std::string* key) { + if (key != NULL) { + set_has_key(); + } else { + clear_has_key(); + } + key_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), key); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.StringStringEntryProto.key) +} + +// optional string value = 2; +inline bool StringStringEntryProto::has_value() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void StringStringEntryProto::set_has_value() { + _has_bits_[0] |= 0x00000002u; +} +inline void StringStringEntryProto::clear_has_value() { + _has_bits_[0] &= ~0x00000002u; +} +inline void StringStringEntryProto::clear_value() { + value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_value(); +} +inline const ::std::string& StringStringEntryProto::value() const { + // @@protoc_insertion_point(field_get:opencv_onnx.StringStringEntryProto.value) + return value_.GetNoArena(); +} +inline void StringStringEntryProto::set_value(const ::std::string& value) { + set_has_value(); + value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.StringStringEntryProto.value) +} +#if LANG_CXX11 +inline void StringStringEntryProto::set_value(::std::string&& value) { + set_has_value(); + value_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.StringStringEntryProto.value) +} +#endif +inline void StringStringEntryProto::set_value(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_value(); + value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.StringStringEntryProto.value) +} +inline void StringStringEntryProto::set_value(const char* value, size_t size) { + set_has_value(); + value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.StringStringEntryProto.value) +} +inline ::std::string* StringStringEntryProto::mutable_value() { + set_has_value(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.StringStringEntryProto.value) + return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* StringStringEntryProto::release_value() { + // @@protoc_insertion_point(field_release:opencv_onnx.StringStringEntryProto.value) + clear_has_value(); + return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void StringStringEntryProto::set_allocated_value(::std::string* value) { + if (value != NULL) { + set_has_value(); + } else { + clear_has_value(); + } + value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.StringStringEntryProto.value) +} + +// ------------------------------------------------------------------- + +// GraphProto + +// repeated .opencv_onnx.NodeProto node = 1; +inline int GraphProto::node_size() const { + return node_.size(); +} +inline void GraphProto::clear_node() { + node_.Clear(); +} +inline const ::opencv_onnx::NodeProto& GraphProto::node(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.GraphProto.node) + return node_.Get(index); +} +inline ::opencv_onnx::NodeProto* GraphProto::mutable_node(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.GraphProto.node) + return node_.Mutable(index); +} +inline ::opencv_onnx::NodeProto* GraphProto::add_node() { + // @@protoc_insertion_point(field_add:opencv_onnx.GraphProto.node) + return node_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::opencv_onnx::NodeProto >* +GraphProto::mutable_node() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.GraphProto.node) + return &node_; +} +inline const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::NodeProto >& +GraphProto::node() const { + // @@protoc_insertion_point(field_list:opencv_onnx.GraphProto.node) + return node_; +} + +// optional string name = 2; +inline bool GraphProto::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void GraphProto::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void GraphProto::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void GraphProto::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_name(); +} +inline const ::std::string& GraphProto::name() const { + // @@protoc_insertion_point(field_get:opencv_onnx.GraphProto.name) + return name_.GetNoArena(); +} +inline void GraphProto::set_name(const ::std::string& value) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.GraphProto.name) +} +#if LANG_CXX11 +inline void GraphProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.GraphProto.name) +} +#endif +inline void GraphProto::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.GraphProto.name) +} +inline void GraphProto::set_name(const char* value, size_t size) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.GraphProto.name) +} +inline ::std::string* GraphProto::mutable_name() { + set_has_name(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.GraphProto.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* GraphProto::release_name() { + // @@protoc_insertion_point(field_release:opencv_onnx.GraphProto.name) + clear_has_name(); + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void GraphProto::set_allocated_name(::std::string* name) { + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.GraphProto.name) +} + +// repeated .opencv_onnx.TensorProto initializer = 5; +inline int GraphProto::initializer_size() const { + return initializer_.size(); +} +inline void GraphProto::clear_initializer() { + initializer_.Clear(); +} +inline const ::opencv_onnx::TensorProto& GraphProto::initializer(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.GraphProto.initializer) + return initializer_.Get(index); +} +inline ::opencv_onnx::TensorProto* GraphProto::mutable_initializer(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.GraphProto.initializer) + return initializer_.Mutable(index); +} +inline ::opencv_onnx::TensorProto* GraphProto::add_initializer() { + // @@protoc_insertion_point(field_add:opencv_onnx.GraphProto.initializer) + return initializer_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorProto >* +GraphProto::mutable_initializer() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.GraphProto.initializer) + return &initializer_; +} +inline const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorProto >& +GraphProto::initializer() const { + // @@protoc_insertion_point(field_list:opencv_onnx.GraphProto.initializer) + return initializer_; +} + +// optional string doc_string = 10; +inline bool GraphProto::has_doc_string() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void GraphProto::set_has_doc_string() { + _has_bits_[0] |= 0x00000002u; +} +inline void GraphProto::clear_has_doc_string() { + _has_bits_[0] &= ~0x00000002u; +} +inline void GraphProto::clear_doc_string() { + doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_doc_string(); +} +inline const ::std::string& GraphProto::doc_string() const { + // @@protoc_insertion_point(field_get:opencv_onnx.GraphProto.doc_string) + return doc_string_.GetNoArena(); +} +inline void GraphProto::set_doc_string(const ::std::string& value) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.GraphProto.doc_string) +} +#if LANG_CXX11 +inline void GraphProto::set_doc_string(::std::string&& value) { + set_has_doc_string(); + doc_string_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.GraphProto.doc_string) +} +#endif +inline void GraphProto::set_doc_string(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.GraphProto.doc_string) +} +inline void GraphProto::set_doc_string(const char* value, size_t size) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.GraphProto.doc_string) +} +inline ::std::string* GraphProto::mutable_doc_string() { + set_has_doc_string(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.GraphProto.doc_string) + return doc_string_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* GraphProto::release_doc_string() { + // @@protoc_insertion_point(field_release:opencv_onnx.GraphProto.doc_string) + clear_has_doc_string(); + return doc_string_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void GraphProto::set_allocated_doc_string(::std::string* doc_string) { + if (doc_string != NULL) { + set_has_doc_string(); + } else { + clear_has_doc_string(); + } + doc_string_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), doc_string); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.GraphProto.doc_string) +} + +// repeated .opencv_onnx.ValueInfoProto input = 11; +inline int GraphProto::input_size() const { + return input_.size(); +} +inline void GraphProto::clear_input() { + input_.Clear(); +} +inline const ::opencv_onnx::ValueInfoProto& GraphProto::input(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.GraphProto.input) + return input_.Get(index); +} +inline ::opencv_onnx::ValueInfoProto* GraphProto::mutable_input(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.GraphProto.input) + return input_.Mutable(index); +} +inline ::opencv_onnx::ValueInfoProto* GraphProto::add_input() { + // @@protoc_insertion_point(field_add:opencv_onnx.GraphProto.input) + return input_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >* +GraphProto::mutable_input() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.GraphProto.input) + return &input_; +} +inline const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >& +GraphProto::input() const { + // @@protoc_insertion_point(field_list:opencv_onnx.GraphProto.input) + return input_; +} + +// repeated .opencv_onnx.ValueInfoProto output = 12; +inline int GraphProto::output_size() const { + return output_.size(); +} +inline void GraphProto::clear_output() { + output_.Clear(); +} +inline const ::opencv_onnx::ValueInfoProto& GraphProto::output(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.GraphProto.output) + return output_.Get(index); +} +inline ::opencv_onnx::ValueInfoProto* GraphProto::mutable_output(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.GraphProto.output) + return output_.Mutable(index); +} +inline ::opencv_onnx::ValueInfoProto* GraphProto::add_output() { + // @@protoc_insertion_point(field_add:opencv_onnx.GraphProto.output) + return output_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >* +GraphProto::mutable_output() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.GraphProto.output) + return &output_; +} +inline const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >& +GraphProto::output() const { + // @@protoc_insertion_point(field_list:opencv_onnx.GraphProto.output) + return output_; +} + +// repeated .opencv_onnx.ValueInfoProto value_info = 13; +inline int GraphProto::value_info_size() const { + return value_info_.size(); +} +inline void GraphProto::clear_value_info() { + value_info_.Clear(); +} +inline const ::opencv_onnx::ValueInfoProto& GraphProto::value_info(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.GraphProto.value_info) + return value_info_.Get(index); +} +inline ::opencv_onnx::ValueInfoProto* GraphProto::mutable_value_info(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.GraphProto.value_info) + return value_info_.Mutable(index); +} +inline ::opencv_onnx::ValueInfoProto* GraphProto::add_value_info() { + // @@protoc_insertion_point(field_add:opencv_onnx.GraphProto.value_info) + return value_info_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >* +GraphProto::mutable_value_info() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.GraphProto.value_info) + return &value_info_; +} +inline const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >& +GraphProto::value_info() const { + // @@protoc_insertion_point(field_list:opencv_onnx.GraphProto.value_info) + return value_info_; +} + +// ------------------------------------------------------------------- + +// TensorProto_Segment + +// optional int64 begin = 1; +inline bool TensorProto_Segment::has_begin() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void TensorProto_Segment::set_has_begin() { + _has_bits_[0] |= 0x00000001u; +} +inline void TensorProto_Segment::clear_has_begin() { + _has_bits_[0] &= ~0x00000001u; +} +inline void TensorProto_Segment::clear_begin() { + begin_ = GOOGLE_LONGLONG(0); + clear_has_begin(); +} +inline ::google::protobuf::int64 TensorProto_Segment::begin() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.Segment.begin) + return begin_; +} +inline void TensorProto_Segment::set_begin(::google::protobuf::int64 value) { + set_has_begin(); + begin_ = value; + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.Segment.begin) +} + +// optional int64 end = 2; +inline bool TensorProto_Segment::has_end() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void TensorProto_Segment::set_has_end() { + _has_bits_[0] |= 0x00000002u; +} +inline void TensorProto_Segment::clear_has_end() { + _has_bits_[0] &= ~0x00000002u; +} +inline void TensorProto_Segment::clear_end() { + end_ = GOOGLE_LONGLONG(0); + clear_has_end(); +} +inline ::google::protobuf::int64 TensorProto_Segment::end() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.Segment.end) + return end_; +} +inline void TensorProto_Segment::set_end(::google::protobuf::int64 value) { + set_has_end(); + end_ = value; + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.Segment.end) +} + +// ------------------------------------------------------------------- + +// TensorProto + +// repeated int64 dims = 1; +inline int TensorProto::dims_size() const { + return dims_.size(); +} +inline void TensorProto::clear_dims() { + dims_.Clear(); +} +inline ::google::protobuf::int64 TensorProto::dims(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.dims) + return dims_.Get(index); +} +inline void TensorProto::set_dims(int index, ::google::protobuf::int64 value) { + dims_.Set(index, value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.dims) +} +inline void TensorProto::add_dims(::google::protobuf::int64 value) { + dims_.Add(value); + // @@protoc_insertion_point(field_add:opencv_onnx.TensorProto.dims) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +TensorProto::dims() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TensorProto.dims) + return dims_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +TensorProto::mutable_dims() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TensorProto.dims) + return &dims_; +} + +// optional .opencv_onnx.TensorProto.DataType data_type = 2; +inline bool TensorProto::has_data_type() const { + return (_has_bits_[0] & 0x00000010u) != 0; +} +inline void TensorProto::set_has_data_type() { + _has_bits_[0] |= 0x00000010u; +} +inline void TensorProto::clear_has_data_type() { + _has_bits_[0] &= ~0x00000010u; +} +inline void TensorProto::clear_data_type() { + data_type_ = 0; + clear_has_data_type(); +} +inline ::opencv_onnx::TensorProto_DataType TensorProto::data_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.data_type) + return static_cast< ::opencv_onnx::TensorProto_DataType >(data_type_); +} +inline void TensorProto::set_data_type(::opencv_onnx::TensorProto_DataType value) { + assert(::opencv_onnx::TensorProto_DataType_IsValid(value)); + set_has_data_type(); + data_type_ = value; + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.data_type) +} + +// optional .opencv_onnx.TensorProto.Segment segment = 3; +inline bool TensorProto::has_segment() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void TensorProto::set_has_segment() { + _has_bits_[0] |= 0x00000008u; +} +inline void TensorProto::clear_has_segment() { + _has_bits_[0] &= ~0x00000008u; +} +inline void TensorProto::clear_segment() { + if (segment_ != NULL) segment_->Clear(); + clear_has_segment(); +} +inline const ::opencv_onnx::TensorProto_Segment& TensorProto::segment() const { + const ::opencv_onnx::TensorProto_Segment* p = segment_; + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.segment) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_onnx::_TensorProto_Segment_default_instance_); +} +inline ::opencv_onnx::TensorProto_Segment* TensorProto::release_segment() { + // @@protoc_insertion_point(field_release:opencv_onnx.TensorProto.segment) + clear_has_segment(); + ::opencv_onnx::TensorProto_Segment* temp = segment_; + segment_ = NULL; + return temp; +} +inline ::opencv_onnx::TensorProto_Segment* TensorProto::mutable_segment() { + set_has_segment(); + if (segment_ == NULL) { + segment_ = new ::opencv_onnx::TensorProto_Segment; + } + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorProto.segment) + return segment_; +} +inline void TensorProto::set_allocated_segment(::opencv_onnx::TensorProto_Segment* segment) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete segment_; + } + if (segment) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + segment = ::google::protobuf::internal::GetOwnedMessage( + message_arena, segment, submessage_arena); + } + set_has_segment(); + } else { + clear_has_segment(); + } + segment_ = segment; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TensorProto.segment) +} + +// repeated float float_data = 4 [packed = true]; +inline int TensorProto::float_data_size() const { + return float_data_.size(); +} +inline void TensorProto::clear_float_data() { + float_data_.Clear(); +} +inline float TensorProto::float_data(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.float_data) + return float_data_.Get(index); +} +inline void TensorProto::set_float_data(int index, float value) { + float_data_.Set(index, value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.float_data) +} +inline void TensorProto::add_float_data(float value) { + float_data_.Add(value); + // @@protoc_insertion_point(field_add:opencv_onnx.TensorProto.float_data) +} +inline const ::google::protobuf::RepeatedField< float >& +TensorProto::float_data() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TensorProto.float_data) + return float_data_; +} +inline ::google::protobuf::RepeatedField< float >* +TensorProto::mutable_float_data() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TensorProto.float_data) + return &float_data_; +} + +// repeated int32 int32_data = 5 [packed = true]; +inline int TensorProto::int32_data_size() const { + return int32_data_.size(); +} +inline void TensorProto::clear_int32_data() { + int32_data_.Clear(); +} +inline ::google::protobuf::int32 TensorProto::int32_data(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.int32_data) + return int32_data_.Get(index); +} +inline void TensorProto::set_int32_data(int index, ::google::protobuf::int32 value) { + int32_data_.Set(index, value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.int32_data) +} +inline void TensorProto::add_int32_data(::google::protobuf::int32 value) { + int32_data_.Add(value); + // @@protoc_insertion_point(field_add:opencv_onnx.TensorProto.int32_data) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +TensorProto::int32_data() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TensorProto.int32_data) + return int32_data_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +TensorProto::mutable_int32_data() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TensorProto.int32_data) + return &int32_data_; +} + +// repeated bytes string_data = 6; +inline int TensorProto::string_data_size() const { + return string_data_.size(); +} +inline void TensorProto::clear_string_data() { + string_data_.Clear(); +} +inline const ::std::string& TensorProto::string_data(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.string_data) + return string_data_.Get(index); +} +inline ::std::string* TensorProto::mutable_string_data(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorProto.string_data) + return string_data_.Mutable(index); +} +inline void TensorProto::set_string_data(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.string_data) + string_data_.Mutable(index)->assign(value); +} +#if LANG_CXX11 +inline void TensorProto::set_string_data(int index, ::std::string&& value) { + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.string_data) + string_data_.Mutable(index)->assign(std::move(value)); +} +#endif +inline void TensorProto::set_string_data(int index, const char* value) { + GOOGLE_DCHECK(value != NULL); + string_data_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:opencv_onnx.TensorProto.string_data) +} +inline void TensorProto::set_string_data(int index, const void* value, size_t size) { + string_data_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.TensorProto.string_data) +} +inline ::std::string* TensorProto::add_string_data() { + // @@protoc_insertion_point(field_add_mutable:opencv_onnx.TensorProto.string_data) + return string_data_.Add(); +} +inline void TensorProto::add_string_data(const ::std::string& value) { + string_data_.Add()->assign(value); + // @@protoc_insertion_point(field_add:opencv_onnx.TensorProto.string_data) +} +#if LANG_CXX11 +inline void TensorProto::add_string_data(::std::string&& value) { + string_data_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:opencv_onnx.TensorProto.string_data) +} +#endif +inline void TensorProto::add_string_data(const char* value) { + GOOGLE_DCHECK(value != NULL); + string_data_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:opencv_onnx.TensorProto.string_data) +} +inline void TensorProto::add_string_data(const void* value, size_t size) { + string_data_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:opencv_onnx.TensorProto.string_data) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +TensorProto::string_data() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TensorProto.string_data) + return string_data_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +TensorProto::mutable_string_data() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TensorProto.string_data) + return &string_data_; +} + +// repeated int64 int64_data = 7 [packed = true]; +inline int TensorProto::int64_data_size() const { + return int64_data_.size(); +} +inline void TensorProto::clear_int64_data() { + int64_data_.Clear(); +} +inline ::google::protobuf::int64 TensorProto::int64_data(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.int64_data) + return int64_data_.Get(index); +} +inline void TensorProto::set_int64_data(int index, ::google::protobuf::int64 value) { + int64_data_.Set(index, value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.int64_data) +} +inline void TensorProto::add_int64_data(::google::protobuf::int64 value) { + int64_data_.Add(value); + // @@protoc_insertion_point(field_add:opencv_onnx.TensorProto.int64_data) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +TensorProto::int64_data() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TensorProto.int64_data) + return int64_data_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +TensorProto::mutable_int64_data() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TensorProto.int64_data) + return &int64_data_; +} + +// optional string name = 8; +inline bool TensorProto::has_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void TensorProto::set_has_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void TensorProto::clear_has_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void TensorProto::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_name(); +} +inline const ::std::string& TensorProto::name() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.name) + return name_.GetNoArena(); +} +inline void TensorProto::set_name(const ::std::string& value) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.name) +} +#if LANG_CXX11 +inline void TensorProto::set_name(::std::string&& value) { + set_has_name(); + name_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.TensorProto.name) +} +#endif +inline void TensorProto::set_name(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.TensorProto.name) +} +inline void TensorProto::set_name(const char* value, size_t size) { + set_has_name(); + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.TensorProto.name) +} +inline ::std::string* TensorProto::mutable_name() { + set_has_name(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorProto.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* TensorProto::release_name() { + // @@protoc_insertion_point(field_release:opencv_onnx.TensorProto.name) + clear_has_name(); + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TensorProto::set_allocated_name(::std::string* name) { + if (name != NULL) { + set_has_name(); + } else { + clear_has_name(); + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TensorProto.name) +} + +// optional string doc_string = 12; +inline bool TensorProto::has_doc_string() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void TensorProto::set_has_doc_string() { + _has_bits_[0] |= 0x00000004u; +} +inline void TensorProto::clear_has_doc_string() { + _has_bits_[0] &= ~0x00000004u; +} +inline void TensorProto::clear_doc_string() { + doc_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_doc_string(); +} +inline const ::std::string& TensorProto::doc_string() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.doc_string) + return doc_string_.GetNoArena(); +} +inline void TensorProto::set_doc_string(const ::std::string& value) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.doc_string) +} +#if LANG_CXX11 +inline void TensorProto::set_doc_string(::std::string&& value) { + set_has_doc_string(); + doc_string_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.TensorProto.doc_string) +} +#endif +inline void TensorProto::set_doc_string(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.TensorProto.doc_string) +} +inline void TensorProto::set_doc_string(const char* value, size_t size) { + set_has_doc_string(); + doc_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.TensorProto.doc_string) +} +inline ::std::string* TensorProto::mutable_doc_string() { + set_has_doc_string(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorProto.doc_string) + return doc_string_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* TensorProto::release_doc_string() { + // @@protoc_insertion_point(field_release:opencv_onnx.TensorProto.doc_string) + clear_has_doc_string(); + return doc_string_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TensorProto::set_allocated_doc_string(::std::string* doc_string) { + if (doc_string != NULL) { + set_has_doc_string(); + } else { + clear_has_doc_string(); + } + doc_string_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), doc_string); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TensorProto.doc_string) +} + +// optional bytes raw_data = 9; +inline bool TensorProto::has_raw_data() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void TensorProto::set_has_raw_data() { + _has_bits_[0] |= 0x00000002u; +} +inline void TensorProto::clear_has_raw_data() { + _has_bits_[0] &= ~0x00000002u; +} +inline void TensorProto::clear_raw_data() { + raw_data_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_raw_data(); +} +inline const ::std::string& TensorProto::raw_data() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.raw_data) + return raw_data_.GetNoArena(); +} +inline void TensorProto::set_raw_data(const ::std::string& value) { + set_has_raw_data(); + raw_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.raw_data) +} +#if LANG_CXX11 +inline void TensorProto::set_raw_data(::std::string&& value) { + set_has_raw_data(); + raw_data_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.TensorProto.raw_data) +} +#endif +inline void TensorProto::set_raw_data(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_raw_data(); + raw_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.TensorProto.raw_data) +} +inline void TensorProto::set_raw_data(const void* value, size_t size) { + set_has_raw_data(); + raw_data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.TensorProto.raw_data) +} +inline ::std::string* TensorProto::mutable_raw_data() { + set_has_raw_data(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorProto.raw_data) + return raw_data_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* TensorProto::release_raw_data() { + // @@protoc_insertion_point(field_release:opencv_onnx.TensorProto.raw_data) + clear_has_raw_data(); + return raw_data_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TensorProto::set_allocated_raw_data(::std::string* raw_data) { + if (raw_data != NULL) { + set_has_raw_data(); + } else { + clear_has_raw_data(); + } + raw_data_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), raw_data); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TensorProto.raw_data) +} + +// repeated double double_data = 10 [packed = true]; +inline int TensorProto::double_data_size() const { + return double_data_.size(); +} +inline void TensorProto::clear_double_data() { + double_data_.Clear(); +} +inline double TensorProto::double_data(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.double_data) + return double_data_.Get(index); +} +inline void TensorProto::set_double_data(int index, double value) { + double_data_.Set(index, value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.double_data) +} +inline void TensorProto::add_double_data(double value) { + double_data_.Add(value); + // @@protoc_insertion_point(field_add:opencv_onnx.TensorProto.double_data) +} +inline const ::google::protobuf::RepeatedField< double >& +TensorProto::double_data() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TensorProto.double_data) + return double_data_; +} +inline ::google::protobuf::RepeatedField< double >* +TensorProto::mutable_double_data() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TensorProto.double_data) + return &double_data_; +} + +// repeated uint64 uint64_data = 11 [packed = true]; +inline int TensorProto::uint64_data_size() const { + return uint64_data_.size(); +} +inline void TensorProto::clear_uint64_data() { + uint64_data_.Clear(); +} +inline ::google::protobuf::uint64 TensorProto::uint64_data(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.uint64_data) + return uint64_data_.Get(index); +} +inline void TensorProto::set_uint64_data(int index, ::google::protobuf::uint64 value) { + uint64_data_.Set(index, value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.uint64_data) +} +inline void TensorProto::add_uint64_data(::google::protobuf::uint64 value) { + uint64_data_.Add(value); + // @@protoc_insertion_point(field_add:opencv_onnx.TensorProto.uint64_data) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >& +TensorProto::uint64_data() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TensorProto.uint64_data) + return uint64_data_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::uint64 >* +TensorProto::mutable_uint64_data() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TensorProto.uint64_data) + return &uint64_data_; +} + +// ------------------------------------------------------------------- + +// TensorShapeProto_Dimension + +// optional int64 dim_value = 1; +inline bool TensorShapeProto_Dimension::has_dim_value() const { + return value_case() == kDimValue; +} +inline void TensorShapeProto_Dimension::set_has_dim_value() { + _oneof_case_[0] = kDimValue; +} +inline void TensorShapeProto_Dimension::clear_dim_value() { + if (has_dim_value()) { + value_.dim_value_ = GOOGLE_LONGLONG(0); + clear_has_value(); + } +} +inline ::google::protobuf::int64 TensorShapeProto_Dimension::dim_value() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorShapeProto.Dimension.dim_value) + if (has_dim_value()) { + return value_.dim_value_; + } + return GOOGLE_LONGLONG(0); +} +inline void TensorShapeProto_Dimension::set_dim_value(::google::protobuf::int64 value) { + if (!has_dim_value()) { + clear_value(); + set_has_dim_value(); + } + value_.dim_value_ = value; + // @@protoc_insertion_point(field_set:opencv_onnx.TensorShapeProto.Dimension.dim_value) +} + +// optional string dim_param = 2; +inline bool TensorShapeProto_Dimension::has_dim_param() const { + return value_case() == kDimParam; +} +inline void TensorShapeProto_Dimension::set_has_dim_param() { + _oneof_case_[0] = kDimParam; +} +inline void TensorShapeProto_Dimension::clear_dim_param() { + if (has_dim_param()) { + value_.dim_param_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_value(); + } +} +inline const ::std::string& TensorShapeProto_Dimension::dim_param() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorShapeProto.Dimension.dim_param) + if (has_dim_param()) { + return value_.dim_param_.GetNoArena(); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void TensorShapeProto_Dimension::set_dim_param(const ::std::string& value) { + // @@protoc_insertion_point(field_set:opencv_onnx.TensorShapeProto.Dimension.dim_param) + if (!has_dim_param()) { + clear_value(); + set_has_dim_param(); + value_.dim_param_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.dim_param_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorShapeProto.Dimension.dim_param) +} +#if LANG_CXX11 +inline void TensorShapeProto_Dimension::set_dim_param(::std::string&& value) { + // @@protoc_insertion_point(field_set:opencv_onnx.TensorShapeProto.Dimension.dim_param) + if (!has_dim_param()) { + clear_value(); + set_has_dim_param(); + value_.dim_param_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.dim_param_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.TensorShapeProto.Dimension.dim_param) +} +#endif +inline void TensorShapeProto_Dimension::set_dim_param(const char* value) { + GOOGLE_DCHECK(value != NULL); + if (!has_dim_param()) { + clear_value(); + set_has_dim_param(); + value_.dim_param_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.dim_param_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.TensorShapeProto.Dimension.dim_param) +} +inline void TensorShapeProto_Dimension::set_dim_param(const char* value, size_t size) { + if (!has_dim_param()) { + clear_value(); + set_has_dim_param(); + value_.dim_param_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + value_.dim_param_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.TensorShapeProto.Dimension.dim_param) +} +inline ::std::string* TensorShapeProto_Dimension::mutable_dim_param() { + if (!has_dim_param()) { + clear_value(); + set_has_dim_param(); + value_.dim_param_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorShapeProto.Dimension.dim_param) + return value_.dim_param_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* TensorShapeProto_Dimension::release_dim_param() { + // @@protoc_insertion_point(field_release:opencv_onnx.TensorShapeProto.Dimension.dim_param) + if (has_dim_param()) { + clear_has_value(); + return value_.dim_param_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} +inline void TensorShapeProto_Dimension::set_allocated_dim_param(::std::string* dim_param) { + if (!has_dim_param()) { + value_.dim_param_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_value(); + if (dim_param != NULL) { + set_has_dim_param(); + value_.dim_param_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + dim_param); + } + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TensorShapeProto.Dimension.dim_param) +} + +// optional string denotation = 3; +inline bool TensorShapeProto_Dimension::has_denotation() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void TensorShapeProto_Dimension::set_has_denotation() { + _has_bits_[0] |= 0x00000001u; +} +inline void TensorShapeProto_Dimension::clear_has_denotation() { + _has_bits_[0] &= ~0x00000001u; +} +inline void TensorShapeProto_Dimension::clear_denotation() { + denotation_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_denotation(); +} +inline const ::std::string& TensorShapeProto_Dimension::denotation() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorShapeProto.Dimension.denotation) + return denotation_.GetNoArena(); +} +inline void TensorShapeProto_Dimension::set_denotation(const ::std::string& value) { + set_has_denotation(); + denotation_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorShapeProto.Dimension.denotation) +} +#if LANG_CXX11 +inline void TensorShapeProto_Dimension::set_denotation(::std::string&& value) { + set_has_denotation(); + denotation_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.TensorShapeProto.Dimension.denotation) +} +#endif +inline void TensorShapeProto_Dimension::set_denotation(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_denotation(); + denotation_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.TensorShapeProto.Dimension.denotation) +} +inline void TensorShapeProto_Dimension::set_denotation(const char* value, size_t size) { + set_has_denotation(); + denotation_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.TensorShapeProto.Dimension.denotation) +} +inline ::std::string* TensorShapeProto_Dimension::mutable_denotation() { + set_has_denotation(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorShapeProto.Dimension.denotation) + return denotation_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* TensorShapeProto_Dimension::release_denotation() { + // @@protoc_insertion_point(field_release:opencv_onnx.TensorShapeProto.Dimension.denotation) + clear_has_denotation(); + return denotation_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TensorShapeProto_Dimension::set_allocated_denotation(::std::string* denotation) { + if (denotation != NULL) { + set_has_denotation(); + } else { + clear_has_denotation(); + } + denotation_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), denotation); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TensorShapeProto.Dimension.denotation) +} + +inline bool TensorShapeProto_Dimension::has_value() const { + return value_case() != VALUE_NOT_SET; +} +inline void TensorShapeProto_Dimension::clear_has_value() { + _oneof_case_[0] = VALUE_NOT_SET; +} +inline TensorShapeProto_Dimension::ValueCase TensorShapeProto_Dimension::value_case() const { + return TensorShapeProto_Dimension::ValueCase(_oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// TensorShapeProto + +// repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1; +inline int TensorShapeProto::dim_size() const { + return dim_.size(); +} +inline void TensorShapeProto::clear_dim() { + dim_.Clear(); +} +inline const ::opencv_onnx::TensorShapeProto_Dimension& TensorShapeProto::dim(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorShapeProto.dim) + return dim_.Get(index); +} +inline ::opencv_onnx::TensorShapeProto_Dimension* TensorShapeProto::mutable_dim(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorShapeProto.dim) + return dim_.Mutable(index); +} +inline ::opencv_onnx::TensorShapeProto_Dimension* TensorShapeProto::add_dim() { + // @@protoc_insertion_point(field_add:opencv_onnx.TensorShapeProto.dim) + return dim_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorShapeProto_Dimension >* +TensorShapeProto::mutable_dim() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TensorShapeProto.dim) + return &dim_; +} +inline const ::google::protobuf::RepeatedPtrField< ::opencv_onnx::TensorShapeProto_Dimension >& +TensorShapeProto::dim() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TensorShapeProto.dim) + return dim_; +} + +// ------------------------------------------------------------------- + +// TypeProto_Tensor + +// optional .opencv_onnx.TensorProto.DataType elem_type = 1; +inline bool TypeProto_Tensor::has_elem_type() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void TypeProto_Tensor::set_has_elem_type() { + _has_bits_[0] |= 0x00000002u; +} +inline void TypeProto_Tensor::clear_has_elem_type() { + _has_bits_[0] &= ~0x00000002u; +} +inline void TypeProto_Tensor::clear_elem_type() { + elem_type_ = 0; + clear_has_elem_type(); +} +inline ::opencv_onnx::TensorProto_DataType TypeProto_Tensor::elem_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.Tensor.elem_type) + return static_cast< ::opencv_onnx::TensorProto_DataType >(elem_type_); +} +inline void TypeProto_Tensor::set_elem_type(::opencv_onnx::TensorProto_DataType value) { + assert(::opencv_onnx::TensorProto_DataType_IsValid(value)); + set_has_elem_type(); + elem_type_ = value; + // @@protoc_insertion_point(field_set:opencv_onnx.TypeProto.Tensor.elem_type) +} + +// optional .opencv_onnx.TensorShapeProto shape = 2; +inline bool TypeProto_Tensor::has_shape() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void TypeProto_Tensor::set_has_shape() { + _has_bits_[0] |= 0x00000001u; +} +inline void TypeProto_Tensor::clear_has_shape() { + _has_bits_[0] &= ~0x00000001u; +} +inline void TypeProto_Tensor::clear_shape() { + if (shape_ != NULL) shape_->Clear(); + clear_has_shape(); +} +inline const ::opencv_onnx::TensorShapeProto& TypeProto_Tensor::shape() const { + const ::opencv_onnx::TensorShapeProto* p = shape_; + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.Tensor.shape) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_onnx::_TensorShapeProto_default_instance_); +} +inline ::opencv_onnx::TensorShapeProto* TypeProto_Tensor::release_shape() { + // @@protoc_insertion_point(field_release:opencv_onnx.TypeProto.Tensor.shape) + clear_has_shape(); + ::opencv_onnx::TensorShapeProto* temp = shape_; + shape_ = NULL; + return temp; +} +inline ::opencv_onnx::TensorShapeProto* TypeProto_Tensor::mutable_shape() { + set_has_shape(); + if (shape_ == NULL) { + shape_ = new ::opencv_onnx::TensorShapeProto; + } + // @@protoc_insertion_point(field_mutable:opencv_onnx.TypeProto.Tensor.shape) + return shape_; +} +inline void TypeProto_Tensor::set_allocated_shape(::opencv_onnx::TensorShapeProto* shape) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == NULL) { + delete shape_; + } + if (shape) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + shape = ::google::protobuf::internal::GetOwnedMessage( + message_arena, shape, submessage_arena); + } + set_has_shape(); + } else { + clear_has_shape(); + } + shape_ = shape; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.Tensor.shape) +} + +// ------------------------------------------------------------------- + +// TypeProto + +// optional .opencv_onnx.TypeProto.Tensor tensor_type = 1; +inline bool TypeProto::has_tensor_type() const { + return value_case() == kTensorType; +} +inline void TypeProto::set_has_tensor_type() { + _oneof_case_[0] = kTensorType; +} +inline void TypeProto::clear_tensor_type() { + if (has_tensor_type()) { + delete value_.tensor_type_; + clear_has_value(); + } +} +inline ::opencv_onnx::TypeProto_Tensor* TypeProto::release_tensor_type() { + // @@protoc_insertion_point(field_release:opencv_onnx.TypeProto.tensor_type) + if (has_tensor_type()) { + clear_has_value(); + ::opencv_onnx::TypeProto_Tensor* temp = value_.tensor_type_; + value_.tensor_type_ = NULL; + return temp; + } else { + return NULL; + } +} +inline const ::opencv_onnx::TypeProto_Tensor& TypeProto::tensor_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.tensor_type) + return has_tensor_type() + ? *value_.tensor_type_ + : *reinterpret_cast< ::opencv_onnx::TypeProto_Tensor*>(&::opencv_onnx::_TypeProto_Tensor_default_instance_); +} +inline ::opencv_onnx::TypeProto_Tensor* TypeProto::mutable_tensor_type() { + if (!has_tensor_type()) { + clear_value(); + set_has_tensor_type(); + value_.tensor_type_ = new ::opencv_onnx::TypeProto_Tensor; + } + // @@protoc_insertion_point(field_mutable:opencv_onnx.TypeProto.tensor_type) + return value_.tensor_type_; +} + +// optional string denotation = 6; +inline bool TypeProto::has_denotation() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void TypeProto::set_has_denotation() { + _has_bits_[0] |= 0x00000001u; +} +inline void TypeProto::clear_has_denotation() { + _has_bits_[0] &= ~0x00000001u; +} +inline void TypeProto::clear_denotation() { + denotation_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_denotation(); +} +inline const ::std::string& TypeProto::denotation() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.denotation) + return denotation_.GetNoArena(); +} +inline void TypeProto::set_denotation(const ::std::string& value) { + set_has_denotation(); + denotation_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.TypeProto.denotation) +} +#if LANG_CXX11 +inline void TypeProto::set_denotation(::std::string&& value) { + set_has_denotation(); + denotation_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.TypeProto.denotation) +} +#endif +inline void TypeProto::set_denotation(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_denotation(); + denotation_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.TypeProto.denotation) +} +inline void TypeProto::set_denotation(const char* value, size_t size) { + set_has_denotation(); + denotation_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.TypeProto.denotation) +} +inline ::std::string* TypeProto::mutable_denotation() { + set_has_denotation(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TypeProto.denotation) + return denotation_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* TypeProto::release_denotation() { + // @@protoc_insertion_point(field_release:opencv_onnx.TypeProto.denotation) + clear_has_denotation(); + return denotation_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TypeProto::set_allocated_denotation(::std::string* denotation) { + if (denotation != NULL) { + set_has_denotation(); + } else { + clear_has_denotation(); + } + denotation_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), denotation); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.denotation) +} + +inline bool TypeProto::has_value() const { + return value_case() != VALUE_NOT_SET; +} +inline void TypeProto::clear_has_value() { + _oneof_case_[0] = VALUE_NOT_SET; +} +inline TypeProto::ValueCase TypeProto::value_case() const { + return TypeProto::ValueCase(_oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// OperatorSetIdProto + +// optional string domain = 1; +inline bool OperatorSetIdProto::has_domain() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void OperatorSetIdProto::set_has_domain() { + _has_bits_[0] |= 0x00000001u; +} +inline void OperatorSetIdProto::clear_has_domain() { + _has_bits_[0] &= ~0x00000001u; +} +inline void OperatorSetIdProto::clear_domain() { + domain_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_domain(); +} +inline const ::std::string& OperatorSetIdProto::domain() const { + // @@protoc_insertion_point(field_get:opencv_onnx.OperatorSetIdProto.domain) + return domain_.GetNoArena(); +} +inline void OperatorSetIdProto::set_domain(const ::std::string& value) { + set_has_domain(); + domain_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:opencv_onnx.OperatorSetIdProto.domain) +} +#if LANG_CXX11 +inline void OperatorSetIdProto::set_domain(::std::string&& value) { + set_has_domain(); + domain_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + // @@protoc_insertion_point(field_set_rvalue:opencv_onnx.OperatorSetIdProto.domain) +} +#endif +inline void OperatorSetIdProto::set_domain(const char* value) { + GOOGLE_DCHECK(value != NULL); + set_has_domain(); + domain_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:opencv_onnx.OperatorSetIdProto.domain) +} +inline void OperatorSetIdProto::set_domain(const char* value, size_t size) { + set_has_domain(); + domain_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.OperatorSetIdProto.domain) +} +inline ::std::string* OperatorSetIdProto::mutable_domain() { + set_has_domain(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.OperatorSetIdProto.domain) + return domain_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* OperatorSetIdProto::release_domain() { + // @@protoc_insertion_point(field_release:opencv_onnx.OperatorSetIdProto.domain) + clear_has_domain(); + return domain_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void OperatorSetIdProto::set_allocated_domain(::std::string* domain) { + if (domain != NULL) { + set_has_domain(); + } else { + clear_has_domain(); + } + domain_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), domain); + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.OperatorSetIdProto.domain) +} + +// optional int64 version = 2; +inline bool OperatorSetIdProto::has_version() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void OperatorSetIdProto::set_has_version() { + _has_bits_[0] |= 0x00000002u; +} +inline void OperatorSetIdProto::clear_has_version() { + _has_bits_[0] &= ~0x00000002u; +} +inline void OperatorSetIdProto::clear_version() { + version_ = GOOGLE_LONGLONG(0); + clear_has_version(); +} +inline ::google::protobuf::int64 OperatorSetIdProto::version() const { + // @@protoc_insertion_point(field_get:opencv_onnx.OperatorSetIdProto.version) + return version_; +} +inline void OperatorSetIdProto::set_version(::google::protobuf::int64 value) { + set_has_version(); + version_ = value; + // @@protoc_insertion_point(field_set:opencv_onnx.OperatorSetIdProto.version) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace opencv_onnx + +namespace google { +namespace protobuf { + +template <> struct is_proto_enum< ::opencv_onnx::AttributeProto_AttributeType> : ::google::protobuf::internal::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::opencv_onnx::AttributeProto_AttributeType>() { + return ::opencv_onnx::AttributeProto_AttributeType_descriptor(); +} +template <> struct is_proto_enum< ::opencv_onnx::TensorProto_DataType> : ::google::protobuf::internal::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::opencv_onnx::TensorProto_DataType>() { + return ::opencv_onnx::TensorProto_DataType_descriptor(); +} +template <> struct is_proto_enum< ::opencv_onnx::Version> : ::google::protobuf::internal::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::opencv_onnx::Version>() { + return ::opencv_onnx::Version_descriptor(); +} + +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_opencv_2donnx_2eproto__INCLUDED diff --git a/modules/dnn/src/dnn.cpp b/modules/dnn/src/dnn.cpp index 46e4017912..e48659e31c 100644 --- a/modules/dnn/src/dnn.cpp +++ b/modules/dnn/src/dnn.cpp @@ -3462,6 +3462,10 @@ Net readNet(const String& _model, const String& _config, const String& _framewor std::swap(model, config); return readNetFromModelOptimizer(config, model); } + if (framework == "onnx" || modelExt == "onnx") + { + return readNetFromONNX(model); + } CV_Error(Error::StsError, "Cannot determine an origin framework of files: " + model + (config.empty() ? "" : ", " + config)); } diff --git a/modules/dnn/src/onnx/onnx_importer.cpp b/modules/dnn/src/onnx/onnx_importer.cpp new file mode 100644 index 0000000000..bd10e1dedf --- /dev/null +++ b/modules/dnn/src/onnx/onnx_importer.cpp @@ -0,0 +1,585 @@ +// 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) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + +#include "../precomp.hpp" + +#ifdef HAVE_PROTOBUF + +#include +#include +#include +#include +#include + + +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wsuggest-override" +#endif +#include "opencv-onnx.pb.h" +#if defined(__GNUC__) && __GNUC__ >= 5 +#pragma GCC diagnostic pop +#endif + +namespace cv { +namespace dnn { +CV__DNN_EXPERIMENTAL_NS_BEGIN + + +class ONNXImporter +{ + opencv_onnx::ModelProto model_proto; + struct LayerInfo { + int layerId; + int outputId; + LayerInfo(int _layerId, int _outputId) : layerId(_layerId), outputId(_outputId) {} + }; + + std::map getGraphTensors( + const opencv_onnx::GraphProto& graph_proto); + Mat getBlob(const opencv_onnx::NodeProto& node_proto, const std::map& constBlobs, int index); + + LayerParams getLayerParams(const opencv_onnx::NodeProto& node_proto); + bool isCeilMode(const LayerParams& layerParams); + +public: + + ONNXImporter(const char *onnxFile) + { + std::fstream input(onnxFile, std::ios::in | std::ios::binary); + + if (!model_proto.ParseFromIstream(&input)) + CV_Error(Error::StsUnsupportedFormat, "Failed to parse onnx model"); + } + + void populateNet(Net dstNet); +}; + +inline void replaceLayerParam(LayerParams& layerParams, const String& oldKey, const String& newKey) +{ + if (layerParams.has(oldKey)) { + layerParams.set(newKey, layerParams.get(oldKey)); + layerParams.erase(oldKey); + } +} + +void releaseONNXTensor(opencv_onnx::TensorProto& tensor_proto) +{ + if (!tensor_proto.raw_data().empty()) { + delete tensor_proto.release_raw_data(); + } +} + +template +void convertInt64ToInt32(const T1& src, T2& dst, int size) +{ + for (int i = 0; i < size; i++) { + if (src[i] < std::numeric_limits::min() || src[i] > std::numeric_limits::max()) { + CV_Error(Error::StsOutOfRange, "Input is out of OpenCV 32S range"); + } + dst[i] = saturate_cast(src[i]); + } +} + +Mat getMatFromTensor(opencv_onnx::TensorProto& tensor_proto) +{ + CV_Assert(!tensor_proto.raw_data().empty() || !tensor_proto.float_data().empty() + || !tensor_proto.double_data().empty() || !tensor_proto.int64_data().empty()); + + opencv_onnx::TensorProto_DataType datatype = tensor_proto.data_type(); + Mat blob; + std::vector sizes; + for (int i = 0; i < tensor_proto.dims_size(); i++) { + sizes.push_back(tensor_proto.dims(i)); + } + if (datatype == opencv_onnx::TensorProto_DataType_FLOAT) { + + if (!tensor_proto.float_data().empty()) { + const ::google::protobuf::RepeatedField field = tensor_proto.float_data(); + Mat(sizes, CV_32FC1, (void*)field.data()).copyTo(blob); + } + else { + char* val = const_cast(tensor_proto.raw_data().c_str()); + Mat(sizes, CV_32FC1, val).copyTo(blob); + } + } + else if (datatype == opencv_onnx::TensorProto_DataType_DOUBLE) + { + const ::google::protobuf::RepeatedField field = tensor_proto.double_data(); + CV_Assert(!field.empty()); + Mat(sizes, CV_64FC1, (void*)field.data()).convertTo(blob, CV_32FC1); + } + else if (datatype == opencv_onnx::TensorProto_DataType_INT64) + { + blob.create(sizes, CV_32SC1); + int32_t* dst = reinterpret_cast(blob.data); + + if (!tensor_proto.int64_data().empty()) { + ::google::protobuf::RepeatedField< ::google::protobuf::int64> src = tensor_proto.int64_data(); + convertInt64ToInt32(src, dst, blob.total()); + } + else + { + char* val = const_cast(tensor_proto.raw_data().c_str()); + int64_t* src = reinterpret_cast(val); + convertInt64ToInt32(src, dst, blob.total()); + } + } + else + CV_Error(Error::StsUnsupportedFormat, "Unsupported data type: " + + opencv_onnx::TensorProto_DataType_Name(datatype)); + return blob; +} + +std::map ONNXImporter::getGraphTensors( + const opencv_onnx::GraphProto& graph_proto) +{ + opencv_onnx::TensorProto tensor_proto; + std::map layers_weights; + + for (int i = 0; i < graph_proto.initializer_size(); i++) + { + tensor_proto = graph_proto.initializer(i); + Mat mat = getMatFromTensor(tensor_proto); + releaseONNXTensor(tensor_proto); + layers_weights.insert(std::make_pair(tensor_proto.name(), mat)); + } + return layers_weights; +} + +LayerParams ONNXImporter::getLayerParams(const opencv_onnx::NodeProto& node_proto) +{ + LayerParams lp; + for(int i = 0; i < node_proto.attribute_size(); i++) + { + opencv_onnx::AttributeProto attribute_proto = node_proto.attribute(i); + std::string attribute_name = attribute_proto.name(); + + if(attribute_name == "kernel_shape") + { + CV_Assert(attribute_proto.ints_size() == 2); + lp.set("kernel_h", saturate_cast(attribute_proto.ints(0))); + lp.set("kernel_w", saturate_cast(attribute_proto.ints(1))); + } + else if(attribute_name == "strides") + { + CV_Assert(attribute_proto.ints_size() == 2); + lp.set("stride_h", saturate_cast(attribute_proto.ints(0))); + lp.set("stride_w", saturate_cast(attribute_proto.ints(1))); + } + else if(attribute_name == "pads") + { + CV_Assert(attribute_proto.ints_size() == 4); + lp.set("pad_h", saturate_cast(attribute_proto.ints(0))); + lp.set("pad_w", saturate_cast(attribute_proto.ints(1))); + // push pad_b and pad_r for compute ceil_mode + lp.set("pad_b", saturate_cast(attribute_proto.ints(2))); + lp.set("pad_r", saturate_cast(attribute_proto.ints(3))); + } + else if(attribute_name == "auto_pad") + { + if (attribute_proto.s() == "SAME_UPPER" || attribute_proto.s() == "SAME_LOWER") { + lp.set("pad_mode", "SAME"); + } + else if (attribute_proto.s() == "VALID") { + lp.set("pad_mode", "VALID"); + } + } + else if(attribute_name == "dilations") + { + CV_Assert(attribute_proto.ints_size() == 2); + lp.set("dilation_h", saturate_cast(attribute_proto.ints(0))); + lp.set("dilation_w", saturate_cast(attribute_proto.ints(1))); + } + else if (attribute_proto.has_i()) + { + ::google::protobuf::int64 src = attribute_proto.i(); + if (src < std::numeric_limits::min() || src > std::numeric_limits::max()) + CV_Error(Error::StsOutOfRange, "Input is out of OpenCV 32S range"); + else + lp.set(attribute_name, saturate_cast(src)); + } + else if (attribute_proto.has_f()) + { + lp.set(attribute_name, attribute_proto.f()); + } + else if (attribute_proto.has_s()) + { + lp.set(attribute_name, attribute_proto.s()); + } + else if (attribute_proto.floats_size() > 0) + { + lp.set(attribute_name, DictValue::arrayReal( + (float*)attribute_proto.mutable_floats(), attribute_proto.floats_size())); + } + else if (attribute_proto.ints_size() > 0) + { + const ::google::protobuf::RepeatedField< ::google::protobuf::int64> src = attribute_proto.ints(); + std::vector dst(attribute_proto.ints_size()); + convertInt64ToInt32(src, dst, attribute_proto.ints_size()); + lp.set(attribute_proto.name(), DictValue::arrayInt(&dst[0], attribute_proto.ints_size())); + } + else if (attribute_proto.has_t()) + { + opencv_onnx::TensorProto tensor = attribute_proto.t(); + Mat blob = getMatFromTensor(tensor); + lp.blobs.push_back(blob); + } + else if (attribute_proto.has_g() || attribute_proto.strings_size() > 0 || + attribute_proto.tensors_size() > 0 || attribute_proto.graphs_size() > 0) + { + CV_Error(Error::StsNotImplemented, "Unexpected attribute type"); + } + else + CV_Error(Error::StsNotImplemented, "Unsupported attribute type"); + } + return lp; +} + +Mat ONNXImporter::getBlob(const opencv_onnx::NodeProto& node_proto, + const std::map& constBlobs, int index) +{ + CV_Assert(index < node_proto.input_size()); + std::map::const_iterator constBlob; + constBlob = constBlobs.find(node_proto.input(index)); + if (constBlob == constBlobs.end()) { + CV_Error(Error::StsObjectNotFound, + "Blob " + node_proto.input(index) + " not found in const blobs"); + } + return constBlob->second; +} + + +bool ONNXImporter::isCeilMode(const LayerParams& layerParams) { + if (!layerParams.has("pad_mode")) { + if (layerParams.has("pad_h")) { + return layerParams.get("pad_h") != layerParams.get("pad_b") || + layerParams.get("pad_w") != layerParams.get("pad_r"); + } + else + return false; // all pads == 0 + } + return true; +} + +void ONNXImporter::populateNet(Net dstNet) +{ + CV_Assert(model_proto.has_graph()); + opencv_onnx::GraphProto graph_proto = model_proto.graph(); + std::map constBlobs = getGraphTensors(graph_proto); + + std::string framework_name; + if (model_proto.has_producer_name()) { + framework_name = model_proto.producer_name(); + } + + // create map with network inputs (without const blobs) + std::map layer_id; + std::map::iterator layerId; + // fill map: push layer name, layer id and output id + std::vector netInputs; + for (int j = 0; j < graph_proto.input_size(); j++) + { + const std::string& name = graph_proto.input(j).name(); + if (constBlobs.find(name) == constBlobs.end()) { + netInputs.push_back(name); + layer_id.insert(std::make_pair(name, LayerInfo(0, netInputs.size() - 1))); + } + } + dstNet.setInputsNames(netInputs); + + int layersSize = graph_proto.node_size(); + LayerParams layerParams; + opencv_onnx::NodeProto node_proto; + + for(int i = 0; i < layersSize; i++) + { + node_proto = graph_proto.node(i); + layerParams = getLayerParams(node_proto); + CV_Assert(node_proto.output_size() >= 1); + layerParams.name = node_proto.output(0); + + std::string layer_type = node_proto.op_type(); + layerParams.type = layer_type; + + if (layer_type == "MaxPool") + { + layerParams.type = "Pooling"; + layerParams.set("pool", "MAX"); + layerParams.set("ceil_mode", isCeilMode(layerParams)); + } + else if (layer_type == "AveragePool") + { + layerParams.type = "Pooling"; + layerParams.set("pool", "AVE"); + layerParams.set("ceil_mode", isCeilMode(layerParams)); + layerParams.set("ave_pool_padded_area", framework_name == "pytorch"); + } + else if (layer_type == "GlobalAveragePool") + { + layerParams.type = "Pooling"; + layerParams.set("pool", "AVE"); + layerParams.set("global_pooling", true); + } + else if (layer_type == "Add" || layer_type == "Sum") + { + if (layer_id.find(node_proto.input(1)) == layer_id.end()) + { + Mat blob = getBlob(node_proto, constBlobs, 1); + blob = blob.reshape(1, 1); + if (blob.total() == 1) { + layerParams.type = "Power"; + layerParams.set("shift", blob.at(0)); + } + else { + layerParams.type = "Shift"; + layerParams.blobs.push_back(blob); + } + } + else { + layerParams.type = "Eltwise"; + } + } + else if (layer_type == "Sub") + { + Mat blob = (-1.0f) * getBlob(node_proto, constBlobs, 1); + blob = blob.reshape(1, 1); + if (blob.total() == 1) { + layerParams.type = "Power"; + layerParams.set("shift", blob.at(0)); + } + else { + layerParams.type = "Shift"; + layerParams.blobs.push_back(blob); + } + } + else if (layer_type == "Constant") + { + CV_Assert(node_proto.input_size() == 0); + CV_Assert(layerParams.blobs.size() == 1); + constBlobs.insert(std::make_pair(layerParams.name, layerParams.blobs[0])); + continue; + } + else if (layer_type == "ImageScaler") + { + const float scale = layerParams.has("scale") ? layerParams.get("scale") : 1.0f; + layerParams.erase("scale"); + + if (layerParams.has("bias")) + { + layerParams.type = "Scale"; + layerParams.blobs.push_back( + Mat(Size(1, layerParams.get("bias").size()), CV_32FC1, scale)); + + layerParams.set("bias_term", true); + Mat bias(1, layerParams.get("bias").size(), CV_32FC1); + for (int j = 0; j < bias.total(); j++) { + bias.at(0, j) = layerParams.get("bias").getRealValue(j); + } + layerParams.blobs.push_back(bias); + layerParams.erase("bias"); + } + else { + layerParams.set("scale", scale); + layerParams.type = "Power"; + } + } + else if (layer_type == "LeakyRelu") + { + layerParams.type = "ReLU"; + replaceLayerParam(layerParams, "alpha", "negative_slope"); + } + else if (layer_type == "LRN") + { + replaceLayerParam(layerParams, "size", "local_size"); + } + else if (layer_type == "BatchNormalization") + { + if (node_proto.input_size() != 5) + CV_Error(Error::StsNotImplemented, + "Expected input, scale, bias, mean and var"); + + layerParams.type = "BatchNorm"; + replaceLayerParam(layerParams, "epsilon", "eps"); + replaceLayerParam(layerParams, "spatial", "use_global_stats"); + + Mat meanData = getBlob(node_proto, constBlobs, 3); + Mat stdData = getBlob(node_proto, constBlobs, 4); + + layerParams.blobs.push_back(meanData); + layerParams.blobs.push_back(stdData); + + if (!node_proto.input(1).empty()) { + layerParams.set("has_weight", true); + layerParams.blobs.push_back(getBlob(node_proto, constBlobs, 1)); // weightData + } else { + layerParams.set("has_weight", false); + } + + if (!node_proto.input(2).empty()) { + layerParams.set("has_bias", true); + layerParams.blobs.push_back(getBlob(node_proto, constBlobs, 2)); // biasData + } else { + layerParams.set("has_bias", false); + } + } + else if (layer_type == "Gemm") + { + CV_Assert(node_proto.input_size() >= 2); + layerParams.type = "InnerProduct"; + Mat weights = getBlob(node_proto, constBlobs, 1); + int ind_num_out = 0; + if (layerParams.has("transB") && !layerParams.get("transB")) { + transpose(weights, weights); + ind_num_out = 1; + } + layerParams.blobs.push_back(weights); + + if (node_proto.input_size() == 3) { + Mat bias = getBlob(node_proto, constBlobs, 2); + layerParams.blobs.push_back(bias); + } + + layerParams.set("num_output", layerParams.blobs[0].size[ind_num_out]); + layerParams.set("bias_term", node_proto.input_size() == 3); + } + else if (layer_type == "MatMul") + { + CV_Assert(node_proto.input_size() == 2); + layerParams.type = "InnerProduct"; + Mat blob = getBlob(node_proto, constBlobs, 1); + layerParams.blobs.push_back(blob.t()); + layerParams.set("bias_term", false); + layerParams.set("num_output", layerParams.blobs[0].size[0]); + } + else if (layer_type == "Mul") + { + CV_Assert(node_proto.input_size() == 2); + if (layer_id.find(node_proto.input(1)) == layer_id.end()) { + Mat blob = getBlob(node_proto, constBlobs, 1); + blob = blob.reshape(1, 1); + if (blob.total() == 1) { + layerParams.set("scale", blob.at(0)); + layerParams.type = "Power"; + } + else { + layerParams.blobs.push_back(blob); + layerParams.type = "Scale"; + } + } + else { + layerParams.type = "Eltwise"; + layerParams.set("operation", "prod"); + } + } + else if (layer_type == "Conv") + { + CV_Assert(node_proto.input_size() >= 2); + layerParams.type = "Convolution"; + for (int j = 1; j < node_proto.input_size(); j++) { + layerParams.blobs.push_back(getBlob(node_proto, constBlobs, j)); + } + layerParams.set("num_output", layerParams.blobs[0].size[0]); + layerParams.set("bias_term", node_proto.input_size() == 3); + } + else if (layer_type == "Unsqueeze") + { + CV_Assert(node_proto.input_size() == 1); + Mat input = getBlob(node_proto, constBlobs, 0); + + DictValue axes = layerParams.get("axes"); + std::vector dims; + for (int j = 0; j < input.dims; j++) { + dims.push_back(input.size[j]); + } + CV_Assert(axes.getIntValue(axes.size()-1) <= dims.size()); + for (int j = 0; j < axes.size(); j++) { + dims.insert(dims.begin() + axes.getIntValue(j), 1); + } + + Mat out = input.reshape(0, dims); + constBlobs.insert(std::make_pair(layerParams.name, out)); + continue; + } + else if (layer_type == "Reshape") + { + CV_Assert(node_proto.input_size() == 2 || layerParams.has("shape")); + + if (node_proto.input_size() == 2) { + Mat blob = getBlob(node_proto, constBlobs, 1); + CV_Assert(blob.type() == CV_32SC1); + + if (layer_id.find(node_proto.input(0)) == layer_id.end()) { + Mat input = getBlob(node_proto, constBlobs, 0); + Mat out = input.reshape(0, static_cast >(blob)); + constBlobs.insert(std::make_pair(layerParams.name, out)); + continue; + } + layerParams.set("dim", DictValue::arrayInt( + blob.ptr(), blob.total() )); + } + else { + DictValue shape = layerParams.get("shape"); + std::vector dim; + for (int j = 0; j < shape.size(); j++) { + dim.push_back(shape.getIntValue(j)); + } + + if (layer_id.find(node_proto.input(0)) == layer_id.end()) { + Mat input = getBlob(node_proto, constBlobs, 0); + Mat out = input.reshape(0, dim); + constBlobs.insert(std::make_pair(layerParams.name, out)); + continue; + } + replaceLayerParam(layerParams, "shape", "dim"); + } + } + else + { + for (int j = 0; j < node_proto.input_size(); j++) { + if (layer_id.find(node_proto.input(j)) == layer_id.end()) + layerParams.blobs.push_back(getBlob(node_proto, constBlobs, j)); + } + } + + int id = dstNet.addLayer(layerParams.name, layerParams.type, layerParams); + layer_id.insert(std::make_pair(layerParams.name, LayerInfo(id, 0))); + + for (int j = 0; j < node_proto.input_size(); j++) { + layerId = layer_id.find(node_proto.input(j)); + + if (layerId != layer_id.end()) { + dstNet.connect(layerId->second.layerId, layerId->second.outputId, id, j); + } + } + } + } + +Net readNetFromONNX(const String& onnxFile) +{ + ONNXImporter onnxImporter(onnxFile.c_str()); + Net net; + onnxImporter.populateNet(net); + return net; +} + +Mat readTensorFromONNX(const String& path) +{ + opencv_onnx::TensorProto tensor_proto = opencv_onnx::TensorProto(); + std::fstream input(path.c_str(), std::ios::in | std::ios::binary); + if (!tensor_proto.ParseFromIstream(&input)) { + CV_Error(Error::StsUnsupportedFormat, "Failed to parse data"); + } + Mat mat = getMatFromTensor(tensor_proto); + releaseONNXTensor(tensor_proto); + return mat; +} + +CV__DNN_EXPERIMENTAL_NS_END +}} // namespace + +#endif diff --git a/modules/dnn/src/onnx/opencv-onnx.proto b/modules/dnn/src/onnx/opencv-onnx.proto new file mode 100644 index 0000000000..6433d5d6cb --- /dev/null +++ b/modules/dnn/src/onnx/opencv-onnx.proto @@ -0,0 +1,446 @@ +// +// WARNING: This file is automatically generated! Please edit onnx.in.proto. +// + + +// Copyright (c) Facebook Inc. and Microsoft Corporation. +// Licensed under the MIT license. + +syntax = "proto2"; + +package opencv_onnx; + +// Overview +// +// ONNX is an open specification that is comprised of the following components: +// +// 1) A definition of an extensible computation graph model. +// 2) Definitions of standard data types. +// 3) Definitions of built-in operators. +// +// This document describes the syntax of models and their computation graphs, +// as well as the standard data types. Together, they are referred to as the ONNX +// Intermediate Representation, or 'IR' for short. +// +// The normative semantic specification of the ONNX IR is found in docs/IR.md. +// Definitions of the built-in neural network operators may be found in docs/Operators.md. + +// Notes +// +// Release +// +// We are still in the very early stage of defining ONNX. The current +// version of ONNX is a starting point. While we are actively working +// towards a complete spec, we would like to get the community involved +// by sharing our working version of ONNX. +// +// Protobuf compatibility +// +// To simplify framework compatibility, ONNX is defined using the subset of protobuf +// that is compatible with both protobuf v2 and v3. This means that we do not use any +// protobuf features that are only available in one of the two versions. +// +// Here are the most notable contortions we have to carry out to work around +// these limitations: +// +// - No 'map' (added protobuf 3.0). We instead represent mappings as lists +// of key-value pairs, where order does not matter and duplicates +// are not allowed. + + +// Versioning +// +// ONNX versioning is specified in docs/IR.md and elaborated on in docs/Versioning.md +// +// To be compatible with both proto2 and proto3, we will use a version number +// that is not defined by the default value but an explicit enum number. +enum Version { + // proto3 requires the first enum value to be zero. + // We add this just to appease the compiler. + _START_VERSION = 0; + // The version field is always serialized and we will use it to store the + // version that the graph is generated from. This helps us set up version + // control. + // For the IR, we are using simple numbers starting with with 0x00000001, + // which was the version we published on Oct 10, 2017. + IR_VERSION_2017_10_10 = 0x0000000000000001; + + // IR_VERSION 2 published on Oct 30, 2017 + // - Added type discriminator to AttributeProto to support proto3 users + IR_VERSION_2017_10_30 = 0x0000000000000002; + + // IR VERSION 3 published on Nov 3, 2017 + // - For operator versioning: + // - Added new message OperatorSetIdProto + // - Added opset_import in ModelProto + // - For vendor extensions, added domain in NodeProto + IR_VERSION = 0x0000000000000003; +} + +// Attributes +// +// A named attribute containing either singular float, integer, string, graph, +// and tensor values, or repeated float, integer, string, graph, and tensor values. +// An AttributeProto MUST contain the name field, and *only one* of the +// following content fields, effectively enforcing a C/C++ union equivalent. +message AttributeProto { + + // Note: this enum is structurally identical to the OpSchema::AttrType + // enum defined in schema.h. If you rev one, you likely need to rev the other. + enum AttributeType { + UNDEFINED = 0; + FLOAT = 1; + INT = 2; + STRING = 3; + TENSOR = 4; + GRAPH = 5; + + FLOATS = 6; + INTS = 7; + STRINGS = 8; + TENSORS = 9; + GRAPHS = 10; + } + + // The name field MUST be present for this version of the IR. + optional string name = 1; // namespace Attribute + + // if ref_attr_name is not empty, ref_attr_name is the attribute name in parent function. + // In this case, this AttributeProto does not contain data, and it's a reference of attribute + // in parent scope. + // NOTE: This should ONLY be used in function (sub-graph). It's invalid to be used in main graph. + optional string ref_attr_name = 21; + + // A human-readable documentation for this attribute. Markdown is allowed. + optional string doc_string = 13; + + // The type field MUST be present for this version of the IR. + // For 0.0.1 versions of the IR, this field was not defined, and + // implementations needed to use has_field hueristics to determine + // which value field was in use. For IR_VERSION 0.0.2 or later, this + // field MUST be set and match the f|i|s|t|... field in use. This + // change was made to accomodate proto3 implementations. + optional AttributeType type = 20; // discriminator that indicates which field below is in use + + // Exactly ONE of the following fields must be present for this version of the IR + optional float f = 2; // float + optional int64 i = 3; // int + optional bytes s = 4; // UTF-8 string + optional TensorProto t = 5; // tensor value + optional GraphProto g = 6; // graph + // Do not use field below, it's deprecated. + // optional ValueProto v = 12; // value - subsumes everything but graph + + repeated float floats = 7; // list of floats + repeated int64 ints = 8; // list of ints + repeated bytes strings = 9; // list of UTF-8 strings + repeated TensorProto tensors = 10; // list of tensors + repeated GraphProto graphs = 11; // list of graph +} + +// Defines information on value, including the name, the type, and +// the shape of the value. +message ValueInfoProto { + // This field MUST be present in this version of the IR. + optional string name = 1; // namespace Value + // This field MUST be present in this version of the IR. + optional TypeProto type = 2; + // A human-readable documentation for this value. Markdown is allowed. + optional string doc_string = 3; +} + +// Nodes +// +// Computation graphs are made up of a DAG of nodes, which represent what is +// commonly called a "layer" or "pipeline stage" in machine learning frameworks. +// +// For example, it can be a node of type "Conv" that takes in an image, a filter +// tensor and a bias tensor, and produces the convolved output. +message NodeProto { + repeated string input = 1; // namespace Value + repeated string output = 2; // namespace Value + + // An optional identifier for this node in a graph. + // This field MAY be absent in ths version of the IR. + optional string name = 3; // namespace Node + + // The symbolic identifier of the Operator to execute. + optional string op_type = 4; // namespace Operator + // The domain of the OperatorSet that specifies the operator named by op_type. + optional string domain = 7; // namespace Domain + + // Additional named attributes. + repeated AttributeProto attribute = 5; + + // A human-readable documentation for this node. Markdown is allowed. + optional string doc_string = 6; +} + +// Models +// +// ModelProto is a top-level file/container format for bundling a ML model and +// associating its computation graph with metadata. +// +// The semantics of the model are described by the associated GraphProto. +message ModelProto { + // The version of the IR this model targets. See Version enum above. + // This field MUST be present. + optional int64 ir_version = 1; + + // The OperatorSets this model relies on. + // All ModelProtos MUST have at least one entry that + // specifies which version of the ONNX OperatorSet is + // being imported. + // + // All nodes in the ModelProto's graph will bind against the operator + // with the same-domain/same-op_type operator with the HIGHEST version + // in the referenced operator sets. + repeated OperatorSetIdProto opset_import = 8; + + // The name of the framework or tool used to generate this model. + // This field SHOULD be present to indicate which implementation/tool/framework + // emitted the model. + optional string producer_name = 2; + + // The version of the framework or tool used to generate this model. + // This field SHOULD be present to indicate which implementation/tool/framework + // emitted the model. + optional string producer_version = 3; + + // Domain name of the model. + // We use reverse domain names as name space indicators. For example: + // `com.facebook.fair` or `com.microsoft.cognitiveservices` + // + // Together with `model_version` and GraphProto.name, this forms the unique identity of + // the graph. + optional string domain = 4; + + // The version of the graph encoded. See Version enum below. + optional int64 model_version = 5; + + // A human-readable documentation for this model. Markdown is allowed. + optional string doc_string = 6; + + // The parameterized graph that is evaluated to execute the model. + optional GraphProto graph = 7; + + // Named metadata values; keys should be distinct. + repeated StringStringEntryProto metadata_props = 14; +}; + +// StringStringEntryProto follows the pattern for cross-proto-version maps. +// See https://developers.google.com/protocol-buffers/docs/proto3#maps +message StringStringEntryProto { + optional string key = 1; + optional string value= 2; +}; + +// Graphs +// +// A graph defines the computational logic of a model and is comprised of a parameterized +// list of nodes that form a directed acyclic graph based on their inputs and outputs. +// This is the equivalent of the "network" or "graph" in many deep learning +// frameworks. +message GraphProto { + // The nodes in the graph, sorted topologically. + repeated NodeProto node = 1; + + // The name of the graph. + optional string name = 2; // namespace Graph + + // A list of named tensor values, used to specify constant inputs of the graph. + // Each TensorProto entry must have a distinct name (within the list) that + // also appears in the input list. + repeated TensorProto initializer = 5; + + // A human-readable documentation for this graph. Markdown is allowed. + optional string doc_string = 10; + + // The inputs and outputs of the graph. + repeated ValueInfoProto input = 11; + repeated ValueInfoProto output = 12; + + // Information for the values in the graph. The ValueInfoProto.name's + // must be distinct. It is optional for a value to appear in value_info list. + repeated ValueInfoProto value_info = 13; + + // DO NOT USE the following fields, they were deprecated from earlier versions. + // repeated string input = 3; + // repeated string output = 4; + // optional int64 ir_version = 6; + // optional int64 producer_version = 7; + // optional string producer_tag = 8; + // optional string domain = 9; +} + +// Tensors +// +// A serialized tensor value. +message TensorProto { + enum DataType { + UNDEFINED = 0; + // Basic types. + FLOAT = 1; // float + UINT8 = 2; // uint8_t + INT8 = 3; // int8_t + UINT16 = 4; // uint16_t + INT16 = 5; // int16_t + INT32 = 6; // int32_t + INT64 = 7; // int64_t + STRING = 8; // string + BOOL = 9; // bool + + // Advanced types + FLOAT16 = 10; + DOUBLE = 11; + UINT32 = 12; + UINT64 = 13; + COMPLEX64 = 14; // complex with float32 real and imaginary components + COMPLEX128 = 15; // complex with float64 real and imaginary components + // Future extensions go here. + } + + // The shape of the tensor. + repeated int64 dims = 1; + + // The data type of the tensor. + optional DataType data_type = 2; + + // For very large tensors, we may want to store them in chunks, in which + // case the following fields will specify the segment that is stored in + // the current TensorProto. + message Segment { + optional int64 begin = 1; + optional int64 end = 2; + } + optional Segment segment = 3; + + // Tensor content must be organized in row-major order. + // + // Depending on the data_type field, exactly one of the fields below with + // name ending in _data is used to store the elements of the tensor. + + // For float and complex64 values + // Complex64 tensors are encoded as a single array of floats, + // with the real components appearing in odd numbered positions, + // and the corresponding imaginary component apparing in the + // subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] + // is encoded as [1.0, 2.0 ,3.0 ,4.0] + // When this field is present, the data_type field MUST be FLOAT or COMPLEX64. + repeated float float_data = 4 [packed = true]; + + // For int32, uint8, int8, uint16, int16, bool, and float16 values + // float16 values must be bit-wise converted to an uint16_t prior + // to writing to the buffer. + // When this field is present, the data_type field MUST be + // INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT16 + repeated int32 int32_data = 5 [packed = true]; + + // For strings. + // Each element of string_data is a UTF-8 encoded Unicode + // string. No trailing null, no leading BOM. The protobuf "string" + // scalar type is not used to match ML community conventions. + // When this field is present, the data_type field MUST be STRING + repeated bytes string_data = 6; + + // For int64. + // When this field is present, the data_type field MUST be INT64 + repeated int64 int64_data = 7 [packed = true]; + + // Optionally, a name for the tensor. + optional string name = 8; // namespace Value + + // A human-readable documentation for this tensor. Markdown is allowed. + optional string doc_string = 12; + + // Serializations can either use one of the fields above, or use this + // raw bytes field. The only exception is the string case, where one is + // required to store the content in the repeated bytes string_data field. + // + // When this raw_data field is used to store tensor value, elements MUST + // be stored in as fixed-width, little-endian order. + // Floating-point data types MUST be stored in IEEE 754 format. + // Complex64 elements must be written as two consecutive FLOAT values, real component first. + // Complex128 elements must be written as two consecutive DOUBLE values, real component first. + // Boolean type MUST be written one byte per tensor element (00000001 for true, 00000000 for false). + // + // Note: the advantage of specific field rather than the raw_data field is + // that in some cases (e.g. int data), protobuf does a better packing via + // variable length storage, and may lead to smaller binary footprint. + // When this field is present, the data_type field MUST NOT be STRING or UNDEFINED + optional bytes raw_data = 9; + + // For double + // Complex64 tensors are encoded as a single array of doubles, + // with the real components appearing in odd numbered positions, + // and the corresponding imaginary component apparing in the + // subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] + // is encoded as [1.0, 2.0 ,3.0 ,4.0] + // When this field is present, the data_type field MUST be DOUBLE or COMPLEX128 + repeated double double_data = 10 [packed = true]; + + // For uint64 and uint32 values + // When this field is present, the data_type field MUST be + // UINT32 or UINT64 + repeated uint64 uint64_data = 11 [packed = true]; +} + +// Defines a tensor shape. A dimension can be either an integer value +// or a symbolic variable. A symbolic variable represents an unknown +// dimension. +message TensorShapeProto { + message Dimension { + oneof value { + int64 dim_value = 1; + string dim_param = 2; // namespace Shape + }; + // Standard denotation can optionally be used to denote tensor + // dimensions with standard semantic descriptions to ensure + // that operations are applied to the correct axis of a tensor. + // Refer to https://github.com/onnx/onnx/blob/master/docs/DimensionDenotation.md#denotation-definition + // for pre-defined dimension denotations. + optional string denotation = 3; + }; + repeated Dimension dim = 1; +} + +// Types +// +// The standard ONNX data types. +message TypeProto { + + message Tensor { + // This field MUST NOT have the value of UNDEFINED + // This field MUST be present for this version of the IR. + optional TensorProto.DataType elem_type = 1; + optional TensorShapeProto shape = 2; + } + + + oneof value { + // The type of a tensor. + Tensor tensor_type = 1; + + } + + // An optional denotation can be used to denote the whole + // type with a standard semantic description as to what is + // stored inside. Refer to https://github.com/onnx/onnx/blob/master/docs/TypeDenotation.md#type-denotation-definition + // for pre-defined type denotations. + optional string denotation = 6; +} + +// Operator Sets +// +// OperatorSets are uniquely identified by a (domain, opset_version) pair. +message OperatorSetIdProto { + // The domain of the operator set being identified. + // The empty string ("") or absence of this field implies the operator + // set that is defined as part of the ONNX specification. + // This field MUST be present in this version of the IR when referring to any other operator set. + optional string domain = 1; + + // The version of the operator set being identified. + // This field MUST be present in this version of the IR. + optional int64 version = 2; +} diff --git a/modules/dnn/test/test_onnx_importer.cpp b/modules/dnn/test/test_onnx_importer.cpp new file mode 100644 index 0000000000..8ac4baebe7 --- /dev/null +++ b/modules/dnn/test/test_onnx_importer.cpp @@ -0,0 +1,344 @@ +// 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) 2018, Intel Corporation, all rights reserved. +// Third party copyrights are property of their respective owners. + + +#include "test_precomp.hpp" +#include "npy_blob.hpp" +#include + +namespace opencv_test { namespace { + +template +static std::string _tf(TString filename) +{ + String rootFolder = "dnn/onnx/"; + return findDataFile(rootFolder + filename, false); +} + +class Test_ONNX_layers : public DNNTestLayer +{ +public: + enum Extension + { + npy, + pb + }; + + void testONNXModels(const String& basename, const Extension ext = npy, const double l1 = 0, const float lInf = 0) + { + String onnxmodel = _tf("models/" + basename + ".onnx"); + Mat inp, ref; + if (ext == npy) { + inp = blobFromNPY(_tf("data/input_" + basename + ".npy")); + ref = blobFromNPY(_tf("data/output_" + basename + ".npy")); + } + else if (ext == pb) { + inp = readTensorFromONNX(_tf("data/input_" + basename + ".pb")); + ref = readTensorFromONNX(_tf("data/output_" + basename + ".pb")); + } + else + CV_Error(Error::StsUnsupportedFormat, "Unsupported extension"); + + checkBackend(&inp, &ref); + Net net = readNetFromONNX(onnxmodel); + ASSERT_FALSE(net.empty()); + + net.setPreferableBackend(backend); + net.setPreferableTarget(target); + + net.setInput(inp); + Mat out = net.forward(); + normAssert(ref, out, "", l1 ? l1 : default_l1, lInf ? lInf : default_lInf); + } +}; + +TEST_P(Test_ONNX_layers, MaxPooling) +{ + testONNXModels("maxpooling"); + testONNXModels("two_maxpooling"); +} + +TEST_P(Test_ONNX_layers, Convolution) +{ + testONNXModels("convolution"); + testONNXModels("two_convolution"); +} + +TEST_P(Test_ONNX_layers, Dropout) +{ + testONNXModels("dropout"); +} + +TEST_P(Test_ONNX_layers, Linear) +{ + if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) + throw SkipTestException(""); + testONNXModels("linear"); +} + +TEST_P(Test_ONNX_layers, ReLU) +{ + testONNXModels("ReLU"); +} + +TEST_P(Test_ONNX_layers, MaxPooling_Sigmoid) +{ + testONNXModels("maxpooling_sigmoid"); +} + +TEST_P(Test_ONNX_layers, Concatenation) +{ + if (backend == DNN_BACKEND_INFERENCE_ENGINE && + (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_OPENCL || target == DNN_TARGET_MYRIAD)) + throw SkipTestException(""); + testONNXModels("concatenation"); +} + +TEST_P(Test_ONNX_layers, AveragePooling) +{ + testONNXModels("average_pooling"); +} + +TEST_P(Test_ONNX_layers, BatchNormalization) +{ + testONNXModels("batch_norm"); +} + +TEST_P(Test_ONNX_layers, Multiplication) +{ + if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16 || + backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_MYRIAD) + throw SkipTestException(""); + testONNXModels("mul"); +} + +TEST_P(Test_ONNX_layers, Constant) +{ + testONNXModels("constant"); +} + +TEST_P(Test_ONNX_layers, MultyInputs) +{ + const String model = _tf("models/multy_inputs.onnx"); + + Net net = readNetFromONNX(model); + ASSERT_FALSE(net.empty()); + + net.setPreferableBackend(backend); + net.setPreferableTarget(target); + + Mat inp1 = blobFromNPY(_tf("data/input_multy_inputs_0.npy")); + Mat inp2 = blobFromNPY(_tf("data/input_multy_inputs_1.npy")); + Mat ref = blobFromNPY(_tf("data/output_multy_inputs.npy")); + checkBackend(&inp1, &ref); + + net.setInput(inp1, "0"); + net.setInput(inp2, "1"); + Mat out = net.forward(); + + normAssert(ref, out, "", default_l1, default_lInf); +} + + +INSTANTIATE_TEST_CASE_P(/*nothing*/, Test_ONNX_layers, dnnBackendsAndTargets()); + +class Test_ONNX_nets : public Test_ONNX_layers {}; +TEST_P(Test_ONNX_nets, Alexnet) +{ + const String model = _tf("models/alexnet.onnx"); + + Net net = readNetFromONNX(model); + ASSERT_FALSE(net.empty()); + + net.setPreferableBackend(backend); + net.setPreferableTarget(target); + + Mat inp = imread(_tf("../grace_hopper_227.png")); + Mat ref = blobFromNPY(_tf("../caffe_alexnet_prob.npy")); + checkBackend(&inp, &ref); + + net.setInput(blobFromImage(inp, 1.0f, Size(227, 227), Scalar(), false)); + ASSERT_FALSE(net.empty()); + Mat out = net.forward(); + + normAssert(out, ref, "", default_l1, default_lInf); +} + +TEST_P(Test_ONNX_nets, Squeezenet) +{ + testONNXModels("squeezenet", pb); +} + +TEST_P(Test_ONNX_nets, Googlenet) +{ + if (backend == DNN_BACKEND_INFERENCE_ENGINE) + throw SkipTestException(""); + + const String model = _tf("models/googlenet.onnx"); + + Net net = readNetFromONNX(model); + ASSERT_FALSE(net.empty()); + + net.setPreferableBackend(backend); + net.setPreferableTarget(target); + + std::vector images; + images.push_back( imread(_tf("../googlenet_0.png")) ); + images.push_back( imread(_tf("../googlenet_1.png")) ); + Mat inp = blobFromImages(images, 1.0f, Size(), Scalar(), false); + Mat ref = blobFromNPY(_tf("../googlenet_prob.npy")); + checkBackend(&inp, &ref); + + net.setInput(inp); + ASSERT_FALSE(net.empty()); + Mat out = net.forward(); + + normAssert(ref, out, "", default_l1, default_lInf); +} + +TEST_P(Test_ONNX_nets, CaffeNet) +{ + testONNXModels("caffenet", pb); +} + +TEST_P(Test_ONNX_nets, RCNN_ILSVRC13) +{ + testONNXModels("rcnn_ilsvrc13", pb); +} + +TEST_P(Test_ONNX_nets, VGG16) +{ + double l1 = default_l1; + double lInf = default_lInf; + // output range: [-69; 72] + if (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) { + l1 = 0.087; + lInf = 0.585; + } + else if (backend == DNN_BACKEND_INFERENCE_ENGINE && target == DNN_TARGET_OPENCL) { + lInf = 1.2e-4; + } + testONNXModels("vgg16", pb, l1, lInf); +} + +TEST_P(Test_ONNX_nets, VGG16_bn) +{ + double l1 = default_l1; + double lInf = default_lInf; + // output range: [-16; 27] + if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) { + l1 = 0.0086; + lInf = 0.037; + } + else if (backend == DNN_BACKEND_INFERENCE_ENGINE && + (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD)) { + l1 = 0.031; + lInf = 0.2; + } + testONNXModels("vgg16-bn", pb, l1, lInf); +} + +TEST_P(Test_ONNX_nets, ZFNet) +{ + testONNXModels("zfnet512", pb); +} + +TEST_P(Test_ONNX_nets, ResNet18v1) +{ + // output range: [-16; 22] + const double l1 = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.022 : default_l1; + const double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.12 : default_lInf; + testONNXModels("resnet18v1", pb, l1, lInf); +} + +TEST_P(Test_ONNX_nets, ResNet50v1) +{ + // output range: [-67; 75] + const double l1 = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.6 : 1.25e-5; + const double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.51 : 1.2e-4; + testONNXModels("resnet50v1", pb, l1, lInf); +} + +TEST_P(Test_ONNX_nets, ResNet101_DUC_HDC) +{ + if (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_OPENCL + || target == DNN_TARGET_MYRIAD) { + throw SkipTestException(""); + } + testONNXModels("resnet101_duc_hdc", pb); +} + +TEST_P(Test_ONNX_nets, TinyYolov2) +{ + if (cvtest::skipUnstableTests || + backend == DNN_BACKEND_INFERENCE_ENGINE && (target == DNN_TARGET_OPENCL || target == DNN_TARGET_OPENCL_FP16)) { + throw SkipTestException(""); + } + // output range: [-11; 8] + const double l1 = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.017 : default_l1; + const double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.14 : default_lInf; + testONNXModels("tiny_yolo2", pb, l1, lInf); +} + +TEST_P(Test_ONNX_nets, CNN_MNIST) +{ + // output range: [-1952; 6574] + const double l1 = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 3.82 : 4.3e-4; + const double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 13.5 : 1e-3; + + testONNXModels("cnn_mnist", pb, l1, lInf); +} + +TEST_P(Test_ONNX_nets, MobileNet_v2) +{ + // output range: [-166; 317] + const double l1 = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.38 : 7e-5; + const double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 2.87 : 5e-4; + testONNXModels("mobilenetv2", pb, l1, lInf); +} + +TEST_P(Test_ONNX_nets, LResNet100E_IR) +{ + if (backend == DNN_BACKEND_INFERENCE_ENGINE && + (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_OPENCL || target == DNN_TARGET_MYRIAD)) + throw SkipTestException(""); + + double l1 = default_l1; + double lInf = default_lInf; + // output range: [-3; 3] + if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16) { + l1 = 0.009; + lInf = 0.035; + } + testONNXModels("LResNet100E_IR", pb, l1, lInf); +} + +TEST_P(Test_ONNX_nets, Emotion_ferplus) +{ + testONNXModels("emotion_ferplus", pb); +} + +TEST_P(Test_ONNX_nets, Inception_v2) +{ + if (backend == DNN_BACKEND_INFERENCE_ENGINE) + throw SkipTestException(""); + + testONNXModels("inception_v2", pb); +} + +TEST_P(Test_ONNX_nets, DenseNet121) +{ + // output range: [-87; 138] + const double l1 = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.12 : 1.88e-5; + const double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.74 : 1.23e-4; + testONNXModels("densenet121", pb, l1, lInf); +} + + +INSTANTIATE_TEST_CASE_P(/**/, Test_ONNX_nets, dnnBackendsAndTargets()); + +}} // namespace From 8f78a1123b61211a51118fc57145ecf49f43ee8f Mon Sep 17 00:00:00 2001 From: cyy Date: Tue, 11 Sep 2018 14:47:39 +0800 Subject: [PATCH 07/27] fix uninitialized read errors reported by CUDA-INITCHECK --- .../opencv2/core/cuda/detail/transform_detail.hpp | 11 ++--------- .../include/opencv2/cudev/grid/detail/transform.hpp | 10 ++-------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp b/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp index 3b72b03dd6..1919848827 100644 --- a/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp +++ b/modules/core/include/opencv2/core/cuda/detail/transform_detail.hpp @@ -223,11 +223,7 @@ namespace cv { namespace cuda { namespace device if (x_shifted + ft::smart_shift - 1 < src_.cols) { const read_type src_n_el = ((const read_type*)src)[x]; - write_type dst_n_el = ((const write_type*)dst)[x]; - - OpUnroller::unroll(src_n_el, dst_n_el, mask, op, x_shifted, y); - - ((write_type*)dst)[x] = dst_n_el; + OpUnroller::unroll(src_n_el, ((write_type*)dst)[x], mask, op, x_shifted, y); } else { @@ -275,11 +271,8 @@ namespace cv { namespace cuda { namespace device { const read_type1 src1_n_el = ((const read_type1*)src1)[x]; const read_type2 src2_n_el = ((const read_type2*)src2)[x]; - write_type dst_n_el = ((const write_type*)dst)[x]; - OpUnroller::unroll(src1_n_el, src2_n_el, dst_n_el, mask, op, x_shifted, y); - - ((write_type*)dst)[x] = dst_n_el; + OpUnroller::unroll(src1_n_el, src2_n_el, ((write_type*)dst)[x], mask, op, x_shifted, y); } else { diff --git a/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp b/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp index dd39fe94a6..557797d7c8 100644 --- a/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp +++ b/modules/cudev/include/opencv2/cudev/grid/detail/transform.hpp @@ -199,11 +199,8 @@ namespace grid_transform_detail if (x_shifted + SHIFT - 1 < cols) { const read_type src_n_el = ((const read_type*)src)[x]; - write_type dst_n_el = ((const write_type*)dst)[x]; - OpUnroller::unroll(src_n_el, dst_n_el, op, mask, x_shifted, y); - - ((write_type*)dst)[x] = dst_n_el; + OpUnroller::unroll(src_n_el, ((write_type*)dst)[x], op, mask, x_shifted, y); } else { @@ -237,11 +234,8 @@ namespace grid_transform_detail { const read_type1 src1_n_el = ((const read_type1*)src1)[x]; const read_type2 src2_n_el = ((const read_type2*)src2)[x]; - write_type dst_n_el = ((const write_type*)dst)[x]; - OpUnroller::unroll(src1_n_el, src2_n_el, dst_n_el, op, mask, x_shifted, y); - - ((write_type*)dst)[x] = dst_n_el; + OpUnroller::unroll(src1_n_el, src2_n_el, ((write_type*)dst)[x], op, mask, x_shifted, y); } else { From 1fb7ee0e16b64f57518fe0d84f9e5c457dbbbc77 Mon Sep 17 00:00:00 2001 From: Alexander Nesterov Date: Tue, 7 Aug 2018 11:37:51 -0300 Subject: [PATCH 08/27] Optimiaztion search template lines and added sample --- modules/objdetect/src/qrcode.cpp | 351 ++++++++++++++----------- modules/objdetect/test/test_qrcode.cpp | 4 +- samples/cpp/live_detect_qrcode.cpp | 170 ++++++++++++ 3 files changed, 370 insertions(+), 155 deletions(-) create mode 100644 samples/cpp/live_detect_qrcode.cpp diff --git a/modules/objdetect/src/qrcode.cpp b/modules/objdetect/src/qrcode.cpp index fdbfa66bad..5633c31037 100644 --- a/modules/objdetect/src/qrcode.cpp +++ b/modules/objdetect/src/qrcode.cpp @@ -16,19 +16,18 @@ namespace cv { using std::vector; -class QRDecode +class QRDetect { public: - void init(Mat src, double eps_vertical_ = 0.2, double eps_horizontal_ = 0.1); + void init(const Mat& src, double eps_vertical_ = 0.2, double eps_horizontal_ = 0.1); bool localization(); - bool transformation(); + bool computeTransformationPoints(); Mat getBinBarcode() { return bin_barcode; } Mat getStraightBarcode() { return straight_barcode; } vector getTransformationPoints() { return transformation_points; } protected: - bool computeTransformationPoints(); - vector searchVerticalLines(); - vector separateHorizontalLines(vector list_lines); + vector searchHorizontalLines(); + vector separateVerticalLines(const vector &list_lines); void fixationPoints(vector &local_point); Point2f intersectionLines(Point2f a1, Point2f a2, Point2f b1, Point2f b2); vector getQuadrilateral(vector angle_list); @@ -41,131 +40,144 @@ protected: }; -void QRDecode::init(Mat src, double eps_vertical_, double eps_horizontal_) +void QRDetect::init(const Mat& src, double eps_vertical_, double eps_horizontal_) { - double min_side = std::min(src.size().width, src.size().height); + CV_Assert(!src.empty()); + const double min_side = std::min(src.size().width, src.size().height); if (min_side < 512.0) { coeff_expansion = 512.0 / min_side; - int width = static_cast(src.size().width * coeff_expansion); - int height = static_cast(src.size().height * coeff_expansion); + const int width = cvRound(src.size().width * coeff_expansion); + const int height = cvRound(src.size().height * coeff_expansion); Size new_size(width, height); - resize(src, barcode, new_size); + resize(src, barcode, new_size, 0, 0, INTER_LINEAR); } else { coeff_expansion = 1.0; barcode = src; } + eps_vertical = eps_vertical_; eps_horizontal = eps_horizontal_; - adaptiveThreshold(barcode, bin_barcode, 255, ADAPTIVE_THRESH_GAUSSIAN_C, THRESH_BINARY, 71, 2); + adaptiveThreshold(barcode, bin_barcode, 255, ADAPTIVE_THRESH_GAUSSIAN_C, THRESH_BINARY, 83, 2); } -vector QRDecode::searchVerticalLines() +vector QRDetect::searchHorizontalLines() { vector result; - int temp_length = 0; - uint8_t next_pixel, future_pixel; - vector test_lines; + const int height_bin_barcode = bin_barcode.rows; + const int width_bin_barcode = bin_barcode.cols; + const size_t test_lines_size = 5; + double test_lines[test_lines_size]; + const size_t count_pixels_position = 1024; + size_t pixels_position[count_pixels_position]; + size_t index = 0; - for (int x = 0; x < bin_barcode.rows; x++) + for (int y = 0; y < height_bin_barcode; y++) { - for (int y = 0; y < bin_barcode.cols; y++) + const uint8_t *bin_barcode_row = bin_barcode.ptr(y); + + int pos = 0; + for (; pos < width_bin_barcode; pos++) { if (bin_barcode_row[pos] == 0) break; } + if (pos == width_bin_barcode) { continue; } + + index = 0; + pixels_position[index] = pixels_position[index + 1] = pixels_position[index + 2] = pos; + index +=3; + + uint8_t future_pixel = 255; + for (int x = pos; x < width_bin_barcode; x++) { - if (bin_barcode.at(x, y) > 0) { continue; } - - // --------------- Search vertical lines --------------- // - - test_lines.clear(); - future_pixel = 255; - - for (int i = x; i < bin_barcode.rows - 1; i++) + if (bin_barcode_row[x] == future_pixel) { - next_pixel = bin_barcode.at(i + 1, y); - temp_length++; - if (next_pixel == future_pixel) - { - future_pixel = 255 - future_pixel; - test_lines.push_back(temp_length); - temp_length = 0; - if (test_lines.size() == 5) { break; } - } + future_pixel = 255 - future_pixel; + pixels_position[index] = x; + index++; + } + } + pixels_position[index] = width_bin_barcode - 1; + index++; + for (size_t i = 2; i < index - 4; i+=2) + { + test_lines[0] = static_cast(pixels_position[i - 1] - pixels_position[i - 2]); + test_lines[1] = static_cast(pixels_position[i ] - pixels_position[i - 1]); + test_lines[2] = static_cast(pixels_position[i + 1] - pixels_position[i ]); + test_lines[3] = static_cast(pixels_position[i + 2] - pixels_position[i + 1]); + test_lines[4] = static_cast(pixels_position[i + 3] - pixels_position[i + 2]); + + double length = 0.0, weight = 0.0; + + for (size_t j = 0; j < test_lines_size; j++) { length += test_lines[j]; } + + if (length == 0) { continue; } + for (size_t j = 0; j < test_lines_size; j++) + { + if (j == 2) { weight += fabs((test_lines[j] / length) - 3.0/7.0); } + else { weight += fabs((test_lines[j] / length) - 1.0/7.0); } } - // --------------- Compute vertical lines --------------- // - - if (test_lines.size() == 5) + if (weight < eps_vertical) { - double length = 0.0, weight = 0.0; - - for (size_t i = 0; i < test_lines.size(); i++) { length += test_lines[i]; } - - CV_Assert(length > 0); - for (size_t i = 0; i < test_lines.size(); i++) - { - if (i == 2) { weight += fabs((test_lines[i] / length) - 3.0/7.0); } - else { weight += fabs((test_lines[i] / length) - 1.0/7.0); } - } - - if (weight < eps_vertical) - { - Vec3d line; - line[0] = x; line[1] = y, line[2] = length; - result.push_back(line); - } + Vec3d line; + line[0] = static_cast(pixels_position[i - 2]); + line[1] = y; + line[2] = length; + result.push_back(line); } } } return result; } -vector QRDecode::separateHorizontalLines(vector list_lines) +vector QRDetect::separateVerticalLines(const vector &list_lines) { vector result; int temp_length = 0; - uint8_t next_pixel, future_pixel; + uint8_t next_pixel; vector test_lines; + for (size_t pnt = 0; pnt < list_lines.size(); pnt++) { - int x = static_cast(list_lines[pnt][0] + list_lines[pnt][2] * 0.5); - int y = static_cast(list_lines[pnt][1]); + const int x = cvRound(list_lines[pnt][0] + list_lines[pnt][2] * 0.5); + const int y = cvRound(list_lines[pnt][1]); + + // --------------- Search vertical up-lines --------------- // - // --------------- Search horizontal up-lines --------------- // test_lines.clear(); - future_pixel = 255; + uint8_t future_pixel_up = 255; - for (int j = y; j < bin_barcode.cols - 1; j++) + for (int j = y; j < bin_barcode.rows - 1; j++) { - next_pixel = bin_barcode.at(x, j + 1); + next_pixel = bin_barcode.at(j + 1, x); temp_length++; - if (next_pixel == future_pixel) + if (next_pixel == future_pixel_up) { - future_pixel = 255 - future_pixel; + future_pixel_up = 255 - future_pixel_up; test_lines.push_back(temp_length); temp_length = 0; if (test_lines.size() == 3) { break; } } } - // --------------- Search horizontal down-lines --------------- // - future_pixel = 255; + // --------------- Search vertical down-lines --------------- // + uint8_t future_pixel_down = 255; for (int j = y; j >= 1; j--) { - next_pixel = bin_barcode.at(x, j - 1); + next_pixel = bin_barcode.at(j - 1, x); temp_length++; - if (next_pixel == future_pixel) + if (next_pixel == future_pixel_down) { - future_pixel = 255 - future_pixel; + future_pixel_down = 255 - future_pixel_down; test_lines.push_back(temp_length); temp_length = 0; if (test_lines.size() == 6) { break; } } } - // --------------- Compute horizontal lines --------------- // + // --------------- Compute vertical lines --------------- // if (test_lines.size() == 6) { @@ -192,34 +204,98 @@ vector QRDecode::separateHorizontalLines(vector list_lines) for (size_t i = 0; i < result.size(); i++) { point2f_result.push_back( - Point2f(static_cast(result[i][1]), - static_cast(result[i][0] + result[i][2] * 0.5))); + Point2f(static_cast(result[i][0] + result[i][2] * 0.5), + static_cast(result[i][1]))); } return point2f_result; } -void QRDecode::fixationPoints(vector &local_point) +void QRDetect::fixationPoints(vector &local_point) { + double cos_angles[3], norm_triangl[3]; norm_triangl[0] = norm(local_point[1] - local_point[2]); norm_triangl[1] = norm(local_point[0] - local_point[2]); norm_triangl[2] = norm(local_point[1] - local_point[0]); - cos_angles[0] = (pow(norm_triangl[1], 2) + pow(norm_triangl[2], 2) - pow(norm_triangl[0], 2)) - / (2 * norm_triangl[1] * norm_triangl[2]); - cos_angles[1] = (pow(norm_triangl[0], 2) + pow(norm_triangl[2], 2) - pow(norm_triangl[1], 2)) - / (2 * norm_triangl[0] * norm_triangl[2]); - cos_angles[2] = (pow(norm_triangl[0], 2) + pow(norm_triangl[1], 2) - pow(norm_triangl[2], 2)) - / (2 * norm_triangl[0] * norm_triangl[1]); + cos_angles[0] = (norm_triangl[1] * norm_triangl[1] + norm_triangl[2] * norm_triangl[2] + - norm_triangl[0] * norm_triangl[0]) / (2 * norm_triangl[1] * norm_triangl[2]); + cos_angles[1] = (norm_triangl[0] * norm_triangl[0] + norm_triangl[2] * norm_triangl[2] + - norm_triangl[1] * norm_triangl[1]) / (2 * norm_triangl[0] * norm_triangl[2]); + cos_angles[2] = (norm_triangl[0] * norm_triangl[0] + norm_triangl[1] * norm_triangl[1] + - norm_triangl[2] * norm_triangl[2]) / (2 * norm_triangl[0] * norm_triangl[1]); + + const double angle_barrier = 0.85; + if (fabs(cos_angles[0]) > angle_barrier || fabs(cos_angles[1]) > angle_barrier || fabs(cos_angles[2]) > angle_barrier) + { + local_point.clear(); + return; + } size_t i_min_cos = - (cos_angles[0] < cos_angles[1] && cos_angles[0] < cos_angles[2]) ? 0 : - (cos_angles[1] < cos_angles[0] && cos_angles[1] < cos_angles[2]) ? 1 : 2; + (cos_angles[0] < cos_angles[1] && cos_angles[0] < cos_angles[2]) ? 0 : + (cos_angles[1] < cos_angles[0] && cos_angles[1] < cos_angles[2]) ? 1 : 2; - std::swap(local_point[0], local_point[i_min_cos]); + size_t index_max = 0; + double max_area = std::numeric_limits::min(); + for (size_t i = 0; i < local_point.size(); i++) + { + const size_t current_index = i % 3; + const size_t left_index = (i + 1) % 3; + const size_t right_index = (i + 2) % 3; - Point2f rpt = local_point[0], bpt = local_point[1], gpt = local_point[2]; + const Point2f current_point(local_point[current_index]), + left_point(local_point[left_index]), right_point(local_point[right_index]), + central_point(intersectionLines(current_point, + Point2f(static_cast((local_point[left_index].x + local_point[right_index].x) * 0.5), + static_cast((local_point[left_index].y + local_point[right_index].y) * 0.5)), + Point2f(0, static_cast(bin_barcode.rows - 1)), + Point2f(static_cast(bin_barcode.cols - 1), + static_cast(bin_barcode.rows - 1)))); + + + vector list_area_pnt; + list_area_pnt.push_back(current_point); + + vector list_line_iter; + list_line_iter.push_back(LineIterator(bin_barcode, current_point, left_point)); + list_line_iter.push_back(LineIterator(bin_barcode, current_point, central_point)); + list_line_iter.push_back(LineIterator(bin_barcode, current_point, right_point)); + + for (size_t k = 0; k < list_line_iter.size(); k++) + { + uint8_t future_pixel = 255, count_index = 0; + for(int j = 0; j < list_line_iter[k].count; j++, ++list_line_iter[k]) + { + if (list_line_iter[k].pos().x >= bin_barcode.cols || + list_line_iter[k].pos().y >= bin_barcode.rows) { break; } + const uint8_t value = bin_barcode.at(list_line_iter[k].pos()); + if (value == future_pixel) + { + future_pixel = 255 - future_pixel; + count_index++; + if (count_index == 3) + { + list_area_pnt.push_back(list_line_iter[k].pos()); + break; + } + } + } + } + + const double temp_check_area = contourArea(list_area_pnt); + if (temp_check_area > max_area) + { + index_max = current_index; + max_area = temp_check_area; + } + + } + if (index_max == i_min_cos) { std::swap(local_point[0], local_point[index_max]); } + else { local_point.clear(); return; } + + const Point2f rpt = local_point[0], bpt = local_point[1], gpt = local_point[2]; Matx22f m(rpt.x - bpt.x, rpt.y - bpt.y, gpt.x - rpt.x, gpt.y - rpt.y); if( determinant(m) > 0 ) { @@ -227,19 +303,18 @@ void QRDecode::fixationPoints(vector &local_point) } } -bool QRDecode::localization() +bool QRDetect::localization() { Point2f begin, end; - vector list_lines_x = searchVerticalLines(); + vector list_lines_x = searchHorizontalLines(); if( list_lines_x.empty() ) { return false; } - vector list_lines_y = separateHorizontalLines(list_lines_x); - if( list_lines_y.empty() ) { return false; } + vector list_lines_y = separateVerticalLines(list_lines_x); + if( list_lines_y.size() < 3 ) { return false; } vector centers; Mat labels; - if (list_lines_y.size() < 3) { return false; } kmeans(list_lines_y, 3, labels, - TermCriteria( TermCriteria::EPS+TermCriteria::COUNT, 10, 1.0), + TermCriteria( TermCriteria::EPS + TermCriteria::COUNT, 10, 0.1), 3, KMEANS_PP_CENTERS, localization_points); fixationPoints(localization_points); @@ -247,11 +322,11 @@ bool QRDecode::localization() if (coeff_expansion > 1.0) { - int width = static_cast(bin_barcode.size().width / coeff_expansion); - int height = static_cast(bin_barcode.size().height / coeff_expansion); + const int width = cvRound(bin_barcode.size().width / coeff_expansion); + const int height = cvRound(bin_barcode.size().height / coeff_expansion); Size new_size(width, height); - Mat intermediate; - resize(bin_barcode, intermediate, new_size); + Mat intermediate = Mat::zeros(new_size, CV_8UC1); + resize(bin_barcode, intermediate, new_size, 0, 0, INTER_LINEAR); bin_barcode = intermediate.clone(); for (size_t i = 0; i < localization_points.size(); i++) { @@ -273,7 +348,7 @@ bool QRDecode::localization() } -bool QRDecode::computeTransformationPoints() +bool QRDetect::computeTransformationPoints() { if (localization_points.size() != 3) { return false; } @@ -283,11 +358,11 @@ bool QRDecode::computeTransformationPoints() { Mat mask = Mat::zeros(bin_barcode.rows + 2, bin_barcode.cols + 2, CV_8UC1); uint8_t next_pixel, future_pixel = 255; - int count_test_lines = 0, index = static_cast(localization_points[i].x); + int count_test_lines = 0, index = cvRound(localization_points[i].x); for (; index < bin_barcode.cols - 1; index++) { next_pixel = bin_barcode.at( - static_cast(localization_points[i].y), index + 1); + cvRound(localization_points[i].y), index + 1); if (next_pixel == future_pixel) { future_pixel = 255 - future_pixel; @@ -295,7 +370,7 @@ bool QRDecode::computeTransformationPoints() if (count_test_lines == 2) { floodFill(bin_barcode, mask, - Point(index + 1, static_cast(localization_points[i].y)), 255, + Point(index + 1, cvRound(localization_points[i].y)), 255, 0, Scalar(), Scalar(), FLOODFILL_MASK_ONLY); break; } @@ -397,7 +472,7 @@ bool QRDecode::computeTransformationPoints() return true; } -Point2f QRDecode::intersectionLines(Point2f a1, Point2f a2, Point2f b1, Point2f b2) +Point2f QRDetect::intersectionLines(Point2f a1, Point2f a2, Point2f b1, Point2f b2) { Point2f result_square_angle( ((a1.x * a2.y - a1.y * a2.x) * (b1.x - b2.x) - @@ -413,7 +488,7 @@ Point2f QRDecode::intersectionLines(Point2f a1, Point2f a2, Point2f b1, Point2f } // test function (if true then ------> else <------ ) -bool QRDecode::testBypassRoute(vector hull, int start, int finish) +bool QRDetect::testBypassRoute(vector hull, int start, int finish) { int index_hull = start, next_index_hull, hull_size = (int)hull.size(); double test_length[2] = { 0.0, 0.0 }; @@ -439,7 +514,7 @@ bool QRDecode::testBypassRoute(vector hull, int start, int finish) if (test_length[0] < test_length[1]) { return true; } else { return false; } } -vector QRDecode::getQuadrilateral(vector angle_list) +vector QRDetect::getQuadrilateral(vector angle_list) { size_t angle_size = angle_list.size(); uint8_t value, mask_value; @@ -467,8 +542,8 @@ vector QRDecode::getQuadrilateral(vector angle_list) for (size_t i = 0; i < angle_list.size(); i++) { - int x = static_cast(angle_list[i].x); - int y = static_cast(angle_list[i].y); + int x = cvRound(angle_list[i].x); + int y = cvRound(angle_list[i].y); locations.push_back(Point(x, y)); } @@ -478,8 +553,8 @@ vector QRDecode::getQuadrilateral(vector angle_list) vector hull(hull_size); for (int i = 0; i < hull_size; i++) { - float x = static_cast(integer_hull[i].x); - float y = static_cast(integer_hull[i].y); + float x = saturate_cast(integer_hull[i].x); + float y = saturate_cast(integer_hull[i].y); hull[i] = Point2f(x, y); } @@ -516,7 +591,6 @@ vector QRDecode::getQuadrilateral(vector angle_list) Point result_side_begin[4], result_side_end[4]; bool bypass_orientation = testBypassRoute(hull, start_line[0], finish_line[0]); - bool extra_bypass_orientation; min_norm = std::numeric_limits::max(); index_hull = start_line[0]; @@ -593,12 +667,12 @@ vector QRDecode::getQuadrilateral(vector angle_list) } bypass_orientation = testBypassRoute(hull, start_line[0], unstable_pnt); - extra_bypass_orientation = testBypassRoute(hull, finish_line[1], unstable_pnt); + const bool extra_bypass_orientation = testBypassRoute(hull, finish_line[1], unstable_pnt); vector result_angle_list(4), test_result_angle_list(4); - double min_diff_area = std::numeric_limits::max(), test_diff_area; + double min_diff_area = std::numeric_limits::max(); index_hull = start_line[0]; - double standart_norm = std::max( + const double standart_norm = std::max( norm(result_side_begin[0] - result_side_end[0]), norm(result_side_begin[1] - result_side_end[1])); do @@ -637,7 +711,8 @@ vector QRDecode::getQuadrilateral(vector angle_list) = intersectionLines(hull[index_hull], hull[next_index_hull], result_side_begin[0], result_side_end[0]); - test_diff_area = fabs(fabs(contourArea(test_result_angle_list)) - experimental_area); + const double test_diff_area + = fabs(fabs(contourArea(test_result_angle_list)) - experimental_area); if (min_diff_area > test_diff_area) { min_diff_area = test_diff_area; @@ -655,10 +730,17 @@ vector QRDecode::getQuadrilateral(vector angle_list) } while(index_hull != unstable_pnt); + // check label points if (norm(result_angle_list[0] - angle_list[1]) > 2) { result_angle_list[0] = angle_list[1]; } if (norm(result_angle_list[1] - angle_list[0]) > 2) { result_angle_list[1] = angle_list[0]; } if (norm(result_angle_list[3] - angle_list[2]) > 2) { result_angle_list[3] = angle_list[2]; } + // check calculation point + if (norm(result_angle_list[2] - angle_list[3]) > + (norm(result_angle_list[0] - result_angle_list[1]) + + norm(result_angle_list[0] - result_angle_list[3])) * 0.5 ) + { result_angle_list[2] = angle_list[3]; } + return result_angle_list; } @@ -667,48 +749,11 @@ vector QRDecode::getQuadrilateral(vector angle_list) // / | // a/ | c -inline double QRDecode::getCosVectors(Point2f a, Point2f b, Point2f c) +inline double QRDetect::getCosVectors(Point2f a, Point2f b, Point2f c) { return ((a - b).x * (c - b).x + (a - b).y * (c - b).y) / (norm(a - b) * norm(c - b)); } -bool QRDecode::transformation() -{ - if(!computeTransformationPoints()) { return false; } - - double max_length_norm = -1; - size_t transform_size = transformation_points.size(); - for (size_t i = 0; i < transform_size; i++) - { - double len_norm = norm(transformation_points[i % transform_size] - - transformation_points[(i + 1) % transform_size]); - max_length_norm = std::max(max_length_norm, len_norm); - } - - Point2f transformation_points_[] = - { - transformation_points[0], - transformation_points[1], - transformation_points[2], - transformation_points[3] - }; - - Point2f perspective_points[] = - { - Point2f(0.f, 0.f), Point2f(0.f, (float)max_length_norm), - Point2f((float)max_length_norm, (float)max_length_norm), - Point2f((float)max_length_norm, 0.f) - }; - - Mat H = getPerspectiveTransform(transformation_points_, perspective_points); - - warpPerspective(bin_barcode, straight_barcode, H, - Size(static_cast(max_length_norm), - static_cast(max_length_norm))); - return true; -} - - struct QRCodeDetector::Impl { public: @@ -729,11 +774,11 @@ bool QRCodeDetector::detect(InputArray in, OutputArray points) const Mat inarr = in.getMat(); CV_Assert(!inarr.empty()); CV_Assert(inarr.type() == CV_8UC1); - QRDecode qrdec; - qrdec.init(inarr, p->epsX, p->epsY); - if (!qrdec.localization()) { return false; } - if (!qrdec.transformation()) { return false; } - vector pnts2f = qrdec.getTransformationPoints(); + QRDetect qrdet; + qrdet.init(inarr, p->epsX, p->epsY); + if (!qrdet.localization()) { return false; } + if (!qrdet.computeTransformationPoints()) { return false; } + vector pnts2f = qrdet.getTransformationPoints(); Mat(pnts2f).convertTo(points, points.fixedType() ? points.type() : CV_32FC2); return true; } diff --git a/modules/objdetect/test/test_qrcode.cpp b/modules/objdetect/test/test_qrcode.cpp index 65d6afc7f0..c0cea50428 100644 --- a/modules/objdetect/test/test_qrcode.cpp +++ b/modules/objdetect/test/test_qrcode.cpp @@ -8,7 +8,7 @@ namespace opencv_test { namespace { std::string qrcode_images_name[] = { - "20110817_030.jpg", + // "20110817_030.jpg", "20110817_048.jpg", "img_20120226_161648.jpg", "img_2714.jpg", @@ -63,7 +63,7 @@ TEST_P(Objdetect_QRCode, regression) ASSERT_FALSE(src.empty()) << "Can't read image: " << image_path; std::vector corners; - EXPECT_TRUE(detectQRCode(src, corners)); + ASSERT_TRUE(detectQRCode(src, corners)); const std::string dataset_config = findDataFile(root + "dataset_config.json", false); FileStorage file_config(dataset_config, FileStorage::READ); diff --git a/samples/cpp/live_detect_qrcode.cpp b/samples/cpp/live_detect_qrcode.cpp new file mode 100644 index 0000000000..2ba70d893d --- /dev/null +++ b/samples/cpp/live_detect_qrcode.cpp @@ -0,0 +1,170 @@ +#include "opencv2/objdetect.hpp" +#include "opencv2/imgproc.hpp" +#include "opencv2/highgui.hpp" +#include +#include + +using namespace std; +using namespace cv; + +void getMatWithQRCodeContour(Mat &color_image, vector transform); +void getMatWithFPS(Mat &color_image, double fps); +int liveQRCodeDetect(); +int showImageQRCodeDetect(string in, string out); + +int main(int argc, char *argv[]) +{ + const string keys = + "{h help ? | | print help messages }" + "{i in | | input path to file for detect (with parameter - show image, otherwise - camera)}" + "{o out | | output path to file (save image, work with -i parameter) }"; + CommandLineParser cmd_parser(argc, argv, keys); + + cmd_parser.about("This program detects the QR-codes from camera or images using the OpenCV library."); + if (cmd_parser.has("help")) + { + cmd_parser.printMessage(); + return 0; + } + + string in_file_name = cmd_parser.get("in"); // input path to image + string out_file_name = cmd_parser.get("out"); // output path to image + + if (!cmd_parser.check()) + { + cmd_parser.printErrors(); + return -1; + } + + int return_code = 0; + if (in_file_name.empty()) + { + return_code = liveQRCodeDetect(); + } + else + { + return_code = showImageQRCodeDetect(in_file_name, out_file_name); + } + return return_code; +} + +void getMatWithQRCodeContour(Mat &color_image, vector transform) +{ + if (!transform.empty()) + { + double show_radius = (color_image.rows > color_image.cols) + ? (2.813 * color_image.rows) / color_image.cols + : (2.813 * color_image.cols) / color_image.rows; + double contour_radius = show_radius * 0.4; + + vector< vector > contours; + contours.push_back(transform); + drawContours(color_image, contours, 0, Scalar(211, 0, 148), cvRound(contour_radius)); + + RNG rng(1000); + for (size_t i = 0; i < 4; i++) + { + Scalar color = Scalar(rng.uniform(0,255), rng.uniform(0, 255), rng.uniform(0, 255)); + circle(color_image, transform[i], cvRound(show_radius), color, -1); + } + } +} + +void getMatWithFPS(Mat &color_image, double fps) +{ + ostringstream convert; + convert << cvRound(fps) << " FPS."; + putText(color_image, convert.str(), Point(25, 25), FONT_HERSHEY_DUPLEX, 1, Scalar(0, 0, 255), 2); +} + +int liveQRCodeDetect() +{ + VideoCapture cap(0); + if(!cap.isOpened()) + { + cout << "Cannot open a camera" << '\n'; + return -4; + } + + TickMeter total; + for(;;) + { + Mat frame, src; + vector transform; + cap >> frame; + if(frame.empty()) { break; } + cvtColor(frame, src, COLOR_BGR2GRAY); + + total.start(); + bool result_detection = detectQRCode(src, transform); + total.stop(); + double fps = 1 / total.getTimeSec(); + total.reset(); + + if (result_detection) { getMatWithQRCodeContour(frame, transform); } + getMatWithFPS(frame, fps); + + imshow("Live detect QR code", frame); + if( waitKey(30) > 0 ) { break; } + } + return 0; +} + +int showImageQRCodeDetect(string in, string out) +{ + Mat src = imread(in, IMREAD_GRAYSCALE); + vector transform; + const int count_experiments = 10; + double transform_time = 0.0; + bool result_detection = false; + TickMeter total; + for (size_t i = 0; i < count_experiments; i++) + { + total.start(); + transform.clear(); + result_detection = detectQRCode(src, transform); + total.stop(); + transform_time += total.getTimeSec(); + if (!result_detection) { break; } + total.reset(); + + } + double fps = count_experiments / transform_time; + if (!result_detection) { cout << "Not find QR-code." << '\n'; return -2; } + + Mat color_src = imread(in); + getMatWithQRCodeContour(color_src, transform); + getMatWithFPS(color_src, fps); + + for(;;) + { + imshow("Detect QR code on image", color_src); + if( waitKey(30) > 0 ) { break; } + } + + if (!out.empty()) + { + getMatWithQRCodeContour(color_src, transform); + getMatWithFPS(color_src, fps); + + cout << "Input image file path: " << in << '\n'; + cout << "Output image file path: " << out << '\n'; + cout << "Size: " << color_src.size() << '\n'; + cout << "FPS: " << fps << '\n'; + + vector compression_params; + compression_params.push_back(IMWRITE_PNG_COMPRESSION); + compression_params.push_back(9); + try + { + imwrite(out, color_src, compression_params); + } + catch (cv::Exception& ex) + { + cout << "Exception converting image to PNG format: "; + cout << ex.what() << '\n'; + return -3; + } + } + return 0; +} From 88b04c3cd46c43444ba9971d8cbe8fa557c771d9 Mon Sep 17 00:00:00 2001 From: Tomoaki Teshima Date: Tue, 11 Sep 2018 21:28:18 +0900 Subject: [PATCH 09/27] remove raw SSE2 implementation --- modules/dnn/src/layers/pooling_layer.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/dnn/src/layers/pooling_layer.cpp b/modules/dnn/src/layers/pooling_layer.cpp index 4e0fea21d8..853fab84ea 100644 --- a/modules/dnn/src/layers/pooling_layer.cpp +++ b/modules/dnn/src/layers/pooling_layer.cpp @@ -488,19 +488,16 @@ public: max_val0 = v_max(max_val0, v0); max_val1 = v_max(max_val1, v1); } -#if CV_SSE2 else if( stride_w == 2 ) for (int k = 0; k < kernel_w*kernel_h; k++) { int index = ofsptr[k]; - v_float32x4 v00 = v_load(srcData1 + index), v01 = v_load(srcData1 + index + 4); - v_float32x4 v0(_mm_shuffle_ps(v00.val, v01.val, _MM_SHUFFLE(2, 0, 2, 0))); - v_float32x4 v10 = v_load(srcData1 + index + 8), v11 = v_load(srcData1 + index + 12); - v_float32x4 v1(_mm_shuffle_ps(v10.val, v11.val, _MM_SHUFFLE(2, 0, 2, 0))); + v_float32x4 v0, v1, dummy; + v_load_deinterleave(srcData1 + index, v0, dummy); // f0 f2 f4 f6 ,f1 f3 f5 f7 + v_load_deinterleave(srcData1 + index + 8, v1, dummy); // f8 f10 f12 f14 ,f9 f11 f13 f15 max_val0 = v_max(max_val0, v0); max_val1 = v_max(max_val1, v1); } -#endif else for (int k = 0; k < kernel_w*kernel_h; k++) { From d7ac4495c3d06f636d741ce93e9c25e7e084b476 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 11 Sep 2018 20:30:36 +0000 Subject: [PATCH 10/27] highgui: fix QT build --- modules/highgui/src/window.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/highgui/src/window.cpp b/modules/highgui/src/window.cpp index e1e7af0ced..6df249fa81 100644 --- a/modules/highgui/src/window.cpp +++ b/modules/highgui/src/window.cpp @@ -469,23 +469,23 @@ CV_IMPL void cvUpdateWindow(const char*) cv::QtFont cv::fontQt(const String& nameFont, int pointSize, Scalar color, int weight, int style, int spacing) { - CvFont f = cvFontQt(nameFont.c_str(), pointSize,color,weight, style, spacing); + CvFont f = cvFontQt(nameFont.c_str(), pointSize, cvScalar(color), weight, style, spacing); void* pf = &f; // to suppress strict-aliasing return *(cv::QtFont*)pf; } void cv::addText( const Mat& img, const String& text, Point org, const QtFont& font) { - CvMat _img = img; - cvAddText( &_img, text.c_str(), org, (CvFont*)&font); + CvMat _img = cvMat(img); + cvAddText( &_img, text.c_str(), cvPoint(org), (CvFont*)&font); } void cv::addText( const Mat& img, const String& text, Point org, const String& nameFont, int pointSize, Scalar color, int weight, int style, int spacing) { - CvFont f = cvFontQt(nameFont.c_str(), pointSize,color,weight, style, spacing); - CvMat _img = img; - cvAddText( &_img, text.c_str(), org, &f); + CvFont f = cvFontQt(nameFont.c_str(), pointSize, cvScalar(color), weight, style, spacing); + CvMat _img = cvMat(img); + cvAddText( &_img, text.c_str(), cvPoint(org), &f); } void cv::displayStatusBar(const String& name, const String& text, int delayms) From 7828854c9db47ca1d4ec1242455401b7b4d59c54 Mon Sep 17 00:00:00 2001 From: jsxyhelu Date: Wed, 12 Sep 2018 04:58:01 +0800 Subject: [PATCH 11/27] Merge pull request #12206 from jsxyhelu/3.4 find innercircle of contour by using pointPolygonTest: (#12206) --- .../images/Point_Polygon_Test_Result.jpg | Bin 5838 -> 23665 bytes .../pointPolygonTest_demo.cpp | 6 ++++-- .../PointPolygonTestDemo.java | 3 ++- .../pointPolygonTest_demo.py | 5 +++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/tutorials/imgproc/shapedescriptors/point_polygon_test/images/Point_Polygon_Test_Result.jpg b/doc/tutorials/imgproc/shapedescriptors/point_polygon_test/images/Point_Polygon_Test_Result.jpg index e420f472eae41e99040567ea303808c893f98849..b2c7dba57a3a6794ecbb2c59b7c7766a2c335bb5 100644 GIT binary patch literal 23665 zcmcG$2Ut^Ex9=TALbR6%;LQl+U#7m(gTib6noui1doiva=YN)J_f2k9UJ0-^UJ zNKdE%Likp2?|t6$o%=jrdG19LSLT{?m5e!l<3Gk+dO3Ny2)d^%uOtt;b`1o&2K)hC z&VXb=*RNrJu<_R-fPaSo z`vH59KSQtM;^5%k!Mllf)#d-w+vPV9@vUngu6@9{#t6Djd<}>A+GQt*9=J~2tIGo} z_Rr6?>o_-XZ{h)$fe&=3z6V@B4i0e9xWE+yz5Rjxpc}-vBn$#iZ<1=5<1spu2?j#H z++uoG-bSuDj9`9b;SzNF&V33>Dry#1Hg*n9Az=|wG4aQ;&*kJ56qS^+AGZeD%?tgxc8s=B7OuD+qY zqqD2Kr?>C>$S8bld}4BHdTDuO_1D_^?~P65{=wnV@d@hm40~VKKsbMH3wZxu-WM@& zU)QlVz{B3xwdbf5!6z;=tb=9_2flZyl9I z=rv66@m6^)q@p+EyANT0tv-^iK4q{|{7;dVJ{slCoMwFUvA{3v6i?uO_hGiBk9Lb$ zGo4v8z1BXV1Sori3pHgW8loMW_UUY@AB9E@OejH{WfrD z7D|u21iS)R1ReYxP8)fT)-6NmZQ1D*y>fB^b!D(=r(UMsElud{7jAii!CD`gas@up zRsR}qPt19y9aGhH<@;mgygo&V7g`b2uWC`bYBijY)08=*CW6B|QsiQF`nmuc-yyRMRM+{| z8=L#``upL#!D^8S2U>Us0~CZQ7Z+ zl6pX7p?@F&eIdTS!FCBTYR?<)&Z@Kw#S0%MB^hB*dUdR=*UQIuUPjq9P^vQ;hun}F01Tz{ z>nuftNXvw{4KQl#tE22!N5Z^ahuIcqIv47_#+^oZu>We(xH8A2lqwA#4CcX?OG7d8 z$MkKRHbARNxj*}4%f~-i&3wi)pBhul{m?3pyT&6Gv>a{o+_VE8c5 znq+aN0SvveJ}@u5t;=CRM}?%lD`R8LFH|5U_d)}9>xg_vlI;ULOxcIpj?aSABDh)z z_CU^Qteq_9nbydat)KX48Tb;L+P~$nea>=g;|1s47rhFMDc|pU>mc&NKaev8aYWUv zYHv4(xe;kq6O!7}mgI{Z(TZ+vle1h#Z~1V;H%MvuO);V5&vddc3;Mkf9uv z7&&997x|%>?M+RK!u1VJ&h{ zX-qFGPxPhe?2{|;E1x_3Qn)I?zirwMh5TQLhkcd8rKAhW1wOqxqn6I2?bN3WiXwWd zxp+p+?|+wGi_n6b=&3y3XPA@!T}tVYSXijQeZ0@vI6t-Pq(h?UWfkBZpCWO7YE=3B zXM@F==384X8T+pBs4w*ez6L*d$8*EYHU z1KS0a-pggY{?}n1bTZ=8XDN4611_reFl0F#|*p#^A6Gd=`-06|JTn}rrpD>QNfR1yQVo_kk^S|w1_NC*c zU_7}V&U}te4=a>HGR3D<&F(ipoFJ8)q8>)>+6T;#0mY)aiJwbf*EC-hHDutuV%HhE zo`dt1{L1iQSkULYDi_6;NNLrVIRI!cCs*14ur3Y+hQ-f%WeRs>Km5!Y4I(^Te0Q{* zcJIz1Y>8kt1SE0Cq}W&Mo78*W?$Wx&t{)2J&Fqu&39KEP?34a-;3F9ZSHZs#4j^3~ zXvX^5|M8}h4Ml|ln1?Wf=HrO)SLjf{*dBQwnev4NbfjRpw>FFu_=7bWIEf7H80d}! zUiw7XageWJiTtE*R!cd!jr`F=$p}kcp9!cLflV?#ub40muQ<8*1Hf|^m;bowP2+uz zsQOjyA9br*4}7oORKMb;aYS?y6S+j0GuFBXsFa(q4;Aad8WqRFk4nACx{YJF){#PY zvwA5#glPz9sne5WfQjN%meKiBIFdFpK3(Dso%k6H~pqH_N2@5%{7+$j-l5^(^vD9Gkgfck#{SUdT@Ck3E z7>SPDP=KR@KSlPRWcQ!^C$%Y(_OOio4<7SfMe|&M;cv~9uL8E|e;oM_*qg32z<(l} za>!CqC)768VuVa8+WLymcY@(s%ETl2ueas+zdYay!TK-B=cBv?#yrlu{4iR;ef>DH zp!jUgr`XsjxB?ydv^A?29@de<`lLVOE`Lm?_ICYRwmX1hT2&nFUcjH_JMeDizwSLL zm~s&?lL`N9cmG*`FkomfY|{G5wg;0bH_NRE>Lj%uIQPOn{ju#SS{28pg2HqKSup1t zk)DJ{PQy!7?RSht_b+1t?T9+EzwJ^I^4Xe|v-BqTcirj;Zf;Ve}HL|uy9gZGNrw0ExN1iwan zpe7*Y5~Q_H@qcG8*5Ckq|7HB22pssE{o5fqFVPoZ z+#hN6?T`#0e-iK!ApcbW{_lYRE7AUYB*4lzIql;dfivol1yZm(KGfY_sv^|T+oqjb z1`-jU$}BjFKdtJe8{N@_;_wDk{iC9Q&^iu;Te@z*7gqp#Ey91)Q|1Y-2b&VI24-0i z)`^q#m@elrl^0CDTAUcNu%VIr&~U|P`e;CKaf+DawLkzC3*ue5JT2hzlG+Y+t9n3J z0NWL-&KecF|N1;I6^5+{1o^@5JQ(xbcR6C}|Lz#0GYj4nbYj=(xt>uJbLHLkfcC}( zf-(oWlYl0m&Hz9cP$@+K4V(P@>;UgGuwDza0bUEZx|4unWQ;1{$(XCKE@)A>=!%UB zSmZhlW$v}ChgQU4H-g~0IjKy~~W&}Txx?VXRx zAVi_{@fJ6Z@^KHzem#W)TJNV`xyo%fStwn1w)qh`U!rdcAi_7!k|jHhhzhQnt{nL) z;F=$iy_L@TM@|EA9rzR-3jbG?1EM?>uJQFOBIybT*_-BoE<1|=qQXC-90>h2K#b`A zTkK;aKa0AvD!YXCFU1{Ib|U5VqIVV4&})FXshk0M6s!RR<$VE4J8ITvfF_pTn$_N} z6Dycf{M5^%btb4fwMJb#xMz(M$mS<*<%hXvKYX0^2vnQ2;&Ku-q1jeE1p|?BuEiK%VMB z*cHoPxbTV#GxCZHh1IXZBkCn5%C20T&-D-A>qg;Li&(b>j9nC;0;OOBtR;Ep1K~G4 zETgfFJ6Pxg4O(MP0%o!ypDh7Ec#$*4v_ti-=jePJ@F%1W{P?M``O4enj0v&q_4W@Bj4 z-^EI5<$Ioh6xZ`<`>h~w|G%kh%vC=1zg3+}mQP|MMo@4y5gs<9QUu%+s#TFtFz4jL z6-*pb!K3&-3DC&BFaV{|6Ln>Hq)*1V1CyA5kczOiHU$LJ(3M~s=YAh*`A0sl`oiDV zQZ^-jHdJ|t{3!fUs<@=0RKK4>GWbG= zauIN_Z`iLN`)Y~A#&DfKP(Hkh0U4_PH?j6)yu!UuME#Z~=k8Sq;E9Nwg#&#UOI80T z|A9FJ=mN8+A)j9Z(_;mY_z`lZ?Kv7TxY+3t`3mdp8j}E7EPyGq))M^ZyiOdOb(Gi( zX=XY$y~xN}yl8o&TKAgHf8Quy--q_oJT|JROqq92u8?@Mh7*Dv|gU}qHm*?uOy7)ef5(C zUTxyAuV|I9JhEf3Slb}-&8T@ead+0J$J@b`X@EfROa?8WzD<7#Qiw-dUxEk-lP*C6 zat>%MBqnqD{6eIo<1yYbU#Oq>muZ`f`#;}*`=~!@q)@F=!R*}JIYQ;I`#Od_(YLWE z8D00IOIG^69}Cj4%L6XVbyr<+xJruR`{R>vv{IqMYx8{W)bB9Q(_J>J2yc>+Db~hh zo;Cgsj_AKGK@TLKp1FJVWjH5t=Ho3hz3Ydk*^Iie!&BcmBq+zh?w=MKrS~X~s>WAh>o!;UJP_|{5r2?EQ+&@qnh)m}u(|7?A8j^EfA z9X2A}Yk`!I*m>?LhIc0?<67xA)XcFKO8gQ;vUeAShq-@TD&q+$_NuYl;d-hzSflG9 zde2Nf^a;|`*!XD+M>6wh7F4HOCgu|KRwnimbgzla9dWLS3cN^IioA%1dC9h&>Es1x z&G*J}M@pUrq>|mQ9He5pID}TclfB0i_JObW64bfj&$Mv~B7Gd}pZ&f=2Aw?m>%2bJ z;DQuQ-VLdLT^H7qvt`NIvj&q-EkxI+a~11|Meh5~O!N79pXRVr6Axne-z{5Ymw^vzV}Om?m%u3L7qk?CW?z zj+4%{Az(El#l{l6@X~Jz$jn9@^1E8Z49<0=etQwVaB|-jhsBQHUzFj=84{ zOa35V!fdNA6h_mJetM1@(A7dZQRc_9oH^aN!kP@*NOCc>HFWrLE(!iQ1eScOshAUu zR-+cx#Wm2se(PaW#CmI0>vY*m#3g8_2szmCv;v_QBl*;NrSr=EbJaK=c%fTVXWYiC1nB-F?lAZj(M|5f5P=X?h-WW49WbQ^z*#^ z1#cPAQAo6{!-{H7+}opJip2?#g8e?iBYU}DCM)FJhl>sBTtRVjLx-q6j$ z_dhRv1tT5MDNTTIY&TI@sog$7j;wS~-wgD(1}~d1nIM9HpY5jb5)`Hc8@4(7zIAJR zSX(1%W=B{n>ePw&oQRidWBWYqW@+ORMdzH}l6vf6YZ$eBx@Ewbd$)sIy5arA9_^af z0<-#aoy9HwC7nFXq|X#dI=G>=1a@;vMETY+$)Y4nvD3xRchBcP({H?TTLW5Si_gLuTMvXKUvidg@TyeGdX5;i3!k7$LiB7$BrWbw{27KqA|3#qSK*)e$JLsdm*L5Bo!v$iVg``_Z-s!5^h0L zqfE|cFBuZY_q%_6sX5oLjqOQxk=g>NfMMvZn+WBv-&HlxZC`#>sFl*tWaf4h6|W{3 zSs9hhUhQ6X`a0ceDxc7rGOA24XTySBO?&g{9+liwiID%OYF-MsYV_e%e4hSCSHU`e zidpnhIgez&?om$12J~a$Kgskzy8H!@l6?Y_Fsyt7;xi!gL`{J@YTNOZV)&C|o4ED@ z8JpDR8)Mp0ATRqP%&?jPn;1MkA?q>T=UOipx(l4impVGsQmf)hGMr({F@RF!Z)?M5 z`+4S2jfz!^7GH8~bdO4b%Bu>?<0@w3kZ&x3iCM(~?S{?8J`gx@%26)r4KLYz>Wj!` z%>ZIARQ@KApH=A%1DZ~RGp0R9XPblE`3Mm5Qd_?P{bkj4l?wz$kOR3`)`>7yl>@ap zAh)lh%8}azihFC=e7~<;=TG$qs}r%sKCGk%lKa2)9hlt3SzRLo_ewz|L)z!>Bl%(^ zRr9?bwPieL89RzLJ)_~_QX1KzTV6X}(As~<6$JEGK$j;sM7bxBg?3MWhF|>Vz zILA=&EddyP>s}{hMq<2x>gj&0-8+t98z;X%Dcso8IsLkjxzA$60s8*e&d@IIX;m=& z;!uYi5R>lpd6vlDLM0=Ko{jE(X{r8&ezat_MUiG$JjFRdom)LuT=D5y)qUHVfk&z5 z=ZX@ITSF)-(@PN26LNIz612B~NtM~U1Yw@Gu9l6OZQQRL6@o3D5b9il-l4fKLDQRE zc}3&FBOl$=`QgTN^;Q;a#Et5CdmcQ{>J@xCrv6S>M zQ+4Hmp|H2)r}%+*LFsjtST29}iIkp}#;pTA1PhO4pQ@ouBoGj{PI)6?7v3?-!kFra zIGBMwm+#k>XsyUr#@!irmNKF3Q}Ur5qB9$r$1+ti8=uizcdJSAabYq5yGvRMy)$QO zHXQ)91{r;NI(+fv5~PZ^u5UJNwxe;8iy5QWA==q{r*kz`#a;%E=FqjmC3&~p0X*vq zi0+s-?PPI3eoXFmIk8qu%uvHrDXcV3O;8=o+p<@TCIKQ+r_{~!WrgibzHmv^T(F4C zJgTyTIwmo;*voM4<@X7ai{xa-s^1eQ_OQYyH=vnSMh3Tco}=%+pTD*CRg!*r;hvX5 z=Y2YEL|(IZ?q-9@s-BNSe!ht$#r-7WIlS_ogeork*h=24^_g{5GJBK zeRW(awF(<&WsT*VR;S%eJZYBUnNqAHS`ad$DQzFtRIq%O^5FNZMx6(axL%R%k28b) zR1jv%X%sFfh3>>e#HQBdQ`!?B;aO7dnuhAMM}nOvFX=@Xi-)UfYLjaEg=?pykmxex z)?#a?fSJRhg>!%Kkav>WU)O&VA$Mx5 z*DyKn2Ac4^1l^eom~16<+nY*ZH;-SwL0#Phx#ey*A2rg1@eG-MqL6TRXP{H-DRb^p zO=EP6k=GH;R^272QaU74@o35V9;8rGPIpR8&@RyhtblK-YdTz$daPql3D>J)>DS>~ zrXPZ+@LkuVTOC=E3`svA;Fj^fRn#O$$ukb~RTfzDHFf)#UHkqT0xWbyhsfVm!wzZg`jcxjdoX4*m6J=9 zdIOcStL&`G00&!&y(*kC0gYZ)QK8(5yHQoXKe$V+LlVnzGpX>;w#oQFVh1dXY4LB{ z3i3PItvhS0X7w7sTFZ70PDxHGOo@s@*sTj_t6Fqv#A|+D7p5kBq*?H-belygJf1E% z4IU;jO7`lSW+0GDiI6~}KCM331bCc+XRgV4Onz8r$SPZ*u~<*q?f>jxjdje+g85q=1U-pUNJvCI_VV*s2da44b-}7f|*E0hRtUg<~!h z%V!&(hZkkid?;VFF|>qb!RBL`AhbB-Z7oL$DuRYR=fFC=_BoHxfxo3EqcL~5#|~~; zypZ6$irqSWCB^m@EMQn#5MIoRB(VvgMYKe@w^F12n(@y)91w7@-|_5t`+$1Wo0oT| zWci&SN8<7$?yt`(X624{q50s%)COVzvmubK3nb1 zY_RLFvq{p^B#w-n>Kv&}c6Hgl1a)76Uc}}|AX-BvZXu4$PgBm_d1!_q5$71lp z`fRy;FP6s*E^V3cR(Y8l8(yIq+RKt>_xlh;DY>K7K2T-bi0T=YxpW=t0SaoB`66=+ zeFGiou)F$n?8+DF^)TVR$LmW+N#Qc1sU~Bp%O%}qzBi`MRX<8NV7$X))-Ei=dOXP< zztcd~MmFh{c~zRWAoU`u`v=su;Cn2M@M@lCzt-v+>!6W++!f+HOqBv}-Y~~0v9UH} z0;vwgC1~lbSLwpbQ6ZUadm{M}9ybVq4VU{mZ>G5;9UM0(OK877adTO5C7iXPzCKNX z>SMt{kR$ZCPZgn98%jf7<{gBQHYHgrI3HNvNv0v zUNo<{(f<=FT!D!CZ`9bwhK;!EiB6dH)djNFcD z(m-r!sD^~G=uIkpag+sCU{Hw`T$yeFQA%t9iA9af{qnr4d!wQqYuke-8G8e*0-4^g&`X(f+hG8YAem z7wCtlC-sBp@qQEkp_Z~vk1|#C zNX0AG`^N}1?j22&x@gw=eV#XP-lfvy-PWa-m|jupV!ZwdX+ArWjSA)k<_{>l7b)XQ z>6U)spPS+6T%-55EaN+BiMe`N>YndMZZ)l^96HYAZDEKVqsD^uF2(L)Q^>XlP3S)1oxX~B(mwFMxec30txGhQG`Nu$3@;N?cCnjx+M&!{ z(VH;wF1FihX@Z|j`2X3ONDa+$vZhKr`(S2rv{qhLdUl`%Y@HTSpY4?i?=Jn$OjyV6 zT>$o0@a}ok$Z97|_y^ebv^H)H_%5V=HNQms3{439ku2o+zmIupJsl!V53Qy?; zE}9+kpI*s&fYf?27g_$Q^wVtc;UjehK*y)!{iEECFG0uQM?%>znOB7TwR&ZM2oN`Y z?z`@8r$2YNR*&;w(ds+k zslM7h(d=i|a0z-}j==c_sgm{^uv8rilzhD!a6msbo_GnGoQSt?pFTZv^$%gMAri$9 z&m^DpGY$Ph|FZNPO*t8wQr^PcCjz8)1bt=o@WMsy;#8B)XYN+!`_rwV%b6N>$tDo* zOVC5e&X&zeNB4ngyNRCd5K+>$cN**xB#726+P7QtpZVecj(tUIJSrZtnEpk>$511w zSQ^9Fy_cuz2_ZzQFPqa~k)Ze;~tn6vn>;^X- z>Lij11^8$G_+V;$^MHn?6nppc0s~IJ#9Qn;sK)6D>)cA_6O0p}f;;XV*imkHQt41V6SJvBzC<6u; z$c~8KON-Q%*Ed$xRyI|)j;w)ss_|+1^&Pp(7x;9PC)6%w8_veOwORZm7R-Vo}a!VyvU-z&O$CTUs zXiH>mJHdKe%cBgv@Fv6VLXnjUtWvsUg`wUZhk56=ucv(i5MmZqi38J*$3UXRg+D3=mCO^<`u$kt5-!1oi zrTK*dv$pDqs$Vzn&0$98L0dLj_|Qm}bGO|ur1R`NcX&5-mU$ofqZn5WnfbD$ZUtAH zApa#zHna9@^(M~eTPUrz!`mc1^Eqmn(F*iF(8mG7M`F?;BrNI;oI0D*)g=DInq?YC zWw5qG0VwAMFw!tu8UZ6M0dPM}shEIA1$*gNP2$$2oaxb$jb~55teB0j$^NZNKA)3Q zM;tT(Hz#{x<!?)UlwF-Q>mj%)QTGb|B{B=?7*V}IzEwNVfmEyYgxUHe%+?ylWJ6p=)!ikdOqHyl zebycp2Fc-oIPHVAzP<#}bpRRtU^$ww(Y}QbrI2H5m=w}q5nqgYqf%90Kl(YGzk9iR zZA$|l`SwE}*fn5Zg}~=62d~^kx%js-#Q8>bIx6@RYCYl`l5@3VX+&R4u765Ws5)AI zZVFxqZ>}oNloS_=dYFr8@Fx6WJj|o%LWwpJ{U-=!X(AXu} zJZn_Gm&H`cNl%Z2L<$39+wKIzg?!WKU1*zZ3!20&6I5DoybqIIclE>_ngx?2;UX596y^HD?>iS-O=HqY&j z4?+w>&*l6TE{?SK*5cD527QlZLxi`rI$+Py3skA!qxC$nHJh@6OHfMzX4p*Q66CK- z^bfub{k2yy^9Q1>ReEs9f(}bH!n0SV#I-|%+bLhzryDFt$jKI}p&(BomS7vs>aHv5 zFJ6)g@N0t0oI4bUy!zEXt+S~-W1Nh9AM)VmCLq!M#;UOd{0-M?vUcsqu3RCEaQi|&B!1d(`!v5?bn^hn_l=+yA=)MTTP#* znteG7y}d@+9011lb&uYkB6z7zIuIeM@4+`MI&HWx$zg`FXyp|DrBu#ejbX1T&>!_sx#QTiZ zI^f|d=JBtOUP`WmP4!%(4$2?DPCp(gdQ+8)4}VwfT=1peQ*nusa zp82<-J~)@&rkqIGZOPq}x}m$+AwHji&HC1(?|{dHtd4{+#};sPWT6C< z|9eVwPrs(9tVZh`z(oCNW=)TR%n}tg+we0C`Tk@->psvLLfr`4Z#>SD$Y&qJsa9 zSyew#eSRTBoq*XW$jo0cR-Zt?tadbH%-UP@DDCf=0a!gBBgwc1(_W0| z$KwfQ)ZUa+42{xOb{b=(v)kl%5lCF^8_CuBCSLIJAR>W?vaFz8-SRd`aIY|D+C5t` zadO7Ah%-MHxi3*rL0Vev0`IOT`HVSQ(3G>cELv2IZen7vdyC7Tfd;6Wyxj(Wb(B?1 z(vo!-ADtfsayJvnwUi%5|6<&2!qw4JU@W15j+*n z^NwHsO(UGAO0oY&)Wp8os9u{5Dt#$+Xnz{KCT^IZV>7SgblhyKr@WWIXRj(T)t;p! zzI7pdsDrdeftQ*2^*5tmJ;I|FcI1*zn~lpg9GG(H+gJU4kv2E?CBGQcb06c`xkmIridQ1&F<#qpSLG~k@CstCI<)YSb^9bLeNmqC*+2fnx3F7E&fJ)l0 zotilDQ9BVYONFU77-Y%N_R2+v!m%@EsdS;3=@)Rz)@#<2MlM_q?UTr^r;b*ZkoqpW zNh7!AIwW~%YLneEe&iyR@;JCJMn#9A&6hv#*HEcZXa9S~_EV zj8&sTbC1W?u{EZ41p=J8PvpB+u}z@J)8(;t{Js(3S%Y?r^@-1 z)#of3Z`|Ji{^fCEHVxDgvlk)Tb6I|%ky6P_Qnd2Eq{>Px&+&lum*)c)&^)CO1E%vA zEeaknk#(tV~}ggRQiaU(=lk~3wDk!Cmpw1qak?AgS9eqpO1ZW|rTJkf8- zQeP#{utLt67V)0&u5xI#^AhJ?A4&{$tnmA-Fd~~xcLP=xB7;^PBq>oO3BZ&8*-w_ z_!S~FTGA}nKi;Tjg#KHLNL7rRjoSsJ!_+kK*m>s-U+oLk`<@Agia9B}jy&IVBj^z; z8?K9G=x6lAMLPX3mtS>jNJ?M(n{(x4e$DAh@-NjfCfdn!qmc=-V=a~d{<Jm@(TN@4J87H0nmmrW=lWmxFdtB2+k9F1x2lh z6U3N$-xX*}zt~Si3_T7|Q;z-Kz?I4;Fh~&*doFsBa?B9+EBv&Djm^EV))MDj4B`&q zl&K6o(c3S%1Z^)I+h7JRL2t^o6l9KxpurdEm|k?@ulF^#C`at44{`!oV(Za<18 z=WhYvXCzc&RUAqiXxLF-8iPF z6=MLD0AB4&&dMaM?M<=HMK34bpX?#ulOeDNIvHYmS{@^ReVg(|GU-<$bfak(Bt0Md zr;Sf{mvFvY<5;Wr+VOEhzrv0aGU$Tro>pK)7mrdcx0Tr|4_Hf#lEUX+i_acGbq&auRRo$R@hkxaM) zOTFUGp@eq_Uy|_9o=LLNK*-4W*{0aKof!)%75}XzVa0;<2viZud;4y_QjWzj91=KI^v zY5Ec4Ws#n>yV+dwDR!o|qsl2Yh0-G?M0gwI%Q=1wh>_eE57dl1sC>i%N_iKWihgZ> z;p%EV_2%>#XZy=f1C_9%9@R>MmPPt5%U56IF7uJwCHZu>7F=YA1&sN+J{pp2F;*_m z+jx*_%ULi8!nt05A}*FM@U38SQSW?1Ys&n0cLIAsHwSZE1(0qGN8_ee2Q{jvyXX<79iAcE_~_Z#>&F&`dO<*q%&yP)&+c^xp#y zS`<-t-F1zRRgR8P0}nb0Xw-k}De;@LDO8W?LBK6sOBt=!#HID)zd zR*<#?-u3E|Ur*EfVX^7pNG6~rZ>!_5{8=_Q0!m28HPEiZtC&W&oTD|X&F-rmHW%&B zdcQmh$}iQWm|s`$a^!j-NhVeJT&n0l zx)Iv`Y5I+*j>@?LEZGY5<(C~zh8;77_r;dXFNmDYa%IZZqw#iz&+%-{Doe|pj~Bw| z?@E@T)~cR1C3|6dT(9%?vo~L)=Arot z_KxO-ssurbRw4IoN^;Xn@{<>XMG_}e3c%z0suu|oe1j?PYm}B-*C+Ves{3n=?OuXr{BGJOI75hj4hl}ehRev=tM*zIYUU&5(-XGq z0XYd;)O~PKYl@{LEmA+_J+N7MR~z+W>sm`F7sNga2~e;xoW>5TC%azvy)x-1FY|eC zl`zzI@U|MB8lfO@k%}3hpK9Hnc>3>_-Z*p-^6HcpsEInB3qjrhi`pi5|86RbfB1je zNp)ZMJq?YWZTqZqm$2J@NgWSZ-^i`E)aU49!jL0p{{xQwDy$mB0&z~P@QQ#}vhfOj zH30l%&Dt>J6KIpNNiVJTlm~11g|?nhLvVvb=G%i=lUck_1bxEWh8xv^I;Yq737mSP6roBR4 zsFOT`G6!0xW$G_yXe;I;-~!XhiBqlh_-GN==%8u$y!2wsUgP-mwInxE=MljRIRB)a z=m49|0eh`(wy(=b&__P>U`Y$9-ZSKfi&SYmuhipgZ_Gd$>)u^I-u~^RbB|5Z^-U)< z@XRQZrvl7o6h=Q#1?R2Od(FX67D~Cg)@*&;eep#|9e5Iz#I0jdO8Tt7ZJrP@Ru(Er zVGZk{o{bdCFj%ku#3bFvySM9DmO{$iK0BZ4mZ ztefHQ5;h|{Y_e76kdGeq)MnUq7)^z-47VaLK|OoqTwe9dB22=0)9soUgVc{VNnp#YZn=m)s_U+0yhf$fXxgIXc$RAn*BVkM z+TxvMJitpeu<=SnG(fm@0iEb9pbhA^28`wul`6t^%L*y)>noUCT}xZ9mS3;-TjMOR zdKu;7sv*!fAU^Z8V0IXfMJeob3AA z$A#ipb$elCt8cyl5|5#+EC(z1SpVeJw&Y^MjA_(ol024FjIYJ1VB{5#Uc%a7WQ!9c z=5|y{q_80%C(n?35{gGx%}7i8H!V4O2b4>o(3cEXJ^v6C_FGPo(3|`^ma0z9W=dE% zs^v>Y_@qU_*`1uXfKzw*(_xu>LXRfZI{pB;j}}6*Z6~exlb%~hNwgbwf61DP?2gzn z7$&h()zbbs{%g1^ZaP}p-ed6PbB)>Q1v!>xBpeOZTUlsVM`_PX)c>q1aXokJIPu++ zWLW;RpUwAHMhPcl}Utd#y z*Gj?-snYFGhE&a=NIQp_J*ErwlXLA$Xoq{)%QKcT_LS>Krq}d$si${m&^c#5C?0~) zFm~jzo|3}dsJIZu8Cg>6eoZAVb_*tY@81cwp0#@{kVA#v;N^t3YSgWG7HjL8X(q}7 zBL}$;Y@gk&_Nj7MSEF}`+SF22PJgs6aSkNGJQp>tT|PtI>Os><9eiK6?n`ryNNOw% zm<^avbj{OO-iOGDsO6L%gy+Fn|3{)*(sKw>E*zztKmz9HU9xRo2IO z<|;%{Uv>&wY#L9DY(`aCQ+$L*z`sYVxxC+))C9i#LrNTQXPmMo#F~DW`fw$@qIxK- zD6S#i#pc_Uc8mpdq8;R1>=NWOe31sJ17Fzv7&^!6{a^33Ih*(dz?KpV=wU3Mfrl2b z2bQUfJ-JJ7ctEsG&xC^&u8HHl-KZ}6tFxMIFU$Nj;+0xtTxS(SqRP-7@x-CR>>Q= z*VWgYzqqNgK#XC7v_md3mtygM(@)Y70bEXLp+bB&@m_dyAmTltM{2KLZKnRK+q#}T z66ZjC;~RRNJ9TK_f2VG$iIuo&JU-=|#zby-LD!5)|_vk^UxAMp|&saJ)n<+A_LTx?L&qkQ#J)RsnhqS$({Qq8qrF}GQ6vNYB? z@(vEa?sS8pi>-*bxX`*(Apq1X#)edSV)J!zK%t6?FSodo>rb=W(XC}$ z!v7w7;8oaNE^E*buTj1WHeOxMc8!lX{h?!N^M&$6n1&7@F&jBeS{eY^A{x27Z1n|G z4e@HO8Juk5Vr6Mvx*`$8G2+5Bv@XEdl@VZYtnwd17q|#)XfpJ6Jt>*hjsPAuX2aJX zQA{V4=lJa+@DjGmDJS(e7aykqB3155NsOFgKA!O5C&O;d=f9^Yg&Aq1e6;U4xdQol z@88L~EEJHia!>MUBcMijjM&s1o9YAO7y-xw1yjO51=H{k*mRx~S4=4Ws&?5B)miHToY2&>^A$lILG9Wj~#XRwZrdkYnX z=h_#R|EQ&CuoN2UvcJB$wre4mva&8GCY}##8*p*Xyk*tG*4&Bg$^KaErj(T`mc&#Wg#%?5B_`aQOoO^3OJ3cJ|hxrWrPVoGA&s_pres~_Ji!(X)CLp?G>B)0l5 zsgwT}O?d;$GgSe@zzy$t^ki`PrG*W zebz_GtcV7p#gPi~Bize1KewCw$!C+OjRhVmzN&4lsH7-ya*={5F`eo=~1NUk2A zLa1+BBbiQ2iIIDeEtH#g&l`Q!AGBvY97%N?936szYY-++>s_gz(j_~G6XU-i(dG9` zlH$y4PdQ9#zyL*Y;6F*B2@l~BJ9mpOBGMy2|9$q@wbmnHA@I-jDF9kqc+dKn z1@*r45|r!5j(U&S>ppfxH)z?=$$SmE1Zl_bp5C8U`@&LF#N7SFLNTD1IXUQ*i?fgB zF{A^~Y7VVuf|-$KCoZWuT^PJ~7&-v&4f#-d_@60^2e(Sr|`mFW-%HQwBwA;Qu67SYg_OJJx zf3!f@OVEaFdLd_WdO$AX{M_eVU8DhL_Ck0|8a-xg1#>8_^Q=xKWuidZm6>q3v5026 z99t_kYyQI}t8Or;e?3L`qB4o2HKsVhj*Xa zUwB7k8+@-HdSzH`esPC9+opdZ?Q33OU0&H9I6s&hJ&qHcsDJ#5ac%bbmo=(mhxUcv zF%G)udru>A>4CHL#aGup`iP)xsB6_f@C{Tx-hbJC$rVOCt^je}^0%p@f-pv{anF5w z>gP<)KIgX6wXbi7x0aQ%|H!}5Nb~kZmlz;Vg}E1F7IL55A_+g-LHmIDe&X!>t+`Kv zfwKK}p2o}9_vFp7bFSOfn7h>F#Eh5qhThKh6->VJ<8%hXpcco4jtV~fqdfPSRw#6~ zFDF0nRBs{mll;v;?@|IjMZRmOcQI}^X)&aq(U1{M+E%L?NS55XbYe1YxY*ajwZhiL zzr-$7rFm!nVI}P5J=OuGw@CY5@gH{F#9EkE%Jy}p;eMYRne2Y_q&>n`a?CsD=O0-j_b!=E5_>nhlyqm>#h4z{ zPd)C0p0j@GV7~w6$djLm#&#(;Ll1A5qM?PEkjnX?ZqBD;wi?Qo*$lCkw*(RfKAI2gkL(daJ$F<)FmeA* z_idx=m%52ZHCrpsC7y_9yDj{}xO6rxFtSmsU#f*N*8?L##n0Eh&s_JrgUvDhEwvS< zHFn|*KD9>dP-j&$y%z#qZ6wO(Gla-D0Ja|^(N#-PLsNY^8`?a&dhayO&@nbsnKQcTt*1+uR774)Qqbbz`Lb&x71zPLyId~7y3W}x_~WE4r@ zlE>Le=>frpz5Y*XrCwfY9~&pt2j6ENtf+PQMU-kkq0*E_yQp8cSr4j%$cDZ{!F>C_+h?gc*f`90jTto+y~o%u2a=^rf8jA8D6cs##zuKNRB z|H7HV?JSz-lv_2azMaI${<3B!A%lE$A>cy%iXm+U69Ny-$idSySC)K10LuzUQ>KAt z)9>Z`L;3wk`MvNj?XjaP+d!N?A9G-BS!(}88V;#k!p*M;fiN1bUwHFnO{AL*Jl9A$ z`tLsErz5{2A9AJGCu4a-$(Jym+%2vYEatOkO;XJYx^rZg z?Y^v0ZtD?4+-1XBW(q@2_I?A)1h377y_P9M!!%cLs*i||van*a^uCe<3N|oN;N|D< zs2N@0DJqQ?iX-zYq0_s(*h4H{66_y_Fbsv35K3%%I)#@kqdCqr1m9X~!p;88tEn-N z4LR&!dTVc&%e*?0X?N)G00?q(T>R>LsB-~GUQ3@%msfBSj~*+3?O=i1>1!!9ae;G*p`ZXojpCVL4AQZC%lf;Y@e zE-2w;)Uv>lZ-`*&qC-~K*pf!bg@2hr`0B$NA{&p#kvD1=Qa9NKS76~$d@sFNik!7{ z4)%c72+CQZuCAC!R%~i*Nb?t&@%Fa81{+$z?B=7QprmKUH8t-2{pH)u^JvJ#X8VD+ zyZig^!$mQ0m^9+P_%6lo`X_JOgO!DPaM(Pn7V6)kX?U@+P~tT+3l3ctDMzY?(b?6n znQ`NzcsNvn@lX3{5sRP4NA-ubM)qV_9+Ru0jZ&SS;YxOzs;6Y+sNEyabPloh+Mnz& zlBy06paqP{yNxNt_7qEOyH=H@tvQab8aE>#0ILcn@c`qCbD@)F8k!OXWS@tqcuh|R zqUE6PJPY!Ao($P6SJ==1Y9L+%0LrTyWC5ZEcE_sm5neUN?GvPZSL@9!ywcOH&iVP8 z5yJ4Lk9k*#bhXnxR~nb%6`EB6wxi>SBPZN-7=QwXQGjcw7$)uvMy>8B|+145v$|hclCh zDxHBH@SKHhWv$z#sKq^9yQ;&@L^j#Z%R3ji4w{IOucpiFe5wt9Zx3SzYYqk09Ng7# zD|oS^CX~4M&5MqQ!Q#J<{t70oz3=U48xuIA=8d@;UnHooZ+4azyx3*O$fUu^P#>^p zaiIi@nbohgQ36hmhQZ1Rb?>h&-#+=?9ZpKxgF#0}^=D`4mGL_IaB`6Y3&YX&U~!=y zyv@OQ9Rn6$a#G9Ah+WRXFNLYUCX{NKI$8cOEF>Kh)|q1N=dl6)v{DU=HEI=yqovB+ zfH1m!(9sCosSwNNoQjHS5SNkG;4;hCXd!|IkjTlCtrp_rNn!Y^W=4)CnO~prUG2rM z*7EX0S~a8i>N96nD_~%jrOmmT+-A|&o(}H}v}yQIt0@4YAb)Q1fWACE$8FOH`4Dxn z*kWmJIc&xav5McXx@K(>x1zOskhk_Da&k8B1m|n8HTOk2HQ##yXY2v@3q(TqNFTS& zgDMHVtLG(2gxKn@fbdL|R0R>`<)^@z7l1u3uBlv?JvHVr(h#bMIurczMiYlssk7Ck z<4~oKM;#;h%H|+}bo6|&!%g|ft!F~QjnG}YA_->TufGdBrlPZJ-O4d;<$4bng$`yM zvt9PF|Mm=GkXtQtw3az~WyUdmh?$7ZK2y7bsNLIn5fm}2qw1@8)mK>{-4gA;aVqnlpo}rzf*Qm zmg4xr((t3HPxn*NEG12xkf#P#GcIYns7bI^3F0DSwgA(ZtWO_kHs2L^owqSk@* zgVs0a1hjuggP(`Orv8w>y+f?ooO?I`B~j_!hS;4c@5vSWZz)PCOgI2VX(z_D6A{4& z0`1>SXIFC}3eXW)2@?N8(8E;lxgjS{aUjVEgSJxa(FC|WyqY%wv4~6jbON{r_#Qxr zCoC2B+jdgf);wBr8LSqw(Z2C`s$FT`meM*ps?7XUyFks7#*fWe7rcCeE$ayhM1C(H zqMnzZQg8jBNv~lzpSg&EZI}%vnKN{u*qJQf+K|q(D_w{0MQ5aRVet7<7i^NCrO~EL zx(<1!I(fdR=?$*gcQ;R7W2C$Ai6ctpML{t)whnRiRWETwzG+qzkz)Klu5@>u#$?6D z;|*B2`v2ucNh2N`=%4T(9c?#|yVFalgtr);dDW`MP51Uv-sHz9==ze3oX#BT`~kMB zyF5gh_H>TMqf)5%8@(nJc0?^&?wEdDjH#9B(A`-LZjIgP?#dTUfRr3De%`v)`&M2) zDju+6l+$pO319VA=c{FiCqwR@CZ{f;VG21w)mevd z@mEDVuBU4?X9f>`Gk_RcI$-Ip?zzU_teaYo7bZIDMHE3JAg zPKcVa{yCXvoR{H=%uL~pSY^~m=hMxg&6um{J0pXyU|~bbc!EO&?zD(ZmO0+IhPeO0 zyr?(kMmO3m6_;JjV#bY*;z5?<-n?LDaO38;GRqCX-|8%`KKWab=SAQ@ztn0d|5o>d zBL6D<+*n>*xGNz5g_-fk9<~D85Q3d^I7=s5J}^)^-q(+w3VS0@>iU3dr7iU~Y6?7Pc|4e zEjwIvgdI9MxYE~QMRN05`J{Zea3-~oyz!@kO-8}Bfv{=tq^z0DNW=Nue7+|2HO>m0 zcL|=aGNV=9Q^0%!*FKyOoCRBF!rrln5OZKxNip*5Iv?0}P}o4n;r1S|Z6+hw2exI? zrDomoqt5nm_4#!g6G{uKWAOw?vpnx$+m-$9eN|g`&|60q|1;zNEVlbo#|=`)@gTiO zp)&jU?e1wU`n1;Fy>JBDf8@bmBEi4cedKmX(2!j2V4*JJ$^_7t2nI3Uk318>aI&9% z`Z+#1$j>9^@|~M-0Uqg4T;;Dvao@jOvjIMRp7iqYN~EYCa$f4fw9L5oQ2sCeA!33ir5^hbA1tk fV(G^UPLSDHQO3C^H`4e}5*qxlU2IhW{tNpbuc1ZG literal 5838 zcmb_gXH->i2$F*+pyVtW5m6*3NlFmO!U#he zvXYgoB*~!g_MrEid)K<}$6M=l*YxaNRbACx>+9<7eKv762f#GdHPit-JUrkpumWe3 zfC>O1AS5ItfPf7I0wIEu5ktX3K}vdo3{F8w38#R=sc4z$sHhof;Ba~ldPWu&Ha0dY zI!-Q5RxV~%HddSwJg_U22ue;&OwLLTr)K>>m$P;NP7I6z9|`a{0em*(N}Lc6zz1djF2u?3K;dVAi~y9v2w(t!x6>GSJ%_pZ8yZdP(3It$ zK0G)-Z@oGu6X8E86YSH^&QcQzz54}kQYI$CZ9ZmZzMXn^IqQbk;I8@*mXlB~lywyf2dUhcxju@s0C1EJhulW$K7~YShGbXNoR$ zR*+gZm&dQw$`?sDi94`xzMmS-gG#JwdA^VqAAj1AH!M}Gpwq|GFV5%y+UylfeHp^P z7CTYb7oR(Fq%>5WX~z>jUqG~E=@Y2fB0uD=Sh({`P0N>rhF^!uDcO#I#2=j`h4Pln zi%&&fUvWc*?AMguY8LmgrX@8s4^RFcaH23>|3*%B*C!nrmC)3F0_~kQ>Nc@kzFLE~ zyd3%dKGs;rk=w|4cXL3XaVIFKZ)9c7zx4gOWqA33bg4hTroYs-%jh(wF6Mq+PUrIe zTg8?gTS=)RO;6>TN6Uq18b;AkH3x2^M$E%(Aw=Lz;dR5WNWEp$OnUcFK!hRr%+;a_ zo97i*zlm*QUgY>0SYW-vz@A}>yzhN4l|&C}d29+clwyWwccv=@RzF=&-KEr{N~7|G z@(m212IlvuYGsl=DXMLab*%dO-iNY8K-mTJK3#89u-?ZcN=~0$pIsv5A$K1ScOR`r zAKe5zK}f+j-n&ld*gW0erK7f1Lzp)?pAtd|;Y#t~@72oG*2)yDz9eK}y2(^tUy3m% z|ME$w9m^GlQvsFS9C`0^7+a}n)T-KP?8UiNi~%C_z)I_#bGXW|%dk_!+&%+JAXs@| z03HE86ol*Fh{Yk95<*2y%PuZ)4K6}N!vW%!7{oIk1V6Ljeo2;Q>L8+*VRq*eXG4Gf zvjZLdPvm|w(IYvPiLYRu%$@O`_Dqt%Co2S0bS8ycJM>l#hZUKK8J-ONrOmi8Uc zS$)=cD3)elb6qw!3)}CoEa91u_q6|By5LoCpJIli8->)`_?f(du z*5dp;)}R#wmhhrcHH|N(FM6I03*V!@WT)z?-y;i3Kt5w`X0rN%k);G^%5Ug;+Bokb zb8bp~eZ5nheu<=J(T-Uct`npEQtJY9NCdf(kpnhY&xxvqhy1)t8)v5g7RnCFp1e_I z4AFCf*XeBowu85?`sNs7CO6&6T%H*M0-B!)L zdAr&6zLv0OLI24{{iD4>>oUcgcLqpCDCUA#5`lwQBETnrKq3Fii#RO7DIx4IYEdFF zW%ooX8V&=)94w~@>hb(Js=!34gy)>AUVfY|6#kdZZwkYt!;llrT`|>*m~`Q)$LkFq zC#FJO>PNJ_T3OF^hmmTsaxV&+qXoIvwMyxRogrT$Uz>B}ITjZx`}&So%q{i1*{TOY zB&RPYrAzs;?4L@h3$yk+nik4R@BKU_dD`uCw@}9LhN8?j4pW$1r=DXk8ZtBN*Ai#xZSNlj z1vz_S?{4nhj-_*nq5a(EV_Ic3c}oaGd&S&Yi#{isKIbt#2T0&UG_6Vw7+z60fR7Il zK!^yT|Jqyd@dya1s3CApQ3E1M4l#YKvSDHltvCYZ{%F4HJihq2_@?-0OsVOtIDX%i z7&~S(zpo?M#FI9YtaVQ#zbnr- zq@bNyn(b4YF-hwjE4m7}rl0aHkZb!?T|Y(A`sIpgIJaN4VLQoSImuwvT7JNoglgbY z3uNc!H=^?v|ErseeA?)7>xyYuq#XU*FT9rY0*E&<`T>1C7n|NrI?i@1#9JIi6n1Pve-Zeox)?Um&Tc|Ti*YO=Fk*yjQ(dO+W6Xl^ESH#IWM10Rp(kQ6u%$c;y)G~xSX4)m+*)Uy=xqEB3-(i!SL^+6h*f!)4Db+5Rzv1n{|#JP$^y%GNRU&Wea`W{tuUC}^w zAkXQ6I0zOAFt6j|Lm^N?e1hML5qB!_02iaEm_#Bwhsd=mDo$m6R1#L)JvoOO!L_yh zC(9El;dA%Dg>Srnc}ShEm}|H$N*w;|R42ygimz+MFTV0^p8Tl*WOK>J>}^ZFIG3bl ze5Z=Be1}i?rN)y?&Bp~9aV4XZN3?38Ygr_clB17pe;;BH)Bgsp5WfzuJO7FokK7AFE$}UoU!-`>!2@WcJNj~pZ#Z} z$t@p`*4wi#_tn{-WFeUah|YjDeW*L#I_RtK?W8=sZRf)}Q(WC~ToE|J_|fEOwj10* z(gEb{%zZola&<=fv%Nn&f@x`ZEB#W6aXrStoS{7`BGVti2GOiyuu8 zVr8Fc&O*8&ZwS{57t&494aaPdu67;}YD+23KH}LR`_Bmduc7l+Rm~eJM^0Zf%XE!1 zi?;iJ{(&|@yV~DZB}%W2&s;=;5aopdVE+1j`1rG5;K5<~TO6Xw>?o0I?vE0y+H$bJ zw+Zm@p~Nw?mPLxpiK*w}eHc#9gr9lPfZsE{Q!8c+U4P5Jx%octmZwmzX<6 zUTgB+^f&`@ZQ{zCq8@TJMHJ=5*^qh9`9FP{Ehmo6ip@h^y1?*PJAy9nwNQ}fW?OvG zrPhyAt;k;6?^INY{wCs=Q5E9)`u?{m`ibzryrR?gyKBu5R@rJ* z<%uvgRhM>y4>e=!X8`lT?l&mLGOJtY_536@#-)n*(3-wWoWLu{^E(0-s$S5xRaH2k ztHPS&RrCqvJ7iKlr?dTdMUEzf{ep=H6DSnFIdDTWv@ zc44Zb+&RLo!suM)4-#W>-UODE$%sXa>1y4_F46dgXJla?_;d7$X(S|neJ<|}+4`tN z_NOtIkf?WF2^Yo2di74+5fTa;=1S7w0^h6|o>sPk!G)FL7|A1D;#8>MCRnI2I~XS1 z({D|jfD{$nqFHwMy<-9;B+S2>UYYE*_;P%_7t9xDKnt#!eRu%UX~5>`gkxlm7o+SP zm~YQ-gWy#X0AQ&XXmM(1z~+NS4C;bkr7{Guq&4K=BoHsNw*4yPZrX!`gIV_}Z^X1( z`taua+g{nEOScYg{3yvRS?JQvvvyyNRcRE@Yd-_<;)0?k1w3ArhxnMsVD$ugm`pTV z9}{uYmBAhu-Rd9{_cfu=Hd9d{6X|qEwG|ap1#C9o(Po5<;~xz)9||}5&Vs9x2aY@O z6Ab1{L^>{( zWmjY96<$B`uWR&Sl{sR0uqRDbUn#%YI|AsT`-fx|cV-;7Si)zY&zN#fpiMLc z2k92p9`;>Eeog-QLrwux<7YPU7xSLqF5ANy@;i@-9nfZ6N$MS=D7QTk=ZK)o(&EE0 zPgg(00fTMnwRxe7o@amp6HFOW%h=78rUp7w;rH64 z1iEsbg&=WW;`>JIbS(*+Sd%c%Ka6@}$Tpe!>a*V!M44EJ7JZ()F0~C{8D)%ze0osf zxoJ69OWP{eY7y_mnLN-d$m@t7k~HjvTKpMctEji01s8L{IUhBEKWCG&1soza*KuthDOuq z0MlMsEv%*3oMl!^Vb50j*ID=j*X`#|5k2t<=t5U+afrrEf!*cttzU)O(MI3FA>OoS z9N~BIppgiavl21Nr7rojG-@8nVpizuz394N(y*=|rB=SM=OJLRpZ1AS41E(`!kv;I z{UVs5?ByElA~S^=c{7XlLO)0r=3bU1j1ds;9UNp~xH~L}S$y#O%Ri7+M!`VLKH6qa z6v>%y`*X?xA!|49>A&SZ!GgaU)*=1+hVJHaxJa5^eDw_m^c5MK6mH8-sM2(vnbC@8 zfm}v{1DVLOlzKe1`(&NjNUhB6Z~nXY6oldm^(WZ3zF2SW_}@(ZuOuH!@N!t?-OBTi zh;Wv!SZ`92*3;~o;XpmZNy|W{#C>)=IQHmMaHL#(cJ8N}i{{ykRT!1zfJaA5JS34T zw9kXKpl{<(ug@_}h8(v9C^;b;gs0Lsv<|pWl74ju?gx$q4k_*Do&gA@{lfLa_4%up z1Ui(NDPF&POblZ3DuZpB*_sWQzLHeF`=BXSi`YSaHRj4W;nG?XlXCE{x1jFdY>@XC zg3)r{k;3Z?a8SmX`8RcqOWw2;BO9TxP?)lP?zupNE0lxy14Z#PAuN=Gkk$-z33|N1 z75b!}&G6m1>Br|DlQcNEIEec|O=1M>F)UiMl~!{)vLj)eV@N-37yc!J!Fh~vf=a4u)SH5Lk8sMHZsVA)~s9dlm-|NDZC z!k7MRL8NeQv8sTOW9{!zpTSuW8?)6+ufPz*=J3{wCMFS7Uw4&+KlD)ZQ+4?n94V&q;pHhx30P- z5f6{Bc}%|xPo7b8a`Lsrhf5oq$Qp9%UbmZtNhYlJ2(OdkhQ_Z5;;}OFvACl?o zo=flCIRiG#Gz~CVl@pesl$@0O*Wyzlul(tyNu&UoM&^*#{deg$&C*?m$2nuOArfDA z-kspDJHySo3XxH^d|GRIr^{aXe42U_E++L9YtqRZ0aVJ~P)@h>_VKq{Z`U8#At>jd zR~SRS$r!#!&iL8bV~~=cW=OH-tEtz)r^0(@B9EPI+&cvB;?(#)C^bxziFELyc5zy@ljlIrA~?A{6i)xA z>+jwv)i3qy#2V6LFKnNFeG6AWvMu?4i*H!Y_Fv9EUU#*wYYcc>+#^K9n$F-#d-myn E08lo9 Date: Wed, 12 Sep 2018 12:29:43 +0200 Subject: [PATCH 12/27] Merge pull request #12249 from kopytjuk:feature/region-layer-batch-mode Feature/region layer batch mode (#12249) * Add batch mode for Darknet networks. Swap variables in test_darknet. Adapt reorg layer to batch mode. Adapt region layer. Add OpenCL implementation. Remove trailing whitespace. Bugifx reorg opencl implementation. Fix bug in OpenCL reorg. Fix modulo bug. Fix bug. Reorg openCL. Restore reorg layer opencl code. OpenCl fix. Work on openCL reorg. Remove whitespace. Fix openCL region layer implementation. Fix bug. Fix softmax region opencl bug. Fix opencl bug. Fix openCL bug. Update aff_trans.cpp When the fullAffine parameter is set to false, the estimateRigidTransform function maybe return empty, then the _localAffineEstimate function will be called, but the bug in it will result in incorrect results. core(libva): support YV12 too Added to CPU path only. OpenCL code path still expects NV12 only (according to Intel OpenCL extension) cmake: allow to specify own libva paths via CMake: - `-DVA_LIBRARIES=/opt/intel/mediasdk/lib64/libva.so.2\;/opt/intel/mediasdk/lib64/libva-drm.so.2` android: NDK17 support tested with NDK 17b (17.1.4828580) Enable more deep learning tests using Intel's Inference Engine backend ts: don't pass NULL for std::string() constructor openvino: use 2018R3 defines experimental version++ OpenCV version++ OpenCV 3.4.3 OpenCV version '-openvino' openvino: use 2018R3 defines Fixed windows build with InferenceEngine dnn: fix variance setting bug for PriorBoxLayer - The size of second channel should be size[2] of output tensor, - The Scalar should be {variance[0], variance[0], variance[0], variance[0]} for _variance.size() == 1 case. Signed-off-by: Wu Zhiwen Fix lifetime of networks which are loaded from Model Optimizer IRs Adds a small note describing BUILD_opencv_world (#12332) * Added a mall note describing BUILD_opencv_world cmake option to the Installation in Windows tutorial. * Made slight changes in BUILD_opencv_world documentation. * Update windows_install.markdown improved grammar Update opengl_interop.cpp resolves #12307 java: fix LIST_GET macro fix typo Added option to fail on missing testdata Fixed that object_detection.py does not work in python3. cleanup: IPP Async (IPP_A) except header file with conversion routines (will be removed in OpenCV 4.0) imgcodecs: add null pointer check Include preprocessing nodes to object detection TensorFlow networks (#12211) * Include preprocessing nodes to object detection TensorFlow networks * Enable more fusion * faster_rcnn_resnet50_coco_2018_01_28 test countNonZero function reworked to use wide universal intrinsics instead of SSE2 intrinsics resolve #5788 imgcodecs(webp): multiple fixes - don't reallocate passed 'img' (test fixed - must use IMREAD_UNCHANGED / IMREAD_ANYCOLOR) - avoid memory DDOS - avoid reading of whole file during header processing - avoid data access after allocated buffer during header processing (missing checks) - use WebPFree() to free allocated buffers (libwebp >= 0.5.0) - drop unused & undefined `.close()` method - added checks for channels >= 5 in encoder ml: fix adjusting K in KNearest (#12358) dnn(perf): fix and merge Convolution tests - OpenCL tests didn't run any OpenCL kernels - use real configuration from existed models (the first 100 cases) - batch size = 1 dnn(test): use dnnBackendsAndTargets() param generator Bit-exact resize reworked to use wide intrinsics (#12038) * Bit-exact resize reworked to use wide intrinsics * Reworked bit-exact resize row data loading * Added bit-exact resize row data loaders for SIMD256 and SIMD512 * Fixed type punned pointer dereferencing warning * Reworked loading of source data for SIMD256 and SIMD512 bit-exact resize Bit-exact GaussianBlur reworked to use wide intrinsics (#12073) * Bit-exact GaussianBlur reworked to use wide intrinsics * Added v_mul_hi universal intrinsic * Removed custom SSE2 branch from bit-exact GaussianBlur * Removed loop unrolling for gaussianBlur horizontal smoothing doc: fix English gramma in tutorial out-of-focus-deblur filter (#12214) * doc: fix English gramma in tutorial out-of-focus-deblur filter * Update out_of_focus_deblur_filter.markdown slightly modified one sentence doc: add new tutorial motion deblur filter (#12215) * doc: add new tutorial motion deblur filter * Update motion_deblur_filter.markdown a few minor changes Replace Slice layer to Crop in Faster-RCNN networks from Caffe js: use generated list of OpenCV headers - replaces hand-written list imgcodecs(webp): use safe cast to size_t on Win32 * Put Version status back to -dev. follow the common codestyle Exclude some target engines. Refactor formulas. Refactor code. * Remove unused variable. * Remove inference engine check for yolov2. * Alter darknet batch tests to test with two different images. * Add yolov3 second image GT. * Fix bug. * Fix bug. * Add second test. * Remove comment. * Add NMS on network level. * Add helper files to dev. * syntax fix. * Fix OD sample. Fix sample dnn object detection. Fix NMS boxes bug. remove trailing whitespace. Remove debug function. Change thresholds for opencl tests. * Adapt score diff and iou diff. * Alter iouDiffs. * Add debug messages. * Adapt iouDiff. * Fix tests --- modules/dnn/include/opencv2/dnn/dnn.hpp | 5 + modules/dnn/src/layers/region_layer.cpp | 100 +++++---- modules/dnn/src/layers/reorg_layer.cpp | 30 ++- modules/dnn/src/nms.cpp | 12 +- modules/dnn/src/opencl/region.cl | 6 +- modules/dnn/src/opencl/reorg.cl | 11 +- modules/dnn/test/test_darknet_importer.cpp | 246 +++++++++++++++------ 7 files changed, 286 insertions(+), 124 deletions(-) diff --git a/modules/dnn/include/opencv2/dnn/dnn.hpp b/modules/dnn/include/opencv2/dnn/dnn.hpp index ccb4c85635..e418ae4066 100644 --- a/modules/dnn/include/opencv2/dnn/dnn.hpp +++ b/modules/dnn/include/opencv2/dnn/dnn.hpp @@ -934,6 +934,11 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN CV_OUT std::vector& indices, const float eta = 1.f, const int top_k = 0); + CV_EXPORTS_W void NMSBoxes(const std::vector& bboxes, const std::vector& scores, + const float score_threshold, const float nms_threshold, + CV_OUT std::vector& indices, + const float eta = 1.f, const int top_k = 0); + CV_EXPORTS_AS(NMSBoxesRotated) void NMSBoxes(const std::vector& bboxes, const std::vector& scores, const float score_threshold, const float nms_threshold, CV_OUT std::vector& indices, diff --git a/modules/dnn/src/layers/region_layer.cpp b/modules/dnn/src/layers/region_layer.cpp index 596cf71c62..2d74443e08 100644 --- a/modules/dnn/src/layers/region_layer.cpp +++ b/modules/dnn/src/layers/region_layer.cpp @@ -90,8 +90,13 @@ public: std::vector &internals) const CV_OVERRIDE { CV_Assert(inputs.size() > 0); + // channels == cell_size*anchors CV_Assert(inputs[0][3] == (1 + coords + classes)*anchors); - outputs = std::vector(1, shape(inputs[0][1] * inputs[0][2] * anchors, inputs[0][3] / anchors)); + int batch_size = inputs[0][0]; + if(batch_size > 1) + outputs = std::vector(1, shape(batch_size, inputs[0][1] * inputs[0][2] * anchors, inputs[0][3] / anchors)); + else + outputs = std::vector(1, shape(inputs[0][1] * inputs[0][2] * anchors, inputs[0][3] / anchors)); return false; } @@ -137,24 +142,28 @@ public: UMat& inpBlob = inputs[ii]; UMat& outBlob = outputs[ii]; + int batch_size = inpBlob.size[0]; int rows = inpBlob.size[1]; int cols = inpBlob.size[2]; + // channels == cell_size*anchors, see l. 94 + int sample_size = cell_size*rows*cols*anchors; + ocl::Kernel logistic_kernel("logistic_activ", ocl::dnn::region_oclsrc); - size_t global = rows*cols*anchors; - logistic_kernel.set(0, (int)global); + size_t nanchors = rows*cols*anchors*batch_size; + logistic_kernel.set(0, (int)nanchors); logistic_kernel.set(1, ocl::KernelArg::PtrReadOnly(inpBlob)); logistic_kernel.set(2, (int)cell_size); logistic_kernel.set(3, ocl::KernelArg::PtrWriteOnly(outBlob)); - logistic_kernel.run(1, &global, NULL, false); + logistic_kernel.run(1, &nanchors, NULL, false); if (useSoftmax) { // Yolo v2 // softmax activation for Probability, for each grid cell (X x Y x Anchor-index) ocl::Kernel softmax_kernel("softmax_activ", ocl::dnn::region_oclsrc); - size_t nthreads = rows*cols*anchors; - softmax_kernel.set(0, (int)nthreads); + size_t nanchors = rows*cols*anchors*batch_size; + softmax_kernel.set(0, (int)nanchors); softmax_kernel.set(1, ocl::KernelArg::PtrReadOnly(inpBlob)); softmax_kernel.set(2, ocl::KernelArg::PtrReadOnly(blob_umat)); softmax_kernel.set(3, (int)cell_size); @@ -165,14 +174,15 @@ public: softmax_kernel.set(8, (int)anchors); softmax_kernel.set(9, (float)thresh); softmax_kernel.set(10, ocl::KernelArg::PtrWriteOnly(outBlob)); - if (!softmax_kernel.run(1, &nthreads, NULL, false)) + if (!softmax_kernel.run(1, &nanchors, NULL, false)) return false; } if (nmsThreshold > 0) { Mat mat = outBlob.getMat(ACCESS_WRITE); float *dstData = mat.ptr(); - do_nms_sort(dstData, rows*cols*anchors, thresh, nmsThreshold); + for (int b = 0; b < batch_size; ++b) + do_nms_sort(dstData + b*sample_size, rows*cols*anchors, thresh, nmsThreshold); } } @@ -212,8 +222,17 @@ public: Mat &inpBlob = inputs[ii]; Mat &outBlob = outputs[ii]; + int batch_size = inpBlob.size[0]; int rows = inpBlob.size[1]; int cols = inpBlob.size[2]; + + // address length for one image in batch, both for input and output + int sample_size = cell_size*rows*cols*anchors; + + // assert that the comment above is true + CV_Assert(sample_size*batch_size == inpBlob.total()); + CV_Assert(sample_size*batch_size == outBlob.total()); + CV_Assert(inputs.size() < 2 || inputs[1].dims == 4); int hNorm = inputs.size() > 1 ? inputs[1].size[2] : rows; int wNorm = inputs.size() > 1 ? inputs[1].size[3] : cols; @@ -222,69 +241,66 @@ public: float *dstData = outBlob.ptr(); // logistic activation for t0, for each grid cell (X x Y x Anchor-index) - for (int i = 0; i < rows*cols*anchors; ++i) { + for (int i = 0; i < batch_size*rows*cols*anchors; ++i) { int index = cell_size*i; float x = srcData[index + 4]; dstData[index + 4] = logistic_activate(x); // logistic activation } if (useSoftmax) { // Yolo v2 - // softmax activation for Probability, for each grid cell (X x Y x Anchor-index) - for (int i = 0; i < rows*cols*anchors; ++i) { + for (int i = 0; i < batch_size*rows*cols*anchors; ++i) { int index = cell_size*i; softmax_activate(srcData + index + 5, classes, 1, dstData + index + 5); } } else if (useLogistic) { // Yolo v3 - for (int i = 0; i < rows*cols*anchors; ++i) - { + for (int i = 0; i < batch_size*rows*cols*anchors; ++i){ int index = cell_size*i; const float* input = srcData + index + 5; float* output = dstData + index + 5; - for (int i = 0; i < classes; ++i) - output[i] = logistic_activate(input[i]); + for (int c = 0; c < classes; ++c) + output[c] = logistic_activate(input[c]); } } - for (int x = 0; x < cols; ++x) - for(int y = 0; y < rows; ++y) - for (int a = 0; a < anchors; ++a) { - int index = (y*cols + x)*anchors + a; // index for each grid-cell & anchor - int p_index = index * cell_size + 4; - float scale = dstData[p_index]; - if (classfix == -1 && scale < .5) scale = 0; // if(t0 < 0.5) t0 = 0; - int box_index = index * cell_size; + for (int b = 0; b < batch_size; ++b) + for (int x = 0; x < cols; ++x) + for(int y = 0; y < rows; ++y) + for (int a = 0; a < anchors; ++a) { + // relative start address for image b within the batch data + int index_sample_offset = sample_size*b; + int index = (y*cols + x)*anchors + a; // index for each grid-cell & anchor + int p_index = index_sample_offset + index * cell_size + 4; + float scale = dstData[p_index]; + if (classfix == -1 && scale < .5) scale = 0; // if(t0 < 0.5) t0 = 0; + int box_index = index_sample_offset + index * cell_size; - dstData[box_index + 0] = (x + logistic_activate(srcData[box_index + 0])) / cols; - dstData[box_index + 1] = (y + logistic_activate(srcData[box_index + 1])) / rows; - dstData[box_index + 2] = exp(srcData[box_index + 2]) * biasData[2 * a] / hNorm; - dstData[box_index + 3] = exp(srcData[box_index + 3]) * biasData[2 * a + 1] / wNorm; + dstData[box_index + 0] = (x + logistic_activate(srcData[box_index + 0])) / cols; + dstData[box_index + 1] = (y + logistic_activate(srcData[box_index + 1])) / rows; + dstData[box_index + 2] = exp(srcData[box_index + 2]) * biasData[2 * a] / hNorm; + dstData[box_index + 3] = exp(srcData[box_index + 3]) * biasData[2 * a + 1] / wNorm; - int class_index = index * cell_size + 5; - - for (int j = 0; j < classes; ++j) { - float prob = scale*dstData[class_index + j]; // prob = IoU(box, object) = t0 * class-probability - dstData[class_index + j] = (prob > thresh) ? prob : 0; // if (IoU < threshold) IoU = 0; + int class_index = index_sample_offset + index * cell_size + 5; + for (int j = 0; j < classes; ++j) { + float prob = scale*dstData[class_index + j]; // prob = IoU(box, object) = t0 * class-probability + dstData[class_index + j] = (prob > thresh) ? prob : 0; // if (IoU < threshold) IoU = 0; + } } - } if (nmsThreshold > 0) { - do_nms_sort(dstData, rows*cols*anchors, thresh, nmsThreshold); + for (int b = 0; b < batch_size; ++b){ + do_nms_sort(dstData+b*sample_size, rows*cols*anchors, thresh, nmsThreshold); + } } } } - static inline float rectOverlap(const Rect2f& a, const Rect2f& b) - { - return 1.0f - jaccardDistance(a, b); - } - void do_nms_sort(float *detections, int total, float score_thresh, float nms_thresh) { - std::vector boxes(total); + std::vector boxes(total); std::vector scores(total); for (int i = 0; i < total; ++i) { - Rect2f &b = boxes[i]; + Rect2d &b = boxes[i]; int box_index = i * (classes + coords + 1); b.width = detections[box_index + 2]; b.height = detections[box_index + 3]; @@ -302,7 +318,7 @@ public: scores[i] = detections[class_index + k]; detections[class_index + k] = 0; } - NMSFast_(boxes, scores, score_thresh, nms_thresh, 1, 0, indices, rectOverlap); + NMSBoxes(boxes, scores, score_thresh, nms_thresh, indices); for (int i = 0, n = indices.size(); i < n; ++i) { int box_index = indices[i] * (classes + coords + 1); diff --git a/modules/dnn/src/layers/reorg_layer.cpp b/modules/dnn/src/layers/reorg_layer.cpp index 224bfee54d..c0defb36d2 100644 --- a/modules/dnn/src/layers/reorg_layer.cpp +++ b/modules/dnn/src/layers/reorg_layer.cpp @@ -109,10 +109,13 @@ public: UMat& srcBlob = inputs[i]; UMat& dstBlob = outputs[0]; + + int batch_size = srcBlob.size[0]; int channels = srcBlob.size[1]; int height = srcBlob.size[2]; int width = srcBlob.size[3]; - size_t nthreads = channels * height * width; + + size_t nthreads = batch_size * channels * height * width; kernel.set(0, (int)nthreads); kernel.set(1, ocl::KernelArg::PtrReadOnly(srcBlob)); @@ -157,19 +160,22 @@ public: const float *srcData = srcBlob.ptr(); int channels = inputShape[1], height = inputShape[2], width = inputShape[3]; + int sample_size = channels*height*width; + int batch_size = inputShape[0]; int out_c = channels / (reorgStride*reorgStride); - - for (int k = 0; k < channels; ++k) { - for (int j = 0; j < height; ++j) { - for (int i = 0; i < width; ++i) { - int out_index = i + width*(j + height*k); - int c2 = k % out_c; - int offset = k / out_c; - int w2 = i*reorgStride + offset % reorgStride; - int h2 = j*reorgStride + offset / reorgStride; - int in_index = w2 + width*reorgStride*(h2 + height*reorgStride*c2); - dstData[out_index] = srcData[in_index]; + for (int b = 0; b < batch_size; ++b) { + for (int k = 0; k < channels; ++k) { + for (int j = 0; j < height; ++j) { + for (int i = 0; i < width; ++i) { + int out_index = i + width*(j + height*k); + int c2 = k % out_c; + int offset = k / out_c; + int w2 = i*reorgStride + offset % reorgStride; + int h2 = j*reorgStride + offset / reorgStride; + int in_index = w2 + width*reorgStride*(h2 + height*reorgStride*c2); + dstData[b*sample_size + out_index] = srcData[b*sample_size + in_index]; + } } } } diff --git a/modules/dnn/src/nms.cpp b/modules/dnn/src/nms.cpp index 051a9cbd28..0ae590f501 100644 --- a/modules/dnn/src/nms.cpp +++ b/modules/dnn/src/nms.cpp @@ -16,7 +16,8 @@ namespace dnn { CV__DNN_EXPERIMENTAL_NS_BEGIN -static inline float rectOverlap(const Rect& a, const Rect& b) +template +static inline float rectOverlap(const T& a, const T& b) { return 1.f - static_cast(jaccardDistance(a, b)); } @@ -30,6 +31,15 @@ void NMSBoxes(const std::vector& bboxes, const std::vector& scores, NMSFast_(bboxes, scores, score_threshold, nms_threshold, eta, top_k, indices, rectOverlap); } +void NMSBoxes(const std::vector& bboxes, const std::vector& scores, + const float score_threshold, const float nms_threshold, + std::vector& indices, const float eta, const int top_k) +{ + CV_Assert_N(bboxes.size() == scores.size(), score_threshold >= 0, + nms_threshold >= 0, eta > 0); + NMSFast_(bboxes, scores, score_threshold, nms_threshold, eta, top_k, indices, rectOverlap); +} + static inline float rotatedRectIOU(const RotatedRect& a, const RotatedRect& b) { std::vector inter; diff --git a/modules/dnn/src/opencl/region.cl b/modules/dnn/src/opencl/region.cl index d33ac782c4..e7a7b7d2b1 100644 --- a/modules/dnn/src/opencl/region.cl +++ b/modules/dnn/src/opencl/region.cl @@ -84,9 +84,9 @@ __kernel void softmax_activ(const int count, output[i] = e; } - int y = index / anchors / cols; - int x = index / anchors % cols; - int a = index - anchors * (x + y * cols); + int y = (index / (anchors * cols)) % rows; + int x = (index / anchors) % cols; + int a = index % anchors; float scale = dst[box_index + 4]; if (classfix == -1 && scale < .5) scale = 0; diff --git a/modules/dnn/src/opencl/reorg.cl b/modules/dnn/src/opencl/reorg.cl index 62df3cceca..7802239ad7 100644 --- a/modules/dnn/src/opencl/reorg.cl +++ b/modules/dnn/src/opencl/reorg.cl @@ -53,15 +53,18 @@ __kernel void reorg(const int count, { for (int index = get_global_id(0); index < count; index += get_global_size(0)) { - int k = index / (height * width); - int j = (index - (k * height * width)) / width; - int i = (index - (k * height * width)) % width; + int sample_size = channels*height*width; + int b = index/sample_size; + int new_index = index%sample_size; + int k = new_index / (height * width); + int j = (new_index - (k * height * width)) / width; + int i = new_index % width; int out_c = channels / (reorgStride*reorgStride); int c2 = k % out_c; int offset = k / out_c; int w2 = i*reorgStride + offset % reorgStride; int h2 = j*reorgStride + offset / reorgStride; int in_index = w2 + width*reorgStride*(h2 + height*reorgStride*c2); - dst[index] = src[in_index]; + dst[index] = src[b*sample_size + in_index]; } } diff --git a/modules/dnn/test/test_darknet_importer.cpp b/modules/dnn/test/test_darknet_importer.cpp index 077498d92e..ab4a0e708c 100644 --- a/modules/dnn/test/test_darknet_importer.cpp +++ b/modules/dnn/test/test_darknet_importer.cpp @@ -53,6 +53,17 @@ static std::string _tf(TString filename) return (getOpenCVExtraDir() + "/dnn/") + filename; } +static std::vector getOutputsNames(const Net& net) +{ + std::vector names; + std::vector outLayers = net.getUnconnectedOutLayers(); + std::vector layersNames = net.getLayerNames(); + names.resize(outLayers.size()); + for (size_t i = 0; i < outLayers.size(); ++i) + names[i] = layersNames[outLayers[i] - 1]; + return names; +} + TEST(Test_Darknet, read_tiny_yolo_voc) { Net net = readNetFromDarknet(_tf("tiny-yolo-voc.cfg")); @@ -121,16 +132,24 @@ class Test_Darknet_nets : public DNNTestLayer public: // Test object detection network from Darknet framework. void testDarknetModel(const std::string& cfg, const std::string& weights, - const std::vector& outNames, - const std::vector& refClassIds, - const std::vector& refConfidences, - const std::vector& refBoxes, - double scoreDiff, double iouDiff, float confThreshold = 0.24) + const std::vector >& refClassIds, + const std::vector >& refConfidences, + const std::vector >& refBoxes, + double scoreDiff, double iouDiff, float confThreshold = 0.24, float nmsThreshold = 0.4) { checkBackend(); - Mat sample = imread(_tf("dog416.png")); - Mat inp = blobFromImage(sample, 1.0/255, Size(416, 416), Scalar(), true, false); + Mat img1 = imread(_tf("dog416.png")); + Mat img2 = imread(_tf("street.png")); + std::vector samples(2); + samples[0] = img1; samples[1] = img2; + + // determine test type, whether batch or single img + int batch_size = refClassIds.size(); + CV_Assert(batch_size == 1 || batch_size == 2); + samples.resize(batch_size); + + Mat inp = blobFromImages(samples, 1.0/255, Size(416, 416), Scalar(), true, false); Net net = readNet(findDataFile("dnn/" + cfg, false), findDataFile("dnn/" + weights, false)); @@ -138,84 +157,187 @@ public: net.setPreferableTarget(target); net.setInput(inp); std::vector outs; - net.forward(outs, outNames); + net.forward(outs, getOutputsNames(net)); - std::vector classIds; - std::vector confidences; - std::vector boxes; - for (int i = 0; i < outs.size(); ++i) + for (int b = 0; b < batch_size; ++b) { - Mat& out = outs[i]; - for (int j = 0; j < out.rows; ++j) + std::vector classIds; + std::vector confidences; + std::vector boxes; + for (int i = 0; i < outs.size(); ++i) { - Mat scores = out.row(j).colRange(5, out.cols); - double confidence; - Point maxLoc; - minMaxLoc(scores, 0, &confidence, 0, &maxLoc); + Mat out; + if (batch_size > 1){ + // get the sample slice from 3D matrix (batch, box, classes+5) + Range ranges[3] = {Range(b, b+1), Range::all(), Range::all()}; + out = outs[i](ranges).reshape(1, outs[i].size[1]); + }else{ + out = outs[i]; + } + for (int j = 0; j < out.rows; ++j) + { + Mat scores = out.row(j).colRange(5, out.cols); + double confidence; + Point maxLoc; + minMaxLoc(scores, 0, &confidence, 0, &maxLoc); - float* detection = out.ptr(j); - double centerX = detection[0]; - double centerY = detection[1]; - double width = detection[2]; - double height = detection[3]; - boxes.push_back(Rect2d(centerX - 0.5 * width, centerY - 0.5 * height, - width, height)); - confidences.push_back(confidence); - classIds.push_back(maxLoc.x); + if (confidence > confThreshold) { + float* detection = out.ptr(j); + double centerX = detection[0]; + double centerY = detection[1]; + double width = detection[2]; + double height = detection[3]; + boxes.push_back(Rect2d(centerX - 0.5 * width, centerY - 0.5 * height, + width, height)); + confidences.push_back(confidence); + classIds.push_back(maxLoc.x); + } + } } + + // here we need NMS of boxes + std::vector indices; + NMSBoxes(boxes, confidences, confThreshold, nmsThreshold, indices); + + std::vector nms_classIds; + std::vector nms_confidences; + std::vector nms_boxes; + + for (size_t i = 0; i < indices.size(); ++i) + { + int idx = indices[i]; + Rect2d box = boxes[idx]; + float conf = confidences[idx]; + int class_id = classIds[idx]; + nms_boxes.push_back(box); + nms_confidences.push_back(conf); + nms_classIds.push_back(class_id); + } + + normAssertDetections(refClassIds[b], refConfidences[b], refBoxes[b], nms_classIds, + nms_confidences, nms_boxes, format("batch size %d, sample %d\n", batch_size, b).c_str(), confThreshold, scoreDiff, iouDiff); } - normAssertDetections(refClassIds, refConfidences, refBoxes, classIds, - confidences, boxes, "", confThreshold, scoreDiff, iouDiff); + } + + void testDarknetModel(const std::string& cfg, const std::string& weights, + const std::vector& refClassIds, + const std::vector& refConfidences, + const std::vector& refBoxes, + double scoreDiff, double iouDiff, float confThreshold = 0.24, float nmsThreshold = 0.4) + { + testDarknetModel(cfg, weights, + std::vector >(1, refClassIds), + std::vector >(1, refConfidences), + std::vector >(1, refBoxes), + scoreDiff, iouDiff, confThreshold, nmsThreshold); + } + + void testDarknetModel(const std::string& cfg, const std::string& weights, + const cv::Mat& ref, double scoreDiff, double iouDiff, + float confThreshold = 0.24, float nmsThreshold = 0.4) + { + CV_Assert(ref.cols == 7); + std::vector > refClassIds; + std::vector > refScores; + std::vector > refBoxes; + for (int i = 0; i < ref.rows; ++i) + { + int batchId = static_cast(ref.at(i, 0)); + int classId = static_cast(ref.at(i, 1)); + float score = ref.at(i, 2); + float left = ref.at(i, 3); + float top = ref.at(i, 4); + float right = ref.at(i, 5); + float bottom = ref.at(i, 6); + Rect2d box(left, top, right - left, bottom - top); + if (batchId >= refClassIds.size()) + { + refClassIds.resize(batchId + 1); + refScores.resize(batchId + 1); + refBoxes.resize(batchId + 1); + } + refClassIds[batchId].push_back(classId); + refScores[batchId].push_back(score); + refBoxes[batchId].push_back(box); + } + testDarknetModel(cfg, weights, refClassIds, refScores, refBoxes, + scoreDiff, iouDiff, confThreshold, nmsThreshold); } }; TEST_P(Test_Darknet_nets, YoloVoc) { - std::vector outNames(1, "detection_out"); + // batchId, classId, confidence, left, top, right, bottom + Mat ref = (Mat_(6, 7) << 0, 6, 0.750469f, 0.577374f, 0.127391f, 0.902949f, 0.300809f, // a car + 0, 1, 0.780879f, 0.270762f, 0.264102f, 0.732475f, 0.745412f, // a bicycle + 0, 11, 0.901615f, 0.1386f, 0.338509f, 0.421337f, 0.938789f, // a dog + 1, 14, 0.623813f, 0.183179f, 0.381921f, 0.247726f, 0.625847f, // a person + 1, 6, 0.667770f, 0.446555f, 0.453578f, 0.499986f, 0.519167f, // a car + 1, 6, 0.844947f, 0.637058f, 0.460398f, 0.828508f, 0.66427f); // a car - std::vector classIds(3); - std::vector confidences(3); - std::vector boxes(3); - classIds[0] = 6; confidences[0] = 0.750469f; boxes[0] = Rect2d(0.577374, 0.127391, 0.325575, 0.173418); // a car - classIds[1] = 1; confidences[1] = 0.780879f; boxes[1] = Rect2d(0.270762, 0.264102, 0.461713, 0.48131); // a bicycle - classIds[2] = 11; confidences[2] = 0.901615f; boxes[2] = Rect2d(0.1386, 0.338509, 0.282737, 0.60028); // a dog double scoreDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 1e-2 : 8e-5; - double iouDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.013 : 3e-5; - testDarknetModel("yolo-voc.cfg", "yolo-voc.weights", outNames, - classIds, confidences, boxes, scoreDiff, iouDiff); + double iouDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.018 : 3e-4; + double nmsThreshold = (target == DNN_TARGET_MYRIAD) ? 0.397 : 0.4; + + std::string config_file = "yolo-voc.cfg"; + std::string weights_file = "yolo-voc.weights"; + + // batch size 1 + testDarknetModel(config_file, weights_file, ref.rowRange(0, 3), scoreDiff, iouDiff); + + // batch size 2 + testDarknetModel(config_file, weights_file, ref, scoreDiff, iouDiff, 0.24, nmsThreshold); } TEST_P(Test_Darknet_nets, TinyYoloVoc) { - std::vector outNames(1, "detection_out"); - std::vector classIds(2); - std::vector confidences(2); - std::vector boxes(2); - classIds[0] = 6; confidences[0] = 0.761967f; boxes[0] = Rect2d(0.579042, 0.159161, 0.31544, 0.160779); // a car - classIds[1] = 11; confidences[1] = 0.780595f; boxes[1] = Rect2d(0.129696, 0.386467, 0.315579, 0.534527); // a dog + // batchId, classId, confidence, left, top, right, bottom + Mat ref = (Mat_(4, 7) << 0, 6, 0.761967f, 0.579042f, 0.159161f, 0.894482f, 0.31994f, // a car + 0, 11, 0.780595f, 0.129696f, 0.386467f, 0.445275f, 0.920994f, // a dog + 1, 6, 0.651450f, 0.460526f, 0.458019f, 0.522527f, 0.5341f, // a car + 1, 6, 0.928758f, 0.651024f, 0.463539f, 0.823784f, 0.654998f); // a car + double scoreDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 8e-3 : 8e-5; - double iouDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 8e-3 : 3e-5; - testDarknetModel("tiny-yolo-voc.cfg", "tiny-yolo-voc.weights", outNames, - classIds, confidences, boxes, scoreDiff, iouDiff); + double iouDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.018 : 3e-4; + + std::string config_file = "tiny-yolo-voc.cfg"; + std::string weights_file = "tiny-yolo-voc.weights"; + + // batch size 1 + testDarknetModel(config_file, weights_file, ref.rowRange(0, 2), scoreDiff, iouDiff); + + // batch size 2 + testDarknetModel(config_file, weights_file, ref, scoreDiff, iouDiff); } TEST_P(Test_Darknet_nets, YOLOv3) { - std::vector outNames(3); - outNames[0] = "yolo_82"; - outNames[1] = "yolo_94"; - outNames[2] = "yolo_106"; + // batchId, classId, confidence, left, top, right, bottom + Mat ref = (Mat_(9, 7) << 0, 7, 0.952983f, 0.614622f, 0.150257f, 0.901369f, 0.289251f, // a truck + 0, 1, 0.987908f, 0.150913f, 0.221933f, 0.742255f, 0.74626f, // a bicycle + 0, 16, 0.998836f, 0.160024f, 0.389964f, 0.417885f, 0.943716f, // a dog (COCO) + 1, 9, 0.384801f, 0.659824f, 0.372389f, 0.673926f, 0.429412f, // a traffic light + 1, 9, 0.733283f, 0.376029f, 0.315694f, 0.401776f, 0.395165f, // a traffic light + 1, 9, 0.785352f, 0.665503f, 0.373543f, 0.688893f, 0.439245f, // a traffic light + 1, 0, 0.980052f, 0.195856f, 0.378454f, 0.258626f, 0.629258f, // a person + 1, 2, 0.989633f, 0.450719f, 0.463353f, 0.496305f, 0.522258f, // a car + 1, 2, 0.997412f, 0.647584f, 0.459939f, 0.821038f, 0.663947f); // a car - std::vector classIds(3); - std::vector confidences(3); - std::vector boxes(3); - classIds[0] = 7; confidences[0] = 0.952983f; boxes[0] = Rect2d(0.614622, 0.150257, 0.286747, 0.138994); // a truck - classIds[1] = 1; confidences[1] = 0.987908f; boxes[1] = Rect2d(0.150913, 0.221933, 0.591342, 0.524327); // a bicycle - classIds[2] = 16; confidences[2] = 0.998836f; boxes[2] = Rect2d(0.160024, 0.389964, 0.257861, 0.553752); // a dog (COCO) - double scoreDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 4e-3 : 8e-5; - double iouDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.011 : 3e-5; - testDarknetModel("yolov3.cfg", "yolov3.weights", outNames, - classIds, confidences, boxes, scoreDiff, iouDiff); + double scoreDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.0047 : 8e-5; + double iouDiff = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 0.018 : 3e-4; + + std::string config_file = "yolov3.cfg"; + std::string weights_file = "yolov3.weights"; + + // batch size 1 + testDarknetModel(config_file, weights_file, ref.rowRange(0, 3), scoreDiff, iouDiff); + + if ((backend != DNN_BACKEND_INFERENCE_ENGINE || target != DNN_TARGET_MYRIAD) && + (backend != DNN_BACKEND_INFERENCE_ENGINE || target != DNN_TARGET_OPENCL)) + { + // batch size 2 + testDarknetModel(config_file, weights_file, ref, scoreDiff, iouDiff); + } } INSTANTIATE_TEST_CASE_P(/**/, Test_Darknet_nets, dnnBackendsAndTargets()); From 03b3be0f510c2ee6e6d68448b6f1f11086ebfc4a Mon Sep 17 00:00:00 2001 From: Hamdi Sahloul Date: Wed, 12 Sep 2018 13:23:36 +0900 Subject: [PATCH 13/27] MSVC: Slience external/meaningless warnings --- modules/calib3d/src/dls.cpp | 9 +++++++++ modules/core/include/opencv2/core/private.hpp | 9 +++++++++ modules/core/src/cuda_stream.cpp | 4 ++++ modules/core/src/lapack.cpp | 15 ++++++++++++--- modules/core/src/opengl.cpp | 4 ++++ modules/features2d/src/matchers.cpp | 11 ++++++++++- modules/python/src2/cv2.cpp | 5 +++-- 7 files changed, 51 insertions(+), 6 deletions(-) diff --git a/modules/calib3d/src/dls.cpp b/modules/calib3d/src/dls.cpp index 8f814f0d37..93c409b030 100644 --- a/modules/calib3d/src/dls.cpp +++ b/modules/calib3d/src/dls.cpp @@ -7,8 +7,17 @@ # if defined __GNUC__ && defined __APPLE__ # pragma GCC diagnostic ignored "-Wshadow" # endif +# if defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable:4701) // potentially uninitialized local variable +# pragma warning(disable:4702) // unreachable code +# pragma warning(disable:4714) // const marked as __forceinline not inlined +# endif # include # include +# if defined(_MSC_VER) +# pragma warning(pop) +# endif # include "opencv2/core/eigen.hpp" #endif diff --git a/modules/core/include/opencv2/core/private.hpp b/modules/core/include/opencv2/core/private.hpp index 26d7c0f0f4..b1d544dc5d 100644 --- a/modules/core/include/opencv2/core/private.hpp +++ b/modules/core/include/opencv2/core/private.hpp @@ -57,7 +57,16 @@ # if defined __GNUC__ && defined __APPLE__ # pragma GCC diagnostic ignored "-Wshadow" # endif +# if defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable:4701) // potentially uninitialized local variable +# pragma warning(disable:4702) // unreachable code +# pragma warning(disable:4714) // const marked as __forceinline not inlined +# endif # include +# if defined(_MSC_VER) +# pragma warning(pop) +# endif # include "opencv2/core/eigen.hpp" #endif diff --git a/modules/core/src/cuda_stream.cpp b/modules/core/src/cuda_stream.cpp index 7682db599a..79d7477220 100644 --- a/modules/core/src/cuda_stream.cpp +++ b/modules/core/src/cuda_stream.cpp @@ -45,6 +45,10 @@ using namespace cv; using namespace cv::cuda; +#if defined(_MSC_VER) +#pragma warning(disable : 4702) // unreachable code +#endif + ///////////////////////////////////////////////////////////// /// MemoryStack diff --git a/modules/core/src/lapack.cpp b/modules/core/src/lapack.cpp index 95abe71288..05d223bb36 100644 --- a/modules/core/src/lapack.cpp +++ b/modules/core/src/lapack.cpp @@ -44,9 +44,18 @@ #include #ifdef HAVE_EIGEN -#include -#include -#include "opencv2/core/eigen.hpp" +# if defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable:4701) // potentially uninitialized local variable +# pragma warning(disable:4702) // unreachable code +# pragma warning(disable:4714) // const marked as __forceinline not inlined +# endif +# include +# include +# if defined(_MSC_VER) +# pragma warning(pop) +# endif +# include "opencv2/core/eigen.hpp" #endif #if defined _M_IX86 && defined _MSC_VER && _MSC_VER < 1700 diff --git a/modules/core/src/opengl.cpp b/modules/core/src/opengl.cpp index 54b18b9c2e..b10c82e88f 100644 --- a/modules/core/src/opengl.cpp +++ b/modules/core/src/opengl.cpp @@ -54,6 +54,10 @@ using namespace cv; using namespace cv::cuda; +#if defined(_MSC_VER) +#pragma warning(disable : 4702) // unreachable code +#endif + namespace { #ifndef HAVE_OPENGL diff --git a/modules/features2d/src/matchers.cpp b/modules/features2d/src/matchers.cpp index 486b1b916a..6bf23f331c 100644 --- a/modules/features2d/src/matchers.cpp +++ b/modules/features2d/src/matchers.cpp @@ -44,7 +44,16 @@ #include "opencl_kernels_features2d.hpp" #if defined(HAVE_EIGEN) && EIGEN_WORLD_VERSION == 2 -#include +# if defined(_MSC_VER) +# pragma warning(push) +# pragma warning(disable:4701) // potentially uninitialized local variable +# pragma warning(disable:4702) // unreachable code +# pragma warning(disable:4714) // const marked as __forceinline not inlined +# endif +# include +# if defined(_MSC_VER) +# pragma warning(pop) +# endif #endif namespace cv diff --git a/modules/python/src2/cv2.cpp b/modules/python/src2/cv2.cpp index 915dfd7c02..13a610048e 100644 --- a/modules/python/src2/cv2.cpp +++ b/modules/python/src2/cv2.cpp @@ -1,4 +1,5 @@ -#if defined(_MSC_VER) && (_MSC_VER >= 1800) +//warning number '5033' not a valid compiler warning in vc12 +#if defined(_MSC_VER) && (_MSC_VER > 1800) // eliminating duplicated round() declaration #define HAVE_ROUND 1 #pragma warning(push) @@ -6,7 +7,7 @@ #endif #include #include -#if defined(_MSC_VER) && (_MSC_VER >= 1800) +#if defined(_MSC_VER) && (_MSC_VER > 1800) #pragma warning(pop) #endif From 6fc855865f80a36203a5f74abe15c9d61a6f1430 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 11 Sep 2018 20:27:14 +0000 Subject: [PATCH 14/27] dnn(test): fix failures of 32-bit builders --- modules/dnn/test/test_onnx_importer.cpp | 10 +++++++++- modules/ts/include/opencv2/ts.hpp | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/modules/dnn/test/test_onnx_importer.cpp b/modules/dnn/test/test_onnx_importer.cpp index 8ac4baebe7..8d53b63eab 100644 --- a/modules/dnn/test/test_onnx_importer.cpp +++ b/modules/dnn/test/test_onnx_importer.cpp @@ -210,7 +210,11 @@ TEST_P(Test_ONNX_nets, RCNN_ILSVRC13) testONNXModels("rcnn_ilsvrc13", pb); } +#ifdef OPENCV_32BIT_CONFIGURATION +TEST_P(Test_ONNX_nets, DISABLED_VGG16) // memory usage >2Gb +#else TEST_P(Test_ONNX_nets, VGG16) +#endif { double l1 = default_l1; double lInf = default_lInf; @@ -225,7 +229,11 @@ TEST_P(Test_ONNX_nets, VGG16) testONNXModels("vgg16", pb, l1, lInf); } +#ifdef OPENCV_32BIT_CONFIGURATION +TEST_P(Test_ONNX_nets, DISABLED_VGG16_bn) // memory usage >2Gb +#else TEST_P(Test_ONNX_nets, VGG16_bn) +#endif { double l1 = default_l1; double lInf = default_lInf; @@ -288,7 +296,7 @@ TEST_P(Test_ONNX_nets, CNN_MNIST) { // output range: [-1952; 6574] const double l1 = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 3.82 : 4.3e-4; - const double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 13.5 : 1e-3; + const double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 13.5 : 2e-3; testONNXModels("cnn_mnist", pb, l1, lInf); } diff --git a/modules/ts/include/opencv2/ts.hpp b/modules/ts/include/opencv2/ts.hpp index 4880b6cf2c..da9cfca873 100644 --- a/modules/ts/include/opencv2/ts.hpp +++ b/modules/ts/include/opencv2/ts.hpp @@ -37,6 +37,18 @@ #include +#ifndef OPENCV_32BIT_CONFIGURATION +# if defined(INTPTR_MAX) && defined(INT32_MAX) && INTPTR_MAX == INT32_MAX +# define OPENCV_32BIT_CONFIGURATION 1 +# elif defined(_WIN32) && !defined(_WIN64) +# define OPENCV_32BIT_CONFIGURATION 1 +# endif +#else +# if OPENCV_32BIT_CONFIGURATION == 0 +# undef OPENCV_32BIT_CONFIGURATION +# endif +#endif + #ifdef WINRT #pragma warning(disable:4447) // Disable warning 'main' signature found without threading model #endif From 09fa7587258a8f9085255a27e8a787a2a383d96d Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Tue, 4 Sep 2018 10:55:54 +0300 Subject: [PATCH 15/27] Replace Darknet's Reorg to permute layer --- modules/dnn/src/layers/permute_layer.cpp | 36 ++---- modules/dnn/src/layers/reorg_layer.cpp | 117 +++++++++--------- .../dnn/src/layers/shuffle_channel_layer.cpp | 29 +++++ modules/dnn/src/opencl/reorg.cl | 70 ----------- modules/dnn/test/test_layers.cpp | 12 +- 5 files changed, 108 insertions(+), 156 deletions(-) delete mode 100644 modules/dnn/src/opencl/reorg.cl diff --git a/modules/dnn/src/layers/permute_layer.cpp b/modules/dnn/src/layers/permute_layer.cpp index a8fe9dd861..65e4f049e3 100644 --- a/modules/dnn/src/layers/permute_layer.cpp +++ b/modules/dnn/src/layers/permute_layer.cpp @@ -57,23 +57,6 @@ namespace dnn class PermuteLayerImpl CV_FINAL : public PermuteLayer { public: - void checkCurrentOrder(int currentOrder) - { - if(currentOrder < 0 || currentOrder > 3) - { - CV_Error( - Error::StsBadArg, - "Orders of dimensions in Permute layer parameter" - "must be in [0...3] interval"); - } - - if(std::find(_order.begin(), _order.end(), currentOrder) != _order.end()) - { - CV_Error(Error::StsBadArg, - "Permute layer parameter contains duplicated orders."); - } - } - void checkNeedForPermutation() { _needsPermute = false; @@ -96,19 +79,22 @@ public: } DictValue paramOrder = params.get("order"); - if(paramOrder.size() > 4) - { - CV_Error( - Error::StsBadArg, - "Too many (> 4) orders of dimensions in Permute layer"); - } - _numAxes = paramOrder.size(); for (size_t i = 0; i < _numAxes; i++) { int currentOrder = paramOrder.get(i); - checkCurrentOrder(currentOrder); + if (currentOrder < 0 || currentOrder > _numAxes) + { + CV_Error(Error::StsBadArg, + format("Orders of dimensions in Permute layer parameter" + "must be in [0...%d]", _numAxes - 1)); + } + if (std::find(_order.begin(), _order.end(), currentOrder) != _order.end()) + { + CV_Error(Error::StsBadArg, + "Permute layer parameter contains duplicated orders."); + } _order.push_back(currentOrder); } diff --git a/modules/dnn/src/layers/reorg_layer.cpp b/modules/dnn/src/layers/reorg_layer.cpp index c0defb36d2..6f0d55cd2f 100644 --- a/modules/dnn/src/layers/reorg_layer.cpp +++ b/modules/dnn/src/layers/reorg_layer.cpp @@ -85,6 +85,54 @@ public: return false; } + virtual void finalize(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr) CV_OVERRIDE + { + std::vector inputs, outputs; + inputs_arr.getMatVector(inputs); + outputs_arr.getMatVector(outputs); + + Mat inp = inputs[0]; + Mat out = outputs[0]; + int batchSize = inp.size[0]; + + LayerParams permParams; + if (batchSize == 1) + { + int order[] = {1, 3, 0, 2}; + permParams.set("order", DictValue::arrayInt(&order[0], 4)); + + permuteInpShape.resize(4); + permuteInpShape[0] = inp.size[1] * inp.size[2] / (reorgStride * reorgStride); // (channels*height)/(r*r) + permuteInpShape[1] = reorgStride; + permuteInpShape[2] = inp.size[3]; // width + permuteInpShape[3] = reorgStride; + + permuteOutShape.resize(4); + for (int i = 0; i < 4; ++i) + permuteOutShape[i] = permuteInpShape[order[i]]; + } + else + { + int order[] = {0, 2, 4, 1, 3}; + permParams.set("order", DictValue::arrayInt(&order[0], 5)); + + permuteInpShape.resize(5); + permuteInpShape[0] = batchSize; + permuteInpShape[1] = inp.size[1] * inp.size[2] / (reorgStride * reorgStride); // (channels*height)/(r*r) + permuteInpShape[2] = reorgStride; + permuteInpShape[3] = inp.size[3]; // width + permuteInpShape[4] = reorgStride; + + permuteOutShape.resize(5); + for (int i = 0; i < 5; ++i) + permuteOutShape[i] = permuteInpShape[order[i]]; + } + permute = PermuteLayer::create(permParams); + std::vector permuteInputs(1, inp.reshape(1, permuteInpShape)); + std::vector permuteOutputs(1, out.reshape(1, permuteOutShape)); + permute->finalize(permuteInputs, permuteOutputs); + } + virtual bool supportBackend(int backendId) CV_OVERRIDE { return backendId == DNN_BACKEND_OPENCV || backendId == DNN_BACKEND_INFERENCE_ENGINE; @@ -96,39 +144,13 @@ public: std::vector inputs; std::vector outputs; - bool use_half = (inps.depth() == CV_16S); inps.getUMatVector(inputs); outs.getUMatVector(outputs); - String buildopt= format("-DDtype=%s ", use_half ? "half" : "float"); - - for (size_t i = 0; i < inputs.size(); i++) - { - ocl::Kernel kernel("reorg", ocl::dnn::reorg_oclsrc, buildopt); - if (kernel.empty()) - return false; - - UMat& srcBlob = inputs[i]; - UMat& dstBlob = outputs[0]; - - int batch_size = srcBlob.size[0]; - int channels = srcBlob.size[1]; - int height = srcBlob.size[2]; - int width = srcBlob.size[3]; - - size_t nthreads = batch_size * channels * height * width; - - kernel.set(0, (int)nthreads); - kernel.set(1, ocl::KernelArg::PtrReadOnly(srcBlob)); - kernel.set(2, (int)channels); - kernel.set(3, (int)height); - kernel.set(4, (int)width); - kernel.set(5, (int)reorgStride); - kernel.set(6, ocl::KernelArg::PtrWriteOnly(dstBlob)); - - if (!kernel.run(1, &nthreads, NULL, false)) - return false; - } + inputs[0] = inputs[0].reshape(1, permuteInpShape.size(), &permuteInpShape[0]); + outputs[0] = outputs[0].reshape(1, permuteOutShape.size(), &permuteOutShape[0]); + permute->preferableTarget = preferableTarget; + permute->forward(inputs, outputs, internals); return true; } #endif @@ -152,34 +174,9 @@ public: inputs_arr.getMatVector(inputs); outputs_arr.getMatVector(outputs); - for (size_t i = 0; i < inputs.size(); i++) - { - Mat srcBlob = inputs[i]; - MatShape inputShape = shape(srcBlob), outShape = shape(outputs[i]); - float *dstData = outputs[0].ptr(); - const float *srcData = srcBlob.ptr(); - - int channels = inputShape[1], height = inputShape[2], width = inputShape[3]; - int sample_size = channels*height*width; - int batch_size = inputShape[0]; - - int out_c = channels / (reorgStride*reorgStride); - for (int b = 0; b < batch_size; ++b) { - for (int k = 0; k < channels; ++k) { - for (int j = 0; j < height; ++j) { - for (int i = 0; i < width; ++i) { - int out_index = i + width*(j + height*k); - int c2 = k % out_c; - int offset = k / out_c; - int w2 = i*reorgStride + offset % reorgStride; - int h2 = j*reorgStride + offset / reorgStride; - int in_index = w2 + width*reorgStride*(h2 + height*reorgStride*c2); - dstData[b*sample_size + out_index] = srcData[b*sample_size + in_index]; - } - } - } - } - } + inputs[0] = inputs[0].reshape(1, permuteInpShape); + outputs[0] = outputs[0].reshape(1, permuteOutShape); + permute->forward(inputs, outputs, internals_arr); } virtual Ptr initInfEngine(const std::vector >&) CV_OVERRIDE @@ -208,6 +205,10 @@ public: } return flops; } + +private: + Ptr permute; + std::vector permuteInpShape, permuteOutShape; }; Ptr ReorgLayer::create(const LayerParams& params) diff --git a/modules/dnn/src/layers/shuffle_channel_layer.cpp b/modules/dnn/src/layers/shuffle_channel_layer.cpp index 67fb489f84..c4c04786b1 100644 --- a/modules/dnn/src/layers/shuffle_channel_layer.cpp +++ b/modules/dnn/src/layers/shuffle_channel_layer.cpp @@ -62,11 +62,40 @@ public: } } +#ifdef HAVE_OPENCL + bool forward_ocl(InputArrayOfArrays inps, OutputArrayOfArrays outs, OutputArrayOfArrays internals) + { + std::vector inputs; + std::vector outputs; + + inps.getUMatVector(inputs); + outs.getUMatVector(outputs); + + if (inputs[0].u != outputs[0].u) + { + if (!permute.empty()) + { + inputs[0] = inputs[0].reshape(1, permuteInpShape.size(), &permuteInpShape[0]); + outputs[0] = outputs[0].reshape(1, permuteOutShape.size(), &permuteOutShape[0]); + permute->preferableTarget = preferableTarget; + permute->forward(inputs, outputs, internals); + } + else + inputs[0].copyTo(outputs[0]); + } + return true; + } +#endif + void forward(InputArrayOfArrays inputs_arr, OutputArrayOfArrays outputs_arr, OutputArrayOfArrays internals_arr) CV_OVERRIDE { CV_TRACE_FUNCTION(); CV_TRACE_ARG_VALUE(name, "name", name.c_str()); + CV_OCL_RUN(IS_DNN_OPENCL_TARGET(preferableTarget) && + OCL_PERFORMANCE_CHECK(ocl::Device::getDefault().isIntel()), + forward_ocl(inputs_arr, outputs_arr, internals_arr)) + if (inputs_arr.depth() == CV_16S) { forward_fallback(inputs_arr, outputs_arr, internals_arr); diff --git a/modules/dnn/src/opencl/reorg.cl b/modules/dnn/src/opencl/reorg.cl deleted file mode 100644 index 7802239ad7..0000000000 --- a/modules/dnn/src/opencl/reorg.cl +++ /dev/null @@ -1,70 +0,0 @@ -/*M/////////////////////////////////////////////////////////////////////////////////////// -// -// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. -// -// By downloading, copying, installing or using the software you agree to this license. -// If you do not agree to this license, do not download, install, -// copy or use the software. -// -// -// License Agreement -// For Open Source Computer Vision Library -// -// Copyright (c) 2016-2017 Fabian David Tschopp, all rights reserved. -// Third party copyrights are property of their respective owners. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// * Redistribution's of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Redistribution's in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// * The name of the copyright holders may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// -// This software is provided by the copyright holders and contributors "as is" and -// any express or implied warranties, including, but not limited to, the implied -// warranties of merchantability and fitness for a particular purpose are disclaimed. -// In no event shall the Intel Corporation or contributors be liable for any direct, -// indirect, incidental, special, exemplary, or consequential damages -// (including, but not limited to, procurement of substitute goods or services; -// loss of use, data, or profits; or business interruption) however caused -// and on any theory of liability, whether in contract, strict liability, -// or tort (including negligence or otherwise) arising in any way out of -// the use of this software, even if advised of the possibility of such damage. -// -//M*/ - -#if defined(cl_khr_fp16) -#pragma OPENCL EXTENSION cl_khr_fp16 : enable -#endif - -__kernel void reorg(const int count, - __global const Dtype* src, - const int channels, - const int height, - const int width, - const int reorgStride, - __global Dtype* dst) -{ - for (int index = get_global_id(0); index < count; index += get_global_size(0)) - { - int sample_size = channels*height*width; - int b = index/sample_size; - int new_index = index%sample_size; - int k = new_index / (height * width); - int j = (new_index - (k * height * width)) / width; - int i = new_index % width; - int out_c = channels / (reorgStride*reorgStride); - int c2 = k % out_c; - int offset = k / out_c; - int w2 = i*reorgStride + offset % reorgStride; - int h2 = j*reorgStride + offset / reorgStride; - int in_index = w2 + width*reorgStride*(h2 + height*reorgStride*c2); - dst[index] = src[b*sample_size + in_index]; - } -} diff --git a/modules/dnn/test/test_layers.cpp b/modules/dnn/test/test_layers.cpp index 14c6f55f40..be0e37e294 100644 --- a/modules/dnn/test/test_layers.cpp +++ b/modules/dnn/test/test_layers.cpp @@ -1288,13 +1288,15 @@ TEST(Layer_Test_PoolingIndices, Accuracy) normAssert(indices, outputs[1].reshape(1, 5)); } -typedef testing::TestWithParam > Layer_Test_ShuffleChannel; +typedef testing::TestWithParam > > Layer_Test_ShuffleChannel; TEST_P(Layer_Test_ShuffleChannel, Accuracy) { Vec4i inpShapeVec = get<0>(GetParam()); int group = get<1>(GetParam()); ASSERT_EQ(inpShapeVec[1] % group, 0); const int groupSize = inpShapeVec[1] / group; + int backendId = get<0>(get<2>(GetParam())); + int targetId = get<1>(get<2>(GetParam())); Net net; LayerParams lp; @@ -1308,21 +1310,25 @@ TEST_P(Layer_Test_ShuffleChannel, Accuracy) randu(inp, 0, 255); net.setInput(inp); + net.setPreferableBackend(backendId); + net.setPreferableTarget(targetId); Mat out = net.forward(); + double l1 = (targetId == DNN_TARGET_OPENCL_FP16) ? 5e-2 : 1e-5; + double lInf = (targetId == DNN_TARGET_OPENCL_FP16) ? 7e-2 : 1e-4; for (int n = 0; n < inpShapeVec[0]; ++n) { for (int c = 0; c < inpShapeVec[1]; ++c) { Mat outChannel = getPlane(out, n, c); Mat inpChannel = getPlane(inp, n, groupSize * (c % group) + c / group); - normAssert(outChannel, inpChannel); + normAssert(outChannel, inpChannel, "", l1, lInf); } } } INSTANTIATE_TEST_CASE_P(/**/, Layer_Test_ShuffleChannel, Combine( /*input shape*/ Values(Vec4i(1, 6, 5, 7), Vec4i(3, 12, 1, 4)), -/*group*/ Values(1, 2, 3, 6) +/*group*/ Values(1, 2, 3, 6), dnnBackendsAndTargets(/*with IE*/ false) )); // Check if relu is not fused to convolution if we requested it's output From cb5da8983f911002ba8a316695c634111a62d274 Mon Sep 17 00:00:00 2001 From: George Mironov Date: Wed, 12 Sep 2018 15:08:56 +0300 Subject: [PATCH 16/27] Rename tensorflow namespace --- modules/dnn/src/tensorflow/attr_value.proto | 2 +- modules/dnn/src/tensorflow/function.proto | 2 +- modules/dnn/src/tensorflow/graph.proto | 2 +- modules/dnn/src/tensorflow/op_def.proto | 2 +- modules/dnn/src/tensorflow/tensor.proto | 2 +- modules/dnn/src/tensorflow/tensor_shape.proto | 2 +- modules/dnn/src/tensorflow/tf_io.hpp | 1 + modules/dnn/src/tensorflow/types.proto | 2 +- modules/dnn/src/tensorflow/versions.proto | 2 +- 9 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/dnn/src/tensorflow/attr_value.proto b/modules/dnn/src/tensorflow/attr_value.proto index 26e42bc1a1..b2289a4c2a 100644 --- a/modules/dnn/src/tensorflow/attr_value.proto +++ b/modules/dnn/src/tensorflow/attr_value.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package tensorflow; +package opencv_tensorflow; option cc_enable_arenas = true; option java_outer_classname = "AttrValueProtos"; option java_multiple_files = true; diff --git a/modules/dnn/src/tensorflow/function.proto b/modules/dnn/src/tensorflow/function.proto index 144c75bf32..6da3e4577a 100644 --- a/modules/dnn/src/tensorflow/function.proto +++ b/modules/dnn/src/tensorflow/function.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package tensorflow; +package opencv_tensorflow; option cc_enable_arenas = true; option java_outer_classname = "FunctionProtos"; option java_multiple_files = true; diff --git a/modules/dnn/src/tensorflow/graph.proto b/modules/dnn/src/tensorflow/graph.proto index 478d35a9fe..86f021daff 100644 --- a/modules/dnn/src/tensorflow/graph.proto +++ b/modules/dnn/src/tensorflow/graph.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package tensorflow; +package opencv_tensorflow; option cc_enable_arenas = true; option java_outer_classname = "GraphProtos"; option java_multiple_files = true; diff --git a/modules/dnn/src/tensorflow/op_def.proto b/modules/dnn/src/tensorflow/op_def.proto index baf68eaad3..ebdb807c2d 100644 --- a/modules/dnn/src/tensorflow/op_def.proto +++ b/modules/dnn/src/tensorflow/op_def.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package tensorflow; +package opencv_tensorflow; option cc_enable_arenas = true; option java_outer_classname = "OpDefProtos"; option java_multiple_files = true; diff --git a/modules/dnn/src/tensorflow/tensor.proto b/modules/dnn/src/tensorflow/tensor.proto index 080421809e..165e55ce3d 100644 --- a/modules/dnn/src/tensorflow/tensor.proto +++ b/modules/dnn/src/tensorflow/tensor.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package tensorflow; +package opencv_tensorflow; option cc_enable_arenas = true; option java_outer_classname = "TensorProtos"; option java_multiple_files = true; diff --git a/modules/dnn/src/tensorflow/tensor_shape.proto b/modules/dnn/src/tensorflow/tensor_shape.proto index 1ec3c5323c..2a19d9e934 100644 --- a/modules/dnn/src/tensorflow/tensor_shape.proto +++ b/modules/dnn/src/tensorflow/tensor_shape.proto @@ -6,7 +6,7 @@ option java_outer_classname = "TensorShapeProtos"; option java_multiple_files = true; option java_package = "org.tensorflow.framework"; -package tensorflow; +package opencv_tensorflow; // Dimensions of a tensor. message TensorShapeProto { diff --git a/modules/dnn/src/tensorflow/tf_io.hpp b/modules/dnn/src/tensorflow/tf_io.hpp index aeb22a6c27..0005ddfdd3 100644 --- a/modules/dnn/src/tensorflow/tf_io.hpp +++ b/modules/dnn/src/tensorflow/tf_io.hpp @@ -26,6 +26,7 @@ Declaration of various functions which are related to Tensorflow models reading. #pragma GCC diagnostic pop #endif +namespace tensorflow { using namespace opencv_tensorflow; } namespace cv { namespace dnn { diff --git a/modules/dnn/src/tensorflow/types.proto b/modules/dnn/src/tensorflow/types.proto index 051361bbed..a0ef65ace5 100644 --- a/modules/dnn/src/tensorflow/types.proto +++ b/modules/dnn/src/tensorflow/types.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package tensorflow; +package opencv_tensorflow; option cc_enable_arenas = true; option java_outer_classname = "TypesProtos"; option java_multiple_files = true; diff --git a/modules/dnn/src/tensorflow/versions.proto b/modules/dnn/src/tensorflow/versions.proto index 7d5e58ae7d..110c19962f 100644 --- a/modules/dnn/src/tensorflow/versions.proto +++ b/modules/dnn/src/tensorflow/versions.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package tensorflow; +package opencv_tensorflow; option cc_enable_arenas = true; option java_outer_classname = "VersionsProtos"; option java_multiple_files = true; From b7b82c1cefb1c1a854ee9bcbe07d1a4f9e8a1b78 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 12 Sep 2018 21:33:45 +0300 Subject: [PATCH 17/27] dnn(tensorflow): re-generate files using protoc --- modules/dnn/misc/tensorflow/attr_value.pb.cc | 450 ++++++------- modules/dnn/misc/tensorflow/attr_value.pb.h | 478 +++++++------- modules/dnn/misc/tensorflow/function.pb.cc | 399 ++++++------ modules/dnn/misc/tensorflow/function.pb.h | 340 +++++----- modules/dnn/misc/tensorflow/graph.pb.cc | 283 ++++---- modules/dnn/misc/tensorflow/graph.pb.h | 260 ++++---- modules/dnn/misc/tensorflow/op_def.pb.cc | 544 ++++++++-------- modules/dnn/misc/tensorflow/op_def.pb.h | 606 +++++++++--------- modules/dnn/misc/tensorflow/tensor.pb.cc | 143 +++-- modules/dnn/misc/tensorflow/tensor.pb.h | 208 +++--- .../dnn/misc/tensorflow/tensor_shape.pb.cc | 144 ++--- modules/dnn/misc/tensorflow/tensor_shape.pb.h | 80 +-- modules/dnn/misc/tensorflow/types.pb.cc | 48 +- modules/dnn/misc/tensorflow/types.pb.h | 14 +- modules/dnn/misc/tensorflow/versions.pb.cc | 76 +-- modules/dnn/misc/tensorflow/versions.pb.h | 30 +- 16 files changed, 2055 insertions(+), 2048 deletions(-) diff --git a/modules/dnn/misc/tensorflow/attr_value.pb.cc b/modules/dnn/misc/tensorflow/attr_value.pb.cc index 91239c27d2..99860999b4 100644 --- a/modules/dnn/misc/tensorflow/attr_value.pb.cc +++ b/modules/dnn/misc/tensorflow/attr_value.pb.cc @@ -19,7 +19,7 @@ #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) -namespace tensorflow { +namespace opencv_tensorflow { class AttrValue_ListValueDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed @@ -34,10 +34,10 @@ class AttrValueDefaultTypeInternal { float f_; bool b_; int type_; - const ::tensorflow::TensorShapeProto* shape_; - const ::tensorflow::TensorProto* tensor_; - const ::tensorflow::AttrValue_ListValue* list_; - const ::tensorflow::NameAttrList* func_; + const ::opencv_tensorflow::TensorShapeProto* shape_; + const ::opencv_tensorflow::TensorProto* tensor_; + const ::opencv_tensorflow::AttrValue_ListValue* list_; + const ::opencv_tensorflow::NameAttrList* func_; ::google::protobuf::internal::ArenaStringPtr placeholder_; } _AttrValue_default_instance_; class NameAttrList_AttrEntry_DoNotUseDefaultTypeInternal { @@ -50,7 +50,7 @@ class NameAttrListDefaultTypeInternal { ::google::protobuf::internal::ExplicitlyConstructed _instance; } _NameAttrList_default_instance_; -} // namespace tensorflow +} // namespace opencv_tensorflow namespace protobuf_attr_5fvalue_2eproto { void InitDefaultsAttrValue_ListValueImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -63,11 +63,11 @@ void InitDefaultsAttrValue_ListValueImpl() { protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto(); protobuf_tensor_2eproto::InitDefaultsTensorProto(); { - void* ptr = &::tensorflow::_AttrValue_ListValue_default_instance_; - new (ptr) ::tensorflow::AttrValue_ListValue(); + void* ptr = &::opencv_tensorflow::_AttrValue_ListValue_default_instance_; + new (ptr) ::opencv_tensorflow::AttrValue_ListValue(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::AttrValue_ListValue::InitAsDefaultInstance(); + ::opencv_tensorflow::AttrValue_ListValue::InitAsDefaultInstance(); } void InitDefaultsAttrValue_ListValue() { @@ -87,22 +87,22 @@ void InitDefaultsAttrValueImpl() { protobuf_tensor_2eproto::InitDefaultsTensorProto(); protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue_ListValue(); { - void* ptr = &::tensorflow::_AttrValue_default_instance_; - new (ptr) ::tensorflow::AttrValue(); + void* ptr = &::opencv_tensorflow::_AttrValue_default_instance_; + new (ptr) ::opencv_tensorflow::AttrValue(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } { - void* ptr = &::tensorflow::_NameAttrList_AttrEntry_DoNotUse_default_instance_; - new (ptr) ::tensorflow::NameAttrList_AttrEntry_DoNotUse(); + void* ptr = &::opencv_tensorflow::_NameAttrList_AttrEntry_DoNotUse_default_instance_; + new (ptr) ::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse(); } { - void* ptr = &::tensorflow::_NameAttrList_default_instance_; - new (ptr) ::tensorflow::NameAttrList(); + void* ptr = &::opencv_tensorflow::_NameAttrList_default_instance_; + new (ptr) ::opencv_tensorflow::NameAttrList(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::AttrValue::InitAsDefaultInstance(); - ::tensorflow::NameAttrList_AttrEntry_DoNotUse::InitAsDefaultInstance(); - ::tensorflow::NameAttrList::InitAsDefaultInstance(); + ::opencv_tensorflow::AttrValue::InitAsDefaultInstance(); + ::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse::InitAsDefaultInstance(); + ::opencv_tensorflow::NameAttrList::InitAsDefaultInstance(); } void InitDefaultsAttrValue() { @@ -114,62 +114,62 @@ void InitDefaultsAttrValue() { const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, s_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, i_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, f_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, b_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, shape_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, tensor_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, s_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, i_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, f_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, b_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, shape_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, tensor_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::AttrValue, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::AttrValue, _oneof_case_[0]), ~0u, // no _weak_field_map_ - offsetof(::tensorflow::AttrValueDefaultTypeInternal, s_), - offsetof(::tensorflow::AttrValueDefaultTypeInternal, i_), - offsetof(::tensorflow::AttrValueDefaultTypeInternal, f_), - offsetof(::tensorflow::AttrValueDefaultTypeInternal, b_), - offsetof(::tensorflow::AttrValueDefaultTypeInternal, type_), - offsetof(::tensorflow::AttrValueDefaultTypeInternal, shape_), - offsetof(::tensorflow::AttrValueDefaultTypeInternal, tensor_), - offsetof(::tensorflow::AttrValueDefaultTypeInternal, list_), - offsetof(::tensorflow::AttrValueDefaultTypeInternal, func_), - offsetof(::tensorflow::AttrValueDefaultTypeInternal, placeholder_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue, value_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList_AttrEntry_DoNotUse, _has_bits_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList_AttrEntry_DoNotUse, _internal_metadata_), + offsetof(::opencv_tensorflow::AttrValueDefaultTypeInternal, s_), + offsetof(::opencv_tensorflow::AttrValueDefaultTypeInternal, i_), + offsetof(::opencv_tensorflow::AttrValueDefaultTypeInternal, f_), + offsetof(::opencv_tensorflow::AttrValueDefaultTypeInternal, b_), + offsetof(::opencv_tensorflow::AttrValueDefaultTypeInternal, type_), + offsetof(::opencv_tensorflow::AttrValueDefaultTypeInternal, shape_), + offsetof(::opencv_tensorflow::AttrValueDefaultTypeInternal, tensor_), + offsetof(::opencv_tensorflow::AttrValueDefaultTypeInternal, list_), + offsetof(::opencv_tensorflow::AttrValueDefaultTypeInternal, func_), + offsetof(::opencv_tensorflow::AttrValueDefaultTypeInternal, placeholder_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::AttrValue, value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList_AttrEntry_DoNotUse, key_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList_AttrEntry_DoNotUse, value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse, key_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NameAttrList, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList, attr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NameAttrList, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NameAttrList, attr_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::tensorflow::AttrValue_ListValue)}, - { 12, -1, sizeof(::tensorflow::AttrValue)}, - { 28, 35, sizeof(::tensorflow::NameAttrList_AttrEntry_DoNotUse)}, - { 37, -1, sizeof(::tensorflow::NameAttrList)}, + { 0, -1, sizeof(::opencv_tensorflow::AttrValue_ListValue)}, + { 12, -1, sizeof(::opencv_tensorflow::AttrValue)}, + { 28, 35, sizeof(::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse)}, + { 37, -1, sizeof(::opencv_tensorflow::NameAttrList)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::tensorflow::_AttrValue_ListValue_default_instance_), - reinterpret_cast(&::tensorflow::_AttrValue_default_instance_), - reinterpret_cast(&::tensorflow::_NameAttrList_AttrEntry_DoNotUse_default_instance_), - reinterpret_cast(&::tensorflow::_NameAttrList_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_AttrValue_ListValue_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_AttrValue_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_NameAttrList_AttrEntry_DoNotUse_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_NameAttrList_default_instance_), }; void protobuf_AssignDescriptors() { @@ -194,29 +194,31 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\020attr_value.proto\022\ntensorflow\032\014tensor.p" - "roto\032\022tensor_shape.proto\032\013types.proto\"\376\003" - "\n\tAttrValue\022\013\n\001s\030\002 \001(\014H\000\022\013\n\001i\030\003 \001(\003H\000\022\013\n" - "\001f\030\004 \001(\002H\000\022\013\n\001b\030\005 \001(\010H\000\022$\n\004type\030\006 \001(\0162\024." - "tensorflow.DataTypeH\000\022-\n\005shape\030\007 \001(\0132\034.t" - "ensorflow.TensorShapeProtoH\000\022)\n\006tensor\030\010" - " \001(\0132\027.tensorflow.TensorProtoH\000\022/\n\004list\030" - "\001 \001(\0132\037.tensorflow.AttrValue.ListValueH\000" - "\022(\n\004func\030\n \001(\0132\030.tensorflow.NameAttrList" - "H\000\022\025\n\013placeholder\030\t \001(\tH\000\032\301\001\n\tListValue\022" - "\t\n\001s\030\002 \003(\014\022\r\n\001i\030\003 \003(\003B\002\020\001\022\r\n\001f\030\004 \003(\002B\002\020\001" - "\022\r\n\001b\030\005 \003(\010B\002\020\001\022&\n\004type\030\006 \003(\0162\024.tensorfl" - "ow.DataTypeB\002\020\001\022+\n\005shape\030\007 \003(\0132\034.tensorf" - "low.TensorShapeProto\022\'\n\006tensor\030\010 \003(\0132\027.t" - "ensorflow.TensorProtoB\007\n\005value\"\222\001\n\014NameA" - "ttrList\022\014\n\004name\030\001 \001(\t\0220\n\004attr\030\002 \003(\0132\".te" - "nsorflow.NameAttrList.AttrEntry\032B\n\tAttrE" - "ntry\022\013\n\003key\030\001 \001(\t\022$\n\005value\030\002 \001(\0132\025.tenso" - "rflow.AttrValue:\0028\001B0\n\030org.tensorflow.fr" - "ameworkB\017AttrValueProtosP\001\370\001\001b\006proto3" + "\n\020attr_value.proto\022\021opencv_tensorflow\032\014t" + "ensor.proto\032\022tensor_shape.proto\032\013types.p" + "roto\"\266\004\n\tAttrValue\022\013\n\001s\030\002 \001(\014H\000\022\013\n\001i\030\003 \001" + "(\003H\000\022\013\n\001f\030\004 \001(\002H\000\022\013\n\001b\030\005 \001(\010H\000\022+\n\004type\030\006" + " \001(\0162\033.opencv_tensorflow.DataTypeH\000\0224\n\005s" + "hape\030\007 \001(\0132#.opencv_tensorflow.TensorSha" + "peProtoH\000\0220\n\006tensor\030\010 \001(\0132\036.opencv_tenso" + "rflow.TensorProtoH\000\0226\n\004list\030\001 \001(\0132&.open" + "cv_tensorflow.AttrValue.ListValueH\000\022/\n\004f" + "unc\030\n \001(\0132\037.opencv_tensorflow.NameAttrLi" + "stH\000\022\025\n\013placeholder\030\t \001(\tH\000\032\326\001\n\tListValu" + "e\022\t\n\001s\030\002 \003(\014\022\r\n\001i\030\003 \003(\003B\002\020\001\022\r\n\001f\030\004 \003(\002B\002" + "\020\001\022\r\n\001b\030\005 \003(\010B\002\020\001\022-\n\004type\030\006 \003(\0162\033.opencv" + "_tensorflow.DataTypeB\002\020\001\0222\n\005shape\030\007 \003(\0132" + "#.opencv_tensorflow.TensorShapeProto\022.\n\006" + "tensor\030\010 \003(\0132\036.opencv_tensorflow.TensorP" + "rotoB\007\n\005value\"\240\001\n\014NameAttrList\022\014\n\004name\030\001" + " \001(\t\0227\n\004attr\030\002 \003(\0132).opencv_tensorflow.N" + "ameAttrList.AttrEntry\032I\n\tAttrEntry\022\013\n\003ke" + "y\030\001 \001(\t\022+\n\005value\030\002 \001(\0132\034.opencv_tensorfl" + "ow.AttrValue:\0028\001B0\n\030org.tensorflow.frame" + "workB\017AttrValueProtosP\001\370\001\001b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 797); + descriptor, 874); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "attr_value.proto", &protobuf_RegisterTypes); ::protobuf_tensor_2eproto::AddDescriptors(); @@ -235,7 +237,7 @@ struct StaticDescriptorInitializer { } } static_descriptor_initializer; } // namespace protobuf_attr_5fvalue_2eproto -namespace tensorflow { +namespace opencv_tensorflow { // =================================================================== @@ -263,7 +265,7 @@ AttrValue_ListValue::AttrValue_ListValue() ::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue_ListValue(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(constructor:opencv_tensorflow.AttrValue.ListValue) } AttrValue_ListValue::AttrValue_ListValue(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -278,7 +280,7 @@ AttrValue_ListValue::AttrValue_ListValue(::google::protobuf::Arena* arena) ::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue_ListValue(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.AttrValue.ListValue) } AttrValue_ListValue::AttrValue_ListValue(const AttrValue_ListValue& from) : ::google::protobuf::Message(), @@ -292,7 +294,7 @@ AttrValue_ListValue::AttrValue_ListValue(const AttrValue_ListValue& from) tensor_(from.tensor_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.AttrValue.ListValue) } void AttrValue_ListValue::SharedCtor() { @@ -300,7 +302,7 @@ void AttrValue_ListValue::SharedCtor() { } AttrValue_ListValue::~AttrValue_ListValue() { - // @@protoc_insertion_point(destructor:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(destructor:opencv_tensorflow.AttrValue.ListValue) SharedDtor(); } @@ -334,7 +336,7 @@ AttrValue_ListValue* AttrValue_ListValue::New(::google::protobuf::Arena* arena) } void AttrValue_ListValue::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.AttrValue.ListValue) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.AttrValue.ListValue) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -353,7 +355,7 @@ bool AttrValue_ListValue::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.AttrValue.ListValue) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -428,7 +430,7 @@ bool AttrValue_ListValue::MergePartialFromCodedStream( break; } - // repeated .tensorflow.DataType type = 6 [packed = true]; + // repeated .opencv_tensorflow.DataType type = 6 [packed = true]; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { @@ -440,7 +442,7 @@ bool AttrValue_ListValue::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - add_type(static_cast< ::tensorflow::DataType >(value)); + add_type(static_cast< ::opencv_tensorflow::DataType >(value)); } input->PopLimit(limit); } else if ( @@ -450,14 +452,14 @@ bool AttrValue_ListValue::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - add_type(static_cast< ::tensorflow::DataType >(value)); + add_type(static_cast< ::opencv_tensorflow::DataType >(value)); } else { goto handle_unusual; } break; } - // repeated .tensorflow.TensorShapeProto shape = 7; + // repeated .opencv_tensorflow.TensorShapeProto shape = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { @@ -468,7 +470,7 @@ bool AttrValue_ListValue::MergePartialFromCodedStream( break; } - // repeated .tensorflow.TensorProto tensor = 8; + // repeated .opencv_tensorflow.TensorProto tensor = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { @@ -491,17 +493,17 @@ bool AttrValue_ListValue::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.AttrValue.ListValue) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.AttrValue.ListValue) return false; #undef DO_ } void AttrValue_ListValue::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.AttrValue.ListValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -540,7 +542,7 @@ void AttrValue_ListValue::SerializeWithCachedSizes( this->b().data(), this->b_size(), output); } - // repeated .tensorflow.DataType type = 6 [packed = true]; + // repeated .opencv_tensorflow.DataType type = 6 [packed = true]; if (this->type_size() > 0) { ::google::protobuf::internal::WireFormatLite::WriteTag( 6, @@ -554,14 +556,14 @@ void AttrValue_ListValue::SerializeWithCachedSizes( this->type(i), output); } - // repeated .tensorflow.TensorShapeProto shape = 7; + // repeated .opencv_tensorflow.TensorShapeProto shape = 7; for (unsigned int i = 0, n = static_cast(this->shape_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 7, this->shape(static_cast(i)), output); } - // repeated .tensorflow.TensorProto tensor = 8; + // repeated .opencv_tensorflow.TensorProto tensor = 8; for (unsigned int i = 0, n = static_cast(this->tensor_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -572,13 +574,13 @@ void AttrValue_ListValue::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.AttrValue.ListValue) } ::google::protobuf::uint8* AttrValue_ListValue::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.AttrValue.ListValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -627,7 +629,7 @@ void AttrValue_ListValue::SerializeWithCachedSizes( WriteBoolNoTagToArray(this->b_, target); } - // repeated .tensorflow.DataType type = 6 [packed = true]; + // repeated .opencv_tensorflow.DataType type = 6 [packed = true]; if (this->type_size() > 0) { target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( 6, @@ -639,7 +641,7 @@ void AttrValue_ListValue::SerializeWithCachedSizes( this->type_, target); } - // repeated .tensorflow.TensorShapeProto shape = 7; + // repeated .opencv_tensorflow.TensorShapeProto shape = 7; for (unsigned int i = 0, n = static_cast(this->shape_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -647,7 +649,7 @@ void AttrValue_ListValue::SerializeWithCachedSizes( 7, this->shape(static_cast(i)), deterministic, target); } - // repeated .tensorflow.TensorProto tensor = 8; + // repeated .opencv_tensorflow.TensorProto tensor = 8; for (unsigned int i = 0, n = static_cast(this->tensor_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -659,12 +661,12 @@ void AttrValue_ListValue::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.AttrValue.ListValue) return target; } size_t AttrValue_ListValue::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.AttrValue.ListValue) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.AttrValue.ListValue) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -728,7 +730,7 @@ size_t AttrValue_ListValue::ByteSizeLong() const { total_size += data_size; } - // repeated .tensorflow.DataType type = 6 [packed = true]; + // repeated .opencv_tensorflow.DataType type = 6 [packed = true]; { size_t data_size = 0; unsigned int count = static_cast(this->type_size());for (unsigned int i = 0; i < count; i++) { @@ -747,7 +749,7 @@ size_t AttrValue_ListValue::ByteSizeLong() const { total_size += data_size; } - // repeated .tensorflow.TensorShapeProto shape = 7; + // repeated .opencv_tensorflow.TensorShapeProto shape = 7; { unsigned int count = static_cast(this->shape_size()); total_size += 1UL * count; @@ -758,7 +760,7 @@ size_t AttrValue_ListValue::ByteSizeLong() const { } } - // repeated .tensorflow.TensorProto tensor = 8; + // repeated .opencv_tensorflow.TensorProto tensor = 8; { unsigned int count = static_cast(this->tensor_size()); total_size += 1UL * count; @@ -777,22 +779,22 @@ size_t AttrValue_ListValue::ByteSizeLong() const { } void AttrValue_ListValue::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.AttrValue.ListValue) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.AttrValue.ListValue) GOOGLE_DCHECK_NE(&from, this); const AttrValue_ListValue* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.AttrValue.ListValue) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.AttrValue.ListValue) MergeFrom(*source); } } void AttrValue_ListValue::MergeFrom(const AttrValue_ListValue& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.AttrValue.ListValue) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.AttrValue.ListValue) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -808,14 +810,14 @@ void AttrValue_ListValue::MergeFrom(const AttrValue_ListValue& from) { } void AttrValue_ListValue::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.AttrValue.ListValue) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.AttrValue.ListValue) if (&from == this) return; Clear(); MergeFrom(from); } void AttrValue_ListValue::CopyFrom(const AttrValue_ListValue& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.AttrValue.ListValue) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.AttrValue.ListValue) if (&from == this) return; Clear(); MergeFrom(from); @@ -866,24 +868,24 @@ void AttrValue_ListValue::InternalSwap(AttrValue_ListValue* other) { // =================================================================== void AttrValue::InitAsDefaultInstance() { - ::tensorflow::_AttrValue_default_instance_.s_.UnsafeSetDefault( + ::opencv_tensorflow::_AttrValue_default_instance_.s_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::tensorflow::_AttrValue_default_instance_.i_ = GOOGLE_LONGLONG(0); - ::tensorflow::_AttrValue_default_instance_.f_ = 0; - ::tensorflow::_AttrValue_default_instance_.b_ = false; - ::tensorflow::_AttrValue_default_instance_.type_ = 0; - ::tensorflow::_AttrValue_default_instance_.shape_ = const_cast< ::tensorflow::TensorShapeProto*>( - ::tensorflow::TensorShapeProto::internal_default_instance()); - ::tensorflow::_AttrValue_default_instance_.tensor_ = const_cast< ::tensorflow::TensorProto*>( - ::tensorflow::TensorProto::internal_default_instance()); - ::tensorflow::_AttrValue_default_instance_.list_ = const_cast< ::tensorflow::AttrValue_ListValue*>( - ::tensorflow::AttrValue_ListValue::internal_default_instance()); - ::tensorflow::_AttrValue_default_instance_.func_ = const_cast< ::tensorflow::NameAttrList*>( - ::tensorflow::NameAttrList::internal_default_instance()); - ::tensorflow::_AttrValue_default_instance_.placeholder_.UnsafeSetDefault( + ::opencv_tensorflow::_AttrValue_default_instance_.i_ = GOOGLE_LONGLONG(0); + ::opencv_tensorflow::_AttrValue_default_instance_.f_ = 0; + ::opencv_tensorflow::_AttrValue_default_instance_.b_ = false; + ::opencv_tensorflow::_AttrValue_default_instance_.type_ = 0; + ::opencv_tensorflow::_AttrValue_default_instance_.shape_ = const_cast< ::opencv_tensorflow::TensorShapeProto*>( + ::opencv_tensorflow::TensorShapeProto::internal_default_instance()); + ::opencv_tensorflow::_AttrValue_default_instance_.tensor_ = const_cast< ::opencv_tensorflow::TensorProto*>( + ::opencv_tensorflow::TensorProto::internal_default_instance()); + ::opencv_tensorflow::_AttrValue_default_instance_.list_ = const_cast< ::opencv_tensorflow::AttrValue_ListValue*>( + ::opencv_tensorflow::AttrValue_ListValue::internal_default_instance()); + ::opencv_tensorflow::_AttrValue_default_instance_.func_ = const_cast< ::opencv_tensorflow::NameAttrList*>( + ::opencv_tensorflow::NameAttrList::internal_default_instance()); + ::opencv_tensorflow::_AttrValue_default_instance_.placeholder_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void AttrValue::set_allocated_shape(::tensorflow::TensorShapeProto* shape) { +void AttrValue::set_allocated_shape(::opencv_tensorflow::TensorShapeProto* shape) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_value(); if (shape) { @@ -896,7 +898,7 @@ void AttrValue::set_allocated_shape(::tensorflow::TensorShapeProto* shape) { set_has_shape(); value_.shape_ = shape; } - // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.shape) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.AttrValue.shape) } void AttrValue::clear_shape() { if (has_shape()) { @@ -906,7 +908,7 @@ void AttrValue::clear_shape() { clear_has_value(); } } -void AttrValue::set_allocated_tensor(::tensorflow::TensorProto* tensor) { +void AttrValue::set_allocated_tensor(::opencv_tensorflow::TensorProto* tensor) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_value(); if (tensor) { @@ -919,7 +921,7 @@ void AttrValue::set_allocated_tensor(::tensorflow::TensorProto* tensor) { set_has_tensor(); value_.tensor_ = tensor; } - // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.tensor) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.AttrValue.tensor) } void AttrValue::clear_tensor() { if (has_tensor()) { @@ -929,7 +931,7 @@ void AttrValue::clear_tensor() { clear_has_value(); } } -void AttrValue::set_allocated_list(::tensorflow::AttrValue_ListValue* list) { +void AttrValue::set_allocated_list(::opencv_tensorflow::AttrValue_ListValue* list) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_value(); if (list) { @@ -942,9 +944,9 @@ void AttrValue::set_allocated_list(::tensorflow::AttrValue_ListValue* list) { set_has_list(); value_.list_ = list; } - // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.list) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.AttrValue.list) } -void AttrValue::set_allocated_func(::tensorflow::NameAttrList* func) { +void AttrValue::set_allocated_func(::opencv_tensorflow::NameAttrList* func) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_value(); if (func) { @@ -957,7 +959,7 @@ void AttrValue::set_allocated_func(::tensorflow::NameAttrList* func) { set_has_func(); value_.func_ = func; } - // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.func) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.AttrValue.func) } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int AttrValue::kSFieldNumber; @@ -978,7 +980,7 @@ AttrValue::AttrValue() ::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.AttrValue) + // @@protoc_insertion_point(constructor:opencv_tensorflow.AttrValue) } AttrValue::AttrValue(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -986,7 +988,7 @@ AttrValue::AttrValue(::google::protobuf::Arena* arena) ::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.AttrValue) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.AttrValue) } AttrValue::AttrValue(const AttrValue& from) : ::google::protobuf::Message(), @@ -1016,19 +1018,19 @@ AttrValue::AttrValue(const AttrValue& from) break; } case kShape: { - mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.shape()); + mutable_shape()->::opencv_tensorflow::TensorShapeProto::MergeFrom(from.shape()); break; } case kTensor: { - mutable_tensor()->::tensorflow::TensorProto::MergeFrom(from.tensor()); + mutable_tensor()->::opencv_tensorflow::TensorProto::MergeFrom(from.tensor()); break; } case kList: { - mutable_list()->::tensorflow::AttrValue_ListValue::MergeFrom(from.list()); + mutable_list()->::opencv_tensorflow::AttrValue_ListValue::MergeFrom(from.list()); break; } case kFunc: { - mutable_func()->::tensorflow::NameAttrList::MergeFrom(from.func()); + mutable_func()->::opencv_tensorflow::NameAttrList::MergeFrom(from.func()); break; } case kPlaceholder: { @@ -1039,7 +1041,7 @@ AttrValue::AttrValue(const AttrValue& from) break; } } - // @@protoc_insertion_point(copy_constructor:tensorflow.AttrValue) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.AttrValue) } void AttrValue::SharedCtor() { @@ -1048,7 +1050,7 @@ void AttrValue::SharedCtor() { } AttrValue::~AttrValue() { - // @@protoc_insertion_point(destructor:tensorflow.AttrValue) + // @@protoc_insertion_point(destructor:opencv_tensorflow.AttrValue) SharedDtor(); } @@ -1085,7 +1087,7 @@ AttrValue* AttrValue::New(::google::protobuf::Arena* arena) const { } void AttrValue::clear_value() { -// @@protoc_insertion_point(one_of_clear_start:tensorflow.AttrValue) +// @@protoc_insertion_point(one_of_clear_start:opencv_tensorflow.AttrValue) switch (value_case()) { case kS: { value_.s_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1146,7 +1148,7 @@ void AttrValue::clear_value() { void AttrValue::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.AttrValue) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.AttrValue) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1159,13 +1161,13 @@ bool AttrValue::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.AttrValue) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.AttrValue) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .tensorflow.AttrValue.ListValue list = 1; + // .opencv_tensorflow.AttrValue.ListValue list = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -1234,7 +1236,7 @@ bool AttrValue::MergePartialFromCodedStream( break; } - // .tensorflow.DataType type = 6; + // .opencv_tensorflow.DataType type = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) { @@ -1242,14 +1244,14 @@ bool AttrValue::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_type(static_cast< ::tensorflow::DataType >(value)); + set_type(static_cast< ::opencv_tensorflow::DataType >(value)); } else { goto handle_unusual; } break; } - // .tensorflow.TensorShapeProto shape = 7; + // .opencv_tensorflow.TensorShapeProto shape = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { @@ -1261,7 +1263,7 @@ bool AttrValue::MergePartialFromCodedStream( break; } - // .tensorflow.TensorProto tensor = 8; + // .opencv_tensorflow.TensorProto tensor = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { @@ -1282,14 +1284,14 @@ bool AttrValue::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->placeholder().data(), static_cast(this->placeholder().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.AttrValue.placeholder")); + "opencv_tensorflow.AttrValue.placeholder")); } else { goto handle_unusual; } break; } - // .tensorflow.NameAttrList func = 10; + // .opencv_tensorflow.NameAttrList func = 10; case 10: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) { @@ -1313,21 +1315,21 @@ bool AttrValue::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.AttrValue) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.AttrValue) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.AttrValue) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.AttrValue) return false; #undef DO_ } void AttrValue::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.AttrValue) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.AttrValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .tensorflow.AttrValue.ListValue list = 1; + // .opencv_tensorflow.AttrValue.ListValue list = 1; if (has_list()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *value_.list_, output); @@ -1354,19 +1356,19 @@ void AttrValue::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->b(), output); } - // .tensorflow.DataType type = 6; + // .opencv_tensorflow.DataType type = 6; if (has_type()) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 6, this->type(), output); } - // .tensorflow.TensorShapeProto shape = 7; + // .opencv_tensorflow.TensorShapeProto shape = 7; if (has_shape()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 7, *value_.shape_, output); } - // .tensorflow.TensorProto tensor = 8; + // .opencv_tensorflow.TensorProto tensor = 8; if (has_tensor()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 8, *value_.tensor_, output); @@ -1377,12 +1379,12 @@ void AttrValue::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->placeholder().data(), static_cast(this->placeholder().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.AttrValue.placeholder"); + "opencv_tensorflow.AttrValue.placeholder"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 9, this->placeholder(), output); } - // .tensorflow.NameAttrList func = 10; + // .opencv_tensorflow.NameAttrList func = 10; if (has_func()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 10, *value_.func_, output); @@ -1392,17 +1394,17 @@ void AttrValue::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.AttrValue) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.AttrValue) } ::google::protobuf::uint8* AttrValue::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.AttrValue) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.AttrValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .tensorflow.AttrValue.ListValue list = 1; + // .opencv_tensorflow.AttrValue.ListValue list = 1; if (has_list()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1431,20 +1433,20 @@ void AttrValue::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->b(), target); } - // .tensorflow.DataType type = 6; + // .opencv_tensorflow.DataType type = 6; if (has_type()) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 6, this->type(), target); } - // .tensorflow.TensorShapeProto shape = 7; + // .opencv_tensorflow.TensorShapeProto shape = 7; if (has_shape()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 7, *value_.shape_, deterministic, target); } - // .tensorflow.TensorProto tensor = 8; + // .opencv_tensorflow.TensorProto tensor = 8; if (has_tensor()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1456,13 +1458,13 @@ void AttrValue::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->placeholder().data(), static_cast(this->placeholder().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.AttrValue.placeholder"); + "opencv_tensorflow.AttrValue.placeholder"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 9, this->placeholder(), target); } - // .tensorflow.NameAttrList func = 10; + // .opencv_tensorflow.NameAttrList func = 10; if (has_func()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1473,12 +1475,12 @@ void AttrValue::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.AttrValue) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.AttrValue) return target; } size_t AttrValue::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.AttrValue) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.AttrValue) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1511,34 +1513,34 @@ size_t AttrValue::ByteSizeLong() const { total_size += 1 + 1; break; } - // .tensorflow.DataType type = 6; + // .opencv_tensorflow.DataType type = 6; case kType: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); break; } - // .tensorflow.TensorShapeProto shape = 7; + // .opencv_tensorflow.TensorShapeProto shape = 7; case kShape: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *value_.shape_); break; } - // .tensorflow.TensorProto tensor = 8; + // .opencv_tensorflow.TensorProto tensor = 8; case kTensor: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *value_.tensor_); break; } - // .tensorflow.AttrValue.ListValue list = 1; + // .opencv_tensorflow.AttrValue.ListValue list = 1; case kList: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *value_.list_); break; } - // .tensorflow.NameAttrList func = 10; + // .opencv_tensorflow.NameAttrList func = 10; case kFunc: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -1564,22 +1566,22 @@ size_t AttrValue::ByteSizeLong() const { } void AttrValue::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.AttrValue) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.AttrValue) GOOGLE_DCHECK_NE(&from, this); const AttrValue* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.AttrValue) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.AttrValue) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.AttrValue) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.AttrValue) MergeFrom(*source); } } void AttrValue::MergeFrom(const AttrValue& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.AttrValue) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.AttrValue) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1607,19 +1609,19 @@ void AttrValue::MergeFrom(const AttrValue& from) { break; } case kShape: { - mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.shape()); + mutable_shape()->::opencv_tensorflow::TensorShapeProto::MergeFrom(from.shape()); break; } case kTensor: { - mutable_tensor()->::tensorflow::TensorProto::MergeFrom(from.tensor()); + mutable_tensor()->::opencv_tensorflow::TensorProto::MergeFrom(from.tensor()); break; } case kList: { - mutable_list()->::tensorflow::AttrValue_ListValue::MergeFrom(from.list()); + mutable_list()->::opencv_tensorflow::AttrValue_ListValue::MergeFrom(from.list()); break; } case kFunc: { - mutable_func()->::tensorflow::NameAttrList::MergeFrom(from.func()); + mutable_func()->::opencv_tensorflow::NameAttrList::MergeFrom(from.func()); break; } case kPlaceholder: { @@ -1633,14 +1635,14 @@ void AttrValue::MergeFrom(const AttrValue& from) { } void AttrValue::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.AttrValue) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.AttrValue) if (&from == this) return; Clear(); MergeFrom(from); } void AttrValue::CopyFrom(const AttrValue& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.AttrValue) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.AttrValue) if (&from == this) return; Clear(); MergeFrom(from); @@ -1715,7 +1717,7 @@ NameAttrList::NameAttrList() ::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.NameAttrList) + // @@protoc_insertion_point(constructor:opencv_tensorflow.NameAttrList) } NameAttrList::NameAttrList(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -1724,7 +1726,7 @@ NameAttrList::NameAttrList(::google::protobuf::Arena* arena) ::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.NameAttrList) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.NameAttrList) } NameAttrList::NameAttrList(const NameAttrList& from) : ::google::protobuf::Message(), @@ -1737,7 +1739,7 @@ NameAttrList::NameAttrList(const NameAttrList& from) name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(), GetArenaNoVirtual()); } - // @@protoc_insertion_point(copy_constructor:tensorflow.NameAttrList) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.NameAttrList) } void NameAttrList::SharedCtor() { @@ -1746,7 +1748,7 @@ void NameAttrList::SharedCtor() { } NameAttrList::~NameAttrList() { - // @@protoc_insertion_point(destructor:tensorflow.NameAttrList) + // @@protoc_insertion_point(destructor:opencv_tensorflow.NameAttrList) SharedDtor(); } @@ -1781,7 +1783,7 @@ NameAttrList* NameAttrList::New(::google::protobuf::Arena* arena) const { } void NameAttrList::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.NameAttrList) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.NameAttrList) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1795,7 +1797,7 @@ bool NameAttrList::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.NameAttrList) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.NameAttrList) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -1810,30 +1812,30 @@ bool NameAttrList::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.NameAttrList.name")); + "opencv_tensorflow.NameAttrList.name")); } else { goto handle_unusual; } break; } - // map attr = 2; + // map attr = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { NameAttrList_AttrEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< NameAttrList_AttrEntry_DoNotUse, - ::std::string, ::tensorflow::AttrValue, + ::std::string, ::opencv_tensorflow::AttrValue, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 0 >, - ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue > > parser(&attr_); + ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue > > parser(&attr_); DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, &parser)); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.key().data(), static_cast(parser.key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.NameAttrList.AttrEntry.key")); + "opencv_tensorflow.NameAttrList.AttrEntry.key")); } else { goto handle_unusual; } @@ -1852,17 +1854,17 @@ bool NameAttrList::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.NameAttrList) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.NameAttrList) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.NameAttrList) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.NameAttrList) return false; #undef DO_ } void NameAttrList::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.NameAttrList) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.NameAttrList) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1871,14 +1873,14 @@ void NameAttrList::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NameAttrList.name"); + "opencv_tensorflow.NameAttrList.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } - // map attr = 2; + // map attr = 2; if (!this->attr().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst Less; @@ -1887,7 +1889,7 @@ void NameAttrList::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NameAttrList.AttrEntry.key"); + "opencv_tensorflow.NameAttrList.AttrEntry.key"); } }; @@ -1895,9 +1897,9 @@ void NameAttrList::SerializeWithCachedSizes( this->attr().size() > 1) { ::google::protobuf::scoped_array items( new SortItem[this->attr().size()]); - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -1916,7 +1918,7 @@ void NameAttrList::SerializeWithCachedSizes( } } else { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it) { entry.reset(attr_.NewEntryWrapper( @@ -1935,13 +1937,13 @@ void NameAttrList::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.NameAttrList) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.NameAttrList) } ::google::protobuf::uint8* NameAttrList::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.NameAttrList) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.NameAttrList) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1950,15 +1952,15 @@ void NameAttrList::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NameAttrList.name"); + "opencv_tensorflow.NameAttrList.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } - // map attr = 2; + // map attr = 2; if (!this->attr().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst Less; @@ -1967,7 +1969,7 @@ void NameAttrList::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NameAttrList.AttrEntry.key"); + "opencv_tensorflow.NameAttrList.AttrEntry.key"); } }; @@ -1975,9 +1977,9 @@ void NameAttrList::SerializeWithCachedSizes( this->attr().size() > 1) { ::google::protobuf::scoped_array items( new SortItem[this->attr().size()]); - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -1998,7 +2000,7 @@ void NameAttrList::SerializeWithCachedSizes( } } else { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it) { entry.reset(attr_.NewEntryWrapper( @@ -2019,12 +2021,12 @@ void NameAttrList::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.NameAttrList) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.NameAttrList) return target; } size_t NameAttrList::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.NameAttrList) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.NameAttrList) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2032,12 +2034,12 @@ size_t NameAttrList::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // map attr = 2; + // map attr = 2; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->attr_size()); { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it) { if (entry.get() != NULL && entry->GetArena() != NULL) { @@ -2067,22 +2069,22 @@ size_t NameAttrList::ByteSizeLong() const { } void NameAttrList::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.NameAttrList) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.NameAttrList) GOOGLE_DCHECK_NE(&from, this); const NameAttrList* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.NameAttrList) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.NameAttrList) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.NameAttrList) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.NameAttrList) MergeFrom(*source); } } void NameAttrList::MergeFrom(const NameAttrList& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.NameAttrList) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.NameAttrList) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2095,14 +2097,14 @@ void NameAttrList::MergeFrom(const NameAttrList& from) { } void NameAttrList::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.NameAttrList) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.NameAttrList) if (&from == this) return; Clear(); MergeFrom(from); } void NameAttrList::CopyFrom(const NameAttrList& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.NameAttrList) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.NameAttrList) if (&from == this) return; Clear(); MergeFrom(from); @@ -2146,6 +2148,6 @@ void NameAttrList::InternalSwap(NameAttrList* other) { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/attr_value.pb.h b/modules/dnn/misc/tensorflow/attr_value.pb.h index e9ec2a5491..40ded9c38b 100644 --- a/modules/dnn/misc/tensorflow/attr_value.pb.h +++ b/modules/dnn/misc/tensorflow/attr_value.pb.h @@ -57,7 +57,7 @@ inline void InitDefaults() { InitDefaultsAttrValue(); } } // namespace protobuf_attr_5fvalue_2eproto -namespace tensorflow { +namespace opencv_tensorflow { class AttrValue; class AttrValueDefaultTypeInternal; extern AttrValueDefaultTypeInternal _AttrValue_default_instance_; @@ -70,12 +70,12 @@ extern NameAttrListDefaultTypeInternal _NameAttrList_default_instance_; class NameAttrList_AttrEntry_DoNotUse; class NameAttrList_AttrEntry_DoNotUseDefaultTypeInternal; extern NameAttrList_AttrEntry_DoNotUseDefaultTypeInternal _NameAttrList_AttrEntry_DoNotUse_default_instance_; -} // namespace tensorflow -namespace tensorflow { +} // namespace opencv_tensorflow +namespace opencv_tensorflow { // =================================================================== -class AttrValue_ListValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.AttrValue.ListValue) */ { +class AttrValue_ListValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.AttrValue.ListValue) */ { public: AttrValue_ListValue(); virtual ~AttrValue_ListValue(); @@ -227,41 +227,41 @@ class AttrValue_ListValue : public ::google::protobuf::Message /* @@protoc_inser ::google::protobuf::RepeatedField< bool >* mutable_b(); - // repeated .tensorflow.DataType type = 6 [packed = true]; + // repeated .opencv_tensorflow.DataType type = 6 [packed = true]; int type_size() const; void clear_type(); static const int kTypeFieldNumber = 6; - ::tensorflow::DataType type(int index) const; - void set_type(int index, ::tensorflow::DataType value); - void add_type(::tensorflow::DataType value); + ::opencv_tensorflow::DataType type(int index) const; + void set_type(int index, ::opencv_tensorflow::DataType value); + void add_type(::opencv_tensorflow::DataType value); const ::google::protobuf::RepeatedField& type() const; ::google::protobuf::RepeatedField* mutable_type(); - // repeated .tensorflow.TensorShapeProto shape = 7; + // repeated .opencv_tensorflow.TensorShapeProto shape = 7; int shape_size() const; void clear_shape(); static const int kShapeFieldNumber = 7; - const ::tensorflow::TensorShapeProto& shape(int index) const; - ::tensorflow::TensorShapeProto* mutable_shape(int index); - ::tensorflow::TensorShapeProto* add_shape(); - ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto >* + const ::opencv_tensorflow::TensorShapeProto& shape(int index) const; + ::opencv_tensorflow::TensorShapeProto* mutable_shape(int index); + ::opencv_tensorflow::TensorShapeProto* add_shape(); + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto >* mutable_shape(); - const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto >& + const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto >& shape() const; - // repeated .tensorflow.TensorProto tensor = 8; + // repeated .opencv_tensorflow.TensorProto tensor = 8; int tensor_size() const; void clear_tensor(); static const int kTensorFieldNumber = 8; - const ::tensorflow::TensorProto& tensor(int index) const; - ::tensorflow::TensorProto* mutable_tensor(int index); - ::tensorflow::TensorProto* add_tensor(); - ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto >* + const ::opencv_tensorflow::TensorProto& tensor(int index) const; + ::opencv_tensorflow::TensorProto* mutable_tensor(int index); + ::opencv_tensorflow::TensorProto* add_tensor(); + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorProto >* mutable_tensor(); - const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto >& + const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorProto >& tensor() const; - // @@protoc_insertion_point(class_scope:tensorflow.AttrValue.ListValue) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.AttrValue.ListValue) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -277,15 +277,15 @@ class AttrValue_ListValue : public ::google::protobuf::Message /* @@protoc_inser mutable int _b_cached_byte_size_; ::google::protobuf::RepeatedField type_; mutable int _type_cached_byte_size_; - ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto > shape_; - ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto > tensor_; + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto > shape_; + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorProto > tensor_; mutable int _cached_size_; friend struct ::protobuf_attr_5fvalue_2eproto::TableStruct; friend void ::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue_ListValueImpl(); }; // ------------------------------------------------------------------- -class AttrValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.AttrValue) */ { +class AttrValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.AttrValue) */ { public: AttrValue(); virtual ~AttrValue(); @@ -448,74 +448,74 @@ class AttrValue : public ::google::protobuf::Message /* @@protoc_insertion_point bool b() const; void set_b(bool value); - // .tensorflow.DataType type = 6; + // .opencv_tensorflow.DataType type = 6; private: bool has_type() const; public: void clear_type(); static const int kTypeFieldNumber = 6; - ::tensorflow::DataType type() const; - void set_type(::tensorflow::DataType value); + ::opencv_tensorflow::DataType type() const; + void set_type(::opencv_tensorflow::DataType value); - // .tensorflow.TensorShapeProto shape = 7; + // .opencv_tensorflow.TensorShapeProto shape = 7; bool has_shape() const; void clear_shape(); static const int kShapeFieldNumber = 7; private: void _slow_mutable_shape(); public: - const ::tensorflow::TensorShapeProto& shape() const; - ::tensorflow::TensorShapeProto* release_shape(); - ::tensorflow::TensorShapeProto* mutable_shape(); - void set_allocated_shape(::tensorflow::TensorShapeProto* shape); + const ::opencv_tensorflow::TensorShapeProto& shape() const; + ::opencv_tensorflow::TensorShapeProto* release_shape(); + ::opencv_tensorflow::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::opencv_tensorflow::TensorShapeProto* shape); void unsafe_arena_set_allocated_shape( - ::tensorflow::TensorShapeProto* shape); - ::tensorflow::TensorShapeProto* unsafe_arena_release_shape(); + ::opencv_tensorflow::TensorShapeProto* shape); + ::opencv_tensorflow::TensorShapeProto* unsafe_arena_release_shape(); - // .tensorflow.TensorProto tensor = 8; + // .opencv_tensorflow.TensorProto tensor = 8; bool has_tensor() const; void clear_tensor(); static const int kTensorFieldNumber = 8; private: void _slow_mutable_tensor(); public: - const ::tensorflow::TensorProto& tensor() const; - ::tensorflow::TensorProto* release_tensor(); - ::tensorflow::TensorProto* mutable_tensor(); - void set_allocated_tensor(::tensorflow::TensorProto* tensor); + const ::opencv_tensorflow::TensorProto& tensor() const; + ::opencv_tensorflow::TensorProto* release_tensor(); + ::opencv_tensorflow::TensorProto* mutable_tensor(); + void set_allocated_tensor(::opencv_tensorflow::TensorProto* tensor); void unsafe_arena_set_allocated_tensor( - ::tensorflow::TensorProto* tensor); - ::tensorflow::TensorProto* unsafe_arena_release_tensor(); + ::opencv_tensorflow::TensorProto* tensor); + ::opencv_tensorflow::TensorProto* unsafe_arena_release_tensor(); - // .tensorflow.AttrValue.ListValue list = 1; + // .opencv_tensorflow.AttrValue.ListValue list = 1; bool has_list() const; void clear_list(); static const int kListFieldNumber = 1; private: void _slow_mutable_list(); public: - const ::tensorflow::AttrValue_ListValue& list() const; - ::tensorflow::AttrValue_ListValue* release_list(); - ::tensorflow::AttrValue_ListValue* mutable_list(); - void set_allocated_list(::tensorflow::AttrValue_ListValue* list); + const ::opencv_tensorflow::AttrValue_ListValue& list() const; + ::opencv_tensorflow::AttrValue_ListValue* release_list(); + ::opencv_tensorflow::AttrValue_ListValue* mutable_list(); + void set_allocated_list(::opencv_tensorflow::AttrValue_ListValue* list); void unsafe_arena_set_allocated_list( - ::tensorflow::AttrValue_ListValue* list); - ::tensorflow::AttrValue_ListValue* unsafe_arena_release_list(); + ::opencv_tensorflow::AttrValue_ListValue* list); + ::opencv_tensorflow::AttrValue_ListValue* unsafe_arena_release_list(); - // .tensorflow.NameAttrList func = 10; + // .opencv_tensorflow.NameAttrList func = 10; bool has_func() const; void clear_func(); static const int kFuncFieldNumber = 10; private: void _slow_mutable_func(); public: - const ::tensorflow::NameAttrList& func() const; - ::tensorflow::NameAttrList* release_func(); - ::tensorflow::NameAttrList* mutable_func(); - void set_allocated_func(::tensorflow::NameAttrList* func); + const ::opencv_tensorflow::NameAttrList& func() const; + ::opencv_tensorflow::NameAttrList* release_func(); + ::opencv_tensorflow::NameAttrList* mutable_func(); + void set_allocated_func(::opencv_tensorflow::NameAttrList* func); void unsafe_arena_set_allocated_func( - ::tensorflow::NameAttrList* func); - ::tensorflow::NameAttrList* unsafe_arena_release_func(); + ::opencv_tensorflow::NameAttrList* func); + ::opencv_tensorflow::NameAttrList* unsafe_arena_release_func(); // string placeholder = 9; private: @@ -544,7 +544,7 @@ class AttrValue : public ::google::protobuf::Message /* @@protoc_insertion_point ::std::string* placeholder); ValueCase value_case() const; - // @@protoc_insertion_point(class_scope:tensorflow.AttrValue) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.AttrValue) private: void set_has_s(); void set_has_i(); @@ -572,10 +572,10 @@ class AttrValue : public ::google::protobuf::Message /* @@protoc_insertion_point float f_; bool b_; int type_; - ::tensorflow::TensorShapeProto* shape_; - ::tensorflow::TensorProto* tensor_; - ::tensorflow::AttrValue_ListValue* list_; - ::tensorflow::NameAttrList* func_; + ::opencv_tensorflow::TensorShapeProto* shape_; + ::opencv_tensorflow::TensorProto* tensor_; + ::opencv_tensorflow::AttrValue_ListValue* list_; + ::opencv_tensorflow::NameAttrList* func_; ::google::protobuf::internal::ArenaStringPtr placeholder_; } value_; mutable int _cached_size_; @@ -587,13 +587,13 @@ class AttrValue : public ::google::protobuf::Message /* @@protoc_insertion_point // ------------------------------------------------------------------- class NameAttrList_AttrEntry_DoNotUse : public ::google::protobuf::internal::MapEntry { public: typedef ::google::protobuf::internal::MapEntry SuperType; @@ -607,7 +607,7 @@ public: // ------------------------------------------------------------------- -class NameAttrList : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.NameAttrList) */ { +class NameAttrList : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.NameAttrList) */ { public: NameAttrList(); virtual ~NameAttrList(); @@ -702,13 +702,13 @@ class NameAttrList : public ::google::protobuf::Message /* @@protoc_insertion_po // accessors ------------------------------------------------------- - // map attr = 2; + // map attr = 2; int attr_size() const; void clear_attr(); static const int kAttrFieldNumber = 2; - const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& + const ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >& attr() const; - ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* + ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >* mutable_attr(); // string name = 1; @@ -734,7 +734,7 @@ class NameAttrList : public ::google::protobuf::Message /* @@protoc_insertion_po void unsafe_arena_set_allocated_name( ::std::string* name); - // @@protoc_insertion_point(class_scope:tensorflow.NameAttrList) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.NameAttrList) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -743,7 +743,7 @@ class NameAttrList : public ::google::protobuf::Message /* @@protoc_insertion_po typedef void DestructorSkippable_; ::google::protobuf::internal::MapField< NameAttrList_AttrEntry_DoNotUse, - ::std::string, ::tensorflow::AttrValue, + ::std::string, ::opencv_tensorflow::AttrValue, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 0 > attr_; @@ -771,64 +771,64 @@ inline void AttrValue_ListValue::clear_s() { s_.Clear(); } inline const ::std::string& AttrValue_ListValue::s(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.ListValue.s) return s_.Get(index); } inline ::std::string* AttrValue_ListValue::mutable_s(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.AttrValue.ListValue.s) return s_.Mutable(index); } inline void AttrValue_ListValue::set_s(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.ListValue.s) s_.Mutable(index)->assign(value); } #if LANG_CXX11 inline void AttrValue_ListValue::set_s(int index, ::std::string&& value) { - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.ListValue.s) s_.Mutable(index)->assign(std::move(value)); } #endif inline void AttrValue_ListValue::set_s(int index, const char* value) { GOOGLE_DCHECK(value != NULL); s_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.AttrValue.ListValue.s) } inline void AttrValue_ListValue::set_s(int index, const void* value, size_t size) { s_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.AttrValue.ListValue.s) } inline ::std::string* AttrValue_ListValue::add_s() { - // @@protoc_insertion_point(field_add_mutable:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_add_mutable:opencv_tensorflow.AttrValue.ListValue.s) return s_.Add(); } inline void AttrValue_ListValue::add_s(const ::std::string& value) { s_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_add:opencv_tensorflow.AttrValue.ListValue.s) } #if LANG_CXX11 inline void AttrValue_ListValue::add_s(::std::string&& value) { s_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_add:opencv_tensorflow.AttrValue.ListValue.s) } #endif inline void AttrValue_ListValue::add_s(const char* value) { GOOGLE_DCHECK(value != NULL); s_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_add_char:opencv_tensorflow.AttrValue.ListValue.s) } inline void AttrValue_ListValue::add_s(const void* value, size_t size) { s_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_add_pointer:opencv_tensorflow.AttrValue.ListValue.s) } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& AttrValue_ListValue::s() const { - // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_list:opencv_tensorflow.AttrValue.ListValue.s) return s_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* AttrValue_ListValue::mutable_s() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.s) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.AttrValue.ListValue.s) return &s_; } @@ -840,25 +840,25 @@ inline void AttrValue_ListValue::clear_i() { i_.Clear(); } inline ::google::protobuf::int64 AttrValue_ListValue::i(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.i) + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.ListValue.i) return i_.Get(index); } inline void AttrValue_ListValue::set_i(int index, ::google::protobuf::int64 value) { i_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.i) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.ListValue.i) } inline void AttrValue_ListValue::add_i(::google::protobuf::int64 value) { i_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.i) + // @@protoc_insertion_point(field_add:opencv_tensorflow.AttrValue.ListValue.i) } inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& AttrValue_ListValue::i() const { - // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.i) + // @@protoc_insertion_point(field_list:opencv_tensorflow.AttrValue.ListValue.i) return i_; } inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* AttrValue_ListValue::mutable_i() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.i) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.AttrValue.ListValue.i) return &i_; } @@ -870,25 +870,25 @@ inline void AttrValue_ListValue::clear_f() { f_.Clear(); } inline float AttrValue_ListValue::f(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.f) + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.ListValue.f) return f_.Get(index); } inline void AttrValue_ListValue::set_f(int index, float value) { f_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.f) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.ListValue.f) } inline void AttrValue_ListValue::add_f(float value) { f_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.f) + // @@protoc_insertion_point(field_add:opencv_tensorflow.AttrValue.ListValue.f) } inline const ::google::protobuf::RepeatedField< float >& AttrValue_ListValue::f() const { - // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.f) + // @@protoc_insertion_point(field_list:opencv_tensorflow.AttrValue.ListValue.f) return f_; } inline ::google::protobuf::RepeatedField< float >* AttrValue_ListValue::mutable_f() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.f) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.AttrValue.ListValue.f) return &f_; } @@ -900,109 +900,109 @@ inline void AttrValue_ListValue::clear_b() { b_.Clear(); } inline bool AttrValue_ListValue::b(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.b) + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.ListValue.b) return b_.Get(index); } inline void AttrValue_ListValue::set_b(int index, bool value) { b_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.b) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.ListValue.b) } inline void AttrValue_ListValue::add_b(bool value) { b_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.b) + // @@protoc_insertion_point(field_add:opencv_tensorflow.AttrValue.ListValue.b) } inline const ::google::protobuf::RepeatedField< bool >& AttrValue_ListValue::b() const { - // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.b) + // @@protoc_insertion_point(field_list:opencv_tensorflow.AttrValue.ListValue.b) return b_; } inline ::google::protobuf::RepeatedField< bool >* AttrValue_ListValue::mutable_b() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.b) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.AttrValue.ListValue.b) return &b_; } -// repeated .tensorflow.DataType type = 6 [packed = true]; +// repeated .opencv_tensorflow.DataType type = 6 [packed = true]; inline int AttrValue_ListValue::type_size() const { return type_.size(); } inline void AttrValue_ListValue::clear_type() { type_.Clear(); } -inline ::tensorflow::DataType AttrValue_ListValue::type(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.type) - return static_cast< ::tensorflow::DataType >(type_.Get(index)); +inline ::opencv_tensorflow::DataType AttrValue_ListValue::type(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.ListValue.type) + return static_cast< ::opencv_tensorflow::DataType >(type_.Get(index)); } -inline void AttrValue_ListValue::set_type(int index, ::tensorflow::DataType value) { +inline void AttrValue_ListValue::set_type(int index, ::opencv_tensorflow::DataType value) { type_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.ListValue.type) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.ListValue.type) } -inline void AttrValue_ListValue::add_type(::tensorflow::DataType value) { +inline void AttrValue_ListValue::add_type(::opencv_tensorflow::DataType value) { type_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.type) + // @@protoc_insertion_point(field_add:opencv_tensorflow.AttrValue.ListValue.type) } inline const ::google::protobuf::RepeatedField& AttrValue_ListValue::type() const { - // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.type) + // @@protoc_insertion_point(field_list:opencv_tensorflow.AttrValue.ListValue.type) return type_; } inline ::google::protobuf::RepeatedField* AttrValue_ListValue::mutable_type() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.type) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.AttrValue.ListValue.type) return &type_; } -// repeated .tensorflow.TensorShapeProto shape = 7; +// repeated .opencv_tensorflow.TensorShapeProto shape = 7; inline int AttrValue_ListValue::shape_size() const { return shape_.size(); } -inline const ::tensorflow::TensorShapeProto& AttrValue_ListValue::shape(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.shape) +inline const ::opencv_tensorflow::TensorShapeProto& AttrValue_ListValue::shape(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.ListValue.shape) return shape_.Get(index); } -inline ::tensorflow::TensorShapeProto* AttrValue_ListValue::mutable_shape(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.ListValue.shape) +inline ::opencv_tensorflow::TensorShapeProto* AttrValue_ListValue::mutable_shape(int index) { + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.AttrValue.ListValue.shape) return shape_.Mutable(index); } -inline ::tensorflow::TensorShapeProto* AttrValue_ListValue::add_shape() { - // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.shape) +inline ::opencv_tensorflow::TensorShapeProto* AttrValue_ListValue::add_shape() { + // @@protoc_insertion_point(field_add:opencv_tensorflow.AttrValue.ListValue.shape) return shape_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto >* +inline ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto >* AttrValue_ListValue::mutable_shape() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.shape) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.AttrValue.ListValue.shape) return &shape_; } -inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto >& +inline const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto >& AttrValue_ListValue::shape() const { - // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.shape) + // @@protoc_insertion_point(field_list:opencv_tensorflow.AttrValue.ListValue.shape) return shape_; } -// repeated .tensorflow.TensorProto tensor = 8; +// repeated .opencv_tensorflow.TensorProto tensor = 8; inline int AttrValue_ListValue::tensor_size() const { return tensor_.size(); } -inline const ::tensorflow::TensorProto& AttrValue_ListValue::tensor(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.ListValue.tensor) +inline const ::opencv_tensorflow::TensorProto& AttrValue_ListValue::tensor(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.ListValue.tensor) return tensor_.Get(index); } -inline ::tensorflow::TensorProto* AttrValue_ListValue::mutable_tensor(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.ListValue.tensor) +inline ::opencv_tensorflow::TensorProto* AttrValue_ListValue::mutable_tensor(int index) { + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.AttrValue.ListValue.tensor) return tensor_.Mutable(index); } -inline ::tensorflow::TensorProto* AttrValue_ListValue::add_tensor() { - // @@protoc_insertion_point(field_add:tensorflow.AttrValue.ListValue.tensor) +inline ::opencv_tensorflow::TensorProto* AttrValue_ListValue::add_tensor() { + // @@protoc_insertion_point(field_add:opencv_tensorflow.AttrValue.ListValue.tensor) return tensor_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto >* +inline ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorProto >* AttrValue_ListValue::mutable_tensor() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.AttrValue.ListValue.tensor) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.AttrValue.ListValue.tensor) return &tensor_; } -inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorProto >& +inline const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorProto >& AttrValue_ListValue::tensor() const { - // @@protoc_insertion_point(field_list:tensorflow.AttrValue.ListValue.tensor) + // @@protoc_insertion_point(field_list:opencv_tensorflow.AttrValue.ListValue.tensor) return tensor_; } @@ -1025,7 +1025,7 @@ inline void AttrValue::clear_s() { } } inline const ::std::string& AttrValue::s() const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.s) + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.s) if (has_s()) { return value_.s_.Get(); } @@ -1039,11 +1039,11 @@ inline void AttrValue::set_s(const ::std::string& value) { } value_.s_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.s) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.s) } #if LANG_CXX11 inline void AttrValue::set_s(::std::string&& value) { - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.s) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.s) if (!has_s()) { clear_value(); set_has_s(); @@ -1051,7 +1051,7 @@ inline void AttrValue::set_s(::std::string&& value) { } value_.s_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.AttrValue.s) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.AttrValue.s) } #endif inline void AttrValue::set_s(const char* value) { @@ -1063,7 +1063,7 @@ inline void AttrValue::set_s(const char* value) { } value_.s_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.AttrValue.s) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.AttrValue.s) } inline void AttrValue::set_s(const void* value, size_t size) { @@ -1076,7 +1076,7 @@ inline void AttrValue::set_s(const void* value, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.AttrValue.s) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.AttrValue.s) } inline ::std::string* AttrValue::mutable_s() { if (!has_s()) { @@ -1086,10 +1086,10 @@ inline ::std::string* AttrValue::mutable_s() { } return value_.s_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.s) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.AttrValue.s) } inline ::std::string* AttrValue::release_s() { - // @@protoc_insertion_point(field_release:tensorflow.AttrValue.s) + // @@protoc_insertion_point(field_release:opencv_tensorflow.AttrValue.s) if (has_s()) { clear_has_value(); return value_.s_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1108,10 +1108,10 @@ inline void AttrValue::set_allocated_s(::std::string* s) { value_.s_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s, GetArenaNoVirtual()); } - // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.s) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.AttrValue.s) } inline ::std::string* AttrValue::unsafe_arena_release_s() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.s) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.AttrValue.s) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); if (has_s()) { clear_has_value(); @@ -1131,7 +1131,7 @@ inline void AttrValue::unsafe_arena_set_allocated_s(::std::string* s) { set_has_s(); value_.s_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), s, GetArenaNoVirtual()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.s) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.AttrValue.s) } // int64 i = 3; @@ -1148,7 +1148,7 @@ inline void AttrValue::clear_i() { } } inline ::google::protobuf::int64 AttrValue::i() const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.i) + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.i) if (has_i()) { return value_.i_; } @@ -1160,7 +1160,7 @@ inline void AttrValue::set_i(::google::protobuf::int64 value) { set_has_i(); } value_.i_ = value; - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.i) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.i) } // float f = 4; @@ -1177,7 +1177,7 @@ inline void AttrValue::clear_f() { } } inline float AttrValue::f() const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.f) + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.f) if (has_f()) { return value_.f_; } @@ -1189,7 +1189,7 @@ inline void AttrValue::set_f(float value) { set_has_f(); } value_.f_ = value; - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.f) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.f) } // bool b = 5; @@ -1206,7 +1206,7 @@ inline void AttrValue::clear_b() { } } inline bool AttrValue::b() const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.b) + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.b) if (has_b()) { return value_.b_; } @@ -1218,10 +1218,10 @@ inline void AttrValue::set_b(bool value) { set_has_b(); } value_.b_ = value; - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.b) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.b) } -// .tensorflow.DataType type = 6; +// .opencv_tensorflow.DataType type = 6; inline bool AttrValue::has_type() const { return value_case() == kType; } @@ -1234,34 +1234,34 @@ inline void AttrValue::clear_type() { clear_has_value(); } } -inline ::tensorflow::DataType AttrValue::type() const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.type) +inline ::opencv_tensorflow::DataType AttrValue::type() const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.type) if (has_type()) { - return static_cast< ::tensorflow::DataType >(value_.type_); + return static_cast< ::opencv_tensorflow::DataType >(value_.type_); } - return static_cast< ::tensorflow::DataType >(0); + return static_cast< ::opencv_tensorflow::DataType >(0); } -inline void AttrValue::set_type(::tensorflow::DataType value) { +inline void AttrValue::set_type(::opencv_tensorflow::DataType value) { if (!has_type()) { clear_value(); set_has_type(); } value_.type_ = value; - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.type) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.type) } -// .tensorflow.TensorShapeProto shape = 7; +// .opencv_tensorflow.TensorShapeProto shape = 7; inline bool AttrValue::has_shape() const { return value_case() == kShape; } inline void AttrValue::set_has_shape() { _oneof_case_[0] = kShape; } -inline ::tensorflow::TensorShapeProto* AttrValue::release_shape() { - // @@protoc_insertion_point(field_release:tensorflow.AttrValue.shape) +inline ::opencv_tensorflow::TensorShapeProto* AttrValue::release_shape() { + // @@protoc_insertion_point(field_release:opencv_tensorflow.AttrValue.shape) if (has_shape()) { clear_has_value(); - ::tensorflow::TensorShapeProto* temp = value_.shape_; + ::opencv_tensorflow::TensorShapeProto* temp = value_.shape_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL); } @@ -1271,55 +1271,55 @@ inline ::tensorflow::TensorShapeProto* AttrValue::release_shape() { return NULL; } } -inline const ::tensorflow::TensorShapeProto& AttrValue::shape() const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.shape) +inline const ::opencv_tensorflow::TensorShapeProto& AttrValue::shape() const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.shape) return has_shape() ? *value_.shape_ - : *reinterpret_cast< ::tensorflow::TensorShapeProto*>(&::tensorflow::_TensorShapeProto_default_instance_); + : *reinterpret_cast< ::opencv_tensorflow::TensorShapeProto*>(&::opencv_tensorflow::_TensorShapeProto_default_instance_); } -inline ::tensorflow::TensorShapeProto* AttrValue::unsafe_arena_release_shape() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.shape) +inline ::opencv_tensorflow::TensorShapeProto* AttrValue::unsafe_arena_release_shape() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.AttrValue.shape) if (has_shape()) { clear_has_value(); - ::tensorflow::TensorShapeProto* temp = value_.shape_; + ::opencv_tensorflow::TensorShapeProto* temp = value_.shape_; value_.shape_ = NULL; return temp; } else { return NULL; } } -inline void AttrValue::unsafe_arena_set_allocated_shape(::tensorflow::TensorShapeProto* shape) { +inline void AttrValue::unsafe_arena_set_allocated_shape(::opencv_tensorflow::TensorShapeProto* shape) { clear_value(); if (shape) { set_has_shape(); value_.shape_ = shape; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.shape) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.AttrValue.shape) } -inline ::tensorflow::TensorShapeProto* AttrValue::mutable_shape() { +inline ::opencv_tensorflow::TensorShapeProto* AttrValue::mutable_shape() { if (!has_shape()) { clear_value(); set_has_shape(); value_.shape_ = - ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorShapeProto >( + ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::TensorShapeProto >( GetArenaNoVirtual()); } - // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.shape) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.AttrValue.shape) return value_.shape_; } -// .tensorflow.TensorProto tensor = 8; +// .opencv_tensorflow.TensorProto tensor = 8; inline bool AttrValue::has_tensor() const { return value_case() == kTensor; } inline void AttrValue::set_has_tensor() { _oneof_case_[0] = kTensor; } -inline ::tensorflow::TensorProto* AttrValue::release_tensor() { - // @@protoc_insertion_point(field_release:tensorflow.AttrValue.tensor) +inline ::opencv_tensorflow::TensorProto* AttrValue::release_tensor() { + // @@protoc_insertion_point(field_release:opencv_tensorflow.AttrValue.tensor) if (has_tensor()) { clear_has_value(); - ::tensorflow::TensorProto* temp = value_.tensor_; + ::opencv_tensorflow::TensorProto* temp = value_.tensor_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL); } @@ -1329,44 +1329,44 @@ inline ::tensorflow::TensorProto* AttrValue::release_tensor() { return NULL; } } -inline const ::tensorflow::TensorProto& AttrValue::tensor() const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.tensor) +inline const ::opencv_tensorflow::TensorProto& AttrValue::tensor() const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.tensor) return has_tensor() ? *value_.tensor_ - : *reinterpret_cast< ::tensorflow::TensorProto*>(&::tensorflow::_TensorProto_default_instance_); + : *reinterpret_cast< ::opencv_tensorflow::TensorProto*>(&::opencv_tensorflow::_TensorProto_default_instance_); } -inline ::tensorflow::TensorProto* AttrValue::unsafe_arena_release_tensor() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.tensor) +inline ::opencv_tensorflow::TensorProto* AttrValue::unsafe_arena_release_tensor() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.AttrValue.tensor) if (has_tensor()) { clear_has_value(); - ::tensorflow::TensorProto* temp = value_.tensor_; + ::opencv_tensorflow::TensorProto* temp = value_.tensor_; value_.tensor_ = NULL; return temp; } else { return NULL; } } -inline void AttrValue::unsafe_arena_set_allocated_tensor(::tensorflow::TensorProto* tensor) { +inline void AttrValue::unsafe_arena_set_allocated_tensor(::opencv_tensorflow::TensorProto* tensor) { clear_value(); if (tensor) { set_has_tensor(); value_.tensor_ = tensor; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.tensor) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.AttrValue.tensor) } -inline ::tensorflow::TensorProto* AttrValue::mutable_tensor() { +inline ::opencv_tensorflow::TensorProto* AttrValue::mutable_tensor() { if (!has_tensor()) { clear_value(); set_has_tensor(); value_.tensor_ = - ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorProto >( + ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::TensorProto >( GetArenaNoVirtual()); } - // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.tensor) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.AttrValue.tensor) return value_.tensor_; } -// .tensorflow.AttrValue.ListValue list = 1; +// .opencv_tensorflow.AttrValue.ListValue list = 1; inline bool AttrValue::has_list() const { return value_case() == kList; } @@ -1381,11 +1381,11 @@ inline void AttrValue::clear_list() { clear_has_value(); } } -inline ::tensorflow::AttrValue_ListValue* AttrValue::release_list() { - // @@protoc_insertion_point(field_release:tensorflow.AttrValue.list) +inline ::opencv_tensorflow::AttrValue_ListValue* AttrValue::release_list() { + // @@protoc_insertion_point(field_release:opencv_tensorflow.AttrValue.list) if (has_list()) { clear_has_value(); - ::tensorflow::AttrValue_ListValue* temp = value_.list_; + ::opencv_tensorflow::AttrValue_ListValue* temp = value_.list_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL); } @@ -1395,44 +1395,44 @@ inline ::tensorflow::AttrValue_ListValue* AttrValue::release_list() { return NULL; } } -inline const ::tensorflow::AttrValue_ListValue& AttrValue::list() const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.list) +inline const ::opencv_tensorflow::AttrValue_ListValue& AttrValue::list() const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.list) return has_list() ? *value_.list_ - : *reinterpret_cast< ::tensorflow::AttrValue_ListValue*>(&::tensorflow::_AttrValue_ListValue_default_instance_); + : *reinterpret_cast< ::opencv_tensorflow::AttrValue_ListValue*>(&::opencv_tensorflow::_AttrValue_ListValue_default_instance_); } -inline ::tensorflow::AttrValue_ListValue* AttrValue::unsafe_arena_release_list() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.list) +inline ::opencv_tensorflow::AttrValue_ListValue* AttrValue::unsafe_arena_release_list() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.AttrValue.list) if (has_list()) { clear_has_value(); - ::tensorflow::AttrValue_ListValue* temp = value_.list_; + ::opencv_tensorflow::AttrValue_ListValue* temp = value_.list_; value_.list_ = NULL; return temp; } else { return NULL; } } -inline void AttrValue::unsafe_arena_set_allocated_list(::tensorflow::AttrValue_ListValue* list) { +inline void AttrValue::unsafe_arena_set_allocated_list(::opencv_tensorflow::AttrValue_ListValue* list) { clear_value(); if (list) { set_has_list(); value_.list_ = list; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.list) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.AttrValue.list) } -inline ::tensorflow::AttrValue_ListValue* AttrValue::mutable_list() { +inline ::opencv_tensorflow::AttrValue_ListValue* AttrValue::mutable_list() { if (!has_list()) { clear_value(); set_has_list(); value_.list_ = - ::google::protobuf::Arena::CreateMessage< ::tensorflow::AttrValue_ListValue >( + ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::AttrValue_ListValue >( GetArenaNoVirtual()); } - // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.list) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.AttrValue.list) return value_.list_; } -// .tensorflow.NameAttrList func = 10; +// .opencv_tensorflow.NameAttrList func = 10; inline bool AttrValue::has_func() const { return value_case() == kFunc; } @@ -1447,11 +1447,11 @@ inline void AttrValue::clear_func() { clear_has_value(); } } -inline ::tensorflow::NameAttrList* AttrValue::release_func() { - // @@protoc_insertion_point(field_release:tensorflow.AttrValue.func) +inline ::opencv_tensorflow::NameAttrList* AttrValue::release_func() { + // @@protoc_insertion_point(field_release:opencv_tensorflow.AttrValue.func) if (has_func()) { clear_has_value(); - ::tensorflow::NameAttrList* temp = value_.func_; + ::opencv_tensorflow::NameAttrList* temp = value_.func_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL); } @@ -1461,40 +1461,40 @@ inline ::tensorflow::NameAttrList* AttrValue::release_func() { return NULL; } } -inline const ::tensorflow::NameAttrList& AttrValue::func() const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.func) +inline const ::opencv_tensorflow::NameAttrList& AttrValue::func() const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.func) return has_func() ? *value_.func_ - : *reinterpret_cast< ::tensorflow::NameAttrList*>(&::tensorflow::_NameAttrList_default_instance_); + : *reinterpret_cast< ::opencv_tensorflow::NameAttrList*>(&::opencv_tensorflow::_NameAttrList_default_instance_); } -inline ::tensorflow::NameAttrList* AttrValue::unsafe_arena_release_func() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.func) +inline ::opencv_tensorflow::NameAttrList* AttrValue::unsafe_arena_release_func() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.AttrValue.func) if (has_func()) { clear_has_value(); - ::tensorflow::NameAttrList* temp = value_.func_; + ::opencv_tensorflow::NameAttrList* temp = value_.func_; value_.func_ = NULL; return temp; } else { return NULL; } } -inline void AttrValue::unsafe_arena_set_allocated_func(::tensorflow::NameAttrList* func) { +inline void AttrValue::unsafe_arena_set_allocated_func(::opencv_tensorflow::NameAttrList* func) { clear_value(); if (func) { set_has_func(); value_.func_ = func; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.func) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.AttrValue.func) } -inline ::tensorflow::NameAttrList* AttrValue::mutable_func() { +inline ::opencv_tensorflow::NameAttrList* AttrValue::mutable_func() { if (!has_func()) { clear_value(); set_has_func(); value_.func_ = - ::google::protobuf::Arena::CreateMessage< ::tensorflow::NameAttrList >( + ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::NameAttrList >( GetArenaNoVirtual()); } - // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.func) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.AttrValue.func) return value_.func_; } @@ -1513,7 +1513,7 @@ inline void AttrValue::clear_placeholder() { } } inline const ::std::string& AttrValue::placeholder() const { - // @@protoc_insertion_point(field_get:tensorflow.AttrValue.placeholder) + // @@protoc_insertion_point(field_get:opencv_tensorflow.AttrValue.placeholder) if (has_placeholder()) { return value_.placeholder_.Get(); } @@ -1527,11 +1527,11 @@ inline void AttrValue::set_placeholder(const ::std::string& value) { } value_.placeholder_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.placeholder) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.placeholder) } #if LANG_CXX11 inline void AttrValue::set_placeholder(::std::string&& value) { - // @@protoc_insertion_point(field_set:tensorflow.AttrValue.placeholder) + // @@protoc_insertion_point(field_set:opencv_tensorflow.AttrValue.placeholder) if (!has_placeholder()) { clear_value(); set_has_placeholder(); @@ -1539,7 +1539,7 @@ inline void AttrValue::set_placeholder(::std::string&& value) { } value_.placeholder_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.AttrValue.placeholder) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.AttrValue.placeholder) } #endif inline void AttrValue::set_placeholder(const char* value) { @@ -1551,7 +1551,7 @@ inline void AttrValue::set_placeholder(const char* value) { } value_.placeholder_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.AttrValue.placeholder) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.AttrValue.placeholder) } inline void AttrValue::set_placeholder(const char* value, size_t size) { @@ -1564,7 +1564,7 @@ inline void AttrValue::set_placeholder(const char* value, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.AttrValue.placeholder) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.AttrValue.placeholder) } inline ::std::string* AttrValue::mutable_placeholder() { if (!has_placeholder()) { @@ -1574,10 +1574,10 @@ inline ::std::string* AttrValue::mutable_placeholder() { } return value_.placeholder_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_mutable:tensorflow.AttrValue.placeholder) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.AttrValue.placeholder) } inline ::std::string* AttrValue::release_placeholder() { - // @@protoc_insertion_point(field_release:tensorflow.AttrValue.placeholder) + // @@protoc_insertion_point(field_release:opencv_tensorflow.AttrValue.placeholder) if (has_placeholder()) { clear_has_value(); return value_.placeholder_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1596,10 +1596,10 @@ inline void AttrValue::set_allocated_placeholder(::std::string* placeholder) { value_.placeholder_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), placeholder, GetArenaNoVirtual()); } - // @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.placeholder) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.AttrValue.placeholder) } inline ::std::string* AttrValue::unsafe_arena_release_placeholder() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.AttrValue.placeholder) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.AttrValue.placeholder) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); if (has_placeholder()) { clear_has_value(); @@ -1619,7 +1619,7 @@ inline void AttrValue::unsafe_arena_set_allocated_placeholder(::std::string* pla set_has_placeholder(); value_.placeholder_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), placeholder, GetArenaNoVirtual()); } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.AttrValue.placeholder) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.AttrValue.placeholder) } inline bool AttrValue::has_value() const { @@ -1642,20 +1642,20 @@ inline void NameAttrList::clear_name() { name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& NameAttrList::name() const { - // @@protoc_insertion_point(field_get:tensorflow.NameAttrList.name) + // @@protoc_insertion_point(field_get:opencv_tensorflow.NameAttrList.name) return name_.Get(); } inline void NameAttrList::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.NameAttrList.name) + // @@protoc_insertion_point(field_set:opencv_tensorflow.NameAttrList.name) } #if LANG_CXX11 inline void NameAttrList::set_name(::std::string&& value) { name_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.NameAttrList.name) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.NameAttrList.name) } #endif inline void NameAttrList::set_name(const char* value) { @@ -1663,22 +1663,22 @@ inline void NameAttrList::set_name(const char* value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.NameAttrList.name) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.NameAttrList.name) } inline void NameAttrList::set_name(const char* value, size_t size) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.NameAttrList.name) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.NameAttrList.name) } inline ::std::string* NameAttrList::mutable_name() { - // @@protoc_insertion_point(field_mutable:tensorflow.NameAttrList.name) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.NameAttrList.name) return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* NameAttrList::release_name() { - // @@protoc_insertion_point(field_release:tensorflow.NameAttrList.name) + // @@protoc_insertion_point(field_release:opencv_tensorflow.NameAttrList.name) return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1690,10 +1690,10 @@ inline void NameAttrList::set_allocated_name(::std::string* name) { } name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.NameAttrList.name) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.NameAttrList.name) } inline ::std::string* NameAttrList::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NameAttrList.name) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.NameAttrList.name) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1709,24 +1709,24 @@ inline void NameAttrList::unsafe_arena_set_allocated_name( } name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NameAttrList.name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.NameAttrList.name) } -// map attr = 2; +// map attr = 2; inline int NameAttrList::attr_size() const { return attr_.size(); } inline void NameAttrList::clear_attr() { attr_.Clear(); } -inline const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& +inline const ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >& NameAttrList::attr() const { - // @@protoc_insertion_point(field_map:tensorflow.NameAttrList.attr) + // @@protoc_insertion_point(field_map:opencv_tensorflow.NameAttrList.attr) return attr_.GetMap(); } -inline ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* +inline ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >* NameAttrList::mutable_attr() { - // @@protoc_insertion_point(field_mutable_map:tensorflow.NameAttrList.attr) + // @@protoc_insertion_point(field_mutable_map:opencv_tensorflow.NameAttrList.attr) return attr_.MutableMap(); } @@ -1742,7 +1742,7 @@ NameAttrList::mutable_attr() { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/function.pb.cc b/modules/dnn/misc/tensorflow/function.pb.cc index 10954b0514..6691c12f5d 100644 --- a/modules/dnn/misc/tensorflow/function.pb.cc +++ b/modules/dnn/misc/tensorflow/function.pb.cc @@ -19,7 +19,7 @@ #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) -namespace tensorflow { +namespace opencv_tensorflow { class FunctionDefLibraryDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed @@ -45,7 +45,7 @@ class GradientDefDefaultTypeInternal { ::google::protobuf::internal::ExplicitlyConstructed _instance; } _GradientDef_default_instance_; -} // namespace tensorflow +} // namespace opencv_tensorflow namespace protobuf_function_2eproto { void InitDefaultsFunctionDefLibraryImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -58,11 +58,11 @@ void InitDefaultsFunctionDefLibraryImpl() { protobuf_function_2eproto::InitDefaultsFunctionDef(); protobuf_function_2eproto::InitDefaultsGradientDef(); { - void* ptr = &::tensorflow::_FunctionDefLibrary_default_instance_; - new (ptr) ::tensorflow::FunctionDefLibrary(); + void* ptr = &::opencv_tensorflow::_FunctionDefLibrary_default_instance_; + new (ptr) ::opencv_tensorflow::FunctionDefLibrary(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::FunctionDefLibrary::InitAsDefaultInstance(); + ::opencv_tensorflow::FunctionDefLibrary::InitAsDefaultInstance(); } void InitDefaultsFunctionDefLibrary() { @@ -80,10 +80,10 @@ void InitDefaultsFunctionDef_Node_AttrEntry_DoNotUseImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue(); { - void* ptr = &::tensorflow::_FunctionDef_Node_AttrEntry_DoNotUse_default_instance_; - new (ptr) ::tensorflow::FunctionDef_Node_AttrEntry_DoNotUse(); + void* ptr = &::opencv_tensorflow::_FunctionDef_Node_AttrEntry_DoNotUse_default_instance_; + new (ptr) ::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse(); } - ::tensorflow::FunctionDef_Node_AttrEntry_DoNotUse::InitAsDefaultInstance(); + ::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse::InitAsDefaultInstance(); } void InitDefaultsFunctionDef_Node_AttrEntry_DoNotUse() { @@ -101,11 +101,11 @@ void InitDefaultsFunctionDef_NodeImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_function_2eproto::InitDefaultsFunctionDef_Node_AttrEntry_DoNotUse(); { - void* ptr = &::tensorflow::_FunctionDef_Node_default_instance_; - new (ptr) ::tensorflow::FunctionDef_Node(); + void* ptr = &::opencv_tensorflow::_FunctionDef_Node_default_instance_; + new (ptr) ::opencv_tensorflow::FunctionDef_Node(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::FunctionDef_Node::InitAsDefaultInstance(); + ::opencv_tensorflow::FunctionDef_Node::InitAsDefaultInstance(); } void InitDefaultsFunctionDef_Node() { @@ -124,11 +124,11 @@ void InitDefaultsFunctionDefImpl() { protobuf_op_5fdef_2eproto::InitDefaultsOpDef(); protobuf_function_2eproto::InitDefaultsFunctionDef_Node(); { - void* ptr = &::tensorflow::_FunctionDef_default_instance_; - new (ptr) ::tensorflow::FunctionDef(); + void* ptr = &::opencv_tensorflow::_FunctionDef_default_instance_; + new (ptr) ::opencv_tensorflow::FunctionDef(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::FunctionDef::InitAsDefaultInstance(); + ::opencv_tensorflow::FunctionDef::InitAsDefaultInstance(); } void InitDefaultsFunctionDef() { @@ -145,11 +145,11 @@ void InitDefaultsGradientDefImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::tensorflow::_GradientDef_default_instance_; - new (ptr) ::tensorflow::GradientDef(); + void* ptr = &::opencv_tensorflow::_GradientDef_default_instance_; + new (ptr) ::opencv_tensorflow::GradientDef(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::GradientDef::InitAsDefaultInstance(); + ::opencv_tensorflow::GradientDef::InitAsDefaultInstance(); } void InitDefaultsGradientDef() { @@ -161,60 +161,60 @@ void InitDefaultsGradientDef() { const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDefLibrary, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDefLibrary, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDefLibrary, function_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDefLibrary, gradient_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, _has_bits_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDefLibrary, function_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDefLibrary, gradient_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, key_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, key_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef_Node, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef_Node, ret_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef_Node, op_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef_Node, arg_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef_Node, dep_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef_Node, attr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, ret_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, op_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, arg_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, dep_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, attr_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef, signature_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::FunctionDef, node_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, signature_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, node_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::GradientDef, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GradientDef, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::GradientDef, function_name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::GradientDef, gradient_func_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GradientDef, function_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GradientDef, gradient_func_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::tensorflow::FunctionDefLibrary)}, - { 7, 14, sizeof(::tensorflow::FunctionDef_Node_AttrEntry_DoNotUse)}, - { 16, -1, sizeof(::tensorflow::FunctionDef_Node)}, - { 26, -1, sizeof(::tensorflow::FunctionDef)}, - { 33, -1, sizeof(::tensorflow::GradientDef)}, + { 0, -1, sizeof(::opencv_tensorflow::FunctionDefLibrary)}, + { 7, 14, sizeof(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse)}, + { 16, -1, sizeof(::opencv_tensorflow::FunctionDef_Node)}, + { 26, -1, sizeof(::opencv_tensorflow::FunctionDef)}, + { 33, -1, sizeof(::opencv_tensorflow::GradientDef)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::tensorflow::_FunctionDefLibrary_default_instance_), - reinterpret_cast(&::tensorflow::_FunctionDef_Node_AttrEntry_DoNotUse_default_instance_), - reinterpret_cast(&::tensorflow::_FunctionDef_Node_default_instance_), - reinterpret_cast(&::tensorflow::_FunctionDef_default_instance_), - reinterpret_cast(&::tensorflow::_GradientDef_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_FunctionDefLibrary_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_FunctionDef_Node_AttrEntry_DoNotUse_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_FunctionDef_Node_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_FunctionDef_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_GradientDef_default_instance_), }; void protobuf_AssignDescriptors() { @@ -239,24 +239,25 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\016function.proto\022\ntensorflow\032\020attr_value" - ".proto\032\014op_def.proto\"j\n\022FunctionDefLibra" - "ry\022)\n\010function\030\001 \003(\0132\027.tensorflow.Functi" - "onDef\022)\n\010gradient\030\002 \003(\0132\027.tensorflow.Gra" - "dientDef\"\225\002\n\013FunctionDef\022$\n\tsignature\030\001 " - "\001(\0132\021.tensorflow.OpDef\022*\n\004node\030\002 \003(\0132\034.t" - "ensorflow.FunctionDef.Node\032\263\001\n\004Node\022\013\n\003r" - "et\030\001 \003(\t\022\n\n\002op\030\002 \001(\t\022\013\n\003arg\030\003 \003(\t\022\013\n\003dep" - "\030\004 \003(\t\0224\n\004attr\030\005 \003(\0132&.tensorflow.Functi" - "onDef.Node.AttrEntry\032B\n\tAttrEntry\022\013\n\003key" - "\030\001 \001(\t\022$\n\005value\030\002 \001(\0132\025.tensorflow.AttrV" - "alue:\0028\001\";\n\013GradientDef\022\025\n\rfunction_name" - "\030\001 \001(\t\022\025\n\rgradient_func\030\002 \001(\tB/\n\030org.ten" - "sorflow.frameworkB\016FunctionProtosP\001\370\001\001b\006" - "proto3" + "\n\016function.proto\022\021opencv_tensorflow\032\020att" + "r_value.proto\032\014op_def.proto\"x\n\022FunctionD" + "efLibrary\0220\n\010function\030\001 \003(\0132\036.opencv_ten" + "sorflow.FunctionDef\0220\n\010gradient\030\002 \003(\0132\036." + "opencv_tensorflow.GradientDef\"\261\002\n\013Functi" + "onDef\022+\n\tsignature\030\001 \001(\0132\030.opencv_tensor" + "flow.OpDef\0221\n\004node\030\002 \003(\0132#.opencv_tensor" + "flow.FunctionDef.Node\032\301\001\n\004Node\022\013\n\003ret\030\001 " + "\003(\t\022\n\n\002op\030\002 \001(\t\022\013\n\003arg\030\003 \003(\t\022\013\n\003dep\030\004 \003(" + "\t\022;\n\004attr\030\005 \003(\0132-.opencv_tensorflow.Func" + "tionDef.Node.AttrEntry\032I\n\tAttrEntry\022\013\n\003k" + "ey\030\001 \001(\t\022+\n\005value\030\002 \001(\0132\034.opencv_tensorf" + "low.AttrValue:\0028\001\";\n\013GradientDef\022\025\n\rfunc" + "tion_name\030\001 \001(\t\022\025\n\rgradient_func\030\002 \001(\tB/" + "\n\030org.tensorflow.frameworkB\016FunctionProt" + "osP\001\370\001\001b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 566); + descriptor, 615); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "function.proto", &protobuf_RegisterTypes); ::protobuf_attr_5fvalue_2eproto::AddDescriptors(); @@ -274,7 +275,7 @@ struct StaticDescriptorInitializer { } } static_descriptor_initializer; } // namespace protobuf_function_2eproto -namespace tensorflow { +namespace opencv_tensorflow { // =================================================================== @@ -291,7 +292,7 @@ FunctionDefLibrary::FunctionDefLibrary() ::protobuf_function_2eproto::InitDefaultsFunctionDefLibrary(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(constructor:opencv_tensorflow.FunctionDefLibrary) } FunctionDefLibrary::FunctionDefLibrary(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -301,7 +302,7 @@ FunctionDefLibrary::FunctionDefLibrary(::google::protobuf::Arena* arena) ::protobuf_function_2eproto::InitDefaultsFunctionDefLibrary(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDefLibrary) } FunctionDefLibrary::FunctionDefLibrary(const FunctionDefLibrary& from) : ::google::protobuf::Message(), @@ -310,7 +311,7 @@ FunctionDefLibrary::FunctionDefLibrary(const FunctionDefLibrary& from) gradient_(from.gradient_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.FunctionDefLibrary) } void FunctionDefLibrary::SharedCtor() { @@ -318,7 +319,7 @@ void FunctionDefLibrary::SharedCtor() { } FunctionDefLibrary::~FunctionDefLibrary() { - // @@protoc_insertion_point(destructor:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDefLibrary) SharedDtor(); } @@ -352,7 +353,7 @@ FunctionDefLibrary* FunctionDefLibrary::New(::google::protobuf::Arena* arena) co } void FunctionDefLibrary::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.FunctionDefLibrary) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDefLibrary) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -366,13 +367,13 @@ bool FunctionDefLibrary::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.FunctionDefLibrary) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .tensorflow.FunctionDef function = 1; + // repeated .opencv_tensorflow.FunctionDef function = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -383,7 +384,7 @@ bool FunctionDefLibrary::MergePartialFromCodedStream( break; } - // repeated .tensorflow.GradientDef gradient = 2; + // repeated .opencv_tensorflow.GradientDef gradient = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -406,28 +407,28 @@ bool FunctionDefLibrary::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.FunctionDefLibrary) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.FunctionDefLibrary) return false; #undef DO_ } void FunctionDefLibrary::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.FunctionDefLibrary) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .tensorflow.FunctionDef function = 1; + // repeated .opencv_tensorflow.FunctionDef function = 1; for (unsigned int i = 0, n = static_cast(this->function_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->function(static_cast(i)), output); } - // repeated .tensorflow.GradientDef gradient = 2; + // repeated .opencv_tensorflow.GradientDef gradient = 2; for (unsigned int i = 0, n = static_cast(this->gradient_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -438,17 +439,17 @@ void FunctionDefLibrary::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.FunctionDefLibrary) } ::google::protobuf::uint8* FunctionDefLibrary::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.FunctionDefLibrary) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .tensorflow.FunctionDef function = 1; + // repeated .opencv_tensorflow.FunctionDef function = 1; for (unsigned int i = 0, n = static_cast(this->function_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -456,7 +457,7 @@ void FunctionDefLibrary::SerializeWithCachedSizes( 1, this->function(static_cast(i)), deterministic, target); } - // repeated .tensorflow.GradientDef gradient = 2; + // repeated .opencv_tensorflow.GradientDef gradient = 2; for (unsigned int i = 0, n = static_cast(this->gradient_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -468,12 +469,12 @@ void FunctionDefLibrary::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDefLibrary) return target; } size_t FunctionDefLibrary::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.FunctionDefLibrary) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.FunctionDefLibrary) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -481,7 +482,7 @@ size_t FunctionDefLibrary::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .tensorflow.FunctionDef function = 1; + // repeated .opencv_tensorflow.FunctionDef function = 1; { unsigned int count = static_cast(this->function_size()); total_size += 1UL * count; @@ -492,7 +493,7 @@ size_t FunctionDefLibrary::ByteSizeLong() const { } } - // repeated .tensorflow.GradientDef gradient = 2; + // repeated .opencv_tensorflow.GradientDef gradient = 2; { unsigned int count = static_cast(this->gradient_size()); total_size += 1UL * count; @@ -511,22 +512,22 @@ size_t FunctionDefLibrary::ByteSizeLong() const { } void FunctionDefLibrary::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.FunctionDefLibrary) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.FunctionDefLibrary) GOOGLE_DCHECK_NE(&from, this); const FunctionDefLibrary* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.FunctionDefLibrary) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.FunctionDefLibrary) MergeFrom(*source); } } void FunctionDefLibrary::MergeFrom(const FunctionDefLibrary& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.FunctionDefLibrary) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.FunctionDefLibrary) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -537,14 +538,14 @@ void FunctionDefLibrary::MergeFrom(const FunctionDefLibrary& from) { } void FunctionDefLibrary::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.FunctionDefLibrary) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.FunctionDefLibrary) if (&from == this) return; Clear(); MergeFrom(from); } void FunctionDefLibrary::CopyFrom(const FunctionDefLibrary& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.FunctionDefLibrary) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.FunctionDefLibrary) if (&from == this) return; Clear(); MergeFrom(from); @@ -625,7 +626,7 @@ FunctionDef_Node::FunctionDef_Node() ::protobuf_function_2eproto::InitDefaultsFunctionDef_Node(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(constructor:opencv_tensorflow.FunctionDef.Node) } FunctionDef_Node::FunctionDef_Node(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -637,7 +638,7 @@ FunctionDef_Node::FunctionDef_Node(::google::protobuf::Arena* arena) ::protobuf_function_2eproto::InitDefaultsFunctionDef_Node(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDef.Node) } FunctionDef_Node::FunctionDef_Node(const FunctionDef_Node& from) : ::google::protobuf::Message(), @@ -653,7 +654,7 @@ FunctionDef_Node::FunctionDef_Node(const FunctionDef_Node& from) op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.op(), GetArenaNoVirtual()); } - // @@protoc_insertion_point(copy_constructor:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.FunctionDef.Node) } void FunctionDef_Node::SharedCtor() { @@ -662,7 +663,7 @@ void FunctionDef_Node::SharedCtor() { } FunctionDef_Node::~FunctionDef_Node() { - // @@protoc_insertion_point(destructor:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDef.Node) SharedDtor(); } @@ -697,7 +698,7 @@ FunctionDef_Node* FunctionDef_Node::New(::google::protobuf::Arena* arena) const } void FunctionDef_Node::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.FunctionDef.Node) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDef.Node) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -714,7 +715,7 @@ bool FunctionDef_Node::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.FunctionDef.Node) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -730,7 +731,7 @@ bool FunctionDef_Node::MergePartialFromCodedStream( this->ret(this->ret_size() - 1).data(), static_cast(this->ret(this->ret_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.FunctionDef.Node.ret")); + "opencv_tensorflow.FunctionDef.Node.ret")); } else { goto handle_unusual; } @@ -746,7 +747,7 @@ bool FunctionDef_Node::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->op().data(), static_cast(this->op().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.FunctionDef.Node.op")); + "opencv_tensorflow.FunctionDef.Node.op")); } else { goto handle_unusual; } @@ -763,7 +764,7 @@ bool FunctionDef_Node::MergePartialFromCodedStream( this->arg(this->arg_size() - 1).data(), static_cast(this->arg(this->arg_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.FunctionDef.Node.arg")); + "opencv_tensorflow.FunctionDef.Node.arg")); } else { goto handle_unusual; } @@ -780,30 +781,30 @@ bool FunctionDef_Node::MergePartialFromCodedStream( this->dep(this->dep_size() - 1).data(), static_cast(this->dep(this->dep_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.FunctionDef.Node.dep")); + "opencv_tensorflow.FunctionDef.Node.dep")); } else { goto handle_unusual; } break; } - // map attr = 5; + // map attr = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { FunctionDef_Node_AttrEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< FunctionDef_Node_AttrEntry_DoNotUse, - ::std::string, ::tensorflow::AttrValue, + ::std::string, ::opencv_tensorflow::AttrValue, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 0 >, - ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue > > parser(&attr_); + ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue > > parser(&attr_); DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, &parser)); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.key().data(), static_cast(parser.key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.FunctionDef.Node.AttrEntry.key")); + "opencv_tensorflow.FunctionDef.Node.AttrEntry.key")); } else { goto handle_unusual; } @@ -822,17 +823,17 @@ bool FunctionDef_Node::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.FunctionDef.Node) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.FunctionDef.Node) return false; #undef DO_ } void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.FunctionDef.Node) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -841,7 +842,7 @@ void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->ret(i).data(), static_cast(this->ret(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.FunctionDef.Node.ret"); + "opencv_tensorflow.FunctionDef.Node.ret"); ::google::protobuf::internal::WireFormatLite::WriteString( 1, this->ret(i), output); } @@ -851,7 +852,7 @@ void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->op().data(), static_cast(this->op().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.FunctionDef.Node.op"); + "opencv_tensorflow.FunctionDef.Node.op"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->op(), output); } @@ -861,7 +862,7 @@ void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->arg(i).data(), static_cast(this->arg(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.FunctionDef.Node.arg"); + "opencv_tensorflow.FunctionDef.Node.arg"); ::google::protobuf::internal::WireFormatLite::WriteString( 3, this->arg(i), output); } @@ -871,14 +872,14 @@ void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->dep(i).data(), static_cast(this->dep(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.FunctionDef.Node.dep"); + "opencv_tensorflow.FunctionDef.Node.dep"); ::google::protobuf::internal::WireFormatLite::WriteString( 4, this->dep(i), output); } - // map attr = 5; + // map attr = 5; if (!this->attr().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst Less; @@ -887,7 +888,7 @@ void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.FunctionDef.Node.AttrEntry.key"); + "opencv_tensorflow.FunctionDef.Node.AttrEntry.key"); } }; @@ -895,9 +896,9 @@ void FunctionDef_Node::SerializeWithCachedSizes( this->attr().size() > 1) { ::google::protobuf::scoped_array items( new SortItem[this->attr().size()]); - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -916,7 +917,7 @@ void FunctionDef_Node::SerializeWithCachedSizes( } } else { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it) { entry.reset(attr_.NewEntryWrapper( @@ -935,13 +936,13 @@ void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.FunctionDef.Node) } ::google::protobuf::uint8* FunctionDef_Node::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.FunctionDef.Node) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -950,7 +951,7 @@ void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->ret(i).data(), static_cast(this->ret(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.FunctionDef.Node.ret"); + "opencv_tensorflow.FunctionDef.Node.ret"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(1, this->ret(i), target); } @@ -960,7 +961,7 @@ void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->op().data(), static_cast(this->op().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.FunctionDef.Node.op"); + "opencv_tensorflow.FunctionDef.Node.op"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->op(), target); @@ -971,7 +972,7 @@ void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->arg(i).data(), static_cast(this->arg(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.FunctionDef.Node.arg"); + "opencv_tensorflow.FunctionDef.Node.arg"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(3, this->arg(i), target); } @@ -981,14 +982,14 @@ void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->dep(i).data(), static_cast(this->dep(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.FunctionDef.Node.dep"); + "opencv_tensorflow.FunctionDef.Node.dep"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(4, this->dep(i), target); } - // map attr = 5; + // map attr = 5; if (!this->attr().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst Less; @@ -997,7 +998,7 @@ void FunctionDef_Node::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.FunctionDef.Node.AttrEntry.key"); + "opencv_tensorflow.FunctionDef.Node.AttrEntry.key"); } }; @@ -1005,9 +1006,9 @@ void FunctionDef_Node::SerializeWithCachedSizes( this->attr().size() > 1) { ::google::protobuf::scoped_array items( new SortItem[this->attr().size()]); - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -1028,7 +1029,7 @@ void FunctionDef_Node::SerializeWithCachedSizes( } } else { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it) { entry.reset(attr_.NewEntryWrapper( @@ -1049,12 +1050,12 @@ void FunctionDef_Node::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDef.Node) return target; } size_t FunctionDef_Node::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.FunctionDef.Node) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.FunctionDef.Node) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1086,12 +1087,12 @@ size_t FunctionDef_Node::ByteSizeLong() const { this->dep(i)); } - // map attr = 5; + // map attr = 5; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->attr_size()); { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it) { if (entry.get() != NULL && entry->GetArena() != NULL) { @@ -1121,22 +1122,22 @@ size_t FunctionDef_Node::ByteSizeLong() const { } void FunctionDef_Node::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.FunctionDef.Node) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.FunctionDef.Node) GOOGLE_DCHECK_NE(&from, this); const FunctionDef_Node* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.FunctionDef.Node) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.FunctionDef.Node) MergeFrom(*source); } } void FunctionDef_Node::MergeFrom(const FunctionDef_Node& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.FunctionDef.Node) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.FunctionDef.Node) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1152,14 +1153,14 @@ void FunctionDef_Node::MergeFrom(const FunctionDef_Node& from) { } void FunctionDef_Node::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.FunctionDef.Node) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.FunctionDef.Node) if (&from == this) return; Clear(); MergeFrom(from); } void FunctionDef_Node::CopyFrom(const FunctionDef_Node& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.FunctionDef.Node) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.FunctionDef.Node) if (&from == this) return; Clear(); MergeFrom(from); @@ -1208,15 +1209,15 @@ void FunctionDef_Node::InternalSwap(FunctionDef_Node* other) { // =================================================================== void FunctionDef::InitAsDefaultInstance() { - ::tensorflow::_FunctionDef_default_instance_._instance.get_mutable()->signature_ = const_cast< ::tensorflow::OpDef*>( - ::tensorflow::OpDef::internal_default_instance()); + ::opencv_tensorflow::_FunctionDef_default_instance_._instance.get_mutable()->signature_ = const_cast< ::opencv_tensorflow::OpDef*>( + ::opencv_tensorflow::OpDef::internal_default_instance()); } void FunctionDef::_slow_mutable_signature() { - signature_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::OpDef >( + signature_ = ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::OpDef >( GetArenaNoVirtual()); } void FunctionDef::unsafe_arena_set_allocated_signature( - ::tensorflow::OpDef* signature) { + ::opencv_tensorflow::OpDef* signature) { if (GetArenaNoVirtual() == NULL) { delete signature_; } @@ -1226,7 +1227,7 @@ void FunctionDef::unsafe_arena_set_allocated_signature( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.FunctionDef.signature) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.FunctionDef.signature) } void FunctionDef::clear_signature() { if (GetArenaNoVirtual() == NULL && signature_ != NULL) { @@ -1245,7 +1246,7 @@ FunctionDef::FunctionDef() ::protobuf_function_2eproto::InitDefaultsFunctionDef(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.FunctionDef) + // @@protoc_insertion_point(constructor:opencv_tensorflow.FunctionDef) } FunctionDef::FunctionDef(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -1254,7 +1255,7 @@ FunctionDef::FunctionDef(::google::protobuf::Arena* arena) ::protobuf_function_2eproto::InitDefaultsFunctionDef(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.FunctionDef) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDef) } FunctionDef::FunctionDef(const FunctionDef& from) : ::google::protobuf::Message(), @@ -1263,11 +1264,11 @@ FunctionDef::FunctionDef(const FunctionDef& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_signature()) { - signature_ = new ::tensorflow::OpDef(*from.signature_); + signature_ = new ::opencv_tensorflow::OpDef(*from.signature_); } else { signature_ = NULL; } - // @@protoc_insertion_point(copy_constructor:tensorflow.FunctionDef) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.FunctionDef) } void FunctionDef::SharedCtor() { @@ -1276,7 +1277,7 @@ void FunctionDef::SharedCtor() { } FunctionDef::~FunctionDef() { - // @@protoc_insertion_point(destructor:tensorflow.FunctionDef) + // @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDef) SharedDtor(); } @@ -1311,7 +1312,7 @@ FunctionDef* FunctionDef::New(::google::protobuf::Arena* arena) const { } void FunctionDef::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.FunctionDef) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDef) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1328,13 +1329,13 @@ bool FunctionDef::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.FunctionDef) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.FunctionDef) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .tensorflow.OpDef signature = 1; + // .opencv_tensorflow.OpDef signature = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -1346,7 +1347,7 @@ bool FunctionDef::MergePartialFromCodedStream( break; } - // repeated .tensorflow.FunctionDef.Node node = 2; + // repeated .opencv_tensorflow.FunctionDef.Node node = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -1369,27 +1370,27 @@ bool FunctionDef::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.FunctionDef) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.FunctionDef) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.FunctionDef) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.FunctionDef) return false; #undef DO_ } void FunctionDef::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.FunctionDef) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.FunctionDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .tensorflow.OpDef signature = 1; + // .opencv_tensorflow.OpDef signature = 1; if (this->has_signature()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *this->signature_, output); } - // repeated .tensorflow.FunctionDef.Node node = 2; + // repeated .opencv_tensorflow.FunctionDef.Node node = 2; for (unsigned int i = 0, n = static_cast(this->node_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -1400,24 +1401,24 @@ void FunctionDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.FunctionDef) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.FunctionDef) } ::google::protobuf::uint8* FunctionDef::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.FunctionDef) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.FunctionDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .tensorflow.OpDef signature = 1; + // .opencv_tensorflow.OpDef signature = 1; if (this->has_signature()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, *this->signature_, deterministic, target); } - // repeated .tensorflow.FunctionDef.Node node = 2; + // repeated .opencv_tensorflow.FunctionDef.Node node = 2; for (unsigned int i = 0, n = static_cast(this->node_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -1429,12 +1430,12 @@ void FunctionDef::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.FunctionDef) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDef) return target; } size_t FunctionDef::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.FunctionDef) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.FunctionDef) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1442,7 +1443,7 @@ size_t FunctionDef::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .tensorflow.FunctionDef.Node node = 2; + // repeated .opencv_tensorflow.FunctionDef.Node node = 2; { unsigned int count = static_cast(this->node_size()); total_size += 1UL * count; @@ -1453,7 +1454,7 @@ size_t FunctionDef::ByteSizeLong() const { } } - // .tensorflow.OpDef signature = 1; + // .opencv_tensorflow.OpDef signature = 1; if (this->has_signature()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -1468,22 +1469,22 @@ size_t FunctionDef::ByteSizeLong() const { } void FunctionDef::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.FunctionDef) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.FunctionDef) GOOGLE_DCHECK_NE(&from, this); const FunctionDef* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.FunctionDef) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.FunctionDef) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.FunctionDef) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.FunctionDef) MergeFrom(*source); } } void FunctionDef::MergeFrom(const FunctionDef& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.FunctionDef) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.FunctionDef) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1491,19 +1492,19 @@ void FunctionDef::MergeFrom(const FunctionDef& from) { node_.MergeFrom(from.node_); if (from.has_signature()) { - mutable_signature()->::tensorflow::OpDef::MergeFrom(from.signature()); + mutable_signature()->::opencv_tensorflow::OpDef::MergeFrom(from.signature()); } } void FunctionDef::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.FunctionDef) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.FunctionDef) if (&from == this) return; Clear(); MergeFrom(from); } void FunctionDef::CopyFrom(const FunctionDef& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.FunctionDef) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.FunctionDef) if (&from == this) return; Clear(); MergeFrom(from); @@ -1561,7 +1562,7 @@ GradientDef::GradientDef() ::protobuf_function_2eproto::InitDefaultsGradientDef(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.GradientDef) + // @@protoc_insertion_point(constructor:opencv_tensorflow.GradientDef) } GradientDef::GradientDef(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -1569,7 +1570,7 @@ GradientDef::GradientDef(::google::protobuf::Arena* arena) ::protobuf_function_2eproto::InitDefaultsGradientDef(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.GradientDef) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.GradientDef) } GradientDef::GradientDef(const GradientDef& from) : ::google::protobuf::Message(), @@ -1586,7 +1587,7 @@ GradientDef::GradientDef(const GradientDef& from) gradient_func_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.gradient_func(), GetArenaNoVirtual()); } - // @@protoc_insertion_point(copy_constructor:tensorflow.GradientDef) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.GradientDef) } void GradientDef::SharedCtor() { @@ -1596,7 +1597,7 @@ void GradientDef::SharedCtor() { } GradientDef::~GradientDef() { - // @@protoc_insertion_point(destructor:tensorflow.GradientDef) + // @@protoc_insertion_point(destructor:opencv_tensorflow.GradientDef) SharedDtor(); } @@ -1632,7 +1633,7 @@ GradientDef* GradientDef::New(::google::protobuf::Arena* arena) const { } void GradientDef::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.GradientDef) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.GradientDef) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1646,7 +1647,7 @@ bool GradientDef::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.GradientDef) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.GradientDef) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -1661,7 +1662,7 @@ bool GradientDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->function_name().data(), static_cast(this->function_name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.GradientDef.function_name")); + "opencv_tensorflow.GradientDef.function_name")); } else { goto handle_unusual; } @@ -1677,7 +1678,7 @@ bool GradientDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->gradient_func().data(), static_cast(this->gradient_func().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.GradientDef.gradient_func")); + "opencv_tensorflow.GradientDef.gradient_func")); } else { goto handle_unusual; } @@ -1696,17 +1697,17 @@ bool GradientDef::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.GradientDef) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.GradientDef) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.GradientDef) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.GradientDef) return false; #undef DO_ } void GradientDef::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.GradientDef) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.GradientDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1715,7 +1716,7 @@ void GradientDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->function_name().data(), static_cast(this->function_name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.GradientDef.function_name"); + "opencv_tensorflow.GradientDef.function_name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->function_name(), output); } @@ -1725,7 +1726,7 @@ void GradientDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->gradient_func().data(), static_cast(this->gradient_func().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.GradientDef.gradient_func"); + "opencv_tensorflow.GradientDef.gradient_func"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->gradient_func(), output); } @@ -1734,13 +1735,13 @@ void GradientDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.GradientDef) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.GradientDef) } ::google::protobuf::uint8* GradientDef::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.GradientDef) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.GradientDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1749,7 +1750,7 @@ void GradientDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->function_name().data(), static_cast(this->function_name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.GradientDef.function_name"); + "opencv_tensorflow.GradientDef.function_name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->function_name(), target); @@ -1760,7 +1761,7 @@ void GradientDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->gradient_func().data(), static_cast(this->gradient_func().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.GradientDef.gradient_func"); + "opencv_tensorflow.GradientDef.gradient_func"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->gradient_func(), target); @@ -1770,12 +1771,12 @@ void GradientDef::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.GradientDef) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.GradientDef) return target; } size_t GradientDef::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.GradientDef) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.GradientDef) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1805,22 +1806,22 @@ size_t GradientDef::ByteSizeLong() const { } void GradientDef::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.GradientDef) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.GradientDef) GOOGLE_DCHECK_NE(&from, this); const GradientDef* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.GradientDef) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.GradientDef) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.GradientDef) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.GradientDef) MergeFrom(*source); } } void GradientDef::MergeFrom(const GradientDef& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.GradientDef) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.GradientDef) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1835,14 +1836,14 @@ void GradientDef::MergeFrom(const GradientDef& from) { } void GradientDef::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.GradientDef) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.GradientDef) if (&from == this) return; Clear(); MergeFrom(from); } void GradientDef::CopyFrom(const GradientDef& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.GradientDef) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.GradientDef) if (&from == this) return; Clear(); MergeFrom(from); @@ -1886,6 +1887,6 @@ void GradientDef::InternalSwap(GradientDef* other) { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/function.pb.h b/modules/dnn/misc/tensorflow/function.pb.h index 89736e8a4d..a4be8aa702 100644 --- a/modules/dnn/misc/tensorflow/function.pb.h +++ b/modules/dnn/misc/tensorflow/function.pb.h @@ -65,7 +65,7 @@ inline void InitDefaults() { InitDefaultsGradientDef(); } } // namespace protobuf_function_2eproto -namespace tensorflow { +namespace opencv_tensorflow { class FunctionDef; class FunctionDefDefaultTypeInternal; extern FunctionDefDefaultTypeInternal _FunctionDef_default_instance_; @@ -81,12 +81,12 @@ extern FunctionDef_Node_AttrEntry_DoNotUseDefaultTypeInternal _FunctionDef_Node_ class GradientDef; class GradientDefDefaultTypeInternal; extern GradientDefDefaultTypeInternal _GradientDef_default_instance_; -} // namespace tensorflow -namespace tensorflow { +} // namespace opencv_tensorflow +namespace opencv_tensorflow { // =================================================================== -class FunctionDefLibrary : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.FunctionDefLibrary) */ { +class FunctionDefLibrary : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.FunctionDefLibrary) */ { public: FunctionDefLibrary(); virtual ~FunctionDefLibrary(); @@ -180,39 +180,39 @@ class FunctionDefLibrary : public ::google::protobuf::Message /* @@protoc_insert // accessors ------------------------------------------------------- - // repeated .tensorflow.FunctionDef function = 1; + // repeated .opencv_tensorflow.FunctionDef function = 1; int function_size() const; void clear_function(); static const int kFunctionFieldNumber = 1; - const ::tensorflow::FunctionDef& function(int index) const; - ::tensorflow::FunctionDef* mutable_function(int index); - ::tensorflow::FunctionDef* add_function(); - ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef >* + const ::opencv_tensorflow::FunctionDef& function(int index) const; + ::opencv_tensorflow::FunctionDef* mutable_function(int index); + ::opencv_tensorflow::FunctionDef* add_function(); + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::FunctionDef >* mutable_function(); - const ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef >& + const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::FunctionDef >& function() const; - // repeated .tensorflow.GradientDef gradient = 2; + // repeated .opencv_tensorflow.GradientDef gradient = 2; int gradient_size() const; void clear_gradient(); static const int kGradientFieldNumber = 2; - const ::tensorflow::GradientDef& gradient(int index) const; - ::tensorflow::GradientDef* mutable_gradient(int index); - ::tensorflow::GradientDef* add_gradient(); - ::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef >* + const ::opencv_tensorflow::GradientDef& gradient(int index) const; + ::opencv_tensorflow::GradientDef* mutable_gradient(int index); + ::opencv_tensorflow::GradientDef* add_gradient(); + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::GradientDef >* mutable_gradient(); - const ::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef >& + const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::GradientDef >& gradient() const; - // @@protoc_insertion_point(class_scope:tensorflow.FunctionDefLibrary) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.FunctionDefLibrary) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef > function_; - ::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef > gradient_; + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::FunctionDef > function_; + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::GradientDef > gradient_; mutable int _cached_size_; friend struct ::protobuf_function_2eproto::TableStruct; friend void ::protobuf_function_2eproto::InitDefaultsFunctionDefLibraryImpl(); @@ -220,13 +220,13 @@ class FunctionDefLibrary : public ::google::protobuf::Message /* @@protoc_insert // ------------------------------------------------------------------- class FunctionDef_Node_AttrEntry_DoNotUse : public ::google::protobuf::internal::MapEntry { public: typedef ::google::protobuf::internal::MapEntry SuperType; @@ -240,7 +240,7 @@ public: // ------------------------------------------------------------------- -class FunctionDef_Node : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.FunctionDef.Node) */ { +class FunctionDef_Node : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.FunctionDef.Node) */ { public: FunctionDef_Node(); virtual ~FunctionDef_Node(); @@ -401,13 +401,13 @@ class FunctionDef_Node : public ::google::protobuf::Message /* @@protoc_insertio const ::google::protobuf::RepeatedPtrField< ::std::string>& dep() const; ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_dep(); - // map attr = 5; + // map attr = 5; int attr_size() const; void clear_attr(); static const int kAttrFieldNumber = 5; - const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& + const ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >& attr() const; - ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* + ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >* mutable_attr(); // string op = 2; @@ -433,7 +433,7 @@ class FunctionDef_Node : public ::google::protobuf::Message /* @@protoc_insertio void unsafe_arena_set_allocated_op( ::std::string* op); - // @@protoc_insertion_point(class_scope:tensorflow.FunctionDef.Node) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.FunctionDef.Node) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -445,7 +445,7 @@ class FunctionDef_Node : public ::google::protobuf::Message /* @@protoc_insertio ::google::protobuf::RepeatedPtrField< ::std::string> dep_; ::google::protobuf::internal::MapField< FunctionDef_Node_AttrEntry_DoNotUse, - ::std::string, ::tensorflow::AttrValue, + ::std::string, ::opencv_tensorflow::AttrValue, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 0 > attr_; @@ -456,7 +456,7 @@ class FunctionDef_Node : public ::google::protobuf::Message /* @@protoc_insertio }; // ------------------------------------------------------------------- -class FunctionDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.FunctionDef) */ { +class FunctionDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.FunctionDef) */ { public: FunctionDef(); virtual ~FunctionDef(); @@ -552,49 +552,49 @@ class FunctionDef : public ::google::protobuf::Message /* @@protoc_insertion_poi // accessors ------------------------------------------------------- - // repeated .tensorflow.FunctionDef.Node node = 2; + // repeated .opencv_tensorflow.FunctionDef.Node node = 2; int node_size() const; void clear_node(); static const int kNodeFieldNumber = 2; - const ::tensorflow::FunctionDef_Node& node(int index) const; - ::tensorflow::FunctionDef_Node* mutable_node(int index); - ::tensorflow::FunctionDef_Node* add_node(); - ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node >* + const ::opencv_tensorflow::FunctionDef_Node& node(int index) const; + ::opencv_tensorflow::FunctionDef_Node* mutable_node(int index); + ::opencv_tensorflow::FunctionDef_Node* add_node(); + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::FunctionDef_Node >* mutable_node(); - const ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node >& + const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::FunctionDef_Node >& node() const; - // .tensorflow.OpDef signature = 1; + // .opencv_tensorflow.OpDef signature = 1; bool has_signature() const; void clear_signature(); static const int kSignatureFieldNumber = 1; private: void _slow_mutable_signature(); public: - const ::tensorflow::OpDef& signature() const; - ::tensorflow::OpDef* release_signature(); - ::tensorflow::OpDef* mutable_signature(); - void set_allocated_signature(::tensorflow::OpDef* signature); + const ::opencv_tensorflow::OpDef& signature() const; + ::opencv_tensorflow::OpDef* release_signature(); + ::opencv_tensorflow::OpDef* mutable_signature(); + void set_allocated_signature(::opencv_tensorflow::OpDef* signature); void unsafe_arena_set_allocated_signature( - ::tensorflow::OpDef* signature); - ::tensorflow::OpDef* unsafe_arena_release_signature(); + ::opencv_tensorflow::OpDef* signature); + ::opencv_tensorflow::OpDef* unsafe_arena_release_signature(); - // @@protoc_insertion_point(class_scope:tensorflow.FunctionDef) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.FunctionDef) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node > node_; - ::tensorflow::OpDef* signature_; + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::FunctionDef_Node > node_; + ::opencv_tensorflow::OpDef* signature_; mutable int _cached_size_; friend struct ::protobuf_function_2eproto::TableStruct; friend void ::protobuf_function_2eproto::InitDefaultsFunctionDefImpl(); }; // ------------------------------------------------------------------- -class GradientDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.GradientDef) */ { +class GradientDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.GradientDef) */ { public: GradientDef(); virtual ~GradientDef(); @@ -734,7 +734,7 @@ class GradientDef : public ::google::protobuf::Message /* @@protoc_insertion_poi void unsafe_arena_set_allocated_gradient_func( ::std::string* gradient_func); - // @@protoc_insertion_point(class_scope:tensorflow.GradientDef) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.GradientDef) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -758,63 +758,63 @@ class GradientDef : public ::google::protobuf::Message /* @@protoc_insertion_poi #endif // __GNUC__ // FunctionDefLibrary -// repeated .tensorflow.FunctionDef function = 1; +// repeated .opencv_tensorflow.FunctionDef function = 1; inline int FunctionDefLibrary::function_size() const { return function_.size(); } inline void FunctionDefLibrary::clear_function() { function_.Clear(); } -inline const ::tensorflow::FunctionDef& FunctionDefLibrary::function(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.FunctionDefLibrary.function) +inline const ::opencv_tensorflow::FunctionDef& FunctionDefLibrary::function(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.FunctionDefLibrary.function) return function_.Get(index); } -inline ::tensorflow::FunctionDef* FunctionDefLibrary::mutable_function(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDefLibrary.function) +inline ::opencv_tensorflow::FunctionDef* FunctionDefLibrary::mutable_function(int index) { + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.FunctionDefLibrary.function) return function_.Mutable(index); } -inline ::tensorflow::FunctionDef* FunctionDefLibrary::add_function() { - // @@protoc_insertion_point(field_add:tensorflow.FunctionDefLibrary.function) +inline ::opencv_tensorflow::FunctionDef* FunctionDefLibrary::add_function() { + // @@protoc_insertion_point(field_add:opencv_tensorflow.FunctionDefLibrary.function) return function_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef >* +inline ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::FunctionDef >* FunctionDefLibrary::mutable_function() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDefLibrary.function) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.FunctionDefLibrary.function) return &function_; } -inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef >& +inline const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::FunctionDef >& FunctionDefLibrary::function() const { - // @@protoc_insertion_point(field_list:tensorflow.FunctionDefLibrary.function) + // @@protoc_insertion_point(field_list:opencv_tensorflow.FunctionDefLibrary.function) return function_; } -// repeated .tensorflow.GradientDef gradient = 2; +// repeated .opencv_tensorflow.GradientDef gradient = 2; inline int FunctionDefLibrary::gradient_size() const { return gradient_.size(); } inline void FunctionDefLibrary::clear_gradient() { gradient_.Clear(); } -inline const ::tensorflow::GradientDef& FunctionDefLibrary::gradient(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.FunctionDefLibrary.gradient) +inline const ::opencv_tensorflow::GradientDef& FunctionDefLibrary::gradient(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.FunctionDefLibrary.gradient) return gradient_.Get(index); } -inline ::tensorflow::GradientDef* FunctionDefLibrary::mutable_gradient(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDefLibrary.gradient) +inline ::opencv_tensorflow::GradientDef* FunctionDefLibrary::mutable_gradient(int index) { + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.FunctionDefLibrary.gradient) return gradient_.Mutable(index); } -inline ::tensorflow::GradientDef* FunctionDefLibrary::add_gradient() { - // @@protoc_insertion_point(field_add:tensorflow.FunctionDefLibrary.gradient) +inline ::opencv_tensorflow::GradientDef* FunctionDefLibrary::add_gradient() { + // @@protoc_insertion_point(field_add:opencv_tensorflow.FunctionDefLibrary.gradient) return gradient_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef >* +inline ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::GradientDef >* FunctionDefLibrary::mutable_gradient() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDefLibrary.gradient) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.FunctionDefLibrary.gradient) return &gradient_; } -inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::GradientDef >& +inline const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::GradientDef >& FunctionDefLibrary::gradient() const { - // @@protoc_insertion_point(field_list:tensorflow.FunctionDefLibrary.gradient) + // @@protoc_insertion_point(field_list:opencv_tensorflow.FunctionDefLibrary.gradient) return gradient_; } @@ -832,64 +832,64 @@ inline void FunctionDef_Node::clear_ret() { ret_.Clear(); } inline const ::std::string& FunctionDef_Node::ret(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_get:opencv_tensorflow.FunctionDef.Node.ret) return ret_.Get(index); } inline ::std::string* FunctionDef_Node::mutable_ret(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.FunctionDef.Node.ret) return ret_.Mutable(index); } inline void FunctionDef_Node::set_ret(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_set:opencv_tensorflow.FunctionDef.Node.ret) ret_.Mutable(index)->assign(value); } #if LANG_CXX11 inline void FunctionDef_Node::set_ret(int index, ::std::string&& value) { - // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_set:opencv_tensorflow.FunctionDef.Node.ret) ret_.Mutable(index)->assign(std::move(value)); } #endif inline void FunctionDef_Node::set_ret(int index, const char* value) { GOOGLE_DCHECK(value != NULL); ret_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.FunctionDef.Node.ret) } inline void FunctionDef_Node::set_ret(int index, const char* value, size_t size) { ret_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.FunctionDef.Node.ret) } inline ::std::string* FunctionDef_Node::add_ret() { - // @@protoc_insertion_point(field_add_mutable:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_add_mutable:opencv_tensorflow.FunctionDef.Node.ret) return ret_.Add(); } inline void FunctionDef_Node::add_ret(const ::std::string& value) { ret_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_add:opencv_tensorflow.FunctionDef.Node.ret) } #if LANG_CXX11 inline void FunctionDef_Node::add_ret(::std::string&& value) { ret_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_add:opencv_tensorflow.FunctionDef.Node.ret) } #endif inline void FunctionDef_Node::add_ret(const char* value) { GOOGLE_DCHECK(value != NULL); ret_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_add_char:opencv_tensorflow.FunctionDef.Node.ret) } inline void FunctionDef_Node::add_ret(const char* value, size_t size) { ret_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_add_pointer:opencv_tensorflow.FunctionDef.Node.ret) } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& FunctionDef_Node::ret() const { - // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_list:opencv_tensorflow.FunctionDef.Node.ret) return ret_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* FunctionDef_Node::mutable_ret() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.Node.ret) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.FunctionDef.Node.ret) return &ret_; } @@ -898,20 +898,20 @@ inline void FunctionDef_Node::clear_op() { op_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& FunctionDef_Node::op() const { - // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.op) + // @@protoc_insertion_point(field_get:opencv_tensorflow.FunctionDef.Node.op) return op_.Get(); } inline void FunctionDef_Node::set_op(const ::std::string& value) { op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.op) + // @@protoc_insertion_point(field_set:opencv_tensorflow.FunctionDef.Node.op) } #if LANG_CXX11 inline void FunctionDef_Node::set_op(::std::string&& value) { op_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.FunctionDef.Node.op) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.FunctionDef.Node.op) } #endif inline void FunctionDef_Node::set_op(const char* value) { @@ -919,22 +919,22 @@ inline void FunctionDef_Node::set_op(const char* value) { op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.op) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.FunctionDef.Node.op) } inline void FunctionDef_Node::set_op(const char* value, size_t size) { op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.op) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.FunctionDef.Node.op) } inline ::std::string* FunctionDef_Node::mutable_op() { - // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.op) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.FunctionDef.Node.op) return op_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* FunctionDef_Node::release_op() { - // @@protoc_insertion_point(field_release:tensorflow.FunctionDef.Node.op) + // @@protoc_insertion_point(field_release:opencv_tensorflow.FunctionDef.Node.op) return op_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -946,10 +946,10 @@ inline void FunctionDef_Node::set_allocated_op(::std::string* op) { } op_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), op, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.FunctionDef.Node.op) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.FunctionDef.Node.op) } inline ::std::string* FunctionDef_Node::unsafe_arena_release_op() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.FunctionDef.Node.op) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.FunctionDef.Node.op) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return op_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -965,7 +965,7 @@ inline void FunctionDef_Node::unsafe_arena_set_allocated_op( } op_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), op, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.FunctionDef.Node.op) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.FunctionDef.Node.op) } // repeated string arg = 3; @@ -976,64 +976,64 @@ inline void FunctionDef_Node::clear_arg() { arg_.Clear(); } inline const ::std::string& FunctionDef_Node::arg(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_get:opencv_tensorflow.FunctionDef.Node.arg) return arg_.Get(index); } inline ::std::string* FunctionDef_Node::mutable_arg(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.FunctionDef.Node.arg) return arg_.Mutable(index); } inline void FunctionDef_Node::set_arg(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_set:opencv_tensorflow.FunctionDef.Node.arg) arg_.Mutable(index)->assign(value); } #if LANG_CXX11 inline void FunctionDef_Node::set_arg(int index, ::std::string&& value) { - // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_set:opencv_tensorflow.FunctionDef.Node.arg) arg_.Mutable(index)->assign(std::move(value)); } #endif inline void FunctionDef_Node::set_arg(int index, const char* value) { GOOGLE_DCHECK(value != NULL); arg_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.FunctionDef.Node.arg) } inline void FunctionDef_Node::set_arg(int index, const char* value, size_t size) { arg_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.FunctionDef.Node.arg) } inline ::std::string* FunctionDef_Node::add_arg() { - // @@protoc_insertion_point(field_add_mutable:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_add_mutable:opencv_tensorflow.FunctionDef.Node.arg) return arg_.Add(); } inline void FunctionDef_Node::add_arg(const ::std::string& value) { arg_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_add:opencv_tensorflow.FunctionDef.Node.arg) } #if LANG_CXX11 inline void FunctionDef_Node::add_arg(::std::string&& value) { arg_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_add:opencv_tensorflow.FunctionDef.Node.arg) } #endif inline void FunctionDef_Node::add_arg(const char* value) { GOOGLE_DCHECK(value != NULL); arg_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_add_char:opencv_tensorflow.FunctionDef.Node.arg) } inline void FunctionDef_Node::add_arg(const char* value, size_t size) { arg_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_add_pointer:opencv_tensorflow.FunctionDef.Node.arg) } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& FunctionDef_Node::arg() const { - // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_list:opencv_tensorflow.FunctionDef.Node.arg) return arg_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* FunctionDef_Node::mutable_arg() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.Node.arg) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.FunctionDef.Node.arg) return &arg_; } @@ -1045,79 +1045,79 @@ inline void FunctionDef_Node::clear_dep() { dep_.Clear(); } inline const ::std::string& FunctionDef_Node::dep(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_get:opencv_tensorflow.FunctionDef.Node.dep) return dep_.Get(index); } inline ::std::string* FunctionDef_Node::mutable_dep(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.FunctionDef.Node.dep) return dep_.Mutable(index); } inline void FunctionDef_Node::set_dep(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_set:opencv_tensorflow.FunctionDef.Node.dep) dep_.Mutable(index)->assign(value); } #if LANG_CXX11 inline void FunctionDef_Node::set_dep(int index, ::std::string&& value) { - // @@protoc_insertion_point(field_set:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_set:opencv_tensorflow.FunctionDef.Node.dep) dep_.Mutable(index)->assign(std::move(value)); } #endif inline void FunctionDef_Node::set_dep(int index, const char* value) { GOOGLE_DCHECK(value != NULL); dep_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.FunctionDef.Node.dep) } inline void FunctionDef_Node::set_dep(int index, const char* value, size_t size) { dep_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.FunctionDef.Node.dep) } inline ::std::string* FunctionDef_Node::add_dep() { - // @@protoc_insertion_point(field_add_mutable:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_add_mutable:opencv_tensorflow.FunctionDef.Node.dep) return dep_.Add(); } inline void FunctionDef_Node::add_dep(const ::std::string& value) { dep_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_add:opencv_tensorflow.FunctionDef.Node.dep) } #if LANG_CXX11 inline void FunctionDef_Node::add_dep(::std::string&& value) { dep_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_add:opencv_tensorflow.FunctionDef.Node.dep) } #endif inline void FunctionDef_Node::add_dep(const char* value) { GOOGLE_DCHECK(value != NULL); dep_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_add_char:opencv_tensorflow.FunctionDef.Node.dep) } inline void FunctionDef_Node::add_dep(const char* value, size_t size) { dep_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_add_pointer:opencv_tensorflow.FunctionDef.Node.dep) } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& FunctionDef_Node::dep() const { - // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_list:opencv_tensorflow.FunctionDef.Node.dep) return dep_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* FunctionDef_Node::mutable_dep() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.Node.dep) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.FunctionDef.Node.dep) return &dep_; } -// map attr = 5; +// map attr = 5; inline int FunctionDef_Node::attr_size() const { return attr_.size(); } -inline const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& +inline const ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >& FunctionDef_Node::attr() const { - // @@protoc_insertion_point(field_map:tensorflow.FunctionDef.Node.attr) + // @@protoc_insertion_point(field_map:opencv_tensorflow.FunctionDef.Node.attr) return attr_.GetMap(); } -inline ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* +inline ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >* FunctionDef_Node::mutable_attr() { - // @@protoc_insertion_point(field_mutable_map:tensorflow.FunctionDef.Node.attr) + // @@protoc_insertion_point(field_mutable_map:opencv_tensorflow.FunctionDef.Node.attr) return attr_.MutableMap(); } @@ -1125,42 +1125,42 @@ FunctionDef_Node::mutable_attr() { // FunctionDef -// .tensorflow.OpDef signature = 1; +// .opencv_tensorflow.OpDef signature = 1; inline bool FunctionDef::has_signature() const { return this != internal_default_instance() && signature_ != NULL; } -inline const ::tensorflow::OpDef& FunctionDef::signature() const { - const ::tensorflow::OpDef* p = signature_; - // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.signature) - return p != NULL ? *p : *reinterpret_cast( - &::tensorflow::_OpDef_default_instance_); +inline const ::opencv_tensorflow::OpDef& FunctionDef::signature() const { + const ::opencv_tensorflow::OpDef* p = signature_; + // @@protoc_insertion_point(field_get:opencv_tensorflow.FunctionDef.signature) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_tensorflow::_OpDef_default_instance_); } -inline ::tensorflow::OpDef* FunctionDef::release_signature() { - // @@protoc_insertion_point(field_release:tensorflow.FunctionDef.signature) +inline ::opencv_tensorflow::OpDef* FunctionDef::release_signature() { + // @@protoc_insertion_point(field_release:opencv_tensorflow.FunctionDef.signature) - ::tensorflow::OpDef* temp = signature_; + ::opencv_tensorflow::OpDef* temp = signature_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL); } signature_ = NULL; return temp; } -inline ::tensorflow::OpDef* FunctionDef::unsafe_arena_release_signature() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.FunctionDef.signature) +inline ::opencv_tensorflow::OpDef* FunctionDef::unsafe_arena_release_signature() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.FunctionDef.signature) - ::tensorflow::OpDef* temp = signature_; + ::opencv_tensorflow::OpDef* temp = signature_; signature_ = NULL; return temp; } -inline ::tensorflow::OpDef* FunctionDef::mutable_signature() { +inline ::opencv_tensorflow::OpDef* FunctionDef::mutable_signature() { if (signature_ == NULL) { _slow_mutable_signature(); } - // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.signature) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.FunctionDef.signature) return signature_; } -inline void FunctionDef::set_allocated_signature(::tensorflow::OpDef* signature) { +inline void FunctionDef::set_allocated_signature(::opencv_tensorflow::OpDef* signature) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(signature_); @@ -1177,36 +1177,36 @@ inline void FunctionDef::set_allocated_signature(::tensorflow::OpDef* signature) } signature_ = signature; - // @@protoc_insertion_point(field_set_allocated:tensorflow.FunctionDef.signature) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.FunctionDef.signature) } -// repeated .tensorflow.FunctionDef.Node node = 2; +// repeated .opencv_tensorflow.FunctionDef.Node node = 2; inline int FunctionDef::node_size() const { return node_.size(); } inline void FunctionDef::clear_node() { node_.Clear(); } -inline const ::tensorflow::FunctionDef_Node& FunctionDef::node(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.FunctionDef.node) +inline const ::opencv_tensorflow::FunctionDef_Node& FunctionDef::node(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.FunctionDef.node) return node_.Get(index); } -inline ::tensorflow::FunctionDef_Node* FunctionDef::mutable_node(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.FunctionDef.node) +inline ::opencv_tensorflow::FunctionDef_Node* FunctionDef::mutable_node(int index) { + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.FunctionDef.node) return node_.Mutable(index); } -inline ::tensorflow::FunctionDef_Node* FunctionDef::add_node() { - // @@protoc_insertion_point(field_add:tensorflow.FunctionDef.node) +inline ::opencv_tensorflow::FunctionDef_Node* FunctionDef::add_node() { + // @@protoc_insertion_point(field_add:opencv_tensorflow.FunctionDef.node) return node_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node >* +inline ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::FunctionDef_Node >* FunctionDef::mutable_node() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.FunctionDef.node) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.FunctionDef.node) return &node_; } -inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::FunctionDef_Node >& +inline const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::FunctionDef_Node >& FunctionDef::node() const { - // @@protoc_insertion_point(field_list:tensorflow.FunctionDef.node) + // @@protoc_insertion_point(field_list:opencv_tensorflow.FunctionDef.node) return node_; } @@ -1219,20 +1219,20 @@ inline void GradientDef::clear_function_name() { function_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& GradientDef::function_name() const { - // @@protoc_insertion_point(field_get:tensorflow.GradientDef.function_name) + // @@protoc_insertion_point(field_get:opencv_tensorflow.GradientDef.function_name) return function_name_.Get(); } inline void GradientDef::set_function_name(const ::std::string& value) { function_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.GradientDef.function_name) + // @@protoc_insertion_point(field_set:opencv_tensorflow.GradientDef.function_name) } #if LANG_CXX11 inline void GradientDef::set_function_name(::std::string&& value) { function_name_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.GradientDef.function_name) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.GradientDef.function_name) } #endif inline void GradientDef::set_function_name(const char* value) { @@ -1240,22 +1240,22 @@ inline void GradientDef::set_function_name(const char* value) { function_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.GradientDef.function_name) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.GradientDef.function_name) } inline void GradientDef::set_function_name(const char* value, size_t size) { function_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.GradientDef.function_name) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.GradientDef.function_name) } inline ::std::string* GradientDef::mutable_function_name() { - // @@protoc_insertion_point(field_mutable:tensorflow.GradientDef.function_name) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.GradientDef.function_name) return function_name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* GradientDef::release_function_name() { - // @@protoc_insertion_point(field_release:tensorflow.GradientDef.function_name) + // @@protoc_insertion_point(field_release:opencv_tensorflow.GradientDef.function_name) return function_name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1267,10 +1267,10 @@ inline void GradientDef::set_allocated_function_name(::std::string* function_nam } function_name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), function_name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.GradientDef.function_name) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.GradientDef.function_name) } inline ::std::string* GradientDef::unsafe_arena_release_function_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.GradientDef.function_name) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.GradientDef.function_name) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return function_name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1286,7 +1286,7 @@ inline void GradientDef::unsafe_arena_set_allocated_function_name( } function_name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), function_name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GradientDef.function_name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.GradientDef.function_name) } // string gradient_func = 2; @@ -1294,20 +1294,20 @@ inline void GradientDef::clear_gradient_func() { gradient_func_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& GradientDef::gradient_func() const { - // @@protoc_insertion_point(field_get:tensorflow.GradientDef.gradient_func) + // @@protoc_insertion_point(field_get:opencv_tensorflow.GradientDef.gradient_func) return gradient_func_.Get(); } inline void GradientDef::set_gradient_func(const ::std::string& value) { gradient_func_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.GradientDef.gradient_func) + // @@protoc_insertion_point(field_set:opencv_tensorflow.GradientDef.gradient_func) } #if LANG_CXX11 inline void GradientDef::set_gradient_func(::std::string&& value) { gradient_func_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.GradientDef.gradient_func) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.GradientDef.gradient_func) } #endif inline void GradientDef::set_gradient_func(const char* value) { @@ -1315,22 +1315,22 @@ inline void GradientDef::set_gradient_func(const char* value) { gradient_func_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.GradientDef.gradient_func) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.GradientDef.gradient_func) } inline void GradientDef::set_gradient_func(const char* value, size_t size) { gradient_func_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.GradientDef.gradient_func) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.GradientDef.gradient_func) } inline ::std::string* GradientDef::mutable_gradient_func() { - // @@protoc_insertion_point(field_mutable:tensorflow.GradientDef.gradient_func) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.GradientDef.gradient_func) return gradient_func_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* GradientDef::release_gradient_func() { - // @@protoc_insertion_point(field_release:tensorflow.GradientDef.gradient_func) + // @@protoc_insertion_point(field_release:opencv_tensorflow.GradientDef.gradient_func) return gradient_func_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1342,10 +1342,10 @@ inline void GradientDef::set_allocated_gradient_func(::std::string* gradient_fun } gradient_func_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), gradient_func, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.GradientDef.gradient_func) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.GradientDef.gradient_func) } inline ::std::string* GradientDef::unsafe_arena_release_gradient_func() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.GradientDef.gradient_func) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.GradientDef.gradient_func) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return gradient_func_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1361,7 +1361,7 @@ inline void GradientDef::unsafe_arena_set_allocated_gradient_func( } gradient_func_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), gradient_func, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GradientDef.gradient_func) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.GradientDef.gradient_func) } #ifdef __GNUC__ @@ -1378,7 +1378,7 @@ inline void GradientDef::unsafe_arena_set_allocated_gradient_func( // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/graph.pb.cc b/modules/dnn/misc/tensorflow/graph.pb.cc index 22f4f7e426..31c7b63011 100644 --- a/modules/dnn/misc/tensorflow/graph.pb.cc +++ b/modules/dnn/misc/tensorflow/graph.pb.cc @@ -19,7 +19,7 @@ #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) -namespace tensorflow { +namespace opencv_tensorflow { class GraphDefDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed @@ -35,7 +35,7 @@ class NodeDefDefaultTypeInternal { ::google::protobuf::internal::ExplicitlyConstructed _instance; } _NodeDef_default_instance_; -} // namespace tensorflow +} // namespace opencv_tensorflow namespace protobuf_graph_2eproto { void InitDefaultsGraphDefImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -49,11 +49,11 @@ void InitDefaultsGraphDefImpl() { protobuf_versions_2eproto::InitDefaultsVersionDef(); protobuf_function_2eproto::InitDefaultsFunctionDefLibrary(); { - void* ptr = &::tensorflow::_GraphDef_default_instance_; - new (ptr) ::tensorflow::GraphDef(); + void* ptr = &::opencv_tensorflow::_GraphDef_default_instance_; + new (ptr) ::opencv_tensorflow::GraphDef(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::GraphDef::InitAsDefaultInstance(); + ::opencv_tensorflow::GraphDef::InitAsDefaultInstance(); } void InitDefaultsGraphDef() { @@ -71,10 +71,10 @@ void InitDefaultsNodeDef_AttrEntry_DoNotUseImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue(); { - void* ptr = &::tensorflow::_NodeDef_AttrEntry_DoNotUse_default_instance_; - new (ptr) ::tensorflow::NodeDef_AttrEntry_DoNotUse(); + void* ptr = &::opencv_tensorflow::_NodeDef_AttrEntry_DoNotUse_default_instance_; + new (ptr) ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse(); } - ::tensorflow::NodeDef_AttrEntry_DoNotUse::InitAsDefaultInstance(); + ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse::InitAsDefaultInstance(); } void InitDefaultsNodeDef_AttrEntry_DoNotUse() { @@ -92,11 +92,11 @@ void InitDefaultsNodeDefImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_graph_2eproto::InitDefaultsNodeDef_AttrEntry_DoNotUse(); { - void* ptr = &::tensorflow::_NodeDef_default_instance_; - new (ptr) ::tensorflow::NodeDef(); + void* ptr = &::opencv_tensorflow::_NodeDef_default_instance_; + new (ptr) ::opencv_tensorflow::NodeDef(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::NodeDef::InitAsDefaultInstance(); + ::opencv_tensorflow::NodeDef::InitAsDefaultInstance(); } void InitDefaultsNodeDef() { @@ -108,44 +108,44 @@ void InitDefaultsNodeDef() { const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::GraphDef, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GraphDef, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::GraphDef, node_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::GraphDef, versions_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::GraphDef, version_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::GraphDef, library_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NodeDef_AttrEntry_DoNotUse, _has_bits_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NodeDef_AttrEntry_DoNotUse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GraphDef, node_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GraphDef, versions_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GraphDef, version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GraphDef, library_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NodeDef_AttrEntry_DoNotUse, key_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NodeDef_AttrEntry_DoNotUse, value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, key_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NodeDef, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NodeDef, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NodeDef, op_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NodeDef, input_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NodeDef, device_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NodeDef, attr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, op_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, input_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, device_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, attr_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::tensorflow::GraphDef)}, - { 9, 16, sizeof(::tensorflow::NodeDef_AttrEntry_DoNotUse)}, - { 18, -1, sizeof(::tensorflow::NodeDef)}, + { 0, -1, sizeof(::opencv_tensorflow::GraphDef)}, + { 9, 16, sizeof(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse)}, + { 18, -1, sizeof(::opencv_tensorflow::NodeDef)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::tensorflow::_GraphDef_default_instance_), - reinterpret_cast(&::tensorflow::_NodeDef_AttrEntry_DoNotUse_default_instance_), - reinterpret_cast(&::tensorflow::_NodeDef_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_GraphDef_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_NodeDef_AttrEntry_DoNotUse_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_NodeDef_default_instance_), }; void protobuf_AssignDescriptors() { @@ -170,21 +170,22 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\013graph.proto\022\ntensorflow\032\020attr_value.pr" - "oto\032\016function.proto\032\016versions.proto\"\235\001\n\010" - "GraphDef\022!\n\004node\030\001 \003(\0132\023.tensorflow.Node" - "Def\022(\n\010versions\030\004 \001(\0132\026.tensorflow.Versi" - "onDef\022\023\n\007version\030\003 \001(\005B\002\030\001\022/\n\007library\030\002 " - "\001(\0132\036.tensorflow.FunctionDefLibrary\"\263\001\n\007" - "NodeDef\022\014\n\004name\030\001 \001(\t\022\n\n\002op\030\002 \001(\t\022\r\n\005inp" - "ut\030\003 \003(\t\022\016\n\006device\030\004 \001(\t\022+\n\004attr\030\005 \003(\0132\035" - ".tensorflow.NodeDef.AttrEntry\032B\n\tAttrEnt" - "ry\022\013\n\003key\030\001 \001(\t\022$\n\005value\030\002 \001(\0132\025.tensorf" - "low.AttrValue:\0028\001B,\n\030org.tensorflow.fram" - "eworkB\013GraphProtosP\001\370\001\001b\006proto3" + "\n\013graph.proto\022\021opencv_tensorflow\032\020attr_v" + "alue.proto\032\016function.proto\032\016versions.pro" + "to\"\262\001\n\010GraphDef\022(\n\004node\030\001 \003(\0132\032.opencv_t" + "ensorflow.NodeDef\022/\n\010versions\030\004 \001(\0132\035.op" + "encv_tensorflow.VersionDef\022\023\n\007version\030\003 " + "\001(\005B\002\030\001\0226\n\007library\030\002 \001(\0132%.opencv_tensor" + "flow.FunctionDefLibrary\"\301\001\n\007NodeDef\022\014\n\004n" + "ame\030\001 \001(\t\022\n\n\002op\030\002 \001(\t\022\r\n\005input\030\003 \003(\t\022\016\n\006" + "device\030\004 \001(\t\0222\n\004attr\030\005 \003(\0132$.opencv_tens" + "orflow.NodeDef.AttrEntry\032I\n\tAttrEntry\022\013\n" + "\003key\030\001 \001(\t\022+\n\005value\030\002 \001(\0132\034.opencv_tenso" + "rflow.AttrValue:\0028\001B,\n\030org.tensorflow.fr" + "ameworkB\013GraphProtosP\001\370\001\001b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 471); + descriptor, 513); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "graph.proto", &protobuf_RegisterTypes); ::protobuf_attr_5fvalue_2eproto::AddDescriptors(); @@ -203,22 +204,22 @@ struct StaticDescriptorInitializer { } } static_descriptor_initializer; } // namespace protobuf_graph_2eproto -namespace tensorflow { +namespace opencv_tensorflow { // =================================================================== void GraphDef::InitAsDefaultInstance() { - ::tensorflow::_GraphDef_default_instance_._instance.get_mutable()->versions_ = const_cast< ::tensorflow::VersionDef*>( - ::tensorflow::VersionDef::internal_default_instance()); - ::tensorflow::_GraphDef_default_instance_._instance.get_mutable()->library_ = const_cast< ::tensorflow::FunctionDefLibrary*>( - ::tensorflow::FunctionDefLibrary::internal_default_instance()); + ::opencv_tensorflow::_GraphDef_default_instance_._instance.get_mutable()->versions_ = const_cast< ::opencv_tensorflow::VersionDef*>( + ::opencv_tensorflow::VersionDef::internal_default_instance()); + ::opencv_tensorflow::_GraphDef_default_instance_._instance.get_mutable()->library_ = const_cast< ::opencv_tensorflow::FunctionDefLibrary*>( + ::opencv_tensorflow::FunctionDefLibrary::internal_default_instance()); } void GraphDef::_slow_mutable_versions() { - versions_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::VersionDef >( + versions_ = ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::VersionDef >( GetArenaNoVirtual()); } void GraphDef::unsafe_arena_set_allocated_versions( - ::tensorflow::VersionDef* versions) { + ::opencv_tensorflow::VersionDef* versions) { if (GetArenaNoVirtual() == NULL) { delete versions_; } @@ -228,7 +229,7 @@ void GraphDef::unsafe_arena_set_allocated_versions( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GraphDef.versions) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.GraphDef.versions) } void GraphDef::clear_versions() { if (GetArenaNoVirtual() == NULL && versions_ != NULL) { @@ -237,11 +238,11 @@ void GraphDef::clear_versions() { versions_ = NULL; } void GraphDef::_slow_mutable_library() { - library_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::FunctionDefLibrary >( + library_ = ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::FunctionDefLibrary >( GetArenaNoVirtual()); } void GraphDef::unsafe_arena_set_allocated_library( - ::tensorflow::FunctionDefLibrary* library) { + ::opencv_tensorflow::FunctionDefLibrary* library) { if (GetArenaNoVirtual() == NULL) { delete library_; } @@ -251,7 +252,7 @@ void GraphDef::unsafe_arena_set_allocated_library( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.GraphDef.library) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.GraphDef.library) } void GraphDef::clear_library() { if (GetArenaNoVirtual() == NULL && library_ != NULL) { @@ -272,7 +273,7 @@ GraphDef::GraphDef() ::protobuf_graph_2eproto::InitDefaultsGraphDef(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.GraphDef) + // @@protoc_insertion_point(constructor:opencv_tensorflow.GraphDef) } GraphDef::GraphDef(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -281,7 +282,7 @@ GraphDef::GraphDef(::google::protobuf::Arena* arena) ::protobuf_graph_2eproto::InitDefaultsGraphDef(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.GraphDef) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.GraphDef) } GraphDef::GraphDef(const GraphDef& from) : ::google::protobuf::Message(), @@ -290,17 +291,17 @@ GraphDef::GraphDef(const GraphDef& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_library()) { - library_ = new ::tensorflow::FunctionDefLibrary(*from.library_); + library_ = new ::opencv_tensorflow::FunctionDefLibrary(*from.library_); } else { library_ = NULL; } if (from.has_versions()) { - versions_ = new ::tensorflow::VersionDef(*from.versions_); + versions_ = new ::opencv_tensorflow::VersionDef(*from.versions_); } else { versions_ = NULL; } version_ = from.version_; - // @@protoc_insertion_point(copy_constructor:tensorflow.GraphDef) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.GraphDef) } void GraphDef::SharedCtor() { @@ -311,7 +312,7 @@ void GraphDef::SharedCtor() { } GraphDef::~GraphDef() { - // @@protoc_insertion_point(destructor:tensorflow.GraphDef) + // @@protoc_insertion_point(destructor:opencv_tensorflow.GraphDef) SharedDtor(); } @@ -347,7 +348,7 @@ GraphDef* GraphDef::New(::google::protobuf::Arena* arena) const { } void GraphDef::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.GraphDef) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.GraphDef) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -369,13 +370,13 @@ bool GraphDef::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.GraphDef) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.GraphDef) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .tensorflow.NodeDef node = 1; + // repeated .opencv_tensorflow.NodeDef node = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -386,7 +387,7 @@ bool GraphDef::MergePartialFromCodedStream( break; } - // .tensorflow.FunctionDefLibrary library = 2; + // .opencv_tensorflow.FunctionDefLibrary library = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -412,7 +413,7 @@ bool GraphDef::MergePartialFromCodedStream( break; } - // .tensorflow.VersionDef versions = 4; + // .opencv_tensorflow.VersionDef versions = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { @@ -436,28 +437,28 @@ bool GraphDef::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.GraphDef) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.GraphDef) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.GraphDef) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.GraphDef) return false; #undef DO_ } void GraphDef::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.GraphDef) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.GraphDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .tensorflow.NodeDef node = 1; + // repeated .opencv_tensorflow.NodeDef node = 1; for (unsigned int i = 0, n = static_cast(this->node_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, this->node(static_cast(i)), output); } - // .tensorflow.FunctionDefLibrary library = 2; + // .opencv_tensorflow.FunctionDefLibrary library = 2; if (this->has_library()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *this->library_, output); @@ -468,7 +469,7 @@ void GraphDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->version(), output); } - // .tensorflow.VersionDef versions = 4; + // .opencv_tensorflow.VersionDef versions = 4; if (this->has_versions()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, *this->versions_, output); @@ -478,17 +479,17 @@ void GraphDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.GraphDef) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.GraphDef) } ::google::protobuf::uint8* GraphDef::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.GraphDef) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.GraphDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .tensorflow.NodeDef node = 1; + // repeated .opencv_tensorflow.NodeDef node = 1; for (unsigned int i = 0, n = static_cast(this->node_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -496,7 +497,7 @@ void GraphDef::SerializeWithCachedSizes( 1, this->node(static_cast(i)), deterministic, target); } - // .tensorflow.FunctionDefLibrary library = 2; + // .opencv_tensorflow.FunctionDefLibrary library = 2; if (this->has_library()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -508,7 +509,7 @@ void GraphDef::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->version(), target); } - // .tensorflow.VersionDef versions = 4; + // .opencv_tensorflow.VersionDef versions = 4; if (this->has_versions()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -519,12 +520,12 @@ void GraphDef::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.GraphDef) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.GraphDef) return target; } size_t GraphDef::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.GraphDef) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.GraphDef) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -532,7 +533,7 @@ size_t GraphDef::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .tensorflow.NodeDef node = 1; + // repeated .opencv_tensorflow.NodeDef node = 1; { unsigned int count = static_cast(this->node_size()); total_size += 1UL * count; @@ -543,14 +544,14 @@ size_t GraphDef::ByteSizeLong() const { } } - // .tensorflow.FunctionDefLibrary library = 2; + // .opencv_tensorflow.FunctionDefLibrary library = 2; if (this->has_library()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->library_); } - // .tensorflow.VersionDef versions = 4; + // .opencv_tensorflow.VersionDef versions = 4; if (this->has_versions()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -572,22 +573,22 @@ size_t GraphDef::ByteSizeLong() const { } void GraphDef::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.GraphDef) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.GraphDef) GOOGLE_DCHECK_NE(&from, this); const GraphDef* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.GraphDef) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.GraphDef) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.GraphDef) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.GraphDef) MergeFrom(*source); } } void GraphDef::MergeFrom(const GraphDef& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.GraphDef) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.GraphDef) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -595,10 +596,10 @@ void GraphDef::MergeFrom(const GraphDef& from) { node_.MergeFrom(from.node_); if (from.has_library()) { - mutable_library()->::tensorflow::FunctionDefLibrary::MergeFrom(from.library()); + mutable_library()->::opencv_tensorflow::FunctionDefLibrary::MergeFrom(from.library()); } if (from.has_versions()) { - mutable_versions()->::tensorflow::VersionDef::MergeFrom(from.versions()); + mutable_versions()->::opencv_tensorflow::VersionDef::MergeFrom(from.versions()); } if (from.version() != 0) { set_version(from.version()); @@ -606,14 +607,14 @@ void GraphDef::MergeFrom(const GraphDef& from) { } void GraphDef::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.GraphDef) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.GraphDef) if (&from == this) return; Clear(); MergeFrom(from); } void GraphDef::CopyFrom(const GraphDef& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.GraphDef) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.GraphDef) if (&from == this) return; Clear(); MergeFrom(from); @@ -696,7 +697,7 @@ NodeDef::NodeDef() ::protobuf_graph_2eproto::InitDefaultsNodeDef(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.NodeDef) + // @@protoc_insertion_point(constructor:opencv_tensorflow.NodeDef) } NodeDef::NodeDef(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -706,7 +707,7 @@ NodeDef::NodeDef(::google::protobuf::Arena* arena) ::protobuf_graph_2eproto::InitDefaultsNodeDef(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.NodeDef) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.NodeDef) } NodeDef::NodeDef(const NodeDef& from) : ::google::protobuf::Message(), @@ -730,7 +731,7 @@ NodeDef::NodeDef(const NodeDef& from) device_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.device(), GetArenaNoVirtual()); } - // @@protoc_insertion_point(copy_constructor:tensorflow.NodeDef) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.NodeDef) } void NodeDef::SharedCtor() { @@ -741,7 +742,7 @@ void NodeDef::SharedCtor() { } NodeDef::~NodeDef() { - // @@protoc_insertion_point(destructor:tensorflow.NodeDef) + // @@protoc_insertion_point(destructor:opencv_tensorflow.NodeDef) SharedDtor(); } @@ -778,7 +779,7 @@ NodeDef* NodeDef::New(::google::protobuf::Arena* arena) const { } void NodeDef::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.NodeDef) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.NodeDef) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -795,7 +796,7 @@ bool NodeDef::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.NodeDef) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.NodeDef) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -810,7 +811,7 @@ bool NodeDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.NodeDef.name")); + "opencv_tensorflow.NodeDef.name")); } else { goto handle_unusual; } @@ -826,7 +827,7 @@ bool NodeDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->op().data(), static_cast(this->op().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.NodeDef.op")); + "opencv_tensorflow.NodeDef.op")); } else { goto handle_unusual; } @@ -843,7 +844,7 @@ bool NodeDef::MergePartialFromCodedStream( this->input(this->input_size() - 1).data(), static_cast(this->input(this->input_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.NodeDef.input")); + "opencv_tensorflow.NodeDef.input")); } else { goto handle_unusual; } @@ -859,30 +860,30 @@ bool NodeDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->device().data(), static_cast(this->device().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.NodeDef.device")); + "opencv_tensorflow.NodeDef.device")); } else { goto handle_unusual; } break; } - // map attr = 5; + // map attr = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { NodeDef_AttrEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< NodeDef_AttrEntry_DoNotUse, - ::std::string, ::tensorflow::AttrValue, + ::std::string, ::opencv_tensorflow::AttrValue, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 0 >, - ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue > > parser(&attr_); + ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue > > parser(&attr_); DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, &parser)); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.key().data(), static_cast(parser.key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.NodeDef.AttrEntry.key")); + "opencv_tensorflow.NodeDef.AttrEntry.key")); } else { goto handle_unusual; } @@ -901,17 +902,17 @@ bool NodeDef::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.NodeDef) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.NodeDef) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.NodeDef) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.NodeDef) return false; #undef DO_ } void NodeDef::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.NodeDef) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.NodeDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -920,7 +921,7 @@ void NodeDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NodeDef.name"); + "opencv_tensorflow.NodeDef.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } @@ -930,7 +931,7 @@ void NodeDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->op().data(), static_cast(this->op().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NodeDef.op"); + "opencv_tensorflow.NodeDef.op"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->op(), output); } @@ -940,7 +941,7 @@ void NodeDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->input(i).data(), static_cast(this->input(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NodeDef.input"); + "opencv_tensorflow.NodeDef.input"); ::google::protobuf::internal::WireFormatLite::WriteString( 3, this->input(i), output); } @@ -950,14 +951,14 @@ void NodeDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->device().data(), static_cast(this->device().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NodeDef.device"); + "opencv_tensorflow.NodeDef.device"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->device(), output); } - // map attr = 5; + // map attr = 5; if (!this->attr().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst Less; @@ -966,7 +967,7 @@ void NodeDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NodeDef.AttrEntry.key"); + "opencv_tensorflow.NodeDef.AttrEntry.key"); } }; @@ -974,9 +975,9 @@ void NodeDef::SerializeWithCachedSizes( this->attr().size() > 1) { ::google::protobuf::scoped_array items( new SortItem[this->attr().size()]); - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -995,7 +996,7 @@ void NodeDef::SerializeWithCachedSizes( } } else { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it) { entry.reset(attr_.NewEntryWrapper( @@ -1014,13 +1015,13 @@ void NodeDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.NodeDef) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.NodeDef) } ::google::protobuf::uint8* NodeDef::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.NodeDef) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.NodeDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1029,7 +1030,7 @@ void NodeDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NodeDef.name"); + "opencv_tensorflow.NodeDef.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); @@ -1040,7 +1041,7 @@ void NodeDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->op().data(), static_cast(this->op().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NodeDef.op"); + "opencv_tensorflow.NodeDef.op"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->op(), target); @@ -1051,7 +1052,7 @@ void NodeDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->input(i).data(), static_cast(this->input(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NodeDef.input"); + "opencv_tensorflow.NodeDef.input"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(3, this->input(i), target); } @@ -1061,15 +1062,15 @@ void NodeDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->device().data(), static_cast(this->device().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NodeDef.device"); + "opencv_tensorflow.NodeDef.device"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->device(), target); } - // map attr = 5; + // map attr = 5; if (!this->attr().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst Less; @@ -1078,7 +1079,7 @@ void NodeDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.NodeDef.AttrEntry.key"); + "opencv_tensorflow.NodeDef.AttrEntry.key"); } }; @@ -1086,9 +1087,9 @@ void NodeDef::SerializeWithCachedSizes( this->attr().size() > 1) { ::google::protobuf::scoped_array items( new SortItem[this->attr().size()]); - typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type; + typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -1109,7 +1110,7 @@ void NodeDef::SerializeWithCachedSizes( } } else { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it) { entry.reset(attr_.NewEntryWrapper( @@ -1130,12 +1131,12 @@ void NodeDef::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.NodeDef) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.NodeDef) return target; } size_t NodeDef::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.NodeDef) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.NodeDef) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1151,12 +1152,12 @@ size_t NodeDef::ByteSizeLong() const { this->input(i)); } - // map attr = 5; + // map attr = 5; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->attr_size()); { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator + for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator it = this->attr().begin(); it != this->attr().end(); ++it) { if (entry.get() != NULL && entry->GetArena() != NULL) { @@ -1200,22 +1201,22 @@ size_t NodeDef::ByteSizeLong() const { } void NodeDef::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.NodeDef) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.NodeDef) GOOGLE_DCHECK_NE(&from, this); const NodeDef* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.NodeDef) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.NodeDef) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.NodeDef) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.NodeDef) MergeFrom(*source); } } void NodeDef::MergeFrom(const NodeDef& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.NodeDef) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.NodeDef) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1235,14 +1236,14 @@ void NodeDef::MergeFrom(const NodeDef& from) { } void NodeDef::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.NodeDef) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.NodeDef) if (&from == this) return; Clear(); MergeFrom(from); } void NodeDef::CopyFrom(const NodeDef& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.NodeDef) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.NodeDef) if (&from == this) return; Clear(); MergeFrom(from); @@ -1289,6 +1290,6 @@ void NodeDef::InternalSwap(NodeDef* other) { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/graph.pb.h b/modules/dnn/misc/tensorflow/graph.pb.h index 4a53a521b7..0f1dc80cdc 100644 --- a/modules/dnn/misc/tensorflow/graph.pb.h +++ b/modules/dnn/misc/tensorflow/graph.pb.h @@ -60,7 +60,7 @@ inline void InitDefaults() { InitDefaultsNodeDef(); } } // namespace protobuf_graph_2eproto -namespace tensorflow { +namespace opencv_tensorflow { class GraphDef; class GraphDefDefaultTypeInternal; extern GraphDefDefaultTypeInternal _GraphDef_default_instance_; @@ -70,12 +70,12 @@ extern NodeDefDefaultTypeInternal _NodeDef_default_instance_; class NodeDef_AttrEntry_DoNotUse; class NodeDef_AttrEntry_DoNotUseDefaultTypeInternal; extern NodeDef_AttrEntry_DoNotUseDefaultTypeInternal _NodeDef_AttrEntry_DoNotUse_default_instance_; -} // namespace tensorflow -namespace tensorflow { +} // namespace opencv_tensorflow +namespace opencv_tensorflow { // =================================================================== -class GraphDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.GraphDef) */ { +class GraphDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.GraphDef) */ { public: GraphDef(); virtual ~GraphDef(); @@ -169,47 +169,47 @@ class GraphDef : public ::google::protobuf::Message /* @@protoc_insertion_point( // accessors ------------------------------------------------------- - // repeated .tensorflow.NodeDef node = 1; + // repeated .opencv_tensorflow.NodeDef node = 1; int node_size() const; void clear_node(); static const int kNodeFieldNumber = 1; - const ::tensorflow::NodeDef& node(int index) const; - ::tensorflow::NodeDef* mutable_node(int index); - ::tensorflow::NodeDef* add_node(); - ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >* + const ::opencv_tensorflow::NodeDef& node(int index) const; + ::opencv_tensorflow::NodeDef* mutable_node(int index); + ::opencv_tensorflow::NodeDef* add_node(); + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::NodeDef >* mutable_node(); - const ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >& + const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::NodeDef >& node() const; - // .tensorflow.FunctionDefLibrary library = 2; + // .opencv_tensorflow.FunctionDefLibrary library = 2; bool has_library() const; void clear_library(); static const int kLibraryFieldNumber = 2; private: void _slow_mutable_library(); public: - const ::tensorflow::FunctionDefLibrary& library() const; - ::tensorflow::FunctionDefLibrary* release_library(); - ::tensorflow::FunctionDefLibrary* mutable_library(); - void set_allocated_library(::tensorflow::FunctionDefLibrary* library); + const ::opencv_tensorflow::FunctionDefLibrary& library() const; + ::opencv_tensorflow::FunctionDefLibrary* release_library(); + ::opencv_tensorflow::FunctionDefLibrary* mutable_library(); + void set_allocated_library(::opencv_tensorflow::FunctionDefLibrary* library); void unsafe_arena_set_allocated_library( - ::tensorflow::FunctionDefLibrary* library); - ::tensorflow::FunctionDefLibrary* unsafe_arena_release_library(); + ::opencv_tensorflow::FunctionDefLibrary* library); + ::opencv_tensorflow::FunctionDefLibrary* unsafe_arena_release_library(); - // .tensorflow.VersionDef versions = 4; + // .opencv_tensorflow.VersionDef versions = 4; bool has_versions() const; void clear_versions(); static const int kVersionsFieldNumber = 4; private: void _slow_mutable_versions(); public: - const ::tensorflow::VersionDef& versions() const; - ::tensorflow::VersionDef* release_versions(); - ::tensorflow::VersionDef* mutable_versions(); - void set_allocated_versions(::tensorflow::VersionDef* versions); + const ::opencv_tensorflow::VersionDef& versions() const; + ::opencv_tensorflow::VersionDef* release_versions(); + ::opencv_tensorflow::VersionDef* mutable_versions(); + void set_allocated_versions(::opencv_tensorflow::VersionDef* versions); void unsafe_arena_set_allocated_versions( - ::tensorflow::VersionDef* versions); - ::tensorflow::VersionDef* unsafe_arena_release_versions(); + ::opencv_tensorflow::VersionDef* versions); + ::opencv_tensorflow::VersionDef* unsafe_arena_release_versions(); // int32 version = 3 [deprecated = true]; GOOGLE_PROTOBUF_DEPRECATED_ATTR void clear_version(); @@ -217,16 +217,16 @@ class GraphDef : public ::google::protobuf::Message /* @@protoc_insertion_point( GOOGLE_PROTOBUF_DEPRECATED_ATTR ::google::protobuf::int32 version() const; GOOGLE_PROTOBUF_DEPRECATED_ATTR void set_version(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:tensorflow.GraphDef) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.GraphDef) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef > node_; - ::tensorflow::FunctionDefLibrary* library_; - ::tensorflow::VersionDef* versions_; + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::NodeDef > node_; + ::opencv_tensorflow::FunctionDefLibrary* library_; + ::opencv_tensorflow::VersionDef* versions_; ::google::protobuf::int32 version_; mutable int _cached_size_; friend struct ::protobuf_graph_2eproto::TableStruct; @@ -235,13 +235,13 @@ class GraphDef : public ::google::protobuf::Message /* @@protoc_insertion_point( // ------------------------------------------------------------------- class NodeDef_AttrEntry_DoNotUse : public ::google::protobuf::internal::MapEntry { public: typedef ::google::protobuf::internal::MapEntry SuperType; @@ -255,7 +255,7 @@ public: // ------------------------------------------------------------------- -class NodeDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.NodeDef) */ { +class NodeDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.NodeDef) */ { public: NodeDef(); virtual ~NodeDef(); @@ -372,13 +372,13 @@ class NodeDef : public ::google::protobuf::Message /* @@protoc_insertion_point(c const ::google::protobuf::RepeatedPtrField< ::std::string>& input() const; ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_input(); - // map attr = 5; + // map attr = 5; int attr_size() const; void clear_attr(); static const int kAttrFieldNumber = 5; - const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& + const ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >& attr() const; - ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* + ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >* mutable_attr(); // string name = 1; @@ -450,7 +450,7 @@ class NodeDef : public ::google::protobuf::Message /* @@protoc_insertion_point(c void unsafe_arena_set_allocated_device( ::std::string* device); - // @@protoc_insertion_point(class_scope:tensorflow.NodeDef) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.NodeDef) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -460,7 +460,7 @@ class NodeDef : public ::google::protobuf::Message /* @@protoc_insertion_point(c ::google::protobuf::RepeatedPtrField< ::std::string> input_; ::google::protobuf::internal::MapField< NodeDef_AttrEntry_DoNotUse, - ::std::string, ::tensorflow::AttrValue, + ::std::string, ::opencv_tensorflow::AttrValue, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 0 > attr_; @@ -482,72 +482,72 @@ class NodeDef : public ::google::protobuf::Message /* @@protoc_insertion_point(c #endif // __GNUC__ // GraphDef -// repeated .tensorflow.NodeDef node = 1; +// repeated .opencv_tensorflow.NodeDef node = 1; inline int GraphDef::node_size() const { return node_.size(); } inline void GraphDef::clear_node() { node_.Clear(); } -inline const ::tensorflow::NodeDef& GraphDef::node(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.GraphDef.node) +inline const ::opencv_tensorflow::NodeDef& GraphDef::node(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.GraphDef.node) return node_.Get(index); } -inline ::tensorflow::NodeDef* GraphDef::mutable_node(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.GraphDef.node) +inline ::opencv_tensorflow::NodeDef* GraphDef::mutable_node(int index) { + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.GraphDef.node) return node_.Mutable(index); } -inline ::tensorflow::NodeDef* GraphDef::add_node() { - // @@protoc_insertion_point(field_add:tensorflow.GraphDef.node) +inline ::opencv_tensorflow::NodeDef* GraphDef::add_node() { + // @@protoc_insertion_point(field_add:opencv_tensorflow.GraphDef.node) return node_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >* +inline ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::NodeDef >* GraphDef::mutable_node() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.GraphDef.node) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.GraphDef.node) return &node_; } -inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::NodeDef >& +inline const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::NodeDef >& GraphDef::node() const { - // @@protoc_insertion_point(field_list:tensorflow.GraphDef.node) + // @@protoc_insertion_point(field_list:opencv_tensorflow.GraphDef.node) return node_; } -// .tensorflow.VersionDef versions = 4; +// .opencv_tensorflow.VersionDef versions = 4; inline bool GraphDef::has_versions() const { return this != internal_default_instance() && versions_ != NULL; } -inline const ::tensorflow::VersionDef& GraphDef::versions() const { - const ::tensorflow::VersionDef* p = versions_; - // @@protoc_insertion_point(field_get:tensorflow.GraphDef.versions) - return p != NULL ? *p : *reinterpret_cast( - &::tensorflow::_VersionDef_default_instance_); +inline const ::opencv_tensorflow::VersionDef& GraphDef::versions() const { + const ::opencv_tensorflow::VersionDef* p = versions_; + // @@protoc_insertion_point(field_get:opencv_tensorflow.GraphDef.versions) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_tensorflow::_VersionDef_default_instance_); } -inline ::tensorflow::VersionDef* GraphDef::release_versions() { - // @@protoc_insertion_point(field_release:tensorflow.GraphDef.versions) +inline ::opencv_tensorflow::VersionDef* GraphDef::release_versions() { + // @@protoc_insertion_point(field_release:opencv_tensorflow.GraphDef.versions) - ::tensorflow::VersionDef* temp = versions_; + ::opencv_tensorflow::VersionDef* temp = versions_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL); } versions_ = NULL; return temp; } -inline ::tensorflow::VersionDef* GraphDef::unsafe_arena_release_versions() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.GraphDef.versions) +inline ::opencv_tensorflow::VersionDef* GraphDef::unsafe_arena_release_versions() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.GraphDef.versions) - ::tensorflow::VersionDef* temp = versions_; + ::opencv_tensorflow::VersionDef* temp = versions_; versions_ = NULL; return temp; } -inline ::tensorflow::VersionDef* GraphDef::mutable_versions() { +inline ::opencv_tensorflow::VersionDef* GraphDef::mutable_versions() { if (versions_ == NULL) { _slow_mutable_versions(); } - // @@protoc_insertion_point(field_mutable:tensorflow.GraphDef.versions) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.GraphDef.versions) return versions_; } -inline void GraphDef::set_allocated_versions(::tensorflow::VersionDef* versions) { +inline void GraphDef::set_allocated_versions(::opencv_tensorflow::VersionDef* versions) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(versions_); @@ -564,7 +564,7 @@ inline void GraphDef::set_allocated_versions(::tensorflow::VersionDef* versions) } versions_ = versions; - // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphDef.versions) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.GraphDef.versions) } // int32 version = 3 [deprecated = true]; @@ -572,51 +572,51 @@ inline void GraphDef::clear_version() { version_ = 0; } inline ::google::protobuf::int32 GraphDef::version() const { - // @@protoc_insertion_point(field_get:tensorflow.GraphDef.version) + // @@protoc_insertion_point(field_get:opencv_tensorflow.GraphDef.version) return version_; } inline void GraphDef::set_version(::google::protobuf::int32 value) { version_ = value; - // @@protoc_insertion_point(field_set:tensorflow.GraphDef.version) + // @@protoc_insertion_point(field_set:opencv_tensorflow.GraphDef.version) } -// .tensorflow.FunctionDefLibrary library = 2; +// .opencv_tensorflow.FunctionDefLibrary library = 2; inline bool GraphDef::has_library() const { return this != internal_default_instance() && library_ != NULL; } -inline const ::tensorflow::FunctionDefLibrary& GraphDef::library() const { - const ::tensorflow::FunctionDefLibrary* p = library_; - // @@protoc_insertion_point(field_get:tensorflow.GraphDef.library) - return p != NULL ? *p : *reinterpret_cast( - &::tensorflow::_FunctionDefLibrary_default_instance_); +inline const ::opencv_tensorflow::FunctionDefLibrary& GraphDef::library() const { + const ::opencv_tensorflow::FunctionDefLibrary* p = library_; + // @@protoc_insertion_point(field_get:opencv_tensorflow.GraphDef.library) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_tensorflow::_FunctionDefLibrary_default_instance_); } -inline ::tensorflow::FunctionDefLibrary* GraphDef::release_library() { - // @@protoc_insertion_point(field_release:tensorflow.GraphDef.library) +inline ::opencv_tensorflow::FunctionDefLibrary* GraphDef::release_library() { + // @@protoc_insertion_point(field_release:opencv_tensorflow.GraphDef.library) - ::tensorflow::FunctionDefLibrary* temp = library_; + ::opencv_tensorflow::FunctionDefLibrary* temp = library_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL); } library_ = NULL; return temp; } -inline ::tensorflow::FunctionDefLibrary* GraphDef::unsafe_arena_release_library() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.GraphDef.library) +inline ::opencv_tensorflow::FunctionDefLibrary* GraphDef::unsafe_arena_release_library() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.GraphDef.library) - ::tensorflow::FunctionDefLibrary* temp = library_; + ::opencv_tensorflow::FunctionDefLibrary* temp = library_; library_ = NULL; return temp; } -inline ::tensorflow::FunctionDefLibrary* GraphDef::mutable_library() { +inline ::opencv_tensorflow::FunctionDefLibrary* GraphDef::mutable_library() { if (library_ == NULL) { _slow_mutable_library(); } - // @@protoc_insertion_point(field_mutable:tensorflow.GraphDef.library) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.GraphDef.library) return library_; } -inline void GraphDef::set_allocated_library(::tensorflow::FunctionDefLibrary* library) { +inline void GraphDef::set_allocated_library(::opencv_tensorflow::FunctionDefLibrary* library) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(library_); @@ -633,7 +633,7 @@ inline void GraphDef::set_allocated_library(::tensorflow::FunctionDefLibrary* li } library_ = library; - // @@protoc_insertion_point(field_set_allocated:tensorflow.GraphDef.library) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.GraphDef.library) } // ------------------------------------------------------------------- @@ -647,20 +647,20 @@ inline void NodeDef::clear_name() { name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& NodeDef::name() const { - // @@protoc_insertion_point(field_get:tensorflow.NodeDef.name) + // @@protoc_insertion_point(field_get:opencv_tensorflow.NodeDef.name) return name_.Get(); } inline void NodeDef::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.NodeDef.name) + // @@protoc_insertion_point(field_set:opencv_tensorflow.NodeDef.name) } #if LANG_CXX11 inline void NodeDef::set_name(::std::string&& value) { name_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.NodeDef.name) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.NodeDef.name) } #endif inline void NodeDef::set_name(const char* value) { @@ -668,22 +668,22 @@ inline void NodeDef::set_name(const char* value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.name) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.NodeDef.name) } inline void NodeDef::set_name(const char* value, size_t size) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.name) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.NodeDef.name) } inline ::std::string* NodeDef::mutable_name() { - // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.name) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.NodeDef.name) return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* NodeDef::release_name() { - // @@protoc_insertion_point(field_release:tensorflow.NodeDef.name) + // @@protoc_insertion_point(field_release:opencv_tensorflow.NodeDef.name) return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -695,10 +695,10 @@ inline void NodeDef::set_allocated_name(::std::string* name) { } name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.NodeDef.name) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.NodeDef.name) } inline ::std::string* NodeDef::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NodeDef.name) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.NodeDef.name) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -714,7 +714,7 @@ inline void NodeDef::unsafe_arena_set_allocated_name( } name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NodeDef.name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.NodeDef.name) } // string op = 2; @@ -722,20 +722,20 @@ inline void NodeDef::clear_op() { op_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& NodeDef::op() const { - // @@protoc_insertion_point(field_get:tensorflow.NodeDef.op) + // @@protoc_insertion_point(field_get:opencv_tensorflow.NodeDef.op) return op_.Get(); } inline void NodeDef::set_op(const ::std::string& value) { op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.NodeDef.op) + // @@protoc_insertion_point(field_set:opencv_tensorflow.NodeDef.op) } #if LANG_CXX11 inline void NodeDef::set_op(::std::string&& value) { op_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.NodeDef.op) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.NodeDef.op) } #endif inline void NodeDef::set_op(const char* value) { @@ -743,22 +743,22 @@ inline void NodeDef::set_op(const char* value) { op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.op) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.NodeDef.op) } inline void NodeDef::set_op(const char* value, size_t size) { op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.op) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.NodeDef.op) } inline ::std::string* NodeDef::mutable_op() { - // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.op) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.NodeDef.op) return op_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* NodeDef::release_op() { - // @@protoc_insertion_point(field_release:tensorflow.NodeDef.op) + // @@protoc_insertion_point(field_release:opencv_tensorflow.NodeDef.op) return op_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -770,10 +770,10 @@ inline void NodeDef::set_allocated_op(::std::string* op) { } op_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), op, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.NodeDef.op) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.NodeDef.op) } inline ::std::string* NodeDef::unsafe_arena_release_op() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NodeDef.op) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.NodeDef.op) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return op_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -789,7 +789,7 @@ inline void NodeDef::unsafe_arena_set_allocated_op( } op_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), op, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NodeDef.op) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.NodeDef.op) } // repeated string input = 3; @@ -800,64 +800,64 @@ inline void NodeDef::clear_input() { input_.Clear(); } inline const ::std::string& NodeDef::input(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_get:opencv_tensorflow.NodeDef.input) return input_.Get(index); } inline ::std::string* NodeDef::mutable_input(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.NodeDef.input) return input_.Mutable(index); } inline void NodeDef::set_input(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_set:opencv_tensorflow.NodeDef.input) input_.Mutable(index)->assign(value); } #if LANG_CXX11 inline void NodeDef::set_input(int index, ::std::string&& value) { - // @@protoc_insertion_point(field_set:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_set:opencv_tensorflow.NodeDef.input) input_.Mutable(index)->assign(std::move(value)); } #endif inline void NodeDef::set_input(int index, const char* value) { GOOGLE_DCHECK(value != NULL); input_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.NodeDef.input) } inline void NodeDef::set_input(int index, const char* value, size_t size) { input_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.NodeDef.input) } inline ::std::string* NodeDef::add_input() { - // @@protoc_insertion_point(field_add_mutable:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_add_mutable:opencv_tensorflow.NodeDef.input) return input_.Add(); } inline void NodeDef::add_input(const ::std::string& value) { input_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_add:opencv_tensorflow.NodeDef.input) } #if LANG_CXX11 inline void NodeDef::add_input(::std::string&& value) { input_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_add:opencv_tensorflow.NodeDef.input) } #endif inline void NodeDef::add_input(const char* value) { GOOGLE_DCHECK(value != NULL); input_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_add_char:opencv_tensorflow.NodeDef.input) } inline void NodeDef::add_input(const char* value, size_t size) { input_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_add_pointer:opencv_tensorflow.NodeDef.input) } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& NodeDef::input() const { - // @@protoc_insertion_point(field_list:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_list:opencv_tensorflow.NodeDef.input) return input_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* NodeDef::mutable_input() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.NodeDef.input) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.NodeDef.input) return &input_; } @@ -866,20 +866,20 @@ inline void NodeDef::clear_device() { device_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& NodeDef::device() const { - // @@protoc_insertion_point(field_get:tensorflow.NodeDef.device) + // @@protoc_insertion_point(field_get:opencv_tensorflow.NodeDef.device) return device_.Get(); } inline void NodeDef::set_device(const ::std::string& value) { device_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.NodeDef.device) + // @@protoc_insertion_point(field_set:opencv_tensorflow.NodeDef.device) } #if LANG_CXX11 inline void NodeDef::set_device(::std::string&& value) { device_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.NodeDef.device) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.NodeDef.device) } #endif inline void NodeDef::set_device(const char* value) { @@ -887,22 +887,22 @@ inline void NodeDef::set_device(const char* value) { device_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.NodeDef.device) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.NodeDef.device) } inline void NodeDef::set_device(const char* value, size_t size) { device_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.NodeDef.device) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.NodeDef.device) } inline ::std::string* NodeDef::mutable_device() { - // @@protoc_insertion_point(field_mutable:tensorflow.NodeDef.device) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.NodeDef.device) return device_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* NodeDef::release_device() { - // @@protoc_insertion_point(field_release:tensorflow.NodeDef.device) + // @@protoc_insertion_point(field_release:opencv_tensorflow.NodeDef.device) return device_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -914,10 +914,10 @@ inline void NodeDef::set_allocated_device(::std::string* device) { } device_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), device, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.NodeDef.device) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.NodeDef.device) } inline ::std::string* NodeDef::unsafe_arena_release_device() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.NodeDef.device) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.NodeDef.device) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return device_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -933,21 +933,21 @@ inline void NodeDef::unsafe_arena_set_allocated_device( } device_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), device, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NodeDef.device) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.NodeDef.device) } -// map attr = 5; +// map attr = 5; inline int NodeDef::attr_size() const { return attr_.size(); } -inline const ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >& +inline const ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >& NodeDef::attr() const { - // @@protoc_insertion_point(field_map:tensorflow.NodeDef.attr) + // @@protoc_insertion_point(field_map:opencv_tensorflow.NodeDef.attr) return attr_.GetMap(); } -inline ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >* +inline ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >* NodeDef::mutable_attr() { - // @@protoc_insertion_point(field_mutable_map:tensorflow.NodeDef.attr) + // @@protoc_insertion_point(field_mutable_map:opencv_tensorflow.NodeDef.attr) return attr_.MutableMap(); } @@ -961,7 +961,7 @@ NodeDef::mutable_attr() { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/op_def.pb.cc b/modules/dnn/misc/tensorflow/op_def.pb.cc index dd67671005..7ffd40a670 100644 --- a/modules/dnn/misc/tensorflow/op_def.pb.cc +++ b/modules/dnn/misc/tensorflow/op_def.pb.cc @@ -19,7 +19,7 @@ #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) -namespace tensorflow { +namespace opencv_tensorflow { class OpDef_ArgDefDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed @@ -45,7 +45,7 @@ class OpListDefaultTypeInternal { ::google::protobuf::internal::ExplicitlyConstructed _instance; } _OpList_default_instance_; -} // namespace tensorflow +} // namespace opencv_tensorflow namespace protobuf_op_5fdef_2eproto { void InitDefaultsOpDef_ArgDefImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -56,11 +56,11 @@ void InitDefaultsOpDef_ArgDefImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::tensorflow::_OpDef_ArgDef_default_instance_; - new (ptr) ::tensorflow::OpDef_ArgDef(); + void* ptr = &::opencv_tensorflow::_OpDef_ArgDef_default_instance_; + new (ptr) ::opencv_tensorflow::OpDef_ArgDef(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::OpDef_ArgDef::InitAsDefaultInstance(); + ::opencv_tensorflow::OpDef_ArgDef::InitAsDefaultInstance(); } void InitDefaultsOpDef_ArgDef() { @@ -78,11 +78,11 @@ void InitDefaultsOpDef_AttrDefImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue(); { - void* ptr = &::tensorflow::_OpDef_AttrDef_default_instance_; - new (ptr) ::tensorflow::OpDef_AttrDef(); + void* ptr = &::opencv_tensorflow::_OpDef_AttrDef_default_instance_; + new (ptr) ::opencv_tensorflow::OpDef_AttrDef(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::OpDef_AttrDef::InitAsDefaultInstance(); + ::opencv_tensorflow::OpDef_AttrDef::InitAsDefaultInstance(); } void InitDefaultsOpDef_AttrDef() { @@ -102,11 +102,11 @@ void InitDefaultsOpDefImpl() { protobuf_op_5fdef_2eproto::InitDefaultsOpDef_AttrDef(); protobuf_op_5fdef_2eproto::InitDefaultsOpDeprecation(); { - void* ptr = &::tensorflow::_OpDef_default_instance_; - new (ptr) ::tensorflow::OpDef(); + void* ptr = &::opencv_tensorflow::_OpDef_default_instance_; + new (ptr) ::opencv_tensorflow::OpDef(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::OpDef::InitAsDefaultInstance(); + ::opencv_tensorflow::OpDef::InitAsDefaultInstance(); } void InitDefaultsOpDef() { @@ -123,11 +123,11 @@ void InitDefaultsOpDeprecationImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::tensorflow::_OpDeprecation_default_instance_; - new (ptr) ::tensorflow::OpDeprecation(); + void* ptr = &::opencv_tensorflow::_OpDeprecation_default_instance_; + new (ptr) ::opencv_tensorflow::OpDeprecation(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::OpDeprecation::InitAsDefaultInstance(); + ::opencv_tensorflow::OpDeprecation::InitAsDefaultInstance(); } void InitDefaultsOpDeprecation() { @@ -145,11 +145,11 @@ void InitDefaultsOpListImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_op_5fdef_2eproto::InitDefaultsOpDef(); { - void* ptr = &::tensorflow::_OpList_default_instance_; - new (ptr) ::tensorflow::OpList(); + void* ptr = &::opencv_tensorflow::_OpList_default_instance_; + new (ptr) ::opencv_tensorflow::OpList(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::OpList::InitAsDefaultInstance(); + ::opencv_tensorflow::OpList::InitAsDefaultInstance(); } void InitDefaultsOpList() { @@ -161,73 +161,73 @@ void InitDefaultsOpList() { const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_ArgDef, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_ArgDef, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_ArgDef, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_ArgDef, description_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_ArgDef, type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_ArgDef, type_attr_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_ArgDef, number_attr_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_ArgDef, type_list_attr_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_ArgDef, is_ref_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_ArgDef, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_ArgDef, description_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_ArgDef, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_ArgDef, type_attr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_ArgDef, number_attr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_ArgDef, type_list_attr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_ArgDef, is_ref_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_AttrDef, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_AttrDef, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_AttrDef, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_AttrDef, type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_AttrDef, default_value_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_AttrDef, description_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_AttrDef, has_minimum_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_AttrDef, minimum_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef_AttrDef, allowed_values_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_AttrDef, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_AttrDef, type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_AttrDef, default_value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_AttrDef, description_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_AttrDef, has_minimum_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_AttrDef, minimum_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef_AttrDef, allowed_values_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, input_arg_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, output_arg_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, attr_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, deprecation_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, summary_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, description_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, is_commutative_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, is_aggregate_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, is_stateful_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDef, allows_uninitialized_input_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, input_arg_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, output_arg_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, attr_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, deprecation_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, summary_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, description_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, is_commutative_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, is_aggregate_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, is_stateful_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDef, allows_uninitialized_input_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDeprecation, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDeprecation, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDeprecation, version_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpDeprecation, explanation_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDeprecation, version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpDeprecation, explanation_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpList, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpList, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::OpList, op_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::OpList, op_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::tensorflow::OpDef_ArgDef)}, - { 12, -1, sizeof(::tensorflow::OpDef_AttrDef)}, - { 24, -1, sizeof(::tensorflow::OpDef)}, - { 40, -1, sizeof(::tensorflow::OpDeprecation)}, - { 47, -1, sizeof(::tensorflow::OpList)}, + { 0, -1, sizeof(::opencv_tensorflow::OpDef_ArgDef)}, + { 12, -1, sizeof(::opencv_tensorflow::OpDef_AttrDef)}, + { 24, -1, sizeof(::opencv_tensorflow::OpDef)}, + { 40, -1, sizeof(::opencv_tensorflow::OpDeprecation)}, + { 47, -1, sizeof(::opencv_tensorflow::OpList)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::tensorflow::_OpDef_ArgDef_default_instance_), - reinterpret_cast(&::tensorflow::_OpDef_AttrDef_default_instance_), - reinterpret_cast(&::tensorflow::_OpDef_default_instance_), - reinterpret_cast(&::tensorflow::_OpDeprecation_default_instance_), - reinterpret_cast(&::tensorflow::_OpList_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_OpDef_ArgDef_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_OpDef_AttrDef_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_OpDef_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_OpDeprecation_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_OpList_default_instance_), }; void protobuf_AssignDescriptors() { @@ -252,32 +252,34 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\014op_def.proto\022\ntensorflow\032\020attr_value.p" - "roto\032\013types.proto\"\270\005\n\005OpDef\022\014\n\004name\030\001 \001(" - "\t\022+\n\tinput_arg\030\002 \003(\0132\030.tensorflow.OpDef." - "ArgDef\022,\n\noutput_arg\030\003 \003(\0132\030.tensorflow." - "OpDef.ArgDef\022\'\n\004attr\030\004 \003(\0132\031.tensorflow." - "OpDef.AttrDef\022.\n\013deprecation\030\010 \001(\0132\031.ten" - "sorflow.OpDeprecation\022\017\n\007summary\030\005 \001(\t\022\023" - "\n\013description\030\006 \001(\t\022\026\n\016is_commutative\030\022 " - "\001(\010\022\024\n\014is_aggregate\030\020 \001(\010\022\023\n\013is_stateful" - "\030\021 \001(\010\022\"\n\032allows_uninitialized_input\030\023 \001" - "(\010\032\237\001\n\006ArgDef\022\014\n\004name\030\001 \001(\t\022\023\n\013descripti" - "on\030\002 \001(\t\022\"\n\004type\030\003 \001(\0162\024.tensorflow.Data" - "Type\022\021\n\ttype_attr\030\004 \001(\t\022\023\n\013number_attr\030\005" - " \001(\t\022\026\n\016type_list_attr\030\006 \001(\t\022\016\n\006is_ref\030\020" - " \001(\010\032\275\001\n\007AttrDef\022\014\n\004name\030\001 \001(\t\022\014\n\004type\030\002" - " \001(\t\022,\n\rdefault_value\030\003 \001(\0132\025.tensorflow" - ".AttrValue\022\023\n\013description\030\004 \001(\t\022\023\n\013has_m" - "inimum\030\005 \001(\010\022\017\n\007minimum\030\006 \001(\003\022-\n\016allowed" - "_values\030\007 \001(\0132\025.tensorflow.AttrValue\"5\n\r" - "OpDeprecation\022\017\n\007version\030\001 \001(\005\022\023\n\013explan" - "ation\030\002 \001(\t\"\'\n\006OpList\022\035\n\002op\030\001 \003(\0132\021.tens" - "orflow.OpDefB,\n\030org.tensorflow.framework" - "B\013OpDefProtosP\001\370\001\001b\006proto3" + "\n\014op_def.proto\022\021opencv_tensorflow\032\020attr_" + "value.proto\032\013types.proto\"\351\005\n\005OpDef\022\014\n\004na" + "me\030\001 \001(\t\0222\n\tinput_arg\030\002 \003(\0132\037.opencv_ten" + "sorflow.OpDef.ArgDef\0223\n\noutput_arg\030\003 \003(\013" + "2\037.opencv_tensorflow.OpDef.ArgDef\022.\n\004att" + "r\030\004 \003(\0132 .opencv_tensorflow.OpDef.AttrDe" + "f\0225\n\013deprecation\030\010 \001(\0132 .opencv_tensorfl" + "ow.OpDeprecation\022\017\n\007summary\030\005 \001(\t\022\023\n\013des" + "cription\030\006 \001(\t\022\026\n\016is_commutative\030\022 \001(\010\022\024" + "\n\014is_aggregate\030\020 \001(\010\022\023\n\013is_stateful\030\021 \001(" + "\010\022\"\n\032allows_uninitialized_input\030\023 \001(\010\032\246\001" + "\n\006ArgDef\022\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 " + "\001(\t\022)\n\004type\030\003 \001(\0162\033.opencv_tensorflow.Da" + "taType\022\021\n\ttype_attr\030\004 \001(\t\022\023\n\013number_attr" + "\030\005 \001(\t\022\026\n\016type_list_attr\030\006 \001(\t\022\016\n\006is_ref" + "\030\020 \001(\010\032\313\001\n\007AttrDef\022\014\n\004name\030\001 \001(\t\022\014\n\004type" + "\030\002 \001(\t\0223\n\rdefault_value\030\003 \001(\0132\034.opencv_t" + "ensorflow.AttrValue\022\023\n\013description\030\004 \001(\t" + "\022\023\n\013has_minimum\030\005 \001(\010\022\017\n\007minimum\030\006 \001(\003\0224" + "\n\016allowed_values\030\007 \001(\0132\034.opencv_tensorfl" + "ow.AttrValue\"5\n\rOpDeprecation\022\017\n\007version" + "\030\001 \001(\005\022\023\n\013explanation\030\002 \001(\t\".\n\006OpList\022$\n" + "\002op\030\001 \003(\0132\030.opencv_tensorflow.OpDefB,\n\030o" + "rg.tensorflow.frameworkB\013OpDefProtosP\001\370\001" + "\001b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 906); + descriptor, 969); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "op_def.proto", &protobuf_RegisterTypes); ::protobuf_attr_5fvalue_2eproto::AddDescriptors(); @@ -295,7 +297,7 @@ struct StaticDescriptorInitializer { } } static_descriptor_initializer; } // namespace protobuf_op_5fdef_2eproto -namespace tensorflow { +namespace opencv_tensorflow { // =================================================================== @@ -317,7 +319,7 @@ OpDef_ArgDef::OpDef_ArgDef() ::protobuf_op_5fdef_2eproto::InitDefaultsOpDef_ArgDef(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(constructor:opencv_tensorflow.OpDef.ArgDef) } OpDef_ArgDef::OpDef_ArgDef(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -325,7 +327,7 @@ OpDef_ArgDef::OpDef_ArgDef(::google::protobuf::Arena* arena) ::protobuf_op_5fdef_2eproto::InitDefaultsOpDef_ArgDef(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.OpDef.ArgDef) } OpDef_ArgDef::OpDef_ArgDef(const OpDef_ArgDef& from) : ::google::protobuf::Message(), @@ -360,7 +362,7 @@ OpDef_ArgDef::OpDef_ArgDef(const OpDef_ArgDef& from) ::memcpy(&type_, &from.type_, static_cast(reinterpret_cast(&is_ref_) - reinterpret_cast(&type_)) + sizeof(is_ref_)); - // @@protoc_insertion_point(copy_constructor:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.OpDef.ArgDef) } void OpDef_ArgDef::SharedCtor() { @@ -376,7 +378,7 @@ void OpDef_ArgDef::SharedCtor() { } OpDef_ArgDef::~OpDef_ArgDef() { - // @@protoc_insertion_point(destructor:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(destructor:opencv_tensorflow.OpDef.ArgDef) SharedDtor(); } @@ -415,7 +417,7 @@ OpDef_ArgDef* OpDef_ArgDef::New(::google::protobuf::Arena* arena) const { } void OpDef_ArgDef::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.OpDef.ArgDef) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.OpDef.ArgDef) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -435,7 +437,7 @@ bool OpDef_ArgDef::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.OpDef.ArgDef) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; @@ -450,7 +452,7 @@ bool OpDef_ArgDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDef.ArgDef.name")); + "opencv_tensorflow.OpDef.ArgDef.name")); } else { goto handle_unusual; } @@ -466,14 +468,14 @@ bool OpDef_ArgDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast(this->description().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDef.ArgDef.description")); + "opencv_tensorflow.OpDef.ArgDef.description")); } else { goto handle_unusual; } break; } - // .tensorflow.DataType type = 3; + // .opencv_tensorflow.DataType type = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) { @@ -481,7 +483,7 @@ bool OpDef_ArgDef::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_type(static_cast< ::tensorflow::DataType >(value)); + set_type(static_cast< ::opencv_tensorflow::DataType >(value)); } else { goto handle_unusual; } @@ -497,7 +499,7 @@ bool OpDef_ArgDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_attr().data(), static_cast(this->type_attr().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDef.ArgDef.type_attr")); + "opencv_tensorflow.OpDef.ArgDef.type_attr")); } else { goto handle_unusual; } @@ -513,7 +515,7 @@ bool OpDef_ArgDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->number_attr().data(), static_cast(this->number_attr().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDef.ArgDef.number_attr")); + "opencv_tensorflow.OpDef.ArgDef.number_attr")); } else { goto handle_unusual; } @@ -529,7 +531,7 @@ bool OpDef_ArgDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_list_attr().data(), static_cast(this->type_list_attr().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDef.ArgDef.type_list_attr")); + "opencv_tensorflow.OpDef.ArgDef.type_list_attr")); } else { goto handle_unusual; } @@ -562,17 +564,17 @@ bool OpDef_ArgDef::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.OpDef.ArgDef) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.OpDef.ArgDef) return false; #undef DO_ } void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.OpDef.ArgDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -581,7 +583,7 @@ void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.ArgDef.name"); + "opencv_tensorflow.OpDef.ArgDef.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } @@ -591,12 +593,12 @@ void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast(this->description().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.ArgDef.description"); + "opencv_tensorflow.OpDef.ArgDef.description"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->description(), output); } - // .tensorflow.DataType type = 3; + // .opencv_tensorflow.DataType type = 3; if (this->type() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 3, this->type(), output); @@ -607,7 +609,7 @@ void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_attr().data(), static_cast(this->type_attr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.ArgDef.type_attr"); + "opencv_tensorflow.OpDef.ArgDef.type_attr"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->type_attr(), output); } @@ -617,7 +619,7 @@ void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->number_attr().data(), static_cast(this->number_attr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.ArgDef.number_attr"); + "opencv_tensorflow.OpDef.ArgDef.number_attr"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->number_attr(), output); } @@ -627,7 +629,7 @@ void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_list_attr().data(), static_cast(this->type_list_attr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.ArgDef.type_list_attr"); + "opencv_tensorflow.OpDef.ArgDef.type_list_attr"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->type_list_attr(), output); } @@ -641,13 +643,13 @@ void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.OpDef.ArgDef) } ::google::protobuf::uint8* OpDef_ArgDef::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.OpDef.ArgDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -656,7 +658,7 @@ void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.ArgDef.name"); + "opencv_tensorflow.OpDef.ArgDef.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); @@ -667,13 +669,13 @@ void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast(this->description().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.ArgDef.description"); + "opencv_tensorflow.OpDef.ArgDef.description"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->description(), target); } - // .tensorflow.DataType type = 3; + // .opencv_tensorflow.DataType type = 3; if (this->type() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 3, this->type(), target); @@ -684,7 +686,7 @@ void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_attr().data(), static_cast(this->type_attr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.ArgDef.type_attr"); + "opencv_tensorflow.OpDef.ArgDef.type_attr"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->type_attr(), target); @@ -695,7 +697,7 @@ void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->number_attr().data(), static_cast(this->number_attr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.ArgDef.number_attr"); + "opencv_tensorflow.OpDef.ArgDef.number_attr"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->number_attr(), target); @@ -706,7 +708,7 @@ void OpDef_ArgDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type_list_attr().data(), static_cast(this->type_list_attr().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.ArgDef.type_list_attr"); + "opencv_tensorflow.OpDef.ArgDef.type_list_attr"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->type_list_attr(), target); @@ -721,12 +723,12 @@ void OpDef_ArgDef::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.OpDef.ArgDef) return target; } size_t OpDef_ArgDef::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDef.ArgDef) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.OpDef.ArgDef) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -769,7 +771,7 @@ size_t OpDef_ArgDef::ByteSizeLong() const { this->type_list_attr()); } - // .tensorflow.DataType type = 3; + // .opencv_tensorflow.DataType type = 3; if (this->type() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); @@ -788,22 +790,22 @@ size_t OpDef_ArgDef::ByteSizeLong() const { } void OpDef_ArgDef::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.OpDef.ArgDef) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.OpDef.ArgDef) GOOGLE_DCHECK_NE(&from, this); const OpDef_ArgDef* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.OpDef.ArgDef) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.OpDef.ArgDef) MergeFrom(*source); } } void OpDef_ArgDef::MergeFrom(const OpDef_ArgDef& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDef.ArgDef) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.OpDef.ArgDef) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -833,14 +835,14 @@ void OpDef_ArgDef::MergeFrom(const OpDef_ArgDef& from) { } void OpDef_ArgDef::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.OpDef.ArgDef) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.OpDef.ArgDef) if (&from == this) return; Clear(); MergeFrom(from); } void OpDef_ArgDef::CopyFrom(const OpDef_ArgDef& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDef.ArgDef) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.OpDef.ArgDef) if (&from == this) return; Clear(); MergeFrom(from); @@ -891,17 +893,17 @@ void OpDef_ArgDef::InternalSwap(OpDef_ArgDef* other) { // =================================================================== void OpDef_AttrDef::InitAsDefaultInstance() { - ::tensorflow::_OpDef_AttrDef_default_instance_._instance.get_mutable()->default_value_ = const_cast< ::tensorflow::AttrValue*>( - ::tensorflow::AttrValue::internal_default_instance()); - ::tensorflow::_OpDef_AttrDef_default_instance_._instance.get_mutable()->allowed_values_ = const_cast< ::tensorflow::AttrValue*>( - ::tensorflow::AttrValue::internal_default_instance()); + ::opencv_tensorflow::_OpDef_AttrDef_default_instance_._instance.get_mutable()->default_value_ = const_cast< ::opencv_tensorflow::AttrValue*>( + ::opencv_tensorflow::AttrValue::internal_default_instance()); + ::opencv_tensorflow::_OpDef_AttrDef_default_instance_._instance.get_mutable()->allowed_values_ = const_cast< ::opencv_tensorflow::AttrValue*>( + ::opencv_tensorflow::AttrValue::internal_default_instance()); } void OpDef_AttrDef::_slow_mutable_default_value() { - default_value_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::AttrValue >( + default_value_ = ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::AttrValue >( GetArenaNoVirtual()); } void OpDef_AttrDef::unsafe_arena_set_allocated_default_value( - ::tensorflow::AttrValue* default_value) { + ::opencv_tensorflow::AttrValue* default_value) { if (GetArenaNoVirtual() == NULL) { delete default_value_; } @@ -911,7 +913,7 @@ void OpDef_AttrDef::unsafe_arena_set_allocated_default_value( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.default_value) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.AttrDef.default_value) } void OpDef_AttrDef::clear_default_value() { if (GetArenaNoVirtual() == NULL && default_value_ != NULL) { @@ -920,11 +922,11 @@ void OpDef_AttrDef::clear_default_value() { default_value_ = NULL; } void OpDef_AttrDef::_slow_mutable_allowed_values() { - allowed_values_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::AttrValue >( + allowed_values_ = ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::AttrValue >( GetArenaNoVirtual()); } void OpDef_AttrDef::unsafe_arena_set_allocated_allowed_values( - ::tensorflow::AttrValue* allowed_values) { + ::opencv_tensorflow::AttrValue* allowed_values) { if (GetArenaNoVirtual() == NULL) { delete allowed_values_; } @@ -934,7 +936,7 @@ void OpDef_AttrDef::unsafe_arena_set_allocated_allowed_values( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.allowed_values) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.AttrDef.allowed_values) } void OpDef_AttrDef::clear_allowed_values() { if (GetArenaNoVirtual() == NULL && allowed_values_ != NULL) { @@ -958,7 +960,7 @@ OpDef_AttrDef::OpDef_AttrDef() ::protobuf_op_5fdef_2eproto::InitDefaultsOpDef_AttrDef(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(constructor:opencv_tensorflow.OpDef.AttrDef) } OpDef_AttrDef::OpDef_AttrDef(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -966,7 +968,7 @@ OpDef_AttrDef::OpDef_AttrDef(::google::protobuf::Arena* arena) ::protobuf_op_5fdef_2eproto::InitDefaultsOpDef_AttrDef(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.OpDef.AttrDef) } OpDef_AttrDef::OpDef_AttrDef(const OpDef_AttrDef& from) : ::google::protobuf::Message(), @@ -989,19 +991,19 @@ OpDef_AttrDef::OpDef_AttrDef(const OpDef_AttrDef& from) GetArenaNoVirtual()); } if (from.has_default_value()) { - default_value_ = new ::tensorflow::AttrValue(*from.default_value_); + default_value_ = new ::opencv_tensorflow::AttrValue(*from.default_value_); } else { default_value_ = NULL; } if (from.has_allowed_values()) { - allowed_values_ = new ::tensorflow::AttrValue(*from.allowed_values_); + allowed_values_ = new ::opencv_tensorflow::AttrValue(*from.allowed_values_); } else { allowed_values_ = NULL; } ::memcpy(&minimum_, &from.minimum_, static_cast(reinterpret_cast(&has_minimum_) - reinterpret_cast(&minimum_)) + sizeof(has_minimum_)); - // @@protoc_insertion_point(copy_constructor:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.OpDef.AttrDef) } void OpDef_AttrDef::SharedCtor() { @@ -1015,7 +1017,7 @@ void OpDef_AttrDef::SharedCtor() { } OpDef_AttrDef::~OpDef_AttrDef() { - // @@protoc_insertion_point(destructor:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(destructor:opencv_tensorflow.OpDef.AttrDef) SharedDtor(); } @@ -1054,7 +1056,7 @@ OpDef_AttrDef* OpDef_AttrDef::New(::google::protobuf::Arena* arena) const { } void OpDef_AttrDef::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.OpDef.AttrDef) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.OpDef.AttrDef) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1080,7 +1082,7 @@ bool OpDef_AttrDef::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.OpDef.AttrDef) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -1095,7 +1097,7 @@ bool OpDef_AttrDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDef.AttrDef.name")); + "opencv_tensorflow.OpDef.AttrDef.name")); } else { goto handle_unusual; } @@ -1111,14 +1113,14 @@ bool OpDef_AttrDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type().data(), static_cast(this->type().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDef.AttrDef.type")); + "opencv_tensorflow.OpDef.AttrDef.type")); } else { goto handle_unusual; } break; } - // .tensorflow.AttrValue default_value = 3; + // .opencv_tensorflow.AttrValue default_value = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -1139,7 +1141,7 @@ bool OpDef_AttrDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast(this->description().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDef.AttrDef.description")); + "opencv_tensorflow.OpDef.AttrDef.description")); } else { goto handle_unusual; } @@ -1174,7 +1176,7 @@ bool OpDef_AttrDef::MergePartialFromCodedStream( break; } - // .tensorflow.AttrValue allowed_values = 7; + // .opencv_tensorflow.AttrValue allowed_values = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { @@ -1198,17 +1200,17 @@ bool OpDef_AttrDef::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.OpDef.AttrDef) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.OpDef.AttrDef) return false; #undef DO_ } void OpDef_AttrDef::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.OpDef.AttrDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1217,7 +1219,7 @@ void OpDef_AttrDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.AttrDef.name"); + "opencv_tensorflow.OpDef.AttrDef.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } @@ -1227,12 +1229,12 @@ void OpDef_AttrDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type().data(), static_cast(this->type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.AttrDef.type"); + "opencv_tensorflow.OpDef.AttrDef.type"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->type(), output); } - // .tensorflow.AttrValue default_value = 3; + // .opencv_tensorflow.AttrValue default_value = 3; if (this->has_default_value()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, *this->default_value_, output); @@ -1243,7 +1245,7 @@ void OpDef_AttrDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast(this->description().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.AttrDef.description"); + "opencv_tensorflow.OpDef.AttrDef.description"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->description(), output); } @@ -1258,7 +1260,7 @@ void OpDef_AttrDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteInt64(6, this->minimum(), output); } - // .tensorflow.AttrValue allowed_values = 7; + // .opencv_tensorflow.AttrValue allowed_values = 7; if (this->has_allowed_values()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 7, *this->allowed_values_, output); @@ -1268,13 +1270,13 @@ void OpDef_AttrDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.OpDef.AttrDef) } ::google::protobuf::uint8* OpDef_AttrDef::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.OpDef.AttrDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1283,7 +1285,7 @@ void OpDef_AttrDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.AttrDef.name"); + "opencv_tensorflow.OpDef.AttrDef.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); @@ -1294,13 +1296,13 @@ void OpDef_AttrDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->type().data(), static_cast(this->type().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.AttrDef.type"); + "opencv_tensorflow.OpDef.AttrDef.type"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->type(), target); } - // .tensorflow.AttrValue default_value = 3; + // .opencv_tensorflow.AttrValue default_value = 3; if (this->has_default_value()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1312,7 +1314,7 @@ void OpDef_AttrDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast(this->description().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.AttrDef.description"); + "opencv_tensorflow.OpDef.AttrDef.description"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->description(), target); @@ -1328,7 +1330,7 @@ void OpDef_AttrDef::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(6, this->minimum(), target); } - // .tensorflow.AttrValue allowed_values = 7; + // .opencv_tensorflow.AttrValue allowed_values = 7; if (this->has_allowed_values()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1339,12 +1341,12 @@ void OpDef_AttrDef::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.OpDef.AttrDef) return target; } size_t OpDef_AttrDef::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDef.AttrDef) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.OpDef.AttrDef) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1373,14 +1375,14 @@ size_t OpDef_AttrDef::ByteSizeLong() const { this->description()); } - // .tensorflow.AttrValue default_value = 3; + // .opencv_tensorflow.AttrValue default_value = 3; if (this->has_default_value()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->default_value_); } - // .tensorflow.AttrValue allowed_values = 7; + // .opencv_tensorflow.AttrValue allowed_values = 7; if (this->has_allowed_values()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -1407,22 +1409,22 @@ size_t OpDef_AttrDef::ByteSizeLong() const { } void OpDef_AttrDef::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.OpDef.AttrDef) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.OpDef.AttrDef) GOOGLE_DCHECK_NE(&from, this); const OpDef_AttrDef* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.OpDef.AttrDef) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.OpDef.AttrDef) MergeFrom(*source); } } void OpDef_AttrDef::MergeFrom(const OpDef_AttrDef& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDef.AttrDef) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.OpDef.AttrDef) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1438,10 +1440,10 @@ void OpDef_AttrDef::MergeFrom(const OpDef_AttrDef& from) { set_description(from.description()); } if (from.has_default_value()) { - mutable_default_value()->::tensorflow::AttrValue::MergeFrom(from.default_value()); + mutable_default_value()->::opencv_tensorflow::AttrValue::MergeFrom(from.default_value()); } if (from.has_allowed_values()) { - mutable_allowed_values()->::tensorflow::AttrValue::MergeFrom(from.allowed_values()); + mutable_allowed_values()->::opencv_tensorflow::AttrValue::MergeFrom(from.allowed_values()); } if (from.minimum() != 0) { set_minimum(from.minimum()); @@ -1452,14 +1454,14 @@ void OpDef_AttrDef::MergeFrom(const OpDef_AttrDef& from) { } void OpDef_AttrDef::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.OpDef.AttrDef) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.OpDef.AttrDef) if (&from == this) return; Clear(); MergeFrom(from); } void OpDef_AttrDef::CopyFrom(const OpDef_AttrDef& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDef.AttrDef) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.OpDef.AttrDef) if (&from == this) return; Clear(); MergeFrom(from); @@ -1510,15 +1512,15 @@ void OpDef_AttrDef::InternalSwap(OpDef_AttrDef* other) { // =================================================================== void OpDef::InitAsDefaultInstance() { - ::tensorflow::_OpDef_default_instance_._instance.get_mutable()->deprecation_ = const_cast< ::tensorflow::OpDeprecation*>( - ::tensorflow::OpDeprecation::internal_default_instance()); + ::opencv_tensorflow::_OpDef_default_instance_._instance.get_mutable()->deprecation_ = const_cast< ::opencv_tensorflow::OpDeprecation*>( + ::opencv_tensorflow::OpDeprecation::internal_default_instance()); } void OpDef::_slow_mutable_deprecation() { - deprecation_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::OpDeprecation >( + deprecation_ = ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::OpDeprecation >( GetArenaNoVirtual()); } void OpDef::unsafe_arena_set_allocated_deprecation( - ::tensorflow::OpDeprecation* deprecation) { + ::opencv_tensorflow::OpDeprecation* deprecation) { if (GetArenaNoVirtual() == NULL) { delete deprecation_; } @@ -1528,7 +1530,7 @@ void OpDef::unsafe_arena_set_allocated_deprecation( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.deprecation) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.deprecation) } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int OpDef::kNameFieldNumber; @@ -1550,7 +1552,7 @@ OpDef::OpDef() ::protobuf_op_5fdef_2eproto::InitDefaultsOpDef(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.OpDef) + // @@protoc_insertion_point(constructor:opencv_tensorflow.OpDef) } OpDef::OpDef(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -1561,7 +1563,7 @@ OpDef::OpDef(::google::protobuf::Arena* arena) ::protobuf_op_5fdef_2eproto::InitDefaultsOpDef(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.OpDef) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.OpDef) } OpDef::OpDef(const OpDef& from) : ::google::protobuf::Message(), @@ -1587,14 +1589,14 @@ OpDef::OpDef(const OpDef& from) GetArenaNoVirtual()); } if (from.has_deprecation()) { - deprecation_ = new ::tensorflow::OpDeprecation(*from.deprecation_); + deprecation_ = new ::opencv_tensorflow::OpDeprecation(*from.deprecation_); } else { deprecation_ = NULL; } ::memcpy(&is_commutative_, &from.is_commutative_, static_cast(reinterpret_cast(&allows_uninitialized_input_) - reinterpret_cast(&is_commutative_)) + sizeof(allows_uninitialized_input_)); - // @@protoc_insertion_point(copy_constructor:tensorflow.OpDef) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.OpDef) } void OpDef::SharedCtor() { @@ -1608,7 +1610,7 @@ void OpDef::SharedCtor() { } OpDef::~OpDef() { - // @@protoc_insertion_point(destructor:tensorflow.OpDef) + // @@protoc_insertion_point(destructor:opencv_tensorflow.OpDef) SharedDtor(); } @@ -1646,7 +1648,7 @@ OpDef* OpDef::New(::google::protobuf::Arena* arena) const { } void OpDef::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.OpDef) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.OpDef) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1671,7 +1673,7 @@ bool OpDef::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.OpDef) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.OpDef) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; @@ -1686,14 +1688,14 @@ bool OpDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDef.name")); + "opencv_tensorflow.OpDef.name")); } else { goto handle_unusual; } break; } - // repeated .tensorflow.OpDef.ArgDef input_arg = 2; + // repeated .opencv_tensorflow.OpDef.ArgDef input_arg = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -1704,7 +1706,7 @@ bool OpDef::MergePartialFromCodedStream( break; } - // repeated .tensorflow.OpDef.ArgDef output_arg = 3; + // repeated .opencv_tensorflow.OpDef.ArgDef output_arg = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -1715,7 +1717,7 @@ bool OpDef::MergePartialFromCodedStream( break; } - // repeated .tensorflow.OpDef.AttrDef attr = 4; + // repeated .opencv_tensorflow.OpDef.AttrDef attr = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { @@ -1735,7 +1737,7 @@ bool OpDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->summary().data(), static_cast(this->summary().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDef.summary")); + "opencv_tensorflow.OpDef.summary")); } else { goto handle_unusual; } @@ -1751,14 +1753,14 @@ bool OpDef::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast(this->description().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDef.description")); + "opencv_tensorflow.OpDef.description")); } else { goto handle_unusual; } break; } - // .tensorflow.OpDeprecation deprecation = 8; + // .opencv_tensorflow.OpDeprecation deprecation = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { @@ -1838,17 +1840,17 @@ bool OpDef::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.OpDef) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.OpDef) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.OpDef) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.OpDef) return false; #undef DO_ } void OpDef::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.OpDef) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.OpDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1857,26 +1859,26 @@ void OpDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.name"); + "opencv_tensorflow.OpDef.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } - // repeated .tensorflow.OpDef.ArgDef input_arg = 2; + // repeated .opencv_tensorflow.OpDef.ArgDef input_arg = 2; for (unsigned int i = 0, n = static_cast(this->input_arg_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->input_arg(static_cast(i)), output); } - // repeated .tensorflow.OpDef.ArgDef output_arg = 3; + // repeated .opencv_tensorflow.OpDef.ArgDef output_arg = 3; for (unsigned int i = 0, n = static_cast(this->output_arg_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, this->output_arg(static_cast(i)), output); } - // repeated .tensorflow.OpDef.AttrDef attr = 4; + // repeated .opencv_tensorflow.OpDef.AttrDef attr = 4; for (unsigned int i = 0, n = static_cast(this->attr_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -1888,7 +1890,7 @@ void OpDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->summary().data(), static_cast(this->summary().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.summary"); + "opencv_tensorflow.OpDef.summary"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->summary(), output); } @@ -1898,12 +1900,12 @@ void OpDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast(this->description().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.description"); + "opencv_tensorflow.OpDef.description"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->description(), output); } - // .tensorflow.OpDeprecation deprecation = 8; + // .opencv_tensorflow.OpDeprecation deprecation = 8; if (this->has_deprecation()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 8, *this->deprecation_, output); @@ -1933,13 +1935,13 @@ void OpDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.OpDef) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.OpDef) } ::google::protobuf::uint8* OpDef::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDef) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.OpDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1948,13 +1950,13 @@ void OpDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.name"); + "opencv_tensorflow.OpDef.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } - // repeated .tensorflow.OpDef.ArgDef input_arg = 2; + // repeated .opencv_tensorflow.OpDef.ArgDef input_arg = 2; for (unsigned int i = 0, n = static_cast(this->input_arg_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -1962,7 +1964,7 @@ void OpDef::SerializeWithCachedSizes( 2, this->input_arg(static_cast(i)), deterministic, target); } - // repeated .tensorflow.OpDef.ArgDef output_arg = 3; + // repeated .opencv_tensorflow.OpDef.ArgDef output_arg = 3; for (unsigned int i = 0, n = static_cast(this->output_arg_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -1970,7 +1972,7 @@ void OpDef::SerializeWithCachedSizes( 3, this->output_arg(static_cast(i)), deterministic, target); } - // repeated .tensorflow.OpDef.AttrDef attr = 4; + // repeated .opencv_tensorflow.OpDef.AttrDef attr = 4; for (unsigned int i = 0, n = static_cast(this->attr_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -1983,7 +1985,7 @@ void OpDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->summary().data(), static_cast(this->summary().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.summary"); + "opencv_tensorflow.OpDef.summary"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->summary(), target); @@ -1994,13 +1996,13 @@ void OpDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->description().data(), static_cast(this->description().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDef.description"); + "opencv_tensorflow.OpDef.description"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->description(), target); } - // .tensorflow.OpDeprecation deprecation = 8; + // .opencv_tensorflow.OpDeprecation deprecation = 8; if (this->has_deprecation()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -2031,12 +2033,12 @@ void OpDef::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDef) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.OpDef) return target; } size_t OpDef::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDef) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.OpDef) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2044,7 +2046,7 @@ size_t OpDef::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .tensorflow.OpDef.ArgDef input_arg = 2; + // repeated .opencv_tensorflow.OpDef.ArgDef input_arg = 2; { unsigned int count = static_cast(this->input_arg_size()); total_size += 1UL * count; @@ -2055,7 +2057,7 @@ size_t OpDef::ByteSizeLong() const { } } - // repeated .tensorflow.OpDef.ArgDef output_arg = 3; + // repeated .opencv_tensorflow.OpDef.ArgDef output_arg = 3; { unsigned int count = static_cast(this->output_arg_size()); total_size += 1UL * count; @@ -2066,7 +2068,7 @@ size_t OpDef::ByteSizeLong() const { } } - // repeated .tensorflow.OpDef.AttrDef attr = 4; + // repeated .opencv_tensorflow.OpDef.AttrDef attr = 4; { unsigned int count = static_cast(this->attr_size()); total_size += 1UL * count; @@ -2098,7 +2100,7 @@ size_t OpDef::ByteSizeLong() const { this->description()); } - // .tensorflow.OpDeprecation deprecation = 8; + // .opencv_tensorflow.OpDeprecation deprecation = 8; if (this->has_deprecation()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -2133,22 +2135,22 @@ size_t OpDef::ByteSizeLong() const { } void OpDef::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.OpDef) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.OpDef) GOOGLE_DCHECK_NE(&from, this); const OpDef* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.OpDef) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.OpDef) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.OpDef) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.OpDef) MergeFrom(*source); } } void OpDef::MergeFrom(const OpDef& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDef) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.OpDef) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2167,7 +2169,7 @@ void OpDef::MergeFrom(const OpDef& from) { set_description(from.description()); } if (from.has_deprecation()) { - mutable_deprecation()->::tensorflow::OpDeprecation::MergeFrom(from.deprecation()); + mutable_deprecation()->::opencv_tensorflow::OpDeprecation::MergeFrom(from.deprecation()); } if (from.is_commutative() != 0) { set_is_commutative(from.is_commutative()); @@ -2184,14 +2186,14 @@ void OpDef::MergeFrom(const OpDef& from) { } void OpDef::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.OpDef) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.OpDef) if (&from == this) return; Clear(); MergeFrom(from); } void OpDef::CopyFrom(const OpDef& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDef) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.OpDef) if (&from == this) return; Clear(); MergeFrom(from); @@ -2258,7 +2260,7 @@ OpDeprecation::OpDeprecation() ::protobuf_op_5fdef_2eproto::InitDefaultsOpDeprecation(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.OpDeprecation) + // @@protoc_insertion_point(constructor:opencv_tensorflow.OpDeprecation) } OpDeprecation::OpDeprecation(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -2266,7 +2268,7 @@ OpDeprecation::OpDeprecation(::google::protobuf::Arena* arena) ::protobuf_op_5fdef_2eproto::InitDefaultsOpDeprecation(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.OpDeprecation) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.OpDeprecation) } OpDeprecation::OpDeprecation(const OpDeprecation& from) : ::google::protobuf::Message(), @@ -2279,7 +2281,7 @@ OpDeprecation::OpDeprecation(const OpDeprecation& from) GetArenaNoVirtual()); } version_ = from.version_; - // @@protoc_insertion_point(copy_constructor:tensorflow.OpDeprecation) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.OpDeprecation) } void OpDeprecation::SharedCtor() { @@ -2289,7 +2291,7 @@ void OpDeprecation::SharedCtor() { } OpDeprecation::~OpDeprecation() { - // @@protoc_insertion_point(destructor:tensorflow.OpDeprecation) + // @@protoc_insertion_point(destructor:opencv_tensorflow.OpDeprecation) SharedDtor(); } @@ -2324,7 +2326,7 @@ OpDeprecation* OpDeprecation::New(::google::protobuf::Arena* arena) const { } void OpDeprecation::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.OpDeprecation) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.OpDeprecation) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2338,7 +2340,7 @@ bool OpDeprecation::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.OpDeprecation) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.OpDeprecation) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -2367,7 +2369,7 @@ bool OpDeprecation::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->explanation().data(), static_cast(this->explanation().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.OpDeprecation.explanation")); + "opencv_tensorflow.OpDeprecation.explanation")); } else { goto handle_unusual; } @@ -2386,17 +2388,17 @@ bool OpDeprecation::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.OpDeprecation) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.OpDeprecation) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.OpDeprecation) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.OpDeprecation) return false; #undef DO_ } void OpDeprecation::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.OpDeprecation) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.OpDeprecation) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2410,7 +2412,7 @@ void OpDeprecation::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->explanation().data(), static_cast(this->explanation().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDeprecation.explanation"); + "opencv_tensorflow.OpDeprecation.explanation"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->explanation(), output); } @@ -2419,13 +2421,13 @@ void OpDeprecation::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.OpDeprecation) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.OpDeprecation) } ::google::protobuf::uint8* OpDeprecation::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDeprecation) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.OpDeprecation) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2439,7 +2441,7 @@ void OpDeprecation::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->explanation().data(), static_cast(this->explanation().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.OpDeprecation.explanation"); + "opencv_tensorflow.OpDeprecation.explanation"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->explanation(), target); @@ -2449,12 +2451,12 @@ void OpDeprecation::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDeprecation) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.OpDeprecation) return target; } size_t OpDeprecation::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDeprecation) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.OpDeprecation) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2484,22 +2486,22 @@ size_t OpDeprecation::ByteSizeLong() const { } void OpDeprecation::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.OpDeprecation) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.OpDeprecation) GOOGLE_DCHECK_NE(&from, this); const OpDeprecation* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.OpDeprecation) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.OpDeprecation) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.OpDeprecation) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.OpDeprecation) MergeFrom(*source); } } void OpDeprecation::MergeFrom(const OpDeprecation& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDeprecation) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.OpDeprecation) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2514,14 +2516,14 @@ void OpDeprecation::MergeFrom(const OpDeprecation& from) { } void OpDeprecation::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.OpDeprecation) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.OpDeprecation) if (&from == this) return; Clear(); MergeFrom(from); } void OpDeprecation::CopyFrom(const OpDeprecation& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDeprecation) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.OpDeprecation) if (&from == this) return; Clear(); MergeFrom(from); @@ -2578,7 +2580,7 @@ OpList::OpList() ::protobuf_op_5fdef_2eproto::InitDefaultsOpList(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.OpList) + // @@protoc_insertion_point(constructor:opencv_tensorflow.OpList) } OpList::OpList(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -2587,7 +2589,7 @@ OpList::OpList(::google::protobuf::Arena* arena) ::protobuf_op_5fdef_2eproto::InitDefaultsOpList(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.OpList) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.OpList) } OpList::OpList(const OpList& from) : ::google::protobuf::Message(), @@ -2595,7 +2597,7 @@ OpList::OpList(const OpList& from) op_(from.op_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:tensorflow.OpList) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.OpList) } void OpList::SharedCtor() { @@ -2603,7 +2605,7 @@ void OpList::SharedCtor() { } OpList::~OpList() { - // @@protoc_insertion_point(destructor:tensorflow.OpList) + // @@protoc_insertion_point(destructor:opencv_tensorflow.OpList) SharedDtor(); } @@ -2637,7 +2639,7 @@ OpList* OpList::New(::google::protobuf::Arena* arena) const { } void OpList::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.OpList) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.OpList) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2650,13 +2652,13 @@ bool OpList::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.OpList) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.OpList) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .tensorflow.OpDef op = 1; + // repeated .opencv_tensorflow.OpDef op = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -2679,21 +2681,21 @@ bool OpList::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.OpList) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.OpList) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.OpList) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.OpList) return false; #undef DO_ } void OpList::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.OpList) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.OpList) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .tensorflow.OpDef op = 1; + // repeated .opencv_tensorflow.OpDef op = 1; for (unsigned int i = 0, n = static_cast(this->op_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -2704,17 +2706,17 @@ void OpList::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.OpList) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.OpList) } ::google::protobuf::uint8* OpList::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpList) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.OpList) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .tensorflow.OpDef op = 1; + // repeated .opencv_tensorflow.OpDef op = 1; for (unsigned int i = 0, n = static_cast(this->op_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -2726,12 +2728,12 @@ void OpList::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpList) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.OpList) return target; } size_t OpList::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.OpList) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.OpList) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2739,7 +2741,7 @@ size_t OpList::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .tensorflow.OpDef op = 1; + // repeated .opencv_tensorflow.OpDef op = 1; { unsigned int count = static_cast(this->op_size()); total_size += 1UL * count; @@ -2758,22 +2760,22 @@ size_t OpList::ByteSizeLong() const { } void OpList::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.OpList) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.OpList) GOOGLE_DCHECK_NE(&from, this); const OpList* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.OpList) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.OpList) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.OpList) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.OpList) MergeFrom(*source); } } void OpList::MergeFrom(const OpList& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpList) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.OpList) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2783,14 +2785,14 @@ void OpList::MergeFrom(const OpList& from) { } void OpList::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.OpList) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.OpList) if (&from == this) return; Clear(); MergeFrom(from); } void OpList::CopyFrom(const OpList& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpList) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.OpList) if (&from == this) return; Clear(); MergeFrom(from); @@ -2833,6 +2835,6 @@ void OpList::InternalSwap(OpList* other) { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/op_def.pb.h b/modules/dnn/misc/tensorflow/op_def.pb.h index 76d24275ac..a69c6add23 100644 --- a/modules/dnn/misc/tensorflow/op_def.pb.h +++ b/modules/dnn/misc/tensorflow/op_def.pb.h @@ -62,7 +62,7 @@ inline void InitDefaults() { InitDefaultsOpList(); } } // namespace protobuf_op_5fdef_2eproto -namespace tensorflow { +namespace opencv_tensorflow { class OpDef; class OpDefDefaultTypeInternal; extern OpDefDefaultTypeInternal _OpDef_default_instance_; @@ -78,12 +78,12 @@ extern OpDeprecationDefaultTypeInternal _OpDeprecation_default_instance_; class OpList; class OpListDefaultTypeInternal; extern OpListDefaultTypeInternal _OpList_default_instance_; -} // namespace tensorflow -namespace tensorflow { +} // namespace opencv_tensorflow +namespace opencv_tensorflow { // =================================================================== -class OpDef_ArgDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.OpDef.ArgDef) */ { +class OpDef_ArgDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.OpDef.ArgDef) */ { public: OpDef_ArgDef(); virtual ~OpDef_ArgDef(); @@ -292,11 +292,11 @@ class OpDef_ArgDef : public ::google::protobuf::Message /* @@protoc_insertion_po void unsafe_arena_set_allocated_type_list_attr( ::std::string* type_list_attr); - // .tensorflow.DataType type = 3; + // .opencv_tensorflow.DataType type = 3; void clear_type(); static const int kTypeFieldNumber = 3; - ::tensorflow::DataType type() const; - void set_type(::tensorflow::DataType value); + ::opencv_tensorflow::DataType type() const; + void set_type(::opencv_tensorflow::DataType value); // bool is_ref = 16; void clear_is_ref(); @@ -304,7 +304,7 @@ class OpDef_ArgDef : public ::google::protobuf::Message /* @@protoc_insertion_po bool is_ref() const; void set_is_ref(bool value); - // @@protoc_insertion_point(class_scope:tensorflow.OpDef.ArgDef) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.OpDef.ArgDef) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -324,7 +324,7 @@ class OpDef_ArgDef : public ::google::protobuf::Message /* @@protoc_insertion_po }; // ------------------------------------------------------------------- -class OpDef_AttrDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.OpDef.AttrDef) */ { +class OpDef_AttrDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.OpDef.AttrDef) */ { public: OpDef_AttrDef(); virtual ~OpDef_AttrDef(); @@ -487,35 +487,35 @@ class OpDef_AttrDef : public ::google::protobuf::Message /* @@protoc_insertion_p void unsafe_arena_set_allocated_description( ::std::string* description); - // .tensorflow.AttrValue default_value = 3; + // .opencv_tensorflow.AttrValue default_value = 3; bool has_default_value() const; void clear_default_value(); static const int kDefaultValueFieldNumber = 3; private: void _slow_mutable_default_value(); public: - const ::tensorflow::AttrValue& default_value() const; - ::tensorflow::AttrValue* release_default_value(); - ::tensorflow::AttrValue* mutable_default_value(); - void set_allocated_default_value(::tensorflow::AttrValue* default_value); + const ::opencv_tensorflow::AttrValue& default_value() const; + ::opencv_tensorflow::AttrValue* release_default_value(); + ::opencv_tensorflow::AttrValue* mutable_default_value(); + void set_allocated_default_value(::opencv_tensorflow::AttrValue* default_value); void unsafe_arena_set_allocated_default_value( - ::tensorflow::AttrValue* default_value); - ::tensorflow::AttrValue* unsafe_arena_release_default_value(); + ::opencv_tensorflow::AttrValue* default_value); + ::opencv_tensorflow::AttrValue* unsafe_arena_release_default_value(); - // .tensorflow.AttrValue allowed_values = 7; + // .opencv_tensorflow.AttrValue allowed_values = 7; bool has_allowed_values() const; void clear_allowed_values(); static const int kAllowedValuesFieldNumber = 7; private: void _slow_mutable_allowed_values(); public: - const ::tensorflow::AttrValue& allowed_values() const; - ::tensorflow::AttrValue* release_allowed_values(); - ::tensorflow::AttrValue* mutable_allowed_values(); - void set_allocated_allowed_values(::tensorflow::AttrValue* allowed_values); + const ::opencv_tensorflow::AttrValue& allowed_values() const; + ::opencv_tensorflow::AttrValue* release_allowed_values(); + ::opencv_tensorflow::AttrValue* mutable_allowed_values(); + void set_allocated_allowed_values(::opencv_tensorflow::AttrValue* allowed_values); void unsafe_arena_set_allocated_allowed_values( - ::tensorflow::AttrValue* allowed_values); - ::tensorflow::AttrValue* unsafe_arena_release_allowed_values(); + ::opencv_tensorflow::AttrValue* allowed_values); + ::opencv_tensorflow::AttrValue* unsafe_arena_release_allowed_values(); // int64 minimum = 6; void clear_minimum(); @@ -529,7 +529,7 @@ class OpDef_AttrDef : public ::google::protobuf::Message /* @@protoc_insertion_p bool has_minimum() const; void set_has_minimum(bool value); - // @@protoc_insertion_point(class_scope:tensorflow.OpDef.AttrDef) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.OpDef.AttrDef) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -539,8 +539,8 @@ class OpDef_AttrDef : public ::google::protobuf::Message /* @@protoc_insertion_p ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::internal::ArenaStringPtr type_; ::google::protobuf::internal::ArenaStringPtr description_; - ::tensorflow::AttrValue* default_value_; - ::tensorflow::AttrValue* allowed_values_; + ::opencv_tensorflow::AttrValue* default_value_; + ::opencv_tensorflow::AttrValue* allowed_values_; ::google::protobuf::int64 minimum_; bool has_minimum_; mutable int _cached_size_; @@ -549,7 +549,7 @@ class OpDef_AttrDef : public ::google::protobuf::Message /* @@protoc_insertion_p }; // ------------------------------------------------------------------- -class OpDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.OpDef) */ { +class OpDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.OpDef) */ { public: OpDef(); virtual ~OpDef(); @@ -646,40 +646,40 @@ class OpDef : public ::google::protobuf::Message /* @@protoc_insertion_point(cla // accessors ------------------------------------------------------- - // repeated .tensorflow.OpDef.ArgDef input_arg = 2; + // repeated .opencv_tensorflow.OpDef.ArgDef input_arg = 2; int input_arg_size() const; void clear_input_arg(); static const int kInputArgFieldNumber = 2; - const ::tensorflow::OpDef_ArgDef& input_arg(int index) const; - ::tensorflow::OpDef_ArgDef* mutable_input_arg(int index); - ::tensorflow::OpDef_ArgDef* add_input_arg(); - ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >* + const ::opencv_tensorflow::OpDef_ArgDef& input_arg(int index) const; + ::opencv_tensorflow::OpDef_ArgDef* mutable_input_arg(int index); + ::opencv_tensorflow::OpDef_ArgDef* add_input_arg(); + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_ArgDef >* mutable_input_arg(); - const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >& + const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_ArgDef >& input_arg() const; - // repeated .tensorflow.OpDef.ArgDef output_arg = 3; + // repeated .opencv_tensorflow.OpDef.ArgDef output_arg = 3; int output_arg_size() const; void clear_output_arg(); static const int kOutputArgFieldNumber = 3; - const ::tensorflow::OpDef_ArgDef& output_arg(int index) const; - ::tensorflow::OpDef_ArgDef* mutable_output_arg(int index); - ::tensorflow::OpDef_ArgDef* add_output_arg(); - ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >* + const ::opencv_tensorflow::OpDef_ArgDef& output_arg(int index) const; + ::opencv_tensorflow::OpDef_ArgDef* mutable_output_arg(int index); + ::opencv_tensorflow::OpDef_ArgDef* add_output_arg(); + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_ArgDef >* mutable_output_arg(); - const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >& + const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_ArgDef >& output_arg() const; - // repeated .tensorflow.OpDef.AttrDef attr = 4; + // repeated .opencv_tensorflow.OpDef.AttrDef attr = 4; int attr_size() const; void clear_attr(); static const int kAttrFieldNumber = 4; - const ::tensorflow::OpDef_AttrDef& attr(int index) const; - ::tensorflow::OpDef_AttrDef* mutable_attr(int index); - ::tensorflow::OpDef_AttrDef* add_attr(); - ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef >* + const ::opencv_tensorflow::OpDef_AttrDef& attr(int index) const; + ::opencv_tensorflow::OpDef_AttrDef* mutable_attr(int index); + ::opencv_tensorflow::OpDef_AttrDef* add_attr(); + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_AttrDef >* mutable_attr(); - const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef >& + const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_AttrDef >& attr() const; // string name = 1; @@ -751,20 +751,20 @@ class OpDef : public ::google::protobuf::Message /* @@protoc_insertion_point(cla void unsafe_arena_set_allocated_description( ::std::string* description); - // .tensorflow.OpDeprecation deprecation = 8; + // .opencv_tensorflow.OpDeprecation deprecation = 8; bool has_deprecation() const; void clear_deprecation(); static const int kDeprecationFieldNumber = 8; private: void _slow_mutable_deprecation(); public: - const ::tensorflow::OpDeprecation& deprecation() const; - ::tensorflow::OpDeprecation* release_deprecation(); - ::tensorflow::OpDeprecation* mutable_deprecation(); - void set_allocated_deprecation(::tensorflow::OpDeprecation* deprecation); + const ::opencv_tensorflow::OpDeprecation& deprecation() const; + ::opencv_tensorflow::OpDeprecation* release_deprecation(); + ::opencv_tensorflow::OpDeprecation* mutable_deprecation(); + void set_allocated_deprecation(::opencv_tensorflow::OpDeprecation* deprecation); void unsafe_arena_set_allocated_deprecation( - ::tensorflow::OpDeprecation* deprecation); - ::tensorflow::OpDeprecation* unsafe_arena_release_deprecation(); + ::opencv_tensorflow::OpDeprecation* deprecation); + ::opencv_tensorflow::OpDeprecation* unsafe_arena_release_deprecation(); // bool is_commutative = 18; void clear_is_commutative(); @@ -790,20 +790,20 @@ class OpDef : public ::google::protobuf::Message /* @@protoc_insertion_point(cla bool allows_uninitialized_input() const; void set_allows_uninitialized_input(bool value); - // @@protoc_insertion_point(class_scope:tensorflow.OpDef) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.OpDef) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef > input_arg_; - ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef > output_arg_; - ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef > attr_; + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_ArgDef > input_arg_; + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_ArgDef > output_arg_; + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_AttrDef > attr_; ::google::protobuf::internal::ArenaStringPtr name_; ::google::protobuf::internal::ArenaStringPtr summary_; ::google::protobuf::internal::ArenaStringPtr description_; - ::tensorflow::OpDeprecation* deprecation_; + ::opencv_tensorflow::OpDeprecation* deprecation_; bool is_commutative_; bool is_aggregate_; bool is_stateful_; @@ -814,7 +814,7 @@ class OpDef : public ::google::protobuf::Message /* @@protoc_insertion_point(cla }; // ------------------------------------------------------------------- -class OpDeprecation : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.OpDeprecation) */ { +class OpDeprecation : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.OpDeprecation) */ { public: OpDeprecation(); virtual ~OpDeprecation(); @@ -937,7 +937,7 @@ class OpDeprecation : public ::google::protobuf::Message /* @@protoc_insertion_p ::google::protobuf::int32 version() const; void set_version(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:tensorflow.OpDeprecation) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.OpDeprecation) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -952,7 +952,7 @@ class OpDeprecation : public ::google::protobuf::Message /* @@protoc_insertion_p }; // ------------------------------------------------------------------- -class OpList : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.OpList) */ { +class OpList : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.OpList) */ { public: OpList(); virtual ~OpList(); @@ -1046,26 +1046,26 @@ class OpList : public ::google::protobuf::Message /* @@protoc_insertion_point(cl // accessors ------------------------------------------------------- - // repeated .tensorflow.OpDef op = 1; + // repeated .opencv_tensorflow.OpDef op = 1; int op_size() const; void clear_op(); static const int kOpFieldNumber = 1; - const ::tensorflow::OpDef& op(int index) const; - ::tensorflow::OpDef* mutable_op(int index); - ::tensorflow::OpDef* add_op(); - ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef >* + const ::opencv_tensorflow::OpDef& op(int index) const; + ::opencv_tensorflow::OpDef* mutable_op(int index); + ::opencv_tensorflow::OpDef* add_op(); + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef >* mutable_op(); - const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef >& + const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef >& op() const; - // @@protoc_insertion_point(class_scope:tensorflow.OpList) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.OpList) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef > op_; + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef > op_; mutable int _cached_size_; friend struct ::protobuf_op_5fdef_2eproto::TableStruct; friend void ::protobuf_op_5fdef_2eproto::InitDefaultsOpListImpl(); @@ -1086,20 +1086,20 @@ inline void OpDef_ArgDef::clear_name() { name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDef_ArgDef::name() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.name) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.ArgDef.name) return name_.Get(); } inline void OpDef_ArgDef::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.name) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.ArgDef.name) } #if LANG_CXX11 inline void OpDef_ArgDef::set_name(::std::string&& value) { name_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDef.ArgDef.name) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDef.ArgDef.name) } #endif inline void OpDef_ArgDef::set_name(const char* value) { @@ -1107,22 +1107,22 @@ inline void OpDef_ArgDef::set_name(const char* value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.name) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDef.ArgDef.name) } inline void OpDef_ArgDef::set_name(const char* value, size_t size) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.name) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDef.ArgDef.name) } inline ::std::string* OpDef_ArgDef::mutable_name() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.name) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.ArgDef.name) return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDef_ArgDef::release_name() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.name) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.ArgDef.name) return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1134,10 +1134,10 @@ inline void OpDef_ArgDef::set_allocated_name(::std::string* name) { } name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.name) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.ArgDef.name) } inline ::std::string* OpDef_ArgDef::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.name) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.ArgDef.name) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1153,7 +1153,7 @@ inline void OpDef_ArgDef::unsafe_arena_set_allocated_name( } name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.ArgDef.name) } // string description = 2; @@ -1161,20 +1161,20 @@ inline void OpDef_ArgDef::clear_description() { description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDef_ArgDef::description() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.description) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.ArgDef.description) return description_.Get(); } inline void OpDef_ArgDef::set_description(const ::std::string& value) { description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.description) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.ArgDef.description) } #if LANG_CXX11 inline void OpDef_ArgDef::set_description(::std::string&& value) { description_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDef.ArgDef.description) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDef.ArgDef.description) } #endif inline void OpDef_ArgDef::set_description(const char* value) { @@ -1182,22 +1182,22 @@ inline void OpDef_ArgDef::set_description(const char* value) { description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.description) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDef.ArgDef.description) } inline void OpDef_ArgDef::set_description(const char* value, size_t size) { description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.description) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDef.ArgDef.description) } inline ::std::string* OpDef_ArgDef::mutable_description() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.description) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.ArgDef.description) return description_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDef_ArgDef::release_description() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.description) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.ArgDef.description) return description_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1209,10 +1209,10 @@ inline void OpDef_ArgDef::set_allocated_description(::std::string* description) } description_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.description) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.ArgDef.description) } inline ::std::string* OpDef_ArgDef::unsafe_arena_release_description() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.description) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.ArgDef.description) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return description_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1228,21 +1228,21 @@ inline void OpDef_ArgDef::unsafe_arena_set_allocated_description( } description_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.description) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.ArgDef.description) } -// .tensorflow.DataType type = 3; +// .opencv_tensorflow.DataType type = 3; inline void OpDef_ArgDef::clear_type() { type_ = 0; } -inline ::tensorflow::DataType OpDef_ArgDef::type() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.type) - return static_cast< ::tensorflow::DataType >(type_); +inline ::opencv_tensorflow::DataType OpDef_ArgDef::type() const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.ArgDef.type) + return static_cast< ::opencv_tensorflow::DataType >(type_); } -inline void OpDef_ArgDef::set_type(::tensorflow::DataType value) { +inline void OpDef_ArgDef::set_type(::opencv_tensorflow::DataType value) { type_ = value; - // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.type) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.ArgDef.type) } // string type_attr = 4; @@ -1250,20 +1250,20 @@ inline void OpDef_ArgDef::clear_type_attr() { type_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDef_ArgDef::type_attr() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.type_attr) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.ArgDef.type_attr) return type_attr_.Get(); } inline void OpDef_ArgDef::set_type_attr(const ::std::string& value) { type_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.type_attr) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.ArgDef.type_attr) } #if LANG_CXX11 inline void OpDef_ArgDef::set_type_attr(::std::string&& value) { type_attr_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDef.ArgDef.type_attr) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDef.ArgDef.type_attr) } #endif inline void OpDef_ArgDef::set_type_attr(const char* value) { @@ -1271,22 +1271,22 @@ inline void OpDef_ArgDef::set_type_attr(const char* value) { type_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.type_attr) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDef.ArgDef.type_attr) } inline void OpDef_ArgDef::set_type_attr(const char* value, size_t size) { type_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.type_attr) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDef.ArgDef.type_attr) } inline ::std::string* OpDef_ArgDef::mutable_type_attr() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.type_attr) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.ArgDef.type_attr) return type_attr_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDef_ArgDef::release_type_attr() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.type_attr) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.ArgDef.type_attr) return type_attr_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1298,10 +1298,10 @@ inline void OpDef_ArgDef::set_allocated_type_attr(::std::string* type_attr) { } type_attr_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_attr, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.type_attr) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.ArgDef.type_attr) } inline ::std::string* OpDef_ArgDef::unsafe_arena_release_type_attr() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.type_attr) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.ArgDef.type_attr) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return type_attr_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1317,7 +1317,7 @@ inline void OpDef_ArgDef::unsafe_arena_set_allocated_type_attr( } type_attr_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_attr, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.type_attr) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.ArgDef.type_attr) } // string number_attr = 5; @@ -1325,20 +1325,20 @@ inline void OpDef_ArgDef::clear_number_attr() { number_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDef_ArgDef::number_attr() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.number_attr) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.ArgDef.number_attr) return number_attr_.Get(); } inline void OpDef_ArgDef::set_number_attr(const ::std::string& value) { number_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.number_attr) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.ArgDef.number_attr) } #if LANG_CXX11 inline void OpDef_ArgDef::set_number_attr(::std::string&& value) { number_attr_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDef.ArgDef.number_attr) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDef.ArgDef.number_attr) } #endif inline void OpDef_ArgDef::set_number_attr(const char* value) { @@ -1346,22 +1346,22 @@ inline void OpDef_ArgDef::set_number_attr(const char* value) { number_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.number_attr) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDef.ArgDef.number_attr) } inline void OpDef_ArgDef::set_number_attr(const char* value, size_t size) { number_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.number_attr) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDef.ArgDef.number_attr) } inline ::std::string* OpDef_ArgDef::mutable_number_attr() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.number_attr) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.ArgDef.number_attr) return number_attr_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDef_ArgDef::release_number_attr() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.number_attr) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.ArgDef.number_attr) return number_attr_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1373,10 +1373,10 @@ inline void OpDef_ArgDef::set_allocated_number_attr(::std::string* number_attr) } number_attr_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), number_attr, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.number_attr) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.ArgDef.number_attr) } inline ::std::string* OpDef_ArgDef::unsafe_arena_release_number_attr() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.number_attr) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.ArgDef.number_attr) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return number_attr_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1392,7 +1392,7 @@ inline void OpDef_ArgDef::unsafe_arena_set_allocated_number_attr( } number_attr_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), number_attr, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.number_attr) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.ArgDef.number_attr) } // string type_list_attr = 6; @@ -1400,20 +1400,20 @@ inline void OpDef_ArgDef::clear_type_list_attr() { type_list_attr_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDef_ArgDef::type_list_attr() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.type_list_attr) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.ArgDef.type_list_attr) return type_list_attr_.Get(); } inline void OpDef_ArgDef::set_type_list_attr(const ::std::string& value) { type_list_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.type_list_attr) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.ArgDef.type_list_attr) } #if LANG_CXX11 inline void OpDef_ArgDef::set_type_list_attr(::std::string&& value) { type_list_attr_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDef.ArgDef.type_list_attr) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDef.ArgDef.type_list_attr) } #endif inline void OpDef_ArgDef::set_type_list_attr(const char* value) { @@ -1421,22 +1421,22 @@ inline void OpDef_ArgDef::set_type_list_attr(const char* value) { type_list_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.ArgDef.type_list_attr) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDef.ArgDef.type_list_attr) } inline void OpDef_ArgDef::set_type_list_attr(const char* value, size_t size) { type_list_attr_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.ArgDef.type_list_attr) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDef.ArgDef.type_list_attr) } inline ::std::string* OpDef_ArgDef::mutable_type_list_attr() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.ArgDef.type_list_attr) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.ArgDef.type_list_attr) return type_list_attr_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDef_ArgDef::release_type_list_attr() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.ArgDef.type_list_attr) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.ArgDef.type_list_attr) return type_list_attr_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1448,10 +1448,10 @@ inline void OpDef_ArgDef::set_allocated_type_list_attr(::std::string* type_list_ } type_list_attr_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_list_attr, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.ArgDef.type_list_attr) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.ArgDef.type_list_attr) } inline ::std::string* OpDef_ArgDef::unsafe_arena_release_type_list_attr() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.ArgDef.type_list_attr) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.ArgDef.type_list_attr) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return type_list_attr_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1467,7 +1467,7 @@ inline void OpDef_ArgDef::unsafe_arena_set_allocated_type_list_attr( } type_list_attr_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_list_attr, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.ArgDef.type_list_attr) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.ArgDef.type_list_attr) } // bool is_ref = 16; @@ -1475,13 +1475,13 @@ inline void OpDef_ArgDef::clear_is_ref() { is_ref_ = false; } inline bool OpDef_ArgDef::is_ref() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.ArgDef.is_ref) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.ArgDef.is_ref) return is_ref_; } inline void OpDef_ArgDef::set_is_ref(bool value) { is_ref_ = value; - // @@protoc_insertion_point(field_set:tensorflow.OpDef.ArgDef.is_ref) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.ArgDef.is_ref) } // ------------------------------------------------------------------- @@ -1493,20 +1493,20 @@ inline void OpDef_AttrDef::clear_name() { name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDef_AttrDef::name() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.name) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.AttrDef.name) return name_.Get(); } inline void OpDef_AttrDef::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.name) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.AttrDef.name) } #if LANG_CXX11 inline void OpDef_AttrDef::set_name(::std::string&& value) { name_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDef.AttrDef.name) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDef.AttrDef.name) } #endif inline void OpDef_AttrDef::set_name(const char* value) { @@ -1514,22 +1514,22 @@ inline void OpDef_AttrDef::set_name(const char* value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.AttrDef.name) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDef.AttrDef.name) } inline void OpDef_AttrDef::set_name(const char* value, size_t size) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.AttrDef.name) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDef.AttrDef.name) } inline ::std::string* OpDef_AttrDef::mutable_name() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.name) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.AttrDef.name) return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDef_AttrDef::release_name() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.name) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.AttrDef.name) return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1541,10 +1541,10 @@ inline void OpDef_AttrDef::set_allocated_name(::std::string* name) { } name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.name) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.AttrDef.name) } inline ::std::string* OpDef_AttrDef::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.name) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.AttrDef.name) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1560,7 +1560,7 @@ inline void OpDef_AttrDef::unsafe_arena_set_allocated_name( } name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.AttrDef.name) } // string type = 2; @@ -1568,20 +1568,20 @@ inline void OpDef_AttrDef::clear_type() { type_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDef_AttrDef::type() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.type) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.AttrDef.type) return type_.Get(); } inline void OpDef_AttrDef::set_type(const ::std::string& value) { type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.type) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.AttrDef.type) } #if LANG_CXX11 inline void OpDef_AttrDef::set_type(::std::string&& value) { type_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDef.AttrDef.type) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDef.AttrDef.type) } #endif inline void OpDef_AttrDef::set_type(const char* value) { @@ -1589,22 +1589,22 @@ inline void OpDef_AttrDef::set_type(const char* value) { type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.AttrDef.type) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDef.AttrDef.type) } inline void OpDef_AttrDef::set_type(const char* value, size_t size) { type_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.AttrDef.type) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDef.AttrDef.type) } inline ::std::string* OpDef_AttrDef::mutable_type() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.type) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.AttrDef.type) return type_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDef_AttrDef::release_type() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.type) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.AttrDef.type) return type_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1616,10 +1616,10 @@ inline void OpDef_AttrDef::set_allocated_type(::std::string* type) { } type_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.type) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.AttrDef.type) } inline ::std::string* OpDef_AttrDef::unsafe_arena_release_type() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.type) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.AttrDef.type) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return type_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1635,45 +1635,45 @@ inline void OpDef_AttrDef::unsafe_arena_set_allocated_type( } type_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.type) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.AttrDef.type) } -// .tensorflow.AttrValue default_value = 3; +// .opencv_tensorflow.AttrValue default_value = 3; inline bool OpDef_AttrDef::has_default_value() const { return this != internal_default_instance() && default_value_ != NULL; } -inline const ::tensorflow::AttrValue& OpDef_AttrDef::default_value() const { - const ::tensorflow::AttrValue* p = default_value_; - // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.default_value) - return p != NULL ? *p : *reinterpret_cast( - &::tensorflow::_AttrValue_default_instance_); +inline const ::opencv_tensorflow::AttrValue& OpDef_AttrDef::default_value() const { + const ::opencv_tensorflow::AttrValue* p = default_value_; + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.AttrDef.default_value) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_tensorflow::_AttrValue_default_instance_); } -inline ::tensorflow::AttrValue* OpDef_AttrDef::release_default_value() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.default_value) +inline ::opencv_tensorflow::AttrValue* OpDef_AttrDef::release_default_value() { + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.AttrDef.default_value) - ::tensorflow::AttrValue* temp = default_value_; + ::opencv_tensorflow::AttrValue* temp = default_value_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL); } default_value_ = NULL; return temp; } -inline ::tensorflow::AttrValue* OpDef_AttrDef::unsafe_arena_release_default_value() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.default_value) +inline ::opencv_tensorflow::AttrValue* OpDef_AttrDef::unsafe_arena_release_default_value() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.AttrDef.default_value) - ::tensorflow::AttrValue* temp = default_value_; + ::opencv_tensorflow::AttrValue* temp = default_value_; default_value_ = NULL; return temp; } -inline ::tensorflow::AttrValue* OpDef_AttrDef::mutable_default_value() { +inline ::opencv_tensorflow::AttrValue* OpDef_AttrDef::mutable_default_value() { if (default_value_ == NULL) { _slow_mutable_default_value(); } - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.default_value) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.AttrDef.default_value) return default_value_; } -inline void OpDef_AttrDef::set_allocated_default_value(::tensorflow::AttrValue* default_value) { +inline void OpDef_AttrDef::set_allocated_default_value(::opencv_tensorflow::AttrValue* default_value) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(default_value_); @@ -1690,7 +1690,7 @@ inline void OpDef_AttrDef::set_allocated_default_value(::tensorflow::AttrValue* } default_value_ = default_value; - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.default_value) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.AttrDef.default_value) } // string description = 4; @@ -1698,20 +1698,20 @@ inline void OpDef_AttrDef::clear_description() { description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDef_AttrDef::description() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.description) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.AttrDef.description) return description_.Get(); } inline void OpDef_AttrDef::set_description(const ::std::string& value) { description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.description) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.AttrDef.description) } #if LANG_CXX11 inline void OpDef_AttrDef::set_description(::std::string&& value) { description_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDef.AttrDef.description) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDef.AttrDef.description) } #endif inline void OpDef_AttrDef::set_description(const char* value) { @@ -1719,22 +1719,22 @@ inline void OpDef_AttrDef::set_description(const char* value) { description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.AttrDef.description) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDef.AttrDef.description) } inline void OpDef_AttrDef::set_description(const char* value, size_t size) { description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.AttrDef.description) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDef.AttrDef.description) } inline ::std::string* OpDef_AttrDef::mutable_description() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.description) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.AttrDef.description) return description_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDef_AttrDef::release_description() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.description) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.AttrDef.description) return description_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1746,10 +1746,10 @@ inline void OpDef_AttrDef::set_allocated_description(::std::string* description) } description_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.description) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.AttrDef.description) } inline ::std::string* OpDef_AttrDef::unsafe_arena_release_description() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.description) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.AttrDef.description) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return description_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1765,7 +1765,7 @@ inline void OpDef_AttrDef::unsafe_arena_set_allocated_description( } description_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.AttrDef.description) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.AttrDef.description) } // bool has_minimum = 5; @@ -1773,13 +1773,13 @@ inline void OpDef_AttrDef::clear_has_minimum() { has_minimum_ = false; } inline bool OpDef_AttrDef::has_minimum() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.has_minimum) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.AttrDef.has_minimum) return has_minimum_; } inline void OpDef_AttrDef::set_has_minimum(bool value) { has_minimum_ = value; - // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.has_minimum) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.AttrDef.has_minimum) } // int64 minimum = 6; @@ -1787,51 +1787,51 @@ inline void OpDef_AttrDef::clear_minimum() { minimum_ = GOOGLE_LONGLONG(0); } inline ::google::protobuf::int64 OpDef_AttrDef::minimum() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.minimum) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.AttrDef.minimum) return minimum_; } inline void OpDef_AttrDef::set_minimum(::google::protobuf::int64 value) { minimum_ = value; - // @@protoc_insertion_point(field_set:tensorflow.OpDef.AttrDef.minimum) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.AttrDef.minimum) } -// .tensorflow.AttrValue allowed_values = 7; +// .opencv_tensorflow.AttrValue allowed_values = 7; inline bool OpDef_AttrDef::has_allowed_values() const { return this != internal_default_instance() && allowed_values_ != NULL; } -inline const ::tensorflow::AttrValue& OpDef_AttrDef::allowed_values() const { - const ::tensorflow::AttrValue* p = allowed_values_; - // @@protoc_insertion_point(field_get:tensorflow.OpDef.AttrDef.allowed_values) - return p != NULL ? *p : *reinterpret_cast( - &::tensorflow::_AttrValue_default_instance_); +inline const ::opencv_tensorflow::AttrValue& OpDef_AttrDef::allowed_values() const { + const ::opencv_tensorflow::AttrValue* p = allowed_values_; + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.AttrDef.allowed_values) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_tensorflow::_AttrValue_default_instance_); } -inline ::tensorflow::AttrValue* OpDef_AttrDef::release_allowed_values() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.AttrDef.allowed_values) +inline ::opencv_tensorflow::AttrValue* OpDef_AttrDef::release_allowed_values() { + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.AttrDef.allowed_values) - ::tensorflow::AttrValue* temp = allowed_values_; + ::opencv_tensorflow::AttrValue* temp = allowed_values_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL); } allowed_values_ = NULL; return temp; } -inline ::tensorflow::AttrValue* OpDef_AttrDef::unsafe_arena_release_allowed_values() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.AttrDef.allowed_values) +inline ::opencv_tensorflow::AttrValue* OpDef_AttrDef::unsafe_arena_release_allowed_values() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.AttrDef.allowed_values) - ::tensorflow::AttrValue* temp = allowed_values_; + ::opencv_tensorflow::AttrValue* temp = allowed_values_; allowed_values_ = NULL; return temp; } -inline ::tensorflow::AttrValue* OpDef_AttrDef::mutable_allowed_values() { +inline ::opencv_tensorflow::AttrValue* OpDef_AttrDef::mutable_allowed_values() { if (allowed_values_ == NULL) { _slow_mutable_allowed_values(); } - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.AttrDef.allowed_values) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.AttrDef.allowed_values) return allowed_values_; } -inline void OpDef_AttrDef::set_allocated_allowed_values(::tensorflow::AttrValue* allowed_values) { +inline void OpDef_AttrDef::set_allocated_allowed_values(::opencv_tensorflow::AttrValue* allowed_values) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(allowed_values_); @@ -1848,7 +1848,7 @@ inline void OpDef_AttrDef::set_allocated_allowed_values(::tensorflow::AttrValue* } allowed_values_ = allowed_values; - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.AttrDef.allowed_values) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.AttrDef.allowed_values) } // ------------------------------------------------------------------- @@ -1860,20 +1860,20 @@ inline void OpDef::clear_name() { name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDef::name() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.name) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.name) return name_.Get(); } inline void OpDef::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDef.name) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.name) } #if LANG_CXX11 inline void OpDef::set_name(::std::string&& value) { name_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDef.name) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDef.name) } #endif inline void OpDef::set_name(const char* value) { @@ -1881,22 +1881,22 @@ inline void OpDef::set_name(const char* value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.name) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDef.name) } inline void OpDef::set_name(const char* value, size_t size) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.name) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDef.name) } inline ::std::string* OpDef::mutable_name() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.name) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.name) return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDef::release_name() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.name) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.name) return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -1908,10 +1908,10 @@ inline void OpDef::set_allocated_name(::std::string* name) { } name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.name) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.name) } inline ::std::string* OpDef::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.name) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.name) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -1927,100 +1927,100 @@ inline void OpDef::unsafe_arena_set_allocated_name( } name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.name) } -// repeated .tensorflow.OpDef.ArgDef input_arg = 2; +// repeated .opencv_tensorflow.OpDef.ArgDef input_arg = 2; inline int OpDef::input_arg_size() const { return input_arg_.size(); } inline void OpDef::clear_input_arg() { input_arg_.Clear(); } -inline const ::tensorflow::OpDef_ArgDef& OpDef::input_arg(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.input_arg) +inline const ::opencv_tensorflow::OpDef_ArgDef& OpDef::input_arg(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.input_arg) return input_arg_.Get(index); } -inline ::tensorflow::OpDef_ArgDef* OpDef::mutable_input_arg(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.input_arg) +inline ::opencv_tensorflow::OpDef_ArgDef* OpDef::mutable_input_arg(int index) { + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.input_arg) return input_arg_.Mutable(index); } -inline ::tensorflow::OpDef_ArgDef* OpDef::add_input_arg() { - // @@protoc_insertion_point(field_add:tensorflow.OpDef.input_arg) +inline ::opencv_tensorflow::OpDef_ArgDef* OpDef::add_input_arg() { + // @@protoc_insertion_point(field_add:opencv_tensorflow.OpDef.input_arg) return input_arg_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >* +inline ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_ArgDef >* OpDef::mutable_input_arg() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.OpDef.input_arg) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.OpDef.input_arg) return &input_arg_; } -inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >& +inline const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_ArgDef >& OpDef::input_arg() const { - // @@protoc_insertion_point(field_list:tensorflow.OpDef.input_arg) + // @@protoc_insertion_point(field_list:opencv_tensorflow.OpDef.input_arg) return input_arg_; } -// repeated .tensorflow.OpDef.ArgDef output_arg = 3; +// repeated .opencv_tensorflow.OpDef.ArgDef output_arg = 3; inline int OpDef::output_arg_size() const { return output_arg_.size(); } inline void OpDef::clear_output_arg() { output_arg_.Clear(); } -inline const ::tensorflow::OpDef_ArgDef& OpDef::output_arg(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.output_arg) +inline const ::opencv_tensorflow::OpDef_ArgDef& OpDef::output_arg(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.output_arg) return output_arg_.Get(index); } -inline ::tensorflow::OpDef_ArgDef* OpDef::mutable_output_arg(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.output_arg) +inline ::opencv_tensorflow::OpDef_ArgDef* OpDef::mutable_output_arg(int index) { + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.output_arg) return output_arg_.Mutable(index); } -inline ::tensorflow::OpDef_ArgDef* OpDef::add_output_arg() { - // @@protoc_insertion_point(field_add:tensorflow.OpDef.output_arg) +inline ::opencv_tensorflow::OpDef_ArgDef* OpDef::add_output_arg() { + // @@protoc_insertion_point(field_add:opencv_tensorflow.OpDef.output_arg) return output_arg_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >* +inline ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_ArgDef >* OpDef::mutable_output_arg() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.OpDef.output_arg) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.OpDef.output_arg) return &output_arg_; } -inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_ArgDef >& +inline const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_ArgDef >& OpDef::output_arg() const { - // @@protoc_insertion_point(field_list:tensorflow.OpDef.output_arg) + // @@protoc_insertion_point(field_list:opencv_tensorflow.OpDef.output_arg) return output_arg_; } -// repeated .tensorflow.OpDef.AttrDef attr = 4; +// repeated .opencv_tensorflow.OpDef.AttrDef attr = 4; inline int OpDef::attr_size() const { return attr_.size(); } inline void OpDef::clear_attr() { attr_.Clear(); } -inline const ::tensorflow::OpDef_AttrDef& OpDef::attr(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.attr) +inline const ::opencv_tensorflow::OpDef_AttrDef& OpDef::attr(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.attr) return attr_.Get(index); } -inline ::tensorflow::OpDef_AttrDef* OpDef::mutable_attr(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.attr) +inline ::opencv_tensorflow::OpDef_AttrDef* OpDef::mutable_attr(int index) { + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.attr) return attr_.Mutable(index); } -inline ::tensorflow::OpDef_AttrDef* OpDef::add_attr() { - // @@protoc_insertion_point(field_add:tensorflow.OpDef.attr) +inline ::opencv_tensorflow::OpDef_AttrDef* OpDef::add_attr() { + // @@protoc_insertion_point(field_add:opencv_tensorflow.OpDef.attr) return attr_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef >* +inline ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_AttrDef >* OpDef::mutable_attr() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.OpDef.attr) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.OpDef.attr) return &attr_; } -inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef_AttrDef >& +inline const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef_AttrDef >& OpDef::attr() const { - // @@protoc_insertion_point(field_list:tensorflow.OpDef.attr) + // @@protoc_insertion_point(field_list:opencv_tensorflow.OpDef.attr) return attr_; } -// .tensorflow.OpDeprecation deprecation = 8; +// .opencv_tensorflow.OpDeprecation deprecation = 8; inline bool OpDef::has_deprecation() const { return this != internal_default_instance() && deprecation_ != NULL; } @@ -2030,38 +2030,38 @@ inline void OpDef::clear_deprecation() { } deprecation_ = NULL; } -inline const ::tensorflow::OpDeprecation& OpDef::deprecation() const { - const ::tensorflow::OpDeprecation* p = deprecation_; - // @@protoc_insertion_point(field_get:tensorflow.OpDef.deprecation) - return p != NULL ? *p : *reinterpret_cast( - &::tensorflow::_OpDeprecation_default_instance_); +inline const ::opencv_tensorflow::OpDeprecation& OpDef::deprecation() const { + const ::opencv_tensorflow::OpDeprecation* p = deprecation_; + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.deprecation) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_tensorflow::_OpDeprecation_default_instance_); } -inline ::tensorflow::OpDeprecation* OpDef::release_deprecation() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.deprecation) +inline ::opencv_tensorflow::OpDeprecation* OpDef::release_deprecation() { + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.deprecation) - ::tensorflow::OpDeprecation* temp = deprecation_; + ::opencv_tensorflow::OpDeprecation* temp = deprecation_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL); } deprecation_ = NULL; return temp; } -inline ::tensorflow::OpDeprecation* OpDef::unsafe_arena_release_deprecation() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.deprecation) +inline ::opencv_tensorflow::OpDeprecation* OpDef::unsafe_arena_release_deprecation() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.deprecation) - ::tensorflow::OpDeprecation* temp = deprecation_; + ::opencv_tensorflow::OpDeprecation* temp = deprecation_; deprecation_ = NULL; return temp; } -inline ::tensorflow::OpDeprecation* OpDef::mutable_deprecation() { +inline ::opencv_tensorflow::OpDeprecation* OpDef::mutable_deprecation() { if (deprecation_ == NULL) { _slow_mutable_deprecation(); } - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.deprecation) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.deprecation) return deprecation_; } -inline void OpDef::set_allocated_deprecation(::tensorflow::OpDeprecation* deprecation) { +inline void OpDef::set_allocated_deprecation(::opencv_tensorflow::OpDeprecation* deprecation) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete deprecation_; @@ -2078,7 +2078,7 @@ inline void OpDef::set_allocated_deprecation(::tensorflow::OpDeprecation* deprec } deprecation_ = deprecation; - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.deprecation) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.deprecation) } // string summary = 5; @@ -2086,20 +2086,20 @@ inline void OpDef::clear_summary() { summary_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDef::summary() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.summary) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.summary) return summary_.Get(); } inline void OpDef::set_summary(const ::std::string& value) { summary_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDef.summary) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.summary) } #if LANG_CXX11 inline void OpDef::set_summary(::std::string&& value) { summary_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDef.summary) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDef.summary) } #endif inline void OpDef::set_summary(const char* value) { @@ -2107,22 +2107,22 @@ inline void OpDef::set_summary(const char* value) { summary_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.summary) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDef.summary) } inline void OpDef::set_summary(const char* value, size_t size) { summary_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.summary) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDef.summary) } inline ::std::string* OpDef::mutable_summary() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.summary) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.summary) return summary_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDef::release_summary() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.summary) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.summary) return summary_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -2134,10 +2134,10 @@ inline void OpDef::set_allocated_summary(::std::string* summary) { } summary_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), summary, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.summary) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.summary) } inline ::std::string* OpDef::unsafe_arena_release_summary() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.summary) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.summary) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return summary_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -2153,7 +2153,7 @@ inline void OpDef::unsafe_arena_set_allocated_summary( } summary_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), summary, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.summary) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.summary) } // string description = 6; @@ -2161,20 +2161,20 @@ inline void OpDef::clear_description() { description_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDef::description() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.description) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.description) return description_.Get(); } inline void OpDef::set_description(const ::std::string& value) { description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDef.description) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.description) } #if LANG_CXX11 inline void OpDef::set_description(::std::string&& value) { description_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDef.description) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDef.description) } #endif inline void OpDef::set_description(const char* value) { @@ -2182,22 +2182,22 @@ inline void OpDef::set_description(const char* value) { description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDef.description) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDef.description) } inline void OpDef::set_description(const char* value, size_t size) { description_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDef.description) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDef.description) } inline ::std::string* OpDef::mutable_description() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDef.description) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDef.description) return description_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDef::release_description() { - // @@protoc_insertion_point(field_release:tensorflow.OpDef.description) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDef.description) return description_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -2209,10 +2209,10 @@ inline void OpDef::set_allocated_description(::std::string* description) { } description_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDef.description) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDef.description) } inline ::std::string* OpDef::unsafe_arena_release_description() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDef.description) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDef.description) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return description_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -2228,7 +2228,7 @@ inline void OpDef::unsafe_arena_set_allocated_description( } description_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), description, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDef.description) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDef.description) } // bool is_commutative = 18; @@ -2236,13 +2236,13 @@ inline void OpDef::clear_is_commutative() { is_commutative_ = false; } inline bool OpDef::is_commutative() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.is_commutative) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.is_commutative) return is_commutative_; } inline void OpDef::set_is_commutative(bool value) { is_commutative_ = value; - // @@protoc_insertion_point(field_set:tensorflow.OpDef.is_commutative) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.is_commutative) } // bool is_aggregate = 16; @@ -2250,13 +2250,13 @@ inline void OpDef::clear_is_aggregate() { is_aggregate_ = false; } inline bool OpDef::is_aggregate() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.is_aggregate) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.is_aggregate) return is_aggregate_; } inline void OpDef::set_is_aggregate(bool value) { is_aggregate_ = value; - // @@protoc_insertion_point(field_set:tensorflow.OpDef.is_aggregate) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.is_aggregate) } // bool is_stateful = 17; @@ -2264,13 +2264,13 @@ inline void OpDef::clear_is_stateful() { is_stateful_ = false; } inline bool OpDef::is_stateful() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.is_stateful) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.is_stateful) return is_stateful_; } inline void OpDef::set_is_stateful(bool value) { is_stateful_ = value; - // @@protoc_insertion_point(field_set:tensorflow.OpDef.is_stateful) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.is_stateful) } // bool allows_uninitialized_input = 19; @@ -2278,13 +2278,13 @@ inline void OpDef::clear_allows_uninitialized_input() { allows_uninitialized_input_ = false; } inline bool OpDef::allows_uninitialized_input() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDef.allows_uninitialized_input) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDef.allows_uninitialized_input) return allows_uninitialized_input_; } inline void OpDef::set_allows_uninitialized_input(bool value) { allows_uninitialized_input_ = value; - // @@protoc_insertion_point(field_set:tensorflow.OpDef.allows_uninitialized_input) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDef.allows_uninitialized_input) } // ------------------------------------------------------------------- @@ -2296,13 +2296,13 @@ inline void OpDeprecation::clear_version() { version_ = 0; } inline ::google::protobuf::int32 OpDeprecation::version() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDeprecation.version) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDeprecation.version) return version_; } inline void OpDeprecation::set_version(::google::protobuf::int32 value) { version_ = value; - // @@protoc_insertion_point(field_set:tensorflow.OpDeprecation.version) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDeprecation.version) } // string explanation = 2; @@ -2310,20 +2310,20 @@ inline void OpDeprecation::clear_explanation() { explanation_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& OpDeprecation::explanation() const { - // @@protoc_insertion_point(field_get:tensorflow.OpDeprecation.explanation) + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpDeprecation.explanation) return explanation_.Get(); } inline void OpDeprecation::set_explanation(const ::std::string& value) { explanation_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.OpDeprecation.explanation) + // @@protoc_insertion_point(field_set:opencv_tensorflow.OpDeprecation.explanation) } #if LANG_CXX11 inline void OpDeprecation::set_explanation(::std::string&& value) { explanation_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.OpDeprecation.explanation) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.OpDeprecation.explanation) } #endif inline void OpDeprecation::set_explanation(const char* value) { @@ -2331,22 +2331,22 @@ inline void OpDeprecation::set_explanation(const char* value) { explanation_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.OpDeprecation.explanation) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.OpDeprecation.explanation) } inline void OpDeprecation::set_explanation(const char* value, size_t size) { explanation_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.OpDeprecation.explanation) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.OpDeprecation.explanation) } inline ::std::string* OpDeprecation::mutable_explanation() { - // @@protoc_insertion_point(field_mutable:tensorflow.OpDeprecation.explanation) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpDeprecation.explanation) return explanation_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* OpDeprecation::release_explanation() { - // @@protoc_insertion_point(field_release:tensorflow.OpDeprecation.explanation) + // @@protoc_insertion_point(field_release:opencv_tensorflow.OpDeprecation.explanation) return explanation_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -2358,10 +2358,10 @@ inline void OpDeprecation::set_allocated_explanation(::std::string* explanation) } explanation_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), explanation, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.OpDeprecation.explanation) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.OpDeprecation.explanation) } inline ::std::string* OpDeprecation::unsafe_arena_release_explanation() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.OpDeprecation.explanation) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.OpDeprecation.explanation) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return explanation_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -2377,40 +2377,40 @@ inline void OpDeprecation::unsafe_arena_set_allocated_explanation( } explanation_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), explanation, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.OpDeprecation.explanation) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.OpDeprecation.explanation) } // ------------------------------------------------------------------- // OpList -// repeated .tensorflow.OpDef op = 1; +// repeated .opencv_tensorflow.OpDef op = 1; inline int OpList::op_size() const { return op_.size(); } inline void OpList::clear_op() { op_.Clear(); } -inline const ::tensorflow::OpDef& OpList::op(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.OpList.op) +inline const ::opencv_tensorflow::OpDef& OpList::op(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.OpList.op) return op_.Get(index); } -inline ::tensorflow::OpDef* OpList::mutable_op(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.OpList.op) +inline ::opencv_tensorflow::OpDef* OpList::mutable_op(int index) { + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.OpList.op) return op_.Mutable(index); } -inline ::tensorflow::OpDef* OpList::add_op() { - // @@protoc_insertion_point(field_add:tensorflow.OpList.op) +inline ::opencv_tensorflow::OpDef* OpList::add_op() { + // @@protoc_insertion_point(field_add:opencv_tensorflow.OpList.op) return op_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef >* +inline ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef >* OpList::mutable_op() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.OpList.op) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.OpList.op) return &op_; } -inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::OpDef >& +inline const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::OpDef >& OpList::op() const { - // @@protoc_insertion_point(field_list:tensorflow.OpList.op) + // @@protoc_insertion_point(field_list:opencv_tensorflow.OpList.op) return op_; } @@ -2428,7 +2428,7 @@ OpList::op() const { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/tensor.pb.cc b/modules/dnn/misc/tensorflow/tensor.pb.cc index a5118ad526..25f3a80832 100644 --- a/modules/dnn/misc/tensorflow/tensor.pb.cc +++ b/modules/dnn/misc/tensorflow/tensor.pb.cc @@ -19,13 +19,13 @@ #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) -namespace tensorflow { +namespace opencv_tensorflow { class TensorProtoDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _TensorProto_default_instance_; -} // namespace tensorflow +} // namespace opencv_tensorflow namespace protobuf_tensor_2eproto { void InitDefaultsTensorProtoImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -37,11 +37,11 @@ void InitDefaultsTensorProtoImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto(); { - void* ptr = &::tensorflow::_TensorProto_default_instance_; - new (ptr) ::tensorflow::TensorProto(); + void* ptr = &::opencv_tensorflow::_TensorProto_default_instance_; + new (ptr) ::opencv_tensorflow::TensorProto(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::TensorProto::InitAsDefaultInstance(); + ::opencv_tensorflow::TensorProto::InitAsDefaultInstance(); } void InitDefaultsTensorProto() { @@ -53,30 +53,30 @@ void InitDefaultsTensorProto() { const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, dtype_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, tensor_shape_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, version_number_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, tensor_content_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, half_val_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, float_val_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, double_val_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, int_val_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, string_val_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, scomplex_val_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, int64_val_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, bool_val_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorProto, dcomplex_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, dtype_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, tensor_shape_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, version_number_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, tensor_content_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, half_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, float_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, double_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, int_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, string_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, scomplex_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, int64_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, bool_val_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorProto, dcomplex_val_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::tensorflow::TensorProto)}, + { 0, -1, sizeof(::opencv_tensorflow::TensorProto)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::tensorflow::_TensorProto_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_TensorProto_default_instance_), }; void protobuf_AssignDescriptors() { @@ -101,21 +101,22 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\014tensor.proto\022\ntensorflow\032\022tensor_shape" - ".proto\032\013types.proto\"\345\002\n\013TensorProto\022#\n\005d" - "type\030\001 \001(\0162\024.tensorflow.DataType\0222\n\014tens" - "or_shape\030\002 \001(\0132\034.tensorflow.TensorShapeP" - "roto\022\026\n\016version_number\030\003 \001(\005\022\026\n\016tensor_c" - "ontent\030\004 \001(\014\022\024\n\010half_val\030\r \003(\005B\002\020\001\022\025\n\tfl" - "oat_val\030\005 \003(\002B\002\020\001\022\026\n\ndouble_val\030\006 \003(\001B\002\020" - "\001\022\023\n\007int_val\030\007 \003(\005B\002\020\001\022\022\n\nstring_val\030\010 \003" - "(\014\022\030\n\014scomplex_val\030\t \003(\002B\002\020\001\022\025\n\tint64_va" - "l\030\n \003(\003B\002\020\001\022\024\n\010bool_val\030\013 \003(\010B\002\020\001\022\030\n\014dco" - "mplex_val\030\014 \003(\001B\002\020\001B-\n\030org.tensorflow.fr" - "ameworkB\014TensorProtosP\001\370\001\001b\006proto3" + "\n\014tensor.proto\022\021opencv_tensorflow\032\022tenso" + "r_shape.proto\032\013types.proto\"\363\002\n\013TensorPro" + "to\022*\n\005dtype\030\001 \001(\0162\033.opencv_tensorflow.Da" + "taType\0229\n\014tensor_shape\030\002 \001(\0132#.opencv_te" + "nsorflow.TensorShapeProto\022\026\n\016version_num" + "ber\030\003 \001(\005\022\026\n\016tensor_content\030\004 \001(\014\022\024\n\010hal" + "f_val\030\r \003(\005B\002\020\001\022\025\n\tfloat_val\030\005 \003(\002B\002\020\001\022\026" + "\n\ndouble_val\030\006 \003(\001B\002\020\001\022\023\n\007int_val\030\007 \003(\005B" + "\002\020\001\022\022\n\nstring_val\030\010 \003(\014\022\030\n\014scomplex_val\030" + "\t \003(\002B\002\020\001\022\025\n\tint64_val\030\n \003(\003B\002\020\001\022\024\n\010bool" + "_val\030\013 \003(\010B\002\020\001\022\030\n\014dcomplex_val\030\014 \003(\001B\002\020\001" + "B-\n\030org.tensorflow.frameworkB\014TensorProt" + "osP\001\370\001\001b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 474); + descriptor, 495); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "tensor.proto", &protobuf_RegisterTypes); ::protobuf_tensor_5fshape_2eproto::AddDescriptors(); @@ -133,20 +134,20 @@ struct StaticDescriptorInitializer { } } static_descriptor_initializer; } // namespace protobuf_tensor_2eproto -namespace tensorflow { +namespace opencv_tensorflow { // =================================================================== void TensorProto::InitAsDefaultInstance() { - ::tensorflow::_TensorProto_default_instance_._instance.get_mutable()->tensor_shape_ = const_cast< ::tensorflow::TensorShapeProto*>( - ::tensorflow::TensorShapeProto::internal_default_instance()); + ::opencv_tensorflow::_TensorProto_default_instance_._instance.get_mutable()->tensor_shape_ = const_cast< ::opencv_tensorflow::TensorShapeProto*>( + ::opencv_tensorflow::TensorShapeProto::internal_default_instance()); } void TensorProto::_slow_mutable_tensor_shape() { - tensor_shape_ = ::google::protobuf::Arena::CreateMessage< ::tensorflow::TensorShapeProto >( + tensor_shape_ = ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::TensorShapeProto >( GetArenaNoVirtual()); } void TensorProto::unsafe_arena_set_allocated_tensor_shape( - ::tensorflow::TensorShapeProto* tensor_shape) { + ::opencv_tensorflow::TensorShapeProto* tensor_shape) { if (GetArenaNoVirtual() == NULL) { delete tensor_shape_; } @@ -156,7 +157,7 @@ void TensorProto::unsafe_arena_set_allocated_tensor_shape( } else { } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorProto.tensor_shape) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.TensorProto.tensor_shape) } void TensorProto::clear_tensor_shape() { if (GetArenaNoVirtual() == NULL && tensor_shape_ != NULL) { @@ -186,7 +187,7 @@ TensorProto::TensorProto() ::protobuf_tensor_2eproto::InitDefaultsTensorProto(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.TensorProto) + // @@protoc_insertion_point(constructor:opencv_tensorflow.TensorProto) } TensorProto::TensorProto(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -203,7 +204,7 @@ TensorProto::TensorProto(::google::protobuf::Arena* arena) ::protobuf_tensor_2eproto::InitDefaultsTensorProto(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.TensorProto) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorProto) } TensorProto::TensorProto(const TensorProto& from) : ::google::protobuf::Message(), @@ -225,14 +226,14 @@ TensorProto::TensorProto(const TensorProto& from) GetArenaNoVirtual()); } if (from.has_tensor_shape()) { - tensor_shape_ = new ::tensorflow::TensorShapeProto(*from.tensor_shape_); + tensor_shape_ = new ::opencv_tensorflow::TensorShapeProto(*from.tensor_shape_); } else { tensor_shape_ = NULL; } ::memcpy(&dtype_, &from.dtype_, static_cast(reinterpret_cast(&version_number_) - reinterpret_cast(&dtype_)) + sizeof(version_number_)); - // @@protoc_insertion_point(copy_constructor:tensorflow.TensorProto) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorProto) } void TensorProto::SharedCtor() { @@ -244,7 +245,7 @@ void TensorProto::SharedCtor() { } TensorProto::~TensorProto() { - // @@protoc_insertion_point(destructor:tensorflow.TensorProto) + // @@protoc_insertion_point(destructor:opencv_tensorflow.TensorProto) SharedDtor(); } @@ -280,7 +281,7 @@ TensorProto* TensorProto::New(::google::protobuf::Arena* arena) const { } void TensorProto::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.TensorProto) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorProto) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -309,13 +310,13 @@ bool TensorProto::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.TensorProto) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.TensorProto) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .tensorflow.DataType dtype = 1; + // .opencv_tensorflow.DataType dtype = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { @@ -323,14 +324,14 @@ bool TensorProto::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_dtype(static_cast< ::tensorflow::DataType >(value)); + set_dtype(static_cast< ::opencv_tensorflow::DataType >(value)); } else { goto handle_unusual; } break; } - // .tensorflow.TensorShapeProto tensor_shape = 2; + // .opencv_tensorflow.TensorShapeProto tensor_shape = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -544,27 +545,27 @@ bool TensorProto::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.TensorProto) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.TensorProto) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.TensorProto) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.TensorProto) return false; #undef DO_ } void TensorProto::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.TensorProto) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.TensorProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .tensorflow.DataType dtype = 1; + // .opencv_tensorflow.DataType dtype = 1; if (this->dtype() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 1, this->dtype(), output); } - // .tensorflow.TensorShapeProto tensor_shape = 2; + // .opencv_tensorflow.TensorShapeProto tensor_shape = 2; if (this->has_tensor_shape()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *this->tensor_shape_, output); @@ -669,23 +670,23 @@ void TensorProto::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.TensorProto) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.TensorProto) } ::google::protobuf::uint8* TensorProto::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorProto) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .tensorflow.DataType dtype = 1; + // .opencv_tensorflow.DataType dtype = 1; if (this->dtype() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 1, this->dtype(), target); } - // .tensorflow.TensorShapeProto tensor_shape = 2; + // .opencv_tensorflow.TensorShapeProto tensor_shape = 2; if (this->has_tensor_shape()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -818,12 +819,12 @@ void TensorProto::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorProto) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorProto) return target; } size_t TensorProto::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorProto) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorProto) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -974,14 +975,14 @@ size_t TensorProto::ByteSizeLong() const { this->tensor_content()); } - // .tensorflow.TensorShapeProto tensor_shape = 2; + // .opencv_tensorflow.TensorShapeProto tensor_shape = 2; if (this->has_tensor_shape()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->tensor_shape_); } - // .tensorflow.DataType dtype = 1; + // .opencv_tensorflow.DataType dtype = 1; if (this->dtype() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->dtype()); @@ -1002,22 +1003,22 @@ size_t TensorProto::ByteSizeLong() const { } void TensorProto::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorProto) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.TensorProto) GOOGLE_DCHECK_NE(&from, this); const TensorProto* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorProto) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.TensorProto) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorProto) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.TensorProto) MergeFrom(*source); } } void TensorProto::MergeFrom(const TensorProto& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorProto) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorProto) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1036,7 +1037,7 @@ void TensorProto::MergeFrom(const TensorProto& from) { set_tensor_content(from.tensor_content()); } if (from.has_tensor_shape()) { - mutable_tensor_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.tensor_shape()); + mutable_tensor_shape()->::opencv_tensorflow::TensorShapeProto::MergeFrom(from.tensor_shape()); } if (from.dtype() != 0) { set_dtype(from.dtype()); @@ -1047,14 +1048,14 @@ void TensorProto::MergeFrom(const TensorProto& from) { } void TensorProto::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorProto) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.TensorProto) if (&from == this) return; Clear(); MergeFrom(from); } void TensorProto::CopyFrom(const TensorProto& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorProto) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorProto) if (&from == this) return; Clear(); MergeFrom(from); @@ -1109,6 +1110,6 @@ void TensorProto::InternalSwap(TensorProto* other) { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/tensor.pb.h b/modules/dnn/misc/tensorflow/tensor.pb.h index 5d3e64ed09..1a0c12c08e 100644 --- a/modules/dnn/misc/tensorflow/tensor.pb.h +++ b/modules/dnn/misc/tensorflow/tensor.pb.h @@ -50,16 +50,16 @@ inline void InitDefaults() { InitDefaultsTensorProto(); } } // namespace protobuf_tensor_2eproto -namespace tensorflow { +namespace opencv_tensorflow { class TensorProto; class TensorProtoDefaultTypeInternal; extern TensorProtoDefaultTypeInternal _TensorProto_default_instance_; -} // namespace tensorflow -namespace tensorflow { +} // namespace opencv_tensorflow +namespace opencv_tensorflow { // =================================================================== -class TensorProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorProto) */ { +class TensorProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.TensorProto) */ { public: TensorProto(); virtual ~TensorProto(); @@ -294,26 +294,26 @@ class TensorProto : public ::google::protobuf::Message /* @@protoc_insertion_poi void unsafe_arena_set_allocated_tensor_content( ::std::string* tensor_content); - // .tensorflow.TensorShapeProto tensor_shape = 2; + // .opencv_tensorflow.TensorShapeProto tensor_shape = 2; bool has_tensor_shape() const; void clear_tensor_shape(); static const int kTensorShapeFieldNumber = 2; private: void _slow_mutable_tensor_shape(); public: - const ::tensorflow::TensorShapeProto& tensor_shape() const; - ::tensorflow::TensorShapeProto* release_tensor_shape(); - ::tensorflow::TensorShapeProto* mutable_tensor_shape(); - void set_allocated_tensor_shape(::tensorflow::TensorShapeProto* tensor_shape); + const ::opencv_tensorflow::TensorShapeProto& tensor_shape() const; + ::opencv_tensorflow::TensorShapeProto* release_tensor_shape(); + ::opencv_tensorflow::TensorShapeProto* mutable_tensor_shape(); + void set_allocated_tensor_shape(::opencv_tensorflow::TensorShapeProto* tensor_shape); void unsafe_arena_set_allocated_tensor_shape( - ::tensorflow::TensorShapeProto* tensor_shape); - ::tensorflow::TensorShapeProto* unsafe_arena_release_tensor_shape(); + ::opencv_tensorflow::TensorShapeProto* tensor_shape); + ::opencv_tensorflow::TensorShapeProto* unsafe_arena_release_tensor_shape(); - // .tensorflow.DataType dtype = 1; + // .opencv_tensorflow.DataType dtype = 1; void clear_dtype(); static const int kDtypeFieldNumber = 1; - ::tensorflow::DataType dtype() const; - void set_dtype(::tensorflow::DataType value); + ::opencv_tensorflow::DataType dtype() const; + void set_dtype(::opencv_tensorflow::DataType value); // int32 version_number = 3; void clear_version_number(); @@ -321,7 +321,7 @@ class TensorProto : public ::google::protobuf::Message /* @@protoc_insertion_poi ::google::protobuf::int32 version_number() const; void set_version_number(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:tensorflow.TensorProto) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.TensorProto) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -346,7 +346,7 @@ class TensorProto : public ::google::protobuf::Message /* @@protoc_insertion_poi ::google::protobuf::RepeatedField< ::google::protobuf::int32 > half_val_; mutable int _half_val_cached_byte_size_; ::google::protobuf::internal::ArenaStringPtr tensor_content_; - ::tensorflow::TensorShapeProto* tensor_shape_; + ::opencv_tensorflow::TensorShapeProto* tensor_shape_; int dtype_; ::google::protobuf::int32 version_number_; mutable int _cached_size_; @@ -364,56 +364,56 @@ class TensorProto : public ::google::protobuf::Message /* @@protoc_insertion_poi #endif // __GNUC__ // TensorProto -// .tensorflow.DataType dtype = 1; +// .opencv_tensorflow.DataType dtype = 1; inline void TensorProto::clear_dtype() { dtype_ = 0; } -inline ::tensorflow::DataType TensorProto::dtype() const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.dtype) - return static_cast< ::tensorflow::DataType >(dtype_); +inline ::opencv_tensorflow::DataType TensorProto::dtype() const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.dtype) + return static_cast< ::opencv_tensorflow::DataType >(dtype_); } -inline void TensorProto::set_dtype(::tensorflow::DataType value) { +inline void TensorProto::set_dtype(::opencv_tensorflow::DataType value) { dtype_ = value; - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.dtype) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.dtype) } -// .tensorflow.TensorShapeProto tensor_shape = 2; +// .opencv_tensorflow.TensorShapeProto tensor_shape = 2; inline bool TensorProto::has_tensor_shape() const { return this != internal_default_instance() && tensor_shape_ != NULL; } -inline const ::tensorflow::TensorShapeProto& TensorProto::tensor_shape() const { - const ::tensorflow::TensorShapeProto* p = tensor_shape_; - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.tensor_shape) - return p != NULL ? *p : *reinterpret_cast( - &::tensorflow::_TensorShapeProto_default_instance_); +inline const ::opencv_tensorflow::TensorShapeProto& TensorProto::tensor_shape() const { + const ::opencv_tensorflow::TensorShapeProto* p = tensor_shape_; + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.tensor_shape) + return p != NULL ? *p : *reinterpret_cast( + &::opencv_tensorflow::_TensorShapeProto_default_instance_); } -inline ::tensorflow::TensorShapeProto* TensorProto::release_tensor_shape() { - // @@protoc_insertion_point(field_release:tensorflow.TensorProto.tensor_shape) +inline ::opencv_tensorflow::TensorShapeProto* TensorProto::release_tensor_shape() { + // @@protoc_insertion_point(field_release:opencv_tensorflow.TensorProto.tensor_shape) - ::tensorflow::TensorShapeProto* temp = tensor_shape_; + ::opencv_tensorflow::TensorShapeProto* temp = tensor_shape_; if (GetArenaNoVirtual() != NULL) { temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL); } tensor_shape_ = NULL; return temp; } -inline ::tensorflow::TensorShapeProto* TensorProto::unsafe_arena_release_tensor_shape() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorProto.tensor_shape) +inline ::opencv_tensorflow::TensorShapeProto* TensorProto::unsafe_arena_release_tensor_shape() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.TensorProto.tensor_shape) - ::tensorflow::TensorShapeProto* temp = tensor_shape_; + ::opencv_tensorflow::TensorShapeProto* temp = tensor_shape_; tensor_shape_ = NULL; return temp; } -inline ::tensorflow::TensorShapeProto* TensorProto::mutable_tensor_shape() { +inline ::opencv_tensorflow::TensorShapeProto* TensorProto::mutable_tensor_shape() { if (tensor_shape_ == NULL) { _slow_mutable_tensor_shape(); } - // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.tensor_shape) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.TensorProto.tensor_shape) return tensor_shape_; } -inline void TensorProto::set_allocated_tensor_shape(::tensorflow::TensorShapeProto* tensor_shape) { +inline void TensorProto::set_allocated_tensor_shape(::opencv_tensorflow::TensorShapeProto* tensor_shape) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(tensor_shape_); @@ -430,7 +430,7 @@ inline void TensorProto::set_allocated_tensor_shape(::tensorflow::TensorShapePro } tensor_shape_ = tensor_shape; - // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorProto.tensor_shape) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.TensorProto.tensor_shape) } // int32 version_number = 3; @@ -438,13 +438,13 @@ inline void TensorProto::clear_version_number() { version_number_ = 0; } inline ::google::protobuf::int32 TensorProto::version_number() const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.version_number) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.version_number) return version_number_; } inline void TensorProto::set_version_number(::google::protobuf::int32 value) { version_number_ = value; - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.version_number) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.version_number) } // bytes tensor_content = 4; @@ -452,20 +452,20 @@ inline void TensorProto::clear_tensor_content() { tensor_content_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& TensorProto::tensor_content() const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.tensor_content) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.tensor_content) return tensor_content_.Get(); } inline void TensorProto::set_tensor_content(const ::std::string& value) { tensor_content_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.tensor_content) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.tensor_content) } #if LANG_CXX11 inline void TensorProto::set_tensor_content(::std::string&& value) { tensor_content_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.TensorProto.tensor_content) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.TensorProto.tensor_content) } #endif inline void TensorProto::set_tensor_content(const char* value) { @@ -473,22 +473,22 @@ inline void TensorProto::set_tensor_content(const char* value) { tensor_content_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.TensorProto.tensor_content) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.TensorProto.tensor_content) } inline void TensorProto::set_tensor_content(const void* value, size_t size) { tensor_content_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorProto.tensor_content) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.TensorProto.tensor_content) } inline ::std::string* TensorProto::mutable_tensor_content() { - // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.tensor_content) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.TensorProto.tensor_content) return tensor_content_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* TensorProto::release_tensor_content() { - // @@protoc_insertion_point(field_release:tensorflow.TensorProto.tensor_content) + // @@protoc_insertion_point(field_release:opencv_tensorflow.TensorProto.tensor_content) return tensor_content_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -500,10 +500,10 @@ inline void TensorProto::set_allocated_tensor_content(::std::string* tensor_cont } tensor_content_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), tensor_content, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorProto.tensor_content) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.TensorProto.tensor_content) } inline ::std::string* TensorProto::unsafe_arena_release_tensor_content() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorProto.tensor_content) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.TensorProto.tensor_content) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return tensor_content_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -519,7 +519,7 @@ inline void TensorProto::unsafe_arena_set_allocated_tensor_content( } tensor_content_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), tensor_content, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorProto.tensor_content) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.TensorProto.tensor_content) } // repeated int32 half_val = 13 [packed = true]; @@ -530,25 +530,25 @@ inline void TensorProto::clear_half_val() { half_val_.Clear(); } inline ::google::protobuf::int32 TensorProto::half_val(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.half_val) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.half_val) return half_val_.Get(index); } inline void TensorProto::set_half_val(int index, ::google::protobuf::int32 value) { half_val_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.half_val) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.half_val) } inline void TensorProto::add_half_val(::google::protobuf::int32 value) { half_val_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.TensorProto.half_val) + // @@protoc_insertion_point(field_add:opencv_tensorflow.TensorProto.half_val) } inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& TensorProto::half_val() const { - // @@protoc_insertion_point(field_list:tensorflow.TensorProto.half_val) + // @@protoc_insertion_point(field_list:opencv_tensorflow.TensorProto.half_val) return half_val_; } inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* TensorProto::mutable_half_val() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.half_val) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.TensorProto.half_val) return &half_val_; } @@ -560,25 +560,25 @@ inline void TensorProto::clear_float_val() { float_val_.Clear(); } inline float TensorProto::float_val(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.float_val) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.float_val) return float_val_.Get(index); } inline void TensorProto::set_float_val(int index, float value) { float_val_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.float_val) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.float_val) } inline void TensorProto::add_float_val(float value) { float_val_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.TensorProto.float_val) + // @@protoc_insertion_point(field_add:opencv_tensorflow.TensorProto.float_val) } inline const ::google::protobuf::RepeatedField< float >& TensorProto::float_val() const { - // @@protoc_insertion_point(field_list:tensorflow.TensorProto.float_val) + // @@protoc_insertion_point(field_list:opencv_tensorflow.TensorProto.float_val) return float_val_; } inline ::google::protobuf::RepeatedField< float >* TensorProto::mutable_float_val() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.float_val) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.TensorProto.float_val) return &float_val_; } @@ -590,25 +590,25 @@ inline void TensorProto::clear_double_val() { double_val_.Clear(); } inline double TensorProto::double_val(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.double_val) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.double_val) return double_val_.Get(index); } inline void TensorProto::set_double_val(int index, double value) { double_val_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.double_val) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.double_val) } inline void TensorProto::add_double_val(double value) { double_val_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.TensorProto.double_val) + // @@protoc_insertion_point(field_add:opencv_tensorflow.TensorProto.double_val) } inline const ::google::protobuf::RepeatedField< double >& TensorProto::double_val() const { - // @@protoc_insertion_point(field_list:tensorflow.TensorProto.double_val) + // @@protoc_insertion_point(field_list:opencv_tensorflow.TensorProto.double_val) return double_val_; } inline ::google::protobuf::RepeatedField< double >* TensorProto::mutable_double_val() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.double_val) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.TensorProto.double_val) return &double_val_; } @@ -620,25 +620,25 @@ inline void TensorProto::clear_int_val() { int_val_.Clear(); } inline ::google::protobuf::int32 TensorProto::int_val(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.int_val) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.int_val) return int_val_.Get(index); } inline void TensorProto::set_int_val(int index, ::google::protobuf::int32 value) { int_val_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.int_val) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.int_val) } inline void TensorProto::add_int_val(::google::protobuf::int32 value) { int_val_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.TensorProto.int_val) + // @@protoc_insertion_point(field_add:opencv_tensorflow.TensorProto.int_val) } inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& TensorProto::int_val() const { - // @@protoc_insertion_point(field_list:tensorflow.TensorProto.int_val) + // @@protoc_insertion_point(field_list:opencv_tensorflow.TensorProto.int_val) return int_val_; } inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* TensorProto::mutable_int_val() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.int_val) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.TensorProto.int_val) return &int_val_; } @@ -650,64 +650,64 @@ inline void TensorProto::clear_string_val() { string_val_.Clear(); } inline const ::std::string& TensorProto::string_val(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.string_val) return string_val_.Get(index); } inline ::std::string* TensorProto::mutable_string_val(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.TensorProto.string_val) return string_val_.Mutable(index); } inline void TensorProto::set_string_val(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.string_val) string_val_.Mutable(index)->assign(value); } #if LANG_CXX11 inline void TensorProto::set_string_val(int index, ::std::string&& value) { - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.string_val) string_val_.Mutable(index)->assign(std::move(value)); } #endif inline void TensorProto::set_string_val(int index, const char* value) { GOOGLE_DCHECK(value != NULL); string_val_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.TensorProto.string_val) } inline void TensorProto::set_string_val(int index, const void* value, size_t size) { string_val_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.TensorProto.string_val) } inline ::std::string* TensorProto::add_string_val() { - // @@protoc_insertion_point(field_add_mutable:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_add_mutable:opencv_tensorflow.TensorProto.string_val) return string_val_.Add(); } inline void TensorProto::add_string_val(const ::std::string& value) { string_val_.Add()->assign(value); - // @@protoc_insertion_point(field_add:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_add:opencv_tensorflow.TensorProto.string_val) } #if LANG_CXX11 inline void TensorProto::add_string_val(::std::string&& value) { string_val_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_add:opencv_tensorflow.TensorProto.string_val) } #endif inline void TensorProto::add_string_val(const char* value) { GOOGLE_DCHECK(value != NULL); string_val_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_add_char:opencv_tensorflow.TensorProto.string_val) } inline void TensorProto::add_string_val(const void* value, size_t size) { string_val_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_add_pointer:opencv_tensorflow.TensorProto.string_val) } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& TensorProto::string_val() const { - // @@protoc_insertion_point(field_list:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_list:opencv_tensorflow.TensorProto.string_val) return string_val_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* TensorProto::mutable_string_val() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.string_val) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.TensorProto.string_val) return &string_val_; } @@ -719,25 +719,25 @@ inline void TensorProto::clear_scomplex_val() { scomplex_val_.Clear(); } inline float TensorProto::scomplex_val(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.scomplex_val) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.scomplex_val) return scomplex_val_.Get(index); } inline void TensorProto::set_scomplex_val(int index, float value) { scomplex_val_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.scomplex_val) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.scomplex_val) } inline void TensorProto::add_scomplex_val(float value) { scomplex_val_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.TensorProto.scomplex_val) + // @@protoc_insertion_point(field_add:opencv_tensorflow.TensorProto.scomplex_val) } inline const ::google::protobuf::RepeatedField< float >& TensorProto::scomplex_val() const { - // @@protoc_insertion_point(field_list:tensorflow.TensorProto.scomplex_val) + // @@protoc_insertion_point(field_list:opencv_tensorflow.TensorProto.scomplex_val) return scomplex_val_; } inline ::google::protobuf::RepeatedField< float >* TensorProto::mutable_scomplex_val() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.scomplex_val) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.TensorProto.scomplex_val) return &scomplex_val_; } @@ -749,25 +749,25 @@ inline void TensorProto::clear_int64_val() { int64_val_.Clear(); } inline ::google::protobuf::int64 TensorProto::int64_val(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.int64_val) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.int64_val) return int64_val_.Get(index); } inline void TensorProto::set_int64_val(int index, ::google::protobuf::int64 value) { int64_val_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.int64_val) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.int64_val) } inline void TensorProto::add_int64_val(::google::protobuf::int64 value) { int64_val_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.TensorProto.int64_val) + // @@protoc_insertion_point(field_add:opencv_tensorflow.TensorProto.int64_val) } inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& TensorProto::int64_val() const { - // @@protoc_insertion_point(field_list:tensorflow.TensorProto.int64_val) + // @@protoc_insertion_point(field_list:opencv_tensorflow.TensorProto.int64_val) return int64_val_; } inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* TensorProto::mutable_int64_val() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.int64_val) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.TensorProto.int64_val) return &int64_val_; } @@ -779,25 +779,25 @@ inline void TensorProto::clear_bool_val() { bool_val_.Clear(); } inline bool TensorProto::bool_val(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.bool_val) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.bool_val) return bool_val_.Get(index); } inline void TensorProto::set_bool_val(int index, bool value) { bool_val_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.bool_val) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.bool_val) } inline void TensorProto::add_bool_val(bool value) { bool_val_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.TensorProto.bool_val) + // @@protoc_insertion_point(field_add:opencv_tensorflow.TensorProto.bool_val) } inline const ::google::protobuf::RepeatedField< bool >& TensorProto::bool_val() const { - // @@protoc_insertion_point(field_list:tensorflow.TensorProto.bool_val) + // @@protoc_insertion_point(field_list:opencv_tensorflow.TensorProto.bool_val) return bool_val_; } inline ::google::protobuf::RepeatedField< bool >* TensorProto::mutable_bool_val() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.bool_val) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.TensorProto.bool_val) return &bool_val_; } @@ -809,25 +809,25 @@ inline void TensorProto::clear_dcomplex_val() { dcomplex_val_.Clear(); } inline double TensorProto::dcomplex_val(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.TensorProto.dcomplex_val) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorProto.dcomplex_val) return dcomplex_val_.Get(index); } inline void TensorProto::set_dcomplex_val(int index, double value) { dcomplex_val_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.TensorProto.dcomplex_val) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorProto.dcomplex_val) } inline void TensorProto::add_dcomplex_val(double value) { dcomplex_val_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.TensorProto.dcomplex_val) + // @@protoc_insertion_point(field_add:opencv_tensorflow.TensorProto.dcomplex_val) } inline const ::google::protobuf::RepeatedField< double >& TensorProto::dcomplex_val() const { - // @@protoc_insertion_point(field_list:tensorflow.TensorProto.dcomplex_val) + // @@protoc_insertion_point(field_list:opencv_tensorflow.TensorProto.dcomplex_val) return dcomplex_val_; } inline ::google::protobuf::RepeatedField< double >* TensorProto::mutable_dcomplex_val() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.dcomplex_val) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.TensorProto.dcomplex_val) return &dcomplex_val_; } @@ -837,7 +837,7 @@ TensorProto::mutable_dcomplex_val() { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/tensor_shape.pb.cc b/modules/dnn/misc/tensorflow/tensor_shape.pb.cc index b0459f7a95..c55c202c76 100644 --- a/modules/dnn/misc/tensorflow/tensor_shape.pb.cc +++ b/modules/dnn/misc/tensorflow/tensor_shape.pb.cc @@ -19,7 +19,7 @@ #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) -namespace tensorflow { +namespace opencv_tensorflow { class TensorShapeProto_DimDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed @@ -30,7 +30,7 @@ class TensorShapeProtoDefaultTypeInternal { ::google::protobuf::internal::ExplicitlyConstructed _instance; } _TensorShapeProto_default_instance_; -} // namespace tensorflow +} // namespace opencv_tensorflow namespace protobuf_tensor_5fshape_2eproto { void InitDefaultsTensorShapeProto_DimImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -41,11 +41,11 @@ void InitDefaultsTensorShapeProto_DimImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::tensorflow::_TensorShapeProto_Dim_default_instance_; - new (ptr) ::tensorflow::TensorShapeProto_Dim(); + void* ptr = &::opencv_tensorflow::_TensorShapeProto_Dim_default_instance_; + new (ptr) ::opencv_tensorflow::TensorShapeProto_Dim(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::TensorShapeProto_Dim::InitAsDefaultInstance(); + ::opencv_tensorflow::TensorShapeProto_Dim::InitAsDefaultInstance(); } void InitDefaultsTensorShapeProto_Dim() { @@ -63,11 +63,11 @@ void InitDefaultsTensorShapeProtoImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto_Dim(); { - void* ptr = &::tensorflow::_TensorShapeProto_default_instance_; - new (ptr) ::tensorflow::TensorShapeProto(); + void* ptr = &::opencv_tensorflow::_TensorShapeProto_default_instance_; + new (ptr) ::opencv_tensorflow::TensorShapeProto(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::TensorShapeProto::InitAsDefaultInstance(); + ::opencv_tensorflow::TensorShapeProto::InitAsDefaultInstance(); } void InitDefaultsTensorShapeProto() { @@ -79,28 +79,28 @@ void InitDefaultsTensorShapeProto() { const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorShapeProto_Dim, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorShapeProto_Dim, size_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorShapeProto_Dim, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, size_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, name_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorShapeProto, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorShapeProto, dim_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::TensorShapeProto, unknown_rank_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, dim_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, unknown_rank_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::tensorflow::TensorShapeProto_Dim)}, - { 7, -1, sizeof(::tensorflow::TensorShapeProto)}, + { 0, -1, sizeof(::opencv_tensorflow::TensorShapeProto_Dim)}, + { 7, -1, sizeof(::opencv_tensorflow::TensorShapeProto)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::tensorflow::_TensorShapeProto_Dim_default_instance_), - reinterpret_cast(&::tensorflow::_TensorShapeProto_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_TensorShapeProto_Dim_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_TensorShapeProto_default_instance_), }; void protobuf_AssignDescriptors() { @@ -125,15 +125,15 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\022tensor_shape.proto\022\ntensorflow\"z\n\020Tens" - "orShapeProto\022-\n\003dim\030\002 \003(\0132 .tensorflow.T" - "ensorShapeProto.Dim\022\024\n\014unknown_rank\030\003 \001(" - "\010\032!\n\003Dim\022\014\n\004size\030\001 \001(\003\022\014\n\004name\030\002 \001(\tB2\n\030" - "org.tensorflow.frameworkB\021TensorShapePro" - "tosP\001\370\001\001b\006proto3" + "\n\022tensor_shape.proto\022\021opencv_tensorflow\"" + "\201\001\n\020TensorShapeProto\0224\n\003dim\030\002 \003(\0132\'.open" + "cv_tensorflow.TensorShapeProto.Dim\022\024\n\014un" + "known_rank\030\003 \001(\010\032!\n\003Dim\022\014\n\004size\030\001 \001(\003\022\014\n" + "\004name\030\002 \001(\tB2\n\030org.tensorflow.frameworkB" + "\021TensorShapeProtosP\001\370\001\001b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 216); + descriptor, 231); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "tensor_shape.proto", &protobuf_RegisterTypes); } @@ -149,7 +149,7 @@ struct StaticDescriptorInitializer { } } static_descriptor_initializer; } // namespace protobuf_tensor_5fshape_2eproto -namespace tensorflow { +namespace opencv_tensorflow { // =================================================================== @@ -166,7 +166,7 @@ TensorShapeProto_Dim::TensorShapeProto_Dim() ::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto_Dim(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(constructor:opencv_tensorflow.TensorShapeProto.Dim) } TensorShapeProto_Dim::TensorShapeProto_Dim(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -174,7 +174,7 @@ TensorShapeProto_Dim::TensorShapeProto_Dim(::google::protobuf::Arena* arena) ::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto_Dim(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto.Dim) } TensorShapeProto_Dim::TensorShapeProto_Dim(const TensorShapeProto_Dim& from) : ::google::protobuf::Message(), @@ -187,7 +187,7 @@ TensorShapeProto_Dim::TensorShapeProto_Dim(const TensorShapeProto_Dim& from) GetArenaNoVirtual()); } size_ = from.size_; - // @@protoc_insertion_point(copy_constructor:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorShapeProto.Dim) } void TensorShapeProto_Dim::SharedCtor() { @@ -197,7 +197,7 @@ void TensorShapeProto_Dim::SharedCtor() { } TensorShapeProto_Dim::~TensorShapeProto_Dim() { - // @@protoc_insertion_point(destructor:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(destructor:opencv_tensorflow.TensorShapeProto.Dim) SharedDtor(); } @@ -232,7 +232,7 @@ TensorShapeProto_Dim* TensorShapeProto_Dim::New(::google::protobuf::Arena* arena } void TensorShapeProto_Dim::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.TensorShapeProto.Dim) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto.Dim) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -246,7 +246,7 @@ bool TensorShapeProto_Dim::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.TensorShapeProto.Dim) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -275,7 +275,7 @@ bool TensorShapeProto_Dim::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "tensorflow.TensorShapeProto.Dim.name")); + "opencv_tensorflow.TensorShapeProto.Dim.name")); } else { goto handle_unusual; } @@ -294,17 +294,17 @@ bool TensorShapeProto_Dim::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.TensorShapeProto.Dim) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.TensorShapeProto.Dim) return false; #undef DO_ } void TensorShapeProto_Dim::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.TensorShapeProto.Dim) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -318,7 +318,7 @@ void TensorShapeProto_Dim::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.TensorShapeProto.Dim.name"); + "opencv_tensorflow.TensorShapeProto.Dim.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->name(), output); } @@ -327,13 +327,13 @@ void TensorShapeProto_Dim::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.TensorShapeProto.Dim) } ::google::protobuf::uint8* TensorShapeProto_Dim::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorShapeProto.Dim) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -347,7 +347,7 @@ void TensorShapeProto_Dim::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "tensorflow.TensorShapeProto.Dim.name"); + "opencv_tensorflow.TensorShapeProto.Dim.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->name(), target); @@ -357,12 +357,12 @@ void TensorShapeProto_Dim::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorShapeProto.Dim) return target; } size_t TensorShapeProto_Dim::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorShapeProto.Dim) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto.Dim) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -392,22 +392,22 @@ size_t TensorShapeProto_Dim::ByteSizeLong() const { } void TensorShapeProto_Dim::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorShapeProto.Dim) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.TensorShapeProto.Dim) GOOGLE_DCHECK_NE(&from, this); const TensorShapeProto_Dim* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.TensorShapeProto.Dim) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.TensorShapeProto.Dim) MergeFrom(*source); } } void TensorShapeProto_Dim::MergeFrom(const TensorShapeProto_Dim& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorShapeProto.Dim) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorShapeProto.Dim) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -422,14 +422,14 @@ void TensorShapeProto_Dim::MergeFrom(const TensorShapeProto_Dim& from) { } void TensorShapeProto_Dim::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorShapeProto.Dim) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.TensorShapeProto.Dim) if (&from == this) return; Clear(); MergeFrom(from); } void TensorShapeProto_Dim::CopyFrom(const TensorShapeProto_Dim& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorShapeProto.Dim) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorShapeProto.Dim) if (&from == this) return; Clear(); MergeFrom(from); @@ -487,7 +487,7 @@ TensorShapeProto::TensorShapeProto() ::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(constructor:opencv_tensorflow.TensorShapeProto) } TensorShapeProto::TensorShapeProto(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -496,7 +496,7 @@ TensorShapeProto::TensorShapeProto(::google::protobuf::Arena* arena) ::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto) } TensorShapeProto::TensorShapeProto(const TensorShapeProto& from) : ::google::protobuf::Message(), @@ -505,7 +505,7 @@ TensorShapeProto::TensorShapeProto(const TensorShapeProto& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); unknown_rank_ = from.unknown_rank_; - // @@protoc_insertion_point(copy_constructor:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorShapeProto) } void TensorShapeProto::SharedCtor() { @@ -514,7 +514,7 @@ void TensorShapeProto::SharedCtor() { } TensorShapeProto::~TensorShapeProto() { - // @@protoc_insertion_point(destructor:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(destructor:opencv_tensorflow.TensorShapeProto) SharedDtor(); } @@ -548,7 +548,7 @@ TensorShapeProto* TensorShapeProto::New(::google::protobuf::Arena* arena) const } void TensorShapeProto::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.TensorShapeProto) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -562,13 +562,13 @@ bool TensorShapeProto::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.TensorShapeProto) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + // repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -605,21 +605,21 @@ bool TensorShapeProto::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.TensorShapeProto) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.TensorShapeProto) return false; #undef DO_ } void TensorShapeProto::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.TensorShapeProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + // repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2; for (unsigned int i = 0, n = static_cast(this->dim_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -635,17 +635,17 @@ void TensorShapeProto::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.TensorShapeProto) } ::google::protobuf::uint8* TensorShapeProto::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorShapeProto) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + // repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2; for (unsigned int i = 0, n = static_cast(this->dim_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -662,12 +662,12 @@ void TensorShapeProto::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorShapeProto) return target; } size_t TensorShapeProto::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorShapeProto) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -675,7 +675,7 @@ size_t TensorShapeProto::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + // repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2; { unsigned int count = static_cast(this->dim_size()); total_size += 1UL * count; @@ -699,22 +699,22 @@ size_t TensorShapeProto::ByteSizeLong() const { } void TensorShapeProto::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorShapeProto) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.TensorShapeProto) GOOGLE_DCHECK_NE(&from, this); const TensorShapeProto* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.TensorShapeProto) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.TensorShapeProto) MergeFrom(*source); } } void TensorShapeProto::MergeFrom(const TensorShapeProto& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorShapeProto) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorShapeProto) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -727,14 +727,14 @@ void TensorShapeProto::MergeFrom(const TensorShapeProto& from) { } void TensorShapeProto::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorShapeProto) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.TensorShapeProto) if (&from == this) return; Clear(); MergeFrom(from); } void TensorShapeProto::CopyFrom(const TensorShapeProto& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorShapeProto) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorShapeProto) if (&from == this) return; Clear(); MergeFrom(from); @@ -778,6 +778,6 @@ void TensorShapeProto::InternalSwap(TensorShapeProto* other) { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/tensor_shape.pb.h b/modules/dnn/misc/tensorflow/tensor_shape.pb.h index 043d8b0ec2..eb9b58aee7 100644 --- a/modules/dnn/misc/tensorflow/tensor_shape.pb.h +++ b/modules/dnn/misc/tensorflow/tensor_shape.pb.h @@ -51,19 +51,19 @@ inline void InitDefaults() { InitDefaultsTensorShapeProto(); } } // namespace protobuf_tensor_5fshape_2eproto -namespace tensorflow { +namespace opencv_tensorflow { class TensorShapeProto; class TensorShapeProtoDefaultTypeInternal; extern TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_; class TensorShapeProto_Dim; class TensorShapeProto_DimDefaultTypeInternal; extern TensorShapeProto_DimDefaultTypeInternal _TensorShapeProto_Dim_default_instance_; -} // namespace tensorflow -namespace tensorflow { +} // namespace opencv_tensorflow +namespace opencv_tensorflow { // =================================================================== -class TensorShapeProto_Dim : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorShapeProto.Dim) */ { +class TensorShapeProto_Dim : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.TensorShapeProto.Dim) */ { public: TensorShapeProto_Dim(); virtual ~TensorShapeProto_Dim(); @@ -186,7 +186,7 @@ class TensorShapeProto_Dim : public ::google::protobuf::Message /* @@protoc_inse ::google::protobuf::int64 size() const; void set_size(::google::protobuf::int64 value); - // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto.Dim) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.TensorShapeProto.Dim) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -201,7 +201,7 @@ class TensorShapeProto_Dim : public ::google::protobuf::Message /* @@protoc_inse }; // ------------------------------------------------------------------- -class TensorShapeProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorShapeProto) */ { +class TensorShapeProto : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.TensorShapeProto) */ { public: TensorShapeProto(); virtual ~TensorShapeProto(); @@ -297,16 +297,16 @@ class TensorShapeProto : public ::google::protobuf::Message /* @@protoc_insertio // accessors ------------------------------------------------------- - // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + // repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2; int dim_size() const; void clear_dim(); static const int kDimFieldNumber = 2; - const ::tensorflow::TensorShapeProto_Dim& dim(int index) const; - ::tensorflow::TensorShapeProto_Dim* mutable_dim(int index); - ::tensorflow::TensorShapeProto_Dim* add_dim(); - ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >* + const ::opencv_tensorflow::TensorShapeProto_Dim& dim(int index) const; + ::opencv_tensorflow::TensorShapeProto_Dim* mutable_dim(int index); + ::opencv_tensorflow::TensorShapeProto_Dim* add_dim(); + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto_Dim >* mutable_dim(); - const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >& + const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto_Dim >& dim() const; // bool unknown_rank = 3; @@ -315,14 +315,14 @@ class TensorShapeProto : public ::google::protobuf::Message /* @@protoc_insertio bool unknown_rank() const; void set_unknown_rank(bool value); - // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.TensorShapeProto) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; - ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim > dim_; + ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto_Dim > dim_; bool unknown_rank_; mutable int _cached_size_; friend struct ::protobuf_tensor_5fshape_2eproto::TableStruct; @@ -344,13 +344,13 @@ inline void TensorShapeProto_Dim::clear_size() { size_ = GOOGLE_LONGLONG(0); } inline ::google::protobuf::int64 TensorShapeProto_Dim::size() const { - // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.Dim.size) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorShapeProto.Dim.size) return size_; } inline void TensorShapeProto_Dim::set_size(::google::protobuf::int64 value) { size_ = value; - // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.Dim.size) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorShapeProto.Dim.size) } // string name = 2; @@ -358,20 +358,20 @@ inline void TensorShapeProto_Dim::clear_name() { name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline const ::std::string& TensorShapeProto_Dim::name() const { - // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.Dim.name) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorShapeProto.Dim.name) return name_.Get(); } inline void TensorShapeProto_Dim::set_name(const ::std::string& value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.Dim.name) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorShapeProto.Dim.name) } #if LANG_CXX11 inline void TensorShapeProto_Dim::set_name(::std::string&& value) { name_.Set( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_rvalue:tensorflow.TensorShapeProto.Dim.name) + // @@protoc_insertion_point(field_set_rvalue:opencv_tensorflow.TensorShapeProto.Dim.name) } #endif inline void TensorShapeProto_Dim::set_name(const char* value) { @@ -379,22 +379,22 @@ inline void TensorShapeProto_Dim::set_name(const char* value) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_char:tensorflow.TensorShapeProto.Dim.name) + // @@protoc_insertion_point(field_set_char:opencv_tensorflow.TensorShapeProto.Dim.name) } inline void TensorShapeProto_Dim::set_name(const char* value, size_t size) { name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size), GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorShapeProto.Dim.name) + // @@protoc_insertion_point(field_set_pointer:opencv_tensorflow.TensorShapeProto.Dim.name) } inline ::std::string* TensorShapeProto_Dim::mutable_name() { - // @@protoc_insertion_point(field_mutable:tensorflow.TensorShapeProto.Dim.name) + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.TensorShapeProto.Dim.name) return name_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } inline ::std::string* TensorShapeProto_Dim::release_name() { - // @@protoc_insertion_point(field_release:tensorflow.TensorShapeProto.Dim.name) + // @@protoc_insertion_point(field_release:opencv_tensorflow.TensorShapeProto.Dim.name) return name_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } @@ -406,10 +406,10 @@ inline void TensorShapeProto_Dim::set_allocated_name(::std::string* name) { } name_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorShapeProto.Dim.name) + // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.TensorShapeProto.Dim.name) } inline ::std::string* TensorShapeProto_Dim::unsafe_arena_release_name() { - // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorShapeProto.Dim.name) + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_tensorflow.TensorShapeProto.Dim.name) GOOGLE_DCHECK(GetArenaNoVirtual() != NULL); return name_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), @@ -425,40 +425,40 @@ inline void TensorShapeProto_Dim::unsafe_arena_set_allocated_name( } name_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name, GetArenaNoVirtual()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorShapeProto.Dim.name) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.TensorShapeProto.Dim.name) } // ------------------------------------------------------------------- // TensorShapeProto -// repeated .tensorflow.TensorShapeProto.Dim dim = 2; +// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2; inline int TensorShapeProto::dim_size() const { return dim_.size(); } inline void TensorShapeProto::clear_dim() { dim_.Clear(); } -inline const ::tensorflow::TensorShapeProto_Dim& TensorShapeProto::dim(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.dim) +inline const ::opencv_tensorflow::TensorShapeProto_Dim& TensorShapeProto::dim(int index) const { + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorShapeProto.dim) return dim_.Get(index); } -inline ::tensorflow::TensorShapeProto_Dim* TensorShapeProto::mutable_dim(int index) { - // @@protoc_insertion_point(field_mutable:tensorflow.TensorShapeProto.dim) +inline ::opencv_tensorflow::TensorShapeProto_Dim* TensorShapeProto::mutable_dim(int index) { + // @@protoc_insertion_point(field_mutable:opencv_tensorflow.TensorShapeProto.dim) return dim_.Mutable(index); } -inline ::tensorflow::TensorShapeProto_Dim* TensorShapeProto::add_dim() { - // @@protoc_insertion_point(field_add:tensorflow.TensorShapeProto.dim) +inline ::opencv_tensorflow::TensorShapeProto_Dim* TensorShapeProto::add_dim() { + // @@protoc_insertion_point(field_add:opencv_tensorflow.TensorShapeProto.dim) return dim_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >* +inline ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto_Dim >* TensorShapeProto::mutable_dim() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorShapeProto.dim) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.TensorShapeProto.dim) return &dim_; } -inline const ::google::protobuf::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >& +inline const ::google::protobuf::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto_Dim >& TensorShapeProto::dim() const { - // @@protoc_insertion_point(field_list:tensorflow.TensorShapeProto.dim) + // @@protoc_insertion_point(field_list:opencv_tensorflow.TensorShapeProto.dim) return dim_; } @@ -467,13 +467,13 @@ inline void TensorShapeProto::clear_unknown_rank() { unknown_rank_ = false; } inline bool TensorShapeProto::unknown_rank() const { - // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.unknown_rank) + // @@protoc_insertion_point(field_get:opencv_tensorflow.TensorShapeProto.unknown_rank) return unknown_rank_; } inline void TensorShapeProto::set_unknown_rank(bool value) { unknown_rank_ = value; - // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.unknown_rank) + // @@protoc_insertion_point(field_set:opencv_tensorflow.TensorShapeProto.unknown_rank) } #ifdef __GNUC__ @@ -484,7 +484,7 @@ inline void TensorShapeProto::set_unknown_rank(bool value) { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/types.pb.cc b/modules/dnn/misc/tensorflow/types.pb.cc index 39f917ffe1..e5fa4ca598 100644 --- a/modules/dnn/misc/tensorflow/types.pb.cc +++ b/modules/dnn/misc/tensorflow/types.pb.cc @@ -19,8 +19,8 @@ #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) -namespace tensorflow { -} // namespace tensorflow +namespace opencv_tensorflow { +} // namespace opencv_tensorflow namespace protobuf_types_2eproto { const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; const ::google::protobuf::uint32 TableStruct::offsets[1] = {}; @@ -48,28 +48,28 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\013types.proto\022\ntensorflow*\234\005\n\010DataType\022\016" - "\n\nDT_INVALID\020\000\022\014\n\010DT_FLOAT\020\001\022\r\n\tDT_DOUBL" - "E\020\002\022\014\n\010DT_INT32\020\003\022\014\n\010DT_UINT8\020\004\022\014\n\010DT_IN" - "T16\020\005\022\013\n\007DT_INT8\020\006\022\r\n\tDT_STRING\020\007\022\020\n\014DT_" - "COMPLEX64\020\010\022\014\n\010DT_INT64\020\t\022\013\n\007DT_BOOL\020\n\022\014" - "\n\010DT_QINT8\020\013\022\r\n\tDT_QUINT8\020\014\022\r\n\tDT_QINT32" - "\020\r\022\017\n\013DT_BFLOAT16\020\016\022\r\n\tDT_QINT16\020\017\022\016\n\nDT" - "_QUINT16\020\020\022\r\n\tDT_UINT16\020\021\022\021\n\rDT_COMPLEX1" - "28\020\022\022\013\n\007DT_HALF\020\023\022\020\n\014DT_FLOAT_REF\020e\022\021\n\rD" - "T_DOUBLE_REF\020f\022\020\n\014DT_INT32_REF\020g\022\020\n\014DT_U" - "INT8_REF\020h\022\020\n\014DT_INT16_REF\020i\022\017\n\013DT_INT8_" - "REF\020j\022\021\n\rDT_STRING_REF\020k\022\024\n\020DT_COMPLEX64" - "_REF\020l\022\020\n\014DT_INT64_REF\020m\022\017\n\013DT_BOOL_REF\020" - "n\022\020\n\014DT_QINT8_REF\020o\022\021\n\rDT_QUINT8_REF\020p\022\021" - "\n\rDT_QINT32_REF\020q\022\023\n\017DT_BFLOAT16_REF\020r\022\021" - "\n\rDT_QINT16_REF\020s\022\022\n\016DT_QUINT16_REF\020t\022\021\n" - "\rDT_UINT16_REF\020u\022\025\n\021DT_COMPLEX128_REF\020v\022" - "\017\n\013DT_HALF_REF\020wB,\n\030org.tensorflow.frame" - "workB\013TypesProtosP\001\370\001\001b\006proto3" + "\n\013types.proto\022\021opencv_tensorflow*\234\005\n\010Dat" + "aType\022\016\n\nDT_INVALID\020\000\022\014\n\010DT_FLOAT\020\001\022\r\n\tD" + "T_DOUBLE\020\002\022\014\n\010DT_INT32\020\003\022\014\n\010DT_UINT8\020\004\022\014" + "\n\010DT_INT16\020\005\022\013\n\007DT_INT8\020\006\022\r\n\tDT_STRING\020\007" + "\022\020\n\014DT_COMPLEX64\020\010\022\014\n\010DT_INT64\020\t\022\013\n\007DT_B" + "OOL\020\n\022\014\n\010DT_QINT8\020\013\022\r\n\tDT_QUINT8\020\014\022\r\n\tDT" + "_QINT32\020\r\022\017\n\013DT_BFLOAT16\020\016\022\r\n\tDT_QINT16\020" + "\017\022\016\n\nDT_QUINT16\020\020\022\r\n\tDT_UINT16\020\021\022\021\n\rDT_C" + "OMPLEX128\020\022\022\013\n\007DT_HALF\020\023\022\020\n\014DT_FLOAT_REF" + "\020e\022\021\n\rDT_DOUBLE_REF\020f\022\020\n\014DT_INT32_REF\020g\022" + "\020\n\014DT_UINT8_REF\020h\022\020\n\014DT_INT16_REF\020i\022\017\n\013D" + "T_INT8_REF\020j\022\021\n\rDT_STRING_REF\020k\022\024\n\020DT_CO" + "MPLEX64_REF\020l\022\020\n\014DT_INT64_REF\020m\022\017\n\013DT_BO" + "OL_REF\020n\022\020\n\014DT_QINT8_REF\020o\022\021\n\rDT_QUINT8_" + "REF\020p\022\021\n\rDT_QINT32_REF\020q\022\023\n\017DT_BFLOAT16_" + "REF\020r\022\021\n\rDT_QINT16_REF\020s\022\022\n\016DT_QUINT16_R" + "EF\020t\022\021\n\rDT_UINT16_REF\020u\022\025\n\021DT_COMPLEX128" + "_REF\020v\022\017\n\013DT_HALF_REF\020wB,\n\030org.tensorflo" + "w.frameworkB\013TypesProtosP\001\370\001\001b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 750); + descriptor, 757); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "types.proto", &protobuf_RegisterTypes); } @@ -85,7 +85,7 @@ struct StaticDescriptorInitializer { } } static_descriptor_initializer; } // namespace protobuf_types_2eproto -namespace tensorflow { +namespace opencv_tensorflow { const ::google::protobuf::EnumDescriptor* DataType_descriptor() { protobuf_types_2eproto::protobuf_AssignDescriptorsOnce(); return protobuf_types_2eproto::file_level_enum_descriptors[0]; @@ -139,6 +139,6 @@ bool DataType_IsValid(int value) { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/types.pb.h b/modules/dnn/misc/tensorflow/types.pb.h index 0f1aa4214a..1af1261c7f 100644 --- a/modules/dnn/misc/tensorflow/types.pb.h +++ b/modules/dnn/misc/tensorflow/types.pb.h @@ -44,9 +44,9 @@ void AddDescriptors(); inline void InitDefaults() { } } // namespace protobuf_types_2eproto -namespace tensorflow { -} // namespace tensorflow -namespace tensorflow { +namespace opencv_tensorflow { +} // namespace opencv_tensorflow +namespace opencv_tensorflow { enum DataType { DT_INVALID = 0, @@ -124,15 +124,15 @@ inline bool DataType_Parse( // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow namespace google { namespace protobuf { -template <> struct is_proto_enum< ::tensorflow::DataType> : ::google::protobuf::internal::true_type {}; +template <> struct is_proto_enum< ::opencv_tensorflow::DataType> : ::google::protobuf::internal::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::DataType>() { - return ::tensorflow::DataType_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::opencv_tensorflow::DataType>() { + return ::opencv_tensorflow::DataType_descriptor(); } } // namespace protobuf diff --git a/modules/dnn/misc/tensorflow/versions.pb.cc b/modules/dnn/misc/tensorflow/versions.pb.cc index e3c7ebf50a..08ae2aa583 100644 --- a/modules/dnn/misc/tensorflow/versions.pb.cc +++ b/modules/dnn/misc/tensorflow/versions.pb.cc @@ -19,13 +19,13 @@ #include "third_party/protobuf/version.h" #endif // @@protoc_insertion_point(includes) -namespace tensorflow { +namespace opencv_tensorflow { class VersionDefDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; } _VersionDef_default_instance_; -} // namespace tensorflow +} // namespace opencv_tensorflow namespace protobuf_versions_2eproto { void InitDefaultsVersionDefImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -36,11 +36,11 @@ void InitDefaultsVersionDefImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::tensorflow::_VersionDef_default_instance_; - new (ptr) ::tensorflow::VersionDef(); + void* ptr = &::opencv_tensorflow::_VersionDef_default_instance_; + new (ptr) ::opencv_tensorflow::VersionDef(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::tensorflow::VersionDef::InitAsDefaultInstance(); + ::opencv_tensorflow::VersionDef::InitAsDefaultInstance(); } void InitDefaultsVersionDef() { @@ -52,20 +52,20 @@ void InitDefaultsVersionDef() { const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::VersionDef, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::VersionDef, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::VersionDef, producer_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::VersionDef, min_consumer_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::VersionDef, bad_consumers_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::VersionDef, producer_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::VersionDef, min_consumer_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::VersionDef, bad_consumers_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::tensorflow::VersionDef)}, + { 0, -1, sizeof(::opencv_tensorflow::VersionDef)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::tensorflow::_VersionDef_default_instance_), + reinterpret_cast(&::opencv_tensorflow::_VersionDef_default_instance_), }; void protobuf_AssignDescriptors() { @@ -90,14 +90,14 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\016versions.proto\022\ntensorflow\"K\n\nVersionD" - "ef\022\020\n\010producer\030\001 \001(\005\022\024\n\014min_consumer\030\002 \001" - "(\005\022\025\n\rbad_consumers\030\003 \003(\005B/\n\030org.tensorf" - "low.frameworkB\016VersionsProtosP\001\370\001\001b\006prot" - "o3" + "\n\016versions.proto\022\021opencv_tensorflow\"K\n\nV" + "ersionDef\022\020\n\010producer\030\001 \001(\005\022\024\n\014min_consu" + "mer\030\002 \001(\005\022\025\n\rbad_consumers\030\003 \003(\005B/\n\030org." + "tensorflow.frameworkB\016VersionsProtosP\001\370\001" + "\001b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 162); + descriptor, 169); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "versions.proto", &protobuf_RegisterTypes); } @@ -113,7 +113,7 @@ struct StaticDescriptorInitializer { } } static_descriptor_initializer; } // namespace protobuf_versions_2eproto -namespace tensorflow { +namespace opencv_tensorflow { // =================================================================== @@ -131,7 +131,7 @@ VersionDef::VersionDef() ::protobuf_versions_2eproto::InitDefaultsVersionDef(); } SharedCtor(); - // @@protoc_insertion_point(constructor:tensorflow.VersionDef) + // @@protoc_insertion_point(constructor:opencv_tensorflow.VersionDef) } VersionDef::VersionDef(::google::protobuf::Arena* arena) : ::google::protobuf::Message(), @@ -140,7 +140,7 @@ VersionDef::VersionDef(::google::protobuf::Arena* arena) ::protobuf_versions_2eproto::InitDefaultsVersionDef(); SharedCtor(); RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:tensorflow.VersionDef) + // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.VersionDef) } VersionDef::VersionDef(const VersionDef& from) : ::google::protobuf::Message(), @@ -151,7 +151,7 @@ VersionDef::VersionDef(const VersionDef& from) ::memcpy(&producer_, &from.producer_, static_cast(reinterpret_cast(&min_consumer_) - reinterpret_cast(&producer_)) + sizeof(min_consumer_)); - // @@protoc_insertion_point(copy_constructor:tensorflow.VersionDef) + // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.VersionDef) } void VersionDef::SharedCtor() { @@ -162,7 +162,7 @@ void VersionDef::SharedCtor() { } VersionDef::~VersionDef() { - // @@protoc_insertion_point(destructor:tensorflow.VersionDef) + // @@protoc_insertion_point(destructor:opencv_tensorflow.VersionDef) SharedDtor(); } @@ -196,7 +196,7 @@ VersionDef* VersionDef::New(::google::protobuf::Arena* arena) const { } void VersionDef::Clear() { -// @@protoc_insertion_point(message_clear_start:tensorflow.VersionDef) +// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.VersionDef) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -212,7 +212,7 @@ bool VersionDef::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:tensorflow.VersionDef) + // @@protoc_insertion_point(parse_start:opencv_tensorflow.VersionDef) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -277,17 +277,17 @@ bool VersionDef::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:tensorflow.VersionDef) + // @@protoc_insertion_point(parse_success:opencv_tensorflow.VersionDef) return true; failure: - // @@protoc_insertion_point(parse_failure:tensorflow.VersionDef) + // @@protoc_insertion_point(parse_failure:opencv_tensorflow.VersionDef) return false; #undef DO_ } void VersionDef::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:tensorflow.VersionDef) + // @@protoc_insertion_point(serialize_start:opencv_tensorflow.VersionDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -316,13 +316,13 @@ void VersionDef::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:tensorflow.VersionDef) + // @@protoc_insertion_point(serialize_end:opencv_tensorflow.VersionDef) } ::google::protobuf::uint8* VersionDef::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:tensorflow.VersionDef) + // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.VersionDef) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -353,12 +353,12 @@ void VersionDef::SerializeWithCachedSizes( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:tensorflow.VersionDef) + // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.VersionDef) return target; } size_t VersionDef::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:tensorflow.VersionDef) +// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.VersionDef) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -404,22 +404,22 @@ size_t VersionDef::ByteSizeLong() const { } void VersionDef::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.VersionDef) +// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.VersionDef) GOOGLE_DCHECK_NE(&from, this); const VersionDef* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.VersionDef) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.VersionDef) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.VersionDef) + // @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.VersionDef) MergeFrom(*source); } } void VersionDef::MergeFrom(const VersionDef& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.VersionDef) +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.VersionDef) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -435,14 +435,14 @@ void VersionDef::MergeFrom(const VersionDef& from) { } void VersionDef::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.VersionDef) +// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.VersionDef) if (&from == this) return; Clear(); MergeFrom(from); } void VersionDef::CopyFrom(const VersionDef& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.VersionDef) +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.VersionDef) if (&from == this) return; Clear(); MergeFrom(from); @@ -487,6 +487,6 @@ void VersionDef::InternalSwap(VersionDef* other) { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) diff --git a/modules/dnn/misc/tensorflow/versions.pb.h b/modules/dnn/misc/tensorflow/versions.pb.h index d67bce8d42..193081d544 100644 --- a/modules/dnn/misc/tensorflow/versions.pb.h +++ b/modules/dnn/misc/tensorflow/versions.pb.h @@ -48,16 +48,16 @@ inline void InitDefaults() { InitDefaultsVersionDef(); } } // namespace protobuf_versions_2eproto -namespace tensorflow { +namespace opencv_tensorflow { class VersionDef; class VersionDefDefaultTypeInternal; extern VersionDefDefaultTypeInternal _VersionDef_default_instance_; -} // namespace tensorflow -namespace tensorflow { +} // namespace opencv_tensorflow +namespace opencv_tensorflow { // =================================================================== -class VersionDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:tensorflow.VersionDef) */ { +class VersionDef : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.VersionDef) */ { public: VersionDef(); virtual ~VersionDef(); @@ -175,7 +175,7 @@ class VersionDef : public ::google::protobuf::Message /* @@protoc_insertion_poin ::google::protobuf::int32 min_consumer() const; void set_min_consumer(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:tensorflow.VersionDef) + // @@protoc_insertion_point(class_scope:opencv_tensorflow.VersionDef) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -206,13 +206,13 @@ inline void VersionDef::clear_producer() { producer_ = 0; } inline ::google::protobuf::int32 VersionDef::producer() const { - // @@protoc_insertion_point(field_get:tensorflow.VersionDef.producer) + // @@protoc_insertion_point(field_get:opencv_tensorflow.VersionDef.producer) return producer_; } inline void VersionDef::set_producer(::google::protobuf::int32 value) { producer_ = value; - // @@protoc_insertion_point(field_set:tensorflow.VersionDef.producer) + // @@protoc_insertion_point(field_set:opencv_tensorflow.VersionDef.producer) } // int32 min_consumer = 2; @@ -220,13 +220,13 @@ inline void VersionDef::clear_min_consumer() { min_consumer_ = 0; } inline ::google::protobuf::int32 VersionDef::min_consumer() const { - // @@protoc_insertion_point(field_get:tensorflow.VersionDef.min_consumer) + // @@protoc_insertion_point(field_get:opencv_tensorflow.VersionDef.min_consumer) return min_consumer_; } inline void VersionDef::set_min_consumer(::google::protobuf::int32 value) { min_consumer_ = value; - // @@protoc_insertion_point(field_set:tensorflow.VersionDef.min_consumer) + // @@protoc_insertion_point(field_set:opencv_tensorflow.VersionDef.min_consumer) } // repeated int32 bad_consumers = 3; @@ -237,25 +237,25 @@ inline void VersionDef::clear_bad_consumers() { bad_consumers_.Clear(); } inline ::google::protobuf::int32 VersionDef::bad_consumers(int index) const { - // @@protoc_insertion_point(field_get:tensorflow.VersionDef.bad_consumers) + // @@protoc_insertion_point(field_get:opencv_tensorflow.VersionDef.bad_consumers) return bad_consumers_.Get(index); } inline void VersionDef::set_bad_consumers(int index, ::google::protobuf::int32 value) { bad_consumers_.Set(index, value); - // @@protoc_insertion_point(field_set:tensorflow.VersionDef.bad_consumers) + // @@protoc_insertion_point(field_set:opencv_tensorflow.VersionDef.bad_consumers) } inline void VersionDef::add_bad_consumers(::google::protobuf::int32 value) { bad_consumers_.Add(value); - // @@protoc_insertion_point(field_add:tensorflow.VersionDef.bad_consumers) + // @@protoc_insertion_point(field_add:opencv_tensorflow.VersionDef.bad_consumers) } inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& VersionDef::bad_consumers() const { - // @@protoc_insertion_point(field_list:tensorflow.VersionDef.bad_consumers) + // @@protoc_insertion_point(field_list:opencv_tensorflow.VersionDef.bad_consumers) return bad_consumers_; } inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* VersionDef::mutable_bad_consumers() { - // @@protoc_insertion_point(field_mutable_list:tensorflow.VersionDef.bad_consumers) + // @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.VersionDef.bad_consumers) return &bad_consumers_; } @@ -265,7 +265,7 @@ VersionDef::mutable_bad_consumers() { // @@protoc_insertion_point(namespace_scope) -} // namespace tensorflow +} // namespace opencv_tensorflow // @@protoc_insertion_point(global_scope) From 095b0d327267471c191a8c1d3f7ef027c353c705 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Wed, 12 Sep 2018 14:47:00 -0400 Subject: [PATCH 18/27] Fix BayerXX2RGBA when blue is on the first line. --- modules/imgproc/src/demosaicing.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/src/demosaicing.cpp b/modules/imgproc/src/demosaicing.cpp index 5520369f60..f143451079 100644 --- a/modules/imgproc/src/demosaicing.cpp +++ b/modules/imgproc/src/demosaicing.cpp @@ -923,8 +923,10 @@ static void Bayer2RGB_( const Mat& srcmat, Mat& dstmat, int code ) { int dst_step = (int)(dstmat.step/sizeof(T)); Size size = srcmat.size(); - int blue = code == CV_BayerBG2BGR || code == CV_BayerGB2BGR ? -1 : 1; - int start_with_green = code == CV_BayerGB2BGR || code == CV_BayerGR2BGR; + int blue = (code == CV_BayerBG2BGR || code == CV_BayerGB2BGR || + code == CV_BayerBG2BGRA || code == CV_BayerGB2BGRA ) ? -1 : 1; + int start_with_green = (code == CV_BayerGB2BGR || code == CV_BayerGR2BGR || + code == CV_BayerGB2BGRA || code == CV_BayerGR2BGRA); int dcn = dstmat.channels(); size.height -= 2; From a4f53988c46ce8c2c2858f3e3f6901002306fa73 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 11 Sep 2018 18:18:33 -0700 Subject: [PATCH 19/27] Check for clang before using -isystem When cross compiling with clang, the internal C++ headers are not found when adding sysroot to -isystem, that is redundant anyway because it will look for headers insider --sysroot path with same quality as it would do with -isystem otherwise Fixes errors like FAILED: 3rdparty/openexr/CMakeFiles/IlmImf.dir/Iex/IexBaseExc.cpp.o .... In file included from TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/git/3rdparty/openexr/Iex/IexBaseExc.cpp:43: In file included from TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/git/3rdparty/openexr/Iex/IexBaseExc.h:48: In file included from TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/recipe-sysroot/usr/lib//arm-bec-linux-musleabi/8.2.0/../../../include/c++/8.2.0/string:52: In file included from TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/recipe-sysroot/usr/lib//arm-bec-linux-musleabi/8.2.0/../../../include/c++/8.2.0/bits/basic_string.h:6391: In file included from TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/recipe-sysroot/usr/lib//arm-bec-linux-musleabi/8.2.0/../../../include/c++/8.2.0/ext/string_conversions.h:41: TOPDIR/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/opencv/3.4.3+gitAUTOINC+b38c50b3d0_1f6d6f0626_bdb7bb85f3_34e4206aef_fccf7cd6a4-r0/recipe-sysroot/usr/lib//arm-bec-linux-musleabi/8.2.0/../../../include/c++/8.2.0/cstdlib:75:15: fatal error: 'stdlib.h' file not found ^~~~~~~~~~ 1 error generated. Signed-off-by: Khem Raj --- cmake/OpenCVUtils.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index fae91c165f..60c20192dc 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -259,7 +259,7 @@ function(ocv_include_directories) ocv_is_opencv_directory(__is_opencv_dir "${dir}") if(__is_opencv_dir) list(APPEND __add_before "${dir}") - elseif(CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND + elseif(((CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0") OR CV_CLANG) AND dir MATCHES "/usr/include$") # workaround for GCC 6.x bug else() From 78c500e97a4ef7322021c75bd66acee7599272bb Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Thu, 13 Sep 2018 12:46:06 +0300 Subject: [PATCH 20/27] Removed unnecessary build-time MediaSDK detection --- CMakeLists.txt | 2 +- cmake/OpenCVFindVA_INTEL.cmake | 26 +++++-------------- .../core/include/opencv2/core/va_intel.hpp | 5 ++-- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c7c76ecf35..86c2b04319 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1396,7 +1396,7 @@ if(WITH_VA OR HAVE_VA) endif() if(WITH_VA_INTEL OR HAVE_VA_INTEL) - status(" Intel VA-API/OpenCL:" HAVE_VA_INTEL THEN "YES (MSDK: ${VA_INTEL_MSDK_ROOT} OpenCL: ${VA_INTEL_IOCL_ROOT})" ELSE NO) + status(" Intel VA-API/OpenCL:" HAVE_VA_INTEL THEN "YES (OpenCL: ${VA_INTEL_IOCL_ROOT})" ELSE NO) endif() if(WITH_LAPACK OR HAVE_LAPACK) diff --git a/cmake/OpenCVFindVA_INTEL.cmake b/cmake/OpenCVFindVA_INTEL.cmake index 8cb6c25944..63d0f15a36 100644 --- a/cmake/OpenCVFindVA_INTEL.cmake +++ b/cmake/OpenCVFindVA_INTEL.cmake @@ -1,30 +1,16 @@ # Main variables: -# VA_INTEL_MSDK_INCLUDE_DIR and VA_INTEL_IOCL_INCLUDE_DIR to use VA_INTEL +# VA_INTEL_IOCL_INCLUDE_DIR to use VA_INTEL # HAVE_VA_INTEL for conditional compilation OpenCV with/without VA_INTEL -# VA_INTEL_MSDK_ROOT - root of Intel MSDK installation # VA_INTEL_IOCL_ROOT - root of Intel OCL installation if(UNIX AND NOT ANDROID) - if($ENV{VA_INTEL_MSDK_ROOT}) - set(VA_INTEL_MSDK_ROOT $ENV{VA_INTEL_MSDK_ROOT}) - else() - set(VA_INTEL_MSDK_ROOT "/opt/intel/mediasdk") - endif() - if($ENV{VA_INTEL_IOCL_ROOT}) set(VA_INTEL_IOCL_ROOT $ENV{VA_INTEL_IOCL_ROOT}) else() set(VA_INTEL_IOCL_ROOT "/opt/intel/opencl") endif() - find_path( - VA_INTEL_MSDK_INCLUDE_DIR - NAMES mfxdefs.h - PATHS ${VA_INTEL_MSDK_ROOT} - PATH_SUFFIXES include - DOC "Path to Intel MSDK headers") - find_path( VA_INTEL_IOCL_INCLUDE_DIR NAMES CL/va_ext.h @@ -33,12 +19,14 @@ if(UNIX AND NOT ANDROID) DOC "Path to Intel OpenCL headers") endif() -if(VA_INTEL_MSDK_INCLUDE_DIR AND VA_INTEL_IOCL_INCLUDE_DIR) +if(VA_INTEL_IOCL_INCLUDE_DIR) set(HAVE_VA_INTEL TRUE) - set(VA_INTEL_LIBRARIES "-lva" "-lva-drm") + if(NOT DEFINED VA_INTEL_LIBRARIES) + set(VA_INTEL_LIBRARIES "va" "va-drm") + endif() else() set(HAVE_VA_INTEL FALSE) - message(WARNING "Intel MSDK & OpenCL installation is not found.") + message(WARNING "Intel OpenCL installation is not found.") endif() -mark_as_advanced(FORCE VA_INTEL_MSDK_INCLUDE_DIR VA_INTEL_IOCL_INCLUDE_DIR) +mark_as_advanced(FORCE VA_INTEL_IOCL_INCLUDE_DIR) diff --git a/modules/core/include/opencv2/core/va_intel.hpp b/modules/core/include/opencv2/core/va_intel.hpp index 33258484de..f66547093e 100644 --- a/modules/core/include/opencv2/core/va_intel.hpp +++ b/modules/core/include/opencv2/core/va_intel.hpp @@ -31,8 +31,9 @@ This section describes Intel VA-API/OpenCL (CL-VA) interoperability. To enable CL-VA interoperability support, configure OpenCV using CMake with WITH_VA_INTEL=ON . Currently VA-API is supported on Linux only. You should also install Intel Media Server Studio (MSS) to use this feature. You may -have to specify the path(s) to MSS components for cmake in environment variables: VA_INTEL_MSDK_ROOT for Media SDK -(default is "/opt/intel/mediasdk"), and VA_INTEL_IOCL_ROOT for Intel OpenCL (default is "/opt/intel/opencl"). +have to specify the path(s) to MSS components for cmake in environment variables: + +- VA_INTEL_IOCL_ROOT for Intel OpenCL (default is "/opt/intel/opencl"). To use CL-VA interoperability you should first create VADisplay (libva), and then call initializeContextFromVA() function to create OpenCL context and set up interoperability. From 29770e13e8486832add5bedf6db065e82e03b049 Mon Sep 17 00:00:00 2001 From: Vitaly Tuzov Date: Thu, 13 Sep 2018 18:20:27 +0300 Subject: [PATCH 21/27] Fixed bit-exact resize SIMD implementation for AVX2 baseline --- modules/imgproc/src/resize.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/imgproc/src/resize.cpp b/modules/imgproc/src/resize.cpp index 8b27fd0b5d..4e87616099 100644 --- a/modules/imgproc/src/resize.cpp +++ b/modules/imgproc/src/resize.cpp @@ -531,7 +531,6 @@ void hlineResizeCn(uint8_t* src, int, int *o { v_store((uint16_t*)dst, v_src_0); } - vx_cleanup(); #endif for (; i < dst_width; i++) { @@ -588,7 +587,6 @@ void hlineResizeCn(uint8_t* src, int, int *o { v_store((uint16_t*)dst, v_srccn); } - vx_cleanup(); #endif for (; i < dst_width; i++) { @@ -661,7 +659,6 @@ void hlineResizeCn(uint8_t* src, int, int *o { v_store((uint16_t*)dst, v_srccn); } - vx_cleanup(); #endif if (i < dst_width) { @@ -710,7 +707,6 @@ void hlineResizeCn(uint16_t* src, int, int { v_store((uint32_t*)dst, v_src_0); } - vx_cleanup(); #endif for (; i < dst_width; i++) { @@ -741,7 +737,6 @@ void vlineSet(ufixedpoint16* src, uint8_t* dst, int dst_ v_store(dst, v_pack(v_res0, v_res1)); } - vx_cleanup(); #endif for (; i < dst_width; i++) *(dst++) = *(src++); @@ -793,7 +788,6 @@ void vlineResize(ufixedpoint16* src, size_t src_step, v_store(dst, v_reinterpret_as_u8(v_sub_wrap(v_res, v_128_16))); } - vx_cleanup(); #endif for (; i < dst_width; i++) { @@ -899,6 +893,9 @@ public: hResize((ET*)(src + (src_height - 1) * src_step), cn, xoffsets, xcoeffs, endline, min_x, max_x, dst_width); for (; dy < range.end; dy++) vlineSet(endline, (ET*)(dst + dst_step * dy), dst_width*cn); +#if CV_SIMD + vx_cleanup(); +#endif } private: From fdaeb202536ec8074a980f8333728532e577c70e Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 13 Sep 2018 14:23:04 +0000 Subject: [PATCH 22/27] dnn(test): run DL IE tests on Intel OpenCL devices only --- modules/dnn/test/test_common.hpp | 2 +- modules/dnn/test/test_ie_models.cpp | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/modules/dnn/test/test_common.hpp b/modules/dnn/test/test_common.hpp index 2df422b759..7d31d798c1 100644 --- a/modules/dnn/test/test_common.hpp +++ b/modules/dnn/test/test_common.hpp @@ -257,7 +257,7 @@ static testing::internal::ParamGenerator > dnnBackendsAnd { targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_CPU)); #ifdef HAVE_OPENCL - if (cv::ocl::useOpenCL()) + if (cv::ocl::useOpenCL() && ocl::Device::getDefault().isIntel()) { targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_OPENCL)); targets.push_back(make_tuple(DNN_BACKEND_INFERENCE_ENGINE, DNN_TARGET_OPENCL_FP16)); diff --git a/modules/dnn/test/test_ie_models.cpp b/modules/dnn/test/test_ie_models.cpp index 22dc1fe65f..7507ea74b6 100644 --- a/modules/dnn/test/test_ie_models.cpp +++ b/modules/dnn/test/test_ie_models.cpp @@ -227,8 +227,24 @@ static testing::internal::ParamGenerator intelModels() return ValuesIn(modelsNames); } +static testing::internal::ParamGenerator dnnDLIETargets() +{ + std::vector targets; + targets.push_back(DNN_TARGET_CPU); +#ifdef HAVE_OPENCL + if (cv::ocl::useOpenCL() && ocl::Device::getDefault().isIntel()) + { + targets.push_back(DNN_TARGET_OPENCL); + targets.push_back(DNN_TARGET_OPENCL_FP16); + } +#endif + //if (checkMyriadTarget()) + // targets.push_back(DNN_TARGET_MYRIAD); + return testing::ValuesIn(targets); +} + INSTANTIATE_TEST_CASE_P(/**/, DNNTestOpenVINO, Combine( - Values(DNN_TARGET_CPU, DNN_TARGET_OPENCL, DNN_TARGET_OPENCL_FP16), intelModels() + dnnDLIETargets(), intelModels() )); }} From 451340fd3d2f20fb0f0f62402340bbba27314c75 Mon Sep 17 00:00:00 2001 From: Takuho NAKANO Date: Fri, 14 Sep 2018 04:26:05 +0900 Subject: [PATCH 23/27] Merge pull request #12523 from takotakot:12455_rotatedrect_constructor * Fix perpendicular decision of RotatedRect::RotatedRect Error estimation is based on #12455. * Fix abs to std::fabs and atan to std::atan --- modules/core/src/types.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/core/src/types.cpp b/modules/core/src/types.cpp index 694f371c0e..e0521ce04e 100644 --- a/modules/core/src/types.cpp +++ b/modules/core/src/types.cpp @@ -150,16 +150,18 @@ RotatedRect::RotatedRect(const Point2f& _point1, const Point2f& _point2, const P Vec2f vecs[2]; vecs[0] = Vec2f(_point1 - _point2); vecs[1] = Vec2f(_point2 - _point3); + double x = std::max(norm(_point1), std::max(norm(_point2), norm(_point3))); + double a = std::min(norm(vecs[0]), norm(vecs[1])); // check that given sides are perpendicular - CV_Assert( abs(vecs[0].dot(vecs[1])) / (norm(vecs[0]) * norm(vecs[1])) <= FLT_EPSILON ); + CV_Assert( std::fabs(vecs[0].ddot(vecs[1])) * a <= FLT_EPSILON * 9 * x * (norm(vecs[0]) * norm(vecs[1])) ); // wd_i stores which vector (0,1) or (1,2) will make the width // One of them will definitely have slope within -1 to 1 int wd_i = 0; - if( abs(vecs[1][1]) < abs(vecs[1][0]) ) wd_i = 1; + if( std::fabs(vecs[1][1]) < std::fabs(vecs[1][0]) ) wd_i = 1; int ht_i = (wd_i + 1) % 2; - float _angle = atan(vecs[wd_i][1] / vecs[wd_i][0]) * 180.0f / (float) CV_PI; + float _angle = std::atan(vecs[wd_i][1] / vecs[wd_i][0]) * 180.0f / (float) CV_PI; float _width = (float) norm(vecs[wd_i]); float _height = (float) norm(vecs[ht_i]); From 5d54def264b738a7c3065e0e005f8a9a35b08291 Mon Sep 17 00:00:00 2001 From: Hamdi Sahloul Date: Fri, 14 Sep 2018 06:35:26 +0900 Subject: [PATCH 24/27] Add semicolons after `CV_INSTRUMENT` macros --- modules/calib3d/src/ap3p.cpp | 4 +- modules/calib3d/src/calibinit.cpp | 4 +- modules/calib3d/src/calibration.cpp | 22 ++--- modules/calib3d/src/fisheye.cpp | 26 +++--- modules/calib3d/src/five-point.cpp | 8 +- modules/calib3d/src/fundam.cpp | 14 +-- modules/calib3d/src/p3p.cpp | 4 +- modules/calib3d/src/ptsetreg.cpp | 2 +- modules/calib3d/src/quadsubpix.cpp | 2 +- modules/calib3d/src/solvepnp.cpp | 6 +- modules/calib3d/src/stereobm.cpp | 2 +- modules/calib3d/src/stereosgbm.cpp | 8 +- modules/calib3d/src/triangulate.cpp | 4 +- modules/core/include/opencv2/core/private.hpp | 20 ++-- modules/core/src/arithm.cpp | 38 ++++---- modules/core/src/array.cpp | 2 +- modules/core/src/batch_distance.cpp | 2 +- modules/core/src/channels.cpp | 14 +-- modules/core/src/convert.cpp | 4 +- modules/core/src/convert_scale.cpp | 4 +- modules/core/src/copy.cpp | 22 ++--- modules/core/src/count_non_zero.cpp | 6 +- modules/core/src/dxt.cpp | 16 ++-- modules/core/src/glob.cpp | 4 +- modules/core/src/kmeans.cpp | 2 +- modules/core/src/lapack.cpp | 24 ++--- modules/core/src/lda.cpp | 4 +- modules/core/src/lut.cpp | 4 +- modules/core/src/mathfuncs.cpp | 28 +++--- modules/core/src/mathfuncs_core.dispatch.cpp | 26 +++--- modules/core/src/mathfuncs_core.simd.hpp | 34 +++---- modules/core/src/matmul.cpp | 18 ++-- modules/core/src/matrix.cpp | 2 +- modules/core/src/matrix_decomp.cpp | 12 +-- modules/core/src/matrix_expressions.cpp | 92 +++++++++---------- modules/core/src/matrix_operations.cpp | 30 +++--- modules/core/src/matrix_sparse.cpp | 6 +- modules/core/src/mean.cpp | 10 +- modules/core/src/merge.cpp | 6 +- modules/core/src/minmax.cpp | 6 +- modules/core/src/norm.cpp | 10 +- modules/core/src/ocl.cpp | 2 +- modules/core/src/parallel.cpp | 4 +- modules/core/src/pca.cpp | 12 +-- modules/core/src/persistence_cpp.cpp | 2 +- modules/core/src/rand.cpp | 6 +- modules/core/src/split.cpp | 6 +- modules/core/src/stat.dispatch.cpp | 4 +- modules/core/src/sum.cpp | 4 +- modules/core/src/types.cpp | 4 +- modules/core/src/umatrix.cpp | 10 +- modules/core/src/utils/filesystem.cpp | 6 +- modules/features2d/src/agast.cpp | 6 +- modules/features2d/src/akaze.cpp | 2 +- modules/features2d/src/bagofwords.cpp | 8 +- modules/features2d/src/blobdetector.cpp | 4 +- modules/features2d/src/draw.cpp | 2 +- modules/features2d/src/evaluation.cpp | 12 +-- modules/features2d/src/fast.cpp | 6 +- modules/features2d/src/feature2d.cpp | 10 +- modules/features2d/src/gftt.cpp | 2 +- modules/features2d/src/kaze.cpp | 2 +- modules/features2d/src/kaze/AKAZEFeatures.cpp | 28 +++--- .../src/kaze/nldiffusion_functions.cpp | 8 +- modules/features2d/src/keypoint.cpp | 2 +- modules/features2d/src/matchers.cpp | 18 ++-- modules/features2d/src/mser.cpp | 4 +- modules/features2d/src/orb.cpp | 2 +- modules/flann/src/miniflann.cpp | 10 +- modules/imgproc/src/accum.cpp | 16 ++-- modules/imgproc/src/approx.cpp | 2 +- modules/imgproc/src/blend.cpp | 2 +- modules/imgproc/src/canny.cpp | 8 +- modules/imgproc/src/clahe.cpp | 2 +- modules/imgproc/src/color.cpp | 2 +- modules/imgproc/src/color_hsv.cpp | 4 +- modules/imgproc/src/color_lab.cpp | 8 +- modules/imgproc/src/color_rgb.cpp | 18 ++-- modules/imgproc/src/color_yuv.cpp | 10 +- modules/imgproc/src/colormap.cpp | 2 +- modules/imgproc/src/contours.cpp | 4 +- modules/imgproc/src/convhull.cpp | 4 +- modules/imgproc/src/corner.cpp | 12 +-- modules/imgproc/src/cornersubpix.cpp | 2 +- modules/imgproc/src/demosaicing.cpp | 2 +- modules/imgproc/src/deriv.cpp | 10 +- modules/imgproc/src/distransform.cpp | 6 +- modules/imgproc/src/drawing.cpp | 36 ++++---- modules/imgproc/src/emd.cpp | 2 +- modules/imgproc/src/featureselect.cpp | 2 +- modules/imgproc/src/filter.cpp | 8 +- modules/imgproc/src/floodfill.cpp | 4 +- modules/imgproc/src/generalized_hough.cpp | 2 +- modules/imgproc/src/geometry.cpp | 4 +- modules/imgproc/src/grabcut.cpp | 2 +- modules/imgproc/src/histogram.cpp | 22 ++--- modules/imgproc/src/hough.cpp | 6 +- modules/imgproc/src/imgwarp.cpp | 18 ++-- modules/imgproc/src/intersection.cpp | 2 +- modules/imgproc/src/linefit.cpp | 2 +- modules/imgproc/src/lsd.cpp | 6 +- modules/imgproc/src/matchcontours.cpp | 2 +- modules/imgproc/src/moments.cpp | 8 +- modules/imgproc/src/morph.cpp | 10 +- modules/imgproc/src/phasecorr.cpp | 4 +- modules/imgproc/src/pyramids.cpp | 12 +-- modules/imgproc/src/resize.cpp | 10 +- modules/imgproc/src/rotcalipers.cpp | 4 +- modules/imgproc/src/samplers.cpp | 2 +- modules/imgproc/src/segmentation.cpp | 4 +- modules/imgproc/src/shapedescr.cpp | 10 +- modules/imgproc/src/smooth.cpp | 22 ++--- modules/imgproc/src/spatialgradient.cpp | 2 +- modules/imgproc/src/subdivision2d.cpp | 10 +- modules/imgproc/src/sumpixels.cpp | 8 +- modules/imgproc/src/templmatch.cpp | 8 +- modules/imgproc/src/thresh.cpp | 6 +- modules/imgproc/src/undistort.cpp | 2 +- modules/objdetect/src/cascadedetect.cpp | 34 +++---- modules/objdetect/src/cascadedetect.hpp | 8 +- .../objdetect/src/detection_based_tracker.cpp | 2 +- modules/objdetect/src/haar.cpp | 8 +- modules/objdetect/src/hog.cpp | 20 ++-- modules/photo/src/align.cpp | 10 +- modules/photo/src/calibrate.cpp | 4 +- modules/photo/src/contrast_preserve.cpp | 2 +- modules/photo/src/denoising.cpp | 12 +-- modules/photo/src/inpaint.cpp | 2 +- modules/photo/src/merge.cpp | 12 +-- modules/photo/src/npr.cpp | 8 +- modules/photo/src/seamless_cloning.cpp | 8 +- modules/photo/src/seamless_cloning_impl.cpp | 2 +- modules/photo/src/tonemap.cpp | 10 +- modules/shape/src/aff_trans.cpp | 6 +- modules/shape/src/emdL1.cpp | 2 +- modules/shape/src/haus_dis.cpp | 2 +- modules/shape/src/hist_cost.cpp | 8 +- modules/shape/src/sc_dis.cpp | 4 +- modules/shape/src/tps_trans.cpp | 6 +- modules/stitching/src/exposure_compensate.cpp | 4 +- modules/stitching/src/matchers.cpp | 6 +- modules/stitching/src/seam_finders.cpp | 2 +- modules/stitching/src/stitcher.cpp | 16 ++-- modules/stitching/src/timelapsers.cpp | 2 +- modules/superres/src/btv_l1.cpp | 8 +- modules/superres/src/input_array_utility.cpp | 4 +- modules/superres/src/optical_flow.cpp | 8 +- modules/superres/src/super_resolution.cpp | 2 +- modules/video/src/bgfg_KNN.cpp | 4 +- modules/video/src/bgfg_gaussmix2.cpp | 4 +- modules/video/src/camshift.cpp | 4 +- modules/video/src/kalman.cpp | 4 +- modules/video/src/lkpyramid.cpp | 8 +- modules/video/src/optflowgf.cpp | 4 +- modules/video/src/tvl1flow.cpp | 2 +- modules/videoio/src/cap.cpp | 14 +-- modules/videostab/src/deblurring.cpp | 4 +- modules/videostab/src/global_motion.cpp | 6 +- modules/videostab/src/inpainting.cpp | 14 +-- modules/videostab/src/motion_stabilizing.cpp | 4 +- modules/videostab/src/outlier_rejection.cpp | 4 +- 161 files changed, 695 insertions(+), 695 deletions(-) diff --git a/modules/calib3d/src/ap3p.cpp b/modules/calib3d/src/ap3p.cpp index 5a7fc60d83..7b86834db8 100644 --- a/modules/calib3d/src/ap3p.cpp +++ b/modules/calib3d/src/ap3p.cpp @@ -297,7 +297,7 @@ int ap3p::computePoses(const double featureVectors[3][3], } bool ap3p::solve(cv::Mat &R, cv::Mat &tvec, const cv::Mat &opoints, const cv::Mat &ipoints) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double rotation_matrix[3][3], translation[3]; std::vector points; @@ -321,7 +321,7 @@ bool ap3p::solve(cv::Mat &R, cv::Mat &tvec, const cv::Mat &opoints, const cv::Ma } int ap3p::solve(std::vector &Rs, std::vector &tvecs, const cv::Mat &opoints, const cv::Mat &ipoints) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double rotation_matrix[4][3][3], translation[4][3]; std::vector points; diff --git a/modules/calib3d/src/calibinit.cpp b/modules/calib3d/src/calibinit.cpp index c2180d73ad..6f0f7efd5c 100644 --- a/modules/calib3d/src/calibinit.cpp +++ b/modules/calib3d/src/calibinit.cpp @@ -485,7 +485,7 @@ static void icvBinarizationHistogramBased(Mat & img) bool findChessboardCorners(InputArray image_, Size pattern_size, OutputArray corners_, int flags) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); DPRINTF("==== findChessboardCorners(img=%dx%d, pattern=%dx%d, flags=%d)", image_.cols(), image_.rows(), pattern_size.width, pattern_size.height, flags); @@ -2193,7 +2193,7 @@ bool findCirclesGrid2(InputArray _image, Size patternSize, OutputArray _centers, int flags, const Ptr &blobDetector, CirclesGridFinderParameters2 parameters) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); bool isAsymmetricGrid = (flags & CALIB_CB_ASYMMETRIC_GRID) ? true : false; bool isSymmetricGrid = (flags & CALIB_CB_SYMMETRIC_GRID ) ? true : false; diff --git a/modules/calib3d/src/calibration.cpp b/modules/calib3d/src/calibration.cpp index ac5fd419a5..460914a741 100644 --- a/modules/calib3d/src/calibration.cpp +++ b/modules/calib3d/src/calibration.cpp @@ -2795,7 +2795,7 @@ void cv::reprojectImageTo3D( InputArray _disparity, OutputArray __3dImage, InputArray _Qmat, bool handleMissingValues, int dtype ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat disparity = _disparity.getMat(), Q = _Qmat.getMat(); int stype = disparity.type(); @@ -3225,7 +3225,7 @@ static Mat prepareDistCoeffs(Mat& distCoeffs0, int rtype, int outputSize = 14) void cv::Rodrigues(InputArray _src, OutputArray _dst, OutputArray _jacobian) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); bool v2m = src.cols == 1 || src.rows == 1; @@ -3245,7 +3245,7 @@ void cv::Rodrigues(InputArray _src, OutputArray _dst, OutputArray _jacobian) void cv::matMulDeriv( InputArray _Amat, InputArray _Bmat, OutputArray _dABdA, OutputArray _dABdB ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat A = _Amat.getMat(), B = _Bmat.getMat(); _dABdA.create(A.rows*B.cols, A.rows*A.cols, A.type()); @@ -3350,7 +3350,7 @@ cv::Mat cv::initCameraMatrix2D( InputArrayOfArrays objectPoints, InputArrayOfArrays imagePoints, Size imageSize, double aspectRatio ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat objPt, imgPt, npoints, cameraMatrix(3, 3, CV_64F); collectCalibrationData( objectPoints, imagePoints, noArray(), @@ -3368,7 +3368,7 @@ double cv::calibrateCamera( InputArrayOfArrays _objectPoints, Size imageSize, InputOutputArray _cameraMatrix, InputOutputArray _distCoeffs, OutputArrayOfArrays _rvecs, OutputArrayOfArrays _tvecs, int flags, TermCriteria criteria ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return calibrateCamera(_objectPoints, _imagePoints, imageSize, _cameraMatrix, _distCoeffs, _rvecs, _tvecs, noArray(), noArray(), noArray(), flags, criteria); @@ -3382,7 +3382,7 @@ double cv::calibrateCamera(InputArrayOfArrays _objectPoints, OutputArray stdDeviationsExtrinsics, OutputArray _perViewErrors, int flags, TermCriteria criteria ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int rtype = CV_64F; Mat cameraMatrix = _cameraMatrix.getMat(); @@ -3496,7 +3496,7 @@ void cv::calibrationMatrixValues( InputArray _cameraMatrix, Size imageSize, double& fovx, double& fovy, double& focalLength, Point2d& principalPoint, double& aspectRatio ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if(_cameraMatrix.size() != Size(3, 3)) CV_Error(CV_StsUnmatchedSizes, "Size of cameraMatrix must be 3x3!"); @@ -3675,7 +3675,7 @@ bool cv::stereoRectifyUncalibrated( InputArray _points1, InputArray _points2, InputArray _Fmat, Size imgSize, OutputArray _Hmat1, OutputArray _Hmat2, double threshold ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int rtype = CV_64F; _Hmat1.create(3, 3, rtype); @@ -3695,7 +3695,7 @@ cv::Mat cv::getOptimalNewCameraMatrix( InputArray _cameraMatrix, Size imgSize, double alpha, Size newImgSize, Rect* validPixROI, bool centerPrincipalPoint ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat cameraMatrix = _cameraMatrix.getMat(), distCoeffs = _distCoeffs.getMat(); CvMat c_cameraMatrix = cvMat(cameraMatrix), c_distCoeffs = cvMat(distCoeffs); @@ -3717,7 +3717,7 @@ cv::Vec3d cv::RQDecomp3x3( InputArray _Mmat, OutputArray _Qy, OutputArray _Qz ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat M = _Mmat.getMat(); _Rmat.create(3, 3, M.type()); @@ -3751,7 +3751,7 @@ void cv::decomposeProjectionMatrix( InputArray _projMatrix, OutputArray _cameraM OutputArray _rotMatrixX, OutputArray _rotMatrixY, OutputArray _rotMatrixZ, OutputArray _eulerAngles ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat projMatrix = _projMatrix.getMat(); int type = projMatrix.type(); diff --git a/modules/calib3d/src/fisheye.cpp b/modules/calib3d/src/fisheye.cpp index 83a5a88c5f..fdd8aad18f 100644 --- a/modules/calib3d/src/fisheye.cpp +++ b/modules/calib3d/src/fisheye.cpp @@ -63,7 +63,7 @@ namespace cv { namespace void cv::fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints, const Affine3d& affine, InputArray K, InputArray D, double alpha, OutputArray jacobian) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); projectPoints(objectPoints, imagePoints, affine.rvec(), affine.translation(), K, D, alpha, jacobian); } @@ -71,7 +71,7 @@ void cv::fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints void cv::fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints, InputArray _rvec, InputArray _tvec, InputArray _K, InputArray _D, double alpha, OutputArray jacobian) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // will support only 3-channel data now for points CV_Assert(objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3); @@ -255,7 +255,7 @@ void cv::fisheye::projectPoints(InputArray objectPoints, OutputArray imagePoints void cv::fisheye::distortPoints(InputArray undistorted, OutputArray distorted, InputArray K, InputArray D, double alpha) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // will support only 2-channel data now for points CV_Assert(undistorted.type() == CV_32FC2 || undistorted.type() == CV_64FC2); @@ -319,7 +319,7 @@ void cv::fisheye::distortPoints(InputArray undistorted, OutputArray distorted, I void cv::fisheye::undistortPoints( InputArray distorted, OutputArray undistorted, InputArray K, InputArray D, InputArray R, InputArray P) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // will support only 2-channel data now for points CV_Assert(distorted.type() == CV_32FC2 || distorted.type() == CV_64FC2); @@ -425,7 +425,7 @@ void cv::fisheye::undistortPoints( InputArray distorted, OutputArray undistorted void cv::fisheye::initUndistortRectifyMap( InputArray K, InputArray D, InputArray R, InputArray P, const cv::Size& size, int m1type, OutputArray map1, OutputArray map2 ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( m1type == CV_16SC2 || m1type == CV_32F || m1type <=0 ); map1.create( size, m1type <= 0 ? CV_16SC2 : m1type ); @@ -532,7 +532,7 @@ void cv::fisheye::initUndistortRectifyMap( InputArray K, InputArray D, InputArra void cv::fisheye::undistortImage(InputArray distorted, OutputArray undistorted, InputArray K, InputArray D, InputArray Knew, const Size& new_size) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Size size = new_size.area() != 0 ? new_size : distorted.size(); @@ -548,7 +548,7 @@ void cv::fisheye::undistortImage(InputArray distorted, OutputArray undistorted, void cv::fisheye::estimateNewCameraMatrixForUndistortRectify(InputArray K, InputArray D, const Size &image_size, InputArray R, OutputArray P, double balance, const Size& new_size, double fov_scale) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( K.size() == Size(3, 3) && (K.depth() == CV_32F || K.depth() == CV_64F)); CV_Assert(D.empty() || ((D.total() == 4) && (D.depth() == CV_32F || D.depth() == CV_64F))); @@ -623,7 +623,7 @@ void cv::fisheye::stereoRectify( InputArray K1, InputArray D1, InputArray K2, In InputArray _R, InputArray _tvec, OutputArray R1, OutputArray R2, OutputArray P1, OutputArray P2, OutputArray Q, int flags, const Size& newImageSize, double balance, double fov_scale) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert((_R.size() == Size(3, 3) || _R.total() * _R.channels() == 3) && (_R.depth() == CV_32F || _R.depth() == CV_64F)); CV_Assert(_tvec.total() * _tvec.channels() == 3 && (_tvec.depth() == CV_32F || _tvec.depth() == CV_64F)); @@ -707,7 +707,7 @@ double cv::fisheye::calibrate(InputArrayOfArrays objectPoints, InputArrayOfArray InputOutputArray K, InputOutputArray D, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs, int flags , cv::TermCriteria criteria) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!objectPoints.empty() && !imagePoints.empty() && objectPoints.total() == imagePoints.total()); CV_Assert(objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3); @@ -846,7 +846,7 @@ double cv::fisheye::stereoCalibrate(InputArrayOfArrays objectPoints, InputArrayO InputOutputArray K1, InputOutputArray D1, InputOutputArray K2, InputOutputArray D2, Size imageSize, OutputArray R, OutputArray T, int flags, TermCriteria criteria) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!objectPoints.empty() && !imagePoints1.empty() && !imagePoints2.empty()); CV_Assert(objectPoints.total() == imagePoints1.total() || imagePoints1.total() == imagePoints2.total()); @@ -1172,7 +1172,7 @@ void cv::internal::projectPoints(cv::InputArray objectPoints, cv::OutputArray im cv::InputArray _rvec,cv::InputArray _tvec, const IntrinsicParams& param, cv::OutputArray jacobian) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!objectPoints.empty() && (objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3)); Matx33d K(param.f[0], param.f[0] * param.alpha, param.c[0], @@ -1227,7 +1227,7 @@ void cv::internal::ComputeExtrinsicRefine(const Mat& imagePoints, const Mat& obj cv::Mat cv::internal::ComputeHomography(Mat m, Mat M) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int Np = m.cols; @@ -1328,7 +1328,7 @@ cv::Mat cv::internal::ComputeHomography(Mat m, Mat M) cv::Mat cv::internal::NormalizePixels(const Mat& imagePoints, const IntrinsicParams& param) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!imagePoints.empty() && imagePoints.type() == CV_64FC2); diff --git a/modules/calib3d/src/five-point.cpp b/modules/calib3d/src/five-point.cpp index 79d9609f11..0cefe8df4c 100644 --- a/modules/calib3d/src/five-point.cpp +++ b/modules/calib3d/src/five-point.cpp @@ -405,7 +405,7 @@ protected: cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, InputArray _cameraMatrix, int method, double prob, double threshold, OutputArray _mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat points1, points2, cameraMatrix; _points1.getMat().convertTo(points1, CV_64F); @@ -452,7 +452,7 @@ cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, InputArr cv::Mat cv::findEssentialMat( InputArray _points1, InputArray _points2, double focal, Point2d pp, int method, double prob, double threshold, OutputArray _mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat cameraMatrix = (Mat_(3,3) << focal, 0, pp.x, 0, focal, pp.y, 0, 0, 1); return cv::findEssentialMat(_points1, _points2, cameraMatrix, method, prob, threshold, _mask); @@ -462,7 +462,7 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, InputArray _cameraMatrix, OutputArray _R, OutputArray _t, double distanceThresh, InputOutputArray _mask, OutputArray triangulatedPoints) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat points1, points2, cameraMatrix; _points1.getMat().convertTo(points1, CV_64F); @@ -642,7 +642,7 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, Out void cv::decomposeEssentialMat( InputArray _E, OutputArray _R1, OutputArray _R2, OutputArray _t ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat E = _E.getMat().reshape(1, 3); CV_Assert(E.cols == 3 && E.rows == 3); diff --git a/modules/calib3d/src/fundam.cpp b/modules/calib3d/src/fundam.cpp index e4fa98a1f2..e0693497ad 100644 --- a/modules/calib3d/src/fundam.cpp +++ b/modules/calib3d/src/fundam.cpp @@ -351,7 +351,7 @@ cv::Mat cv::findHomography( InputArray _points1, InputArray _points2, int method, double ransacReprojThreshold, OutputArray _mask, const int maxIters, const double confidence) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const double defaultRANSACReprojThreshold = 3; bool result = false; @@ -764,7 +764,7 @@ cv::Mat cv::findFundamentalMat( InputArray _points1, InputArray _points2, int method, double ransacReprojThreshold, double confidence, OutputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat points1 = _points1.getMat(), points2 = _points2.getMat(); Mat m1, m2, F; @@ -836,7 +836,7 @@ cv::Mat cv::findFundamentalMat( InputArray _points1, InputArray _points2, void cv::computeCorrespondEpilines( InputArray _points, int whichImage, InputArray _Fmat, OutputArray _lines ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double f[9] = {0}; Mat tempF(3, 3, CV_64F, f); @@ -911,7 +911,7 @@ void cv::computeCorrespondEpilines( InputArray _points, int whichImage, void cv::convertPointsFromHomogeneous( InputArray _src, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); if( !src.isContinuous() ) @@ -1012,7 +1012,7 @@ void cv::convertPointsFromHomogeneous( InputArray _src, OutputArray _dst ) void cv::convertPointsToHomogeneous( InputArray _src, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); if( !src.isContinuous() ) @@ -1095,7 +1095,7 @@ void cv::convertPointsToHomogeneous( InputArray _src, OutputArray _dst ) void cv::convertPointsHomogeneous( InputArray _src, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int stype = _src.type(), dtype = _dst.type(); CV_Assert( _dst.fixedType() ); @@ -1108,7 +1108,7 @@ void cv::convertPointsHomogeneous( InputArray _src, OutputArray _dst ) double cv::sampsonDistance(InputArray _pt1, InputArray _pt2, InputArray _F) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(_pt1.type() == CV_64F && _pt2.type() == CV_64F && _F.type() == CV_64F); CV_DbgAssert(_pt1.rows() == 3 && _F.size() == Size(3, 3) && _pt1.rows() == _pt2.rows()); diff --git a/modules/calib3d/src/p3p.cpp b/modules/calib3d/src/p3p.cpp index 49e679c530..7521e6b167 100644 --- a/modules/calib3d/src/p3p.cpp +++ b/modules/calib3d/src/p3p.cpp @@ -33,7 +33,7 @@ p3p::p3p(double _fx, double _fy, double _cx, double _cy) bool p3p::solve(cv::Mat& R, cv::Mat& tvec, const cv::Mat& opoints, const cv::Mat& ipoints) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double rotation_matrix[3][3], translation[3]; std::vector points; @@ -59,7 +59,7 @@ bool p3p::solve(cv::Mat& R, cv::Mat& tvec, const cv::Mat& opoints, const cv::Mat int p3p::solve(std::vector& Rs, std::vector& tvecs, const cv::Mat& opoints, const cv::Mat& ipoints) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double rotation_matrix[4][3][3], translation[4][3]; std::vector points; diff --git a/modules/calib3d/src/ptsetreg.cpp b/modules/calib3d/src/ptsetreg.cpp index fdf2776bf0..4d2e9135d2 100644 --- a/modules/calib3d/src/ptsetreg.cpp +++ b/modules/calib3d/src/ptsetreg.cpp @@ -793,7 +793,7 @@ int estimateAffine3D(InputArray _from, InputArray _to, OutputArray _out, OutputArray _inliers, double ransacThreshold, double confidence) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat from = _from.getMat(), to = _to.getMat(); int count = from.checkVector(3); diff --git a/modules/calib3d/src/quadsubpix.cpp b/modules/calib3d/src/quadsubpix.cpp index a640a67e40..77bc498591 100644 --- a/modules/calib3d/src/quadsubpix.cpp +++ b/modules/calib3d/src/quadsubpix.cpp @@ -163,7 +163,7 @@ static int segment_hist_max(const Mat& hist, int& low_thresh, int& high_thresh) bool cv::find4QuadCornerSubpix(InputArray _img, InputOutputArray _corners, Size region_size) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(), cornersM = _corners.getMat(); int ncorners = cornersM.checkVector(2, CV_32F); diff --git a/modules/calib3d/src/solvepnp.cpp b/modules/calib3d/src/solvepnp.cpp index e783d58c31..c26bca10da 100644 --- a/modules/calib3d/src/solvepnp.cpp +++ b/modules/calib3d/src/solvepnp.cpp @@ -57,7 +57,7 @@ bool solvePnP( InputArray _opoints, InputArray _ipoints, InputArray _cameraMatrix, InputArray _distCoeffs, OutputArray _rvec, OutputArray _tvec, bool useExtrinsicGuess, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat opoints = _opoints.getMat(), ipoints = _ipoints.getMat(); int npoints = std::max(opoints.checkVector(3, CV_32F), opoints.checkVector(3, CV_64F)); @@ -236,7 +236,7 @@ bool solvePnPRansac(InputArray _opoints, InputArray _ipoints, int iterationsCount, float reprojectionError, double confidence, OutputArray _inliers, int flags) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat opoints0 = _opoints.getMat(), ipoints0 = _ipoints.getMat(); Mat opoints, ipoints; @@ -379,7 +379,7 @@ bool solvePnPRansac(InputArray _opoints, InputArray _ipoints, int solveP3P( InputArray _opoints, InputArray _ipoints, InputArray _cameraMatrix, InputArray _distCoeffs, OutputArrayOfArrays _rvecs, OutputArrayOfArrays _tvecs, int flags) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat opoints = _opoints.getMat(), ipoints = _ipoints.getMat(); int npoints = std::max(opoints.checkVector(3, CV_32F), opoints.checkVector(3, CV_64F)); diff --git a/modules/calib3d/src/stereobm.cpp b/modules/calib3d/src/stereobm.cpp index 7aa721dd3d..1b74e9f877 100644 --- a/modules/calib3d/src/stereobm.cpp +++ b/modules/calib3d/src/stereobm.cpp @@ -1101,7 +1101,7 @@ public: void compute( InputArray leftarr, InputArray rightarr, OutputArray disparr ) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int dtype = disparr.fixedType() ? disparr.type() : params.dispType; Size leftsize = leftarr.size(); diff --git a/modules/calib3d/src/stereosgbm.cpp b/modules/calib3d/src/stereosgbm.cpp index 12d3f50bed..cd198885f0 100644 --- a/modules/calib3d/src/stereosgbm.cpp +++ b/modules/calib3d/src/stereosgbm.cpp @@ -2151,7 +2151,7 @@ public: void compute( InputArray leftarr, InputArray rightarr, OutputArray disparr ) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat left = leftarr.getMat(), right = rightarr.getMat(); CV_Assert( left.size() == right.size() && left.type() == right.type() && @@ -2390,7 +2390,7 @@ void filterSpecklesImpl(cv::Mat& img, int newVal, int maxSpeckleSize, int maxDif static bool ipp_filterSpeckles(Mat &img, int maxSpeckleSize, int newVal, int maxDiff, Mat &buffer) { #if IPP_VERSION_X100 >= 810 - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); IppDataType dataType = ippiGetDataType(img.depth()); IppiSize size = ippiSize(img.size()); @@ -2426,7 +2426,7 @@ static bool ipp_filterSpeckles(Mat &img, int maxSpeckleSize, int newVal, int max void cv::filterSpeckles( InputOutputArray _img, double _newval, int maxSpeckleSize, double _maxDiff, InputOutputArray __buf ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(); int type = img.type(); @@ -2446,7 +2446,7 @@ void cv::filterSpeckles( InputOutputArray _img, double _newval, int maxSpeckleSi void cv::validateDisparity( InputOutputArray _disp, InputArray _cost, int minDisparity, int numberOfDisparities, int disp12MaxDiff ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat disp = _disp.getMat(), cost = _cost.getMat(); int cols = disp.cols, rows = disp.rows; diff --git a/modules/calib3d/src/triangulate.cpp b/modules/calib3d/src/triangulate.cpp index 7af40aa582..90eea0100c 100644 --- a/modules/calib3d/src/triangulate.cpp +++ b/modules/calib3d/src/triangulate.cpp @@ -347,7 +347,7 @@ void cv::triangulatePoints( InputArray _projMatr1, InputArray _projMatr2, InputArray _projPoints1, InputArray _projPoints2, OutputArray _points4D ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat matr1 = _projMatr1.getMat(), matr2 = _projMatr2.getMat(); Mat points1 = _projPoints1.getMat(), points2 = _projPoints2.getMat(); @@ -371,7 +371,7 @@ void cv::triangulatePoints( InputArray _projMatr1, InputArray _projMatr2, void cv::correctMatches( InputArray _F, InputArray _points1, InputArray _points2, OutputArray _newPoints1, OutputArray _newPoints2 ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat F = _F.getMat(); Mat points1 = _points1.getMat(), points2 = _points2.getMat(); diff --git a/modules/core/include/opencv2/core/private.hpp b/modules/core/include/opencv2/core/private.hpp index b1d544dc5d..32ca987c45 100644 --- a/modules/core/include/opencv2/core/private.hpp +++ b/modules/core/include/opencv2/core/private.hpp @@ -749,15 +749,15 @@ CV_EXPORTS InstrNode* getCurrentNode(); ///// General instrumentation // General OpenCV region instrumentation macro -#define CV_INSTRUMENT_REGION_() CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_GENERAL, ::cv::instr::IMPL_PLAIN) +#define CV_INSTRUMENT_REGION_(); CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_GENERAL, ::cv::instr::IMPL_PLAIN) // Custom OpenCV region instrumentation macro #define CV_INSTRUMENT_REGION_NAME(NAME) CV_INSTRUMENT_REGION_CUSTOM_META(NAME, false, ::cv::instr::TYPE_GENERAL, ::cv::instr::IMPL_PLAIN) // Instrumentation for parallel_for_ or other regions which forks and gathers threads -#define CV_INSTRUMENT_REGION_MT_FORK() CV_INSTRUMENT_REGION_META(__FUNCTION__, true, ::cv::instr::TYPE_GENERAL, ::cv::instr::IMPL_PLAIN); +#define CV_INSTRUMENT_REGION_MT_FORK(); CV_INSTRUMENT_REGION_META(__FUNCTION__, true, ::cv::instr::TYPE_GENERAL, ::cv::instr::IMPL_PLAIN); ///// IPP instrumentation // Wrapper region instrumentation macro -#define CV_INSTRUMENT_REGION_IPP() CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_WRAPPER, ::cv::instr::IMPL_IPP) +#define CV_INSTRUMENT_REGION_IPP(); CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_WRAPPER, ::cv::instr::IMPL_IPP) // Function instrumentation macro #define CV_INSTRUMENT_FUN_IPP(FUN, ...) CV_INSTRUMENT_FUN_RT_META(::cv::instr::TYPE_FUN, ::cv::instr::IMPL_IPP, status < 0, FUN, __VA_ARGS__) // Diagnostic markers @@ -765,7 +765,7 @@ CV_EXPORTS InstrNode* getCurrentNode(); ///// OpenCL instrumentation // Wrapper region instrumentation macro -#define CV_INSTRUMENT_REGION_OPENCL() CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_WRAPPER, ::cv::instr::IMPL_OPENCL) +#define CV_INSTRUMENT_REGION_OPENCL(); CV_INSTRUMENT_REGION_META(__FUNCTION__, false, ::cv::instr::TYPE_WRAPPER, ::cv::instr::IMPL_OPENCL) // OpenCL kernel compilation wrapper #define CV_INSTRUMENT_REGION_OPENCL_COMPILE(NAME) CV_INSTRUMENT_REGION_META(NAME, false, ::cv::instr::TYPE_WRAPPER, ::cv::instr::IMPL_OPENCL) // OpenCL kernel run wrapper @@ -775,24 +775,24 @@ CV_EXPORTS InstrNode* getCurrentNode(); #else #define CV_INSTRUMENT_REGION_META(...) -#define CV_INSTRUMENT_REGION_() CV_TRACE_FUNCTION() +#define CV_INSTRUMENT_REGION_(); CV_TRACE_FUNCTION() #define CV_INSTRUMENT_REGION_NAME(...) CV_TRACE_REGION(__VA_ARGS__) -#define CV_INSTRUMENT_REGION_MT_FORK() +#define CV_INSTRUMENT_REGION_MT_FORK(); -#define CV_INSTRUMENT_REGION_IPP() CV__TRACE_REGION_("IPP", CV_TRACE_NS::details::REGION_FLAG_IMPL_IPP) +#define CV_INSTRUMENT_REGION_IPP(); CV__TRACE_REGION_("IPP", CV_TRACE_NS::details::REGION_FLAG_IMPL_IPP) #define CV_INSTRUMENT_FUN_IPP(FUN, ...) ((FUN)(__VA_ARGS__)) #define CV_INSTRUMENT_MARK_IPP(...) -#define CV_INSTRUMENT_REGION_OPENCL() CV__TRACE_REGION_("OpenCL", CV_TRACE_NS::details::REGION_FLAG_IMPL_OPENCL) +#define CV_INSTRUMENT_REGION_OPENCL(); CV__TRACE_REGION_("OpenCL", CV_TRACE_NS::details::REGION_FLAG_IMPL_OPENCL) #define CV_INSTRUMENT_REGION_OPENCL_COMPILE(...) #define CV_INSTRUMENT_REGION_OPENCL_RUN(...) #define CV_INSTRUMENT_MARK_OPENCL(...) #endif #ifdef __CV_AVX_GUARD -#define CV_INSTRUMENT_REGION() __CV_AVX_GUARD CV_INSTRUMENT_REGION_() +#define CV_INSTRUMENT_REGION(); __CV_AVX_GUARD CV_INSTRUMENT_REGION_(); #else -#define CV_INSTRUMENT_REGION() CV_INSTRUMENT_REGION_() +#define CV_INSTRUMENT_REGION(); CV_INSTRUMENT_REGION_(); #endif //! @endcond diff --git a/modules/core/src/arithm.cpp b/modules/core/src/arithm.cpp index 7d997b2508..999176bebb 100644 --- a/modules/core/src/arithm.cpp +++ b/modules/core/src/arithm.cpp @@ -369,7 +369,7 @@ static BinaryFuncC* getMinTab() void cv::bitwise_and(InputArray a, InputArray b, OutputArray c, InputArray mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::and8u); binary_op(a, b, c, mask, &f, true, OCL_OP_AND); @@ -377,7 +377,7 @@ void cv::bitwise_and(InputArray a, InputArray b, OutputArray c, InputArray mask) void cv::bitwise_or(InputArray a, InputArray b, OutputArray c, InputArray mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::or8u); binary_op(a, b, c, mask, &f, true, OCL_OP_OR); @@ -385,7 +385,7 @@ void cv::bitwise_or(InputArray a, InputArray b, OutputArray c, InputArray mask) void cv::bitwise_xor(InputArray a, InputArray b, OutputArray c, InputArray mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::xor8u); binary_op(a, b, c, mask, &f, true, OCL_OP_XOR); @@ -393,7 +393,7 @@ void cv::bitwise_xor(InputArray a, InputArray b, OutputArray c, InputArray mask) void cv::bitwise_not(InputArray a, OutputArray c, InputArray mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); BinaryFuncC f = (BinaryFuncC)GET_OPTIMIZED(cv::hal::not8u); binary_op(a, a, c, mask, &f, true, OCL_OP_NOT); @@ -401,21 +401,21 @@ void cv::bitwise_not(InputArray a, OutputArray c, InputArray mask) void cv::max( InputArray src1, InputArray src2, OutputArray dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); binary_op(src1, src2, dst, noArray(), getMaxTab(), false, OCL_OP_MAX ); } void cv::min( InputArray src1, InputArray src2, OutputArray dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); binary_op(src1, src2, dst, noArray(), getMinTab(), false, OCL_OP_MIN ); } void cv::max(const Mat& src1, const Mat& src2, Mat& dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); OutputArray _dst(dst); binary_op(src1, src2, _dst, noArray(), getMaxTab(), false, OCL_OP_MAX ); @@ -423,7 +423,7 @@ void cv::max(const Mat& src1, const Mat& src2, Mat& dst) void cv::min(const Mat& src1, const Mat& src2, Mat& dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); OutputArray _dst(dst); binary_op(src1, src2, _dst, noArray(), getMinTab(), false, OCL_OP_MIN ); @@ -431,7 +431,7 @@ void cv::min(const Mat& src1, const Mat& src2, Mat& dst) void cv::max(const UMat& src1, const UMat& src2, UMat& dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); OutputArray _dst(dst); binary_op(src1, src2, _dst, noArray(), getMaxTab(), false, OCL_OP_MAX ); @@ -439,7 +439,7 @@ void cv::max(const UMat& src1, const UMat& src2, UMat& dst) void cv::min(const UMat& src1, const UMat& src2, UMat& dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); OutputArray _dst(dst); binary_op(src1, src2, _dst, noArray(), getMinTab(), false, OCL_OP_MIN ); @@ -921,7 +921,7 @@ static BinaryFuncC* getAbsDiffTab() void cv::add( InputArray src1, InputArray src2, OutputArray dst, InputArray mask, int dtype ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); arithm_op(src1, src2, dst, mask, dtype, getAddTab(), false, 0, OCL_OP_ADD ); } @@ -929,7 +929,7 @@ void cv::add( InputArray src1, InputArray src2, OutputArray dst, void cv::subtract( InputArray _src1, InputArray _src2, OutputArray _dst, InputArray mask, int dtype ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); #ifdef HAVE_TEGRA_OPTIMIZATION if (tegra::useTegra()) @@ -989,7 +989,7 @@ void cv::subtract( InputArray _src1, InputArray _src2, OutputArray _dst, void cv::absdiff( InputArray src1, InputArray src2, OutputArray dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); arithm_op(src1, src2, dst, noArray(), -1, getAbsDiffTab(), false, 0, OCL_OP_ABSDIFF); } @@ -1042,7 +1042,7 @@ static BinaryFuncC* getRecipTab() void cv::multiply(InputArray src1, InputArray src2, OutputArray dst, double scale, int dtype) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); arithm_op(src1, src2, dst, noArray(), dtype, getMulTab(), true, &scale, std::abs(scale - 1.0) < DBL_EPSILON ? OCL_OP_MUL : OCL_OP_MUL_SCALE); @@ -1051,7 +1051,7 @@ void cv::multiply(InputArray src1, InputArray src2, void cv::divide(InputArray src1, InputArray src2, OutputArray dst, double scale, int dtype) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); arithm_op(src1, src2, dst, noArray(), dtype, getDivTab(), true, &scale, OCL_OP_DIV_SCALE); } @@ -1059,7 +1059,7 @@ void cv::divide(InputArray src1, InputArray src2, void cv::divide(double scale, InputArray src2, OutputArray dst, int dtype) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); arithm_op(src2, src2, dst, noArray(), dtype, getRecipTab(), true, &scale, OCL_OP_RECIP_SCALE); } @@ -1088,7 +1088,7 @@ static BinaryFuncC* getAddWeightedTab() void cv::addWeighted( InputArray src1, double alpha, InputArray src2, double beta, double gamma, OutputArray dst, int dtype ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double scalars[] = {alpha, beta, gamma}; arithm_op(src1, src2, dst, noArray(), dtype, getAddWeightedTab(), true, scalars, OCL_OP_ADDW); @@ -1228,7 +1228,7 @@ static bool ocl_compare(InputArray _src1, InputArray _src2, OutputArray _dst, in void cv::compare(InputArray _src1, InputArray _src2, OutputArray _dst, int op) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( op == CMP_LT || op == CMP_LE || op == CMP_EQ || op == CMP_NE || op == CMP_GE || op == CMP_GT ); @@ -1757,7 +1757,7 @@ static bool ocl_inRange( InputArray _src, InputArray _lowerb, void cv::inRange(InputArray _src, InputArray _lowerb, InputArray _upperb, OutputArray _dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(! _src.empty()); diff --git a/modules/core/src/array.cpp b/modules/core/src/array.cpp index dde8b2606f..4c0d3eb433 100644 --- a/modules/core/src/array.cpp +++ b/modules/core/src/array.cpp @@ -3235,7 +3235,7 @@ void scalarToRawData_(const Scalar& s, T * const buf, const int cn, const int un void scalarToRawData(const Scalar& s, void* _buf, int type, int unroll_to) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const int depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); CV_Assert(cn <= 4); diff --git a/modules/core/src/batch_distance.cpp b/modules/core/src/batch_distance.cpp index a5aeefc348..71d0e9e3ff 100644 --- a/modules/core/src/batch_distance.cpp +++ b/modules/core/src/batch_distance.cpp @@ -267,7 +267,7 @@ void cv::batchDistance( InputArray _src1, InputArray _src2, int normType, int K, InputArray _mask, int update, bool crosscheck ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src1 = _src1.getMat(), src2 = _src2.getMat(), mask = _mask.getMat(); int type = src1.type(); diff --git a/modules/core/src/channels.cpp b/modules/core/src/channels.cpp index 8e88c7d82c..4e464d910c 100644 --- a/modules/core/src/channels.cpp +++ b/modules/core/src/channels.cpp @@ -94,7 +94,7 @@ static MixChannelsFunc getMixchFunc(int depth) void cv::mixChannels( const Mat* src, size_t nsrcs, Mat* dst, size_t ndsts, const int* fromTo, size_t npairs ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( npairs == 0 ) return; @@ -272,7 +272,7 @@ static bool ocl_mixChannels(InputArrayOfArrays _src, InputOutputArrayOfArrays _d void cv::mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst, const int* fromTo, size_t npairs) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (npairs == 0 || fromTo == NULL) return; @@ -305,7 +305,7 @@ void cv::mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst, void cv::mixChannels(InputArrayOfArrays src, InputOutputArrayOfArrays dst, const std::vector& fromTo) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (fromTo.empty()) return; @@ -342,7 +342,7 @@ namespace cv static bool ipp_extractChannel(const Mat &src, Mat &dst, int channel) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); int srcChannels = src.channels(); int dstChannels = dst.channels(); @@ -380,7 +380,7 @@ static bool ipp_extractChannel(const Mat &src, Mat &dst, int channel) static bool ipp_insertChannel(const Mat &src, Mat &dst, int channel) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); int srcChannels = src.channels(); int dstChannels = dst.channels(); @@ -419,7 +419,7 @@ static bool ipp_insertChannel(const Mat &src, Mat &dst, int channel) void cv::extractChannel(InputArray _src, OutputArray _dst, int coi) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); CV_Assert( 0 <= coi && coi < cn ); @@ -447,7 +447,7 @@ void cv::extractChannel(InputArray _src, OutputArray _dst, int coi) void cv::insertChannel(InputArray _src, InputOutputArray _dst, int coi) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype); diff --git a/modules/core/src/convert.cpp b/modules/core/src/convert.cpp index a54f4c1bcd..fe63fa6c3b 100644 --- a/modules/core/src/convert.cpp +++ b/modules/core/src/convert.cpp @@ -414,7 +414,7 @@ static bool ocl_convertFp16( InputArray _src, OutputArray _dst, int sdepth, int void cv::Mat::convertTo(OutputArray _dst, int _type, double alpha, double beta) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( empty() ) { @@ -470,7 +470,7 @@ void cv::Mat::convertTo(OutputArray _dst, int _type, double alpha, double beta) void cv::convertFp16( InputArray _src, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int sdepth = _src.depth(), ddepth = 0; BinaryFunc func = 0; diff --git a/modules/core/src/convert_scale.cpp b/modules/core/src/convert_scale.cpp index 0d4b5151a3..64a98328cf 100644 --- a/modules/core/src/convert_scale.cpp +++ b/modules/core/src/convert_scale.cpp @@ -412,7 +412,7 @@ static bool ocl_convertScaleAbs( InputArray _src, OutputArray _dst, double alpha void cv::convertScaleAbs( InputArray _src, OutputArray _dst, double alpha, double beta ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat(), ocl_convertScaleAbs(_src, _dst, alpha, beta)) @@ -540,7 +540,7 @@ static bool ocl_normalize( InputArray _src, InputOutputArray _dst, InputArray _m void cv::normalize( InputArray _src, InputOutputArray _dst, double a, double b, int norm_type, int rtype, InputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double scale = 1, shift = 0; int type = _src.type(), depth = CV_MAT_DEPTH(type); diff --git a/modules/core/src/copy.cpp b/modules/core/src/copy.cpp index c3f75bb384..321c54b5c3 100644 --- a/modules/core/src/copy.cpp +++ b/modules/core/src/copy.cpp @@ -236,7 +236,7 @@ BinaryFunc getCopyMaskFunc(size_t esz) /* dst = src */ void Mat::copyTo( OutputArray _dst ) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int dtype = _dst.type(); if( _dst.fixedType() && dtype != type() ) @@ -319,7 +319,7 @@ void Mat::copyTo( OutputArray _dst ) const static bool ipp_copyTo(const Mat &src, Mat &dst, const Mat &mask) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); if(mask.channels() > 1 || mask.depth() != CV_8U) return false; @@ -353,7 +353,7 @@ static bool ipp_copyTo(const Mat &src, Mat &dst, const Mat &mask) void Mat::copyTo( OutputArray _dst, InputArray _mask ) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat mask = _mask.getMat(); if( !mask.data ) @@ -409,7 +409,7 @@ void Mat::copyTo( OutputArray _dst, InputArray _mask ) const Mat& Mat::operator = (const Scalar& s) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (this->empty()) return *this; @@ -454,7 +454,7 @@ Mat& Mat::operator = (const Scalar& s) static bool ipp_Mat_setTo_Mat(Mat &dst, Mat &_val, Mat &mask) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); if(mask.empty()) return false; @@ -511,7 +511,7 @@ static bool ipp_Mat_setTo_Mat(Mat &dst, Mat &_val, Mat &mask) Mat& Mat::setTo(InputArray _value, InputArray _mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( empty() ) return *this; @@ -702,7 +702,7 @@ static bool ocl_flip(InputArray _src, OutputArray _dst, int flipCode ) static bool ipp_flip(Mat &src, Mat &dst, int flip_mode) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); IppiAxis ippMode; if(flip_mode < 0) @@ -735,7 +735,7 @@ static bool ipp_flip(Mat &src, Mat &dst, int flip_mode) void flip( InputArray _src, OutputArray _dst, int flip_mode ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( _src.dims() <= 2 ); Size size = _src.size(); @@ -855,7 +855,7 @@ static bool ocl_repeat(InputArray _src, int ny, int nx, OutputArray _dst) void repeat(InputArray _src, int ny, int nx, OutputArray _dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(_src.getObj() != _dst.getObj()); CV_Assert( _src.dims() <= 2 ); @@ -1143,7 +1143,7 @@ static bool ipp_copyMakeBorder( Mat &_src, Mat &_dst, int top, int bottom, int left, int right, int _borderType, const Scalar& value ) { #if defined HAVE_IPP_IW && !IPP_DISABLE_PERF_COPYMAKE - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); ::ipp::IwiBorderSize borderSize(left, top, right, bottom); ::ipp::IwiSize size(_src.cols, _src.rows); @@ -1174,7 +1174,7 @@ static bool ipp_copyMakeBorder( Mat &_src, Mat &_dst, int top, int bottom, void cv::copyMakeBorder( InputArray _src, OutputArray _dst, int top, int bottom, int left, int right, int borderType, const Scalar& value ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( top >= 0 && bottom >= 0 && left >= 0 && right >= 0 ); diff --git a/modules/core/src/count_non_zero.cpp b/modules/core/src/count_non_zero.cpp index 4a2660ec65..202e7b846d 100644 --- a/modules/core/src/count_non_zero.cpp +++ b/modules/core/src/count_non_zero.cpp @@ -232,7 +232,7 @@ static bool ocl_countNonZero( InputArray _src, int & res ) #if defined HAVE_IPP static bool ipp_countNonZero( Mat &src, int &res ) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 < 201801 // Poor performance of SSE42 @@ -292,7 +292,7 @@ static bool ipp_countNonZero( Mat &src, int &res ) int cv::countNonZero( InputArray _src ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src.type(), cn = CV_MAT_CN(type); CV_Assert( cn == 1 ); @@ -326,7 +326,7 @@ int cv::countNonZero( InputArray _src ) void cv::findNonZero( InputArray _src, OutputArray _idx ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); CV_Assert( src.type() == CV_8UC1 ); diff --git a/modules/core/src/dxt.cpp b/modules/core/src/dxt.cpp index e7af47ba93..bfa61d0502 100644 --- a/modules/core/src/dxt.cpp +++ b/modules/core/src/dxt.cpp @@ -1752,7 +1752,7 @@ private: static bool ippi_DFT_C_32F(const uchar * src, size_t src_step, uchar * dst, size_t dst_step, int width, int height, bool inv, int norm_flag) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); IppStatus status; Ipp8u* pBuffer = 0; @@ -1808,7 +1808,7 @@ static bool ippi_DFT_C_32F(const uchar * src, size_t src_step, uchar * dst, size static bool ippi_DFT_R_32F(const uchar * src, size_t src_step, uchar * dst, size_t dst_step, int width, int height, bool inv, int norm_flag) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); IppStatus status; Ipp8u* pBuffer = 0; @@ -3314,7 +3314,7 @@ Ptr DFT2D::create(int width, int height, int depth, void cv::dft( InputArray _src0, OutputArray _dst, int flags, int nonzero_rows ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); #ifdef HAVE_CLAMDFFT CV_OCL_RUN(ocl::haveAmdFft() && ocl::Device::getDefault().type() != ocl::Device::TYPE_CPU && @@ -3364,7 +3364,7 @@ void cv::dft( InputArray _src0, OutputArray _dst, int flags, int nonzero_rows ) void cv::idft( InputArray src, OutputArray dst, int flags, int nonzero_rows ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); dft( src, dst, flags | DFT_INVERSE, nonzero_rows ); } @@ -3529,7 +3529,7 @@ void mulSpectrums_Impl(const T* dataA, const T* dataB, T* dataC, size_t stepA, s void cv::mulSpectrums( InputArray _srcA, InputArray _srcB, OutputArray _dst, int flags, bool conjB ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_dst.isUMat() && _srcA.dims() <= 2 && _srcB.dims() <= 2, ocl_mulSpectrums(_srcA, _srcB, _dst, flags, conjB)) @@ -3941,7 +3941,7 @@ static bool DctIPPLoop(const uchar * src, size_t src_step, uchar * dst, size_t d static bool ippi_DCT_32f(const uchar * src, size_t src_step, uchar * dst, size_t dst_step, int width, int height, bool inv, bool row) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); if(row) return DctIPPLoop(src, src_step, dst, dst_step, width, height, inv); @@ -4236,7 +4236,7 @@ Ptr DCT2D::create(int width, int height, int depth, int flags) void cv::dct( InputArray _src0, OutputArray _dst, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src0 = _src0.getMat(), src = src0; int type = src.type(), depth = src.depth(); @@ -4260,7 +4260,7 @@ void cv::dct( InputArray _src0, OutputArray _dst, int flags ) void cv::idct( InputArray src, OutputArray dst, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); dct( src, dst, flags | DCT_INVERSE ); } diff --git a/modules/core/src/glob.cpp b/modules/core/src/glob.cpp index 651e8fb700..76f20e2c48 100644 --- a/modules/core/src/glob.cpp +++ b/modules/core/src/glob.cpp @@ -171,7 +171,7 @@ static bool isDir(const cv::String& path, DIR* dir) bool cv::utils::fs::isDirectory(const cv::String& path) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return isDir(path, NULL); } @@ -270,7 +270,7 @@ static void glob_rec(const cv::String& directory, const cv::String& wildchart, s void cv::glob(String pattern, std::vector& result, bool recursive) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); result.clear(); String path, wildchart; diff --git a/modules/core/src/kmeans.cpp b/modules/core/src/kmeans.cpp index b94f354732..3f10780cd3 100644 --- a/modules/core/src/kmeans.cpp +++ b/modules/core/src/kmeans.cpp @@ -228,7 +228,7 @@ double cv::kmeans( InputArray _data, int K, TermCriteria criteria, int attempts, int flags, OutputArray _centers ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const int SPP_TRIALS = 3; Mat data0 = _data.getMat(); const bool isrow = data0.rows == 1; diff --git a/modules/core/src/lapack.cpp b/modules/core/src/lapack.cpp index 05d223bb36..d8ceaf6abb 100644 --- a/modules/core/src/lapack.cpp +++ b/modules/core/src/lapack.cpp @@ -67,28 +67,28 @@ namespace cv int LU(float* A, size_t astep, int m, float* b, size_t bstep, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return hal::LU32f(A, astep, m, b, bstep, n); } int LU(double* A, size_t astep, int m, double* b, size_t bstep, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return hal::LU64f(A, astep, m, b, bstep, n); } bool Cholesky(float* A, size_t astep, int m, float* b, size_t bstep, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return hal::Cholesky32f(A, astep, m, b, bstep, n); } bool Cholesky(double* A, size_t astep, int m, double* b, size_t bstep, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return hal::Cholesky64f(A, astep, m, b, bstep, n); } @@ -761,7 +761,7 @@ SVBkSb( int m, int n, const double* w, size_t wstep, double cv::determinant( InputArray _mat ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat mat = _mat.getMat(); double result = 0; @@ -839,7 +839,7 @@ double cv::determinant( InputArray _mat ) double cv::invert( InputArray _src, OutputArray _dst, int method ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); bool result = false; Mat src = _src.getMat(); @@ -1099,7 +1099,7 @@ double cv::invert( InputArray _src, OutputArray _dst, int method ) bool cv::solve( InputArray _src, InputArray _src2arg, OutputArray _dst, int method ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); bool result = true; Mat src = _src.getMat(), _src2 = _src2arg.getMat(); @@ -1398,7 +1398,7 @@ bool cv::solve( InputArray _src, InputArray _src2arg, OutputArray _dst, int meth bool cv::eigen( InputArray _src, OutputArray _evals, OutputArray _evects ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); int type = src.type(); @@ -1550,14 +1550,14 @@ static void _SVDcompute( InputArray _aarr, OutputArray _w, void SVD::compute( InputArray a, OutputArray w, OutputArray u, OutputArray vt, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); _SVDcompute(a, w, u, vt, flags); } void SVD::compute( InputArray a, OutputArray w, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); _SVDcompute(a, w, noArray(), noArray(), flags); } @@ -1607,14 +1607,14 @@ void SVD::backSubst( InputArray rhs, OutputArray dst ) const void cv::SVDecomp(InputArray src, OutputArray w, OutputArray u, OutputArray vt, int flags) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); SVD::compute(src, w, u, vt, flags); } void cv::SVBackSubst(InputArray w, InputArray u, InputArray vt, InputArray rhs, OutputArray dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); SVD::backSubst(w, u, vt, rhs, dst); } diff --git a/modules/core/src/lda.cpp b/modules/core/src/lda.cpp index 5acdb24c62..30728766e2 100644 --- a/modules/core/src/lda.cpp +++ b/modules/core/src/lda.cpp @@ -906,7 +906,7 @@ public: // National Institute of Standards and Technology (NIST). void compute(InputArray src, bool fallbackSymmetric) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if(fallbackSymmetric && isSymmetric(src)) { // Fall back to OpenCV for a symmetric matrix! @@ -944,7 +944,7 @@ public: void eigenNonSymmetric(InputArray _src, OutputArray _evals, OutputArray _evects) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); int type = src.type(); diff --git a/modules/core/src/lut.cpp b/modules/core/src/lut.cpp index 3e91bd9fcb..39f847347e 100644 --- a/modules/core/src/lut.cpp +++ b/modules/core/src/lut.cpp @@ -271,7 +271,7 @@ private: static bool ipp_lut(Mat &src, Mat &lut, Mat &dst) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); int lutcn = lut.channels(); @@ -358,7 +358,7 @@ private: void cv::LUT( InputArray _src, InputArray _lut, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int cn = _src.channels(), depth = _src.depth(); int lutcn = _lut.channels(); diff --git a/modules/core/src/mathfuncs.cpp b/modules/core/src/mathfuncs.cpp index 1bdac5ec98..e8067b5128 100644 --- a/modules/core/src/mathfuncs.cpp +++ b/modules/core/src/mathfuncs.cpp @@ -102,7 +102,7 @@ static bool ocl_math_op(InputArray _src1, InputArray _src2, OutputArray _dst, in \* ************************************************************************** */ float cubeRoot( float value ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); float fr; Cv32suf v, m; @@ -145,7 +145,7 @@ float cubeRoot( float value ) void magnitude( InputArray src1, InputArray src2, OutputArray dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = src1.type(), depth = src1.depth(), cn = src1.channels(); CV_Assert( src1.size() == src2.size() && type == src2.type() && (depth == CV_32F || depth == CV_64F)); @@ -181,7 +181,7 @@ void magnitude( InputArray src1, InputArray src2, OutputArray dst ) void phase( InputArray src1, InputArray src2, OutputArray dst, bool angleInDegrees ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = src1.type(), depth = src1.depth(), cn = src1.channels(); CV_Assert( src1.size() == src2.size() && type == src2.type() && (depth == CV_32F || depth == CV_64F)); @@ -267,7 +267,7 @@ static bool ocl_cartToPolar( InputArray _src1, InputArray _src2, void cartToPolar( InputArray src1, InputArray src2, OutputArray dst1, OutputArray dst2, bool angleInDegrees ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(dst1.isUMat() && dst2.isUMat(), ocl_cartToPolar(src1, src2, dst1, dst2, angleInDegrees)) @@ -501,7 +501,7 @@ static bool ocl_polarToCart( InputArray _mag, InputArray _angle, #ifdef HAVE_IPP static bool ipp_polarToCart(Mat &mag, Mat &angle, Mat &x, Mat &y) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); int depth = angle.depth(); if(depth != CV_32F && depth != CV_64F) @@ -560,7 +560,7 @@ static bool ipp_polarToCart(Mat &mag, Mat &angle, Mat &x, Mat &y) void polarToCart( InputArray src1, InputArray src2, OutputArray dst1, OutputArray dst2, bool angleInDegrees ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = src2.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); CV_Assert((depth == CV_32F || depth == CV_64F) && (src1.empty() || src1.type() == type)); @@ -663,7 +663,7 @@ void polarToCart( InputArray src1, InputArray src2, void exp( InputArray _src, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src.type(), depth = _src.depth(), cn = _src.channels(); CV_Assert( depth == CV_32F || depth == CV_64F ); @@ -696,7 +696,7 @@ void exp( InputArray _src, OutputArray _dst ) void log( InputArray _src, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src.type(), depth = _src.depth(), cn = _src.channels(); CV_Assert( depth == CV_32F || depth == CV_64F ); @@ -1202,7 +1202,7 @@ static bool ocl_pow(InputArray _src, double power, OutputArray _dst, void pow( InputArray _src, double power, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type), ipower = cvRound(power); @@ -1353,7 +1353,7 @@ void pow( InputArray _src, double power, OutputArray _dst ) void sqrt(InputArray a, OutputArray b) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); cv::pow(a, 0.5, b); } @@ -1440,7 +1440,7 @@ check_range_function check_range_functions[] = bool checkRange(InputArray _src, bool quiet, Point* pt, double minVal, double maxVal) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); @@ -1579,7 +1579,7 @@ static bool ocl_patchNaNs( InputOutputArray _a, float value ) void patchNaNs( InputOutputArray _a, double _val ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( _a.depth() == CV_32F ); @@ -1736,7 +1736,7 @@ CV_IMPL int cvCheckArr( const CvArr* arr, int flags, int cv::solveCubic( InputArray _coeffs, OutputArray _roots ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const int n0 = 3; Mat coeffs = _coeffs.getMat(); @@ -1883,7 +1883,7 @@ int cv::solveCubic( InputArray _coeffs, OutputArray _roots ) http://en.wikipedia.org/wiki/Durand%E2%80%93Kerner_method */ double cv::solvePoly( InputArray _coeffs0, OutputArray _roots0, int maxIters ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); typedef Complex C; diff --git a/modules/core/src/mathfuncs_core.dispatch.cpp b/modules/core/src/mathfuncs_core.dispatch.cpp index 64d74bbe34..e48f84ebbe 100644 --- a/modules/core/src/mathfuncs_core.dispatch.cpp +++ b/modules/core/src/mathfuncs_core.dispatch.cpp @@ -13,7 +13,7 @@ namespace cv { namespace hal { void fastAtan32f(const float *Y, const float *X, float *angle, int len, bool angleInDegrees ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(fastAtan32f, cv_hal_fastAtan32f, Y, X, angle, len, angleInDegrees); @@ -23,7 +23,7 @@ void fastAtan32f(const float *Y, const float *X, float *angle, int len, bool ang void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool angleInDegrees) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(fastAtan64f, cv_hal_fastAtan64f, Y, X, angle, len, angleInDegrees); @@ -34,14 +34,14 @@ void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool // deprecated void fastAtan2(const float *Y, const float *X, float *angle, int len, bool angleInDegrees ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); fastAtan32f(Y, X, angle, len, angleInDegrees); } void magnitude32f(const float* x, const float* y, float* mag, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(magnitude32f, cv_hal_magnitude32f, x, y, mag, len); // SSE42 performance issues @@ -53,7 +53,7 @@ void magnitude32f(const float* x, const float* y, float* mag, int len) void magnitude64f(const double* x, const double* y, double* mag, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(magnitude64f, cv_hal_magnitude64f, x, y, mag, len); // SSE42 performance issues @@ -66,7 +66,7 @@ void magnitude64f(const double* x, const double* y, double* mag, int len) void invSqrt32f(const float* src, float* dst, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(invSqrt32f, cv_hal_invSqrt32f, src, dst, len); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsInvSqrt_32f_A21, src, dst, len) >= 0); @@ -78,7 +78,7 @@ void invSqrt32f(const float* src, float* dst, int len) void invSqrt64f(const double* src, double* dst, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(invSqrt64f, cv_hal_invSqrt64f, src, dst, len); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsInvSqrt_64f_A50, src, dst, len) >= 0); @@ -90,7 +90,7 @@ void invSqrt64f(const double* src, double* dst, int len) void sqrt32f(const float* src, float* dst, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(sqrt32f, cv_hal_sqrt32f, src, dst, len); @@ -101,7 +101,7 @@ void sqrt32f(const float* src, float* dst, int len) void sqrt64f(const double* src, double* dst, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(sqrt64f, cv_hal_sqrt64f, src, dst, len); @@ -111,7 +111,7 @@ void sqrt64f(const double* src, double* dst, int len) void exp32f(const float *src, float *dst, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(exp32f, cv_hal_exp32f, src, dst, n); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsExp_32f_A21, src, dst, n) >= 0); @@ -122,7 +122,7 @@ void exp32f(const float *src, float *dst, int n) void exp64f(const double *src, double *dst, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(exp64f, cv_hal_exp64f, src, dst, n); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsExp_64f_A50, src, dst, n) >= 0); @@ -133,7 +133,7 @@ void exp64f(const double *src, double *dst, int n) void log32f(const float *src, float *dst, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(log32f, cv_hal_log32f, src, dst, n); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsLn_32f_A21, src, dst, n) >= 0); @@ -144,7 +144,7 @@ void log32f(const float *src, float *dst, int n) void log64f(const double *src, double *dst, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(log64f, cv_hal_log64f, src, dst, n); CV_IPP_RUN_FAST(CV_INSTRUMENT_FUN_IPP(ippsLn_64f_A50, src, dst, n) >= 0); diff --git a/modules/core/src/mathfuncs_core.simd.hpp b/modules/core/src/mathfuncs_core.simd.hpp index 154b7f213b..239aaca0f7 100644 --- a/modules/core/src/mathfuncs_core.simd.hpp +++ b/modules/core/src/mathfuncs_core.simd.hpp @@ -149,13 +149,13 @@ static void fastAtan32f_(const float *Y, const float *X, float *angle, int len, void fastAtan32f(const float *Y, const float *X, float *angle, int len, bool angleInDegrees ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); fastAtan32f_(Y, X, angle, len, angleInDegrees ); } void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool angleInDegrees) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const int BLKSZ = 128; float ybuf[BLKSZ], xbuf[BLKSZ], abuf[BLKSZ]; @@ -176,13 +176,13 @@ void fastAtan64f(const double *Y, const double *X, double *angle, int len, bool // deprecated void fastAtan2(const float *Y, const float *X, float *angle, int len, bool angleInDegrees ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); fastAtan32f(Y, X, angle, len, angleInDegrees); } void magnitude32f(const float* x, const float* y, float* mag, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int i = 0; @@ -215,7 +215,7 @@ void magnitude32f(const float* x, const float* y, float* mag, int len) void magnitude64f(const double* x, const double* y, double* mag, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int i = 0; @@ -249,7 +249,7 @@ void magnitude64f(const double* x, const double* y, double* mag, int len) void invSqrt32f(const float* src, float* dst, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int i = 0; @@ -278,7 +278,7 @@ void invSqrt32f(const float* src, float* dst, int len) void invSqrt64f(const double* src, double* dst, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int i = 0; #if CV_SIMD_64F @@ -305,7 +305,7 @@ void invSqrt64f(const double* src, double* dst, int len) void sqrt32f(const float* src, float* dst, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int i = 0; @@ -334,7 +334,7 @@ void sqrt32f(const float* src, float* dst, int len) void sqrt64f(const double* src, double* dst, int len) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int i = 0; @@ -366,7 +366,7 @@ void sqrt64f(const double* src, double* dst, int len) #if (defined _MSC_VER && _MSC_VER >= 1900) void exp32f(const float *src, float *dst, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); for (int i = 0; i < n; i++) { @@ -376,7 +376,7 @@ void exp32f(const float *src, float *dst, int n) void exp64f(const double *src, double *dst, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); for (int i = 0; i < n; i++) { @@ -386,7 +386,7 @@ void exp64f(const double *src, double *dst, int n) void log32f(const float *src, float *dst, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); for (int i = 0; i < n; i++) { @@ -395,7 +395,7 @@ void log32f(const float *src, float *dst, int n) } void log64f(const double *src, double *dst, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); for (int i = 0; i < n; i++) { @@ -424,7 +424,7 @@ static const double exp_max_val = 3000.*(1 << EXPTAB_SCALE); // log10(DBL_MAX) < void exp32f( const float *_x, float *y, int n ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const float* const expTab_f = cv::details::getExpTab32f(); @@ -537,7 +537,7 @@ void exp32f( const float *_x, float *y, int n ) void exp64f( const double *_x, double *y, int n ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const double* const expTab = cv::details::getExpTab64f(); @@ -671,7 +671,7 @@ static const double ln_2 = 0.69314718055994530941723212145818; void log32f( const float *_x, float *y, int n ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const float* const logTab_f = cv::details::getLogTab32f(); @@ -742,7 +742,7 @@ void log32f( const float *_x, float *y, int n ) void log64f( const double *x, double *y, int n ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const double* const logTab = cv::details::getLogTab64f(); diff --git a/modules/core/src/matmul.cpp b/modules/core/src/matmul.cpp index 676b390ce0..7cd89c6222 100644 --- a/modules/core/src/matmul.cpp +++ b/modules/core/src/matmul.cpp @@ -896,7 +896,7 @@ static bool ocl_gemm( InputArray matA, InputArray matB, double alpha, static void gemmImpl( Mat A, Mat B, double alpha, Mat C, double beta, Mat D, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const int block_lin_size = 128; const int block_size = block_lin_size * block_lin_size; @@ -2081,7 +2081,7 @@ static TransformFunc getDiagTransformFunc(int depth) void cv::transform( InputArray _src, OutputArray _dst, InputArray _mtx ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(), m = _mtx.getMat(); int depth = src.depth(), scn = src.channels(), dcn = m.rows; @@ -2261,7 +2261,7 @@ perspectiveTransform_64f(const double* src, double* dst, const double* m, int le void cv::perspectiveTransform( InputArray _src, OutputArray _dst, InputArray _mtx ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(), m = _mtx.getMat(); int depth = src.depth(), scn = src.channels(), dcn = m.rows-1; @@ -2408,7 +2408,7 @@ static bool ocl_scaleAdd( InputArray _src1, double alpha, InputArray _src2, Outp void cv::scaleAdd( InputArray _src1, double alpha, InputArray _src2, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src1.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); CV_Assert( type == _src2.type() ); @@ -2455,7 +2455,7 @@ void cv::scaleAdd( InputArray _src1, double alpha, InputArray _src2, OutputArray void cv::calcCovarMatrix( const Mat* data, int nsamples, Mat& covar, Mat& _mean, int flags, int ctype ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert_N( data, nsamples > 0 ); Size size = data[0].size(); @@ -2497,7 +2497,7 @@ void cv::calcCovarMatrix( const Mat* data, int nsamples, Mat& covar, Mat& _mean, void cv::calcCovarMatrix( InputArray _src, OutputArray _covar, InputOutputArray _mean, int flags, int ctype ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if(_src.kind() == _InputArray::STD_VECTOR_MAT || _src.kind() == _InputArray::STD_ARRAY_MAT) { @@ -2586,7 +2586,7 @@ void cv::calcCovarMatrix( InputArray _src, OutputArray _covar, InputOutputArray double cv::Mahalanobis( InputArray _v1, InputArray _v2, InputArray _icovar ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat v1 = _v1.getMat(), v2 = _v2.getMat(), icovar = _icovar.getMat(); int type = v1.type(), depth = v1.depth(); @@ -2878,7 +2878,7 @@ typedef void (*MulTransposedFunc)(const Mat& src, Mat& dst, const Mat& delta, do void cv::mulTransposed( InputArray _src, OutputArray _dst, bool ata, InputArray _delta, double scale, int dtype ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(), delta = _delta.getMat(); const int gemm_level = 100; // boundary above which GEMM is faster. @@ -3286,7 +3286,7 @@ static DotProdFunc getDotProdFunc(int depth) double Mat::dot(InputArray _mat) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat mat = _mat.getMat(); int cn = channels(); diff --git a/modules/core/src/matrix.cpp b/modules/core/src/matrix.cpp index bc4dfc4f62..5edf252c87 100644 --- a/modules/core/src/matrix.cpp +++ b/modules/core/src/matrix.cpp @@ -85,7 +85,7 @@ void MatAllocator::copy(UMatData* usrc, UMatData* udst, int dims, const size_t s const size_t srcofs[], const size_t srcstep[], const size_t dstofs[], const size_t dststep[], bool /*sync*/) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if(!usrc || !udst) return; diff --git a/modules/core/src/matrix_decomp.cpp b/modules/core/src/matrix_decomp.cpp index 7eeb47a16a..1a46a0de0c 100644 --- a/modules/core/src/matrix_decomp.cpp +++ b/modules/core/src/matrix_decomp.cpp @@ -72,7 +72,7 @@ LUImpl(_Tp* A, size_t astep, int m, _Tp* b, size_t bstep, int n, _Tp eps) int LU32f(float* A, size_t astep, int m, float* b, size_t bstep, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int output; CALL_HAL_RET(LU32f, cv_hal_LU32f, output, A, astep, m, b, bstep, n) @@ -83,7 +83,7 @@ int LU32f(float* A, size_t astep, int m, float* b, size_t bstep, int n) int LU64f(double* A, size_t astep, int m, double* b, size_t bstep, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int output; CALL_HAL_RET(LU64f, cv_hal_LU64f, output, A, astep, m, b, bstep, n) @@ -172,7 +172,7 @@ CholImpl(_Tp* A, size_t astep, int m, _Tp* b, size_t bstep, int n) bool Cholesky32f(float* A, size_t astep, int m, float* b, size_t bstep, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); bool output; CALL_HAL_RET(Cholesky32f, cv_hal_Cholesky32f, output, A, astep, m, b, bstep, n) @@ -181,7 +181,7 @@ bool Cholesky32f(float* A, size_t astep, int m, float* b, size_t bstep, int n) bool Cholesky64f(double* A, size_t astep, int m, double* b, size_t bstep, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); bool output; CALL_HAL_RET(Cholesky64f, cv_hal_Cholesky64f, output, A, astep, m, b, bstep, n) @@ -293,7 +293,7 @@ QRImpl(_Tp* A, size_t astep, int m, int n, int k, _Tp* b, size_t bstep, _Tp* hFa int QR32f(float* A, size_t astep, int m, int n, int k, float* b, size_t bstep, float* hFactors) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int output; CALL_HAL_RET(QR32f, cv_hal_QR32f, output, A, astep, m, n, k, b, bstep, hFactors); @@ -303,7 +303,7 @@ int QR32f(float* A, size_t astep, int m, int n, int k, float* b, size_t bstep, f int QR64f(double* A, size_t astep, int m, int n, int k, double* b, size_t bstep, double* hFactors) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int output; CALL_HAL_RET(QR64f, cv_hal_QR64f, output, A, astep, m, n, k, b, bstep, hFactors) diff --git a/modules/core/src/matrix_expressions.cpp b/modules/core/src/matrix_expressions.cpp index 3bb5095ccf..243d6b0397 100644 --- a/modules/core/src/matrix_expressions.cpp +++ b/modules/core/src/matrix_expressions.cpp @@ -296,7 +296,7 @@ void MatOp::augAssignXor(const MatExpr& expr, Mat& m) const void MatOp::add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( this == e2.op ) { @@ -329,7 +329,7 @@ void MatOp::add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const void MatOp::add(const MatExpr& expr1, const Scalar& s, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat m1; expr1.op->assign(expr1, m1); @@ -339,7 +339,7 @@ void MatOp::add(const MatExpr& expr1, const Scalar& s, MatExpr& res) const void MatOp::subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( this == e2.op ) { @@ -372,7 +372,7 @@ void MatOp::subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const void MatOp::subtract(const Scalar& s, const MatExpr& expr, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat m; expr.op->assign(expr, m); @@ -382,7 +382,7 @@ void MatOp::subtract(const Scalar& s, const MatExpr& expr, MatExpr& res) const void MatOp::multiply(const MatExpr& e1, const MatExpr& e2, MatExpr& res, double scale) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( this == e2.op ) { @@ -435,7 +435,7 @@ void MatOp::multiply(const MatExpr& e1, const MatExpr& e2, MatExpr& res, double void MatOp::multiply(const MatExpr& expr, double s, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat m; expr.op->assign(expr, m); @@ -445,7 +445,7 @@ void MatOp::multiply(const MatExpr& expr, double s, MatExpr& res) const void MatOp::divide(const MatExpr& e1, const MatExpr& e2, MatExpr& res, double scale) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( this == e2.op ) { @@ -487,7 +487,7 @@ void MatOp::divide(const MatExpr& e1, const MatExpr& e2, MatExpr& res, double sc void MatOp::divide(double s, const MatExpr& expr, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat m; expr.op->assign(expr, m); @@ -497,7 +497,7 @@ void MatOp::divide(double s, const MatExpr& expr, MatExpr& res) const void MatOp::abs(const MatExpr& expr, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat m; expr.op->assign(expr, m); @@ -507,7 +507,7 @@ void MatOp::abs(const MatExpr& expr, MatExpr& res) const void MatOp::transpose(const MatExpr& expr, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat m; expr.op->assign(expr, m); @@ -573,7 +573,7 @@ Size MatOp::size(const MatExpr& expr) const int MatOp::type(const MatExpr& expr) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return !expr.a.empty() ? expr.a.type() : expr.b.empty() ? expr.b.type() : expr.c.type(); } @@ -1023,7 +1023,7 @@ MatExpr operator > (double s, const Mat& a) MatExpr min(const Mat& a, const Mat& b) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Bin::makeExpr(e, 'm', a, b); @@ -1032,7 +1032,7 @@ MatExpr min(const Mat& a, const Mat& b) MatExpr min(const Mat& a, double s) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Bin::makeExpr(e, 'n', a, s); @@ -1041,7 +1041,7 @@ MatExpr min(const Mat& a, double s) MatExpr min(double s, const Mat& a) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Bin::makeExpr(e, 'n', a, s); @@ -1050,7 +1050,7 @@ MatExpr min(double s, const Mat& a) MatExpr max(const Mat& a, const Mat& b) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Bin::makeExpr(e, 'M', a, b); @@ -1059,7 +1059,7 @@ MatExpr max(const Mat& a, const Mat& b) MatExpr max(const Mat& a, double s) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Bin::makeExpr(e, 'N', a, s); @@ -1068,7 +1068,7 @@ MatExpr max(const Mat& a, double s) MatExpr max(double s, const Mat& a) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Bin::makeExpr(e, 'N', a, s); @@ -1147,7 +1147,7 @@ MatExpr operator ~(const Mat& a) MatExpr abs(const Mat& a) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Bin::makeExpr(e, 'a', a, Scalar()); @@ -1156,7 +1156,7 @@ MatExpr abs(const Mat& a) MatExpr abs(const MatExpr& e) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr en; e.op->abs(e, en); @@ -1180,7 +1180,7 @@ Size MatExpr::size() const int MatExpr::type() const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( isInitializer(*this) ) return a.type(); @@ -1264,7 +1264,7 @@ void MatOp_AddEx::assign(const MatExpr& e, Mat& m, int _type) const void MatOp_AddEx::add(const MatExpr& e, const Scalar& s, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); res = e; res.s += s; @@ -1273,7 +1273,7 @@ void MatOp_AddEx::add(const MatExpr& e, const Scalar& s, MatExpr& res) const void MatOp_AddEx::subtract(const Scalar& s, const MatExpr& e, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); res = e; res.alpha = -res.alpha; @@ -1283,7 +1283,7 @@ void MatOp_AddEx::subtract(const Scalar& s, const MatExpr& e, MatExpr& res) cons void MatOp_AddEx::multiply(const MatExpr& e, double s, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); res = e; res.alpha *= s; @@ -1293,7 +1293,7 @@ void MatOp_AddEx::multiply(const MatExpr& e, double s, MatExpr& res) const void MatOp_AddEx::divide(double s, const MatExpr& e, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( isScaled(e) ) MatOp_Bin::makeExpr(res, '/', e.a, Mat(), s/e.alpha); @@ -1304,7 +1304,7 @@ void MatOp_AddEx::divide(double s, const MatExpr& e, MatExpr& res) const void MatOp_AddEx::transpose(const MatExpr& e, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( isScaled(e) ) MatOp_T::makeExpr(res, e.a, e.alpha); @@ -1314,7 +1314,7 @@ void MatOp_AddEx::transpose(const MatExpr& e, MatExpr& res) const void MatOp_AddEx::abs(const MatExpr& e, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( (!e.b.data || e.beta == 0) && fabs(e.alpha) == 1 ) MatOp_Bin::makeExpr(res, 'a', e.a, -e.s*e.alpha); @@ -1376,7 +1376,7 @@ void MatOp_Bin::assign(const MatExpr& e, Mat& m, int _type) const void MatOp_Bin::multiply(const MatExpr& e, double s, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( e.flags == '*' || e.flags == '/' ) { @@ -1389,7 +1389,7 @@ void MatOp_Bin::multiply(const MatExpr& e, double s, MatExpr& res) const void MatOp_Bin::divide(double s, const MatExpr& e, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( e.flags == '/' && (!e.b.data || e.beta == 0) ) MatOp_AddEx::makeExpr(res, e.a, Mat(), s/e.alpha, 0); @@ -1446,7 +1446,7 @@ void MatOp_T::assign(const MatExpr& e, Mat& m, int _type) const void MatOp_T::multiply(const MatExpr& e, double s, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); res = e; res.alpha *= s; @@ -1454,7 +1454,7 @@ void MatOp_T::multiply(const MatExpr& e, double s, MatExpr& res) const void MatOp_T::transpose(const MatExpr& e, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( e.alpha == 1 ) MatOp_Identity::makeExpr(res, e.a); @@ -1480,7 +1480,7 @@ void MatOp_GEMM::assign(const MatExpr& e, Mat& m, int _type) const void MatOp_GEMM::add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); bool i1 = isIdentity(e1), i2 = isIdentity(e2); double alpha1 = i1 ? 1 : e1.alpha, alpha2 = i2 ? 1 : e2.alpha; @@ -1499,7 +1499,7 @@ void MatOp_GEMM::add(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const void MatOp_GEMM::subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); bool i1 = isIdentity(e1), i2 = isIdentity(e2); double alpha1 = i1 ? 1 : e1.alpha, alpha2 = i2 ? 1 : e2.alpha; @@ -1518,7 +1518,7 @@ void MatOp_GEMM::subtract(const MatExpr& e1, const MatExpr& e2, MatExpr& res) co void MatOp_GEMM::multiply(const MatExpr& e, double s, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); res = e; res.alpha *= s; @@ -1527,7 +1527,7 @@ void MatOp_GEMM::multiply(const MatExpr& e, double s, MatExpr& res) const void MatOp_GEMM::transpose(const MatExpr& e, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); res = e; res.flags = (!(e.flags & CV_GEMM_A_T) ? CV_GEMM_B_T : 0) | @@ -1608,7 +1608,7 @@ void MatOp_Initializer::assign(const MatExpr& e, Mat& m, int _type) const void MatOp_Initializer::multiply(const MatExpr& e, double s, MatExpr& res) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); res = e; res.alpha *= s; @@ -1628,7 +1628,7 @@ inline void MatOp_Initializer::makeExpr(MatExpr& res, int method, int ndims, con MatExpr Mat::t() const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_T::makeExpr(e, *this); @@ -1637,7 +1637,7 @@ MatExpr Mat::t() const MatExpr Mat::inv(int method) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Invert::makeExpr(e, method, *this); @@ -1647,7 +1647,7 @@ MatExpr Mat::inv(int method) const MatExpr Mat::mul(InputArray m, double scale) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; if(m.kind() == _InputArray::EXPR) @@ -1662,7 +1662,7 @@ MatExpr Mat::mul(InputArray m, double scale) const MatExpr Mat::zeros(int rows, int cols, int type) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Initializer::makeExpr(e, '0', Size(cols, rows), type); @@ -1671,7 +1671,7 @@ MatExpr Mat::zeros(int rows, int cols, int type) MatExpr Mat::zeros(Size size, int type) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Initializer::makeExpr(e, '0', size, type); @@ -1680,7 +1680,7 @@ MatExpr Mat::zeros(Size size, int type) MatExpr Mat::zeros(int ndims, const int* sizes, int type) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Initializer::makeExpr(e, '0', ndims, sizes, type); @@ -1689,7 +1689,7 @@ MatExpr Mat::zeros(int ndims, const int* sizes, int type) MatExpr Mat::ones(int rows, int cols, int type) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Initializer::makeExpr(e, '1', Size(cols, rows), type); @@ -1698,7 +1698,7 @@ MatExpr Mat::ones(int rows, int cols, int type) MatExpr Mat::ones(Size size, int type) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Initializer::makeExpr(e, '1', size, type); @@ -1707,7 +1707,7 @@ MatExpr Mat::ones(Size size, int type) MatExpr Mat::ones(int ndims, const int* sizes, int type) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Initializer::makeExpr(e, '1', ndims, sizes, type); @@ -1716,7 +1716,7 @@ MatExpr Mat::ones(int ndims, const int* sizes, int type) MatExpr Mat::eye(int rows, int cols, int type) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Initializer::makeExpr(e, 'I', Size(cols, rows), type); @@ -1725,7 +1725,7 @@ MatExpr Mat::eye(int rows, int cols, int type) MatExpr Mat::eye(Size size, int type) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); MatExpr e; MatOp_Initializer::makeExpr(e, 'I', size, type); diff --git a/modules/core/src/matrix_operations.cpp b/modules/core/src/matrix_operations.cpp index 74d289b683..6d865a51a9 100644 --- a/modules/core/src/matrix_operations.cpp +++ b/modules/core/src/matrix_operations.cpp @@ -47,7 +47,7 @@ void cv::swap( Mat& a, Mat& b ) void cv::hconcat(const Mat* src, size_t nsrc, OutputArray _dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( nsrc == 0 || !src ) { @@ -75,7 +75,7 @@ void cv::hconcat(const Mat* src, size_t nsrc, OutputArray _dst) void cv::hconcat(InputArray src1, InputArray src2, OutputArray dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src[] = {src1.getMat(), src2.getMat()}; hconcat(src, 2, dst); @@ -83,7 +83,7 @@ void cv::hconcat(InputArray src1, InputArray src2, OutputArray dst) void cv::hconcat(InputArray _src, OutputArray dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector src; _src.getMatVector(src); @@ -120,7 +120,7 @@ void cv::vconcat(const Mat* src, size_t nsrc, OutputArray _dst) void cv::vconcat(InputArray src1, InputArray src2, OutputArray dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src[] = {src1.getMat(), src2.getMat()}; vconcat(src, 2, dst); @@ -128,7 +128,7 @@ void cv::vconcat(InputArray src1, InputArray src2, OutputArray dst) void cv::vconcat(InputArray _src, OutputArray dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector src; _src.getMatVector(src); @@ -179,7 +179,7 @@ static bool ocl_setIdentity( InputOutputArray _m, const Scalar& s ) void cv::setIdentity( InputOutputArray _m, const Scalar& s ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( _m.dims() <= 2 ); @@ -226,7 +226,7 @@ void cv::setIdentity( InputOutputArray _m, const Scalar& s ) cv::Scalar cv::trace( InputArray _m ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat m = _m.getMat(); CV_Assert( m.dims <= 2 ); @@ -423,7 +423,7 @@ static bool ocl_transpose( InputArray _src, OutputArray _dst ) #ifdef HAVE_IPP static bool ipp_transpose( Mat &src, Mat &dst ) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); int type = src.type(); typedef IppStatus (CV_STDCALL * IppiTranspose)(const void * pSrc, int srcStep, void * pDst, int dstStep, IppiSize roiSize); @@ -492,7 +492,7 @@ static bool ipp_transpose( Mat &src, Mat &dst ) void cv::transpose( InputArray _src, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src.type(), esz = CV_ELEM_SIZE(type); CV_Assert( _src.dims() <= 2 && esz <= 32 ); @@ -540,7 +540,7 @@ void cv::transpose( InputArray _src, OutputArray _dst ) void cv::completeSymm( InputOutputArray _m, bool LtoR ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat m = _m.getMat(); size_t step = m.step, esz = m.elemSize(); @@ -964,7 +964,7 @@ static bool ocl_reduce(InputArray _src, OutputArray _dst, void cv::reduce(InputArray _src, OutputArray _dst, int dim, int op, int dtype) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( _src.dims() <= 2 ); int op0 = op; @@ -1196,7 +1196,7 @@ static IppSortFunc getSortFunc(int depth, bool sortDescending) static bool ipp_sort(const Mat& src, Mat& dst, int flags) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); bool sortRows = (flags & 1) == CV_SORT_EVERY_ROW; bool sortDescending = (flags & CV_SORT_DESCENDING) != 0; @@ -1342,7 +1342,7 @@ static IppSortIndexFunc getSortIndexFunc(int depth, bool sortDescending) static bool ipp_sortIdx( const Mat& src, Mat& dst, int flags ) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); bool sortRows = (flags & 1) == SORT_EVERY_ROW; bool sortDescending = (flags & SORT_DESCENDING) != 0; @@ -1404,7 +1404,7 @@ typedef void (*SortFunc)(const Mat& src, Mat& dst, int flags); void cv::sort( InputArray _src, OutputArray _dst, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); CV_Assert( src.dims <= 2 && src.channels() == 1 ); @@ -1425,7 +1425,7 @@ void cv::sort( InputArray _src, OutputArray _dst, int flags ) void cv::sortIdx( InputArray _src, OutputArray _dst, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); CV_Assert( src.dims <= 2 && src.channels() == 1 ); diff --git a/modules/core/src/matrix_sparse.cpp b/modules/core/src/matrix_sparse.cpp index a37967c222..61e7e90a56 100644 --- a/modules/core/src/matrix_sparse.cpp +++ b/modules/core/src/matrix_sparse.cpp @@ -615,7 +615,7 @@ void SparseMat::removeNode(size_t hidx, size_t nidx, size_t previdx) // double norm( const SparseMat& src, int normType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); SparseMatConstIterator it = src.begin(); @@ -680,7 +680,7 @@ double norm( const SparseMat& src, int normType ) void minMaxLoc( const SparseMat& src, double* _minval, double* _maxval, int* _minidx, int* _maxidx ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); SparseMatConstIterator it = src.begin(); size_t i, N = src.nzcount(), d = src.hdr ? src.hdr->dims : 0; @@ -747,7 +747,7 @@ void minMaxLoc( const SparseMat& src, double* _minval, double* _maxval, int* _mi void normalize( const SparseMat& src, SparseMat& dst, double a, int norm_type ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double scale = 1; if( norm_type == CV_L2 || norm_type == CV_L1 || norm_type == CV_C ) diff --git a/modules/core/src/mean.cpp b/modules/core/src/mean.cpp index e17875c08b..e0648cab41 100644 --- a/modules/core/src/mean.cpp +++ b/modules/core/src/mean.cpp @@ -13,7 +13,7 @@ namespace cv { static bool ipp_mean( Mat &src, Mat &mask, Scalar &ret ) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 >= 700 size_t total_size = src.total(); @@ -106,7 +106,7 @@ static bool ipp_mean( Mat &src, Mat &mask, Scalar &ret ) cv::Scalar cv::mean( InputArray _src, InputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(), mask = _mask.getMat(); CV_Assert( mask.empty() || mask.type() == CV_8U ); @@ -460,7 +460,7 @@ static SumSqrFunc getSumSqrTab(int depth) #ifdef HAVE_OPENCL static bool ocl_meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, InputArray _mask ) { - CV_INSTRUMENT_REGION_OPENCL() + CV_INSTRUMENT_REGION_OPENCL(); bool haveMask = _mask.kind() != _InputArray::NONE; int nz = haveMask ? -1 : (int)_src.total(); @@ -644,7 +644,7 @@ static bool ocl_meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv #ifdef HAVE_IPP static bool ipp_meanStdDev(Mat& src, OutputArray _mean, OutputArray _sdv, Mat& mask) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 >= 700 int cn = src.channels(); @@ -764,7 +764,7 @@ static bool ipp_meanStdDev(Mat& src, OutputArray _mean, OutputArray _sdv, Mat& m void cv::meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, InputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!_src.empty()); CV_Assert( _mask.empty() || _mask.type() == CV_8UC1 ); diff --git a/modules/core/src/merge.cpp b/modules/core/src/merge.cpp index 300a718506..c701fd4658 100644 --- a/modules/core/src/merge.cpp +++ b/modules/core/src/merge.cpp @@ -229,7 +229,7 @@ namespace cv { static bool ipp_merge(const Mat* mv, Mat& dst, int channels) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); if(channels != 3 && channels != 4) return false; @@ -279,7 +279,7 @@ static bool ipp_merge(const Mat* mv, Mat& dst, int channels) void cv::merge(const Mat* mv, size_t n, OutputArray _dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( mv && n > 0 ); @@ -427,7 +427,7 @@ static bool ocl_merge( InputArrayOfArrays _mv, OutputArray _dst ) void cv::merge(InputArrayOfArrays _mv, OutputArray _dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_mv.isUMatVector() && _dst.isUMat(), ocl_merge(_mv, _dst)) diff --git a/modules/core/src/minmax.cpp b/modules/core/src/minmax.cpp index 4276b22634..7c5b318398 100644 --- a/modules/core/src/minmax.cpp +++ b/modules/core/src/minmax.cpp @@ -579,7 +579,7 @@ typedef IppStatus (*IppMinMaxSelector)(const void* pSrc, int srcStep, IppiSize s static bool ipp_minMaxIdx(Mat &src, double* _minVal, double* _maxVal, int* _minIdx, int* _maxIdx, Mat &mask) { #if IPP_VERSION_X100 >= 700 - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 < 201800 // cv::minMaxIdx problem with NaN input @@ -746,7 +746,7 @@ void cv::minMaxIdx(InputArray _src, double* minVal, double* maxVal, int* minIdx, int* maxIdx, InputArray _mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); CV_Assert( (cn == 1 && (_mask.empty() || _mask.type() == CV_8U)) || @@ -818,7 +818,7 @@ void cv::minMaxIdx(InputArray _src, double* minVal, void cv::minMaxLoc( InputArray _img, double* minVal, double* maxVal, Point* minLoc, Point* maxLoc, InputArray mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(_img.dims() <= 2); diff --git a/modules/core/src/norm.cpp b/modules/core/src/norm.cpp index 8f262291f9..b2ea8d4101 100644 --- a/modules/core/src/norm.cpp +++ b/modules/core/src/norm.cpp @@ -496,7 +496,7 @@ static bool ocl_norm( InputArray _src, int normType, InputArray _mask, double & #ifdef HAVE_IPP static bool ipp_norm(Mat &src, int normType, Mat &mask, double &result) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 >= 700 size_t total_size = src.total(); @@ -625,7 +625,7 @@ static bool ipp_norm(Mat &src, int normType, Mat &mask, double &result) double cv::norm( InputArray _src, int normType, InputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); normType &= NORM_TYPE_MASK; CV_Assert( normType == NORM_INF || normType == NORM_L1 || @@ -857,7 +857,7 @@ namespace cv { static bool ipp_norm(InputArray _src1, InputArray _src2, int normType, InputArray _mask, double &result) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 >= 700 Mat src1 = _src1.getMat(), src2 = _src2.getMat(), mask = _mask.getMat(); @@ -1087,7 +1087,7 @@ static bool ipp_norm(InputArray _src1, InputArray _src2, int normType, InputArra double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( _src1.sameSize(_src2) && _src1.type() == _src2.type() ); @@ -1253,7 +1253,7 @@ cv::Hamming::ResultType cv::Hamming::operator()( const unsigned char* a, const u double cv::PSNR(InputArray _src1, InputArray _src2) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); //Input arrays must have depth CV_8U CV_Assert( _src1.depth() == CV_8U && _src2.depth() == CV_8U ); diff --git a/modules/core/src/ocl.cpp b/modules/core/src/ocl.cpp index 99aae4214b..96e5881a29 100644 --- a/modules/core/src/ocl.cpp +++ b/modules/core/src/ocl.cpp @@ -3091,7 +3091,7 @@ bool Kernel::run(int dims, size_t _globalsize[], size_t _localsize[], bool Kernel::Impl::run(int dims, size_t globalsize[], size_t localsize[], bool sync, int64* timeNS, const Queue& q) { - CV_INSTRUMENT_REGION_OPENCL_RUN(name.c_str()); + CV_INSTRUMENT_REGION_OPENCL_RUN(name.c_str();); if (!handle || isInProgress) return false; diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp index 1fa5956cfd..f693da4c76 100644 --- a/modules/core/src/parallel.cpp +++ b/modules/core/src/parallel.cpp @@ -312,7 +312,7 @@ namespace cv::instr::InstrTLSStruct *pInstrTLS = &cv::instr::getInstrumentTLSStruct(); pInstrTLS->pCurrentNode = ctx.pThreadRoot; // Initialize TLS node for thread } - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); #endif // propagate main thread state @@ -466,7 +466,7 @@ void cv::parallel_for_(const cv::Range& range, const cv::ParallelLoopBody& body, CV_TRACE_ARG_VALUE(nstripes, "nstripes", (int64)nstripes); #endif - CV_INSTRUMENT_REGION_MT_FORK() + CV_INSTRUMENT_REGION_MT_FORK(); if (range.empty()) return; diff --git a/modules/core/src/pca.cpp b/modules/core/src/pca.cpp index 0625419a70..79126a8f36 100644 --- a/modules/core/src/pca.cpp +++ b/modules/core/src/pca.cpp @@ -352,7 +352,7 @@ Mat PCA::backProject(InputArray data) const void cv::PCACompute(InputArray data, InputOutputArray mean, OutputArray eigenvectors, int maxComponents) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); PCA pca; pca(data, mean, 0, maxComponents); @@ -364,7 +364,7 @@ void cv::PCACompute(InputArray data, InputOutputArray mean, OutputArray eigenvectors, OutputArray eigenvalues, int maxComponents) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); PCA pca; pca(data, mean, 0, maxComponents); @@ -376,7 +376,7 @@ void cv::PCACompute(InputArray data, InputOutputArray mean, void cv::PCACompute(InputArray data, InputOutputArray mean, OutputArray eigenvectors, double retainedVariance) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); PCA pca; pca(data, mean, 0, retainedVariance); @@ -388,7 +388,7 @@ void cv::PCACompute(InputArray data, InputOutputArray mean, OutputArray eigenvectors, OutputArray eigenvalues, double retainedVariance) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); PCA pca; pca(data, mean, 0, retainedVariance); @@ -400,7 +400,7 @@ void cv::PCACompute(InputArray data, InputOutputArray mean, void cv::PCAProject(InputArray data, InputArray mean, InputArray eigenvectors, OutputArray result) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); PCA pca; pca.mean = mean.getMat(); @@ -411,7 +411,7 @@ void cv::PCAProject(InputArray data, InputArray mean, void cv::PCABackProject(InputArray data, InputArray mean, InputArray eigenvectors, OutputArray result) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); PCA pca; pca.mean = mean.getMat(); diff --git a/modules/core/src/persistence_cpp.cpp b/modules/core/src/persistence_cpp.cpp index 548df60ebf..b1cef6be95 100644 --- a/modules/core/src/persistence_cpp.cpp +++ b/modules/core/src/persistence_cpp.cpp @@ -56,7 +56,7 @@ FileStorage::~FileStorage() bool FileStorage::open(const String& filename, int flags, const String& encoding) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); release(); fs.reset(cvOpenFileStorage( filename.c_str(), 0, flags, diff --git a/modules/core/src/rand.cpp b/modules/core/src/rand.cpp index e791fd131b..aa952b2448 100644 --- a/modules/core/src/rand.cpp +++ b/modules/core/src/rand.cpp @@ -781,14 +781,14 @@ void cv::setRNGSeed(int seed) void cv::randu(InputOutputArray dst, InputArray low, InputArray high) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); theRNG().fill(dst, RNG::UNIFORM, low, high); } void cv::randn(InputOutputArray dst, InputArray mean, InputArray stddev) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); theRNG().fill(dst, RNG::NORMAL, mean, stddev); } @@ -836,7 +836,7 @@ typedef void (*RandShuffleFunc)( Mat& dst, RNG& rng, double iterFactor ); void cv::randShuffle( InputOutputArray _dst, double iterFactor, RNG* _rng ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); RandShuffleFunc tab[] = { diff --git a/modules/core/src/split.cpp b/modules/core/src/split.cpp index 3fab6874b7..5b56fa0c5a 100644 --- a/modules/core/src/split.cpp +++ b/modules/core/src/split.cpp @@ -237,7 +237,7 @@ namespace cv { static bool ipp_split(const Mat& src, Mat* mv, int channels) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); if(channels != 3 && channels != 4) return false; @@ -287,7 +287,7 @@ static bool ipp_split(const Mat& src, Mat* mv, int channels) void cv::split(const Mat& src, Mat* mv) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int k, depth = src.depth(), cn = src.channels(); if( cn == 1 ) @@ -387,7 +387,7 @@ static bool ocl_split( InputArray _m, OutputArrayOfArrays _mv ) void cv::split(InputArray _m, OutputArrayOfArrays _mv) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_m.dims() <= 2 && _mv.isUMatVector(), ocl_split(_m, _mv)) diff --git a/modules/core/src/stat.dispatch.cpp b/modules/core/src/stat.dispatch.cpp index 025c0929f0..08275fac50 100644 --- a/modules/core/src/stat.dispatch.cpp +++ b/modules/core/src/stat.dispatch.cpp @@ -11,7 +11,7 @@ namespace cv { namespace hal { int normHamming(const uchar* a, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_CPU_DISPATCH(normHamming, (a, n), CV_CPU_DISPATCH_MODES_ALL); @@ -19,7 +19,7 @@ int normHamming(const uchar* a, int n) int normHamming(const uchar* a, const uchar* b, int n) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_CPU_DISPATCH(normHamming, (a, b, n), CV_CPU_DISPATCH_MODES_ALL); diff --git a/modules/core/src/sum.cpp b/modules/core/src/sum.cpp index 519ab1ee0f..30cee85b4c 100644 --- a/modules/core/src/sum.cpp +++ b/modules/core/src/sum.cpp @@ -541,7 +541,7 @@ bool ocl_sum( InputArray _src, Scalar & res, int sum_op, InputArray _mask, #ifdef HAVE_IPP static bool ipp_sum(Mat &src, Scalar &_res) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 >= 700 int cn = src.channels(); @@ -597,7 +597,7 @@ static bool ipp_sum(Mat &src, Scalar &_res) cv::Scalar cv::sum( InputArray _src ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); #if defined HAVE_OPENCL || defined HAVE_IPP Scalar _res; diff --git a/modules/core/src/types.cpp b/modules/core/src/types.cpp index e0521ce04e..15ba83a0f6 100644 --- a/modules/core/src/types.cpp +++ b/modules/core/src/types.cpp @@ -65,7 +65,7 @@ size_t KeyPoint::hash() const void KeyPoint::convert(const std::vector& keypoints, std::vector& points2f, const std::vector& keypointIndexes) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( keypointIndexes.empty() ) { @@ -93,7 +93,7 @@ void KeyPoint::convert(const std::vector& keypoints, std::vector& points2f, std::vector& keypoints, float size, float response, int octave, int class_id ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); keypoints.resize(points2f.size()); for( size_t i = 0; i < points2f.size(); i++ ) diff --git a/modules/core/src/umatrix.cpp b/modules/core/src/umatrix.cpp index 14c03432c1..248b679379 100644 --- a/modules/core/src/umatrix.cpp +++ b/modules/core/src/umatrix.cpp @@ -872,7 +872,7 @@ void UMat::ndoffset(size_t* ofs) const void UMat::copyTo(OutputArray _dst) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int dtype = _dst.type(); if( _dst.fixedType() && dtype != type() ) @@ -918,7 +918,7 @@ void UMat::copyTo(OutputArray _dst) const void UMat::copyTo(OutputArray _dst, InputArray _mask) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( _mask.empty() ) { @@ -967,7 +967,7 @@ void UMat::copyTo(OutputArray _dst, InputArray _mask) const void UMat::convertTo(OutputArray _dst, int _type, double alpha, double beta) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); bool noScale = std::fabs(alpha - 1) < DBL_EPSILON && std::fabs(beta) < DBL_EPSILON; int stype = type(), cn = CV_MAT_CN(stype); @@ -1032,7 +1032,7 @@ void UMat::convertTo(OutputArray _dst, int _type, double alpha, double beta) con UMat& UMat::setTo(InputArray _value, InputArray _mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); bool haveMask = !_mask.empty(); #ifdef HAVE_OPENCL @@ -1172,7 +1172,7 @@ static bool ocl_dot( InputArray _src1, InputArray _src2, double & res ) double UMat::dot(InputArray m) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(m.sameSize(*this) && m.type() == type()); diff --git a/modules/core/src/utils/filesystem.cpp b/modules/core/src/utils/filesystem.cpp index 366cdaf4f3..c58374da61 100644 --- a/modules/core/src/utils/filesystem.cpp +++ b/modules/core/src/utils/filesystem.cpp @@ -87,7 +87,7 @@ cv::String join(const cv::String& base, const cv::String& path) bool exists(const cv::String& path) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); #if defined _WIN32 || defined WINCE BOOL status = TRUE; @@ -150,7 +150,7 @@ CV_EXPORTS void remove_all(const cv::String& path) cv::String getcwd() { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); cv::AutoBuffer buf; #if defined WIN32 || defined _WIN32 || defined WINCE #ifdef WINRT @@ -185,7 +185,7 @@ cv::String getcwd() bool createDirectory(const cv::String& path) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); #if defined WIN32 || defined _WIN32 || defined WINCE #ifdef WINRT wchar_t wpath[MAX_PATH]; diff --git a/modules/features2d/src/agast.cpp b/modules/features2d/src/agast.cpp index 8b63234b29..507ed1b97a 100644 --- a/modules/features2d/src/agast.cpp +++ b/modules/features2d/src/agast.cpp @@ -7936,7 +7936,7 @@ static void OAST_9_16(InputArray _img, std::vector& keypoints, int thr void AGAST(InputArray _img, std::vector& keypoints, int threshold, bool nonmax_suppression) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); AGAST(_img, keypoints, threshold, nonmax_suppression, AgastFeatureDetector::OAST_9_16); } @@ -7950,7 +7950,7 @@ public: void detect( InputArray _image, std::vector& keypoints, InputArray _mask ) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if(_image.empty()) { @@ -8013,7 +8013,7 @@ Ptr AgastFeatureDetector::create( int threshold, bool nonm void AGAST(InputArray _img, std::vector& keypoints, int threshold, bool nonmax_suppression, int type) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector kpts; diff --git a/modules/features2d/src/akaze.cpp b/modules/features2d/src/akaze.cpp index d5cc25d358..49f3c2efa6 100644 --- a/modules/features2d/src/akaze.cpp +++ b/modules/features2d/src/akaze.cpp @@ -167,7 +167,7 @@ namespace cv OutputArray descriptors, bool useProvidedKeypoints) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( ! image.empty() ); diff --git a/modules/features2d/src/bagofwords.cpp b/modules/features2d/src/bagofwords.cpp index 65eef9a0ef..c2d6b754fd 100644 --- a/modules/features2d/src/bagofwords.cpp +++ b/modules/features2d/src/bagofwords.cpp @@ -89,7 +89,7 @@ BOWKMeansTrainer::BOWKMeansTrainer( int _clusterCount, const TermCriteria& _term Mat BOWKMeansTrainer::cluster() const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( !descriptors.empty() ); @@ -108,7 +108,7 @@ BOWKMeansTrainer::~BOWKMeansTrainer() Mat BOWKMeansTrainer::cluster( const Mat& _descriptors ) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat labels, vocabulary; kmeans( _descriptors, clusterCount, labels, termcrit, attempts, flags, vocabulary ); @@ -143,7 +143,7 @@ const Mat& BOWImgDescriptorExtractor::getVocabulary() const void BOWImgDescriptorExtractor::compute( InputArray image, std::vector& keypoints, OutputArray imgDescriptor, std::vector >* pointIdxsOfClusters, Mat* descriptors ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); imgDescriptor.release(); @@ -174,7 +174,7 @@ int BOWImgDescriptorExtractor::descriptorType() const void BOWImgDescriptorExtractor::compute( InputArray keypointDescriptors, OutputArray _imgDescriptor, std::vector >* pointIdxsOfClusters ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( !vocabulary.empty() ); CV_Assert(!keypointDescriptors.empty()); diff --git a/modules/features2d/src/blobdetector.cpp b/modules/features2d/src/blobdetector.cpp index fccf118917..9076c23545 100644 --- a/modules/features2d/src/blobdetector.cpp +++ b/modules/features2d/src/blobdetector.cpp @@ -190,7 +190,7 @@ void SimpleBlobDetectorImpl::write( cv::FileStorage& fs ) const void SimpleBlobDetectorImpl::findBlobs(InputArray _image, InputArray _binaryImage, std::vector
¢ers) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat image = _image.getMat(), binaryImage = _binaryImage.getMat(); CV_UNUSED(image); @@ -308,7 +308,7 @@ void SimpleBlobDetectorImpl::findBlobs(InputArray _image, InputArray _binaryImag void SimpleBlobDetectorImpl::detect(InputArray image, std::vector& keypoints, InputArray mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); keypoints.clear(); CV_Assert(params.minRepeatability != 0); diff --git a/modules/features2d/src/draw.cpp b/modules/features2d/src/draw.cpp index 357662fc81..21d2f35d1b 100644 --- a/modules/features2d/src/draw.cpp +++ b/modules/features2d/src/draw.cpp @@ -91,7 +91,7 @@ static inline void _drawKeypoint( InputOutputArray img, const KeyPoint& p, const void drawKeypoints( InputArray image, const std::vector& keypoints, InputOutputArray outImage, const Scalar& _color, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( !(flags & DrawMatchesFlags::DRAW_OVER_OUTIMG) ) { diff --git a/modules/features2d/src/evaluation.cpp b/modules/features2d/src/evaluation.cpp index f90d655bd7..2c1a446a57 100644 --- a/modules/features2d/src/evaluation.cpp +++ b/modules/features2d/src/evaluation.cpp @@ -179,7 +179,7 @@ void EllipticKeyPoint::calcProjection( const Mat_& H, EllipticKeyPoint& void EllipticKeyPoint::convert( const std::vector& src, std::vector& dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( !src.empty() ) { @@ -196,7 +196,7 @@ void EllipticKeyPoint::convert( const std::vector& src, std::vector& src, std::vector& dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( !src.empty() ) { @@ -460,7 +460,7 @@ void cv::evaluateFeatureDetector( const Mat& img1, const Mat& img2, const Mat& H float& repeatability, int& correspCount, const Ptr& _fdetector ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Ptr fdetector(_fdetector); std::vector *keypoints1, *keypoints2, buf1, buf2; @@ -498,7 +498,7 @@ void cv::computeRecallPrecisionCurve( const std::vector >& m const std::vector >& correctMatches1to2Mask, std::vector& recallPrecisionCurve ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( matches1to2.size() == correctMatches1to2Mask.size() ); @@ -534,7 +534,7 @@ void cv::computeRecallPrecisionCurve( const std::vector >& m float cv::getRecall( const std::vector& recallPrecisionCurve, float l_precision ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int nearestPointIndex = getNearestPoint( recallPrecisionCurve, l_precision ); @@ -548,7 +548,7 @@ float cv::getRecall( const std::vector& recallPrecisionCurve, float l_p int cv::getNearestPoint( const std::vector& recallPrecisionCurve, float l_precision ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int nearestPointIndex = -1; diff --git a/modules/features2d/src/fast.cpp b/modules/features2d/src/fast.cpp index 4a7071bc98..125864d0f8 100644 --- a/modules/features2d/src/fast.cpp +++ b/modules/features2d/src/fast.cpp @@ -474,7 +474,7 @@ static inline int hal_FAST(cv::Mat& src, std::vector& keypoints, int t void FAST(InputArray _img, std::vector& keypoints, int threshold, bool nonmax_suppression, int type) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_img.isUMat() && type == FastFeatureDetector::TYPE_9_16, ocl_FAST(_img, keypoints, threshold, nonmax_suppression, 10000)); @@ -509,7 +509,7 @@ void FAST(InputArray _img, std::vector& keypoints, int threshold, bool void FAST(InputArray _img, std::vector& keypoints, int threshold, bool nonmax_suppression) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); FAST(_img, keypoints, threshold, nonmax_suppression, FastFeatureDetector::TYPE_9_16); } @@ -524,7 +524,7 @@ public: void detect( InputArray _image, std::vector& keypoints, InputArray _mask ) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if(_image.empty()) { diff --git a/modules/features2d/src/feature2d.cpp b/modules/features2d/src/feature2d.cpp index 3cd9909794..0114f87ba7 100644 --- a/modules/features2d/src/feature2d.cpp +++ b/modules/features2d/src/feature2d.cpp @@ -60,7 +60,7 @@ void Feature2D::detect( InputArray image, std::vector& keypoints, InputArray mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( image.empty() ) { @@ -75,7 +75,7 @@ void Feature2D::detect( InputArrayOfArrays _images, std::vector >& keypoints, InputArrayOfArrays _masks ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); vector images, masks; @@ -106,7 +106,7 @@ void Feature2D::compute( InputArray image, std::vector& keypoints, OutputArray descriptors ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( image.empty() ) { @@ -120,7 +120,7 @@ void Feature2D::compute( InputArrayOfArrays _images, std::vector >& keypoints, OutputArrayOfArrays _descriptors ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( !_descriptors.needed() ) return; @@ -149,7 +149,7 @@ void Feature2D::detectAndCompute( InputArray, InputArray, OutputArray, bool ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Error(Error::StsNotImplemented, ""); } diff --git a/modules/features2d/src/gftt.cpp b/modules/features2d/src/gftt.cpp index e4a594a5c6..11ed29f39d 100644 --- a/modules/features2d/src/gftt.cpp +++ b/modules/features2d/src/gftt.cpp @@ -78,7 +78,7 @@ public: void detect( InputArray _image, std::vector& keypoints, InputArray _mask ) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if(_image.empty()) { diff --git a/modules/features2d/src/kaze.cpp b/modules/features2d/src/kaze.cpp index a2c5209eeb..833b92a367 100644 --- a/modules/features2d/src/kaze.cpp +++ b/modules/features2d/src/kaze.cpp @@ -110,7 +110,7 @@ namespace cv OutputArray descriptors, bool useProvidedKeypoints) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); cv::Mat img = image.getMat(); if (img.channels() > 1) diff --git a/modules/features2d/src/kaze/AKAZEFeatures.cpp b/modules/features2d/src/kaze/AKAZEFeatures.cpp index 381800eebd..9b0d8311b0 100644 --- a/modules/features2d/src/kaze/AKAZEFeatures.cpp +++ b/modules/features2d/src/kaze/AKAZEFeatures.cpp @@ -44,7 +44,7 @@ AKAZEFeatures::AKAZEFeatures(const AKAZEOptions& options) : options_(options) { * @brief This method allocates the memory for the nonlinear diffusion evolution */ void AKAZEFeatures::Allocate_Memory_Evolution(void) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); float rfactor = 0.0f; int level_height = 0, level_width = 0; @@ -127,7 +127,7 @@ static inline int getGaussianKernelSize(float sigma) { static inline void nld_step_scalar_one_lane(const Mat& Lt, const Mat& Lf, Mat& Lstep, float step_size, int row_begin, int row_end) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); /* The labeling scheme for this five star stencil: [ a ] [ -1 c +1 ] @@ -277,7 +277,7 @@ ocl_non_linear_diffusion_step(InputArray Lt_, InputArray Lf_, OutputArray Lstep_ static inline void non_linear_diffusion_step(InputArray Lt_, InputArray Lf_, OutputArray Lstep_, float step_size) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Lstep_.create(Lt_.size(), Lt_.type()); @@ -302,7 +302,7 @@ non_linear_diffusion_step(InputArray Lt_, InputArray Lf_, OutputArray Lstep_, fl static inline float compute_kcontrast(InputArray Lx_, InputArray Ly_, float perc, int nbins) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(nbins > 2); CV_Assert(!Lx_.empty()); @@ -379,7 +379,7 @@ ocl_pm_g2(InputArray Lx_, InputArray Ly_, OutputArray Lflow_, float kcontrast) static inline void compute_diffusivity(InputArray Lx, InputArray Ly, OutputArray Lflow, float kcontrast, int diffusivity) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Lflow.create(Lx.size(), Lx.type()); @@ -432,7 +432,7 @@ static inline void create_nonlinear_scale_space(InputArray image, const AKAZEOptions &options, const std::vector > &tsteps_evolution, std::vector > &evolution) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(evolution.size() > 0); // convert input to grayscale float image if needed @@ -575,7 +575,7 @@ ocl_compute_determinant(InputArray Lxx_, InputArray Lxy_, InputArray Lyy_, static inline void compute_determinant(InputArray Lxx_, InputArray Lxy_, InputArray Lyy_, OutputArray Ldet_, float sigma) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Ldet_.create(Lxx_.size(), Lxx_.type()); @@ -647,7 +647,7 @@ private: */ static inline void Compute_Determinant_Hessian_Response(UMatPyramid &evolution) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); DeterminantHessianResponse body (evolution); body(Range(0, (int)evolution.size())); @@ -660,7 +660,7 @@ Compute_Determinant_Hessian_Response(UMatPyramid &evolution) { */ static inline void Compute_Determinant_Hessian_Response(Pyramid &evolution) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); parallel_for_(Range(0, (int)evolution.size()), DeterminantHessianResponse(evolution)); } @@ -673,7 +673,7 @@ Compute_Determinant_Hessian_Response(Pyramid &evolution) { */ void AKAZEFeatures::Feature_Detection(std::vector& kpts) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); kpts.clear(); std::vector keypoints_by_layers; @@ -791,7 +791,7 @@ private: */ void AKAZEFeatures::Find_Scale_Space_Extrema(std::vector& keypoints_by_layers) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); keypoints_by_layers.resize(evolution_.size()); @@ -872,7 +872,7 @@ void AKAZEFeatures::Find_Scale_Space_Extrema(std::vector& keypoints_by_laye void AKAZEFeatures::Do_Subpixel_Refinement( std::vector& keypoints_by_layers, std::vector& output_keypoints) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); for (size_t i = 0; i < keypoints_by_layers.size(); i++) { const MEvolution &e = evolution_[i]; @@ -1185,7 +1185,7 @@ private: */ void AKAZEFeatures::Compute_Descriptors(std::vector& kpts, OutputArray descriptors) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); for(size_t i = 0; i < kpts.size(); i++) { @@ -1466,7 +1466,7 @@ private: */ void AKAZEFeatures::Compute_Keypoints_Orientation(std::vector& kpts) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); parallel_for_(Range(0, (int)kpts.size()), ComputeKeypointOrientation(kpts, evolution_)); } diff --git a/modules/features2d/src/kaze/nldiffusion_functions.cpp b/modules/features2d/src/kaze/nldiffusion_functions.cpp index f87ca172a7..59939a2bbf 100644 --- a/modules/features2d/src/kaze/nldiffusion_functions.cpp +++ b/modules/features2d/src/kaze/nldiffusion_functions.cpp @@ -123,7 +123,7 @@ void pm_g1(InputArray _Lx, InputArray _Ly, OutputArray _dst, float k) { * @param k Contrast factor parameter */ void pm_g2(InputArray _Lx, InputArray _Ly, OutputArray _dst, float k) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); _dst.create(_Lx.size(), _Lx.type()); Mat Lx = _Lx.getMat(); @@ -227,7 +227,7 @@ void charbonnier_diffusivity(InputArray _Lx, InputArray _Ly, OutputArray _dst, f * @return k contrast factor */ float compute_k_percentile(const cv::Mat& img, float perc, float gscale, int nbins, int ksize_x, int ksize_y) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int nbin = 0, nelements = 0, nthreshold = 0, k = 0; float kperc = 0.0, modg = 0.0; @@ -326,7 +326,7 @@ void compute_scharr_derivatives(const cv::Mat& src, cv::Mat& dst, int xorder, in * @param scale_ Scale factor or derivative size */ void compute_derivative_kernels(cv::OutputArray _kx, cv::OutputArray _ky, int dx, int dy, int scale) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int ksize = 3 + 2 * (scale - 1); @@ -424,7 +424,7 @@ private: * dL_by_ds = d(c dL_by_dx)_by_dx + d(c dL_by_dy)_by_dy */ void nld_step_scalar(cv::Mat& Ld, const cv::Mat& c, cv::Mat& Lstep, float stepsize) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); cv::parallel_for_(cv::Range(1, Lstep.rows - 1), Nld_Step_Scalar_Invoker(Ld, c, Lstep, stepsize), (double)Ld.total()/(1 << 16)); diff --git a/modules/features2d/src/keypoint.cpp b/modules/features2d/src/keypoint.cpp index 5fd2f5a729..8b116cbbab 100644 --- a/modules/features2d/src/keypoint.cpp +++ b/modules/features2d/src/keypoint.cpp @@ -156,7 +156,7 @@ private: void KeyPointsFilter::runByPixelsMask( std::vector& keypoints, const Mat& mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( mask.empty() ) return; diff --git a/modules/features2d/src/matchers.cpp b/modules/features2d/src/matchers.cpp index 6bf23f331c..d39afe1ade 100644 --- a/modules/features2d/src/matchers.cpp +++ b/modules/features2d/src/matchers.cpp @@ -576,7 +576,7 @@ void DescriptorMatcher::train() void DescriptorMatcher::match( InputArray queryDescriptors, InputArray trainDescriptors, std::vector& matches, InputArray mask ) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Ptr tempMatcher = clone(true); tempMatcher->add(trainDescriptors); @@ -587,7 +587,7 @@ void DescriptorMatcher::knnMatch( InputArray queryDescriptors, InputArray trainD std::vector >& matches, int knn, InputArray mask, bool compactResult ) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Ptr tempMatcher = clone(true); tempMatcher->add(trainDescriptors); @@ -598,7 +598,7 @@ void DescriptorMatcher::radiusMatch( InputArray queryDescriptors, InputArray tra std::vector >& matches, float maxDistance, InputArray mask, bool compactResult ) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Ptr tempMatcher = clone(true); tempMatcher->add(trainDescriptors); @@ -607,7 +607,7 @@ void DescriptorMatcher::radiusMatch( InputArray queryDescriptors, InputArray tra void DescriptorMatcher::match( InputArray queryDescriptors, std::vector& matches, InputArrayOfArrays masks ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector > knnMatches; knnMatch( queryDescriptors, knnMatches, 1, masks, true /*compactResult*/ ); @@ -639,7 +639,7 @@ void DescriptorMatcher::checkMasks( InputArrayOfArrays _masks, int queryDescript void DescriptorMatcher::knnMatch( InputArray queryDescriptors, std::vector >& matches, int knn, InputArrayOfArrays masks, bool compactResult ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( empty() || queryDescriptors.empty() ) return; @@ -655,7 +655,7 @@ void DescriptorMatcher::knnMatch( InputArray queryDescriptors, std::vector >& matches, float maxDistance, InputArrayOfArrays masks, bool compactResult ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); matches.clear(); if( empty() || queryDescriptors.empty() ) @@ -1151,7 +1151,7 @@ void FlannBasedMatcher::clear() void FlannBasedMatcher::train() { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( !flannIndex || mergedDescriptors.size() < addedDescCount ) { @@ -1407,7 +1407,7 @@ void FlannBasedMatcher::convertToDMatches( const DescriptorCollection& collectio void FlannBasedMatcher::knnMatchImpl( InputArray _queryDescriptors, std::vector >& matches, int knn, InputArrayOfArrays /*masks*/, bool /*compactResult*/ ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat queryDescriptors = _queryDescriptors.getMat(); Mat indices( queryDescriptors.rows, knn, CV_32SC1 ); @@ -1420,7 +1420,7 @@ void FlannBasedMatcher::knnMatchImpl( InputArray _queryDescriptors, std::vector< void FlannBasedMatcher::radiusMatchImpl( InputArray _queryDescriptors, std::vector >& matches, float maxDistance, InputArrayOfArrays /*masks*/, bool /*compactResult*/ ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat queryDescriptors = _queryDescriptors.getMat(); const int count = mergedDescriptors.size(); // TODO do count as param? diff --git a/modules/features2d/src/mser.cpp b/modules/features2d/src/mser.cpp index f37f84a936..85187f7c81 100755 --- a/modules/features2d/src/mser.cpp +++ b/modules/features2d/src/mser.cpp @@ -1036,7 +1036,7 @@ extractMSER_8uC3( const Mat& src, void MSER_Impl::detectRegions( InputArray _src, vector >& msers, vector& bboxes ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); @@ -1074,7 +1074,7 @@ void MSER_Impl::detectRegions( InputArray _src, vector >& msers, v void MSER_Impl::detect( InputArray _image, vector& keypoints, InputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); vector bboxes; vector > msers; diff --git a/modules/features2d/src/orb.cpp b/modules/features2d/src/orb.cpp index d7af7c64cb..e3468af60b 100644 --- a/modules/features2d/src/orb.cpp +++ b/modules/features2d/src/orb.cpp @@ -957,7 +957,7 @@ void ORB_Impl::detectAndCompute( InputArray _image, InputArray _mask, std::vector& keypoints, OutputArray _descriptors, bool useProvidedKeypoints ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(patchSize >= 2); diff --git a/modules/flann/src/miniflann.cpp b/modules/flann/src/miniflann.cpp index 760a426bba..98baaa6a9a 100644 --- a/modules/flann/src/miniflann.cpp +++ b/modules/flann/src/miniflann.cpp @@ -365,7 +365,7 @@ Index::Index(InputArray _data, const IndexParams& params, flann_distance_t _dist void Index::build(InputArray _data, const IndexParams& params, flann_distance_t _distType) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); release(); algo = getParam(params, "algorithm", FLANN_INDEX_LINEAR); @@ -435,7 +435,7 @@ Index::~Index() void Index::release() { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( !index ) return; @@ -570,7 +570,7 @@ static void createIndicesDists(OutputArray _indices, OutputArray _dists, void Index::knnSearch(InputArray _query, OutputArray _indices, OutputArray _dists, int knn, const SearchParams& params) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat query = _query.getMat(), indices, dists; int dtype = distType == FLANN_DIST_HAMMING ? CV_32S : CV_32F; @@ -614,7 +614,7 @@ int Index::radiusSearch(InputArray _query, OutputArray _indices, OutputArray _dists, double radius, int maxResults, const SearchParams& params) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat query = _query.getMat(), indices, dists; int dtype = distType == FLANN_DIST_HAMMING ? CV_32S : CV_32F; @@ -679,7 +679,7 @@ template void saveIndex(const Index* index0, const void* inde void Index::save(const String& filename) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); FILE* fout = fopen(filename.c_str(), "wb"); if (fout == NULL) diff --git a/modules/imgproc/src/accum.cpp b/modules/imgproc/src/accum.cpp index 793e362bdd..39e942e8cd 100644 --- a/modules/imgproc/src/accum.cpp +++ b/modules/imgproc/src/accum.cpp @@ -170,7 +170,7 @@ namespace cv { static bool ipp_accumulate(InputArray _src, InputOutputArray _dst, InputArray _mask) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype); @@ -307,7 +307,7 @@ static bool openvx_accumulate(InputArray _src, InputOutputArray _dst, InputArray void cv::accumulate( InputArray _src, InputOutputArray _dst, InputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype); @@ -345,7 +345,7 @@ namespace cv { static bool ipp_accumulate_square(InputArray _src, InputOutputArray _dst, InputArray _mask) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype); @@ -406,7 +406,7 @@ static bool ipp_accumulate_square(InputArray _src, InputOutputArray _dst, InputA void cv::accumulateSquare( InputArray _src, InputOutputArray _dst, InputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype); @@ -444,7 +444,7 @@ namespace cv static bool ipp_accumulate_product(InputArray _src1, InputArray _src2, InputOutputArray _dst, InputArray _mask) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); int stype = _src1.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype); @@ -511,7 +511,7 @@ static bool ipp_accumulate_product(InputArray _src1, InputArray _src2, void cv::accumulateProduct( InputArray _src1, InputArray _src2, InputOutputArray _dst, InputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int stype = _src1.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype); @@ -547,7 +547,7 @@ namespace cv static bool ipp_accumulate_weighted( InputArray _src, InputOutputArray _dst, double alpha, InputArray _mask ) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype); @@ -611,7 +611,7 @@ static bool ipp_accumulate_weighted( InputArray _src, InputOutputArray _dst, void cv::accumulateWeighted( InputArray _src, InputOutputArray _dst, double alpha, InputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), scn = CV_MAT_CN(stype); int dtype = _dst.type(), ddepth = CV_MAT_DEPTH(dtype), dcn = CV_MAT_CN(dtype); diff --git a/modules/imgproc/src/approx.cpp b/modules/imgproc/src/approx.cpp index 954ebc26a7..8491e81016 100644 --- a/modules/imgproc/src/approx.cpp +++ b/modules/imgproc/src/approx.cpp @@ -675,7 +675,7 @@ approxPolyDP_( const Point_* src_contour, int count0, Point_* dst_contour, void cv::approxPolyDP( InputArray _curve, OutputArray _approxCurve, double epsilon, bool closed ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat curve = _curve.getMat(); int npoints = curve.checkVector(2), depth = curve.depth(); diff --git a/modules/imgproc/src/blend.cpp b/modules/imgproc/src/blend.cpp index b334e14130..1a4ad0d525 100644 --- a/modules/imgproc/src/blend.cpp +++ b/modules/imgproc/src/blend.cpp @@ -375,7 +375,7 @@ static bool ocl_blendLinear( InputArray _src1, InputArray _src2, InputArray _wei void cv::blendLinear( InputArray _src1, InputArray _src2, InputArray _weights1, InputArray _weights2, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src1.type(), depth = CV_MAT_DEPTH(type); Size size = _src1.size(); diff --git a/modules/imgproc/src/canny.cpp b/modules/imgproc/src/canny.cpp index eaea6b2f8f..22c24eaf63 100644 --- a/modules/imgproc/src/canny.cpp +++ b/modules/imgproc/src/canny.cpp @@ -58,7 +58,7 @@ namespace cv static bool ipp_Canny(const Mat& src , const Mat& dx_, const Mat& dy_, Mat& dst, float low, float high, bool L2gradient, int aperture_size) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_DISABLE_PERF_CANNY_MT if(cv::getNumThreads()>1) @@ -139,7 +139,7 @@ template static bool ocl_Canny(InputArray _src, const UMat& dx_, const UMat& dy_, OutputArray _dst, float low_thresh, float high_thresh, int aperture_size, bool L2gradient, int cn, const Size & size) { - CV_INSTRUMENT_REGION_OPENCL() + CV_INSTRUMENT_REGION_OPENCL(); UMat map; @@ -942,7 +942,7 @@ void Canny( InputArray _src, OutputArray _dst, double low_thresh, double high_thresh, int aperture_size, bool L2gradient ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( _src.depth() == CV_8U ); @@ -1056,7 +1056,7 @@ void Canny( InputArray _dx, InputArray _dy, OutputArray _dst, double low_thresh, double high_thresh, bool L2gradient ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(_dx.dims() == 2); CV_Assert(_dx.type() == CV_16SC1 || _dx.type() == CV_16SC3); diff --git a/modules/imgproc/src/clahe.cpp b/modules/imgproc/src/clahe.cpp index 84ea287193..45658ef561 100644 --- a/modules/imgproc/src/clahe.cpp +++ b/modules/imgproc/src/clahe.cpp @@ -346,7 +346,7 @@ namespace void CLAHE_Impl::apply(cv::InputArray _src, cv::OutputArray _dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( _src.type() == CV_8UC1 || _src.type() == CV_16UC1 ); diff --git a/modules/imgproc/src/color.cpp b/modules/imgproc/src/color.cpp index feec9bd19f..38d35c014d 100644 --- a/modules/imgproc/src/color.cpp +++ b/modules/imgproc/src/color.cpp @@ -176,7 +176,7 @@ void cvtColorTwoPlane( InputArray _ysrc, InputArray _uvsrc, OutputArray _dst, in void cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!_src.empty()); diff --git a/modules/imgproc/src/color_hsv.cpp b/modules/imgproc/src/color_hsv.cpp index 94a36f1106..f0a4c87558 100644 --- a/modules/imgproc/src/color_hsv.cpp +++ b/modules/imgproc/src/color_hsv.cpp @@ -1239,7 +1239,7 @@ void cvtBGRtoHSV(const uchar * src_data, size_t src_step, int width, int height, int depth, int scn, bool swapBlue, bool isFullRange, bool isHSV) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGRtoHSV, cv_hal_cvtBGRtoHSV, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue, isFullRange, isHSV); @@ -1326,7 +1326,7 @@ void cvtHSVtoBGR(const uchar * src_data, size_t src_step, int width, int height, int depth, int dcn, bool swapBlue, bool isFullRange, bool isHSV) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtHSVtoBGR, cv_hal_cvtHSVtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue, isFullRange, isHSV); diff --git a/modules/imgproc/src/color_lab.cpp b/modules/imgproc/src/color_lab.cpp index 10640d5e0c..0fff89358c 100644 --- a/modules/imgproc/src/color_lab.cpp +++ b/modules/imgproc/src/color_lab.cpp @@ -4094,7 +4094,7 @@ void cvtBGRtoXYZ(const uchar * src_data, size_t src_step, int width, int height, int depth, int scn, bool swapBlue) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGRtoXYZ, cv_hal_cvtBGRtoXYZ, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue); @@ -4145,7 +4145,7 @@ void cvtXYZtoBGR(const uchar * src_data, size_t src_step, int width, int height, int depth, int dcn, bool swapBlue) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtXYZtoBGR, cv_hal_cvtXYZtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue); @@ -4197,7 +4197,7 @@ void cvtBGRtoLab(const uchar * src_data, size_t src_step, int width, int height, int depth, int scn, bool swapBlue, bool isLab, bool srgb) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGRtoLab, cv_hal_cvtBGRtoLab, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue, isLab, srgb); @@ -4294,7 +4294,7 @@ void cvtLabtoBGR(const uchar * src_data, size_t src_step, int width, int height, int depth, int dcn, bool swapBlue, bool isLab, bool srgb) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtLabtoBGR, cv_hal_cvtLabtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue, isLab, srgb); diff --git a/modules/imgproc/src/color_rgb.cpp b/modules/imgproc/src/color_rgb.cpp index 87aabb7d9e..91a6c34983 100644 --- a/modules/imgproc/src/color_rgb.cpp +++ b/modules/imgproc/src/color_rgb.cpp @@ -1371,7 +1371,7 @@ void cvtBGRtoBGR(const uchar * src_data, size_t src_step, int width, int height, int depth, int scn, int dcn, bool swapBlue) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGRtoBGR, cv_hal_cvtBGRtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, scn, dcn, swapBlue); @@ -1434,7 +1434,7 @@ void cvtBGRtoBGR5x5(const uchar * src_data, size_t src_step, int width, int height, int scn, bool swapBlue, int greenBits) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGRtoBGR5x5, cv_hal_cvtBGRtoBGR5x5, src_data, src_step, dst_data, dst_step, width, height, scn, swapBlue, greenBits); @@ -1447,7 +1447,7 @@ void cvtBGR5x5toBGR(const uchar * src_data, size_t src_step, int width, int height, int dcn, bool swapBlue, int greenBits) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGR5x5toBGR, cv_hal_cvtBGR5x5toBGR, src_data, src_step, dst_data, dst_step, width, height, dcn, swapBlue, greenBits); @@ -1460,7 +1460,7 @@ void cvtBGRtoGray(const uchar * src_data, size_t src_step, int width, int height, int depth, int scn, bool swapBlue) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGRtoGray, cv_hal_cvtBGRtoGray, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue); @@ -1509,7 +1509,7 @@ void cvtGraytoBGR(const uchar * src_data, size_t src_step, int width, int height, int depth, int dcn) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtGraytoBGR, cv_hal_cvtGraytoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn); @@ -1558,7 +1558,7 @@ void cvtBGR5x5toGray(const uchar * src_data, size_t src_step, int width, int height, int greenBits) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGR5x5toGray, cv_hal_cvtBGR5x5toGray, src_data, src_step, dst_data, dst_step, width, height, greenBits); CvtColorLoop(src_data, src_step, dst_data, dst_step, width, height, RGB5x52Gray(greenBits)); @@ -1570,7 +1570,7 @@ void cvtGraytoBGR5x5(const uchar * src_data, size_t src_step, int width, int height, int greenBits) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtGraytoBGR5x5, cv_hal_cvtGraytoBGR5x5, src_data, src_step, dst_data, dst_step, width, height, greenBits); CvtColorLoop(src_data, src_step, dst_data, dst_step, width, height, Gray2RGB5x5(greenBits)); @@ -1580,7 +1580,7 @@ void cvtRGBAtoMultipliedRGBA(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtRGBAtoMultipliedRGBA, cv_hal_cvtRGBAtoMultipliedRGBA, src_data, src_step, dst_data, dst_step, width, height); @@ -1600,7 +1600,7 @@ void cvtMultipliedRGBAtoRGBA(const uchar * src_data, size_t src_step, uchar * dst_data, size_t dst_step, int width, int height) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtMultipliedRGBAtoRGBA, cv_hal_cvtMultipliedRGBAtoRGBA, src_data, src_step, dst_data, dst_step, width, height); CvtColorLoop(src_data, src_step, dst_data, dst_step, width, height, mRGBA2RGBA()); diff --git a/modules/imgproc/src/color_yuv.cpp b/modules/imgproc/src/color_yuv.cpp index aeaf779ae5..f12a92e36e 100644 --- a/modules/imgproc/src/color_yuv.cpp +++ b/modules/imgproc/src/color_yuv.cpp @@ -2268,7 +2268,7 @@ void cvtBGRtoYUV(const uchar * src_data, size_t src_step, int width, int height, int depth, int scn, bool swapBlue, bool isCbCr) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGRtoYUV, cv_hal_cvtBGRtoYUV, src_data, src_step, dst_data, dst_step, width, height, depth, scn, swapBlue, isCbCr); @@ -2321,7 +2321,7 @@ void cvtYUVtoBGR(const uchar * src_data, size_t src_step, int width, int height, int depth, int dcn, bool swapBlue, bool isCbCr) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtYUVtoBGR, cv_hal_cvtYUVtoBGR, src_data, src_step, dst_data, dst_step, width, height, depth, dcn, swapBlue, isCbCr); @@ -2410,7 +2410,7 @@ void cvtThreePlaneYUVtoBGR(const uchar * src_data, size_t src_step, int dst_width, int dst_height, int dcn, bool swapBlue, int uIdx) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtThreePlaneYUVtoBGR, cv_hal_cvtThreePlaneYUVtoBGR, src_data, src_step, dst_data, dst_step, dst_width, dst_height, dcn, swapBlue, uIdx); const uchar* u = src_data + src_step * static_cast(dst_height); @@ -2437,7 +2437,7 @@ void cvtBGRtoThreePlaneYUV(const uchar * src_data, size_t src_step, int width, int height, int scn, bool swapBlue, int uIdx) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtBGRtoThreePlaneYUV, cv_hal_cvtBGRtoThreePlaneYUV, src_data, src_step, dst_data, dst_step, width, height, scn, swapBlue, uIdx); uchar * uv_data = dst_data + dst_step * height; @@ -2460,7 +2460,7 @@ void cvtOnePlaneYUVtoBGR(const uchar * src_data, size_t src_step, int width, int height, int dcn, bool swapBlue, int uIdx, int ycn) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CALL_HAL(cvtOnePlaneYUVtoBGR, cv_hal_cvtOnePlaneYUVtoBGR, src_data, src_step, dst_data, dst_step, width, height, dcn, swapBlue, uIdx, ycn); int blueIdx = swapBlue ? 2 : 0; diff --git a/modules/imgproc/src/colormap.cpp b/modules/imgproc/src/colormap.cpp index 83e4878e5f..8658595300 100644 --- a/modules/imgproc/src/colormap.cpp +++ b/modules/imgproc/src/colormap.cpp @@ -507,7 +507,7 @@ namespace colormap void ColorMap::operator()(InputArray _src, OutputArray _dst) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if(_lut.total() != 256) CV_Error(Error::StsAssert, "cv::LUT only supports tables of size 256."); diff --git a/modules/imgproc/src/contours.cpp b/modules/imgproc/src/contours.cpp index 0ded70f793..f1c3338340 100644 --- a/modules/imgproc/src/contours.cpp +++ b/modules/imgproc/src/contours.cpp @@ -1877,7 +1877,7 @@ cvFindContours( void* img, CvMemStorage* storage, void cv::findContours( InputOutputArray _image, OutputArrayOfArrays _contours, OutputArray _hierarchy, int mode, int method, Point offset ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // Sanity check: output must be of type vector> CV_Assert((_contours.kind() == _InputArray::STD_VECTOR_VECTOR || _contours.kind() == _InputArray::STD_VECTOR_MAT || @@ -1942,7 +1942,7 @@ void cv::findContours( InputOutputArray _image, OutputArrayOfArrays _contours, void cv::findContours( InputOutputArray _image, OutputArrayOfArrays _contours, int mode, int method, Point offset) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); findContours(_image, _contours, noArray(), mode, method, offset); } diff --git a/modules/imgproc/src/convhull.cpp b/modules/imgproc/src/convhull.cpp index e1db7164d1..e288f6a626 100644 --- a/modules/imgproc/src/convhull.cpp +++ b/modules/imgproc/src/convhull.cpp @@ -128,7 +128,7 @@ struct CHullCmpPoints void convexHull( InputArray _points, OutputArray _hull, bool clockwise, bool returnPoints ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(_points.getObj() != _hull.getObj()); Mat points = _points.getMat(); @@ -267,7 +267,7 @@ void convexHull( InputArray _points, OutputArray _hull, bool clockwise, bool ret void convexityDefects( InputArray _points, InputArray _hull, OutputArray _defects ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat points = _points.getMat(); int i, j = 0, npoints = points.checkVector(2, CV_32S); diff --git a/modules/imgproc/src/corner.cpp b/modules/imgproc/src/corner.cpp index 8d1857fa3d..bb259ee218 100644 --- a/modules/imgproc/src/corner.cpp +++ b/modules/imgproc/src/corner.cpp @@ -493,7 +493,7 @@ namespace cv static bool ipp_cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, int ksize, int borderType ) { #if IPP_VERSION_X100 >= 800 - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); Mat src = _src.getMat(); _dst.create( src.size(), CV_32FC1 ); @@ -565,7 +565,7 @@ static bool ipp_cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockS void cv::cornerMinEigenVal( InputArray _src, OutputArray _dst, int blockSize, int ksize, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat(), ocl_cornerMinEigenValVecs(_src, _dst, blockSize, ksize, 0.0, borderType, MINEIGENVAL)) @@ -594,7 +594,7 @@ namespace cv static bool ipp_cornerHarris( Mat &src, Mat &dst, int blockSize, int ksize, double k, int borderType ) { #if IPP_VERSION_X100 >= 810 - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); { int type = src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); @@ -649,7 +649,7 @@ static bool ipp_cornerHarris( Mat &src, Mat &dst, int blockSize, int ksize, doub void cv::cornerHarris( InputArray _src, OutputArray _dst, int blockSize, int ksize, double k, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat(), ocl_cornerMinEigenValVecs(_src, _dst, blockSize, ksize, k, borderType, HARRIS)) @@ -672,7 +672,7 @@ void cv::cornerHarris( InputArray _src, OutputArray _dst, int blockSize, int ksi void cv::cornerEigenValsAndVecs( InputArray _src, OutputArray _dst, int blockSize, int ksize, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); Size dsz = _dst.size(); @@ -687,7 +687,7 @@ void cv::cornerEigenValsAndVecs( InputArray _src, OutputArray _dst, int blockSiz void cv::preCornerDetect( InputArray _src, OutputArray _dst, int ksize, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src.type(); CV_Assert( type == CV_8UC1 || type == CV_32FC1 ); diff --git a/modules/imgproc/src/cornersubpix.cpp b/modules/imgproc/src/cornersubpix.cpp index 9554ae6f82..1e0841271f 100644 --- a/modules/imgproc/src/cornersubpix.cpp +++ b/modules/imgproc/src/cornersubpix.cpp @@ -44,7 +44,7 @@ void cv::cornerSubPix( InputArray _image, InputOutputArray _corners, Size win, Size zeroZone, TermCriteria criteria ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const int MAX_ITERS = 100; int win_w = win.width * 2 + 1, win_h = win.height * 2 + 1; diff --git a/modules/imgproc/src/demosaicing.cpp b/modules/imgproc/src/demosaicing.cpp index f143451079..684ff026d1 100644 --- a/modules/imgproc/src/demosaicing.cpp +++ b/modules/imgproc/src/demosaicing.cpp @@ -1661,7 +1661,7 @@ static void Bayer2RGB_EdgeAware_T(const Mat& src, Mat& dst, int code) void cv::demosaicing(InputArray _src, OutputArray _dst, int code, int dcn) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(), dst; Size sz = src.size(); diff --git a/modules/imgproc/src/deriv.cpp b/modules/imgproc/src/deriv.cpp index 2a1a73d7aa..a2e339c843 100644 --- a/modules/imgproc/src/deriv.cpp +++ b/modules/imgproc/src/deriv.cpp @@ -267,7 +267,7 @@ namespace cv static bool ipp_Deriv(InputArray _src, OutputArray _dst, int dx, int dy, int ksize, double scale, double delta, int borderType) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); ::ipp::IwiSize size(_src.size().width, _src.size().height); IppDataType srcType = ippiGetDataType(_src.depth()); @@ -414,7 +414,7 @@ static bool ocl_sepFilter3x3_8UC1(InputArray _src, OutputArray _dst, int ddepth, void cv::Sobel( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, int ksize, double scale, double delta, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), cn = CV_MAT_CN(stype); if (ddepth < 0) @@ -466,7 +466,7 @@ void cv::Sobel( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, void cv::Scharr( InputArray _src, OutputArray _dst, int ddepth, int dx, int dy, double scale, double delta, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), cn = CV_MAT_CN(stype); if (ddepth < 0) @@ -714,7 +714,7 @@ namespace cv static bool ipp_Laplacian(InputArray _src, OutputArray _dst, int ksize, double scale, double delta, int borderType) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); ::ipp::IwiSize size(_src.size().width, _src.size().height); IppDataType srcType = ippiGetDataType(_src.depth()); @@ -783,7 +783,7 @@ static bool ipp_Laplacian(InputArray _src, OutputArray _dst, int ksize, double s void cv::Laplacian( InputArray _src, OutputArray _dst, int ddepth, int ksize, double scale, double delta, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int stype = _src.type(), sdepth = CV_MAT_DEPTH(stype), cn = CV_MAT_CN(stype); if (ddepth < 0) diff --git a/modules/imgproc/src/distransform.cpp b/modules/imgproc/src/distransform.cpp index 173e79ed85..b4c6ad6486 100644 --- a/modules/imgproc/src/distransform.cpp +++ b/modules/imgproc/src/distransform.cpp @@ -685,7 +685,7 @@ namespace cv { static void distanceTransform_L1_8U(InputArray _src, OutputArray _dst) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); @@ -716,7 +716,7 @@ static void distanceTransform_L1_8U(InputArray _src, OutputArray _dst) void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labels, int distType, int maskSize, int labelType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(), labels; bool need_labels = _labels.needed(); @@ -858,7 +858,7 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe void cv::distanceTransform( InputArray _src, OutputArray _dst, int distanceType, int maskSize, int dstType) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (distanceType == CV_DIST_L1 && dstType==CV_8U) distanceTransform_L1_8U(_src, _dst); diff --git a/modules/imgproc/src/drawing.cpp b/modules/imgproc/src/drawing.cpp index 4dff2ec32c..054345b54a 100644 --- a/modules/imgproc/src/drawing.cpp +++ b/modules/imgproc/src/drawing.cpp @@ -91,7 +91,7 @@ bool clipLine( Size img_size, Point& pt1, Point& pt2 ) bool clipLine( Size2l img_size, Point2l& pt1, Point2l& pt2 ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int c1, c2; int64 right = img_size.width-1, bottom = img_size.height-1; @@ -146,7 +146,7 @@ bool clipLine( Size2l img_size, Point2l& pt1, Point2l& pt2 ) bool clipLine( Rect img_rect, Point& pt1, Point& pt2 ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Point tl = img_rect.tl(); pt1 -= tl; pt2 -= tl; @@ -959,7 +959,7 @@ void ellipse2Poly( Point2d center, Size2d axes, int angle, int arc_start, int arc_end, int delta, std::vector& pts ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); float alpha, beta; int i; @@ -1801,7 +1801,7 @@ void drawMarker(Mat& img, Point position, const Scalar& color, int markerType, i void line( InputOutputArray _img, Point pt1, Point pt2, const Scalar& color, int thickness, int line_type, int shift ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(); @@ -1819,7 +1819,7 @@ void line( InputOutputArray _img, Point pt1, Point pt2, const Scalar& color, void arrowedLine(InputOutputArray img, Point pt1, Point pt2, const Scalar& color, int thickness, int line_type, int shift, double tipLength) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const double tipSize = norm(pt1-pt2)*tipLength; // Factor to normalize the size of the tip depending on the length of the arrow @@ -1840,7 +1840,7 @@ void rectangle( InputOutputArray _img, Point pt1, Point pt2, const Scalar& color, int thickness, int lineType, int shift ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(); @@ -1873,7 +1873,7 @@ void rectangle( Mat& img, Rect rec, const Scalar& color, int thickness, int lineType, int shift ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( 0 <= shift && shift <= XY_SHIFT ); if( rec.area() > 0 ) @@ -1885,7 +1885,7 @@ void rectangle( Mat& img, Rect rec, void circle( InputOutputArray _img, Point center, int radius, const Scalar& color, int thickness, int line_type, int shift ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(); @@ -1917,7 +1917,7 @@ void ellipse( InputOutputArray _img, Point center, Size axes, double angle, double start_angle, double end_angle, const Scalar& color, int thickness, int line_type, int shift ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(); @@ -1947,7 +1947,7 @@ void ellipse( InputOutputArray _img, Point center, Size axes, void ellipse(InputOutputArray _img, const RotatedRect& box, const Scalar& color, int thickness, int lineType) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(); @@ -1975,7 +1975,7 @@ void ellipse(InputOutputArray _img, const RotatedRect& box, const Scalar& color, void fillConvexPoly( Mat& img, const Point* pts, int npts, const Scalar& color, int line_type, int shift ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( !pts || npts <= 0 ) return; @@ -1995,7 +1995,7 @@ void fillPoly( Mat& img, const Point** pts, const int* npts, int ncontours, const Scalar& color, int line_type, int shift, Point offset ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( line_type == CV_AA && img.depth() != CV_8U ) line_type = 8; @@ -2025,7 +2025,7 @@ void fillPoly( Mat& img, const Point** pts, const int* npts, int ncontours, void polylines( Mat& img, const Point* const* pts, const int* npts, int ncontours, bool isClosed, const Scalar& color, int thickness, int line_type, int shift ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( line_type == CV_AA && img.depth() != CV_8U ) line_type = 8; @@ -2265,7 +2265,7 @@ void putText( InputOutputArray _img, const String& text, Point org, int thickness, int line_type, bool bottomLeftOrigin ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if ( text.empty() ) { @@ -2375,7 +2375,7 @@ double getFontScaleFromHeight(const int fontFace, const int pixelHeight, const i void cv::fillConvexPoly(InputOutputArray _img, InputArray _points, const Scalar& color, int lineType, int shift) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(), points = _points.getMat(); CV_Assert(points.checkVector(2, CV_32S) >= 0); @@ -2386,7 +2386,7 @@ void cv::fillConvexPoly(InputOutputArray _img, InputArray _points, void cv::fillPoly(InputOutputArray _img, InputArrayOfArrays pts, const Scalar& color, int lineType, int shift, Point offset) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(); int i, ncontours = (int)pts.total(); @@ -2412,7 +2412,7 @@ void cv::polylines(InputOutputArray _img, InputArrayOfArrays pts, bool isClosed, const Scalar& color, int thickness, int lineType, int shift ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(); bool manyContours = pts.kind() == _InputArray::STD_VECTOR_VECTOR || @@ -2476,7 +2476,7 @@ void cv::drawContours( InputOutputArray _image, InputArrayOfArrays _contours, int lineType, InputArray _hierarchy, int maxLevel, Point offset ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat image = _image.getMat(), hierarchy = _hierarchy.getMat(); CvMat _cimage = cvMat(image); diff --git a/modules/imgproc/src/emd.cpp b/modules/imgproc/src/emd.cpp index ad74990ce9..20ab6feafb 100644 --- a/modules/imgproc/src/emd.cpp +++ b/modules/imgproc/src/emd.cpp @@ -1151,7 +1151,7 @@ float cv::EMD( InputArray _signature1, InputArray _signature2, int distType, InputArray _cost, float* lowerBound, OutputArray _flow ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat signature1 = _signature1.getMat(), signature2 = _signature2.getMat(); Mat cost = _cost.getMat(), flow; diff --git a/modules/imgproc/src/featureselect.cpp b/modules/imgproc/src/featureselect.cpp index 6093d431bd..1500387b80 100644 --- a/modules/imgproc/src/featureselect.cpp +++ b/modules/imgproc/src/featureselect.cpp @@ -363,7 +363,7 @@ void cv::goodFeaturesToTrack( InputArray _image, OutputArray _corners, InputArray _mask, int blockSize, int gradientSize, bool useHarrisDetector, double harrisK ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( qualityLevel > 0 && minDistance >= 0 && maxCorners >= 0 ); CV_Assert( _mask.empty() || (_mask.type() == CV_8UC1 && _mask.sameSize(_image)) ); diff --git a/modules/imgproc/src/filter.cpp b/modules/imgproc/src/filter.cpp index 79c752bdd3..5fd3f3eb95 100644 --- a/modules/imgproc/src/filter.cpp +++ b/modules/imgproc/src/filter.cpp @@ -383,7 +383,7 @@ int FilterEngine::proceed( const uchar* src, int srcstep, int count, void FilterEngine::apply(const Mat& src, Mat& dst, const Size & wsz, const Point & ofs) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( src.type() == srcType && dst.type() == dstType ); @@ -1426,7 +1426,7 @@ private: mutable int bufsz; int ippiOperator(const uchar* _src, uchar* _dst, int width, int cn) const { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); int _ksize = kernel.rows + kernel.cols - 1; if ((1 != cn && 3 != cn) || width < _ksize*8) @@ -4895,7 +4895,7 @@ void cv::filter2D( InputArray _src, OutputArray _dst, int ddepth, InputArray _kernel, Point anchor0, double delta, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_dst.isUMat() && _src.dims() <= 2, ocl_filter2D(_src, _dst, ddepth, _kernel, anchor0, delta, borderType)) @@ -4926,7 +4926,7 @@ void cv::sepFilter2D( InputArray _src, OutputArray _dst, int ddepth, InputArray _kernelX, InputArray _kernelY, Point anchor, double delta, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_dst.isUMat() && _src.dims() <= 2 && (size_t)_src.rows() > _kernelY.total() && (size_t)_src.cols() > _kernelX.total(), ocl_sepFilter2D(_src, _dst, ddepth, _kernelX, _kernelY, anchor, delta, borderType)) diff --git a/modules/imgproc/src/floodfill.cpp b/modules/imgproc/src/floodfill.cpp index da69e29969..2816795bc6 100644 --- a/modules/imgproc/src/floodfill.cpp +++ b/modules/imgproc/src/floodfill.cpp @@ -459,7 +459,7 @@ int cv::floodFill( InputOutputArray _image, InputOutputArray _mask, Point seedPoint, Scalar newVal, Rect* rect, Scalar loDiff, Scalar upDiff, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); ConnectedComp comp; std::vector buffer; @@ -630,7 +630,7 @@ int cv::floodFill( InputOutputArray _image, Point seedPoint, Scalar newVal, Rect* rect, Scalar loDiff, Scalar upDiff, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return floodFill(_image, Mat(), seedPoint, newVal, rect, loDiff, upDiff, flags); } diff --git a/modules/imgproc/src/generalized_hough.cpp b/modules/imgproc/src/generalized_hough.cpp index 027e67a77e..e58f7dbeb5 100644 --- a/modules/imgproc/src/generalized_hough.cpp +++ b/modules/imgproc/src/generalized_hough.cpp @@ -419,7 +419,7 @@ namespace void GeneralizedHoughBallardImpl::calcHist() { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( imageEdges_.type() == CV_8UC1 ); CV_Assert( imageDx_.type() == CV_32FC1 && imageDx_.size() == imageSize_); diff --git a/modules/imgproc/src/geometry.cpp b/modules/imgproc/src/geometry.cpp index 2e602ed580..c338431b4f 100644 --- a/modules/imgproc/src/geometry.cpp +++ b/modules/imgproc/src/geometry.cpp @@ -94,7 +94,7 @@ cvBoxPoints( CvBox2D box, CvPoint2D32f pt[4] ) double cv::pointPolygonTest( InputArray _contour, Point2f pt, bool measureDist ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double result = 0; Mat contour = _contour.getMat(); @@ -506,7 +506,7 @@ static int intersectConvexConvex_( const Point2f* P, int n, const Point2f* Q, in float cv::intersectConvexConvex( InputArray _p1, InputArray _p2, OutputArray _p12, bool handleNested ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat p1 = _p1.getMat(), p2 = _p2.getMat(); CV_Assert( p1.depth() == CV_32S || p1.depth() == CV_32F ); diff --git a/modules/imgproc/src/grabcut.cpp b/modules/imgproc/src/grabcut.cpp index 21dace9072..9cfbe0dd0e 100644 --- a/modules/imgproc/src/grabcut.cpp +++ b/modules/imgproc/src/grabcut.cpp @@ -531,7 +531,7 @@ void cv::grabCut( InputArray _img, InputOutputArray _mask, Rect rect, InputOutputArray _bgdModel, InputOutputArray _fgdModel, int iterCount, int mode ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(); Mat& mask = _mask.getMatRef(); diff --git a/modules/imgproc/src/histogram.cpp b/modules/imgproc/src/histogram.cpp index b420453405..59384fce7d 100644 --- a/modules/imgproc/src/histogram.cpp +++ b/modules/imgproc/src/histogram.cpp @@ -661,7 +661,7 @@ public: virtual void operator() (const Range & range) const CV_OVERRIDE { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); if(!m_ok) return; @@ -813,7 +813,7 @@ namespace cv { static bool ipp_calchist(const Mat &image, Mat &hist, int histSize, const float** ranges, bool uniform, bool accumulate) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 < 201801 // No SSE42 optimization for uniform 32f @@ -862,7 +862,7 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels, InputArray _mask, OutputArray _hist, int dims, const int* histSize, const float** ranges, bool uniform, bool accumulate ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OVX_RUN( images && histSize && @@ -1172,7 +1172,7 @@ void cv::calcHist( const Mat* images, int nimages, const int* channels, InputArray _mask, SparseMat& hist, int dims, const int* histSize, const float** ranges, bool uniform, bool accumulate ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat mask = _mask.getMat(); calcHist( images, nimages, channels, mask, hist, dims, histSize, @@ -1186,7 +1186,7 @@ void cv::calcHist( InputArrayOfArrays images, const std::vector& channels, const std::vector& ranges, bool accumulate ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(images.total() == 1 && channels.size() == 1 && images.channels(0) == 1 && channels[0] == 0 && images.isUMatVector() && mask.empty() && !accumulate && @@ -1519,7 +1519,7 @@ void cv::calcBackProject( const Mat* images, int nimages, const int* channels, InputArray _hist, OutputArray _backProject, const float** ranges, double scale, bool uniform ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat hist = _hist.getMat(); std::vector ptrs; @@ -1688,7 +1688,7 @@ void cv::calcBackProject( const Mat* images, int nimages, const int* channels, const SparseMat& hist, OutputArray _backProject, const float** ranges, double scale, bool uniform ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector ptrs; std::vector deltas; @@ -1868,7 +1868,7 @@ void cv::calcBackProject( InputArrayOfArrays images, const std::vector& cha const std::vector& ranges, double scale ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (hist.dims() <= 2) { #ifdef HAVE_OPENCL @@ -1923,7 +1923,7 @@ void cv::calcBackProject( InputArrayOfArrays images, const std::vector& cha double cv::compareHist( InputArray _H1, InputArray _H2, int method ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat H1 = _H1.getMat(), H2 = _H2.getMat(); const Mat* arrays[] = {&H1, &H2, 0}; @@ -2131,7 +2131,7 @@ double cv::compareHist( InputArray _H1, InputArray _H2, int method ) double cv::compareHist( const SparseMat& H1, const SparseMat& H2, int method ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double result = 0; int i, dims = H1.dims(); @@ -3329,7 +3329,7 @@ static bool openvx_equalize_hist(Mat srcMat, Mat dstMat) void cv::equalizeHist( InputArray _src, OutputArray _dst ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( _src.type() == CV_8UC1 ); diff --git a/modules/imgproc/src/hough.cpp b/modules/imgproc/src/hough.cpp index 36f2f6739f..eb4acdad49 100644 --- a/modules/imgproc/src/hough.cpp +++ b/modules/imgproc/src/hough.cpp @@ -895,7 +895,7 @@ void HoughLines( InputArray _image, OutputArray lines, double rho, double theta, int threshold, double srn, double stn, double min_theta, double max_theta ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = CV_32FC2; if (lines.fixedType()) @@ -918,7 +918,7 @@ void HoughLinesP(InputArray _image, OutputArray _lines, double rho, double theta, int threshold, double minLineLength, double maxGap ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_image.isUMat() && _lines.isUMat(), ocl_HoughLinesP(_image, _lines, rho, theta, threshold, minLineLength, maxGap)); @@ -1724,7 +1724,7 @@ static void HoughCircles( InputArray _image, OutputArray _circles, int minRadius, int maxRadius, int maxCircles, double param3 ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = CV_32FC3; if( _circles.fixedType() ) diff --git a/modules/imgproc/src/imgwarp.cpp b/modules/imgproc/src/imgwarp.cpp index ad090fd247..02de44a129 100644 --- a/modules/imgproc/src/imgwarp.cpp +++ b/modules/imgproc/src/imgwarp.cpp @@ -67,7 +67,7 @@ typedef IppStatus (CV_STDCALL* ippiSetFunc)(const void*, void *, int, IppiSize); template bool IPPSetSimple(cv::Scalar value, void *dataPointer, int step, IppiSize &size, ippiSetFunc func) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); Type values[channels]; for( int i = 0; i < channels; i++ ) @@ -77,7 +77,7 @@ bool IPPSetSimple(cv::Scalar value, void *dataPointer, int step, IppiSize &size, static bool IPPSet(const cv::Scalar &value, void *dataPointer, int step, IppiSize &size, int channels, int depth) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); if( channels == 1 ) { @@ -1670,7 +1670,7 @@ void cv::remap( InputArray _src, OutputArray _dst, InputArray _map1, InputArray _map2, int interpolation, int borderType, const Scalar& borderValue ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); static RemapNNFunc nn_tab[] = { @@ -1832,7 +1832,7 @@ void cv::convertMaps( InputArray _map1, InputArray _map2, OutputArray _dstmap1, OutputArray _dstmap2, int dstm1type, bool nninterpolate ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat map1 = _map1.getMat(), map2 = _map2.getMat(), dstmap1, dstmap2; Size size = map1.size(); @@ -2590,7 +2590,7 @@ void cv::warpAffine( InputArray _src, OutputArray _dst, InputArray _M0, Size dsize, int flags, int borderType, const Scalar& borderValue ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int interpolation = flags & INTER_MAX; CV_Assert( _src.channels() <= 4 || (interpolation != INTER_LANCZOS4 && @@ -2854,7 +2854,7 @@ public: } } - IppStatus status = CV_INSTRUMENT_FUN_IPP(func,(src.ptr(), srcsize, (int)src.step[0], srcroi, dst.ptr(), (int)dst.step[0], dstroi, coeffs, mode)); + IppStatus status = CV_INSTRUMENT_FUN_IPP(func,(src.ptr();, srcsize, (int)src.step[0], srcroi, dst.ptr(), (int)dst.step[0], dstroi, coeffs, mode)); if (status != ippStsNoErr) *ok = false; else @@ -2898,7 +2898,7 @@ void warpPerspectve(int src_type, void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0, Size dsize, int flags, int borderType, const Scalar& borderValue ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( _src.total() > 0 ); @@ -2996,7 +2996,7 @@ void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0, cv::Mat cv::getRotationMatrix2D( Point2f center, double angle, double scale ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); angle *= CV_PI/180; double alpha = std::cos(angle)*scale; @@ -3041,7 +3041,7 @@ cv::Mat cv::getRotationMatrix2D( Point2f center, double angle, double scale ) */ cv::Mat cv::getPerspectiveTransform( const Point2f src[], const Point2f dst[] ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat M(3, 3, CV_64F), X(8, 1, CV_64F, M.ptr()); double a[8][8], b[8]; diff --git a/modules/imgproc/src/intersection.cpp b/modules/imgproc/src/intersection.cpp index 36e2073195..84dbc8b8f1 100644 --- a/modules/imgproc/src/intersection.cpp +++ b/modules/imgproc/src/intersection.cpp @@ -49,7 +49,7 @@ namespace cv int rotatedRectangleIntersection( const RotatedRect& rect1, const RotatedRect& rect2, OutputArray intersectingRegion ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // L2 metric const float samePointEps = std::max(1e-16f, 1e-6f * (float)std::max(rect1.size.area(), rect2.size.area())); diff --git a/modules/imgproc/src/linefit.cpp b/modules/imgproc/src/linefit.cpp index c6e4e4a014..1abde1e0d1 100644 --- a/modules/imgproc/src/linefit.cpp +++ b/modules/imgproc/src/linefit.cpp @@ -596,7 +596,7 @@ static void fitLine3D( Point3f * points, int count, int dist, void cv::fitLine( InputArray _points, OutputArray _line, int distType, double param, double reps, double aeps ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat points = _points.getMat(); diff --git a/modules/imgproc/src/lsd.cpp b/modules/imgproc/src/lsd.cpp index 370d76955d..ef4dd38f51 100644 --- a/modules/imgproc/src/lsd.cpp +++ b/modules/imgproc/src/lsd.cpp @@ -416,7 +416,7 @@ LineSegmentDetectorImpl::LineSegmentDetectorImpl(int _refine, double _scale, dou void LineSegmentDetectorImpl::detect(InputArray _image, OutputArray _lines, OutputArray _width, OutputArray _prec, OutputArray _nfa) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); image = _image.getMat(); CV_Assert(!image.empty() && image.type() == CV_8UC1); @@ -1122,7 +1122,7 @@ inline bool LineSegmentDetectorImpl::isAligned(int x, int y, const double& theta void LineSegmentDetectorImpl::drawSegments(InputOutputArray _image, InputArray lines) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!_image.empty() && (_image.channels() == 1 || _image.channels() == 3)); @@ -1162,7 +1162,7 @@ void LineSegmentDetectorImpl::drawSegments(InputOutputArray _image, InputArray l int LineSegmentDetectorImpl::compareSegments(const Size& size, InputArray lines1, InputArray lines2, InputOutputArray _image) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Size sz = size; if (_image.needed() && _image.size() != size) sz = _image.size(); diff --git a/modules/imgproc/src/matchcontours.cpp b/modules/imgproc/src/matchcontours.cpp index 2a0c5df330..e676bf9804 100644 --- a/modules/imgproc/src/matchcontours.cpp +++ b/modules/imgproc/src/matchcontours.cpp @@ -43,7 +43,7 @@ double cv::matchShapes(InputArray contour1, InputArray contour2, int method, double) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double ma[7], mb[7]; int i, sma, smb; diff --git a/modules/imgproc/src/moments.cpp b/modules/imgproc/src/moments.cpp index 7b7ba145e9..6a0a960b19 100644 --- a/modules/imgproc/src/moments.cpp +++ b/modules/imgproc/src/moments.cpp @@ -573,7 +573,7 @@ typedef IppStatus (CV_STDCALL * ippiMoments)(const void* pSrc, int srcStep, Ippi static bool ipp_moments(Mat &src, Moments &m ) { #if IPP_VERSION_X100 >= 900 - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 < 201801 // Degradations for CV_8UC1 @@ -657,7 +657,7 @@ static bool ipp_moments(Mat &src, Moments &m ) cv::Moments cv::moments( InputArray _src, bool binary ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const int TILE_SIZE = 32; MomentsInTileFunc func = 0; @@ -767,7 +767,7 @@ cv::Moments cv::moments( InputArray _src, bool binary ) void cv::HuMoments( const Moments& m, double hu[7] ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double t0 = m.nu30 + m.nu12; double t1 = m.nu21 + m.nu03; @@ -796,7 +796,7 @@ void cv::HuMoments( const Moments& m, double hu[7] ) void cv::HuMoments( const Moments& m, OutputArray _hu ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); _hu.create(7, 1, CV_64F); Mat hu = _hu.getMat(); diff --git a/modules/imgproc/src/morph.cpp b/modules/imgproc/src/morph.cpp index 6f75e67123..66fae07fae 100644 --- a/modules/imgproc/src/morph.cpp +++ b/modules/imgproc/src/morph.cpp @@ -1135,7 +1135,7 @@ static bool ippMorph(int op, int src_type, int dst_type, int borderType, const double borderValue[4], int iterations, bool isSubmatrix) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 < 201800 // Problem with SSE42 optimizations performance @@ -1820,7 +1820,7 @@ static void morphOp( int op, InputArray _src, OutputArray _dst, Point anchor, int iterations, int borderType, const Scalar& borderValue ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat kernel = _kernel.getMat(); Size ksize = !kernel.empty() ? kernel.size() : Size(3,3); @@ -1888,7 +1888,7 @@ void cv::erode( InputArray src, OutputArray dst, InputArray kernel, Point anchor, int iterations, int borderType, const Scalar& borderValue ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); morphOp( MORPH_ERODE, src, dst, kernel, anchor, iterations, borderType, borderValue ); } @@ -1898,7 +1898,7 @@ void cv::dilate( InputArray src, OutputArray dst, InputArray kernel, Point anchor, int iterations, int borderType, const Scalar& borderValue ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); morphOp( MORPH_DILATE, src, dst, kernel, anchor, iterations, borderType, borderValue ); } @@ -2042,7 +2042,7 @@ void cv::morphologyEx( InputArray _src, OutputArray _dst, int op, InputArray _kernel, Point anchor, int iterations, int borderType, const Scalar& borderValue ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat kernel = _kernel.getMat(); if (kernel.empty()) diff --git a/modules/imgproc/src/phasecorr.cpp b/modules/imgproc/src/phasecorr.cpp index 52aeb9208a..a2ba79ee30 100644 --- a/modules/imgproc/src/phasecorr.cpp +++ b/modules/imgproc/src/phasecorr.cpp @@ -513,7 +513,7 @@ static Point2d weightedCentroid(InputArray _src, cv::Point peakLocation, cv::Siz cv::Point2d cv::phaseCorrelate(InputArray _src1, InputArray _src2, InputArray _window, double* response) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src1 = _src1.getMat(); Mat src2 = _src2.getMat(); @@ -596,7 +596,7 @@ cv::Point2d cv::phaseCorrelate(InputArray _src1, InputArray _src2, InputArray _w void cv::createHanningWindow(OutputArray _dst, cv::Size winSize, int type) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( type == CV_32FC1 || type == CV_64FC1 ); CV_Assert( winSize.width > 1 && winSize.height > 1 ); diff --git a/modules/imgproc/src/pyramids.cpp b/modules/imgproc/src/pyramids.cpp index 167ceea4d9..21900fd572 100644 --- a/modules/imgproc/src/pyramids.cpp +++ b/modules/imgproc/src/pyramids.cpp @@ -1198,7 +1198,7 @@ namespace cv { static bool ipp_pyrdown( InputArray _src, OutputArray _dst, const Size& _dsz, int borderType ) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 >= 810 && !IPP_DISABLE_PYRAMIDS_DOWN Size dsz = _dsz.area() == 0 ? Size((_src.cols() + 1)/2, (_src.rows() + 1)/2) : _dsz; @@ -1337,7 +1337,7 @@ static bool openvx_pyrDown( InputArray _src, OutputArray _dst, const Size& _dsz, void cv::pyrDown( InputArray _src, OutputArray _dst, const Size& _dsz, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(borderType != BORDER_CONSTANT); @@ -1391,7 +1391,7 @@ namespace cv { static bool ipp_pyrup( InputArray _src, OutputArray _dst, const Size& _dsz, int borderType ) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 >= 810 && !IPP_DISABLE_PYRAMIDS_UP Size sz = _src.dims() <= 2 ? _src.size() : Size(); @@ -1449,7 +1449,7 @@ static bool ipp_pyrup( InputArray _src, OutputArray _dst, const Size& _dsz, int void cv::pyrUp( InputArray _src, OutputArray _dst, const Size& _dsz, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(borderType == BORDER_DEFAULT); @@ -1499,7 +1499,7 @@ namespace cv { static bool ipp_buildpyramid( InputArray _src, OutputArrayOfArrays _dst, int maxlevel, int borderType ) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 >= 810 && !IPP_DISABLE_PYRAMIDS_BUILD Mat src = _src.getMat(); @@ -1611,7 +1611,7 @@ static bool ipp_buildpyramid( InputArray _src, OutputArrayOfArrays _dst, int max void cv::buildPyramid( InputArray _src, OutputArrayOfArrays _dst, int maxlevel, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(borderType != BORDER_CONSTANT); diff --git a/modules/imgproc/src/resize.cpp b/modules/imgproc/src/resize.cpp index 8b27fd0b5d..c69dc622de 100644 --- a/modules/imgproc/src/resize.cpp +++ b/modules/imgproc/src/resize.cpp @@ -3674,7 +3674,7 @@ public: virtual void operator() (const Range& range) const CV_OVERRIDE { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); if(!m_ok) return; @@ -3724,7 +3724,7 @@ public: virtual void operator() (const Range& range) const CV_OVERRIDE { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); if(!m_ok) return; @@ -3756,7 +3756,7 @@ static bool ipp_resize(const uchar * src_data, size_t src_step, int src_width, i int depth, int channels, int interpolation) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); IppDataType ippDataType = ippiGetDataType(depth); IppiInterpolationType ippInter = ippiGetInterpolation(interpolation); @@ -3853,7 +3853,7 @@ void resize(int src_type, uchar * dst_data, size_t dst_step, int dst_width, int dst_height, double inv_scale_x, double inv_scale_y, int interpolation) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert((dst_width > 0 && dst_height > 0) || (inv_scale_x > 0 && inv_scale_y > 0)); if (inv_scale_x < DBL_EPSILON || inv_scale_y < DBL_EPSILON) @@ -4220,7 +4220,7 @@ void resize(int src_type, void cv::resize( InputArray _src, OutputArray _dst, Size dsize, double inv_scale_x, double inv_scale_y, int interpolation ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Size ssize = _src.size(); diff --git a/modules/imgproc/src/rotcalipers.cpp b/modules/imgproc/src/rotcalipers.cpp index d121903626..79a419b661 100644 --- a/modules/imgproc/src/rotcalipers.cpp +++ b/modules/imgproc/src/rotcalipers.cpp @@ -346,7 +346,7 @@ static void rotatingCalipers( const Point2f* points, int n, int mode, float* out cv::RotatedRect cv::minAreaRect( InputArray _points ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat hull; Point2f out[3]; @@ -406,7 +406,7 @@ cvMinAreaRect2( const CvArr* array, CvMemStorage* /*storage*/ ) void cv::boxPoints(cv::RotatedRect box, OutputArray _pts) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); _pts.create(4, 2, CV_32F); Mat pts = _pts.getMat(); diff --git a/modules/imgproc/src/samplers.cpp b/modules/imgproc/src/samplers.cpp index 818b29daa7..a0b2aba223 100644 --- a/modules/imgproc/src/samplers.cpp +++ b/modules/imgproc/src/samplers.cpp @@ -365,7 +365,7 @@ getQuadrangleSubPix_8u32f_CnR( const uchar* src, size_t src_step, Size src_size, void cv::getRectSubPix( InputArray _image, Size patchSize, Point2f center, OutputArray _patch, int patchType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat image = _image.getMat(); int depth = image.depth(), cn = image.channels(); diff --git a/modules/imgproc/src/segmentation.cpp b/modules/imgproc/src/segmentation.cpp index b08d1b3ac0..c78931221f 100644 --- a/modules/imgproc/src/segmentation.cpp +++ b/modules/imgproc/src/segmentation.cpp @@ -87,7 +87,7 @@ allocWSNodes( std::vector& storage ) void cv::watershed( InputArray _src, InputOutputArray _markers ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // Labels for pixels const int IN_QUEUE = -2; // Pixel visited @@ -334,7 +334,7 @@ void cv::pyrMeanShiftFiltering( InputArray _src, OutputArray _dst, double sp0, double sr, int max_level, TermCriteria termcrit ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src0 = _src.getMat(); diff --git a/modules/imgproc/src/shapedescr.cpp b/modules/imgproc/src/shapedescr.cpp index 35e36401c6..d505fde4fc 100644 --- a/modules/imgproc/src/shapedescr.cpp +++ b/modules/imgproc/src/shapedescr.cpp @@ -150,7 +150,7 @@ static void findMinEnclosingCircle(const PT *pts, int count, Point2f ¢er, fl // see Welzl, Emo. Smallest enclosing disks (balls and ellipsoids). Springer Berlin Heidelberg, 1991. void cv::minEnclosingCircle( InputArray _points, Point2f& _center, float& _radius ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat points = _points.getMat(); int count = points.checkVector(2); @@ -229,7 +229,7 @@ void cv::minEnclosingCircle( InputArray _points, Point2f& _center, float& _radiu // calculates length of a curve (e.g. contour perimeter) double cv::arcLength( InputArray _curve, bool is_closed ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat curve = _curve.getMat(); int count = curve.checkVector(2); @@ -264,7 +264,7 @@ double cv::arcLength( InputArray _curve, bool is_closed ) // area of a whole sequence double cv::contourArea( InputArray _contour, bool oriented ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat contour = _contour.getMat(); int npoints = contour.checkVector(2); @@ -297,7 +297,7 @@ double cv::contourArea( InputArray _contour, bool oriented ) cv::RotatedRect cv::fitEllipse( InputArray _points ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat points = _points.getMat(); int i, n = points.checkVector(2); @@ -951,7 +951,7 @@ static Rect maskBoundingRect( const Mat& img ) cv::Rect cv::boundingRect(InputArray array) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat m = array.getMat(); return m.depth() <= CV_8U ? maskBoundingRect(m) : pointSetBoundingRect(m); diff --git a/modules/imgproc/src/smooth.cpp b/modules/imgproc/src/smooth.cpp index 8c15b54aae..81cc548b40 100644 --- a/modules/imgproc/src/smooth.cpp +++ b/modules/imgproc/src/smooth.cpp @@ -1480,7 +1480,7 @@ namespace cv static bool ipp_boxfilter(Mat &src, Mat &dst, Size ksize, Point anchor, bool normalize, int borderType) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 < 201801 // Problem with SSE42 optimization for 16s and some 8u modes @@ -1529,7 +1529,7 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth, Size ksize, Point anchor, bool normalize, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_dst.isUMat() && (borderType == BORDER_REPLICATE || borderType == BORDER_CONSTANT || @@ -1578,7 +1578,7 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth, void cv::blur( InputArray src, OutputArray dst, Size ksize, Point anchor, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); boxFilter( src, dst, -1, ksize, anchor, true, borderType ); } @@ -1660,7 +1660,7 @@ void cv::sqrBoxFilter( InputArray _src, OutputArray _dst, int ddepth, Size ksize, Point anchor, bool normalize, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int srcType = _src.type(), sdepth = CV_MAT_DEPTH(srcType), cn = CV_MAT_CN(srcType); Size size = _src.size(); @@ -3981,7 +3981,7 @@ public: virtual void operator() (const Range& range) const CV_OVERRIDE { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); if(!*m_pOk) return; @@ -4015,7 +4015,7 @@ static bool ipp_GaussianBlur(InputArray _src, OutputArray _dst, Size ksize, double sigma1, double sigma2, int borderType ) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 < 201800 && ((defined _MSC_VER && defined _M_IX86) || (defined __GNUC__ && defined __i386__)) CV_UNUSED(_src); CV_UNUSED(_dst); CV_UNUSED(ksize); CV_UNUSED(sigma1); CV_UNUSED(sigma2); CV_UNUSED(borderType); @@ -4077,7 +4077,7 @@ void cv::GaussianBlur( InputArray _src, OutputArray _dst, Size ksize, double sigma1, double sigma2, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src.type(); Size size = _src.size(); @@ -5060,7 +5060,7 @@ namespace cv { static bool ipp_medianFilter(Mat &src0, Mat &dst, int ksize) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); #if IPP_VERSION_X100 < 201801 // Degradations for big kernel @@ -5133,7 +5133,7 @@ static bool ipp_medianFilter(Mat &src0, Mat &dst, int ksize) void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( (ksize % 2 == 1) && (_src0.dims() <= 2 )); @@ -5892,7 +5892,7 @@ private: static bool ipp_bilateralFilter(Mat &src, Mat &dst, int d, double sigmaColor, double sigmaSpace, int borderType) { #ifdef HAVE_IPP_IW - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); int radius = IPP_MAX(((d <= 0)?cvRound(sigmaSpace*1.5):d/2), 1); Ipp32f valSquareSigma = (Ipp32f)((sigmaColor <= 0)?1:sigmaColor*sigmaColor); @@ -5942,7 +5942,7 @@ void cv::bilateralFilter( InputArray _src, OutputArray _dst, int d, double sigmaColor, double sigmaSpace, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); _dst.create( _src.size(), _src.type() ); diff --git a/modules/imgproc/src/spatialgradient.cpp b/modules/imgproc/src/spatialgradient.cpp index a84bd704eb..c942264e00 100644 --- a/modules/imgproc/src/spatialgradient.cpp +++ b/modules/imgproc/src/spatialgradient.cpp @@ -78,7 +78,7 @@ static inline void spatialGradientKernel( T& vx, T& vy, void spatialGradient( InputArray _src, OutputArray _dx, OutputArray _dy, int ksize, int borderType ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // Prepare InputArray src Mat src = _src.getMat(); diff --git a/modules/imgproc/src/subdivision2d.cpp b/modules/imgproc/src/subdivision2d.cpp index 6014774722..7abefa8c6e 100644 --- a/modules/imgproc/src/subdivision2d.cpp +++ b/modules/imgproc/src/subdivision2d.cpp @@ -275,7 +275,7 @@ void Subdiv2D::deletePoint(int vidx) int Subdiv2D::locate(Point2f pt, int& _edge, int& _vertex) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int vertex = 0; @@ -411,7 +411,7 @@ isPtInCircle3( Point2f pt, Point2f a, Point2f b, Point2f c) int Subdiv2D::insert(Point2f pt) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int curr_point = 0, curr_edge = 0, deleted_edge = 0; int location = locate( pt, curr_edge, curr_point ); @@ -483,7 +483,7 @@ int Subdiv2D::insert(Point2f pt) void Subdiv2D::insert(const std::vector& ptvec) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); for( size_t i = 0; i < ptvec.size(); i++ ) insert(ptvec[i]); @@ -491,7 +491,7 @@ void Subdiv2D::insert(const std::vector& ptvec) void Subdiv2D::initDelaunay( Rect rect ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); float big_coord = 3.f * MAX( rect.width, rect.height ); float rx = (float)rect.x; @@ -652,7 +652,7 @@ isRightOf2( const Point2f& pt, const Point2f& org, const Point2f& diff ) int Subdiv2D::findNearest(Point2f pt, Point2f* nearestPt) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( !validGeometry ) calcVoronoi(); diff --git a/modules/imgproc/src/sumpixels.cpp b/modules/imgproc/src/sumpixels.cpp index 4122b1ae54..c09e085285 100755 --- a/modules/imgproc/src/sumpixels.cpp +++ b/modules/imgproc/src/sumpixels.cpp @@ -408,7 +408,7 @@ static bool ipp_integral( uchar* tilted, size_t tstep, int width, int height, int cn) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); IppiSize size = {width, height}; @@ -494,7 +494,7 @@ void integral(int depth, int sdepth, int sqdepth, void cv::integral( InputArray _src, OutputArray _sum, OutputArray _sqsum, OutputArray _tilted, int sdepth, int sqdepth ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); if( sdepth <= 0 ) @@ -532,14 +532,14 @@ void cv::integral( InputArray _src, OutputArray _sum, OutputArray _sqsum, Output void cv::integral( InputArray src, OutputArray sum, int sdepth ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); integral( src, sum, noArray(), noArray(), sdepth ); } void cv::integral( InputArray src, OutputArray sum, OutputArray sqsum, int sdepth, int sqdepth ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); integral( src, sum, sqsum, noArray(), sdepth, sqdepth ); } diff --git a/modules/imgproc/src/templmatch.cpp b/modules/imgproc/src/templmatch.cpp index 302e26ef67..1dabdb0b05 100644 --- a/modules/imgproc/src/templmatch.cpp +++ b/modules/imgproc/src/templmatch.cpp @@ -970,7 +970,7 @@ typedef IppStatus (CV_STDCALL * ippimatchTemplate)(const void*, int, IppiSize, c static bool ipp_crossCorr(const Mat& src, const Mat& tpl, Mat& dst, bool normed) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); IppStatus status; @@ -1007,7 +1007,7 @@ static bool ipp_crossCorr(const Mat& src, const Mat& tpl, Mat& dst, bool normed) static bool ipp_sqrDistance(const Mat& src, const Mat& tpl, Mat& dst) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); IppStatus status; @@ -1039,7 +1039,7 @@ static bool ipp_sqrDistance(const Mat& src, const Mat& tpl, Mat& dst) static bool ipp_matchTemplate( Mat& img, Mat& templ, Mat& result, int method) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); if(img.channels() != 1) return false; @@ -1089,7 +1089,7 @@ static bool ipp_matchTemplate( Mat& img, Mat& templ, Mat& result, int method) void cv::matchTemplate( InputArray _img, InputArray _templ, OutputArray _result, int method, InputArray _mask ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (!_mask.empty()) { diff --git a/modules/imgproc/src/thresh.cpp b/modules/imgproc/src/thresh.cpp index 520a9c8fe9..b411b8696d 100644 --- a/modules/imgproc/src/thresh.cpp +++ b/modules/imgproc/src/thresh.cpp @@ -1003,7 +1003,7 @@ thresh_64f(const Mat& _src, Mat& _dst, double thresh, double maxval, int type) #ifdef HAVE_IPP static bool ipp_getThreshVal_Otsu_8u( const unsigned char* _src, int step, Size size, unsigned char &thresh) { - CV_INSTRUMENT_REGION_IPP() + CV_INSTRUMENT_REGION_IPP(); // Performance degradations #if IPP_VERSION_X100 >= 201800 @@ -1391,7 +1391,7 @@ static bool openvx_threshold(Mat src, Mat dst, int thresh, int maxval, int type) double cv::threshold( InputArray _src, OutputArray _dst, double thresh, double maxval, int type ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN_(_src.dims() <= 2 && _dst.isUMat(), ocl_threshold(_src, _dst, thresh, maxval, type), thresh) @@ -1518,7 +1518,7 @@ double cv::threshold( InputArray _src, OutputArray _dst, double thresh, double m void cv::adaptiveThreshold( InputArray _src, OutputArray _dst, double maxValue, int method, int type, int blockSize, double delta ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); CV_Assert( src.type() == CV_8UC1 ); diff --git a/modules/imgproc/src/undistort.cpp b/modules/imgproc/src/undistort.cpp index 1c9399611f..14e5d37d13 100644 --- a/modules/imgproc/src/undistort.cpp +++ b/modules/imgproc/src/undistort.cpp @@ -273,7 +273,7 @@ void cv::initUndistortRectifyMap( InputArray _cameraMatrix, InputArray _distCoef void cv::undistort( InputArray _src, OutputArray _dst, InputArray _cameraMatrix, InputArray _distCoeffs, InputArray _newCameraMatrix ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(), cameraMatrix = _cameraMatrix.getMat(); Mat distCoeffs = _distCoeffs.getMat(), newCameraMatrix = _newCameraMatrix.getMat(); diff --git a/modules/objdetect/src/cascadedetect.cpp b/modules/objdetect/src/cascadedetect.cpp index 11eae3e3e2..a41dc713e7 100644 --- a/modules/objdetect/src/cascadedetect.cpp +++ b/modules/objdetect/src/cascadedetect.cpp @@ -60,7 +60,7 @@ template void copyVectorToUMat(const std::vector<_Tp>& v, UMat& um void groupRectangles(std::vector& rectList, int groupThreshold, double eps, std::vector* weights, std::vector* levelWeights) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( groupThreshold <= 0 || rectList.empty() ) { @@ -361,14 +361,14 @@ static void groupRectangles_meanshift(std::vector& rectList, double detect void groupRectangles(std::vector& rectList, int groupThreshold, double eps) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); groupRectangles(rectList, groupThreshold, eps, 0, 0); } void groupRectangles(std::vector& rectList, std::vector& weights, int groupThreshold, double eps) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); groupRectangles(rectList, groupThreshold, eps, &weights, 0); } @@ -376,7 +376,7 @@ void groupRectangles(std::vector& rectList, std::vector& weights, int void groupRectangles(std::vector& rectList, std::vector& rejectLevels, std::vector& levelWeights, int groupThreshold, double eps) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); groupRectangles(rectList, groupThreshold, eps, &rejectLevels, &levelWeights); } @@ -384,7 +384,7 @@ void groupRectangles(std::vector& rectList, std::vector& rejectLevels void groupRectangles_meanshift(std::vector& rectList, std::vector& foundWeights, std::vector& foundScales, double detectThreshold, Size winDetSize) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); groupRectangles_meanshift(rectList, detectThreshold, foundWeights, foundScales, winDetSize); } @@ -483,7 +483,7 @@ bool FeatureEvaluator::updateScaleData( Size imgsz, const std::vector& _s bool FeatureEvaluator::setImage( InputArray _image, const std::vector& _scales ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Size imgsz = _image.size(); bool recalcOptFeatures = updateScaleData(imgsz, _scales); @@ -632,7 +632,7 @@ Ptr HaarEvaluator::clone() const void HaarEvaluator::computeChannels(int scaleIdx, InputArray img) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const ScaleData& s = scaleData->at(scaleIdx); sqofs = hasTiltedFeatures ? sbufSize.area() * 2 : sbufSize.area(); @@ -676,7 +676,7 @@ void HaarEvaluator::computeChannels(int scaleIdx, InputArray img) void HaarEvaluator::computeOptFeatures() { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (hasTiltedFeatures) tofs = sbufSize.area(); @@ -929,7 +929,7 @@ void CascadeClassifierImpl::read(const FileNode& node) int CascadeClassifierImpl::runAt( Ptr& evaluator, Point pt, int scaleIdx, double& weight ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); assert( !oldCascade && (data.featureType == FeatureEvaluator::HAAR || @@ -999,7 +999,7 @@ public: void operator()(const Range& range) const CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Ptr evaluator = classifier->featureEvaluator->clone(); double gypWeight = 0.; @@ -1244,7 +1244,7 @@ void CascadeClassifierImpl::detectMultiScaleNoGrouping( InputArray _image, std:: double scaleFactor, Size minObjectSize, Size maxObjectSize, bool outputRejectLevels ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Size imgsz = _image.size(); Size originalWindowSize = getOriginalWindowSize(); @@ -1371,7 +1371,7 @@ void CascadeClassifierImpl::detectMultiScale( InputArray _image, std::vector 1 && _image.depth() == CV_8U ); @@ -1405,7 +1405,7 @@ void CascadeClassifierImpl::detectMultiScale( InputArray _image, std::vector fakeLevels; std::vector fakeWeights; @@ -1418,7 +1418,7 @@ void CascadeClassifierImpl::detectMultiScale( InputArray _image, std::vector 1 && image.depth() == CV_8U ); @@ -1693,7 +1693,7 @@ void CascadeClassifier::detectMultiScale( InputArray image, Size minSize, Size maxSize ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!empty()); cc->detectMultiScale(image, objects, scaleFactor, minNeighbors, flags, minSize, maxSize); @@ -1707,7 +1707,7 @@ void CascadeClassifier::detectMultiScale( InputArray image, int minNeighbors, int flags, Size minSize, Size maxSize ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!empty()); cc->detectMultiScale(image, objects, numDetections, @@ -1724,7 +1724,7 @@ void CascadeClassifier::detectMultiScale( InputArray image, Size minSize, Size maxSize, bool outputRejectLevels ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!empty()); cc->detectMultiScale(image, objects, rejectLevels, levelWeights, diff --git a/modules/objdetect/src/cascadedetect.hpp b/modules/objdetect/src/cascadedetect.hpp index b19bc1c57f..f9910530b9 100644 --- a/modules/objdetect/src/cascadedetect.hpp +++ b/modules/objdetect/src/cascadedetect.hpp @@ -484,7 +484,7 @@ template inline int predictOrdered( CascadeClassifierImpl& cascade, Ptr &_featureEvaluator, double& sum ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int nstages = (int)cascade.data.stages.size(); int nodeOfs = 0, leafOfs = 0; @@ -526,7 +526,7 @@ template inline int predictCategorical( CascadeClassifierImpl& cascade, Ptr &_featureEvaluator, double& sum ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int nstages = (int)cascade.data.stages.size(); int nodeOfs = 0, leafOfs = 0; @@ -570,7 +570,7 @@ template inline int predictOrderedStump( CascadeClassifierImpl& cascade, Ptr &_featureEvaluator, double& sum ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!cascade.data.stumps.empty()); FEval& featureEvaluator = (FEval&)*_featureEvaluator; @@ -609,7 +609,7 @@ template inline int predictCategoricalStump( CascadeClassifierImpl& cascade, Ptr &_featureEvaluator, double& sum ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!cascade.data.stumps.empty()); int nstages = (int)cascade.data.stages.size(); diff --git a/modules/objdetect/src/detection_based_tracker.cpp b/modules/objdetect/src/detection_based_tracker.cpp index 0cdcafacee..f738ac176c 100644 --- a/modules/objdetect/src/detection_based_tracker.cpp +++ b/modules/objdetect/src/detection_based_tracker.cpp @@ -626,7 +626,7 @@ cv::DetectionBasedTracker::~DetectionBasedTracker() void DetectionBasedTracker::process(const Mat& imageGray) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(imageGray.type()==CV_8UC1); diff --git a/modules/objdetect/src/haar.cpp b/modules/objdetect/src/haar.cpp index 489728dd1f..c6af7698ed 100644 --- a/modules/objdetect/src/haar.cpp +++ b/modules/objdetect/src/haar.cpp @@ -922,7 +922,7 @@ CV_IMPL int cvRunHaarClassifierCascade( const CvHaarClassifierCascade* _cascade, CvPoint pt, int start_stage ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double stage_sum; return cvRunHaarClassifierCascadeSum(_cascade, pt, stage_sum, start_stage); @@ -959,7 +959,7 @@ public: void operator()(const Range& range) const CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Size winSize0 = cascade->orig_window_size; Size winSize(cvRound(winSize0.width*factor), cvRound(winSize0.height*factor)); @@ -1139,7 +1139,7 @@ public: void operator()(const Range& range) const CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int iy, startY = range.start, endY = range.end; const int *p0 = p[0], *p1 = p[1], *p2 = p[2], *p3 = p[3]; @@ -1216,7 +1216,7 @@ cvHaarDetectObjectsForROC( const CvArr* _img, double scaleFactor, int minNeighbors, int flags, CvSize minSize, CvSize maxSize, bool outputRejectLevels ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const double GROUP_EPS = 0.2; CvMat stub, *img = (CvMat*)_img; diff --git a/modules/objdetect/src/hog.cpp b/modules/objdetect/src/hog.cpp index 72ac32782f..3060d61fbf 100644 --- a/modules/objdetect/src/hog.cpp +++ b/modules/objdetect/src/hog.cpp @@ -237,7 +237,7 @@ inline float32x4_t vsetq_f32(float f0, float f1, float f2, float f3) void HOGDescriptor::computeGradient(const Mat& img, Mat& grad, Mat& qangle, Size paddingTL, Size paddingBR) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( img.type() == CV_8U || img.type() == CV_8UC3 ); @@ -1587,7 +1587,7 @@ static bool ocl_compute(InputArray _img, Size win_stride, std::vector& _d void HOGDescriptor::compute(InputArray _img, std::vector& descriptors, Size winStride, Size padding, const std::vector& locations) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( winStride == Size() ) winStride = cellSize; @@ -1654,7 +1654,7 @@ void HOGDescriptor::detect(const Mat& img, std::vector& hits, std::vector& weights, double hitThreshold, Size winStride, Size padding, const std::vector& locations) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); hits.clear(); weights.clear(); @@ -1767,7 +1767,7 @@ void HOGDescriptor::detect(const Mat& img, void HOGDescriptor::detect(const Mat& img, std::vector& hits, double hitThreshold, Size winStride, Size padding, const std::vector& locations) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector weightsV; detect(img, hits, weightsV, hitThreshold, winStride, padding, locations); @@ -2051,7 +2051,7 @@ void HOGDescriptor::detectMultiScale( double hitThreshold, Size winStride, Size padding, double scale0, double finalThreshold, bool useMeanshiftGrouping) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); double scale = 1.; int levels = 0; @@ -2106,7 +2106,7 @@ void HOGDescriptor::detectMultiScale(InputArray img, std::vector& foundLoc double hitThreshold, Size winStride, Size padding, double scale0, double finalThreshold, bool useMeanshiftGrouping) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector foundWeights; detectMultiScale(img, foundLocations, foundWeights, hitThreshold, winStride, @@ -3504,7 +3504,7 @@ public: void operator()(const Range& range) const CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int i, i1 = range.start, i2 = range.end; @@ -3548,7 +3548,7 @@ void HOGDescriptor::detectROI(const cv::Mat& img, const std::vector & CV_OUT std::vector& foundLocations, CV_OUT std::vector& confidences, double hitThreshold, cv::Size winStride, cv::Size padding) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); foundLocations.clear(); confidences.clear(); @@ -3660,7 +3660,7 @@ void HOGDescriptor::detectMultiScaleROI(const cv::Mat& img, CV_OUT std::vector& foundLocations, std::vector& locations, double hitThreshold, int groupThreshold) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector allCandidates; Mutex mtx; @@ -3780,7 +3780,7 @@ void HOGDescriptor::readALTModel(String modelfile) void HOGDescriptor::groupRectangles(std::vector& rectList, std::vector& weights, int groupThreshold, double eps) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( groupThreshold <= 0 || rectList.empty() ) { diff --git a/modules/photo/src/align.cpp b/modules/photo/src/align.cpp index d83bf69d92..6a3972045e 100644 --- a/modules/photo/src/align.cpp +++ b/modules/photo/src/align.cpp @@ -61,14 +61,14 @@ public: void process(InputArrayOfArrays src, std::vector& dst, InputArray, InputArray) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); process(src, dst); } void process(InputArrayOfArrays _src, std::vector& dst) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector src; _src.getMatVector(src); @@ -118,7 +118,7 @@ public: Point calculateShift(InputArray _img0, InputArray _img1) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img0 = _img0.getMat(); Mat img1 = _img1.getMat(); @@ -166,7 +166,7 @@ public: void shiftMat(InputArray _src, OutputArray _dst, const Point shift) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); _dst.create(src.size(), src.type()); @@ -211,7 +211,7 @@ public: void computeBitmaps(InputArray _img, OutputArray _tb, OutputArray _eb) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(); _tb.create(img.size(), CV_8U); diff --git a/modules/photo/src/calibrate.cpp b/modules/photo/src/calibrate.cpp index 088cfbb6e0..9614a1c9ae 100644 --- a/modules/photo/src/calibrate.cpp +++ b/modules/photo/src/calibrate.cpp @@ -62,7 +62,7 @@ public: void process(InputArrayOfArrays src, OutputArray dst, InputArray _times) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // check inputs std::vector images; @@ -212,7 +212,7 @@ public: void process(InputArrayOfArrays src, OutputArray dst, InputArray _times) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector images; src.getMatVector(images); diff --git a/modules/photo/src/contrast_preserve.cpp b/modules/photo/src/contrast_preserve.cpp index b20bba0893..d9b183964e 100644 --- a/modules/photo/src/contrast_preserve.cpp +++ b/modules/photo/src/contrast_preserve.cpp @@ -52,7 +52,7 @@ using namespace cv; void cv::decolor(InputArray _src, OutputArray _dst, OutputArray _color_boost) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat I = _src.getMat(); _dst.create(I.size(), CV_8UC1); diff --git a/modules/photo/src/denoising.cpp b/modules/photo/src/denoising.cpp index ee9e57331e..6b501f67a0 100644 --- a/modules/photo/src/denoising.cpp +++ b/modules/photo/src/denoising.cpp @@ -104,7 +104,7 @@ static void fastNlMeansDenoising_( const Mat& src, Mat& dst, const std::vector(1, h), templateWindowSize, searchWindowSize); @@ -113,7 +113,7 @@ void cv::fastNlMeansDenoising( InputArray _src, OutputArray _dst, float h, void cv::fastNlMeansDenoising( InputArray _src, OutputArray _dst, const std::vector& h, int templateWindowSize, int searchWindowSize, int normType) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int hn = (int)h.size(), type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); CV_Assert(!_src.empty()); @@ -174,7 +174,7 @@ void cv::fastNlMeansDenoisingColored( InputArray _src, OutputArray _dst, float h, float hForColorComponents, int templateWindowSize, int searchWindowSize) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); int type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); Size src_size = _src.size(); @@ -315,7 +315,7 @@ void cv::fastNlMeansDenoisingMulti( InputArrayOfArrays _srcImgs, OutputArray _ds int imgToDenoiseIndex, int temporalWindowSize, float h, int templateWindowSize, int searchWindowSize) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); fastNlMeansDenoisingMulti(_srcImgs, _dst, imgToDenoiseIndex, temporalWindowSize, std::vector(1, h), templateWindowSize, searchWindowSize); @@ -326,7 +326,7 @@ void cv::fastNlMeansDenoisingMulti( InputArrayOfArrays _srcImgs, OutputArray _ds const std::vector& h, int templateWindowSize, int searchWindowSize, int normType) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector srcImgs; _srcImgs.getMatVector(srcImgs); @@ -389,7 +389,7 @@ void cv::fastNlMeansDenoisingColoredMulti( InputArrayOfArrays _srcImgs, OutputAr float h, float hForColorComponents, int templateWindowSize, int searchWindowSize) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector srcImgs; _srcImgs.getMatVector(srcImgs); diff --git a/modules/photo/src/inpaint.cpp b/modules/photo/src/inpaint.cpp index adab6a3c9e..66566ba2e3 100644 --- a/modules/photo/src/inpaint.cpp +++ b/modules/photo/src/inpaint.cpp @@ -844,7 +844,7 @@ cvInpaint( const CvArr* _input_img, const CvArr* _inpaint_mask, CvArr* _output_i void cv::inpaint( InputArray _src, InputArray _mask, OutputArray _dst, double inpaintRange, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(), mask = _mask.getMat(); _dst.create( src.size(), src.type() ); diff --git a/modules/photo/src/merge.cpp b/modules/photo/src/merge.cpp index 6cfd8ba5d7..fbeb4639b4 100644 --- a/modules/photo/src/merge.cpp +++ b/modules/photo/src/merge.cpp @@ -58,7 +58,7 @@ public: void process(InputArrayOfArrays src, OutputArray dst, InputArray _times, InputArray input_response) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector images; src.getMatVector(images); @@ -124,7 +124,7 @@ public: void process(InputArrayOfArrays src, OutputArray dst, InputArray times) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); process(src, dst, times, Mat()); } @@ -152,14 +152,14 @@ public: void process(InputArrayOfArrays src, OutputArrayOfArrays dst, InputArray, InputArray) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); process(src, dst); } void process(InputArrayOfArrays src, OutputArray dst) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector images; src.getMatVector(images); @@ -310,7 +310,7 @@ public: void process(InputArrayOfArrays src, OutputArray dst, InputArray _times, InputArray input_response) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::vector images; src.getMatVector(images); @@ -349,7 +349,7 @@ public: void process(InputArrayOfArrays src, OutputArray dst, InputArray times) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); process(src, dst, times, Mat()); } diff --git a/modules/photo/src/npr.cpp b/modules/photo/src/npr.cpp index 2a7343e708..804a2aaf90 100644 --- a/modules/photo/src/npr.cpp +++ b/modules/photo/src/npr.cpp @@ -51,7 +51,7 @@ using namespace cv; void cv::edgePreservingFilter(InputArray _src, OutputArray dst, int flags, float sigma_s, float sigma_r) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat I = _src.getMat(); @@ -68,7 +68,7 @@ void cv::edgePreservingFilter(InputArray _src, OutputArray dst, int flags, float void cv::detailEnhance(InputArray _src, OutputArray dst, float sigma_s, float sigma_r) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat I = _src.getMat(); @@ -104,7 +104,7 @@ void cv::detailEnhance(InputArray _src, OutputArray dst, float sigma_s, float si void cv::pencilSketch(InputArray _src, OutputArray _dst1, OutputArray _dst2, float sigma_s, float sigma_r, float shade_factor) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat I = _src.getMat(); _dst1.create(I.size(), CV_8UC1); @@ -130,7 +130,7 @@ void cv::pencilSketch(InputArray _src, OutputArray _dst1, OutputArray _dst2, flo void cv::stylization(InputArray _src, OutputArray _dst, float sigma_s, float sigma_r) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat I = _src.getMat(); _dst.create(I.size(), CV_8UC3); diff --git a/modules/photo/src/seamless_cloning.cpp b/modules/photo/src/seamless_cloning.cpp index 43753b0c11..e5fcd094fb 100644 --- a/modules/photo/src/seamless_cloning.cpp +++ b/modules/photo/src/seamless_cloning.cpp @@ -49,7 +49,7 @@ using namespace cv; void cv::seamlessClone(InputArray _src, InputArray _dst, InputArray _mask, Point p, OutputArray _blend, int flags) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const Mat src = _src.getMat(); const Mat dest = _dst.getMat(); @@ -107,7 +107,7 @@ void cv::seamlessClone(InputArray _src, InputArray _dst, InputArray _mask, Point void cv::colorChange(InputArray _src, InputArray _mask, OutputArray _dst, float red, float green, float blue) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); Mat mask = _mask.getMat(); @@ -129,7 +129,7 @@ void cv::colorChange(InputArray _src, InputArray _mask, OutputArray _dst, float void cv::illuminationChange(InputArray _src, InputArray _mask, OutputArray _dst, float alpha, float beta) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); Mat mask = _mask.getMat(); @@ -153,7 +153,7 @@ void cv::illuminationChange(InputArray _src, InputArray _mask, OutputArray _dst, void cv::textureFlattening(InputArray _src, InputArray _mask, OutputArray _dst, float low_threshold, float high_threshold, int kernel_size) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); Mat mask = _mask.getMat(); diff --git a/modules/photo/src/seamless_cloning_impl.cpp b/modules/photo/src/seamless_cloning_impl.cpp index 90f7fc90a9..1b87e86b20 100644 --- a/modules/photo/src/seamless_cloning_impl.cpp +++ b/modules/photo/src/seamless_cloning_impl.cpp @@ -411,7 +411,7 @@ void Cloning::localColorChange(Mat &I, Mat &mask, Mat &wmask, Mat &cloned, float void Cloning::illuminationChange(Mat &I, Mat &mask, Mat &wmask, Mat &cloned, float alpha, float beta) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); computeDerivatives(I,mask,wmask); diff --git a/modules/photo/src/tonemap.cpp b/modules/photo/src/tonemap.cpp index 053360f4c2..fd73865d6b 100644 --- a/modules/photo/src/tonemap.cpp +++ b/modules/photo/src/tonemap.cpp @@ -62,7 +62,7 @@ public: void process(InputArray _src, OutputArray _dst) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); CV_Assert(!src.empty()); @@ -120,7 +120,7 @@ public: void process(InputArray _src, OutputArray _dst) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); CV_Assert(!src.empty()); @@ -208,7 +208,7 @@ public: void process(InputArray _src, OutputArray _dst) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); CV_Assert(!src.empty()); @@ -295,7 +295,7 @@ public: void process(InputArray _src, OutputArray _dst) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); CV_Assert(!src.empty()); @@ -392,7 +392,7 @@ public: void process(InputArray _src, OutputArray _dst) CV_OVERRIDE { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat src = _src.getMat(); CV_Assert(!src.empty()); diff --git a/modules/shape/src/aff_trans.cpp b/modules/shape/src/aff_trans.cpp index a4490f474f..fabcf93f69 100644 --- a/modules/shape/src/aff_trans.cpp +++ b/modules/shape/src/aff_trans.cpp @@ -104,7 +104,7 @@ protected: void AffineTransformerImpl::warpImage(InputArray transformingImage, OutputArray output, int flags, int borderMode, const Scalar& borderValue) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(!affineMat.empty()); warpAffine(transformingImage, output, affineMat, transformingImage.getMat().size(), flags, borderMode, borderValue); @@ -187,7 +187,7 @@ static Mat _localAffineEstimate(const std::vector& shape1, const std::v void AffineTransformerImpl::estimateTransformation(InputArray _pts1, InputArray _pts2, std::vector& _matches) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat pts1 = _pts1.getMat(); Mat pts2 = _pts2.getMat(); @@ -234,7 +234,7 @@ void AffineTransformerImpl::estimateTransformation(InputArray _pts1, InputArray float AffineTransformerImpl::applyTransformation(InputArray inPts, OutputArray outPts) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat pts1 = inPts.getMat(); CV_Assert((pts1.channels()==2) && (pts1.cols>0)); diff --git a/modules/shape/src/emdL1.cpp b/modules/shape/src/emdL1.cpp index 8e5faaaf9d..b28dc96705 100644 --- a/modules/shape/src/emdL1.cpp +++ b/modules/shape/src/emdL1.cpp @@ -789,7 +789,7 @@ float EmdL1::compuTotalFlow() float cv::EMDL1(InputArray _signature1, InputArray _signature2) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat signature1 = _signature1.getMat(), signature2 = _signature2.getMat(); EmdL1 emdl1; diff --git a/modules/shape/src/haus_dis.cpp b/modules/shape/src/haus_dis.cpp index 0f3126792e..a544edcaa5 100644 --- a/modules/shape/src/haus_dis.cpp +++ b/modules/shape/src/haus_dis.cpp @@ -129,7 +129,7 @@ static float _apply(const Mat &set1, const Mat &set2, int distType, double propR float HausdorffDistanceExtractorImpl::computeDistance(InputArray contour1, InputArray contour2) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat set1=contour1.getMat(), set2=contour2.getMat(); if (set1.type() != CV_32F) diff --git a/modules/shape/src/hist_cost.cpp b/modules/shape/src/hist_cost.cpp index 902a199ad6..f255d60694 100644 --- a/modules/shape/src/hist_cost.cpp +++ b/modules/shape/src/hist_cost.cpp @@ -125,7 +125,7 @@ protected: void NormHistogramCostExtractorImpl::buildCostMatrix(InputArray _descriptors1, InputArray _descriptors2, OutputArray _costMatrix) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // size of the costMatrix with dummies // Mat descriptors1=_descriptors1.getMat(); @@ -253,7 +253,7 @@ protected: void EMDHistogramCostExtractorImpl::buildCostMatrix(InputArray _descriptors1, InputArray _descriptors2, OutputArray _costMatrix) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // size of the costMatrix with dummies // Mat descriptors1=_descriptors1.getMat(); @@ -377,7 +377,7 @@ protected: void ChiHistogramCostExtractorImpl::buildCostMatrix(InputArray _descriptors1, InputArray _descriptors2, OutputArray _costMatrix) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // size of the costMatrix with dummies // Mat descriptors1=_descriptors1.getMat(); @@ -496,7 +496,7 @@ protected: void EMDL1HistogramCostExtractorImpl::buildCostMatrix(InputArray _descriptors1, InputArray _descriptors2, OutputArray _costMatrix) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // size of the costMatrix with dummies // Mat descriptors1=_descriptors1.getMat(); diff --git a/modules/shape/src/sc_dis.cpp b/modules/shape/src/sc_dis.cpp index cf4f9fe3a0..23c77f0717 100644 --- a/modules/shape/src/sc_dis.cpp +++ b/modules/shape/src/sc_dis.cpp @@ -187,7 +187,7 @@ protected: float ShapeContextDistanceExtractorImpl::computeDistance(InputArray contour1, InputArray contour2) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // Checking // Mat sset1=contour1.getMat(), sset2=contour2.getMat(), set1, set2; @@ -502,7 +502,7 @@ void SCDMatcher::matchDescriptors(cv::Mat &descriptors1, cv::Mat &descriptors2, void SCDMatcher::buildCostMatrix(const cv::Mat &descriptors1, const cv::Mat &descriptors2, cv::Mat &costMatrix, cv::Ptr &comparer) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); comparer->buildCostMatrix(descriptors1, descriptors2, costMatrix); } diff --git a/modules/shape/src/tps_trans.cpp b/modules/shape/src/tps_trans.cpp index 19031be201..5818c7973e 100644 --- a/modules/shape/src/tps_trans.cpp +++ b/modules/shape/src/tps_trans.cpp @@ -148,7 +148,7 @@ static Point2f _applyTransformation(const Mat &shapeRef, const Point2f point, co void ThinPlateSplineShapeTransformerImpl::warpImage(InputArray transformingImage, OutputArray output, int flags, int borderMode, const Scalar& borderValue) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(tpsComputed==true); @@ -170,7 +170,7 @@ void ThinPlateSplineShapeTransformerImpl::warpImage(InputArray transformingImage float ThinPlateSplineShapeTransformerImpl::applyTransformation(InputArray inPts, OutputArray outPts) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(tpsComputed); Mat pts1 = inPts.getMat(); @@ -195,7 +195,7 @@ float ThinPlateSplineShapeTransformerImpl::applyTransformation(InputArray inPts, void ThinPlateSplineShapeTransformerImpl::estimateTransformation(InputArray _pts1, InputArray _pts2, std::vector& _matches ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat pts1 = _pts1.getMat(); Mat pts2 = _pts2.getMat(); diff --git a/modules/stitching/src/exposure_compensate.cpp b/modules/stitching/src/exposure_compensate.cpp index 206eca3808..7b72efbd16 100644 --- a/modules/stitching/src/exposure_compensate.cpp +++ b/modules/stitching/src/exposure_compensate.cpp @@ -146,7 +146,7 @@ void GainCompensator::feed(const std::vector &corners, const std::vector< void GainCompensator::apply(int index, Point /*corner*/, InputOutputArray image, InputArray /*mask*/) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); multiply(image, gains_(index, 0), image); } @@ -226,7 +226,7 @@ void BlocksGainCompensator::feed(const std::vector &corners, const std::v void BlocksGainCompensator::apply(int index, Point /*corner*/, InputOutputArray _image, InputArray /*mask*/) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(_image.type() == CV_8UC3); diff --git a/modules/stitching/src/matchers.cpp b/modules/stitching/src/matchers.cpp index 2e351fd720..e46d1f29ca 100644 --- a/modules/stitching/src/matchers.cpp +++ b/modules/stitching/src/matchers.cpp @@ -183,7 +183,7 @@ private: void CpuMatcher::match(const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo& matches_info) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(features1.descriptors.type() == features2.descriptors.type()); CV_Assert(features2.descriptors.depth() == CV_8U || features2.descriptors.depth() == CV_32F); @@ -253,7 +253,7 @@ void CpuMatcher::match(const ImageFeatures &features1, const ImageFeatures &feat #ifdef HAVE_OPENCV_CUDAFEATURES2D void GpuMatcher::match(const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo& matches_info) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); matches_info.matches.clear(); @@ -727,7 +727,7 @@ BestOf2NearestMatcher::BestOf2NearestMatcher(bool try_use_gpu, float match_conf, void BestOf2NearestMatcher::match(const ImageFeatures &features1, const ImageFeatures &features2, MatchesInfo &matches_info) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); (*impl_)(features1, features2, matches_info); diff --git a/modules/stitching/src/seam_finders.cpp b/modules/stitching/src/seam_finders.cpp index ad9b0f2444..1bc0e8e8e4 100644 --- a/modules/stitching/src/seam_finders.cpp +++ b/modules/stitching/src/seam_finders.cpp @@ -203,7 +203,7 @@ void DpSeamFinder::process( const Mat &image1, const Mat &image2, Point tl1, Point tl2, Mat &mask1, Mat &mask2) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(image1.size() == mask1.size()); CV_Assert(image2.size() == mask2.size()); diff --git a/modules/stitching/src/stitcher.cpp b/modules/stitching/src/stitcher.cpp index d7ecb7364b..e328d67ab9 100644 --- a/modules/stitching/src/stitcher.cpp +++ b/modules/stitching/src/stitcher.cpp @@ -121,7 +121,7 @@ Ptr Stitcher::create(Mode mode, bool try_use_gpu) Stitcher::Status Stitcher::estimateTransform(InputArrayOfArrays images) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return estimateTransform(images, std::vector >()); } @@ -129,7 +129,7 @@ Stitcher::Status Stitcher::estimateTransform(InputArrayOfArrays images) Stitcher::Status Stitcher::estimateTransform(InputArrayOfArrays images, const std::vector > &rois) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); images.getUMatVector(imgs_); rois_ = rois; @@ -149,7 +149,7 @@ Stitcher::Status Stitcher::estimateTransform(InputArrayOfArrays images, const st Stitcher::Status Stitcher::composePanorama(OutputArray pano) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return composePanorama(std::vector(), pano); } @@ -157,7 +157,7 @@ Stitcher::Status Stitcher::composePanorama(OutputArray pano) Stitcher::Status Stitcher::composePanorama(InputArrayOfArrays images, OutputArray pano) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); LOGLN("Warping images (auxiliary)... "); @@ -407,7 +407,7 @@ Stitcher::Status Stitcher::composePanorama(InputArrayOfArrays images, OutputArra Stitcher::Status Stitcher::stitch(InputArrayOfArrays images, OutputArray pano) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Status status = estimateTransform(images); if (status != OK) @@ -418,7 +418,7 @@ Stitcher::Status Stitcher::stitch(InputArrayOfArrays images, OutputArray pano) Stitcher::Status Stitcher::stitch(InputArrayOfArrays images, const std::vector > &rois, OutputArray pano) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Status status = estimateTransform(images, rois); if (status != OK) @@ -604,14 +604,14 @@ Stitcher::Status Stitcher::estimateCameraParams() Ptr createStitcher(bool try_use_gpu) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return Stitcher::create(Stitcher::PANORAMA, try_use_gpu); } Ptr createStitcherScans(bool try_use_gpu) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); return Stitcher::create(Stitcher::SCANS, try_use_gpu); } diff --git a/modules/stitching/src/timelapsers.cpp b/modules/stitching/src/timelapsers.cpp index fef94b64d6..30febaa8db 100644 --- a/modules/stitching/src/timelapsers.cpp +++ b/modules/stitching/src/timelapsers.cpp @@ -64,7 +64,7 @@ void Timelapser::initialize(const std::vector &corners, const std::vector void Timelapser::process(InputArray _img, InputArray /*_mask*/, Point tl) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); dst_.setTo(Scalar::all(0)); diff --git a/modules/superres/src/btv_l1.cpp b/modules/superres/src/btv_l1.cpp index 95429817af..cf2ca58ceb 100644 --- a/modules/superres/src/btv_l1.cpp +++ b/modules/superres/src/btv_l1.cpp @@ -670,7 +670,7 @@ namespace void BTVL1_Base::process(InputArrayOfArrays _src, OutputArray _dst, InputArrayOfArrays _forwardMotions, InputArrayOfArrays _backwardMotions, int baseIdx) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert( scale_ > 1 ); CV_Assert( iterations_ > 0 ); @@ -971,7 +971,7 @@ namespace void BTVL1::processImpl(Ptr& frameSource, OutputArray _output) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (outPos_ >= storePos_) { @@ -1022,7 +1022,7 @@ namespace void BTVL1::readNextFrame(Ptr& frameSource) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); frameSource->nextFrame(curFrame_); if (curFrame_.empty()) @@ -1086,7 +1086,7 @@ namespace void BTVL1::processFrame(int idx) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(isUmat_, ocl_processFrame(idx)) diff --git a/modules/superres/src/input_array_utility.cpp b/modules/superres/src/input_array_utility.cpp index b73993bf7d..fd60c20bd9 100644 --- a/modules/superres/src/input_array_utility.cpp +++ b/modules/superres/src/input_array_utility.cpp @@ -236,7 +236,7 @@ namespace Mat cv::superres::convertToType(const Mat& src, int type, Mat& buf0, Mat& buf1) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (src.type() == type) return src; @@ -263,7 +263,7 @@ Mat cv::superres::convertToType(const Mat& src, int type, Mat& buf0, Mat& buf1) UMat cv::superres::convertToType(const UMat& src, int type, UMat& buf0, UMat& buf1) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (src.type() == type) return src; diff --git a/modules/superres/src/optical_flow.cpp b/modules/superres/src/optical_flow.cpp index 2e0c485b36..4b13e94ba9 100644 --- a/modules/superres/src/optical_flow.cpp +++ b/modules/superres/src/optical_flow.cpp @@ -123,7 +123,7 @@ namespace void CpuOpticalFlow::calc(InputArray _frame0, InputArray _frame1, OutputArray _flow1, OutputArray _flow2) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_flow1.isUMat() && (_flow2.isUMat() || !_flow2.needed()), ocl_calc(_frame0, _frame1, _flow1, _flow2)) @@ -227,7 +227,7 @@ namespace void Farneback::calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CpuOpticalFlow::calc(frame0, frame1, flow1, flow2); } @@ -381,7 +381,7 @@ namespace void DualTVL1::calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CpuOpticalFlow::calc(frame0, frame1, flow1, flow2); } @@ -455,7 +455,7 @@ namespace void GpuOpticalFlow::calc(InputArray _frame0, InputArray _frame1, OutputArray _flow1, OutputArray _flow2) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); GpuMat frame0 = arrGetGpuMat(_frame0, buf_[0]); GpuMat frame1 = arrGetGpuMat(_frame1, buf_[1]); diff --git a/modules/superres/src/super_resolution.cpp b/modules/superres/src/super_resolution.cpp index 6055920599..e9400d5044 100644 --- a/modules/superres/src/super_resolution.cpp +++ b/modules/superres/src/super_resolution.cpp @@ -61,7 +61,7 @@ void cv::superres::SuperResolution::setInput(const Ptr& frameSource void cv::superres::SuperResolution::nextFrame(OutputArray frame) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); isUmat_ = frame.isUMat(); diff --git a/modules/video/src/bgfg_KNN.cpp b/modules/video/src/bgfg_KNN.cpp index 794b90e7c0..39cd6457e9 100755 --- a/modules/video/src/bgfg_KNN.cpp +++ b/modules/video/src/bgfg_KNN.cpp @@ -728,7 +728,7 @@ void BackgroundSubtractorKNNImpl::create_ocl_apply_kernel() void BackgroundSubtractorKNNImpl::apply(InputArray _image, OutputArray _fgmask, double learningRate) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); #ifdef HAVE_OPENCL if (opencl_ON) @@ -814,7 +814,7 @@ void BackgroundSubtractorKNNImpl::apply(InputArray _image, OutputArray _fgmask, void BackgroundSubtractorKNNImpl::getBackgroundImage(OutputArray backgroundImage) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); #ifdef HAVE_OPENCL if (opencl_ON) diff --git a/modules/video/src/bgfg_gaussmix2.cpp b/modules/video/src/bgfg_gaussmix2.cpp index ab77fd79d8..4241670f1c 100644 --- a/modules/video/src/bgfg_gaussmix2.cpp +++ b/modules/video/src/bgfg_gaussmix2.cpp @@ -844,7 +844,7 @@ void BackgroundSubtractorMOG2Impl::create_ocl_apply_kernel() void BackgroundSubtractorMOG2Impl::apply(InputArray _image, OutputArray _fgmask, double learningRate) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); #ifdef HAVE_OPENCL if (opencl_ON) @@ -884,7 +884,7 @@ void BackgroundSubtractorMOG2Impl::apply(InputArray _image, OutputArray _fgmask, template void BackgroundSubtractorMOG2Impl::getBackgroundImage_intern(OutputArray backgroundImage) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat meanBackground(frameSize, frameType, Scalar::all(0)); int firstGaussianIdx = 0; diff --git a/modules/video/src/camshift.cpp b/modules/video/src/camshift.cpp index 4a7017c82e..ed5426ab98 100644 --- a/modules/video/src/camshift.cpp +++ b/modules/video/src/camshift.cpp @@ -43,7 +43,7 @@ int cv::meanShift( InputArray _probImage, Rect& window, TermCriteria criteria ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Size size; int cn; @@ -110,7 +110,7 @@ int cv::meanShift( InputArray _probImage, Rect& window, TermCriteria criteria ) cv::RotatedRect cv::CamShift( InputArray _probImage, Rect& window, TermCriteria criteria ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); const int TOLERANCE = 10; Size size; diff --git a/modules/video/src/kalman.cpp b/modules/video/src/kalman.cpp index d0fba8f8fb..f90f9f7b9e 100644 --- a/modules/video/src/kalman.cpp +++ b/modules/video/src/kalman.cpp @@ -81,7 +81,7 @@ void KalmanFilter::init(int DP, int MP, int CP, int type) const Mat& KalmanFilter::predict(const Mat& control) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // update the state: x'(k) = A*x(k) statePre = transitionMatrix*statePost; @@ -105,7 +105,7 @@ const Mat& KalmanFilter::predict(const Mat& control) const Mat& KalmanFilter::correct(const Mat& measurement) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); // temp2 = H*P'(k) temp2 = measurementMatrix * errorCovPre; diff --git a/modules/video/src/lkpyramid.cpp b/modules/video/src/lkpyramid.cpp index 94704681ef..40026cd3c1 100644 --- a/modules/video/src/lkpyramid.cpp +++ b/modules/video/src/lkpyramid.cpp @@ -180,7 +180,7 @@ typedef float itemtype; void cv::detail::LKTrackerInvoker::operator()(const Range& range) const { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Point2f halfWin((winSize.width-1)*0.5f, (winSize.height-1)*0.5f); const Mat& I = *prevImg; @@ -700,7 +700,7 @@ void cv::detail::LKTrackerInvoker::operator()(const Range& range) const int cv::buildOpticalFlowPyramid(InputArray _img, OutputArrayOfArrays pyramid, Size winSize, int maxLevel, bool withDerivatives, int pyrBorder, int derivBorder, bool tryReuseInputImage) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat img = _img.getMat(); CV_Assert(img.depth() == CV_8U && winSize.width > 2 && winSize.height > 2 ); @@ -1224,7 +1224,7 @@ void SparsePyrLKOpticalFlowImpl::calc( InputArray _prevImg, InputArray _nextImg, InputArray _prevPts, InputOutputArray _nextPts, OutputArray _status, OutputArray _err) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(ocl::isOpenCLActivated() && (_prevImg.isUMat() || _nextImg.isUMat()) && @@ -1495,7 +1495,7 @@ cv::Mat cv::estimateRigidTransform( InputArray src1, InputArray src2, bool fullA cv::Mat cv::estimateRigidTransform( InputArray src1, InputArray src2, bool fullAffine, int ransacMaxIters, double ransacGoodRatio, const int ransacSize0) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat M(2, 3, CV_64F), A = src1.getMat(), B = src2.getMat(); diff --git a/modules/video/src/optflowgf.cpp b/modules/video/src/optflowgf.cpp index 68edf4ca4e..2e6251b210 100644 --- a/modules/video/src/optflowgf.cpp +++ b/modules/video/src/optflowgf.cpp @@ -1096,7 +1096,7 @@ private: void FarnebackOpticalFlowImpl::calc(InputArray _prev0, InputArray _next0, InputOutputArray _flow0) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_OCL_RUN(_flow0.isUMat() && ocl::Image2D::isFormatSupported(CV_32F, 1, false), @@ -1186,7 +1186,7 @@ void cv::calcOpticalFlowFarneback( InputArray _prev0, InputArray _next0, InputOutputArray _flow0, double pyr_scale, int levels, int winsize, int iterations, int poly_n, double poly_sigma, int flags ) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Ptr optflow; optflow = makePtr(levels,pyr_scale,false,winsize,iterations,poly_n,poly_sigma,flags); diff --git a/modules/video/src/tvl1flow.cpp b/modules/video/src/tvl1flow.cpp index 061d0472c8..dc2dc827ac 100644 --- a/modules/video/src/tvl1flow.cpp +++ b/modules/video/src/tvl1flow.cpp @@ -402,7 +402,7 @@ OpticalFlowDual_TVL1::OpticalFlowDual_TVL1() void OpticalFlowDual_TVL1::calc(InputArray _I0, InputArray _I1, InputOutputArray _flow) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); #ifndef __APPLE__ CV_OCL_RUN(_flow.isUMat() && diff --git a/modules/videoio/src/cap.cpp b/modules/videoio/src/cap.cpp index 9c14be018f..f633ff8460 100644 --- a/modules/videoio/src/cap.cpp +++ b/modules/videoio/src/cap.cpp @@ -181,7 +181,7 @@ void VideoCapture::release() bool VideoCapture::grab() { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (!icap.empty()) return icap->grabFrame(); @@ -190,7 +190,7 @@ bool VideoCapture::grab() bool VideoCapture::retrieve(OutputArray image, int channel) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (!icap.empty()) return icap->retrieveFrame(channel, image); @@ -213,7 +213,7 @@ bool VideoCapture::retrieve(OutputArray image, int channel) bool VideoCapture::read(OutputArray image) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if(grab()) retrieve(image); @@ -252,7 +252,7 @@ VideoCapture& VideoCapture::operator >> (Mat& image) VideoCapture& VideoCapture::operator >> (UMat& image) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); read(image); return *this; @@ -309,7 +309,7 @@ bool VideoWriter::open(const String& filename, int _fourcc, double fps, Size fra bool VideoWriter::open(const String& filename, int apiPreference, int _fourcc, double fps, Size frameSize, bool isColor) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if (isOpened()) release(); @@ -360,7 +360,7 @@ double VideoWriter::get(int propId) const void VideoWriter::write(const Mat& image) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); if( iwriter ) iwriter->write(image); @@ -373,7 +373,7 @@ void VideoWriter::write(const Mat& image) VideoWriter& VideoWriter::operator << (const Mat& image) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); write(image); return *this; diff --git a/modules/videostab/src/deblurring.cpp b/modules/videostab/src/deblurring.cpp index dd6cfac825..2e94ccacee 100644 --- a/modules/videostab/src/deblurring.cpp +++ b/modules/videostab/src/deblurring.cpp @@ -52,7 +52,7 @@ namespace videostab float calcBlurriness(const Mat &frame) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat Gx, Gy; Sobel(frame, Gx, CV_32F, 1, 0); @@ -72,7 +72,7 @@ WeightingDeblurer::WeightingDeblurer() void WeightingDeblurer::deblur(int idx, Mat &frame) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(frame.type() == CV_8UC3); diff --git a/modules/videostab/src/global_motion.cpp b/modules/videostab/src/global_motion.cpp index c49de12a8d..ac4ca4d2e1 100644 --- a/modules/videostab/src/global_motion.cpp +++ b/modules/videostab/src/global_motion.cpp @@ -356,7 +356,7 @@ static Mat estimateGlobMotionLeastSquaresAffine( Mat estimateGlobalMotionLeastSquares( InputOutputArray points0, InputOutputArray points1, int model, float *rmse) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(model <= MM_AFFINE); CV_Assert(points0.type() == points1.type()); @@ -382,7 +382,7 @@ Mat estimateGlobalMotionRansac( InputArray points0, InputArray points1, int model, const RansacParams ¶ms, float *rmse, int *ninliers) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(model <= MM_AFFINE); CV_Assert(points0.type() == points1.type()); @@ -861,7 +861,7 @@ Mat KeypointBasedMotionEstimatorGpu::estimate(const cuda::GpuMat &frame0, const Mat getMotion(int from, int to, const std::vector &motions) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); Mat M = Mat::eye(3, 3, CV_32F); if (to > from) diff --git a/modules/videostab/src/inpainting.cpp b/modules/videostab/src/inpainting.cpp index 3fad005318..56b73e66af 100644 --- a/modules/videostab/src/inpainting.cpp +++ b/modules/videostab/src/inpainting.cpp @@ -103,7 +103,7 @@ void InpaintingPipeline::setStabilizationMotions(const std::vector &val) void InpaintingPipeline::inpaint(int idx, Mat &frame, Mat &mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); for (size_t i = 0; i < inpainters_.size(); ++i) inpainters_[i]->inpaint(idx, frame, mask); @@ -126,7 +126,7 @@ ConsistentMosaicInpainter::ConsistentMosaicInpainter() void ConsistentMosaicInpainter::inpaint(int idx, Mat &frame, Mat &mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(frame.type() == CV_8UC3); CV_Assert(mask.size() == frame.size() && mask.type() == CV_8U); @@ -340,7 +340,7 @@ MotionInpainter::MotionInpainter() void MotionInpainter::inpaint(int idx, Mat &frame, Mat &mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); std::priority_queue > neighbors; std::vector vmotions(2*radius_ + 1); @@ -462,7 +462,7 @@ public: void ColorAverageInpainter::inpaint(int /*idx*/, Mat &frame, Mat &mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); ColorAverageInpaintBody body; body.mask = mask; @@ -473,7 +473,7 @@ void ColorAverageInpainter::inpaint(int /*idx*/, Mat &frame, Mat &mask) void ColorInpainter::inpaint(int /*idx*/, Mat &frame, Mat &mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); bitwise_not(mask, invMask_); cv::inpaint(frame, invMask_, frame, radius_, method_); @@ -484,7 +484,7 @@ void calcFlowMask( const Mat &flowX, const Mat &flowY, const Mat &errors, float maxError, const Mat &mask0, const Mat &mask1, Mat &flowMask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(flowX.type() == CV_32F && flowX.size() == mask0.size()); CV_Assert(flowY.type() == CV_32F && flowY.size() == mask0.size()); @@ -520,7 +520,7 @@ void completeFrameAccordingToFlow( const Mat &flowMask, const Mat &flowX, const Mat &flowY, const Mat &frame1, const Mat &mask1, float distThresh, Mat &frame0, Mat &mask0) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(flowMask.type() == CV_8U); CV_Assert(flowX.type() == CV_32F && flowX.size() == flowMask.size()); diff --git a/modules/videostab/src/motion_stabilizing.cpp b/modules/videostab/src/motion_stabilizing.cpp index 025b7d56de..2314f26a9e 100644 --- a/modules/videostab/src/motion_stabilizing.cpp +++ b/modules/videostab/src/motion_stabilizing.cpp @@ -637,7 +637,7 @@ static inline void relaxMotion(const float M[], float t, float res[]) Mat ensureInclusionConstraint(const Mat &M, Size size, float trimRatio) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(M.size() == Size(3,3) && M.type() == CV_32F); @@ -674,7 +674,7 @@ Mat ensureInclusionConstraint(const Mat &M, Size size, float trimRatio) // TODO can be estimated for O(1) time float estimateOptimalTrimRatio(const Mat &M, Size size) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(M.size() == Size(3,3) && M.type() == CV_32F); diff --git a/modules/videostab/src/outlier_rejection.cpp b/modules/videostab/src/outlier_rejection.cpp index 0e9769c522..b6d7d64fcf 100644 --- a/modules/videostab/src/outlier_rejection.cpp +++ b/modules/videostab/src/outlier_rejection.cpp @@ -51,7 +51,7 @@ namespace videostab void NullOutlierRejector::process( Size /*frameSize*/, InputArray points0, InputArray points1, OutputArray mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(points0.type() == points1.type()); CV_Assert(points0.getMat().checkVector(2) == points1.getMat().checkVector(2)); @@ -72,7 +72,7 @@ TranslationBasedLocalOutlierRejector::TranslationBasedLocalOutlierRejector() void TranslationBasedLocalOutlierRejector::process( Size frameSize, InputArray points0, InputArray points1, OutputArray mask) { - CV_INSTRUMENT_REGION() + CV_INSTRUMENT_REGION(); CV_Assert(points0.type() == points1.type()); CV_Assert(points0.getMat().checkVector(2) == points1.getMat().checkVector(2)); From 1f88a1af9c3436a681bfb2fba71871cc5c1a87b6 Mon Sep 17 00:00:00 2001 From: Vitaly Tuzov Date: Fri, 14 Sep 2018 17:29:06 +0300 Subject: [PATCH 25/27] testlog_parser updated to handle output of latest GTest as well --- modules/ts/misc/testlog_parser.py | 36 ++++++++++++++++++------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/modules/ts/misc/testlog_parser.py b/modules/ts/misc/testlog_parser.py index f52307238f..5f4414059d 100755 --- a/modules/ts/misc/testlog_parser.py +++ b/modules/ts/misc/testlog_parser.py @@ -33,6 +33,11 @@ class TestInfo(object): self.status = "disabled" self.fixture = self.fixture.replace("DISABLED_", "") self.name = self.name.replace("DISABLED_", "") + self.properties = { + prop.getAttribute("name") : prop.getAttribute("value") + for prop in xmlnode.getElementsByTagName("property") + if prop.hasAttribute("name") and prop.hasAttribute("value") + } self.metrix = {} self.parseLongMetric(xmlnode, "bytesIn"); self.parseLongMetric(xmlnode, "bytesOut"); @@ -48,33 +53,34 @@ class TestInfo(object): self.parseFloatMetric(xmlnode, "time"); def parseLongMetric(self, xmlnode, name, default = 0): - if xmlnode.hasAttribute(name): - tmp = xmlnode.getAttribute(name) - val = long(tmp) - self.metrix[name] = val + if name in self.properties: + self.metrix[name] = long(self.properties[name]) + elif xmlnode.hasAttribute(name): + self.metrix[name] = long(xmlnode.getAttribute(name)) else: self.metrix[name] = default def parseIntMetric(self, xmlnode, name, default = 0): - if xmlnode.hasAttribute(name): - tmp = xmlnode.getAttribute(name) - val = int(tmp) - self.metrix[name] = val + if name in self.properties: + self.metrix[name] = int(self.properties[name]) + elif xmlnode.hasAttribute(name): + self.metrix[name] = int(xmlnode.getAttribute(name)) else: self.metrix[name] = default def parseFloatMetric(self, xmlnode, name, default = 0): - if xmlnode.hasAttribute(name): - tmp = xmlnode.getAttribute(name) - val = float(tmp) - self.metrix[name] = val + if name in self.properties: + self.metrix[name] = float(self.properties[name]) + elif xmlnode.hasAttribute(name): + self.metrix[name] = float(xmlnode.getAttribute(name)) else: self.metrix[name] = default def parseStringMetric(self, xmlnode, name, default = None): - if xmlnode.hasAttribute(name): - tmp = xmlnode.getAttribute(name) - self.metrix[name] = tmp.strip() + if name in self.properties: + self.metrix[name] = self.properties[name].strip() + elif xmlnode.hasAttribute(name): + self.metrix[name] = xmlnode.getAttribute(name).strip() else: self.metrix[name] = default From 95502242c9e01bb86e1c38e51ba50ab1a113d062 Mon Sep 17 00:00:00 2001 From: Vitaly Tuzov Date: Fri, 7 Sep 2018 20:33:43 +0300 Subject: [PATCH 26/27] meanStdDev() implementation updated to use wide universal intrinsics --- modules/core/src/mean.cpp | 166 +++++++++++++++++++++----------------- 1 file changed, 93 insertions(+), 73 deletions(-) diff --git a/modules/core/src/mean.cpp b/modules/core/src/mean.cpp index e17875c08b..7bb1ab0be1 100644 --- a/modules/core/src/mean.cpp +++ b/modules/core/src/mean.cpp @@ -180,66 +180,71 @@ struct SumSqr_SIMD } }; -template -inline void addSqrChannels(T * sum, T * sqsum, T * buf, int cn) -{ - for (int i = 0; i < 4; ++i) - { - sum[i % cn] += buf[i]; - sqsum[i % cn] += buf[4 + i]; - } -} - -#if CV_SSE2 +#if CV_SIMD template <> struct SumSqr_SIMD { int operator () (const uchar * src0, const uchar * mask, int * sum, int * sqsum, int len, int cn) const { - if (mask || (cn != 1 && cn != 2) || !USE_SSE2) + if (mask || (cn != 1 && cn != 2 && cn != 4)) return 0; + len *= cn; int x = 0; - __m128i v_zero = _mm_setzero_si128(), v_sum = v_zero, v_sqsum = v_zero; - const int len_16 = len & ~15; + v_int32 v_sum = vx_setzero_s32(); + v_int32 v_sqsum = vx_setzero_s32(); - for ( ; x <= len_16 - 16; ) + const int len0 = len & -v_uint8::nlanes; + while(x < len0) { - const int len_tmp = min(x + 2048, len_16); - __m128i v_sum_tmp = v_zero; - for ( ; x <= len_tmp - 16; x += 16) + const int len_tmp = min(x + 256*v_uint16::nlanes, len0); + v_uint16 v_sum16 = vx_setzero_u16(); + for ( ; x < len_tmp; x += v_uint8::nlanes) { - __m128i v_src = _mm_loadu_si128((const __m128i *)(src0 + x)); - __m128i v_half_0 = _mm_unpacklo_epi8(v_src, v_zero); - __m128i v_half_1 = _mm_unpackhi_epi8(v_src, v_zero); - v_sum_tmp = _mm_add_epi16(v_sum_tmp, _mm_add_epi16(v_half_0, v_half_1)); - __m128i v_half_2 = _mm_unpacklo_epi16(v_half_0, v_half_1); - __m128i v_half_3 = _mm_unpackhi_epi16(v_half_0, v_half_1); - v_sqsum = _mm_add_epi32(v_sqsum, _mm_madd_epi16(v_half_2, v_half_2)); - v_sqsum = _mm_add_epi32(v_sqsum, _mm_madd_epi16(v_half_3, v_half_3)); + v_uint16 v_src0 = vx_load_expand(src0 + x); + v_uint16 v_src1 = vx_load_expand(src0 + x + v_uint16::nlanes); + v_sum16 += v_src0 + v_src1; + v_int16 v_tmp0, v_tmp1; + v_zip(v_reinterpret_as_s16(v_src0), v_reinterpret_as_s16(v_src1), v_tmp0, v_tmp1); + v_sqsum += v_dotprod(v_tmp0, v_tmp0) + v_dotprod(v_tmp1, v_tmp1); } - v_sum = _mm_add_epi32(v_sum, _mm_unpacklo_epi16(v_sum_tmp, v_zero)); - v_sum = _mm_add_epi32(v_sum, _mm_unpackhi_epi16(v_sum_tmp, v_zero)); + v_uint32 v_half0, v_half1; + v_expand(v_sum16, v_half0, v_half1); + v_sum += v_reinterpret_as_s32(v_half0 + v_half1); } - - for ( ; x <= len - 8; x += 8) + if (x <= len - v_uint16::nlanes) { - __m128i v_src = _mm_unpacklo_epi8(_mm_loadl_epi64((__m128i const *)(src0 + x)), v_zero); - __m128i v_half_0 = _mm_unpackhi_epi64(v_src, v_src); - __m128i v_sum_tmp = _mm_add_epi16(v_src, v_half_0); - __m128i v_half_1 = _mm_unpacklo_epi16(v_src, v_half_0); + v_uint16 v_src = vx_load_expand(src0 + x); + v_uint16 v_half = v_combine_high(v_src, v_src); - v_sum = _mm_add_epi32(v_sum, _mm_unpacklo_epi16(v_sum_tmp, v_zero)); - v_sqsum = _mm_add_epi32(v_sqsum, _mm_madd_epi16(v_half_1, v_half_1)); + v_uint32 v_tmp0, v_tmp1; + v_expand(v_src + v_half, v_tmp0, v_tmp1); + v_sum += v_reinterpret_as_s32(v_tmp0); + + v_int16 v_tmp2, v_tmp3; + v_zip(v_reinterpret_as_s16(v_src), v_reinterpret_as_s16(v_half), v_tmp2, v_tmp3); + v_sqsum += v_dotprod(v_tmp2, v_tmp2); + x += v_uint16::nlanes; } - int CV_DECL_ALIGNED(16) ar[8]; - _mm_store_si128((__m128i*)ar, v_sum); - _mm_store_si128((__m128i*)(ar + 4), v_sqsum); - - addSqrChannels(sum, sqsum, ar, cn); - + if (cn == 1) + { + *sum += v_reduce_sum(v_sum); + *sqsum += v_reduce_sum(v_sqsum); + } + else + { + int CV_DECL_ALIGNED(CV_SIMD_WIDTH) ar[2 * v_int32::nlanes]; + v_store(ar, v_sum); + v_store(ar + v_int32::nlanes, v_sqsum); + for (int i = 0; i < v_int32::nlanes; ++i) + { + sum[i % cn] += ar[i]; + sqsum[i % cn] += ar[v_int32::nlanes + i]; + } + } + v_cleanup(); return x / cn; } }; @@ -249,49 +254,64 @@ struct SumSqr_SIMD { int operator () (const schar * src0, const uchar * mask, int * sum, int * sqsum, int len, int cn) const { - if (mask || (cn != 1 && cn != 2) || !USE_SSE2) + if (mask || (cn != 1 && cn != 2 && cn != 4)) return 0; + len *= cn; int x = 0; - __m128i v_zero = _mm_setzero_si128(), v_sum = v_zero, v_sqsum = v_zero; - const int len_16 = len & ~15; + v_int32 v_sum = vx_setzero_s32(); + v_int32 v_sqsum = vx_setzero_s32(); - for ( ; x <= len_16 - 16; ) + const int len0 = len & -v_int8::nlanes; + while (x < len0) { - const int len_tmp = min(x + 2048, len_16); - __m128i v_sum_tmp = v_zero; - for ( ; x <= len_tmp - 16; x += 16) + const int len_tmp = min(x + 256 * v_int16::nlanes, len0); + v_int16 v_sum16 = vx_setzero_s16(); + for (; x < len_tmp; x += v_int8::nlanes) { - __m128i v_src = _mm_loadu_si128((const __m128i *)(src0 + x)); - __m128i v_half_0 = _mm_srai_epi16(_mm_unpacklo_epi8(v_zero, v_src), 8); - __m128i v_half_1 = _mm_srai_epi16(_mm_unpackhi_epi8(v_zero, v_src), 8); - v_sum_tmp = _mm_add_epi16(v_sum_tmp, _mm_add_epi16(v_half_0, v_half_1)); - __m128i v_half_2 = _mm_unpacklo_epi16(v_half_0, v_half_1); - __m128i v_half_3 = _mm_unpackhi_epi16(v_half_0, v_half_1); - v_sqsum = _mm_add_epi32(v_sqsum, _mm_madd_epi16(v_half_2, v_half_2)); - v_sqsum = _mm_add_epi32(v_sqsum, _mm_madd_epi16(v_half_3, v_half_3)); + v_int16 v_src0 = vx_load_expand(src0 + x); + v_int16 v_src1 = vx_load_expand(src0 + x + v_int16::nlanes); + v_sum16 += v_src0 + v_src1; + v_int16 v_tmp0, v_tmp1; + v_zip(v_src0, v_src1, v_tmp0, v_tmp1); + v_sqsum += v_dotprod(v_tmp0, v_tmp0) + v_dotprod(v_tmp1, v_tmp1); } - v_sum = _mm_add_epi32(v_sum, _mm_srai_epi32(_mm_unpacklo_epi16(v_zero, v_sum_tmp), 16)); - v_sum = _mm_add_epi32(v_sum, _mm_srai_epi32(_mm_unpackhi_epi16(v_zero, v_sum_tmp), 16)); + v_int32 v_half0, v_half1; + v_expand(v_sum16, v_half0, v_half1); + v_sum += v_half0 + v_half1; } - - for ( ; x <= len - 8; x += 8) + if (x <= len - v_int16::nlanes) { - __m128i v_src = _mm_srai_epi16(_mm_unpacklo_epi8(v_zero, _mm_loadl_epi64((__m128i const *)(src0 + x))), 8); - __m128i v_half_0 = _mm_unpackhi_epi64(v_src, v_src); - __m128i v_sum_tmp = _mm_add_epi16(v_src, v_half_0); - __m128i v_half_1 = _mm_unpacklo_epi16(v_src, v_half_0); + v_int16 v_src = vx_load_expand(src0 + x); + v_int16 v_half = v_combine_high(v_src, v_src); - v_sum = _mm_add_epi32(v_sum, _mm_srai_epi32(_mm_unpacklo_epi16(v_zero, v_sum_tmp), 16)); - v_sqsum = _mm_add_epi32(v_sqsum, _mm_madd_epi16(v_half_1, v_half_1)); + v_int32 v_tmp0, v_tmp1; + v_expand(v_src + v_half, v_tmp0, v_tmp1); + v_sum += v_tmp0; + + v_int16 v_tmp2, v_tmp3; + v_zip(v_src, v_half, v_tmp2, v_tmp3); + v_sqsum += v_dotprod(v_tmp2, v_tmp2); + x += v_int16::nlanes; } - int CV_DECL_ALIGNED(16) ar[8]; - _mm_store_si128((__m128i*)ar, v_sum); - _mm_store_si128((__m128i*)(ar + 4), v_sqsum); - - addSqrChannels(sum, sqsum, ar, cn); - + if (cn == 1) + { + *sum += v_reduce_sum(v_sum); + *sqsum += v_reduce_sum(v_sqsum); + } + else + { + int CV_DECL_ALIGNED(CV_SIMD_WIDTH) ar[2 * v_int32::nlanes]; + v_store(ar, v_sum); + v_store(ar + v_int32::nlanes, v_sqsum); + for (int i = 0; i < v_int32::nlanes; ++i) + { + sum[i % cn] += ar[i]; + sqsum[i % cn] += ar[v_int32::nlanes + i]; + } + } + v_cleanup(); return x / cn; } }; From 6d5f7b72c0cede07c5e8450061e208585d48b875 Mon Sep 17 00:00:00 2001 From: Suleyman TURKMEN Date: Wed, 12 Sep 2018 17:34:32 +0300 Subject: [PATCH 27/27] Update seamless_cloning.cpp --- modules/photo/src/seamless_cloning.cpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/modules/photo/src/seamless_cloning.cpp b/modules/photo/src/seamless_cloning.cpp index e5fcd094fb..629c56fc1e 100644 --- a/modules/photo/src/seamless_cloning.cpp +++ b/modules/photo/src/seamless_cloning.cpp @@ -54,20 +54,27 @@ void cv::seamlessClone(InputArray _src, InputArray _dst, InputArray _mask, Point const Mat src = _src.getMat(); const Mat dest = _dst.getMat(); const Mat mask = _mask.getMat(); - _blend.create(dest.size(), CV_8UC3); + dest.copyTo(_blend); Mat blend = _blend.getMat(); - dest.copyTo(blend); - - int minx = INT_MAX, miny = INT_MAX, maxx = INT_MIN, maxy = INT_MIN; - int h = mask.size().height; - int w = mask.size().width; Mat gray; if(mask.channels() == 3) cvtColor(mask, gray, COLOR_BGR2GRAY ); else - mask.copyTo(gray); + { + if (mask.empty()) + gray = Mat(src.rows, src.cols, CV_8UC1, Scalar(255)); + else + mask.copyTo(gray); + } + + Mat gray_inner = gray(Rect(1, 1, gray.cols - 2, gray.rows - 2)); + copyMakeBorder(gray_inner, gray, 1, 1, 1, 1, BORDER_ISOLATED | BORDER_CONSTANT, Scalar(0)); + + int minx = INT_MAX, miny = INT_MAX, maxx = INT_MIN, maxy = INT_MIN; + int h = gray.size().height; + int w = gray.size().width; for(int i=0;i