Path: blob/master/modules/dnn/misc/tensorflow/graph.pb.cc
16358 views
// Generated by the protocol buffer compiler. DO NOT EDIT!1// source: graph.proto23#include "graph.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 GraphDefDefaultTypeInternal {23public:24::google::protobuf::internal::ExplicitlyConstructed<GraphDef>25_instance;26} _GraphDef_default_instance_;27class NodeDef_AttrEntry_DoNotUseDefaultTypeInternal {28public:29::google::protobuf::internal::ExplicitlyConstructed<NodeDef_AttrEntry_DoNotUse>30_instance;31} _NodeDef_AttrEntry_DoNotUse_default_instance_;32class NodeDefDefaultTypeInternal {33public:34::google::protobuf::internal::ExplicitlyConstructed<NodeDef>35_instance;36} _NodeDef_default_instance_;37} // namespace opencv_tensorflow38namespace protobuf_graph_2eproto {39void InitDefaultsGraphDefImpl() {40GOOGLE_PROTOBUF_VERIFY_VERSION;4142#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS43::google::protobuf::internal::InitProtobufDefaultsForceUnique();44#else45::google::protobuf::internal::InitProtobufDefaults();46#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS47protobuf_graph_2eproto::InitDefaultsNodeDef();48protobuf_versions_2eproto::InitDefaultsVersionDef();49protobuf_function_2eproto::InitDefaultsFunctionDefLibrary();50{51void* ptr = &::opencv_tensorflow::_GraphDef_default_instance_;52new (ptr) ::opencv_tensorflow::GraphDef();53::google::protobuf::internal::OnShutdownDestroyMessage(ptr);54}55::opencv_tensorflow::GraphDef::InitAsDefaultInstance();56}5758void InitDefaultsGraphDef() {59static GOOGLE_PROTOBUF_DECLARE_ONCE(once);60::google::protobuf::GoogleOnceInit(&once, &InitDefaultsGraphDefImpl);61}6263void InitDefaultsNodeDef_AttrEntry_DoNotUseImpl() {64GOOGLE_PROTOBUF_VERIFY_VERSION;6566#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS67::google::protobuf::internal::InitProtobufDefaultsForceUnique();68#else69::google::protobuf::internal::InitProtobufDefaults();70#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS71protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue();72{73void* ptr = &::opencv_tensorflow::_NodeDef_AttrEntry_DoNotUse_default_instance_;74new (ptr) ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse();75}76::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse::InitAsDefaultInstance();77}7879void InitDefaultsNodeDef_AttrEntry_DoNotUse() {80static GOOGLE_PROTOBUF_DECLARE_ONCE(once);81::google::protobuf::GoogleOnceInit(&once, &InitDefaultsNodeDef_AttrEntry_DoNotUseImpl);82}8384void InitDefaultsNodeDefImpl() {85GOOGLE_PROTOBUF_VERIFY_VERSION;8687#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS88::google::protobuf::internal::InitProtobufDefaultsForceUnique();89#else90::google::protobuf::internal::InitProtobufDefaults();91#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS92protobuf_graph_2eproto::InitDefaultsNodeDef_AttrEntry_DoNotUse();93{94void* ptr = &::opencv_tensorflow::_NodeDef_default_instance_;95new (ptr) ::opencv_tensorflow::NodeDef();96::google::protobuf::internal::OnShutdownDestroyMessage(ptr);97}98::opencv_tensorflow::NodeDef::InitAsDefaultInstance();99}100101void InitDefaultsNodeDef() {102static GOOGLE_PROTOBUF_DECLARE_ONCE(once);103::google::protobuf::GoogleOnceInit(&once, &InitDefaultsNodeDefImpl);104}105106::google::protobuf::Metadata file_level_metadata[3];107108const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {109~0u, // no _has_bits_110GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GraphDef, _internal_metadata_),111~0u, // no _extensions_112~0u, // no _oneof_case_113~0u, // no _weak_field_map_114GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GraphDef, node_),115GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GraphDef, versions_),116GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GraphDef, version_),117GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GraphDef, library_),118GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, _has_bits_),119GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, _internal_metadata_),120~0u, // no _extensions_121~0u, // no _oneof_case_122~0u, // no _weak_field_map_123GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, key_),124GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, value_),1250,1261,127~0u, // no _has_bits_128GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, _internal_metadata_),129~0u, // no _extensions_130~0u, // no _oneof_case_131~0u, // no _weak_field_map_132GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, name_),133GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, op_),134GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, input_),135GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, device_),136GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::NodeDef, attr_),137};138static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {139{ 0, -1, sizeof(::opencv_tensorflow::GraphDef)},140{ 9, 16, sizeof(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse)},141{ 18, -1, sizeof(::opencv_tensorflow::NodeDef)},142};143144static ::google::protobuf::Message const * const file_default_instances[] = {145reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_GraphDef_default_instance_),146reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_NodeDef_AttrEntry_DoNotUse_default_instance_),147reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_NodeDef_default_instance_),148};149150void protobuf_AssignDescriptors() {151AddDescriptors();152::google::protobuf::MessageFactory* factory = NULL;153AssignDescriptors(154"graph.proto", schemas, file_default_instances, TableStruct::offsets, factory,155file_level_metadata, NULL, NULL);156}157158void protobuf_AssignDescriptorsOnce() {159static GOOGLE_PROTOBUF_DECLARE_ONCE(once);160::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);161}162163void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;164void protobuf_RegisterTypes(const ::std::string&) {165protobuf_AssignDescriptorsOnce();166::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 3);167}168169void AddDescriptorsImpl() {170InitDefaults();171static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {172"\n\013graph.proto\022\021opencv_tensorflow\032\020attr_v"173"alue.proto\032\016function.proto\032\016versions.pro"174"to\"\262\001\n\010GraphDef\022(\n\004node\030\001 \003(\0132\032.opencv_t"175"ensorflow.NodeDef\022/\n\010versions\030\004 \001(\0132\035.op"176"encv_tensorflow.VersionDef\022\023\n\007version\030\003 "177"\001(\005B\002\030\001\0226\n\007library\030\002 \001(\0132%.opencv_tensor"178"flow.FunctionDefLibrary\"\301\001\n\007NodeDef\022\014\n\004n"179"ame\030\001 \001(\t\022\n\n\002op\030\002 \001(\t\022\r\n\005input\030\003 \003(\t\022\016\n\006"180"device\030\004 \001(\t\0222\n\004attr\030\005 \003(\0132$.opencv_tens"181"orflow.NodeDef.AttrEntry\032I\n\tAttrEntry\022\013\n"182"\003key\030\001 \001(\t\022+\n\005value\030\002 \001(\0132\034.opencv_tenso"183"rflow.AttrValue:\0028\001B,\n\030org.tensorflow.fr"184"ameworkB\013GraphProtosP\001\370\001\001b\006proto3"185};186::google::protobuf::DescriptorPool::InternalAddGeneratedFile(187descriptor, 513);188::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(189"graph.proto", &protobuf_RegisterTypes);190::protobuf_attr_5fvalue_2eproto::AddDescriptors();191::protobuf_function_2eproto::AddDescriptors();192::protobuf_versions_2eproto::AddDescriptors();193}194195void AddDescriptors() {196static GOOGLE_PROTOBUF_DECLARE_ONCE(once);197::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);198}199// Force AddDescriptors() to be called at dynamic initialization time.200struct StaticDescriptorInitializer {201StaticDescriptorInitializer() {202AddDescriptors();203}204} static_descriptor_initializer;205} // namespace protobuf_graph_2eproto206namespace opencv_tensorflow {207208// ===================================================================209210void GraphDef::InitAsDefaultInstance() {211::opencv_tensorflow::_GraphDef_default_instance_._instance.get_mutable()->versions_ = const_cast< ::opencv_tensorflow::VersionDef*>(212::opencv_tensorflow::VersionDef::internal_default_instance());213::opencv_tensorflow::_GraphDef_default_instance_._instance.get_mutable()->library_ = const_cast< ::opencv_tensorflow::FunctionDefLibrary*>(214::opencv_tensorflow::FunctionDefLibrary::internal_default_instance());215}216void GraphDef::_slow_mutable_versions() {217versions_ = ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::VersionDef >(218GetArenaNoVirtual());219}220void GraphDef::unsafe_arena_set_allocated_versions(221::opencv_tensorflow::VersionDef* versions) {222if (GetArenaNoVirtual() == NULL) {223delete versions_;224}225versions_ = versions;226if (versions) {227228} else {229230}231// @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.GraphDef.versions)232}233void GraphDef::clear_versions() {234if (GetArenaNoVirtual() == NULL && versions_ != NULL) {235delete versions_;236}237versions_ = NULL;238}239void GraphDef::_slow_mutable_library() {240library_ = ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::FunctionDefLibrary >(241GetArenaNoVirtual());242}243void GraphDef::unsafe_arena_set_allocated_library(244::opencv_tensorflow::FunctionDefLibrary* library) {245if (GetArenaNoVirtual() == NULL) {246delete library_;247}248library_ = library;249if (library) {250251} else {252253}254// @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.GraphDef.library)255}256void GraphDef::clear_library() {257if (GetArenaNoVirtual() == NULL && library_ != NULL) {258delete library_;259}260library_ = NULL;261}262#if !defined(_MSC_VER) || _MSC_VER >= 1900263const int GraphDef::kNodeFieldNumber;264const int GraphDef::kVersionsFieldNumber;265const int GraphDef::kVersionFieldNumber;266const int GraphDef::kLibraryFieldNumber;267#endif // !defined(_MSC_VER) || _MSC_VER >= 1900268269GraphDef::GraphDef()270: ::google::protobuf::Message(), _internal_metadata_(NULL) {271if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {272::protobuf_graph_2eproto::InitDefaultsGraphDef();273}274SharedCtor();275// @@protoc_insertion_point(constructor:opencv_tensorflow.GraphDef)276}277GraphDef::GraphDef(::google::protobuf::Arena* arena)278: ::google::protobuf::Message(),279_internal_metadata_(arena),280node_(arena) {281::protobuf_graph_2eproto::InitDefaultsGraphDef();282SharedCtor();283RegisterArenaDtor(arena);284// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.GraphDef)285}286GraphDef::GraphDef(const GraphDef& from)287: ::google::protobuf::Message(),288_internal_metadata_(NULL),289node_(from.node_),290_cached_size_(0) {291_internal_metadata_.MergeFrom(from._internal_metadata_);292if (from.has_library()) {293library_ = new ::opencv_tensorflow::FunctionDefLibrary(*from.library_);294} else {295library_ = NULL;296}297if (from.has_versions()) {298versions_ = new ::opencv_tensorflow::VersionDef(*from.versions_);299} else {300versions_ = NULL;301}302version_ = from.version_;303// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.GraphDef)304}305306void GraphDef::SharedCtor() {307::memset(&library_, 0, static_cast<size_t>(308reinterpret_cast<char*>(&version_) -309reinterpret_cast<char*>(&library_)) + sizeof(version_));310_cached_size_ = 0;311}312313GraphDef::~GraphDef() {314// @@protoc_insertion_point(destructor:opencv_tensorflow.GraphDef)315SharedDtor();316}317318void GraphDef::SharedDtor() {319GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);320if (this != internal_default_instance()) delete library_;321if (this != internal_default_instance()) delete versions_;322}323324void GraphDef::ArenaDtor(void* object) {325GraphDef* _this = reinterpret_cast< GraphDef* >(object);326(void)_this;327}328void GraphDef::RegisterArenaDtor(::google::protobuf::Arena* arena) {329}330void GraphDef::SetCachedSize(int size) const {331GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();332_cached_size_ = size;333GOOGLE_SAFE_CONCURRENT_WRITES_END();334}335const ::google::protobuf::Descriptor* GraphDef::descriptor() {336::protobuf_graph_2eproto::protobuf_AssignDescriptorsOnce();337return ::protobuf_graph_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;338}339340const GraphDef& GraphDef::default_instance() {341::protobuf_graph_2eproto::InitDefaultsGraphDef();342return *internal_default_instance();343}344345GraphDef* GraphDef::New(::google::protobuf::Arena* arena) const {346return ::google::protobuf::Arena::CreateMessage<GraphDef>(arena);347}348349void GraphDef::Clear() {350// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.GraphDef)351::google::protobuf::uint32 cached_has_bits = 0;352// Prevent compiler warnings about cached_has_bits being unused353(void) cached_has_bits;354355node_.Clear();356if (GetArenaNoVirtual() == NULL && library_ != NULL) {357delete library_;358}359library_ = NULL;360if (GetArenaNoVirtual() == NULL && versions_ != NULL) {361delete versions_;362}363versions_ = NULL;364version_ = 0;365_internal_metadata_.Clear();366}367368bool GraphDef::MergePartialFromCodedStream(369::google::protobuf::io::CodedInputStream* input) {370#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure371::google::protobuf::uint32 tag;372// @@protoc_insertion_point(parse_start:opencv_tensorflow.GraphDef)373for (;;) {374::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);375tag = p.first;376if (!p.second) goto handle_unusual;377switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {378// repeated .opencv_tensorflow.NodeDef node = 1;379case 1: {380if (static_cast< ::google::protobuf::uint8>(tag) ==381static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {382DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_node()));383} else {384goto handle_unusual;385}386break;387}388389// .opencv_tensorflow.FunctionDefLibrary library = 2;390case 2: {391if (static_cast< ::google::protobuf::uint8>(tag) ==392static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {393DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(394input, mutable_library()));395} else {396goto handle_unusual;397}398break;399}400401// int32 version = 3 [deprecated = true];402case 3: {403if (static_cast< ::google::protobuf::uint8>(tag) ==404static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {405406DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<407::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(408input, &version_)));409} else {410goto handle_unusual;411}412break;413}414415// .opencv_tensorflow.VersionDef versions = 4;416case 4: {417if (static_cast< ::google::protobuf::uint8>(tag) ==418static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {419DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(420input, mutable_versions()));421} else {422goto handle_unusual;423}424break;425}426427default: {428handle_unusual:429if (tag == 0) {430goto success;431}432DO_(::google::protobuf::internal::WireFormat::SkipField(433input, tag, _internal_metadata_.mutable_unknown_fields()));434break;435}436}437}438success:439// @@protoc_insertion_point(parse_success:opencv_tensorflow.GraphDef)440return true;441failure:442// @@protoc_insertion_point(parse_failure:opencv_tensorflow.GraphDef)443return false;444#undef DO_445}446447void GraphDef::SerializeWithCachedSizes(448::google::protobuf::io::CodedOutputStream* output) const {449// @@protoc_insertion_point(serialize_start:opencv_tensorflow.GraphDef)450::google::protobuf::uint32 cached_has_bits = 0;451(void) cached_has_bits;452453// repeated .opencv_tensorflow.NodeDef node = 1;454for (unsigned int i = 0,455n = static_cast<unsigned int>(this->node_size()); i < n; i++) {456::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(4571, this->node(static_cast<int>(i)), output);458}459460// .opencv_tensorflow.FunctionDefLibrary library = 2;461if (this->has_library()) {462::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(4632, *this->library_, output);464}465466// int32 version = 3 [deprecated = true];467if (this->version() != 0) {468::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->version(), output);469}470471// .opencv_tensorflow.VersionDef versions = 4;472if (this->has_versions()) {473::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(4744, *this->versions_, output);475}476477if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {478::google::protobuf::internal::WireFormat::SerializeUnknownFields(479(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);480}481// @@protoc_insertion_point(serialize_end:opencv_tensorflow.GraphDef)482}483484::google::protobuf::uint8* GraphDef::InternalSerializeWithCachedSizesToArray(485bool deterministic, ::google::protobuf::uint8* target) const {486(void)deterministic; // Unused487// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.GraphDef)488::google::protobuf::uint32 cached_has_bits = 0;489(void) cached_has_bits;490491// repeated .opencv_tensorflow.NodeDef node = 1;492for (unsigned int i = 0,493n = static_cast<unsigned int>(this->node_size()); i < n; i++) {494target = ::google::protobuf::internal::WireFormatLite::495InternalWriteMessageToArray(4961, this->node(static_cast<int>(i)), deterministic, target);497}498499// .opencv_tensorflow.FunctionDefLibrary library = 2;500if (this->has_library()) {501target = ::google::protobuf::internal::WireFormatLite::502InternalWriteMessageToArray(5032, *this->library_, deterministic, target);504}505506// int32 version = 3 [deprecated = true];507if (this->version() != 0) {508target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->version(), target);509}510511// .opencv_tensorflow.VersionDef versions = 4;512if (this->has_versions()) {513target = ::google::protobuf::internal::WireFormatLite::514InternalWriteMessageToArray(5154, *this->versions_, deterministic, target);516}517518if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {519target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(520(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);521}522// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.GraphDef)523return target;524}525526size_t GraphDef::ByteSizeLong() const {527// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.GraphDef)528size_t total_size = 0;529530if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {531total_size +=532::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(533(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));534}535// repeated .opencv_tensorflow.NodeDef node = 1;536{537unsigned int count = static_cast<unsigned int>(this->node_size());538total_size += 1UL * count;539for (unsigned int i = 0; i < count; i++) {540total_size +=541::google::protobuf::internal::WireFormatLite::MessageSize(542this->node(static_cast<int>(i)));543}544}545546// .opencv_tensorflow.FunctionDefLibrary library = 2;547if (this->has_library()) {548total_size += 1 +549::google::protobuf::internal::WireFormatLite::MessageSize(550*this->library_);551}552553// .opencv_tensorflow.VersionDef versions = 4;554if (this->has_versions()) {555total_size += 1 +556::google::protobuf::internal::WireFormatLite::MessageSize(557*this->versions_);558}559560// int32 version = 3 [deprecated = true];561if (this->version() != 0) {562total_size += 1 +563::google::protobuf::internal::WireFormatLite::Int32Size(564this->version());565}566567int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);568GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();569_cached_size_ = cached_size;570GOOGLE_SAFE_CONCURRENT_WRITES_END();571return total_size;572}573574void GraphDef::MergeFrom(const ::google::protobuf::Message& from) {575// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.GraphDef)576GOOGLE_DCHECK_NE(&from, this);577const GraphDef* source =578::google::protobuf::internal::DynamicCastToGenerated<const GraphDef>(579&from);580if (source == NULL) {581// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.GraphDef)582::google::protobuf::internal::ReflectionOps::Merge(from, this);583} else {584// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.GraphDef)585MergeFrom(*source);586}587}588589void GraphDef::MergeFrom(const GraphDef& from) {590// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.GraphDef)591GOOGLE_DCHECK_NE(&from, this);592_internal_metadata_.MergeFrom(from._internal_metadata_);593::google::protobuf::uint32 cached_has_bits = 0;594(void) cached_has_bits;595596node_.MergeFrom(from.node_);597if (from.has_library()) {598mutable_library()->::opencv_tensorflow::FunctionDefLibrary::MergeFrom(from.library());599}600if (from.has_versions()) {601mutable_versions()->::opencv_tensorflow::VersionDef::MergeFrom(from.versions());602}603if (from.version() != 0) {604set_version(from.version());605}606}607608void GraphDef::CopyFrom(const ::google::protobuf::Message& from) {609// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.GraphDef)610if (&from == this) return;611Clear();612MergeFrom(from);613}614615void GraphDef::CopyFrom(const GraphDef& from) {616// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.GraphDef)617if (&from == this) return;618Clear();619MergeFrom(from);620}621622bool GraphDef::IsInitialized() const {623return true;624}625626void GraphDef::Swap(GraphDef* other) {627if (other == this) return;628if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {629InternalSwap(other);630} else {631GraphDef* temp = New(GetArenaNoVirtual());632temp->MergeFrom(*other);633other->CopyFrom(*this);634InternalSwap(temp);635if (GetArenaNoVirtual() == NULL) {636delete temp;637}638}639}640void GraphDef::UnsafeArenaSwap(GraphDef* other) {641if (other == this) return;642GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());643InternalSwap(other);644}645void GraphDef::InternalSwap(GraphDef* other) {646using std::swap;647node_.InternalSwap(&other->node_);648swap(library_, other->library_);649swap(versions_, other->versions_);650swap(version_, other->version_);651_internal_metadata_.Swap(&other->_internal_metadata_);652swap(_cached_size_, other->_cached_size_);653}654655::google::protobuf::Metadata GraphDef::GetMetadata() const {656protobuf_graph_2eproto::protobuf_AssignDescriptorsOnce();657return ::protobuf_graph_2eproto::file_level_metadata[kIndexInFileMessages];658}659660661// ===================================================================662663NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse() {}664NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}665void NodeDef_AttrEntry_DoNotUse::MergeFrom(const NodeDef_AttrEntry_DoNotUse& other) {666MergeFromInternal(other);667}668::google::protobuf::Metadata NodeDef_AttrEntry_DoNotUse::GetMetadata() const {669::protobuf_graph_2eproto::protobuf_AssignDescriptorsOnce();670return ::protobuf_graph_2eproto::file_level_metadata[1];671}672void NodeDef_AttrEntry_DoNotUse::MergeFrom(673const ::google::protobuf::Message& other) {674::google::protobuf::Message::MergeFrom(other);675}676677678// ===================================================================679680void NodeDef::InitAsDefaultInstance() {681}682void NodeDef::clear_attr() {683attr_.Clear();684}685#if !defined(_MSC_VER) || _MSC_VER >= 1900686const int NodeDef::kNameFieldNumber;687const int NodeDef::kOpFieldNumber;688const int NodeDef::kInputFieldNumber;689const int NodeDef::kDeviceFieldNumber;690const int NodeDef::kAttrFieldNumber;691#endif // !defined(_MSC_VER) || _MSC_VER >= 1900692693NodeDef::NodeDef()694: ::google::protobuf::Message(), _internal_metadata_(NULL) {695if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {696::protobuf_graph_2eproto::InitDefaultsNodeDef();697}698SharedCtor();699// @@protoc_insertion_point(constructor:opencv_tensorflow.NodeDef)700}701NodeDef::NodeDef(::google::protobuf::Arena* arena)702: ::google::protobuf::Message(),703_internal_metadata_(arena),704input_(arena),705attr_(arena) {706::protobuf_graph_2eproto::InitDefaultsNodeDef();707SharedCtor();708RegisterArenaDtor(arena);709// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.NodeDef)710}711NodeDef::NodeDef(const NodeDef& from)712: ::google::protobuf::Message(),713_internal_metadata_(NULL),714input_(from.input_),715_cached_size_(0) {716_internal_metadata_.MergeFrom(from._internal_metadata_);717attr_.MergeFrom(from.attr_);718name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());719if (from.name().size() > 0) {720name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(),721GetArenaNoVirtual());722}723op_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());724if (from.op().size() > 0) {725op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.op(),726GetArenaNoVirtual());727}728device_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());729if (from.device().size() > 0) {730device_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.device(),731GetArenaNoVirtual());732}733// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.NodeDef)734}735736void NodeDef::SharedCtor() {737name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());738op_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());739device_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());740_cached_size_ = 0;741}742743NodeDef::~NodeDef() {744// @@protoc_insertion_point(destructor:opencv_tensorflow.NodeDef)745SharedDtor();746}747748void NodeDef::SharedDtor() {749GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);750name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());751op_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());752device_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());753}754755void NodeDef::ArenaDtor(void* object) {756NodeDef* _this = reinterpret_cast< NodeDef* >(object);757(void)_this;758}759void NodeDef::RegisterArenaDtor(::google::protobuf::Arena* arena) {760}761void NodeDef::SetCachedSize(int size) const {762GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();763_cached_size_ = size;764GOOGLE_SAFE_CONCURRENT_WRITES_END();765}766const ::google::protobuf::Descriptor* NodeDef::descriptor() {767::protobuf_graph_2eproto::protobuf_AssignDescriptorsOnce();768return ::protobuf_graph_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;769}770771const NodeDef& NodeDef::default_instance() {772::protobuf_graph_2eproto::InitDefaultsNodeDef();773return *internal_default_instance();774}775776NodeDef* NodeDef::New(::google::protobuf::Arena* arena) const {777return ::google::protobuf::Arena::CreateMessage<NodeDef>(arena);778}779780void NodeDef::Clear() {781// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.NodeDef)782::google::protobuf::uint32 cached_has_bits = 0;783// Prevent compiler warnings about cached_has_bits being unused784(void) cached_has_bits;785786input_.Clear();787attr_.Clear();788name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());789op_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());790device_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());791_internal_metadata_.Clear();792}793794bool NodeDef::MergePartialFromCodedStream(795::google::protobuf::io::CodedInputStream* input) {796#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure797::google::protobuf::uint32 tag;798// @@protoc_insertion_point(parse_start:opencv_tensorflow.NodeDef)799for (;;) {800::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);801tag = p.first;802if (!p.second) goto handle_unusual;803switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {804// string name = 1;805case 1: {806if (static_cast< ::google::protobuf::uint8>(tag) ==807static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {808DO_(::google::protobuf::internal::WireFormatLite::ReadString(809input, this->mutable_name()));810DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(811this->name().data(), static_cast<int>(this->name().length()),812::google::protobuf::internal::WireFormatLite::PARSE,813"opencv_tensorflow.NodeDef.name"));814} else {815goto handle_unusual;816}817break;818}819820// string op = 2;821case 2: {822if (static_cast< ::google::protobuf::uint8>(tag) ==823static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {824DO_(::google::protobuf::internal::WireFormatLite::ReadString(825input, this->mutable_op()));826DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(827this->op().data(), static_cast<int>(this->op().length()),828::google::protobuf::internal::WireFormatLite::PARSE,829"opencv_tensorflow.NodeDef.op"));830} else {831goto handle_unusual;832}833break;834}835836// repeated string input = 3;837case 3: {838if (static_cast< ::google::protobuf::uint8>(tag) ==839static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {840DO_(::google::protobuf::internal::WireFormatLite::ReadString(841input, this->add_input()));842DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(843this->input(this->input_size() - 1).data(),844static_cast<int>(this->input(this->input_size() - 1).length()),845::google::protobuf::internal::WireFormatLite::PARSE,846"opencv_tensorflow.NodeDef.input"));847} else {848goto handle_unusual;849}850break;851}852853// string device = 4;854case 4: {855if (static_cast< ::google::protobuf::uint8>(tag) ==856static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {857DO_(::google::protobuf::internal::WireFormatLite::ReadString(858input, this->mutable_device()));859DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(860this->device().data(), static_cast<int>(this->device().length()),861::google::protobuf::internal::WireFormatLite::PARSE,862"opencv_tensorflow.NodeDef.device"));863} else {864goto handle_unusual;865}866break;867}868869// map<string, .opencv_tensorflow.AttrValue> attr = 5;870case 5: {871if (static_cast< ::google::protobuf::uint8>(tag) ==872static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {873NodeDef_AttrEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<874NodeDef_AttrEntry_DoNotUse,875::std::string, ::opencv_tensorflow::AttrValue,876::google::protobuf::internal::WireFormatLite::TYPE_STRING,877::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,8780 >,879::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue > > parser(&attr_);880DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(881input, &parser));882DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(883parser.key().data(), static_cast<int>(parser.key().length()),884::google::protobuf::internal::WireFormatLite::PARSE,885"opencv_tensorflow.NodeDef.AttrEntry.key"));886} else {887goto handle_unusual;888}889break;890}891892default: {893handle_unusual:894if (tag == 0) {895goto success;896}897DO_(::google::protobuf::internal::WireFormat::SkipField(898input, tag, _internal_metadata_.mutable_unknown_fields()));899break;900}901}902}903success:904// @@protoc_insertion_point(parse_success:opencv_tensorflow.NodeDef)905return true;906failure:907// @@protoc_insertion_point(parse_failure:opencv_tensorflow.NodeDef)908return false;909#undef DO_910}911912void NodeDef::SerializeWithCachedSizes(913::google::protobuf::io::CodedOutputStream* output) const {914// @@protoc_insertion_point(serialize_start:opencv_tensorflow.NodeDef)915::google::protobuf::uint32 cached_has_bits = 0;916(void) cached_has_bits;917918// string name = 1;919if (this->name().size() > 0) {920::google::protobuf::internal::WireFormatLite::VerifyUtf8String(921this->name().data(), static_cast<int>(this->name().length()),922::google::protobuf::internal::WireFormatLite::SERIALIZE,923"opencv_tensorflow.NodeDef.name");924::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(9251, this->name(), output);926}927928// string op = 2;929if (this->op().size() > 0) {930::google::protobuf::internal::WireFormatLite::VerifyUtf8String(931this->op().data(), static_cast<int>(this->op().length()),932::google::protobuf::internal::WireFormatLite::SERIALIZE,933"opencv_tensorflow.NodeDef.op");934::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(9352, this->op(), output);936}937938// repeated string input = 3;939for (int i = 0, n = this->input_size(); i < n; i++) {940::google::protobuf::internal::WireFormatLite::VerifyUtf8String(941this->input(i).data(), static_cast<int>(this->input(i).length()),942::google::protobuf::internal::WireFormatLite::SERIALIZE,943"opencv_tensorflow.NodeDef.input");944::google::protobuf::internal::WireFormatLite::WriteString(9453, this->input(i), output);946}947948// string device = 4;949if (this->device().size() > 0) {950::google::protobuf::internal::WireFormatLite::VerifyUtf8String(951this->device().data(), static_cast<int>(this->device().length()),952::google::protobuf::internal::WireFormatLite::SERIALIZE,953"opencv_tensorflow.NodeDef.device");954::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(9554, this->device(), output);956}957958// map<string, .opencv_tensorflow.AttrValue> attr = 5;959if (!this->attr().empty()) {960typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_pointer961ConstPtr;962typedef ConstPtr SortItem;963typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;964struct Utf8Check {965static void Check(ConstPtr p) {966::google::protobuf::internal::WireFormatLite::VerifyUtf8String(967p->first.data(), static_cast<int>(p->first.length()),968::google::protobuf::internal::WireFormatLite::SERIALIZE,969"opencv_tensorflow.NodeDef.AttrEntry.key");970}971};972973if (output->IsSerializationDeterministic() &&974this->attr().size() > 1) {975::google::protobuf::scoped_array<SortItem> items(976new SortItem[this->attr().size()]);977typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::size_type size_type;978size_type n = 0;979for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator980it = this->attr().begin();981it != this->attr().end(); ++it, ++n) {982items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);983}984::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());985::google::protobuf::scoped_ptr<NodeDef_AttrEntry_DoNotUse> entry;986for (size_type i = 0; i < n; i++) {987entry.reset(attr_.NewEntryWrapper(988items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));989::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(9905, *entry, output);991if (entry->GetArena() != NULL) {992entry.release();993}994Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);995}996} else {997::google::protobuf::scoped_ptr<NodeDef_AttrEntry_DoNotUse> entry;998for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator999it = this->attr().begin();1000it != this->attr().end(); ++it) {1001entry.reset(attr_.NewEntryWrapper(1002it->first, it->second));1003::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(10045, *entry, output);1005if (entry->GetArena() != NULL) {1006entry.release();1007}1008Utf8Check::Check(&*it);1009}1010}1011}10121013if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {1014::google::protobuf::internal::WireFormat::SerializeUnknownFields(1015(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);1016}1017// @@protoc_insertion_point(serialize_end:opencv_tensorflow.NodeDef)1018}10191020::google::protobuf::uint8* NodeDef::InternalSerializeWithCachedSizesToArray(1021bool deterministic, ::google::protobuf::uint8* target) const {1022(void)deterministic; // Unused1023// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.NodeDef)1024::google::protobuf::uint32 cached_has_bits = 0;1025(void) cached_has_bits;10261027// string name = 1;1028if (this->name().size() > 0) {1029::google::protobuf::internal::WireFormatLite::VerifyUtf8String(1030this->name().data(), static_cast<int>(this->name().length()),1031::google::protobuf::internal::WireFormatLite::SERIALIZE,1032"opencv_tensorflow.NodeDef.name");1033target =1034::google::protobuf::internal::WireFormatLite::WriteStringToArray(10351, this->name(), target);1036}10371038// string op = 2;1039if (this->op().size() > 0) {1040::google::protobuf::internal::WireFormatLite::VerifyUtf8String(1041this->op().data(), static_cast<int>(this->op().length()),1042::google::protobuf::internal::WireFormatLite::SERIALIZE,1043"opencv_tensorflow.NodeDef.op");1044target =1045::google::protobuf::internal::WireFormatLite::WriteStringToArray(10462, this->op(), target);1047}10481049// repeated string input = 3;1050for (int i = 0, n = this->input_size(); i < n; i++) {1051::google::protobuf::internal::WireFormatLite::VerifyUtf8String(1052this->input(i).data(), static_cast<int>(this->input(i).length()),1053::google::protobuf::internal::WireFormatLite::SERIALIZE,1054"opencv_tensorflow.NodeDef.input");1055target = ::google::protobuf::internal::WireFormatLite::1056WriteStringToArray(3, this->input(i), target);1057}10581059// string device = 4;1060if (this->device().size() > 0) {1061::google::protobuf::internal::WireFormatLite::VerifyUtf8String(1062this->device().data(), static_cast<int>(this->device().length()),1063::google::protobuf::internal::WireFormatLite::SERIALIZE,1064"opencv_tensorflow.NodeDef.device");1065target =1066::google::protobuf::internal::WireFormatLite::WriteStringToArray(10674, this->device(), target);1068}10691070// map<string, .opencv_tensorflow.AttrValue> attr = 5;1071if (!this->attr().empty()) {1072typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_pointer1073ConstPtr;1074typedef ConstPtr SortItem;1075typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;1076struct Utf8Check {1077static void Check(ConstPtr p) {1078::google::protobuf::internal::WireFormatLite::VerifyUtf8String(1079p->first.data(), static_cast<int>(p->first.length()),1080::google::protobuf::internal::WireFormatLite::SERIALIZE,1081"opencv_tensorflow.NodeDef.AttrEntry.key");1082}1083};10841085if (deterministic &&1086this->attr().size() > 1) {1087::google::protobuf::scoped_array<SortItem> items(1088new SortItem[this->attr().size()]);1089typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::size_type size_type;1090size_type n = 0;1091for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator1092it = this->attr().begin();1093it != this->attr().end(); ++it, ++n) {1094items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);1095}1096::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());1097::google::protobuf::scoped_ptr<NodeDef_AttrEntry_DoNotUse> entry;1098for (size_type i = 0; i < n; i++) {1099entry.reset(attr_.NewEntryWrapper(1100items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));1101target = ::google::protobuf::internal::WireFormatLite::1102InternalWriteMessageNoVirtualToArray(11035, *entry, deterministic, target);1104;1105if (entry->GetArena() != NULL) {1106entry.release();1107}1108Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);1109}1110} else {1111::google::protobuf::scoped_ptr<NodeDef_AttrEntry_DoNotUse> entry;1112for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator1113it = this->attr().begin();1114it != this->attr().end(); ++it) {1115entry.reset(attr_.NewEntryWrapper(1116it->first, it->second));1117target = ::google::protobuf::internal::WireFormatLite::1118InternalWriteMessageNoVirtualToArray(11195, *entry, deterministic, target);1120;1121if (entry->GetArena() != NULL) {1122entry.release();1123}1124Utf8Check::Check(&*it);1125}1126}1127}11281129if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {1130target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(1131(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);1132}1133// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.NodeDef)1134return target;1135}11361137size_t NodeDef::ByteSizeLong() const {1138// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.NodeDef)1139size_t total_size = 0;11401141if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {1142total_size +=1143::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(1144(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));1145}1146// repeated string input = 3;1147total_size += 1 *1148::google::protobuf::internal::FromIntSize(this->input_size());1149for (int i = 0, n = this->input_size(); i < n; i++) {1150total_size += ::google::protobuf::internal::WireFormatLite::StringSize(1151this->input(i));1152}11531154// map<string, .opencv_tensorflow.AttrValue> attr = 5;1155total_size += 1 *1156::google::protobuf::internal::FromIntSize(this->attr_size());1157{1158::google::protobuf::scoped_ptr<NodeDef_AttrEntry_DoNotUse> entry;1159for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator1160it = this->attr().begin();1161it != this->attr().end(); ++it) {1162if (entry.get() != NULL && entry->GetArena() != NULL) {1163entry.release();1164}1165entry.reset(attr_.NewEntryWrapper(it->first, it->second));1166total_size += ::google::protobuf::internal::WireFormatLite::1167MessageSizeNoVirtual(*entry);1168}1169if (entry.get() != NULL && entry->GetArena() != NULL) {1170entry.release();1171}1172}11731174// string name = 1;1175if (this->name().size() > 0) {1176total_size += 1 +1177::google::protobuf::internal::WireFormatLite::StringSize(1178this->name());1179}11801181// string op = 2;1182if (this->op().size() > 0) {1183total_size += 1 +1184::google::protobuf::internal::WireFormatLite::StringSize(1185this->op());1186}11871188// string device = 4;1189if (this->device().size() > 0) {1190total_size += 1 +1191::google::protobuf::internal::WireFormatLite::StringSize(1192this->device());1193}11941195int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);1196GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();1197_cached_size_ = cached_size;1198GOOGLE_SAFE_CONCURRENT_WRITES_END();1199return total_size;1200}12011202void NodeDef::MergeFrom(const ::google::protobuf::Message& from) {1203// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.NodeDef)1204GOOGLE_DCHECK_NE(&from, this);1205const NodeDef* source =1206::google::protobuf::internal::DynamicCastToGenerated<const NodeDef>(1207&from);1208if (source == NULL) {1209// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.NodeDef)1210::google::protobuf::internal::ReflectionOps::Merge(from, this);1211} else {1212// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.NodeDef)1213MergeFrom(*source);1214}1215}12161217void NodeDef::MergeFrom(const NodeDef& from) {1218// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.NodeDef)1219GOOGLE_DCHECK_NE(&from, this);1220_internal_metadata_.MergeFrom(from._internal_metadata_);1221::google::protobuf::uint32 cached_has_bits = 0;1222(void) cached_has_bits;12231224input_.MergeFrom(from.input_);1225attr_.MergeFrom(from.attr_);1226if (from.name().size() > 0) {1227set_name(from.name());1228}1229if (from.op().size() > 0) {1230set_op(from.op());1231}1232if (from.device().size() > 0) {1233set_device(from.device());1234}1235}12361237void NodeDef::CopyFrom(const ::google::protobuf::Message& from) {1238// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.NodeDef)1239if (&from == this) return;1240Clear();1241MergeFrom(from);1242}12431244void NodeDef::CopyFrom(const NodeDef& from) {1245// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.NodeDef)1246if (&from == this) return;1247Clear();1248MergeFrom(from);1249}12501251bool NodeDef::IsInitialized() const {1252return true;1253}12541255void NodeDef::Swap(NodeDef* other) {1256if (other == this) return;1257if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {1258InternalSwap(other);1259} else {1260NodeDef* temp = New(GetArenaNoVirtual());1261temp->MergeFrom(*other);1262other->CopyFrom(*this);1263InternalSwap(temp);1264if (GetArenaNoVirtual() == NULL) {1265delete temp;1266}1267}1268}1269void NodeDef::UnsafeArenaSwap(NodeDef* other) {1270if (other == this) return;1271GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());1272InternalSwap(other);1273}1274void NodeDef::InternalSwap(NodeDef* other) {1275using std::swap;1276input_.InternalSwap(&other->input_);1277attr_.Swap(&other->attr_);1278name_.Swap(&other->name_);1279op_.Swap(&other->op_);1280device_.Swap(&other->device_);1281_internal_metadata_.Swap(&other->_internal_metadata_);1282swap(_cached_size_, other->_cached_size_);1283}12841285::google::protobuf::Metadata NodeDef::GetMetadata() const {1286protobuf_graph_2eproto::protobuf_AssignDescriptorsOnce();1287return ::protobuf_graph_2eproto::file_level_metadata[kIndexInFileMessages];1288}128912901291// @@protoc_insertion_point(namespace_scope)1292} // namespace opencv_tensorflow12931294// @@protoc_insertion_point(global_scope)129512961297