diff --git a/3rdparty/protobuf/CMakeLists.txt b/3rdparty/protobuf/CMakeLists.txt index 7df035cac9..6923b70b7d 100644 --- a/3rdparty/protobuf/CMakeLists.txt +++ b/3rdparty/protobuf/CMakeLists.txt @@ -62,7 +62,7 @@ append_if_exist(Protobuf_SRCS ${PROTOBUF_ROOT}/src/google/protobuf/arena.cc ${PROTOBUF_ROOT}/src/google/protobuf/arenastring.cc ${PROTOBUF_ROOT}/src/google/protobuf/extension_set.cc -# ${PROTOBUF_ROOT}/src/google/protobuf/generated_enum_util.cc + ${PROTOBUF_ROOT}/src/google/protobuf/generated_enum_util.cc # ${PROTOBUF_ROOT}/src/google/protobuf/generated_message_table_driven_lite.cc # ${PROTOBUF_ROOT}/src/google/protobuf/generated_message_tctable_lite.cc ${PROTOBUF_ROOT}/src/google/protobuf/generated_message_util.cc diff --git a/3rdparty/protobuf/src/google/protobuf/generated_enum_util.cc b/3rdparty/protobuf/src/google/protobuf/generated_enum_util.cc new file mode 100644 index 0000000000..df7583e999 --- /dev/null +++ b/3rdparty/protobuf/src/google/protobuf/generated_enum_util.cc @@ -0,0 +1,95 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions 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. +// * Neither the name of Google Inc. nor the names of its +// contributors may 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 COPYRIGHT +// OWNER 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. + +#include + +#include + +#include + +namespace google { +namespace protobuf { +namespace internal { +namespace { + +bool EnumCompareByName(const EnumEntry& a, const EnumEntry& b) { + return StringPiece(a.name) < StringPiece(b.name); +} + +// Gets the numeric value of the EnumEntry at the given index, but returns a +// special value for the index -1. This gives a way to use std::lower_bound on a +// sorted array of indices while searching for value that we associate with -1. +int GetValue(const EnumEntry* enums, int i, int target) { + if (i == -1) { + return target; + } else { + return enums[i].value; + } +} + +} // namespace + +bool LookUpEnumValue(const EnumEntry* enums, size_t size, + StringPiece name, int* value) { + EnumEntry target{name, 0}; + auto it = std::lower_bound(enums, enums + size, target, EnumCompareByName); + if (it != enums + size && it->name == name) { + *value = it->value; + return true; + } + return false; +} + +int LookUpEnumName(const EnumEntry* enums, const int* sorted_indices, + size_t size, int value) { + auto comparator = [enums, value](int a, int b) { + return GetValue(enums, a, value) < GetValue(enums, b, value); + }; + auto it = + std::lower_bound(sorted_indices, sorted_indices + size, -1, comparator); + if (it != sorted_indices + size && enums[*it].value == value) { + return it - sorted_indices; + } + return -1; +} + +bool InitializeEnumStrings( + const EnumEntry* enums, const int* sorted_indices, size_t size, + internal::ExplicitlyConstructed* enum_strings) { + for (size_t i = 0; i < size; ++i) { + enum_strings[i].Construct(enums[sorted_indices[i]].name); + internal::OnShutdownDestroyString(enum_strings[i].get_mutable()); + } + return true; +} + +} // namespace internal +} // namespace protobuf +} // namespace google diff --git a/modules/dnn/misc/onnx/opencv-onnx.pb.cc b/modules/dnn/misc/onnx/opencv-onnx.pb.cc index 44e0730d70..4552f3ecb3 100644 --- a/modules/dnn/misc/onnx/opencv-onnx.pb.cc +++ b/modules/dnn/misc/onnx/opencv-onnx.pb.cc @@ -8,10 +8,7 @@ #include #include #include -#include -#include -#include -#include +#include // @@protoc_insertion_point(includes) #include @@ -24,12 +21,16 @@ constexpr AttributeProto::AttributeProto( , strings_() , tensors_() , graphs_() + , type_protos_() + , sparse_tensors_() , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , s_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , ref_attr_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , t_(nullptr) , g_(nullptr) + , tp_(nullptr) + , sparse_tensor_(nullptr) , i_(int64_t{0}) , f_(0) , type_(0) @@ -45,7 +46,8 @@ struct AttributeProtoDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AttributeProtoDefaultTypeInternal _AttributeProto_default_instance_; constexpr ValueInfoProto::ValueInfoProto( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) - : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + : metadata_props_() + , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , type_(nullptr){} struct ValueInfoProtoDefaultTypeInternal { @@ -62,10 +64,13 @@ constexpr NodeProto::NodeProto( : input_() , output_() , attribute_() + , metadata_props_() + , device_configurations_() , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , op_type_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) - , domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} + , domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , overload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct NodeProtoDefaultTypeInternal { constexpr NodeProtoDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -75,10 +80,96 @@ struct NodeProtoDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeProtoDefaultTypeInternal _NodeProto_default_instance_; +constexpr IntIntListEntryProto::IntIntListEntryProto( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : value_() + , key_(int64_t{0}){} +struct IntIntListEntryProtoDefaultTypeInternal { + constexpr IntIntListEntryProtoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~IntIntListEntryProtoDefaultTypeInternal() {} + union { + IntIntListEntryProto _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT IntIntListEntryProtoDefaultTypeInternal _IntIntListEntryProto_default_instance_; +constexpr NodeDeviceConfigurationProto::NodeDeviceConfigurationProto( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : sharding_spec_() + , configuration_id_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , pipeline_stage_(0){} +struct NodeDeviceConfigurationProtoDefaultTypeInternal { + constexpr NodeDeviceConfigurationProtoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~NodeDeviceConfigurationProtoDefaultTypeInternal() {} + union { + NodeDeviceConfigurationProto _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeDeviceConfigurationProtoDefaultTypeInternal _NodeDeviceConfigurationProto_default_instance_; +constexpr ShardingSpecProto::ShardingSpecProto( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : device_() + , index_to_device_group_map_() + , sharded_dim_() + , tensor_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct ShardingSpecProtoDefaultTypeInternal { + constexpr ShardingSpecProtoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ShardingSpecProtoDefaultTypeInternal() {} + union { + ShardingSpecProto _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ShardingSpecProtoDefaultTypeInternal _ShardingSpecProto_default_instance_; +constexpr ShardedDimProto::ShardedDimProto( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : simple_sharding_() + , axis_(int64_t{0}){} +struct ShardedDimProtoDefaultTypeInternal { + constexpr ShardedDimProtoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~ShardedDimProtoDefaultTypeInternal() {} + union { + ShardedDimProto _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ShardedDimProtoDefaultTypeInternal _ShardedDimProto_default_instance_; +constexpr SimpleShardedDimProto::SimpleShardedDimProto( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : num_shards_(int64_t{0}) + , _oneof_case_{}{} +struct SimpleShardedDimProtoDefaultTypeInternal { + constexpr SimpleShardedDimProtoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SimpleShardedDimProtoDefaultTypeInternal() {} + union { + SimpleShardedDimProto _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SimpleShardedDimProtoDefaultTypeInternal _SimpleShardedDimProto_default_instance_; +constexpr TrainingInfoProto::TrainingInfoProto( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : initialization_binding_() + , update_binding_() + , initialization_(nullptr) + , algorithm_(nullptr){} +struct TrainingInfoProtoDefaultTypeInternal { + constexpr TrainingInfoProtoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~TrainingInfoProtoDefaultTypeInternal() {} + union { + TrainingInfoProto _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TrainingInfoProtoDefaultTypeInternal _TrainingInfoProto_default_instance_; constexpr ModelProto::ModelProto( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : opset_import_() , metadata_props_() + , training_info_() + , functions_() + , configuration_() , producer_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , producer_version_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) @@ -95,6 +186,20 @@ struct ModelProtoDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ModelProtoDefaultTypeInternal _ModelProto_default_instance_; +constexpr DeviceConfigurationProto::DeviceConfigurationProto( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : device_() + , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , num_devices_(0){} +struct DeviceConfigurationProtoDefaultTypeInternal { + constexpr DeviceConfigurationProtoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~DeviceConfigurationProtoDefaultTypeInternal() {} + union { + DeviceConfigurationProto _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DeviceConfigurationProtoDefaultTypeInternal _DeviceConfigurationProto_default_instance_; constexpr StringStringEntryProto::StringStringEntryProto( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : key_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) @@ -108,6 +213,19 @@ struct StringStringEntryProtoDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT StringStringEntryProtoDefaultTypeInternal _StringStringEntryProto_default_instance_; +constexpr TensorAnnotation::TensorAnnotation( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : quant_parameter_tensor_names_() + , tensor_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct TensorAnnotationDefaultTypeInternal { + constexpr TensorAnnotationDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~TensorAnnotationDefaultTypeInternal() {} + union { + TensorAnnotation _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorAnnotationDefaultTypeInternal _TensorAnnotation_default_instance_; constexpr GraphProto::GraphProto( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : node_() @@ -115,6 +233,9 @@ constexpr GraphProto::GraphProto( , input_() , output_() , value_info_() + , quantization_annotation_() + , sparse_initializer_() + , metadata_props_() , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} struct GraphProtoDefaultTypeInternal { @@ -151,11 +272,14 @@ constexpr TensorProto::TensorProto( , double_data_() , uint64_data_() , _uint64_data_cached_byte_size_(0) + , external_data_() + , metadata_props_() , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , raw_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) , segment_(nullptr) , data_type_(0) + , data_location_(0) {} struct TensorProtoDefaultTypeInternal { constexpr TensorProtoDefaultTypeInternal() @@ -166,6 +290,20 @@ struct TensorProtoDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorProtoDefaultTypeInternal _TensorProto_default_instance_; +constexpr SparseTensorProto::SparseTensorProto( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : dims_() + , values_(nullptr) + , indices_(nullptr){} +struct SparseTensorProtoDefaultTypeInternal { + constexpr SparseTensorProtoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~SparseTensorProtoDefaultTypeInternal() {} + union { + SparseTensorProto _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SparseTensorProtoDefaultTypeInternal _SparseTensorProto_default_instance_; constexpr TensorShapeProto_Dimension::TensorShapeProto_Dimension( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : denotation_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) @@ -194,8 +332,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorShapeProtoDefaultTypeInte constexpr TypeProto_Tensor::TypeProto_Tensor( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : shape_(nullptr) - , elem_type_(0) -{} + , elem_type_(0){} struct TypeProto_TensorDefaultTypeInternal { constexpr TypeProto_TensorDefaultTypeInternal() : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} @@ -205,6 +342,56 @@ struct TypeProto_TensorDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_TensorDefaultTypeInternal _TypeProto_Tensor_default_instance_; +constexpr TypeProto_Sequence::TypeProto_Sequence( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : elem_type_(nullptr){} +struct TypeProto_SequenceDefaultTypeInternal { + constexpr TypeProto_SequenceDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~TypeProto_SequenceDefaultTypeInternal() {} + union { + TypeProto_Sequence _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_SequenceDefaultTypeInternal _TypeProto_Sequence_default_instance_; +constexpr TypeProto_Map::TypeProto_Map( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : value_type_(nullptr) + , key_type_(0){} +struct TypeProto_MapDefaultTypeInternal { + constexpr TypeProto_MapDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~TypeProto_MapDefaultTypeInternal() {} + union { + TypeProto_Map _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_MapDefaultTypeInternal _TypeProto_Map_default_instance_; +constexpr TypeProto_Optional::TypeProto_Optional( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : elem_type_(nullptr){} +struct TypeProto_OptionalDefaultTypeInternal { + constexpr TypeProto_OptionalDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~TypeProto_OptionalDefaultTypeInternal() {} + union { + TypeProto_Optional _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_OptionalDefaultTypeInternal _TypeProto_Optional_default_instance_; +constexpr TypeProto_SparseTensor::TypeProto_SparseTensor( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : shape_(nullptr) + , elem_type_(0){} +struct TypeProto_SparseTensorDefaultTypeInternal { + constexpr TypeProto_SparseTensorDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~TypeProto_SparseTensorDefaultTypeInternal() {} + union { + TypeProto_SparseTensor _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TypeProto_SparseTensorDefaultTypeInternal _TypeProto_SparseTensor_default_instance_; constexpr TypeProto::TypeProto( ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) : denotation_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) @@ -231,340 +418,31 @@ struct OperatorSetIdProtoDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OperatorSetIdProtoDefaultTypeInternal _OperatorSetIdProto_default_instance_; +constexpr FunctionProto::FunctionProto( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : input_() + , output_() + , attribute_() + , node_() + , opset_import_() + , attribute_proto_() + , value_info_() + , metadata_props_() + , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , doc_string_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , domain_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , overload_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} +struct FunctionProtoDefaultTypeInternal { + constexpr FunctionProtoDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~FunctionProtoDefaultTypeInternal() {} + union { + FunctionProto _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FunctionProtoDefaultTypeInternal _FunctionProto_default_instance_; } // namespace opencv_onnx -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_opencv_2donnx_2eproto[13]; -static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_opencv_2donnx_2eproto[3]; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_opencv_2donnx_2eproto = nullptr; - -const uint32_t TableStruct_opencv_2donnx_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, name_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, ref_attr_name_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, doc_string_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, type_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, f_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, i_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, s_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, t_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, g_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, floats_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, ints_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, strings_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, tensors_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::AttributeProto, graphs_), - 0, - 3, - 2, - 8, - 7, - 6, - 1, - 4, - 5, - ~0u, - ~0u, - ~0u, - ~0u, - ~0u, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, name_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, type_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, doc_string_), - 0, - 2, - 1, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, input_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, output_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, name_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, op_type_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, domain_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, attribute_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::NodeProto, doc_string_), - ~0u, - ~0u, - 0, - 1, - 3, - ~0u, - 2, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, ir_version_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, opset_import_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_name_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_version_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, domain_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, model_version_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, doc_string_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, graph_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::ModelProto, metadata_props_), - 5, - ~0u, - 0, - 1, - 2, - 6, - 3, - 4, - ~0u, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, key_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, value_), - 0, - 1, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, node_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, name_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, initializer_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, doc_string_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, input_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, output_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::GraphProto, value_info_), - ~0u, - 0, - ~0u, - 1, - ~0u, - ~0u, - ~0u, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, begin_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, end_), - 0, - 1, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, dims_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, data_type_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, segment_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, float_data_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, int32_data_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, string_data_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, int64_data_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, name_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, doc_string_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, raw_data_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, double_data_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorProto, uint64_data_), - ~0u, - 4, - 3, - ~0u, - ~0u, - ~0u, - ~0u, - 0, - 2, - 1, - ~0u, - ~0u, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _internal_metadata_), - ~0u, // no _extensions_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _oneof_case_[0]), - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, - ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, denotation_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, value_), - ~0u, - ~0u, - 0, - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, dim_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, elem_type_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, shape_), - 1, - 0, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _internal_metadata_), - ~0u, // no _extensions_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, _oneof_case_[0]), - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, denotation_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::TypeProto, value_), - ~0u, - 0, - PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _has_bits_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, domain_), - PROTOBUF_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, version_), - 0, - 1, -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 20, -1, sizeof(::opencv_onnx::AttributeProto)}, - { 34, 43, -1, sizeof(::opencv_onnx::ValueInfoProto)}, - { 46, 59, -1, sizeof(::opencv_onnx::NodeProto)}, - { 66, 81, -1, sizeof(::opencv_onnx::ModelProto)}, - { 90, 98, -1, sizeof(::opencv_onnx::StringStringEntryProto)}, - { 100, 113, -1, sizeof(::opencv_onnx::GraphProto)}, - { 120, 128, -1, sizeof(::opencv_onnx::TensorProto_Segment)}, - { 130, 148, -1, sizeof(::opencv_onnx::TensorProto)}, - { 160, 170, -1, sizeof(::opencv_onnx::TensorShapeProto_Dimension)}, - { 173, -1, -1, sizeof(::opencv_onnx::TensorShapeProto)}, - { 180, 188, -1, sizeof(::opencv_onnx::TypeProto_Tensor)}, - { 190, 199, -1, sizeof(::opencv_onnx::TypeProto)}, - { 201, 209, -1, sizeof(::opencv_onnx::OperatorSetIdProto)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::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_), -}; - -const char descriptor_table_protodef_opencv_2donnx_2eproto[] PROTOBUF_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" - ; -static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_opencv_2donnx_2eproto_once; -const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_opencv_2donnx_2eproto = { - false, false, 2523, descriptor_table_protodef_opencv_2donnx_2eproto, "opencv-onnx.proto", - &descriptor_table_opencv_2donnx_2eproto_once, nullptr, 0, 13, - schemas, file_default_instances, TableStruct_opencv_2donnx_2eproto::offsets, - file_level_metadata_opencv_2donnx_2eproto, file_level_enum_descriptors_opencv_2donnx_2eproto, file_level_service_descriptors_opencv_2donnx_2eproto, -}; -PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_opencv_2donnx_2eproto_getter() { - return &descriptor_table_opencv_2donnx_2eproto; -} - -// Force running AddDescriptors() at dynamic initialization time. -PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_opencv_2donnx_2eproto(&descriptor_table_opencv_2donnx_2eproto); namespace opencv_onnx { -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AttributeProto_AttributeType_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto); - return file_level_enum_descriptors_opencv_2donnx_2eproto[0]; -} bool AttributeProto_AttributeType_IsValid(int value) { switch (value) { case 0: @@ -578,12 +456,96 @@ bool AttributeProto_AttributeType_IsValid(int value) { case 8: case 9: case 10: + case 11: + case 12: + case 13: + case 14: return true; default: return false; } } +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed AttributeProto_AttributeType_strings[15] = {}; + +static const char AttributeProto_AttributeType_names[] = + "FLOAT" + "FLOATS" + "GRAPH" + "GRAPHS" + "INT" + "INTS" + "SPARSE_TENSOR" + "SPARSE_TENSORS" + "STRING" + "STRINGS" + "TENSOR" + "TENSORS" + "TYPE_PROTO" + "TYPE_PROTOS" + "UNDEFINED"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry AttributeProto_AttributeType_entries[] = { + { {AttributeProto_AttributeType_names + 0, 5}, 1 }, + { {AttributeProto_AttributeType_names + 5, 6}, 6 }, + { {AttributeProto_AttributeType_names + 11, 5}, 5 }, + { {AttributeProto_AttributeType_names + 16, 6}, 10 }, + { {AttributeProto_AttributeType_names + 22, 3}, 2 }, + { {AttributeProto_AttributeType_names + 25, 4}, 7 }, + { {AttributeProto_AttributeType_names + 29, 13}, 11 }, + { {AttributeProto_AttributeType_names + 42, 14}, 12 }, + { {AttributeProto_AttributeType_names + 56, 6}, 3 }, + { {AttributeProto_AttributeType_names + 62, 7}, 8 }, + { {AttributeProto_AttributeType_names + 69, 6}, 4 }, + { {AttributeProto_AttributeType_names + 75, 7}, 9 }, + { {AttributeProto_AttributeType_names + 82, 10}, 13 }, + { {AttributeProto_AttributeType_names + 92, 11}, 14 }, + { {AttributeProto_AttributeType_names + 103, 9}, 0 }, +}; + +static const int AttributeProto_AttributeType_entries_by_number[] = { + 14, // 0 -> UNDEFINED + 0, // 1 -> FLOAT + 4, // 2 -> INT + 8, // 3 -> STRING + 10, // 4 -> TENSOR + 2, // 5 -> GRAPH + 1, // 6 -> FLOATS + 5, // 7 -> INTS + 9, // 8 -> STRINGS + 11, // 9 -> TENSORS + 3, // 10 -> GRAPHS + 6, // 11 -> SPARSE_TENSOR + 7, // 12 -> SPARSE_TENSORS + 12, // 13 -> TYPE_PROTO + 13, // 14 -> TYPE_PROTOS +}; + +const std::string& AttributeProto_AttributeType_Name( + AttributeProto_AttributeType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + AttributeProto_AttributeType_entries, + AttributeProto_AttributeType_entries_by_number, + 15, AttributeProto_AttributeType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + AttributeProto_AttributeType_entries, + AttributeProto_AttributeType_entries_by_number, + 15, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + AttributeProto_AttributeType_strings[idx].get(); +} +bool AttributeProto_AttributeType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AttributeProto_AttributeType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + AttributeProto_AttributeType_entries, 15, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) constexpr AttributeProto_AttributeType AttributeProto::UNDEFINED; constexpr AttributeProto_AttributeType AttributeProto::FLOAT; @@ -591,19 +553,19 @@ constexpr AttributeProto_AttributeType AttributeProto::INT; constexpr AttributeProto_AttributeType AttributeProto::STRING; constexpr AttributeProto_AttributeType AttributeProto::TENSOR; constexpr AttributeProto_AttributeType AttributeProto::GRAPH; +constexpr AttributeProto_AttributeType AttributeProto::SPARSE_TENSOR; +constexpr AttributeProto_AttributeType AttributeProto::TYPE_PROTO; constexpr AttributeProto_AttributeType AttributeProto::FLOATS; constexpr AttributeProto_AttributeType AttributeProto::INTS; constexpr AttributeProto_AttributeType AttributeProto::STRINGS; constexpr AttributeProto_AttributeType AttributeProto::TENSORS; constexpr AttributeProto_AttributeType AttributeProto::GRAPHS; +constexpr AttributeProto_AttributeType AttributeProto::SPARSE_TENSORS; +constexpr AttributeProto_AttributeType AttributeProto::TYPE_PROTOS; constexpr AttributeProto_AttributeType AttributeProto::AttributeType_MIN; constexpr AttributeProto_AttributeType AttributeProto::AttributeType_MAX; constexpr int AttributeProto::AttributeType_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TensorProto_DataType_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto); - return file_level_enum_descriptors_opencv_2donnx_2eproto[1]; -} bool TensorProto_DataType_IsValid(int value) { switch (value) { case 0: @@ -622,12 +584,127 @@ bool TensorProto_DataType_IsValid(int value) { case 13: case 14: case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: return true; default: return false; } } +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed TensorProto_DataType_strings[24] = {}; + +static const char TensorProto_DataType_names[] = + "BFLOAT16" + "BOOL" + "COMPLEX128" + "COMPLEX64" + "DOUBLE" + "FLOAT" + "FLOAT16" + "FLOAT4E2M1" + "FLOAT8E4M3FN" + "FLOAT8E4M3FNUZ" + "FLOAT8E5M2" + "FLOAT8E5M2FNUZ" + "INT16" + "INT32" + "INT4" + "INT64" + "INT8" + "STRING" + "UINT16" + "UINT32" + "UINT4" + "UINT64" + "UINT8" + "UNDEFINED"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry TensorProto_DataType_entries[] = { + { {TensorProto_DataType_names + 0, 8}, 16 }, + { {TensorProto_DataType_names + 8, 4}, 9 }, + { {TensorProto_DataType_names + 12, 10}, 15 }, + { {TensorProto_DataType_names + 22, 9}, 14 }, + { {TensorProto_DataType_names + 31, 6}, 11 }, + { {TensorProto_DataType_names + 37, 5}, 1 }, + { {TensorProto_DataType_names + 42, 7}, 10 }, + { {TensorProto_DataType_names + 49, 10}, 23 }, + { {TensorProto_DataType_names + 59, 12}, 17 }, + { {TensorProto_DataType_names + 71, 14}, 18 }, + { {TensorProto_DataType_names + 85, 10}, 19 }, + { {TensorProto_DataType_names + 95, 14}, 20 }, + { {TensorProto_DataType_names + 109, 5}, 5 }, + { {TensorProto_DataType_names + 114, 5}, 6 }, + { {TensorProto_DataType_names + 119, 4}, 22 }, + { {TensorProto_DataType_names + 123, 5}, 7 }, + { {TensorProto_DataType_names + 128, 4}, 3 }, + { {TensorProto_DataType_names + 132, 6}, 8 }, + { {TensorProto_DataType_names + 138, 6}, 4 }, + { {TensorProto_DataType_names + 144, 6}, 12 }, + { {TensorProto_DataType_names + 150, 5}, 21 }, + { {TensorProto_DataType_names + 155, 6}, 13 }, + { {TensorProto_DataType_names + 161, 5}, 2 }, + { {TensorProto_DataType_names + 166, 9}, 0 }, +}; + +static const int TensorProto_DataType_entries_by_number[] = { + 23, // 0 -> UNDEFINED + 5, // 1 -> FLOAT + 22, // 2 -> UINT8 + 16, // 3 -> INT8 + 18, // 4 -> UINT16 + 12, // 5 -> INT16 + 13, // 6 -> INT32 + 15, // 7 -> INT64 + 17, // 8 -> STRING + 1, // 9 -> BOOL + 6, // 10 -> FLOAT16 + 4, // 11 -> DOUBLE + 19, // 12 -> UINT32 + 21, // 13 -> UINT64 + 3, // 14 -> COMPLEX64 + 2, // 15 -> COMPLEX128 + 0, // 16 -> BFLOAT16 + 8, // 17 -> FLOAT8E4M3FN + 9, // 18 -> FLOAT8E4M3FNUZ + 10, // 19 -> FLOAT8E5M2 + 11, // 20 -> FLOAT8E5M2FNUZ + 20, // 21 -> UINT4 + 14, // 22 -> INT4 + 7, // 23 -> FLOAT4E2M1 +}; + +const std::string& TensorProto_DataType_Name( + TensorProto_DataType value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + TensorProto_DataType_entries, + TensorProto_DataType_entries_by_number, + 24, TensorProto_DataType_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + TensorProto_DataType_entries, + TensorProto_DataType_entries_by_number, + 24, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + TensorProto_DataType_strings[idx].get(); +} +bool TensorProto_DataType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TensorProto_DataType* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + TensorProto_DataType_entries, 24, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) constexpr TensorProto_DataType TensorProto::UNDEFINED; constexpr TensorProto_DataType TensorProto::FLOAT; @@ -645,26 +722,218 @@ constexpr TensorProto_DataType TensorProto::UINT32; constexpr TensorProto_DataType TensorProto::UINT64; constexpr TensorProto_DataType TensorProto::COMPLEX64; constexpr TensorProto_DataType TensorProto::COMPLEX128; +constexpr TensorProto_DataType TensorProto::BFLOAT16; +constexpr TensorProto_DataType TensorProto::FLOAT8E4M3FN; +constexpr TensorProto_DataType TensorProto::FLOAT8E4M3FNUZ; +constexpr TensorProto_DataType TensorProto::FLOAT8E5M2; +constexpr TensorProto_DataType TensorProto::FLOAT8E5M2FNUZ; +constexpr TensorProto_DataType TensorProto::UINT4; +constexpr TensorProto_DataType TensorProto::INT4; +constexpr TensorProto_DataType TensorProto::FLOAT4E2M1; constexpr TensorProto_DataType TensorProto::DataType_MIN; constexpr TensorProto_DataType TensorProto::DataType_MAX; constexpr int TensorProto::DataType_ARRAYSIZE; #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Version_descriptor() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2donnx_2eproto); - return file_level_enum_descriptors_opencv_2donnx_2eproto[2]; -} -bool Version_IsValid(int value) { +bool TensorProto_DataLocation_IsValid(int value) { switch (value) { case 0: case 1: - case 2: - case 3: return true; default: return false; } } +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed TensorProto_DataLocation_strings[2] = {}; + +static const char TensorProto_DataLocation_names[] = + "DEFAULT" + "EXTERNAL"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry TensorProto_DataLocation_entries[] = { + { {TensorProto_DataLocation_names + 0, 7}, 0 }, + { {TensorProto_DataLocation_names + 7, 8}, 1 }, +}; + +static const int TensorProto_DataLocation_entries_by_number[] = { + 0, // 0 -> DEFAULT + 1, // 1 -> EXTERNAL +}; + +const std::string& TensorProto_DataLocation_Name( + TensorProto_DataLocation value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + TensorProto_DataLocation_entries, + TensorProto_DataLocation_entries_by_number, + 2, TensorProto_DataLocation_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + TensorProto_DataLocation_entries, + TensorProto_DataLocation_entries_by_number, + 2, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + TensorProto_DataLocation_strings[idx].get(); +} +bool TensorProto_DataLocation_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TensorProto_DataLocation* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + TensorProto_DataLocation_entries, 2, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr TensorProto_DataLocation TensorProto::DEFAULT; +constexpr TensorProto_DataLocation TensorProto::EXTERNAL; +constexpr TensorProto_DataLocation TensorProto::DataLocation_MIN; +constexpr TensorProto_DataLocation TensorProto::DataLocation_MAX; +constexpr int TensorProto::DataLocation_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +bool Version_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: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed Version_strings[12] = {}; + +static const char Version_names[] = + "IR_VERSION" + "IR_VERSION_2017_10_10" + "IR_VERSION_2017_10_30" + "IR_VERSION_2017_11_3" + "IR_VERSION_2019_1_22" + "IR_VERSION_2019_3_18" + "IR_VERSION_2019_9_19" + "IR_VERSION_2020_5_8" + "IR_VERSION_2021_7_30" + "IR_VERSION_2023_5_5" + "IR_VERSION_2024_3_25" + "_START_VERSION"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Version_entries[] = { + { {Version_names + 0, 10}, 11 }, + { {Version_names + 10, 21}, 1 }, + { {Version_names + 31, 21}, 2 }, + { {Version_names + 52, 20}, 3 }, + { {Version_names + 72, 20}, 4 }, + { {Version_names + 92, 20}, 5 }, + { {Version_names + 112, 20}, 6 }, + { {Version_names + 132, 19}, 7 }, + { {Version_names + 151, 20}, 8 }, + { {Version_names + 171, 19}, 9 }, + { {Version_names + 190, 20}, 10 }, + { {Version_names + 210, 14}, 0 }, +}; + +static const int Version_entries_by_number[] = { + 11, // 0 -> _START_VERSION + 1, // 1 -> IR_VERSION_2017_10_10 + 2, // 2 -> IR_VERSION_2017_10_30 + 3, // 3 -> IR_VERSION_2017_11_3 + 4, // 4 -> IR_VERSION_2019_1_22 + 5, // 5 -> IR_VERSION_2019_3_18 + 6, // 6 -> IR_VERSION_2019_9_19 + 7, // 7 -> IR_VERSION_2020_5_8 + 8, // 8 -> IR_VERSION_2021_7_30 + 9, // 9 -> IR_VERSION_2023_5_5 + 10, // 10 -> IR_VERSION_2024_3_25 + 0, // 11 -> IR_VERSION +}; + +const std::string& Version_Name( + Version value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + Version_entries, + Version_entries_by_number, + 12, Version_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + Version_entries, + Version_entries_by_number, + 12, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + Version_strings[idx].get(); +} +bool Version_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Version* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + Version_entries, 12, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} +bool OperatorStatus_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed OperatorStatus_strings[2] = {}; + +static const char OperatorStatus_names[] = + "EXPERIMENTAL" + "STABLE"; + +static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OperatorStatus_entries[] = { + { {OperatorStatus_names + 0, 12}, 0 }, + { {OperatorStatus_names + 12, 6}, 1 }, +}; + +static const int OperatorStatus_entries_by_number[] = { + 0, // 0 -> EXPERIMENTAL + 1, // 1 -> STABLE +}; + +const std::string& OperatorStatus_Name( + OperatorStatus value) { + static const bool dummy = + ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings( + OperatorStatus_entries, + OperatorStatus_entries_by_number, + 2, OperatorStatus_strings); + (void) dummy; + int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName( + OperatorStatus_entries, + OperatorStatus_entries_by_number, + 2, value); + return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() : + OperatorStatus_strings[idx].get(); +} +bool OperatorStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OperatorStatus* value) { + int int_value; + bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue( + OperatorStatus_entries, 2, name, &int_value); + if (success) { + *value = static_cast(int_value); + } + return success; +} // =================================================================== @@ -681,13 +950,13 @@ class AttributeProto::_Internal { (*has_bits)[0] |= 4u; } static void set_has_type(HasBits* has_bits) { - (*has_bits)[0] |= 256u; + (*has_bits)[0] |= 1024u; } static void set_has_f(HasBits* has_bits) { - (*has_bits)[0] |= 128u; + (*has_bits)[0] |= 512u; } static void set_has_i(HasBits* has_bits) { - (*has_bits)[0] |= 64u; + (*has_bits)[0] |= 256u; } static void set_has_s(HasBits* has_bits) { (*has_bits)[0] |= 2u; @@ -700,6 +969,14 @@ class AttributeProto::_Internal { static void set_has_g(HasBits* has_bits) { (*has_bits)[0] |= 32u; } + static const ::opencv_onnx::SparseTensorProto& sparse_tensor(const AttributeProto* msg); + static void set_has_sparse_tensor(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static const ::opencv_onnx::TypeProto& tp(const AttributeProto* msg); + static void set_has_tp(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } }; const ::opencv_onnx::TensorProto& @@ -710,14 +987,24 @@ const ::opencv_onnx::GraphProto& AttributeProto::_Internal::g(const AttributeProto* msg) { return *msg->g_; } +const ::opencv_onnx::SparseTensorProto& +AttributeProto::_Internal::sparse_tensor(const AttributeProto* msg) { + return *msg->sparse_tensor_; +} +const ::opencv_onnx::TypeProto& +AttributeProto::_Internal::tp(const AttributeProto* msg) { + return *msg->tp_; +} AttributeProto::AttributeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), floats_(arena), ints_(arena), strings_(arena), tensors_(arena), - graphs_(arena) { + graphs_(arena), + type_protos_(arena), + sparse_tensors_(arena) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -725,14 +1012,16 @@ AttributeProto::AttributeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, // @@protoc_insertion_point(arena_constructor:opencv_onnx.AttributeProto) } AttributeProto::AttributeProto(const AttributeProto& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_), floats_(from.floats_), ints_(from.ints_), strings_(from.strings_), tensors_(from.tensors_), - graphs_(from.graphs_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + graphs_(from.graphs_), + type_protos_(from.type_protos_), + sparse_tensors_(from.sparse_tensors_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); @@ -775,6 +1064,16 @@ AttributeProto::AttributeProto(const AttributeProto& from) } else { g_ = nullptr; } + if (from._internal_has_tp()) { + tp_ = new ::opencv_onnx::TypeProto(*from.tp_); + } else { + tp_ = nullptr; + } + if (from._internal_has_sparse_tensor()) { + sparse_tensor_ = new ::opencv_onnx::SparseTensorProto(*from.sparse_tensor_); + } else { + sparse_tensor_ = nullptr; + } ::memcpy(&i_, &from.i_, static_cast(reinterpret_cast(&type_) - reinterpret_cast(&i_)) + sizeof(type_)); @@ -808,7 +1107,7 @@ AttributeProto::~AttributeProto() { // @@protoc_insertion_point(destructor:opencv_onnx.AttributeProto) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void AttributeProto::SharedDtor() { @@ -819,6 +1118,8 @@ inline void AttributeProto::SharedDtor() { ref_attr_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete t_; if (this != internal_default_instance()) delete g_; + if (this != internal_default_instance()) delete tp_; + if (this != internal_default_instance()) delete sparse_tensor_; } void AttributeProto::ArenaDtor(void* object) { @@ -842,8 +1143,10 @@ void AttributeProto::Clear() { strings_.Clear(); tensors_.Clear(); graphs_.Clear(); + type_protos_.Clear(); + sparse_tensors_.Clear(); cached_has_bits = _has_bits_[0]; - if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x000000ffu) { if (cached_has_bits & 0x00000001u) { name_.ClearNonDefaultToEmpty(); } @@ -864,15 +1167,22 @@ void AttributeProto::Clear() { GOOGLE_DCHECK(g_ != nullptr); g_->Clear(); } + if (cached_has_bits & 0x00000040u) { + GOOGLE_DCHECK(tp_ != nullptr); + tp_->Clear(); + } + if (cached_has_bits & 0x00000080u) { + GOOGLE_DCHECK(sparse_tensor_ != nullptr); + sparse_tensor_->Clear(); + } } - if (cached_has_bits & 0x000000c0u) { + if (cached_has_bits & 0x00000700u) { ::memset(&i_, 0, static_cast( - reinterpret_cast(&f_) - - reinterpret_cast(&i_)) + sizeof(f_)); + reinterpret_cast(&type_) - + reinterpret_cast(&i_)) + sizeof(type_)); } - type_ = 0; _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* AttributeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -887,9 +1197,6 @@ const char* AttributeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { auto str = _internal_mutable_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.AttributeProto.name"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -1014,13 +1321,31 @@ const char* AttributeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 106)) { auto str = _internal_mutable_doc_string(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.AttributeProto.doc_string"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; + // optional .opencv_onnx.TypeProto tp = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 114)) { + ptr = ctx->ParseMessage(_internal_mutable_tp(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.TypeProto type_protos = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 122)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_type_protos(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<122>(ptr)); + } else + goto handle_unusual; + continue; // optional .opencv_onnx.AttributeProto.AttributeType type = 20; case 20: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 160)) { @@ -1039,13 +1364,31 @@ const char* AttributeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 170)) { auto str = _internal_mutable_ref_attr_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.AttributeProto.ref_attr_name"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; + // optional .opencv_onnx.SparseTensorProto sparse_tensor = 22; + case 22: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 178)) { + ptr = ctx->ParseMessage(_internal_mutable_sparse_tensor(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.SparseTensorProto sparse_tensors = 23; + case 23: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 186)) { + ptr -= 2; + do { + ptr += 2; + ptr = ctx->ParseMessage(_internal_add_sparse_tensors(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<186>(ptr)); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -1057,7 +1400,7 @@ const char* AttributeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -1079,22 +1422,18 @@ uint8_t* AttributeProto::_InternalSerialize( cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.AttributeProto.name"); target = stream->WriteStringMaybeAliased( 1, this->_internal_name(), target); } // optional float f = 2; - if (cached_has_bits & 0x00000080u) { + if (cached_has_bits & 0x00000200u) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_f(), target); } // optional int64 i = 3; - if (cached_has_bits & 0x00000040u) { + if (cached_has_bits & 0x00000100u) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_i(), target); } @@ -1157,16 +1496,28 @@ uint8_t* AttributeProto::_InternalSerialize( // optional string doc_string = 13; if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_doc_string().data(), static_cast(this->_internal_doc_string().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.AttributeProto.doc_string"); target = stream->WriteStringMaybeAliased( 13, this->_internal_doc_string(), target); } + // optional .opencv_onnx.TypeProto tp = 14; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 14, _Internal::tp(this), target, stream); + } + + // repeated .opencv_onnx.TypeProto type_protos = 15; + for (unsigned int i = 0, + n = static_cast(this->_internal_type_protos_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(15, this->_internal_type_protos(i), target, stream); + } + // optional .opencv_onnx.AttributeProto.AttributeType type = 20; - if (cached_has_bits & 0x00000100u) { + if (cached_has_bits & 0x00000400u) { target = stream->EnsureSpace(target); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( 20, this->_internal_type(), target); @@ -1174,17 +1525,29 @@ uint8_t* AttributeProto::_InternalSerialize( // optional string ref_attr_name = 21; if (cached_has_bits & 0x00000008u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_ref_attr_name().data(), static_cast(this->_internal_ref_attr_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.AttributeProto.ref_attr_name"); target = stream->WriteStringMaybeAliased( 21, this->_internal_ref_attr_name(), target); } + // optional .opencv_onnx.SparseTensorProto sparse_tensor = 22; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 22, _Internal::sparse_tensor(this), target, stream); + } + + // repeated .opencv_onnx.SparseTensorProto sparse_tensors = 23; + for (unsigned int i = 0, + n = static_cast(this->_internal_sparse_tensors_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(23, this->_internal_sparse_tensors(i), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.AttributeProto) return target; @@ -1238,6 +1601,20 @@ size_t AttributeProto::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + // repeated .opencv_onnx.TypeProto type_protos = 15; + total_size += 1UL * this->_internal_type_protos_size(); + for (const auto& msg : this->type_protos_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.SparseTensorProto sparse_tensors = 23; + total_size += 2UL * this->_internal_sparse_tensors_size(); + for (const auto& msg : this->sparse_tensors_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x000000ffu) { // optional string name = 1; @@ -1282,39 +1659,53 @@ size_t AttributeProto::ByteSizeLong() const { *g_); } - // optional int64 i = 3; + // optional .opencv_onnx.TypeProto tp = 14; if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *tp_); + } + + // optional .opencv_onnx.SparseTensorProto sparse_tensor = 22; + if (cached_has_bits & 0x00000080u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *sparse_tensor_); + } + + } + if (cached_has_bits & 0x00000700u) { + // optional int64 i = 3; + if (cached_has_bits & 0x00000100u) { total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_i()); } // optional float f = 2; - if (cached_has_bits & 0x00000080u) { + if (cached_has_bits & 0x00000200u) { total_size += 1 + 4; } - } - // optional .opencv_onnx.AttributeProto.AttributeType type = 20; - if (cached_has_bits & 0x00000100u) { - total_size += 2 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); - } + // optional .opencv_onnx.AttributeProto.AttributeType type = 20; + if (cached_has_bits & 0x00000400u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type()); + } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AttributeProto::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - AttributeProto::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AttributeProto::GetClassData() const { return &_class_data_; } - -void AttributeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void AttributeProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - void AttributeProto::MergeFrom(const AttributeProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.AttributeProto) GOOGLE_DCHECK_NE(&from, this); @@ -1326,6 +1717,8 @@ void AttributeProto::MergeFrom(const AttributeProto& from) { strings_.MergeFrom(from.strings_); tensors_.MergeFrom(from.tensors_); graphs_.MergeFrom(from.graphs_); + type_protos_.MergeFrom(from.type_protos_); + sparse_tensors_.MergeFrom(from.sparse_tensors_); cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x000000ffu) { if (cached_has_bits & 0x00000001u) { @@ -1347,17 +1740,25 @@ void AttributeProto::MergeFrom(const AttributeProto& from) { _internal_mutable_g()->::opencv_onnx::GraphProto::MergeFrom(from._internal_g()); } if (cached_has_bits & 0x00000040u) { - i_ = from.i_; + _internal_mutable_tp()->::opencv_onnx::TypeProto::MergeFrom(from._internal_tp()); } if (cached_has_bits & 0x00000080u) { + _internal_mutable_sparse_tensor()->::opencv_onnx::SparseTensorProto::MergeFrom(from._internal_sparse_tensor()); + } + } + if (cached_has_bits & 0x00000700u) { + if (cached_has_bits & 0x00000100u) { + i_ = from.i_; + } + if (cached_has_bits & 0x00000200u) { f_ = from.f_; } + if (cached_has_bits & 0x00000400u) { + type_ = from.type_; + } _has_bits_[0] |= cached_has_bits; } - if (cached_has_bits & 0x00000100u) { - _internal_set_type(from._internal_type()); - } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void AttributeProto::CopyFrom(const AttributeProto& from) { @@ -1382,6 +1783,8 @@ void AttributeProto::InternalSwap(AttributeProto* other) { strings_.InternalSwap(&other->strings_); tensors_.InternalSwap(&other->tensors_); graphs_.InternalSwap(&other->graphs_); + type_protos_.InternalSwap(&other->type_protos_); + sparse_tensors_.InternalSwap(&other->sparse_tensors_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), &name_, lhs_arena, @@ -1410,12 +1813,11 @@ void AttributeProto::InternalSwap(AttributeProto* other) { reinterpret_cast(&other->t_)); } -::PROTOBUF_NAMESPACE_ID::Metadata AttributeProto::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[0]); +std::string AttributeProto::GetTypeName() const { + return "opencv_onnx.AttributeProto"; } + // =================================================================== class ValueInfoProto::_Internal { @@ -1439,7 +1841,8 @@ ValueInfoProto::_Internal::type(const ValueInfoProto* msg) { } ValueInfoProto::ValueInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + metadata_props_(arena) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -1447,9 +1850,10 @@ ValueInfoProto::ValueInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, // @@protoc_insertion_point(arena_constructor:opencv_onnx.ValueInfoProto) } ValueInfoProto::ValueInfoProto(const ValueInfoProto& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), - _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + metadata_props_(from.metadata_props_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); @@ -1490,7 +1894,7 @@ ValueInfoProto::~ValueInfoProto() { // @@protoc_insertion_point(destructor:opencv_onnx.ValueInfoProto) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void ValueInfoProto::SharedDtor() { @@ -1516,6 +1920,7 @@ void ValueInfoProto::Clear() { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + metadata_props_.Clear(); cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { @@ -1530,7 +1935,7 @@ void ValueInfoProto::Clear() { } } _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* ValueInfoProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -1545,9 +1950,6 @@ const char* ValueInfoProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { auto str = _internal_mutable_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ValueInfoProto.name"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -1565,13 +1967,23 @@ const char* ValueInfoProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { auto str = _internal_mutable_doc_string(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ValueInfoProto.doc_string"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_metadata_props(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -1583,7 +1995,7 @@ const char* ValueInfoProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -1605,10 +2017,6 @@ uint8_t* ValueInfoProto::_InternalSerialize( cached_has_bits = _has_bits_[0]; // optional string name = 1; if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.ValueInfoProto.name"); target = stream->WriteStringMaybeAliased( 1, this->_internal_name(), target); } @@ -1623,17 +2031,21 @@ uint8_t* ValueInfoProto::_InternalSerialize( // optional string doc_string = 3; if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_doc_string().data(), static_cast(this->_internal_doc_string().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.ValueInfoProto.doc_string"); target = stream->WriteStringMaybeAliased( 3, this->_internal_doc_string(), target); } + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 4; + for (unsigned int i = 0, + n = static_cast(this->_internal_metadata_props_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, this->_internal_metadata_props(i), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ValueInfoProto) return target; @@ -1647,6 +2059,13 @@ size_t ValueInfoProto::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 4; + total_size += 1UL * this->_internal_metadata_props_size(); + for (const auto& msg : this->metadata_props_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000007u) { // optional string name = 1; @@ -1671,28 +2090,27 @@ size_t ValueInfoProto::ByteSizeLong() const { } } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ValueInfoProto::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - ValueInfoProto::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ValueInfoProto::GetClassData() const { return &_class_data_; } - -void ValueInfoProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void ValueInfoProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - void ValueInfoProto::MergeFrom(const ValueInfoProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ValueInfoProto) GOOGLE_DCHECK_NE(&from, this); uint32_t cached_has_bits = 0; (void) cached_has_bits; + metadata_props_.MergeFrom(from.metadata_props_); cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000007u) { if (cached_has_bits & 0x00000001u) { @@ -1705,7 +2123,7 @@ void ValueInfoProto::MergeFrom(const ValueInfoProto& from) { _internal_mutable_type()->::opencv_onnx::TypeProto::MergeFrom(from._internal_type()); } } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void ValueInfoProto::CopyFrom(const ValueInfoProto& from) { @@ -1725,6 +2143,7 @@ void ValueInfoProto::InternalSwap(ValueInfoProto* other) { auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_has_bits_[0], other->_has_bits_[0]); + metadata_props_.InternalSwap(&other->metadata_props_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), &name_, lhs_arena, @@ -1738,12 +2157,11 @@ void ValueInfoProto::InternalSwap(ValueInfoProto* other) { swap(type_, other->type_); } -::PROTOBUF_NAMESPACE_ID::Metadata ValueInfoProto::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[1]); +std::string ValueInfoProto::GetTypeName() const { + return "opencv_onnx.ValueInfoProto"; } + // =================================================================== class NodeProto::_Internal { @@ -1758,6 +2176,9 @@ class NodeProto::_Internal { static void set_has_domain(HasBits* has_bits) { (*has_bits)[0] |= 8u; } + static void set_has_overload(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } static void set_has_doc_string(HasBits* has_bits) { (*has_bits)[0] |= 4u; } @@ -1765,10 +2186,12 @@ class NodeProto::_Internal { NodeProto::NodeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), input_(arena), output_(arena), - attribute_(arena) { + attribute_(arena), + metadata_props_(arena), + device_configurations_(arena) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -1776,12 +2199,14 @@ NodeProto::NodeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, // @@protoc_insertion_point(arena_constructor:opencv_onnx.NodeProto) } NodeProto::NodeProto(const NodeProto& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_), input_(from.input_), output_(from.output_), - attribute_(from.attribute_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + attribute_(from.attribute_), + metadata_props_(from.metadata_props_), + device_configurations_(from.device_configurations_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); @@ -1814,6 +2239,14 @@ NodeProto::NodeProto(const NodeProto& from) domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(), GetArenaForAllocation()); } + overload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_overload()) { + overload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_overload(), + GetArenaForAllocation()); + } // @@protoc_insertion_point(copy_constructor:opencv_onnx.NodeProto) } @@ -1834,13 +2267,17 @@ domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlrea #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +overload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } NodeProto::~NodeProto() { // @@protoc_insertion_point(destructor:opencv_onnx.NodeProto) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void NodeProto::SharedDtor() { @@ -1849,6 +2286,7 @@ inline void NodeProto::SharedDtor() { op_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + overload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void NodeProto::ArenaDtor(void* object) { @@ -1870,8 +2308,10 @@ void NodeProto::Clear() { input_.Clear(); output_.Clear(); attribute_.Clear(); + metadata_props_.Clear(); + device_configurations_.Clear(); cached_has_bits = _has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x0000001fu) { if (cached_has_bits & 0x00000001u) { name_.ClearNonDefaultToEmpty(); } @@ -1884,9 +2324,12 @@ void NodeProto::Clear() { if (cached_has_bits & 0x00000008u) { domain_.ClearNonDefaultToEmpty(); } + if (cached_has_bits & 0x00000010u) { + overload_.ClearNonDefaultToEmpty(); + } } _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* NodeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -1904,9 +2347,6 @@ const char* NodeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: ptr += 1; auto str = _internal_add_input(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.input"); - #endif // !NDEBUG CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); @@ -1921,9 +2361,6 @@ const char* NodeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: ptr += 1; auto str = _internal_add_output(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.output"); - #endif // !NDEBUG CHK_(ptr); if (!ctx->DataAvailable(ptr)) break; } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); @@ -1935,9 +2372,6 @@ const char* NodeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { auto str = _internal_mutable_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.name"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -1947,9 +2381,6 @@ const char* NodeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { auto str = _internal_mutable_op_type(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.op_type"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -1972,9 +2403,6 @@ const char* NodeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { auto str = _internal_mutable_doc_string(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.doc_string"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -1984,13 +2412,45 @@ const char* NodeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { auto str = _internal_mutable_domain(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.NodeProto.domain"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; + // optional string overload = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + auto str = _internal_mutable_overload(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_metadata_props(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.NodeDeviceConfigurationProto device_configurations = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_device_configurations(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr)); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -2002,7 +2462,7 @@ const char* NodeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -2024,40 +2484,24 @@ uint8_t* NodeProto::_InternalSerialize( // repeated string input = 1; for (int i = 0, n = this->_internal_input_size(); i < n; i++) { const auto& s = this->_internal_input(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.NodeProto.input"); target = stream->WriteString(1, s, target); } // repeated string output = 2; for (int i = 0, n = this->_internal_output_size(); i < n; i++) { const auto& s = this->_internal_output(i); - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - s.data(), static_cast(s.length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.NodeProto.output"); target = stream->WriteString(2, s, target); } cached_has_bits = _has_bits_[0]; // optional string name = 3; if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.NodeProto.name"); target = stream->WriteStringMaybeAliased( 3, this->_internal_name(), target); } // optional string op_type = 4; if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_op_type().data(), static_cast(this->_internal_op_type().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.NodeProto.op_type"); target = stream->WriteStringMaybeAliased( 4, this->_internal_op_type(), target); } @@ -2072,27 +2516,41 @@ uint8_t* NodeProto::_InternalSerialize( // optional string doc_string = 6; if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_doc_string().data(), static_cast(this->_internal_doc_string().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.NodeProto.doc_string"); target = stream->WriteStringMaybeAliased( 6, this->_internal_doc_string(), target); } // optional string domain = 7; if (cached_has_bits & 0x00000008u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_domain().data(), static_cast(this->_internal_domain().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.NodeProto.domain"); target = stream->WriteStringMaybeAliased( 7, this->_internal_domain(), target); } + // optional string overload = 8; + if (cached_has_bits & 0x00000010u) { + target = stream->WriteStringMaybeAliased( + 8, this->_internal_overload(), target); + } + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 9; + for (unsigned int i = 0, + n = static_cast(this->_internal_metadata_props_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(9, this->_internal_metadata_props(i), target, stream); + } + + // repeated .opencv_onnx.NodeDeviceConfigurationProto device_configurations = 10; + for (unsigned int i = 0, + n = static_cast(this->_internal_device_configurations_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(10, this->_internal_device_configurations(i), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.NodeProto) return target; @@ -2129,8 +2587,22 @@ size_t NodeProto::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 9; + total_size += 1UL * this->_internal_metadata_props_size(); + for (const auto& msg : this->metadata_props_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.NodeDeviceConfigurationProto device_configurations = 10; + total_size += 1UL * this->_internal_device_configurations_size(); + for (const auto& msg : this->device_configurations_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + cached_has_bits = _has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x0000001fu) { // optional string name = 3; if (cached_has_bits & 0x00000001u) { total_size += 1 + @@ -2159,23 +2631,28 @@ size_t NodeProto::ByteSizeLong() const { this->_internal_domain()); } + // optional string overload = 8; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_overload()); + } + } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NodeProto::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - NodeProto::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NodeProto::GetClassData() const { return &_class_data_; } - -void NodeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void NodeProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - void NodeProto::MergeFrom(const NodeProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.NodeProto) GOOGLE_DCHECK_NE(&from, this); @@ -2185,8 +2662,10 @@ void NodeProto::MergeFrom(const NodeProto& from) { input_.MergeFrom(from.input_); output_.MergeFrom(from.output_); attribute_.MergeFrom(from.attribute_); + metadata_props_.MergeFrom(from.metadata_props_); + device_configurations_.MergeFrom(from.device_configurations_); cached_has_bits = from._has_bits_[0]; - if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x0000001fu) { if (cached_has_bits & 0x00000001u) { _internal_set_name(from._internal_name()); } @@ -2199,8 +2678,11 @@ void NodeProto::MergeFrom(const NodeProto& from) { if (cached_has_bits & 0x00000008u) { _internal_set_domain(from._internal_domain()); } + if (cached_has_bits & 0x00000010u) { + _internal_set_overload(from._internal_overload()); + } } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void NodeProto::CopyFrom(const NodeProto& from) { @@ -2223,6 +2705,8 @@ void NodeProto::InternalSwap(NodeProto* other) { input_.InternalSwap(&other->input_); output_.InternalSwap(&other->output_); attribute_.InternalSwap(&other->attribute_); + metadata_props_.InternalSwap(&other->metadata_props_); + device_configurations_.InternalSwap(&other->device_configurations_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), &name_, lhs_arena, @@ -2243,14 +2727,1666 @@ void NodeProto::InternalSwap(NodeProto* other) { &domain_, lhs_arena, &other->domain_, rhs_arena ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &overload_, lhs_arena, + &other->overload_, rhs_arena + ); } -::PROTOBUF_NAMESPACE_ID::Metadata NodeProto::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[2]); +std::string NodeProto::GetTypeName() const { + return "opencv_onnx.NodeProto"; } + +// =================================================================== + +class IntIntListEntryProto::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_key(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +IntIntListEntryProto::IntIntListEntryProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + value_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.IntIntListEntryProto) +} +IntIntListEntryProto::IntIntListEntryProto(const IntIntListEntryProto& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + value_(from.value_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + key_ = from.key_; + // @@protoc_insertion_point(copy_constructor:opencv_onnx.IntIntListEntryProto) +} + +inline void IntIntListEntryProto::SharedCtor() { +key_ = int64_t{0}; +} + +IntIntListEntryProto::~IntIntListEntryProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.IntIntListEntryProto) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void IntIntListEntryProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void IntIntListEntryProto::ArenaDtor(void* object) { + IntIntListEntryProto* _this = reinterpret_cast< IntIntListEntryProto* >(object); + (void)_this; +} +void IntIntListEntryProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void IntIntListEntryProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void IntIntListEntryProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.IntIntListEntryProto) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + value_.Clear(); + key_ = int64_t{0}; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* IntIntListEntryProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 key = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_key(&has_bits); + key_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated int64 value = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + ptr -= 1; + do { + ptr += 1; + _internal_add_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr)); + } else if (static_cast(tag) == 18) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_value(), ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* IntIntListEntryProto::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.IntIntListEntryProto) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 key = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_key(), target); + } + + // repeated int64 value = 2; + for (int i = 0, n = this->_internal_value_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_value(i), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.IntIntListEntryProto) + return target; +} + +size_t IntIntListEntryProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.IntIntListEntryProto) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated int64 value = 2; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + Int64Size(this->value_); + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_value_size()); + total_size += data_size; + } + + // optional int64 key = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_key()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void IntIntListEntryProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void IntIntListEntryProto::MergeFrom(const IntIntListEntryProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.IntIntListEntryProto) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + value_.MergeFrom(from.value_); + if (from._internal_has_key()) { + _internal_set_key(from._internal_key()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void IntIntListEntryProto::CopyFrom(const IntIntListEntryProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.IntIntListEntryProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool IntIntListEntryProto::IsInitialized() const { + return true; +} + +void IntIntListEntryProto::InternalSwap(IntIntListEntryProto* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + value_.InternalSwap(&other->value_); + swap(key_, other->key_); +} + +std::string IntIntListEntryProto::GetTypeName() const { + return "opencv_onnx.IntIntListEntryProto"; +} + + +// =================================================================== + +class NodeDeviceConfigurationProto::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_configuration_id(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_pipeline_stage(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +NodeDeviceConfigurationProto::NodeDeviceConfigurationProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + sharding_spec_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.NodeDeviceConfigurationProto) +} +NodeDeviceConfigurationProto::NodeDeviceConfigurationProto(const NodeDeviceConfigurationProto& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + sharding_spec_(from.sharding_spec_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + configuration_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + configuration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_configuration_id()) { + configuration_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_configuration_id(), + GetArenaForAllocation()); + } + pipeline_stage_ = from.pipeline_stage_; + // @@protoc_insertion_point(copy_constructor:opencv_onnx.NodeDeviceConfigurationProto) +} + +inline void NodeDeviceConfigurationProto::SharedCtor() { +configuration_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + configuration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +pipeline_stage_ = 0; +} + +NodeDeviceConfigurationProto::~NodeDeviceConfigurationProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.NodeDeviceConfigurationProto) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void NodeDeviceConfigurationProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + configuration_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void NodeDeviceConfigurationProto::ArenaDtor(void* object) { + NodeDeviceConfigurationProto* _this = reinterpret_cast< NodeDeviceConfigurationProto* >(object); + (void)_this; +} +void NodeDeviceConfigurationProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void NodeDeviceConfigurationProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void NodeDeviceConfigurationProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.NodeDeviceConfigurationProto) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + sharding_spec_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + configuration_id_.ClearNonDefaultToEmpty(); + } + pipeline_stage_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* NodeDeviceConfigurationProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string configuration_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_configuration_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.ShardingSpecProto sharding_spec = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_sharding_spec(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + // optional int32 pipeline_stage = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_pipeline_stage(&has_bits); + pipeline_stage_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* NodeDeviceConfigurationProto::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.NodeDeviceConfigurationProto) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string configuration_id = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_configuration_id(), target); + } + + // repeated .opencv_onnx.ShardingSpecProto sharding_spec = 2; + for (unsigned int i = 0, + n = static_cast(this->_internal_sharding_spec_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, this->_internal_sharding_spec(i), target, stream); + } + + // optional int32 pipeline_stage = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_pipeline_stage(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.NodeDeviceConfigurationProto) + return target; +} + +size_t NodeDeviceConfigurationProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.NodeDeviceConfigurationProto) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opencv_onnx.ShardingSpecProto sharding_spec = 2; + total_size += 1UL * this->_internal_sharding_spec_size(); + for (const auto& msg : this->sharding_spec_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string configuration_id = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_configuration_id()); + } + + // optional int32 pipeline_stage = 3; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_pipeline_stage()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void NodeDeviceConfigurationProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void NodeDeviceConfigurationProto::MergeFrom(const NodeDeviceConfigurationProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.NodeDeviceConfigurationProto) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + sharding_spec_.MergeFrom(from.sharding_spec_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_configuration_id(from._internal_configuration_id()); + } + if (cached_has_bits & 0x00000002u) { + pipeline_stage_ = from.pipeline_stage_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void NodeDeviceConfigurationProto::CopyFrom(const NodeDeviceConfigurationProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.NodeDeviceConfigurationProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool NodeDeviceConfigurationProto::IsInitialized() const { + return true; +} + +void NodeDeviceConfigurationProto::InternalSwap(NodeDeviceConfigurationProto* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + sharding_spec_.InternalSwap(&other->sharding_spec_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &configuration_id_, lhs_arena, + &other->configuration_id_, rhs_arena + ); + swap(pipeline_stage_, other->pipeline_stage_); +} + +std::string NodeDeviceConfigurationProto::GetTypeName() const { + return "opencv_onnx.NodeDeviceConfigurationProto"; +} + + +// =================================================================== + +class ShardingSpecProto::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_tensor_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +ShardingSpecProto::ShardingSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + device_(arena), + index_to_device_group_map_(arena), + sharded_dim_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.ShardingSpecProto) +} +ShardingSpecProto::ShardingSpecProto(const ShardingSpecProto& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + device_(from.device_), + index_to_device_group_map_(from.index_to_device_group_map_), + sharded_dim_(from.sharded_dim_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + tensor_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_tensor_name()) { + tensor_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_tensor_name(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.ShardingSpecProto) +} + +inline void ShardingSpecProto::SharedCtor() { +tensor_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ShardingSpecProto::~ShardingSpecProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.ShardingSpecProto) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ShardingSpecProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + tensor_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void ShardingSpecProto::ArenaDtor(void* object) { + ShardingSpecProto* _this = reinterpret_cast< ShardingSpecProto* >(object); + (void)_this; +} +void ShardingSpecProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ShardingSpecProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ShardingSpecProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.ShardingSpecProto) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + device_.Clear(); + index_to_device_group_map_.Clear(); + sharded_dim_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + tensor_name_.ClearNonDefaultToEmpty(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ShardingSpecProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string tensor_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_tensor_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated int64 device = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + ptr -= 1; + do { + ptr += 1; + _internal_add_device(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr)); + } else if (static_cast(tag) == 18) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_device(), ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.IntIntListEntryProto index_to_device_group_map = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_index_to_device_group_map(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.ShardedDimProto sharded_dim = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_sharded_dim(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ShardingSpecProto::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ShardingSpecProto) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string tensor_name = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_tensor_name(), target); + } + + // repeated int64 device = 2; + for (int i = 0, n = this->_internal_device_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_device(i), target); + } + + // repeated .opencv_onnx.IntIntListEntryProto index_to_device_group_map = 3; + for (unsigned int i = 0, + n = static_cast(this->_internal_index_to_device_group_map_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, this->_internal_index_to_device_group_map(i), target, stream); + } + + // repeated .opencv_onnx.ShardedDimProto sharded_dim = 4; + for (unsigned int i = 0, + n = static_cast(this->_internal_sharded_dim_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, this->_internal_sharded_dim(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ShardingSpecProto) + return target; +} + +size_t ShardingSpecProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ShardingSpecProto) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated int64 device = 2; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + Int64Size(this->device_); + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_device_size()); + total_size += data_size; + } + + // repeated .opencv_onnx.IntIntListEntryProto index_to_device_group_map = 3; + total_size += 1UL * this->_internal_index_to_device_group_map_size(); + for (const auto& msg : this->index_to_device_group_map_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.ShardedDimProto sharded_dim = 4; + total_size += 1UL * this->_internal_sharded_dim_size(); + for (const auto& msg : this->sharded_dim_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // optional string tensor_name = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_tensor_name()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ShardingSpecProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ShardingSpecProto::MergeFrom(const ShardingSpecProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ShardingSpecProto) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + device_.MergeFrom(from.device_); + index_to_device_group_map_.MergeFrom(from.index_to_device_group_map_); + sharded_dim_.MergeFrom(from.sharded_dim_); + if (from._internal_has_tensor_name()) { + _internal_set_tensor_name(from._internal_tensor_name()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ShardingSpecProto::CopyFrom(const ShardingSpecProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ShardingSpecProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ShardingSpecProto::IsInitialized() const { + return true; +} + +void ShardingSpecProto::InternalSwap(ShardingSpecProto* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + device_.InternalSwap(&other->device_); + index_to_device_group_map_.InternalSwap(&other->index_to_device_group_map_); + sharded_dim_.InternalSwap(&other->sharded_dim_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &tensor_name_, lhs_arena, + &other->tensor_name_, rhs_arena + ); +} + +std::string ShardingSpecProto::GetTypeName() const { + return "opencv_onnx.ShardingSpecProto"; +} + + +// =================================================================== + +class ShardedDimProto::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_axis(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +ShardedDimProto::ShardedDimProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + simple_sharding_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.ShardedDimProto) +} +ShardedDimProto::ShardedDimProto(const ShardedDimProto& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + simple_sharding_(from.simple_sharding_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + axis_ = from.axis_; + // @@protoc_insertion_point(copy_constructor:opencv_onnx.ShardedDimProto) +} + +inline void ShardedDimProto::SharedCtor() { +axis_ = int64_t{0}; +} + +ShardedDimProto::~ShardedDimProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.ShardedDimProto) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void ShardedDimProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ShardedDimProto::ArenaDtor(void* object) { + ShardedDimProto* _this = reinterpret_cast< ShardedDimProto* >(object); + (void)_this; +} +void ShardedDimProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ShardedDimProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ShardedDimProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.ShardedDimProto) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + simple_sharding_.Clear(); + axis_ = int64_t{0}; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* ShardedDimProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 axis = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_axis(&has_bits); + axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.SimpleShardedDimProto simple_sharding = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_simple_sharding(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ShardedDimProto::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ShardedDimProto) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 axis = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_axis(), target); + } + + // repeated .opencv_onnx.SimpleShardedDimProto simple_sharding = 2; + for (unsigned int i = 0, + n = static_cast(this->_internal_simple_sharding_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, this->_internal_simple_sharding(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ShardedDimProto) + return target; +} + +size_t ShardedDimProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ShardedDimProto) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opencv_onnx.SimpleShardedDimProto simple_sharding = 2; + total_size += 1UL * this->_internal_simple_sharding_size(); + for (const auto& msg : this->simple_sharding_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // optional int64 axis = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_axis()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ShardedDimProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void ShardedDimProto::MergeFrom(const ShardedDimProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ShardedDimProto) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + simple_sharding_.MergeFrom(from.simple_sharding_); + if (from._internal_has_axis()) { + _internal_set_axis(from._internal_axis()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void ShardedDimProto::CopyFrom(const ShardedDimProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ShardedDimProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ShardedDimProto::IsInitialized() const { + return true; +} + +void ShardedDimProto::InternalSwap(ShardedDimProto* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + simple_sharding_.InternalSwap(&other->simple_sharding_); + swap(axis_, other->axis_); +} + +std::string ShardedDimProto::GetTypeName() const { + return "opencv_onnx.ShardedDimProto"; +} + + +// =================================================================== + +class SimpleShardedDimProto::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_num_shards(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +SimpleShardedDimProto::SimpleShardedDimProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.SimpleShardedDimProto) +} +SimpleShardedDimProto::SimpleShardedDimProto(const SimpleShardedDimProto& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + num_shards_ = from.num_shards_; + clear_has_dim(); + switch (from.dim_case()) { + case kDimValue: { + _internal_set_dim_value(from._internal_dim_value()); + break; + } + case kDimParam: { + _internal_set_dim_param(from._internal_dim_param()); + break; + } + case DIM_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.SimpleShardedDimProto) +} + +inline void SimpleShardedDimProto::SharedCtor() { +num_shards_ = int64_t{0}; +clear_has_dim(); +} + +SimpleShardedDimProto::~SimpleShardedDimProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.SimpleShardedDimProto) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void SimpleShardedDimProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (has_dim()) { + clear_dim(); + } +} + +void SimpleShardedDimProto::ArenaDtor(void* object) { + SimpleShardedDimProto* _this = reinterpret_cast< SimpleShardedDimProto* >(object); + (void)_this; +} +void SimpleShardedDimProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SimpleShardedDimProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SimpleShardedDimProto::clear_dim() { +// @@protoc_insertion_point(one_of_clear_start:opencv_onnx.SimpleShardedDimProto) + switch (dim_case()) { + case kDimValue: { + // No need to clear + break; + } + case kDimParam: { + dim_.dim_param_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + break; + } + case DIM_NOT_SET: { + break; + } + } + _oneof_case_[0] = DIM_NOT_SET; +} + + +void SimpleShardedDimProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.SimpleShardedDimProto) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + num_shards_ = int64_t{0}; + clear_dim(); + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* SimpleShardedDimProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // int64 dim_value = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _internal_set_dim_value(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string dim_param = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_dim_param(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 num_shards = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_num_shards(&has_bits); + num_shards_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SimpleShardedDimProto::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.SimpleShardedDimProto) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + switch (dim_case()) { + case kDimValue: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_dim_value(), target); + break; + } + case kDimParam: { + target = stream->WriteStringMaybeAliased( + 2, this->_internal_dim_param(), target); + break; + } + default: ; + } + cached_has_bits = _has_bits_[0]; + // optional int64 num_shards = 3; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_num_shards(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.SimpleShardedDimProto) + return target; +} + +size_t SimpleShardedDimProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.SimpleShardedDimProto) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional int64 num_shards = 3; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_num_shards()); + } + + switch (dim_case()) { + // int64 dim_value = 1; + case kDimValue: { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_dim_value()); + break; + } + // string dim_param = 2; + case kDimParam: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_dim_param()); + break; + } + case DIM_NOT_SET: { + break; + } + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SimpleShardedDimProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void SimpleShardedDimProto::MergeFrom(const SimpleShardedDimProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.SimpleShardedDimProto) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_num_shards()) { + _internal_set_num_shards(from._internal_num_shards()); + } + switch (from.dim_case()) { + case kDimValue: { + _internal_set_dim_value(from._internal_dim_value()); + break; + } + case kDimParam: { + _internal_set_dim_param(from._internal_dim_param()); + break; + } + case DIM_NOT_SET: { + break; + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void SimpleShardedDimProto::CopyFrom(const SimpleShardedDimProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.SimpleShardedDimProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SimpleShardedDimProto::IsInitialized() const { + return true; +} + +void SimpleShardedDimProto::InternalSwap(SimpleShardedDimProto* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + swap(num_shards_, other->num_shards_); + swap(dim_, other->dim_); + swap(_oneof_case_[0], other->_oneof_case_[0]); +} + +std::string SimpleShardedDimProto::GetTypeName() const { + return "opencv_onnx.SimpleShardedDimProto"; +} + + +// =================================================================== + +class TrainingInfoProto::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::opencv_onnx::GraphProto& initialization(const TrainingInfoProto* msg); + static void set_has_initialization(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::opencv_onnx::GraphProto& algorithm(const TrainingInfoProto* msg); + static void set_has_algorithm(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::opencv_onnx::GraphProto& +TrainingInfoProto::_Internal::initialization(const TrainingInfoProto* msg) { + return *msg->initialization_; +} +const ::opencv_onnx::GraphProto& +TrainingInfoProto::_Internal::algorithm(const TrainingInfoProto* msg) { + return *msg->algorithm_; +} +TrainingInfoProto::TrainingInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + initialization_binding_(arena), + update_binding_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.TrainingInfoProto) +} +TrainingInfoProto::TrainingInfoProto(const TrainingInfoProto& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + initialization_binding_(from.initialization_binding_), + update_binding_(from.update_binding_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_initialization()) { + initialization_ = new ::opencv_onnx::GraphProto(*from.initialization_); + } else { + initialization_ = nullptr; + } + if (from._internal_has_algorithm()) { + algorithm_ = new ::opencv_onnx::GraphProto(*from.algorithm_); + } else { + algorithm_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TrainingInfoProto) +} + +inline void TrainingInfoProto::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&initialization_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&algorithm_) - + reinterpret_cast(&initialization_)) + sizeof(algorithm_)); +} + +TrainingInfoProto::~TrainingInfoProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.TrainingInfoProto) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void TrainingInfoProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete initialization_; + if (this != internal_default_instance()) delete algorithm_; +} + +void TrainingInfoProto::ArenaDtor(void* object) { + TrainingInfoProto* _this = reinterpret_cast< TrainingInfoProto* >(object); + (void)_this; +} +void TrainingInfoProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void TrainingInfoProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void TrainingInfoProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TrainingInfoProto) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + initialization_binding_.Clear(); + update_binding_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(initialization_ != nullptr); + initialization_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(algorithm_ != nullptr); + algorithm_->Clear(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* TrainingInfoProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .opencv_onnx.GraphProto initialization = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_initialization(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .opencv_onnx.GraphProto algorithm = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_algorithm(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.StringStringEntryProto initialization_binding = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_initialization_binding(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.StringStringEntryProto update_binding = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_update_binding(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* TrainingInfoProto::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TrainingInfoProto) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .opencv_onnx.GraphProto initialization = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::initialization(this), target, stream); + } + + // optional .opencv_onnx.GraphProto algorithm = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::algorithm(this), target, stream); + } + + // repeated .opencv_onnx.StringStringEntryProto initialization_binding = 3; + for (unsigned int i = 0, + n = static_cast(this->_internal_initialization_binding_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, this->_internal_initialization_binding(i), target, stream); + } + + // repeated .opencv_onnx.StringStringEntryProto update_binding = 4; + for (unsigned int i = 0, + n = static_cast(this->_internal_update_binding_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, this->_internal_update_binding(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TrainingInfoProto) + return target; +} + +size_t TrainingInfoProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TrainingInfoProto) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opencv_onnx.StringStringEntryProto initialization_binding = 3; + total_size += 1UL * this->_internal_initialization_binding_size(); + for (const auto& msg : this->initialization_binding_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.StringStringEntryProto update_binding = 4; + total_size += 1UL * this->_internal_update_binding_size(); + for (const auto& msg : this->update_binding_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .opencv_onnx.GraphProto initialization = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *initialization_); + } + + // optional .opencv_onnx.GraphProto algorithm = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *algorithm_); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TrainingInfoProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void TrainingInfoProto::MergeFrom(const TrainingInfoProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TrainingInfoProto) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + initialization_binding_.MergeFrom(from.initialization_binding_); + update_binding_.MergeFrom(from.update_binding_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_initialization()->::opencv_onnx::GraphProto::MergeFrom(from._internal_initialization()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_algorithm()->::opencv_onnx::GraphProto::MergeFrom(from._internal_algorithm()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TrainingInfoProto::CopyFrom(const TrainingInfoProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TrainingInfoProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TrainingInfoProto::IsInitialized() const { + return true; +} + +void TrainingInfoProto::InternalSwap(TrainingInfoProto* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + initialization_binding_.InternalSwap(&other->initialization_binding_); + update_binding_.InternalSwap(&other->update_binding_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(TrainingInfoProto, algorithm_) + + sizeof(TrainingInfoProto::algorithm_) + - PROTOBUF_FIELD_OFFSET(TrainingInfoProto, initialization_)>( + reinterpret_cast(&initialization_), + reinterpret_cast(&other->initialization_)); +} + +std::string TrainingInfoProto::GetTypeName() const { + return "opencv_onnx.TrainingInfoProto"; +} + + // =================================================================== class ModelProto::_Internal { @@ -2286,9 +4422,12 @@ ModelProto::_Internal::graph(const ModelProto* msg) { } ModelProto::ModelProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), opset_import_(arena), - metadata_props_(arena) { + metadata_props_(arena), + training_info_(arena), + functions_(arena), + configuration_(arena) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -2296,11 +4435,14 @@ ModelProto::ModelProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, // @@protoc_insertion_point(arena_constructor:opencv_onnx.ModelProto) } ModelProto::ModelProto(const ModelProto& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_), opset_import_(from.opset_import_), - metadata_props_(from.metadata_props_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + metadata_props_(from.metadata_props_), + training_info_(from.training_info_), + functions_(from.functions_), + configuration_(from.configuration_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); producer_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING producer_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); @@ -2371,7 +4513,7 @@ ModelProto::~ModelProto() { // @@protoc_insertion_point(destructor:opencv_onnx.ModelProto) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void ModelProto::SharedDtor() { @@ -2401,6 +4543,9 @@ void ModelProto::Clear() { opset_import_.Clear(); metadata_props_.Clear(); + training_info_.Clear(); + functions_.Clear(); + configuration_.Clear(); cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x0000001fu) { if (cached_has_bits & 0x00000001u) { @@ -2426,7 +4571,7 @@ void ModelProto::Clear() { reinterpret_cast(&ir_version_)) + sizeof(model_version_)); } _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* ModelProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -2450,9 +4595,6 @@ const char* ModelProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { auto str = _internal_mutable_producer_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.producer_name"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -2462,9 +4604,6 @@ const char* ModelProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { auto str = _internal_mutable_producer_version(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.producer_version"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -2474,9 +4613,6 @@ const char* ModelProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { auto str = _internal_mutable_domain(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.domain"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -2495,9 +4631,6 @@ const char* ModelProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { auto str = _internal_mutable_doc_string(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.ModelProto.doc_string"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -2536,6 +4669,45 @@ const char* ModelProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: } else goto handle_unusual; continue; + // repeated .opencv_onnx.TrainingInfoProto training_info = 20; + case 20: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 162)) { + ptr -= 2; + do { + ptr += 2; + ptr = ctx->ParseMessage(_internal_add_training_info(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<162>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.FunctionProto functions = 25; + case 25: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 202)) { + ptr -= 2; + do { + ptr += 2; + ptr = ctx->ParseMessage(_internal_add_functions(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<202>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.DeviceConfigurationProto configuration = 26; + case 26: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 210)) { + ptr -= 2; + do { + ptr += 2; + ptr = ctx->ParseMessage(_internal_add_configuration(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<210>(ptr)); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -2547,7 +4719,7 @@ const char* ModelProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -2575,30 +4747,18 @@ uint8_t* ModelProto::_InternalSerialize( // optional string producer_name = 2; if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_producer_name().data(), static_cast(this->_internal_producer_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.ModelProto.producer_name"); target = stream->WriteStringMaybeAliased( 2, this->_internal_producer_name(), target); } // optional string producer_version = 3; if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_producer_version().data(), static_cast(this->_internal_producer_version().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.ModelProto.producer_version"); target = stream->WriteStringMaybeAliased( 3, this->_internal_producer_version(), target); } // optional string domain = 4; if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_domain().data(), static_cast(this->_internal_domain().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.ModelProto.domain"); target = stream->WriteStringMaybeAliased( 4, this->_internal_domain(), target); } @@ -2611,10 +4771,6 @@ uint8_t* ModelProto::_InternalSerialize( // optional string doc_string = 6; if (cached_has_bits & 0x00000008u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_doc_string().data(), static_cast(this->_internal_doc_string().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.ModelProto.doc_string"); target = stream->WriteStringMaybeAliased( 6, this->_internal_doc_string(), target); } @@ -2643,9 +4799,33 @@ uint8_t* ModelProto::_InternalSerialize( InternalWriteMessage(14, this->_internal_metadata_props(i), target, stream); } + // repeated .opencv_onnx.TrainingInfoProto training_info = 20; + for (unsigned int i = 0, + n = static_cast(this->_internal_training_info_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(20, this->_internal_training_info(i), target, stream); + } + + // repeated .opencv_onnx.FunctionProto functions = 25; + for (unsigned int i = 0, + n = static_cast(this->_internal_functions_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(25, this->_internal_functions(i), target, stream); + } + + // repeated .opencv_onnx.DeviceConfigurationProto configuration = 26; + for (unsigned int i = 0, + n = static_cast(this->_internal_configuration_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(26, this->_internal_configuration(i), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ModelProto) return target; @@ -2673,6 +4853,27 @@ size_t ModelProto::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + // repeated .opencv_onnx.TrainingInfoProto training_info = 20; + total_size += 2UL * this->_internal_training_info_size(); + for (const auto& msg : this->training_info_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.FunctionProto functions = 25; + total_size += 2UL * this->_internal_functions_size(); + for (const auto& msg : this->functions_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.DeviceConfigurationProto configuration = 26; + total_size += 2UL * this->_internal_configuration_size(); + for (const auto& msg : this->configuration_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x0000007fu) { // optional string producer_name = 2; @@ -2721,22 +4922,20 @@ size_t ModelProto::ByteSizeLong() const { } } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ModelProto::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - ModelProto::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ModelProto::GetClassData() const { return &_class_data_; } - -void ModelProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void ModelProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - void ModelProto::MergeFrom(const ModelProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ModelProto) GOOGLE_DCHECK_NE(&from, this); @@ -2745,6 +4944,9 @@ void ModelProto::MergeFrom(const ModelProto& from) { opset_import_.MergeFrom(from.opset_import_); metadata_props_.MergeFrom(from.metadata_props_); + training_info_.MergeFrom(from.training_info_); + functions_.MergeFrom(from.functions_); + configuration_.MergeFrom(from.configuration_); cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x0000007fu) { if (cached_has_bits & 0x00000001u) { @@ -2770,7 +4972,7 @@ void ModelProto::MergeFrom(const ModelProto& from) { } _has_bits_[0] |= cached_has_bits; } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void ModelProto::CopyFrom(const ModelProto& from) { @@ -2792,6 +4994,9 @@ void ModelProto::InternalSwap(ModelProto* other) { swap(_has_bits_[0], other->_has_bits_[0]); opset_import_.InternalSwap(&other->opset_import_); metadata_props_.InternalSwap(&other->metadata_props_); + training_info_.InternalSwap(&other->training_info_); + functions_.InternalSwap(&other->functions_); + configuration_.InternalSwap(&other->configuration_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), &producer_name_, lhs_arena, @@ -2820,12 +5025,289 @@ void ModelProto::InternalSwap(ModelProto* other) { reinterpret_cast(&other->graph_)); } -::PROTOBUF_NAMESPACE_ID::Metadata ModelProto::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[3]); +std::string ModelProto::GetTypeName() const { + return "opencv_onnx.ModelProto"; } + +// =================================================================== + +class DeviceConfigurationProto::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_num_devices(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +DeviceConfigurationProto::DeviceConfigurationProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + device_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.DeviceConfigurationProto) +} +DeviceConfigurationProto::DeviceConfigurationProto(const DeviceConfigurationProto& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + device_(from.device_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_name()) { + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), + GetArenaForAllocation()); + } + num_devices_ = from.num_devices_; + // @@protoc_insertion_point(copy_constructor:opencv_onnx.DeviceConfigurationProto) +} + +inline void DeviceConfigurationProto::SharedCtor() { +name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +num_devices_ = 0; +} + +DeviceConfigurationProto::~DeviceConfigurationProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.DeviceConfigurationProto) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void DeviceConfigurationProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void DeviceConfigurationProto::ArenaDtor(void* object) { + DeviceConfigurationProto* _this = reinterpret_cast< DeviceConfigurationProto* >(object); + (void)_this; +} +void DeviceConfigurationProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void DeviceConfigurationProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void DeviceConfigurationProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.DeviceConfigurationProto) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + device_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + name_.ClearNonDefaultToEmpty(); + } + num_devices_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* DeviceConfigurationProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 num_devices = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_num_devices(&has_bits); + num_devices_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated string device = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_device(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* DeviceConfigurationProto::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.DeviceConfigurationProto) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // optional int32 num_devices = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_devices(), target); + } + + // repeated string device = 3; + for (int i = 0, n = this->_internal_device_size(); i < n; i++) { + const auto& s = this->_internal_device(i); + target = stream->WriteString(3, s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.DeviceConfigurationProto) + return target; +} + +size_t DeviceConfigurationProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.DeviceConfigurationProto) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string device = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(device_.size()); + for (int i = 0, n = device_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + device_.Get(i)); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional int32 num_devices = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num_devices()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void DeviceConfigurationProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void DeviceConfigurationProto::MergeFrom(const DeviceConfigurationProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.DeviceConfigurationProto) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + device_.MergeFrom(from.device_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + num_devices_ = from.num_devices_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void DeviceConfigurationProto::CopyFrom(const DeviceConfigurationProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.DeviceConfigurationProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool DeviceConfigurationProto::IsInitialized() const { + return true; +} + +void DeviceConfigurationProto::InternalSwap(DeviceConfigurationProto* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + device_.InternalSwap(&other->device_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &name_, lhs_arena, + &other->name_, rhs_arena + ); + swap(num_devices_, other->num_devices_); +} + +std::string DeviceConfigurationProto::GetTypeName() const { + return "opencv_onnx.DeviceConfigurationProto"; +} + + // =================================================================== class StringStringEntryProto::_Internal { @@ -2841,7 +5323,7 @@ class StringStringEntryProto::_Internal { StringStringEntryProto::StringStringEntryProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -2849,9 +5331,9 @@ StringStringEntryProto::StringStringEntryProto(::PROTOBUF_NAMESPACE_ID::Arena* a // @@protoc_insertion_point(arena_constructor:opencv_onnx.StringStringEntryProto) } StringStringEntryProto::StringStringEntryProto(const StringStringEntryProto& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); key_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING key_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); @@ -2886,7 +5368,7 @@ StringStringEntryProto::~StringStringEntryProto() { // @@protoc_insertion_point(destructor:opencv_onnx.StringStringEntryProto) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void StringStringEntryProto::SharedDtor() { @@ -2921,7 +5403,7 @@ void StringStringEntryProto::Clear() { } } _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* StringStringEntryProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -2936,9 +5418,6 @@ const char* StringStringEntryProto::_InternalParse(const char* ptr, ::PROTOBUF_N if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { auto str = _internal_mutable_key(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.StringStringEntryProto.key"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -2948,9 +5427,6 @@ const char* StringStringEntryProto::_InternalParse(const char* ptr, ::PROTOBUF_N if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { auto str = _internal_mutable_value(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.StringStringEntryProto.value"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -2966,7 +5442,7 @@ const char* StringStringEntryProto::_InternalParse(const char* ptr, ::PROTOBUF_N } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -2988,27 +5464,19 @@ uint8_t* StringStringEntryProto::_InternalSerialize( cached_has_bits = _has_bits_[0]; // optional string key = 1; if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_key().data(), static_cast(this->_internal_key().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.StringStringEntryProto.key"); target = stream->WriteStringMaybeAliased( 1, this->_internal_key(), target); } // optional string value = 2; if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_value().data(), static_cast(this->_internal_value().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.StringStringEntryProto.value"); target = stream->WriteStringMaybeAliased( 2, this->_internal_value(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.StringStringEntryProto) return target; @@ -3039,22 +5507,20 @@ size_t StringStringEntryProto::ByteSizeLong() const { } } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StringStringEntryProto::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - StringStringEntryProto::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StringStringEntryProto::GetClassData() const { return &_class_data_; } - -void StringStringEntryProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void StringStringEntryProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - void StringStringEntryProto::MergeFrom(const StringStringEntryProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.StringStringEntryProto) GOOGLE_DCHECK_NE(&from, this); @@ -3070,7 +5536,7 @@ void StringStringEntryProto::MergeFrom(const StringStringEntryProto& from) { _internal_set_value(from._internal_value()); } } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void StringStringEntryProto::CopyFrom(const StringStringEntryProto& from) { @@ -3102,12 +5568,253 @@ void StringStringEntryProto::InternalSwap(StringStringEntryProto* other) { ); } -::PROTOBUF_NAMESPACE_ID::Metadata StringStringEntryProto::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[4]); +std::string StringStringEntryProto::GetTypeName() const { + return "opencv_onnx.StringStringEntryProto"; } + +// =================================================================== + +class TensorAnnotation::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_tensor_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +TensorAnnotation::TensorAnnotation(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + quant_parameter_tensor_names_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorAnnotation) +} +TensorAnnotation::TensorAnnotation(const TensorAnnotation& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + quant_parameter_tensor_names_(from.quant_parameter_tensor_names_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + tensor_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_tensor_name()) { + tensor_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_tensor_name(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorAnnotation) +} + +inline void TensorAnnotation::SharedCtor() { +tensor_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +TensorAnnotation::~TensorAnnotation() { + // @@protoc_insertion_point(destructor:opencv_onnx.TensorAnnotation) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void TensorAnnotation::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + tensor_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void TensorAnnotation::ArenaDtor(void* object) { + TensorAnnotation* _this = reinterpret_cast< TensorAnnotation* >(object); + (void)_this; +} +void TensorAnnotation::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void TensorAnnotation::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void TensorAnnotation::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorAnnotation) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + quant_parameter_tensor_names_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + tensor_name_.ClearNonDefaultToEmpty(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* TensorAnnotation::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string tensor_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_tensor_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.StringStringEntryProto quant_parameter_tensor_names = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_quant_parameter_tensor_names(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* TensorAnnotation::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorAnnotation) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string tensor_name = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_tensor_name(), target); + } + + // repeated .opencv_onnx.StringStringEntryProto quant_parameter_tensor_names = 2; + for (unsigned int i = 0, + n = static_cast(this->_internal_quant_parameter_tensor_names_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, this->_internal_quant_parameter_tensor_names(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorAnnotation) + return target; +} + +size_t TensorAnnotation::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorAnnotation) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .opencv_onnx.StringStringEntryProto quant_parameter_tensor_names = 2; + total_size += 1UL * this->_internal_quant_parameter_tensor_names_size(); + for (const auto& msg : this->quant_parameter_tensor_names_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // optional string tensor_name = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_tensor_name()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TensorAnnotation::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void TensorAnnotation::MergeFrom(const TensorAnnotation& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorAnnotation) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + quant_parameter_tensor_names_.MergeFrom(from.quant_parameter_tensor_names_); + if (from._internal_has_tensor_name()) { + _internal_set_tensor_name(from._internal_tensor_name()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TensorAnnotation::CopyFrom(const TensorAnnotation& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorAnnotation) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TensorAnnotation::IsInitialized() const { + return true; +} + +void TensorAnnotation::InternalSwap(TensorAnnotation* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + quant_parameter_tensor_names_.InternalSwap(&other->quant_parameter_tensor_names_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &tensor_name_, lhs_arena, + &other->tensor_name_, rhs_arena + ); +} + +std::string TensorAnnotation::GetTypeName() const { + return "opencv_onnx.TensorAnnotation"; +} + + // =================================================================== class GraphProto::_Internal { @@ -3123,12 +5830,15 @@ class GraphProto::_Internal { GraphProto::GraphProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), node_(arena), initializer_(arena), input_(arena), output_(arena), - value_info_(arena) { + value_info_(arena), + quantization_annotation_(arena), + sparse_initializer_(arena), + metadata_props_(arena) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -3136,14 +5846,17 @@ GraphProto::GraphProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, // @@protoc_insertion_point(arena_constructor:opencv_onnx.GraphProto) } GraphProto::GraphProto(const GraphProto& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_), node_(from.node_), initializer_(from.initializer_), input_(from.input_), output_(from.output_), - value_info_(from.value_info_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + value_info_(from.value_info_), + quantization_annotation_(from.quantization_annotation_), + sparse_initializer_(from.sparse_initializer_), + metadata_props_(from.metadata_props_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); @@ -3178,7 +5891,7 @@ GraphProto::~GraphProto() { // @@protoc_insertion_point(destructor:opencv_onnx.GraphProto) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void GraphProto::SharedDtor() { @@ -3208,6 +5921,9 @@ void GraphProto::Clear() { input_.Clear(); output_.Clear(); value_info_.Clear(); + quantization_annotation_.Clear(); + sparse_initializer_.Clear(); + metadata_props_.Clear(); cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { @@ -3218,7 +5934,7 @@ void GraphProto::Clear() { } } _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* GraphProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -3246,9 +5962,6 @@ const char* GraphProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { auto str = _internal_mutable_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.GraphProto.name"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -3271,9 +5984,6 @@ const char* GraphProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { auto str = _internal_mutable_doc_string(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.GraphProto.doc_string"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -3317,6 +6027,45 @@ const char* GraphProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: } else goto handle_unusual; continue; + // repeated .opencv_onnx.TensorAnnotation quantization_annotation = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 114)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_quantization_annotation(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.SparseTensorProto sparse_initializer = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 122)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_sparse_initializer(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<122>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 130)) { + ptr -= 2; + do { + ptr += 2; + ptr = ctx->ParseMessage(_internal_add_metadata_props(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<130>(ptr)); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -3328,7 +6077,7 @@ const char* GraphProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID: } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -3358,10 +6107,6 @@ uint8_t* GraphProto::_InternalSerialize( cached_has_bits = _has_bits_[0]; // optional string name = 2; if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.GraphProto.name"); target = stream->WriteStringMaybeAliased( 2, this->_internal_name(), target); } @@ -3376,10 +6121,6 @@ uint8_t* GraphProto::_InternalSerialize( // optional string doc_string = 10; if (cached_has_bits & 0x00000002u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_doc_string().data(), static_cast(this->_internal_doc_string().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.GraphProto.doc_string"); target = stream->WriteStringMaybeAliased( 10, this->_internal_doc_string(), target); } @@ -3408,9 +6149,33 @@ uint8_t* GraphProto::_InternalSerialize( InternalWriteMessage(13, this->_internal_value_info(i), target, stream); } + // repeated .opencv_onnx.TensorAnnotation quantization_annotation = 14; + for (unsigned int i = 0, + n = static_cast(this->_internal_quantization_annotation_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(14, this->_internal_quantization_annotation(i), target, stream); + } + + // repeated .opencv_onnx.SparseTensorProto sparse_initializer = 15; + for (unsigned int i = 0, + n = static_cast(this->_internal_sparse_initializer_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(15, this->_internal_sparse_initializer(i), target, stream); + } + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16; + for (unsigned int i = 0, + n = static_cast(this->_internal_metadata_props_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(16, this->_internal_metadata_props(i), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.GraphProto) return target; @@ -3459,6 +6224,27 @@ size_t GraphProto::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + // repeated .opencv_onnx.TensorAnnotation quantization_annotation = 14; + total_size += 1UL * this->_internal_quantization_annotation_size(); + for (const auto& msg : this->quantization_annotation_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.SparseTensorProto sparse_initializer = 15; + total_size += 1UL * this->_internal_sparse_initializer_size(); + for (const auto& msg : this->sparse_initializer_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16; + total_size += 2UL * this->_internal_metadata_props_size(); + for (const auto& msg : this->metadata_props_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x00000003u) { // optional string name = 2; @@ -3476,22 +6262,20 @@ size_t GraphProto::ByteSizeLong() const { } } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GraphProto::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - GraphProto::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GraphProto::GetClassData() const { return &_class_data_; } - -void GraphProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void GraphProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - void GraphProto::MergeFrom(const GraphProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.GraphProto) GOOGLE_DCHECK_NE(&from, this); @@ -3503,6 +6287,9 @@ void GraphProto::MergeFrom(const GraphProto& from) { input_.MergeFrom(from.input_); output_.MergeFrom(from.output_); value_info_.MergeFrom(from.value_info_); + quantization_annotation_.MergeFrom(from.quantization_annotation_); + sparse_initializer_.MergeFrom(from.sparse_initializer_); + metadata_props_.MergeFrom(from.metadata_props_); cached_has_bits = from._has_bits_[0]; if (cached_has_bits & 0x00000003u) { if (cached_has_bits & 0x00000001u) { @@ -3512,7 +6299,7 @@ void GraphProto::MergeFrom(const GraphProto& from) { _internal_set_doc_string(from._internal_doc_string()); } } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void GraphProto::CopyFrom(const GraphProto& from) { @@ -3537,6 +6324,9 @@ void GraphProto::InternalSwap(GraphProto* other) { input_.InternalSwap(&other->input_); output_.InternalSwap(&other->output_); value_info_.InternalSwap(&other->value_info_); + quantization_annotation_.InternalSwap(&other->quantization_annotation_); + sparse_initializer_.InternalSwap(&other->sparse_initializer_); + metadata_props_.InternalSwap(&other->metadata_props_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), &name_, lhs_arena, @@ -3549,12 +6339,11 @@ void GraphProto::InternalSwap(GraphProto* other) { ); } -::PROTOBUF_NAMESPACE_ID::Metadata GraphProto::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[5]); +std::string GraphProto::GetTypeName() const { + return "opencv_onnx.GraphProto"; } + // =================================================================== class TensorProto_Segment::_Internal { @@ -3570,7 +6359,7 @@ class TensorProto_Segment::_Internal { TensorProto_Segment::TensorProto_Segment(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -3578,9 +6367,9 @@ TensorProto_Segment::TensorProto_Segment(::PROTOBUF_NAMESPACE_ID::Arena* arena, // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorProto.Segment) } TensorProto_Segment::TensorProto_Segment(const TensorProto_Segment& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); ::memcpy(&begin_, &from.begin_, static_cast(reinterpret_cast(&end_) - reinterpret_cast(&begin_)) + sizeof(end_)); @@ -3598,7 +6387,7 @@ TensorProto_Segment::~TensorProto_Segment() { // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto.Segment) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void TensorProto_Segment::SharedDtor() { @@ -3628,7 +6417,7 @@ void TensorProto_Segment::Clear() { reinterpret_cast(&begin_)) + sizeof(end_)); } _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* TensorProto_Segment::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -3667,7 +6456,7 @@ const char* TensorProto_Segment::_InternalParse(const char* ptr, ::PROTOBUF_NAME } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -3700,8 +6489,8 @@ uint8_t* TensorProto_Segment::_InternalSerialize( } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto.Segment) return target; @@ -3728,22 +6517,20 @@ size_t TensorProto_Segment::ByteSizeLong() const { } } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorProto_Segment::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - TensorProto_Segment::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorProto_Segment::GetClassData() const { return &_class_data_; } - -void TensorProto_Segment::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void TensorProto_Segment::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - 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); @@ -3760,7 +6547,7 @@ void TensorProto_Segment::MergeFrom(const TensorProto_Segment& from) { } _has_bits_[0] |= cached_has_bits; } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void TensorProto_Segment::CopyFrom(const TensorProto_Segment& from) { @@ -3786,12 +6573,11 @@ void TensorProto_Segment::InternalSwap(TensorProto_Segment* other) { reinterpret_cast(&other->begin_)); } -::PROTOBUF_NAMESPACE_ID::Metadata TensorProto_Segment::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[6]); +std::string TensorProto_Segment::GetTypeName() const { + return "opencv_onnx.TensorProto.Segment"; } + // =================================================================== class TensorProto::_Internal { @@ -3813,6 +6599,9 @@ class TensorProto::_Internal { static void set_has_raw_data(HasBits* has_bits) { (*has_bits)[0] |= 2u; } + static void set_has_data_location(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } }; const ::opencv_onnx::TensorProto_Segment& @@ -3821,14 +6610,16 @@ TensorProto::_Internal::segment(const TensorProto* msg) { } TensorProto::TensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), dims_(arena), float_data_(arena), int32_data_(arena), string_data_(arena), int64_data_(arena), double_data_(arena), - uint64_data_(arena) { + uint64_data_(arena), + external_data_(arena), + metadata_props_(arena) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -3836,7 +6627,7 @@ TensorProto::TensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorProto) } TensorProto::TensorProto(const TensorProto& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_), dims_(from.dims_), float_data_(from.float_data_), @@ -3844,8 +6635,10 @@ TensorProto::TensorProto(const TensorProto& from) string_data_(from.string_data_), int64_data_(from.int64_data_), double_data_(from.double_data_), - uint64_data_(from.uint64_data_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + uint64_data_(from.uint64_data_), + external_data_(from.external_data_), + metadata_props_(from.metadata_props_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); @@ -3875,7 +6668,9 @@ TensorProto::TensorProto(const TensorProto& from) } else { segment_ = nullptr; } - data_type_ = from.data_type_; + ::memcpy(&data_type_, &from.data_type_, + static_cast(reinterpret_cast(&data_location_) - + reinterpret_cast(&data_type_)) + sizeof(data_location_)); // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto) } @@ -3894,15 +6689,15 @@ doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringA #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING ::memset(reinterpret_cast(this) + static_cast( reinterpret_cast(&segment_) - reinterpret_cast(this)), - 0, static_cast(reinterpret_cast(&data_type_) - - reinterpret_cast(&segment_)) + sizeof(data_type_)); + 0, static_cast(reinterpret_cast(&data_location_) - + reinterpret_cast(&segment_)) + sizeof(data_location_)); } TensorProto::~TensorProto() { // @@protoc_insertion_point(destructor:opencv_onnx.TensorProto) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void TensorProto::SharedDtor() { @@ -3936,6 +6731,8 @@ void TensorProto::Clear() { int64_data_.Clear(); double_data_.Clear(); uint64_data_.Clear(); + external_data_.Clear(); + metadata_props_.Clear(); cached_has_bits = _has_bits_[0]; if (cached_has_bits & 0x0000000fu) { if (cached_has_bits & 0x00000001u) { @@ -3952,9 +6749,13 @@ void TensorProto::Clear() { segment_->Clear(); } } - data_type_ = 0; + if (cached_has_bits & 0x00000030u) { + ::memset(&data_type_, 0, static_cast( + reinterpret_cast(&data_location_) - + reinterpret_cast(&data_type_)) + sizeof(data_location_)); + } _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* TensorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -3980,16 +6781,12 @@ const char* TensorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID } else goto handle_unusual; continue; - // optional .opencv_onnx.TensorProto.DataType data_type = 2; + // optional int32 data_type = 2; case 2: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _Internal::set_has_data_type(&has_bits); + data_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); - if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::TensorProto_DataType_IsValid(val))) { - _internal_set_data_type(static_cast<::opencv_onnx::TensorProto_DataType>(val)); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); - } } else goto handle_unusual; continue; @@ -4053,9 +6850,6 @@ const char* TensorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { auto str = _internal_mutable_name(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorProto.name"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -4096,13 +6890,49 @@ const char* TensorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 98)) { auto str = _internal_mutable_doc_string(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorProto.doc_string"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; continue; + // repeated .opencv_onnx.StringStringEntryProto external_data = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 106)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_external_data(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<106>(ptr)); + } else + goto handle_unusual; + continue; + // optional .opencv_onnx.TensorProto.DataLocation data_location = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 112)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::TensorProto_DataLocation_IsValid(val))) { + _internal_set_data_location(static_cast<::opencv_onnx::TensorProto_DataLocation>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(14, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 130)) { + ptr -= 2; + do { + ptr += 2; + ptr = ctx->ParseMessage(_internal_add_metadata_props(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<130>(ptr)); + } else + goto handle_unusual; + continue; default: goto handle_unusual; } // switch @@ -4114,7 +6944,7 @@ const char* TensorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -4140,11 +6970,10 @@ uint8_t* TensorProto::_InternalSerialize( } cached_has_bits = _has_bits_[0]; - // optional .opencv_onnx.TensorProto.DataType data_type = 2; + // optional int32 data_type = 2; if (cached_has_bits & 0x00000010u) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 2, this->_internal_data_type(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_data_type(), target); } // optional .opencv_onnx.TensorProto.Segment segment = 3; @@ -4186,10 +7015,6 @@ uint8_t* TensorProto::_InternalSerialize( // optional string name = 8; if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_name().data(), static_cast(this->_internal_name().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.TensorProto.name"); target = stream->WriteStringMaybeAliased( 8, this->_internal_name(), target); } @@ -4216,17 +7041,36 @@ uint8_t* TensorProto::_InternalSerialize( // optional string doc_string = 12; if (cached_has_bits & 0x00000004u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_doc_string().data(), static_cast(this->_internal_doc_string().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.TensorProto.doc_string"); target = stream->WriteStringMaybeAliased( 12, this->_internal_doc_string(), target); } + // repeated .opencv_onnx.StringStringEntryProto external_data = 13; + for (unsigned int i = 0, + n = static_cast(this->_internal_external_data_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(13, this->_internal_external_data(i), target, stream); + } + + // optional .opencv_onnx.TensorProto.DataLocation data_location = 14; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 14, this->_internal_data_location(), target); + } + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16; + for (unsigned int i = 0, + n = static_cast(this->_internal_metadata_props_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(16, this->_internal_metadata_props(i), target, stream); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto) return target; @@ -4326,8 +7170,22 @@ size_t TensorProto::ByteSizeLong() const { total_size += data_size; } + // repeated .opencv_onnx.StringStringEntryProto external_data = 13; + total_size += 1UL * this->_internal_external_data_size(); + for (const auto& msg : this->external_data_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16; + total_size += 2UL * this->_internal_metadata_props_size(); + for (const auto& msg : this->metadata_props_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + cached_has_bits = _has_bits_[0]; - if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x0000003fu) { // optional string name = 8; if (cached_has_bits & 0x00000001u) { total_size += 1 + @@ -4356,29 +7214,32 @@ size_t TensorProto::ByteSizeLong() const { *segment_); } - // optional .opencv_onnx.TensorProto.DataType data_type = 2; + // optional int32 data_type = 2; if (cached_has_bits & 0x00000010u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_data_type()); + } + + // optional .opencv_onnx.TensorProto.DataLocation data_location = 14; + if (cached_has_bits & 0x00000020u) { total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_data_type()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_data_location()); } } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorProto::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - TensorProto::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorProto::GetClassData() const { return &_class_data_; } - -void TensorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void TensorProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - void TensorProto::MergeFrom(const TensorProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto) GOOGLE_DCHECK_NE(&from, this); @@ -4392,8 +7253,10 @@ void TensorProto::MergeFrom(const TensorProto& from) { int64_data_.MergeFrom(from.int64_data_); double_data_.MergeFrom(from.double_data_); uint64_data_.MergeFrom(from.uint64_data_); + external_data_.MergeFrom(from.external_data_); + metadata_props_.MergeFrom(from.metadata_props_); cached_has_bits = from._has_bits_[0]; - if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x0000003fu) { if (cached_has_bits & 0x00000001u) { _internal_set_name(from._internal_name()); } @@ -4409,9 +7272,12 @@ void TensorProto::MergeFrom(const TensorProto& from) { if (cached_has_bits & 0x00000010u) { data_type_ = from.data_type_; } + if (cached_has_bits & 0x00000020u) { + data_location_ = from.data_location_; + } _has_bits_[0] |= cached_has_bits; } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void TensorProto::CopyFrom(const TensorProto& from) { @@ -4438,6 +7304,8 @@ void TensorProto::InternalSwap(TensorProto* other) { int64_data_.InternalSwap(&other->int64_data_); double_data_.InternalSwap(&other->double_data_); uint64_data_.InternalSwap(&other->uint64_data_); + external_data_.InternalSwap(&other->external_data_); + metadata_props_.InternalSwap(&other->metadata_props_); ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), &name_, lhs_arena, @@ -4454,19 +7322,317 @@ void TensorProto::InternalSwap(TensorProto* other) { &other->doc_string_, rhs_arena ); ::PROTOBUF_NAMESPACE_ID::internal::memswap< - PROTOBUF_FIELD_OFFSET(TensorProto, data_type_) - + sizeof(TensorProto::data_type_) + PROTOBUF_FIELD_OFFSET(TensorProto, data_location_) + + sizeof(TensorProto::data_location_) - PROTOBUF_FIELD_OFFSET(TensorProto, segment_)>( reinterpret_cast(&segment_), reinterpret_cast(&other->segment_)); } -::PROTOBUF_NAMESPACE_ID::Metadata TensorProto::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[7]); +std::string TensorProto::GetTypeName() const { + return "opencv_onnx.TensorProto"; } + +// =================================================================== + +class SparseTensorProto::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::opencv_onnx::TensorProto& values(const SparseTensorProto* msg); + static void set_has_values(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::opencv_onnx::TensorProto& indices(const SparseTensorProto* msg); + static void set_has_indices(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::opencv_onnx::TensorProto& +SparseTensorProto::_Internal::values(const SparseTensorProto* msg) { + return *msg->values_; +} +const ::opencv_onnx::TensorProto& +SparseTensorProto::_Internal::indices(const SparseTensorProto* msg) { + return *msg->indices_; +} +SparseTensorProto::SparseTensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + dims_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.SparseTensorProto) +} +SparseTensorProto::SparseTensorProto(const SparseTensorProto& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + dims_(from.dims_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_values()) { + values_ = new ::opencv_onnx::TensorProto(*from.values_); + } else { + values_ = nullptr; + } + if (from._internal_has_indices()) { + indices_ = new ::opencv_onnx::TensorProto(*from.indices_); + } else { + indices_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.SparseTensorProto) +} + +inline void SparseTensorProto::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&values_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&indices_) - + reinterpret_cast(&values_)) + sizeof(indices_)); +} + +SparseTensorProto::~SparseTensorProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.SparseTensorProto) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void SparseTensorProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete values_; + if (this != internal_default_instance()) delete indices_; +} + +void SparseTensorProto::ArenaDtor(void* object) { + SparseTensorProto* _this = reinterpret_cast< SparseTensorProto* >(object); + (void)_this; +} +void SparseTensorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void SparseTensorProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void SparseTensorProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.SparseTensorProto) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + dims_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(values_ != nullptr); + values_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(indices_ != nullptr); + indices_->Clear(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* SparseTensorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .opencv_onnx.TensorProto values = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_values(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .opencv_onnx.TensorProto indices = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_indices(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated int64 dims = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + ptr -= 1; + do { + ptr += 1; + _internal_add_dims(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr)); + } else if (static_cast(tag) == 26) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_dims(), ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* SparseTensorProto::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.SparseTensorProto) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .opencv_onnx.TensorProto values = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::values(this), target, stream); + } + + // optional .opencv_onnx.TensorProto indices = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::indices(this), target, stream); + } + + // repeated int64 dims = 3; + for (int i = 0, n = this->_internal_dims_size(); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_dims(i), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.SparseTensorProto) + return target; +} + +size_t SparseTensorProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.SparseTensorProto) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated int64 dims = 3; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + Int64Size(this->dims_); + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_dims_size()); + total_size += data_size; + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .opencv_onnx.TensorProto values = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *values_); + } + + // optional .opencv_onnx.TensorProto indices = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *indices_); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void SparseTensorProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void SparseTensorProto::MergeFrom(const SparseTensorProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.SparseTensorProto) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + dims_.MergeFrom(from.dims_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_values()->::opencv_onnx::TensorProto::MergeFrom(from._internal_values()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_indices()->::opencv_onnx::TensorProto::MergeFrom(from._internal_indices()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void SparseTensorProto::CopyFrom(const SparseTensorProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.SparseTensorProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SparseTensorProto::IsInitialized() const { + return true; +} + +void SparseTensorProto::InternalSwap(SparseTensorProto* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + dims_.InternalSwap(&other->dims_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(SparseTensorProto, indices_) + + sizeof(SparseTensorProto::indices_) + - PROTOBUF_FIELD_OFFSET(SparseTensorProto, values_)>( + reinterpret_cast(&values_), + reinterpret_cast(&other->values_)); +} + +std::string SparseTensorProto::GetTypeName() const { + return "opencv_onnx.SparseTensorProto"; +} + + // =================================================================== class TensorShapeProto_Dimension::_Internal { @@ -4479,7 +7645,7 @@ class TensorShapeProto_Dimension::_Internal { TensorShapeProto_Dimension::TensorShapeProto_Dimension(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -4487,9 +7653,9 @@ TensorShapeProto_Dimension::TensorShapeProto_Dimension(::PROTOBUF_NAMESPACE_ID:: // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorShapeProto.Dimension) } TensorShapeProto_Dimension::TensorShapeProto_Dimension(const TensorShapeProto_Dimension& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); @@ -4527,7 +7693,7 @@ TensorShapeProto_Dimension::~TensorShapeProto_Dimension() { // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto.Dimension) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void TensorShapeProto_Dimension::SharedDtor() { @@ -4579,7 +7745,7 @@ void TensorShapeProto_Dimension::Clear() { } clear_value(); _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* TensorShapeProto_Dimension::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -4602,9 +7768,6 @@ const char* TensorShapeProto_Dimension::_InternalParse(const char* ptr, ::PROTOB if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { auto str = _internal_mutable_dim_param(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorShapeProto.Dimension.dim_param"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -4614,9 +7777,6 @@ const char* TensorShapeProto_Dimension::_InternalParse(const char* ptr, ::PROTOB if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { auto str = _internal_mutable_denotation(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TensorShapeProto.Dimension.denotation"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -4632,7 +7792,7 @@ const char* TensorShapeProto_Dimension::_InternalParse(const char* ptr, ::PROTOB } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -4658,10 +7818,6 @@ uint8_t* TensorShapeProto_Dimension::_InternalSerialize( break; } case kDimParam: { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_dim_param().data(), static_cast(this->_internal_dim_param().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.TensorShapeProto.Dimension.dim_param"); target = stream->WriteStringMaybeAliased( 2, this->_internal_dim_param(), target); break; @@ -4671,17 +7827,13 @@ uint8_t* TensorShapeProto_Dimension::_InternalSerialize( cached_has_bits = _has_bits_[0]; // optional string denotation = 3; if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_denotation().data(), static_cast(this->_internal_denotation().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.TensorShapeProto.Dimension.denotation"); target = stream->WriteStringMaybeAliased( 3, this->_internal_denotation(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto.Dimension) return target; @@ -4720,22 +7872,20 @@ size_t TensorShapeProto_Dimension::ByteSizeLong() const { break; } } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto_Dimension::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - TensorShapeProto_Dimension::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto_Dimension::GetClassData() const { return &_class_data_; } - -void TensorShapeProto_Dimension::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void TensorShapeProto_Dimension::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - 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); @@ -4758,7 +7908,7 @@ void TensorShapeProto_Dimension::MergeFrom(const TensorShapeProto_Dimension& fro break; } } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void TensorShapeProto_Dimension::CopyFrom(const TensorShapeProto_Dimension& from) { @@ -4787,12 +7937,11 @@ void TensorShapeProto_Dimension::InternalSwap(TensorShapeProto_Dimension* other) swap(_oneof_case_[0], other->_oneof_case_[0]); } -::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto_Dimension::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[8]); +std::string TensorShapeProto_Dimension::GetTypeName() const { + return "opencv_onnx.TensorShapeProto.Dimension"; } + // =================================================================== class TensorShapeProto::_Internal { @@ -4801,7 +7950,7 @@ class TensorShapeProto::_Internal { TensorShapeProto::TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), dim_(arena) { SharedCtor(); if (!is_message_owned) { @@ -4810,9 +7959,9 @@ TensorShapeProto::TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, // @@protoc_insertion_point(arena_constructor:opencv_onnx.TensorShapeProto) } TensorShapeProto::TensorShapeProto(const TensorShapeProto& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), dim_(from.dim_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto) } @@ -4823,7 +7972,7 @@ TensorShapeProto::~TensorShapeProto() { // @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void TensorShapeProto::SharedDtor() { @@ -4847,7 +7996,7 @@ void TensorShapeProto::Clear() { (void) cached_has_bits; dim_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* TensorShapeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -4880,7 +8029,7 @@ const char* TensorShapeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -4907,8 +8056,8 @@ uint8_t* TensorShapeProto::_InternalSerialize( } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto) return target; @@ -4929,22 +8078,20 @@ size_t TensorShapeProto::ByteSizeLong() const { ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - TensorShapeProto::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto::GetClassData() const { return &_class_data_; } - -void TensorShapeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void TensorShapeProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - void TensorShapeProto::MergeFrom(const TensorShapeProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto) GOOGLE_DCHECK_NE(&from, this); @@ -4952,7 +8099,7 @@ void TensorShapeProto::MergeFrom(const TensorShapeProto& from) { (void) cached_has_bits; dim_.MergeFrom(from.dim_); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void TensorShapeProto::CopyFrom(const TensorShapeProto& from) { @@ -4972,12 +8119,11 @@ void TensorShapeProto::InternalSwap(TensorShapeProto* other) { dim_.InternalSwap(&other->dim_); } -::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[9]); +std::string TensorShapeProto::GetTypeName() const { + return "opencv_onnx.TensorShapeProto"; } + // =================================================================== class TypeProto_Tensor::_Internal { @@ -4998,7 +8144,7 @@ TypeProto_Tensor::_Internal::shape(const TypeProto_Tensor* msg) { } TypeProto_Tensor::TypeProto_Tensor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -5006,9 +8152,9 @@ TypeProto_Tensor::TypeProto_Tensor(::PROTOBUF_NAMESPACE_ID::Arena* arena, // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.Tensor) } TypeProto_Tensor::TypeProto_Tensor(const TypeProto_Tensor& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); if (from._internal_has_shape()) { shape_ = new ::opencv_onnx::TensorShapeProto(*from.shape_); } else { @@ -5029,7 +8175,7 @@ TypeProto_Tensor::~TypeProto_Tensor() { // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Tensor) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void TypeProto_Tensor::SharedDtor() { @@ -5060,7 +8206,7 @@ void TypeProto_Tensor::Clear() { } elem_type_ = 0; _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* TypeProto_Tensor::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -5070,16 +8216,12 @@ const char* TypeProto_Tensor::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA uint32_t tag; ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); switch (tag >> 3) { - // optional .opencv_onnx.TensorProto.DataType elem_type = 1; + // optional int32 elem_type = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { - uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + _Internal::set_has_elem_type(&has_bits); + elem_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); CHK_(ptr); - if (PROTOBUF_PREDICT_TRUE(::opencv_onnx::TensorProto_DataType_IsValid(val))) { - _internal_set_elem_type(static_cast<::opencv_onnx::TensorProto_DataType>(val)); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); - } } else goto handle_unusual; continue; @@ -5102,7 +8244,7 @@ const char* TypeProto_Tensor::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPA } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -5122,11 +8264,10 @@ uint8_t* TypeProto_Tensor::_InternalSerialize( (void) cached_has_bits; cached_has_bits = _has_bits_[0]; - // optional .opencv_onnx.TensorProto.DataType elem_type = 1; + // optional int32 elem_type = 1; if (cached_has_bits & 0x00000002u) { target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( - 1, this->_internal_elem_type(), target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_elem_type(), target); } // optional .opencv_onnx.TensorShapeProto shape = 2; @@ -5138,8 +8279,8 @@ uint8_t* TypeProto_Tensor::_InternalSerialize( } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Tensor) return target; @@ -5162,29 +8303,26 @@ size_t TypeProto_Tensor::ByteSizeLong() const { *shape_); } - // optional .opencv_onnx.TensorProto.DataType elem_type = 1; + // optional int32 elem_type = 1; if (cached_has_bits & 0x00000002u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_elem_type()); + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_elem_type()); } } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TypeProto_Tensor::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - TypeProto_Tensor::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TypeProto_Tensor::GetClassData() const { return &_class_data_; } - -void TypeProto_Tensor::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void TypeProto_Tensor::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - 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); @@ -5201,7 +8339,7 @@ void TypeProto_Tensor::MergeFrom(const TypeProto_Tensor& from) { } _has_bits_[0] |= cached_has_bits; } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void TypeProto_Tensor::CopyFrom(const TypeProto_Tensor& from) { @@ -5227,18 +8365,921 @@ void TypeProto_Tensor::InternalSwap(TypeProto_Tensor* other) { reinterpret_cast(&other->shape_)); } -::PROTOBUF_NAMESPACE_ID::Metadata TypeProto_Tensor::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[10]); +std::string TypeProto_Tensor::GetTypeName() const { + return "opencv_onnx.TypeProto.Tensor"; } + +// =================================================================== + +class TypeProto_Sequence::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::opencv_onnx::TypeProto& elem_type(const TypeProto_Sequence* msg); + static void set_has_elem_type(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::opencv_onnx::TypeProto& +TypeProto_Sequence::_Internal::elem_type(const TypeProto_Sequence* msg) { + return *msg->elem_type_; +} +TypeProto_Sequence::TypeProto_Sequence(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.Sequence) +} +TypeProto_Sequence::TypeProto_Sequence(const TypeProto_Sequence& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_elem_type()) { + elem_type_ = new ::opencv_onnx::TypeProto(*from.elem_type_); + } else { + elem_type_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Sequence) +} + +inline void TypeProto_Sequence::SharedCtor() { +elem_type_ = nullptr; +} + +TypeProto_Sequence::~TypeProto_Sequence() { + // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Sequence) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void TypeProto_Sequence::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete elem_type_; +} + +void TypeProto_Sequence::ArenaDtor(void* object) { + TypeProto_Sequence* _this = reinterpret_cast< TypeProto_Sequence* >(object); + (void)_this; +} +void TypeProto_Sequence::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void TypeProto_Sequence::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void TypeProto_Sequence::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto.Sequence) + uint32_t 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(elem_type_ != nullptr); + elem_type_->Clear(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* TypeProto_Sequence::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .opencv_onnx.TypeProto elem_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_elem_type(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* TypeProto_Sequence::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto.Sequence) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .opencv_onnx.TypeProto elem_type = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::elem_type(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Sequence) + return target; +} + +size_t TypeProto_Sequence::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Sequence) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional .opencv_onnx.TypeProto elem_type = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *elem_type_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TypeProto_Sequence::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void TypeProto_Sequence::MergeFrom(const TypeProto_Sequence& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Sequence) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_elem_type()) { + _internal_mutable_elem_type()->::opencv_onnx::TypeProto::MergeFrom(from._internal_elem_type()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TypeProto_Sequence::CopyFrom(const TypeProto_Sequence& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto.Sequence) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TypeProto_Sequence::IsInitialized() const { + return true; +} + +void TypeProto_Sequence::InternalSwap(TypeProto_Sequence* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + swap(elem_type_, other->elem_type_); +} + +std::string TypeProto_Sequence::GetTypeName() const { + return "opencv_onnx.TypeProto.Sequence"; +} + + +// =================================================================== + +class TypeProto_Map::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_key_type(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::opencv_onnx::TypeProto& value_type(const TypeProto_Map* msg); + static void set_has_value_type(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::opencv_onnx::TypeProto& +TypeProto_Map::_Internal::value_type(const TypeProto_Map* msg) { + return *msg->value_type_; +} +TypeProto_Map::TypeProto_Map(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.Map) +} +TypeProto_Map::TypeProto_Map(const TypeProto_Map& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_value_type()) { + value_type_ = new ::opencv_onnx::TypeProto(*from.value_type_); + } else { + value_type_ = nullptr; + } + key_type_ = from.key_type_; + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Map) +} + +inline void TypeProto_Map::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&value_type_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&key_type_) - + reinterpret_cast(&value_type_)) + sizeof(key_type_)); +} + +TypeProto_Map::~TypeProto_Map() { + // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Map) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void TypeProto_Map::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete value_type_; +} + +void TypeProto_Map::ArenaDtor(void* object) { + TypeProto_Map* _this = reinterpret_cast< TypeProto_Map* >(object); + (void)_this; +} +void TypeProto_Map::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void TypeProto_Map::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void TypeProto_Map::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto.Map) + uint32_t 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(value_type_ != nullptr); + value_type_->Clear(); + } + key_type_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* TypeProto_Map::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 key_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_key_type(&has_bits); + key_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .opencv_onnx.TypeProto value_type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_value_type(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* TypeProto_Map::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto.Map) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 key_type = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_key_type(), target); + } + + // optional .opencv_onnx.TypeProto value_type = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::value_type(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Map) + return target; +} + +size_t TypeProto_Map::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Map) + size_t total_size = 0; + + uint32_t 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 & 0x00000003u) { + // optional .opencv_onnx.TypeProto value_type = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *value_type_); + } + + // optional int32 key_type = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_key_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TypeProto_Map::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void TypeProto_Map::MergeFrom(const TypeProto_Map& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Map) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_value_type()->::opencv_onnx::TypeProto::MergeFrom(from._internal_value_type()); + } + if (cached_has_bits & 0x00000002u) { + key_type_ = from.key_type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TypeProto_Map::CopyFrom(const TypeProto_Map& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto.Map) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TypeProto_Map::IsInitialized() const { + return true; +} + +void TypeProto_Map::InternalSwap(TypeProto_Map* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(TypeProto_Map, key_type_) + + sizeof(TypeProto_Map::key_type_) + - PROTOBUF_FIELD_OFFSET(TypeProto_Map, value_type_)>( + reinterpret_cast(&value_type_), + reinterpret_cast(&other->value_type_)); +} + +std::string TypeProto_Map::GetTypeName() const { + return "opencv_onnx.TypeProto.Map"; +} + + +// =================================================================== + +class TypeProto_Optional::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::opencv_onnx::TypeProto& elem_type(const TypeProto_Optional* msg); + static void set_has_elem_type(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::opencv_onnx::TypeProto& +TypeProto_Optional::_Internal::elem_type(const TypeProto_Optional* msg) { + return *msg->elem_type_; +} +TypeProto_Optional::TypeProto_Optional(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.Optional) +} +TypeProto_Optional::TypeProto_Optional(const TypeProto_Optional& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_elem_type()) { + elem_type_ = new ::opencv_onnx::TypeProto(*from.elem_type_); + } else { + elem_type_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Optional) +} + +inline void TypeProto_Optional::SharedCtor() { +elem_type_ = nullptr; +} + +TypeProto_Optional::~TypeProto_Optional() { + // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Optional) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void TypeProto_Optional::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete elem_type_; +} + +void TypeProto_Optional::ArenaDtor(void* object) { + TypeProto_Optional* _this = reinterpret_cast< TypeProto_Optional* >(object); + (void)_this; +} +void TypeProto_Optional::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void TypeProto_Optional::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void TypeProto_Optional::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto.Optional) + uint32_t 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(elem_type_ != nullptr); + elem_type_->Clear(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* TypeProto_Optional::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .opencv_onnx.TypeProto elem_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_elem_type(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* TypeProto_Optional::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto.Optional) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .opencv_onnx.TypeProto elem_type = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::elem_type(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Optional) + return target; +} + +size_t TypeProto_Optional::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Optional) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional .opencv_onnx.TypeProto elem_type = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *elem_type_); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TypeProto_Optional::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void TypeProto_Optional::MergeFrom(const TypeProto_Optional& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Optional) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_elem_type()) { + _internal_mutable_elem_type()->::opencv_onnx::TypeProto::MergeFrom(from._internal_elem_type()); + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TypeProto_Optional::CopyFrom(const TypeProto_Optional& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto.Optional) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TypeProto_Optional::IsInitialized() const { + return true; +} + +void TypeProto_Optional::InternalSwap(TypeProto_Optional* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + swap(elem_type_, other->elem_type_); +} + +std::string TypeProto_Optional::GetTypeName() const { + return "opencv_onnx.TypeProto.Optional"; +} + + +// =================================================================== + +class TypeProto_SparseTensor::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_elem_type(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::opencv_onnx::TensorShapeProto& shape(const TypeProto_SparseTensor* msg); + static void set_has_shape(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +const ::opencv_onnx::TensorShapeProto& +TypeProto_SparseTensor::_Internal::shape(const TypeProto_SparseTensor* msg) { + return *msg->shape_; +} +TypeProto_SparseTensor::TypeProto_SparseTensor(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto.SparseTensor) +} +TypeProto_SparseTensor::TypeProto_SparseTensor(const TypeProto_SparseTensor& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + if (from._internal_has_shape()) { + shape_ = new ::opencv_onnx::TensorShapeProto(*from.shape_); + } else { + shape_ = nullptr; + } + elem_type_ = from.elem_type_; + // @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.SparseTensor) +} + +inline void TypeProto_SparseTensor::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&shape_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&elem_type_) - + reinterpret_cast(&shape_)) + sizeof(elem_type_)); +} + +TypeProto_SparseTensor::~TypeProto_SparseTensor() { + // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.SparseTensor) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void TypeProto_SparseTensor::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete shape_; +} + +void TypeProto_SparseTensor::ArenaDtor(void* object) { + TypeProto_SparseTensor* _this = reinterpret_cast< TypeProto_SparseTensor* >(object); + (void)_this; +} +void TypeProto_SparseTensor::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void TypeProto_SparseTensor::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void TypeProto_SparseTensor::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto.SparseTensor) + uint32_t 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_ != nullptr); + shape_->Clear(); + } + elem_type_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* TypeProto_SparseTensor::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 elem_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_elem_type(&has_bits); + elem_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .opencv_onnx.TensorShapeProto shape = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_shape(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* TypeProto_SparseTensor::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto.SparseTensor) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 elem_type = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_elem_type(), target); + } + + // optional .opencv_onnx.TensorShapeProto shape = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 2, _Internal::shape(this), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.SparseTensor) + return target; +} + +size_t TypeProto_SparseTensor::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.SparseTensor) + size_t total_size = 0; + + uint32_t 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 & 0x00000003u) { + // optional .opencv_onnx.TensorShapeProto shape = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *shape_); + } + + // optional int32 elem_type = 1; + if (cached_has_bits & 0x00000002u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_elem_type()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TypeProto_SparseTensor::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void TypeProto_SparseTensor::MergeFrom(const TypeProto_SparseTensor& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.SparseTensor) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_shape()->::opencv_onnx::TensorShapeProto::MergeFrom(from._internal_shape()); + } + if (cached_has_bits & 0x00000002u) { + elem_type_ = from.elem_type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void TypeProto_SparseTensor::CopyFrom(const TypeProto_SparseTensor& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto.SparseTensor) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TypeProto_SparseTensor::IsInitialized() const { + return true; +} + +void TypeProto_SparseTensor::InternalSwap(TypeProto_SparseTensor* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, elem_type_) + + sizeof(TypeProto_SparseTensor::elem_type_) + - PROTOBUF_FIELD_OFFSET(TypeProto_SparseTensor, shape_)>( + reinterpret_cast(&shape_), + reinterpret_cast(&other->shape_)); +} + +std::string TypeProto_SparseTensor::GetTypeName() const { + return "opencv_onnx.TypeProto.SparseTensor"; +} + + // =================================================================== class TypeProto::_Internal { public: using HasBits = decltype(std::declval()._has_bits_); static const ::opencv_onnx::TypeProto_Tensor& tensor_type(const TypeProto* msg); + static const ::opencv_onnx::TypeProto_Sequence& sequence_type(const TypeProto* msg); + static const ::opencv_onnx::TypeProto_Map& map_type(const TypeProto* msg); + static const ::opencv_onnx::TypeProto_Optional& optional_type(const TypeProto* msg); + static const ::opencv_onnx::TypeProto_SparseTensor& sparse_tensor_type(const TypeProto* msg); static void set_has_denotation(HasBits* has_bits) { (*has_bits)[0] |= 1u; } @@ -5248,6 +9289,22 @@ const ::opencv_onnx::TypeProto_Tensor& TypeProto::_Internal::tensor_type(const TypeProto* msg) { return *msg->value_.tensor_type_; } +const ::opencv_onnx::TypeProto_Sequence& +TypeProto::_Internal::sequence_type(const TypeProto* msg) { + return *msg->value_.sequence_type_; +} +const ::opencv_onnx::TypeProto_Map& +TypeProto::_Internal::map_type(const TypeProto* msg) { + return *msg->value_.map_type_; +} +const ::opencv_onnx::TypeProto_Optional& +TypeProto::_Internal::optional_type(const TypeProto* msg) { + return *msg->value_.optional_type_; +} +const ::opencv_onnx::TypeProto_SparseTensor& +TypeProto::_Internal::sparse_tensor_type(const TypeProto* msg) { + return *msg->value_.sparse_tensor_type_; +} void TypeProto::set_allocated_tensor_type(::opencv_onnx::TypeProto_Tensor* tensor_type) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); clear_value(); @@ -5263,9 +9320,69 @@ void TypeProto::set_allocated_tensor_type(::opencv_onnx::TypeProto_Tensor* tenso } // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.tensor_type) } +void TypeProto::set_allocated_sequence_type(::opencv_onnx::TypeProto_Sequence* sequence_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_value(); + if (sequence_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto_Sequence>::GetOwningArena(sequence_type); + if (message_arena != submessage_arena) { + sequence_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, sequence_type, submessage_arena); + } + set_has_sequence_type(); + value_.sequence_type_ = sequence_type; + } + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.sequence_type) +} +void TypeProto::set_allocated_map_type(::opencv_onnx::TypeProto_Map* map_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_value(); + if (map_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto_Map>::GetOwningArena(map_type); + if (message_arena != submessage_arena) { + map_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, map_type, submessage_arena); + } + set_has_map_type(); + value_.map_type_ = map_type; + } + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.map_type) +} +void TypeProto::set_allocated_optional_type(::opencv_onnx::TypeProto_Optional* optional_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_value(); + if (optional_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto_Optional>::GetOwningArena(optional_type); + if (message_arena != submessage_arena) { + optional_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, optional_type, submessage_arena); + } + set_has_optional_type(); + value_.optional_type_ = optional_type; + } + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.optional_type) +} +void TypeProto::set_allocated_sparse_tensor_type(::opencv_onnx::TypeProto_SparseTensor* sparse_tensor_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + clear_value(); + if (sparse_tensor_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto_SparseTensor>::GetOwningArena(sparse_tensor_type); + if (message_arena != submessage_arena) { + sparse_tensor_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, sparse_tensor_type, submessage_arena); + } + set_has_sparse_tensor_type(); + value_.sparse_tensor_type_ = sparse_tensor_type; + } + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.sparse_tensor_type) +} TypeProto::TypeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -5273,9 +9390,9 @@ TypeProto::TypeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, // @@protoc_insertion_point(arena_constructor:opencv_onnx.TypeProto) } TypeProto::TypeProto(const TypeProto& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); denotation_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING denotation_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); @@ -5290,6 +9407,22 @@ TypeProto::TypeProto(const TypeProto& from) _internal_mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from._internal_tensor_type()); break; } + case kSequenceType: { + _internal_mutable_sequence_type()->::opencv_onnx::TypeProto_Sequence::MergeFrom(from._internal_sequence_type()); + break; + } + case kMapType: { + _internal_mutable_map_type()->::opencv_onnx::TypeProto_Map::MergeFrom(from._internal_map_type()); + break; + } + case kOptionalType: { + _internal_mutable_optional_type()->::opencv_onnx::TypeProto_Optional::MergeFrom(from._internal_optional_type()); + break; + } + case kSparseTensorType: { + _internal_mutable_sparse_tensor_type()->::opencv_onnx::TypeProto_SparseTensor::MergeFrom(from._internal_sparse_tensor_type()); + break; + } case VALUE_NOT_SET: { break; } @@ -5309,7 +9442,7 @@ TypeProto::~TypeProto() { // @@protoc_insertion_point(destructor:opencv_onnx.TypeProto) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void TypeProto::SharedDtor() { @@ -5339,6 +9472,30 @@ void TypeProto::clear_value() { } break; } + case kSequenceType: { + if (GetArenaForAllocation() == nullptr) { + delete value_.sequence_type_; + } + break; + } + case kMapType: { + if (GetArenaForAllocation() == nullptr) { + delete value_.map_type_; + } + break; + } + case kOptionalType: { + if (GetArenaForAllocation() == nullptr) { + delete value_.optional_type_; + } + break; + } + case kSparseTensorType: { + if (GetArenaForAllocation() == nullptr) { + delete value_.sparse_tensor_type_; + } + break; + } case VALUE_NOT_SET: { break; } @@ -5359,7 +9516,7 @@ void TypeProto::Clear() { } clear_value(); _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* TypeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -5377,14 +9534,43 @@ const char* TypeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: } else goto handle_unusual; continue; + // .opencv_onnx.TypeProto.Sequence sequence_type = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_sequence_type(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .opencv_onnx.TypeProto.Map map_type = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_map_type(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; // optional string denotation = 6; case 6: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { auto str = _internal_mutable_denotation(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.TypeProto.denotation"); - #endif // !NDEBUG + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .opencv_onnx.TypeProto.SparseTensor sparse_tensor_type = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + ptr = ctx->ParseMessage(_internal_mutable_sparse_tensor_type(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .opencv_onnx.TypeProto.Optional optional_type = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + ptr = ctx->ParseMessage(_internal_mutable_optional_type(), ptr); CHK_(ptr); } else goto handle_unusual; @@ -5400,7 +9586,7 @@ const char* TypeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID:: } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -5419,28 +9605,57 @@ uint8_t* TypeProto::_InternalSerialize( uint32_t cached_has_bits = 0; (void) cached_has_bits; - // .opencv_onnx.TypeProto.Tensor tensor_type = 1; - if (_internal_has_tensor_type()) { - target = stream->EnsureSpace(target); - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage( - 1, _Internal::tensor_type(this), target, stream); + switch (value_case()) { + case kTensorType: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 1, _Internal::tensor_type(this), target, stream); + break; + } + case kSequenceType: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 4, _Internal::sequence_type(this), target, stream); + break; + } + case kMapType: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 5, _Internal::map_type(this), target, stream); + break; + } + default: ; } - cached_has_bits = _has_bits_[0]; // optional string denotation = 6; if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_denotation().data(), static_cast(this->_internal_denotation().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.TypeProto.denotation"); target = stream->WriteStringMaybeAliased( 6, this->_internal_denotation(), target); } + switch (value_case()) { + case kSparseTensorType: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 8, _Internal::sparse_tensor_type(this), target, stream); + break; + } + case kOptionalType: { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage( + 9, _Internal::optional_type(this), target, stream); + break; + } + default: ; + } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto) return target; @@ -5470,26 +9685,52 @@ size_t TypeProto::ByteSizeLong() const { *value_.tensor_type_); break; } + // .opencv_onnx.TypeProto.Sequence sequence_type = 4; + case kSequenceType: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *value_.sequence_type_); + break; + } + // .opencv_onnx.TypeProto.Map map_type = 5; + case kMapType: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *value_.map_type_); + break; + } + // .opencv_onnx.TypeProto.Optional optional_type = 9; + case kOptionalType: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *value_.optional_type_); + break; + } + // .opencv_onnx.TypeProto.SparseTensor sparse_tensor_type = 8; + case kSparseTensorType: { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *value_.sparse_tensor_type_); + break; + } case VALUE_NOT_SET: { break; } } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TypeProto::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - TypeProto::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TypeProto::GetClassData() const { return &_class_data_; } - -void TypeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void TypeProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - void TypeProto::MergeFrom(const TypeProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto) GOOGLE_DCHECK_NE(&from, this); @@ -5504,11 +9745,27 @@ void TypeProto::MergeFrom(const TypeProto& from) { _internal_mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from._internal_tensor_type()); break; } + case kSequenceType: { + _internal_mutable_sequence_type()->::opencv_onnx::TypeProto_Sequence::MergeFrom(from._internal_sequence_type()); + break; + } + case kMapType: { + _internal_mutable_map_type()->::opencv_onnx::TypeProto_Map::MergeFrom(from._internal_map_type()); + break; + } + case kOptionalType: { + _internal_mutable_optional_type()->::opencv_onnx::TypeProto_Optional::MergeFrom(from._internal_optional_type()); + break; + } + case kSparseTensorType: { + _internal_mutable_sparse_tensor_type()->::opencv_onnx::TypeProto_SparseTensor::MergeFrom(from._internal_sparse_tensor_type()); + break; + } case VALUE_NOT_SET: { break; } } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void TypeProto::CopyFrom(const TypeProto& from) { @@ -5537,12 +9794,11 @@ void TypeProto::InternalSwap(TypeProto* other) { swap(_oneof_case_[0], other->_oneof_case_[0]); } -::PROTOBUF_NAMESPACE_ID::Metadata TypeProto::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[11]); +std::string TypeProto::GetTypeName() const { + return "opencv_onnx.TypeProto"; } + // =================================================================== class OperatorSetIdProto::_Internal { @@ -5558,7 +9814,7 @@ class OperatorSetIdProto::_Internal { OperatorSetIdProto::OperatorSetIdProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) - : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) { SharedCtor(); if (!is_message_owned) { RegisterArenaDtor(arena); @@ -5566,9 +9822,9 @@ OperatorSetIdProto::OperatorSetIdProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, // @@protoc_insertion_point(arena_constructor:opencv_onnx.OperatorSetIdProto) } OperatorSetIdProto::OperatorSetIdProto(const OperatorSetIdProto& from) - : ::PROTOBUF_NAMESPACE_ID::Message(), + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _has_bits_(from._has_bits_) { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); @@ -5593,7 +9849,7 @@ OperatorSetIdProto::~OperatorSetIdProto() { // @@protoc_insertion_point(destructor:opencv_onnx.OperatorSetIdProto) if (GetArenaForAllocation() != nullptr) return; SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Delete(); } inline void OperatorSetIdProto::SharedDtor() { @@ -5623,7 +9879,7 @@ void OperatorSetIdProto::Clear() { } version_ = int64_t{0}; _has_bits_.Clear(); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + _internal_metadata_.Clear(); } const char* OperatorSetIdProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { @@ -5638,9 +9894,6 @@ const char* OperatorSetIdProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMES if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { auto str = _internal_mutable_domain(); ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - #ifndef NDEBUG - ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_onnx.OperatorSetIdProto.domain"); - #endif // !NDEBUG CHK_(ptr); } else goto handle_unusual; @@ -5665,7 +9918,7 @@ const char* OperatorSetIdProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMES } ptr = UnknownFieldParse( tag, - _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + _internal_metadata_.mutable_unknown_fields(), ptr, ctx); CHK_(ptr != nullptr); } // while @@ -5687,10 +9940,6 @@ uint8_t* OperatorSetIdProto::_InternalSerialize( cached_has_bits = _has_bits_[0]; // optional string domain = 1; if (cached_has_bits & 0x00000001u) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( - this->_internal_domain().data(), static_cast(this->_internal_domain().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, - "opencv_onnx.OperatorSetIdProto.domain"); target = stream->WriteStringMaybeAliased( 1, this->_internal_domain(), target); } @@ -5702,8 +9951,8 @@ uint8_t* OperatorSetIdProto::_InternalSerialize( } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); } // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.OperatorSetIdProto) return target; @@ -5732,22 +9981,20 @@ size_t OperatorSetIdProto::ByteSizeLong() const { } } - return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; } -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData OperatorSetIdProto::_class_data_ = { - ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, - OperatorSetIdProto::MergeImpl -}; -const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*OperatorSetIdProto::GetClassData() const { return &_class_data_; } - -void OperatorSetIdProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, - const ::PROTOBUF_NAMESPACE_ID::Message& from) { - static_cast(to)->MergeFrom( - static_cast(from)); +void OperatorSetIdProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); } - void OperatorSetIdProto::MergeFrom(const OperatorSetIdProto& from) { // @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.OperatorSetIdProto) GOOGLE_DCHECK_NE(&from, this); @@ -5764,7 +10011,7 @@ void OperatorSetIdProto::MergeFrom(const OperatorSetIdProto& from) { } _has_bits_[0] |= cached_has_bits; } - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _internal_metadata_.MergeFrom(from._internal_metadata_); } void OperatorSetIdProto::CopyFrom(const OperatorSetIdProto& from) { @@ -5792,12 +10039,638 @@ void OperatorSetIdProto::InternalSwap(OperatorSetIdProto* other) { swap(version_, other->version_); } -::PROTOBUF_NAMESPACE_ID::Metadata OperatorSetIdProto::GetMetadata() const { - return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( - &descriptor_table_opencv_2donnx_2eproto_getter, &descriptor_table_opencv_2donnx_2eproto_once, - file_level_metadata_opencv_2donnx_2eproto[12]); +std::string OperatorSetIdProto::GetTypeName() const { + return "opencv_onnx.OperatorSetIdProto"; } + +// =================================================================== + +class FunctionProto::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_doc_string(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_domain(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_overload(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +FunctionProto::FunctionProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned), + input_(arena), + output_(arena), + attribute_(arena), + node_(arena), + opset_import_(arena), + attribute_proto_(arena), + value_info_(arena), + metadata_props_(arena) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:opencv_onnx.FunctionProto) +} +FunctionProto::FunctionProto(const FunctionProto& from) + : ::PROTOBUF_NAMESPACE_ID::MessageLite(), + _has_bits_(from._has_bits_), + input_(from.input_), + output_(from.output_), + attribute_(from.attribute_), + node_(from.node_), + opset_import_(from.opset_import_), + attribute_proto_(from.attribute_proto_), + value_info_(from.value_info_), + metadata_props_(from.metadata_props_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_name()) { + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), + GetArenaForAllocation()); + } + doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_doc_string()) { + doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_doc_string(), + GetArenaForAllocation()); + } + domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_domain()) { + domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_domain(), + GetArenaForAllocation()); + } + overload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_overload()) { + overload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_overload(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:opencv_onnx.FunctionProto) +} + +inline void FunctionProto::SharedCtor() { +name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +doc_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +domain_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +overload_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +FunctionProto::~FunctionProto() { + // @@protoc_insertion_point(destructor:opencv_onnx.FunctionProto) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete(); +} + +inline void FunctionProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + doc_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + domain_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + overload_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void FunctionProto::ArenaDtor(void* object) { + FunctionProto* _this = reinterpret_cast< FunctionProto* >(object); + (void)_this; +} +void FunctionProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void FunctionProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void FunctionProto::Clear() { +// @@protoc_insertion_point(message_clear_start:opencv_onnx.FunctionProto) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + input_.Clear(); + output_.Clear(); + attribute_.Clear(); + node_.Clear(); + opset_import_.Clear(); + attribute_proto_.Clear(); + value_info_.Clear(); + metadata_props_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + doc_string_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + domain_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + overload_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear(); +} + +const char* FunctionProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated string input = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_input(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + // repeated string output = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_output(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); + } else + goto handle_unusual; + continue; + // repeated string attribute = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_attribute(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.NodeProto node = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_node(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr)); + } else + goto handle_unusual; + continue; + // optional string doc_string = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + auto str = _internal_mutable_doc_string(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.OperatorSetIdProto opset_import = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_opset_import(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr)); + } else + goto handle_unusual; + continue; + // optional string domain = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + auto str = _internal_mutable_domain(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.AttributeProto attribute_proto = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 90)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_attribute_proto(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.ValueInfoProto value_info = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 98)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_value_info(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<98>(ptr)); + } else + goto handle_unusual; + continue; + // optional string overload = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 106)) { + auto str = _internal_mutable_overload(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 114)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_metadata_props(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FunctionProto::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.FunctionProto) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // repeated string input = 4; + for (int i = 0, n = this->_internal_input_size(); i < n; i++) { + const auto& s = this->_internal_input(i); + target = stream->WriteString(4, s, target); + } + + // repeated string output = 5; + for (int i = 0, n = this->_internal_output_size(); i < n; i++) { + const auto& s = this->_internal_output(i); + target = stream->WriteString(5, s, target); + } + + // repeated string attribute = 6; + for (int i = 0, n = this->_internal_attribute_size(); i < n; i++) { + const auto& s = this->_internal_attribute(i); + target = stream->WriteString(6, s, target); + } + + // repeated .opencv_onnx.NodeProto node = 7; + for (unsigned int i = 0, + n = static_cast(this->_internal_node_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(7, this->_internal_node(i), target, stream); + } + + // optional string doc_string = 8; + if (cached_has_bits & 0x00000002u) { + target = stream->WriteStringMaybeAliased( + 8, this->_internal_doc_string(), target); + } + + // repeated .opencv_onnx.OperatorSetIdProto opset_import = 9; + for (unsigned int i = 0, + n = static_cast(this->_internal_opset_import_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(9, this->_internal_opset_import(i), target, stream); + } + + // optional string domain = 10; + if (cached_has_bits & 0x00000004u) { + target = stream->WriteStringMaybeAliased( + 10, this->_internal_domain(), target); + } + + // repeated .opencv_onnx.AttributeProto attribute_proto = 11; + for (unsigned int i = 0, + n = static_cast(this->_internal_attribute_proto_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(11, this->_internal_attribute_proto(i), target, stream); + } + + // repeated .opencv_onnx.ValueInfoProto value_info = 12; + for (unsigned int i = 0, + n = static_cast(this->_internal_value_info_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(12, this->_internal_value_info(i), target, stream); + } + + // optional string overload = 13; + if (cached_has_bits & 0x00000008u) { + target = stream->WriteStringMaybeAliased( + 13, this->_internal_overload(), target); + } + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14; + for (unsigned int i = 0, + n = static_cast(this->_internal_metadata_props_size()); i < n; i++) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(14, this->_internal_metadata_props(i), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(), + static_cast(_internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.FunctionProto) + return target; +} + +size_t FunctionProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.FunctionProto) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string input = 4; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(input_.size()); + for (int i = 0, n = input_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + input_.Get(i)); + } + + // repeated string output = 5; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(output_.size()); + for (int i = 0, n = output_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + output_.Get(i)); + } + + // repeated string attribute = 6; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(attribute_.size()); + for (int i = 0, n = attribute_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + attribute_.Get(i)); + } + + // repeated .opencv_onnx.NodeProto node = 7; + total_size += 1UL * this->_internal_node_size(); + for (const auto& msg : this->node_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.OperatorSetIdProto opset_import = 9; + total_size += 1UL * this->_internal_opset_import_size(); + for (const auto& msg : this->opset_import_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.AttributeProto attribute_proto = 11; + total_size += 1UL * this->_internal_attribute_proto_size(); + for (const auto& msg : this->attribute_proto_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.ValueInfoProto value_info = 12; + total_size += 1UL * this->_internal_value_info_size(); + for (const auto& msg : this->value_info_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14; + total_size += 1UL * this->_internal_metadata_props_size(); + for (const auto& msg : this->metadata_props_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional string doc_string = 8; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_doc_string()); + } + + // optional string domain = 10; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_domain()); + } + + // optional string overload = 13; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_overload()); + } + + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + total_size += _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size(); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void FunctionProto::CheckTypeAndMergeFrom( + const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) { + MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast( + &from)); +} + +void FunctionProto::MergeFrom(const FunctionProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.FunctionProto) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + input_.MergeFrom(from.input_); + output_.MergeFrom(from.output_); + attribute_.MergeFrom(from.attribute_); + node_.MergeFrom(from.node_); + opset_import_.MergeFrom(from.opset_import_); + attribute_proto_.MergeFrom(from.attribute_proto_); + value_info_.MergeFrom(from.value_info_); + metadata_props_.MergeFrom(from.metadata_props_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_doc_string(from._internal_doc_string()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_domain(from._internal_domain()); + } + if (cached_has_bits & 0x00000008u) { + _internal_set_overload(from._internal_overload()); + } + } + _internal_metadata_.MergeFrom(from._internal_metadata_); +} + +void FunctionProto::CopyFrom(const FunctionProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.FunctionProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FunctionProto::IsInitialized() const { + return true; +} + +void FunctionProto::InternalSwap(FunctionProto* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + input_.InternalSwap(&other->input_); + output_.InternalSwap(&other->output_); + attribute_.InternalSwap(&other->attribute_); + node_.InternalSwap(&other->node_); + opset_import_.InternalSwap(&other->opset_import_); + attribute_proto_.InternalSwap(&other->attribute_proto_); + value_info_.InternalSwap(&other->value_info_); + metadata_props_.InternalSwap(&other->metadata_props_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &name_, lhs_arena, + &other->name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &doc_string_, lhs_arena, + &other->doc_string_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &domain_, lhs_arena, + &other->domain_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &overload_, lhs_arena, + &other->overload_, rhs_arena + ); +} + +std::string FunctionProto::GetTypeName() const { + return "opencv_onnx.FunctionProto"; +} + + // @@protoc_insertion_point(namespace_scope) } // namespace opencv_onnx PROTOBUF_NAMESPACE_OPEN @@ -5810,12 +10683,36 @@ template<> PROTOBUF_NOINLINE ::opencv_onnx::ValueInfoProto* Arena::CreateMaybeMe template<> PROTOBUF_NOINLINE ::opencv_onnx::NodeProto* Arena::CreateMaybeMessage< ::opencv_onnx::NodeProto >(Arena* arena) { return Arena::CreateMessageInternal< ::opencv_onnx::NodeProto >(arena); } +template<> PROTOBUF_NOINLINE ::opencv_onnx::IntIntListEntryProto* Arena::CreateMaybeMessage< ::opencv_onnx::IntIntListEntryProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::IntIntListEntryProto >(arena); +} +template<> PROTOBUF_NOINLINE ::opencv_onnx::NodeDeviceConfigurationProto* Arena::CreateMaybeMessage< ::opencv_onnx::NodeDeviceConfigurationProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::NodeDeviceConfigurationProto >(arena); +} +template<> PROTOBUF_NOINLINE ::opencv_onnx::ShardingSpecProto* Arena::CreateMaybeMessage< ::opencv_onnx::ShardingSpecProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::ShardingSpecProto >(arena); +} +template<> PROTOBUF_NOINLINE ::opencv_onnx::ShardedDimProto* Arena::CreateMaybeMessage< ::opencv_onnx::ShardedDimProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::ShardedDimProto >(arena); +} +template<> PROTOBUF_NOINLINE ::opencv_onnx::SimpleShardedDimProto* Arena::CreateMaybeMessage< ::opencv_onnx::SimpleShardedDimProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::SimpleShardedDimProto >(arena); +} +template<> PROTOBUF_NOINLINE ::opencv_onnx::TrainingInfoProto* Arena::CreateMaybeMessage< ::opencv_onnx::TrainingInfoProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::TrainingInfoProto >(arena); +} template<> PROTOBUF_NOINLINE ::opencv_onnx::ModelProto* Arena::CreateMaybeMessage< ::opencv_onnx::ModelProto >(Arena* arena) { return Arena::CreateMessageInternal< ::opencv_onnx::ModelProto >(arena); } +template<> PROTOBUF_NOINLINE ::opencv_onnx::DeviceConfigurationProto* Arena::CreateMaybeMessage< ::opencv_onnx::DeviceConfigurationProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::DeviceConfigurationProto >(arena); +} template<> PROTOBUF_NOINLINE ::opencv_onnx::StringStringEntryProto* Arena::CreateMaybeMessage< ::opencv_onnx::StringStringEntryProto >(Arena* arena) { return Arena::CreateMessageInternal< ::opencv_onnx::StringStringEntryProto >(arena); } +template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorAnnotation* Arena::CreateMaybeMessage< ::opencv_onnx::TensorAnnotation >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::TensorAnnotation >(arena); +} template<> PROTOBUF_NOINLINE ::opencv_onnx::GraphProto* Arena::CreateMaybeMessage< ::opencv_onnx::GraphProto >(Arena* arena) { return Arena::CreateMessageInternal< ::opencv_onnx::GraphProto >(arena); } @@ -5825,6 +10722,9 @@ template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorProto_Segment* Arena::CreateMa template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorProto* Arena::CreateMaybeMessage< ::opencv_onnx::TensorProto >(Arena* arena) { return Arena::CreateMessageInternal< ::opencv_onnx::TensorProto >(arena); } +template<> PROTOBUF_NOINLINE ::opencv_onnx::SparseTensorProto* Arena::CreateMaybeMessage< ::opencv_onnx::SparseTensorProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::SparseTensorProto >(arena); +} template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorShapeProto_Dimension* Arena::CreateMaybeMessage< ::opencv_onnx::TensorShapeProto_Dimension >(Arena* arena) { return Arena::CreateMessageInternal< ::opencv_onnx::TensorShapeProto_Dimension >(arena); } @@ -5834,12 +10734,27 @@ template<> PROTOBUF_NOINLINE ::opencv_onnx::TensorShapeProto* Arena::CreateMaybe template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto_Tensor* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_Tensor >(Arena* arena) { return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_Tensor >(arena); } +template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto_Sequence* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_Sequence >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_Sequence >(arena); +} +template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto_Map* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_Map >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_Map >(arena); +} +template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto_Optional* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_Optional >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_Optional >(arena); +} +template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto_SparseTensor* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto_SparseTensor >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto_SparseTensor >(arena); +} template<> PROTOBUF_NOINLINE ::opencv_onnx::TypeProto* Arena::CreateMaybeMessage< ::opencv_onnx::TypeProto >(Arena* arena) { return Arena::CreateMessageInternal< ::opencv_onnx::TypeProto >(arena); } template<> PROTOBUF_NOINLINE ::opencv_onnx::OperatorSetIdProto* Arena::CreateMaybeMessage< ::opencv_onnx::OperatorSetIdProto >(Arena* arena) { return Arena::CreateMessageInternal< ::opencv_onnx::OperatorSetIdProto >(arena); } +template<> PROTOBUF_NOINLINE ::opencv_onnx::FunctionProto* Arena::CreateMaybeMessage< ::opencv_onnx::FunctionProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::opencv_onnx::FunctionProto >(arena); +} PROTOBUF_NAMESPACE_CLOSE // @@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 index 06b45712c8..b7d527e3fc 100644 --- a/modules/dnn/misc/onnx/opencv-onnx.pb.h +++ b/modules/dnn/misc/onnx/opencv-onnx.pb.h @@ -13,7 +13,7 @@ #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3019001 < PROTOBUF_MIN_PROTOC_VERSION +#if 3019004 < 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. @@ -26,12 +26,10 @@ #include #include #include -#include -#include +#include #include // IWYU pragma: export #include // IWYU pragma: export -#include -#include +#include // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_opencv_2donnx_2eproto @@ -47,32 +45,58 @@ struct TableStruct_opencv_2donnx_2eproto { PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[13] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[27] PROTOBUF_SECTION_VARIABLE(protodesc_cold); static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; static const uint32_t offsets[]; }; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_opencv_2donnx_2eproto; namespace opencv_onnx { class AttributeProto; struct AttributeProtoDefaultTypeInternal; extern AttributeProtoDefaultTypeInternal _AttributeProto_default_instance_; +class DeviceConfigurationProto; +struct DeviceConfigurationProtoDefaultTypeInternal; +extern DeviceConfigurationProtoDefaultTypeInternal _DeviceConfigurationProto_default_instance_; +class FunctionProto; +struct FunctionProtoDefaultTypeInternal; +extern FunctionProtoDefaultTypeInternal _FunctionProto_default_instance_; class GraphProto; struct GraphProtoDefaultTypeInternal; extern GraphProtoDefaultTypeInternal _GraphProto_default_instance_; +class IntIntListEntryProto; +struct IntIntListEntryProtoDefaultTypeInternal; +extern IntIntListEntryProtoDefaultTypeInternal _IntIntListEntryProto_default_instance_; class ModelProto; struct ModelProtoDefaultTypeInternal; extern ModelProtoDefaultTypeInternal _ModelProto_default_instance_; +class NodeDeviceConfigurationProto; +struct NodeDeviceConfigurationProtoDefaultTypeInternal; +extern NodeDeviceConfigurationProtoDefaultTypeInternal _NodeDeviceConfigurationProto_default_instance_; class NodeProto; struct NodeProtoDefaultTypeInternal; extern NodeProtoDefaultTypeInternal _NodeProto_default_instance_; class OperatorSetIdProto; struct OperatorSetIdProtoDefaultTypeInternal; extern OperatorSetIdProtoDefaultTypeInternal _OperatorSetIdProto_default_instance_; +class ShardedDimProto; +struct ShardedDimProtoDefaultTypeInternal; +extern ShardedDimProtoDefaultTypeInternal _ShardedDimProto_default_instance_; +class ShardingSpecProto; +struct ShardingSpecProtoDefaultTypeInternal; +extern ShardingSpecProtoDefaultTypeInternal _ShardingSpecProto_default_instance_; +class SimpleShardedDimProto; +struct SimpleShardedDimProtoDefaultTypeInternal; +extern SimpleShardedDimProtoDefaultTypeInternal _SimpleShardedDimProto_default_instance_; +class SparseTensorProto; +struct SparseTensorProtoDefaultTypeInternal; +extern SparseTensorProtoDefaultTypeInternal _SparseTensorProto_default_instance_; class StringStringEntryProto; struct StringStringEntryProtoDefaultTypeInternal; extern StringStringEntryProtoDefaultTypeInternal _StringStringEntryProto_default_instance_; +class TensorAnnotation; +struct TensorAnnotationDefaultTypeInternal; +extern TensorAnnotationDefaultTypeInternal _TensorAnnotation_default_instance_; class TensorProto; struct TensorProtoDefaultTypeInternal; extern TensorProtoDefaultTypeInternal _TensorProto_default_instance_; @@ -85,9 +109,24 @@ extern TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_; class TensorShapeProto_Dimension; struct TensorShapeProto_DimensionDefaultTypeInternal; extern TensorShapeProto_DimensionDefaultTypeInternal _TensorShapeProto_Dimension_default_instance_; +class TrainingInfoProto; +struct TrainingInfoProtoDefaultTypeInternal; +extern TrainingInfoProtoDefaultTypeInternal _TrainingInfoProto_default_instance_; class TypeProto; struct TypeProtoDefaultTypeInternal; extern TypeProtoDefaultTypeInternal _TypeProto_default_instance_; +class TypeProto_Map; +struct TypeProto_MapDefaultTypeInternal; +extern TypeProto_MapDefaultTypeInternal _TypeProto_Map_default_instance_; +class TypeProto_Optional; +struct TypeProto_OptionalDefaultTypeInternal; +extern TypeProto_OptionalDefaultTypeInternal _TypeProto_Optional_default_instance_; +class TypeProto_Sequence; +struct TypeProto_SequenceDefaultTypeInternal; +extern TypeProto_SequenceDefaultTypeInternal _TypeProto_Sequence_default_instance_; +class TypeProto_SparseTensor; +struct TypeProto_SparseTensorDefaultTypeInternal; +extern TypeProto_SparseTensorDefaultTypeInternal _TypeProto_SparseTensor_default_instance_; class TypeProto_Tensor; struct TypeProto_TensorDefaultTypeInternal; extern TypeProto_TensorDefaultTypeInternal _TypeProto_Tensor_default_instance_; @@ -97,16 +136,30 @@ extern ValueInfoProtoDefaultTypeInternal _ValueInfoProto_default_instance_; } // namespace opencv_onnx PROTOBUF_NAMESPACE_OPEN template<> ::opencv_onnx::AttributeProto* Arena::CreateMaybeMessage<::opencv_onnx::AttributeProto>(Arena*); +template<> ::opencv_onnx::DeviceConfigurationProto* Arena::CreateMaybeMessage<::opencv_onnx::DeviceConfigurationProto>(Arena*); +template<> ::opencv_onnx::FunctionProto* Arena::CreateMaybeMessage<::opencv_onnx::FunctionProto>(Arena*); template<> ::opencv_onnx::GraphProto* Arena::CreateMaybeMessage<::opencv_onnx::GraphProto>(Arena*); +template<> ::opencv_onnx::IntIntListEntryProto* Arena::CreateMaybeMessage<::opencv_onnx::IntIntListEntryProto>(Arena*); template<> ::opencv_onnx::ModelProto* Arena::CreateMaybeMessage<::opencv_onnx::ModelProto>(Arena*); +template<> ::opencv_onnx::NodeDeviceConfigurationProto* Arena::CreateMaybeMessage<::opencv_onnx::NodeDeviceConfigurationProto>(Arena*); template<> ::opencv_onnx::NodeProto* Arena::CreateMaybeMessage<::opencv_onnx::NodeProto>(Arena*); template<> ::opencv_onnx::OperatorSetIdProto* Arena::CreateMaybeMessage<::opencv_onnx::OperatorSetIdProto>(Arena*); +template<> ::opencv_onnx::ShardedDimProto* Arena::CreateMaybeMessage<::opencv_onnx::ShardedDimProto>(Arena*); +template<> ::opencv_onnx::ShardingSpecProto* Arena::CreateMaybeMessage<::opencv_onnx::ShardingSpecProto>(Arena*); +template<> ::opencv_onnx::SimpleShardedDimProto* Arena::CreateMaybeMessage<::opencv_onnx::SimpleShardedDimProto>(Arena*); +template<> ::opencv_onnx::SparseTensorProto* Arena::CreateMaybeMessage<::opencv_onnx::SparseTensorProto>(Arena*); template<> ::opencv_onnx::StringStringEntryProto* Arena::CreateMaybeMessage<::opencv_onnx::StringStringEntryProto>(Arena*); +template<> ::opencv_onnx::TensorAnnotation* Arena::CreateMaybeMessage<::opencv_onnx::TensorAnnotation>(Arena*); template<> ::opencv_onnx::TensorProto* Arena::CreateMaybeMessage<::opencv_onnx::TensorProto>(Arena*); template<> ::opencv_onnx::TensorProto_Segment* Arena::CreateMaybeMessage<::opencv_onnx::TensorProto_Segment>(Arena*); template<> ::opencv_onnx::TensorShapeProto* Arena::CreateMaybeMessage<::opencv_onnx::TensorShapeProto>(Arena*); template<> ::opencv_onnx::TensorShapeProto_Dimension* Arena::CreateMaybeMessage<::opencv_onnx::TensorShapeProto_Dimension>(Arena*); +template<> ::opencv_onnx::TrainingInfoProto* Arena::CreateMaybeMessage<::opencv_onnx::TrainingInfoProto>(Arena*); template<> ::opencv_onnx::TypeProto* Arena::CreateMaybeMessage<::opencv_onnx::TypeProto>(Arena*); +template<> ::opencv_onnx::TypeProto_Map* Arena::CreateMaybeMessage<::opencv_onnx::TypeProto_Map>(Arena*); +template<> ::opencv_onnx::TypeProto_Optional* Arena::CreateMaybeMessage<::opencv_onnx::TypeProto_Optional>(Arena*); +template<> ::opencv_onnx::TypeProto_Sequence* Arena::CreateMaybeMessage<::opencv_onnx::TypeProto_Sequence>(Arena*); +template<> ::opencv_onnx::TypeProto_SparseTensor* Arena::CreateMaybeMessage<::opencv_onnx::TypeProto_SparseTensor>(Arena*); template<> ::opencv_onnx::TypeProto_Tensor* Arena::CreateMaybeMessage<::opencv_onnx::TypeProto_Tensor>(Arena*); template<> ::opencv_onnx::ValueInfoProto* Arena::CreateMaybeMessage<::opencv_onnx::ValueInfoProto>(Arena*); PROTOBUF_NAMESPACE_CLOSE @@ -119,31 +172,31 @@ enum AttributeProto_AttributeType : int { AttributeProto_AttributeType_STRING = 3, AttributeProto_AttributeType_TENSOR = 4, AttributeProto_AttributeType_GRAPH = 5, + AttributeProto_AttributeType_SPARSE_TENSOR = 11, + AttributeProto_AttributeType_TYPE_PROTO = 13, AttributeProto_AttributeType_FLOATS = 6, AttributeProto_AttributeType_INTS = 7, AttributeProto_AttributeType_STRINGS = 8, AttributeProto_AttributeType_TENSORS = 9, - AttributeProto_AttributeType_GRAPHS = 10 + AttributeProto_AttributeType_GRAPHS = 10, + AttributeProto_AttributeType_SPARSE_TENSORS = 12, + AttributeProto_AttributeType_TYPE_PROTOS = 14 }; bool AttributeProto_AttributeType_IsValid(int value); constexpr AttributeProto_AttributeType AttributeProto_AttributeType_AttributeType_MIN = AttributeProto_AttributeType_UNDEFINED; -constexpr AttributeProto_AttributeType AttributeProto_AttributeType_AttributeType_MAX = AttributeProto_AttributeType_GRAPHS; +constexpr AttributeProto_AttributeType AttributeProto_AttributeType_AttributeType_MAX = AttributeProto_AttributeType_TYPE_PROTOS; constexpr int AttributeProto_AttributeType_AttributeType_ARRAYSIZE = AttributeProto_AttributeType_AttributeType_MAX + 1; -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AttributeProto_AttributeType_descriptor(); +const std::string& AttributeProto_AttributeType_Name(AttributeProto_AttributeType value); template inline const std::string& AttributeProto_AttributeType_Name(T enum_t_value) { static_assert(::std::is_same::value || ::std::is_integral::value, "Incorrect type passed to function AttributeProto_AttributeType_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - AttributeProto_AttributeType_descriptor(), enum_t_value); -} -inline bool AttributeProto_AttributeType_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AttributeProto_AttributeType* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - AttributeProto_AttributeType_descriptor(), name, value); + return AttributeProto_AttributeType_Name(static_cast(enum_t_value)); } +bool AttributeProto_AttributeType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, AttributeProto_AttributeType* value); enum TensorProto_DataType : int { TensorProto_DataType_UNDEFINED = 0, TensorProto_DataType_FLOAT = 1, @@ -160,56 +213,102 @@ enum TensorProto_DataType : int { TensorProto_DataType_UINT32 = 12, TensorProto_DataType_UINT64 = 13, TensorProto_DataType_COMPLEX64 = 14, - TensorProto_DataType_COMPLEX128 = 15 + TensorProto_DataType_COMPLEX128 = 15, + TensorProto_DataType_BFLOAT16 = 16, + TensorProto_DataType_FLOAT8E4M3FN = 17, + TensorProto_DataType_FLOAT8E4M3FNUZ = 18, + TensorProto_DataType_FLOAT8E5M2 = 19, + TensorProto_DataType_FLOAT8E5M2FNUZ = 20, + TensorProto_DataType_UINT4 = 21, + TensorProto_DataType_INT4 = 22, + TensorProto_DataType_FLOAT4E2M1 = 23 }; bool TensorProto_DataType_IsValid(int value); constexpr TensorProto_DataType TensorProto_DataType_DataType_MIN = TensorProto_DataType_UNDEFINED; -constexpr TensorProto_DataType TensorProto_DataType_DataType_MAX = TensorProto_DataType_COMPLEX128; +constexpr TensorProto_DataType TensorProto_DataType_DataType_MAX = TensorProto_DataType_FLOAT4E2M1; constexpr int TensorProto_DataType_DataType_ARRAYSIZE = TensorProto_DataType_DataType_MAX + 1; -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TensorProto_DataType_descriptor(); +const std::string& TensorProto_DataType_Name(TensorProto_DataType value); template inline const std::string& TensorProto_DataType_Name(T enum_t_value) { static_assert(::std::is_same::value || ::std::is_integral::value, "Incorrect type passed to function TensorProto_DataType_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - TensorProto_DataType_descriptor(), enum_t_value); + return TensorProto_DataType_Name(static_cast(enum_t_value)); } -inline bool TensorProto_DataType_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TensorProto_DataType* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - TensorProto_DataType_descriptor(), name, value); +bool TensorProto_DataType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TensorProto_DataType* value); +enum TensorProto_DataLocation : int { + TensorProto_DataLocation_DEFAULT = 0, + TensorProto_DataLocation_EXTERNAL = 1 +}; +bool TensorProto_DataLocation_IsValid(int value); +constexpr TensorProto_DataLocation TensorProto_DataLocation_DataLocation_MIN = TensorProto_DataLocation_DEFAULT; +constexpr TensorProto_DataLocation TensorProto_DataLocation_DataLocation_MAX = TensorProto_DataLocation_EXTERNAL; +constexpr int TensorProto_DataLocation_DataLocation_ARRAYSIZE = TensorProto_DataLocation_DataLocation_MAX + 1; + +const std::string& TensorProto_DataLocation_Name(TensorProto_DataLocation value); +template +inline const std::string& TensorProto_DataLocation_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TensorProto_DataLocation_Name."); + return TensorProto_DataLocation_Name(static_cast(enum_t_value)); } +bool TensorProto_DataLocation_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TensorProto_DataLocation* value); enum Version : int { _START_VERSION = 0, IR_VERSION_2017_10_10 = 1, IR_VERSION_2017_10_30 = 2, - IR_VERSION = 3 + IR_VERSION_2017_11_3 = 3, + IR_VERSION_2019_1_22 = 4, + IR_VERSION_2019_3_18 = 5, + IR_VERSION_2019_9_19 = 6, + IR_VERSION_2020_5_8 = 7, + IR_VERSION_2021_7_30 = 8, + IR_VERSION_2023_5_5 = 9, + IR_VERSION_2024_3_25 = 10, + IR_VERSION = 11 }; bool Version_IsValid(int value); constexpr Version Version_MIN = _START_VERSION; constexpr Version Version_MAX = IR_VERSION; constexpr int Version_ARRAYSIZE = Version_MAX + 1; -const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Version_descriptor(); +const std::string& Version_Name(Version value); template inline const std::string& Version_Name(T enum_t_value) { static_assert(::std::is_same::value || ::std::is_integral::value, "Incorrect type passed to function Version_Name."); - return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( - Version_descriptor(), enum_t_value); + return Version_Name(static_cast(enum_t_value)); } -inline bool Version_Parse( - ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Version* value) { - return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( - Version_descriptor(), name, value); +bool Version_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Version* value); +enum OperatorStatus : int { + EXPERIMENTAL = 0, + STABLE = 1 +}; +bool OperatorStatus_IsValid(int value); +constexpr OperatorStatus OperatorStatus_MIN = EXPERIMENTAL; +constexpr OperatorStatus OperatorStatus_MAX = STABLE; +constexpr int OperatorStatus_ARRAYSIZE = OperatorStatus_MAX + 1; + +const std::string& OperatorStatus_Name(OperatorStatus value); +template +inline const std::string& OperatorStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function OperatorStatus_Name."); + return OperatorStatus_Name(static_cast(enum_t_value)); } +bool OperatorStatus_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OperatorStatus* value); // =================================================================== class AttributeProto final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.AttributeProto) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.AttributeProto) */ { public: inline AttributeProto() : AttributeProto(nullptr) {} ~AttributeProto() override; @@ -239,22 +338,13 @@ class AttributeProto final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const AttributeProto& default_instance() { return *internal_default_instance(); } @@ -292,13 +382,9 @@ class AttributeProto final : AttributeProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const AttributeProto& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const AttributeProto& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -311,7 +397,7 @@ class AttributeProto final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(AttributeProto* other); private: @@ -327,10 +413,7 @@ class AttributeProto final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- @@ -347,6 +430,10 @@ class AttributeProto final : AttributeProto_AttributeType_TENSOR; static constexpr AttributeType GRAPH = AttributeProto_AttributeType_GRAPH; + static constexpr AttributeType SPARSE_TENSOR = + AttributeProto_AttributeType_SPARSE_TENSOR; + static constexpr AttributeType TYPE_PROTO = + AttributeProto_AttributeType_TYPE_PROTO; static constexpr AttributeType FLOATS = AttributeProto_AttributeType_FLOATS; static constexpr AttributeType INTS = @@ -357,6 +444,10 @@ class AttributeProto final : AttributeProto_AttributeType_TENSORS; static constexpr AttributeType GRAPHS = AttributeProto_AttributeType_GRAPHS; + static constexpr AttributeType SPARSE_TENSORS = + AttributeProto_AttributeType_SPARSE_TENSORS; + static constexpr AttributeType TYPE_PROTOS = + AttributeProto_AttributeType_TYPE_PROTOS; static inline bool AttributeType_IsValid(int value) { return AttributeProto_AttributeType_IsValid(value); } @@ -366,10 +457,6 @@ class AttributeProto final : AttributeProto_AttributeType_AttributeType_MAX; static constexpr int AttributeType_ARRAYSIZE = AttributeProto_AttributeType_AttributeType_ARRAYSIZE; - static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* - AttributeType_descriptor() { - return AttributeProto_AttributeType_descriptor(); - } template static inline const std::string& AttributeType_Name(T enum_t_value) { static_assert(::std::is_same::value || @@ -390,12 +477,16 @@ class AttributeProto final : kStringsFieldNumber = 9, kTensorsFieldNumber = 10, kGraphsFieldNumber = 11, + kTypeProtosFieldNumber = 15, + kSparseTensorsFieldNumber = 23, kNameFieldNumber = 1, kSFieldNumber = 4, kDocStringFieldNumber = 13, kRefAttrNameFieldNumber = 21, kTFieldNumber = 5, kGFieldNumber = 6, + kTpFieldNumber = 14, + kSparseTensorFieldNumber = 22, kIFieldNumber = 3, kFFieldNumber = 2, kTypeFieldNumber = 20, @@ -504,6 +595,42 @@ class AttributeProto final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::GraphProto >& graphs() const; + // repeated .opencv_onnx.TypeProto type_protos = 15; + int type_protos_size() const; + private: + int _internal_type_protos_size() const; + public: + void clear_type_protos(); + ::opencv_onnx::TypeProto* mutable_type_protos(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TypeProto >* + mutable_type_protos(); + private: + const ::opencv_onnx::TypeProto& _internal_type_protos(int index) const; + ::opencv_onnx::TypeProto* _internal_add_type_protos(); + public: + const ::opencv_onnx::TypeProto& type_protos(int index) const; + ::opencv_onnx::TypeProto* add_type_protos(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TypeProto >& + type_protos() const; + + // repeated .opencv_onnx.SparseTensorProto sparse_tensors = 23; + int sparse_tensors_size() const; + private: + int _internal_sparse_tensors_size() const; + public: + void clear_sparse_tensors(); + ::opencv_onnx::SparseTensorProto* mutable_sparse_tensors(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SparseTensorProto >* + mutable_sparse_tensors(); + private: + const ::opencv_onnx::SparseTensorProto& _internal_sparse_tensors(int index) const; + ::opencv_onnx::SparseTensorProto* _internal_add_sparse_tensors(); + public: + const ::opencv_onnx::SparseTensorProto& sparse_tensors(int index) const; + ::opencv_onnx::SparseTensorProto* add_sparse_tensors(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SparseTensorProto >& + sparse_tensors() const; + // optional string name = 1; bool has_name() const; private: @@ -612,6 +739,42 @@ class AttributeProto final : ::opencv_onnx::GraphProto* g); ::opencv_onnx::GraphProto* unsafe_arena_release_g(); + // optional .opencv_onnx.TypeProto tp = 14; + bool has_tp() const; + private: + bool _internal_has_tp() const; + public: + void clear_tp(); + const ::opencv_onnx::TypeProto& tp() const; + PROTOBUF_NODISCARD ::opencv_onnx::TypeProto* release_tp(); + ::opencv_onnx::TypeProto* mutable_tp(); + void set_allocated_tp(::opencv_onnx::TypeProto* tp); + private: + const ::opencv_onnx::TypeProto& _internal_tp() const; + ::opencv_onnx::TypeProto* _internal_mutable_tp(); + public: + void unsafe_arena_set_allocated_tp( + ::opencv_onnx::TypeProto* tp); + ::opencv_onnx::TypeProto* unsafe_arena_release_tp(); + + // optional .opencv_onnx.SparseTensorProto sparse_tensor = 22; + bool has_sparse_tensor() const; + private: + bool _internal_has_sparse_tensor() const; + public: + void clear_sparse_tensor(); + const ::opencv_onnx::SparseTensorProto& sparse_tensor() const; + PROTOBUF_NODISCARD ::opencv_onnx::SparseTensorProto* release_sparse_tensor(); + ::opencv_onnx::SparseTensorProto* mutable_sparse_tensor(); + void set_allocated_sparse_tensor(::opencv_onnx::SparseTensorProto* sparse_tensor); + private: + const ::opencv_onnx::SparseTensorProto& _internal_sparse_tensor() const; + ::opencv_onnx::SparseTensorProto* _internal_mutable_sparse_tensor(); + public: + void unsafe_arena_set_allocated_sparse_tensor( + ::opencv_onnx::SparseTensorProto* sparse_tensor); + ::opencv_onnx::SparseTensorProto* unsafe_arena_release_sparse_tensor(); + // optional int64 i = 3; bool has_i() const; private: @@ -665,12 +828,16 @@ class AttributeProto final : ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField strings_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TensorProto > tensors_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::GraphProto > graphs_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TypeProto > type_protos_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SparseTensorProto > sparse_tensors_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr s_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr doc_string_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr ref_attr_name_; ::opencv_onnx::TensorProto* t_; ::opencv_onnx::GraphProto* g_; + ::opencv_onnx::TypeProto* tp_; + ::opencv_onnx::SparseTensorProto* sparse_tensor_; int64_t i_; float f_; int type_; @@ -679,7 +846,7 @@ class AttributeProto final : // ------------------------------------------------------------------- class ValueInfoProto final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.ValueInfoProto) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.ValueInfoProto) */ { public: inline ValueInfoProto() : ValueInfoProto(nullptr) {} ~ValueInfoProto() override; @@ -709,22 +876,13 @@ class ValueInfoProto final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const ValueInfoProto& default_instance() { return *internal_default_instance(); } @@ -762,13 +920,9 @@ class ValueInfoProto final : ValueInfoProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const ValueInfoProto& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const ValueInfoProto& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -781,7 +935,7 @@ class ValueInfoProto final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(ValueInfoProto* other); private: @@ -797,20 +951,36 @@ class ValueInfoProto final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- enum : int { + kMetadataPropsFieldNumber = 4, kNameFieldNumber = 1, kDocStringFieldNumber = 3, kTypeFieldNumber = 2, }; + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 4; + int metadata_props_size() const; + private: + int _internal_metadata_props_size() const; + public: + void clear_metadata_props(); + ::opencv_onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* + mutable_metadata_props(); + private: + const ::opencv_onnx::StringStringEntryProto& _internal_metadata_props(int index) const; + ::opencv_onnx::StringStringEntryProto* _internal_add_metadata_props(); + public: + const ::opencv_onnx::StringStringEntryProto& metadata_props(int index) const; + ::opencv_onnx::StringStringEntryProto* add_metadata_props(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& + metadata_props() const; + // optional string name = 1; bool has_name() const; private: @@ -874,6 +1044,7 @@ class ValueInfoProto final : typedef void DestructorSkippable_; ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto > metadata_props_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr doc_string_; ::opencv_onnx::TypeProto* type_; @@ -882,7 +1053,7 @@ class ValueInfoProto final : // ------------------------------------------------------------------- class NodeProto final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.NodeProto) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.NodeProto) */ { public: inline NodeProto() : NodeProto(nullptr) {} ~NodeProto() override; @@ -912,22 +1083,13 @@ class NodeProto final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const NodeProto& default_instance() { return *internal_default_instance(); } @@ -965,13 +1127,9 @@ class NodeProto final : NodeProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const NodeProto& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const NodeProto& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -984,7 +1142,7 @@ class NodeProto final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(NodeProto* other); private: @@ -1000,10 +1158,7 @@ class NodeProto final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- @@ -1013,10 +1168,13 @@ class NodeProto final : kInputFieldNumber = 1, kOutputFieldNumber = 2, kAttributeFieldNumber = 5, + kMetadataPropsFieldNumber = 9, + kDeviceConfigurationsFieldNumber = 10, kNameFieldNumber = 3, kOpTypeFieldNumber = 4, kDocStringFieldNumber = 6, kDomainFieldNumber = 7, + kOverloadFieldNumber = 8, }; // repeated string input = 1; int input_size() const; @@ -1084,6 +1242,42 @@ class NodeProto final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::AttributeProto >& attribute() const; + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 9; + int metadata_props_size() const; + private: + int _internal_metadata_props_size() const; + public: + void clear_metadata_props(); + ::opencv_onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* + mutable_metadata_props(); + private: + const ::opencv_onnx::StringStringEntryProto& _internal_metadata_props(int index) const; + ::opencv_onnx::StringStringEntryProto* _internal_add_metadata_props(); + public: + const ::opencv_onnx::StringStringEntryProto& metadata_props(int index) const; + ::opencv_onnx::StringStringEntryProto* add_metadata_props(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& + metadata_props() const; + + // repeated .opencv_onnx.NodeDeviceConfigurationProto device_configurations = 10; + int device_configurations_size() const; + private: + int _internal_device_configurations_size() const; + public: + void clear_device_configurations(); + ::opencv_onnx::NodeDeviceConfigurationProto* mutable_device_configurations(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::NodeDeviceConfigurationProto >* + mutable_device_configurations(); + private: + const ::opencv_onnx::NodeDeviceConfigurationProto& _internal_device_configurations(int index) const; + ::opencv_onnx::NodeDeviceConfigurationProto* _internal_add_device_configurations(); + public: + const ::opencv_onnx::NodeDeviceConfigurationProto& device_configurations(int index) const; + ::opencv_onnx::NodeDeviceConfigurationProto* add_device_configurations(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::NodeDeviceConfigurationProto >& + device_configurations() const; + // optional string name = 3; bool has_name() const; private: @@ -1156,6 +1350,24 @@ class NodeProto final : std::string* _internal_mutable_domain(); public: + // optional string overload = 8; + bool has_overload() const; + private: + bool _internal_has_overload() const; + public: + void clear_overload(); + const std::string& overload() const; + template + void set_overload(ArgT0&& arg0, ArgT... args); + std::string* mutable_overload(); + PROTOBUF_NODISCARD std::string* release_overload(); + void set_allocated_overload(std::string* overload); + private: + const std::string& _internal_overload() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_overload(const std::string& value); + std::string* _internal_mutable_overload(); + public: + // @@protoc_insertion_point(class_scope:opencv_onnx.NodeProto) private: class _Internal; @@ -1168,16 +1380,1143 @@ class NodeProto final : ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField input_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField output_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::AttributeProto > attribute_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto > metadata_props_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::NodeDeviceConfigurationProto > device_configurations_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr op_type_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr doc_string_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr domain_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr overload_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + +class IntIntListEntryProto final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.IntIntListEntryProto) */ { + public: + inline IntIntListEntryProto() : IntIntListEntryProto(nullptr) {} + ~IntIntListEntryProto() override; + explicit constexpr IntIntListEntryProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + IntIntListEntryProto(const IntIntListEntryProto& from); + IntIntListEntryProto(IntIntListEntryProto&& from) noexcept + : IntIntListEntryProto() { + *this = ::std::move(from); + } + + inline IntIntListEntryProto& operator=(const IntIntListEntryProto& from) { + CopyFrom(from); + return *this; + } + inline IntIntListEntryProto& operator=(IntIntListEntryProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const IntIntListEntryProto& default_instance() { + return *internal_default_instance(); + } + static inline const IntIntListEntryProto* internal_default_instance() { + return reinterpret_cast( + &_IntIntListEntryProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(IntIntListEntryProto& a, IntIntListEntryProto& b) { + a.Swap(&b); + } + inline void Swap(IntIntListEntryProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(IntIntListEntryProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + IntIntListEntryProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const IntIntListEntryProto& from); + void MergeFrom(const IntIntListEntryProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(IntIntListEntryProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.IntIntListEntryProto"; + } + protected: + explicit IntIntListEntryProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValueFieldNumber = 2, + kKeyFieldNumber = 1, + }; + // repeated int64 value = 2; + int value_size() const; + private: + int _internal_value_size() const; + public: + void clear_value(); + private: + int64_t _internal_value(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_value() const; + void _internal_add_value(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_value(); + public: + int64_t value(int index) const; + void set_value(int index, int64_t value); + void add_value(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + value() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_value(); + + // optional int64 key = 1; + bool has_key() const; + private: + bool _internal_has_key() const; + public: + void clear_key(); + int64_t key() const; + void set_key(int64_t value); + private: + int64_t _internal_key() const; + void _internal_set_key(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:opencv_onnx.IntIntListEntryProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > value_; + int64_t key_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + +class NodeDeviceConfigurationProto final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.NodeDeviceConfigurationProto) */ { + public: + inline NodeDeviceConfigurationProto() : NodeDeviceConfigurationProto(nullptr) {} + ~NodeDeviceConfigurationProto() override; + explicit constexpr NodeDeviceConfigurationProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + NodeDeviceConfigurationProto(const NodeDeviceConfigurationProto& from); + NodeDeviceConfigurationProto(NodeDeviceConfigurationProto&& from) noexcept + : NodeDeviceConfigurationProto() { + *this = ::std::move(from); + } + + inline NodeDeviceConfigurationProto& operator=(const NodeDeviceConfigurationProto& from) { + CopyFrom(from); + return *this; + } + inline NodeDeviceConfigurationProto& operator=(NodeDeviceConfigurationProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const NodeDeviceConfigurationProto& default_instance() { + return *internal_default_instance(); + } + static inline const NodeDeviceConfigurationProto* internal_default_instance() { + return reinterpret_cast( + &_NodeDeviceConfigurationProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(NodeDeviceConfigurationProto& a, NodeDeviceConfigurationProto& b) { + a.Swap(&b); + } + inline void Swap(NodeDeviceConfigurationProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(NodeDeviceConfigurationProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + NodeDeviceConfigurationProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const NodeDeviceConfigurationProto& from); + void MergeFrom(const NodeDeviceConfigurationProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(NodeDeviceConfigurationProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.NodeDeviceConfigurationProto"; + } + protected: + explicit NodeDeviceConfigurationProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kShardingSpecFieldNumber = 2, + kConfigurationIdFieldNumber = 1, + kPipelineStageFieldNumber = 3, + }; + // repeated .opencv_onnx.ShardingSpecProto sharding_spec = 2; + int sharding_spec_size() const; + private: + int _internal_sharding_spec_size() const; + public: + void clear_sharding_spec(); + ::opencv_onnx::ShardingSpecProto* mutable_sharding_spec(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ShardingSpecProto >* + mutable_sharding_spec(); + private: + const ::opencv_onnx::ShardingSpecProto& _internal_sharding_spec(int index) const; + ::opencv_onnx::ShardingSpecProto* _internal_add_sharding_spec(); + public: + const ::opencv_onnx::ShardingSpecProto& sharding_spec(int index) const; + ::opencv_onnx::ShardingSpecProto* add_sharding_spec(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ShardingSpecProto >& + sharding_spec() const; + + // optional string configuration_id = 1; + bool has_configuration_id() const; + private: + bool _internal_has_configuration_id() const; + public: + void clear_configuration_id(); + const std::string& configuration_id() const; + template + void set_configuration_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_configuration_id(); + PROTOBUF_NODISCARD std::string* release_configuration_id(); + void set_allocated_configuration_id(std::string* configuration_id); + private: + const std::string& _internal_configuration_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_configuration_id(const std::string& value); + std::string* _internal_mutable_configuration_id(); + public: + + // optional int32 pipeline_stage = 3; + bool has_pipeline_stage() const; + private: + bool _internal_has_pipeline_stage() const; + public: + void clear_pipeline_stage(); + int32_t pipeline_stage() const; + void set_pipeline_stage(int32_t value); + private: + int32_t _internal_pipeline_stage() const; + void _internal_set_pipeline_stage(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:opencv_onnx.NodeDeviceConfigurationProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ShardingSpecProto > sharding_spec_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr configuration_id_; + int32_t pipeline_stage_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + +class ShardingSpecProto final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.ShardingSpecProto) */ { + public: + inline ShardingSpecProto() : ShardingSpecProto(nullptr) {} + ~ShardingSpecProto() override; + explicit constexpr ShardingSpecProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ShardingSpecProto(const ShardingSpecProto& from); + ShardingSpecProto(ShardingSpecProto&& from) noexcept + : ShardingSpecProto() { + *this = ::std::move(from); + } + + inline ShardingSpecProto& operator=(const ShardingSpecProto& from) { + CopyFrom(from); + return *this; + } + inline ShardingSpecProto& operator=(ShardingSpecProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ShardingSpecProto& default_instance() { + return *internal_default_instance(); + } + static inline const ShardingSpecProto* internal_default_instance() { + return reinterpret_cast( + &_ShardingSpecProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(ShardingSpecProto& a, ShardingSpecProto& b) { + a.Swap(&b); + } + inline void Swap(ShardingSpecProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ShardingSpecProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ShardingSpecProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ShardingSpecProto& from); + void MergeFrom(const ShardingSpecProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ShardingSpecProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.ShardingSpecProto"; + } + protected: + explicit ShardingSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceFieldNumber = 2, + kIndexToDeviceGroupMapFieldNumber = 3, + kShardedDimFieldNumber = 4, + kTensorNameFieldNumber = 1, + }; + // repeated int64 device = 2; + int device_size() const; + private: + int _internal_device_size() const; + public: + void clear_device(); + private: + int64_t _internal_device(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_device() const; + void _internal_add_device(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_device(); + public: + int64_t device(int index) const; + void set_device(int index, int64_t value); + void add_device(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + device() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_device(); + + // repeated .opencv_onnx.IntIntListEntryProto index_to_device_group_map = 3; + int index_to_device_group_map_size() const; + private: + int _internal_index_to_device_group_map_size() const; + public: + void clear_index_to_device_group_map(); + ::opencv_onnx::IntIntListEntryProto* mutable_index_to_device_group_map(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::IntIntListEntryProto >* + mutable_index_to_device_group_map(); + private: + const ::opencv_onnx::IntIntListEntryProto& _internal_index_to_device_group_map(int index) const; + ::opencv_onnx::IntIntListEntryProto* _internal_add_index_to_device_group_map(); + public: + const ::opencv_onnx::IntIntListEntryProto& index_to_device_group_map(int index) const; + ::opencv_onnx::IntIntListEntryProto* add_index_to_device_group_map(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::IntIntListEntryProto >& + index_to_device_group_map() const; + + // repeated .opencv_onnx.ShardedDimProto sharded_dim = 4; + int sharded_dim_size() const; + private: + int _internal_sharded_dim_size() const; + public: + void clear_sharded_dim(); + ::opencv_onnx::ShardedDimProto* mutable_sharded_dim(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ShardedDimProto >* + mutable_sharded_dim(); + private: + const ::opencv_onnx::ShardedDimProto& _internal_sharded_dim(int index) const; + ::opencv_onnx::ShardedDimProto* _internal_add_sharded_dim(); + public: + const ::opencv_onnx::ShardedDimProto& sharded_dim(int index) const; + ::opencv_onnx::ShardedDimProto* add_sharded_dim(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ShardedDimProto >& + sharded_dim() const; + + // optional string tensor_name = 1; + bool has_tensor_name() const; + private: + bool _internal_has_tensor_name() const; + public: + void clear_tensor_name(); + const std::string& tensor_name() const; + template + void set_tensor_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_tensor_name(); + PROTOBUF_NODISCARD std::string* release_tensor_name(); + void set_allocated_tensor_name(std::string* tensor_name); + private: + const std::string& _internal_tensor_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tensor_name(const std::string& value); + std::string* _internal_mutable_tensor_name(); + public: + + // @@protoc_insertion_point(class_scope:opencv_onnx.ShardingSpecProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > device_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::IntIntListEntryProto > index_to_device_group_map_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ShardedDimProto > sharded_dim_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tensor_name_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + +class ShardedDimProto final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.ShardedDimProto) */ { + public: + inline ShardedDimProto() : ShardedDimProto(nullptr) {} + ~ShardedDimProto() override; + explicit constexpr ShardedDimProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ShardedDimProto(const ShardedDimProto& from); + ShardedDimProto(ShardedDimProto&& from) noexcept + : ShardedDimProto() { + *this = ::std::move(from); + } + + inline ShardedDimProto& operator=(const ShardedDimProto& from) { + CopyFrom(from); + return *this; + } + inline ShardedDimProto& operator=(ShardedDimProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const ShardedDimProto& default_instance() { + return *internal_default_instance(); + } + static inline const ShardedDimProto* internal_default_instance() { + return reinterpret_cast( + &_ShardedDimProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(ShardedDimProto& a, ShardedDimProto& b) { + a.Swap(&b); + } + inline void Swap(ShardedDimProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ShardedDimProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ShardedDimProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const ShardedDimProto& from); + void MergeFrom(const ShardedDimProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ShardedDimProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.ShardedDimProto"; + } + protected: + explicit ShardedDimProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSimpleShardingFieldNumber = 2, + kAxisFieldNumber = 1, + }; + // repeated .opencv_onnx.SimpleShardedDimProto simple_sharding = 2; + int simple_sharding_size() const; + private: + int _internal_simple_sharding_size() const; + public: + void clear_simple_sharding(); + ::opencv_onnx::SimpleShardedDimProto* mutable_simple_sharding(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SimpleShardedDimProto >* + mutable_simple_sharding(); + private: + const ::opencv_onnx::SimpleShardedDimProto& _internal_simple_sharding(int index) const; + ::opencv_onnx::SimpleShardedDimProto* _internal_add_simple_sharding(); + public: + const ::opencv_onnx::SimpleShardedDimProto& simple_sharding(int index) const; + ::opencv_onnx::SimpleShardedDimProto* add_simple_sharding(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SimpleShardedDimProto >& + simple_sharding() const; + + // optional int64 axis = 1; + bool has_axis() const; + private: + bool _internal_has_axis() const; + public: + void clear_axis(); + int64_t axis() const; + void set_axis(int64_t value); + private: + int64_t _internal_axis() const; + void _internal_set_axis(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:opencv_onnx.ShardedDimProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SimpleShardedDimProto > simple_sharding_; + int64_t axis_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + +class SimpleShardedDimProto final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.SimpleShardedDimProto) */ { + public: + inline SimpleShardedDimProto() : SimpleShardedDimProto(nullptr) {} + ~SimpleShardedDimProto() override; + explicit constexpr SimpleShardedDimProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SimpleShardedDimProto(const SimpleShardedDimProto& from); + SimpleShardedDimProto(SimpleShardedDimProto&& from) noexcept + : SimpleShardedDimProto() { + *this = ::std::move(from); + } + + inline SimpleShardedDimProto& operator=(const SimpleShardedDimProto& from) { + CopyFrom(from); + return *this; + } + inline SimpleShardedDimProto& operator=(SimpleShardedDimProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SimpleShardedDimProto& default_instance() { + return *internal_default_instance(); + } + enum DimCase { + kDimValue = 1, + kDimParam = 2, + DIM_NOT_SET = 0, + }; + + static inline const SimpleShardedDimProto* internal_default_instance() { + return reinterpret_cast( + &_SimpleShardedDimProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(SimpleShardedDimProto& a, SimpleShardedDimProto& b) { + a.Swap(&b); + } + inline void Swap(SimpleShardedDimProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SimpleShardedDimProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SimpleShardedDimProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const SimpleShardedDimProto& from); + void MergeFrom(const SimpleShardedDimProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SimpleShardedDimProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.SimpleShardedDimProto"; + } + protected: + explicit SimpleShardedDimProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNumShardsFieldNumber = 3, + kDimValueFieldNumber = 1, + kDimParamFieldNumber = 2, + }; + // optional int64 num_shards = 3; + bool has_num_shards() const; + private: + bool _internal_has_num_shards() const; + public: + void clear_num_shards(); + int64_t num_shards() const; + void set_num_shards(int64_t value); + private: + int64_t _internal_num_shards() const; + void _internal_set_num_shards(int64_t value); + public: + + // int64 dim_value = 1; + bool has_dim_value() const; + private: + bool _internal_has_dim_value() const; + public: + void clear_dim_value(); + int64_t dim_value() const; + void set_dim_value(int64_t value); + private: + int64_t _internal_dim_value() const; + void _internal_set_dim_value(int64_t value); + public: + + // string dim_param = 2; + bool has_dim_param() const; + private: + bool _internal_has_dim_param() const; + public: + void clear_dim_param(); + const std::string& dim_param() const; + template + void set_dim_param(ArgT0&& arg0, ArgT... args); + std::string* mutable_dim_param(); + PROTOBUF_NODISCARD std::string* release_dim_param(); + void set_allocated_dim_param(std::string* dim_param); + private: + const std::string& _internal_dim_param() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_dim_param(const std::string& value); + std::string* _internal_mutable_dim_param(); + public: + + void clear_dim(); + DimCase dim_case() const; + // @@protoc_insertion_point(class_scope:opencv_onnx.SimpleShardedDimProto) + private: + class _Internal; + void set_has_dim_value(); + void set_has_dim_param(); + + inline bool has_dim() const; + inline void clear_has_dim(); + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int64_t num_shards_; + union DimUnion { + constexpr DimUnion() : _constinit_{} {} + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; + int64_t dim_value_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr dim_param_; + } dim_; + uint32_t _oneof_case_[1]; + + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TrainingInfoProto final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TrainingInfoProto) */ { + public: + inline TrainingInfoProto() : TrainingInfoProto(nullptr) {} + ~TrainingInfoProto() override; + explicit constexpr TrainingInfoProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TrainingInfoProto(const TrainingInfoProto& from); + TrainingInfoProto(TrainingInfoProto&& from) noexcept + : TrainingInfoProto() { + *this = ::std::move(from); + } + + inline TrainingInfoProto& operator=(const TrainingInfoProto& from) { + CopyFrom(from); + return *this; + } + inline TrainingInfoProto& operator=(TrainingInfoProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TrainingInfoProto& default_instance() { + return *internal_default_instance(); + } + static inline const TrainingInfoProto* internal_default_instance() { + return reinterpret_cast( + &_TrainingInfoProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(TrainingInfoProto& a, TrainingInfoProto& b) { + a.Swap(&b); + } + inline void Swap(TrainingInfoProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TrainingInfoProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TrainingInfoProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const TrainingInfoProto& from); + void MergeFrom(const TrainingInfoProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(TrainingInfoProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.TrainingInfoProto"; + } + protected: + explicit TrainingInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInitializationBindingFieldNumber = 3, + kUpdateBindingFieldNumber = 4, + kInitializationFieldNumber = 1, + kAlgorithmFieldNumber = 2, + }; + // repeated .opencv_onnx.StringStringEntryProto initialization_binding = 3; + int initialization_binding_size() const; + private: + int _internal_initialization_binding_size() const; + public: + void clear_initialization_binding(); + ::opencv_onnx::StringStringEntryProto* mutable_initialization_binding(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* + mutable_initialization_binding(); + private: + const ::opencv_onnx::StringStringEntryProto& _internal_initialization_binding(int index) const; + ::opencv_onnx::StringStringEntryProto* _internal_add_initialization_binding(); + public: + const ::opencv_onnx::StringStringEntryProto& initialization_binding(int index) const; + ::opencv_onnx::StringStringEntryProto* add_initialization_binding(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& + initialization_binding() const; + + // repeated .opencv_onnx.StringStringEntryProto update_binding = 4; + int update_binding_size() const; + private: + int _internal_update_binding_size() const; + public: + void clear_update_binding(); + ::opencv_onnx::StringStringEntryProto* mutable_update_binding(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* + mutable_update_binding(); + private: + const ::opencv_onnx::StringStringEntryProto& _internal_update_binding(int index) const; + ::opencv_onnx::StringStringEntryProto* _internal_add_update_binding(); + public: + const ::opencv_onnx::StringStringEntryProto& update_binding(int index) const; + ::opencv_onnx::StringStringEntryProto* add_update_binding(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& + update_binding() const; + + // optional .opencv_onnx.GraphProto initialization = 1; + bool has_initialization() const; + private: + bool _internal_has_initialization() const; + public: + void clear_initialization(); + const ::opencv_onnx::GraphProto& initialization() const; + PROTOBUF_NODISCARD ::opencv_onnx::GraphProto* release_initialization(); + ::opencv_onnx::GraphProto* mutable_initialization(); + void set_allocated_initialization(::opencv_onnx::GraphProto* initialization); + private: + const ::opencv_onnx::GraphProto& _internal_initialization() const; + ::opencv_onnx::GraphProto* _internal_mutable_initialization(); + public: + void unsafe_arena_set_allocated_initialization( + ::opencv_onnx::GraphProto* initialization); + ::opencv_onnx::GraphProto* unsafe_arena_release_initialization(); + + // optional .opencv_onnx.GraphProto algorithm = 2; + bool has_algorithm() const; + private: + bool _internal_has_algorithm() const; + public: + void clear_algorithm(); + const ::opencv_onnx::GraphProto& algorithm() const; + PROTOBUF_NODISCARD ::opencv_onnx::GraphProto* release_algorithm(); + ::opencv_onnx::GraphProto* mutable_algorithm(); + void set_allocated_algorithm(::opencv_onnx::GraphProto* algorithm); + private: + const ::opencv_onnx::GraphProto& _internal_algorithm() const; + ::opencv_onnx::GraphProto* _internal_mutable_algorithm(); + public: + void unsafe_arena_set_allocated_algorithm( + ::opencv_onnx::GraphProto* algorithm); + ::opencv_onnx::GraphProto* unsafe_arena_release_algorithm(); + + // @@protoc_insertion_point(class_scope:opencv_onnx.TrainingInfoProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto > initialization_binding_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto > update_binding_; + ::opencv_onnx::GraphProto* initialization_; + ::opencv_onnx::GraphProto* algorithm_; friend struct ::TableStruct_opencv_2donnx_2eproto; }; // ------------------------------------------------------------------- class ModelProto final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.ModelProto) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.ModelProto) */ { public: inline ModelProto() : ModelProto(nullptr) {} ~ModelProto() override; @@ -1207,22 +2546,13 @@ class ModelProto final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const ModelProto& default_instance() { return *internal_default_instance(); } @@ -1231,7 +2561,7 @@ class ModelProto final : &_ModelProto_default_instance_); } static constexpr int kIndexInFileMessages = - 3; + 9; friend void swap(ModelProto& a, ModelProto& b) { a.Swap(&b); @@ -1260,13 +2590,9 @@ class ModelProto final : ModelProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const ModelProto& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const ModelProto& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -1279,7 +2605,7 @@ class ModelProto final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(ModelProto* other); private: @@ -1295,10 +2621,7 @@ class ModelProto final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- @@ -1307,6 +2630,9 @@ class ModelProto final : enum : int { kOpsetImportFieldNumber = 8, kMetadataPropsFieldNumber = 14, + kTrainingInfoFieldNumber = 20, + kFunctionsFieldNumber = 25, + kConfigurationFieldNumber = 26, kProducerNameFieldNumber = 2, kProducerVersionFieldNumber = 3, kDomainFieldNumber = 4, @@ -1351,6 +2677,60 @@ class ModelProto final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& metadata_props() const; + // repeated .opencv_onnx.TrainingInfoProto training_info = 20; + int training_info_size() const; + private: + int _internal_training_info_size() const; + public: + void clear_training_info(); + ::opencv_onnx::TrainingInfoProto* mutable_training_info(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TrainingInfoProto >* + mutable_training_info(); + private: + const ::opencv_onnx::TrainingInfoProto& _internal_training_info(int index) const; + ::opencv_onnx::TrainingInfoProto* _internal_add_training_info(); + public: + const ::opencv_onnx::TrainingInfoProto& training_info(int index) const; + ::opencv_onnx::TrainingInfoProto* add_training_info(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TrainingInfoProto >& + training_info() const; + + // repeated .opencv_onnx.FunctionProto functions = 25; + int functions_size() const; + private: + int _internal_functions_size() const; + public: + void clear_functions(); + ::opencv_onnx::FunctionProto* mutable_functions(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::FunctionProto >* + mutable_functions(); + private: + const ::opencv_onnx::FunctionProto& _internal_functions(int index) const; + ::opencv_onnx::FunctionProto* _internal_add_functions(); + public: + const ::opencv_onnx::FunctionProto& functions(int index) const; + ::opencv_onnx::FunctionProto* add_functions(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::FunctionProto >& + functions() const; + + // repeated .opencv_onnx.DeviceConfigurationProto configuration = 26; + int configuration_size() const; + private: + int _internal_configuration_size() const; + public: + void clear_configuration(); + ::opencv_onnx::DeviceConfigurationProto* mutable_configuration(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::DeviceConfigurationProto >* + mutable_configuration(); + private: + const ::opencv_onnx::DeviceConfigurationProto& _internal_configuration(int index) const; + ::opencv_onnx::DeviceConfigurationProto* _internal_add_configuration(); + public: + const ::opencv_onnx::DeviceConfigurationProto& configuration(int index) const; + ::opencv_onnx::DeviceConfigurationProto* add_configuration(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::DeviceConfigurationProto >& + configuration() const; + // optional string producer_name = 2; bool has_producer_name() const; private: @@ -1478,6 +2858,9 @@ class ModelProto final : mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::OperatorSetIdProto > opset_import_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto > metadata_props_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TrainingInfoProto > training_info_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::FunctionProto > functions_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::DeviceConfigurationProto > configuration_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr producer_name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr producer_version_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr domain_; @@ -1489,8 +2872,196 @@ class ModelProto final : }; // ------------------------------------------------------------------- +class DeviceConfigurationProto final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.DeviceConfigurationProto) */ { + public: + inline DeviceConfigurationProto() : DeviceConfigurationProto(nullptr) {} + ~DeviceConfigurationProto() override; + explicit constexpr DeviceConfigurationProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + DeviceConfigurationProto(const DeviceConfigurationProto& from); + DeviceConfigurationProto(DeviceConfigurationProto&& from) noexcept + : DeviceConfigurationProto() { + *this = ::std::move(from); + } + + inline DeviceConfigurationProto& operator=(const DeviceConfigurationProto& from) { + CopyFrom(from); + return *this; + } + inline DeviceConfigurationProto& operator=(DeviceConfigurationProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const DeviceConfigurationProto& default_instance() { + return *internal_default_instance(); + } + static inline const DeviceConfigurationProto* internal_default_instance() { + return reinterpret_cast( + &_DeviceConfigurationProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(DeviceConfigurationProto& a, DeviceConfigurationProto& b) { + a.Swap(&b); + } + inline void Swap(DeviceConfigurationProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeviceConfigurationProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeviceConfigurationProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const DeviceConfigurationProto& from); + void MergeFrom(const DeviceConfigurationProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(DeviceConfigurationProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.DeviceConfigurationProto"; + } + protected: + explicit DeviceConfigurationProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceFieldNumber = 3, + kNameFieldNumber = 1, + kNumDevicesFieldNumber = 2, + }; + // repeated string device = 3; + int device_size() const; + private: + int _internal_device_size() const; + public: + void clear_device(); + const std::string& device(int index) const; + std::string* mutable_device(int index); + void set_device(int index, const std::string& value); + void set_device(int index, std::string&& value); + void set_device(int index, const char* value); + void set_device(int index, const char* value, size_t size); + std::string* add_device(); + void add_device(const std::string& value); + void add_device(std::string&& value); + void add_device(const char* value); + void add_device(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& device() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_device(); + private: + const std::string& _internal_device(int index) const; + std::string* _internal_add_device(); + public: + + // optional string name = 1; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // optional int32 num_devices = 2; + bool has_num_devices() const; + private: + bool _internal_has_num_devices() const; + public: + void clear_num_devices(); + int32_t num_devices() const; + void set_num_devices(int32_t value); + private: + int32_t _internal_num_devices() const; + void _internal_set_num_devices(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:opencv_onnx.DeviceConfigurationProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField device_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + int32_t num_devices_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + class StringStringEntryProto final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.StringStringEntryProto) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.StringStringEntryProto) */ { public: inline StringStringEntryProto() : StringStringEntryProto(nullptr) {} ~StringStringEntryProto() override; @@ -1520,22 +3091,13 @@ class StringStringEntryProto final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const StringStringEntryProto& default_instance() { return *internal_default_instance(); } @@ -1544,7 +3106,7 @@ class StringStringEntryProto final : &_StringStringEntryProto_default_instance_); } static constexpr int kIndexInFileMessages = - 4; + 11; friend void swap(StringStringEntryProto& a, StringStringEntryProto& b) { a.Swap(&b); @@ -1573,13 +3135,9 @@ class StringStringEntryProto final : StringStringEntryProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const StringStringEntryProto& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const StringStringEntryProto& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -1592,7 +3150,7 @@ class StringStringEntryProto final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(StringStringEntryProto* other); private: @@ -1608,10 +3166,7 @@ class StringStringEntryProto final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- @@ -1672,8 +3227,175 @@ class StringStringEntryProto final : }; // ------------------------------------------------------------------- +class TensorAnnotation final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorAnnotation) */ { + public: + inline TensorAnnotation() : TensorAnnotation(nullptr) {} + ~TensorAnnotation() override; + explicit constexpr TensorAnnotation(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TensorAnnotation(const TensorAnnotation& from); + TensorAnnotation(TensorAnnotation&& from) noexcept + : TensorAnnotation() { + *this = ::std::move(from); + } + + inline TensorAnnotation& operator=(const TensorAnnotation& from) { + CopyFrom(from); + return *this; + } + inline TensorAnnotation& operator=(TensorAnnotation&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TensorAnnotation& default_instance() { + return *internal_default_instance(); + } + static inline const TensorAnnotation* internal_default_instance() { + return reinterpret_cast( + &_TensorAnnotation_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(TensorAnnotation& a, TensorAnnotation& b) { + a.Swap(&b); + } + inline void Swap(TensorAnnotation* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TensorAnnotation* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TensorAnnotation* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const TensorAnnotation& from); + void MergeFrom(const TensorAnnotation& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(TensorAnnotation* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.TensorAnnotation"; + } + protected: + explicit TensorAnnotation(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kQuantParameterTensorNamesFieldNumber = 2, + kTensorNameFieldNumber = 1, + }; + // repeated .opencv_onnx.StringStringEntryProto quant_parameter_tensor_names = 2; + int quant_parameter_tensor_names_size() const; + private: + int _internal_quant_parameter_tensor_names_size() const; + public: + void clear_quant_parameter_tensor_names(); + ::opencv_onnx::StringStringEntryProto* mutable_quant_parameter_tensor_names(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* + mutable_quant_parameter_tensor_names(); + private: + const ::opencv_onnx::StringStringEntryProto& _internal_quant_parameter_tensor_names(int index) const; + ::opencv_onnx::StringStringEntryProto* _internal_add_quant_parameter_tensor_names(); + public: + const ::opencv_onnx::StringStringEntryProto& quant_parameter_tensor_names(int index) const; + ::opencv_onnx::StringStringEntryProto* add_quant_parameter_tensor_names(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& + quant_parameter_tensor_names() const; + + // optional string tensor_name = 1; + bool has_tensor_name() const; + private: + bool _internal_has_tensor_name() const; + public: + void clear_tensor_name(); + const std::string& tensor_name() const; + template + void set_tensor_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_tensor_name(); + PROTOBUF_NODISCARD std::string* release_tensor_name(); + void set_allocated_tensor_name(std::string* tensor_name); + private: + const std::string& _internal_tensor_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tensor_name(const std::string& value); + std::string* _internal_mutable_tensor_name(); + public: + + // @@protoc_insertion_point(class_scope:opencv_onnx.TensorAnnotation) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto > quant_parameter_tensor_names_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tensor_name_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + class GraphProto final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.GraphProto) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.GraphProto) */ { public: inline GraphProto() : GraphProto(nullptr) {} ~GraphProto() override; @@ -1703,22 +3425,13 @@ class GraphProto final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const GraphProto& default_instance() { return *internal_default_instance(); } @@ -1727,7 +3440,7 @@ class GraphProto final : &_GraphProto_default_instance_); } static constexpr int kIndexInFileMessages = - 5; + 13; friend void swap(GraphProto& a, GraphProto& b) { a.Swap(&b); @@ -1756,13 +3469,9 @@ class GraphProto final : GraphProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const GraphProto& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const GraphProto& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -1775,7 +3484,7 @@ class GraphProto final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(GraphProto* other); private: @@ -1791,10 +3500,7 @@ class GraphProto final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- @@ -1806,6 +3512,9 @@ class GraphProto final : kInputFieldNumber = 11, kOutputFieldNumber = 12, kValueInfoFieldNumber = 13, + kQuantizationAnnotationFieldNumber = 14, + kSparseInitializerFieldNumber = 15, + kMetadataPropsFieldNumber = 16, kNameFieldNumber = 2, kDocStringFieldNumber = 10, }; @@ -1899,6 +3608,60 @@ class GraphProto final : const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >& value_info() const; + // repeated .opencv_onnx.TensorAnnotation quantization_annotation = 14; + int quantization_annotation_size() const; + private: + int _internal_quantization_annotation_size() const; + public: + void clear_quantization_annotation(); + ::opencv_onnx::TensorAnnotation* mutable_quantization_annotation(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TensorAnnotation >* + mutable_quantization_annotation(); + private: + const ::opencv_onnx::TensorAnnotation& _internal_quantization_annotation(int index) const; + ::opencv_onnx::TensorAnnotation* _internal_add_quantization_annotation(); + public: + const ::opencv_onnx::TensorAnnotation& quantization_annotation(int index) const; + ::opencv_onnx::TensorAnnotation* add_quantization_annotation(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TensorAnnotation >& + quantization_annotation() const; + + // repeated .opencv_onnx.SparseTensorProto sparse_initializer = 15; + int sparse_initializer_size() const; + private: + int _internal_sparse_initializer_size() const; + public: + void clear_sparse_initializer(); + ::opencv_onnx::SparseTensorProto* mutable_sparse_initializer(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SparseTensorProto >* + mutable_sparse_initializer(); + private: + const ::opencv_onnx::SparseTensorProto& _internal_sparse_initializer(int index) const; + ::opencv_onnx::SparseTensorProto* _internal_add_sparse_initializer(); + public: + const ::opencv_onnx::SparseTensorProto& sparse_initializer(int index) const; + ::opencv_onnx::SparseTensorProto* add_sparse_initializer(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SparseTensorProto >& + sparse_initializer() const; + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16; + int metadata_props_size() const; + private: + int _internal_metadata_props_size() const; + public: + void clear_metadata_props(); + ::opencv_onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* + mutable_metadata_props(); + private: + const ::opencv_onnx::StringStringEntryProto& _internal_metadata_props(int index) const; + ::opencv_onnx::StringStringEntryProto* _internal_add_metadata_props(); + public: + const ::opencv_onnx::StringStringEntryProto& metadata_props(int index) const; + ::opencv_onnx::StringStringEntryProto* add_metadata_props(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& + metadata_props() const; + // optional string name = 2; bool has_name() const; private: @@ -1949,6 +3712,9 @@ class GraphProto final : ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ValueInfoProto > input_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ValueInfoProto > output_; ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ValueInfoProto > value_info_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TensorAnnotation > quantization_annotation_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SparseTensorProto > sparse_initializer_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto > metadata_props_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr doc_string_; friend struct ::TableStruct_opencv_2donnx_2eproto; @@ -1956,7 +3722,7 @@ class GraphProto final : // ------------------------------------------------------------------- class TensorProto_Segment final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorProto.Segment) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorProto.Segment) */ { public: inline TensorProto_Segment() : TensorProto_Segment(nullptr) {} ~TensorProto_Segment() override; @@ -1986,22 +3752,13 @@ class TensorProto_Segment final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const TensorProto_Segment& default_instance() { return *internal_default_instance(); } @@ -2010,7 +3767,7 @@ class TensorProto_Segment final : &_TensorProto_Segment_default_instance_); } static constexpr int kIndexInFileMessages = - 6; + 14; friend void swap(TensorProto_Segment& a, TensorProto_Segment& b) { a.Swap(&b); @@ -2039,13 +3796,9 @@ class TensorProto_Segment final : TensorProto_Segment* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const TensorProto_Segment& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const TensorProto_Segment& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -2058,7 +3811,7 @@ class TensorProto_Segment final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(TensorProto_Segment* other); private: @@ -2074,10 +3827,7 @@ class TensorProto_Segment final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- @@ -2129,7 +3879,7 @@ class TensorProto_Segment final : // ------------------------------------------------------------------- class TensorProto final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorProto) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorProto) */ { public: inline TensorProto() : TensorProto(nullptr) {} ~TensorProto() override; @@ -2159,22 +3909,13 @@ class TensorProto final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const TensorProto& default_instance() { return *internal_default_instance(); } @@ -2183,7 +3924,7 @@ class TensorProto final : &_TensorProto_default_instance_); } static constexpr int kIndexInFileMessages = - 7; + 15; friend void swap(TensorProto& a, TensorProto& b) { a.Swap(&b); @@ -2212,13 +3953,9 @@ class TensorProto final : TensorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const TensorProto& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const TensorProto& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -2231,7 +3968,7 @@ class TensorProto final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(TensorProto* other); private: @@ -2247,10 +3984,7 @@ class TensorProto final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- @@ -2289,6 +4023,22 @@ class TensorProto final : TensorProto_DataType_COMPLEX64; static constexpr DataType COMPLEX128 = TensorProto_DataType_COMPLEX128; + static constexpr DataType BFLOAT16 = + TensorProto_DataType_BFLOAT16; + static constexpr DataType FLOAT8E4M3FN = + TensorProto_DataType_FLOAT8E4M3FN; + static constexpr DataType FLOAT8E4M3FNUZ = + TensorProto_DataType_FLOAT8E4M3FNUZ; + static constexpr DataType FLOAT8E5M2 = + TensorProto_DataType_FLOAT8E5M2; + static constexpr DataType FLOAT8E5M2FNUZ = + TensorProto_DataType_FLOAT8E5M2FNUZ; + static constexpr DataType UINT4 = + TensorProto_DataType_UINT4; + static constexpr DataType INT4 = + TensorProto_DataType_INT4; + static constexpr DataType FLOAT4E2M1 = + TensorProto_DataType_FLOAT4E2M1; static inline bool DataType_IsValid(int value) { return TensorProto_DataType_IsValid(value); } @@ -2298,10 +4048,6 @@ class TensorProto final : TensorProto_DataType_DataType_MAX; static constexpr int DataType_ARRAYSIZE = TensorProto_DataType_DataType_ARRAYSIZE; - static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* - DataType_descriptor() { - return TensorProto_DataType_descriptor(); - } template static inline const std::string& DataType_Name(T enum_t_value) { static_assert(::std::is_same::value || @@ -2314,6 +4060,32 @@ class TensorProto final : return TensorProto_DataType_Parse(name, value); } + typedef TensorProto_DataLocation DataLocation; + static constexpr DataLocation DEFAULT = + TensorProto_DataLocation_DEFAULT; + static constexpr DataLocation EXTERNAL = + TensorProto_DataLocation_EXTERNAL; + static inline bool DataLocation_IsValid(int value) { + return TensorProto_DataLocation_IsValid(value); + } + static constexpr DataLocation DataLocation_MIN = + TensorProto_DataLocation_DataLocation_MIN; + static constexpr DataLocation DataLocation_MAX = + TensorProto_DataLocation_DataLocation_MAX; + static constexpr int DataLocation_ARRAYSIZE = + TensorProto_DataLocation_DataLocation_ARRAYSIZE; + template + static inline const std::string& DataLocation_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function DataLocation_Name."); + return TensorProto_DataLocation_Name(enum_t_value); + } + static inline bool DataLocation_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + DataLocation* value) { + return TensorProto_DataLocation_Parse(name, value); + } + // accessors ------------------------------------------------------- enum : int { @@ -2324,11 +4096,14 @@ class TensorProto final : kInt64DataFieldNumber = 7, kDoubleDataFieldNumber = 10, kUint64DataFieldNumber = 11, + kExternalDataFieldNumber = 13, + kMetadataPropsFieldNumber = 16, kNameFieldNumber = 8, kRawDataFieldNumber = 9, kDocStringFieldNumber = 12, kSegmentFieldNumber = 3, kDataTypeFieldNumber = 2, + kDataLocationFieldNumber = 14, }; // repeated int64 dims = 1; int dims_size() const; @@ -2486,6 +4261,42 @@ class TensorProto final : ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t >* mutable_uint64_data(); + // repeated .opencv_onnx.StringStringEntryProto external_data = 13; + int external_data_size() const; + private: + int _internal_external_data_size() const; + public: + void clear_external_data(); + ::opencv_onnx::StringStringEntryProto* mutable_external_data(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* + mutable_external_data(); + private: + const ::opencv_onnx::StringStringEntryProto& _internal_external_data(int index) const; + ::opencv_onnx::StringStringEntryProto* _internal_add_external_data(); + public: + const ::opencv_onnx::StringStringEntryProto& external_data(int index) const; + ::opencv_onnx::StringStringEntryProto* add_external_data(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& + external_data() const; + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 16; + int metadata_props_size() const; + private: + int _internal_metadata_props_size() const; + public: + void clear_metadata_props(); + ::opencv_onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* + mutable_metadata_props(); + private: + const ::opencv_onnx::StringStringEntryProto& _internal_metadata_props(int index) const; + ::opencv_onnx::StringStringEntryProto* _internal_add_metadata_props(); + public: + const ::opencv_onnx::StringStringEntryProto& metadata_props(int index) const; + ::opencv_onnx::StringStringEntryProto* add_metadata_props(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& + metadata_props() const; + // optional string name = 8; bool has_name() const; private: @@ -2558,17 +4369,30 @@ class TensorProto final : ::opencv_onnx::TensorProto_Segment* segment); ::opencv_onnx::TensorProto_Segment* unsafe_arena_release_segment(); - // optional .opencv_onnx.TensorProto.DataType data_type = 2; + // optional int32 data_type = 2; bool has_data_type() const; private: bool _internal_has_data_type() const; public: void clear_data_type(); - ::opencv_onnx::TensorProto_DataType data_type() const; - void set_data_type(::opencv_onnx::TensorProto_DataType value); + int32_t data_type() const; + void set_data_type(int32_t value); private: - ::opencv_onnx::TensorProto_DataType _internal_data_type() const; - void _internal_set_data_type(::opencv_onnx::TensorProto_DataType value); + int32_t _internal_data_type() const; + void _internal_set_data_type(int32_t value); + public: + + // optional .opencv_onnx.TensorProto.DataLocation data_location = 14; + bool has_data_location() const; + private: + bool _internal_has_data_location() const; + public: + void clear_data_location(); + ::opencv_onnx::TensorProto_DataLocation data_location() const; + void set_data_location(::opencv_onnx::TensorProto_DataLocation value); + private: + ::opencv_onnx::TensorProto_DataLocation _internal_data_location() const; + void _internal_set_data_location(::opencv_onnx::TensorProto_DataLocation value); public: // @@protoc_insertion_point(class_scope:opencv_onnx.TensorProto) @@ -2590,17 +4414,211 @@ class TensorProto final : ::PROTOBUF_NAMESPACE_ID::RepeatedField< double > double_data_; ::PROTOBUF_NAMESPACE_ID::RepeatedField< uint64_t > uint64_data_; mutable std::atomic _uint64_data_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto > external_data_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto > metadata_props_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr raw_data_; ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr doc_string_; ::opencv_onnx::TensorProto_Segment* segment_; - int data_type_; + int32_t data_type_; + int data_location_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + +class SparseTensorProto final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.SparseTensorProto) */ { + public: + inline SparseTensorProto() : SparseTensorProto(nullptr) {} + ~SparseTensorProto() override; + explicit constexpr SparseTensorProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + SparseTensorProto(const SparseTensorProto& from); + SparseTensorProto(SparseTensorProto&& from) noexcept + : SparseTensorProto() { + *this = ::std::move(from); + } + + inline SparseTensorProto& operator=(const SparseTensorProto& from) { + CopyFrom(from); + return *this; + } + inline SparseTensorProto& operator=(SparseTensorProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const SparseTensorProto& default_instance() { + return *internal_default_instance(); + } + static inline const SparseTensorProto* internal_default_instance() { + return reinterpret_cast( + &_SparseTensorProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(SparseTensorProto& a, SparseTensorProto& b) { + a.Swap(&b); + } + inline void Swap(SparseTensorProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(SparseTensorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + SparseTensorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const SparseTensorProto& from); + void MergeFrom(const SparseTensorProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SparseTensorProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.SparseTensorProto"; + } + protected: + explicit SparseTensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDimsFieldNumber = 3, + kValuesFieldNumber = 1, + kIndicesFieldNumber = 2, + }; + // repeated int64 dims = 3; + int dims_size() const; + private: + int _internal_dims_size() const; + public: + void clear_dims(); + private: + int64_t _internal_dims(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_dims() const; + void _internal_add_dims(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_dims(); + public: + int64_t dims(int index) const; + void set_dims(int index, int64_t value); + void add_dims(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + dims() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_dims(); + + // optional .opencv_onnx.TensorProto values = 1; + bool has_values() const; + private: + bool _internal_has_values() const; + public: + void clear_values(); + const ::opencv_onnx::TensorProto& values() const; + PROTOBUF_NODISCARD ::opencv_onnx::TensorProto* release_values(); + ::opencv_onnx::TensorProto* mutable_values(); + void set_allocated_values(::opencv_onnx::TensorProto* values); + private: + const ::opencv_onnx::TensorProto& _internal_values() const; + ::opencv_onnx::TensorProto* _internal_mutable_values(); + public: + void unsafe_arena_set_allocated_values( + ::opencv_onnx::TensorProto* values); + ::opencv_onnx::TensorProto* unsafe_arena_release_values(); + + // optional .opencv_onnx.TensorProto indices = 2; + bool has_indices() const; + private: + bool _internal_has_indices() const; + public: + void clear_indices(); + const ::opencv_onnx::TensorProto& indices() const; + PROTOBUF_NODISCARD ::opencv_onnx::TensorProto* release_indices(); + ::opencv_onnx::TensorProto* mutable_indices(); + void set_allocated_indices(::opencv_onnx::TensorProto* indices); + private: + const ::opencv_onnx::TensorProto& _internal_indices() const; + ::opencv_onnx::TensorProto* _internal_mutable_indices(); + public: + void unsafe_arena_set_allocated_indices( + ::opencv_onnx::TensorProto* indices); + ::opencv_onnx::TensorProto* unsafe_arena_release_indices(); + + // @@protoc_insertion_point(class_scope:opencv_onnx.SparseTensorProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > dims_; + ::opencv_onnx::TensorProto* values_; + ::opencv_onnx::TensorProto* indices_; friend struct ::TableStruct_opencv_2donnx_2eproto; }; // ------------------------------------------------------------------- class TensorShapeProto_Dimension final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorShapeProto.Dimension) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorShapeProto.Dimension) */ { public: inline TensorShapeProto_Dimension() : TensorShapeProto_Dimension(nullptr) {} ~TensorShapeProto_Dimension() override; @@ -2630,22 +4648,13 @@ class TensorShapeProto_Dimension final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const TensorShapeProto_Dimension& default_instance() { return *internal_default_instance(); } @@ -2660,7 +4669,7 @@ class TensorShapeProto_Dimension final : &_TensorShapeProto_Dimension_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 17; friend void swap(TensorShapeProto_Dimension& a, TensorShapeProto_Dimension& b) { a.Swap(&b); @@ -2689,13 +4698,9 @@ class TensorShapeProto_Dimension final : TensorShapeProto_Dimension* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const TensorShapeProto_Dimension& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const TensorShapeProto_Dimension& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -2708,7 +4713,7 @@ class TensorShapeProto_Dimension final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(TensorShapeProto_Dimension* other); private: @@ -2724,10 +4729,7 @@ class TensorShapeProto_Dimension final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- @@ -2817,7 +4819,7 @@ class TensorShapeProto_Dimension final : // ------------------------------------------------------------------- class TensorShapeProto final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorShapeProto) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TensorShapeProto) */ { public: inline TensorShapeProto() : TensorShapeProto(nullptr) {} ~TensorShapeProto() override; @@ -2847,22 +4849,13 @@ class TensorShapeProto final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const TensorShapeProto& default_instance() { return *internal_default_instance(); } @@ -2871,7 +4864,7 @@ class TensorShapeProto final : &_TensorShapeProto_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 18; friend void swap(TensorShapeProto& a, TensorShapeProto& b) { a.Swap(&b); @@ -2900,13 +4893,9 @@ class TensorShapeProto final : TensorShapeProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const TensorShapeProto& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const TensorShapeProto& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -2919,7 +4908,7 @@ class TensorShapeProto final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(TensorShapeProto* other); private: @@ -2935,10 +4924,7 @@ class TensorShapeProto final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- @@ -2981,7 +4967,7 @@ class TensorShapeProto final : // ------------------------------------------------------------------- class TypeProto_Tensor final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TypeProto.Tensor) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TypeProto.Tensor) */ { public: inline TypeProto_Tensor() : TypeProto_Tensor(nullptr) {} ~TypeProto_Tensor() override; @@ -3011,22 +4997,13 @@ class TypeProto_Tensor final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const TypeProto_Tensor& default_instance() { return *internal_default_instance(); } @@ -3035,7 +5012,7 @@ class TypeProto_Tensor final : &_TypeProto_Tensor_default_instance_); } static constexpr int kIndexInFileMessages = - 10; + 19; friend void swap(TypeProto_Tensor& a, TypeProto_Tensor& b) { a.Swap(&b); @@ -3064,13 +5041,9 @@ class TypeProto_Tensor final : TypeProto_Tensor* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const TypeProto_Tensor& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const TypeProto_Tensor& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -3083,7 +5056,7 @@ class TypeProto_Tensor final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(TypeProto_Tensor* other); private: @@ -3099,10 +5072,7 @@ class TypeProto_Tensor final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- @@ -3130,17 +5100,17 @@ class TypeProto_Tensor final : ::opencv_onnx::TensorShapeProto* shape); ::opencv_onnx::TensorShapeProto* unsafe_arena_release_shape(); - // optional .opencv_onnx.TensorProto.DataType elem_type = 1; + // optional int32 elem_type = 1; bool has_elem_type() const; private: bool _internal_has_elem_type() const; public: void clear_elem_type(); - ::opencv_onnx::TensorProto_DataType elem_type() const; - void set_elem_type(::opencv_onnx::TensorProto_DataType value); + int32_t elem_type() const; + void set_elem_type(int32_t value); private: - ::opencv_onnx::TensorProto_DataType _internal_elem_type() const; - void _internal_set_elem_type(::opencv_onnx::TensorProto_DataType value); + int32_t _internal_elem_type() const; + void _internal_set_elem_type(int32_t value); public: // @@protoc_insertion_point(class_scope:opencv_onnx.TypeProto.Tensor) @@ -3153,13 +5123,631 @@ class TypeProto_Tensor final : ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; ::opencv_onnx::TensorShapeProto* shape_; - int elem_type_; + int32_t elem_type_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TypeProto_Sequence final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TypeProto.Sequence) */ { + public: + inline TypeProto_Sequence() : TypeProto_Sequence(nullptr) {} + ~TypeProto_Sequence() override; + explicit constexpr TypeProto_Sequence(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TypeProto_Sequence(const TypeProto_Sequence& from); + TypeProto_Sequence(TypeProto_Sequence&& from) noexcept + : TypeProto_Sequence() { + *this = ::std::move(from); + } + + inline TypeProto_Sequence& operator=(const TypeProto_Sequence& from) { + CopyFrom(from); + return *this; + } + inline TypeProto_Sequence& operator=(TypeProto_Sequence&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TypeProto_Sequence& default_instance() { + return *internal_default_instance(); + } + static inline const TypeProto_Sequence* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_Sequence_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(TypeProto_Sequence& a, TypeProto_Sequence& b) { + a.Swap(&b); + } + inline void Swap(TypeProto_Sequence* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TypeProto_Sequence* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TypeProto_Sequence* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const TypeProto_Sequence& from); + void MergeFrom(const TypeProto_Sequence& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(TypeProto_Sequence* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.TypeProto.Sequence"; + } + protected: + explicit TypeProto_Sequence(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kElemTypeFieldNumber = 1, + }; + // optional .opencv_onnx.TypeProto elem_type = 1; + bool has_elem_type() const; + private: + bool _internal_has_elem_type() const; + public: + void clear_elem_type(); + const ::opencv_onnx::TypeProto& elem_type() const; + PROTOBUF_NODISCARD ::opencv_onnx::TypeProto* release_elem_type(); + ::opencv_onnx::TypeProto* mutable_elem_type(); + void set_allocated_elem_type(::opencv_onnx::TypeProto* elem_type); + private: + const ::opencv_onnx::TypeProto& _internal_elem_type() const; + ::opencv_onnx::TypeProto* _internal_mutable_elem_type(); + public: + void unsafe_arena_set_allocated_elem_type( + ::opencv_onnx::TypeProto* elem_type); + ::opencv_onnx::TypeProto* unsafe_arena_release_elem_type(); + + // @@protoc_insertion_point(class_scope:opencv_onnx.TypeProto.Sequence) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::opencv_onnx::TypeProto* elem_type_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TypeProto_Map final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TypeProto.Map) */ { + public: + inline TypeProto_Map() : TypeProto_Map(nullptr) {} + ~TypeProto_Map() override; + explicit constexpr TypeProto_Map(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TypeProto_Map(const TypeProto_Map& from); + TypeProto_Map(TypeProto_Map&& from) noexcept + : TypeProto_Map() { + *this = ::std::move(from); + } + + inline TypeProto_Map& operator=(const TypeProto_Map& from) { + CopyFrom(from); + return *this; + } + inline TypeProto_Map& operator=(TypeProto_Map&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TypeProto_Map& default_instance() { + return *internal_default_instance(); + } + static inline const TypeProto_Map* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_Map_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(TypeProto_Map& a, TypeProto_Map& b) { + a.Swap(&b); + } + inline void Swap(TypeProto_Map* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TypeProto_Map* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TypeProto_Map* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const TypeProto_Map& from); + void MergeFrom(const TypeProto_Map& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(TypeProto_Map* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.TypeProto.Map"; + } + protected: + explicit TypeProto_Map(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValueTypeFieldNumber = 2, + kKeyTypeFieldNumber = 1, + }; + // optional .opencv_onnx.TypeProto value_type = 2; + bool has_value_type() const; + private: + bool _internal_has_value_type() const; + public: + void clear_value_type(); + const ::opencv_onnx::TypeProto& value_type() const; + PROTOBUF_NODISCARD ::opencv_onnx::TypeProto* release_value_type(); + ::opencv_onnx::TypeProto* mutable_value_type(); + void set_allocated_value_type(::opencv_onnx::TypeProto* value_type); + private: + const ::opencv_onnx::TypeProto& _internal_value_type() const; + ::opencv_onnx::TypeProto* _internal_mutable_value_type(); + public: + void unsafe_arena_set_allocated_value_type( + ::opencv_onnx::TypeProto* value_type); + ::opencv_onnx::TypeProto* unsafe_arena_release_value_type(); + + // optional int32 key_type = 1; + bool has_key_type() const; + private: + bool _internal_has_key_type() const; + public: + void clear_key_type(); + int32_t key_type() const; + void set_key_type(int32_t value); + private: + int32_t _internal_key_type() const; + void _internal_set_key_type(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:opencv_onnx.TypeProto.Map) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::opencv_onnx::TypeProto* value_type_; + int32_t key_type_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TypeProto_Optional final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TypeProto.Optional) */ { + public: + inline TypeProto_Optional() : TypeProto_Optional(nullptr) {} + ~TypeProto_Optional() override; + explicit constexpr TypeProto_Optional(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TypeProto_Optional(const TypeProto_Optional& from); + TypeProto_Optional(TypeProto_Optional&& from) noexcept + : TypeProto_Optional() { + *this = ::std::move(from); + } + + inline TypeProto_Optional& operator=(const TypeProto_Optional& from) { + CopyFrom(from); + return *this; + } + inline TypeProto_Optional& operator=(TypeProto_Optional&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TypeProto_Optional& default_instance() { + return *internal_default_instance(); + } + static inline const TypeProto_Optional* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_Optional_default_instance_); + } + static constexpr int kIndexInFileMessages = + 22; + + friend void swap(TypeProto_Optional& a, TypeProto_Optional& b) { + a.Swap(&b); + } + inline void Swap(TypeProto_Optional* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TypeProto_Optional* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TypeProto_Optional* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const TypeProto_Optional& from); + void MergeFrom(const TypeProto_Optional& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(TypeProto_Optional* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.TypeProto.Optional"; + } + protected: + explicit TypeProto_Optional(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kElemTypeFieldNumber = 1, + }; + // optional .opencv_onnx.TypeProto elem_type = 1; + bool has_elem_type() const; + private: + bool _internal_has_elem_type() const; + public: + void clear_elem_type(); + const ::opencv_onnx::TypeProto& elem_type() const; + PROTOBUF_NODISCARD ::opencv_onnx::TypeProto* release_elem_type(); + ::opencv_onnx::TypeProto* mutable_elem_type(); + void set_allocated_elem_type(::opencv_onnx::TypeProto* elem_type); + private: + const ::opencv_onnx::TypeProto& _internal_elem_type() const; + ::opencv_onnx::TypeProto* _internal_mutable_elem_type(); + public: + void unsafe_arena_set_allocated_elem_type( + ::opencv_onnx::TypeProto* elem_type); + ::opencv_onnx::TypeProto* unsafe_arena_release_elem_type(); + + // @@protoc_insertion_point(class_scope:opencv_onnx.TypeProto.Optional) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::opencv_onnx::TypeProto* elem_type_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; +// ------------------------------------------------------------------- + +class TypeProto_SparseTensor final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TypeProto.SparseTensor) */ { + public: + inline TypeProto_SparseTensor() : TypeProto_SparseTensor(nullptr) {} + ~TypeProto_SparseTensor() override; + explicit constexpr TypeProto_SparseTensor(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TypeProto_SparseTensor(const TypeProto_SparseTensor& from); + TypeProto_SparseTensor(TypeProto_SparseTensor&& from) noexcept + : TypeProto_SparseTensor() { + *this = ::std::move(from); + } + + inline TypeProto_SparseTensor& operator=(const TypeProto_SparseTensor& from) { + CopyFrom(from); + return *this; + } + inline TypeProto_SparseTensor& operator=(TypeProto_SparseTensor&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const TypeProto_SparseTensor& default_instance() { + return *internal_default_instance(); + } + static inline const TypeProto_SparseTensor* internal_default_instance() { + return reinterpret_cast( + &_TypeProto_SparseTensor_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(TypeProto_SparseTensor& a, TypeProto_SparseTensor& b) { + a.Swap(&b); + } + inline void Swap(TypeProto_SparseTensor* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TypeProto_SparseTensor* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TypeProto_SparseTensor* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const TypeProto_SparseTensor& from); + void MergeFrom(const TypeProto_SparseTensor& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(TypeProto_SparseTensor* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.TypeProto.SparseTensor"; + } + protected: + explicit TypeProto_SparseTensor(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kShapeFieldNumber = 2, + kElemTypeFieldNumber = 1, + }; + // optional .opencv_onnx.TensorShapeProto shape = 2; + bool has_shape() const; + private: + bool _internal_has_shape() const; + public: + void clear_shape(); + const ::opencv_onnx::TensorShapeProto& shape() const; + PROTOBUF_NODISCARD ::opencv_onnx::TensorShapeProto* release_shape(); + ::opencv_onnx::TensorShapeProto* mutable_shape(); + void set_allocated_shape(::opencv_onnx::TensorShapeProto* shape); + private: + const ::opencv_onnx::TensorShapeProto& _internal_shape() const; + ::opencv_onnx::TensorShapeProto* _internal_mutable_shape(); + public: + void unsafe_arena_set_allocated_shape( + ::opencv_onnx::TensorShapeProto* shape); + ::opencv_onnx::TensorShapeProto* unsafe_arena_release_shape(); + + // optional int32 elem_type = 1; + bool has_elem_type() const; + private: + bool _internal_has_elem_type() const; + public: + void clear_elem_type(); + int32_t elem_type() const; + void set_elem_type(int32_t value); + private: + int32_t _internal_elem_type() const; + void _internal_set_elem_type(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:opencv_onnx.TypeProto.SparseTensor) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::opencv_onnx::TensorShapeProto* shape_; + int32_t elem_type_; friend struct ::TableStruct_opencv_2donnx_2eproto; }; // ------------------------------------------------------------------- class TypeProto final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.TypeProto) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.TypeProto) */ { public: inline TypeProto() : TypeProto(nullptr) {} ~TypeProto() override; @@ -3189,27 +5777,22 @@ class TypeProto final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const TypeProto& default_instance() { return *internal_default_instance(); } enum ValueCase { kTensorType = 1, + kSequenceType = 4, + kMapType = 5, + kOptionalType = 9, + kSparseTensorType = 8, VALUE_NOT_SET = 0, }; @@ -3218,7 +5801,7 @@ class TypeProto final : &_TypeProto_default_instance_); } static constexpr int kIndexInFileMessages = - 11; + 24; friend void swap(TypeProto& a, TypeProto& b) { a.Swap(&b); @@ -3247,13 +5830,9 @@ class TypeProto final : TypeProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const TypeProto& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const TypeProto& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -3266,7 +5845,7 @@ class TypeProto final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(TypeProto* other); private: @@ -3282,20 +5861,25 @@ class TypeProto final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- typedef TypeProto_Tensor Tensor; + typedef TypeProto_Sequence Sequence; + typedef TypeProto_Map Map; + typedef TypeProto_Optional Optional; + typedef TypeProto_SparseTensor SparseTensor; // accessors ------------------------------------------------------- enum : int { kDenotationFieldNumber = 6, kTensorTypeFieldNumber = 1, + kSequenceTypeFieldNumber = 4, + kMapTypeFieldNumber = 5, + kOptionalTypeFieldNumber = 9, + kSparseTensorTypeFieldNumber = 8, }; // optional string denotation = 6; bool has_denotation() const; @@ -3333,12 +5917,88 @@ class TypeProto final : ::opencv_onnx::TypeProto_Tensor* tensor_type); ::opencv_onnx::TypeProto_Tensor* unsafe_arena_release_tensor_type(); + // .opencv_onnx.TypeProto.Sequence sequence_type = 4; + bool has_sequence_type() const; + private: + bool _internal_has_sequence_type() const; + public: + void clear_sequence_type(); + const ::opencv_onnx::TypeProto_Sequence& sequence_type() const; + PROTOBUF_NODISCARD ::opencv_onnx::TypeProto_Sequence* release_sequence_type(); + ::opencv_onnx::TypeProto_Sequence* mutable_sequence_type(); + void set_allocated_sequence_type(::opencv_onnx::TypeProto_Sequence* sequence_type); + private: + const ::opencv_onnx::TypeProto_Sequence& _internal_sequence_type() const; + ::opencv_onnx::TypeProto_Sequence* _internal_mutable_sequence_type(); + public: + void unsafe_arena_set_allocated_sequence_type( + ::opencv_onnx::TypeProto_Sequence* sequence_type); + ::opencv_onnx::TypeProto_Sequence* unsafe_arena_release_sequence_type(); + + // .opencv_onnx.TypeProto.Map map_type = 5; + bool has_map_type() const; + private: + bool _internal_has_map_type() const; + public: + void clear_map_type(); + const ::opencv_onnx::TypeProto_Map& map_type() const; + PROTOBUF_NODISCARD ::opencv_onnx::TypeProto_Map* release_map_type(); + ::opencv_onnx::TypeProto_Map* mutable_map_type(); + void set_allocated_map_type(::opencv_onnx::TypeProto_Map* map_type); + private: + const ::opencv_onnx::TypeProto_Map& _internal_map_type() const; + ::opencv_onnx::TypeProto_Map* _internal_mutable_map_type(); + public: + void unsafe_arena_set_allocated_map_type( + ::opencv_onnx::TypeProto_Map* map_type); + ::opencv_onnx::TypeProto_Map* unsafe_arena_release_map_type(); + + // .opencv_onnx.TypeProto.Optional optional_type = 9; + bool has_optional_type() const; + private: + bool _internal_has_optional_type() const; + public: + void clear_optional_type(); + const ::opencv_onnx::TypeProto_Optional& optional_type() const; + PROTOBUF_NODISCARD ::opencv_onnx::TypeProto_Optional* release_optional_type(); + ::opencv_onnx::TypeProto_Optional* mutable_optional_type(); + void set_allocated_optional_type(::opencv_onnx::TypeProto_Optional* optional_type); + private: + const ::opencv_onnx::TypeProto_Optional& _internal_optional_type() const; + ::opencv_onnx::TypeProto_Optional* _internal_mutable_optional_type(); + public: + void unsafe_arena_set_allocated_optional_type( + ::opencv_onnx::TypeProto_Optional* optional_type); + ::opencv_onnx::TypeProto_Optional* unsafe_arena_release_optional_type(); + + // .opencv_onnx.TypeProto.SparseTensor sparse_tensor_type = 8; + bool has_sparse_tensor_type() const; + private: + bool _internal_has_sparse_tensor_type() const; + public: + void clear_sparse_tensor_type(); + const ::opencv_onnx::TypeProto_SparseTensor& sparse_tensor_type() const; + PROTOBUF_NODISCARD ::opencv_onnx::TypeProto_SparseTensor* release_sparse_tensor_type(); + ::opencv_onnx::TypeProto_SparseTensor* mutable_sparse_tensor_type(); + void set_allocated_sparse_tensor_type(::opencv_onnx::TypeProto_SparseTensor* sparse_tensor_type); + private: + const ::opencv_onnx::TypeProto_SparseTensor& _internal_sparse_tensor_type() const; + ::opencv_onnx::TypeProto_SparseTensor* _internal_mutable_sparse_tensor_type(); + public: + void unsafe_arena_set_allocated_sparse_tensor_type( + ::opencv_onnx::TypeProto_SparseTensor* sparse_tensor_type); + ::opencv_onnx::TypeProto_SparseTensor* unsafe_arena_release_sparse_tensor_type(); + void clear_value(); ValueCase value_case() const; // @@protoc_insertion_point(class_scope:opencv_onnx.TypeProto) private: class _Internal; void set_has_tensor_type(); + void set_has_sequence_type(); + void set_has_map_type(); + void set_has_optional_type(); + void set_has_sparse_tensor_type(); inline bool has_value() const; inline void clear_has_value(); @@ -3353,6 +6013,10 @@ class TypeProto final : constexpr ValueUnion() : _constinit_{} {} ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized _constinit_; ::opencv_onnx::TypeProto_Tensor* tensor_type_; + ::opencv_onnx::TypeProto_Sequence* sequence_type_; + ::opencv_onnx::TypeProto_Map* map_type_; + ::opencv_onnx::TypeProto_Optional* optional_type_; + ::opencv_onnx::TypeProto_SparseTensor* sparse_tensor_type_; } value_; uint32_t _oneof_case_[1]; @@ -3361,7 +6025,7 @@ class TypeProto final : // ------------------------------------------------------------------- class OperatorSetIdProto final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_onnx.OperatorSetIdProto) */ { + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.OperatorSetIdProto) */ { public: inline OperatorSetIdProto() : OperatorSetIdProto(nullptr) {} ~OperatorSetIdProto() override; @@ -3391,22 +6055,13 @@ class OperatorSetIdProto final : return *this; } - inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { - return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); } - inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { - return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { - return GetDescriptor(); - } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { - return default_instance().GetMetadata().descriptor; - } - static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { - return default_instance().GetMetadata().reflection; - } static const OperatorSetIdProto& default_instance() { return *internal_default_instance(); } @@ -3415,7 +6070,7 @@ class OperatorSetIdProto final : &_OperatorSetIdProto_default_instance_); } static constexpr int kIndexInFileMessages = - 12; + 25; friend void swap(OperatorSetIdProto& a, OperatorSetIdProto& b) { a.Swap(&b); @@ -3444,13 +6099,9 @@ class OperatorSetIdProto final : OperatorSetIdProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { return CreateMaybeMessage(arena); } - using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; void CopyFrom(const OperatorSetIdProto& from); - using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; void MergeFrom(const OperatorSetIdProto& from); - private: - static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); - public: PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; @@ -3463,7 +6114,7 @@ class OperatorSetIdProto final : private: void SharedCtor(); void SharedDtor(); - void SetCachedSize(int size) const final; + void SetCachedSize(int size) const; void InternalSwap(OperatorSetIdProto* other); private: @@ -3479,10 +6130,7 @@ class OperatorSetIdProto final : inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); public: - static const ClassData _class_data_; - const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; - - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + std::string GetTypeName() const final; // nested types ---------------------------------------------------- @@ -3536,6 +6184,391 @@ class OperatorSetIdProto final : int64_t version_; friend struct ::TableStruct_opencv_2donnx_2eproto; }; +// ------------------------------------------------------------------- + +class FunctionProto final : + public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:opencv_onnx.FunctionProto) */ { + public: + inline FunctionProto() : FunctionProto(nullptr) {} + ~FunctionProto() override; + explicit constexpr FunctionProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FunctionProto(const FunctionProto& from); + FunctionProto(FunctionProto&& from) noexcept + : FunctionProto() { + *this = ::std::move(from); + } + + inline FunctionProto& operator=(const FunctionProto& from) { + CopyFrom(from); + return *this; + } + inline FunctionProto& operator=(FunctionProto&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const std::string& unknown_fields() const { + return _internal_metadata_.unknown_fields(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString); + } + inline std::string* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields(); + } + + static const FunctionProto& default_instance() { + return *internal_default_instance(); + } + static inline const FunctionProto* internal_default_instance() { + return reinterpret_cast( + &_FunctionProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 26; + + friend void swap(FunctionProto& a, FunctionProto& b) { + a.Swap(&b); + } + inline void Swap(FunctionProto* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FunctionProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FunctionProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) final; + void CopyFrom(const FunctionProto& from); + void MergeFrom(const FunctionProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FunctionProto* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "opencv_onnx.FunctionProto"; + } + protected: + explicit FunctionProto(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + std::string GetTypeName() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInputFieldNumber = 4, + kOutputFieldNumber = 5, + kAttributeFieldNumber = 6, + kNodeFieldNumber = 7, + kOpsetImportFieldNumber = 9, + kAttributeProtoFieldNumber = 11, + kValueInfoFieldNumber = 12, + kMetadataPropsFieldNumber = 14, + kNameFieldNumber = 1, + kDocStringFieldNumber = 8, + kDomainFieldNumber = 10, + kOverloadFieldNumber = 13, + }; + // repeated string input = 4; + int input_size() const; + private: + int _internal_input_size() const; + public: + void clear_input(); + const std::string& input(int index) const; + std::string* mutable_input(int index); + void set_input(int index, const std::string& value); + void set_input(int index, std::string&& value); + 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); + void add_input(std::string&& value); + void add_input(const char* value); + void add_input(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& input() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_input(); + private: + const std::string& _internal_input(int index) const; + std::string* _internal_add_input(); + public: + + // repeated string output = 5; + int output_size() const; + private: + int _internal_output_size() const; + public: + void clear_output(); + const std::string& output(int index) const; + std::string* mutable_output(int index); + void set_output(int index, const std::string& value); + void set_output(int index, std::string&& value); + 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); + void add_output(std::string&& value); + void add_output(const char* value); + void add_output(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& output() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_output(); + private: + const std::string& _internal_output(int index) const; + std::string* _internal_add_output(); + public: + + // repeated string attribute = 6; + int attribute_size() const; + private: + int _internal_attribute_size() const; + public: + void clear_attribute(); + const std::string& attribute(int index) const; + std::string* mutable_attribute(int index); + void set_attribute(int index, const std::string& value); + void set_attribute(int index, std::string&& value); + void set_attribute(int index, const char* value); + void set_attribute(int index, const char* value, size_t size); + std::string* add_attribute(); + void add_attribute(const std::string& value); + void add_attribute(std::string&& value); + void add_attribute(const char* value); + void add_attribute(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& attribute() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_attribute(); + private: + const std::string& _internal_attribute(int index) const; + std::string* _internal_add_attribute(); + public: + + // repeated .opencv_onnx.NodeProto node = 7; + int node_size() const; + private: + int _internal_node_size() const; + public: + void clear_node(); + ::opencv_onnx::NodeProto* mutable_node(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::NodeProto >* + mutable_node(); + private: + const ::opencv_onnx::NodeProto& _internal_node(int index) const; + ::opencv_onnx::NodeProto* _internal_add_node(); + public: + const ::opencv_onnx::NodeProto& node(int index) const; + ::opencv_onnx::NodeProto* add_node(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::NodeProto >& + node() const; + + // repeated .opencv_onnx.OperatorSetIdProto opset_import = 9; + int opset_import_size() const; + private: + int _internal_opset_import_size() const; + public: + void clear_opset_import(); + ::opencv_onnx::OperatorSetIdProto* mutable_opset_import(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::OperatorSetIdProto >* + mutable_opset_import(); + private: + const ::opencv_onnx::OperatorSetIdProto& _internal_opset_import(int index) const; + ::opencv_onnx::OperatorSetIdProto* _internal_add_opset_import(); + public: + const ::opencv_onnx::OperatorSetIdProto& opset_import(int index) const; + ::opencv_onnx::OperatorSetIdProto* add_opset_import(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::OperatorSetIdProto >& + opset_import() const; + + // repeated .opencv_onnx.AttributeProto attribute_proto = 11; + int attribute_proto_size() const; + private: + int _internal_attribute_proto_size() const; + public: + void clear_attribute_proto(); + ::opencv_onnx::AttributeProto* mutable_attribute_proto(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::AttributeProto >* + mutable_attribute_proto(); + private: + const ::opencv_onnx::AttributeProto& _internal_attribute_proto(int index) const; + ::opencv_onnx::AttributeProto* _internal_add_attribute_proto(); + public: + const ::opencv_onnx::AttributeProto& attribute_proto(int index) const; + ::opencv_onnx::AttributeProto* add_attribute_proto(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::AttributeProto >& + attribute_proto() const; + + // repeated .opencv_onnx.ValueInfoProto value_info = 12; + int value_info_size() const; + private: + int _internal_value_info_size() const; + public: + void clear_value_info(); + ::opencv_onnx::ValueInfoProto* mutable_value_info(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >* + mutable_value_info(); + private: + const ::opencv_onnx::ValueInfoProto& _internal_value_info(int index) const; + ::opencv_onnx::ValueInfoProto* _internal_add_value_info(); + public: + const ::opencv_onnx::ValueInfoProto& value_info(int index) const; + ::opencv_onnx::ValueInfoProto* add_value_info(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >& + value_info() const; + + // repeated .opencv_onnx.StringStringEntryProto metadata_props = 14; + int metadata_props_size() const; + private: + int _internal_metadata_props_size() const; + public: + void clear_metadata_props(); + ::opencv_onnx::StringStringEntryProto* mutable_metadata_props(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* + mutable_metadata_props(); + private: + const ::opencv_onnx::StringStringEntryProto& _internal_metadata_props(int index) const; + ::opencv_onnx::StringStringEntryProto* _internal_add_metadata_props(); + public: + const ::opencv_onnx::StringStringEntryProto& metadata_props(int index) const; + ::opencv_onnx::StringStringEntryProto* add_metadata_props(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& + metadata_props() const; + + // optional string name = 1; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // optional string doc_string = 8; + bool has_doc_string() const; + private: + bool _internal_has_doc_string() const; + public: + void clear_doc_string(); + const std::string& doc_string() const; + template + void set_doc_string(ArgT0&& arg0, ArgT... args); + std::string* mutable_doc_string(); + PROTOBUF_NODISCARD std::string* release_doc_string(); + void set_allocated_doc_string(std::string* doc_string); + private: + const std::string& _internal_doc_string() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_doc_string(const std::string& value); + std::string* _internal_mutable_doc_string(); + public: + + // optional string domain = 10; + bool has_domain() const; + private: + bool _internal_has_domain() const; + public: + void clear_domain(); + const std::string& domain() const; + template + void set_domain(ArgT0&& arg0, ArgT... args); + std::string* mutable_domain(); + PROTOBUF_NODISCARD std::string* release_domain(); + void set_allocated_domain(std::string* domain); + private: + const std::string& _internal_domain() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_domain(const std::string& value); + std::string* _internal_mutable_domain(); + public: + + // optional string overload = 13; + bool has_overload() const; + private: + bool _internal_has_overload() const; + public: + void clear_overload(); + const std::string& overload() const; + template + void set_overload(ArgT0&& arg0, ArgT... args); + std::string* mutable_overload(); + PROTOBUF_NODISCARD std::string* release_overload(); + void set_allocated_overload(std::string* overload); + private: + const std::string& _internal_overload() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_overload(const std::string& value); + std::string* _internal_mutable_overload(); + public: + + // @@protoc_insertion_point(class_scope:opencv_onnx.FunctionProto) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField input_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField output_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField attribute_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::NodeProto > node_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::OperatorSetIdProto > opset_import_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::AttributeProto > attribute_proto_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ValueInfoProto > value_info_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto > metadata_props_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr doc_string_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr domain_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr overload_; + friend struct ::TableStruct_opencv_2donnx_2eproto; +}; // =================================================================== @@ -3756,7 +6789,7 @@ inline void AttributeProto::set_allocated_doc_string(std::string* doc_string) { // optional .opencv_onnx.AttributeProto.AttributeType type = 20; inline bool AttributeProto::_internal_has_type() const { - bool value = (_has_bits_[0] & 0x00000100u) != 0; + bool value = (_has_bits_[0] & 0x00000400u) != 0; return value; } inline bool AttributeProto::has_type() const { @@ -3764,7 +6797,7 @@ inline bool AttributeProto::has_type() const { } inline void AttributeProto::clear_type() { type_ = 0; - _has_bits_[0] &= ~0x00000100u; + _has_bits_[0] &= ~0x00000400u; } inline ::opencv_onnx::AttributeProto_AttributeType AttributeProto::_internal_type() const { return static_cast< ::opencv_onnx::AttributeProto_AttributeType >(type_); @@ -3775,7 +6808,7 @@ inline ::opencv_onnx::AttributeProto_AttributeType AttributeProto::type() const } inline void AttributeProto::_internal_set_type(::opencv_onnx::AttributeProto_AttributeType value) { assert(::opencv_onnx::AttributeProto_AttributeType_IsValid(value)); - _has_bits_[0] |= 0x00000100u; + _has_bits_[0] |= 0x00000400u; type_ = value; } inline void AttributeProto::set_type(::opencv_onnx::AttributeProto_AttributeType value) { @@ -3785,7 +6818,7 @@ inline void AttributeProto::set_type(::opencv_onnx::AttributeProto_AttributeType // optional float f = 2; inline bool AttributeProto::_internal_has_f() const { - bool value = (_has_bits_[0] & 0x00000080u) != 0; + bool value = (_has_bits_[0] & 0x00000200u) != 0; return value; } inline bool AttributeProto::has_f() const { @@ -3793,7 +6826,7 @@ inline bool AttributeProto::has_f() const { } inline void AttributeProto::clear_f() { f_ = 0; - _has_bits_[0] &= ~0x00000080u; + _has_bits_[0] &= ~0x00000200u; } inline float AttributeProto::_internal_f() const { return f_; @@ -3803,7 +6836,7 @@ inline float AttributeProto::f() const { return _internal_f(); } inline void AttributeProto::_internal_set_f(float value) { - _has_bits_[0] |= 0x00000080u; + _has_bits_[0] |= 0x00000200u; f_ = value; } inline void AttributeProto::set_f(float value) { @@ -3813,7 +6846,7 @@ inline void AttributeProto::set_f(float value) { // optional int64 i = 3; inline bool AttributeProto::_internal_has_i() const { - bool value = (_has_bits_[0] & 0x00000040u) != 0; + bool value = (_has_bits_[0] & 0x00000100u) != 0; return value; } inline bool AttributeProto::has_i() const { @@ -3821,7 +6854,7 @@ inline bool AttributeProto::has_i() const { } inline void AttributeProto::clear_i() { i_ = int64_t{0}; - _has_bits_[0] &= ~0x00000040u; + _has_bits_[0] &= ~0x00000100u; } inline int64_t AttributeProto::_internal_i() const { return i_; @@ -3831,7 +6864,7 @@ inline int64_t AttributeProto::i() const { return _internal_i(); } inline void AttributeProto::_internal_set_i(int64_t value) { - _has_bits_[0] |= 0x00000040u; + _has_bits_[0] |= 0x00000100u; i_ = value; } inline void AttributeProto::set_i(int64_t value) { @@ -4088,6 +7121,186 @@ inline void AttributeProto::set_allocated_g(::opencv_onnx::GraphProto* g) { // @@protoc_insertion_point(field_set_allocated:opencv_onnx.AttributeProto.g) } +// optional .opencv_onnx.SparseTensorProto sparse_tensor = 22; +inline bool AttributeProto::_internal_has_sparse_tensor() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + PROTOBUF_ASSUME(!value || sparse_tensor_ != nullptr); + return value; +} +inline bool AttributeProto::has_sparse_tensor() const { + return _internal_has_sparse_tensor(); +} +inline void AttributeProto::clear_sparse_tensor() { + if (sparse_tensor_ != nullptr) sparse_tensor_->Clear(); + _has_bits_[0] &= ~0x00000080u; +} +inline const ::opencv_onnx::SparseTensorProto& AttributeProto::_internal_sparse_tensor() const { + const ::opencv_onnx::SparseTensorProto* p = sparse_tensor_; + return p != nullptr ? *p : reinterpret_cast( + ::opencv_onnx::_SparseTensorProto_default_instance_); +} +inline const ::opencv_onnx::SparseTensorProto& AttributeProto::sparse_tensor() const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.sparse_tensor) + return _internal_sparse_tensor(); +} +inline void AttributeProto::unsafe_arena_set_allocated_sparse_tensor( + ::opencv_onnx::SparseTensorProto* sparse_tensor) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(sparse_tensor_); + } + sparse_tensor_ = sparse_tensor; + if (sparse_tensor) { + _has_bits_[0] |= 0x00000080u; + } else { + _has_bits_[0] &= ~0x00000080u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.AttributeProto.sparse_tensor) +} +inline ::opencv_onnx::SparseTensorProto* AttributeProto::release_sparse_tensor() { + _has_bits_[0] &= ~0x00000080u; + ::opencv_onnx::SparseTensorProto* temp = sparse_tensor_; + sparse_tensor_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::opencv_onnx::SparseTensorProto* AttributeProto::unsafe_arena_release_sparse_tensor() { + // @@protoc_insertion_point(field_release:opencv_onnx.AttributeProto.sparse_tensor) + _has_bits_[0] &= ~0x00000080u; + ::opencv_onnx::SparseTensorProto* temp = sparse_tensor_; + sparse_tensor_ = nullptr; + return temp; +} +inline ::opencv_onnx::SparseTensorProto* AttributeProto::_internal_mutable_sparse_tensor() { + _has_bits_[0] |= 0x00000080u; + if (sparse_tensor_ == nullptr) { + auto* p = CreateMaybeMessage<::opencv_onnx::SparseTensorProto>(GetArenaForAllocation()); + sparse_tensor_ = p; + } + return sparse_tensor_; +} +inline ::opencv_onnx::SparseTensorProto* AttributeProto::mutable_sparse_tensor() { + ::opencv_onnx::SparseTensorProto* _msg = _internal_mutable_sparse_tensor(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.sparse_tensor) + return _msg; +} +inline void AttributeProto::set_allocated_sparse_tensor(::opencv_onnx::SparseTensorProto* sparse_tensor) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete sparse_tensor_; + } + if (sparse_tensor) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::SparseTensorProto>::GetOwningArena(sparse_tensor); + if (message_arena != submessage_arena) { + sparse_tensor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, sparse_tensor, submessage_arena); + } + _has_bits_[0] |= 0x00000080u; + } else { + _has_bits_[0] &= ~0x00000080u; + } + sparse_tensor_ = sparse_tensor; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.AttributeProto.sparse_tensor) +} + +// optional .opencv_onnx.TypeProto tp = 14; +inline bool AttributeProto::_internal_has_tp() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + PROTOBUF_ASSUME(!value || tp_ != nullptr); + return value; +} +inline bool AttributeProto::has_tp() const { + return _internal_has_tp(); +} +inline void AttributeProto::clear_tp() { + if (tp_ != nullptr) tp_->Clear(); + _has_bits_[0] &= ~0x00000040u; +} +inline const ::opencv_onnx::TypeProto& AttributeProto::_internal_tp() const { + const ::opencv_onnx::TypeProto* p = tp_; + return p != nullptr ? *p : reinterpret_cast( + ::opencv_onnx::_TypeProto_default_instance_); +} +inline const ::opencv_onnx::TypeProto& AttributeProto::tp() const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.tp) + return _internal_tp(); +} +inline void AttributeProto::unsafe_arena_set_allocated_tp( + ::opencv_onnx::TypeProto* tp) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tp_); + } + tp_ = tp; + if (tp) { + _has_bits_[0] |= 0x00000040u; + } else { + _has_bits_[0] &= ~0x00000040u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.AttributeProto.tp) +} +inline ::opencv_onnx::TypeProto* AttributeProto::release_tp() { + _has_bits_[0] &= ~0x00000040u; + ::opencv_onnx::TypeProto* temp = tp_; + tp_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::opencv_onnx::TypeProto* AttributeProto::unsafe_arena_release_tp() { + // @@protoc_insertion_point(field_release:opencv_onnx.AttributeProto.tp) + _has_bits_[0] &= ~0x00000040u; + ::opencv_onnx::TypeProto* temp = tp_; + tp_ = nullptr; + return temp; +} +inline ::opencv_onnx::TypeProto* AttributeProto::_internal_mutable_tp() { + _has_bits_[0] |= 0x00000040u; + if (tp_ == nullptr) { + auto* p = CreateMaybeMessage<::opencv_onnx::TypeProto>(GetArenaForAllocation()); + tp_ = p; + } + return tp_; +} +inline ::opencv_onnx::TypeProto* AttributeProto::mutable_tp() { + ::opencv_onnx::TypeProto* _msg = _internal_mutable_tp(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.tp) + return _msg; +} +inline void AttributeProto::set_allocated_tp(::opencv_onnx::TypeProto* tp) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete tp_; + } + if (tp) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto>::GetOwningArena(tp); + if (message_arena != submessage_arena) { + tp = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tp, submessage_arena); + } + _has_bits_[0] |= 0x00000040u; + } else { + _has_bits_[0] &= ~0x00000040u; + } + tp_ = tp; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.AttributeProto.tp) +} + // repeated float floats = 7; inline int AttributeProto::_internal_floats_size() const { return floats_.size(); @@ -4337,6 +7550,86 @@ AttributeProto::graphs() const { return graphs_; } +// repeated .opencv_onnx.SparseTensorProto sparse_tensors = 23; +inline int AttributeProto::_internal_sparse_tensors_size() const { + return sparse_tensors_.size(); +} +inline int AttributeProto::sparse_tensors_size() const { + return _internal_sparse_tensors_size(); +} +inline void AttributeProto::clear_sparse_tensors() { + sparse_tensors_.Clear(); +} +inline ::opencv_onnx::SparseTensorProto* AttributeProto::mutable_sparse_tensors(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.sparse_tensors) + return sparse_tensors_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SparseTensorProto >* +AttributeProto::mutable_sparse_tensors() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.AttributeProto.sparse_tensors) + return &sparse_tensors_; +} +inline const ::opencv_onnx::SparseTensorProto& AttributeProto::_internal_sparse_tensors(int index) const { + return sparse_tensors_.Get(index); +} +inline const ::opencv_onnx::SparseTensorProto& AttributeProto::sparse_tensors(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.sparse_tensors) + return _internal_sparse_tensors(index); +} +inline ::opencv_onnx::SparseTensorProto* AttributeProto::_internal_add_sparse_tensors() { + return sparse_tensors_.Add(); +} +inline ::opencv_onnx::SparseTensorProto* AttributeProto::add_sparse_tensors() { + ::opencv_onnx::SparseTensorProto* _add = _internal_add_sparse_tensors(); + // @@protoc_insertion_point(field_add:opencv_onnx.AttributeProto.sparse_tensors) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SparseTensorProto >& +AttributeProto::sparse_tensors() const { + // @@protoc_insertion_point(field_list:opencv_onnx.AttributeProto.sparse_tensors) + return sparse_tensors_; +} + +// repeated .opencv_onnx.TypeProto type_protos = 15; +inline int AttributeProto::_internal_type_protos_size() const { + return type_protos_.size(); +} +inline int AttributeProto::type_protos_size() const { + return _internal_type_protos_size(); +} +inline void AttributeProto::clear_type_protos() { + type_protos_.Clear(); +} +inline ::opencv_onnx::TypeProto* AttributeProto::mutable_type_protos(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.AttributeProto.type_protos) + return type_protos_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TypeProto >* +AttributeProto::mutable_type_protos() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.AttributeProto.type_protos) + return &type_protos_; +} +inline const ::opencv_onnx::TypeProto& AttributeProto::_internal_type_protos(int index) const { + return type_protos_.Get(index); +} +inline const ::opencv_onnx::TypeProto& AttributeProto::type_protos(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.AttributeProto.type_protos) + return _internal_type_protos(index); +} +inline ::opencv_onnx::TypeProto* AttributeProto::_internal_add_type_protos() { + return type_protos_.Add(); +} +inline ::opencv_onnx::TypeProto* AttributeProto::add_type_protos() { + ::opencv_onnx::TypeProto* _add = _internal_add_type_protos(); + // @@protoc_insertion_point(field_add:opencv_onnx.AttributeProto.type_protos) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TypeProto >& +AttributeProto::type_protos() const { + // @@protoc_insertion_point(field_list:opencv_onnx.AttributeProto.type_protos) + return type_protos_; +} + // ------------------------------------------------------------------- // ValueInfoProto @@ -4569,6 +7862,46 @@ inline void ValueInfoProto::set_allocated_doc_string(std::string* doc_string) { // @@protoc_insertion_point(field_set_allocated:opencv_onnx.ValueInfoProto.doc_string) } +// repeated .opencv_onnx.StringStringEntryProto metadata_props = 4; +inline int ValueInfoProto::_internal_metadata_props_size() const { + return metadata_props_.size(); +} +inline int ValueInfoProto::metadata_props_size() const { + return _internal_metadata_props_size(); +} +inline void ValueInfoProto::clear_metadata_props() { + metadata_props_.Clear(); +} +inline ::opencv_onnx::StringStringEntryProto* ValueInfoProto::mutable_metadata_props(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.ValueInfoProto.metadata_props) + return metadata_props_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* +ValueInfoProto::mutable_metadata_props() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.ValueInfoProto.metadata_props) + return &metadata_props_; +} +inline const ::opencv_onnx::StringStringEntryProto& ValueInfoProto::_internal_metadata_props(int index) const { + return metadata_props_.Get(index); +} +inline const ::opencv_onnx::StringStringEntryProto& ValueInfoProto::metadata_props(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.ValueInfoProto.metadata_props) + return _internal_metadata_props(index); +} +inline ::opencv_onnx::StringStringEntryProto* ValueInfoProto::_internal_add_metadata_props() { + return metadata_props_.Add(); +} +inline ::opencv_onnx::StringStringEntryProto* ValueInfoProto::add_metadata_props() { + ::opencv_onnx::StringStringEntryProto* _add = _internal_add_metadata_props(); + // @@protoc_insertion_point(field_add:opencv_onnx.ValueInfoProto.metadata_props) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& +ValueInfoProto::metadata_props() const { + // @@protoc_insertion_point(field_list:opencv_onnx.ValueInfoProto.metadata_props) + return metadata_props_; +} + // ------------------------------------------------------------------- // NodeProto @@ -4930,6 +8263,75 @@ inline void NodeProto::set_allocated_domain(std::string* domain) { // @@protoc_insertion_point(field_set_allocated:opencv_onnx.NodeProto.domain) } +// optional string overload = 8; +inline bool NodeProto::_internal_has_overload() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool NodeProto::has_overload() const { + return _internal_has_overload(); +} +inline void NodeProto::clear_overload() { + overload_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000010u; +} +inline const std::string& NodeProto::overload() const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeProto.overload) + return _internal_overload(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void NodeProto::set_overload(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000010u; + overload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opencv_onnx.NodeProto.overload) +} +inline std::string* NodeProto::mutable_overload() { + std::string* _s = _internal_mutable_overload(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeProto.overload) + return _s; +} +inline const std::string& NodeProto::_internal_overload() const { + return overload_.Get(); +} +inline void NodeProto::_internal_set_overload(const std::string& value) { + _has_bits_[0] |= 0x00000010u; + overload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* NodeProto::_internal_mutable_overload() { + _has_bits_[0] |= 0x00000010u; + return overload_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* NodeProto::release_overload() { + // @@protoc_insertion_point(field_release:opencv_onnx.NodeProto.overload) + if (!_internal_has_overload()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000010u; + auto* p = overload_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (overload_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void NodeProto::set_allocated_overload(std::string* overload) { + if (overload != nullptr) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + overload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), overload, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (overload_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.NodeProto.overload) +} + // repeated .opencv_onnx.AttributeProto attribute = 5; inline int NodeProto::_internal_attribute_size() const { return attribute_.size(); @@ -5039,6 +8441,1003 @@ inline void NodeProto::set_allocated_doc_string(std::string* doc_string) { // @@protoc_insertion_point(field_set_allocated:opencv_onnx.NodeProto.doc_string) } +// repeated .opencv_onnx.StringStringEntryProto metadata_props = 9; +inline int NodeProto::_internal_metadata_props_size() const { + return metadata_props_.size(); +} +inline int NodeProto::metadata_props_size() const { + return _internal_metadata_props_size(); +} +inline void NodeProto::clear_metadata_props() { + metadata_props_.Clear(); +} +inline ::opencv_onnx::StringStringEntryProto* NodeProto::mutable_metadata_props(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeProto.metadata_props) + return metadata_props_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* +NodeProto::mutable_metadata_props() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.NodeProto.metadata_props) + return &metadata_props_; +} +inline const ::opencv_onnx::StringStringEntryProto& NodeProto::_internal_metadata_props(int index) const { + return metadata_props_.Get(index); +} +inline const ::opencv_onnx::StringStringEntryProto& NodeProto::metadata_props(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeProto.metadata_props) + return _internal_metadata_props(index); +} +inline ::opencv_onnx::StringStringEntryProto* NodeProto::_internal_add_metadata_props() { + return metadata_props_.Add(); +} +inline ::opencv_onnx::StringStringEntryProto* NodeProto::add_metadata_props() { + ::opencv_onnx::StringStringEntryProto* _add = _internal_add_metadata_props(); + // @@protoc_insertion_point(field_add:opencv_onnx.NodeProto.metadata_props) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& +NodeProto::metadata_props() const { + // @@protoc_insertion_point(field_list:opencv_onnx.NodeProto.metadata_props) + return metadata_props_; +} + +// repeated .opencv_onnx.NodeDeviceConfigurationProto device_configurations = 10; +inline int NodeProto::_internal_device_configurations_size() const { + return device_configurations_.size(); +} +inline int NodeProto::device_configurations_size() const { + return _internal_device_configurations_size(); +} +inline void NodeProto::clear_device_configurations() { + device_configurations_.Clear(); +} +inline ::opencv_onnx::NodeDeviceConfigurationProto* NodeProto::mutable_device_configurations(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeProto.device_configurations) + return device_configurations_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::NodeDeviceConfigurationProto >* +NodeProto::mutable_device_configurations() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.NodeProto.device_configurations) + return &device_configurations_; +} +inline const ::opencv_onnx::NodeDeviceConfigurationProto& NodeProto::_internal_device_configurations(int index) const { + return device_configurations_.Get(index); +} +inline const ::opencv_onnx::NodeDeviceConfigurationProto& NodeProto::device_configurations(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeProto.device_configurations) + return _internal_device_configurations(index); +} +inline ::opencv_onnx::NodeDeviceConfigurationProto* NodeProto::_internal_add_device_configurations() { + return device_configurations_.Add(); +} +inline ::opencv_onnx::NodeDeviceConfigurationProto* NodeProto::add_device_configurations() { + ::opencv_onnx::NodeDeviceConfigurationProto* _add = _internal_add_device_configurations(); + // @@protoc_insertion_point(field_add:opencv_onnx.NodeProto.device_configurations) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::NodeDeviceConfigurationProto >& +NodeProto::device_configurations() const { + // @@protoc_insertion_point(field_list:opencv_onnx.NodeProto.device_configurations) + return device_configurations_; +} + +// ------------------------------------------------------------------- + +// IntIntListEntryProto + +// optional int64 key = 1; +inline bool IntIntListEntryProto::_internal_has_key() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool IntIntListEntryProto::has_key() const { + return _internal_has_key(); +} +inline void IntIntListEntryProto::clear_key() { + key_ = int64_t{0}; + _has_bits_[0] &= ~0x00000001u; +} +inline int64_t IntIntListEntryProto::_internal_key() const { + return key_; +} +inline int64_t IntIntListEntryProto::key() const { + // @@protoc_insertion_point(field_get:opencv_onnx.IntIntListEntryProto.key) + return _internal_key(); +} +inline void IntIntListEntryProto::_internal_set_key(int64_t value) { + _has_bits_[0] |= 0x00000001u; + key_ = value; +} +inline void IntIntListEntryProto::set_key(int64_t value) { + _internal_set_key(value); + // @@protoc_insertion_point(field_set:opencv_onnx.IntIntListEntryProto.key) +} + +// repeated int64 value = 2; +inline int IntIntListEntryProto::_internal_value_size() const { + return value_.size(); +} +inline int IntIntListEntryProto::value_size() const { + return _internal_value_size(); +} +inline void IntIntListEntryProto::clear_value() { + value_.Clear(); +} +inline int64_t IntIntListEntryProto::_internal_value(int index) const { + return value_.Get(index); +} +inline int64_t IntIntListEntryProto::value(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.IntIntListEntryProto.value) + return _internal_value(index); +} +inline void IntIntListEntryProto::set_value(int index, int64_t value) { + value_.Set(index, value); + // @@protoc_insertion_point(field_set:opencv_onnx.IntIntListEntryProto.value) +} +inline void IntIntListEntryProto::_internal_add_value(int64_t value) { + value_.Add(value); +} +inline void IntIntListEntryProto::add_value(int64_t value) { + _internal_add_value(value); + // @@protoc_insertion_point(field_add:opencv_onnx.IntIntListEntryProto.value) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +IntIntListEntryProto::_internal_value() const { + return value_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +IntIntListEntryProto::value() const { + // @@protoc_insertion_point(field_list:opencv_onnx.IntIntListEntryProto.value) + return _internal_value(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +IntIntListEntryProto::_internal_mutable_value() { + return &value_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +IntIntListEntryProto::mutable_value() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.IntIntListEntryProto.value) + return _internal_mutable_value(); +} + +// ------------------------------------------------------------------- + +// NodeDeviceConfigurationProto + +// optional string configuration_id = 1; +inline bool NodeDeviceConfigurationProto::_internal_has_configuration_id() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool NodeDeviceConfigurationProto::has_configuration_id() const { + return _internal_has_configuration_id(); +} +inline void NodeDeviceConfigurationProto::clear_configuration_id() { + configuration_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& NodeDeviceConfigurationProto::configuration_id() const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeDeviceConfigurationProto.configuration_id) + return _internal_configuration_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void NodeDeviceConfigurationProto::set_configuration_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + configuration_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opencv_onnx.NodeDeviceConfigurationProto.configuration_id) +} +inline std::string* NodeDeviceConfigurationProto::mutable_configuration_id() { + std::string* _s = _internal_mutable_configuration_id(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeDeviceConfigurationProto.configuration_id) + return _s; +} +inline const std::string& NodeDeviceConfigurationProto::_internal_configuration_id() const { + return configuration_id_.Get(); +} +inline void NodeDeviceConfigurationProto::_internal_set_configuration_id(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + configuration_id_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* NodeDeviceConfigurationProto::_internal_mutable_configuration_id() { + _has_bits_[0] |= 0x00000001u; + return configuration_id_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* NodeDeviceConfigurationProto::release_configuration_id() { + // @@protoc_insertion_point(field_release:opencv_onnx.NodeDeviceConfigurationProto.configuration_id) + if (!_internal_has_configuration_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = configuration_id_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (configuration_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + configuration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void NodeDeviceConfigurationProto::set_allocated_configuration_id(std::string* configuration_id) { + if (configuration_id != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + configuration_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), configuration_id, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (configuration_id_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + configuration_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.NodeDeviceConfigurationProto.configuration_id) +} + +// repeated .opencv_onnx.ShardingSpecProto sharding_spec = 2; +inline int NodeDeviceConfigurationProto::_internal_sharding_spec_size() const { + return sharding_spec_.size(); +} +inline int NodeDeviceConfigurationProto::sharding_spec_size() const { + return _internal_sharding_spec_size(); +} +inline void NodeDeviceConfigurationProto::clear_sharding_spec() { + sharding_spec_.Clear(); +} +inline ::opencv_onnx::ShardingSpecProto* NodeDeviceConfigurationProto::mutable_sharding_spec(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.NodeDeviceConfigurationProto.sharding_spec) + return sharding_spec_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ShardingSpecProto >* +NodeDeviceConfigurationProto::mutable_sharding_spec() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.NodeDeviceConfigurationProto.sharding_spec) + return &sharding_spec_; +} +inline const ::opencv_onnx::ShardingSpecProto& NodeDeviceConfigurationProto::_internal_sharding_spec(int index) const { + return sharding_spec_.Get(index); +} +inline const ::opencv_onnx::ShardingSpecProto& NodeDeviceConfigurationProto::sharding_spec(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeDeviceConfigurationProto.sharding_spec) + return _internal_sharding_spec(index); +} +inline ::opencv_onnx::ShardingSpecProto* NodeDeviceConfigurationProto::_internal_add_sharding_spec() { + return sharding_spec_.Add(); +} +inline ::opencv_onnx::ShardingSpecProto* NodeDeviceConfigurationProto::add_sharding_spec() { + ::opencv_onnx::ShardingSpecProto* _add = _internal_add_sharding_spec(); + // @@protoc_insertion_point(field_add:opencv_onnx.NodeDeviceConfigurationProto.sharding_spec) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ShardingSpecProto >& +NodeDeviceConfigurationProto::sharding_spec() const { + // @@protoc_insertion_point(field_list:opencv_onnx.NodeDeviceConfigurationProto.sharding_spec) + return sharding_spec_; +} + +// optional int32 pipeline_stage = 3; +inline bool NodeDeviceConfigurationProto::_internal_has_pipeline_stage() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool NodeDeviceConfigurationProto::has_pipeline_stage() const { + return _internal_has_pipeline_stage(); +} +inline void NodeDeviceConfigurationProto::clear_pipeline_stage() { + pipeline_stage_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t NodeDeviceConfigurationProto::_internal_pipeline_stage() const { + return pipeline_stage_; +} +inline int32_t NodeDeviceConfigurationProto::pipeline_stage() const { + // @@protoc_insertion_point(field_get:opencv_onnx.NodeDeviceConfigurationProto.pipeline_stage) + return _internal_pipeline_stage(); +} +inline void NodeDeviceConfigurationProto::_internal_set_pipeline_stage(int32_t value) { + _has_bits_[0] |= 0x00000002u; + pipeline_stage_ = value; +} +inline void NodeDeviceConfigurationProto::set_pipeline_stage(int32_t value) { + _internal_set_pipeline_stage(value); + // @@protoc_insertion_point(field_set:opencv_onnx.NodeDeviceConfigurationProto.pipeline_stage) +} + +// ------------------------------------------------------------------- + +// ShardingSpecProto + +// optional string tensor_name = 1; +inline bool ShardingSpecProto::_internal_has_tensor_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ShardingSpecProto::has_tensor_name() const { + return _internal_has_tensor_name(); +} +inline void ShardingSpecProto::clear_tensor_name() { + tensor_name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ShardingSpecProto::tensor_name() const { + // @@protoc_insertion_point(field_get:opencv_onnx.ShardingSpecProto.tensor_name) + return _internal_tensor_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ShardingSpecProto::set_tensor_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + tensor_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opencv_onnx.ShardingSpecProto.tensor_name) +} +inline std::string* ShardingSpecProto::mutable_tensor_name() { + std::string* _s = _internal_mutable_tensor_name(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.ShardingSpecProto.tensor_name) + return _s; +} +inline const std::string& ShardingSpecProto::_internal_tensor_name() const { + return tensor_name_.Get(); +} +inline void ShardingSpecProto::_internal_set_tensor_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + tensor_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* ShardingSpecProto::_internal_mutable_tensor_name() { + _has_bits_[0] |= 0x00000001u; + return tensor_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* ShardingSpecProto::release_tensor_name() { + // @@protoc_insertion_point(field_release:opencv_onnx.ShardingSpecProto.tensor_name) + if (!_internal_has_tensor_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = tensor_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (tensor_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ShardingSpecProto::set_allocated_tensor_name(std::string* tensor_name) { + if (tensor_name != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + tensor_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tensor_name, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (tensor_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.ShardingSpecProto.tensor_name) +} + +// repeated int64 device = 2; +inline int ShardingSpecProto::_internal_device_size() const { + return device_.size(); +} +inline int ShardingSpecProto::device_size() const { + return _internal_device_size(); +} +inline void ShardingSpecProto::clear_device() { + device_.Clear(); +} +inline int64_t ShardingSpecProto::_internal_device(int index) const { + return device_.Get(index); +} +inline int64_t ShardingSpecProto::device(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.ShardingSpecProto.device) + return _internal_device(index); +} +inline void ShardingSpecProto::set_device(int index, int64_t value) { + device_.Set(index, value); + // @@protoc_insertion_point(field_set:opencv_onnx.ShardingSpecProto.device) +} +inline void ShardingSpecProto::_internal_add_device(int64_t value) { + device_.Add(value); +} +inline void ShardingSpecProto::add_device(int64_t value) { + _internal_add_device(value); + // @@protoc_insertion_point(field_add:opencv_onnx.ShardingSpecProto.device) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +ShardingSpecProto::_internal_device() const { + return device_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +ShardingSpecProto::device() const { + // @@protoc_insertion_point(field_list:opencv_onnx.ShardingSpecProto.device) + return _internal_device(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +ShardingSpecProto::_internal_mutable_device() { + return &device_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +ShardingSpecProto::mutable_device() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.ShardingSpecProto.device) + return _internal_mutable_device(); +} + +// repeated .opencv_onnx.IntIntListEntryProto index_to_device_group_map = 3; +inline int ShardingSpecProto::_internal_index_to_device_group_map_size() const { + return index_to_device_group_map_.size(); +} +inline int ShardingSpecProto::index_to_device_group_map_size() const { + return _internal_index_to_device_group_map_size(); +} +inline void ShardingSpecProto::clear_index_to_device_group_map() { + index_to_device_group_map_.Clear(); +} +inline ::opencv_onnx::IntIntListEntryProto* ShardingSpecProto::mutable_index_to_device_group_map(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.ShardingSpecProto.index_to_device_group_map) + return index_to_device_group_map_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::IntIntListEntryProto >* +ShardingSpecProto::mutable_index_to_device_group_map() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.ShardingSpecProto.index_to_device_group_map) + return &index_to_device_group_map_; +} +inline const ::opencv_onnx::IntIntListEntryProto& ShardingSpecProto::_internal_index_to_device_group_map(int index) const { + return index_to_device_group_map_.Get(index); +} +inline const ::opencv_onnx::IntIntListEntryProto& ShardingSpecProto::index_to_device_group_map(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.ShardingSpecProto.index_to_device_group_map) + return _internal_index_to_device_group_map(index); +} +inline ::opencv_onnx::IntIntListEntryProto* ShardingSpecProto::_internal_add_index_to_device_group_map() { + return index_to_device_group_map_.Add(); +} +inline ::opencv_onnx::IntIntListEntryProto* ShardingSpecProto::add_index_to_device_group_map() { + ::opencv_onnx::IntIntListEntryProto* _add = _internal_add_index_to_device_group_map(); + // @@protoc_insertion_point(field_add:opencv_onnx.ShardingSpecProto.index_to_device_group_map) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::IntIntListEntryProto >& +ShardingSpecProto::index_to_device_group_map() const { + // @@protoc_insertion_point(field_list:opencv_onnx.ShardingSpecProto.index_to_device_group_map) + return index_to_device_group_map_; +} + +// repeated .opencv_onnx.ShardedDimProto sharded_dim = 4; +inline int ShardingSpecProto::_internal_sharded_dim_size() const { + return sharded_dim_.size(); +} +inline int ShardingSpecProto::sharded_dim_size() const { + return _internal_sharded_dim_size(); +} +inline void ShardingSpecProto::clear_sharded_dim() { + sharded_dim_.Clear(); +} +inline ::opencv_onnx::ShardedDimProto* ShardingSpecProto::mutable_sharded_dim(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.ShardingSpecProto.sharded_dim) + return sharded_dim_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ShardedDimProto >* +ShardingSpecProto::mutable_sharded_dim() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.ShardingSpecProto.sharded_dim) + return &sharded_dim_; +} +inline const ::opencv_onnx::ShardedDimProto& ShardingSpecProto::_internal_sharded_dim(int index) const { + return sharded_dim_.Get(index); +} +inline const ::opencv_onnx::ShardedDimProto& ShardingSpecProto::sharded_dim(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.ShardingSpecProto.sharded_dim) + return _internal_sharded_dim(index); +} +inline ::opencv_onnx::ShardedDimProto* ShardingSpecProto::_internal_add_sharded_dim() { + return sharded_dim_.Add(); +} +inline ::opencv_onnx::ShardedDimProto* ShardingSpecProto::add_sharded_dim() { + ::opencv_onnx::ShardedDimProto* _add = _internal_add_sharded_dim(); + // @@protoc_insertion_point(field_add:opencv_onnx.ShardingSpecProto.sharded_dim) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ShardedDimProto >& +ShardingSpecProto::sharded_dim() const { + // @@protoc_insertion_point(field_list:opencv_onnx.ShardingSpecProto.sharded_dim) + return sharded_dim_; +} + +// ------------------------------------------------------------------- + +// ShardedDimProto + +// optional int64 axis = 1; +inline bool ShardedDimProto::_internal_has_axis() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ShardedDimProto::has_axis() const { + return _internal_has_axis(); +} +inline void ShardedDimProto::clear_axis() { + axis_ = int64_t{0}; + _has_bits_[0] &= ~0x00000001u; +} +inline int64_t ShardedDimProto::_internal_axis() const { + return axis_; +} +inline int64_t ShardedDimProto::axis() const { + // @@protoc_insertion_point(field_get:opencv_onnx.ShardedDimProto.axis) + return _internal_axis(); +} +inline void ShardedDimProto::_internal_set_axis(int64_t value) { + _has_bits_[0] |= 0x00000001u; + axis_ = value; +} +inline void ShardedDimProto::set_axis(int64_t value) { + _internal_set_axis(value); + // @@protoc_insertion_point(field_set:opencv_onnx.ShardedDimProto.axis) +} + +// repeated .opencv_onnx.SimpleShardedDimProto simple_sharding = 2; +inline int ShardedDimProto::_internal_simple_sharding_size() const { + return simple_sharding_.size(); +} +inline int ShardedDimProto::simple_sharding_size() const { + return _internal_simple_sharding_size(); +} +inline void ShardedDimProto::clear_simple_sharding() { + simple_sharding_.Clear(); +} +inline ::opencv_onnx::SimpleShardedDimProto* ShardedDimProto::mutable_simple_sharding(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.ShardedDimProto.simple_sharding) + return simple_sharding_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SimpleShardedDimProto >* +ShardedDimProto::mutable_simple_sharding() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.ShardedDimProto.simple_sharding) + return &simple_sharding_; +} +inline const ::opencv_onnx::SimpleShardedDimProto& ShardedDimProto::_internal_simple_sharding(int index) const { + return simple_sharding_.Get(index); +} +inline const ::opencv_onnx::SimpleShardedDimProto& ShardedDimProto::simple_sharding(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.ShardedDimProto.simple_sharding) + return _internal_simple_sharding(index); +} +inline ::opencv_onnx::SimpleShardedDimProto* ShardedDimProto::_internal_add_simple_sharding() { + return simple_sharding_.Add(); +} +inline ::opencv_onnx::SimpleShardedDimProto* ShardedDimProto::add_simple_sharding() { + ::opencv_onnx::SimpleShardedDimProto* _add = _internal_add_simple_sharding(); + // @@protoc_insertion_point(field_add:opencv_onnx.ShardedDimProto.simple_sharding) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SimpleShardedDimProto >& +ShardedDimProto::simple_sharding() const { + // @@protoc_insertion_point(field_list:opencv_onnx.ShardedDimProto.simple_sharding) + return simple_sharding_; +} + +// ------------------------------------------------------------------- + +// SimpleShardedDimProto + +// int64 dim_value = 1; +inline bool SimpleShardedDimProto::_internal_has_dim_value() const { + return dim_case() == kDimValue; +} +inline bool SimpleShardedDimProto::has_dim_value() const { + return _internal_has_dim_value(); +} +inline void SimpleShardedDimProto::set_has_dim_value() { + _oneof_case_[0] = kDimValue; +} +inline void SimpleShardedDimProto::clear_dim_value() { + if (_internal_has_dim_value()) { + dim_.dim_value_ = int64_t{0}; + clear_has_dim(); + } +} +inline int64_t SimpleShardedDimProto::_internal_dim_value() const { + if (_internal_has_dim_value()) { + return dim_.dim_value_; + } + return int64_t{0}; +} +inline void SimpleShardedDimProto::_internal_set_dim_value(int64_t value) { + if (!_internal_has_dim_value()) { + clear_dim(); + set_has_dim_value(); + } + dim_.dim_value_ = value; +} +inline int64_t SimpleShardedDimProto::dim_value() const { + // @@protoc_insertion_point(field_get:opencv_onnx.SimpleShardedDimProto.dim_value) + return _internal_dim_value(); +} +inline void SimpleShardedDimProto::set_dim_value(int64_t value) { + _internal_set_dim_value(value); + // @@protoc_insertion_point(field_set:opencv_onnx.SimpleShardedDimProto.dim_value) +} + +// string dim_param = 2; +inline bool SimpleShardedDimProto::_internal_has_dim_param() const { + return dim_case() == kDimParam; +} +inline bool SimpleShardedDimProto::has_dim_param() const { + return _internal_has_dim_param(); +} +inline void SimpleShardedDimProto::set_has_dim_param() { + _oneof_case_[0] = kDimParam; +} +inline void SimpleShardedDimProto::clear_dim_param() { + if (_internal_has_dim_param()) { + dim_.dim_param_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); + clear_has_dim(); + } +} +inline const std::string& SimpleShardedDimProto::dim_param() const { + // @@protoc_insertion_point(field_get:opencv_onnx.SimpleShardedDimProto.dim_param) + return _internal_dim_param(); +} +template +inline void SimpleShardedDimProto::set_dim_param(ArgT0&& arg0, ArgT... args) { + if (!_internal_has_dim_param()) { + clear_dim(); + set_has_dim_param(); + dim_.dim_param_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + dim_.dim_param_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opencv_onnx.SimpleShardedDimProto.dim_param) +} +inline std::string* SimpleShardedDimProto::mutable_dim_param() { + std::string* _s = _internal_mutable_dim_param(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.SimpleShardedDimProto.dim_param) + return _s; +} +inline const std::string& SimpleShardedDimProto::_internal_dim_param() const { + if (_internal_has_dim_param()) { + return dim_.dim_param_.Get(); + } + return ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(); +} +inline void SimpleShardedDimProto::_internal_set_dim_param(const std::string& value) { + if (!_internal_has_dim_param()) { + clear_dim(); + set_has_dim_param(); + dim_.dim_param_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + dim_.dim_param_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* SimpleShardedDimProto::_internal_mutable_dim_param() { + if (!_internal_has_dim_param()) { + clear_dim(); + set_has_dim_param(); + dim_.dim_param_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + } + return dim_.dim_param_.Mutable( + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* SimpleShardedDimProto::release_dim_param() { + // @@protoc_insertion_point(field_release:opencv_onnx.SimpleShardedDimProto.dim_param) + if (_internal_has_dim_param()) { + clear_has_dim(); + return dim_.dim_param_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); + } else { + return nullptr; + } +} +inline void SimpleShardedDimProto::set_allocated_dim_param(std::string* dim_param) { + if (has_dim()) { + clear_dim(); + } + if (dim_param != nullptr) { + set_has_dim_param(); + dim_.dim_param_.UnsafeSetDefault(dim_param); + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaForAllocation(); + if (arena != nullptr) { + arena->Own(dim_param); + } + } + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.SimpleShardedDimProto.dim_param) +} + +// optional int64 num_shards = 3; +inline bool SimpleShardedDimProto::_internal_has_num_shards() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool SimpleShardedDimProto::has_num_shards() const { + return _internal_has_num_shards(); +} +inline void SimpleShardedDimProto::clear_num_shards() { + num_shards_ = int64_t{0}; + _has_bits_[0] &= ~0x00000001u; +} +inline int64_t SimpleShardedDimProto::_internal_num_shards() const { + return num_shards_; +} +inline int64_t SimpleShardedDimProto::num_shards() const { + // @@protoc_insertion_point(field_get:opencv_onnx.SimpleShardedDimProto.num_shards) + return _internal_num_shards(); +} +inline void SimpleShardedDimProto::_internal_set_num_shards(int64_t value) { + _has_bits_[0] |= 0x00000001u; + num_shards_ = value; +} +inline void SimpleShardedDimProto::set_num_shards(int64_t value) { + _internal_set_num_shards(value); + // @@protoc_insertion_point(field_set:opencv_onnx.SimpleShardedDimProto.num_shards) +} + +inline bool SimpleShardedDimProto::has_dim() const { + return dim_case() != DIM_NOT_SET; +} +inline void SimpleShardedDimProto::clear_has_dim() { + _oneof_case_[0] = DIM_NOT_SET; +} +inline SimpleShardedDimProto::DimCase SimpleShardedDimProto::dim_case() const { + return SimpleShardedDimProto::DimCase(_oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// TrainingInfoProto + +// optional .opencv_onnx.GraphProto initialization = 1; +inline bool TrainingInfoProto::_internal_has_initialization() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || initialization_ != nullptr); + return value; +} +inline bool TrainingInfoProto::has_initialization() const { + return _internal_has_initialization(); +} +inline void TrainingInfoProto::clear_initialization() { + if (initialization_ != nullptr) initialization_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::opencv_onnx::GraphProto& TrainingInfoProto::_internal_initialization() const { + const ::opencv_onnx::GraphProto* p = initialization_; + return p != nullptr ? *p : reinterpret_cast( + ::opencv_onnx::_GraphProto_default_instance_); +} +inline const ::opencv_onnx::GraphProto& TrainingInfoProto::initialization() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TrainingInfoProto.initialization) + return _internal_initialization(); +} +inline void TrainingInfoProto::unsafe_arena_set_allocated_initialization( + ::opencv_onnx::GraphProto* initialization) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(initialization_); + } + initialization_ = initialization; + if (initialization) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.TrainingInfoProto.initialization) +} +inline ::opencv_onnx::GraphProto* TrainingInfoProto::release_initialization() { + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::GraphProto* temp = initialization_; + initialization_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::opencv_onnx::GraphProto* TrainingInfoProto::unsafe_arena_release_initialization() { + // @@protoc_insertion_point(field_release:opencv_onnx.TrainingInfoProto.initialization) + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::GraphProto* temp = initialization_; + initialization_ = nullptr; + return temp; +} +inline ::opencv_onnx::GraphProto* TrainingInfoProto::_internal_mutable_initialization() { + _has_bits_[0] |= 0x00000001u; + if (initialization_ == nullptr) { + auto* p = CreateMaybeMessage<::opencv_onnx::GraphProto>(GetArenaForAllocation()); + initialization_ = p; + } + return initialization_; +} +inline ::opencv_onnx::GraphProto* TrainingInfoProto::mutable_initialization() { + ::opencv_onnx::GraphProto* _msg = _internal_mutable_initialization(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TrainingInfoProto.initialization) + return _msg; +} +inline void TrainingInfoProto::set_allocated_initialization(::opencv_onnx::GraphProto* initialization) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete initialization_; + } + if (initialization) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::GraphProto>::GetOwningArena(initialization); + if (message_arena != submessage_arena) { + initialization = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, initialization, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + initialization_ = initialization; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TrainingInfoProto.initialization) +} + +// optional .opencv_onnx.GraphProto algorithm = 2; +inline bool TrainingInfoProto::_internal_has_algorithm() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || algorithm_ != nullptr); + return value; +} +inline bool TrainingInfoProto::has_algorithm() const { + return _internal_has_algorithm(); +} +inline void TrainingInfoProto::clear_algorithm() { + if (algorithm_ != nullptr) algorithm_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::opencv_onnx::GraphProto& TrainingInfoProto::_internal_algorithm() const { + const ::opencv_onnx::GraphProto* p = algorithm_; + return p != nullptr ? *p : reinterpret_cast( + ::opencv_onnx::_GraphProto_default_instance_); +} +inline const ::opencv_onnx::GraphProto& TrainingInfoProto::algorithm() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TrainingInfoProto.algorithm) + return _internal_algorithm(); +} +inline void TrainingInfoProto::unsafe_arena_set_allocated_algorithm( + ::opencv_onnx::GraphProto* algorithm) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(algorithm_); + } + algorithm_ = algorithm; + if (algorithm) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.TrainingInfoProto.algorithm) +} +inline ::opencv_onnx::GraphProto* TrainingInfoProto::release_algorithm() { + _has_bits_[0] &= ~0x00000002u; + ::opencv_onnx::GraphProto* temp = algorithm_; + algorithm_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::opencv_onnx::GraphProto* TrainingInfoProto::unsafe_arena_release_algorithm() { + // @@protoc_insertion_point(field_release:opencv_onnx.TrainingInfoProto.algorithm) + _has_bits_[0] &= ~0x00000002u; + ::opencv_onnx::GraphProto* temp = algorithm_; + algorithm_ = nullptr; + return temp; +} +inline ::opencv_onnx::GraphProto* TrainingInfoProto::_internal_mutable_algorithm() { + _has_bits_[0] |= 0x00000002u; + if (algorithm_ == nullptr) { + auto* p = CreateMaybeMessage<::opencv_onnx::GraphProto>(GetArenaForAllocation()); + algorithm_ = p; + } + return algorithm_; +} +inline ::opencv_onnx::GraphProto* TrainingInfoProto::mutable_algorithm() { + ::opencv_onnx::GraphProto* _msg = _internal_mutable_algorithm(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TrainingInfoProto.algorithm) + return _msg; +} +inline void TrainingInfoProto::set_allocated_algorithm(::opencv_onnx::GraphProto* algorithm) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete algorithm_; + } + if (algorithm) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::GraphProto>::GetOwningArena(algorithm); + if (message_arena != submessage_arena) { + algorithm = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, algorithm, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + algorithm_ = algorithm; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TrainingInfoProto.algorithm) +} + +// repeated .opencv_onnx.StringStringEntryProto initialization_binding = 3; +inline int TrainingInfoProto::_internal_initialization_binding_size() const { + return initialization_binding_.size(); +} +inline int TrainingInfoProto::initialization_binding_size() const { + return _internal_initialization_binding_size(); +} +inline void TrainingInfoProto::clear_initialization_binding() { + initialization_binding_.Clear(); +} +inline ::opencv_onnx::StringStringEntryProto* TrainingInfoProto::mutable_initialization_binding(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.TrainingInfoProto.initialization_binding) + return initialization_binding_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* +TrainingInfoProto::mutable_initialization_binding() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TrainingInfoProto.initialization_binding) + return &initialization_binding_; +} +inline const ::opencv_onnx::StringStringEntryProto& TrainingInfoProto::_internal_initialization_binding(int index) const { + return initialization_binding_.Get(index); +} +inline const ::opencv_onnx::StringStringEntryProto& TrainingInfoProto::initialization_binding(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TrainingInfoProto.initialization_binding) + return _internal_initialization_binding(index); +} +inline ::opencv_onnx::StringStringEntryProto* TrainingInfoProto::_internal_add_initialization_binding() { + return initialization_binding_.Add(); +} +inline ::opencv_onnx::StringStringEntryProto* TrainingInfoProto::add_initialization_binding() { + ::opencv_onnx::StringStringEntryProto* _add = _internal_add_initialization_binding(); + // @@protoc_insertion_point(field_add:opencv_onnx.TrainingInfoProto.initialization_binding) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& +TrainingInfoProto::initialization_binding() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TrainingInfoProto.initialization_binding) + return initialization_binding_; +} + +// repeated .opencv_onnx.StringStringEntryProto update_binding = 4; +inline int TrainingInfoProto::_internal_update_binding_size() const { + return update_binding_.size(); +} +inline int TrainingInfoProto::update_binding_size() const { + return _internal_update_binding_size(); +} +inline void TrainingInfoProto::clear_update_binding() { + update_binding_.Clear(); +} +inline ::opencv_onnx::StringStringEntryProto* TrainingInfoProto::mutable_update_binding(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.TrainingInfoProto.update_binding) + return update_binding_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* +TrainingInfoProto::mutable_update_binding() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TrainingInfoProto.update_binding) + return &update_binding_; +} +inline const ::opencv_onnx::StringStringEntryProto& TrainingInfoProto::_internal_update_binding(int index) const { + return update_binding_.Get(index); +} +inline const ::opencv_onnx::StringStringEntryProto& TrainingInfoProto::update_binding(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TrainingInfoProto.update_binding) + return _internal_update_binding(index); +} +inline ::opencv_onnx::StringStringEntryProto* TrainingInfoProto::_internal_add_update_binding() { + return update_binding_.Add(); +} +inline ::opencv_onnx::StringStringEntryProto* TrainingInfoProto::add_update_binding() { + ::opencv_onnx::StringStringEntryProto* _add = _internal_add_update_binding(); + // @@protoc_insertion_point(field_add:opencv_onnx.TrainingInfoProto.update_binding) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& +TrainingInfoProto::update_binding() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TrainingInfoProto.update_binding) + return update_binding_; +} + // ------------------------------------------------------------------- // ModelProto @@ -5545,6 +9944,302 @@ ModelProto::metadata_props() const { return metadata_props_; } +// repeated .opencv_onnx.TrainingInfoProto training_info = 20; +inline int ModelProto::_internal_training_info_size() const { + return training_info_.size(); +} +inline int ModelProto::training_info_size() const { + return _internal_training_info_size(); +} +inline void ModelProto::clear_training_info() { + training_info_.Clear(); +} +inline ::opencv_onnx::TrainingInfoProto* ModelProto::mutable_training_info(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.ModelProto.training_info) + return training_info_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TrainingInfoProto >* +ModelProto::mutable_training_info() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.ModelProto.training_info) + return &training_info_; +} +inline const ::opencv_onnx::TrainingInfoProto& ModelProto::_internal_training_info(int index) const { + return training_info_.Get(index); +} +inline const ::opencv_onnx::TrainingInfoProto& ModelProto::training_info(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.training_info) + return _internal_training_info(index); +} +inline ::opencv_onnx::TrainingInfoProto* ModelProto::_internal_add_training_info() { + return training_info_.Add(); +} +inline ::opencv_onnx::TrainingInfoProto* ModelProto::add_training_info() { + ::opencv_onnx::TrainingInfoProto* _add = _internal_add_training_info(); + // @@protoc_insertion_point(field_add:opencv_onnx.ModelProto.training_info) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TrainingInfoProto >& +ModelProto::training_info() const { + // @@protoc_insertion_point(field_list:opencv_onnx.ModelProto.training_info) + return training_info_; +} + +// repeated .opencv_onnx.FunctionProto functions = 25; +inline int ModelProto::_internal_functions_size() const { + return functions_.size(); +} +inline int ModelProto::functions_size() const { + return _internal_functions_size(); +} +inline void ModelProto::clear_functions() { + functions_.Clear(); +} +inline ::opencv_onnx::FunctionProto* ModelProto::mutable_functions(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.ModelProto.functions) + return functions_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::FunctionProto >* +ModelProto::mutable_functions() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.ModelProto.functions) + return &functions_; +} +inline const ::opencv_onnx::FunctionProto& ModelProto::_internal_functions(int index) const { + return functions_.Get(index); +} +inline const ::opencv_onnx::FunctionProto& ModelProto::functions(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.functions) + return _internal_functions(index); +} +inline ::opencv_onnx::FunctionProto* ModelProto::_internal_add_functions() { + return functions_.Add(); +} +inline ::opencv_onnx::FunctionProto* ModelProto::add_functions() { + ::opencv_onnx::FunctionProto* _add = _internal_add_functions(); + // @@protoc_insertion_point(field_add:opencv_onnx.ModelProto.functions) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::FunctionProto >& +ModelProto::functions() const { + // @@protoc_insertion_point(field_list:opencv_onnx.ModelProto.functions) + return functions_; +} + +// repeated .opencv_onnx.DeviceConfigurationProto configuration = 26; +inline int ModelProto::_internal_configuration_size() const { + return configuration_.size(); +} +inline int ModelProto::configuration_size() const { + return _internal_configuration_size(); +} +inline void ModelProto::clear_configuration() { + configuration_.Clear(); +} +inline ::opencv_onnx::DeviceConfigurationProto* ModelProto::mutable_configuration(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.ModelProto.configuration) + return configuration_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::DeviceConfigurationProto >* +ModelProto::mutable_configuration() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.ModelProto.configuration) + return &configuration_; +} +inline const ::opencv_onnx::DeviceConfigurationProto& ModelProto::_internal_configuration(int index) const { + return configuration_.Get(index); +} +inline const ::opencv_onnx::DeviceConfigurationProto& ModelProto::configuration(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.ModelProto.configuration) + return _internal_configuration(index); +} +inline ::opencv_onnx::DeviceConfigurationProto* ModelProto::_internal_add_configuration() { + return configuration_.Add(); +} +inline ::opencv_onnx::DeviceConfigurationProto* ModelProto::add_configuration() { + ::opencv_onnx::DeviceConfigurationProto* _add = _internal_add_configuration(); + // @@protoc_insertion_point(field_add:opencv_onnx.ModelProto.configuration) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::DeviceConfigurationProto >& +ModelProto::configuration() const { + // @@protoc_insertion_point(field_list:opencv_onnx.ModelProto.configuration) + return configuration_; +} + +// ------------------------------------------------------------------- + +// DeviceConfigurationProto + +// optional string name = 1; +inline bool DeviceConfigurationProto::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool DeviceConfigurationProto::has_name() const { + return _internal_has_name(); +} +inline void DeviceConfigurationProto::clear_name() { + name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& DeviceConfigurationProto::name() const { + // @@protoc_insertion_point(field_get:opencv_onnx.DeviceConfigurationProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void DeviceConfigurationProto::set_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opencv_onnx.DeviceConfigurationProto.name) +} +inline std::string* DeviceConfigurationProto::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.DeviceConfigurationProto.name) + return _s; +} +inline const std::string& DeviceConfigurationProto::_internal_name() const { + return name_.Get(); +} +inline void DeviceConfigurationProto::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* DeviceConfigurationProto::_internal_mutable_name() { + _has_bits_[0] |= 0x00000001u; + return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* DeviceConfigurationProto::release_name() { + // @@protoc_insertion_point(field_release:opencv_onnx.DeviceConfigurationProto.name) + if (!_internal_has_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void DeviceConfigurationProto::set_allocated_name(std::string* name) { + if (name != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.DeviceConfigurationProto.name) +} + +// optional int32 num_devices = 2; +inline bool DeviceConfigurationProto::_internal_has_num_devices() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool DeviceConfigurationProto::has_num_devices() const { + return _internal_has_num_devices(); +} +inline void DeviceConfigurationProto::clear_num_devices() { + num_devices_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t DeviceConfigurationProto::_internal_num_devices() const { + return num_devices_; +} +inline int32_t DeviceConfigurationProto::num_devices() const { + // @@protoc_insertion_point(field_get:opencv_onnx.DeviceConfigurationProto.num_devices) + return _internal_num_devices(); +} +inline void DeviceConfigurationProto::_internal_set_num_devices(int32_t value) { + _has_bits_[0] |= 0x00000002u; + num_devices_ = value; +} +inline void DeviceConfigurationProto::set_num_devices(int32_t value) { + _internal_set_num_devices(value); + // @@protoc_insertion_point(field_set:opencv_onnx.DeviceConfigurationProto.num_devices) +} + +// repeated string device = 3; +inline int DeviceConfigurationProto::_internal_device_size() const { + return device_.size(); +} +inline int DeviceConfigurationProto::device_size() const { + return _internal_device_size(); +} +inline void DeviceConfigurationProto::clear_device() { + device_.Clear(); +} +inline std::string* DeviceConfigurationProto::add_device() { + std::string* _s = _internal_add_device(); + // @@protoc_insertion_point(field_add_mutable:opencv_onnx.DeviceConfigurationProto.device) + return _s; +} +inline const std::string& DeviceConfigurationProto::_internal_device(int index) const { + return device_.Get(index); +} +inline const std::string& DeviceConfigurationProto::device(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.DeviceConfigurationProto.device) + return _internal_device(index); +} +inline std::string* DeviceConfigurationProto::mutable_device(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.DeviceConfigurationProto.device) + return device_.Mutable(index); +} +inline void DeviceConfigurationProto::set_device(int index, const std::string& value) { + device_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:opencv_onnx.DeviceConfigurationProto.device) +} +inline void DeviceConfigurationProto::set_device(int index, std::string&& value) { + device_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:opencv_onnx.DeviceConfigurationProto.device) +} +inline void DeviceConfigurationProto::set_device(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + device_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:opencv_onnx.DeviceConfigurationProto.device) +} +inline void DeviceConfigurationProto::set_device(int index, const char* value, size_t size) { + device_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.DeviceConfigurationProto.device) +} +inline std::string* DeviceConfigurationProto::_internal_add_device() { + return device_.Add(); +} +inline void DeviceConfigurationProto::add_device(const std::string& value) { + device_.Add()->assign(value); + // @@protoc_insertion_point(field_add:opencv_onnx.DeviceConfigurationProto.device) +} +inline void DeviceConfigurationProto::add_device(std::string&& value) { + device_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:opencv_onnx.DeviceConfigurationProto.device) +} +inline void DeviceConfigurationProto::add_device(const char* value) { + GOOGLE_DCHECK(value != nullptr); + device_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:opencv_onnx.DeviceConfigurationProto.device) +} +inline void DeviceConfigurationProto::add_device(const char* value, size_t size) { + device_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:opencv_onnx.DeviceConfigurationProto.device) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +DeviceConfigurationProto::device() const { + // @@protoc_insertion_point(field_list:opencv_onnx.DeviceConfigurationProto.device) + return device_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +DeviceConfigurationProto::mutable_device() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.DeviceConfigurationProto.device) + return &device_; +} + // ------------------------------------------------------------------- // StringStringEntryProto @@ -5689,6 +10384,119 @@ inline void StringStringEntryProto::set_allocated_value(std::string* value) { // ------------------------------------------------------------------- +// TensorAnnotation + +// optional string tensor_name = 1; +inline bool TensorAnnotation::_internal_has_tensor_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool TensorAnnotation::has_tensor_name() const { + return _internal_has_tensor_name(); +} +inline void TensorAnnotation::clear_tensor_name() { + tensor_name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& TensorAnnotation::tensor_name() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorAnnotation.tensor_name) + return _internal_tensor_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void TensorAnnotation::set_tensor_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + tensor_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorAnnotation.tensor_name) +} +inline std::string* TensorAnnotation::mutable_tensor_name() { + std::string* _s = _internal_mutable_tensor_name(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorAnnotation.tensor_name) + return _s; +} +inline const std::string& TensorAnnotation::_internal_tensor_name() const { + return tensor_name_.Get(); +} +inline void TensorAnnotation::_internal_set_tensor_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + tensor_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* TensorAnnotation::_internal_mutable_tensor_name() { + _has_bits_[0] |= 0x00000001u; + return tensor_name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* TensorAnnotation::release_tensor_name() { + // @@protoc_insertion_point(field_release:opencv_onnx.TensorAnnotation.tensor_name) + if (!_internal_has_tensor_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = tensor_name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (tensor_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void TensorAnnotation::set_allocated_tensor_name(std::string* tensor_name) { + if (tensor_name != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + tensor_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tensor_name, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (tensor_name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + tensor_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TensorAnnotation.tensor_name) +} + +// repeated .opencv_onnx.StringStringEntryProto quant_parameter_tensor_names = 2; +inline int TensorAnnotation::_internal_quant_parameter_tensor_names_size() const { + return quant_parameter_tensor_names_.size(); +} +inline int TensorAnnotation::quant_parameter_tensor_names_size() const { + return _internal_quant_parameter_tensor_names_size(); +} +inline void TensorAnnotation::clear_quant_parameter_tensor_names() { + quant_parameter_tensor_names_.Clear(); +} +inline ::opencv_onnx::StringStringEntryProto* TensorAnnotation::mutable_quant_parameter_tensor_names(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorAnnotation.quant_parameter_tensor_names) + return quant_parameter_tensor_names_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* +TensorAnnotation::mutable_quant_parameter_tensor_names() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TensorAnnotation.quant_parameter_tensor_names) + return &quant_parameter_tensor_names_; +} +inline const ::opencv_onnx::StringStringEntryProto& TensorAnnotation::_internal_quant_parameter_tensor_names(int index) const { + return quant_parameter_tensor_names_.Get(index); +} +inline const ::opencv_onnx::StringStringEntryProto& TensorAnnotation::quant_parameter_tensor_names(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorAnnotation.quant_parameter_tensor_names) + return _internal_quant_parameter_tensor_names(index); +} +inline ::opencv_onnx::StringStringEntryProto* TensorAnnotation::_internal_add_quant_parameter_tensor_names() { + return quant_parameter_tensor_names_.Add(); +} +inline ::opencv_onnx::StringStringEntryProto* TensorAnnotation::add_quant_parameter_tensor_names() { + ::opencv_onnx::StringStringEntryProto* _add = _internal_add_quant_parameter_tensor_names(); + // @@protoc_insertion_point(field_add:opencv_onnx.TensorAnnotation.quant_parameter_tensor_names) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& +TensorAnnotation::quant_parameter_tensor_names() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TensorAnnotation.quant_parameter_tensor_names) + return quant_parameter_tensor_names_; +} + +// ------------------------------------------------------------------- + // GraphProto // repeated .opencv_onnx.NodeProto node = 1; @@ -5840,6 +10648,46 @@ GraphProto::initializer() const { return initializer_; } +// repeated .opencv_onnx.SparseTensorProto sparse_initializer = 15; +inline int GraphProto::_internal_sparse_initializer_size() const { + return sparse_initializer_.size(); +} +inline int GraphProto::sparse_initializer_size() const { + return _internal_sparse_initializer_size(); +} +inline void GraphProto::clear_sparse_initializer() { + sparse_initializer_.Clear(); +} +inline ::opencv_onnx::SparseTensorProto* GraphProto::mutable_sparse_initializer(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.GraphProto.sparse_initializer) + return sparse_initializer_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SparseTensorProto >* +GraphProto::mutable_sparse_initializer() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.GraphProto.sparse_initializer) + return &sparse_initializer_; +} +inline const ::opencv_onnx::SparseTensorProto& GraphProto::_internal_sparse_initializer(int index) const { + return sparse_initializer_.Get(index); +} +inline const ::opencv_onnx::SparseTensorProto& GraphProto::sparse_initializer(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.GraphProto.sparse_initializer) + return _internal_sparse_initializer(index); +} +inline ::opencv_onnx::SparseTensorProto* GraphProto::_internal_add_sparse_initializer() { + return sparse_initializer_.Add(); +} +inline ::opencv_onnx::SparseTensorProto* GraphProto::add_sparse_initializer() { + ::opencv_onnx::SparseTensorProto* _add = _internal_add_sparse_initializer(); + // @@protoc_insertion_point(field_add:opencv_onnx.GraphProto.sparse_initializer) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::SparseTensorProto >& +GraphProto::sparse_initializer() const { + // @@protoc_insertion_point(field_list:opencv_onnx.GraphProto.sparse_initializer) + return sparse_initializer_; +} + // optional string doc_string = 10; inline bool GraphProto::_internal_has_doc_string() const { bool value = (_has_bits_[0] & 0x00000002u) != 0; @@ -6029,6 +10877,86 @@ GraphProto::value_info() const { return value_info_; } +// repeated .opencv_onnx.TensorAnnotation quantization_annotation = 14; +inline int GraphProto::_internal_quantization_annotation_size() const { + return quantization_annotation_.size(); +} +inline int GraphProto::quantization_annotation_size() const { + return _internal_quantization_annotation_size(); +} +inline void GraphProto::clear_quantization_annotation() { + quantization_annotation_.Clear(); +} +inline ::opencv_onnx::TensorAnnotation* GraphProto::mutable_quantization_annotation(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.GraphProto.quantization_annotation) + return quantization_annotation_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TensorAnnotation >* +GraphProto::mutable_quantization_annotation() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.GraphProto.quantization_annotation) + return &quantization_annotation_; +} +inline const ::opencv_onnx::TensorAnnotation& GraphProto::_internal_quantization_annotation(int index) const { + return quantization_annotation_.Get(index); +} +inline const ::opencv_onnx::TensorAnnotation& GraphProto::quantization_annotation(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.GraphProto.quantization_annotation) + return _internal_quantization_annotation(index); +} +inline ::opencv_onnx::TensorAnnotation* GraphProto::_internal_add_quantization_annotation() { + return quantization_annotation_.Add(); +} +inline ::opencv_onnx::TensorAnnotation* GraphProto::add_quantization_annotation() { + ::opencv_onnx::TensorAnnotation* _add = _internal_add_quantization_annotation(); + // @@protoc_insertion_point(field_add:opencv_onnx.GraphProto.quantization_annotation) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::TensorAnnotation >& +GraphProto::quantization_annotation() const { + // @@protoc_insertion_point(field_list:opencv_onnx.GraphProto.quantization_annotation) + return quantization_annotation_; +} + +// repeated .opencv_onnx.StringStringEntryProto metadata_props = 16; +inline int GraphProto::_internal_metadata_props_size() const { + return metadata_props_.size(); +} +inline int GraphProto::metadata_props_size() const { + return _internal_metadata_props_size(); +} +inline void GraphProto::clear_metadata_props() { + metadata_props_.Clear(); +} +inline ::opencv_onnx::StringStringEntryProto* GraphProto::mutable_metadata_props(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.GraphProto.metadata_props) + return metadata_props_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* +GraphProto::mutable_metadata_props() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.GraphProto.metadata_props) + return &metadata_props_; +} +inline const ::opencv_onnx::StringStringEntryProto& GraphProto::_internal_metadata_props(int index) const { + return metadata_props_.Get(index); +} +inline const ::opencv_onnx::StringStringEntryProto& GraphProto::metadata_props(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.GraphProto.metadata_props) + return _internal_metadata_props(index); +} +inline ::opencv_onnx::StringStringEntryProto* GraphProto::_internal_add_metadata_props() { + return metadata_props_.Add(); +} +inline ::opencv_onnx::StringStringEntryProto* GraphProto::add_metadata_props() { + ::opencv_onnx::StringStringEntryProto* _add = _internal_add_metadata_props(); + // @@protoc_insertion_point(field_add:opencv_onnx.GraphProto.metadata_props) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& +GraphProto::metadata_props() const { + // @@protoc_insertion_point(field_list:opencv_onnx.GraphProto.metadata_props) + return metadata_props_; +} + // ------------------------------------------------------------------- // TensorProto_Segment @@ -6140,7 +11068,7 @@ TensorProto::mutable_dims() { return _internal_mutable_dims(); } -// optional .opencv_onnx.TensorProto.DataType data_type = 2; +// optional int32 data_type = 2; inline bool TensorProto::_internal_has_data_type() const { bool value = (_has_bits_[0] & 0x00000010u) != 0; return value; @@ -6152,19 +11080,18 @@ inline void TensorProto::clear_data_type() { data_type_ = 0; _has_bits_[0] &= ~0x00000010u; } -inline ::opencv_onnx::TensorProto_DataType TensorProto::_internal_data_type() const { - return static_cast< ::opencv_onnx::TensorProto_DataType >(data_type_); +inline int32_t TensorProto::_internal_data_type() const { + return data_type_; } -inline ::opencv_onnx::TensorProto_DataType TensorProto::data_type() const { +inline int32_t TensorProto::data_type() const { // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.data_type) return _internal_data_type(); } -inline void TensorProto::_internal_set_data_type(::opencv_onnx::TensorProto_DataType value) { - assert(::opencv_onnx::TensorProto_DataType_IsValid(value)); +inline void TensorProto::_internal_set_data_type(int32_t value) { _has_bits_[0] |= 0x00000010u; data_type_ = value; } -inline void TensorProto::set_data_type(::opencv_onnx::TensorProto_DataType value) { +inline void TensorProto::set_data_type(int32_t value) { _internal_set_data_type(value); // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.data_type) } @@ -6682,6 +11609,75 @@ inline void TensorProto::set_allocated_raw_data(std::string* raw_data) { // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TensorProto.raw_data) } +// repeated .opencv_onnx.StringStringEntryProto external_data = 13; +inline int TensorProto::_internal_external_data_size() const { + return external_data_.size(); +} +inline int TensorProto::external_data_size() const { + return _internal_external_data_size(); +} +inline void TensorProto::clear_external_data() { + external_data_.Clear(); +} +inline ::opencv_onnx::StringStringEntryProto* TensorProto::mutable_external_data(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorProto.external_data) + return external_data_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* +TensorProto::mutable_external_data() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TensorProto.external_data) + return &external_data_; +} +inline const ::opencv_onnx::StringStringEntryProto& TensorProto::_internal_external_data(int index) const { + return external_data_.Get(index); +} +inline const ::opencv_onnx::StringStringEntryProto& TensorProto::external_data(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.external_data) + return _internal_external_data(index); +} +inline ::opencv_onnx::StringStringEntryProto* TensorProto::_internal_add_external_data() { + return external_data_.Add(); +} +inline ::opencv_onnx::StringStringEntryProto* TensorProto::add_external_data() { + ::opencv_onnx::StringStringEntryProto* _add = _internal_add_external_data(); + // @@protoc_insertion_point(field_add:opencv_onnx.TensorProto.external_data) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& +TensorProto::external_data() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TensorProto.external_data) + return external_data_; +} + +// optional .opencv_onnx.TensorProto.DataLocation data_location = 14; +inline bool TensorProto::_internal_has_data_location() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool TensorProto::has_data_location() const { + return _internal_has_data_location(); +} +inline void TensorProto::clear_data_location() { + data_location_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline ::opencv_onnx::TensorProto_DataLocation TensorProto::_internal_data_location() const { + return static_cast< ::opencv_onnx::TensorProto_DataLocation >(data_location_); +} +inline ::opencv_onnx::TensorProto_DataLocation TensorProto::data_location() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.data_location) + return _internal_data_location(); +} +inline void TensorProto::_internal_set_data_location(::opencv_onnx::TensorProto_DataLocation value) { + assert(::opencv_onnx::TensorProto_DataLocation_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + data_location_ = value; +} +inline void TensorProto::set_data_location(::opencv_onnx::TensorProto_DataLocation value) { + _internal_set_data_location(value); + // @@protoc_insertion_point(field_set:opencv_onnx.TensorProto.data_location) +} + // repeated double double_data = 10 [packed = true]; inline int TensorProto::_internal_double_data_size() const { return double_data_.size(); @@ -6776,6 +11772,277 @@ TensorProto::mutable_uint64_data() { return _internal_mutable_uint64_data(); } +// repeated .opencv_onnx.StringStringEntryProto metadata_props = 16; +inline int TensorProto::_internal_metadata_props_size() const { + return metadata_props_.size(); +} +inline int TensorProto::metadata_props_size() const { + return _internal_metadata_props_size(); +} +inline void TensorProto::clear_metadata_props() { + metadata_props_.Clear(); +} +inline ::opencv_onnx::StringStringEntryProto* TensorProto::mutable_metadata_props(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.TensorProto.metadata_props) + return metadata_props_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* +TensorProto::mutable_metadata_props() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.TensorProto.metadata_props) + return &metadata_props_; +} +inline const ::opencv_onnx::StringStringEntryProto& TensorProto::_internal_metadata_props(int index) const { + return metadata_props_.Get(index); +} +inline const ::opencv_onnx::StringStringEntryProto& TensorProto::metadata_props(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.TensorProto.metadata_props) + return _internal_metadata_props(index); +} +inline ::opencv_onnx::StringStringEntryProto* TensorProto::_internal_add_metadata_props() { + return metadata_props_.Add(); +} +inline ::opencv_onnx::StringStringEntryProto* TensorProto::add_metadata_props() { + ::opencv_onnx::StringStringEntryProto* _add = _internal_add_metadata_props(); + // @@protoc_insertion_point(field_add:opencv_onnx.TensorProto.metadata_props) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& +TensorProto::metadata_props() const { + // @@protoc_insertion_point(field_list:opencv_onnx.TensorProto.metadata_props) + return metadata_props_; +} + +// ------------------------------------------------------------------- + +// SparseTensorProto + +// optional .opencv_onnx.TensorProto values = 1; +inline bool SparseTensorProto::_internal_has_values() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || values_ != nullptr); + return value; +} +inline bool SparseTensorProto::has_values() const { + return _internal_has_values(); +} +inline void SparseTensorProto::clear_values() { + if (values_ != nullptr) values_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::opencv_onnx::TensorProto& SparseTensorProto::_internal_values() const { + const ::opencv_onnx::TensorProto* p = values_; + return p != nullptr ? *p : reinterpret_cast( + ::opencv_onnx::_TensorProto_default_instance_); +} +inline const ::opencv_onnx::TensorProto& SparseTensorProto::values() const { + // @@protoc_insertion_point(field_get:opencv_onnx.SparseTensorProto.values) + return _internal_values(); +} +inline void SparseTensorProto::unsafe_arena_set_allocated_values( + ::opencv_onnx::TensorProto* values) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(values_); + } + values_ = values; + if (values) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.SparseTensorProto.values) +} +inline ::opencv_onnx::TensorProto* SparseTensorProto::release_values() { + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::TensorProto* temp = values_; + values_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::opencv_onnx::TensorProto* SparseTensorProto::unsafe_arena_release_values() { + // @@protoc_insertion_point(field_release:opencv_onnx.SparseTensorProto.values) + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::TensorProto* temp = values_; + values_ = nullptr; + return temp; +} +inline ::opencv_onnx::TensorProto* SparseTensorProto::_internal_mutable_values() { + _has_bits_[0] |= 0x00000001u; + if (values_ == nullptr) { + auto* p = CreateMaybeMessage<::opencv_onnx::TensorProto>(GetArenaForAllocation()); + values_ = p; + } + return values_; +} +inline ::opencv_onnx::TensorProto* SparseTensorProto::mutable_values() { + ::opencv_onnx::TensorProto* _msg = _internal_mutable_values(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.SparseTensorProto.values) + return _msg; +} +inline void SparseTensorProto::set_allocated_values(::opencv_onnx::TensorProto* values) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete values_; + } + if (values) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TensorProto>::GetOwningArena(values); + if (message_arena != submessage_arena) { + values = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, values, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + values_ = values; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.SparseTensorProto.values) +} + +// optional .opencv_onnx.TensorProto indices = 2; +inline bool SparseTensorProto::_internal_has_indices() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || indices_ != nullptr); + return value; +} +inline bool SparseTensorProto::has_indices() const { + return _internal_has_indices(); +} +inline void SparseTensorProto::clear_indices() { + if (indices_ != nullptr) indices_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::opencv_onnx::TensorProto& SparseTensorProto::_internal_indices() const { + const ::opencv_onnx::TensorProto* p = indices_; + return p != nullptr ? *p : reinterpret_cast( + ::opencv_onnx::_TensorProto_default_instance_); +} +inline const ::opencv_onnx::TensorProto& SparseTensorProto::indices() const { + // @@protoc_insertion_point(field_get:opencv_onnx.SparseTensorProto.indices) + return _internal_indices(); +} +inline void SparseTensorProto::unsafe_arena_set_allocated_indices( + ::opencv_onnx::TensorProto* indices) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(indices_); + } + indices_ = indices; + if (indices) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.SparseTensorProto.indices) +} +inline ::opencv_onnx::TensorProto* SparseTensorProto::release_indices() { + _has_bits_[0] &= ~0x00000002u; + ::opencv_onnx::TensorProto* temp = indices_; + indices_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::opencv_onnx::TensorProto* SparseTensorProto::unsafe_arena_release_indices() { + // @@protoc_insertion_point(field_release:opencv_onnx.SparseTensorProto.indices) + _has_bits_[0] &= ~0x00000002u; + ::opencv_onnx::TensorProto* temp = indices_; + indices_ = nullptr; + return temp; +} +inline ::opencv_onnx::TensorProto* SparseTensorProto::_internal_mutable_indices() { + _has_bits_[0] |= 0x00000002u; + if (indices_ == nullptr) { + auto* p = CreateMaybeMessage<::opencv_onnx::TensorProto>(GetArenaForAllocation()); + indices_ = p; + } + return indices_; +} +inline ::opencv_onnx::TensorProto* SparseTensorProto::mutable_indices() { + ::opencv_onnx::TensorProto* _msg = _internal_mutable_indices(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.SparseTensorProto.indices) + return _msg; +} +inline void SparseTensorProto::set_allocated_indices(::opencv_onnx::TensorProto* indices) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete indices_; + } + if (indices) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TensorProto>::GetOwningArena(indices); + if (message_arena != submessage_arena) { + indices = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, indices, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + indices_ = indices; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.SparseTensorProto.indices) +} + +// repeated int64 dims = 3; +inline int SparseTensorProto::_internal_dims_size() const { + return dims_.size(); +} +inline int SparseTensorProto::dims_size() const { + return _internal_dims_size(); +} +inline void SparseTensorProto::clear_dims() { + dims_.Clear(); +} +inline int64_t SparseTensorProto::_internal_dims(int index) const { + return dims_.Get(index); +} +inline int64_t SparseTensorProto::dims(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.SparseTensorProto.dims) + return _internal_dims(index); +} +inline void SparseTensorProto::set_dims(int index, int64_t value) { + dims_.Set(index, value); + // @@protoc_insertion_point(field_set:opencv_onnx.SparseTensorProto.dims) +} +inline void SparseTensorProto::_internal_add_dims(int64_t value) { + dims_.Add(value); +} +inline void SparseTensorProto::add_dims(int64_t value) { + _internal_add_dims(value); + // @@protoc_insertion_point(field_add:opencv_onnx.SparseTensorProto.dims) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +SparseTensorProto::_internal_dims() const { + return dims_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +SparseTensorProto::dims() const { + // @@protoc_insertion_point(field_list:opencv_onnx.SparseTensorProto.dims) + return _internal_dims(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +SparseTensorProto::_internal_mutable_dims() { + return &dims_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +SparseTensorProto::mutable_dims() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.SparseTensorProto.dims) + return _internal_mutable_dims(); +} + // ------------------------------------------------------------------- // TensorShapeProto_Dimension @@ -7026,7 +12293,7 @@ TensorShapeProto::dim() const { // TypeProto_Tensor -// optional .opencv_onnx.TensorProto.DataType elem_type = 1; +// optional int32 elem_type = 1; inline bool TypeProto_Tensor::_internal_has_elem_type() const { bool value = (_has_bits_[0] & 0x00000002u) != 0; return value; @@ -7038,19 +12305,18 @@ inline void TypeProto_Tensor::clear_elem_type() { elem_type_ = 0; _has_bits_[0] &= ~0x00000002u; } -inline ::opencv_onnx::TensorProto_DataType TypeProto_Tensor::_internal_elem_type() const { - return static_cast< ::opencv_onnx::TensorProto_DataType >(elem_type_); +inline int32_t TypeProto_Tensor::_internal_elem_type() const { + return elem_type_; } -inline ::opencv_onnx::TensorProto_DataType TypeProto_Tensor::elem_type() const { +inline int32_t TypeProto_Tensor::elem_type() const { // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.Tensor.elem_type) return _internal_elem_type(); } -inline void TypeProto_Tensor::_internal_set_elem_type(::opencv_onnx::TensorProto_DataType value) { - assert(::opencv_onnx::TensorProto_DataType_IsValid(value)); +inline void TypeProto_Tensor::_internal_set_elem_type(int32_t value) { _has_bits_[0] |= 0x00000002u; elem_type_ = value; } -inline void TypeProto_Tensor::set_elem_type(::opencv_onnx::TensorProto_DataType value) { +inline void TypeProto_Tensor::set_elem_type(int32_t value) { _internal_set_elem_type(value); // @@protoc_insertion_point(field_set:opencv_onnx.TypeProto.Tensor.elem_type) } @@ -7147,6 +12413,438 @@ inline void TypeProto_Tensor::set_allocated_shape(::opencv_onnx::TensorShapeProt // ------------------------------------------------------------------- +// TypeProto_Sequence + +// optional .opencv_onnx.TypeProto elem_type = 1; +inline bool TypeProto_Sequence::_internal_has_elem_type() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || elem_type_ != nullptr); + return value; +} +inline bool TypeProto_Sequence::has_elem_type() const { + return _internal_has_elem_type(); +} +inline void TypeProto_Sequence::clear_elem_type() { + if (elem_type_ != nullptr) elem_type_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::opencv_onnx::TypeProto& TypeProto_Sequence::_internal_elem_type() const { + const ::opencv_onnx::TypeProto* p = elem_type_; + return p != nullptr ? *p : reinterpret_cast( + ::opencv_onnx::_TypeProto_default_instance_); +} +inline const ::opencv_onnx::TypeProto& TypeProto_Sequence::elem_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.Sequence.elem_type) + return _internal_elem_type(); +} +inline void TypeProto_Sequence::unsafe_arena_set_allocated_elem_type( + ::opencv_onnx::TypeProto* elem_type) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(elem_type_); + } + elem_type_ = elem_type; + if (elem_type) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.TypeProto.Sequence.elem_type) +} +inline ::opencv_onnx::TypeProto* TypeProto_Sequence::release_elem_type() { + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::TypeProto* temp = elem_type_; + elem_type_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::opencv_onnx::TypeProto* TypeProto_Sequence::unsafe_arena_release_elem_type() { + // @@protoc_insertion_point(field_release:opencv_onnx.TypeProto.Sequence.elem_type) + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::TypeProto* temp = elem_type_; + elem_type_ = nullptr; + return temp; +} +inline ::opencv_onnx::TypeProto* TypeProto_Sequence::_internal_mutable_elem_type() { + _has_bits_[0] |= 0x00000001u; + if (elem_type_ == nullptr) { + auto* p = CreateMaybeMessage<::opencv_onnx::TypeProto>(GetArenaForAllocation()); + elem_type_ = p; + } + return elem_type_; +} +inline ::opencv_onnx::TypeProto* TypeProto_Sequence::mutable_elem_type() { + ::opencv_onnx::TypeProto* _msg = _internal_mutable_elem_type(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TypeProto.Sequence.elem_type) + return _msg; +} +inline void TypeProto_Sequence::set_allocated_elem_type(::opencv_onnx::TypeProto* elem_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete elem_type_; + } + if (elem_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto>::GetOwningArena(elem_type); + if (message_arena != submessage_arena) { + elem_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, elem_type, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + elem_type_ = elem_type; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.Sequence.elem_type) +} + +// ------------------------------------------------------------------- + +// TypeProto_Map + +// optional int32 key_type = 1; +inline bool TypeProto_Map::_internal_has_key_type() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool TypeProto_Map::has_key_type() const { + return _internal_has_key_type(); +} +inline void TypeProto_Map::clear_key_type() { + key_type_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t TypeProto_Map::_internal_key_type() const { + return key_type_; +} +inline int32_t TypeProto_Map::key_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.Map.key_type) + return _internal_key_type(); +} +inline void TypeProto_Map::_internal_set_key_type(int32_t value) { + _has_bits_[0] |= 0x00000002u; + key_type_ = value; +} +inline void TypeProto_Map::set_key_type(int32_t value) { + _internal_set_key_type(value); + // @@protoc_insertion_point(field_set:opencv_onnx.TypeProto.Map.key_type) +} + +// optional .opencv_onnx.TypeProto value_type = 2; +inline bool TypeProto_Map::_internal_has_value_type() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || value_type_ != nullptr); + return value; +} +inline bool TypeProto_Map::has_value_type() const { + return _internal_has_value_type(); +} +inline void TypeProto_Map::clear_value_type() { + if (value_type_ != nullptr) value_type_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::opencv_onnx::TypeProto& TypeProto_Map::_internal_value_type() const { + const ::opencv_onnx::TypeProto* p = value_type_; + return p != nullptr ? *p : reinterpret_cast( + ::opencv_onnx::_TypeProto_default_instance_); +} +inline const ::opencv_onnx::TypeProto& TypeProto_Map::value_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.Map.value_type) + return _internal_value_type(); +} +inline void TypeProto_Map::unsafe_arena_set_allocated_value_type( + ::opencv_onnx::TypeProto* value_type) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(value_type_); + } + value_type_ = value_type; + if (value_type) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.TypeProto.Map.value_type) +} +inline ::opencv_onnx::TypeProto* TypeProto_Map::release_value_type() { + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::TypeProto* temp = value_type_; + value_type_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::opencv_onnx::TypeProto* TypeProto_Map::unsafe_arena_release_value_type() { + // @@protoc_insertion_point(field_release:opencv_onnx.TypeProto.Map.value_type) + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::TypeProto* temp = value_type_; + value_type_ = nullptr; + return temp; +} +inline ::opencv_onnx::TypeProto* TypeProto_Map::_internal_mutable_value_type() { + _has_bits_[0] |= 0x00000001u; + if (value_type_ == nullptr) { + auto* p = CreateMaybeMessage<::opencv_onnx::TypeProto>(GetArenaForAllocation()); + value_type_ = p; + } + return value_type_; +} +inline ::opencv_onnx::TypeProto* TypeProto_Map::mutable_value_type() { + ::opencv_onnx::TypeProto* _msg = _internal_mutable_value_type(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TypeProto.Map.value_type) + return _msg; +} +inline void TypeProto_Map::set_allocated_value_type(::opencv_onnx::TypeProto* value_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete value_type_; + } + if (value_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto>::GetOwningArena(value_type); + if (message_arena != submessage_arena) { + value_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, value_type, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + value_type_ = value_type; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.Map.value_type) +} + +// ------------------------------------------------------------------- + +// TypeProto_Optional + +// optional .opencv_onnx.TypeProto elem_type = 1; +inline bool TypeProto_Optional::_internal_has_elem_type() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || elem_type_ != nullptr); + return value; +} +inline bool TypeProto_Optional::has_elem_type() const { + return _internal_has_elem_type(); +} +inline void TypeProto_Optional::clear_elem_type() { + if (elem_type_ != nullptr) elem_type_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::opencv_onnx::TypeProto& TypeProto_Optional::_internal_elem_type() const { + const ::opencv_onnx::TypeProto* p = elem_type_; + return p != nullptr ? *p : reinterpret_cast( + ::opencv_onnx::_TypeProto_default_instance_); +} +inline const ::opencv_onnx::TypeProto& TypeProto_Optional::elem_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.Optional.elem_type) + return _internal_elem_type(); +} +inline void TypeProto_Optional::unsafe_arena_set_allocated_elem_type( + ::opencv_onnx::TypeProto* elem_type) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(elem_type_); + } + elem_type_ = elem_type; + if (elem_type) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.TypeProto.Optional.elem_type) +} +inline ::opencv_onnx::TypeProto* TypeProto_Optional::release_elem_type() { + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::TypeProto* temp = elem_type_; + elem_type_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::opencv_onnx::TypeProto* TypeProto_Optional::unsafe_arena_release_elem_type() { + // @@protoc_insertion_point(field_release:opencv_onnx.TypeProto.Optional.elem_type) + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::TypeProto* temp = elem_type_; + elem_type_ = nullptr; + return temp; +} +inline ::opencv_onnx::TypeProto* TypeProto_Optional::_internal_mutable_elem_type() { + _has_bits_[0] |= 0x00000001u; + if (elem_type_ == nullptr) { + auto* p = CreateMaybeMessage<::opencv_onnx::TypeProto>(GetArenaForAllocation()); + elem_type_ = p; + } + return elem_type_; +} +inline ::opencv_onnx::TypeProto* TypeProto_Optional::mutable_elem_type() { + ::opencv_onnx::TypeProto* _msg = _internal_mutable_elem_type(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TypeProto.Optional.elem_type) + return _msg; +} +inline void TypeProto_Optional::set_allocated_elem_type(::opencv_onnx::TypeProto* elem_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete elem_type_; + } + if (elem_type) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TypeProto>::GetOwningArena(elem_type); + if (message_arena != submessage_arena) { + elem_type = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, elem_type, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + elem_type_ = elem_type; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.Optional.elem_type) +} + +// ------------------------------------------------------------------- + +// TypeProto_SparseTensor + +// optional int32 elem_type = 1; +inline bool TypeProto_SparseTensor::_internal_has_elem_type() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool TypeProto_SparseTensor::has_elem_type() const { + return _internal_has_elem_type(); +} +inline void TypeProto_SparseTensor::clear_elem_type() { + elem_type_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t TypeProto_SparseTensor::_internal_elem_type() const { + return elem_type_; +} +inline int32_t TypeProto_SparseTensor::elem_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.SparseTensor.elem_type) + return _internal_elem_type(); +} +inline void TypeProto_SparseTensor::_internal_set_elem_type(int32_t value) { + _has_bits_[0] |= 0x00000002u; + elem_type_ = value; +} +inline void TypeProto_SparseTensor::set_elem_type(int32_t value) { + _internal_set_elem_type(value); + // @@protoc_insertion_point(field_set:opencv_onnx.TypeProto.SparseTensor.elem_type) +} + +// optional .opencv_onnx.TensorShapeProto shape = 2; +inline bool TypeProto_SparseTensor::_internal_has_shape() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || shape_ != nullptr); + return value; +} +inline bool TypeProto_SparseTensor::has_shape() const { + return _internal_has_shape(); +} +inline void TypeProto_SparseTensor::clear_shape() { + if (shape_ != nullptr) shape_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::opencv_onnx::TensorShapeProto& TypeProto_SparseTensor::_internal_shape() const { + const ::opencv_onnx::TensorShapeProto* p = shape_; + return p != nullptr ? *p : reinterpret_cast( + ::opencv_onnx::_TensorShapeProto_default_instance_); +} +inline const ::opencv_onnx::TensorShapeProto& TypeProto_SparseTensor::shape() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.SparseTensor.shape) + return _internal_shape(); +} +inline void TypeProto_SparseTensor::unsafe_arena_set_allocated_shape( + ::opencv_onnx::TensorShapeProto* shape) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(shape_); + } + shape_ = shape; + if (shape) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.TypeProto.SparseTensor.shape) +} +inline ::opencv_onnx::TensorShapeProto* TypeProto_SparseTensor::release_shape() { + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::TensorShapeProto* temp = shape_; + shape_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::opencv_onnx::TensorShapeProto* TypeProto_SparseTensor::unsafe_arena_release_shape() { + // @@protoc_insertion_point(field_release:opencv_onnx.TypeProto.SparseTensor.shape) + _has_bits_[0] &= ~0x00000001u; + ::opencv_onnx::TensorShapeProto* temp = shape_; + shape_ = nullptr; + return temp; +} +inline ::opencv_onnx::TensorShapeProto* TypeProto_SparseTensor::_internal_mutable_shape() { + _has_bits_[0] |= 0x00000001u; + if (shape_ == nullptr) { + auto* p = CreateMaybeMessage<::opencv_onnx::TensorShapeProto>(GetArenaForAllocation()); + shape_ = p; + } + return shape_; +} +inline ::opencv_onnx::TensorShapeProto* TypeProto_SparseTensor::mutable_shape() { + ::opencv_onnx::TensorShapeProto* _msg = _internal_mutable_shape(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TypeProto.SparseTensor.shape) + return _msg; +} +inline void TypeProto_SparseTensor::set_allocated_shape(::opencv_onnx::TensorShapeProto* shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete shape_; + } + if (shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_onnx::TensorShapeProto>::GetOwningArena(shape); + if (message_arena != submessage_arena) { + shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, shape, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + shape_ = shape; + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.SparseTensor.shape) +} + +// ------------------------------------------------------------------- + // TypeProto // .opencv_onnx.TypeProto.Tensor tensor_type = 1; @@ -7223,6 +12921,302 @@ inline ::opencv_onnx::TypeProto_Tensor* TypeProto::mutable_tensor_type() { return _msg; } +// .opencv_onnx.TypeProto.Sequence sequence_type = 4; +inline bool TypeProto::_internal_has_sequence_type() const { + return value_case() == kSequenceType; +} +inline bool TypeProto::has_sequence_type() const { + return _internal_has_sequence_type(); +} +inline void TypeProto::set_has_sequence_type() { + _oneof_case_[0] = kSequenceType; +} +inline void TypeProto::clear_sequence_type() { + if (_internal_has_sequence_type()) { + if (GetArenaForAllocation() == nullptr) { + delete value_.sequence_type_; + } + clear_has_value(); + } +} +inline ::opencv_onnx::TypeProto_Sequence* TypeProto::release_sequence_type() { + // @@protoc_insertion_point(field_release:opencv_onnx.TypeProto.sequence_type) + if (_internal_has_sequence_type()) { + clear_has_value(); + ::opencv_onnx::TypeProto_Sequence* temp = value_.sequence_type_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + value_.sequence_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::opencv_onnx::TypeProto_Sequence& TypeProto::_internal_sequence_type() const { + return _internal_has_sequence_type() + ? *value_.sequence_type_ + : reinterpret_cast< ::opencv_onnx::TypeProto_Sequence&>(::opencv_onnx::_TypeProto_Sequence_default_instance_); +} +inline const ::opencv_onnx::TypeProto_Sequence& TypeProto::sequence_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.sequence_type) + return _internal_sequence_type(); +} +inline ::opencv_onnx::TypeProto_Sequence* TypeProto::unsafe_arena_release_sequence_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_onnx.TypeProto.sequence_type) + if (_internal_has_sequence_type()) { + clear_has_value(); + ::opencv_onnx::TypeProto_Sequence* temp = value_.sequence_type_; + value_.sequence_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void TypeProto::unsafe_arena_set_allocated_sequence_type(::opencv_onnx::TypeProto_Sequence* sequence_type) { + clear_value(); + if (sequence_type) { + set_has_sequence_type(); + value_.sequence_type_ = sequence_type; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.TypeProto.sequence_type) +} +inline ::opencv_onnx::TypeProto_Sequence* TypeProto::_internal_mutable_sequence_type() { + if (!_internal_has_sequence_type()) { + clear_value(); + set_has_sequence_type(); + value_.sequence_type_ = CreateMaybeMessage< ::opencv_onnx::TypeProto_Sequence >(GetArenaForAllocation()); + } + return value_.sequence_type_; +} +inline ::opencv_onnx::TypeProto_Sequence* TypeProto::mutable_sequence_type() { + ::opencv_onnx::TypeProto_Sequence* _msg = _internal_mutable_sequence_type(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TypeProto.sequence_type) + return _msg; +} + +// .opencv_onnx.TypeProto.Map map_type = 5; +inline bool TypeProto::_internal_has_map_type() const { + return value_case() == kMapType; +} +inline bool TypeProto::has_map_type() const { + return _internal_has_map_type(); +} +inline void TypeProto::set_has_map_type() { + _oneof_case_[0] = kMapType; +} +inline void TypeProto::clear_map_type() { + if (_internal_has_map_type()) { + if (GetArenaForAllocation() == nullptr) { + delete value_.map_type_; + } + clear_has_value(); + } +} +inline ::opencv_onnx::TypeProto_Map* TypeProto::release_map_type() { + // @@protoc_insertion_point(field_release:opencv_onnx.TypeProto.map_type) + if (_internal_has_map_type()) { + clear_has_value(); + ::opencv_onnx::TypeProto_Map* temp = value_.map_type_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + value_.map_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::opencv_onnx::TypeProto_Map& TypeProto::_internal_map_type() const { + return _internal_has_map_type() + ? *value_.map_type_ + : reinterpret_cast< ::opencv_onnx::TypeProto_Map&>(::opencv_onnx::_TypeProto_Map_default_instance_); +} +inline const ::opencv_onnx::TypeProto_Map& TypeProto::map_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.map_type) + return _internal_map_type(); +} +inline ::opencv_onnx::TypeProto_Map* TypeProto::unsafe_arena_release_map_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_onnx.TypeProto.map_type) + if (_internal_has_map_type()) { + clear_has_value(); + ::opencv_onnx::TypeProto_Map* temp = value_.map_type_; + value_.map_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void TypeProto::unsafe_arena_set_allocated_map_type(::opencv_onnx::TypeProto_Map* map_type) { + clear_value(); + if (map_type) { + set_has_map_type(); + value_.map_type_ = map_type; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.TypeProto.map_type) +} +inline ::opencv_onnx::TypeProto_Map* TypeProto::_internal_mutable_map_type() { + if (!_internal_has_map_type()) { + clear_value(); + set_has_map_type(); + value_.map_type_ = CreateMaybeMessage< ::opencv_onnx::TypeProto_Map >(GetArenaForAllocation()); + } + return value_.map_type_; +} +inline ::opencv_onnx::TypeProto_Map* TypeProto::mutable_map_type() { + ::opencv_onnx::TypeProto_Map* _msg = _internal_mutable_map_type(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TypeProto.map_type) + return _msg; +} + +// .opencv_onnx.TypeProto.Optional optional_type = 9; +inline bool TypeProto::_internal_has_optional_type() const { + return value_case() == kOptionalType; +} +inline bool TypeProto::has_optional_type() const { + return _internal_has_optional_type(); +} +inline void TypeProto::set_has_optional_type() { + _oneof_case_[0] = kOptionalType; +} +inline void TypeProto::clear_optional_type() { + if (_internal_has_optional_type()) { + if (GetArenaForAllocation() == nullptr) { + delete value_.optional_type_; + } + clear_has_value(); + } +} +inline ::opencv_onnx::TypeProto_Optional* TypeProto::release_optional_type() { + // @@protoc_insertion_point(field_release:opencv_onnx.TypeProto.optional_type) + if (_internal_has_optional_type()) { + clear_has_value(); + ::opencv_onnx::TypeProto_Optional* temp = value_.optional_type_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + value_.optional_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::opencv_onnx::TypeProto_Optional& TypeProto::_internal_optional_type() const { + return _internal_has_optional_type() + ? *value_.optional_type_ + : reinterpret_cast< ::opencv_onnx::TypeProto_Optional&>(::opencv_onnx::_TypeProto_Optional_default_instance_); +} +inline const ::opencv_onnx::TypeProto_Optional& TypeProto::optional_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.optional_type) + return _internal_optional_type(); +} +inline ::opencv_onnx::TypeProto_Optional* TypeProto::unsafe_arena_release_optional_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_onnx.TypeProto.optional_type) + if (_internal_has_optional_type()) { + clear_has_value(); + ::opencv_onnx::TypeProto_Optional* temp = value_.optional_type_; + value_.optional_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void TypeProto::unsafe_arena_set_allocated_optional_type(::opencv_onnx::TypeProto_Optional* optional_type) { + clear_value(); + if (optional_type) { + set_has_optional_type(); + value_.optional_type_ = optional_type; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.TypeProto.optional_type) +} +inline ::opencv_onnx::TypeProto_Optional* TypeProto::_internal_mutable_optional_type() { + if (!_internal_has_optional_type()) { + clear_value(); + set_has_optional_type(); + value_.optional_type_ = CreateMaybeMessage< ::opencv_onnx::TypeProto_Optional >(GetArenaForAllocation()); + } + return value_.optional_type_; +} +inline ::opencv_onnx::TypeProto_Optional* TypeProto::mutable_optional_type() { + ::opencv_onnx::TypeProto_Optional* _msg = _internal_mutable_optional_type(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TypeProto.optional_type) + return _msg; +} + +// .opencv_onnx.TypeProto.SparseTensor sparse_tensor_type = 8; +inline bool TypeProto::_internal_has_sparse_tensor_type() const { + return value_case() == kSparseTensorType; +} +inline bool TypeProto::has_sparse_tensor_type() const { + return _internal_has_sparse_tensor_type(); +} +inline void TypeProto::set_has_sparse_tensor_type() { + _oneof_case_[0] = kSparseTensorType; +} +inline void TypeProto::clear_sparse_tensor_type() { + if (_internal_has_sparse_tensor_type()) { + if (GetArenaForAllocation() == nullptr) { + delete value_.sparse_tensor_type_; + } + clear_has_value(); + } +} +inline ::opencv_onnx::TypeProto_SparseTensor* TypeProto::release_sparse_tensor_type() { + // @@protoc_insertion_point(field_release:opencv_onnx.TypeProto.sparse_tensor_type) + if (_internal_has_sparse_tensor_type()) { + clear_has_value(); + ::opencv_onnx::TypeProto_SparseTensor* temp = value_.sparse_tensor_type_; + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + value_.sparse_tensor_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::opencv_onnx::TypeProto_SparseTensor& TypeProto::_internal_sparse_tensor_type() const { + return _internal_has_sparse_tensor_type() + ? *value_.sparse_tensor_type_ + : reinterpret_cast< ::opencv_onnx::TypeProto_SparseTensor&>(::opencv_onnx::_TypeProto_SparseTensor_default_instance_); +} +inline const ::opencv_onnx::TypeProto_SparseTensor& TypeProto::sparse_tensor_type() const { + // @@protoc_insertion_point(field_get:opencv_onnx.TypeProto.sparse_tensor_type) + return _internal_sparse_tensor_type(); +} +inline ::opencv_onnx::TypeProto_SparseTensor* TypeProto::unsafe_arena_release_sparse_tensor_type() { + // @@protoc_insertion_point(field_unsafe_arena_release:opencv_onnx.TypeProto.sparse_tensor_type) + if (_internal_has_sparse_tensor_type()) { + clear_has_value(); + ::opencv_onnx::TypeProto_SparseTensor* temp = value_.sparse_tensor_type_; + value_.sparse_tensor_type_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void TypeProto::unsafe_arena_set_allocated_sparse_tensor_type(::opencv_onnx::TypeProto_SparseTensor* sparse_tensor_type) { + clear_value(); + if (sparse_tensor_type) { + set_has_sparse_tensor_type(); + value_.sparse_tensor_type_ = sparse_tensor_type; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_onnx.TypeProto.sparse_tensor_type) +} +inline ::opencv_onnx::TypeProto_SparseTensor* TypeProto::_internal_mutable_sparse_tensor_type() { + if (!_internal_has_sparse_tensor_type()) { + clear_value(); + set_has_sparse_tensor_type(); + value_.sparse_tensor_type_ = CreateMaybeMessage< ::opencv_onnx::TypeProto_SparseTensor >(GetArenaForAllocation()); + } + return value_.sparse_tensor_type_; +} +inline ::opencv_onnx::TypeProto_SparseTensor* TypeProto::mutable_sparse_tensor_type() { + ::opencv_onnx::TypeProto_SparseTensor* _msg = _internal_mutable_sparse_tensor_type(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.TypeProto.sparse_tensor_type) + return _msg; +} + // optional string denotation = 6; inline bool TypeProto::_internal_has_denotation() const { bool value = (_has_bits_[0] & 0x00000001u) != 0; @@ -7402,6 +13396,711 @@ inline void OperatorSetIdProto::set_version(int64_t value) { // @@protoc_insertion_point(field_set:opencv_onnx.OperatorSetIdProto.version) } +// ------------------------------------------------------------------- + +// FunctionProto + +// optional string name = 1; +inline bool FunctionProto::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool FunctionProto::has_name() const { + return _internal_has_name(); +} +inline void FunctionProto::clear_name() { + name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& FunctionProto::name() const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void FunctionProto::set_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opencv_onnx.FunctionProto.name) +} +inline std::string* FunctionProto::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.name) + return _s; +} +inline const std::string& FunctionProto::_internal_name() const { + return name_.Get(); +} +inline void FunctionProto::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* FunctionProto::_internal_mutable_name() { + _has_bits_[0] |= 0x00000001u; + return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* FunctionProto::release_name() { + // @@protoc_insertion_point(field_release:opencv_onnx.FunctionProto.name) + if (!_internal_has_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = name_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void FunctionProto::set_allocated_name(std::string* name) { + if (name != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.FunctionProto.name) +} + +// repeated string input = 4; +inline int FunctionProto::_internal_input_size() const { + return input_.size(); +} +inline int FunctionProto::input_size() const { + return _internal_input_size(); +} +inline void FunctionProto::clear_input() { + input_.Clear(); +} +inline std::string* FunctionProto::add_input() { + std::string* _s = _internal_add_input(); + // @@protoc_insertion_point(field_add_mutable:opencv_onnx.FunctionProto.input) + return _s; +} +inline const std::string& FunctionProto::_internal_input(int index) const { + return input_.Get(index); +} +inline const std::string& FunctionProto::input(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.input) + return _internal_input(index); +} +inline std::string* FunctionProto::mutable_input(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.input) + return input_.Mutable(index); +} +inline void FunctionProto::set_input(int index, const std::string& value) { + input_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:opencv_onnx.FunctionProto.input) +} +inline void FunctionProto::set_input(int index, std::string&& value) { + input_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:opencv_onnx.FunctionProto.input) +} +inline void FunctionProto::set_input(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + input_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:opencv_onnx.FunctionProto.input) +} +inline void FunctionProto::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.FunctionProto.input) +} +inline std::string* FunctionProto::_internal_add_input() { + return input_.Add(); +} +inline void FunctionProto::add_input(const std::string& value) { + input_.Add()->assign(value); + // @@protoc_insertion_point(field_add:opencv_onnx.FunctionProto.input) +} +inline void FunctionProto::add_input(std::string&& value) { + input_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:opencv_onnx.FunctionProto.input) +} +inline void FunctionProto::add_input(const char* value) { + GOOGLE_DCHECK(value != nullptr); + input_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:opencv_onnx.FunctionProto.input) +} +inline void FunctionProto::add_input(const char* value, size_t size) { + input_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:opencv_onnx.FunctionProto.input) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +FunctionProto::input() const { + // @@protoc_insertion_point(field_list:opencv_onnx.FunctionProto.input) + return input_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +FunctionProto::mutable_input() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.FunctionProto.input) + return &input_; +} + +// repeated string output = 5; +inline int FunctionProto::_internal_output_size() const { + return output_.size(); +} +inline int FunctionProto::output_size() const { + return _internal_output_size(); +} +inline void FunctionProto::clear_output() { + output_.Clear(); +} +inline std::string* FunctionProto::add_output() { + std::string* _s = _internal_add_output(); + // @@protoc_insertion_point(field_add_mutable:opencv_onnx.FunctionProto.output) + return _s; +} +inline const std::string& FunctionProto::_internal_output(int index) const { + return output_.Get(index); +} +inline const std::string& FunctionProto::output(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.output) + return _internal_output(index); +} +inline std::string* FunctionProto::mutable_output(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.output) + return output_.Mutable(index); +} +inline void FunctionProto::set_output(int index, const std::string& value) { + output_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:opencv_onnx.FunctionProto.output) +} +inline void FunctionProto::set_output(int index, std::string&& value) { + output_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:opencv_onnx.FunctionProto.output) +} +inline void FunctionProto::set_output(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + output_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:opencv_onnx.FunctionProto.output) +} +inline void FunctionProto::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.FunctionProto.output) +} +inline std::string* FunctionProto::_internal_add_output() { + return output_.Add(); +} +inline void FunctionProto::add_output(const std::string& value) { + output_.Add()->assign(value); + // @@protoc_insertion_point(field_add:opencv_onnx.FunctionProto.output) +} +inline void FunctionProto::add_output(std::string&& value) { + output_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:opencv_onnx.FunctionProto.output) +} +inline void FunctionProto::add_output(const char* value) { + GOOGLE_DCHECK(value != nullptr); + output_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:opencv_onnx.FunctionProto.output) +} +inline void FunctionProto::add_output(const char* value, size_t size) { + output_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:opencv_onnx.FunctionProto.output) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +FunctionProto::output() const { + // @@protoc_insertion_point(field_list:opencv_onnx.FunctionProto.output) + return output_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +FunctionProto::mutable_output() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.FunctionProto.output) + return &output_; +} + +// repeated string attribute = 6; +inline int FunctionProto::_internal_attribute_size() const { + return attribute_.size(); +} +inline int FunctionProto::attribute_size() const { + return _internal_attribute_size(); +} +inline void FunctionProto::clear_attribute() { + attribute_.Clear(); +} +inline std::string* FunctionProto::add_attribute() { + std::string* _s = _internal_add_attribute(); + // @@protoc_insertion_point(field_add_mutable:opencv_onnx.FunctionProto.attribute) + return _s; +} +inline const std::string& FunctionProto::_internal_attribute(int index) const { + return attribute_.Get(index); +} +inline const std::string& FunctionProto::attribute(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.attribute) + return _internal_attribute(index); +} +inline std::string* FunctionProto::mutable_attribute(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.attribute) + return attribute_.Mutable(index); +} +inline void FunctionProto::set_attribute(int index, const std::string& value) { + attribute_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:opencv_onnx.FunctionProto.attribute) +} +inline void FunctionProto::set_attribute(int index, std::string&& value) { + attribute_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:opencv_onnx.FunctionProto.attribute) +} +inline void FunctionProto::set_attribute(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + attribute_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:opencv_onnx.FunctionProto.attribute) +} +inline void FunctionProto::set_attribute(int index, const char* value, size_t size) { + attribute_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:opencv_onnx.FunctionProto.attribute) +} +inline std::string* FunctionProto::_internal_add_attribute() { + return attribute_.Add(); +} +inline void FunctionProto::add_attribute(const std::string& value) { + attribute_.Add()->assign(value); + // @@protoc_insertion_point(field_add:opencv_onnx.FunctionProto.attribute) +} +inline void FunctionProto::add_attribute(std::string&& value) { + attribute_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:opencv_onnx.FunctionProto.attribute) +} +inline void FunctionProto::add_attribute(const char* value) { + GOOGLE_DCHECK(value != nullptr); + attribute_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:opencv_onnx.FunctionProto.attribute) +} +inline void FunctionProto::add_attribute(const char* value, size_t size) { + attribute_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:opencv_onnx.FunctionProto.attribute) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +FunctionProto::attribute() const { + // @@protoc_insertion_point(field_list:opencv_onnx.FunctionProto.attribute) + return attribute_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +FunctionProto::mutable_attribute() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.FunctionProto.attribute) + return &attribute_; +} + +// repeated .opencv_onnx.AttributeProto attribute_proto = 11; +inline int FunctionProto::_internal_attribute_proto_size() const { + return attribute_proto_.size(); +} +inline int FunctionProto::attribute_proto_size() const { + return _internal_attribute_proto_size(); +} +inline void FunctionProto::clear_attribute_proto() { + attribute_proto_.Clear(); +} +inline ::opencv_onnx::AttributeProto* FunctionProto::mutable_attribute_proto(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.attribute_proto) + return attribute_proto_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::AttributeProto >* +FunctionProto::mutable_attribute_proto() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.FunctionProto.attribute_proto) + return &attribute_proto_; +} +inline const ::opencv_onnx::AttributeProto& FunctionProto::_internal_attribute_proto(int index) const { + return attribute_proto_.Get(index); +} +inline const ::opencv_onnx::AttributeProto& FunctionProto::attribute_proto(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.attribute_proto) + return _internal_attribute_proto(index); +} +inline ::opencv_onnx::AttributeProto* FunctionProto::_internal_add_attribute_proto() { + return attribute_proto_.Add(); +} +inline ::opencv_onnx::AttributeProto* FunctionProto::add_attribute_proto() { + ::opencv_onnx::AttributeProto* _add = _internal_add_attribute_proto(); + // @@protoc_insertion_point(field_add:opencv_onnx.FunctionProto.attribute_proto) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::AttributeProto >& +FunctionProto::attribute_proto() const { + // @@protoc_insertion_point(field_list:opencv_onnx.FunctionProto.attribute_proto) + return attribute_proto_; +} + +// repeated .opencv_onnx.NodeProto node = 7; +inline int FunctionProto::_internal_node_size() const { + return node_.size(); +} +inline int FunctionProto::node_size() const { + return _internal_node_size(); +} +inline void FunctionProto::clear_node() { + node_.Clear(); +} +inline ::opencv_onnx::NodeProto* FunctionProto::mutable_node(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.node) + return node_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::NodeProto >* +FunctionProto::mutable_node() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.FunctionProto.node) + return &node_; +} +inline const ::opencv_onnx::NodeProto& FunctionProto::_internal_node(int index) const { + return node_.Get(index); +} +inline const ::opencv_onnx::NodeProto& FunctionProto::node(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.node) + return _internal_node(index); +} +inline ::opencv_onnx::NodeProto* FunctionProto::_internal_add_node() { + return node_.Add(); +} +inline ::opencv_onnx::NodeProto* FunctionProto::add_node() { + ::opencv_onnx::NodeProto* _add = _internal_add_node(); + // @@protoc_insertion_point(field_add:opencv_onnx.FunctionProto.node) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::NodeProto >& +FunctionProto::node() const { + // @@protoc_insertion_point(field_list:opencv_onnx.FunctionProto.node) + return node_; +} + +// optional string doc_string = 8; +inline bool FunctionProto::_internal_has_doc_string() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool FunctionProto::has_doc_string() const { + return _internal_has_doc_string(); +} +inline void FunctionProto::clear_doc_string() { + doc_string_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& FunctionProto::doc_string() const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.doc_string) + return _internal_doc_string(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void FunctionProto::set_doc_string(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opencv_onnx.FunctionProto.doc_string) +} +inline std::string* FunctionProto::mutable_doc_string() { + std::string* _s = _internal_mutable_doc_string(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.doc_string) + return _s; +} +inline const std::string& FunctionProto::_internal_doc_string() const { + return doc_string_.Get(); +} +inline void FunctionProto::_internal_set_doc_string(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + doc_string_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* FunctionProto::_internal_mutable_doc_string() { + _has_bits_[0] |= 0x00000002u; + return doc_string_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* FunctionProto::release_doc_string() { + // @@protoc_insertion_point(field_release:opencv_onnx.FunctionProto.doc_string) + if (!_internal_has_doc_string()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = doc_string_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (doc_string_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void FunctionProto::set_allocated_doc_string(std::string* doc_string) { + if (doc_string != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + doc_string_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), doc_string, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (doc_string_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + doc_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.FunctionProto.doc_string) +} + +// repeated .opencv_onnx.OperatorSetIdProto opset_import = 9; +inline int FunctionProto::_internal_opset_import_size() const { + return opset_import_.size(); +} +inline int FunctionProto::opset_import_size() const { + return _internal_opset_import_size(); +} +inline void FunctionProto::clear_opset_import() { + opset_import_.Clear(); +} +inline ::opencv_onnx::OperatorSetIdProto* FunctionProto::mutable_opset_import(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.opset_import) + return opset_import_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::OperatorSetIdProto >* +FunctionProto::mutable_opset_import() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.FunctionProto.opset_import) + return &opset_import_; +} +inline const ::opencv_onnx::OperatorSetIdProto& FunctionProto::_internal_opset_import(int index) const { + return opset_import_.Get(index); +} +inline const ::opencv_onnx::OperatorSetIdProto& FunctionProto::opset_import(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.opset_import) + return _internal_opset_import(index); +} +inline ::opencv_onnx::OperatorSetIdProto* FunctionProto::_internal_add_opset_import() { + return opset_import_.Add(); +} +inline ::opencv_onnx::OperatorSetIdProto* FunctionProto::add_opset_import() { + ::opencv_onnx::OperatorSetIdProto* _add = _internal_add_opset_import(); + // @@protoc_insertion_point(field_add:opencv_onnx.FunctionProto.opset_import) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::OperatorSetIdProto >& +FunctionProto::opset_import() const { + // @@protoc_insertion_point(field_list:opencv_onnx.FunctionProto.opset_import) + return opset_import_; +} + +// optional string domain = 10; +inline bool FunctionProto::_internal_has_domain() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool FunctionProto::has_domain() const { + return _internal_has_domain(); +} +inline void FunctionProto::clear_domain() { + domain_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& FunctionProto::domain() const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.domain) + return _internal_domain(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void FunctionProto::set_domain(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opencv_onnx.FunctionProto.domain) +} +inline std::string* FunctionProto::mutable_domain() { + std::string* _s = _internal_mutable_domain(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.domain) + return _s; +} +inline const std::string& FunctionProto::_internal_domain() const { + return domain_.Get(); +} +inline void FunctionProto::_internal_set_domain(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + domain_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* FunctionProto::_internal_mutable_domain() { + _has_bits_[0] |= 0x00000004u; + return domain_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* FunctionProto::release_domain() { + // @@protoc_insertion_point(field_release:opencv_onnx.FunctionProto.domain) + if (!_internal_has_domain()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = domain_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (domain_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void FunctionProto::set_allocated_domain(std::string* domain) { + if (domain != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + domain_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), domain, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (domain_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + domain_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.FunctionProto.domain) +} + +// optional string overload = 13; +inline bool FunctionProto::_internal_has_overload() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool FunctionProto::has_overload() const { + return _internal_has_overload(); +} +inline void FunctionProto::clear_overload() { + overload_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000008u; +} +inline const std::string& FunctionProto::overload() const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.overload) + return _internal_overload(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void FunctionProto::set_overload(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000008u; + overload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:opencv_onnx.FunctionProto.overload) +} +inline std::string* FunctionProto::mutable_overload() { + std::string* _s = _internal_mutable_overload(); + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.overload) + return _s; +} +inline const std::string& FunctionProto::_internal_overload() const { + return overload_.Get(); +} +inline void FunctionProto::_internal_set_overload(const std::string& value) { + _has_bits_[0] |= 0x00000008u; + overload_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* FunctionProto::_internal_mutable_overload() { + _has_bits_[0] |= 0x00000008u; + return overload_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* FunctionProto::release_overload() { + // @@protoc_insertion_point(field_release:opencv_onnx.FunctionProto.overload) + if (!_internal_has_overload()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000008u; + auto* p = overload_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (overload_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void FunctionProto::set_allocated_overload(std::string* overload) { + if (overload != nullptr) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + overload_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), overload, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (overload_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + overload_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:opencv_onnx.FunctionProto.overload) +} + +// repeated .opencv_onnx.ValueInfoProto value_info = 12; +inline int FunctionProto::_internal_value_info_size() const { + return value_info_.size(); +} +inline int FunctionProto::value_info_size() const { + return _internal_value_info_size(); +} +inline void FunctionProto::clear_value_info() { + value_info_.Clear(); +} +inline ::opencv_onnx::ValueInfoProto* FunctionProto::mutable_value_info(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.value_info) + return value_info_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >* +FunctionProto::mutable_value_info() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.FunctionProto.value_info) + return &value_info_; +} +inline const ::opencv_onnx::ValueInfoProto& FunctionProto::_internal_value_info(int index) const { + return value_info_.Get(index); +} +inline const ::opencv_onnx::ValueInfoProto& FunctionProto::value_info(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.value_info) + return _internal_value_info(index); +} +inline ::opencv_onnx::ValueInfoProto* FunctionProto::_internal_add_value_info() { + return value_info_.Add(); +} +inline ::opencv_onnx::ValueInfoProto* FunctionProto::add_value_info() { + ::opencv_onnx::ValueInfoProto* _add = _internal_add_value_info(); + // @@protoc_insertion_point(field_add:opencv_onnx.FunctionProto.value_info) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::ValueInfoProto >& +FunctionProto::value_info() const { + // @@protoc_insertion_point(field_list:opencv_onnx.FunctionProto.value_info) + return value_info_; +} + +// repeated .opencv_onnx.StringStringEntryProto metadata_props = 14; +inline int FunctionProto::_internal_metadata_props_size() const { + return metadata_props_.size(); +} +inline int FunctionProto::metadata_props_size() const { + return _internal_metadata_props_size(); +} +inline void FunctionProto::clear_metadata_props() { + metadata_props_.Clear(); +} +inline ::opencv_onnx::StringStringEntryProto* FunctionProto::mutable_metadata_props(int index) { + // @@protoc_insertion_point(field_mutable:opencv_onnx.FunctionProto.metadata_props) + return metadata_props_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >* +FunctionProto::mutable_metadata_props() { + // @@protoc_insertion_point(field_mutable_list:opencv_onnx.FunctionProto.metadata_props) + return &metadata_props_; +} +inline const ::opencv_onnx::StringStringEntryProto& FunctionProto::_internal_metadata_props(int index) const { + return metadata_props_.Get(index); +} +inline const ::opencv_onnx::StringStringEntryProto& FunctionProto::metadata_props(int index) const { + // @@protoc_insertion_point(field_get:opencv_onnx.FunctionProto.metadata_props) + return _internal_metadata_props(index); +} +inline ::opencv_onnx::StringStringEntryProto* FunctionProto::_internal_add_metadata_props() { + return metadata_props_.Add(); +} +inline ::opencv_onnx::StringStringEntryProto* FunctionProto::add_metadata_props() { + ::opencv_onnx::StringStringEntryProto* _add = _internal_add_metadata_props(); + // @@protoc_insertion_point(field_add:opencv_onnx.FunctionProto.metadata_props) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_onnx::StringStringEntryProto >& +FunctionProto::metadata_props() const { + // @@protoc_insertion_point(field_list:opencv_onnx.FunctionProto.metadata_props) + return metadata_props_; +} + #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ @@ -7429,6 +14128,34 @@ inline void OperatorSetIdProto::set_version(int64_t value) { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) @@ -7437,20 +14164,10 @@ inline void OperatorSetIdProto::set_version(int64_t value) { PROTOBUF_NAMESPACE_OPEN template <> struct is_proto_enum< ::opencv_onnx::AttributeProto_AttributeType> : ::std::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> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::opencv_onnx::TensorProto_DataType>() { - return ::opencv_onnx::TensorProto_DataType_descriptor(); -} +template <> struct is_proto_enum< ::opencv_onnx::TensorProto_DataLocation> : ::std::true_type {}; template <> struct is_proto_enum< ::opencv_onnx::Version> : ::std::true_type {}; -template <> -inline const EnumDescriptor* GetEnumDescriptor< ::opencv_onnx::Version>() { - return ::opencv_onnx::Version_descriptor(); -} +template <> struct is_proto_enum< ::opencv_onnx::OperatorStatus> : ::std::true_type {}; PROTOBUF_NAMESPACE_CLOSE diff --git a/modules/dnn/src/onnx/onnx_graph_simplifier.cpp b/modules/dnn/src/onnx/onnx_graph_simplifier.cpp index d40ac36ece..9e90c3269e 100644 --- a/modules/dnn/src/onnx/onnx_graph_simplifier.cpp +++ b/modules/dnn/src/onnx/onnx_graph_simplifier.cpp @@ -10,6 +10,8 @@ #ifdef HAVE_PROTOBUF #include "../graph_simplifier.hpp" #include "onnx_graph_simplifier.hpp" +#include +#include "opencv2/core/utils/filesystem.private.hpp" #include #include @@ -1704,14 +1706,68 @@ void simplifySubgraphs(opencv_onnx::GraphProto& net) simplifySubgraphs(Ptr(new ONNXGraphWrapper(net)), subgraphs); } -Mat getMatFromTensor(const opencv_onnx::TensorProto& tensor_proto, bool uint8ToInt8) + + +static char* getTensorRAWData(const opencv_onnx::TensorProto& tensor_proto, + std::vector& tensor_data, const std::string& base_path = "") +{ + if (tensor_proto.has_data_location() && tensor_proto.data_location() == opencv_onnx::TensorProto::EXTERNAL) { + #if OPENCV_HAVE_FILESYSTEM_SUPPORT + CV_Assert(tensor_proto.has_data_location() && tensor_proto.data_location() == opencv_onnx::TensorProto::EXTERNAL); + auto it_begin = tensor_proto.external_data().begin(); + auto it_end = tensor_proto.external_data().end(); + // file path + auto it = std::find_if(it_begin, it_end,[](const auto& entry) { return entry.key() == "location"; }); + CV_CheckTrue(it != it_end, "External tensor data location is not specified"); + + + std::string location_path = it->value(); + std::string full_path = base_path.empty() ? location_path : utils::fs::join(base_path, location_path); + + std::ifstream file(full_path, std::ios::binary | std::ios::ate); + CV_CheckTrue(file.is_open(), "Failed to open external tensor data file"); + + size_t size = file.tellg(); + file.seekg(0, std::ios::beg); + tensor_data.resize(divUp((size_t)size, sizeof(int64_t))); + + file.read((char*)tensor_data.data(), size); + return (char*)tensor_data.data(); + #else + CV_Error(Error::StsNotImplemented, "External tensor data is not supported without filesystem support"); + #endif + } + else if (!tensor_proto.raw_data().empty()) { + char* ptr = (char*)tensor_proto.raw_data().c_str(); + if (!isAligned(ptr)) + { + size_t size = tensor_proto.raw_data().size(); + tensor_data.resize(divUp(size, sizeof(int64_t))); + memcpy(tensor_data.data(), ptr, size); + ptr = (char*)tensor_data.data(); + } + return ptr; + } + else + { + return nullptr; + } +} + +Mat getMatFromTensor(const opencv_onnx::TensorProto& tensor_proto, bool uint8ToInt8, const std::string base_path) { if (tensor_proto.raw_data().empty() && tensor_proto.float_data().empty() && tensor_proto.double_data().empty() && tensor_proto.int64_data().empty() && - tensor_proto.int32_data().empty()) + tensor_proto.int32_data().empty() && + (!tensor_proto.has_data_location() || tensor_proto.data_location() != opencv_onnx::TensorProto::EXTERNAL) + ) return Mat(); - opencv_onnx::TensorProto_DataType datatype = tensor_proto.data_type(); + // read binary data, should be just empty in case it is set in _data field + std::vector external_tensor_data; + char* rawdata = getTensorRAWData(tensor_proto, external_tensor_data, base_path); + + int datatype = tensor_proto.data_type(); Mat blob; std::vector sizes; for (int i = 0; i < tensor_proto.dims_size(); i++) { @@ -1719,15 +1775,13 @@ Mat getMatFromTensor(const opencv_onnx::TensorProto& tensor_proto, bool uint8ToI } if (sizes.empty()) sizes.assign(1, 1); - if (datatype == opencv_onnx::TensorProto_DataType_FLOAT) { + 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); + Mat(sizes, CV_32FC1, (void*)tensor_proto.float_data().data()).copyTo(blob); } else { - char* val = const_cast(tensor_proto.raw_data().c_str()); - Mat(sizes, CV_32FC1, val).copyTo(blob); + Mat(sizes, CV_32FC1, rawdata).copyTo(blob); } } else if (datatype == opencv_onnx::TensorProto_DataType_FLOAT16) @@ -1739,113 +1793,53 @@ Mat getMatFromTensor(const opencv_onnx::TensorProto& tensor_proto, bool uint8ToI // Link: https://github.com/onnx/onnx/issues/4460#issuecomment-1224373746 if (!tensor_proto.int32_data().empty()) { - int offset = 0; -#ifdef WORDS_BIGENDIAN - offset = 1; -#endif - const ::google::protobuf::RepeatedField field = tensor_proto.int32_data(); - - AutoBuffer aligned_val; size_t sz = tensor_proto.int32_data().size(); - aligned_val.allocate(sz); - hfloat* bufPtr = aligned_val.data(); - - hfloat *fp16Ptr = (hfloat *)field.data(); - for (int i = 0; i < sz; i++) + std::vector halfvec(sz); + const int32_t* intdata = (const int32_t*)tensor_proto.int32_data().data(); + for (size_t i = 0; i < sz; i++) { - bufPtr[i] = fp16Ptr[i*2 + offset]; + union + { + int16_t h; + int32_t i; + } u; + u.i = intdata[i]; + halfvec[i] = u.h; } - Mat(sizes, CV_16FC1, bufPtr).convertTo(blob, CV_32FC1); + Mat(sizes, CV_16FC1, halfvec.data()).convertTo(blob, CV_32FC1); } else { - char* val = const_cast(tensor_proto.raw_data().c_str()); -#if CV_STRONG_ALIGNMENT - // Aligned pointer is required. - AutoBuffer aligned_val; - if (!isAligned(val)) - { - size_t sz = tensor_proto.raw_data().size(); - aligned_val.allocate(divUp(sz, sizeof(hfloat))); - memcpy(aligned_val.data(), val, sz); - val = (char*)aligned_val.data(); - } -#endif - Mat(sizes, CV_16FC1, val).convertTo(blob, CV_32FC1); + Mat(sizes, CV_16FC1, rawdata).convertTo(blob, CV_32FC1); } } else if (datatype == opencv_onnx::TensorProto_DataType_DOUBLE) { - const ::google::protobuf::RepeatedField field = tensor_proto.double_data(); - char* val = nullptr; - if (!field.empty()) - val = (char *)field.data(); + if (!tensor_proto.double_data().empty()) + Mat(sizes, CV_64FC1, (void*)tensor_proto.double_data().data()).convertTo(blob, CV_32FC1); else - val = const_cast(tensor_proto.raw_data().c_str()); // sometime, the double will be stored at raw_data. - -#if CV_STRONG_ALIGNMENT - // Aligned pointer is required. - AutoBuffer aligned_val; - if (!isAligned(val)) - { - size_t sz = tensor_proto.raw_data().size(); - aligned_val.allocate(divUp(sz, sizeof(double))); - memcpy(aligned_val.data(), val, sz); - val = (char*)aligned_val.data(); - } -#endif - Mat(sizes, CV_64FC1, val).convertTo(blob, CV_32FC1); + Mat(sizes, CV_64FC1, rawdata).convertTo(blob, CV_32FC1); } else if (datatype == opencv_onnx::TensorProto_DataType_INT32) { if (!tensor_proto.int32_data().empty()) - { - const ::google::protobuf::RepeatedField field = tensor_proto.int32_data(); - Mat(sizes, CV_32SC1, (void*)field.data()).copyTo(blob); - } + Mat(sizes, CV_32SC1, (void*)tensor_proto.int32_data().data()).copyTo(blob); else - { - char* val = const_cast(tensor_proto.raw_data().c_str()); - Mat(sizes, CV_32SC1, val).copyTo(blob); - } + Mat(sizes, CV_32SC1, rawdata).copyTo(blob); } else if (datatype == opencv_onnx::TensorProto_DataType_INT64) { - if (!tensor_proto.int64_data().empty()) { - ::google::protobuf::RepeatedField< ::google::protobuf::int64> src = tensor_proto.int64_data(); - Mat(sizes, CV_64SC1, (void*)src.data()).copyTo(blob); - } + if (!tensor_proto.int64_data().empty()) + Mat(sizes, CV_64SC1, (void*)tensor_proto.int64_data().data()).copyTo(blob); else - { - const char* val = tensor_proto.raw_data().c_str(); -#if CV_STRONG_ALIGNMENT - // Aligned pointer is required: https://github.com/opencv/opencv/issues/16373 - // this doesn't work: typedef int64_t CV_DECL_ALIGNED(1) unaligned_int64_t; - AutoBuffer aligned_val; - if (!isAligned(val)) - { - size_t sz = tensor_proto.raw_data().size(); - aligned_val.allocate(divUp(sz, sizeof(int64_t))); - memcpy(aligned_val.data(), val, sz); - val = (const char*)aligned_val.data(); - } -#endif - const int64_t* src = reinterpret_cast(val); - Mat(sizes, CV_64SC1, (void*)src).copyTo(blob); - } + Mat(sizes, CV_64SC1, rawdata).copyTo(blob); } else if (datatype == opencv_onnx::TensorProto_DataType_INT8) { if (!tensor_proto.int32_data().empty()) - { - const ::google::protobuf::RepeatedField field = tensor_proto.int32_data(); - Mat(sizes, CV_32SC1, (void*)field.data()).convertTo(blob, CV_8S); - } + Mat(sizes, CV_32SC1, (void*)tensor_proto.int32_data().data()).convertTo(blob, CV_8S); else - { - char* val = const_cast(tensor_proto.raw_data().c_str()); - Mat(sizes, CV_8S, val).copyTo(blob); - } + Mat(sizes, CV_8S, rawdata).copyTo(blob); } else if (datatype == opencv_onnx::TensorProto_DataType_UINT8) { @@ -1853,30 +1847,29 @@ Mat getMatFromTensor(const opencv_onnx::TensorProto& tensor_proto, bool uint8ToI if (!tensor_proto.int32_data().empty()) { - const ::google::protobuf::RepeatedField field = tensor_proto.int32_data(); + int32_t* intdata = (int32_t*)tensor_proto.int32_data().data(); if (uint8ToInt8) - Mat(sizes, CV_32SC1, (void*)field.data()).convertTo(blob, CV_8S, 1, -128); // handle as ONNX quantized weight + Mat(sizes, CV_32SC1, intdata).convertTo(blob, CV_8S, 1, -128); // handle as ONNX quantized weight else - Mat(sizes, CV_32SC1, (void*)field.data()).convertTo(blob, CV_8U); + Mat(sizes, CV_32SC1, intdata).convertTo(blob, CV_8U); } else { - char* val = const_cast(tensor_proto.raw_data().c_str()); if (uint8ToInt8) - Mat(sizes, CV_8U, val).convertTo(blob, CV_8S, 1, -128); // handle as ONNX quantized weight + Mat(sizes, CV_8U, rawdata).convertTo(blob, CV_8S, 1, -128); // handle as ONNX quantized weight else - Mat(sizes, CV_8U, val).copyTo(blob); + Mat(sizes, CV_8U, rawdata).copyTo(blob); } } else if (datatype == opencv_onnx::TensorProto_DataType_BOOL) { - char* val = const_cast(tensor_proto.raw_data().c_str()); - Mat(sizes, CV_Bool, val).copyTo(blob); + Mat(sizes, CV_Bool, rawdata).copyTo(blob); } else { - std::string errorMsg = "Unsupported data type: " + - opencv_onnx::TensorProto_DataType_Name(datatype); + // @TODO: refactor the error handling + std::string errorMsg = "Unsupported data type: "; /* + + opencv_onnx::TensorProto_DataType_Name(datatype);*/ if (!DNN_DIAGNOSTICS_RUN) { diff --git a/modules/dnn/src/onnx/onnx_graph_simplifier.hpp b/modules/dnn/src/onnx/onnx_graph_simplifier.hpp index 88e2e1ded5..bbe2611b63 100644 --- a/modules/dnn/src/onnx/onnx_graph_simplifier.hpp +++ b/modules/dnn/src/onnx/onnx_graph_simplifier.hpp @@ -36,7 +36,7 @@ void convertInt64ToInt32(const T1& src, T2& dst, int size) * @param uint8ToInt8 if true, handles uint8 tensor as quantized weight. So output Mat = int8(int32(uint8_tensor) - 128)). * if false, just returns uint8 Mat. */ -Mat getMatFromTensor(const opencv_onnx::TensorProto& tensor_proto, bool uint8ToInt8 = true); +Mat getMatFromTensor(const opencv_onnx::TensorProto& tensor_proto, bool uint8ToInt8=true, const std::string base_path = ""); CV__DNN_INLINE_NS_END }} // namespace dnn, namespace cv diff --git a/modules/dnn/src/onnx/onnx_importer.cpp b/modules/dnn/src/onnx/onnx_importer.cpp index 90f72c3638..aea263777a 100644 --- a/modules/dnn/src/onnx/onnx_importer.cpp +++ b/modules/dnn/src/onnx/onnx_importer.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -29,6 +30,7 @@ #include #include + #if defined _MSC_VER && _MSC_VER < 1910/*MSVS 2017*/ #pragma warning(push) #pragma warning(disable: 4503) // decorated name length exceeded, name was truncated @@ -232,6 +234,8 @@ private: return param; } std::string extractNodeName(const opencv_onnx::NodeProto& node_proto); + std::string onnxBasePath; + }; @@ -285,7 +289,7 @@ ONNXImporter::ONNXImporter(Net& net, const char *onnxFile) { CV_Error(Error::StsUnsupportedFormat, cv::format("Failed to parse ONNX model: %s", onnxFile)); } - + onnxBasePath = utils::fs::getParent(onnxFile); populateNet(); } @@ -418,7 +422,7 @@ std::map ONNXImporter::getGraphTensors( { const opencv_onnx::TensorProto& tensor_proto = graph_proto.initializer(i); dumpTensorProto(i, tensor_proto, "initializer"); - Mat mat = getMatFromTensor(tensor_proto); + Mat mat = getMatFromTensor(tensor_proto, true, onnxBasePath); releaseONNXTensor(const_cast(tensor_proto)); // drop already loaded data if (DNN_DIAGNOSTICS_RUN && mat.empty()) diff --git a/modules/dnn/src/onnx/onnx_importer2.cpp b/modules/dnn/src/onnx/onnx_importer2.cpp index bf6784f854..b2e2ddf9f7 100644 --- a/modules/dnn/src/onnx/onnx_importer2.cpp +++ b/modules/dnn/src/onnx/onnx_importer2.cpp @@ -7,7 +7,7 @@ #include #include - +#include #include #include #undef CV_LOG_STRIP_LEVEL @@ -58,7 +58,9 @@ static T getScalarFromMat(Mat m) return m.at(0); } -static int dataType2cv(opencv_onnx::TensorProto_DataType dt) + + +static int dataType2cv(int dt) { return dt == opencv_onnx::TensorProto_DataType_UINT8 ? CV_8U : @@ -77,7 +79,8 @@ static int dataType2cv(opencv_onnx::TensorProto_DataType dt) dt == opencv_onnx::TensorProto_DataType_BOOL ? CV_Bool : -1; } -static std::string dataType2str(opencv_onnx::TensorProto_DataType dt) + +static std::string dataType2str(int dt) { const char* str = dt == opencv_onnx::TensorProto_DataType_UNDEFINED ? "UNDEFINED" : @@ -100,9 +103,9 @@ static std::string dataType2str(opencv_onnx::TensorProto_DataType dt) return std::string(str); } -static Mat getMatFromTensor2(const opencv_onnx::TensorProto& tensor_proto) +static Mat getMatFromTensor2(const opencv_onnx::TensorProto& tensor_proto, const std::string base_path="") { - Mat m = getMatFromTensor(tensor_proto, false); + Mat m = getMatFromTensor(tensor_proto, false, base_path); m.dims = (int)tensor_proto.dims_size(); return m; } @@ -140,6 +143,7 @@ protected: Net net; Net::Impl* netimpl; std::string onnxFilename; + std::string onnxBasePath; Ptr curr_graph; opencv_onnx::GraphProto* curr_graph_proto; std::vector > curr_prog; @@ -263,6 +267,9 @@ Net ONNXImporter2::parseFile(const char *onnxFilename_) { CV_Assert(onnxFilename_); onnxFilename = onnxFilename_; + + onnxBasePath = utils::fs::getParent(onnxFilename_); + CV_LOG_DEBUG(NULL, "DNN/ONNX: processing ONNX model from file: " << onnxFilename); std::fstream input(onnxFilename, std::ios::in | std::ios::binary); @@ -708,7 +715,7 @@ bool ONNXImporter2::parseValueInfo(const opencv_onnx::ValueInfoProto& valueInfoP Mat ONNXImporter2::parseTensor(const opencv_onnx::TensorProto& tensor_proto) { - return getMatFromTensor2(tensor_proto); + return getMatFromTensor2(tensor_proto, onnxBasePath); } Ptr ONNXImporter2::parseGraph(opencv_onnx::GraphProto* graph_proto, bool mainGraph_) diff --git a/modules/dnn/src/onnx/opencv-onnx.proto b/modules/dnn/src/onnx/opencv-onnx.proto index 8dd69cb2d9..655bea304e 100644 --- a/modules/dnn/src/onnx/opencv-onnx.proto +++ b/modules/dnn/src/onnx/opencv-onnx.proto @@ -3,8 +3,8 @@ // -// Copyright (c) Facebook Inc. and Microsoft Corporation. -// Licensed under the MIT license. +// SPDX-License-Identifier: Apache-2.0 + syntax = "proto2"; @@ -27,13 +27,6 @@ package opencv_onnx; // 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 @@ -74,7 +67,54 @@ enum Version { // - Added new message OperatorSetIdProto // - Added opset_import in ModelProto // - For vendor extensions, added domain in NodeProto - IR_VERSION = 0x0000000000000003; + IR_VERSION_2017_11_3 = 0x0000000000000003; + + // IR VERSION 4 published on Jan 22, 2019 + // - Relax constraint that initializers should be a subset of graph inputs + // - Add type BFLOAT16 + IR_VERSION_2019_1_22 = 0x0000000000000004; + + // IR VERSION 5 published on March 18, 2019 + // - Add message TensorAnnotation. + // - Add quantization annotation in GraphProto to map tensor with its scale and zero point quantization parameters. + IR_VERSION_2019_3_18 = 0x0000000000000005; + + // IR VERSION 6 published on Sep 19, 2019 + // - Add support for sparse tensor constants stored in model. + // - Add message SparseTensorProto + // - Add sparse initializers + IR_VERSION_2019_9_19 = 0x0000000000000006; + + // IR VERSION 7 published on May 8, 2020 + // - Add support to allow function body graph to rely on multiple external opreator sets. + // - Add a list to promote inference graph's initializers to global and + // mutable variables. Global variables are visible in all graphs of the + // stored models. + // - Add message TrainingInfoProto to store initialization + // method and training algorithm. The execution of TrainingInfoProto + // can modify the values of mutable variables. + // - Implicitly add inference graph into each TrainingInfoProto's algorithm. + IR_VERSION_2020_5_8 = 0x0000000000000007; + + // IR VERSION 8 published on July 30, 2021 + // Introduce TypeProto.SparseTensor + // Introduce TypeProto.Optional + // Added a list of FunctionProtos local to the model + // Deprecated since_version and operator status from FunctionProto + IR_VERSION_2021_7_30 = 0x0000000000000008; + + // IR VERSION 9 published on May 5, 2023 + // Added AttributeProto to FunctionProto so that default attribute values can be set. + // Added FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ. + IR_VERSION_2023_5_5 = 0x0000000000000009; + + // IR VERSION 10 published on March 25, 2024 + // Added UINT4, INT4. + IR_VERSION_2024_3_25 = 0x000000000000000A; + + // IR VERSION 11 published on TBD + // Added FLOAT4E2M1, multi-device protobuf classes. + IR_VERSION = 0x000000000000000B; } // Attributes @@ -84,6 +124,8 @@ enum Version { // An AttributeProto MUST contain the name field, and *only one* of the // following content fields, effectively enforcing a C/C++ union equivalent. message AttributeProto { + reserved 12, 16 to 19; + reserved "v"; // 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. @@ -94,12 +136,16 @@ message AttributeProto { STRING = 3; TENSOR = 4; GRAPH = 5; + SPARSE_TENSOR = 11; + TYPE_PROTO = 13; FLOATS = 6; INTS = 7; STRINGS = 8; TENSORS = 9; GRAPHS = 10; + SPARSE_TENSORS = 12; + TYPE_PROTOS = 14; } // The name field MUST be present for this version of the IR. @@ -128,14 +174,18 @@ message AttributeProto { optional bytes s = 4; // UTF-8 string optional TensorProto t = 5; // tensor value optional GraphProto g = 6; // graph + optional SparseTensorProto sparse_tensor = 22; // sparse tensor value // Do not use field below, it's deprecated. // optional ValueProto v = 12; // value - subsumes everything but graph + optional TypeProto tp = 14; // type proto 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 + repeated SparseTensorProto sparse_tensors = 23; // list of sparse tensors + repeated TypeProto type_protos = 15;// list of type protos } // Defines information on value, including the name, the type, and @@ -143,10 +193,13 @@ message AttributeProto { 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. + // This field MUST be present in this version of the IR for + // inputs and outputs of the top-level graph. optional TypeProto type = 2; // A human-readable documentation for this value. Markdown is allowed. optional string doc_string = 3; + // Named metadata values; keys should be distinct. + repeated StringStringEntryProto metadata_props = 4; } // Nodes @@ -168,12 +221,212 @@ message NodeProto { 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 + // Overload identifier, used only to map this to a model-local function. + optional string overload = 8; // Additional named attributes. repeated AttributeProto attribute = 5; // A human-readable documentation for this node. Markdown is allowed. optional string doc_string = 6; + + // Named metadata values; keys should be distinct. + repeated StringStringEntryProto metadata_props = 9; + + // Configuration of multi-device annotations. + repeated NodeDeviceConfigurationProto device_configurations = 10; +} + +// IntIntListEntryProto follows the pattern for cross-proto-version maps. +// See https://developers.google.com/protocol-buffers/docs/proto3#maps +message IntIntListEntryProto { + optional int64 key = 1; + repeated int64 value = 2; +}; + +// Multi-device configuration proto for NodeProto. +message NodeDeviceConfigurationProto { + // This field MUST be present for this version of the IR. + // ID of the configuration. MUST match the name of a DeviceConfigurationProto. + optional string configuration_id = 1; + // Sharding spec for the node. + repeated ShardingSpecProto sharding_spec = 2; + // Pipeline stage of this node. + optional int32 pipeline_stage = 3; +} + +// ShardingSpecProto: This describes the sharding spec for a specific +// input or output tensor of a node. +message ShardingSpecProto { + // This field MUST be present for this version of the IR. + // Identifies the input or output of the node that is being sharded. + // Required to match a name specified in the node's input or output list of ValueInfoProtos. + // It is called `logical tensor` in subsequent descriptions. + optional string tensor_name = 1; + + // The following is the list of devices across which the logical + // tensor is sharded or replicated. + repeated int64 device = 2; + + // Each element v in above field devices may represent either a + // device or a set of devices (when we want the same shard/tensor + // to be replicated across a subset of devices), as indicated by + // the following optional map. If the map contains an entry for v, + // then v represents a device group, and the map indicates the set + // of devices in that group. + repeated IntIntListEntryProto index_to_device_group_map = 3; + + // The following is the sharded-shape of the tensor, consisting of + // the sharding-spec for each axis of the tensor. + repeated ShardedDimProto sharded_dim = 4; +} + +// ShardedDimProto: This describes the sharding spec for a single +// axis of a sharded tensor. +message ShardedDimProto { + // This field MUST be present for this version of the IR. + // The axis this sharding corresponds to. Must be in the range of + // [-r, r - 1], where r is the rank of the tensor. Negative axis values means + // counting from the back. + optional int64 axis = 1; + + // Describes how the tensor on the provided axis is sharded. + // The common-case is described by a single instance of SimpleShardedDimProto. + // Multiple instances can be used to handle cases where a sharded + // tensor is reshaped, fusing multiple axes into one. + repeated SimpleShardedDimProto simple_sharding = 2; +} + +// SimpleShardedDimProto: Indicates that N blocks are divided into M shards. +// N is allowed to be symbolic where M is required to be a constant. +message SimpleShardedDimProto { + // Dimension value to be sharded. + oneof dim { + int64 dim_value = 1; + string dim_param = 2; + } + + // This field MUST be present for this version of the IR. + // Number of shards to split dim into. + optional int64 num_shards = 3; +} + +// Training information +// TrainingInfoProto stores information for training a model. +// In particular, this defines two functionalities: an initialization-step +// and a training-algorithm-step. Initialization resets the model +// back to its original state as if no training has been performed. +// Training algorithm improves the model based on input data. +// +// The semantics of the initialization-step is that the initializers +// in ModelProto.graph and in TrainingInfoProto.algorithm are first +// initialized as specified by the initializers in the graph, and then +// updated by the "initialization_binding" in every instance in +// ModelProto.training_info. +// +// The field "algorithm" defines a computation graph which represents a +// training algorithm's step. After the execution of a +// TrainingInfoProto.algorithm, the initializers specified by "update_binding" +// may be immediately updated. If the targeted training algorithm contains +// consecutive update steps (such as block coordinate descent methods), +// the user needs to create a TrainingInfoProto for each step. +message TrainingInfoProto { + // This field describes a graph to compute the initial tensors + // upon starting the training process. Initialization graph has no input + // and can have multiple outputs. Usually, trainable tensors in neural + // networks are randomly initialized. To achieve that, for each tensor, + // the user can put a random number operator such as RandomNormal or + // RandomUniform in TrainingInfoProto.initialization.node and assign its + // random output to the specific tensor using "initialization_binding". + // This graph can also set the initializers in "algorithm" in the same + // TrainingInfoProto; a use case is resetting the number of training + // iteration to zero. + // + // By default, this field is an empty graph and its evaluation does not + // produce any output. Thus, no initializer would be changed by default. + optional GraphProto initialization = 1; + + // This field represents a training algorithm step. Given required inputs, + // it computes outputs to update initializers in its own or inference graph's + // initializer lists. In general, this field contains loss node, gradient node, + // optimizer node, increment of iteration count. + // + // An execution of the training algorithm step is performed by executing the + // graph obtained by combining the inference graph (namely "ModelProto.graph") + // and the "algorithm" graph. That is, the actual + // input/initializer/output/node/value_info/sparse_initializer list of + // the training graph is the concatenation of + // "ModelProto.graph.input/initializer/output/node/value_info/sparse_initializer" + // and "algorithm.input/initializer/output/node/value_info/sparse_initializer" + // in that order. This combined graph must satisfy the normal ONNX conditions. + // Now, let's provide a visualization of graph combination for clarity. + // Let the inference graph (i.e., "ModelProto.graph") be + // tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d + // and the "algorithm" graph be + // tensor_d -> Add -> tensor_e + // The combination process results + // tensor_a, tensor_b -> MatMul -> tensor_c -> Sigmoid -> tensor_d -> Add -> tensor_e + // + // Notice that an input of a node in the "algorithm" graph may reference the + // output of a node in the inference graph (but not the other way round). Also, inference + // node cannot reference inputs of "algorithm". With these restrictions, inference graph + // can always be run independently without training information. + // + // By default, this field is an empty graph and its evaluation does not + // produce any output. Evaluating the default training step never + // update any initializers. + optional GraphProto algorithm = 2; + + // This field specifies the bindings from the outputs of "initialization" to + // some initializers in "ModelProto.graph.initializer" and + // the "algorithm.initializer" in the same TrainingInfoProto. + // See "update_binding" below for details. + // + // By default, this field is empty and no initializer would be changed + // by the execution of "initialization". + repeated StringStringEntryProto initialization_binding = 3; + + // Gradient-based training is usually an iterative procedure. In one gradient + // descent iteration, we apply + // + // x = x - r * g + // + // where "x" is the optimized tensor, "r" stands for learning rate, and "g" is + // gradient of "x" with respect to a chosen loss. To avoid adding assignments + // into the training graph, we split the update equation into + // + // y = x - r * g + // x = y + // + // The user needs to save "y = x - r * g" into TrainingInfoProto.algorithm. To + // tell that "y" should be assigned to "x", the field "update_binding" may + // contain a key-value pair of strings, "x" (key of StringStringEntryProto) + // and "y" (value of StringStringEntryProto). + // For a neural network with multiple trainable (mutable) tensors, there can + // be multiple key-value pairs in "update_binding". + // + // The initializers appears as keys in "update_binding" are considered + // mutable variables. This implies some behaviors + // as described below. + // + // 1. We have only unique keys in all "update_binding"s so that two + // variables may not have the same name. This ensures that one + // variable is assigned up to once. + // 2. The keys must appear in names of "ModelProto.graph.initializer" or + // "TrainingInfoProto.algorithm.initializer". + // 3. The values must be output names of "algorithm" or "ModelProto.graph.output". + // 4. Mutable variables are initialized to the value specified by the + // corresponding initializer, and then potentially updated by + // "initializer_binding"s and "update_binding"s in "TrainingInfoProto"s. + // + // This field usually contains names of trainable tensors + // (in ModelProto.graph), optimizer states such as momentums in advanced + // stochastic gradient methods (in TrainingInfoProto.graph), + // and number of training iterations (in TrainingInfoProto.graph). + // + // By default, this field is empty and no initializer would be changed + // by the execution of "algorithm". + repeated StringStringEntryProto update_binding = 4; } // Models @@ -181,7 +434,7 @@ message NodeProto { // 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. +// The semantics of the model are described by the associated GraphProto's. message ModelProto { // The version of the IR this model targets. See Version enum above. // This field MUST be present. @@ -226,15 +479,71 @@ message ModelProto { // Named metadata values; keys should be distinct. repeated StringStringEntryProto metadata_props = 14; + + // Training-specific information. Sequentially executing all stored + // `TrainingInfoProto.algorithm`s and assigning their outputs following + // the corresponding `TrainingInfoProto.update_binding`s is one training + // iteration. Similarly, to initialize the model + // (as if training hasn't happened), the user should sequentially execute + // all stored `TrainingInfoProto.initialization`s and assigns their outputs + // using `TrainingInfoProto.initialization_binding`s. + // + // If this field is empty, the training behavior of the model is undefined. + repeated TrainingInfoProto training_info = 20; + + // A list of function protos local to the model. + // + // The (domain, name, overload) tuple must be unique across the function protos in this list. + // In case of any conflicts the behavior (whether the model local functions are given higher priority, + // or standard operator sets are given higher priotity or this is treated as error) is defined by + // the runtimes. + // + // The operator sets imported by FunctionProto should be compatible with the ones + // imported by ModelProto and other model local FunctionProtos. + // Example, if same operator set say 'A' is imported by a FunctionProto and ModelProto + // or by 2 FunctionProtos then versions for the operator set may be different but, + // the operator schema returned for op_type, domain, version combination + // for both the versions should be same for every node in the function body. + // + // One FunctionProto can reference other FunctionProto in the model, however, recursive reference + // is not allowed. + repeated FunctionProto functions = 25; + + // Describes different target configurations for a multi-device use case. + // A model MAY describe multiple multi-device configurations for execution. + repeated DeviceConfigurationProto configuration = 26; }; +// DeviceConfigurationProto describes a multi-device configuration for a model. +message DeviceConfigurationProto { + // This field MUST be present for this version of the IR. + // Name of the configuration. + optional string name = 1; + // This field MUST be present for this version of the IR. + // Number of devices inside this configuration. + optional int32 num_devices = 2; + // Optional names of the devices. MUST be length of num_devices if provided. + repeated string device = 3; +} + // 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; + optional string value = 2; }; +message TensorAnnotation { + optional string tensor_name = 1; + // pairs to annotate tensor specified by above. + // The keys used in the mapping below must be pre-defined in ONNX spec. + // For example, for 8-bit linear quantization case, 'SCALE_TENSOR', 'ZERO_POINT_TENSOR' will be pre-defined as + // quantization parameter keys. + repeated StringStringEntryProto quant_parameter_tensor_names = 2; +} + + + // Graphs // // A graph defines the computational logic of a model and is comprised of a parameterized @@ -249,10 +558,14 @@ message GraphProto { 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. + // Each initializer (both TensorProto as well SparseTensorProto) MUST have a name. + // The name MUST be unique across both initializer and sparse_initializer, + // but the name MAY also appear in the input list. repeated TensorProto initializer = 5; + // Initializers (see above) stored in sparse format. + repeated SparseTensorProto sparse_initializer = 15; + // A human-readable documentation for this graph. Markdown is allowed. optional string doc_string = 10; @@ -264,13 +577,17 @@ message GraphProto { // 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; + // This field carries information to indicate the mapping among a tensor and its + // quantization parameter tensors. For example: + // For tensor 'a', it may have {'SCALE_TENSOR', 'a_scale'} and {'ZERO_POINT_TENSOR', 'a_zero_point'} annotated, + // which means, tensor 'a_scale' and tensor 'a_zero_point' are scale and zero point of tensor 'a' in the model. + repeated TensorAnnotation quantization_annotation = 14; + + // Named metadata values; keys should be distinct. + repeated StringStringEntryProto metadata_props = 16; + + reserved 3, 4, 6 to 9; + reserved "ir_version", "producer_version", "producer_tag", "domain"; } // Tensors @@ -290,13 +607,39 @@ message TensorProto { STRING = 8; // string BOOL = 9; // bool - // Advanced types + // IEEE754 half-precision floating-point format (16 bits wide). + // This format has 1 sign bit, 5 exponent bits, and 10 mantissa bits. 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 + + // Non-IEEE floating-point format based on IEEE754 single-precision + // floating-point number truncated to 16 bits. + // This format has 1 sign bit, 8 exponent bits, and 7 mantissa bits. + BFLOAT16 = 16; + + // Non-IEEE floating-point format based on papers + // FP8 Formats for Deep Learning, https://arxiv.org/abs/2209.05433, + // 8-bit Numerical Formats For Deep Neural Networks, https://arxiv.org/pdf/2206.02915.pdf. + // Operators supported FP8 are Cast, CastLike, QuantizeLinear, DequantizeLinear. + // The computation usually happens inside a block quantize / dequantize + // fused by the runtime. + FLOAT8E4M3FN = 17; // float 8, mostly used for coefficients, supports nan, not inf + FLOAT8E4M3FNUZ = 18; // float 8, mostly used for coefficients, supports nan, not inf, no negative zero + FLOAT8E5M2 = 19; // follows IEEE 754, supports nan, inf, mostly used for gradients + FLOAT8E5M2FNUZ = 20; // follows IEEE 754, supports nan, not inf, mostly used for gradients, no negative zero + + // 4-bit integer data types + UINT4 = 21; // Unsigned integer in range [0, 15] + INT4 = 22; // Signed integer in range [-8, 7], using two's-complement representation + + // 4-bit floating point data types + FLOAT4E2M1 = 23; + // Future extensions go here. } @@ -304,7 +647,8 @@ message TensorProto { repeated int64 dims = 1; // The data type of the tensor. - optional DataType data_type = 2; + // This field MUST have a valid TensorProto.DataType value + optional int32 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 @@ -329,11 +673,19 @@ message TensorProto { // 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. + // For int32, uint8, int8, uint16, int16, uint4, int4, bool, (b)float16, float8, and float4: + // - (b)float16 and float8 values MUST be converted bit-wise into an unsigned integer + // representation before being written to the buffer. + // - Each pair of uint4, int4, and float4 values MUST be packed as two 4-bit elements into a single byte. + // The first element is stored in the 4 least significant bits (LSB), + // and the second element is stored in the 4 most significant bits (MSB). + // + // Consequently: + // - For data types with a bit-width of 8 or greater, each `int32_data` stores one element. + // - For 4-bit data types, each `int32_data` stores two elements. + // // When this field is present, the data_type field MUST be - // INT32, INT16, INT8, UINT16, INT8, BOOL, or FLOAT16 + // INT32, INT16, INT8, INT4, UINT16, UINT8, UINT4, BOOL, FLOAT16, BFLOAT16, FLOAT8E4M3FN, FLOAT8E4M3FNUZ, FLOAT8E5M2, FLOAT8E5M2FNUZ, FLOAT4E2M1 repeated int32 int32_data = 5 [packed = true]; // For strings. @@ -363,6 +715,7 @@ message TensorProto { // 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). + // uint4 and int4 values must be packed to 4bitx2, the first element is stored in the 4 LSB and the second element is stored in the 4 MSB. // // 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 @@ -370,8 +723,30 @@ message TensorProto { // When this field is present, the data_type field MUST NOT be STRING or UNDEFINED optional bytes raw_data = 9; + // Data can be stored inside the protobuf file using type-specific fields or raw_data. + // Alternatively, raw bytes data can be stored in an external file, using the external_data field. + // external_data stores key-value pairs describing data location. Recognized keys are: + // - "location" (required) - POSIX filesystem path relative to the directory where the ONNX + // protobuf model was stored + // - "offset" (optional) - position of byte at which stored data begins. Integer stored as string. + // Offset values SHOULD be multiples 4096 (page size) to enable mmap support. + // - "length" (optional) - number of bytes containing data. Integer stored as string. + // - "checksum" (optional) - SHA1 digest of file specified in under 'location' key. + repeated StringStringEntryProto external_data = 13; + + // Location of the data for this tensor. MUST be one of: + // - DEFAULT - data stored inside the protobuf message. Data is stored in raw_data (if set) otherwise in type-specified field. + // - EXTERNAL - data stored in an external location as described by external_data field. + enum DataLocation { + DEFAULT = 0; + EXTERNAL = 1; + } + + // If value not set, data is stored in raw_data (if set) otherwise in type-specified field. + optional DataLocation data_location = 14; + // For double - // Complex64 tensors are encoded as a single array of doubles, + // Complex128 tensors are encoded as a single array of doubles, // with the real components appearing in odd numbered positions, // and the corresponding imaginary component appearing in the // subsequent even numbered position. (e.g., [1.0 + 2.0i, 3.0 + 4.0i] @@ -383,6 +758,33 @@ message TensorProto { // When this field is present, the data_type field MUST be // UINT32 or UINT64 repeated uint64 uint64_data = 11 [packed = true]; + + // Named metadata values; keys should be distinct. + repeated StringStringEntryProto metadata_props = 16; +} + +// A serialized sparse-tensor value +message SparseTensorProto { + // The sequence of non-default values are encoded as a tensor of shape [NNZ]. + // The default-value is zero for numeric tensors, and empty-string for string tensors. + // values must have a non-empty name present which serves as a name for SparseTensorProto + // when used in sparse_initializer list. + optional TensorProto values = 1; + + // The indices of the non-default values, which may be stored in one of two formats. + // (a) Indices can be a tensor of shape [NNZ, rank] with the [i,j]-th value + // corresponding to the j-th index of the i-th value (in the values tensor). + // (b) Indices can be a tensor of shape [NNZ], in which case the i-th value + // must be the linearized-index of the i-th value (in the values tensor). + // The linearized-index can be converted into an index tuple (k_1,...,k_rank) + // using the shape provided below. + // The indices must appear in ascending order without duplication. + // In the first format, the ordering is lexicographic-ordering: + // e.g., index-value [1,4] must appear before [2,1] + optional TensorProto indices = 2; + + // The shape of the underlying dense-tensor: [dim_1, dim_2, ... dim_rank] + repeated int64 dims = 3; } // Defines a tensor shape. A dimension can be either an integer value @@ -397,7 +799,7 @@ message TensorShapeProto { // 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 + // Refer to https://github.com/onnx/onnx/blob/main/docs/DimensionDenotation.md#denotation-definition // for pre-defined dimension denotations. optional string denotation = 3; }; @@ -411,8 +813,43 @@ message TypeProto { message Tensor { // This field MUST NOT have the value of UNDEFINED + // This field MUST have a valid TensorProto.DataType value // This field MUST be present for this version of the IR. - optional TensorProto.DataType elem_type = 1; + optional int32 elem_type = 1; + optional TensorShapeProto shape = 2; + } + + // repeated T + message Sequence { + // The type and optional shape of each element of the sequence. + // This field MUST be present for this version of the IR. + optional TypeProto elem_type = 1; + }; + + // map + message Map { + // This field MUST have a valid TensorProto.DataType value + // This field MUST be present for this version of the IR. + // This field MUST refer to an integral type ([U]INT{8|16|32|64}) or STRING + optional int32 key_type = 1; + // This field MUST be present for this version of the IR. + optional TypeProto value_type = 2; + }; + + // wrapper for Tensor, Sequence, or Map + message Optional { + // The type and optional shape of the element wrapped. + // This field MUST be present for this version of the IR. + // Possible values correspond to OptionalProto.DataType enum + optional TypeProto elem_type = 1; + }; + + + message SparseTensor { + // This field MUST NOT have the value of UNDEFINED + // This field MUST have a valid TensorProto.DataType value + // This field MUST be present for this version of the IR. + optional int32 elem_type = 1; optional TensorShapeProto shape = 2; } @@ -421,11 +858,29 @@ message TypeProto { // The type of a tensor. Tensor tensor_type = 1; + // NOTE: DNN-only implementations of ONNX MAY elect to not support non-tensor values + // as input and output to graphs and nodes. These types are needed to naturally + // support classical ML operators. DNN operators SHOULD restrict their input + // and output types to tensors. + + // The type of a sequence. + Sequence sequence_type = 4; + + // The type of a map. + Map map_type = 5; + + // The type of an optional. + Optional optional_type = 9; + + + // Type of the sparse tensor + SparseTensor sparse_tensor_type = 8; + } // 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 + // stored inside. Refer to https://github.com/onnx/onnx/blob/main/docs/TypeDenotation.md#type-denotation-definition // for pre-defined type denotations. optional string denotation = 6; } @@ -444,3 +899,79 @@ message OperatorSetIdProto { // This field MUST be present in this version of the IR. optional int64 version = 2; } + +// Operator/function status. +enum OperatorStatus { + EXPERIMENTAL = 0; + STABLE = 1; +} + +message FunctionProto { + // The name of the function, similar to op_type in NodeProto. + // This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. + optional string name = 1; + + // Deprecated since IR Version 8 + // optional int64 since_version = 2; + reserved 2; + reserved "since_version"; + + // Deprecated since IR Version 8 + // optional OperatorStatus status = 3; + reserved 3; + reserved "status"; + + // The inputs and outputs of the function. + repeated string input = 4; + repeated string output = 5; + + // The attribute parameters of the function. + // It is for function parameters without default values. + repeated string attribute = 6; + + // The attribute protos of the function. + // It is for function attributes with default values. + // A function attribute shall be represented either as + // a string attribute or an AttributeProto, not both. + repeated AttributeProto attribute_proto = 11; + + // The nodes in the function. + repeated NodeProto node = 7; + // A human-readable documentation for this function. Markdown is allowed. + optional string doc_string = 8; + + // The OperatorSets this function body (graph) relies on. + // + // All nodes in the function body (graph) will bind against the operator + // with the same-domain/same-op_type operator with the HIGHEST version + // in the referenced operator sets. This means at most one version can be relied + // for one domain. + // + // The operator sets imported by FunctionProto should be compatible with the ones + // imported by ModelProto. Example, if same operator set say 'A' is imported by FunctionProto + // and ModelProto then versions for the operator set may be different but, + // the operator schema returned for op_type, domain, version combination + // for both the versions should be same. + + repeated OperatorSetIdProto opset_import = 9; + + // The domain which this function belongs to. + // This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. + optional string domain = 10; + + // The overload identifier of the function. + // This is part of the unique-id (domain, name, overload) of FunctionProtos in a model. + optional string overload = 13; + + // Information for the values in the function. The ValueInfoProto.name's + // must be distinct and refer to names in the function (including inputs, + // outputs, and intermediate values). It is optional for a value to appear + // in value_info list. + repeated ValueInfoProto value_info = 12; + + // Named metadata values; keys should be distinct. + repeated StringStringEntryProto metadata_props = 14; +} + +// For using protobuf-lite +option optimize_for = LITE_RUNTIME; diff --git a/modules/dnn/test/test_onnx_importer.cpp b/modules/dnn/test/test_onnx_importer.cpp index e9e93ef93a..822e5b70e6 100644 --- a/modules/dnn/test/test_onnx_importer.cpp +++ b/modules/dnn/test/test_onnx_importer.cpp @@ -2085,6 +2085,12 @@ TEST_P(Test_ONNX_layers, Quantized_Gemm) testONNXModels("quantized_gemm", npy); } +TEST_P(Test_ONNX_layers, Gemm_External_Data) +{ + testONNXModels("gemm_external_data", npy); +} + + TEST_P(Test_ONNX_layers, Quantized_MatMul_Variable_Weights) { // Unsupported