attr_value.pb.cc 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: attr_value.proto
  3. #include "attr_value.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 AttrValue_ListValue::AttrValue_ListValue(
  17. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  18. : s_()
  19. , i_()
  20. , _i_cached_byte_size_(0)
  21. , f_()
  22. , b_()
  23. , type_()
  24. , _type_cached_byte_size_(0)
  25. , shape_()
  26. , tensor_(){}
  27. struct AttrValue_ListValueDefaultTypeInternal {
  28. constexpr AttrValue_ListValueDefaultTypeInternal()
  29. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  30. ~AttrValue_ListValueDefaultTypeInternal() {}
  31. union {
  32. AttrValue_ListValue _instance;
  33. };
  34. };
  35. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AttrValue_ListValueDefaultTypeInternal _AttrValue_ListValue_default_instance_;
  36. constexpr AttrValue::AttrValue(
  37. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  38. : _oneof_case_{}{}
  39. struct AttrValueDefaultTypeInternal {
  40. constexpr AttrValueDefaultTypeInternal()
  41. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  42. ~AttrValueDefaultTypeInternal() {}
  43. union {
  44. AttrValue _instance;
  45. };
  46. };
  47. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AttrValueDefaultTypeInternal _AttrValue_default_instance_;
  48. constexpr NameAttrList_AttrEntry_DoNotUse::NameAttrList_AttrEntry_DoNotUse(
  49. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
  50. struct NameAttrList_AttrEntry_DoNotUseDefaultTypeInternal {
  51. constexpr NameAttrList_AttrEntry_DoNotUseDefaultTypeInternal()
  52. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  53. ~NameAttrList_AttrEntry_DoNotUseDefaultTypeInternal() {}
  54. union {
  55. NameAttrList_AttrEntry_DoNotUse _instance;
  56. };
  57. };
  58. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NameAttrList_AttrEntry_DoNotUseDefaultTypeInternal _NameAttrList_AttrEntry_DoNotUse_default_instance_;
  59. constexpr NameAttrList::NameAttrList(
  60. ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  61. : attr_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
  62. , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
  63. struct NameAttrListDefaultTypeInternal {
  64. constexpr NameAttrListDefaultTypeInternal()
  65. : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  66. ~NameAttrListDefaultTypeInternal() {}
  67. union {
  68. NameAttrList _instance;
  69. };
  70. };
  71. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NameAttrListDefaultTypeInternal _NameAttrList_default_instance_;
  72. } // namespace opencv_tensorflow
  73. static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_attr_5fvalue_2eproto[4];
  74. static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_attr_5fvalue_2eproto = nullptr;
  75. static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_attr_5fvalue_2eproto = nullptr;
  76. const uint32_t TableStruct_attr_5fvalue_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  77. ~0u, // no _has_bits_
  78. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, _internal_metadata_),
  79. ~0u, // no _extensions_
  80. ~0u, // no _oneof_case_
  81. ~0u, // no _weak_field_map_
  82. ~0u, // no _inlined_string_donated_
  83. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, s_),
  84. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, i_),
  85. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, f_),
  86. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, b_),
  87. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, type_),
  88. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, shape_),
  89. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::AttrValue_ListValue, tensor_),
  90. ~0u, // no _has_bits_
  91. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::AttrValue, _internal_metadata_),
  92. ~0u, // no _extensions_
  93. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::AttrValue, _oneof_case_[0]),
  94. ~0u, // no _weak_field_map_
  95. ~0u, // no _inlined_string_donated_
  96. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  97. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  98. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  99. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  100. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  101. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  102. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  103. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  104. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  105. ::PROTOBUF_NAMESPACE_ID::internal::kInvalidFieldOffsetTag,
  106. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::AttrValue, value_),
  107. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse, _has_bits_),
  108. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse, _internal_metadata_),
  109. ~0u, // no _extensions_
  110. ~0u, // no _oneof_case_
  111. ~0u, // no _weak_field_map_
  112. ~0u, // no _inlined_string_donated_
  113. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse, key_),
  114. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse, value_),
  115. 0,
  116. 1,
  117. ~0u, // no _has_bits_
  118. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NameAttrList, _internal_metadata_),
  119. ~0u, // no _extensions_
  120. ~0u, // no _oneof_case_
  121. ~0u, // no _weak_field_map_
  122. ~0u, // no _inlined_string_donated_
  123. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NameAttrList, name_),
  124. PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NameAttrList, attr_),
  125. };
  126. static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  127. { 0, -1, -1, sizeof(::opencv_tensorflow::AttrValue_ListValue)},
  128. { 13, -1, -1, sizeof(::opencv_tensorflow::AttrValue)},
  129. { 30, 38, -1, sizeof(::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse)},
  130. { 40, -1, -1, sizeof(::opencv_tensorflow::NameAttrList)},
  131. };
  132. static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  133. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_AttrValue_ListValue_default_instance_),
  134. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_AttrValue_default_instance_),
  135. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_NameAttrList_AttrEntry_DoNotUse_default_instance_),
  136. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_NameAttrList_default_instance_),
  137. };
  138. const char descriptor_table_protodef_attr_5fvalue_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  139. "\n\020attr_value.proto\022\021opencv_tensorflow\032\014t"
  140. "ensor.proto\032\022tensor_shape.proto\032\013types.p"
  141. "roto\"\266\004\n\tAttrValue\022\013\n\001s\030\002 \001(\014H\000\022\013\n\001i\030\003 \001"
  142. "(\003H\000\022\013\n\001f\030\004 \001(\002H\000\022\013\n\001b\030\005 \001(\010H\000\022+\n\004type\030\006"
  143. " \001(\0162\033.opencv_tensorflow.DataTypeH\000\0224\n\005s"
  144. "hape\030\007 \001(\0132#.opencv_tensorflow.TensorSha"
  145. "peProtoH\000\0220\n\006tensor\030\010 \001(\0132\036.opencv_tenso"
  146. "rflow.TensorProtoH\000\0226\n\004list\030\001 \001(\0132&.open"
  147. "cv_tensorflow.AttrValue.ListValueH\000\022/\n\004f"
  148. "unc\030\n \001(\0132\037.opencv_tensorflow.NameAttrLi"
  149. "stH\000\022\025\n\013placeholder\030\t \001(\tH\000\032\326\001\n\tListValu"
  150. "e\022\t\n\001s\030\002 \003(\014\022\r\n\001i\030\003 \003(\003B\002\020\001\022\r\n\001f\030\004 \003(\002B\002"
  151. "\020\001\022\r\n\001b\030\005 \003(\010B\002\020\001\022-\n\004type\030\006 \003(\0162\033.opencv"
  152. "_tensorflow.DataTypeB\002\020\001\0222\n\005shape\030\007 \003(\0132"
  153. "#.opencv_tensorflow.TensorShapeProto\022.\n\006"
  154. "tensor\030\010 \003(\0132\036.opencv_tensorflow.TensorP"
  155. "rotoB\007\n\005value\"\240\001\n\014NameAttrList\022\014\n\004name\030\001"
  156. " \001(\t\0227\n\004attr\030\002 \003(\0132).opencv_tensorflow.N"
  157. "ameAttrList.AttrEntry\032I\n\tAttrEntry\022\013\n\003ke"
  158. "y\030\001 \001(\t\022+\n\005value\030\002 \001(\0132\034.opencv_tensorfl"
  159. "ow.AttrValue:\0028\001B0\n\030org.tensorflow.frame"
  160. "workB\017AttrValueProtosP\001\370\001\001b\006proto3"
  161. ;
  162. static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_attr_5fvalue_2eproto_deps[3] = {
  163. &::descriptor_table_tensor_2eproto,
  164. &::descriptor_table_tensor_5fshape_2eproto,
  165. &::descriptor_table_types_2eproto,
  166. };
  167. static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_attr_5fvalue_2eproto_once;
  168. const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_attr_5fvalue_2eproto = {
  169. false, false, 874, descriptor_table_protodef_attr_5fvalue_2eproto, "attr_value.proto",
  170. &descriptor_table_attr_5fvalue_2eproto_once, descriptor_table_attr_5fvalue_2eproto_deps, 3, 4,
  171. schemas, file_default_instances, TableStruct_attr_5fvalue_2eproto::offsets,
  172. file_level_metadata_attr_5fvalue_2eproto, file_level_enum_descriptors_attr_5fvalue_2eproto, file_level_service_descriptors_attr_5fvalue_2eproto,
  173. };
  174. PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_attr_5fvalue_2eproto_getter() {
  175. return &descriptor_table_attr_5fvalue_2eproto;
  176. }
  177. // Force running AddDescriptors() at dynamic initialization time.
  178. PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_attr_5fvalue_2eproto(&descriptor_table_attr_5fvalue_2eproto);
  179. namespace opencv_tensorflow {
  180. // ===================================================================
  181. class AttrValue_ListValue::_Internal {
  182. public:
  183. };
  184. void AttrValue_ListValue::clear_shape() {
  185. shape_.Clear();
  186. }
  187. void AttrValue_ListValue::clear_tensor() {
  188. tensor_.Clear();
  189. }
  190. AttrValue_ListValue::AttrValue_ListValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  191. bool is_message_owned)
  192. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  193. s_(arena),
  194. i_(arena),
  195. f_(arena),
  196. b_(arena),
  197. type_(arena),
  198. shape_(arena),
  199. tensor_(arena) {
  200. SharedCtor();
  201. if (!is_message_owned) {
  202. RegisterArenaDtor(arena);
  203. }
  204. // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.AttrValue.ListValue)
  205. }
  206. AttrValue_ListValue::AttrValue_ListValue(const AttrValue_ListValue& from)
  207. : ::PROTOBUF_NAMESPACE_ID::Message(),
  208. s_(from.s_),
  209. i_(from.i_),
  210. f_(from.f_),
  211. b_(from.b_),
  212. type_(from.type_),
  213. shape_(from.shape_),
  214. tensor_(from.tensor_) {
  215. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  216. // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.AttrValue.ListValue)
  217. }
  218. inline void AttrValue_ListValue::SharedCtor() {
  219. }
  220. AttrValue_ListValue::~AttrValue_ListValue() {
  221. // @@protoc_insertion_point(destructor:opencv_tensorflow.AttrValue.ListValue)
  222. if (GetArenaForAllocation() != nullptr) return;
  223. SharedDtor();
  224. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  225. }
  226. inline void AttrValue_ListValue::SharedDtor() {
  227. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  228. }
  229. void AttrValue_ListValue::ArenaDtor(void* object) {
  230. AttrValue_ListValue* _this = reinterpret_cast< AttrValue_ListValue* >(object);
  231. (void)_this;
  232. }
  233. void AttrValue_ListValue::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  234. }
  235. void AttrValue_ListValue::SetCachedSize(int size) const {
  236. _cached_size_.Set(size);
  237. }
  238. void AttrValue_ListValue::Clear() {
  239. // @@protoc_insertion_point(message_clear_start:opencv_tensorflow.AttrValue.ListValue)
  240. uint32_t cached_has_bits = 0;
  241. // Prevent compiler warnings about cached_has_bits being unused
  242. (void) cached_has_bits;
  243. s_.Clear();
  244. i_.Clear();
  245. f_.Clear();
  246. b_.Clear();
  247. type_.Clear();
  248. shape_.Clear();
  249. tensor_.Clear();
  250. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  251. }
  252. const char* AttrValue_ListValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  253. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  254. while (!ctx->Done(&ptr)) {
  255. uint32_t tag;
  256. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  257. switch (tag >> 3) {
  258. // repeated bytes s = 2;
  259. case 2:
  260. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  261. ptr -= 1;
  262. do {
  263. ptr += 1;
  264. auto str = _internal_add_s();
  265. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  266. CHK_(ptr);
  267. if (!ctx->DataAvailable(ptr)) break;
  268. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
  269. } else
  270. goto handle_unusual;
  271. continue;
  272. // repeated int64 i = 3 [packed = true];
  273. case 3:
  274. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
  275. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_i(), ptr, ctx);
  276. CHK_(ptr);
  277. } else if (static_cast<uint8_t>(tag) == 24) {
  278. _internal_add_i(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
  279. CHK_(ptr);
  280. } else
  281. goto handle_unusual;
  282. continue;
  283. // repeated float f = 4 [packed = true];
  284. case 4:
  285. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
  286. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_f(), ptr, ctx);
  287. CHK_(ptr);
  288. } else if (static_cast<uint8_t>(tag) == 37) {
  289. _internal_add_f(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
  290. ptr += sizeof(float);
  291. } else
  292. goto handle_unusual;
  293. continue;
  294. // repeated bool b = 5 [packed = true];
  295. case 5:
  296. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
  297. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedBoolParser(_internal_mutable_b(), ptr, ctx);
  298. CHK_(ptr);
  299. } else if (static_cast<uint8_t>(tag) == 40) {
  300. _internal_add_b(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
  301. CHK_(ptr);
  302. } else
  303. goto handle_unusual;
  304. continue;
  305. // repeated .opencv_tensorflow.DataType type = 6 [packed = true];
  306. case 6:
  307. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
  308. ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser(_internal_mutable_type(), ptr, ctx);
  309. CHK_(ptr);
  310. } else if (static_cast<uint8_t>(tag) == 48) {
  311. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  312. CHK_(ptr);
  313. _internal_add_type(static_cast<::opencv_tensorflow::DataType>(val));
  314. } else
  315. goto handle_unusual;
  316. continue;
  317. // repeated .opencv_tensorflow.TensorShapeProto shape = 7;
  318. case 7:
  319. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
  320. ptr -= 1;
  321. do {
  322. ptr += 1;
  323. ptr = ctx->ParseMessage(_internal_add_shape(), ptr);
  324. CHK_(ptr);
  325. if (!ctx->DataAvailable(ptr)) break;
  326. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
  327. } else
  328. goto handle_unusual;
  329. continue;
  330. // repeated .opencv_tensorflow.TensorProto tensor = 8;
  331. case 8:
  332. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
  333. ptr -= 1;
  334. do {
  335. ptr += 1;
  336. ptr = ctx->ParseMessage(_internal_add_tensor(), ptr);
  337. CHK_(ptr);
  338. if (!ctx->DataAvailable(ptr)) break;
  339. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
  340. } else
  341. goto handle_unusual;
  342. continue;
  343. default:
  344. goto handle_unusual;
  345. } // switch
  346. handle_unusual:
  347. if ((tag == 0) || ((tag & 7) == 4)) {
  348. CHK_(ptr);
  349. ctx->SetLastTag(tag);
  350. goto message_done;
  351. }
  352. ptr = UnknownFieldParse(
  353. tag,
  354. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  355. ptr, ctx);
  356. CHK_(ptr != nullptr);
  357. } // while
  358. message_done:
  359. return ptr;
  360. failure:
  361. ptr = nullptr;
  362. goto message_done;
  363. #undef CHK_
  364. }
  365. uint8_t* AttrValue_ListValue::_InternalSerialize(
  366. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  367. // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.AttrValue.ListValue)
  368. uint32_t cached_has_bits = 0;
  369. (void) cached_has_bits;
  370. // repeated bytes s = 2;
  371. for (int i = 0, n = this->_internal_s_size(); i < n; i++) {
  372. const auto& s = this->_internal_s(i);
  373. target = stream->WriteBytes(2, s, target);
  374. }
  375. // repeated int64 i = 3 [packed = true];
  376. {
  377. int byte_size = _i_cached_byte_size_.load(std::memory_order_relaxed);
  378. if (byte_size > 0) {
  379. target = stream->WriteInt64Packed(
  380. 3, _internal_i(), byte_size, target);
  381. }
  382. }
  383. // repeated float f = 4 [packed = true];
  384. if (this->_internal_f_size() > 0) {
  385. target = stream->WriteFixedPacked(4, _internal_f(), target);
  386. }
  387. // repeated bool b = 5 [packed = true];
  388. if (this->_internal_b_size() > 0) {
  389. target = stream->WriteFixedPacked(5, _internal_b(), target);
  390. }
  391. // repeated .opencv_tensorflow.DataType type = 6 [packed = true];
  392. {
  393. int byte_size = _type_cached_byte_size_.load(std::memory_order_relaxed);
  394. if (byte_size > 0) {
  395. target = stream->WriteEnumPacked(
  396. 6, type_, byte_size, target);
  397. }
  398. }
  399. // repeated .opencv_tensorflow.TensorShapeProto shape = 7;
  400. for (unsigned int i = 0,
  401. n = static_cast<unsigned int>(this->_internal_shape_size()); i < n; i++) {
  402. target = stream->EnsureSpace(target);
  403. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  404. InternalWriteMessage(7, this->_internal_shape(i), target, stream);
  405. }
  406. // repeated .opencv_tensorflow.TensorProto tensor = 8;
  407. for (unsigned int i = 0,
  408. n = static_cast<unsigned int>(this->_internal_tensor_size()); i < n; i++) {
  409. target = stream->EnsureSpace(target);
  410. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  411. InternalWriteMessage(8, this->_internal_tensor(i), target, stream);
  412. }
  413. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  414. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  415. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  416. }
  417. // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.AttrValue.ListValue)
  418. return target;
  419. }
  420. size_t AttrValue_ListValue::ByteSizeLong() const {
  421. // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.AttrValue.ListValue)
  422. size_t total_size = 0;
  423. uint32_t cached_has_bits = 0;
  424. // Prevent compiler warnings about cached_has_bits being unused
  425. (void) cached_has_bits;
  426. // repeated bytes s = 2;
  427. total_size += 1 *
  428. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(s_.size());
  429. for (int i = 0, n = s_.size(); i < n; i++) {
  430. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  431. s_.Get(i));
  432. }
  433. // repeated int64 i = 3 [packed = true];
  434. {
  435. size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  436. Int64Size(this->i_);
  437. if (data_size > 0) {
  438. total_size += 1 +
  439. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  440. static_cast<int32_t>(data_size));
  441. }
  442. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
  443. _i_cached_byte_size_.store(cached_size,
  444. std::memory_order_relaxed);
  445. total_size += data_size;
  446. }
  447. // repeated float f = 4 [packed = true];
  448. {
  449. unsigned int count = static_cast<unsigned int>(this->_internal_f_size());
  450. size_t data_size = 4UL * count;
  451. if (data_size > 0) {
  452. total_size += 1 +
  453. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  454. static_cast<int32_t>(data_size));
  455. }
  456. total_size += data_size;
  457. }
  458. // repeated bool b = 5 [packed = true];
  459. {
  460. unsigned int count = static_cast<unsigned int>(this->_internal_b_size());
  461. size_t data_size = 1UL * count;
  462. if (data_size > 0) {
  463. total_size += 1 +
  464. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  465. static_cast<int32_t>(data_size));
  466. }
  467. total_size += data_size;
  468. }
  469. // repeated .opencv_tensorflow.DataType type = 6 [packed = true];
  470. {
  471. size_t data_size = 0;
  472. unsigned int count = static_cast<unsigned int>(this->_internal_type_size());for (unsigned int i = 0; i < count; i++) {
  473. data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
  474. this->_internal_type(static_cast<int>(i)));
  475. }
  476. if (data_size > 0) {
  477. total_size += 1 +
  478. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  479. static_cast<int32_t>(data_size));
  480. }
  481. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
  482. _type_cached_byte_size_.store(cached_size,
  483. std::memory_order_relaxed);
  484. total_size += data_size;
  485. }
  486. // repeated .opencv_tensorflow.TensorShapeProto shape = 7;
  487. total_size += 1UL * this->_internal_shape_size();
  488. for (const auto& msg : this->shape_) {
  489. total_size +=
  490. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  491. }
  492. // repeated .opencv_tensorflow.TensorProto tensor = 8;
  493. total_size += 1UL * this->_internal_tensor_size();
  494. for (const auto& msg : this->tensor_) {
  495. total_size +=
  496. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  497. }
  498. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  499. }
  500. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AttrValue_ListValue::_class_data_ = {
  501. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  502. AttrValue_ListValue::MergeImpl
  503. };
  504. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AttrValue_ListValue::GetClassData() const { return &_class_data_; }
  505. void AttrValue_ListValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  506. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  507. static_cast<AttrValue_ListValue *>(to)->MergeFrom(
  508. static_cast<const AttrValue_ListValue &>(from));
  509. }
  510. void AttrValue_ListValue::MergeFrom(const AttrValue_ListValue& from) {
  511. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.AttrValue.ListValue)
  512. GOOGLE_DCHECK_NE(&from, this);
  513. uint32_t cached_has_bits = 0;
  514. (void) cached_has_bits;
  515. s_.MergeFrom(from.s_);
  516. i_.MergeFrom(from.i_);
  517. f_.MergeFrom(from.f_);
  518. b_.MergeFrom(from.b_);
  519. type_.MergeFrom(from.type_);
  520. shape_.MergeFrom(from.shape_);
  521. tensor_.MergeFrom(from.tensor_);
  522. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  523. }
  524. void AttrValue_ListValue::CopyFrom(const AttrValue_ListValue& from) {
  525. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.AttrValue.ListValue)
  526. if (&from == this) return;
  527. Clear();
  528. MergeFrom(from);
  529. }
  530. bool AttrValue_ListValue::IsInitialized() const {
  531. return true;
  532. }
  533. void AttrValue_ListValue::InternalSwap(AttrValue_ListValue* other) {
  534. using std::swap;
  535. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  536. s_.InternalSwap(&other->s_);
  537. i_.InternalSwap(&other->i_);
  538. f_.InternalSwap(&other->f_);
  539. b_.InternalSwap(&other->b_);
  540. type_.InternalSwap(&other->type_);
  541. shape_.InternalSwap(&other->shape_);
  542. tensor_.InternalSwap(&other->tensor_);
  543. }
  544. ::PROTOBUF_NAMESPACE_ID::Metadata AttrValue_ListValue::GetMetadata() const {
  545. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  546. &descriptor_table_attr_5fvalue_2eproto_getter, &descriptor_table_attr_5fvalue_2eproto_once,
  547. file_level_metadata_attr_5fvalue_2eproto[0]);
  548. }
  549. // ===================================================================
  550. class AttrValue::_Internal {
  551. public:
  552. static const ::opencv_tensorflow::TensorShapeProto& shape(const AttrValue* msg);
  553. static const ::opencv_tensorflow::TensorProto& tensor(const AttrValue* msg);
  554. static const ::opencv_tensorflow::AttrValue_ListValue& list(const AttrValue* msg);
  555. static const ::opencv_tensorflow::NameAttrList& func(const AttrValue* msg);
  556. };
  557. const ::opencv_tensorflow::TensorShapeProto&
  558. AttrValue::_Internal::shape(const AttrValue* msg) {
  559. return *msg->value_.shape_;
  560. }
  561. const ::opencv_tensorflow::TensorProto&
  562. AttrValue::_Internal::tensor(const AttrValue* msg) {
  563. return *msg->value_.tensor_;
  564. }
  565. const ::opencv_tensorflow::AttrValue_ListValue&
  566. AttrValue::_Internal::list(const AttrValue* msg) {
  567. return *msg->value_.list_;
  568. }
  569. const ::opencv_tensorflow::NameAttrList&
  570. AttrValue::_Internal::func(const AttrValue* msg) {
  571. return *msg->value_.func_;
  572. }
  573. void AttrValue::set_allocated_shape(::opencv_tensorflow::TensorShapeProto* shape) {
  574. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  575. clear_value();
  576. if (shape) {
  577. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  578. ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
  579. ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena(
  580. reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(shape));
  581. if (message_arena != submessage_arena) {
  582. shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  583. message_arena, shape, submessage_arena);
  584. }
  585. set_has_shape();
  586. value_.shape_ = shape;
  587. }
  588. // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.AttrValue.shape)
  589. }
  590. void AttrValue::clear_shape() {
  591. if (_internal_has_shape()) {
  592. if (GetArenaForAllocation() == nullptr) {
  593. delete value_.shape_;
  594. }
  595. clear_has_value();
  596. }
  597. }
  598. void AttrValue::set_allocated_tensor(::opencv_tensorflow::TensorProto* tensor) {
  599. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  600. clear_value();
  601. if (tensor) {
  602. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  603. ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<
  604. ::PROTOBUF_NAMESPACE_ID::MessageLite>::GetOwningArena(
  605. reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor));
  606. if (message_arena != submessage_arena) {
  607. tensor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  608. message_arena, tensor, submessage_arena);
  609. }
  610. set_has_tensor();
  611. value_.tensor_ = tensor;
  612. }
  613. // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.AttrValue.tensor)
  614. }
  615. void AttrValue::clear_tensor() {
  616. if (_internal_has_tensor()) {
  617. if (GetArenaForAllocation() == nullptr) {
  618. delete value_.tensor_;
  619. }
  620. clear_has_value();
  621. }
  622. }
  623. void AttrValue::set_allocated_list(::opencv_tensorflow::AttrValue_ListValue* list) {
  624. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  625. clear_value();
  626. if (list) {
  627. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  628. ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_tensorflow::AttrValue_ListValue>::GetOwningArena(list);
  629. if (message_arena != submessage_arena) {
  630. list = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  631. message_arena, list, submessage_arena);
  632. }
  633. set_has_list();
  634. value_.list_ = list;
  635. }
  636. // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.AttrValue.list)
  637. }
  638. void AttrValue::set_allocated_func(::opencv_tensorflow::NameAttrList* func) {
  639. ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  640. clear_value();
  641. if (func) {
  642. ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
  643. ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper<::opencv_tensorflow::NameAttrList>::GetOwningArena(func);
  644. if (message_arena != submessage_arena) {
  645. func = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
  646. message_arena, func, submessage_arena);
  647. }
  648. set_has_func();
  649. value_.func_ = func;
  650. }
  651. // @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.AttrValue.func)
  652. }
  653. AttrValue::AttrValue(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  654. bool is_message_owned)
  655. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  656. SharedCtor();
  657. if (!is_message_owned) {
  658. RegisterArenaDtor(arena);
  659. }
  660. // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.AttrValue)
  661. }
  662. AttrValue::AttrValue(const AttrValue& from)
  663. : ::PROTOBUF_NAMESPACE_ID::Message() {
  664. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  665. clear_has_value();
  666. switch (from.value_case()) {
  667. case kS: {
  668. _internal_set_s(from._internal_s());
  669. break;
  670. }
  671. case kI: {
  672. _internal_set_i(from._internal_i());
  673. break;
  674. }
  675. case kF: {
  676. _internal_set_f(from._internal_f());
  677. break;
  678. }
  679. case kB: {
  680. _internal_set_b(from._internal_b());
  681. break;
  682. }
  683. case kType: {
  684. _internal_set_type(from._internal_type());
  685. break;
  686. }
  687. case kShape: {
  688. _internal_mutable_shape()->::opencv_tensorflow::TensorShapeProto::MergeFrom(from._internal_shape());
  689. break;
  690. }
  691. case kTensor: {
  692. _internal_mutable_tensor()->::opencv_tensorflow::TensorProto::MergeFrom(from._internal_tensor());
  693. break;
  694. }
  695. case kList: {
  696. _internal_mutable_list()->::opencv_tensorflow::AttrValue_ListValue::MergeFrom(from._internal_list());
  697. break;
  698. }
  699. case kFunc: {
  700. _internal_mutable_func()->::opencv_tensorflow::NameAttrList::MergeFrom(from._internal_func());
  701. break;
  702. }
  703. case kPlaceholder: {
  704. _internal_set_placeholder(from._internal_placeholder());
  705. break;
  706. }
  707. case VALUE_NOT_SET: {
  708. break;
  709. }
  710. }
  711. // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.AttrValue)
  712. }
  713. inline void AttrValue::SharedCtor() {
  714. clear_has_value();
  715. }
  716. AttrValue::~AttrValue() {
  717. // @@protoc_insertion_point(destructor:opencv_tensorflow.AttrValue)
  718. if (GetArenaForAllocation() != nullptr) return;
  719. SharedDtor();
  720. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  721. }
  722. inline void AttrValue::SharedDtor() {
  723. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  724. if (has_value()) {
  725. clear_value();
  726. }
  727. }
  728. void AttrValue::ArenaDtor(void* object) {
  729. AttrValue* _this = reinterpret_cast< AttrValue* >(object);
  730. (void)_this;
  731. }
  732. void AttrValue::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
  733. }
  734. void AttrValue::SetCachedSize(int size) const {
  735. _cached_size_.Set(size);
  736. }
  737. void AttrValue::clear_value() {
  738. // @@protoc_insertion_point(one_of_clear_start:opencv_tensorflow.AttrValue)
  739. switch (value_case()) {
  740. case kS: {
  741. value_.s_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
  742. break;
  743. }
  744. case kI: {
  745. // No need to clear
  746. break;
  747. }
  748. case kF: {
  749. // No need to clear
  750. break;
  751. }
  752. case kB: {
  753. // No need to clear
  754. break;
  755. }
  756. case kType: {
  757. // No need to clear
  758. break;
  759. }
  760. case kShape: {
  761. if (GetArenaForAllocation() == nullptr) {
  762. delete value_.shape_;
  763. }
  764. break;
  765. }
  766. case kTensor: {
  767. if (GetArenaForAllocation() == nullptr) {
  768. delete value_.tensor_;
  769. }
  770. break;
  771. }
  772. case kList: {
  773. if (GetArenaForAllocation() == nullptr) {
  774. delete value_.list_;
  775. }
  776. break;
  777. }
  778. case kFunc: {
  779. if (GetArenaForAllocation() == nullptr) {
  780. delete value_.func_;
  781. }
  782. break;
  783. }
  784. case kPlaceholder: {
  785. value_.placeholder_.Destroy(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
  786. break;
  787. }
  788. case VALUE_NOT_SET: {
  789. break;
  790. }
  791. }
  792. _oneof_case_[0] = VALUE_NOT_SET;
  793. }
  794. void AttrValue::Clear() {
  795. // @@protoc_insertion_point(message_clear_start:opencv_tensorflow.AttrValue)
  796. uint32_t cached_has_bits = 0;
  797. // Prevent compiler warnings about cached_has_bits being unused
  798. (void) cached_has_bits;
  799. clear_value();
  800. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  801. }
  802. const char* AttrValue::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  803. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  804. while (!ctx->Done(&ptr)) {
  805. uint32_t tag;
  806. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  807. switch (tag >> 3) {
  808. // .opencv_tensorflow.AttrValue.ListValue list = 1;
  809. case 1:
  810. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  811. ptr = ctx->ParseMessage(_internal_mutable_list(), ptr);
  812. CHK_(ptr);
  813. } else
  814. goto handle_unusual;
  815. continue;
  816. // bytes s = 2;
  817. case 2:
  818. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  819. auto str = _internal_mutable_s();
  820. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  821. CHK_(ptr);
  822. } else
  823. goto handle_unusual;
  824. continue;
  825. // int64 i = 3;
  826. case 3:
  827. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
  828. _internal_set_i(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
  829. CHK_(ptr);
  830. } else
  831. goto handle_unusual;
  832. continue;
  833. // float f = 4;
  834. case 4:
  835. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
  836. _internal_set_f(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
  837. ptr += sizeof(float);
  838. } else
  839. goto handle_unusual;
  840. continue;
  841. // bool b = 5;
  842. case 5:
  843. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
  844. _internal_set_b(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
  845. CHK_(ptr);
  846. } else
  847. goto handle_unusual;
  848. continue;
  849. // .opencv_tensorflow.DataType type = 6;
  850. case 6:
  851. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
  852. uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
  853. CHK_(ptr);
  854. _internal_set_type(static_cast<::opencv_tensorflow::DataType>(val));
  855. } else
  856. goto handle_unusual;
  857. continue;
  858. // .opencv_tensorflow.TensorShapeProto shape = 7;
  859. case 7:
  860. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
  861. ptr = ctx->ParseMessage(_internal_mutable_shape(), ptr);
  862. CHK_(ptr);
  863. } else
  864. goto handle_unusual;
  865. continue;
  866. // .opencv_tensorflow.TensorProto tensor = 8;
  867. case 8:
  868. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
  869. ptr = ctx->ParseMessage(_internal_mutable_tensor(), ptr);
  870. CHK_(ptr);
  871. } else
  872. goto handle_unusual;
  873. continue;
  874. // string placeholder = 9;
  875. case 9:
  876. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
  877. auto str = _internal_mutable_placeholder();
  878. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  879. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.AttrValue.placeholder"));
  880. CHK_(ptr);
  881. } else
  882. goto handle_unusual;
  883. continue;
  884. // .opencv_tensorflow.NameAttrList func = 10;
  885. case 10:
  886. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
  887. ptr = ctx->ParseMessage(_internal_mutable_func(), ptr);
  888. CHK_(ptr);
  889. } else
  890. goto handle_unusual;
  891. continue;
  892. default:
  893. goto handle_unusual;
  894. } // switch
  895. handle_unusual:
  896. if ((tag == 0) || ((tag & 7) == 4)) {
  897. CHK_(ptr);
  898. ctx->SetLastTag(tag);
  899. goto message_done;
  900. }
  901. ptr = UnknownFieldParse(
  902. tag,
  903. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  904. ptr, ctx);
  905. CHK_(ptr != nullptr);
  906. } // while
  907. message_done:
  908. return ptr;
  909. failure:
  910. ptr = nullptr;
  911. goto message_done;
  912. #undef CHK_
  913. }
  914. uint8_t* AttrValue::_InternalSerialize(
  915. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  916. // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.AttrValue)
  917. uint32_t cached_has_bits = 0;
  918. (void) cached_has_bits;
  919. // .opencv_tensorflow.AttrValue.ListValue list = 1;
  920. if (_internal_has_list()) {
  921. target = stream->EnsureSpace(target);
  922. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  923. InternalWriteMessage(
  924. 1, _Internal::list(this), target, stream);
  925. }
  926. // bytes s = 2;
  927. if (_internal_has_s()) {
  928. target = stream->WriteBytesMaybeAliased(
  929. 2, this->_internal_s(), target);
  930. }
  931. // int64 i = 3;
  932. if (_internal_has_i()) {
  933. target = stream->EnsureSpace(target);
  934. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_i(), target);
  935. }
  936. // float f = 4;
  937. if (_internal_has_f()) {
  938. target = stream->EnsureSpace(target);
  939. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_f(), target);
  940. }
  941. // bool b = 5;
  942. if (_internal_has_b()) {
  943. target = stream->EnsureSpace(target);
  944. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_b(), target);
  945. }
  946. // .opencv_tensorflow.DataType type = 6;
  947. if (_internal_has_type()) {
  948. target = stream->EnsureSpace(target);
  949. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
  950. 6, this->_internal_type(), target);
  951. }
  952. // .opencv_tensorflow.TensorShapeProto shape = 7;
  953. if (_internal_has_shape()) {
  954. target = stream->EnsureSpace(target);
  955. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  956. InternalWriteMessage(
  957. 7, _Internal::shape(this), target, stream);
  958. }
  959. // .opencv_tensorflow.TensorProto tensor = 8;
  960. if (_internal_has_tensor()) {
  961. target = stream->EnsureSpace(target);
  962. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  963. InternalWriteMessage(
  964. 8, _Internal::tensor(this), target, stream);
  965. }
  966. // string placeholder = 9;
  967. if (_internal_has_placeholder()) {
  968. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  969. this->_internal_placeholder().data(), static_cast<int>(this->_internal_placeholder().length()),
  970. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  971. "opencv_tensorflow.AttrValue.placeholder");
  972. target = stream->WriteStringMaybeAliased(
  973. 9, this->_internal_placeholder(), target);
  974. }
  975. // .opencv_tensorflow.NameAttrList func = 10;
  976. if (_internal_has_func()) {
  977. target = stream->EnsureSpace(target);
  978. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  979. InternalWriteMessage(
  980. 10, _Internal::func(this), target, stream);
  981. }
  982. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  983. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  984. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  985. }
  986. // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.AttrValue)
  987. return target;
  988. }
  989. size_t AttrValue::ByteSizeLong() const {
  990. // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.AttrValue)
  991. size_t total_size = 0;
  992. uint32_t cached_has_bits = 0;
  993. // Prevent compiler warnings about cached_has_bits being unused
  994. (void) cached_has_bits;
  995. switch (value_case()) {
  996. // bytes s = 2;
  997. case kS: {
  998. total_size += 1 +
  999. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
  1000. this->_internal_s());
  1001. break;
  1002. }
  1003. // int64 i = 3;
  1004. case kI: {
  1005. total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_i());
  1006. break;
  1007. }
  1008. // float f = 4;
  1009. case kF: {
  1010. total_size += 1 + 4;
  1011. break;
  1012. }
  1013. // bool b = 5;
  1014. case kB: {
  1015. total_size += 1 + 1;
  1016. break;
  1017. }
  1018. // .opencv_tensorflow.DataType type = 6;
  1019. case kType: {
  1020. total_size += 1 +
  1021. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type());
  1022. break;
  1023. }
  1024. // .opencv_tensorflow.TensorShapeProto shape = 7;
  1025. case kShape: {
  1026. total_size += 1 +
  1027. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1028. *value_.shape_);
  1029. break;
  1030. }
  1031. // .opencv_tensorflow.TensorProto tensor = 8;
  1032. case kTensor: {
  1033. total_size += 1 +
  1034. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1035. *value_.tensor_);
  1036. break;
  1037. }
  1038. // .opencv_tensorflow.AttrValue.ListValue list = 1;
  1039. case kList: {
  1040. total_size += 1 +
  1041. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1042. *value_.list_);
  1043. break;
  1044. }
  1045. // .opencv_tensorflow.NameAttrList func = 10;
  1046. case kFunc: {
  1047. total_size += 1 +
  1048. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  1049. *value_.func_);
  1050. break;
  1051. }
  1052. // string placeholder = 9;
  1053. case kPlaceholder: {
  1054. total_size += 1 +
  1055. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1056. this->_internal_placeholder());
  1057. break;
  1058. }
  1059. case VALUE_NOT_SET: {
  1060. break;
  1061. }
  1062. }
  1063. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  1064. }
  1065. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AttrValue::_class_data_ = {
  1066. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  1067. AttrValue::MergeImpl
  1068. };
  1069. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AttrValue::GetClassData() const { return &_class_data_; }
  1070. void AttrValue::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  1071. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1072. static_cast<AttrValue *>(to)->MergeFrom(
  1073. static_cast<const AttrValue &>(from));
  1074. }
  1075. void AttrValue::MergeFrom(const AttrValue& from) {
  1076. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.AttrValue)
  1077. GOOGLE_DCHECK_NE(&from, this);
  1078. uint32_t cached_has_bits = 0;
  1079. (void) cached_has_bits;
  1080. switch (from.value_case()) {
  1081. case kS: {
  1082. _internal_set_s(from._internal_s());
  1083. break;
  1084. }
  1085. case kI: {
  1086. _internal_set_i(from._internal_i());
  1087. break;
  1088. }
  1089. case kF: {
  1090. _internal_set_f(from._internal_f());
  1091. break;
  1092. }
  1093. case kB: {
  1094. _internal_set_b(from._internal_b());
  1095. break;
  1096. }
  1097. case kType: {
  1098. _internal_set_type(from._internal_type());
  1099. break;
  1100. }
  1101. case kShape: {
  1102. _internal_mutable_shape()->::opencv_tensorflow::TensorShapeProto::MergeFrom(from._internal_shape());
  1103. break;
  1104. }
  1105. case kTensor: {
  1106. _internal_mutable_tensor()->::opencv_tensorflow::TensorProto::MergeFrom(from._internal_tensor());
  1107. break;
  1108. }
  1109. case kList: {
  1110. _internal_mutable_list()->::opencv_tensorflow::AttrValue_ListValue::MergeFrom(from._internal_list());
  1111. break;
  1112. }
  1113. case kFunc: {
  1114. _internal_mutable_func()->::opencv_tensorflow::NameAttrList::MergeFrom(from._internal_func());
  1115. break;
  1116. }
  1117. case kPlaceholder: {
  1118. _internal_set_placeholder(from._internal_placeholder());
  1119. break;
  1120. }
  1121. case VALUE_NOT_SET: {
  1122. break;
  1123. }
  1124. }
  1125. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1126. }
  1127. void AttrValue::CopyFrom(const AttrValue& from) {
  1128. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.AttrValue)
  1129. if (&from == this) return;
  1130. Clear();
  1131. MergeFrom(from);
  1132. }
  1133. bool AttrValue::IsInitialized() const {
  1134. return true;
  1135. }
  1136. void AttrValue::InternalSwap(AttrValue* other) {
  1137. using std::swap;
  1138. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1139. swap(value_, other->value_);
  1140. swap(_oneof_case_[0], other->_oneof_case_[0]);
  1141. }
  1142. ::PROTOBUF_NAMESPACE_ID::Metadata AttrValue::GetMetadata() const {
  1143. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  1144. &descriptor_table_attr_5fvalue_2eproto_getter, &descriptor_table_attr_5fvalue_2eproto_once,
  1145. file_level_metadata_attr_5fvalue_2eproto[1]);
  1146. }
  1147. // ===================================================================
  1148. NameAttrList_AttrEntry_DoNotUse::NameAttrList_AttrEntry_DoNotUse() {}
  1149. NameAttrList_AttrEntry_DoNotUse::NameAttrList_AttrEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  1150. : SuperType(arena) {}
  1151. void NameAttrList_AttrEntry_DoNotUse::MergeFrom(const NameAttrList_AttrEntry_DoNotUse& other) {
  1152. MergeFromInternal(other);
  1153. }
  1154. ::PROTOBUF_NAMESPACE_ID::Metadata NameAttrList_AttrEntry_DoNotUse::GetMetadata() const {
  1155. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  1156. &descriptor_table_attr_5fvalue_2eproto_getter, &descriptor_table_attr_5fvalue_2eproto_once,
  1157. file_level_metadata_attr_5fvalue_2eproto[2]);
  1158. }
  1159. // ===================================================================
  1160. class NameAttrList::_Internal {
  1161. public:
  1162. };
  1163. NameAttrList::NameAttrList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  1164. bool is_message_owned)
  1165. : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  1166. attr_(arena) {
  1167. SharedCtor();
  1168. if (!is_message_owned) {
  1169. RegisterArenaDtor(arena);
  1170. }
  1171. // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.NameAttrList)
  1172. }
  1173. NameAttrList::NameAttrList(const NameAttrList& from)
  1174. : ::PROTOBUF_NAMESPACE_ID::Message() {
  1175. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1176. attr_.MergeFrom(from.attr_);
  1177. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1178. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1179. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1180. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1181. if (!from._internal_name().empty()) {
  1182. name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
  1183. GetArenaForAllocation());
  1184. }
  1185. // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.NameAttrList)
  1186. }
  1187. inline void NameAttrList::SharedCtor() {
  1188. name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1189. #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1190. name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  1191. #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  1192. }
  1193. NameAttrList::~NameAttrList() {
  1194. // @@protoc_insertion_point(destructor:opencv_tensorflow.NameAttrList)
  1195. if (GetArenaForAllocation() != nullptr) return;
  1196. SharedDtor();
  1197. _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1198. }
  1199. inline void NameAttrList::SharedDtor() {
  1200. GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  1201. name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  1202. }
  1203. void NameAttrList::ArenaDtor(void* object) {
  1204. NameAttrList* _this = reinterpret_cast< NameAttrList* >(object);
  1205. (void)_this;
  1206. _this->attr_. ~MapField();
  1207. }
  1208. inline void NameAttrList::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) {
  1209. if (arena != nullptr) {
  1210. arena->OwnCustomDestructor(this, &NameAttrList::ArenaDtor);
  1211. }
  1212. }
  1213. void NameAttrList::SetCachedSize(int size) const {
  1214. _cached_size_.Set(size);
  1215. }
  1216. void NameAttrList::Clear() {
  1217. // @@protoc_insertion_point(message_clear_start:opencv_tensorflow.NameAttrList)
  1218. uint32_t cached_has_bits = 0;
  1219. // Prevent compiler warnings about cached_has_bits being unused
  1220. (void) cached_has_bits;
  1221. attr_.Clear();
  1222. name_.ClearToEmpty();
  1223. _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
  1224. }
  1225. const char* NameAttrList::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  1226. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  1227. while (!ctx->Done(&ptr)) {
  1228. uint32_t tag;
  1229. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  1230. switch (tag >> 3) {
  1231. // string name = 1;
  1232. case 1:
  1233. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
  1234. auto str = _internal_mutable_name();
  1235. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
  1236. CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NameAttrList.name"));
  1237. CHK_(ptr);
  1238. } else
  1239. goto handle_unusual;
  1240. continue;
  1241. // map<string, .opencv_tensorflow.AttrValue> attr = 2;
  1242. case 2:
  1243. if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
  1244. ptr -= 1;
  1245. do {
  1246. ptr += 1;
  1247. ptr = ctx->ParseMessage(&attr_, ptr);
  1248. CHK_(ptr);
  1249. if (!ctx->DataAvailable(ptr)) break;
  1250. } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
  1251. } else
  1252. goto handle_unusual;
  1253. continue;
  1254. default:
  1255. goto handle_unusual;
  1256. } // switch
  1257. handle_unusual:
  1258. if ((tag == 0) || ((tag & 7) == 4)) {
  1259. CHK_(ptr);
  1260. ctx->SetLastTag(tag);
  1261. goto message_done;
  1262. }
  1263. ptr = UnknownFieldParse(
  1264. tag,
  1265. _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
  1266. ptr, ctx);
  1267. CHK_(ptr != nullptr);
  1268. } // while
  1269. message_done:
  1270. return ptr;
  1271. failure:
  1272. ptr = nullptr;
  1273. goto message_done;
  1274. #undef CHK_
  1275. }
  1276. uint8_t* NameAttrList::_InternalSerialize(
  1277. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  1278. // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.NameAttrList)
  1279. uint32_t cached_has_bits = 0;
  1280. (void) cached_has_bits;
  1281. // string name = 1;
  1282. if (!this->_internal_name().empty()) {
  1283. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1284. this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
  1285. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  1286. "opencv_tensorflow.NameAttrList.name");
  1287. target = stream->WriteStringMaybeAliased(
  1288. 1, this->_internal_name(), target);
  1289. }
  1290. // map<string, .opencv_tensorflow.AttrValue> attr = 2;
  1291. if (!this->_internal_attr().empty()) {
  1292. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_pointer
  1293. ConstPtr;
  1294. typedef ConstPtr SortItem;
  1295. typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
  1296. struct Utf8Check {
  1297. static void Check(ConstPtr p) {
  1298. (void)p;
  1299. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  1300. p->first.data(), static_cast<int>(p->first.length()),
  1301. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  1302. "opencv_tensorflow.NameAttrList.AttrEntry.key");
  1303. }
  1304. };
  1305. if (stream->IsSerializationDeterministic() &&
  1306. this->_internal_attr().size() > 1) {
  1307. ::std::unique_ptr<SortItem[]> items(
  1308. new SortItem[this->_internal_attr().size()]);
  1309. typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::size_type size_type;
  1310. size_type n = 0;
  1311. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator
  1312. it = this->_internal_attr().begin();
  1313. it != this->_internal_attr().end(); ++it, ++n) {
  1314. items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
  1315. }
  1316. ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
  1317. for (size_type i = 0; i < n; i++) {
  1318. target = NameAttrList_AttrEntry_DoNotUse::Funcs::InternalSerialize(2, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
  1319. Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
  1320. }
  1321. } else {
  1322. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator
  1323. it = this->_internal_attr().begin();
  1324. it != this->_internal_attr().end(); ++it) {
  1325. target = NameAttrList_AttrEntry_DoNotUse::Funcs::InternalSerialize(2, it->first, it->second, target, stream);
  1326. Utf8Check::Check(&(*it));
  1327. }
  1328. }
  1329. }
  1330. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  1331. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
  1332. _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  1333. }
  1334. // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.NameAttrList)
  1335. return target;
  1336. }
  1337. size_t NameAttrList::ByteSizeLong() const {
  1338. // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.NameAttrList)
  1339. size_t total_size = 0;
  1340. uint32_t cached_has_bits = 0;
  1341. // Prevent compiler warnings about cached_has_bits being unused
  1342. (void) cached_has_bits;
  1343. // map<string, .opencv_tensorflow.AttrValue> attr = 2;
  1344. total_size += 1 *
  1345. ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_attr_size());
  1346. for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator
  1347. it = this->_internal_attr().begin();
  1348. it != this->_internal_attr().end(); ++it) {
  1349. total_size += NameAttrList_AttrEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
  1350. }
  1351. // string name = 1;
  1352. if (!this->_internal_name().empty()) {
  1353. total_size += 1 +
  1354. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  1355. this->_internal_name());
  1356. }
  1357. return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
  1358. }
  1359. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NameAttrList::_class_data_ = {
  1360. ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
  1361. NameAttrList::MergeImpl
  1362. };
  1363. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NameAttrList::GetClassData() const { return &_class_data_; }
  1364. void NameAttrList::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
  1365. const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  1366. static_cast<NameAttrList *>(to)->MergeFrom(
  1367. static_cast<const NameAttrList &>(from));
  1368. }
  1369. void NameAttrList::MergeFrom(const NameAttrList& from) {
  1370. // @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.NameAttrList)
  1371. GOOGLE_DCHECK_NE(&from, this);
  1372. uint32_t cached_has_bits = 0;
  1373. (void) cached_has_bits;
  1374. attr_.MergeFrom(from.attr_);
  1375. if (!from._internal_name().empty()) {
  1376. _internal_set_name(from._internal_name());
  1377. }
  1378. _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  1379. }
  1380. void NameAttrList::CopyFrom(const NameAttrList& from) {
  1381. // @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.NameAttrList)
  1382. if (&from == this) return;
  1383. Clear();
  1384. MergeFrom(from);
  1385. }
  1386. bool NameAttrList::IsInitialized() const {
  1387. return true;
  1388. }
  1389. void NameAttrList::InternalSwap(NameAttrList* other) {
  1390. using std::swap;
  1391. auto* lhs_arena = GetArenaForAllocation();
  1392. auto* rhs_arena = other->GetArenaForAllocation();
  1393. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1394. attr_.InternalSwap(&other->attr_);
  1395. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
  1396. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  1397. &name_, lhs_arena,
  1398. &other->name_, rhs_arena
  1399. );
  1400. }
  1401. ::PROTOBUF_NAMESPACE_ID::Metadata NameAttrList::GetMetadata() const {
  1402. return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
  1403. &descriptor_table_attr_5fvalue_2eproto_getter, &descriptor_table_attr_5fvalue_2eproto_once,
  1404. file_level_metadata_attr_5fvalue_2eproto[3]);
  1405. }
  1406. // @@protoc_insertion_point(namespace_scope)
  1407. } // namespace opencv_tensorflow
  1408. PROTOBUF_NAMESPACE_OPEN
  1409. template<> PROTOBUF_NOINLINE ::opencv_tensorflow::AttrValue_ListValue* Arena::CreateMaybeMessage< ::opencv_tensorflow::AttrValue_ListValue >(Arena* arena) {
  1410. return Arena::CreateMessageInternal< ::opencv_tensorflow::AttrValue_ListValue >(arena);
  1411. }
  1412. template<> PROTOBUF_NOINLINE ::opencv_tensorflow::AttrValue* Arena::CreateMaybeMessage< ::opencv_tensorflow::AttrValue >(Arena* arena) {
  1413. return Arena::CreateMessageInternal< ::opencv_tensorflow::AttrValue >(arena);
  1414. }
  1415. template<> PROTOBUF_NOINLINE ::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse* Arena::CreateMaybeMessage< ::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse >(Arena* arena) {
  1416. return Arena::CreateMessageInternal< ::opencv_tensorflow::NameAttrList_AttrEntry_DoNotUse >(arena);
  1417. }
  1418. template<> PROTOBUF_NOINLINE ::opencv_tensorflow::NameAttrList* Arena::CreateMaybeMessage< ::opencv_tensorflow::NameAttrList >(Arena* arena) {
  1419. return Arena::CreateMessageInternal< ::opencv_tensorflow::NameAttrList >(arena);
  1420. }
  1421. PROTOBUF_NAMESPACE_CLOSE
  1422. // @@protoc_insertion_point(global_scope)
  1423. #include <google/protobuf/port_undef.inc>