Path: blob/master/modules/dnn/misc/tensorflow/tensor_shape.pb.cc
16358 views
// Generated by the protocol buffer compiler. DO NOT EDIT!1// source: tensor_shape.proto23#include "tensor_shape.pb.h"45#include <algorithm>67#include <google/protobuf/stubs/common.h>8#include <google/protobuf/stubs/port.h>9#include <google/protobuf/stubs/once.h>10#include <google/protobuf/io/coded_stream.h>11#include <google/protobuf/wire_format_lite_inl.h>12#include <google/protobuf/descriptor.h>13#include <google/protobuf/generated_message_reflection.h>14#include <google/protobuf/reflection_ops.h>15#include <google/protobuf/wire_format.h>16// This is a temporary google only hack17#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS18#include "third_party/protobuf/version.h"19#endif20// @@protoc_insertion_point(includes)21namespace opencv_tensorflow {22class TensorShapeProto_DimDefaultTypeInternal {23public:24::google::protobuf::internal::ExplicitlyConstructed<TensorShapeProto_Dim>25_instance;26} _TensorShapeProto_Dim_default_instance_;27class TensorShapeProtoDefaultTypeInternal {28public:29::google::protobuf::internal::ExplicitlyConstructed<TensorShapeProto>30_instance;31} _TensorShapeProto_default_instance_;32} // namespace opencv_tensorflow33namespace protobuf_tensor_5fshape_2eproto {34void InitDefaultsTensorShapeProto_DimImpl() {35GOOGLE_PROTOBUF_VERIFY_VERSION;3637#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS38::google::protobuf::internal::InitProtobufDefaultsForceUnique();39#else40::google::protobuf::internal::InitProtobufDefaults();41#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS42{43void* ptr = &::opencv_tensorflow::_TensorShapeProto_Dim_default_instance_;44new (ptr) ::opencv_tensorflow::TensorShapeProto_Dim();45::google::protobuf::internal::OnShutdownDestroyMessage(ptr);46}47::opencv_tensorflow::TensorShapeProto_Dim::InitAsDefaultInstance();48}4950void InitDefaultsTensorShapeProto_Dim() {51static GOOGLE_PROTOBUF_DECLARE_ONCE(once);52::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorShapeProto_DimImpl);53}5455void InitDefaultsTensorShapeProtoImpl() {56GOOGLE_PROTOBUF_VERIFY_VERSION;5758#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS59::google::protobuf::internal::InitProtobufDefaultsForceUnique();60#else61::google::protobuf::internal::InitProtobufDefaults();62#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS63protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto_Dim();64{65void* ptr = &::opencv_tensorflow::_TensorShapeProto_default_instance_;66new (ptr) ::opencv_tensorflow::TensorShapeProto();67::google::protobuf::internal::OnShutdownDestroyMessage(ptr);68}69::opencv_tensorflow::TensorShapeProto::InitAsDefaultInstance();70}7172void InitDefaultsTensorShapeProto() {73static GOOGLE_PROTOBUF_DECLARE_ONCE(once);74::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorShapeProtoImpl);75}7677::google::protobuf::Metadata file_level_metadata[2];7879const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {80~0u, // no _has_bits_81GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, _internal_metadata_),82~0u, // no _extensions_83~0u, // no _oneof_case_84~0u, // no _weak_field_map_85GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, size_),86GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, name_),87~0u, // no _has_bits_88GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, _internal_metadata_),89~0u, // no _extensions_90~0u, // no _oneof_case_91~0u, // no _weak_field_map_92GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, dim_),93GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, unknown_rank_),94};95static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {96{ 0, -1, sizeof(::opencv_tensorflow::TensorShapeProto_Dim)},97{ 7, -1, sizeof(::opencv_tensorflow::TensorShapeProto)},98};99100static ::google::protobuf::Message const * const file_default_instances[] = {101reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_TensorShapeProto_Dim_default_instance_),102reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_TensorShapeProto_default_instance_),103};104105void protobuf_AssignDescriptors() {106AddDescriptors();107::google::protobuf::MessageFactory* factory = NULL;108AssignDescriptors(109"tensor_shape.proto", schemas, file_default_instances, TableStruct::offsets, factory,110file_level_metadata, NULL, NULL);111}112113void protobuf_AssignDescriptorsOnce() {114static GOOGLE_PROTOBUF_DECLARE_ONCE(once);115::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);116}117118void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;119void protobuf_RegisterTypes(const ::std::string&) {120protobuf_AssignDescriptorsOnce();121::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);122}123124void AddDescriptorsImpl() {125InitDefaults();126static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {127"\n\022tensor_shape.proto\022\021opencv_tensorflow\""128"\201\001\n\020TensorShapeProto\0224\n\003dim\030\002 \003(\0132\'.open"129"cv_tensorflow.TensorShapeProto.Dim\022\024\n\014un"130"known_rank\030\003 \001(\010\032!\n\003Dim\022\014\n\004size\030\001 \001(\003\022\014\n"131"\004name\030\002 \001(\tB2\n\030org.tensorflow.frameworkB"132"\021TensorShapeProtosP\001\370\001\001b\006proto3"133};134::google::protobuf::DescriptorPool::InternalAddGeneratedFile(135descriptor, 231);136::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(137"tensor_shape.proto", &protobuf_RegisterTypes);138}139140void AddDescriptors() {141static GOOGLE_PROTOBUF_DECLARE_ONCE(once);142::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);143}144// Force AddDescriptors() to be called at dynamic initialization time.145struct StaticDescriptorInitializer {146StaticDescriptorInitializer() {147AddDescriptors();148}149} static_descriptor_initializer;150} // namespace protobuf_tensor_5fshape_2eproto151namespace opencv_tensorflow {152153// ===================================================================154155void TensorShapeProto_Dim::InitAsDefaultInstance() {156}157#if !defined(_MSC_VER) || _MSC_VER >= 1900158const int TensorShapeProto_Dim::kSizeFieldNumber;159const int TensorShapeProto_Dim::kNameFieldNumber;160#endif // !defined(_MSC_VER) || _MSC_VER >= 1900161162TensorShapeProto_Dim::TensorShapeProto_Dim()163: ::google::protobuf::Message(), _internal_metadata_(NULL) {164if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {165::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto_Dim();166}167SharedCtor();168// @@protoc_insertion_point(constructor:opencv_tensorflow.TensorShapeProto.Dim)169}170TensorShapeProto_Dim::TensorShapeProto_Dim(::google::protobuf::Arena* arena)171: ::google::protobuf::Message(),172_internal_metadata_(arena) {173::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto_Dim();174SharedCtor();175RegisterArenaDtor(arena);176// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto.Dim)177}178TensorShapeProto_Dim::TensorShapeProto_Dim(const TensorShapeProto_Dim& from)179: ::google::protobuf::Message(),180_internal_metadata_(NULL),181_cached_size_(0) {182_internal_metadata_.MergeFrom(from._internal_metadata_);183name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());184if (from.name().size() > 0) {185name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(),186GetArenaNoVirtual());187}188size_ = from.size_;189// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorShapeProto.Dim)190}191192void TensorShapeProto_Dim::SharedCtor() {193name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());194size_ = GOOGLE_LONGLONG(0);195_cached_size_ = 0;196}197198TensorShapeProto_Dim::~TensorShapeProto_Dim() {199// @@protoc_insertion_point(destructor:opencv_tensorflow.TensorShapeProto.Dim)200SharedDtor();201}202203void TensorShapeProto_Dim::SharedDtor() {204GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);205name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());206}207208void TensorShapeProto_Dim::ArenaDtor(void* object) {209TensorShapeProto_Dim* _this = reinterpret_cast< TensorShapeProto_Dim* >(object);210(void)_this;211}212void TensorShapeProto_Dim::RegisterArenaDtor(::google::protobuf::Arena* arena) {213}214void TensorShapeProto_Dim::SetCachedSize(int size) const {215GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();216_cached_size_ = size;217GOOGLE_SAFE_CONCURRENT_WRITES_END();218}219const ::google::protobuf::Descriptor* TensorShapeProto_Dim::descriptor() {220::protobuf_tensor_5fshape_2eproto::protobuf_AssignDescriptorsOnce();221return ::protobuf_tensor_5fshape_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;222}223224const TensorShapeProto_Dim& TensorShapeProto_Dim::default_instance() {225::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto_Dim();226return *internal_default_instance();227}228229TensorShapeProto_Dim* TensorShapeProto_Dim::New(::google::protobuf::Arena* arena) const {230return ::google::protobuf::Arena::CreateMessage<TensorShapeProto_Dim>(arena);231}232233void TensorShapeProto_Dim::Clear() {234// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto.Dim)235::google::protobuf::uint32 cached_has_bits = 0;236// Prevent compiler warnings about cached_has_bits being unused237(void) cached_has_bits;238239name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());240size_ = GOOGLE_LONGLONG(0);241_internal_metadata_.Clear();242}243244bool TensorShapeProto_Dim::MergePartialFromCodedStream(245::google::protobuf::io::CodedInputStream* input) {246#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure247::google::protobuf::uint32 tag;248// @@protoc_insertion_point(parse_start:opencv_tensorflow.TensorShapeProto.Dim)249for (;;) {250::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);251tag = p.first;252if (!p.second) goto handle_unusual;253switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {254// int64 size = 1;255case 1: {256if (static_cast< ::google::protobuf::uint8>(tag) ==257static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {258259DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<260::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(261input, &size_)));262} else {263goto handle_unusual;264}265break;266}267268// string name = 2;269case 2: {270if (static_cast< ::google::protobuf::uint8>(tag) ==271static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {272DO_(::google::protobuf::internal::WireFormatLite::ReadString(273input, this->mutable_name()));274DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(275this->name().data(), static_cast<int>(this->name().length()),276::google::protobuf::internal::WireFormatLite::PARSE,277"opencv_tensorflow.TensorShapeProto.Dim.name"));278} else {279goto handle_unusual;280}281break;282}283284default: {285handle_unusual:286if (tag == 0) {287goto success;288}289DO_(::google::protobuf::internal::WireFormat::SkipField(290input, tag, _internal_metadata_.mutable_unknown_fields()));291break;292}293}294}295success:296// @@protoc_insertion_point(parse_success:opencv_tensorflow.TensorShapeProto.Dim)297return true;298failure:299// @@protoc_insertion_point(parse_failure:opencv_tensorflow.TensorShapeProto.Dim)300return false;301#undef DO_302}303304void TensorShapeProto_Dim::SerializeWithCachedSizes(305::google::protobuf::io::CodedOutputStream* output) const {306// @@protoc_insertion_point(serialize_start:opencv_tensorflow.TensorShapeProto.Dim)307::google::protobuf::uint32 cached_has_bits = 0;308(void) cached_has_bits;309310// int64 size = 1;311if (this->size() != 0) {312::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->size(), output);313}314315// string name = 2;316if (this->name().size() > 0) {317::google::protobuf::internal::WireFormatLite::VerifyUtf8String(318this->name().data(), static_cast<int>(this->name().length()),319::google::protobuf::internal::WireFormatLite::SERIALIZE,320"opencv_tensorflow.TensorShapeProto.Dim.name");321::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(3222, this->name(), output);323}324325if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {326::google::protobuf::internal::WireFormat::SerializeUnknownFields(327(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);328}329// @@protoc_insertion_point(serialize_end:opencv_tensorflow.TensorShapeProto.Dim)330}331332::google::protobuf::uint8* TensorShapeProto_Dim::InternalSerializeWithCachedSizesToArray(333bool deterministic, ::google::protobuf::uint8* target) const {334(void)deterministic; // Unused335// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorShapeProto.Dim)336::google::protobuf::uint32 cached_has_bits = 0;337(void) cached_has_bits;338339// int64 size = 1;340if (this->size() != 0) {341target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->size(), target);342}343344// string name = 2;345if (this->name().size() > 0) {346::google::protobuf::internal::WireFormatLite::VerifyUtf8String(347this->name().data(), static_cast<int>(this->name().length()),348::google::protobuf::internal::WireFormatLite::SERIALIZE,349"opencv_tensorflow.TensorShapeProto.Dim.name");350target =351::google::protobuf::internal::WireFormatLite::WriteStringToArray(3522, this->name(), target);353}354355if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {356target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(357(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);358}359// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorShapeProto.Dim)360return target;361}362363size_t TensorShapeProto_Dim::ByteSizeLong() const {364// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto.Dim)365size_t total_size = 0;366367if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {368total_size +=369::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(370(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));371}372// string name = 2;373if (this->name().size() > 0) {374total_size += 1 +375::google::protobuf::internal::WireFormatLite::StringSize(376this->name());377}378379// int64 size = 1;380if (this->size() != 0) {381total_size += 1 +382::google::protobuf::internal::WireFormatLite::Int64Size(383this->size());384}385386int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);387GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();388_cached_size_ = cached_size;389GOOGLE_SAFE_CONCURRENT_WRITES_END();390return total_size;391}392393void TensorShapeProto_Dim::MergeFrom(const ::google::protobuf::Message& from) {394// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.TensorShapeProto.Dim)395GOOGLE_DCHECK_NE(&from, this);396const TensorShapeProto_Dim* source =397::google::protobuf::internal::DynamicCastToGenerated<const TensorShapeProto_Dim>(398&from);399if (source == NULL) {400// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.TensorShapeProto.Dim)401::google::protobuf::internal::ReflectionOps::Merge(from, this);402} else {403// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.TensorShapeProto.Dim)404MergeFrom(*source);405}406}407408void TensorShapeProto_Dim::MergeFrom(const TensorShapeProto_Dim& from) {409// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorShapeProto.Dim)410GOOGLE_DCHECK_NE(&from, this);411_internal_metadata_.MergeFrom(from._internal_metadata_);412::google::protobuf::uint32 cached_has_bits = 0;413(void) cached_has_bits;414415if (from.name().size() > 0) {416set_name(from.name());417}418if (from.size() != 0) {419set_size(from.size());420}421}422423void TensorShapeProto_Dim::CopyFrom(const ::google::protobuf::Message& from) {424// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.TensorShapeProto.Dim)425if (&from == this) return;426Clear();427MergeFrom(from);428}429430void TensorShapeProto_Dim::CopyFrom(const TensorShapeProto_Dim& from) {431// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorShapeProto.Dim)432if (&from == this) return;433Clear();434MergeFrom(from);435}436437bool TensorShapeProto_Dim::IsInitialized() const {438return true;439}440441void TensorShapeProto_Dim::Swap(TensorShapeProto_Dim* other) {442if (other == this) return;443if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {444InternalSwap(other);445} else {446TensorShapeProto_Dim* temp = New(GetArenaNoVirtual());447temp->MergeFrom(*other);448other->CopyFrom(*this);449InternalSwap(temp);450if (GetArenaNoVirtual() == NULL) {451delete temp;452}453}454}455void TensorShapeProto_Dim::UnsafeArenaSwap(TensorShapeProto_Dim* other) {456if (other == this) return;457GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());458InternalSwap(other);459}460void TensorShapeProto_Dim::InternalSwap(TensorShapeProto_Dim* other) {461using std::swap;462name_.Swap(&other->name_);463swap(size_, other->size_);464_internal_metadata_.Swap(&other->_internal_metadata_);465swap(_cached_size_, other->_cached_size_);466}467468::google::protobuf::Metadata TensorShapeProto_Dim::GetMetadata() const {469protobuf_tensor_5fshape_2eproto::protobuf_AssignDescriptorsOnce();470return ::protobuf_tensor_5fshape_2eproto::file_level_metadata[kIndexInFileMessages];471}472473474// ===================================================================475476void TensorShapeProto::InitAsDefaultInstance() {477}478#if !defined(_MSC_VER) || _MSC_VER >= 1900479const int TensorShapeProto::kDimFieldNumber;480const int TensorShapeProto::kUnknownRankFieldNumber;481#endif // !defined(_MSC_VER) || _MSC_VER >= 1900482483TensorShapeProto::TensorShapeProto()484: ::google::protobuf::Message(), _internal_metadata_(NULL) {485if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {486::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto();487}488SharedCtor();489// @@protoc_insertion_point(constructor:opencv_tensorflow.TensorShapeProto)490}491TensorShapeProto::TensorShapeProto(::google::protobuf::Arena* arena)492: ::google::protobuf::Message(),493_internal_metadata_(arena),494dim_(arena) {495::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto();496SharedCtor();497RegisterArenaDtor(arena);498// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto)499}500TensorShapeProto::TensorShapeProto(const TensorShapeProto& from)501: ::google::protobuf::Message(),502_internal_metadata_(NULL),503dim_(from.dim_),504_cached_size_(0) {505_internal_metadata_.MergeFrom(from._internal_metadata_);506unknown_rank_ = from.unknown_rank_;507// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorShapeProto)508}509510void TensorShapeProto::SharedCtor() {511unknown_rank_ = false;512_cached_size_ = 0;513}514515TensorShapeProto::~TensorShapeProto() {516// @@protoc_insertion_point(destructor:opencv_tensorflow.TensorShapeProto)517SharedDtor();518}519520void TensorShapeProto::SharedDtor() {521GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);522}523524void TensorShapeProto::ArenaDtor(void* object) {525TensorShapeProto* _this = reinterpret_cast< TensorShapeProto* >(object);526(void)_this;527}528void TensorShapeProto::RegisterArenaDtor(::google::protobuf::Arena* arena) {529}530void TensorShapeProto::SetCachedSize(int size) const {531GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();532_cached_size_ = size;533GOOGLE_SAFE_CONCURRENT_WRITES_END();534}535const ::google::protobuf::Descriptor* TensorShapeProto::descriptor() {536::protobuf_tensor_5fshape_2eproto::protobuf_AssignDescriptorsOnce();537return ::protobuf_tensor_5fshape_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;538}539540const TensorShapeProto& TensorShapeProto::default_instance() {541::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto();542return *internal_default_instance();543}544545TensorShapeProto* TensorShapeProto::New(::google::protobuf::Arena* arena) const {546return ::google::protobuf::Arena::CreateMessage<TensorShapeProto>(arena);547}548549void TensorShapeProto::Clear() {550// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto)551::google::protobuf::uint32 cached_has_bits = 0;552// Prevent compiler warnings about cached_has_bits being unused553(void) cached_has_bits;554555dim_.Clear();556unknown_rank_ = false;557_internal_metadata_.Clear();558}559560bool TensorShapeProto::MergePartialFromCodedStream(561::google::protobuf::io::CodedInputStream* input) {562#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure563::google::protobuf::uint32 tag;564// @@protoc_insertion_point(parse_start:opencv_tensorflow.TensorShapeProto)565for (;;) {566::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);567tag = p.first;568if (!p.second) goto handle_unusual;569switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {570// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;571case 2: {572if (static_cast< ::google::protobuf::uint8>(tag) ==573static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {574DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_dim()));575} else {576goto handle_unusual;577}578break;579}580581// bool unknown_rank = 3;582case 3: {583if (static_cast< ::google::protobuf::uint8>(tag) ==584static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {585586DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<587bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(588input, &unknown_rank_)));589} else {590goto handle_unusual;591}592break;593}594595default: {596handle_unusual:597if (tag == 0) {598goto success;599}600DO_(::google::protobuf::internal::WireFormat::SkipField(601input, tag, _internal_metadata_.mutable_unknown_fields()));602break;603}604}605}606success:607// @@protoc_insertion_point(parse_success:opencv_tensorflow.TensorShapeProto)608return true;609failure:610// @@protoc_insertion_point(parse_failure:opencv_tensorflow.TensorShapeProto)611return false;612#undef DO_613}614615void TensorShapeProto::SerializeWithCachedSizes(616::google::protobuf::io::CodedOutputStream* output) const {617// @@protoc_insertion_point(serialize_start:opencv_tensorflow.TensorShapeProto)618::google::protobuf::uint32 cached_has_bits = 0;619(void) cached_has_bits;620621// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;622for (unsigned int i = 0,623n = static_cast<unsigned int>(this->dim_size()); i < n; i++) {624::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(6252, this->dim(static_cast<int>(i)), output);626}627628// bool unknown_rank = 3;629if (this->unknown_rank() != 0) {630::google::protobuf::internal::WireFormatLite::WriteBool(3, this->unknown_rank(), output);631}632633if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {634::google::protobuf::internal::WireFormat::SerializeUnknownFields(635(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);636}637// @@protoc_insertion_point(serialize_end:opencv_tensorflow.TensorShapeProto)638}639640::google::protobuf::uint8* TensorShapeProto::InternalSerializeWithCachedSizesToArray(641bool deterministic, ::google::protobuf::uint8* target) const {642(void)deterministic; // Unused643// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorShapeProto)644::google::protobuf::uint32 cached_has_bits = 0;645(void) cached_has_bits;646647// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;648for (unsigned int i = 0,649n = static_cast<unsigned int>(this->dim_size()); i < n; i++) {650target = ::google::protobuf::internal::WireFormatLite::651InternalWriteMessageToArray(6522, this->dim(static_cast<int>(i)), deterministic, target);653}654655// bool unknown_rank = 3;656if (this->unknown_rank() != 0) {657target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->unknown_rank(), target);658}659660if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {661target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(662(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);663}664// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorShapeProto)665return target;666}667668size_t TensorShapeProto::ByteSizeLong() const {669// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto)670size_t total_size = 0;671672if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {673total_size +=674::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(675(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));676}677// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;678{679unsigned int count = static_cast<unsigned int>(this->dim_size());680total_size += 1UL * count;681for (unsigned int i = 0; i < count; i++) {682total_size +=683::google::protobuf::internal::WireFormatLite::MessageSize(684this->dim(static_cast<int>(i)));685}686}687688// bool unknown_rank = 3;689if (this->unknown_rank() != 0) {690total_size += 1 + 1;691}692693int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);694GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();695_cached_size_ = cached_size;696GOOGLE_SAFE_CONCURRENT_WRITES_END();697return total_size;698}699700void TensorShapeProto::MergeFrom(const ::google::protobuf::Message& from) {701// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.TensorShapeProto)702GOOGLE_DCHECK_NE(&from, this);703const TensorShapeProto* source =704::google::protobuf::internal::DynamicCastToGenerated<const TensorShapeProto>(705&from);706if (source == NULL) {707// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.TensorShapeProto)708::google::protobuf::internal::ReflectionOps::Merge(from, this);709} else {710// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.TensorShapeProto)711MergeFrom(*source);712}713}714715void TensorShapeProto::MergeFrom(const TensorShapeProto& from) {716// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorShapeProto)717GOOGLE_DCHECK_NE(&from, this);718_internal_metadata_.MergeFrom(from._internal_metadata_);719::google::protobuf::uint32 cached_has_bits = 0;720(void) cached_has_bits;721722dim_.MergeFrom(from.dim_);723if (from.unknown_rank() != 0) {724set_unknown_rank(from.unknown_rank());725}726}727728void TensorShapeProto::CopyFrom(const ::google::protobuf::Message& from) {729// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.TensorShapeProto)730if (&from == this) return;731Clear();732MergeFrom(from);733}734735void TensorShapeProto::CopyFrom(const TensorShapeProto& from) {736// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorShapeProto)737if (&from == this) return;738Clear();739MergeFrom(from);740}741742bool TensorShapeProto::IsInitialized() const {743return true;744}745746void TensorShapeProto::Swap(TensorShapeProto* other) {747if (other == this) return;748if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {749InternalSwap(other);750} else {751TensorShapeProto* temp = New(GetArenaNoVirtual());752temp->MergeFrom(*other);753other->CopyFrom(*this);754InternalSwap(temp);755if (GetArenaNoVirtual() == NULL) {756delete temp;757}758}759}760void TensorShapeProto::UnsafeArenaSwap(TensorShapeProto* other) {761if (other == this) return;762GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());763InternalSwap(other);764}765void TensorShapeProto::InternalSwap(TensorShapeProto* other) {766using std::swap;767dim_.InternalSwap(&other->dim_);768swap(unknown_rank_, other->unknown_rank_);769_internal_metadata_.Swap(&other->_internal_metadata_);770swap(_cached_size_, other->_cached_size_);771}772773::google::protobuf::Metadata TensorShapeProto::GetMetadata() const {774protobuf_tensor_5fshape_2eproto::protobuf_AssignDescriptorsOnce();775return ::protobuf_tensor_5fshape_2eproto::file_level_metadata[kIndexInFileMessages];776}777778779// @@protoc_insertion_point(namespace_scope)780} // namespace opencv_tensorflow781782// @@protoc_insertion_point(global_scope)783784785