1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: tensorflow/core/util/memmapped_file_system.proto
3
4#include "tensorflow/core/util/memmapped_file_system.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>
18extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MemmappedFileSystemDirectoryElement_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto;
19namespace tensorflow {
20class MemmappedFileSystemDirectoryElementDefaultTypeInternal {
21 public:
22 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MemmappedFileSystemDirectoryElement> _instance;
23} _MemmappedFileSystemDirectoryElement_default_instance_;
24class MemmappedFileSystemDirectoryDefaultTypeInternal {
25 public:
26 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MemmappedFileSystemDirectory> _instance;
27} _MemmappedFileSystemDirectory_default_instance_;
28} // namespace tensorflow
29static void InitDefaultsscc_info_MemmappedFileSystemDirectory_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto() {
30 GOOGLE_PROTOBUF_VERIFY_VERSION;
31
32 {
33 void* ptr = &::tensorflow::_MemmappedFileSystemDirectory_default_instance_;
34 new (ptr) ::tensorflow::MemmappedFileSystemDirectory();
35 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
36 }
37 ::tensorflow::MemmappedFileSystemDirectory::InitAsDefaultInstance();
38}
39
40::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_MemmappedFileSystemDirectory_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto =
41 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_MemmappedFileSystemDirectory_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto}, {
42 &scc_info_MemmappedFileSystemDirectoryElement_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto.base,}};
43
44static void InitDefaultsscc_info_MemmappedFileSystemDirectoryElement_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto() {
45 GOOGLE_PROTOBUF_VERIFY_VERSION;
46
47 {
48 void* ptr = &::tensorflow::_MemmappedFileSystemDirectoryElement_default_instance_;
49 new (ptr) ::tensorflow::MemmappedFileSystemDirectoryElement();
50 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
51 }
52 ::tensorflow::MemmappedFileSystemDirectoryElement::InitAsDefaultInstance();
53}
54
55::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MemmappedFileSystemDirectoryElement_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto =
56 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_MemmappedFileSystemDirectoryElement_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto}, {}};
57
58static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto[2];
59static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto = nullptr;
60static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto = nullptr;
61
62const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
63 ~0u, // no _has_bits_
64 PROTOBUF_FIELD_OFFSET(::tensorflow::MemmappedFileSystemDirectoryElement, _internal_metadata_),
65 ~0u, // no _extensions_
66 ~0u, // no _oneof_case_
67 ~0u, // no _weak_field_map_
68 PROTOBUF_FIELD_OFFSET(::tensorflow::MemmappedFileSystemDirectoryElement, offset_),
69 PROTOBUF_FIELD_OFFSET(::tensorflow::MemmappedFileSystemDirectoryElement, name_),
70 PROTOBUF_FIELD_OFFSET(::tensorflow::MemmappedFileSystemDirectoryElement, length_),
71 ~0u, // no _has_bits_
72 PROTOBUF_FIELD_OFFSET(::tensorflow::MemmappedFileSystemDirectory, _internal_metadata_),
73 ~0u, // no _extensions_
74 ~0u, // no _oneof_case_
75 ~0u, // no _weak_field_map_
76 PROTOBUF_FIELD_OFFSET(::tensorflow::MemmappedFileSystemDirectory, element_),
77};
78static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
79 { 0, -1, sizeof(::tensorflow::MemmappedFileSystemDirectoryElement)},
80 { 8, -1, sizeof(::tensorflow::MemmappedFileSystemDirectory)},
81};
82
83static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
84 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_MemmappedFileSystemDirectoryElement_default_instance_),
85 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_MemmappedFileSystemDirectory_default_instance_),
86};
87
88const char descriptor_table_protodef_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
89 "\n0tensorflow/core/util/memmapped_file_sy"
90 "stem.proto\022\ntensorflow\"S\n#MemmappedFileS"
91 "ystemDirectoryElement\022\016\n\006offset\030\001 \001(\004\022\014\n"
92 "\004name\030\002 \001(\t\022\016\n\006length\030\003 \001(\004\"`\n\034Memmapped"
93 "FileSystemDirectory\022@\n\007element\030\001 \003(\0132/.t"
94 "ensorflow.MemmappedFileSystemDirectoryEl"
95 "ementB\003\370\001\001b\006proto3"
96 ;
97static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto_deps[1] = {
98};
99static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto_sccs[2] = {
100 &scc_info_MemmappedFileSystemDirectory_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto.base,
101 &scc_info_MemmappedFileSystemDirectoryElement_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto.base,
102};
103static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto_once;
104static bool descriptor_table_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto_initialized = false;
105const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto = {
106 &descriptor_table_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto, "tensorflow/core/util/memmapped_file_system.proto", 258,
107 &descriptor_table_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto_once, descriptor_table_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto_sccs, descriptor_table_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto_deps, 2, 0,
108 schemas, file_default_instances, TableStruct_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto::offsets,
109 file_level_metadata_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto, 2, file_level_enum_descriptors_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto, file_level_service_descriptors_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto,
110};
111
112// Force running AddDescriptors() at dynamic initialization time.
113static bool dynamic_init_dummy_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto), true);
114namespace tensorflow {
115
116// ===================================================================
117
118void MemmappedFileSystemDirectoryElement::InitAsDefaultInstance() {
119}
120class MemmappedFileSystemDirectoryElement::_Internal {
121 public:
122};
123
124MemmappedFileSystemDirectoryElement::MemmappedFileSystemDirectoryElement()
125 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
126 SharedCtor();
127 // @@protoc_insertion_point(constructor:tensorflow.MemmappedFileSystemDirectoryElement)
128}
129MemmappedFileSystemDirectoryElement::MemmappedFileSystemDirectoryElement(::PROTOBUF_NAMESPACE_ID::Arena* arena)
130 : ::PROTOBUF_NAMESPACE_ID::Message(),
131 _internal_metadata_(arena) {
132 SharedCtor();
133 RegisterArenaDtor(arena);
134 // @@protoc_insertion_point(arena_constructor:tensorflow.MemmappedFileSystemDirectoryElement)
135}
136MemmappedFileSystemDirectoryElement::MemmappedFileSystemDirectoryElement(const MemmappedFileSystemDirectoryElement& from)
137 : ::PROTOBUF_NAMESPACE_ID::Message(),
138 _internal_metadata_(nullptr) {
139 _internal_metadata_.MergeFrom(from._internal_metadata_);
140 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
141 if (!from.name().empty()) {
142 name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(),
143 GetArenaNoVirtual());
144 }
145 ::memcpy(&offset_, &from.offset_,
146 static_cast<size_t>(reinterpret_cast<char*>(&length_) -
147 reinterpret_cast<char*>(&offset_)) + sizeof(length_));
148 // @@protoc_insertion_point(copy_constructor:tensorflow.MemmappedFileSystemDirectoryElement)
149}
150
151void MemmappedFileSystemDirectoryElement::SharedCtor() {
152 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MemmappedFileSystemDirectoryElement_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto.base);
153 name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
154 ::memset(&offset_, 0, static_cast<size_t>(
155 reinterpret_cast<char*>(&length_) -
156 reinterpret_cast<char*>(&offset_)) + sizeof(length_));
157}
158
159MemmappedFileSystemDirectoryElement::~MemmappedFileSystemDirectoryElement() {
160 // @@protoc_insertion_point(destructor:tensorflow.MemmappedFileSystemDirectoryElement)
161 SharedDtor();
162}
163
164void MemmappedFileSystemDirectoryElement::SharedDtor() {
165 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
166 name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
167}
168
169void MemmappedFileSystemDirectoryElement::ArenaDtor(void* object) {
170 MemmappedFileSystemDirectoryElement* _this = reinterpret_cast< MemmappedFileSystemDirectoryElement* >(object);
171 (void)_this;
172}
173void MemmappedFileSystemDirectoryElement::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
174}
175void MemmappedFileSystemDirectoryElement::SetCachedSize(int size) const {
176 _cached_size_.Set(size);
177}
178const MemmappedFileSystemDirectoryElement& MemmappedFileSystemDirectoryElement::default_instance() {
179 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MemmappedFileSystemDirectoryElement_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto.base);
180 return *internal_default_instance();
181}
182
183
184void MemmappedFileSystemDirectoryElement::Clear() {
185// @@protoc_insertion_point(message_clear_start:tensorflow.MemmappedFileSystemDirectoryElement)
186 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
187 // Prevent compiler warnings about cached_has_bits being unused
188 (void) cached_has_bits;
189
190 name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
191 ::memset(&offset_, 0, static_cast<size_t>(
192 reinterpret_cast<char*>(&length_) -
193 reinterpret_cast<char*>(&offset_)) + sizeof(length_));
194 _internal_metadata_.Clear();
195}
196
197#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
198const char* MemmappedFileSystemDirectoryElement::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
199#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
200 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
201 while (!ctx->Done(&ptr)) {
202 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
203 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
204 CHK_(ptr);
205 switch (tag >> 3) {
206 // uint64 offset = 1;
207 case 1:
208 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
209 offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
210 CHK_(ptr);
211 } else goto handle_unusual;
212 continue;
213 // string name = 2;
214 case 2:
215 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
216 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.MemmappedFileSystemDirectoryElement.name");
217 CHK_(ptr);
218 } else goto handle_unusual;
219 continue;
220 // uint64 length = 3;
221 case 3:
222 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
223 length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
224 CHK_(ptr);
225 } else goto handle_unusual;
226 continue;
227 default: {
228 handle_unusual:
229 if ((tag & 7) == 4 || tag == 0) {
230 ctx->SetLastTag(tag);
231 goto success;
232 }
233 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
234 CHK_(ptr != nullptr);
235 continue;
236 }
237 } // switch
238 } // while
239success:
240 return ptr;
241failure:
242 ptr = nullptr;
243 goto success;
244#undef CHK_
245}
246#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
247bool MemmappedFileSystemDirectoryElement::MergePartialFromCodedStream(
248 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
249#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
250 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
251 // @@protoc_insertion_point(parse_start:tensorflow.MemmappedFileSystemDirectoryElement)
252 for (;;) {
253 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
254 tag = p.first;
255 if (!p.second) goto handle_unusual;
256 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
257 // uint64 offset = 1;
258 case 1: {
259 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
260
261 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
262 ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
263 input, &offset_)));
264 } else {
265 goto handle_unusual;
266 }
267 break;
268 }
269
270 // string name = 2;
271 case 2: {
272 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
273 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
274 input, this->mutable_name()));
275 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
276 this->name().data(), static_cast<int>(this->name().length()),
277 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
278 "tensorflow.MemmappedFileSystemDirectoryElement.name"));
279 } else {
280 goto handle_unusual;
281 }
282 break;
283 }
284
285 // uint64 length = 3;
286 case 3: {
287 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
288
289 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
290 ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
291 input, &length_)));
292 } else {
293 goto handle_unusual;
294 }
295 break;
296 }
297
298 default: {
299 handle_unusual:
300 if (tag == 0) {
301 goto success;
302 }
303 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
304 input, tag, _internal_metadata_.mutable_unknown_fields()));
305 break;
306 }
307 }
308 }
309success:
310 // @@protoc_insertion_point(parse_success:tensorflow.MemmappedFileSystemDirectoryElement)
311 return true;
312failure:
313 // @@protoc_insertion_point(parse_failure:tensorflow.MemmappedFileSystemDirectoryElement)
314 return false;
315#undef DO_
316}
317#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
318
319void MemmappedFileSystemDirectoryElement::SerializeWithCachedSizes(
320 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
321 // @@protoc_insertion_point(serialize_start:tensorflow.MemmappedFileSystemDirectoryElement)
322 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
323 (void) cached_has_bits;
324
325 // uint64 offset = 1;
326 if (this->offset() != 0) {
327 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->offset(), output);
328 }
329
330 // string name = 2;
331 if (this->name().size() > 0) {
332 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
333 this->name().data(), static_cast<int>(this->name().length()),
334 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
335 "tensorflow.MemmappedFileSystemDirectoryElement.name");
336 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
337 2, this->name(), output);
338 }
339
340 // uint64 length = 3;
341 if (this->length() != 0) {
342 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(3, this->length(), output);
343 }
344
345 if (_internal_metadata_.have_unknown_fields()) {
346 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
347 _internal_metadata_.unknown_fields(), output);
348 }
349 // @@protoc_insertion_point(serialize_end:tensorflow.MemmappedFileSystemDirectoryElement)
350}
351
352::PROTOBUF_NAMESPACE_ID::uint8* MemmappedFileSystemDirectoryElement::InternalSerializeWithCachedSizesToArray(
353 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
354 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.MemmappedFileSystemDirectoryElement)
355 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
356 (void) cached_has_bits;
357
358 // uint64 offset = 1;
359 if (this->offset() != 0) {
360 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->offset(), target);
361 }
362
363 // string name = 2;
364 if (this->name().size() > 0) {
365 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
366 this->name().data(), static_cast<int>(this->name().length()),
367 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
368 "tensorflow.MemmappedFileSystemDirectoryElement.name");
369 target =
370 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
371 2, this->name(), target);
372 }
373
374 // uint64 length = 3;
375 if (this->length() != 0) {
376 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(3, this->length(), target);
377 }
378
379 if (_internal_metadata_.have_unknown_fields()) {
380 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
381 _internal_metadata_.unknown_fields(), target);
382 }
383 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.MemmappedFileSystemDirectoryElement)
384 return target;
385}
386
387size_t MemmappedFileSystemDirectoryElement::ByteSizeLong() const {
388// @@protoc_insertion_point(message_byte_size_start:tensorflow.MemmappedFileSystemDirectoryElement)
389 size_t total_size = 0;
390
391 if (_internal_metadata_.have_unknown_fields()) {
392 total_size +=
393 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
394 _internal_metadata_.unknown_fields());
395 }
396 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
397 // Prevent compiler warnings about cached_has_bits being unused
398 (void) cached_has_bits;
399
400 // string name = 2;
401 if (this->name().size() > 0) {
402 total_size += 1 +
403 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
404 this->name());
405 }
406
407 // uint64 offset = 1;
408 if (this->offset() != 0) {
409 total_size += 1 +
410 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
411 this->offset());
412 }
413
414 // uint64 length = 3;
415 if (this->length() != 0) {
416 total_size += 1 +
417 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
418 this->length());
419 }
420
421 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
422 SetCachedSize(cached_size);
423 return total_size;
424}
425
426void MemmappedFileSystemDirectoryElement::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
427// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.MemmappedFileSystemDirectoryElement)
428 GOOGLE_DCHECK_NE(&from, this);
429 const MemmappedFileSystemDirectoryElement* source =
430 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<MemmappedFileSystemDirectoryElement>(
431 &from);
432 if (source == nullptr) {
433 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.MemmappedFileSystemDirectoryElement)
434 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
435 } else {
436 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.MemmappedFileSystemDirectoryElement)
437 MergeFrom(*source);
438 }
439}
440
441void MemmappedFileSystemDirectoryElement::MergeFrom(const MemmappedFileSystemDirectoryElement& from) {
442// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.MemmappedFileSystemDirectoryElement)
443 GOOGLE_DCHECK_NE(&from, this);
444 _internal_metadata_.MergeFrom(from._internal_metadata_);
445 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
446 (void) cached_has_bits;
447
448 if (from.name().size() > 0) {
449 set_name(from.name());
450 }
451 if (from.offset() != 0) {
452 set_offset(from.offset());
453 }
454 if (from.length() != 0) {
455 set_length(from.length());
456 }
457}
458
459void MemmappedFileSystemDirectoryElement::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
460// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.MemmappedFileSystemDirectoryElement)
461 if (&from == this) return;
462 Clear();
463 MergeFrom(from);
464}
465
466void MemmappedFileSystemDirectoryElement::CopyFrom(const MemmappedFileSystemDirectoryElement& from) {
467// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.MemmappedFileSystemDirectoryElement)
468 if (&from == this) return;
469 Clear();
470 MergeFrom(from);
471}
472
473bool MemmappedFileSystemDirectoryElement::IsInitialized() const {
474 return true;
475}
476
477void MemmappedFileSystemDirectoryElement::InternalSwap(MemmappedFileSystemDirectoryElement* other) {
478 using std::swap;
479 _internal_metadata_.Swap(&other->_internal_metadata_);
480 name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
481 GetArenaNoVirtual());
482 swap(offset_, other->offset_);
483 swap(length_, other->length_);
484}
485
486::PROTOBUF_NAMESPACE_ID::Metadata MemmappedFileSystemDirectoryElement::GetMetadata() const {
487 return GetMetadataStatic();
488}
489
490
491// ===================================================================
492
493void MemmappedFileSystemDirectory::InitAsDefaultInstance() {
494}
495class MemmappedFileSystemDirectory::_Internal {
496 public:
497};
498
499MemmappedFileSystemDirectory::MemmappedFileSystemDirectory()
500 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
501 SharedCtor();
502 // @@protoc_insertion_point(constructor:tensorflow.MemmappedFileSystemDirectory)
503}
504MemmappedFileSystemDirectory::MemmappedFileSystemDirectory(::PROTOBUF_NAMESPACE_ID::Arena* arena)
505 : ::PROTOBUF_NAMESPACE_ID::Message(),
506 _internal_metadata_(arena),
507 element_(arena) {
508 SharedCtor();
509 RegisterArenaDtor(arena);
510 // @@protoc_insertion_point(arena_constructor:tensorflow.MemmappedFileSystemDirectory)
511}
512MemmappedFileSystemDirectory::MemmappedFileSystemDirectory(const MemmappedFileSystemDirectory& from)
513 : ::PROTOBUF_NAMESPACE_ID::Message(),
514 _internal_metadata_(nullptr),
515 element_(from.element_) {
516 _internal_metadata_.MergeFrom(from._internal_metadata_);
517 // @@protoc_insertion_point(copy_constructor:tensorflow.MemmappedFileSystemDirectory)
518}
519
520void MemmappedFileSystemDirectory::SharedCtor() {
521 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MemmappedFileSystemDirectory_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto.base);
522}
523
524MemmappedFileSystemDirectory::~MemmappedFileSystemDirectory() {
525 // @@protoc_insertion_point(destructor:tensorflow.MemmappedFileSystemDirectory)
526 SharedDtor();
527}
528
529void MemmappedFileSystemDirectory::SharedDtor() {
530 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
531}
532
533void MemmappedFileSystemDirectory::ArenaDtor(void* object) {
534 MemmappedFileSystemDirectory* _this = reinterpret_cast< MemmappedFileSystemDirectory* >(object);
535 (void)_this;
536}
537void MemmappedFileSystemDirectory::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
538}
539void MemmappedFileSystemDirectory::SetCachedSize(int size) const {
540 _cached_size_.Set(size);
541}
542const MemmappedFileSystemDirectory& MemmappedFileSystemDirectory::default_instance() {
543 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MemmappedFileSystemDirectory_tensorflow_2fcore_2futil_2fmemmapped_5ffile_5fsystem_2eproto.base);
544 return *internal_default_instance();
545}
546
547
548void MemmappedFileSystemDirectory::Clear() {
549// @@protoc_insertion_point(message_clear_start:tensorflow.MemmappedFileSystemDirectory)
550 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
551 // Prevent compiler warnings about cached_has_bits being unused
552 (void) cached_has_bits;
553
554 element_.Clear();
555 _internal_metadata_.Clear();
556}
557
558#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
559const char* MemmappedFileSystemDirectory::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
560#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
561 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
562 while (!ctx->Done(&ptr)) {
563 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
564 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
565 CHK_(ptr);
566 switch (tag >> 3) {
567 // repeated .tensorflow.MemmappedFileSystemDirectoryElement element = 1;
568 case 1:
569 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
570 ptr -= 1;
571 do {
572 ptr += 1;
573 ptr = ctx->ParseMessage(add_element(), ptr);
574 CHK_(ptr);
575 if (!ctx->DataAvailable(ptr)) break;
576 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10);
577 } else goto handle_unusual;
578 continue;
579 default: {
580 handle_unusual:
581 if ((tag & 7) == 4 || tag == 0) {
582 ctx->SetLastTag(tag);
583 goto success;
584 }
585 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
586 CHK_(ptr != nullptr);
587 continue;
588 }
589 } // switch
590 } // while
591success:
592 return ptr;
593failure:
594 ptr = nullptr;
595 goto success;
596#undef CHK_
597}
598#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
599bool MemmappedFileSystemDirectory::MergePartialFromCodedStream(
600 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
601#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
602 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
603 // @@protoc_insertion_point(parse_start:tensorflow.MemmappedFileSystemDirectory)
604 for (;;) {
605 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
606 tag = p.first;
607 if (!p.second) goto handle_unusual;
608 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
609 // repeated .tensorflow.MemmappedFileSystemDirectoryElement element = 1;
610 case 1: {
611 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
612 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
613 input, add_element()));
614 } else {
615 goto handle_unusual;
616 }
617 break;
618 }
619
620 default: {
621 handle_unusual:
622 if (tag == 0) {
623 goto success;
624 }
625 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
626 input, tag, _internal_metadata_.mutable_unknown_fields()));
627 break;
628 }
629 }
630 }
631success:
632 // @@protoc_insertion_point(parse_success:tensorflow.MemmappedFileSystemDirectory)
633 return true;
634failure:
635 // @@protoc_insertion_point(parse_failure:tensorflow.MemmappedFileSystemDirectory)
636 return false;
637#undef DO_
638}
639#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
640
641void MemmappedFileSystemDirectory::SerializeWithCachedSizes(
642 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
643 // @@protoc_insertion_point(serialize_start:tensorflow.MemmappedFileSystemDirectory)
644 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
645 (void) cached_has_bits;
646
647 // repeated .tensorflow.MemmappedFileSystemDirectoryElement element = 1;
648 for (unsigned int i = 0,
649 n = static_cast<unsigned int>(this->element_size()); i < n; i++) {
650 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
651 1,
652 this->element(static_cast<int>(i)),
653 output);
654 }
655
656 if (_internal_metadata_.have_unknown_fields()) {
657 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
658 _internal_metadata_.unknown_fields(), output);
659 }
660 // @@protoc_insertion_point(serialize_end:tensorflow.MemmappedFileSystemDirectory)
661}
662
663::PROTOBUF_NAMESPACE_ID::uint8* MemmappedFileSystemDirectory::InternalSerializeWithCachedSizesToArray(
664 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
665 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.MemmappedFileSystemDirectory)
666 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
667 (void) cached_has_bits;
668
669 // repeated .tensorflow.MemmappedFileSystemDirectoryElement element = 1;
670 for (unsigned int i = 0,
671 n = static_cast<unsigned int>(this->element_size()); i < n; i++) {
672 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
673 InternalWriteMessageToArray(
674 1, this->element(static_cast<int>(i)), target);
675 }
676
677 if (_internal_metadata_.have_unknown_fields()) {
678 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
679 _internal_metadata_.unknown_fields(), target);
680 }
681 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.MemmappedFileSystemDirectory)
682 return target;
683}
684
685size_t MemmappedFileSystemDirectory::ByteSizeLong() const {
686// @@protoc_insertion_point(message_byte_size_start:tensorflow.MemmappedFileSystemDirectory)
687 size_t total_size = 0;
688
689 if (_internal_metadata_.have_unknown_fields()) {
690 total_size +=
691 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
692 _internal_metadata_.unknown_fields());
693 }
694 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
695 // Prevent compiler warnings about cached_has_bits being unused
696 (void) cached_has_bits;
697
698 // repeated .tensorflow.MemmappedFileSystemDirectoryElement element = 1;
699 {
700 unsigned int count = static_cast<unsigned int>(this->element_size());
701 total_size += 1UL * count;
702 for (unsigned int i = 0; i < count; i++) {
703 total_size +=
704 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
705 this->element(static_cast<int>(i)));
706 }
707 }
708
709 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
710 SetCachedSize(cached_size);
711 return total_size;
712}
713
714void MemmappedFileSystemDirectory::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
715// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.MemmappedFileSystemDirectory)
716 GOOGLE_DCHECK_NE(&from, this);
717 const MemmappedFileSystemDirectory* source =
718 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<MemmappedFileSystemDirectory>(
719 &from);
720 if (source == nullptr) {
721 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.MemmappedFileSystemDirectory)
722 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
723 } else {
724 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.MemmappedFileSystemDirectory)
725 MergeFrom(*source);
726 }
727}
728
729void MemmappedFileSystemDirectory::MergeFrom(const MemmappedFileSystemDirectory& from) {
730// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.MemmappedFileSystemDirectory)
731 GOOGLE_DCHECK_NE(&from, this);
732 _internal_metadata_.MergeFrom(from._internal_metadata_);
733 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
734 (void) cached_has_bits;
735
736 element_.MergeFrom(from.element_);
737}
738
739void MemmappedFileSystemDirectory::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
740// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.MemmappedFileSystemDirectory)
741 if (&from == this) return;
742 Clear();
743 MergeFrom(from);
744}
745
746void MemmappedFileSystemDirectory::CopyFrom(const MemmappedFileSystemDirectory& from) {
747// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.MemmappedFileSystemDirectory)
748 if (&from == this) return;
749 Clear();
750 MergeFrom(from);
751}
752
753bool MemmappedFileSystemDirectory::IsInitialized() const {
754 return true;
755}
756
757void MemmappedFileSystemDirectory::InternalSwap(MemmappedFileSystemDirectory* other) {
758 using std::swap;
759 _internal_metadata_.Swap(&other->_internal_metadata_);
760 CastToBase(&element_)->InternalSwap(CastToBase(&other->element_));
761}
762
763::PROTOBUF_NAMESPACE_ID::Metadata MemmappedFileSystemDirectory::GetMetadata() const {
764 return GetMetadataStatic();
765}
766
767
768// @@protoc_insertion_point(namespace_scope)
769} // namespace tensorflow
770PROTOBUF_NAMESPACE_OPEN
771template<> PROTOBUF_NOINLINE ::tensorflow::MemmappedFileSystemDirectoryElement* Arena::CreateMaybeMessage< ::tensorflow::MemmappedFileSystemDirectoryElement >(Arena* arena) {
772 return Arena::CreateMessageInternal< ::tensorflow::MemmappedFileSystemDirectoryElement >(arena);
773}
774template<> PROTOBUF_NOINLINE ::tensorflow::MemmappedFileSystemDirectory* Arena::CreateMaybeMessage< ::tensorflow::MemmappedFileSystemDirectory >(Arena* arena) {
775 return Arena::CreateMessageInternal< ::tensorflow::MemmappedFileSystemDirectory >(arena);
776}
777PROTOBUF_NAMESPACE_CLOSE
778
779// @@protoc_insertion_point(global_scope)
780#include <google/protobuf/port_undef.inc>
781