1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/protobuf/tensor_bundle.proto |
3 | |
4 | #include "tensorflow/core/protobuf/tensor_bundle.pb.h" |
5 | |
6 | #include <algorithm> |
7 | |
8 | #include <google/protobuf/stubs/common.h> |
9 | #include <google/protobuf/io/coded_stream.h> |
10 | #include <google/protobuf/extension_set.h> |
11 | #include <google/protobuf/wire_format_lite.h> |
12 | #include <google/protobuf/descriptor.h> |
13 | #include <google/protobuf/generated_message_reflection.h> |
14 | #include <google/protobuf/reflection_ops.h> |
15 | #include <google/protobuf/wire_format.h> |
16 | // @@protoc_insertion_point(includes) |
17 | #include <google/protobuf/port_def.inc> |
18 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto; |
19 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TensorSliceProto_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto; |
20 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fversions_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_VersionDef_tensorflow_2fcore_2fframework_2fversions_2eproto; |
21 | namespace tensorflow { |
22 | class { |
23 | public: |
24 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BundleHeaderProto> ; |
25 | } ; |
26 | class BundleEntryProtoDefaultTypeInternal { |
27 | public: |
28 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BundleEntryProto> _instance; |
29 | } _BundleEntryProto_default_instance_; |
30 | } // namespace tensorflow |
31 | static void InitDefaultsscc_info_BundleEntryProto_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto() { |
32 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
33 | |
34 | { |
35 | void* ptr = &::tensorflow::_BundleEntryProto_default_instance_; |
36 | new (ptr) ::tensorflow::BundleEntryProto(); |
37 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
38 | } |
39 | ::tensorflow::BundleEntryProto::InitAsDefaultInstance(); |
40 | } |
41 | |
42 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_BundleEntryProto_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto = |
43 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_BundleEntryProto_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto}, { |
44 | &scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto.base, |
45 | &scc_info_TensorSliceProto_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto.base,}}; |
46 | |
47 | static void () { |
48 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
49 | |
50 | { |
51 | void* ptr = &::tensorflow::_BundleHeaderProto_default_instance_; |
52 | new (ptr) ::tensorflow::BundleHeaderProto(); |
53 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
54 | } |
55 | ::tensorflow::BundleHeaderProto::InitAsDefaultInstance(); |
56 | } |
57 | |
58 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> = |
59 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_BundleHeaderProto_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto}, { |
60 | &scc_info_VersionDef_tensorflow_2fcore_2fframework_2fversions_2eproto.base,}}; |
61 | |
62 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto[2]; |
63 | static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto[1]; |
64 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto = nullptr; |
65 | |
66 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
67 | ~0u, // no _has_bits_ |
68 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleHeaderProto, _internal_metadata_), |
69 | ~0u, // no _extensions_ |
70 | ~0u, // no _oneof_case_ |
71 | ~0u, // no _weak_field_map_ |
72 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleHeaderProto, num_shards_), |
73 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleHeaderProto, endianness_), |
74 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleHeaderProto, version_), |
75 | ~0u, // no _has_bits_ |
76 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleEntryProto, _internal_metadata_), |
77 | ~0u, // no _extensions_ |
78 | ~0u, // no _oneof_case_ |
79 | ~0u, // no _weak_field_map_ |
80 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleEntryProto, dtype_), |
81 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleEntryProto, shape_), |
82 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleEntryProto, shard_id_), |
83 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleEntryProto, offset_), |
84 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleEntryProto, size_), |
85 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleEntryProto, crc32c_), |
86 | PROTOBUF_FIELD_OFFSET(::tensorflow::BundleEntryProto, slices_), |
87 | }; |
88 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
89 | { 0, -1, sizeof(::tensorflow::BundleHeaderProto)}, |
90 | { 8, -1, sizeof(::tensorflow::BundleEntryProto)}, |
91 | }; |
92 | |
93 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
94 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_BundleHeaderProto_default_instance_), |
95 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_BundleEntryProto_default_instance_), |
96 | }; |
97 | |
98 | const char descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
99 | "\n,tensorflow/core/protobuf/tensor_bundle" |
100 | ".proto\022\ntensorflow\032,tensorflow/core/fram" |
101 | "ework/tensor_shape.proto\032,tensorflow/cor" |
102 | "e/framework/tensor_slice.proto\032%tensorfl" |
103 | "ow/core/framework/types.proto\032(tensorflo" |
104 | "w/core/framework/versions.proto\"\261\001\n\021Bund" |
105 | "leHeaderProto\022\022\n\nnum_shards\030\001 \001(\005\022<\n\nend" |
106 | "ianness\030\002 \001(\0162(.tensorflow.BundleHeaderP" |
107 | "roto.Endianness\022\'\n\007version\030\003 \001(\0132\026.tenso" |
108 | "rflow.VersionDef\"!\n\nEndianness\022\n\n\006LITTLE" |
109 | "\020\000\022\007\n\003BIG\020\001\"\322\001\n\020BundleEntryProto\022#\n\005dtyp" |
110 | "e\030\001 \001(\0162\024.tensorflow.DataType\022+\n\005shape\030\002" |
111 | " \001(\0132\034.tensorflow.TensorShapeProto\022\020\n\010sh" |
112 | "ard_id\030\003 \001(\005\022\016\n\006offset\030\004 \001(\003\022\014\n\004size\030\005 \001" |
113 | "(\003\022\016\n\006crc32c\030\006 \001(\007\022,\n\006slices\030\007 \003(\0132\034.ten" |
114 | "sorflow.TensorSliceProtoB\205\001\n\023org.tensorf" |
115 | "low.utilB\022TensorBundleProtosP\001ZUgithub.c" |
116 | "om/tensorflow/tensorflow/tensorflow/go/c" |
117 | "ore/protobuf/for_core_protos_go_proto\370\001\001" |
118 | "b\006proto3" |
119 | ; |
120 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto_deps[4] = { |
121 | &::descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto, |
122 | &::descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto, |
123 | &::descriptor_table_tensorflow_2fcore_2fframework_2ftypes_2eproto, |
124 | &::descriptor_table_tensorflow_2fcore_2fframework_2fversions_2eproto, |
125 | }; |
126 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto_sccs[2] = { |
127 | &scc_info_BundleEntryProto_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto.base, |
128 | &scc_info_BundleHeaderProto_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto.base, |
129 | }; |
130 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto_once; |
131 | static bool descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto_initialized = false; |
132 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto = { |
133 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto, "tensorflow/core/protobuf/tensor_bundle.proto" , 768, |
134 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto_once, descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto_deps, 2, 4, |
135 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto::offsets, |
136 | file_level_metadata_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto, 2, file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto, |
137 | }; |
138 | |
139 | // Force running AddDescriptors() at dynamic initialization time. |
140 | static bool dynamic_init_dummy_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto), true); |
141 | namespace tensorflow { |
142 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* () { |
143 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto); |
144 | return file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto[0]; |
145 | } |
146 | bool (int value) { |
147 | switch (value) { |
148 | case 0: |
149 | case 1: |
150 | return true; |
151 | default: |
152 | return false; |
153 | } |
154 | } |
155 | |
156 | #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
157 | constexpr BundleHeaderProto_Endianness BundleHeaderProto::LITTLE; |
158 | constexpr BundleHeaderProto_Endianness BundleHeaderProto::BIG; |
159 | constexpr BundleHeaderProto_Endianness BundleHeaderProto::Endianness_MIN; |
160 | constexpr BundleHeaderProto_Endianness BundleHeaderProto::Endianness_MAX; |
161 | constexpr int BundleHeaderProto::Endianness_ARRAYSIZE; |
162 | #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900) |
163 | |
164 | // =================================================================== |
165 | |
166 | void BundleHeaderProto::() { |
167 | ::tensorflow::_BundleHeaderProto_default_instance_._instance.get_mutable()->version_ = const_cast< ::tensorflow::VersionDef*>( |
168 | ::tensorflow::VersionDef::internal_default_instance()); |
169 | } |
170 | class BundleHeaderProto:: { |
171 | public: |
172 | static const ::tensorflow::VersionDef& version(const BundleHeaderProto* msg); |
173 | }; |
174 | |
175 | const ::tensorflow::VersionDef& |
176 | BundleHeaderProto::_Internal::(const BundleHeaderProto* msg) { |
177 | return *msg->version_; |
178 | } |
179 | void BundleHeaderProto::( |
180 | ::tensorflow::VersionDef* version) { |
181 | if (GetArenaNoVirtual() == nullptr) { |
182 | delete version_; |
183 | } |
184 | version_ = version; |
185 | if (version) { |
186 | |
187 | } else { |
188 | |
189 | } |
190 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.BundleHeaderProto.version) |
191 | } |
192 | void BundleHeaderProto::() { |
193 | if (GetArenaNoVirtual() == nullptr && version_ != nullptr) { |
194 | delete version_; |
195 | } |
196 | version_ = nullptr; |
197 | } |
198 | BundleHeaderProto::() |
199 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
200 | SharedCtor(); |
201 | // @@protoc_insertion_point(constructor:tensorflow.BundleHeaderProto) |
202 | } |
203 | BundleHeaderProto::(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
204 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
205 | _internal_metadata_(arena) { |
206 | SharedCtor(); |
207 | RegisterArenaDtor(arena); |
208 | // @@protoc_insertion_point(arena_constructor:tensorflow.BundleHeaderProto) |
209 | } |
210 | BundleHeaderProto::(const BundleHeaderProto& from) |
211 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
212 | _internal_metadata_(nullptr) { |
213 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
214 | if (from.has_version()) { |
215 | version_ = new ::tensorflow::VersionDef(*from.version_); |
216 | } else { |
217 | version_ = nullptr; |
218 | } |
219 | ::memcpy(&num_shards_, &from.num_shards_, |
220 | static_cast<size_t>(reinterpret_cast<char*>(&endianness_) - |
221 | reinterpret_cast<char*>(&num_shards_)) + sizeof(endianness_)); |
222 | // @@protoc_insertion_point(copy_constructor:tensorflow.BundleHeaderProto) |
223 | } |
224 | |
225 | void BundleHeaderProto::() { |
226 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BundleHeaderProto_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto.base); |
227 | ::memset(&version_, 0, static_cast<size_t>( |
228 | reinterpret_cast<char*>(&endianness_) - |
229 | reinterpret_cast<char*>(&version_)) + sizeof(endianness_)); |
230 | } |
231 | |
232 | BundleHeaderProto::() { |
233 | // @@protoc_insertion_point(destructor:tensorflow.BundleHeaderProto) |
234 | SharedDtor(); |
235 | } |
236 | |
237 | void BundleHeaderProto::() { |
238 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
239 | if (this != internal_default_instance()) delete version_; |
240 | } |
241 | |
242 | void BundleHeaderProto::(void* object) { |
243 | BundleHeaderProto* _this = reinterpret_cast< BundleHeaderProto* >(object); |
244 | (void)_this; |
245 | } |
246 | void BundleHeaderProto::(::PROTOBUF_NAMESPACE_ID::Arena*) { |
247 | } |
248 | void BundleHeaderProto::(int size) const { |
249 | _cached_size_.Set(size); |
250 | } |
251 | const BundleHeaderProto& BundleHeaderProto::() { |
252 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BundleHeaderProto_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto.base); |
253 | return *internal_default_instance(); |
254 | } |
255 | |
256 | |
257 | void BundleHeaderProto::() { |
258 | // @@protoc_insertion_point(message_clear_start:tensorflow.BundleHeaderProto) |
259 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
260 | // Prevent compiler warnings about cached_has_bits being unused |
261 | (void) cached_has_bits; |
262 | |
263 | if (GetArenaNoVirtual() == nullptr && version_ != nullptr) { |
264 | delete version_; |
265 | } |
266 | version_ = nullptr; |
267 | ::memset(&num_shards_, 0, static_cast<size_t>( |
268 | reinterpret_cast<char*>(&endianness_) - |
269 | reinterpret_cast<char*>(&num_shards_)) + sizeof(endianness_)); |
270 | _internal_metadata_.Clear(); |
271 | } |
272 | |
273 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
274 | const char* BundleHeaderProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
275 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
276 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
277 | while (!ctx->Done(&ptr)) { |
278 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
279 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
280 | CHK_(ptr); |
281 | switch (tag >> 3) { |
282 | // int32 num_shards = 1; |
283 | case 1: |
284 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
285 | num_shards_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
286 | CHK_(ptr); |
287 | } else goto handle_unusual; |
288 | continue; |
289 | // .tensorflow.BundleHeaderProto.Endianness endianness = 2; |
290 | case 2: |
291 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
292 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
293 | CHK_(ptr); |
294 | set_endianness(static_cast<::tensorflow::BundleHeaderProto_Endianness>(val)); |
295 | } else goto handle_unusual; |
296 | continue; |
297 | // .tensorflow.VersionDef version = 3; |
298 | case 3: |
299 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
300 | ptr = ctx->ParseMessage(mutable_version(), ptr); |
301 | CHK_(ptr); |
302 | } else goto handle_unusual; |
303 | continue; |
304 | default: { |
305 | handle_unusual: |
306 | if ((tag & 7) == 4 || tag == 0) { |
307 | ctx->SetLastTag(tag); |
308 | goto success; |
309 | } |
310 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
311 | CHK_(ptr != nullptr); |
312 | continue; |
313 | } |
314 | } // switch |
315 | } // while |
316 | success: |
317 | return ptr; |
318 | failure: |
319 | ptr = nullptr; |
320 | goto success; |
321 | #undef CHK_ |
322 | } |
323 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
324 | bool BundleHeaderProto::( |
325 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
326 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
327 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
328 | // @@protoc_insertion_point(parse_start:tensorflow.BundleHeaderProto) |
329 | for (;;) { |
330 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
331 | tag = p.first; |
332 | if (!p.second) goto handle_unusual; |
333 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
334 | // int32 num_shards = 1; |
335 | case 1: { |
336 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
337 | |
338 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
339 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
340 | input, &num_shards_))); |
341 | } else { |
342 | goto handle_unusual; |
343 | } |
344 | break; |
345 | } |
346 | |
347 | // .tensorflow.BundleHeaderProto.Endianness endianness = 2; |
348 | case 2: { |
349 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
350 | int value = 0; |
351 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
352 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
353 | input, &value))); |
354 | set_endianness(static_cast< ::tensorflow::BundleHeaderProto_Endianness >(value)); |
355 | } else { |
356 | goto handle_unusual; |
357 | } |
358 | break; |
359 | } |
360 | |
361 | // .tensorflow.VersionDef version = 3; |
362 | case 3: { |
363 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
364 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
365 | input, mutable_version())); |
366 | } else { |
367 | goto handle_unusual; |
368 | } |
369 | break; |
370 | } |
371 | |
372 | default: { |
373 | handle_unusual: |
374 | if (tag == 0) { |
375 | goto success; |
376 | } |
377 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
378 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
379 | break; |
380 | } |
381 | } |
382 | } |
383 | success: |
384 | // @@protoc_insertion_point(parse_success:tensorflow.BundleHeaderProto) |
385 | return true; |
386 | failure: |
387 | // @@protoc_insertion_point(parse_failure:tensorflow.BundleHeaderProto) |
388 | return false; |
389 | #undef DO_ |
390 | } |
391 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
392 | |
393 | void BundleHeaderProto::( |
394 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
395 | // @@protoc_insertion_point(serialize_start:tensorflow.BundleHeaderProto) |
396 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
397 | (void) cached_has_bits; |
398 | |
399 | // int32 num_shards = 1; |
400 | if (this->num_shards() != 0) { |
401 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->num_shards(), output); |
402 | } |
403 | |
404 | // .tensorflow.BundleHeaderProto.Endianness endianness = 2; |
405 | if (this->endianness() != 0) { |
406 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
407 | 2, this->endianness(), output); |
408 | } |
409 | |
410 | // .tensorflow.VersionDef version = 3; |
411 | if (this->has_version()) { |
412 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
413 | 3, _Internal::version(this), output); |
414 | } |
415 | |
416 | if (_internal_metadata_.have_unknown_fields()) { |
417 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
418 | _internal_metadata_.unknown_fields(), output); |
419 | } |
420 | // @@protoc_insertion_point(serialize_end:tensorflow.BundleHeaderProto) |
421 | } |
422 | |
423 | ::PROTOBUF_NAMESPACE_ID::uint8* BundleHeaderProto::( |
424 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
425 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.BundleHeaderProto) |
426 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
427 | (void) cached_has_bits; |
428 | |
429 | // int32 num_shards = 1; |
430 | if (this->num_shards() != 0) { |
431 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->num_shards(), target); |
432 | } |
433 | |
434 | // .tensorflow.BundleHeaderProto.Endianness endianness = 2; |
435 | if (this->endianness() != 0) { |
436 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
437 | 2, this->endianness(), target); |
438 | } |
439 | |
440 | // .tensorflow.VersionDef version = 3; |
441 | if (this->has_version()) { |
442 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
443 | InternalWriteMessageToArray( |
444 | 3, _Internal::version(this), target); |
445 | } |
446 | |
447 | if (_internal_metadata_.have_unknown_fields()) { |
448 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
449 | _internal_metadata_.unknown_fields(), target); |
450 | } |
451 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.BundleHeaderProto) |
452 | return target; |
453 | } |
454 | |
455 | size_t BundleHeaderProto::() const { |
456 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.BundleHeaderProto) |
457 | size_t total_size = 0; |
458 | |
459 | if (_internal_metadata_.have_unknown_fields()) { |
460 | total_size += |
461 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
462 | _internal_metadata_.unknown_fields()); |
463 | } |
464 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
465 | // Prevent compiler warnings about cached_has_bits being unused |
466 | (void) cached_has_bits; |
467 | |
468 | // .tensorflow.VersionDef version = 3; |
469 | if (this->has_version()) { |
470 | total_size += 1 + |
471 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
472 | *version_); |
473 | } |
474 | |
475 | // int32 num_shards = 1; |
476 | if (this->num_shards() != 0) { |
477 | total_size += 1 + |
478 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
479 | this->num_shards()); |
480 | } |
481 | |
482 | // .tensorflow.BundleHeaderProto.Endianness endianness = 2; |
483 | if (this->endianness() != 0) { |
484 | total_size += 1 + |
485 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->endianness()); |
486 | } |
487 | |
488 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
489 | SetCachedSize(cached_size); |
490 | return total_size; |
491 | } |
492 | |
493 | void BundleHeaderProto::(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
494 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.BundleHeaderProto) |
495 | GOOGLE_DCHECK_NE(&from, this); |
496 | const BundleHeaderProto* source = |
497 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BundleHeaderProto>( |
498 | &from); |
499 | if (source == nullptr) { |
500 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.BundleHeaderProto) |
501 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
502 | } else { |
503 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.BundleHeaderProto) |
504 | MergeFrom(*source); |
505 | } |
506 | } |
507 | |
508 | void BundleHeaderProto::(const BundleHeaderProto& from) { |
509 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.BundleHeaderProto) |
510 | GOOGLE_DCHECK_NE(&from, this); |
511 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
512 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
513 | (void) cached_has_bits; |
514 | |
515 | if (from.has_version()) { |
516 | mutable_version()->::tensorflow::VersionDef::MergeFrom(from.version()); |
517 | } |
518 | if (from.num_shards() != 0) { |
519 | set_num_shards(from.num_shards()); |
520 | } |
521 | if (from.endianness() != 0) { |
522 | set_endianness(from.endianness()); |
523 | } |
524 | } |
525 | |
526 | void BundleHeaderProto::(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
527 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.BundleHeaderProto) |
528 | if (&from == this) return; |
529 | Clear(); |
530 | MergeFrom(from); |
531 | } |
532 | |
533 | void BundleHeaderProto::(const BundleHeaderProto& from) { |
534 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.BundleHeaderProto) |
535 | if (&from == this) return; |
536 | Clear(); |
537 | MergeFrom(from); |
538 | } |
539 | |
540 | bool BundleHeaderProto::() const { |
541 | return true; |
542 | } |
543 | |
544 | void BundleHeaderProto::(BundleHeaderProto* other) { |
545 | using std::swap; |
546 | _internal_metadata_.Swap(&other->_internal_metadata_); |
547 | swap(version_, other->version_); |
548 | swap(num_shards_, other->num_shards_); |
549 | swap(endianness_, other->endianness_); |
550 | } |
551 | |
552 | ::PROTOBUF_NAMESPACE_ID::Metadata BundleHeaderProto::() const { |
553 | return GetMetadataStatic(); |
554 | } |
555 | |
556 | |
557 | // =================================================================== |
558 | |
559 | void BundleEntryProto::InitAsDefaultInstance() { |
560 | ::tensorflow::_BundleEntryProto_default_instance_._instance.get_mutable()->shape_ = const_cast< ::tensorflow::TensorShapeProto*>( |
561 | ::tensorflow::TensorShapeProto::internal_default_instance()); |
562 | } |
563 | class BundleEntryProto::_Internal { |
564 | public: |
565 | static const ::tensorflow::TensorShapeProto& shape(const BundleEntryProto* msg); |
566 | }; |
567 | |
568 | const ::tensorflow::TensorShapeProto& |
569 | BundleEntryProto::_Internal::shape(const BundleEntryProto* msg) { |
570 | return *msg->shape_; |
571 | } |
572 | void BundleEntryProto::unsafe_arena_set_allocated_shape( |
573 | ::tensorflow::TensorShapeProto* shape) { |
574 | if (GetArenaNoVirtual() == nullptr) { |
575 | delete shape_; |
576 | } |
577 | shape_ = shape; |
578 | if (shape) { |
579 | |
580 | } else { |
581 | |
582 | } |
583 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.BundleEntryProto.shape) |
584 | } |
585 | void BundleEntryProto::clear_shape() { |
586 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
587 | delete shape_; |
588 | } |
589 | shape_ = nullptr; |
590 | } |
591 | void BundleEntryProto::clear_slices() { |
592 | slices_.Clear(); |
593 | } |
594 | BundleEntryProto::BundleEntryProto() |
595 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
596 | SharedCtor(); |
597 | // @@protoc_insertion_point(constructor:tensorflow.BundleEntryProto) |
598 | } |
599 | BundleEntryProto::BundleEntryProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
600 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
601 | _internal_metadata_(arena), |
602 | slices_(arena) { |
603 | SharedCtor(); |
604 | RegisterArenaDtor(arena); |
605 | // @@protoc_insertion_point(arena_constructor:tensorflow.BundleEntryProto) |
606 | } |
607 | BundleEntryProto::BundleEntryProto(const BundleEntryProto& from) |
608 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
609 | _internal_metadata_(nullptr), |
610 | slices_(from.slices_) { |
611 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
612 | if (from.has_shape()) { |
613 | shape_ = new ::tensorflow::TensorShapeProto(*from.shape_); |
614 | } else { |
615 | shape_ = nullptr; |
616 | } |
617 | ::memcpy(&dtype_, &from.dtype_, |
618 | static_cast<size_t>(reinterpret_cast<char*>(&crc32c_) - |
619 | reinterpret_cast<char*>(&dtype_)) + sizeof(crc32c_)); |
620 | // @@protoc_insertion_point(copy_constructor:tensorflow.BundleEntryProto) |
621 | } |
622 | |
623 | void BundleEntryProto::SharedCtor() { |
624 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_BundleEntryProto_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto.base); |
625 | ::memset(&shape_, 0, static_cast<size_t>( |
626 | reinterpret_cast<char*>(&crc32c_) - |
627 | reinterpret_cast<char*>(&shape_)) + sizeof(crc32c_)); |
628 | } |
629 | |
630 | BundleEntryProto::~BundleEntryProto() { |
631 | // @@protoc_insertion_point(destructor:tensorflow.BundleEntryProto) |
632 | SharedDtor(); |
633 | } |
634 | |
635 | void BundleEntryProto::SharedDtor() { |
636 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
637 | if (this != internal_default_instance()) delete shape_; |
638 | } |
639 | |
640 | void BundleEntryProto::ArenaDtor(void* object) { |
641 | BundleEntryProto* _this = reinterpret_cast< BundleEntryProto* >(object); |
642 | (void)_this; |
643 | } |
644 | void BundleEntryProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
645 | } |
646 | void BundleEntryProto::SetCachedSize(int size) const { |
647 | _cached_size_.Set(size); |
648 | } |
649 | const BundleEntryProto& BundleEntryProto::default_instance() { |
650 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BundleEntryProto_tensorflow_2fcore_2fprotobuf_2ftensor_5fbundle_2eproto.base); |
651 | return *internal_default_instance(); |
652 | } |
653 | |
654 | |
655 | void BundleEntryProto::Clear() { |
656 | // @@protoc_insertion_point(message_clear_start:tensorflow.BundleEntryProto) |
657 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
658 | // Prevent compiler warnings about cached_has_bits being unused |
659 | (void) cached_has_bits; |
660 | |
661 | slices_.Clear(); |
662 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
663 | delete shape_; |
664 | } |
665 | shape_ = nullptr; |
666 | ::memset(&dtype_, 0, static_cast<size_t>( |
667 | reinterpret_cast<char*>(&crc32c_) - |
668 | reinterpret_cast<char*>(&dtype_)) + sizeof(crc32c_)); |
669 | _internal_metadata_.Clear(); |
670 | } |
671 | |
672 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
673 | const char* BundleEntryProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
674 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
675 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
676 | while (!ctx->Done(&ptr)) { |
677 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
678 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
679 | CHK_(ptr); |
680 | switch (tag >> 3) { |
681 | // .tensorflow.DataType dtype = 1; |
682 | case 1: |
683 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
684 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
685 | CHK_(ptr); |
686 | set_dtype(static_cast<::tensorflow::DataType>(val)); |
687 | } else goto handle_unusual; |
688 | continue; |
689 | // .tensorflow.TensorShapeProto shape = 2; |
690 | case 2: |
691 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
692 | ptr = ctx->ParseMessage(mutable_shape(), ptr); |
693 | CHK_(ptr); |
694 | } else goto handle_unusual; |
695 | continue; |
696 | // int32 shard_id = 3; |
697 | case 3: |
698 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
699 | shard_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
700 | CHK_(ptr); |
701 | } else goto handle_unusual; |
702 | continue; |
703 | // int64 offset = 4; |
704 | case 4: |
705 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
706 | offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
707 | CHK_(ptr); |
708 | } else goto handle_unusual; |
709 | continue; |
710 | // int64 size = 5; |
711 | case 5: |
712 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { |
713 | size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
714 | CHK_(ptr); |
715 | } else goto handle_unusual; |
716 | continue; |
717 | // fixed32 crc32c = 6; |
718 | case 6: |
719 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 53)) { |
720 | crc32c_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint32>(ptr); |
721 | ptr += sizeof(::PROTOBUF_NAMESPACE_ID::uint32); |
722 | } else goto handle_unusual; |
723 | continue; |
724 | // repeated .tensorflow.TensorSliceProto slices = 7; |
725 | case 7: |
726 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
727 | ptr -= 1; |
728 | do { |
729 | ptr += 1; |
730 | ptr = ctx->ParseMessage(add_slices(), ptr); |
731 | CHK_(ptr); |
732 | if (!ctx->DataAvailable(ptr)) break; |
733 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 58); |
734 | } else goto handle_unusual; |
735 | continue; |
736 | default: { |
737 | handle_unusual: |
738 | if ((tag & 7) == 4 || tag == 0) { |
739 | ctx->SetLastTag(tag); |
740 | goto success; |
741 | } |
742 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
743 | CHK_(ptr != nullptr); |
744 | continue; |
745 | } |
746 | } // switch |
747 | } // while |
748 | success: |
749 | return ptr; |
750 | failure: |
751 | ptr = nullptr; |
752 | goto success; |
753 | #undef CHK_ |
754 | } |
755 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
756 | bool BundleEntryProto::MergePartialFromCodedStream( |
757 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
758 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
759 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
760 | // @@protoc_insertion_point(parse_start:tensorflow.BundleEntryProto) |
761 | for (;;) { |
762 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
763 | tag = p.first; |
764 | if (!p.second) goto handle_unusual; |
765 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
766 | // .tensorflow.DataType dtype = 1; |
767 | case 1: { |
768 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
769 | int value = 0; |
770 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
771 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
772 | input, &value))); |
773 | set_dtype(static_cast< ::tensorflow::DataType >(value)); |
774 | } else { |
775 | goto handle_unusual; |
776 | } |
777 | break; |
778 | } |
779 | |
780 | // .tensorflow.TensorShapeProto shape = 2; |
781 | case 2: { |
782 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
783 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
784 | input, mutable_shape())); |
785 | } else { |
786 | goto handle_unusual; |
787 | } |
788 | break; |
789 | } |
790 | |
791 | // int32 shard_id = 3; |
792 | case 3: { |
793 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
794 | |
795 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
796 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
797 | input, &shard_id_))); |
798 | } else { |
799 | goto handle_unusual; |
800 | } |
801 | break; |
802 | } |
803 | |
804 | // int64 offset = 4; |
805 | case 4: { |
806 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
807 | |
808 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
809 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
810 | input, &offset_))); |
811 | } else { |
812 | goto handle_unusual; |
813 | } |
814 | break; |
815 | } |
816 | |
817 | // int64 size = 5; |
818 | case 5: { |
819 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { |
820 | |
821 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
822 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
823 | input, &size_))); |
824 | } else { |
825 | goto handle_unusual; |
826 | } |
827 | break; |
828 | } |
829 | |
830 | // fixed32 crc32c = 6; |
831 | case 6: { |
832 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (53 & 0xFF)) { |
833 | |
834 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
835 | ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_FIXED32>( |
836 | input, &crc32c_))); |
837 | } else { |
838 | goto handle_unusual; |
839 | } |
840 | break; |
841 | } |
842 | |
843 | // repeated .tensorflow.TensorSliceProto slices = 7; |
844 | case 7: { |
845 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
846 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
847 | input, add_slices())); |
848 | } else { |
849 | goto handle_unusual; |
850 | } |
851 | break; |
852 | } |
853 | |
854 | default: { |
855 | handle_unusual: |
856 | if (tag == 0) { |
857 | goto success; |
858 | } |
859 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
860 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
861 | break; |
862 | } |
863 | } |
864 | } |
865 | success: |
866 | // @@protoc_insertion_point(parse_success:tensorflow.BundleEntryProto) |
867 | return true; |
868 | failure: |
869 | // @@protoc_insertion_point(parse_failure:tensorflow.BundleEntryProto) |
870 | return false; |
871 | #undef DO_ |
872 | } |
873 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
874 | |
875 | void BundleEntryProto::SerializeWithCachedSizes( |
876 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
877 | // @@protoc_insertion_point(serialize_start:tensorflow.BundleEntryProto) |
878 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
879 | (void) cached_has_bits; |
880 | |
881 | // .tensorflow.DataType dtype = 1; |
882 | if (this->dtype() != 0) { |
883 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
884 | 1, this->dtype(), output); |
885 | } |
886 | |
887 | // .tensorflow.TensorShapeProto shape = 2; |
888 | if (this->has_shape()) { |
889 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
890 | 2, _Internal::shape(this), output); |
891 | } |
892 | |
893 | // int32 shard_id = 3; |
894 | if (this->shard_id() != 0) { |
895 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->shard_id(), output); |
896 | } |
897 | |
898 | // int64 offset = 4; |
899 | if (this->offset() != 0) { |
900 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->offset(), output); |
901 | } |
902 | |
903 | // int64 size = 5; |
904 | if (this->size() != 0) { |
905 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(5, this->size(), output); |
906 | } |
907 | |
908 | // fixed32 crc32c = 6; |
909 | if (this->crc32c() != 0) { |
910 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed32(6, this->crc32c(), output); |
911 | } |
912 | |
913 | // repeated .tensorflow.TensorSliceProto slices = 7; |
914 | for (unsigned int i = 0, |
915 | n = static_cast<unsigned int>(this->slices_size()); i < n; i++) { |
916 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
917 | 7, |
918 | this->slices(static_cast<int>(i)), |
919 | output); |
920 | } |
921 | |
922 | if (_internal_metadata_.have_unknown_fields()) { |
923 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
924 | _internal_metadata_.unknown_fields(), output); |
925 | } |
926 | // @@protoc_insertion_point(serialize_end:tensorflow.BundleEntryProto) |
927 | } |
928 | |
929 | ::PROTOBUF_NAMESPACE_ID::uint8* BundleEntryProto::InternalSerializeWithCachedSizesToArray( |
930 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
931 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.BundleEntryProto) |
932 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
933 | (void) cached_has_bits; |
934 | |
935 | // .tensorflow.DataType dtype = 1; |
936 | if (this->dtype() != 0) { |
937 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
938 | 1, this->dtype(), target); |
939 | } |
940 | |
941 | // .tensorflow.TensorShapeProto shape = 2; |
942 | if (this->has_shape()) { |
943 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
944 | InternalWriteMessageToArray( |
945 | 2, _Internal::shape(this), target); |
946 | } |
947 | |
948 | // int32 shard_id = 3; |
949 | if (this->shard_id() != 0) { |
950 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->shard_id(), target); |
951 | } |
952 | |
953 | // int64 offset = 4; |
954 | if (this->offset() != 0) { |
955 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->offset(), target); |
956 | } |
957 | |
958 | // int64 size = 5; |
959 | if (this->size() != 0) { |
960 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->size(), target); |
961 | } |
962 | |
963 | // fixed32 crc32c = 6; |
964 | if (this->crc32c() != 0) { |
965 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFixed32ToArray(6, this->crc32c(), target); |
966 | } |
967 | |
968 | // repeated .tensorflow.TensorSliceProto slices = 7; |
969 | for (unsigned int i = 0, |
970 | n = static_cast<unsigned int>(this->slices_size()); i < n; i++) { |
971 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
972 | InternalWriteMessageToArray( |
973 | 7, this->slices(static_cast<int>(i)), target); |
974 | } |
975 | |
976 | if (_internal_metadata_.have_unknown_fields()) { |
977 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
978 | _internal_metadata_.unknown_fields(), target); |
979 | } |
980 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.BundleEntryProto) |
981 | return target; |
982 | } |
983 | |
984 | size_t BundleEntryProto::ByteSizeLong() const { |
985 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.BundleEntryProto) |
986 | size_t total_size = 0; |
987 | |
988 | if (_internal_metadata_.have_unknown_fields()) { |
989 | total_size += |
990 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
991 | _internal_metadata_.unknown_fields()); |
992 | } |
993 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
994 | // Prevent compiler warnings about cached_has_bits being unused |
995 | (void) cached_has_bits; |
996 | |
997 | // repeated .tensorflow.TensorSliceProto slices = 7; |
998 | { |
999 | unsigned int count = static_cast<unsigned int>(this->slices_size()); |
1000 | total_size += 1UL * count; |
1001 | for (unsigned int i = 0; i < count; i++) { |
1002 | total_size += |
1003 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1004 | this->slices(static_cast<int>(i))); |
1005 | } |
1006 | } |
1007 | |
1008 | // .tensorflow.TensorShapeProto shape = 2; |
1009 | if (this->has_shape()) { |
1010 | total_size += 1 + |
1011 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1012 | *shape_); |
1013 | } |
1014 | |
1015 | // .tensorflow.DataType dtype = 1; |
1016 | if (this->dtype() != 0) { |
1017 | total_size += 1 + |
1018 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->dtype()); |
1019 | } |
1020 | |
1021 | // int32 shard_id = 3; |
1022 | if (this->shard_id() != 0) { |
1023 | total_size += 1 + |
1024 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
1025 | this->shard_id()); |
1026 | } |
1027 | |
1028 | // int64 offset = 4; |
1029 | if (this->offset() != 0) { |
1030 | total_size += 1 + |
1031 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1032 | this->offset()); |
1033 | } |
1034 | |
1035 | // int64 size = 5; |
1036 | if (this->size() != 0) { |
1037 | total_size += 1 + |
1038 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1039 | this->size()); |
1040 | } |
1041 | |
1042 | // fixed32 crc32c = 6; |
1043 | if (this->crc32c() != 0) { |
1044 | total_size += 1 + 4; |
1045 | } |
1046 | |
1047 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1048 | SetCachedSize(cached_size); |
1049 | return total_size; |
1050 | } |
1051 | |
1052 | void BundleEntryProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1053 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.BundleEntryProto) |
1054 | GOOGLE_DCHECK_NE(&from, this); |
1055 | const BundleEntryProto* source = |
1056 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BundleEntryProto>( |
1057 | &from); |
1058 | if (source == nullptr) { |
1059 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.BundleEntryProto) |
1060 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1061 | } else { |
1062 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.BundleEntryProto) |
1063 | MergeFrom(*source); |
1064 | } |
1065 | } |
1066 | |
1067 | void BundleEntryProto::MergeFrom(const BundleEntryProto& from) { |
1068 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.BundleEntryProto) |
1069 | GOOGLE_DCHECK_NE(&from, this); |
1070 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1071 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1072 | (void) cached_has_bits; |
1073 | |
1074 | slices_.MergeFrom(from.slices_); |
1075 | if (from.has_shape()) { |
1076 | mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.shape()); |
1077 | } |
1078 | if (from.dtype() != 0) { |
1079 | set_dtype(from.dtype()); |
1080 | } |
1081 | if (from.shard_id() != 0) { |
1082 | set_shard_id(from.shard_id()); |
1083 | } |
1084 | if (from.offset() != 0) { |
1085 | set_offset(from.offset()); |
1086 | } |
1087 | if (from.size() != 0) { |
1088 | set_size(from.size()); |
1089 | } |
1090 | if (from.crc32c() != 0) { |
1091 | set_crc32c(from.crc32c()); |
1092 | } |
1093 | } |
1094 | |
1095 | void BundleEntryProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1096 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.BundleEntryProto) |
1097 | if (&from == this) return; |
1098 | Clear(); |
1099 | MergeFrom(from); |
1100 | } |
1101 | |
1102 | void BundleEntryProto::CopyFrom(const BundleEntryProto& from) { |
1103 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.BundleEntryProto) |
1104 | if (&from == this) return; |
1105 | Clear(); |
1106 | MergeFrom(from); |
1107 | } |
1108 | |
1109 | bool BundleEntryProto::IsInitialized() const { |
1110 | return true; |
1111 | } |
1112 | |
1113 | void BundleEntryProto::InternalSwap(BundleEntryProto* other) { |
1114 | using std::swap; |
1115 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1116 | CastToBase(&slices_)->InternalSwap(CastToBase(&other->slices_)); |
1117 | swap(shape_, other->shape_); |
1118 | swap(dtype_, other->dtype_); |
1119 | swap(shard_id_, other->shard_id_); |
1120 | swap(offset_, other->offset_); |
1121 | swap(size_, other->size_); |
1122 | swap(crc32c_, other->crc32c_); |
1123 | } |
1124 | |
1125 | ::PROTOBUF_NAMESPACE_ID::Metadata BundleEntryProto::GetMetadata() const { |
1126 | return GetMetadataStatic(); |
1127 | } |
1128 | |
1129 | |
1130 | // @@protoc_insertion_point(namespace_scope) |
1131 | } // namespace tensorflow |
1132 | PROTOBUF_NAMESPACE_OPEN |
1133 | template<> PROTOBUF_NOINLINE ::tensorflow::BundleHeaderProto* Arena::CreateMaybeMessage< ::tensorflow::BundleHeaderProto >(Arena* arena) { |
1134 | return Arena::CreateMessageInternal< ::tensorflow::BundleHeaderProto >(arena); |
1135 | } |
1136 | template<> PROTOBUF_NOINLINE ::tensorflow::BundleEntryProto* Arena::CreateMaybeMessage< ::tensorflow::BundleEntryProto >(Arena* arena) { |
1137 | return Arena::CreateMessageInternal< ::tensorflow::BundleEntryProto >(arena); |
1138 | } |
1139 | PROTOBUF_NAMESPACE_CLOSE |
1140 | |
1141 | // @@protoc_insertion_point(global_scope) |
1142 | #include <google/protobuf/port_undef.inc> |
1143 | |