1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/framework/reader_base.proto |
3 | |
4 | #include "tensorflow/core/framework/reader_base.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 | namespace tensorflow { |
19 | class ReaderBaseStateDefaultTypeInternal { |
20 | public: |
21 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ReaderBaseState> _instance; |
22 | } _ReaderBaseState_default_instance_; |
23 | } // namespace tensorflow |
24 | static void InitDefaultsscc_info_ReaderBaseState_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto() { |
25 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
26 | |
27 | { |
28 | void* ptr = &::tensorflow::_ReaderBaseState_default_instance_; |
29 | new (ptr) ::tensorflow::ReaderBaseState(); |
30 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
31 | } |
32 | ::tensorflow::ReaderBaseState::InitAsDefaultInstance(); |
33 | } |
34 | |
35 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ReaderBaseState_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto = |
36 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ReaderBaseState_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto}, {}}; |
37 | |
38 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto[1]; |
39 | static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto = nullptr; |
40 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto = nullptr; |
41 | |
42 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
43 | ~0u, // no _has_bits_ |
44 | PROTOBUF_FIELD_OFFSET(::tensorflow::ReaderBaseState, _internal_metadata_), |
45 | ~0u, // no _extensions_ |
46 | ~0u, // no _oneof_case_ |
47 | ~0u, // no _weak_field_map_ |
48 | PROTOBUF_FIELD_OFFSET(::tensorflow::ReaderBaseState, work_started_), |
49 | PROTOBUF_FIELD_OFFSET(::tensorflow::ReaderBaseState, work_finished_), |
50 | PROTOBUF_FIELD_OFFSET(::tensorflow::ReaderBaseState, num_records_produced_), |
51 | PROTOBUF_FIELD_OFFSET(::tensorflow::ReaderBaseState, current_work_), |
52 | }; |
53 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
54 | { 0, -1, sizeof(::tensorflow::ReaderBaseState)}, |
55 | }; |
56 | |
57 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
58 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_ReaderBaseState_default_instance_), |
59 | }; |
60 | |
61 | const char descriptor_table_protodef_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
62 | "\n+tensorflow/core/framework/reader_base." |
63 | "proto\022\ntensorflow\"r\n\017ReaderBaseState\022\024\n\014" |
64 | "work_started\030\001 \001(\003\022\025\n\rwork_finished\030\002 \001(" |
65 | "\003\022\034\n\024num_records_produced\030\003 \001(\003\022\024\n\014curre" |
66 | "nt_work\030\004 \001(\014B\205\001\n\030org.tensorflow.framewo" |
67 | "rkB\020ReaderBaseProtosP\001ZRgithub.com/tenso" |
68 | "rflow/tensorflow/tensorflow/go/core/fram" |
69 | "ework/reader_base_go_proto\370\001\001b\006proto3" |
70 | ; |
71 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto_deps[1] = { |
72 | }; |
73 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto_sccs[1] = { |
74 | &scc_info_ReaderBaseState_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto.base, |
75 | }; |
76 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto_once; |
77 | static bool descriptor_table_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto_initialized = false; |
78 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto = { |
79 | &descriptor_table_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto, "tensorflow/core/framework/reader_base.proto" , 317, |
80 | &descriptor_table_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto_once, descriptor_table_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto_deps, 1, 0, |
81 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto::offsets, |
82 | file_level_metadata_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto, 1, file_level_enum_descriptors_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto, |
83 | }; |
84 | |
85 | // Force running AddDescriptors() at dynamic initialization time. |
86 | static bool dynamic_init_dummy_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto), true); |
87 | namespace tensorflow { |
88 | |
89 | // =================================================================== |
90 | |
91 | void ReaderBaseState::InitAsDefaultInstance() { |
92 | } |
93 | class ReaderBaseState::_Internal { |
94 | public: |
95 | }; |
96 | |
97 | ReaderBaseState::ReaderBaseState() |
98 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
99 | SharedCtor(); |
100 | // @@protoc_insertion_point(constructor:tensorflow.ReaderBaseState) |
101 | } |
102 | ReaderBaseState::ReaderBaseState(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
103 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
104 | _internal_metadata_(arena) { |
105 | SharedCtor(); |
106 | RegisterArenaDtor(arena); |
107 | // @@protoc_insertion_point(arena_constructor:tensorflow.ReaderBaseState) |
108 | } |
109 | ReaderBaseState::ReaderBaseState(const ReaderBaseState& from) |
110 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
111 | _internal_metadata_(nullptr) { |
112 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
113 | current_work_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
114 | if (!from.current_work().empty()) { |
115 | current_work_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.current_work(), |
116 | GetArenaNoVirtual()); |
117 | } |
118 | ::memcpy(&work_started_, &from.work_started_, |
119 | static_cast<size_t>(reinterpret_cast<char*>(&num_records_produced_) - |
120 | reinterpret_cast<char*>(&work_started_)) + sizeof(num_records_produced_)); |
121 | // @@protoc_insertion_point(copy_constructor:tensorflow.ReaderBaseState) |
122 | } |
123 | |
124 | void ReaderBaseState::SharedCtor() { |
125 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ReaderBaseState_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto.base); |
126 | current_work_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
127 | ::memset(&work_started_, 0, static_cast<size_t>( |
128 | reinterpret_cast<char*>(&num_records_produced_) - |
129 | reinterpret_cast<char*>(&work_started_)) + sizeof(num_records_produced_)); |
130 | } |
131 | |
132 | ReaderBaseState::~ReaderBaseState() { |
133 | // @@protoc_insertion_point(destructor:tensorflow.ReaderBaseState) |
134 | SharedDtor(); |
135 | } |
136 | |
137 | void ReaderBaseState::SharedDtor() { |
138 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
139 | current_work_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
140 | } |
141 | |
142 | void ReaderBaseState::ArenaDtor(void* object) { |
143 | ReaderBaseState* _this = reinterpret_cast< ReaderBaseState* >(object); |
144 | (void)_this; |
145 | } |
146 | void ReaderBaseState::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
147 | } |
148 | void ReaderBaseState::SetCachedSize(int size) const { |
149 | _cached_size_.Set(size); |
150 | } |
151 | const ReaderBaseState& ReaderBaseState::default_instance() { |
152 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ReaderBaseState_tensorflow_2fcore_2fframework_2freader_5fbase_2eproto.base); |
153 | return *internal_default_instance(); |
154 | } |
155 | |
156 | |
157 | void ReaderBaseState::Clear() { |
158 | // @@protoc_insertion_point(message_clear_start:tensorflow.ReaderBaseState) |
159 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
160 | // Prevent compiler warnings about cached_has_bits being unused |
161 | (void) cached_has_bits; |
162 | |
163 | current_work_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
164 | ::memset(&work_started_, 0, static_cast<size_t>( |
165 | reinterpret_cast<char*>(&num_records_produced_) - |
166 | reinterpret_cast<char*>(&work_started_)) + sizeof(num_records_produced_)); |
167 | _internal_metadata_.Clear(); |
168 | } |
169 | |
170 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
171 | const char* ReaderBaseState::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
172 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
173 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
174 | while (!ctx->Done(&ptr)) { |
175 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
176 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
177 | CHK_(ptr); |
178 | switch (tag >> 3) { |
179 | // int64 work_started = 1; |
180 | case 1: |
181 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
182 | work_started_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
183 | CHK_(ptr); |
184 | } else goto handle_unusual; |
185 | continue; |
186 | // int64 work_finished = 2; |
187 | case 2: |
188 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
189 | work_finished_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
190 | CHK_(ptr); |
191 | } else goto handle_unusual; |
192 | continue; |
193 | // int64 num_records_produced = 3; |
194 | case 3: |
195 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
196 | num_records_produced_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
197 | CHK_(ptr); |
198 | } else goto handle_unusual; |
199 | continue; |
200 | // bytes current_work = 4; |
201 | case 4: |
202 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
203 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_current_work(), ptr, ctx); |
204 | CHK_(ptr); |
205 | } else goto handle_unusual; |
206 | continue; |
207 | default: { |
208 | handle_unusual: |
209 | if ((tag & 7) == 4 || tag == 0) { |
210 | ctx->SetLastTag(tag); |
211 | goto success; |
212 | } |
213 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
214 | CHK_(ptr != nullptr); |
215 | continue; |
216 | } |
217 | } // switch |
218 | } // while |
219 | success: |
220 | return ptr; |
221 | failure: |
222 | ptr = nullptr; |
223 | goto success; |
224 | #undef CHK_ |
225 | } |
226 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
227 | bool ReaderBaseState::MergePartialFromCodedStream( |
228 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
229 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
230 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
231 | // @@protoc_insertion_point(parse_start:tensorflow.ReaderBaseState) |
232 | for (;;) { |
233 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
234 | tag = p.first; |
235 | if (!p.second) goto handle_unusual; |
236 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
237 | // int64 work_started = 1; |
238 | case 1: { |
239 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
240 | |
241 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
242 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
243 | input, &work_started_))); |
244 | } else { |
245 | goto handle_unusual; |
246 | } |
247 | break; |
248 | } |
249 | |
250 | // int64 work_finished = 2; |
251 | case 2: { |
252 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
253 | |
254 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
255 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
256 | input, &work_finished_))); |
257 | } else { |
258 | goto handle_unusual; |
259 | } |
260 | break; |
261 | } |
262 | |
263 | // int64 num_records_produced = 3; |
264 | case 3: { |
265 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
266 | |
267 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
268 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
269 | input, &num_records_produced_))); |
270 | } else { |
271 | goto handle_unusual; |
272 | } |
273 | break; |
274 | } |
275 | |
276 | // bytes current_work = 4; |
277 | case 4: { |
278 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
279 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( |
280 | input, this->mutable_current_work())); |
281 | } else { |
282 | goto handle_unusual; |
283 | } |
284 | break; |
285 | } |
286 | |
287 | default: { |
288 | handle_unusual: |
289 | if (tag == 0) { |
290 | goto success; |
291 | } |
292 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
293 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
294 | break; |
295 | } |
296 | } |
297 | } |
298 | success: |
299 | // @@protoc_insertion_point(parse_success:tensorflow.ReaderBaseState) |
300 | return true; |
301 | failure: |
302 | // @@protoc_insertion_point(parse_failure:tensorflow.ReaderBaseState) |
303 | return false; |
304 | #undef DO_ |
305 | } |
306 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
307 | |
308 | void ReaderBaseState::SerializeWithCachedSizes( |
309 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
310 | // @@protoc_insertion_point(serialize_start:tensorflow.ReaderBaseState) |
311 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
312 | (void) cached_has_bits; |
313 | |
314 | // int64 work_started = 1; |
315 | if (this->work_started() != 0) { |
316 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->work_started(), output); |
317 | } |
318 | |
319 | // int64 work_finished = 2; |
320 | if (this->work_finished() != 0) { |
321 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->work_finished(), output); |
322 | } |
323 | |
324 | // int64 num_records_produced = 3; |
325 | if (this->num_records_produced() != 0) { |
326 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->num_records_produced(), output); |
327 | } |
328 | |
329 | // bytes current_work = 4; |
330 | if (this->current_work().size() > 0) { |
331 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( |
332 | 4, this->current_work(), output); |
333 | } |
334 | |
335 | if (_internal_metadata_.have_unknown_fields()) { |
336 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
337 | _internal_metadata_.unknown_fields(), output); |
338 | } |
339 | // @@protoc_insertion_point(serialize_end:tensorflow.ReaderBaseState) |
340 | } |
341 | |
342 | ::PROTOBUF_NAMESPACE_ID::uint8* ReaderBaseState::InternalSerializeWithCachedSizesToArray( |
343 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
344 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ReaderBaseState) |
345 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
346 | (void) cached_has_bits; |
347 | |
348 | // int64 work_started = 1; |
349 | if (this->work_started() != 0) { |
350 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->work_started(), target); |
351 | } |
352 | |
353 | // int64 work_finished = 2; |
354 | if (this->work_finished() != 0) { |
355 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->work_finished(), target); |
356 | } |
357 | |
358 | // int64 num_records_produced = 3; |
359 | if (this->num_records_produced() != 0) { |
360 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->num_records_produced(), target); |
361 | } |
362 | |
363 | // bytes current_work = 4; |
364 | if (this->current_work().size() > 0) { |
365 | target = |
366 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( |
367 | 4, this->current_work(), target); |
368 | } |
369 | |
370 | if (_internal_metadata_.have_unknown_fields()) { |
371 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
372 | _internal_metadata_.unknown_fields(), target); |
373 | } |
374 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ReaderBaseState) |
375 | return target; |
376 | } |
377 | |
378 | size_t ReaderBaseState::ByteSizeLong() const { |
379 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.ReaderBaseState) |
380 | size_t total_size = 0; |
381 | |
382 | if (_internal_metadata_.have_unknown_fields()) { |
383 | total_size += |
384 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
385 | _internal_metadata_.unknown_fields()); |
386 | } |
387 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
388 | // Prevent compiler warnings about cached_has_bits being unused |
389 | (void) cached_has_bits; |
390 | |
391 | // bytes current_work = 4; |
392 | if (this->current_work().size() > 0) { |
393 | total_size += 1 + |
394 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
395 | this->current_work()); |
396 | } |
397 | |
398 | // int64 work_started = 1; |
399 | if (this->work_started() != 0) { |
400 | total_size += 1 + |
401 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
402 | this->work_started()); |
403 | } |
404 | |
405 | // int64 work_finished = 2; |
406 | if (this->work_finished() != 0) { |
407 | total_size += 1 + |
408 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
409 | this->work_finished()); |
410 | } |
411 | |
412 | // int64 num_records_produced = 3; |
413 | if (this->num_records_produced() != 0) { |
414 | total_size += 1 + |
415 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
416 | this->num_records_produced()); |
417 | } |
418 | |
419 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
420 | SetCachedSize(cached_size); |
421 | return total_size; |
422 | } |
423 | |
424 | void ReaderBaseState::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
425 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ReaderBaseState) |
426 | GOOGLE_DCHECK_NE(&from, this); |
427 | const ReaderBaseState* source = |
428 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ReaderBaseState>( |
429 | &from); |
430 | if (source == nullptr) { |
431 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ReaderBaseState) |
432 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
433 | } else { |
434 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ReaderBaseState) |
435 | MergeFrom(*source); |
436 | } |
437 | } |
438 | |
439 | void ReaderBaseState::MergeFrom(const ReaderBaseState& from) { |
440 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ReaderBaseState) |
441 | GOOGLE_DCHECK_NE(&from, this); |
442 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
443 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
444 | (void) cached_has_bits; |
445 | |
446 | if (from.current_work().size() > 0) { |
447 | set_current_work(from.current_work()); |
448 | } |
449 | if (from.work_started() != 0) { |
450 | set_work_started(from.work_started()); |
451 | } |
452 | if (from.work_finished() != 0) { |
453 | set_work_finished(from.work_finished()); |
454 | } |
455 | if (from.num_records_produced() != 0) { |
456 | set_num_records_produced(from.num_records_produced()); |
457 | } |
458 | } |
459 | |
460 | void ReaderBaseState::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
461 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ReaderBaseState) |
462 | if (&from == this) return; |
463 | Clear(); |
464 | MergeFrom(from); |
465 | } |
466 | |
467 | void ReaderBaseState::CopyFrom(const ReaderBaseState& from) { |
468 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ReaderBaseState) |
469 | if (&from == this) return; |
470 | Clear(); |
471 | MergeFrom(from); |
472 | } |
473 | |
474 | bool ReaderBaseState::IsInitialized() const { |
475 | return true; |
476 | } |
477 | |
478 | void ReaderBaseState::InternalSwap(ReaderBaseState* other) { |
479 | using std::swap; |
480 | _internal_metadata_.Swap(&other->_internal_metadata_); |
481 | current_work_.Swap(&other->current_work_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
482 | GetArenaNoVirtual()); |
483 | swap(work_started_, other->work_started_); |
484 | swap(work_finished_, other->work_finished_); |
485 | swap(num_records_produced_, other->num_records_produced_); |
486 | } |
487 | |
488 | ::PROTOBUF_NAMESPACE_ID::Metadata ReaderBaseState::GetMetadata() const { |
489 | return GetMetadataStatic(); |
490 | } |
491 | |
492 | |
493 | // @@protoc_insertion_point(namespace_scope) |
494 | } // namespace tensorflow |
495 | PROTOBUF_NAMESPACE_OPEN |
496 | template<> PROTOBUF_NOINLINE ::tensorflow::ReaderBaseState* Arena::CreateMaybeMessage< ::tensorflow::ReaderBaseState >(Arena* arena) { |
497 | return Arena::CreateMessageInternal< ::tensorflow::ReaderBaseState >(arena); |
498 | } |
499 | PROTOBUF_NAMESPACE_CLOSE |
500 | |
501 | // @@protoc_insertion_point(global_scope) |
502 | #include <google/protobuf/port_undef.inc> |
503 | |