Open Source Computer Vision Library https://opencv.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6978 lines
259 KiB

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: opencv-onnx.proto
#include "opencv-onnx.pb.h"
#include <algorithm>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)
namespace opencv_onnx {
class AttributeProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<AttributeProto>
_instance;
} _AttributeProto_default_instance_;
class ValueInfoProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<ValueInfoProto>
_instance;
} _ValueInfoProto_default_instance_;
class NodeProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<NodeProto>
_instance;
} _NodeProto_default_instance_;
class ModelProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<ModelProto>
_instance;
} _ModelProto_default_instance_;
class StringStringEntryProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<StringStringEntryProto>
_instance;
} _StringStringEntryProto_default_instance_;
class GraphProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<GraphProto>
_instance;
} _GraphProto_default_instance_;
class TensorProto_SegmentDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<TensorProto_Segment>
_instance;
} _TensorProto_Segment_default_instance_;
class TensorProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<TensorProto>
_instance;
} _TensorProto_default_instance_;
class TensorShapeProto_DimensionDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<TensorShapeProto_Dimension>
_instance;
::google::protobuf::int64 dim_value_;
::google::protobuf::internal::ArenaStringPtr dim_param_;
} _TensorShapeProto_Dimension_default_instance_;
class TensorShapeProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<TensorShapeProto>
_instance;
} _TensorShapeProto_default_instance_;
class TypeProto_TensorDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<TypeProto_Tensor>
_instance;
} _TypeProto_Tensor_default_instance_;
class TypeProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<TypeProto>
_instance;
const ::opencv_onnx::TypeProto_Tensor* tensor_type_;
} _TypeProto_default_instance_;
class OperatorSetIdProtoDefaultTypeInternal {
public:
::google::protobuf::internal::ExplicitlyConstructed<OperatorSetIdProto>
_instance;
} _OperatorSetIdProto_default_instance_;
} // namespace opencv_onnx
namespace protobuf_opencv_2donnx_2eproto {
void InitDefaultsAttributeProtoImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto();
protobuf_opencv_2donnx_2eproto::InitDefaultsValueInfoProto();
{
void* ptr = &::opencv_onnx::_AttributeProto_default_instance_;
new (ptr) ::opencv_onnx::AttributeProto();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
{
void* ptr = &::opencv_onnx::_NodeProto_default_instance_;
new (ptr) ::opencv_onnx::NodeProto();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
{
void* ptr = &::opencv_onnx::_GraphProto_default_instance_;
new (ptr) ::opencv_onnx::GraphProto();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::opencv_onnx::AttributeProto::InitAsDefaultInstance();
::opencv_onnx::NodeProto::InitAsDefaultInstance();
::opencv_onnx::GraphProto::InitAsDefaultInstance();
}
void InitDefaultsAttributeProto() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsAttributeProtoImpl);
}
void InitDefaultsValueInfoProtoImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto();
{
void* ptr = &::opencv_onnx::_ValueInfoProto_default_instance_;
new (ptr) ::opencv_onnx::ValueInfoProto();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::opencv_onnx::ValueInfoProto::InitAsDefaultInstance();
}
void InitDefaultsValueInfoProto() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsValueInfoProtoImpl);
}
void InitDefaultsModelProtoImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_opencv_2donnx_2eproto::InitDefaultsOperatorSetIdProto();
protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
protobuf_opencv_2donnx_2eproto::InitDefaultsStringStringEntryProto();
{
void* ptr = &::opencv_onnx::_ModelProto_default_instance_;
new (ptr) ::opencv_onnx::ModelProto();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::opencv_onnx::ModelProto::InitAsDefaultInstance();
}
void InitDefaultsModelProto() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsModelProtoImpl);
}
void InitDefaultsStringStringEntryProtoImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::opencv_onnx::_StringStringEntryProto_default_instance_;
new (ptr) ::opencv_onnx::StringStringEntryProto();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::opencv_onnx::StringStringEntryProto::InitAsDefaultInstance();
}
void InitDefaultsStringStringEntryProto() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStringStringEntryProtoImpl);
}
void InitDefaultsTensorProto_SegmentImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::opencv_onnx::_TensorProto_Segment_default_instance_;
new (ptr) ::opencv_onnx::TensorProto_Segment();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::opencv_onnx::TensorProto_Segment::InitAsDefaultInstance();
}
void InitDefaultsTensorProto_Segment() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorProto_SegmentImpl);
}
void InitDefaultsTensorProtoImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto_Segment();
{
void* ptr = &::opencv_onnx::_TensorProto_default_instance_;
new (ptr) ::opencv_onnx::TensorProto();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::opencv_onnx::TensorProto::InitAsDefaultInstance();
}
void InitDefaultsTensorProto() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorProtoImpl);
}
void InitDefaultsTensorShapeProto_DimensionImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::opencv_onnx::_TensorShapeProto_Dimension_default_instance_;
new (ptr) ::opencv_onnx::TensorShapeProto_Dimension();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::opencv_onnx::TensorShapeProto_Dimension::InitAsDefaultInstance();
}
void InitDefaultsTensorShapeProto_Dimension() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorShapeProto_DimensionImpl);
}
void InitDefaultsTensorShapeProtoImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto_Dimension();
{
void* ptr = &::opencv_onnx::_TensorShapeProto_default_instance_;
new (ptr) ::opencv_onnx::TensorShapeProto();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::opencv_onnx::TensorShapeProto::InitAsDefaultInstance();
}
void InitDefaultsTensorShapeProto() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorShapeProtoImpl);
}
void InitDefaultsTypeProto_TensorImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto();
{
void* ptr = &::opencv_onnx::_TypeProto_Tensor_default_instance_;
new (ptr) ::opencv_onnx::TypeProto_Tensor();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::opencv_onnx::TypeProto_Tensor::InitAsDefaultInstance();
}
void InitDefaultsTypeProto_Tensor() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTypeProto_TensorImpl);
}
void InitDefaultsTypeProtoImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto_Tensor();
{
void* ptr = &::opencv_onnx::_TypeProto_default_instance_;
new (ptr) ::opencv_onnx::TypeProto();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::opencv_onnx::TypeProto::InitAsDefaultInstance();
}
void InitDefaultsTypeProto() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTypeProtoImpl);
}
void InitDefaultsOperatorSetIdProtoImpl() {
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
#else
::google::protobuf::internal::InitProtobufDefaults();
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
{
void* ptr = &::opencv_onnx::_OperatorSetIdProto_default_instance_;
new (ptr) ::opencv_onnx::OperatorSetIdProto();
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
}
::opencv_onnx::OperatorSetIdProto::InitAsDefaultInstance();
}
void InitDefaultsOperatorSetIdProto() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsOperatorSetIdProtoImpl);
}
::google::protobuf::Metadata file_level_metadata[13];
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[3];
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, ref_attr_name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, doc_string_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, f_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, i_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, s_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, t_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, g_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, floats_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, ints_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, strings_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, tensors_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, graphs_),
0,
3,
2,
8,
7,
6,
1,
4,
5,
~0u,
~0u,
~0u,
~0u,
~0u,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, doc_string_),
0,
2,
1,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, input_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, output_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, op_type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, domain_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, attribute_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, doc_string_),
~0u,
~0u,
0,
1,
3,
~0u,
2,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, ir_version_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, opset_import_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_version_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, domain_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, model_version_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, doc_string_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, graph_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, metadata_props_),
5,
~0u,
0,
1,
2,
6,
3,
4,
~0u,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, key_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, value_),
0,
1,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, node_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, initializer_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, doc_string_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, input_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, output_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, value_info_),
~0u,
0,
~0u,
1,
~0u,
~0u,
~0u,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, begin_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, end_),
0,
1,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, dims_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, data_type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, segment_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, float_data_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, int32_data_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, string_data_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, int64_data_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, doc_string_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, raw_data_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, double_data_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, uint64_data_),
~0u,
4,
3,
~0u,
~0u,
~0u,
~0u,
0,
2,
1,
~0u,
~0u,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _internal_metadata_),
~0u, // no _extensions_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _oneof_case_[0]),
~0u, // no _weak_field_map_
offsetof(::opencv_onnx::TensorShapeProto_DimensionDefaultTypeInternal, dim_value_),
offsetof(::opencv_onnx::TensorShapeProto_DimensionDefaultTypeInternal, dim_param_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, denotation_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, value_),
~0u,
~0u,
0,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, dim_),
~0u,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, elem_type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, shape_),
1,
0,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, _internal_metadata_),
~0u, // no _extensions_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, _oneof_case_[0]),
~0u, // no _weak_field_map_
offsetof(::opencv_onnx::TypeProtoDefaultTypeInternal, tensor_type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, denotation_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, value_),
~0u,
0,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _has_bits_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, domain_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, version_),
0,
1,
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{ 0, 19, sizeof(::opencv_onnx::AttributeProto)},
{ 33, 41, sizeof(::opencv_onnx::ValueInfoProto)},
{ 44, 56, sizeof(::opencv_onnx::NodeProto)},
{ 63, 77, sizeof(::opencv_onnx::ModelProto)},
{ 86, 93, sizeof(::opencv_onnx::StringStringEntryProto)},
{ 95, 107, sizeof(::opencv_onnx::GraphProto)},
{ 114, 121, sizeof(::opencv_onnx::TensorProto_Segment)},
{ 123, 140, sizeof(::opencv_onnx::TensorProto)},
{ 152, 161, sizeof(::opencv_onnx::TensorShapeProto_Dimension)},
{ 164, 170, sizeof(::opencv_onnx::TensorShapeProto)},
{ 171, 178, sizeof(::opencv_onnx::TypeProto_Tensor)},
{ 180, 188, sizeof(::opencv_onnx::TypeProto)},
{ 190, 197, sizeof(::opencv_onnx::OperatorSetIdProto)},
};
static ::google::protobuf::Message const * const file_default_instances[] = {
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_AttributeProto_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_ValueInfoProto_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_NodeProto_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_ModelProto_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_StringStringEntryProto_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_GraphProto_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TensorProto_Segment_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TensorProto_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TensorShapeProto_Dimension_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TensorShapeProto_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TypeProto_Tensor_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TypeProto_default_instance_),
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_OperatorSetIdProto_default_instance_),
};
void protobuf_AssignDescriptors() {
AddDescriptors();
::google::protobuf::MessageFactory* factory = NULL;
AssignDescriptors(
"opencv-onnx.proto", schemas, file_default_instances, TableStruct::offsets, factory,
file_level_metadata, file_level_enum_descriptors, NULL);
}
void protobuf_AssignDescriptorsOnce() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
}
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 13);
}
void AddDescriptorsImpl() {
InitDefaults();
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
"\n\021opencv-onnx.proto\022\013opencv_onnx\"\203\004\n\016Att"
"ributeProto\022\014\n\004name\030\001 \001(\t\022\025\n\rref_attr_na"
"me\030\025 \001(\t\022\022\n\ndoc_string\030\r \001(\t\0227\n\004type\030\024 \001"
"(\0162).opencv_onnx.AttributeProto.Attribut"
"eType\022\t\n\001f\030\002 \001(\002\022\t\n\001i\030\003 \001(\003\022\t\n\001s\030\004 \001(\014\022#"
"\n\001t\030\005 \001(\0132\030.opencv_onnx.TensorProto\022\"\n\001g"
"\030\006 \001(\0132\027.opencv_onnx.GraphProto\022\016\n\006float"
"s\030\007 \003(\002\022\014\n\004ints\030\010 \003(\003\022\017\n\007strings\030\t \003(\014\022)"
"\n\007tensors\030\n \003(\0132\030.opencv_onnx.TensorProt"
"o\022\'\n\006graphs\030\013 \003(\0132\027.opencv_onnx.GraphPro"
"to\"\221\001\n\rAttributeType\022\r\n\tUNDEFINED\020\000\022\t\n\005F"
"LOAT\020\001\022\007\n\003INT\020\002\022\n\n\006STRING\020\003\022\n\n\006TENSOR\020\004\022"
"\t\n\005GRAPH\020\005\022\n\n\006FLOATS\020\006\022\010\n\004INTS\020\007\022\013\n\007STRI"
"NGS\020\010\022\013\n\007TENSORS\020\t\022\n\n\006GRAPHS\020\n\"X\n\016ValueI"
"nfoProto\022\014\n\004name\030\001 \001(\t\022$\n\004type\030\002 \001(\0132\026.o"
"pencv_onnx.TypeProto\022\022\n\ndoc_string\030\003 \001(\t"
"\"\235\001\n\tNodeProto\022\r\n\005input\030\001 \003(\t\022\016\n\006output\030"
"\002 \003(\t\022\014\n\004name\030\003 \001(\t\022\017\n\007op_type\030\004 \001(\t\022\016\n\006"
"domain\030\007 \001(\t\022.\n\tattribute\030\005 \003(\0132\033.opencv"
"_onnx.AttributeProto\022\022\n\ndoc_string\030\006 \001(\t"
"\"\250\002\n\nModelProto\022\022\n\nir_version\030\001 \001(\003\0225\n\014o"
"pset_import\030\010 \003(\0132\037.opencv_onnx.Operator"
"SetIdProto\022\025\n\rproducer_name\030\002 \001(\t\022\030\n\020pro"
"ducer_version\030\003 \001(\t\022\016\n\006domain\030\004 \001(\t\022\025\n\rm"
"odel_version\030\005 \001(\003\022\022\n\ndoc_string\030\006 \001(\t\022&"
"\n\005graph\030\007 \001(\0132\027.opencv_onnx.GraphProto\022;"
"\n\016metadata_props\030\016 \003(\0132#.opencv_onnx.Str"
"ingStringEntryProto\"4\n\026StringStringEntry"
"Proto\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\215\002\n\nGr"
"aphProto\022$\n\004node\030\001 \003(\0132\026.opencv_onnx.Nod"
"eProto\022\014\n\004name\030\002 \001(\t\022-\n\013initializer\030\005 \003("
"\0132\030.opencv_onnx.TensorProto\022\022\n\ndoc_strin"
"g\030\n \001(\t\022*\n\005input\030\013 \003(\0132\033.opencv_onnx.Val"
"ueInfoProto\022+\n\006output\030\014 \003(\0132\033.opencv_onn"
"x.ValueInfoProto\022/\n\nvalue_info\030\r \003(\0132\033.o"
"pencv_onnx.ValueInfoProto\"\275\004\n\013TensorProt"
"o\022\014\n\004dims\030\001 \003(\003\0224\n\tdata_type\030\002 \001(\0162!.ope"
"ncv_onnx.TensorProto.DataType\0221\n\007segment"
"\030\003 \001(\0132 .opencv_onnx.TensorProto.Segment"
"\022\026\n\nfloat_data\030\004 \003(\002B\002\020\001\022\026\n\nint32_data\030\005"
" \003(\005B\002\020\001\022\023\n\013string_data\030\006 \003(\014\022\026\n\nint64_d"
"ata\030\007 \003(\003B\002\020\001\022\014\n\004name\030\010 \001(\t\022\022\n\ndoc_strin"
"g\030\014 \001(\t\022\020\n\010raw_data\030\t \001(\014\022\027\n\013double_data"
"\030\n \003(\001B\002\020\001\022\027\n\013uint64_data\030\013 \003(\004B\002\020\001\032%\n\007S"
"egment\022\r\n\005begin\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\"\314\001\n\010D"
"ataType\022\r\n\tUNDEFINED\020\000\022\t\n\005FLOAT\020\001\022\t\n\005UIN"
"T8\020\002\022\010\n\004INT8\020\003\022\n\n\006UINT16\020\004\022\t\n\005INT16\020\005\022\t\n"
"\005INT32\020\006\022\t\n\005INT64\020\007\022\n\n\006STRING\020\010\022\010\n\004BOOL\020"
"\t\022\013\n\007FLOAT16\020\n\022\n\n\006DOUBLE\020\013\022\n\n\006UINT32\020\014\022\n"
"\n\006UINT64\020\r\022\r\n\tCOMPLEX64\020\016\022\016\n\nCOMPLEX128\020"
"\017\"\234\001\n\020TensorShapeProto\0224\n\003dim\030\001 \003(\0132\'.op"
"encv_onnx.TensorShapeProto.Dimension\032R\n\t"
"Dimension\022\023\n\tdim_value\030\001 \001(\003H\000\022\023\n\tdim_pa"
"ram\030\002 \001(\tH\000\022\022\n\ndenotation\030\003 \001(\tB\007\n\005value"
"\"\314\001\n\tTypeProto\0224\n\013tensor_type\030\001 \001(\0132\035.op"
"encv_onnx.TypeProto.TensorH\000\022\022\n\ndenotati"
"on\030\006 \001(\t\032l\n\006Tensor\0224\n\telem_type\030\001 \001(\0162!."
"opencv_onnx.TensorProto.DataType\022,\n\005shap"
"e\030\002 \001(\0132\035.opencv_onnx.TensorShapeProtoB\007"
"\n\005value\"5\n\022OperatorSetIdProto\022\016\n\006domain\030"
"\001 \001(\t\022\017\n\007version\030\002 \001(\003*c\n\007Version\022\022\n\016_ST"
"ART_VERSION\020\000\022\031\n\025IR_VERSION_2017_10_10\020\001"
"\022\031\n\025IR_VERSION_2017_10_30\020\002\022\016\n\nIR_VERSIO"
"N\020\003"
};
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
descriptor, 2523);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"opencv-onnx.proto", &protobuf_RegisterTypes);
}
void AddDescriptors() {
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
StaticDescriptorInitializer() {
AddDescriptors();
}
} static_descriptor_initializer;
} // namespace protobuf_opencv_2donnx_2eproto
namespace opencv_onnx {
const ::google::protobuf::EnumDescriptor* AttributeProto_AttributeType_descriptor() {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return protobuf_opencv_2donnx_2eproto::file_level_enum_descriptors[0];
}
bool AttributeProto_AttributeType_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const AttributeProto_AttributeType AttributeProto::UNDEFINED;
const AttributeProto_AttributeType AttributeProto::FLOAT;
const AttributeProto_AttributeType AttributeProto::INT;
const AttributeProto_AttributeType AttributeProto::STRING;
const AttributeProto_AttributeType AttributeProto::TENSOR;
const AttributeProto_AttributeType AttributeProto::GRAPH;
const AttributeProto_AttributeType AttributeProto::FLOATS;
const AttributeProto_AttributeType AttributeProto::INTS;
const AttributeProto_AttributeType AttributeProto::STRINGS;
const AttributeProto_AttributeType AttributeProto::TENSORS;
const AttributeProto_AttributeType AttributeProto::GRAPHS;
const AttributeProto_AttributeType AttributeProto::AttributeType_MIN;
const AttributeProto_AttributeType AttributeProto::AttributeType_MAX;
const int AttributeProto::AttributeType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* TensorProto_DataType_descriptor() {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return protobuf_opencv_2donnx_2eproto::file_level_enum_descriptors[1];
}
bool TensorProto_DataType_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
return true;
default:
return false;
}
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const TensorProto_DataType TensorProto::UNDEFINED;
const TensorProto_DataType TensorProto::FLOAT;
const TensorProto_DataType TensorProto::UINT8;
const TensorProto_DataType TensorProto::INT8;
const TensorProto_DataType TensorProto::UINT16;
const TensorProto_DataType TensorProto::INT16;
const TensorProto_DataType TensorProto::INT32;
const TensorProto_DataType TensorProto::INT64;
const TensorProto_DataType TensorProto::STRING;
const TensorProto_DataType TensorProto::BOOL;
const TensorProto_DataType TensorProto::FLOAT16;
const TensorProto_DataType TensorProto::DOUBLE;
const TensorProto_DataType TensorProto::UINT32;
const TensorProto_DataType TensorProto::UINT64;
const TensorProto_DataType TensorProto::COMPLEX64;
const TensorProto_DataType TensorProto::COMPLEX128;
const TensorProto_DataType TensorProto::DataType_MIN;
const TensorProto_DataType TensorProto::DataType_MAX;
const int TensorProto::DataType_ARRAYSIZE;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* Version_descriptor() {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return protobuf_opencv_2donnx_2eproto::file_level_enum_descriptors[2];
}
bool Version_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
// ===================================================================
void AttributeProto::InitAsDefaultInstance() {
::opencv_onnx::_AttributeProto_default_instance_._instance.get_mutable()->t_ = const_cast< ::opencv_onnx::TensorProto*>(
::opencv_onnx::TensorProto::internal_default_instance());
::opencv_onnx::_AttributeProto_default_instance_._instance.get_mutable()->g_ = const_cast< ::opencv_onnx::GraphProto*>(
::opencv_onnx::GraphProto::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int AttributeProto::kNameFieldNumber;
const int AttributeProto::kRefAttrNameFieldNumber;
const int AttributeProto::kDocStringFieldNumber;
const int AttributeProto::kTypeFieldNumber;
const int AttributeProto::kFFieldNumber;
const int AttributeProto::kIFieldNumber;
const int AttributeProto::kSFieldNumber;
const int AttributeProto::kTFieldNumber;
const int AttributeProto::kGFieldNumber;
const int AttributeProto::kFloatsFieldNumber;
const int AttributeProto::kIntsFieldNumber;
const int AttributeProto::kStringsFieldNumber;
const int AttributeProto::kTensorsFieldNumber;
const int AttributeProto::kGraphsFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
AttributeProto::AttributeProto()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.AttributeProto)
}
AttributeProto::AttributeProto(const AttributeProto& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
floats_(from.floats_),
ints_(from.ints_),
strings_(from.strings_),
tensors_(from.tensors_),
graphs_(from.graphs_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_name()) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_s()) {
s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
}
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_doc_string()) {
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
ref_attr_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_ref_attr_name()) {
ref_attr_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ref_attr_name_);
}
if (from.has_t()) {
t_ = new ::opencv_onnx::TensorProto(*from.t_);
} else {
t_ = NULL;
}
if (from.has_g()) {
g_ = new ::opencv_onnx::GraphProto(*from.g_);
} else {
g_ = NULL;
}
::memcpy(&i_, &from.i_,
static_cast<size_t>(reinterpret_cast<char*>(&type_) -
reinterpret_cast<char*>(&i_)) + sizeof(type_));
// @@protoc_insertion_point(copy_constructor:opencv_onnx.AttributeProto)
}
void AttributeProto::SharedCtor() {
_cached_size_ = 0;
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
ref_attr_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&t_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&type_) -
reinterpret_cast<char*>(&t_)) + sizeof(type_));
}
AttributeProto::~AttributeProto() {
// @@protoc_insertion_point(destructor:opencv_onnx.AttributeProto)
SharedDtor();
}
void AttributeProto::SharedDtor() {
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
s_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
ref_attr_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete t_;
if (this != internal_default_instance()) delete g_;
}
void AttributeProto::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AttributeProto::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const AttributeProto& AttributeProto::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
return *internal_default_instance();
}
AttributeProto* AttributeProto::New(::google::protobuf::Arena* arena) const {
AttributeProto* n = new AttributeProto;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void AttributeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.AttributeProto)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
floats_.Clear();
ints_.Clear();
strings_.Clear();
tensors_.Clear();
graphs_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 63u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*name_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(!s_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*s_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*doc_string_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(!ref_attr_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*ref_attr_name_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000010u) {
GOOGLE_DCHECK(t_ != NULL);
t_->Clear();
}
if (cached_has_bits & 0x00000020u) {
GOOGLE_DCHECK(g_ != NULL);
g_->Clear();
}
}
if (cached_has_bits & 192u) {
::memset(&i_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&f_) -
reinterpret_cast<char*>(&i_)) + sizeof(f_));
}
type_ = 0;
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool AttributeProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.AttributeProto)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string name = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.AttributeProto.name");
} else {
goto handle_unusual;
}
break;
}
// optional float f = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
set_has_f();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &f_)));
} else {
goto handle_unusual;
}
break;
}
// optional int64 i = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
set_has_i();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, &i_)));
} else {
goto handle_unusual;
}
break;
}
// optional bytes s = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
input, this->mutable_s()));
} else {
goto handle_unusual;
}
break;
}
// optional .opencv_onnx.TensorProto t = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_t()));
} else {
goto handle_unusual;
}
break;
}
// optional .opencv_onnx.GraphProto g = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_g()));
} else {
goto handle_unusual;
}
break;
}
// repeated float floats = 7;
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
1, 61u, input, this->mutable_floats())));
} else if (
static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_floats())));
} else {
goto handle_unusual;
}
break;
}
// repeated int64 ints = 8;
case 8: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1, 64u, input, this->mutable_ints())));
} else if (
static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, this->mutable_ints())));
} else {
goto handle_unusual;
}
break;
}
// repeated bytes strings = 9;
case 9: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
input, this->add_strings()));
} else {
goto handle_unusual;
}
break;
}
// repeated .opencv_onnx.TensorProto tensors = 10;
case 10: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_tensors()));
} else {
goto handle_unusual;
}
break;
}
// repeated .opencv_onnx.GraphProto graphs = 11;
case 11: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_graphs()));
} else {
goto handle_unusual;
}
break;
}
// optional string doc_string = 13;
case 13: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_doc_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.AttributeProto.doc_string");
} else {
goto handle_unusual;
}
break;
}
// optional .opencv_onnx.AttributeProto.AttributeType type = 20;
case 20: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(160u /* 160 & 0xFF */)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::opencv_onnx::AttributeProto_AttributeType_IsValid(value)) {
set_type(static_cast< ::opencv_onnx::AttributeProto_AttributeType >(value));
} else {
mutable_unknown_fields()->AddVarint(
20, static_cast< ::google::protobuf::uint64>(value));
}
} else {
goto handle_unusual;
}
break;
}
// optional string ref_attr_name = 21;
case 21: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_ref_attr_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->ref_attr_name().data(), static_cast<int>(this->ref_attr_name().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.AttributeProto.ref_attr_name");
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.AttributeProto)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.AttributeProto)
return false;
#undef DO_
}
void AttributeProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.AttributeProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.AttributeProto.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output);
}
// optional float f = 2;
if (cached_has_bits & 0x00000080u) {
::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->f(), output);
}
// optional int64 i = 3;
if (cached_has_bits & 0x00000040u) {
::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->i(), output);
}
// optional bytes s = 4;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
4, this->s(), output);
}
// optional .opencv_onnx.TensorProto t = 5;
if (cached_has_bits & 0x00000010u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
5, *this->t_, output);
}
// optional .opencv_onnx.GraphProto g = 6;
if (cached_has_bits & 0x00000020u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
6, *this->g_, output);
}
// repeated float floats = 7;
for (int i = 0, n = this->floats_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteFloat(
7, this->floats(i), output);
}
// repeated int64 ints = 8;
for (int i = 0, n = this->ints_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteInt64(
8, this->ints(i), output);
}
// repeated bytes strings = 9;
for (int i = 0, n = this->strings_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteBytes(
9, this->strings(i), output);
}
// repeated .opencv_onnx.TensorProto tensors = 10;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->tensors_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
10, this->tensors(static_cast<int>(i)), output);
}
// repeated .opencv_onnx.GraphProto graphs = 11;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->graphs_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
11, this->graphs(static_cast<int>(i)), output);
}
// optional string doc_string = 13;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.AttributeProto.doc_string");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
13, this->doc_string(), output);
}
// optional .opencv_onnx.AttributeProto.AttributeType type = 20;
if (cached_has_bits & 0x00000100u) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
20, this->type(), output);
}
// optional string ref_attr_name = 21;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->ref_attr_name().data(), static_cast<int>(this->ref_attr_name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.AttributeProto.ref_attr_name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
21, this->ref_attr_name(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.AttributeProto)
}
::google::protobuf::uint8* AttributeProto::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.AttributeProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.AttributeProto.name");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->name(), target);
}
// optional float f = 2;
if (cached_has_bits & 0x00000080u) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->f(), target);
}
// optional int64 i = 3;
if (cached_has_bits & 0x00000040u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->i(), target);
}
// optional bytes s = 4;
if (cached_has_bits & 0x00000002u) {
target =
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
4, this->s(), target);
}
// optional .opencv_onnx.TensorProto t = 5;
if (cached_has_bits & 0x00000010u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
5, *this->t_, deterministic, target);
}
// optional .opencv_onnx.GraphProto g = 6;
if (cached_has_bits & 0x00000020u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
6, *this->g_, deterministic, target);
}
// repeated float floats = 7;
target = ::google::protobuf::internal::WireFormatLite::
WriteFloatToArray(7, this->floats_, target);
// repeated int64 ints = 8;
target = ::google::protobuf::internal::WireFormatLite::
WriteInt64ToArray(8, this->ints_, target);
// repeated bytes strings = 9;
for (int i = 0, n = this->strings_size(); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteBytesToArray(9, this->strings(i), target);
}
// repeated .opencv_onnx.TensorProto tensors = 10;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->tensors_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
10, this->tensors(static_cast<int>(i)), deterministic, target);
}
// repeated .opencv_onnx.GraphProto graphs = 11;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->graphs_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
11, this->graphs(static_cast<int>(i)), deterministic, target);
}
// optional string doc_string = 13;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.AttributeProto.doc_string");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
13, this->doc_string(), target);
}
// optional .opencv_onnx.AttributeProto.AttributeType type = 20;
if (cached_has_bits & 0x00000100u) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
20, this->type(), target);
}
// optional string ref_attr_name = 21;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->ref_attr_name().data(), static_cast<int>(this->ref_attr_name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.AttributeProto.ref_attr_name");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
21, this->ref_attr_name(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.AttributeProto)
return target;
}
size_t AttributeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.AttributeProto)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// repeated float floats = 7;
{
unsigned int count = static_cast<unsigned int>(this->floats_size());
size_t data_size = 4UL * count;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->floats_size());
total_size += data_size;
}
// repeated int64 ints = 8;
{
size_t data_size = ::google::protobuf::internal::WireFormatLite::
Int64Size(this->ints_);
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->ints_size());
total_size += data_size;
}
// repeated bytes strings = 9;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->strings_size());
for (int i = 0, n = this->strings_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
this->strings(i));
}
// repeated .opencv_onnx.TensorProto tensors = 10;
{
unsigned int count = static_cast<unsigned int>(this->tensors_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->tensors(static_cast<int>(i)));
}
}
// repeated .opencv_onnx.GraphProto graphs = 11;
{
unsigned int count = static_cast<unsigned int>(this->graphs_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->graphs(static_cast<int>(i)));
}
}
if (_has_bits_[0 / 32] & 255u) {
// optional string name = 1;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// optional bytes s = 4;
if (has_s()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::BytesSize(
this->s());
}
// optional string doc_string = 13;
if (has_doc_string()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->doc_string());
}
// optional string ref_attr_name = 21;
if (has_ref_attr_name()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->ref_attr_name());
}
// optional .opencv_onnx.TensorProto t = 5;
if (has_t()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->t_);
}
// optional .opencv_onnx.GraphProto g = 6;
if (has_g()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->g_);
}
// optional int64 i = 3;
if (has_i()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int64Size(
this->i());
}
// optional float f = 2;
if (has_f()) {
total_size += 1 + 4;
}
}
// optional .opencv_onnx.AttributeProto.AttributeType type = 20;
if (has_type()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void AttributeProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.AttributeProto)
GOOGLE_DCHECK_NE(&from, this);
const AttributeProto* source =
::google::protobuf::internal::DynamicCastToGenerated<const AttributeProto>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.AttributeProto)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.AttributeProto)
MergeFrom(*source);
}
}
void AttributeProto::MergeFrom(const AttributeProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.AttributeProto)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
floats_.MergeFrom(from.floats_);
ints_.MergeFrom(from.ints_);
strings_.MergeFrom(from.strings_);
tensors_.MergeFrom(from.tensors_);
graphs_.MergeFrom(from.graphs_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 255u) {
if (cached_has_bits & 0x00000001u) {
set_has_name();
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
if (cached_has_bits & 0x00000002u) {
set_has_s();
s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
}
if (cached_has_bits & 0x00000004u) {
set_has_doc_string();
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
if (cached_has_bits & 0x00000008u) {
set_has_ref_attr_name();
ref_attr_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ref_attr_name_);
}
if (cached_has_bits & 0x00000010u) {
mutable_t()->::opencv_onnx::TensorProto::MergeFrom(from.t());
}
if (cached_has_bits & 0x00000020u) {
mutable_g()->::opencv_onnx::GraphProto::MergeFrom(from.g());
}
if (cached_has_bits & 0x00000040u) {
i_ = from.i_;
}
if (cached_has_bits & 0x00000080u) {
f_ = from.f_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00000100u) {
set_type(from.type());
}
}
void AttributeProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.AttributeProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void AttributeProto::CopyFrom(const AttributeProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.AttributeProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool AttributeProto::IsInitialized() const {
return true;
}
void AttributeProto::Swap(AttributeProto* other) {
if (other == this) return;
InternalSwap(other);
}
void AttributeProto::InternalSwap(AttributeProto* other) {
using std::swap;
floats_.InternalSwap(&other->floats_);
ints_.InternalSwap(&other->ints_);
strings_.InternalSwap(&other->strings_);
tensors_.InternalSwap(&other->tensors_);
graphs_.InternalSwap(&other->graphs_);
name_.Swap(&other->name_);
s_.Swap(&other->s_);
doc_string_.Swap(&other->doc_string_);
ref_attr_name_.Swap(&other->ref_attr_name_);
swap(t_, other->t_);
swap(g_, other->g_);
swap(i_, other->i_);
swap(f_, other->f_);
swap(type_, other->type_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata AttributeProto::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void ValueInfoProto::InitAsDefaultInstance() {
::opencv_onnx::_ValueInfoProto_default_instance_._instance.get_mutable()->type_ = const_cast< ::opencv_onnx::TypeProto*>(
::opencv_onnx::TypeProto::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ValueInfoProto::kNameFieldNumber;
const int ValueInfoProto::kTypeFieldNumber;
const int ValueInfoProto::kDocStringFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
ValueInfoProto::ValueInfoProto()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsValueInfoProto();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.ValueInfoProto)
}
ValueInfoProto::ValueInfoProto(const ValueInfoProto& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_name()) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_doc_string()) {
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
if (from.has_type()) {
type_ = new ::opencv_onnx::TypeProto(*from.type_);
} else {
type_ = NULL;
}
// @@protoc_insertion_point(copy_constructor:opencv_onnx.ValueInfoProto)
}
void ValueInfoProto::SharedCtor() {
_cached_size_ = 0;
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
type_ = NULL;
}
ValueInfoProto::~ValueInfoProto() {
// @@protoc_insertion_point(destructor:opencv_onnx.ValueInfoProto)
SharedDtor();
}
void ValueInfoProto::SharedDtor() {
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete type_;
}
void ValueInfoProto::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ValueInfoProto::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const ValueInfoProto& ValueInfoProto::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsValueInfoProto();
return *internal_default_instance();
}
ValueInfoProto* ValueInfoProto::New(::google::protobuf::Arena* arena) const {
ValueInfoProto* n = new ValueInfoProto;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void ValueInfoProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.ValueInfoProto)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 7u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*name_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*doc_string_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(type_ != NULL);
type_->Clear();
}
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool ValueInfoProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.ValueInfoProto)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string name = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.ValueInfoProto.name");
} else {
goto handle_unusual;
}
break;
}
// optional .opencv_onnx.TypeProto type = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_type()));
} else {
goto handle_unusual;
}
break;
}
// optional string doc_string = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_doc_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.ValueInfoProto.doc_string");
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.ValueInfoProto)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.ValueInfoProto)
return false;
#undef DO_
}
void ValueInfoProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.ValueInfoProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ValueInfoProto.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->name(), output);
}
// optional .opencv_onnx.TypeProto type = 2;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, *this->type_, output);
}
// optional string doc_string = 3;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ValueInfoProto.doc_string");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->doc_string(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.ValueInfoProto)
}
::google::protobuf::uint8* ValueInfoProto::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ValueInfoProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ValueInfoProto.name");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->name(), target);
}
// optional .opencv_onnx.TypeProto type = 2;
if (cached_has_bits & 0x00000004u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
2, *this->type_, deterministic, target);
}
// optional string doc_string = 3;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ValueInfoProto.doc_string");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->doc_string(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ValueInfoProto)
return target;
}
size_t ValueInfoProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ValueInfoProto)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
if (_has_bits_[0 / 32] & 7u) {
// optional string name = 1;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// optional string doc_string = 3;
if (has_doc_string()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->doc_string());
}
// optional .opencv_onnx.TypeProto type = 2;
if (has_type()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->type_);
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ValueInfoProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.ValueInfoProto)
GOOGLE_DCHECK_NE(&from, this);
const ValueInfoProto* source =
::google::protobuf::internal::DynamicCastToGenerated<const ValueInfoProto>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.ValueInfoProto)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.ValueInfoProto)
MergeFrom(*source);
}
}
void ValueInfoProto::MergeFrom(const ValueInfoProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ValueInfoProto)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 7u) {
if (cached_has_bits & 0x00000001u) {
set_has_name();
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
if (cached_has_bits & 0x00000002u) {
set_has_doc_string();
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
if (cached_has_bits & 0x00000004u) {
mutable_type()->::opencv_onnx::TypeProto::MergeFrom(from.type());
}
}
}
void ValueInfoProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.ValueInfoProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ValueInfoProto::CopyFrom(const ValueInfoProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ValueInfoProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ValueInfoProto::IsInitialized() const {
return true;
}
void ValueInfoProto::Swap(ValueInfoProto* other) {
if (other == this) return;
InternalSwap(other);
}
void ValueInfoProto::InternalSwap(ValueInfoProto* other) {
using std::swap;
name_.Swap(&other->name_);
doc_string_.Swap(&other->doc_string_);
swap(type_, other->type_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata ValueInfoProto::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void NodeProto::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int NodeProto::kInputFieldNumber;
const int NodeProto::kOutputFieldNumber;
const int NodeProto::kNameFieldNumber;
const int NodeProto::kOpTypeFieldNumber;
const int NodeProto::kDomainFieldNumber;
const int NodeProto::kAttributeFieldNumber;
const int NodeProto::kDocStringFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
NodeProto::NodeProto()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.NodeProto)
}
NodeProto::NodeProto(const NodeProto& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
input_(from.input_),
output_(from.output_),
attribute_(from.attribute_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_name()) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
op_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_op_type()) {
op_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.op_type_);
}
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_doc_string()) {
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_domain()) {
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
}
// @@protoc_insertion_point(copy_constructor:opencv_onnx.NodeProto)
}
void NodeProto::SharedCtor() {
_cached_size_ = 0;
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
op_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
NodeProto::~NodeProto() {
// @@protoc_insertion_point(destructor:opencv_onnx.NodeProto)
SharedDtor();
}
void NodeProto::SharedDtor() {
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
op_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void NodeProto::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* NodeProto::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const NodeProto& NodeProto::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
return *internal_default_instance();
}
NodeProto* NodeProto::New(::google::protobuf::Arena* arena) const {
NodeProto* n = new NodeProto;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void NodeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.NodeProto)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
input_.Clear();
output_.Clear();
attribute_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 15u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*name_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(!op_type_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*op_type_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*doc_string_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(!domain_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*domain_.UnsafeRawStringPointer())->clear();
}
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool NodeProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.NodeProto)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated string input = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_input()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->input(this->input_size() - 1).data(),
static_cast<int>(this->input(this->input_size() - 1).length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.NodeProto.input");
} else {
goto handle_unusual;
}
break;
}
// repeated string output = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_output()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->output(this->output_size() - 1).data(),
static_cast<int>(this->output(this->output_size() - 1).length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.NodeProto.output");
} else {
goto handle_unusual;
}
break;
}
// optional string name = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.NodeProto.name");
} else {
goto handle_unusual;
}
break;
}
// optional string op_type = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_op_type()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->op_type().data(), static_cast<int>(this->op_type().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.NodeProto.op_type");
} else {
goto handle_unusual;
}
break;
}
// repeated .opencv_onnx.AttributeProto attribute = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_attribute()));
} else {
goto handle_unusual;
}
break;
}
// optional string doc_string = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_doc_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.NodeProto.doc_string");
} else {
goto handle_unusual;
}
break;
}
// optional string domain = 7;
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_domain()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->domain().data(), static_cast<int>(this->domain().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.NodeProto.domain");
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.NodeProto)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.NodeProto)
return false;
#undef DO_
}
void NodeProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.NodeProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated string input = 1;
for (int i = 0, n = this->input_size(); i < n; i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->input(i).data(), static_cast<int>(this->input(i).length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.input");
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->input(i), output);
}
// repeated string output = 2;
for (int i = 0, n = this->output_size(); i < n; i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->output(i).data(), static_cast<int>(this->output(i).length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.output");
::google::protobuf::internal::WireFormatLite::WriteString(
2, this->output(i), output);
}
cached_has_bits = _has_bits_[0];
// optional string name = 3;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->name(), output);
}
// optional string op_type = 4;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->op_type().data(), static_cast<int>(this->op_type().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.op_type");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
4, this->op_type(), output);
}
// repeated .opencv_onnx.AttributeProto attribute = 5;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->attribute_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
5, this->attribute(static_cast<int>(i)), output);
}
// optional string doc_string = 6;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.doc_string");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
6, this->doc_string(), output);
}
// optional string domain = 7;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->domain().data(), static_cast<int>(this->domain().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.domain");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
7, this->domain(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.NodeProto)
}
::google::protobuf::uint8* NodeProto::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.NodeProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated string input = 1;
for (int i = 0, n = this->input_size(); i < n; i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->input(i).data(), static_cast<int>(this->input(i).length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.input");
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(1, this->input(i), target);
}
// repeated string output = 2;
for (int i = 0, n = this->output_size(); i < n; i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->output(i).data(), static_cast<int>(this->output(i).length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.output");
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(2, this->output(i), target);
}
cached_has_bits = _has_bits_[0];
// optional string name = 3;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.name");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->name(), target);
}
// optional string op_type = 4;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->op_type().data(), static_cast<int>(this->op_type().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.op_type");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4, this->op_type(), target);
}
// repeated .opencv_onnx.AttributeProto attribute = 5;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->attribute_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
5, this->attribute(static_cast<int>(i)), deterministic, target);
}
// optional string doc_string = 6;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.doc_string");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6, this->doc_string(), target);
}
// optional string domain = 7;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->domain().data(), static_cast<int>(this->domain().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.NodeProto.domain");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
7, this->domain(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.NodeProto)
return target;
}
size_t NodeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.NodeProto)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// repeated string input = 1;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->input_size());
for (int i = 0, n = this->input_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->input(i));
}
// repeated string output = 2;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->output_size());
for (int i = 0, n = this->output_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->output(i));
}
// repeated .opencv_onnx.AttributeProto attribute = 5;
{
unsigned int count = static_cast<unsigned int>(this->attribute_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->attribute(static_cast<int>(i)));
}
}
if (_has_bits_[0 / 32] & 15u) {
// optional string name = 3;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// optional string op_type = 4;
if (has_op_type()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->op_type());
}
// optional string doc_string = 6;
if (has_doc_string()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->doc_string());
}
// optional string domain = 7;
if (has_domain()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->domain());
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void NodeProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.NodeProto)
GOOGLE_DCHECK_NE(&from, this);
const NodeProto* source =
::google::protobuf::internal::DynamicCastToGenerated<const NodeProto>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.NodeProto)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.NodeProto)
MergeFrom(*source);
}
}
void NodeProto::MergeFrom(const NodeProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.NodeProto)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
input_.MergeFrom(from.input_);
output_.MergeFrom(from.output_);
attribute_.MergeFrom(from.attribute_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 15u) {
if (cached_has_bits & 0x00000001u) {
set_has_name();
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
if (cached_has_bits & 0x00000002u) {
set_has_op_type();
op_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.op_type_);
}
if (cached_has_bits & 0x00000004u) {
set_has_doc_string();
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
if (cached_has_bits & 0x00000008u) {
set_has_domain();
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
}
}
}
void NodeProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.NodeProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void NodeProto::CopyFrom(const NodeProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.NodeProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool NodeProto::IsInitialized() const {
return true;
}
void NodeProto::Swap(NodeProto* other) {
if (other == this) return;
InternalSwap(other);
}
void NodeProto::InternalSwap(NodeProto* other) {
using std::swap;
input_.InternalSwap(&other->input_);
output_.InternalSwap(&other->output_);
attribute_.InternalSwap(&other->attribute_);
name_.Swap(&other->name_);
op_type_.Swap(&other->op_type_);
doc_string_.Swap(&other->doc_string_);
domain_.Swap(&other->domain_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata NodeProto::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void ModelProto::InitAsDefaultInstance() {
::opencv_onnx::_ModelProto_default_instance_._instance.get_mutable()->graph_ = const_cast< ::opencv_onnx::GraphProto*>(
::opencv_onnx::GraphProto::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ModelProto::kIrVersionFieldNumber;
const int ModelProto::kOpsetImportFieldNumber;
const int ModelProto::kProducerNameFieldNumber;
const int ModelProto::kProducerVersionFieldNumber;
const int ModelProto::kDomainFieldNumber;
const int ModelProto::kModelVersionFieldNumber;
const int ModelProto::kDocStringFieldNumber;
const int ModelProto::kGraphFieldNumber;
const int ModelProto::kMetadataPropsFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
ModelProto::ModelProto()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsModelProto();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.ModelProto)
}
ModelProto::ModelProto(const ModelProto& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
opset_import_(from.opset_import_),
metadata_props_(from.metadata_props_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
producer_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_producer_name()) {
producer_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_name_);
}
producer_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_producer_version()) {
producer_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_version_);
}
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_domain()) {
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
}
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_doc_string()) {
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
if (from.has_graph()) {
graph_ = new ::opencv_onnx::GraphProto(*from.graph_);
} else {
graph_ = NULL;
}
::memcpy(&ir_version_, &from.ir_version_,
static_cast<size_t>(reinterpret_cast<char*>(&model_version_) -
reinterpret_cast<char*>(&ir_version_)) + sizeof(model_version_));
// @@protoc_insertion_point(copy_constructor:opencv_onnx.ModelProto)
}
void ModelProto::SharedCtor() {
_cached_size_ = 0;
producer_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
producer_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&graph_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&model_version_) -
reinterpret_cast<char*>(&graph_)) + sizeof(model_version_));
}
ModelProto::~ModelProto() {
// @@protoc_insertion_point(destructor:opencv_onnx.ModelProto)
SharedDtor();
}
void ModelProto::SharedDtor() {
producer_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
producer_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete graph_;
}
void ModelProto::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ModelProto::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const ModelProto& ModelProto::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsModelProto();
return *internal_default_instance();
}
ModelProto* ModelProto::New(::google::protobuf::Arena* arena) const {
ModelProto* n = new ModelProto;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void ModelProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.ModelProto)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
opset_import_.Clear();
metadata_props_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 31u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!producer_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*producer_name_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(!producer_version_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*producer_version_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(!domain_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*domain_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*doc_string_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000010u) {
GOOGLE_DCHECK(graph_ != NULL);
graph_->Clear();
}
}
if (cached_has_bits & 96u) {
::memset(&ir_version_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&model_version_) -
reinterpret_cast<char*>(&ir_version_)) + sizeof(model_version_));
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool ModelProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.ModelProto)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int64 ir_version = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
set_has_ir_version();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, &ir_version_)));
} else {
goto handle_unusual;
}
break;
}
// optional string producer_name = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_producer_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->producer_name().data(), static_cast<int>(this->producer_name().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.ModelProto.producer_name");
} else {
goto handle_unusual;
}
break;
}
// optional string producer_version = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_producer_version()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->producer_version().data(), static_cast<int>(this->producer_version().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.ModelProto.producer_version");
} else {
goto handle_unusual;
}
break;
}
// optional string domain = 4;
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_domain()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->domain().data(), static_cast<int>(this->domain().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.ModelProto.domain");
} else {
goto handle_unusual;
}
break;
}
// optional int64 model_version = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
set_has_model_version();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, &model_version_)));
} else {
goto handle_unusual;
}
break;
}
// optional string doc_string = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_doc_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.ModelProto.doc_string");
} else {
goto handle_unusual;
}
break;
}
// optional .opencv_onnx.GraphProto graph = 7;
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_graph()));
} else {
goto handle_unusual;
}
break;
}
// repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
case 8: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_opset_import()));
} else {
goto handle_unusual;
}
break;
}
// repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
case 14: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_metadata_props()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.ModelProto)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.ModelProto)
return false;
#undef DO_
}
void ModelProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.ModelProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int64 ir_version = 1;
if (cached_has_bits & 0x00000020u) {
::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->ir_version(), output);
}
// optional string producer_name = 2;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->producer_name().data(), static_cast<int>(this->producer_name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ModelProto.producer_name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->producer_name(), output);
}
// optional string producer_version = 3;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->producer_version().data(), static_cast<int>(this->producer_version().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ModelProto.producer_version");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->producer_version(), output);
}
// optional string domain = 4;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->domain().data(), static_cast<int>(this->domain().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ModelProto.domain");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
4, this->domain(), output);
}
// optional int64 model_version = 5;
if (cached_has_bits & 0x00000040u) {
::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->model_version(), output);
}
// optional string doc_string = 6;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ModelProto.doc_string");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
6, this->doc_string(), output);
}
// optional .opencv_onnx.GraphProto graph = 7;
if (cached_has_bits & 0x00000010u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
7, *this->graph_, output);
}
// repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->opset_import_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
8, this->opset_import(static_cast<int>(i)), output);
}
// repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->metadata_props_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
14, this->metadata_props(static_cast<int>(i)), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.ModelProto)
}
::google::protobuf::uint8* ModelProto::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ModelProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int64 ir_version = 1;
if (cached_has_bits & 0x00000020u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->ir_version(), target);
}
// optional string producer_name = 2;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->producer_name().data(), static_cast<int>(this->producer_name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ModelProto.producer_name");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->producer_name(), target);
}
// optional string producer_version = 3;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->producer_version().data(), static_cast<int>(this->producer_version().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ModelProto.producer_version");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->producer_version(), target);
}
// optional string domain = 4;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->domain().data(), static_cast<int>(this->domain().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ModelProto.domain");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4, this->domain(), target);
}
// optional int64 model_version = 5;
if (cached_has_bits & 0x00000040u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->model_version(), target);
}
// optional string doc_string = 6;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.ModelProto.doc_string");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6, this->doc_string(), target);
}
// optional .opencv_onnx.GraphProto graph = 7;
if (cached_has_bits & 0x00000010u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
7, *this->graph_, deterministic, target);
}
// repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->opset_import_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
8, this->opset_import(static_cast<int>(i)), deterministic, target);
}
// repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->metadata_props_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
14, this->metadata_props(static_cast<int>(i)), deterministic, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ModelProto)
return target;
}
size_t ModelProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ModelProto)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
{
unsigned int count = static_cast<unsigned int>(this->opset_import_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->opset_import(static_cast<int>(i)));
}
}
// repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
{
unsigned int count = static_cast<unsigned int>(this->metadata_props_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->metadata_props(static_cast<int>(i)));
}
}
if (_has_bits_[0 / 32] & 127u) {
// optional string producer_name = 2;
if (has_producer_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->producer_name());
}
// optional string producer_version = 3;
if (has_producer_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->producer_version());
}
// optional string domain = 4;
if (has_domain()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->domain());
}
// optional string doc_string = 6;
if (has_doc_string()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->doc_string());
}
// optional .opencv_onnx.GraphProto graph = 7;
if (has_graph()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->graph_);
}
// optional int64 ir_version = 1;
if (has_ir_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int64Size(
this->ir_version());
}
// optional int64 model_version = 5;
if (has_model_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int64Size(
this->model_version());
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ModelProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.ModelProto)
GOOGLE_DCHECK_NE(&from, this);
const ModelProto* source =
::google::protobuf::internal::DynamicCastToGenerated<const ModelProto>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.ModelProto)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.ModelProto)
MergeFrom(*source);
}
}
void ModelProto::MergeFrom(const ModelProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ModelProto)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
opset_import_.MergeFrom(from.opset_import_);
metadata_props_.MergeFrom(from.metadata_props_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 127u) {
if (cached_has_bits & 0x00000001u) {
set_has_producer_name();
producer_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_name_);
}
if (cached_has_bits & 0x00000002u) {
set_has_producer_version();
producer_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_version_);
}
if (cached_has_bits & 0x00000004u) {
set_has_domain();
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
}
if (cached_has_bits & 0x00000008u) {
set_has_doc_string();
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
if (cached_has_bits & 0x00000010u) {
mutable_graph()->::opencv_onnx::GraphProto::MergeFrom(from.graph());
}
if (cached_has_bits & 0x00000020u) {
ir_version_ = from.ir_version_;
}
if (cached_has_bits & 0x00000040u) {
model_version_ = from.model_version_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void ModelProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.ModelProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ModelProto::CopyFrom(const ModelProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ModelProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ModelProto::IsInitialized() const {
return true;
}
void ModelProto::Swap(ModelProto* other) {
if (other == this) return;
InternalSwap(other);
}
void ModelProto::InternalSwap(ModelProto* other) {
using std::swap;
opset_import_.InternalSwap(&other->opset_import_);
metadata_props_.InternalSwap(&other->metadata_props_);
producer_name_.Swap(&other->producer_name_);
producer_version_.Swap(&other->producer_version_);
domain_.Swap(&other->domain_);
doc_string_.Swap(&other->doc_string_);
swap(graph_, other->graph_);
swap(ir_version_, other->ir_version_);
swap(model_version_, other->model_version_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata ModelProto::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void StringStringEntryProto::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int StringStringEntryProto::kKeyFieldNumber;
const int StringStringEntryProto::kValueFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
StringStringEntryProto::StringStringEntryProto()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsStringStringEntryProto();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.StringStringEntryProto)
}
StringStringEntryProto::StringStringEntryProto(const StringStringEntryProto& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_key()) {
key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
}
value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_value()) {
value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
}
// @@protoc_insertion_point(copy_constructor:opencv_onnx.StringStringEntryProto)
}
void StringStringEntryProto::SharedCtor() {
_cached_size_ = 0;
key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
StringStringEntryProto::~StringStringEntryProto() {
// @@protoc_insertion_point(destructor:opencv_onnx.StringStringEntryProto)
SharedDtor();
}
void StringStringEntryProto::SharedDtor() {
key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void StringStringEntryProto::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* StringStringEntryProto::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const StringStringEntryProto& StringStringEntryProto::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsStringStringEntryProto();
return *internal_default_instance();
}
StringStringEntryProto* StringStringEntryProto::New(::google::protobuf::Arena* arena) const {
StringStringEntryProto* n = new StringStringEntryProto;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void StringStringEntryProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.StringStringEntryProto)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*key_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(!value_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*value_.UnsafeRawStringPointer())->clear();
}
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool StringStringEntryProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.StringStringEntryProto)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string key = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_key()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->key().data(), static_cast<int>(this->key().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.StringStringEntryProto.key");
} else {
goto handle_unusual;
}
break;
}
// optional string value = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_value()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->value().data(), static_cast<int>(this->value().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.StringStringEntryProto.value");
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.StringStringEntryProto)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.StringStringEntryProto)
return false;
#undef DO_
}
void StringStringEntryProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.StringStringEntryProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string key = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->key().data(), static_cast<int>(this->key().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.StringStringEntryProto.key");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->key(), output);
}
// optional string value = 2;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->value().data(), static_cast<int>(this->value().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.StringStringEntryProto.value");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->value(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.StringStringEntryProto)
}
::google::protobuf::uint8* StringStringEntryProto::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.StringStringEntryProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string key = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->key().data(), static_cast<int>(this->key().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.StringStringEntryProto.key");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->key(), target);
}
// optional string value = 2;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->value().data(), static_cast<int>(this->value().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.StringStringEntryProto.value");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->value(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.StringStringEntryProto)
return target;
}
size_t StringStringEntryProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.StringStringEntryProto)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
if (_has_bits_[0 / 32] & 3u) {
// optional string key = 1;
if (has_key()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->key());
}
// optional string value = 2;
if (has_value()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->value());
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void StringStringEntryProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.StringStringEntryProto)
GOOGLE_DCHECK_NE(&from, this);
const StringStringEntryProto* source =
::google::protobuf::internal::DynamicCastToGenerated<const StringStringEntryProto>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.StringStringEntryProto)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.StringStringEntryProto)
MergeFrom(*source);
}
}
void StringStringEntryProto::MergeFrom(const StringStringEntryProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.StringStringEntryProto)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
set_has_key();
key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
}
if (cached_has_bits & 0x00000002u) {
set_has_value();
value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
}
}
}
void StringStringEntryProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.StringStringEntryProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void StringStringEntryProto::CopyFrom(const StringStringEntryProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.StringStringEntryProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool StringStringEntryProto::IsInitialized() const {
return true;
}
void StringStringEntryProto::Swap(StringStringEntryProto* other) {
if (other == this) return;
InternalSwap(other);
}
void StringStringEntryProto::InternalSwap(StringStringEntryProto* other) {
using std::swap;
key_.Swap(&other->key_);
value_.Swap(&other->value_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata StringStringEntryProto::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void GraphProto::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int GraphProto::kNodeFieldNumber;
const int GraphProto::kNameFieldNumber;
const int GraphProto::kInitializerFieldNumber;
const int GraphProto::kDocStringFieldNumber;
const int GraphProto::kInputFieldNumber;
const int GraphProto::kOutputFieldNumber;
const int GraphProto::kValueInfoFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
GraphProto::GraphProto()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.GraphProto)
}
GraphProto::GraphProto(const GraphProto& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
node_(from.node_),
initializer_(from.initializer_),
input_(from.input_),
output_(from.output_),
value_info_(from.value_info_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_name()) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_doc_string()) {
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
// @@protoc_insertion_point(copy_constructor:opencv_onnx.GraphProto)
}
void GraphProto::SharedCtor() {
_cached_size_ = 0;
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
GraphProto::~GraphProto() {
// @@protoc_insertion_point(destructor:opencv_onnx.GraphProto)
SharedDtor();
}
void GraphProto::SharedDtor() {
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void GraphProto::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* GraphProto::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const GraphProto& GraphProto::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
return *internal_default_instance();
}
GraphProto* GraphProto::New(::google::protobuf::Arena* arena) const {
GraphProto* n = new GraphProto;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void GraphProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.GraphProto)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
node_.Clear();
initializer_.Clear();
input_.Clear();
output_.Clear();
value_info_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*name_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*doc_string_.UnsafeRawStringPointer())->clear();
}
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool GraphProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.GraphProto)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .opencv_onnx.NodeProto node = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_node()));
} else {
goto handle_unusual;
}
break;
}
// optional string name = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.GraphProto.name");
} else {
goto handle_unusual;
}
break;
}
// repeated .opencv_onnx.TensorProto initializer = 5;
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_initializer()));
} else {
goto handle_unusual;
}
break;
}
// optional string doc_string = 10;
case 10: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_doc_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.GraphProto.doc_string");
} else {
goto handle_unusual;
}
break;
}
// repeated .opencv_onnx.ValueInfoProto input = 11;
case 11: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_input()));
} else {
goto handle_unusual;
}
break;
}
// repeated .opencv_onnx.ValueInfoProto output = 12;
case 12: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_output()));
} else {
goto handle_unusual;
}
break;
}
// repeated .opencv_onnx.ValueInfoProto value_info = 13;
case 13: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_value_info()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.GraphProto)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.GraphProto)
return false;
#undef DO_
}
void GraphProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.GraphProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated .opencv_onnx.NodeProto node = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->node_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->node(static_cast<int>(i)), output);
}
cached_has_bits = _has_bits_[0];
// optional string name = 2;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.GraphProto.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->name(), output);
}
// repeated .opencv_onnx.TensorProto initializer = 5;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->initializer_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
5, this->initializer(static_cast<int>(i)), output);
}
// optional string doc_string = 10;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.GraphProto.doc_string");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
10, this->doc_string(), output);
}
// repeated .opencv_onnx.ValueInfoProto input = 11;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->input_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
11, this->input(static_cast<int>(i)), output);
}
// repeated .opencv_onnx.ValueInfoProto output = 12;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->output_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
12, this->output(static_cast<int>(i)), output);
}
// repeated .opencv_onnx.ValueInfoProto value_info = 13;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->value_info_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
13, this->value_info(static_cast<int>(i)), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.GraphProto)
}
::google::protobuf::uint8* GraphProto::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.GraphProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated .opencv_onnx.NodeProto node = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->node_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, this->node(static_cast<int>(i)), deterministic, target);
}
cached_has_bits = _has_bits_[0];
// optional string name = 2;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.GraphProto.name");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->name(), target);
}
// repeated .opencv_onnx.TensorProto initializer = 5;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->initializer_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
5, this->initializer(static_cast<int>(i)), deterministic, target);
}
// optional string doc_string = 10;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.GraphProto.doc_string");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
10, this->doc_string(), target);
}
// repeated .opencv_onnx.ValueInfoProto input = 11;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->input_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
11, this->input(static_cast<int>(i)), deterministic, target);
}
// repeated .opencv_onnx.ValueInfoProto output = 12;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->output_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
12, this->output(static_cast<int>(i)), deterministic, target);
}
// repeated .opencv_onnx.ValueInfoProto value_info = 13;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->value_info_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
13, this->value_info(static_cast<int>(i)), deterministic, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.GraphProto)
return target;
}
size_t GraphProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.GraphProto)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// repeated .opencv_onnx.NodeProto node = 1;
{
unsigned int count = static_cast<unsigned int>(this->node_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->node(static_cast<int>(i)));
}
}
// repeated .opencv_onnx.TensorProto initializer = 5;
{
unsigned int count = static_cast<unsigned int>(this->initializer_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->initializer(static_cast<int>(i)));
}
}
// repeated .opencv_onnx.ValueInfoProto input = 11;
{
unsigned int count = static_cast<unsigned int>(this->input_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->input(static_cast<int>(i)));
}
}
// repeated .opencv_onnx.ValueInfoProto output = 12;
{
unsigned int count = static_cast<unsigned int>(this->output_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->output(static_cast<int>(i)));
}
}
// repeated .opencv_onnx.ValueInfoProto value_info = 13;
{
unsigned int count = static_cast<unsigned int>(this->value_info_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->value_info(static_cast<int>(i)));
}
}
if (_has_bits_[0 / 32] & 3u) {
// optional string name = 2;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// optional string doc_string = 10;
if (has_doc_string()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->doc_string());
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void GraphProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.GraphProto)
GOOGLE_DCHECK_NE(&from, this);
const GraphProto* source =
::google::protobuf::internal::DynamicCastToGenerated<const GraphProto>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.GraphProto)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.GraphProto)
MergeFrom(*source);
}
}
void GraphProto::MergeFrom(const GraphProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.GraphProto)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
node_.MergeFrom(from.node_);
initializer_.MergeFrom(from.initializer_);
input_.MergeFrom(from.input_);
output_.MergeFrom(from.output_);
value_info_.MergeFrom(from.value_info_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
set_has_name();
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
if (cached_has_bits & 0x00000002u) {
set_has_doc_string();
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
}
}
void GraphProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.GraphProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void GraphProto::CopyFrom(const GraphProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.GraphProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool GraphProto::IsInitialized() const {
return true;
}
void GraphProto::Swap(GraphProto* other) {
if (other == this) return;
InternalSwap(other);
}
void GraphProto::InternalSwap(GraphProto* other) {
using std::swap;
node_.InternalSwap(&other->node_);
initializer_.InternalSwap(&other->initializer_);
input_.InternalSwap(&other->input_);
output_.InternalSwap(&other->output_);
value_info_.InternalSwap(&other->value_info_);
name_.Swap(&other->name_);
doc_string_.Swap(&other->doc_string_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata GraphProto::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void TensorProto_Segment::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TensorProto_Segment::kBeginFieldNumber;
const int TensorProto_Segment::kEndFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
TensorProto_Segment::TensorProto_Segment()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto_Segment();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.TensorProto.Segment)
}
TensorProto_Segment::TensorProto_Segment(const TensorProto_Segment& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
::memcpy(&begin_, &from.begin_,
static_cast<size_t>(reinterpret_cast<char*>(&end_) -
reinterpret_cast<char*>(&begin_)) + sizeof(end_));
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto.Segment)
}
void TensorProto_Segment::SharedCtor() {
_cached_size_ = 0;
::memset(&begin_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&end_) -
reinterpret_cast<char*>(&begin_)) + sizeof(end_));
}
TensorProto_Segment::~TensorProto_Segment() {
// @@protoc_insertion_point(destructor:opencv_onnx.TensorProto.Segment)
SharedDtor();
}
void TensorProto_Segment::SharedDtor() {
}
void TensorProto_Segment::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TensorProto_Segment::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const TensorProto_Segment& TensorProto_Segment::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto_Segment();
return *internal_default_instance();
}
TensorProto_Segment* TensorProto_Segment::New(::google::protobuf::Arena* arena) const {
TensorProto_Segment* n = new TensorProto_Segment;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void TensorProto_Segment::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto.Segment)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 3u) {
::memset(&begin_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&end_) -
reinterpret_cast<char*>(&begin_)) + sizeof(end_));
}
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool TensorProto_Segment::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.TensorProto.Segment)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int64 begin = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
set_has_begin();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, &begin_)));
} else {
goto handle_unusual;
}
break;
}
// optional int64 end = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
set_has_end();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, &end_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.TensorProto.Segment)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.TensorProto.Segment)
return false;
#undef DO_
}
void TensorProto_Segment::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.TensorProto.Segment)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int64 begin = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->begin(), output);
}
// optional int64 end = 2;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->end(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.TensorProto.Segment)
}
::google::protobuf::uint8* TensorProto_Segment::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto.Segment)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int64 begin = 1;
if (cached_has_bits & 0x00000001u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->begin(), target);
}
// optional int64 end = 2;
if (cached_has_bits & 0x00000002u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->end(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto.Segment)
return target;
}
size_t TensorProto_Segment::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto.Segment)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
if (_has_bits_[0 / 32] & 3u) {
// optional int64 begin = 1;
if (has_begin()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int64Size(
this->begin());
}
// optional int64 end = 2;
if (has_end()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int64Size(
this->end());
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void TensorProto_Segment::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorProto.Segment)
GOOGLE_DCHECK_NE(&from, this);
const TensorProto_Segment* source =
::google::protobuf::internal::DynamicCastToGenerated<const TensorProto_Segment>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorProto.Segment)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorProto.Segment)
MergeFrom(*source);
}
}
void TensorProto_Segment::MergeFrom(const TensorProto_Segment& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto.Segment)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
begin_ = from.begin_;
}
if (cached_has_bits & 0x00000002u) {
end_ = from.end_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void TensorProto_Segment::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorProto.Segment)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void TensorProto_Segment::CopyFrom(const TensorProto_Segment& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorProto.Segment)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TensorProto_Segment::IsInitialized() const {
return true;
}
void TensorProto_Segment::Swap(TensorProto_Segment* other) {
if (other == this) return;
InternalSwap(other);
}
void TensorProto_Segment::InternalSwap(TensorProto_Segment* other) {
using std::swap;
swap(begin_, other->begin_);
swap(end_, other->end_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata TensorProto_Segment::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void TensorProto::InitAsDefaultInstance() {
::opencv_onnx::_TensorProto_default_instance_._instance.get_mutable()->segment_ = const_cast< ::opencv_onnx::TensorProto_Segment*>(
::opencv_onnx::TensorProto_Segment::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TensorProto::kDimsFieldNumber;
const int TensorProto::kDataTypeFieldNumber;
const int TensorProto::kSegmentFieldNumber;
const int TensorProto::kFloatDataFieldNumber;
const int TensorProto::kInt32DataFieldNumber;
const int TensorProto::kStringDataFieldNumber;
const int TensorProto::kInt64DataFieldNumber;
const int TensorProto::kNameFieldNumber;
const int TensorProto::kDocStringFieldNumber;
const int TensorProto::kRawDataFieldNumber;
const int TensorProto::kDoubleDataFieldNumber;
const int TensorProto::kUint64DataFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
TensorProto::TensorProto()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.TensorProto)
}
TensorProto::TensorProto(const TensorProto& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
dims_(from.dims_),
float_data_(from.float_data_),
int32_data_(from.int32_data_),
string_data_(from.string_data_),
int64_data_(from.int64_data_),
double_data_(from.double_data_),
uint64_data_(from.uint64_data_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_name()) {
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
raw_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_raw_data()) {
raw_data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.raw_data_);
}
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_doc_string()) {
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
if (from.has_segment()) {
segment_ = new ::opencv_onnx::TensorProto_Segment(*from.segment_);
} else {
segment_ = NULL;
}
data_type_ = from.data_type_;
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto)
}
void TensorProto::SharedCtor() {
_cached_size_ = 0;
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
raw_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
::memset(&segment_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&data_type_) -
reinterpret_cast<char*>(&segment_)) + sizeof(data_type_));
}
TensorProto::~TensorProto() {
// @@protoc_insertion_point(destructor:opencv_onnx.TensorProto)
SharedDtor();
}
void TensorProto::SharedDtor() {
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
raw_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete segment_;
}
void TensorProto::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TensorProto::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const TensorProto& TensorProto::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto();
return *internal_default_instance();
}
TensorProto* TensorProto::New(::google::protobuf::Arena* arena) const {
TensorProto* n = new TensorProto;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void TensorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
dims_.Clear();
float_data_.Clear();
int32_data_.Clear();
string_data_.Clear();
int64_data_.Clear();
double_data_.Clear();
uint64_data_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 15u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*name_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(!raw_data_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*raw_data_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*doc_string_.UnsafeRawStringPointer())->clear();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(segment_ != NULL);
segment_->Clear();
}
}
data_type_ = 0;
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool TensorProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.TensorProto)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated int64 dims = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1, 8u, input, this->mutable_dims())));
} else if (
static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, this->mutable_dims())));
} else {
goto handle_unusual;
}
break;
}
// optional .opencv_onnx.TensorProto.DataType data_type = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::opencv_onnx::TensorProto_DataType_IsValid(value)) {
set_data_type(static_cast< ::opencv_onnx::TensorProto_DataType >(value));
} else {
mutable_unknown_fields()->AddVarint(
2, static_cast< ::google::protobuf::uint64>(value));
}
} else {
goto handle_unusual;
}
break;
}
// optional .opencv_onnx.TensorProto.Segment segment = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_segment()));
} else {
goto handle_unusual;
}
break;
}
// repeated float float_data = 4 [packed = true];
case 4: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_float_data())));
} else if (
static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(37u /* 37 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
1, 34u, input, this->mutable_float_data())));
} else {
goto handle_unusual;
}
break;
}
// repeated int32 int32_data = 5 [packed = true];
case 5: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, this->mutable_int32_data())));
} else if (
static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
1, 42u, input, this->mutable_int32_data())));
} else {
goto handle_unusual;
}
break;
}
// repeated bytes string_data = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
input, this->add_string_data()));
} else {
goto handle_unusual;
}
break;
}
// repeated int64 int64_data = 7 [packed = true];
case 7: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, this->mutable_int64_data())));
} else if (
static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1, 58u, input, this->mutable_int64_data())));
} else {
goto handle_unusual;
}
break;
}
// optional string name = 8;
case 8: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.TensorProto.name");
} else {
goto handle_unusual;
}
break;
}
// optional bytes raw_data = 9;
case 9: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
input, this->mutable_raw_data()));
} else {
goto handle_unusual;
}
break;
}
// repeated double double_data = 10 [packed = true];
case 10: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
input, this->mutable_double_data())));
} else if (
static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
1, 82u, input, this->mutable_double_data())));
} else {
goto handle_unusual;
}
break;
}
// repeated uint64 uint64_data = 11 [packed = true];
case 11: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
input, this->mutable_uint64_data())));
} else if (
static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(88u /* 88 & 0xFF */)) {
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
1, 90u, input, this->mutable_uint64_data())));
} else {
goto handle_unusual;
}
break;
}
// optional string doc_string = 12;
case 12: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_doc_string()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.TensorProto.doc_string");
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.TensorProto)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.TensorProto)
return false;
#undef DO_
}
void TensorProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.TensorProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated int64 dims = 1;
for (int i = 0, n = this->dims_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteInt64(
1, this->dims(i), output);
}
cached_has_bits = _has_bits_[0];
// optional .opencv_onnx.TensorProto.DataType data_type = 2;
if (cached_has_bits & 0x00000010u) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
2, this->data_type(), output);
}
// optional .opencv_onnx.TensorProto.Segment segment = 3;
if (cached_has_bits & 0x00000008u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3, *this->segment_, output);
}
// repeated float float_data = 4 [packed = true];
if (this->float_data_size() > 0) {
::google::protobuf::internal::WireFormatLite::WriteTag(4, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
_float_data_cached_byte_size_));
::google::protobuf::internal::WireFormatLite::WriteFloatArray(
this->float_data().data(), this->float_data_size(), output);
}
// repeated int32 int32_data = 5 [packed = true];
if (this->int32_data_size() > 0) {
::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
_int32_data_cached_byte_size_));
}
for (int i = 0, n = this->int32_data_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
this->int32_data(i), output);
}
// repeated bytes string_data = 6;
for (int i = 0, n = this->string_data_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteBytes(
6, this->string_data(i), output);
}
// repeated int64 int64_data = 7 [packed = true];
if (this->int64_data_size() > 0) {
::google::protobuf::internal::WireFormatLite::WriteTag(7, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
_int64_data_cached_byte_size_));
}
for (int i = 0, n = this->int64_data_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
this->int64_data(i), output);
}
// optional string name = 8;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.TensorProto.name");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
8, this->name(), output);
}
// optional bytes raw_data = 9;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
9, this->raw_data(), output);
}
// repeated double double_data = 10 [packed = true];
if (this->double_data_size() > 0) {
::google::protobuf::internal::WireFormatLite::WriteTag(10, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
_double_data_cached_byte_size_));
::google::protobuf::internal::WireFormatLite::WriteDoubleArray(
this->double_data().data(), this->double_data_size(), output);
}
// repeated uint64 uint64_data = 11 [packed = true];
if (this->uint64_data_size() > 0) {
::google::protobuf::internal::WireFormatLite::WriteTag(11, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
_uint64_data_cached_byte_size_));
}
for (int i = 0, n = this->uint64_data_size(); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
this->uint64_data(i), output);
}
// optional string doc_string = 12;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.TensorProto.doc_string");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
12, this->doc_string(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.TensorProto)
}
::google::protobuf::uint8* TensorProto::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated int64 dims = 1;
target = ::google::protobuf::internal::WireFormatLite::
WriteInt64ToArray(1, this->dims_, target);
cached_has_bits = _has_bits_[0];
// optional .opencv_onnx.TensorProto.DataType data_type = 2;
if (cached_has_bits & 0x00000010u) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
2, this->data_type(), target);
}
// optional .opencv_onnx.TensorProto.Segment segment = 3;
if (cached_has_bits & 0x00000008u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
3, *this->segment_, deterministic, target);
}
// repeated float float_data = 4 [packed = true];
if (this->float_data_size() > 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
4,
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
target);
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
static_cast< ::google::protobuf::int32>(
_float_data_cached_byte_size_), target);
target = ::google::protobuf::internal::WireFormatLite::
WriteFloatNoTagToArray(this->float_data_, target);
}
// repeated int32 int32_data = 5 [packed = true];
if (this->int32_data_size() > 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
5,
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
target);
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
static_cast< ::google::protobuf::int32>(
_int32_data_cached_byte_size_), target);
target = ::google::protobuf::internal::WireFormatLite::
WriteInt32NoTagToArray(this->int32_data_, target);
}
// repeated bytes string_data = 6;
for (int i = 0, n = this->string_data_size(); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteBytesToArray(6, this->string_data(i), target);
}
// repeated int64 int64_data = 7 [packed = true];
if (this->int64_data_size() > 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
7,
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
target);
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
static_cast< ::google::protobuf::int32>(
_int64_data_cached_byte_size_), target);
target = ::google::protobuf::internal::WireFormatLite::
WriteInt64NoTagToArray(this->int64_data_, target);
}
// optional string name = 8;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->name().data(), static_cast<int>(this->name().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.TensorProto.name");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
8, this->name(), target);
}
// optional bytes raw_data = 9;
if (cached_has_bits & 0x00000002u) {
target =
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
9, this->raw_data(), target);
}
// repeated double double_data = 10 [packed = true];
if (this->double_data_size() > 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
10,
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
target);
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
static_cast< ::google::protobuf::int32>(
_double_data_cached_byte_size_), target);
target = ::google::protobuf::internal::WireFormatLite::
WriteDoubleNoTagToArray(this->double_data_, target);
}
// repeated uint64 uint64_data = 11 [packed = true];
if (this->uint64_data_size() > 0) {
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
11,
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
target);
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
static_cast< ::google::protobuf::int32>(
_uint64_data_cached_byte_size_), target);
target = ::google::protobuf::internal::WireFormatLite::
WriteUInt64NoTagToArray(this->uint64_data_, target);
}
// optional string doc_string = 12;
if (cached_has_bits & 0x00000004u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.TensorProto.doc_string");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
12, this->doc_string(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto)
return target;
}
size_t TensorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// repeated int64 dims = 1;
{
size_t data_size = ::google::protobuf::internal::WireFormatLite::
Int64Size(this->dims_);
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->dims_size());
total_size += data_size;
}
// repeated float float_data = 4 [packed = true];
{
unsigned int count = static_cast<unsigned int>(this->float_data_size());
size_t data_size = 4UL * count;
if (data_size > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
static_cast< ::google::protobuf::int32>(data_size));
}
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_float_data_cached_byte_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
total_size += data_size;
}
// repeated int32 int32_data = 5 [packed = true];
{
size_t data_size = ::google::protobuf::internal::WireFormatLite::
Int32Size(this->int32_data_);
if (data_size > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
static_cast< ::google::protobuf::int32>(data_size));
}
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_int32_data_cached_byte_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
total_size += data_size;
}
// repeated bytes string_data = 6;
total_size += 1 *
::google::protobuf::internal::FromIntSize(this->string_data_size());
for (int i = 0, n = this->string_data_size(); i < n; i++) {
total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
this->string_data(i));
}
// repeated int64 int64_data = 7 [packed = true];
{
size_t data_size = ::google::protobuf::internal::WireFormatLite::
Int64Size(this->int64_data_);
if (data_size > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
static_cast< ::google::protobuf::int32>(data_size));
}
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_int64_data_cached_byte_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
total_size += data_size;
}
// repeated double double_data = 10 [packed = true];
{
unsigned int count = static_cast<unsigned int>(this->double_data_size());
size_t data_size = 8UL * count;
if (data_size > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
static_cast< ::google::protobuf::int32>(data_size));
}
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_double_data_cached_byte_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
total_size += data_size;
}
// repeated uint64 uint64_data = 11 [packed = true];
{
size_t data_size = ::google::protobuf::internal::WireFormatLite::
UInt64Size(this->uint64_data_);
if (data_size > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(
static_cast< ::google::protobuf::int32>(data_size));
}
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_uint64_data_cached_byte_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
total_size += data_size;
}
if (_has_bits_[0 / 32] & 31u) {
// optional string name = 8;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// optional bytes raw_data = 9;
if (has_raw_data()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::BytesSize(
this->raw_data());
}
// optional string doc_string = 12;
if (has_doc_string()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->doc_string());
}
// optional .opencv_onnx.TensorProto.Segment segment = 3;
if (has_segment()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->segment_);
}
// optional .opencv_onnx.TensorProto.DataType data_type = 2;
if (has_data_type()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->data_type());
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void TensorProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorProto)
GOOGLE_DCHECK_NE(&from, this);
const TensorProto* source =
::google::protobuf::internal::DynamicCastToGenerated<const TensorProto>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorProto)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorProto)
MergeFrom(*source);
}
}
void TensorProto::MergeFrom(const TensorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
dims_.MergeFrom(from.dims_);
float_data_.MergeFrom(from.float_data_);
int32_data_.MergeFrom(from.int32_data_);
string_data_.MergeFrom(from.string_data_);
int64_data_.MergeFrom(from.int64_data_);
double_data_.MergeFrom(from.double_data_);
uint64_data_.MergeFrom(from.uint64_data_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 31u) {
if (cached_has_bits & 0x00000001u) {
set_has_name();
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
}
if (cached_has_bits & 0x00000002u) {
set_has_raw_data();
raw_data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.raw_data_);
}
if (cached_has_bits & 0x00000004u) {
set_has_doc_string();
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
}
if (cached_has_bits & 0x00000008u) {
mutable_segment()->::opencv_onnx::TensorProto_Segment::MergeFrom(from.segment());
}
if (cached_has_bits & 0x00000010u) {
data_type_ = from.data_type_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void TensorProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void TensorProto::CopyFrom(const TensorProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TensorProto::IsInitialized() const {
return true;
}
void TensorProto::Swap(TensorProto* other) {
if (other == this) return;
InternalSwap(other);
}
void TensorProto::InternalSwap(TensorProto* other) {
using std::swap;
dims_.InternalSwap(&other->dims_);
float_data_.InternalSwap(&other->float_data_);
int32_data_.InternalSwap(&other->int32_data_);
string_data_.InternalSwap(&other->string_data_);
int64_data_.InternalSwap(&other->int64_data_);
double_data_.InternalSwap(&other->double_data_);
uint64_data_.InternalSwap(&other->uint64_data_);
name_.Swap(&other->name_);
raw_data_.Swap(&other->raw_data_);
doc_string_.Swap(&other->doc_string_);
swap(segment_, other->segment_);
swap(data_type_, other->data_type_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata TensorProto::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void TensorShapeProto_Dimension::InitAsDefaultInstance() {
::opencv_onnx::_TensorShapeProto_Dimension_default_instance_.dim_value_ = GOOGLE_LONGLONG(0);
::opencv_onnx::_TensorShapeProto_Dimension_default_instance_.dim_param_.UnsafeSetDefault(
&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TensorShapeProto_Dimension::kDimValueFieldNumber;
const int TensorShapeProto_Dimension::kDimParamFieldNumber;
const int TensorShapeProto_Dimension::kDenotationFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
TensorShapeProto_Dimension::TensorShapeProto_Dimension()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto_Dimension();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.TensorShapeProto.Dimension)
}
TensorShapeProto_Dimension::TensorShapeProto_Dimension(const TensorShapeProto_Dimension& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_denotation()) {
denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
}
clear_has_value();
switch (from.value_case()) {
case kDimValue: {
set_dim_value(from.dim_value());
break;
}
case kDimParam: {
set_dim_param(from.dim_param());
break;
}
case VALUE_NOT_SET: {
break;
}
}
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto.Dimension)
}
void TensorShapeProto_Dimension::SharedCtor() {
_cached_size_ = 0;
denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_value();
}
TensorShapeProto_Dimension::~TensorShapeProto_Dimension() {
// @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto.Dimension)
SharedDtor();
}
void TensorShapeProto_Dimension::SharedDtor() {
denotation_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (has_value()) {
clear_value();
}
}
void TensorShapeProto_Dimension::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TensorShapeProto_Dimension::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const TensorShapeProto_Dimension& TensorShapeProto_Dimension::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto_Dimension();
return *internal_default_instance();
}
TensorShapeProto_Dimension* TensorShapeProto_Dimension::New(::google::protobuf::Arena* arena) const {
TensorShapeProto_Dimension* n = new TensorShapeProto_Dimension;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void TensorShapeProto_Dimension::clear_value() {
// @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TensorShapeProto.Dimension)
switch (value_case()) {
case kDimValue: {
// No need to clear
break;
}
case kDimParam: {
value_.dim_param_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
break;
}
case VALUE_NOT_SET: {
break;
}
}
_oneof_case_[0] = VALUE_NOT_SET;
}
void TensorShapeProto_Dimension::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto.Dimension)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!denotation_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*denotation_.UnsafeRawStringPointer())->clear();
}
clear_value();
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool TensorShapeProto_Dimension::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.TensorShapeProto.Dimension)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int64 dim_value = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
clear_value();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, &value_.dim_value_)));
set_has_dim_value();
} else {
goto handle_unusual;
}
break;
}
// optional string dim_param = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_dim_param()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->dim_param().data(), static_cast<int>(this->dim_param().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.TensorShapeProto.Dimension.dim_param");
} else {
goto handle_unusual;
}
break;
}
// optional string denotation = 3;
case 3: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_denotation()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->denotation().data(), static_cast<int>(this->denotation().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.TensorShapeProto.Dimension.denotation");
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.TensorShapeProto.Dimension)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.TensorShapeProto.Dimension)
return false;
#undef DO_
}
void TensorShapeProto_Dimension::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.TensorShapeProto.Dimension)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
switch (value_case()) {
case kDimValue:
::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->dim_value(), output);
break;
case kDimParam:
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->dim_param().data(), static_cast<int>(this->dim_param().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.TensorShapeProto.Dimension.dim_param");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2, this->dim_param(), output);
break;
default: ;
}
cached_has_bits = _has_bits_[0];
// optional string denotation = 3;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->denotation().data(), static_cast<int>(this->denotation().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.TensorShapeProto.Dimension.denotation");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3, this->denotation(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.TensorShapeProto.Dimension)
}
::google::protobuf::uint8* TensorShapeProto_Dimension::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto.Dimension)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
switch (value_case()) {
case kDimValue:
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->dim_value(), target);
break;
case kDimParam:
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->dim_param().data(), static_cast<int>(this->dim_param().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.TensorShapeProto.Dimension.dim_param");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->dim_param(), target);
break;
default: ;
}
cached_has_bits = _has_bits_[0];
// optional string denotation = 3;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->denotation().data(), static_cast<int>(this->denotation().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.TensorShapeProto.Dimension.denotation");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3, this->denotation(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto.Dimension)
return target;
}
size_t TensorShapeProto_Dimension::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorShapeProto.Dimension)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// optional string denotation = 3;
if (has_denotation()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->denotation());
}
switch (value_case()) {
// optional int64 dim_value = 1;
case kDimValue: {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int64Size(
this->dim_value());
break;
}
// optional string dim_param = 2;
case kDimParam: {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->dim_param());
break;
}
case VALUE_NOT_SET: {
break;
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void TensorShapeProto_Dimension::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorShapeProto.Dimension)
GOOGLE_DCHECK_NE(&from, this);
const TensorShapeProto_Dimension* source =
::google::protobuf::internal::DynamicCastToGenerated<const TensorShapeProto_Dimension>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorShapeProto.Dimension)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorShapeProto.Dimension)
MergeFrom(*source);
}
}
void TensorShapeProto_Dimension::MergeFrom(const TensorShapeProto_Dimension& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto.Dimension)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.has_denotation()) {
set_has_denotation();
denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
}
switch (from.value_case()) {
case kDimValue: {
set_dim_value(from.dim_value());
break;
}
case kDimParam: {
set_dim_param(from.dim_param());
break;
}
case VALUE_NOT_SET: {
break;
}
}
}
void TensorShapeProto_Dimension::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorShapeProto.Dimension)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void TensorShapeProto_Dimension::CopyFrom(const TensorShapeProto_Dimension& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorShapeProto.Dimension)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TensorShapeProto_Dimension::IsInitialized() const {
return true;
}
void TensorShapeProto_Dimension::Swap(TensorShapeProto_Dimension* other) {
if (other == this) return;
InternalSwap(other);
}
void TensorShapeProto_Dimension::InternalSwap(TensorShapeProto_Dimension* other) {
using std::swap;
denotation_.Swap(&other->denotation_);
swap(value_, other->value_);
swap(_oneof_case_[0], other->_oneof_case_[0]);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata TensorShapeProto_Dimension::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void TensorShapeProto::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TensorShapeProto::kDimFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
TensorShapeProto::TensorShapeProto()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.TensorShapeProto)
}
TensorShapeProto::TensorShapeProto(const TensorShapeProto& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0),
dim_(from.dim_) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto)
}
void TensorShapeProto::SharedCtor() {
_cached_size_ = 0;
}
TensorShapeProto::~TensorShapeProto() {
// @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto)
SharedDtor();
}
void TensorShapeProto::SharedDtor() {
}
void TensorShapeProto::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TensorShapeProto::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const TensorShapeProto& TensorShapeProto::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto();
return *internal_default_instance();
}
TensorShapeProto* TensorShapeProto::New(::google::protobuf::Arena* arena) const {
TensorShapeProto* n = new TensorShapeProto;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void TensorShapeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
dim_.Clear();
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool TensorShapeProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.TensorShapeProto)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_dim()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.TensorShapeProto)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.TensorShapeProto)
return false;
#undef DO_
}
void TensorShapeProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.TensorShapeProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->dim_size()); i < n; i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->dim(static_cast<int>(i)), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.TensorShapeProto)
}
::google::protobuf::uint8* TensorShapeProto::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->dim_size()); i < n; i++) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, this->dim(static_cast<int>(i)), deterministic, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto)
return target;
}
size_t TensorShapeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorShapeProto)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
{
unsigned int count = static_cast<unsigned int>(this->dim_size());
total_size += 1UL * count;
for (unsigned int i = 0; i < count; i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSize(
this->dim(static_cast<int>(i)));
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void TensorShapeProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorShapeProto)
GOOGLE_DCHECK_NE(&from, this);
const TensorShapeProto* source =
::google::protobuf::internal::DynamicCastToGenerated<const TensorShapeProto>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorShapeProto)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorShapeProto)
MergeFrom(*source);
}
}
void TensorShapeProto::MergeFrom(const TensorShapeProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
dim_.MergeFrom(from.dim_);
}
void TensorShapeProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorShapeProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void TensorShapeProto::CopyFrom(const TensorShapeProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorShapeProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TensorShapeProto::IsInitialized() const {
return true;
}
void TensorShapeProto::Swap(TensorShapeProto* other) {
if (other == this) return;
InternalSwap(other);
}
void TensorShapeProto::InternalSwap(TensorShapeProto* other) {
using std::swap;
dim_.InternalSwap(&other->dim_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata TensorShapeProto::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void TypeProto_Tensor::InitAsDefaultInstance() {
::opencv_onnx::_TypeProto_Tensor_default_instance_._instance.get_mutable()->shape_ = const_cast< ::opencv_onnx::TensorShapeProto*>(
::opencv_onnx::TensorShapeProto::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TypeProto_Tensor::kElemTypeFieldNumber;
const int TypeProto_Tensor::kShapeFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
TypeProto_Tensor::TypeProto_Tensor()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto_Tensor();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.TypeProto.Tensor)
}
TypeProto_Tensor::TypeProto_Tensor(const TypeProto_Tensor& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
if (from.has_shape()) {
shape_ = new ::opencv_onnx::TensorShapeProto(*from.shape_);
} else {
shape_ = NULL;
}
elem_type_ = from.elem_type_;
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Tensor)
}
void TypeProto_Tensor::SharedCtor() {
_cached_size_ = 0;
::memset(&shape_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&elem_type_) -
reinterpret_cast<char*>(&shape_)) + sizeof(elem_type_));
}
TypeProto_Tensor::~TypeProto_Tensor() {
// @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Tensor)
SharedDtor();
}
void TypeProto_Tensor::SharedDtor() {
if (this != internal_default_instance()) delete shape_;
}
void TypeProto_Tensor::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TypeProto_Tensor::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const TypeProto_Tensor& TypeProto_Tensor::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto_Tensor();
return *internal_default_instance();
}
TypeProto_Tensor* TypeProto_Tensor::New(::google::protobuf::Arena* arena) const {
TypeProto_Tensor* n = new TypeProto_Tensor;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void TypeProto_Tensor::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto.Tensor)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(shape_ != NULL);
shape_->Clear();
}
elem_type_ = 0;
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool TypeProto_Tensor::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.TypeProto.Tensor)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .opencv_onnx.TensorProto.DataType elem_type = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::opencv_onnx::TensorProto_DataType_IsValid(value)) {
set_elem_type(static_cast< ::opencv_onnx::TensorProto_DataType >(value));
} else {
mutable_unknown_fields()->AddVarint(
1, static_cast< ::google::protobuf::uint64>(value));
}
} else {
goto handle_unusual;
}
break;
}
// optional .opencv_onnx.TensorShapeProto shape = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_shape()));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.TypeProto.Tensor)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.TypeProto.Tensor)
return false;
#undef DO_
}
void TypeProto_Tensor::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.TypeProto.Tensor)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_onnx.TensorProto.DataType elem_type = 1;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
1, this->elem_type(), output);
}
// optional .opencv_onnx.TensorShapeProto shape = 2;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2, *this->shape_, output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.TypeProto.Tensor)
}
::google::protobuf::uint8* TypeProto_Tensor::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto.Tensor)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_onnx.TensorProto.DataType elem_type = 1;
if (cached_has_bits & 0x00000002u) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1, this->elem_type(), target);
}
// optional .opencv_onnx.TensorShapeProto shape = 2;
if (cached_has_bits & 0x00000001u) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
2, *this->shape_, deterministic, target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Tensor)
return target;
}
size_t TypeProto_Tensor::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Tensor)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
if (_has_bits_[0 / 32] & 3u) {
// optional .opencv_onnx.TensorShapeProto shape = 2;
if (has_shape()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*this->shape_);
}
// optional .opencv_onnx.TensorProto.DataType elem_type = 1;
if (has_elem_type()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->elem_type());
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void TypeProto_Tensor::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TypeProto.Tensor)
GOOGLE_DCHECK_NE(&from, this);
const TypeProto_Tensor* source =
::google::protobuf::internal::DynamicCastToGenerated<const TypeProto_Tensor>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TypeProto.Tensor)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TypeProto.Tensor)
MergeFrom(*source);
}
}
void TypeProto_Tensor::MergeFrom(const TypeProto_Tensor& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Tensor)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
mutable_shape()->::opencv_onnx::TensorShapeProto::MergeFrom(from.shape());
}
if (cached_has_bits & 0x00000002u) {
elem_type_ = from.elem_type_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void TypeProto_Tensor::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TypeProto.Tensor)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void TypeProto_Tensor::CopyFrom(const TypeProto_Tensor& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto.Tensor)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TypeProto_Tensor::IsInitialized() const {
return true;
}
void TypeProto_Tensor::Swap(TypeProto_Tensor* other) {
if (other == this) return;
InternalSwap(other);
}
void TypeProto_Tensor::InternalSwap(TypeProto_Tensor* other) {
using std::swap;
swap(shape_, other->shape_);
swap(elem_type_, other->elem_type_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata TypeProto_Tensor::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void TypeProto::InitAsDefaultInstance() {
::opencv_onnx::_TypeProto_default_instance_.tensor_type_ = const_cast< ::opencv_onnx::TypeProto_Tensor*>(
::opencv_onnx::TypeProto_Tensor::internal_default_instance());
}
void TypeProto::set_allocated_tensor_type(::opencv_onnx::TypeProto_Tensor* tensor_type) {
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
clear_value();
if (tensor_type) {
::google::protobuf::Arena* submessage_arena = NULL;
if (message_arena != submessage_arena) {
tensor_type = ::google::protobuf::internal::GetOwnedMessage(
message_arena, tensor_type, submessage_arena);
}
set_has_tensor_type();
value_.tensor_type_ = tensor_type;
}
// @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.tensor_type)
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TypeProto::kTensorTypeFieldNumber;
const int TypeProto::kDenotationFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
TypeProto::TypeProto()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.TypeProto)
}
TypeProto::TypeProto(const TypeProto& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_denotation()) {
denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
}
clear_has_value();
switch (from.value_case()) {
case kTensorType: {
mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from.tensor_type());
break;
}
case VALUE_NOT_SET: {
break;
}
}
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto)
}
void TypeProto::SharedCtor() {
_cached_size_ = 0;
denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
clear_has_value();
}
TypeProto::~TypeProto() {
// @@protoc_insertion_point(destructor:opencv_onnx.TypeProto)
SharedDtor();
}
void TypeProto::SharedDtor() {
denotation_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (has_value()) {
clear_value();
}
}
void TypeProto::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TypeProto::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const TypeProto& TypeProto::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto();
return *internal_default_instance();
}
TypeProto* TypeProto::New(::google::protobuf::Arena* arena) const {
TypeProto* n = new TypeProto;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void TypeProto::clear_value() {
// @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TypeProto)
switch (value_case()) {
case kTensorType: {
delete value_.tensor_type_;
break;
}
case VALUE_NOT_SET: {
break;
}
}
_oneof_case_[0] = VALUE_NOT_SET;
}
void TypeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!denotation_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*denotation_.UnsafeRawStringPointer())->clear();
}
clear_value();
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool TypeProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.TypeProto)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .opencv_onnx.TypeProto.Tensor tensor_type = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
input, mutable_tensor_type()));
} else {
goto handle_unusual;
}
break;
}
// optional string denotation = 6;
case 6: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_denotation()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->denotation().data(), static_cast<int>(this->denotation().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.TypeProto.denotation");
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.TypeProto)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.TypeProto)
return false;
#undef DO_
}
void TypeProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.TypeProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// optional .opencv_onnx.TypeProto.Tensor tensor_type = 1;
if (has_tensor_type()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, *value_.tensor_type_, output);
}
cached_has_bits = _has_bits_[0];
// optional string denotation = 6;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->denotation().data(), static_cast<int>(this->denotation().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.TypeProto.denotation");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
6, this->denotation(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.TypeProto)
}
::google::protobuf::uint8* TypeProto::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
// optional .opencv_onnx.TypeProto.Tensor tensor_type = 1;
if (has_tensor_type()) {
target = ::google::protobuf::internal::WireFormatLite::
InternalWriteMessageToArray(
1, *value_.tensor_type_, deterministic, target);
}
cached_has_bits = _has_bits_[0];
// optional string denotation = 6;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->denotation().data(), static_cast<int>(this->denotation().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.TypeProto.denotation");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6, this->denotation(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto)
return target;
}
size_t TypeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
// optional string denotation = 6;
if (has_denotation()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->denotation());
}
switch (value_case()) {
// optional .opencv_onnx.TypeProto.Tensor tensor_type = 1;
case kTensorType: {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(
*value_.tensor_type_);
break;
}
case VALUE_NOT_SET: {
break;
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void TypeProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TypeProto)
GOOGLE_DCHECK_NE(&from, this);
const TypeProto* source =
::google::protobuf::internal::DynamicCastToGenerated<const TypeProto>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TypeProto)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TypeProto)
MergeFrom(*source);
}
}
void TypeProto::MergeFrom(const TypeProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
if (from.has_denotation()) {
set_has_denotation();
denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
}
switch (from.value_case()) {
case kTensorType: {
mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from.tensor_type());
break;
}
case VALUE_NOT_SET: {
break;
}
}
}
void TypeProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TypeProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void TypeProto::CopyFrom(const TypeProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TypeProto::IsInitialized() const {
return true;
}
void TypeProto::Swap(TypeProto* other) {
if (other == this) return;
InternalSwap(other);
}
void TypeProto::InternalSwap(TypeProto* other) {
using std::swap;
denotation_.Swap(&other->denotation_);
swap(value_, other->value_);
swap(_oneof_case_[0], other->_oneof_case_[0]);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata TypeProto::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// ===================================================================
void OperatorSetIdProto::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int OperatorSetIdProto::kDomainFieldNumber;
const int OperatorSetIdProto::kVersionFieldNumber;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
OperatorSetIdProto::OperatorSetIdProto()
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
::protobuf_opencv_2donnx_2eproto::InitDefaultsOperatorSetIdProto();
}
SharedCtor();
// @@protoc_insertion_point(constructor:opencv_onnx.OperatorSetIdProto)
}
OperatorSetIdProto::OperatorSetIdProto(const OperatorSetIdProto& from)
: ::google::protobuf::Message(),
_internal_metadata_(NULL),
_has_bits_(from._has_bits_),
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
if (from.has_domain()) {
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
}
version_ = from.version_;
// @@protoc_insertion_point(copy_constructor:opencv_onnx.OperatorSetIdProto)
}
void OperatorSetIdProto::SharedCtor() {
_cached_size_ = 0;
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
version_ = GOOGLE_LONGLONG(0);
}
OperatorSetIdProto::~OperatorSetIdProto() {
// @@protoc_insertion_point(destructor:opencv_onnx.OperatorSetIdProto)
SharedDtor();
}
void OperatorSetIdProto::SharedDtor() {
domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void OperatorSetIdProto::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* OperatorSetIdProto::descriptor() {
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}
const OperatorSetIdProto& OperatorSetIdProto::default_instance() {
::protobuf_opencv_2donnx_2eproto::InitDefaultsOperatorSetIdProto();
return *internal_default_instance();
}
OperatorSetIdProto* OperatorSetIdProto::New(::google::protobuf::Arena* arena) const {
OperatorSetIdProto* n = new OperatorSetIdProto;
if (arena != NULL) {
arena->Own(n);
}
return n;
}
void OperatorSetIdProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_onnx.OperatorSetIdProto)
::google::protobuf::uint32 cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(!domain_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
(*domain_.UnsafeRawStringPointer())->clear();
}
version_ = GOOGLE_LONGLONG(0);
_has_bits_.Clear();
_internal_metadata_.Clear();
}
bool OperatorSetIdProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
::google::protobuf::uint32 tag;
// @@protoc_insertion_point(parse_start:opencv_onnx.OperatorSetIdProto)
for (;;) {
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
tag = p.first;
if (!p.second) goto handle_unusual;
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string domain = 1;
case 1: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_domain()));
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->domain().data(), static_cast<int>(this->domain().length()),
::google::protobuf::internal::WireFormat::PARSE,
"opencv_onnx.OperatorSetIdProto.domain");
} else {
goto handle_unusual;
}
break;
}
// optional int64 version = 2;
case 2: {
if (static_cast< ::google::protobuf::uint8>(tag) ==
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
set_has_version();
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, &version_)));
} else {
goto handle_unusual;
}
break;
}
default: {
handle_unusual:
if (tag == 0) {
goto success;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, _internal_metadata_.mutable_unknown_fields()));
break;
}
}
}
success:
// @@protoc_insertion_point(parse_success:opencv_onnx.OperatorSetIdProto)
return true;
failure:
// @@protoc_insertion_point(parse_failure:opencv_onnx.OperatorSetIdProto)
return false;
#undef DO_
}
void OperatorSetIdProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// @@protoc_insertion_point(serialize_start:opencv_onnx.OperatorSetIdProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string domain = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->domain().data(), static_cast<int>(this->domain().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.OperatorSetIdProto.domain");
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1, this->domain(), output);
}
// optional int64 version = 2;
if (cached_has_bits & 0x00000002u) {
::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->version(), output);
}
if (_internal_metadata_.have_unknown_fields()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
_internal_metadata_.unknown_fields(), output);
}
// @@protoc_insertion_point(serialize_end:opencv_onnx.OperatorSetIdProto)
}
::google::protobuf::uint8* OperatorSetIdProto::InternalSerializeWithCachedSizesToArray(
bool deterministic, ::google::protobuf::uint8* target) const {
(void)deterministic; // Unused
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.OperatorSetIdProto)
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string domain = 1;
if (cached_has_bits & 0x00000001u) {
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
this->domain().data(), static_cast<int>(this->domain().length()),
::google::protobuf::internal::WireFormat::SERIALIZE,
"opencv_onnx.OperatorSetIdProto.domain");
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->domain(), target);
}
// optional int64 version = 2;
if (cached_has_bits & 0x00000002u) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->version(), target);
}
if (_internal_metadata_.have_unknown_fields()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields(), target);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.OperatorSetIdProto)
return target;
}
size_t OperatorSetIdProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.OperatorSetIdProto)
size_t total_size = 0;
if (_internal_metadata_.have_unknown_fields()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
_internal_metadata_.unknown_fields());
}
if (_has_bits_[0 / 32] & 3u) {
// optional string domain = 1;
if (has_domain()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->domain());
}
// optional int64 version = 2;
if (has_version()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int64Size(
this->version());
}
}
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = cached_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void OperatorSetIdProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.OperatorSetIdProto)
GOOGLE_DCHECK_NE(&from, this);
const OperatorSetIdProto* source =
::google::protobuf::internal::DynamicCastToGenerated<const OperatorSetIdProto>(
&from);
if (source == NULL) {
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.OperatorSetIdProto)
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.OperatorSetIdProto)
MergeFrom(*source);
}
}
void OperatorSetIdProto::MergeFrom(const OperatorSetIdProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.OperatorSetIdProto)
GOOGLE_DCHECK_NE(&from, this);
_internal_metadata_.MergeFrom(from._internal_metadata_);
::google::protobuf::uint32 cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 3u) {
if (cached_has_bits & 0x00000001u) {
set_has_domain();
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
}
if (cached_has_bits & 0x00000002u) {
version_ = from.version_;
}
_has_bits_[0] |= cached_has_bits;
}
}
void OperatorSetIdProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.OperatorSetIdProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void OperatorSetIdProto::CopyFrom(const OperatorSetIdProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.OperatorSetIdProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool OperatorSetIdProto::IsInitialized() const {
return true;
}
void OperatorSetIdProto::Swap(OperatorSetIdProto* other) {
if (other == this) return;
InternalSwap(other);
}
void OperatorSetIdProto::InternalSwap(OperatorSetIdProto* other) {
using std::swap;
domain_.Swap(&other->domain_);
swap(version_, other->version_);
swap(_has_bits_[0], other->_has_bits_[0]);
_internal_metadata_.Swap(&other->_internal_metadata_);
swap(_cached_size_, other->_cached_size_);
}
::google::protobuf::Metadata OperatorSetIdProto::GetMetadata() const {
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
}
// @@protoc_insertion_point(namespace_scope)
} // namespace opencv_onnx
// @@protoc_insertion_point(global_scope)