tensor_shape.pb.cc 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: tensor_shape.proto
  3. #include "tensor_shape.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 TensorShapeProto_Dim::TensorShapeProto_Dim(
  17. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  18. : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  19. , size_(int64_t{0}){}
  20. struct TensorShapeProto_DimDefaultTypeInternal {
  21. constexpr TensorShapeProto_DimDefaultTypeInternal()
  22. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  23. ~TensorShapeProto_DimDefaultTypeInternal() {}
  24. union {
  25. TensorShapeProto_Dim _instance;
  26. };
  27. };
  28. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorShapeProto_DimDefaultTypeInternal _TensorShapeProto_Dim_default_instance_;
  29. constexpr TensorShapeProto::TensorShapeProto(
  30. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  31. : dim_()
  32. , unknown_rank_(false){}
  33. struct TensorShapeProtoDefaultTypeInternal {
  34. constexpr TensorShapeProtoDefaultTypeInternal()
  35. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  36. ~TensorShapeProtoDefaultTypeInternal() {}
  37. union {
  38. TensorShapeProto _instance;
  39. };
  40. };
  41. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_;
  42. } // namespace opencv_tensorflow
  43. static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensor_5fshape_2eproto[2];
  44. static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensor_5fshape_2eproto = nullptr;
  45. static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensor_5fshape_2eproto = nullptr;
  46. const uint32_t TableStruct_tensor_5fshape_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  47. ~0u, // no _has_bits_
  48. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, _internal_metadata_),
  49. ~0u, // no _extensions_
  50. ~0u, // no _oneof_case_
  51. ~0u, // no _weak_field_map_
  52. ~0u, // no _inlined_string_donated_
  53. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, size_),
  54. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, name_),
  55. ~0u, // no _has_bits_
  56. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, _internal_metadata_),
  57. ~0u, // no _extensions_
  58. ~0u, // no _oneof_case_
  59. ~0u, // no _weak_field_map_
  60. ~0u, // no _inlined_string_donated_
  61. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, dim_),
  62. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, unknown_rank_),
  63. };
  64. static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  65. { 0, -1, -1, sizeof(::opencv_tensorflow::TensorShapeProto_Dim)},
  66. { 8, -1, -1, sizeof(::opencv_tensorflow::TensorShapeProto)},
  67. };
  68. static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  69. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_TensorShapeProto_Dim_default_instance_),
  70. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_TensorShapeProto_default_instance_),
  71. };
  72. const char descriptor_table_protodef_tensor_5fshape_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  73. "\n\022tensor_shape.proto\022\021opencv_tensorflow\""
  74. "\201\001\n\020TensorShapeProto\0224\n\003dim\030\002 \003(\0132\'.open"
  75. "cv_tensorflow.TensorShapeProto.Dim\022\024\n\014un"
  76. "known_rank\030\003 \001(\010\032!\n\003Dim\022\014\n\004size\030\001 \001(\003\022\014\n"
  77. "\004name\030\002 \001(\tB2\n\030org.tensorflow.frameworkB"
  78. "\021TensorShapeProtosP\001\370\001\001b\006proto3"
  79. ;
  80. static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensor_5fshape_2eproto_once;
  81. const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensor_5fshape_2eproto = {
  82. false, false, 231, descriptor_table_protodef_tensor_5fshape_2eproto, "tensor_shape.proto",
  83. &descriptor_table_tensor_5fshape_2eproto_once, nullptr, 0, 2,
  84. schemas, file_default_instances, TableStruct_tensor_5fshape_2eproto::offsets,
  85. file_level_metadata_tensor_5fshape_2eproto, file_level_enum_descriptors_tensor_5fshape_2eproto, file_level_service_descriptors_tensor_5fshape_2eproto,
  86. };
  87. PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_tensor_5fshape_2eproto_getter() {
  88. return &descriptor_table_tensor_5fshape_2eproto;
  89. }
  90. // Force running AddDescriptors() at dynamic initialization time.
  91. PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_tensor_5fshape_2eproto(&descriptor_table_tensor_5fshape_2eproto);
  92. namespace opencv_tensorflow {
  93. // ===================================================================
  94. class TensorShapeProto_Dim::_Internal {
  95. public:
  96. };
  97. TensorShapeProto_Dim::TensorShapeProto_Dim(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  98. bool is_message_owned)
  99. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  100. SharedCtor();
  101. if (!is_message_owned) {
  102. RegisterArenaDtor(arena);
  103. }
  104. // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto.Dim)
  105. }
  106. TensorShapeProto_Dim::TensorShapeProto_Dim(const TensorShapeProto_Dim& from)
  107. : ::PROTOBUF_NAMESPACE_ID::Message() {
  108. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  109. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  110. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  111. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  112. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  113. if (!from._internal_name().empty()) {
  114. name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
  115. GetArenaForAllocation());
  116. }
  117. size_ = from.size_;
  118. // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorShapeProto.Dim)
  119. }
  120. inline void TensorShapeProto_Dim::SharedCtor() {
  121. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  122. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  123. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  124. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  125. size_ = int64_t{0};
  126. }
  127. TensorShapeProto_Dim::~TensorShapeProto_Dim() {
  128. // @@protoc_insertion_point(destructor:opencv_tensorflow.TensorShapeProto.Dim)
  129. if (GetArenaForAllocation() != nullptr) return;
  130. SharedDtor();
  131. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  132. }
  133. inline void TensorShapeProto_Dim::SharedDtor() {
  134. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  135. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  136. }
  137. void TensorShapeProto_Dim::ArenaDtor(void* object) {
  138. TensorShapeProto_Dim* _this = reinterpret_cast< TensorShapeProto_Dim* >(object);
  139. (void)_this;
  140. }
  141. void TensorShapeProto_Dim::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  142. }
  143. void TensorShapeProto_Dim::SetCachedSize(int size) const {
  144. _cached_size_.Set(size);
  145. }
  146. void TensorShapeProto_Dim::Clear() {
  147. // @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto.Dim)
  148. uint32_t cached_has_bits = 0;
  149. // Prevent compiler warnings about cached_has_bits being unused
  150. (void) cached_has_bits;
  151. name_.ClearToEmpty();
  152. size_ = int64_t{0};
  153. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  154. }
  155. const char* TensorShapeProto_Dim::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  156. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  157. while (!ctx->Done(&ptr)) {
  158. uint32_t tag;
  159. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  160. switch (tag >> 3) {
  161. // int64 size = 1;
  162. case 1:
  163. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
  164. size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  165. CHK_(ptr);
  166. } else
  167. goto handle_unusual;
  168. continue;
  169. // string name = 2;
  170. case 2:
  171. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  172. auto str = _internal_mutable_name();
  173. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  174. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.TensorShapeProto.Dim.name"));
  175. CHK_(ptr);
  176. } else
  177. goto handle_unusual;
  178. continue;
  179. default:
  180. goto handle_unusual;
  181. } // switch
  182. handle_unusual:
  183. if ((tag == 0) || ((tag & 7) == 4)) {
  184. CHK_(ptr);
  185. ctx->SetLastTag(tag);
  186. goto message_done;
  187. }
  188. ptr = UnknownFieldParse(
  189. tag,
  190. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  191. ptr, ctx);
  192. CHK_(ptr != nullptr);
  193. } // while
  194. message_done:
  195. return ptr;
  196. failure:
  197. ptr = nullptr;
  198. goto message_done;
  199. #undef CHK_
  200. }
  201. uint8_t* TensorShapeProto_Dim::_InternalSerialize(
  202. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  203. // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorShapeProto.Dim)
  204. uint32_t cached_has_bits = 0;
  205. (void) cached_has_bits;
  206. // int64 size = 1;
  207. if (this->_internal_size() != 0) {
  208. target = stream->EnsureSpace(target);
  209. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_size(), target);
  210. }
  211. // string name = 2;
  212. if (!this->_internal_name().empty()) {
  213. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  214. this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
  215. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  216. "opencv_tensorflow.TensorShapeProto.Dim.name");
  217. target = stream->WriteStringMaybeAliased(
  218. 2, this->_internal_name(), target);
  219. }
  220. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  221. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  222. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  223. }
  224. // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorShapeProto.Dim)
  225. return target;
  226. }
  227. size_t TensorShapeProto_Dim::ByteSizeLong() const {
  228. // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto.Dim)
  229. size_t total_size = 0;
  230. uint32_t cached_has_bits = 0;
  231. // Prevent compiler warnings about cached_has_bits being unused
  232. (void) cached_has_bits;
  233. // string name = 2;
  234. if (!this->_internal_name().empty()) {
  235. total_size += 1 +
  236. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  237. this->_internal_name());
  238. }
  239. // int64 size = 1;
  240. if (this->_internal_size() != 0) {
  241. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_size());
  242. }
  243. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  244. }
  245. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto_Dim::_class_data_ = {
  246. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  247. TensorShapeProto_Dim::MergeImpl
  248. };
  249. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto_Dim::GetClassData() const { return &_class_data_; }
  250. void TensorShapeProto_Dim::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  251. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  252. static_cast<TensorShapeProto_Dim *>(to)->MergeFrom(
  253. static_cast<const TensorShapeProto_Dim &>(from));
  254. }
  255. void TensorShapeProto_Dim::MergeFrom(const TensorShapeProto_Dim& from) {
  256. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorShapeProto.Dim)
  257. GOOGLE_DCHECK_NE(&from, this);
  258. uint32_t cached_has_bits = 0;
  259. (void) cached_has_bits;
  260. if (!from._internal_name().empty()) {
  261. _internal_set_name(from._internal_name());
  262. }
  263. if (from._internal_size() != 0) {
  264. _internal_set_size(from._internal_size());
  265. }
  266. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  267. }
  268. void TensorShapeProto_Dim::CopyFrom(const TensorShapeProto_Dim& from) {
  269. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorShapeProto.Dim)
  270. if (&from == this) return;
  271. Clear();
  272. MergeFrom(from);
  273. }
  274. bool TensorShapeProto_Dim::IsInitialized() const {
  275. return true;
  276. }
  277. void TensorShapeProto_Dim::InternalSwap(TensorShapeProto_Dim* other) {
  278. using std::swap;
  279. auto* lhs_arena = GetArenaForAllocation();
  280. auto* rhs_arena = other->GetArenaForAllocation();
  281. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  282. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  283. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  284. &name_, lhs_arena,
  285. &other->name_, rhs_arena
  286. );
  287. swap(size_, other->size_);
  288. }
  289. ::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto_Dim::GetMetadata() const {
  290. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  291. &descriptor_table_tensor_5fshape_2eproto_getter, &descriptor_table_tensor_5fshape_2eproto_once,
  292. file_level_metadata_tensor_5fshape_2eproto[0]);
  293. }
  294. // ===================================================================
  295. class TensorShapeProto::_Internal {
  296. public:
  297. };
  298. TensorShapeProto::TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  299. bool is_message_owned)
  300. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  301. dim_(arena) {
  302. SharedCtor();
  303. if (!is_message_owned) {
  304. RegisterArenaDtor(arena);
  305. }
  306. // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto)
  307. }
  308. TensorShapeProto::TensorShapeProto(const TensorShapeProto& from)
  309. : ::PROTOBUF_NAMESPACE_ID::Message(),
  310. dim_(from.dim_) {
  311. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  312. unknown_rank_ = from.unknown_rank_;
  313. // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorShapeProto)
  314. }
  315. inline void TensorShapeProto::SharedCtor() {
  316. unknown_rank_ = false;
  317. }
  318. TensorShapeProto::~TensorShapeProto() {
  319. // @@protoc_insertion_point(destructor:opencv_tensorflow.TensorShapeProto)
  320. if (GetArenaForAllocation() != nullptr) return;
  321. SharedDtor();
  322. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  323. }
  324. inline void TensorShapeProto::SharedDtor() {
  325. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  326. }
  327. void TensorShapeProto::ArenaDtor(void* object) {
  328. TensorShapeProto* _this = reinterpret_cast< TensorShapeProto* >(object);
  329. (void)_this;
  330. }
  331. void TensorShapeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  332. }
  333. void TensorShapeProto::SetCachedSize(int size) const {
  334. _cached_size_.Set(size);
  335. }
  336. void TensorShapeProto::Clear() {
  337. // @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto)
  338. uint32_t cached_has_bits = 0;
  339. // Prevent compiler warnings about cached_has_bits being unused
  340. (void) cached_has_bits;
  341. dim_.Clear();
  342. unknown_rank_ = false;
  343. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  344. }
  345. const char* TensorShapeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  346. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  347. while (!ctx->Done(&ptr)) {
  348. uint32_t tag;
  349. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  350. switch (tag >> 3) {
  351. // repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
  352. case 2:
  353. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  354. ptr -= 1;
  355. do {
  356. ptr += 1;
  357. ptr = ctx->ParseMessage(_internal_add_dim(), ptr);
  358. CHK_(ptr);
  359. if (!ctx->DataAvailable(ptr)) break;
  360. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
  361. } else
  362. goto handle_unusual;
  363. continue;
  364. // bool unknown_rank = 3;
  365. case 3:
  366. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
  367. unknown_rank_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  368. CHK_(ptr);
  369. } else
  370. goto handle_unusual;
  371. continue;
  372. default:
  373. goto handle_unusual;
  374. } // switch
  375. handle_unusual:
  376. if ((tag == 0) || ((tag & 7) == 4)) {
  377. CHK_(ptr);
  378. ctx->SetLastTag(tag);
  379. goto message_done;
  380. }
  381. ptr = UnknownFieldParse(
  382. tag,
  383. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  384. ptr, ctx);
  385. CHK_(ptr != nullptr);
  386. } // while
  387. message_done:
  388. return ptr;
  389. failure:
  390. ptr = nullptr;
  391. goto message_done;
  392. #undef CHK_
  393. }
  394. uint8_t* TensorShapeProto::_InternalSerialize(
  395. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  396. // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorShapeProto)
  397. uint32_t cached_has_bits = 0;
  398. (void) cached_has_bits;
  399. // repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
  400. for (unsigned int i = 0,
  401. n = static_cast<unsigned int>(this->_internal_dim_size()); i < n; i++) {
  402. target = stream->EnsureSpace(target);
  403. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  404. InternalWriteMessage(2, this->_internal_dim(i), target, stream);
  405. }
  406. // bool unknown_rank = 3;
  407. if (this->_internal_unknown_rank() != 0) {
  408. target = stream->EnsureSpace(target);
  409. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_unknown_rank(), target);
  410. }
  411. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  412. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  413. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  414. }
  415. // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorShapeProto)
  416. return target;
  417. }
  418. size_t TensorShapeProto::ByteSizeLong() const {
  419. // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto)
  420. size_t total_size = 0;
  421. uint32_t cached_has_bits = 0;
  422. // Prevent compiler warnings about cached_has_bits being unused
  423. (void) cached_has_bits;
  424. // repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
  425. total_size += 1UL * this->_internal_dim_size();
  426. for (const auto& msg : this->dim_) {
  427. total_size +=
  428. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  429. }
  430. // bool unknown_rank = 3;
  431. if (this->_internal_unknown_rank() != 0) {
  432. total_size += 1 + 1;
  433. }
  434. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  435. }
  436. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto::_class_data_ = {
  437. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  438. TensorShapeProto::MergeImpl
  439. };
  440. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto::GetClassData() const { return &_class_data_; }
  441. void TensorShapeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  442. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  443. static_cast<TensorShapeProto *>(to)->MergeFrom(
  444. static_cast<const TensorShapeProto &>(from));
  445. }
  446. void TensorShapeProto::MergeFrom(const TensorShapeProto& from) {
  447. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorShapeProto)
  448. GOOGLE_DCHECK_NE(&from, this);
  449. uint32_t cached_has_bits = 0;
  450. (void) cached_has_bits;
  451. dim_.MergeFrom(from.dim_);
  452. if (from._internal_unknown_rank() != 0) {
  453. _internal_set_unknown_rank(from._internal_unknown_rank());
  454. }
  455. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  456. }
  457. void TensorShapeProto::CopyFrom(const TensorShapeProto& from) {
  458. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorShapeProto)
  459. if (&from == this) return;
  460. Clear();
  461. MergeFrom(from);
  462. }
  463. bool TensorShapeProto::IsInitialized() const {
  464. return true;
  465. }
  466. void TensorShapeProto::InternalSwap(TensorShapeProto* other) {
  467. using std::swap;
  468. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  469. dim_.InternalSwap(&other->dim_);
  470. swap(unknown_rank_, other->unknown_rank_);
  471. }
  472. ::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto::GetMetadata() const {
  473. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  474. &descriptor_table_tensor_5fshape_2eproto_getter, &descriptor_table_tensor_5fshape_2eproto_once,
  475. file_level_metadata_tensor_5fshape_2eproto[1]);
  476. }
  477. // @@protoc_insertion_point(namespace_scope)
  478. } // namespace opencv_tensorflow
  479. PROTOBUF_NAMESPACE_OPEN
  480. template<> PROTOBUF_NOINLINE ::opencv_tensorflow::TensorShapeProto_Dim* Arena::CreateMaybeMessage< ::opencv_tensorflow::TensorShapeProto_Dim >(Arena* arena) {
  481. return Arena::CreateMessageInternal< ::opencv_tensorflow::TensorShapeProto_Dim >(arena);
  482. }
  483. template<> PROTOBUF_NOINLINE ::opencv_tensorflow::TensorShapeProto* Arena::CreateMaybeMessage< ::opencv_tensorflow::TensorShapeProto >(Arena* arena) {
  484. return Arena::CreateMessageInternal< ::opencv_tensorflow::TensorShapeProto >(arena);
  485. }
  486. PROTOBUF_NAMESPACE_CLOSE
  487. // @@protoc_insertion_point(global_scope)
  488. #include <google/protobuf/port_undef.inc>