graph.pb.cc 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: graph.proto
  3. #include "graph.pb.h"
  4. #include <algorithm>
  5. #include <google/protobuf/io/coded_stream.h>
  6. #include <google/protobuf/extension_set.h>
  7. #include <google/protobuf/wire_format_lite.h>
  8. #include <google/protobuf/descriptor.h>
  9. #include <google/protobuf/generated_message_reflection.h>
  10. #include <google/protobuf/reflection_ops.h>
  11. #include <google/protobuf/wire_format.h>
  12. // @@protoc_insertion_point(includes)
  13. #include <google/protobuf/port_def.inc>
  14. PROTOBUF_PRAGMA_INIT_SEG
  15. namespace opencv_tensorflow {
  16. constexpr GraphDef::GraphDef(
  17. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  18. : node_()
  19. , library_(nullptr)
  20. , versions_(nullptr)
  21. , version_(0){}
  22. struct GraphDefDefaultTypeInternal {
  23. constexpr GraphDefDefaultTypeInternal()
  24. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  25. ~GraphDefDefaultTypeInternal() {}
  26. union {
  27. GraphDef _instance;
  28. };
  29. };
  30. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GraphDefDefaultTypeInternal _GraphDef_default_instance_;
  31. constexpr NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse(
  32. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
  33. struct NodeDef_AttrEntry_DoNotUseDefaultTypeInternal {
  34. constexpr NodeDef_AttrEntry_DoNotUseDefaultTypeInternal()
  35. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  36. ~NodeDef_AttrEntry_DoNotUseDefaultTypeInternal() {}
  37. union {
  38. NodeDef_AttrEntry_DoNotUse _instance;
  39. };
  40. };
  41. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeDef_AttrEntry_DoNotUseDefaultTypeInternal _NodeDef_AttrEntry_DoNotUse_default_instance_;
  42. constexpr NodeDef::NodeDef(
  43. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  44. : input_()
  45. , attr_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
  46. , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  47. , op_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  48. , device_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
  49. struct NodeDefDefaultTypeInternal {
  50. constexpr NodeDefDefaultTypeInternal()
  51. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  52. ~NodeDefDefaultTypeInternal() {}
  53. union {
  54. NodeDef _instance;
  55. };
  56. };
  57. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeDefDefaultTypeInternal _NodeDef_default_instance_;
  58. } // namespace opencv_tensorflow
  59. static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_graph_2eproto[3];
  60. static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_graph_2eproto = nullptr;
  61. static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_graph_2eproto = nullptr;
  62. const uint32_t TableStruct_graph_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  63. ~0u, // no _has_bits_
  64. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, _internal_metadata_),
  65. ~0u, // no _extensions_
  66. ~0u, // no _oneof_case_
  67. ~0u, // no _weak_field_map_
  68. ~0u, // no _inlined_string_donated_
  69. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, node_),
  70. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, versions_),
  71. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, version_),
  72. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, library_),
  73. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, _has_bits_),
  74. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, _internal_metadata_),
  75. ~0u, // no _extensions_
  76. ~0u, // no _oneof_case_
  77. ~0u, // no _weak_field_map_
  78. ~0u, // no _inlined_string_donated_
  79. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, key_),
  80. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, value_),
  81. 0,
  82. 1,
  83. ~0u, // no _has_bits_
  84. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, _internal_metadata_),
  85. ~0u, // no _extensions_
  86. ~0u, // no _oneof_case_
  87. ~0u, // no _weak_field_map_
  88. ~0u, // no _inlined_string_donated_
  89. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, name_),
  90. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, op_),
  91. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, input_),
  92. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, device_),
  93. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, attr_),
  94. };
  95. static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  96. { 0, -1, -1, sizeof(::opencv_tensorflow::GraphDef)},
  97. { 10, 18, -1, sizeof(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse)},
  98. { 20, -1, -1, sizeof(::opencv_tensorflow::NodeDef)},
  99. };
  100. static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  101. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_GraphDef_default_instance_),
  102. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_NodeDef_AttrEntry_DoNotUse_default_instance_),
  103. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_NodeDef_default_instance_),
  104. };
  105. const char descriptor_table_protodef_graph_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  106. "\n\013graph.proto\022\021opencv_tensorflow\032\020attr_v"
  107. "alue.proto\032\016function.proto\032\016versions.pro"
  108. "to\"\262\001\n\010GraphDef\022(\n\004node\030\001 \003(\0132\032.opencv_t"
  109. "ensorflow.NodeDef\022/\n\010versions\030\004 \001(\0132\035.op"
  110. "encv_tensorflow.VersionDef\022\023\n\007version\030\003 "
  111. "\001(\005B\002\030\001\0226\n\007library\030\002 \001(\0132%.opencv_tensor"
  112. "flow.FunctionDefLibrary\"\301\001\n\007NodeDef\022\014\n\004n"
  113. "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"
  114. "device\030\004 \001(\t\0222\n\004attr\030\005 \003(\0132$.opencv_tens"
  115. "orflow.NodeDef.AttrEntry\032I\n\tAttrEntry\022\013\n"
  116. "\003key\030\001 \001(\t\022+\n\005value\030\002 \001(\0132\034.opencv_tenso"
  117. "rflow.AttrValue:\0028\001B,\n\030org.tensorflow.fr"
  118. "ameworkB\013GraphProtosP\001\370\001\001b\006proto3"
  119. ;
  120. static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_graph_2eproto_deps[3] = {
  121. &::descriptor_table_attr_5fvalue_2eproto,
  122. &::descriptor_table_function_2eproto,
  123. &::descriptor_table_versions_2eproto,
  124. };
  125. static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_graph_2eproto_once;
  126. const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_graph_2eproto = {
  127. false, false, 513, descriptor_table_protodef_graph_2eproto, "graph.proto",
  128. &descriptor_table_graph_2eproto_once, descriptor_table_graph_2eproto_deps, 3, 3,
  129. schemas, file_default_instances, TableStruct_graph_2eproto::offsets,
  130. file_level_metadata_graph_2eproto, file_level_enum_descriptors_graph_2eproto, file_level_service_descriptors_graph_2eproto,
  131. };
  132. PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_graph_2eproto_getter() {
  133. return &descriptor_table_graph_2eproto;
  134. }
  135. // Force running AddDescriptors() at dynamic initialization time.
  136. PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_graph_2eproto(&descriptor_table_graph_2eproto);
  137. namespace opencv_tensorflow {
  138. // ===================================================================
  139. class GraphDef::_Internal {
  140. public:
  141. static const ::opencv_tensorflow::VersionDef& versions(const GraphDef* msg);
  142. static const ::opencv_tensorflow::FunctionDefLibrary& library(const GraphDef* msg);
  143. };
  144. const ::opencv_tensorflow::VersionDef&
  145. GraphDef::_Internal::versions(const GraphDef* msg) {
  146. return *msg->versions_;
  147. }
  148. const ::opencv_tensorflow::FunctionDefLibrary&
  149. GraphDef::_Internal::library(const GraphDef* msg) {
  150. return *msg->library_;
  151. }
  152. void GraphDef::clear_versions() {
  153. if (GetArenaForAllocation() == nullptr && versions_ != nullptr) {
  154. delete versions_;
  155. }
  156. versions_ = nullptr;
  157. }
  158. void GraphDef::clear_library() {
  159. if (GetArenaForAllocation() == nullptr && library_ != nullptr) {
  160. delete library_;
  161. }
  162. library_ = nullptr;
  163. }
  164. GraphDef::GraphDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  165. bool is_message_owned)
  166. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  167. node_(arena) {
  168. SharedCtor();
  169. if (!is_message_owned) {
  170. RegisterArenaDtor(arena);
  171. }
  172. // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.GraphDef)
  173. }
  174. GraphDef::GraphDef(const GraphDef& from)
  175. : ::PROTOBUF_NAMESPACE_ID::Message(),
  176. node_(from.node_) {
  177. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  178. if (from._internal_has_library()) {
  179. library_ = new ::opencv_tensorflow::FunctionDefLibrary(*from.library_);
  180. } else {
  181. library_ = nullptr;
  182. }
  183. if (from._internal_has_versions()) {
  184. versions_ = new ::opencv_tensorflow::VersionDef(*from.versions_);
  185. } else {
  186. versions_ = nullptr;
  187. }
  188. version_ = from.version_;
  189. // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.GraphDef)
  190. }
  191. inline void GraphDef::SharedCtor() {
  192. ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
  193. reinterpret_cast<char*>(&library_) - reinterpret_cast<char*>(this)),
  194. 0, static_cast<size_t>(reinterpret_cast<char*>(&version_) -
  195. reinterpret_cast<char*>(&library_)) + sizeof(version_));
  196. }
  197. GraphDef::~GraphDef() {
  198. // @@protoc_insertion_point(destructor:opencv_tensorflow.GraphDef)
  199. if (GetArenaForAllocation() != nullptr) return;
  200. SharedDtor();
  201. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  202. }
  203. inline void GraphDef::SharedDtor() {
  204. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  205. if (this != internal_default_instance()) delete library_;
  206. if (this != internal_default_instance()) delete versions_;
  207. }
  208. void GraphDef::ArenaDtor(void* object) {
  209. GraphDef* _this = reinterpret_cast< GraphDef* >(object);
  210. (void)_this;
  211. }
  212. void GraphDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  213. }
  214. void GraphDef::SetCachedSize(int size) const {
  215. _cached_size_.Set(size);
  216. }
  217. void GraphDef::Clear() {
  218. // @@protoc_insertion_point(message_clear_start:opencv_tensorflow.GraphDef)
  219. uint32_t cached_has_bits = 0;
  220. // Prevent compiler warnings about cached_has_bits being unused
  221. (void) cached_has_bits;
  222. node_.Clear();
  223. if (GetArenaForAllocation() == nullptr && library_ != nullptr) {
  224. delete library_;
  225. }
  226. library_ = nullptr;
  227. if (GetArenaForAllocation() == nullptr && versions_ != nullptr) {
  228. delete versions_;
  229. }
  230. versions_ = nullptr;
  231. version_ = 0;
  232. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  233. }
  234. const char* GraphDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  235. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  236. while (!ctx->Done(&ptr)) {
  237. uint32_t tag;
  238. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  239. switch (tag >> 3) {
  240. // repeated .opencv_tensorflow.NodeDef node = 1;
  241. case 1:
  242. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  243. ptr -= 1;
  244. do {
  245. ptr += 1;
  246. ptr = ctx->ParseMessage(_internal_add_node(), ptr);
  247. CHK_(ptr);
  248. if (!ctx->DataAvailable(ptr)) break;
  249. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
  250. } else
  251. goto handle_unusual;
  252. continue;
  253. // .opencv_tensorflow.FunctionDefLibrary library = 2;
  254. case 2:
  255. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  256. ptr = ctx->ParseMessage(_internal_mutable_library(), ptr);
  257. CHK_(ptr);
  258. } else
  259. goto handle_unusual;
  260. continue;
  261. // int32 version = 3 [deprecated = true];
  262. case 3:
  263. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
  264. version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
  265. CHK_(ptr);
  266. } else
  267. goto handle_unusual;
  268. continue;
  269. // .opencv_tensorflow.VersionDef versions = 4;
  270. case 4:
  271. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
  272. ptr = ctx->ParseMessage(_internal_mutable_versions(), ptr);
  273. CHK_(ptr);
  274. } else
  275. goto handle_unusual;
  276. continue;
  277. default:
  278. goto handle_unusual;
  279. } // switch
  280. handle_unusual:
  281. if ((tag == 0) || ((tag & 7) == 4)) {
  282. CHK_(ptr);
  283. ctx->SetLastTag(tag);
  284. goto message_done;
  285. }
  286. ptr = UnknownFieldParse(
  287. tag,
  288. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  289. ptr, ctx);
  290. CHK_(ptr != nullptr);
  291. } // while
  292. message_done:
  293. return ptr;
  294. failure:
  295. ptr = nullptr;
  296. goto message_done;
  297. #undef CHK_
  298. }
  299. uint8_t* GraphDef::_InternalSerialize(
  300. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  301. // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.GraphDef)
  302. uint32_t cached_has_bits = 0;
  303. (void) cached_has_bits;
  304. // repeated .opencv_tensorflow.NodeDef node = 1;
  305. for (unsigned int i = 0,
  306. n = static_cast<unsigned int>(this->_internal_node_size()); i < n; i++) {
  307. target = stream->EnsureSpace(target);
  308. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  309. InternalWriteMessage(1, this->_internal_node(i), target, stream);
  310. }
  311. // .opencv_tensorflow.FunctionDefLibrary library = 2;
  312. if (this->_internal_has_library()) {
  313. target = stream->EnsureSpace(target);
  314. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  315. InternalWriteMessage(
  316. 2, _Internal::library(this), target, stream);
  317. }
  318. // int32 version = 3 [deprecated = true];
  319. if (this->_internal_version() != 0) {
  320. target = stream->EnsureSpace(target);
  321. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_version(), target);
  322. }
  323. // .opencv_tensorflow.VersionDef versions = 4;
  324. if (this->_internal_has_versions()) {
  325. target = stream->EnsureSpace(target);
  326. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  327. InternalWriteMessage(
  328. 4, _Internal::versions(this), target, stream);
  329. }
  330. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  331. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  332. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  333. }
  334. // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.GraphDef)
  335. return target;
  336. }
  337. size_t GraphDef::ByteSizeLong() const {
  338. // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.GraphDef)
  339. size_t total_size = 0;
  340. uint32_t cached_has_bits = 0;
  341. // Prevent compiler warnings about cached_has_bits being unused
  342. (void) cached_has_bits;
  343. // repeated .opencv_tensorflow.NodeDef node = 1;
  344. total_size += 1UL * this->_internal_node_size();
  345. for (const auto& msg : this->node_) {
  346. total_size +=
  347. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  348. }
  349. // .opencv_tensorflow.FunctionDefLibrary library = 2;
  350. if (this->_internal_has_library()) {
  351. total_size += 1 +
  352. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  353. *library_);
  354. }
  355. // .opencv_tensorflow.VersionDef versions = 4;
  356. if (this->_internal_has_versions()) {
  357. total_size += 1 +
  358. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  359. *versions_);
  360. }
  361. // int32 version = 3 [deprecated = true];
  362. if (this->_internal_version() != 0) {
  363. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_version());
  364. }
  365. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  366. }
  367. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GraphDef::_class_data_ = {
  368. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  369. GraphDef::MergeImpl
  370. };
  371. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GraphDef::GetClassData() const { return &_class_data_; }
  372. void GraphDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  373. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  374. static_cast<GraphDef *>(to)->MergeFrom(
  375. static_cast<const GraphDef &>(from));
  376. }
  377. void GraphDef::MergeFrom(const GraphDef& from) {
  378. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.GraphDef)
  379. GOOGLE_DCHECK_NE(&from, this);
  380. uint32_t cached_has_bits = 0;
  381. (void) cached_has_bits;
  382. node_.MergeFrom(from.node_);
  383. if (from._internal_has_library()) {
  384. _internal_mutable_library()->::opencv_tensorflow::FunctionDefLibrary::MergeFrom(from._internal_library());
  385. }
  386. if (from._internal_has_versions()) {
  387. _internal_mutable_versions()->::opencv_tensorflow::VersionDef::MergeFrom(from._internal_versions());
  388. }
  389. if (from._internal_version() != 0) {
  390. _internal_set_version(from._internal_version());
  391. }
  392. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  393. }
  394. void GraphDef::CopyFrom(const GraphDef& from) {
  395. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.GraphDef)
  396. if (&from == this) return;
  397. Clear();
  398. MergeFrom(from);
  399. }
  400. bool GraphDef::IsInitialized() const {
  401. return true;
  402. }
  403. void GraphDef::InternalSwap(GraphDef* other) {
  404. using std::swap;
  405. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  406. node_.InternalSwap(&other->node_);
  407. ::PROTOBUF_NAMESPACE_ID::internal::memswap<
  408. PROTOBUF_FIELD_OFFSET(GraphDef, version_)
  409. + sizeof(GraphDef::version_)
  410. - PROTOBUF_FIELD_OFFSET(GraphDef, library_)>(
  411. reinterpret_cast<char*>(&library_),
  412. reinterpret_cast<char*>(&other->library_));
  413. }
  414. ::PROTOBUF_NAMESPACE_ID::Metadata GraphDef::GetMetadata() const {
  415. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  416. &descriptor_table_graph_2eproto_getter, &descriptor_table_graph_2eproto_once,
  417. file_level_metadata_graph_2eproto[0]);
  418. }
  419. // ===================================================================
  420. NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse() {}
  421. NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  422. : SuperType(arena) {}
  423. void NodeDef_AttrEntry_DoNotUse::MergeFrom(const NodeDef_AttrEntry_DoNotUse& other) {
  424. MergeFromInternal(other);
  425. }
  426. ::PROTOBUF_NAMESPACE_ID::Metadata NodeDef_AttrEntry_DoNotUse::GetMetadata() const {
  427. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  428. &descriptor_table_graph_2eproto_getter, &descriptor_table_graph_2eproto_once,
  429. file_level_metadata_graph_2eproto[1]);
  430. }
  431. // ===================================================================
  432. class NodeDef::_Internal {
  433. public:
  434. };
  435. void NodeDef::clear_attr() {
  436. attr_.Clear();
  437. }
  438. NodeDef::NodeDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  439. bool is_message_owned)
  440. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  441. input_(arena),
  442. attr_(arena) {
  443. SharedCtor();
  444. if (!is_message_owned) {
  445. RegisterArenaDtor(arena);
  446. }
  447. // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.NodeDef)
  448. }
  449. NodeDef::NodeDef(const NodeDef& from)
  450. : ::PROTOBUF_NAMESPACE_ID::Message(),
  451. input_(from.input_) {
  452. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  453. attr_.MergeFrom(from.attr_);
  454. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  455. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  456. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  457. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  458. if (!from._internal_name().empty()) {
  459. name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
  460. GetArenaForAllocation());
  461. }
  462. op_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  463. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  464. op_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  465. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  466. if (!from._internal_op().empty()) {
  467. op_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_op(),
  468. GetArenaForAllocation());
  469. }
  470. device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  471. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  472. device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  473. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  474. if (!from._internal_device().empty()) {
  475. device_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device(),
  476. GetArenaForAllocation());
  477. }
  478. // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.NodeDef)
  479. }
  480. inline void NodeDef::SharedCtor() {
  481. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  482. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  483. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  484. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  485. op_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  486. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  487. op_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  488. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  489. device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  490. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  491. device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  492. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  493. }
  494. NodeDef::~NodeDef() {
  495. // @@protoc_insertion_point(destructor:opencv_tensorflow.NodeDef)
  496. if (GetArenaForAllocation() != nullptr) return;
  497. SharedDtor();
  498. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  499. }
  500. inline void NodeDef::SharedDtor() {
  501. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  502. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  503. op_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  504. device_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  505. }
  506. void NodeDef::ArenaDtor(void* object) {
  507. NodeDef* _this = reinterpret_cast< NodeDef* >(object);
  508. (void)_this;
  509. _this->attr_. ~MapField();
  510. }
  511. inline void NodeDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) {
  512. if (arena != nullptr) {
  513. arena->OwnCustomDestructor(this, &NodeDef::ArenaDtor);
  514. }
  515. }
  516. void NodeDef::SetCachedSize(int size) const {
  517. _cached_size_.Set(size);
  518. }
  519. void NodeDef::Clear() {
  520. // @@protoc_insertion_point(message_clear_start:opencv_tensorflow.NodeDef)
  521. uint32_t cached_has_bits = 0;
  522. // Prevent compiler warnings about cached_has_bits being unused
  523. (void) cached_has_bits;
  524. input_.Clear();
  525. attr_.Clear();
  526. name_.ClearToEmpty();
  527. op_.ClearToEmpty();
  528. device_.ClearToEmpty();
  529. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  530. }
  531. const char* NodeDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  532. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  533. while (!ctx->Done(&ptr)) {
  534. uint32_t tag;
  535. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  536. switch (tag >> 3) {
  537. // string name = 1;
  538. case 1:
  539. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  540. auto str = _internal_mutable_name();
  541. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  542. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NodeDef.name"));
  543. CHK_(ptr);
  544. } else
  545. goto handle_unusual;
  546. continue;
  547. // string op = 2;
  548. case 2:
  549. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  550. auto str = _internal_mutable_op();
  551. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  552. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NodeDef.op"));
  553. CHK_(ptr);
  554. } else
  555. goto handle_unusual;
  556. continue;
  557. // repeated string input = 3;
  558. case 3:
  559. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
  560. ptr -= 1;
  561. do {
  562. ptr += 1;
  563. auto str = _internal_add_input();
  564. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  565. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NodeDef.input"));
  566. CHK_(ptr);
  567. if (!ctx->DataAvailable(ptr)) break;
  568. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
  569. } else
  570. goto handle_unusual;
  571. continue;
  572. // string device = 4;
  573. case 4:
  574. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
  575. auto str = _internal_mutable_device();
  576. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  577. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NodeDef.device"));
  578. CHK_(ptr);
  579. } else
  580. goto handle_unusual;
  581. continue;
  582. // map<string, .opencv_tensorflow.AttrValue> attr = 5;
  583. case 5:
  584. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
  585. ptr -= 1;
  586. do {
  587. ptr += 1;
  588. ptr = ctx->ParseMessage(&attr_, ptr);
  589. CHK_(ptr);
  590. if (!ctx->DataAvailable(ptr)) break;
  591. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
  592. } else
  593. goto handle_unusual;
  594. continue;
  595. default:
  596. goto handle_unusual;
  597. } // switch
  598. handle_unusual:
  599. if ((tag == 0) || ((tag & 7) == 4)) {
  600. CHK_(ptr);
  601. ctx->SetLastTag(tag);
  602. goto message_done;
  603. }
  604. ptr = UnknownFieldParse(
  605. tag,
  606. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  607. ptr, ctx);
  608. CHK_(ptr != nullptr);
  609. } // while
  610. message_done:
  611. return ptr;
  612. failure:
  613. ptr = nullptr;
  614. goto message_done;
  615. #undef CHK_
  616. }
  617. uint8_t* NodeDef::_InternalSerialize(
  618. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  619. // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.NodeDef)
  620. uint32_t cached_has_bits = 0;
  621. (void) cached_has_bits;
  622. // string name = 1;
  623. if (!this->_internal_name().empty()) {
  624. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  625. this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
  626. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  627. "opencv_tensorflow.NodeDef.name");
  628. target = stream->WriteStringMaybeAliased(
  629. 1, this->_internal_name(), target);
  630. }
  631. // string op = 2;
  632. if (!this->_internal_op().empty()) {
  633. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  634. this->_internal_op().data(), static_cast<int>(this->_internal_op().length()),
  635. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  636. "opencv_tensorflow.NodeDef.op");
  637. target = stream->WriteStringMaybeAliased(
  638. 2, this->_internal_op(), target);
  639. }
  640. // repeated string input = 3;
  641. for (int i = 0, n = this->_internal_input_size(); i < n; i++) {
  642. const auto& s = this->_internal_input(i);
  643. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  644. s.data(), static_cast<int>(s.length()),
  645. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  646. "opencv_tensorflow.NodeDef.input");
  647. target = stream->WriteString(3, s, target);
  648. }
  649. // string device = 4;
  650. if (!this->_internal_device().empty()) {
  651. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  652. this->_internal_device().data(), static_cast<int>(this->_internal_device().length()),
  653. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  654. "opencv_tensorflow.NodeDef.device");
  655. target = stream->WriteStringMaybeAliased(
  656. 4, this->_internal_device(), target);
  657. }
  658. // map<string, .opencv_tensorflow.AttrValue> attr = 5;
  659. if (!this->_internal_attr().empty()) {
  660. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_pointer
  661. ConstPtr;
  662. typedef ConstPtr SortItem;
  663. typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
  664. struct Utf8Check {
  665. static void Check(ConstPtr p) {
  666. (void)p;
  667. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  668. p->first.data(), static_cast<int>(p->first.length()),
  669. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  670. "opencv_tensorflow.NodeDef.AttrEntry.key");
  671. }
  672. };
  673. if (stream->IsSerializationDeterministic() &&
  674. this->_internal_attr().size() > 1) {
  675. ::std::unique_ptr<SortItem[]> items(
  676. new SortItem[this->_internal_attr().size()]);
  677. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::size_type size_type;
  678. size_type n = 0;
  679. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator
  680. it = this->_internal_attr().begin();
  681. it != this->_internal_attr().end(); ++it, ++n) {
  682. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  683. }
  684. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  685. for (size_type i = 0; i < n; i++) {
  686. target = NodeDef_AttrEntry_DoNotUse::Funcs::InternalSerialize(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
  687. Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
  688. }
  689. } else {
  690. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator
  691. it = this->_internal_attr().begin();
  692. it != this->_internal_attr().end(); ++it) {
  693. target = NodeDef_AttrEntry_DoNotUse::Funcs::InternalSerialize(5, it->first, it->second, target, stream);
  694. Utf8Check::Check(&(*it));
  695. }
  696. }
  697. }
  698. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  699. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  700. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  701. }
  702. // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.NodeDef)
  703. return target;
  704. }
  705. size_t NodeDef::ByteSizeLong() const {
  706. // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.NodeDef)
  707. size_t total_size = 0;
  708. uint32_t cached_has_bits = 0;
  709. // Prevent compiler warnings about cached_has_bits being unused
  710. (void) cached_has_bits;
  711. // repeated string input = 3;
  712. total_size += 1 *
  713. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(input_.size());
  714. for (int i = 0, n = input_.size(); i < n; i++) {
  715. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  716. input_.Get(i));
  717. }
  718. // map<string, .opencv_tensorflow.AttrValue> attr = 5;
  719. total_size += 1 *
  720. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_attr_size());
  721. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator
  722. it = this->_internal_attr().begin();
  723. it != this->_internal_attr().end(); ++it) {
  724. total_size += NodeDef_AttrEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  725. }
  726. // string name = 1;
  727. if (!this->_internal_name().empty()) {
  728. total_size += 1 +
  729. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  730. this->_internal_name());
  731. }
  732. // string op = 2;
  733. if (!this->_internal_op().empty()) {
  734. total_size += 1 +
  735. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  736. this->_internal_op());
  737. }
  738. // string device = 4;
  739. if (!this->_internal_device().empty()) {
  740. total_size += 1 +
  741. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  742. this->_internal_device());
  743. }
  744. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  745. }
  746. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NodeDef::_class_data_ = {
  747. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  748. NodeDef::MergeImpl
  749. };
  750. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NodeDef::GetClassData() const { return &_class_data_; }
  751. void NodeDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  752. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  753. static_cast<NodeDef *>(to)->MergeFrom(
  754. static_cast<const NodeDef &>(from));
  755. }
  756. void NodeDef::MergeFrom(const NodeDef& from) {
  757. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.NodeDef)
  758. GOOGLE_DCHECK_NE(&from, this);
  759. uint32_t cached_has_bits = 0;
  760. (void) cached_has_bits;
  761. input_.MergeFrom(from.input_);
  762. attr_.MergeFrom(from.attr_);
  763. if (!from._internal_name().empty()) {
  764. _internal_set_name(from._internal_name());
  765. }
  766. if (!from._internal_op().empty()) {
  767. _internal_set_op(from._internal_op());
  768. }
  769. if (!from._internal_device().empty()) {
  770. _internal_set_device(from._internal_device());
  771. }
  772. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  773. }
  774. void NodeDef::CopyFrom(const NodeDef& from) {
  775. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.NodeDef)
  776. if (&from == this) return;
  777. Clear();
  778. MergeFrom(from);
  779. }
  780. bool NodeDef::IsInitialized() const {
  781. return true;
  782. }
  783. void NodeDef::InternalSwap(NodeDef* other) {
  784. using std::swap;
  785. auto* lhs_arena = GetArenaForAllocation();
  786. auto* rhs_arena = other->GetArenaForAllocation();
  787. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  788. input_.InternalSwap(&other->input_);
  789. attr_.InternalSwap(&other->attr_);
  790. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  791. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  792. &name_, lhs_arena,
  793. &other->name_, rhs_arena
  794. );
  795. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  796. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  797. &op_, lhs_arena,
  798. &other->op_, rhs_arena
  799. );
  800. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  801. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  802. &device_, lhs_arena,
  803. &other->device_, rhs_arena
  804. );
  805. }
  806. ::PROTOBUF_NAMESPACE_ID::Metadata NodeDef::GetMetadata() const {
  807. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  808. &descriptor_table_graph_2eproto_getter, &descriptor_table_graph_2eproto_once,
  809. file_level_metadata_graph_2eproto[2]);
  810. }
  811. // @@protoc_insertion_point(namespace_scope)
  812. } // namespace opencv_tensorflow
  813. PROTOBUF_NAMESPACE_OPEN
  814. template<> PROTOBUF_NOINLINE ::opencv_tensorflow::GraphDef* Arena::CreateMaybeMessage< ::opencv_tensorflow::GraphDef >(Arena* arena) {
  815. return Arena::CreateMessageInternal< ::opencv_tensorflow::GraphDef >(arena);
  816. }
  817. template<> PROTOBUF_NOINLINE ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse* Arena::CreateMaybeMessage< ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse >(Arena* arena) {
  818. return Arena::CreateMessageInternal< ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse >(arena);
  819. }
  820. template<> PROTOBUF_NOINLINE ::opencv_tensorflow::NodeDef* Arena::CreateMaybeMessage< ::opencv_tensorflow::NodeDef >(Arena* arena) {
  821. return Arena::CreateMessageInternal< ::opencv_tensorflow::NodeDef >(arena);
  822. }
  823. PROTOBUF_NAMESPACE_CLOSE
  824. // @@protoc_insertion_point(global_scope)
  825. #include <google/protobuf/port_undef.inc>