1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: tensorflow/core/protobuf/control_flow.proto
3
4#include "tensorflow/core/protobuf/control_flow.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_2fprotobuf_2fcontrol_5fflow_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CondContextDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto;
19extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ValuesDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto;
20extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ValuesDef_ExternalValuesEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto;
21namespace tensorflow {
22class ValuesDef_ExternalValuesEntry_DoNotUseDefaultTypeInternal {
23 public:
24 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ValuesDef_ExternalValuesEntry_DoNotUse> _instance;
25} _ValuesDef_ExternalValuesEntry_DoNotUse_default_instance_;
26class ValuesDefDefaultTypeInternal {
27 public:
28 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ValuesDef> _instance;
29} _ValuesDef_default_instance_;
30class ControlFlowContextDefDefaultTypeInternal {
31 public:
32 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ControlFlowContextDef> _instance;
33 const ::tensorflow::CondContextDef* cond_ctxt_;
34 const ::tensorflow::WhileContextDef* while_ctxt_;
35} _ControlFlowContextDef_default_instance_;
36class CondContextDefDefaultTypeInternal {
37 public:
38 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CondContextDef> _instance;
39} _CondContextDef_default_instance_;
40class WhileContextDefDefaultTypeInternal {
41 public:
42 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WhileContextDef> _instance;
43} _WhileContextDef_default_instance_;
44} // namespace tensorflow
45static void InitDefaultsscc_info_CondContextDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto() {
46 GOOGLE_PROTOBUF_VERIFY_VERSION;
47
48 {
49 void* ptr = &::tensorflow::_ControlFlowContextDef_default_instance_;
50 new (ptr) ::tensorflow::ControlFlowContextDef();
51 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
52 }
53 {
54 void* ptr = &::tensorflow::_CondContextDef_default_instance_;
55 new (ptr) ::tensorflow::CondContextDef();
56 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
57 }
58 {
59 void* ptr = &::tensorflow::_WhileContextDef_default_instance_;
60 new (ptr) ::tensorflow::WhileContextDef();
61 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
62 }
63 ::tensorflow::ControlFlowContextDef::InitAsDefaultInstance();
64 ::tensorflow::CondContextDef::InitAsDefaultInstance();
65 ::tensorflow::WhileContextDef::InitAsDefaultInstance();
66}
67
68::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CondContextDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto =
69 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_CondContextDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto}, {
70 &scc_info_ValuesDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base,}};
71
72static void InitDefaultsscc_info_ValuesDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto() {
73 GOOGLE_PROTOBUF_VERIFY_VERSION;
74
75 {
76 void* ptr = &::tensorflow::_ValuesDef_default_instance_;
77 new (ptr) ::tensorflow::ValuesDef();
78 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
79 }
80 ::tensorflow::ValuesDef::InitAsDefaultInstance();
81}
82
83::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ValuesDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto =
84 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ValuesDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto}, {
85 &scc_info_ValuesDef_ExternalValuesEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base,}};
86
87static void InitDefaultsscc_info_ValuesDef_ExternalValuesEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto() {
88 GOOGLE_PROTOBUF_VERIFY_VERSION;
89
90 {
91 void* ptr = &::tensorflow::_ValuesDef_ExternalValuesEntry_DoNotUse_default_instance_;
92 new (ptr) ::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse();
93 }
94 ::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse::InitAsDefaultInstance();
95}
96
97::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ValuesDef_ExternalValuesEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto =
98 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ValuesDef_ExternalValuesEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto}, {}};
99
100static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto[5];
101static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto = nullptr;
102static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto = nullptr;
103
104const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
105 PROTOBUF_FIELD_OFFSET(::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse, _has_bits_),
106 PROTOBUF_FIELD_OFFSET(::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse, _internal_metadata_),
107 ~0u, // no _extensions_
108 ~0u, // no _oneof_case_
109 ~0u, // no _weak_field_map_
110 PROTOBUF_FIELD_OFFSET(::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse, key_),
111 PROTOBUF_FIELD_OFFSET(::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse, value_),
112 0,
113 1,
114 ~0u, // no _has_bits_
115 PROTOBUF_FIELD_OFFSET(::tensorflow::ValuesDef, _internal_metadata_),
116 ~0u, // no _extensions_
117 ~0u, // no _oneof_case_
118 ~0u, // no _weak_field_map_
119 PROTOBUF_FIELD_OFFSET(::tensorflow::ValuesDef, values_),
120 PROTOBUF_FIELD_OFFSET(::tensorflow::ValuesDef, external_values_),
121 ~0u, // no _has_bits_
122 PROTOBUF_FIELD_OFFSET(::tensorflow::ControlFlowContextDef, _internal_metadata_),
123 ~0u, // no _extensions_
124 PROTOBUF_FIELD_OFFSET(::tensorflow::ControlFlowContextDef, _oneof_case_[0]),
125 ~0u, // no _weak_field_map_
126 offsetof(::tensorflow::ControlFlowContextDefDefaultTypeInternal, cond_ctxt_),
127 offsetof(::tensorflow::ControlFlowContextDefDefaultTypeInternal, while_ctxt_),
128 PROTOBUF_FIELD_OFFSET(::tensorflow::ControlFlowContextDef, ctxt_),
129 ~0u, // no _has_bits_
130 PROTOBUF_FIELD_OFFSET(::tensorflow::CondContextDef, _internal_metadata_),
131 ~0u, // no _extensions_
132 ~0u, // no _oneof_case_
133 ~0u, // no _weak_field_map_
134 PROTOBUF_FIELD_OFFSET(::tensorflow::CondContextDef, context_name_),
135 PROTOBUF_FIELD_OFFSET(::tensorflow::CondContextDef, pred_name_),
136 PROTOBUF_FIELD_OFFSET(::tensorflow::CondContextDef, pivot_name_),
137 PROTOBUF_FIELD_OFFSET(::tensorflow::CondContextDef, branch_),
138 PROTOBUF_FIELD_OFFSET(::tensorflow::CondContextDef, values_def_),
139 PROTOBUF_FIELD_OFFSET(::tensorflow::CondContextDef, nested_contexts_),
140 ~0u, // no _has_bits_
141 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, _internal_metadata_),
142 ~0u, // no _extensions_
143 ~0u, // no _oneof_case_
144 ~0u, // no _weak_field_map_
145 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, context_name_),
146 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, parallel_iterations_),
147 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, back_prop_),
148 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, swap_memory_),
149 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, pivot_name_),
150 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, pivot_for_pred_name_),
151 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, pivot_for_body_name_),
152 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, loop_exit_names_),
153 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, loop_enter_names_),
154 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, values_def_),
155 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, maximum_iterations_name_),
156 PROTOBUF_FIELD_OFFSET(::tensorflow::WhileContextDef, nested_contexts_),
157};
158static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
159 { 0, 7, sizeof(::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse)},
160 { 9, -1, sizeof(::tensorflow::ValuesDef)},
161 { 16, -1, sizeof(::tensorflow::ControlFlowContextDef)},
162 { 24, -1, sizeof(::tensorflow::CondContextDef)},
163 { 35, -1, sizeof(::tensorflow::WhileContextDef)},
164};
165
166static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
167 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_ValuesDef_ExternalValuesEntry_DoNotUse_default_instance_),
168 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_ValuesDef_default_instance_),
169 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_ControlFlowContextDef_default_instance_),
170 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_CondContextDef_default_instance_),
171 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_WhileContextDef_default_instance_),
172};
173
174const char descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
175 "\n+tensorflow/core/protobuf/control_flow."
176 "proto\022\ntensorflow\"\226\001\n\tValuesDef\022\016\n\006value"
177 "s\030\001 \003(\t\022B\n\017external_values\030\002 \003(\0132).tenso"
178 "rflow.ValuesDef.ExternalValuesEntry\0325\n\023E"
179 "xternalValuesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value"
180 "\030\002 \001(\t:\0028\001\"\203\001\n\025ControlFlowContextDef\022/\n\t"
181 "cond_ctxt\030\001 \001(\0132\032.tensorflow.CondContext"
182 "DefH\000\0221\n\nwhile_ctxt\030\002 \001(\0132\033.tensorflow.W"
183 "hileContextDefH\000B\006\n\004ctxt\"\304\001\n\016CondContext"
184 "Def\022\024\n\014context_name\030\001 \001(\t\022\021\n\tpred_name\030\002"
185 " \001(\t\022\022\n\npivot_name\030\003 \001(\t\022\016\n\006branch\030\004 \001(\005"
186 "\022)\n\nvalues_def\030\005 \001(\0132\025.tensorflow.Values"
187 "Def\022:\n\017nested_contexts\030\006 \003(\0132!.tensorflo"
188 "w.ControlFlowContextDef\"\365\002\n\017WhileContext"
189 "Def\022\024\n\014context_name\030\001 \001(\t\022\033\n\023parallel_it"
190 "erations\030\002 \001(\005\022\021\n\tback_prop\030\003 \001(\010\022\023\n\013swa"
191 "p_memory\030\004 \001(\010\022\022\n\npivot_name\030\005 \001(\t\022\033\n\023pi"
192 "vot_for_pred_name\030\006 \001(\t\022\033\n\023pivot_for_bod"
193 "y_name\030\007 \001(\t\022\027\n\017loop_exit_names\030\010 \003(\t\022\030\n"
194 "\020loop_enter_names\030\n \003(\t\022)\n\nvalues_def\030\t "
195 "\001(\0132\025.tensorflow.ValuesDef\022\037\n\027maximum_it"
196 "erations_name\030\013 \001(\t\022:\n\017nested_contexts\030\014"
197 " \003(\0132!.tensorflow.ControlFlowContextDefB"
198 "\211\001\n\030org.tensorflow.frameworkB\021ControlFlo"
199 "wProtosP\001ZUgithub.com/tensorflow/tensorf"
200 "low/tensorflow/go/core/protobuf/for_core"
201 "_protos_go_proto\370\001\001b\006proto3"
202 ;
203static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto_deps[1] = {
204};
205static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto_sccs[3] = {
206 &scc_info_CondContextDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base,
207 &scc_info_ValuesDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base,
208 &scc_info_ValuesDef_ExternalValuesEntry_DoNotUse_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base,
209};
210static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto_once;
211static bool descriptor_table_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto_initialized = false;
212const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto = {
213 &descriptor_table_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto, "tensorflow/core/protobuf/control_flow.proto", 1067,
214 &descriptor_table_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto_once, descriptor_table_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto_deps, 3, 0,
215 schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto::offsets,
216 file_level_metadata_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto, 5, file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto,
217};
218
219// Force running AddDescriptors() at dynamic initialization time.
220static bool dynamic_init_dummy_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto), true);
221namespace tensorflow {
222
223// ===================================================================
224
225ValuesDef_ExternalValuesEntry_DoNotUse::ValuesDef_ExternalValuesEntry_DoNotUse() {}
226ValuesDef_ExternalValuesEntry_DoNotUse::ValuesDef_ExternalValuesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
227 : SuperType(arena) {}
228void ValuesDef_ExternalValuesEntry_DoNotUse::MergeFrom(const ValuesDef_ExternalValuesEntry_DoNotUse& other) {
229 MergeFromInternal(other);
230}
231::PROTOBUF_NAMESPACE_ID::Metadata ValuesDef_ExternalValuesEntry_DoNotUse::GetMetadata() const {
232 return GetMetadataStatic();
233}
234void ValuesDef_ExternalValuesEntry_DoNotUse::MergeFrom(
235 const ::PROTOBUF_NAMESPACE_ID::Message& other) {
236 ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other);
237}
238
239
240// ===================================================================
241
242void ValuesDef::InitAsDefaultInstance() {
243}
244class ValuesDef::_Internal {
245 public:
246};
247
248ValuesDef::ValuesDef()
249 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
250 SharedCtor();
251 // @@protoc_insertion_point(constructor:tensorflow.ValuesDef)
252}
253ValuesDef::ValuesDef(::PROTOBUF_NAMESPACE_ID::Arena* arena)
254 : ::PROTOBUF_NAMESPACE_ID::Message(),
255 _internal_metadata_(arena),
256 values_(arena),
257 external_values_(arena) {
258 SharedCtor();
259 RegisterArenaDtor(arena);
260 // @@protoc_insertion_point(arena_constructor:tensorflow.ValuesDef)
261}
262ValuesDef::ValuesDef(const ValuesDef& from)
263 : ::PROTOBUF_NAMESPACE_ID::Message(),
264 _internal_metadata_(nullptr),
265 values_(from.values_) {
266 _internal_metadata_.MergeFrom(from._internal_metadata_);
267 external_values_.MergeFrom(from.external_values_);
268 // @@protoc_insertion_point(copy_constructor:tensorflow.ValuesDef)
269}
270
271void ValuesDef::SharedCtor() {
272 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ValuesDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base);
273}
274
275ValuesDef::~ValuesDef() {
276 // @@protoc_insertion_point(destructor:tensorflow.ValuesDef)
277 SharedDtor();
278}
279
280void ValuesDef::SharedDtor() {
281 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
282}
283
284void ValuesDef::ArenaDtor(void* object) {
285 ValuesDef* _this = reinterpret_cast< ValuesDef* >(object);
286 (void)_this;
287}
288void ValuesDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
289}
290void ValuesDef::SetCachedSize(int size) const {
291 _cached_size_.Set(size);
292}
293const ValuesDef& ValuesDef::default_instance() {
294 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ValuesDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base);
295 return *internal_default_instance();
296}
297
298
299void ValuesDef::Clear() {
300// @@protoc_insertion_point(message_clear_start:tensorflow.ValuesDef)
301 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
302 // Prevent compiler warnings about cached_has_bits being unused
303 (void) cached_has_bits;
304
305 values_.Clear();
306 external_values_.Clear();
307 _internal_metadata_.Clear();
308}
309
310#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
311const char* ValuesDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
312#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
313 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
314 while (!ctx->Done(&ptr)) {
315 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
316 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
317 CHK_(ptr);
318 switch (tag >> 3) {
319 // repeated string values = 1;
320 case 1:
321 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
322 ptr -= 1;
323 do {
324 ptr += 1;
325 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_values(), ptr, ctx, "tensorflow.ValuesDef.values");
326 CHK_(ptr);
327 if (!ctx->DataAvailable(ptr)) break;
328 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10);
329 } else goto handle_unusual;
330 continue;
331 // map<string, string> external_values = 2;
332 case 2:
333 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
334 ptr -= 1;
335 do {
336 ptr += 1;
337 ptr = ctx->ParseMessage(&external_values_, ptr);
338 CHK_(ptr);
339 if (!ctx->DataAvailable(ptr)) break;
340 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
341 } else goto handle_unusual;
342 continue;
343 default: {
344 handle_unusual:
345 if ((tag & 7) == 4 || tag == 0) {
346 ctx->SetLastTag(tag);
347 goto success;
348 }
349 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
350 CHK_(ptr != nullptr);
351 continue;
352 }
353 } // switch
354 } // while
355success:
356 return ptr;
357failure:
358 ptr = nullptr;
359 goto success;
360#undef CHK_
361}
362#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
363bool ValuesDef::MergePartialFromCodedStream(
364 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
365#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
366 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
367 // @@protoc_insertion_point(parse_start:tensorflow.ValuesDef)
368 for (;;) {
369 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
370 tag = p.first;
371 if (!p.second) goto handle_unusual;
372 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
373 // repeated string values = 1;
374 case 1: {
375 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
376 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
377 input, this->add_values()));
378 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
379 this->values(this->values_size() - 1).data(),
380 static_cast<int>(this->values(this->values_size() - 1).length()),
381 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
382 "tensorflow.ValuesDef.values"));
383 } else {
384 goto handle_unusual;
385 }
386 break;
387 }
388
389 // map<string, string> external_values = 2;
390 case 2: {
391 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
392 ValuesDef_ExternalValuesEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField<
393 ValuesDef_ExternalValuesEntry_DoNotUse,
394 std::string, std::string,
395 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
396 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING,
397 0 >,
398 ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string > > parser(&external_values_);
399 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual(
400 input, &parser));
401 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
402 parser.key().data(), static_cast<int>(parser.key().length()),
403 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
404 "tensorflow.ValuesDef.ExternalValuesEntry.key"));
405 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
406 parser.value().data(), static_cast<int>(parser.value().length()),
407 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
408 "tensorflow.ValuesDef.ExternalValuesEntry.value"));
409 } else {
410 goto handle_unusual;
411 }
412 break;
413 }
414
415 default: {
416 handle_unusual:
417 if (tag == 0) {
418 goto success;
419 }
420 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
421 input, tag, _internal_metadata_.mutable_unknown_fields()));
422 break;
423 }
424 }
425 }
426success:
427 // @@protoc_insertion_point(parse_success:tensorflow.ValuesDef)
428 return true;
429failure:
430 // @@protoc_insertion_point(parse_failure:tensorflow.ValuesDef)
431 return false;
432#undef DO_
433}
434#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
435
436void ValuesDef::SerializeWithCachedSizes(
437 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
438 // @@protoc_insertion_point(serialize_start:tensorflow.ValuesDef)
439 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
440 (void) cached_has_bits;
441
442 // repeated string values = 1;
443 for (int i = 0, n = this->values_size(); i < n; i++) {
444 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
445 this->values(i).data(), static_cast<int>(this->values(i).length()),
446 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
447 "tensorflow.ValuesDef.values");
448 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
449 1, this->values(i), output);
450 }
451
452 // map<string, string> external_values = 2;
453 if (!this->external_values().empty()) {
454 typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
455 ConstPtr;
456 typedef ConstPtr SortItem;
457 typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
458 struct Utf8Check {
459 static void Check(ConstPtr p) {
460 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
461 p->first.data(), static_cast<int>(p->first.length()),
462 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
463 "tensorflow.ValuesDef.ExternalValuesEntry.key");
464 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
465 p->second.data(), static_cast<int>(p->second.length()),
466 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
467 "tensorflow.ValuesDef.ExternalValuesEntry.value");
468 }
469 };
470
471 if (output->IsSerializationDeterministic() &&
472 this->external_values().size() > 1) {
473 ::std::unique_ptr<SortItem[]> items(
474 new SortItem[this->external_values().size()]);
475 typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
476 size_type n = 0;
477 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
478 it = this->external_values().begin();
479 it != this->external_values().end(); ++it, ++n) {
480 items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
481 }
482 ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
483 for (size_type i = 0; i < n; i++) {
484 ValuesDef_ExternalValuesEntry_DoNotUse::Funcs::SerializeToCodedStream(2, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output);
485 Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
486 }
487 } else {
488 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
489 it = this->external_values().begin();
490 it != this->external_values().end(); ++it) {
491 ValuesDef_ExternalValuesEntry_DoNotUse::Funcs::SerializeToCodedStream(2, it->first, it->second, output);
492 Utf8Check::Check(&(*it));
493 }
494 }
495 }
496
497 if (_internal_metadata_.have_unknown_fields()) {
498 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
499 _internal_metadata_.unknown_fields(), output);
500 }
501 // @@protoc_insertion_point(serialize_end:tensorflow.ValuesDef)
502}
503
504::PROTOBUF_NAMESPACE_ID::uint8* ValuesDef::InternalSerializeWithCachedSizesToArray(
505 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
506 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ValuesDef)
507 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
508 (void) cached_has_bits;
509
510 // repeated string values = 1;
511 for (int i = 0, n = this->values_size(); i < n; i++) {
512 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
513 this->values(i).data(), static_cast<int>(this->values(i).length()),
514 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
515 "tensorflow.ValuesDef.values");
516 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
517 WriteStringToArray(1, this->values(i), target);
518 }
519
520 // map<string, string> external_values = 2;
521 if (!this->external_values().empty()) {
522 typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
523 ConstPtr;
524 typedef ConstPtr SortItem;
525 typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
526 struct Utf8Check {
527 static void Check(ConstPtr p) {
528 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
529 p->first.data(), static_cast<int>(p->first.length()),
530 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
531 "tensorflow.ValuesDef.ExternalValuesEntry.key");
532 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
533 p->second.data(), static_cast<int>(p->second.length()),
534 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
535 "tensorflow.ValuesDef.ExternalValuesEntry.value");
536 }
537 };
538
539 if (false &&
540 this->external_values().size() > 1) {
541 ::std::unique_ptr<SortItem[]> items(
542 new SortItem[this->external_values().size()]);
543 typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
544 size_type n = 0;
545 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
546 it = this->external_values().begin();
547 it != this->external_values().end(); ++it, ++n) {
548 items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
549 }
550 ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
551 for (size_type i = 0; i < n; i++) {
552 target = ValuesDef_ExternalValuesEntry_DoNotUse::Funcs::SerializeToArray(2, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target);
553 Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
554 }
555 } else {
556 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
557 it = this->external_values().begin();
558 it != this->external_values().end(); ++it) {
559 target = ValuesDef_ExternalValuesEntry_DoNotUse::Funcs::SerializeToArray(2, it->first, it->second, target);
560 Utf8Check::Check(&(*it));
561 }
562 }
563 }
564
565 if (_internal_metadata_.have_unknown_fields()) {
566 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
567 _internal_metadata_.unknown_fields(), target);
568 }
569 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ValuesDef)
570 return target;
571}
572
573size_t ValuesDef::ByteSizeLong() const {
574// @@protoc_insertion_point(message_byte_size_start:tensorflow.ValuesDef)
575 size_t total_size = 0;
576
577 if (_internal_metadata_.have_unknown_fields()) {
578 total_size +=
579 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
580 _internal_metadata_.unknown_fields());
581 }
582 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
583 // Prevent compiler warnings about cached_has_bits being unused
584 (void) cached_has_bits;
585
586 // repeated string values = 1;
587 total_size += 1 *
588 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->values_size());
589 for (int i = 0, n = this->values_size(); i < n; i++) {
590 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
591 this->values(i));
592 }
593
594 // map<string, string> external_values = 2;
595 total_size += 1 *
596 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->external_values_size());
597 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
598 it = this->external_values().begin();
599 it != this->external_values().end(); ++it) {
600 total_size += ValuesDef_ExternalValuesEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
601 }
602
603 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
604 SetCachedSize(cached_size);
605 return total_size;
606}
607
608void ValuesDef::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
609// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ValuesDef)
610 GOOGLE_DCHECK_NE(&from, this);
611 const ValuesDef* source =
612 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ValuesDef>(
613 &from);
614 if (source == nullptr) {
615 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ValuesDef)
616 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
617 } else {
618 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ValuesDef)
619 MergeFrom(*source);
620 }
621}
622
623void ValuesDef::MergeFrom(const ValuesDef& from) {
624// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ValuesDef)
625 GOOGLE_DCHECK_NE(&from, this);
626 _internal_metadata_.MergeFrom(from._internal_metadata_);
627 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
628 (void) cached_has_bits;
629
630 values_.MergeFrom(from.values_);
631 external_values_.MergeFrom(from.external_values_);
632}
633
634void ValuesDef::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
635// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ValuesDef)
636 if (&from == this) return;
637 Clear();
638 MergeFrom(from);
639}
640
641void ValuesDef::CopyFrom(const ValuesDef& from) {
642// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ValuesDef)
643 if (&from == this) return;
644 Clear();
645 MergeFrom(from);
646}
647
648bool ValuesDef::IsInitialized() const {
649 return true;
650}
651
652void ValuesDef::InternalSwap(ValuesDef* other) {
653 using std::swap;
654 _internal_metadata_.Swap(&other->_internal_metadata_);
655 values_.InternalSwap(CastToBase(&other->values_));
656 external_values_.Swap(&other->external_values_);
657}
658
659::PROTOBUF_NAMESPACE_ID::Metadata ValuesDef::GetMetadata() const {
660 return GetMetadataStatic();
661}
662
663
664// ===================================================================
665
666void ControlFlowContextDef::InitAsDefaultInstance() {
667 ::tensorflow::_ControlFlowContextDef_default_instance_.cond_ctxt_ = const_cast< ::tensorflow::CondContextDef*>(
668 ::tensorflow::CondContextDef::internal_default_instance());
669 ::tensorflow::_ControlFlowContextDef_default_instance_.while_ctxt_ = const_cast< ::tensorflow::WhileContextDef*>(
670 ::tensorflow::WhileContextDef::internal_default_instance());
671}
672class ControlFlowContextDef::_Internal {
673 public:
674 static const ::tensorflow::CondContextDef& cond_ctxt(const ControlFlowContextDef* msg);
675 static const ::tensorflow::WhileContextDef& while_ctxt(const ControlFlowContextDef* msg);
676};
677
678const ::tensorflow::CondContextDef&
679ControlFlowContextDef::_Internal::cond_ctxt(const ControlFlowContextDef* msg) {
680 return *msg->ctxt_.cond_ctxt_;
681}
682const ::tensorflow::WhileContextDef&
683ControlFlowContextDef::_Internal::while_ctxt(const ControlFlowContextDef* msg) {
684 return *msg->ctxt_.while_ctxt_;
685}
686void ControlFlowContextDef::set_allocated_cond_ctxt(::tensorflow::CondContextDef* cond_ctxt) {
687 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
688 clear_ctxt();
689 if (cond_ctxt) {
690 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
691 ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(cond_ctxt);
692 if (message_arena != submessage_arena) {
693 cond_ctxt = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
694 message_arena, cond_ctxt, submessage_arena);
695 }
696 set_has_cond_ctxt();
697 ctxt_.cond_ctxt_ = cond_ctxt;
698 }
699 // @@protoc_insertion_point(field_set_allocated:tensorflow.ControlFlowContextDef.cond_ctxt)
700}
701void ControlFlowContextDef::set_allocated_while_ctxt(::tensorflow::WhileContextDef* while_ctxt) {
702 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
703 clear_ctxt();
704 if (while_ctxt) {
705 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
706 ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(while_ctxt);
707 if (message_arena != submessage_arena) {
708 while_ctxt = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
709 message_arena, while_ctxt, submessage_arena);
710 }
711 set_has_while_ctxt();
712 ctxt_.while_ctxt_ = while_ctxt;
713 }
714 // @@protoc_insertion_point(field_set_allocated:tensorflow.ControlFlowContextDef.while_ctxt)
715}
716ControlFlowContextDef::ControlFlowContextDef()
717 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
718 SharedCtor();
719 // @@protoc_insertion_point(constructor:tensorflow.ControlFlowContextDef)
720}
721ControlFlowContextDef::ControlFlowContextDef(::PROTOBUF_NAMESPACE_ID::Arena* arena)
722 : ::PROTOBUF_NAMESPACE_ID::Message(),
723 _internal_metadata_(arena) {
724 SharedCtor();
725 RegisterArenaDtor(arena);
726 // @@protoc_insertion_point(arena_constructor:tensorflow.ControlFlowContextDef)
727}
728ControlFlowContextDef::ControlFlowContextDef(const ControlFlowContextDef& from)
729 : ::PROTOBUF_NAMESPACE_ID::Message(),
730 _internal_metadata_(nullptr) {
731 _internal_metadata_.MergeFrom(from._internal_metadata_);
732 clear_has_ctxt();
733 switch (from.ctxt_case()) {
734 case kCondCtxt: {
735 mutable_cond_ctxt()->::tensorflow::CondContextDef::MergeFrom(from.cond_ctxt());
736 break;
737 }
738 case kWhileCtxt: {
739 mutable_while_ctxt()->::tensorflow::WhileContextDef::MergeFrom(from.while_ctxt());
740 break;
741 }
742 case CTXT_NOT_SET: {
743 break;
744 }
745 }
746 // @@protoc_insertion_point(copy_constructor:tensorflow.ControlFlowContextDef)
747}
748
749void ControlFlowContextDef::SharedCtor() {
750 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CondContextDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base);
751 clear_has_ctxt();
752}
753
754ControlFlowContextDef::~ControlFlowContextDef() {
755 // @@protoc_insertion_point(destructor:tensorflow.ControlFlowContextDef)
756 SharedDtor();
757}
758
759void ControlFlowContextDef::SharedDtor() {
760 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
761 if (has_ctxt()) {
762 clear_ctxt();
763 }
764}
765
766void ControlFlowContextDef::ArenaDtor(void* object) {
767 ControlFlowContextDef* _this = reinterpret_cast< ControlFlowContextDef* >(object);
768 (void)_this;
769}
770void ControlFlowContextDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
771}
772void ControlFlowContextDef::SetCachedSize(int size) const {
773 _cached_size_.Set(size);
774}
775const ControlFlowContextDef& ControlFlowContextDef::default_instance() {
776 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CondContextDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base);
777 return *internal_default_instance();
778}
779
780
781void ControlFlowContextDef::clear_ctxt() {
782// @@protoc_insertion_point(one_of_clear_start:tensorflow.ControlFlowContextDef)
783 switch (ctxt_case()) {
784 case kCondCtxt: {
785 if (GetArenaNoVirtual() == nullptr) {
786 delete ctxt_.cond_ctxt_;
787 }
788 break;
789 }
790 case kWhileCtxt: {
791 if (GetArenaNoVirtual() == nullptr) {
792 delete ctxt_.while_ctxt_;
793 }
794 break;
795 }
796 case CTXT_NOT_SET: {
797 break;
798 }
799 }
800 _oneof_case_[0] = CTXT_NOT_SET;
801}
802
803
804void ControlFlowContextDef::Clear() {
805// @@protoc_insertion_point(message_clear_start:tensorflow.ControlFlowContextDef)
806 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
807 // Prevent compiler warnings about cached_has_bits being unused
808 (void) cached_has_bits;
809
810 clear_ctxt();
811 _internal_metadata_.Clear();
812}
813
814#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
815const char* ControlFlowContextDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
816#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
817 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
818 while (!ctx->Done(&ptr)) {
819 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
820 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
821 CHK_(ptr);
822 switch (tag >> 3) {
823 // .tensorflow.CondContextDef cond_ctxt = 1;
824 case 1:
825 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
826 ptr = ctx->ParseMessage(mutable_cond_ctxt(), ptr);
827 CHK_(ptr);
828 } else goto handle_unusual;
829 continue;
830 // .tensorflow.WhileContextDef while_ctxt = 2;
831 case 2:
832 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
833 ptr = ctx->ParseMessage(mutable_while_ctxt(), ptr);
834 CHK_(ptr);
835 } else goto handle_unusual;
836 continue;
837 default: {
838 handle_unusual:
839 if ((tag & 7) == 4 || tag == 0) {
840 ctx->SetLastTag(tag);
841 goto success;
842 }
843 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
844 CHK_(ptr != nullptr);
845 continue;
846 }
847 } // switch
848 } // while
849success:
850 return ptr;
851failure:
852 ptr = nullptr;
853 goto success;
854#undef CHK_
855}
856#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
857bool ControlFlowContextDef::MergePartialFromCodedStream(
858 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
859#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
860 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
861 // @@protoc_insertion_point(parse_start:tensorflow.ControlFlowContextDef)
862 for (;;) {
863 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
864 tag = p.first;
865 if (!p.second) goto handle_unusual;
866 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
867 // .tensorflow.CondContextDef cond_ctxt = 1;
868 case 1: {
869 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
870 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
871 input, mutable_cond_ctxt()));
872 } else {
873 goto handle_unusual;
874 }
875 break;
876 }
877
878 // .tensorflow.WhileContextDef while_ctxt = 2;
879 case 2: {
880 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
881 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
882 input, mutable_while_ctxt()));
883 } else {
884 goto handle_unusual;
885 }
886 break;
887 }
888
889 default: {
890 handle_unusual:
891 if (tag == 0) {
892 goto success;
893 }
894 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
895 input, tag, _internal_metadata_.mutable_unknown_fields()));
896 break;
897 }
898 }
899 }
900success:
901 // @@protoc_insertion_point(parse_success:tensorflow.ControlFlowContextDef)
902 return true;
903failure:
904 // @@protoc_insertion_point(parse_failure:tensorflow.ControlFlowContextDef)
905 return false;
906#undef DO_
907}
908#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
909
910void ControlFlowContextDef::SerializeWithCachedSizes(
911 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
912 // @@protoc_insertion_point(serialize_start:tensorflow.ControlFlowContextDef)
913 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
914 (void) cached_has_bits;
915
916 // .tensorflow.CondContextDef cond_ctxt = 1;
917 if (has_cond_ctxt()) {
918 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
919 1, _Internal::cond_ctxt(this), output);
920 }
921
922 // .tensorflow.WhileContextDef while_ctxt = 2;
923 if (has_while_ctxt()) {
924 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
925 2, _Internal::while_ctxt(this), output);
926 }
927
928 if (_internal_metadata_.have_unknown_fields()) {
929 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
930 _internal_metadata_.unknown_fields(), output);
931 }
932 // @@protoc_insertion_point(serialize_end:tensorflow.ControlFlowContextDef)
933}
934
935::PROTOBUF_NAMESPACE_ID::uint8* ControlFlowContextDef::InternalSerializeWithCachedSizesToArray(
936 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
937 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ControlFlowContextDef)
938 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
939 (void) cached_has_bits;
940
941 // .tensorflow.CondContextDef cond_ctxt = 1;
942 if (has_cond_ctxt()) {
943 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
944 InternalWriteMessageToArray(
945 1, _Internal::cond_ctxt(this), target);
946 }
947
948 // .tensorflow.WhileContextDef while_ctxt = 2;
949 if (has_while_ctxt()) {
950 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
951 InternalWriteMessageToArray(
952 2, _Internal::while_ctxt(this), target);
953 }
954
955 if (_internal_metadata_.have_unknown_fields()) {
956 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
957 _internal_metadata_.unknown_fields(), target);
958 }
959 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ControlFlowContextDef)
960 return target;
961}
962
963size_t ControlFlowContextDef::ByteSizeLong() const {
964// @@protoc_insertion_point(message_byte_size_start:tensorflow.ControlFlowContextDef)
965 size_t total_size = 0;
966
967 if (_internal_metadata_.have_unknown_fields()) {
968 total_size +=
969 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
970 _internal_metadata_.unknown_fields());
971 }
972 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
973 // Prevent compiler warnings about cached_has_bits being unused
974 (void) cached_has_bits;
975
976 switch (ctxt_case()) {
977 // .tensorflow.CondContextDef cond_ctxt = 1;
978 case kCondCtxt: {
979 total_size += 1 +
980 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
981 *ctxt_.cond_ctxt_);
982 break;
983 }
984 // .tensorflow.WhileContextDef while_ctxt = 2;
985 case kWhileCtxt: {
986 total_size += 1 +
987 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
988 *ctxt_.while_ctxt_);
989 break;
990 }
991 case CTXT_NOT_SET: {
992 break;
993 }
994 }
995 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
996 SetCachedSize(cached_size);
997 return total_size;
998}
999
1000void ControlFlowContextDef::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1001// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ControlFlowContextDef)
1002 GOOGLE_DCHECK_NE(&from, this);
1003 const ControlFlowContextDef* source =
1004 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ControlFlowContextDef>(
1005 &from);
1006 if (source == nullptr) {
1007 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ControlFlowContextDef)
1008 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1009 } else {
1010 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ControlFlowContextDef)
1011 MergeFrom(*source);
1012 }
1013}
1014
1015void ControlFlowContextDef::MergeFrom(const ControlFlowContextDef& from) {
1016// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ControlFlowContextDef)
1017 GOOGLE_DCHECK_NE(&from, this);
1018 _internal_metadata_.MergeFrom(from._internal_metadata_);
1019 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1020 (void) cached_has_bits;
1021
1022 switch (from.ctxt_case()) {
1023 case kCondCtxt: {
1024 mutable_cond_ctxt()->::tensorflow::CondContextDef::MergeFrom(from.cond_ctxt());
1025 break;
1026 }
1027 case kWhileCtxt: {
1028 mutable_while_ctxt()->::tensorflow::WhileContextDef::MergeFrom(from.while_ctxt());
1029 break;
1030 }
1031 case CTXT_NOT_SET: {
1032 break;
1033 }
1034 }
1035}
1036
1037void ControlFlowContextDef::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1038// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ControlFlowContextDef)
1039 if (&from == this) return;
1040 Clear();
1041 MergeFrom(from);
1042}
1043
1044void ControlFlowContextDef::CopyFrom(const ControlFlowContextDef& from) {
1045// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ControlFlowContextDef)
1046 if (&from == this) return;
1047 Clear();
1048 MergeFrom(from);
1049}
1050
1051bool ControlFlowContextDef::IsInitialized() const {
1052 return true;
1053}
1054
1055void ControlFlowContextDef::InternalSwap(ControlFlowContextDef* other) {
1056 using std::swap;
1057 _internal_metadata_.Swap(&other->_internal_metadata_);
1058 swap(ctxt_, other->ctxt_);
1059 swap(_oneof_case_[0], other->_oneof_case_[0]);
1060}
1061
1062::PROTOBUF_NAMESPACE_ID::Metadata ControlFlowContextDef::GetMetadata() const {
1063 return GetMetadataStatic();
1064}
1065
1066
1067// ===================================================================
1068
1069void CondContextDef::InitAsDefaultInstance() {
1070 ::tensorflow::_CondContextDef_default_instance_._instance.get_mutable()->values_def_ = const_cast< ::tensorflow::ValuesDef*>(
1071 ::tensorflow::ValuesDef::internal_default_instance());
1072}
1073class CondContextDef::_Internal {
1074 public:
1075 static const ::tensorflow::ValuesDef& values_def(const CondContextDef* msg);
1076};
1077
1078const ::tensorflow::ValuesDef&
1079CondContextDef::_Internal::values_def(const CondContextDef* msg) {
1080 return *msg->values_def_;
1081}
1082void CondContextDef::unsafe_arena_set_allocated_values_def(
1083 ::tensorflow::ValuesDef* values_def) {
1084 if (GetArenaNoVirtual() == nullptr) {
1085 delete values_def_;
1086 }
1087 values_def_ = values_def;
1088 if (values_def) {
1089
1090 } else {
1091
1092 }
1093 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CondContextDef.values_def)
1094}
1095CondContextDef::CondContextDef()
1096 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
1097 SharedCtor();
1098 // @@protoc_insertion_point(constructor:tensorflow.CondContextDef)
1099}
1100CondContextDef::CondContextDef(::PROTOBUF_NAMESPACE_ID::Arena* arena)
1101 : ::PROTOBUF_NAMESPACE_ID::Message(),
1102 _internal_metadata_(arena),
1103 nested_contexts_(arena) {
1104 SharedCtor();
1105 RegisterArenaDtor(arena);
1106 // @@protoc_insertion_point(arena_constructor:tensorflow.CondContextDef)
1107}
1108CondContextDef::CondContextDef(const CondContextDef& from)
1109 : ::PROTOBUF_NAMESPACE_ID::Message(),
1110 _internal_metadata_(nullptr),
1111 nested_contexts_(from.nested_contexts_) {
1112 _internal_metadata_.MergeFrom(from._internal_metadata_);
1113 context_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1114 if (!from.context_name().empty()) {
1115 context_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.context_name(),
1116 GetArenaNoVirtual());
1117 }
1118 pred_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1119 if (!from.pred_name().empty()) {
1120 pred_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.pred_name(),
1121 GetArenaNoVirtual());
1122 }
1123 pivot_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1124 if (!from.pivot_name().empty()) {
1125 pivot_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.pivot_name(),
1126 GetArenaNoVirtual());
1127 }
1128 if (from.has_values_def()) {
1129 values_def_ = new ::tensorflow::ValuesDef(*from.values_def_);
1130 } else {
1131 values_def_ = nullptr;
1132 }
1133 branch_ = from.branch_;
1134 // @@protoc_insertion_point(copy_constructor:tensorflow.CondContextDef)
1135}
1136
1137void CondContextDef::SharedCtor() {
1138 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CondContextDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base);
1139 context_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1140 pred_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1141 pivot_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1142 ::memset(&values_def_, 0, static_cast<size_t>(
1143 reinterpret_cast<char*>(&branch_) -
1144 reinterpret_cast<char*>(&values_def_)) + sizeof(branch_));
1145}
1146
1147CondContextDef::~CondContextDef() {
1148 // @@protoc_insertion_point(destructor:tensorflow.CondContextDef)
1149 SharedDtor();
1150}
1151
1152void CondContextDef::SharedDtor() {
1153 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
1154 context_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1155 pred_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1156 pivot_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1157 if (this != internal_default_instance()) delete values_def_;
1158}
1159
1160void CondContextDef::ArenaDtor(void* object) {
1161 CondContextDef* _this = reinterpret_cast< CondContextDef* >(object);
1162 (void)_this;
1163}
1164void CondContextDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
1165}
1166void CondContextDef::SetCachedSize(int size) const {
1167 _cached_size_.Set(size);
1168}
1169const CondContextDef& CondContextDef::default_instance() {
1170 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CondContextDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base);
1171 return *internal_default_instance();
1172}
1173
1174
1175void CondContextDef::Clear() {
1176// @@protoc_insertion_point(message_clear_start:tensorflow.CondContextDef)
1177 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1178 // Prevent compiler warnings about cached_has_bits being unused
1179 (void) cached_has_bits;
1180
1181 nested_contexts_.Clear();
1182 context_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1183 pred_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1184 pivot_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1185 if (GetArenaNoVirtual() == nullptr && values_def_ != nullptr) {
1186 delete values_def_;
1187 }
1188 values_def_ = nullptr;
1189 branch_ = 0;
1190 _internal_metadata_.Clear();
1191}
1192
1193#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1194const char* CondContextDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1195#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1196 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
1197 while (!ctx->Done(&ptr)) {
1198 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1199 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1200 CHK_(ptr);
1201 switch (tag >> 3) {
1202 // string context_name = 1;
1203 case 1:
1204 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1205 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_context_name(), ptr, ctx, "tensorflow.CondContextDef.context_name");
1206 CHK_(ptr);
1207 } else goto handle_unusual;
1208 continue;
1209 // string pred_name = 2;
1210 case 2:
1211 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
1212 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_pred_name(), ptr, ctx, "tensorflow.CondContextDef.pred_name");
1213 CHK_(ptr);
1214 } else goto handle_unusual;
1215 continue;
1216 // string pivot_name = 3;
1217 case 3:
1218 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
1219 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_pivot_name(), ptr, ctx, "tensorflow.CondContextDef.pivot_name");
1220 CHK_(ptr);
1221 } else goto handle_unusual;
1222 continue;
1223 // int32 branch = 4;
1224 case 4:
1225 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
1226 branch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1227 CHK_(ptr);
1228 } else goto handle_unusual;
1229 continue;
1230 // .tensorflow.ValuesDef values_def = 5;
1231 case 5:
1232 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
1233 ptr = ctx->ParseMessage(mutable_values_def(), ptr);
1234 CHK_(ptr);
1235 } else goto handle_unusual;
1236 continue;
1237 // repeated .tensorflow.ControlFlowContextDef nested_contexts = 6;
1238 case 6:
1239 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
1240 ptr -= 1;
1241 do {
1242 ptr += 1;
1243 ptr = ctx->ParseMessage(add_nested_contexts(), ptr);
1244 CHK_(ptr);
1245 if (!ctx->DataAvailable(ptr)) break;
1246 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50);
1247 } else goto handle_unusual;
1248 continue;
1249 default: {
1250 handle_unusual:
1251 if ((tag & 7) == 4 || tag == 0) {
1252 ctx->SetLastTag(tag);
1253 goto success;
1254 }
1255 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
1256 CHK_(ptr != nullptr);
1257 continue;
1258 }
1259 } // switch
1260 } // while
1261success:
1262 return ptr;
1263failure:
1264 ptr = nullptr;
1265 goto success;
1266#undef CHK_
1267}
1268#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1269bool CondContextDef::MergePartialFromCodedStream(
1270 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
1271#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1272 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1273 // @@protoc_insertion_point(parse_start:tensorflow.CondContextDef)
1274 for (;;) {
1275 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1276 tag = p.first;
1277 if (!p.second) goto handle_unusual;
1278 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1279 // string context_name = 1;
1280 case 1: {
1281 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
1282 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1283 input, this->mutable_context_name()));
1284 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1285 this->context_name().data(), static_cast<int>(this->context_name().length()),
1286 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
1287 "tensorflow.CondContextDef.context_name"));
1288 } else {
1289 goto handle_unusual;
1290 }
1291 break;
1292 }
1293
1294 // string pred_name = 2;
1295 case 2: {
1296 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
1297 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1298 input, this->mutable_pred_name()));
1299 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1300 this->pred_name().data(), static_cast<int>(this->pred_name().length()),
1301 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
1302 "tensorflow.CondContextDef.pred_name"));
1303 } else {
1304 goto handle_unusual;
1305 }
1306 break;
1307 }
1308
1309 // string pivot_name = 3;
1310 case 3: {
1311 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
1312 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1313 input, this->mutable_pivot_name()));
1314 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1315 this->pivot_name().data(), static_cast<int>(this->pivot_name().length()),
1316 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
1317 "tensorflow.CondContextDef.pivot_name"));
1318 } else {
1319 goto handle_unusual;
1320 }
1321 break;
1322 }
1323
1324 // int32 branch = 4;
1325 case 4: {
1326 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
1327
1328 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1329 ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
1330 input, &branch_)));
1331 } else {
1332 goto handle_unusual;
1333 }
1334 break;
1335 }
1336
1337 // .tensorflow.ValuesDef values_def = 5;
1338 case 5: {
1339 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
1340 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
1341 input, mutable_values_def()));
1342 } else {
1343 goto handle_unusual;
1344 }
1345 break;
1346 }
1347
1348 // repeated .tensorflow.ControlFlowContextDef nested_contexts = 6;
1349 case 6: {
1350 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
1351 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
1352 input, add_nested_contexts()));
1353 } else {
1354 goto handle_unusual;
1355 }
1356 break;
1357 }
1358
1359 default: {
1360 handle_unusual:
1361 if (tag == 0) {
1362 goto success;
1363 }
1364 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
1365 input, tag, _internal_metadata_.mutable_unknown_fields()));
1366 break;
1367 }
1368 }
1369 }
1370success:
1371 // @@protoc_insertion_point(parse_success:tensorflow.CondContextDef)
1372 return true;
1373failure:
1374 // @@protoc_insertion_point(parse_failure:tensorflow.CondContextDef)
1375 return false;
1376#undef DO_
1377}
1378#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1379
1380void CondContextDef::SerializeWithCachedSizes(
1381 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
1382 // @@protoc_insertion_point(serialize_start:tensorflow.CondContextDef)
1383 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1384 (void) cached_has_bits;
1385
1386 // string context_name = 1;
1387 if (this->context_name().size() > 0) {
1388 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1389 this->context_name().data(), static_cast<int>(this->context_name().length()),
1390 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1391 "tensorflow.CondContextDef.context_name");
1392 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1393 1, this->context_name(), output);
1394 }
1395
1396 // string pred_name = 2;
1397 if (this->pred_name().size() > 0) {
1398 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1399 this->pred_name().data(), static_cast<int>(this->pred_name().length()),
1400 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1401 "tensorflow.CondContextDef.pred_name");
1402 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1403 2, this->pred_name(), output);
1404 }
1405
1406 // string pivot_name = 3;
1407 if (this->pivot_name().size() > 0) {
1408 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1409 this->pivot_name().data(), static_cast<int>(this->pivot_name().length()),
1410 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1411 "tensorflow.CondContextDef.pivot_name");
1412 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
1413 3, this->pivot_name(), output);
1414 }
1415
1416 // int32 branch = 4;
1417 if (this->branch() != 0) {
1418 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(4, this->branch(), output);
1419 }
1420
1421 // .tensorflow.ValuesDef values_def = 5;
1422 if (this->has_values_def()) {
1423 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1424 5, _Internal::values_def(this), output);
1425 }
1426
1427 // repeated .tensorflow.ControlFlowContextDef nested_contexts = 6;
1428 for (unsigned int i = 0,
1429 n = static_cast<unsigned int>(this->nested_contexts_size()); i < n; i++) {
1430 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
1431 6,
1432 this->nested_contexts(static_cast<int>(i)),
1433 output);
1434 }
1435
1436 if (_internal_metadata_.have_unknown_fields()) {
1437 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
1438 _internal_metadata_.unknown_fields(), output);
1439 }
1440 // @@protoc_insertion_point(serialize_end:tensorflow.CondContextDef)
1441}
1442
1443::PROTOBUF_NAMESPACE_ID::uint8* CondContextDef::InternalSerializeWithCachedSizesToArray(
1444 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
1445 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CondContextDef)
1446 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1447 (void) cached_has_bits;
1448
1449 // string context_name = 1;
1450 if (this->context_name().size() > 0) {
1451 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1452 this->context_name().data(), static_cast<int>(this->context_name().length()),
1453 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1454 "tensorflow.CondContextDef.context_name");
1455 target =
1456 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1457 1, this->context_name(), target);
1458 }
1459
1460 // string pred_name = 2;
1461 if (this->pred_name().size() > 0) {
1462 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1463 this->pred_name().data(), static_cast<int>(this->pred_name().length()),
1464 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1465 "tensorflow.CondContextDef.pred_name");
1466 target =
1467 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1468 2, this->pred_name(), target);
1469 }
1470
1471 // string pivot_name = 3;
1472 if (this->pivot_name().size() > 0) {
1473 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1474 this->pivot_name().data(), static_cast<int>(this->pivot_name().length()),
1475 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1476 "tensorflow.CondContextDef.pivot_name");
1477 target =
1478 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1479 3, this->pivot_name(), target);
1480 }
1481
1482 // int32 branch = 4;
1483 if (this->branch() != 0) {
1484 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->branch(), target);
1485 }
1486
1487 // .tensorflow.ValuesDef values_def = 5;
1488 if (this->has_values_def()) {
1489 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1490 InternalWriteMessageToArray(
1491 5, _Internal::values_def(this), target);
1492 }
1493
1494 // repeated .tensorflow.ControlFlowContextDef nested_contexts = 6;
1495 for (unsigned int i = 0,
1496 n = static_cast<unsigned int>(this->nested_contexts_size()); i < n; i++) {
1497 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1498 InternalWriteMessageToArray(
1499 6, this->nested_contexts(static_cast<int>(i)), target);
1500 }
1501
1502 if (_internal_metadata_.have_unknown_fields()) {
1503 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
1504 _internal_metadata_.unknown_fields(), target);
1505 }
1506 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CondContextDef)
1507 return target;
1508}
1509
1510size_t CondContextDef::ByteSizeLong() const {
1511// @@protoc_insertion_point(message_byte_size_start:tensorflow.CondContextDef)
1512 size_t total_size = 0;
1513
1514 if (_internal_metadata_.have_unknown_fields()) {
1515 total_size +=
1516 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
1517 _internal_metadata_.unknown_fields());
1518 }
1519 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1520 // Prevent compiler warnings about cached_has_bits being unused
1521 (void) cached_has_bits;
1522
1523 // repeated .tensorflow.ControlFlowContextDef nested_contexts = 6;
1524 {
1525 unsigned int count = static_cast<unsigned int>(this->nested_contexts_size());
1526 total_size += 1UL * count;
1527 for (unsigned int i = 0; i < count; i++) {
1528 total_size +=
1529 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1530 this->nested_contexts(static_cast<int>(i)));
1531 }
1532 }
1533
1534 // string context_name = 1;
1535 if (this->context_name().size() > 0) {
1536 total_size += 1 +
1537 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1538 this->context_name());
1539 }
1540
1541 // string pred_name = 2;
1542 if (this->pred_name().size() > 0) {
1543 total_size += 1 +
1544 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1545 this->pred_name());
1546 }
1547
1548 // string pivot_name = 3;
1549 if (this->pivot_name().size() > 0) {
1550 total_size += 1 +
1551 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1552 this->pivot_name());
1553 }
1554
1555 // .tensorflow.ValuesDef values_def = 5;
1556 if (this->has_values_def()) {
1557 total_size += 1 +
1558 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1559 *values_def_);
1560 }
1561
1562 // int32 branch = 4;
1563 if (this->branch() != 0) {
1564 total_size += 1 +
1565 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1566 this->branch());
1567 }
1568
1569 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1570 SetCachedSize(cached_size);
1571 return total_size;
1572}
1573
1574void CondContextDef::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1575// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.CondContextDef)
1576 GOOGLE_DCHECK_NE(&from, this);
1577 const CondContextDef* source =
1578 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CondContextDef>(
1579 &from);
1580 if (source == nullptr) {
1581 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.CondContextDef)
1582 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1583 } else {
1584 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.CondContextDef)
1585 MergeFrom(*source);
1586 }
1587}
1588
1589void CondContextDef::MergeFrom(const CondContextDef& from) {
1590// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CondContextDef)
1591 GOOGLE_DCHECK_NE(&from, this);
1592 _internal_metadata_.MergeFrom(from._internal_metadata_);
1593 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1594 (void) cached_has_bits;
1595
1596 nested_contexts_.MergeFrom(from.nested_contexts_);
1597 if (from.context_name().size() > 0) {
1598 set_context_name(from.context_name());
1599 }
1600 if (from.pred_name().size() > 0) {
1601 set_pred_name(from.pred_name());
1602 }
1603 if (from.pivot_name().size() > 0) {
1604 set_pivot_name(from.pivot_name());
1605 }
1606 if (from.has_values_def()) {
1607 mutable_values_def()->::tensorflow::ValuesDef::MergeFrom(from.values_def());
1608 }
1609 if (from.branch() != 0) {
1610 set_branch(from.branch());
1611 }
1612}
1613
1614void CondContextDef::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1615// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.CondContextDef)
1616 if (&from == this) return;
1617 Clear();
1618 MergeFrom(from);
1619}
1620
1621void CondContextDef::CopyFrom(const CondContextDef& from) {
1622// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CondContextDef)
1623 if (&from == this) return;
1624 Clear();
1625 MergeFrom(from);
1626}
1627
1628bool CondContextDef::IsInitialized() const {
1629 return true;
1630}
1631
1632void CondContextDef::InternalSwap(CondContextDef* other) {
1633 using std::swap;
1634 _internal_metadata_.Swap(&other->_internal_metadata_);
1635 CastToBase(&nested_contexts_)->InternalSwap(CastToBase(&other->nested_contexts_));
1636 context_name_.Swap(&other->context_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1637 GetArenaNoVirtual());
1638 pred_name_.Swap(&other->pred_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1639 GetArenaNoVirtual());
1640 pivot_name_.Swap(&other->pivot_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1641 GetArenaNoVirtual());
1642 swap(values_def_, other->values_def_);
1643 swap(branch_, other->branch_);
1644}
1645
1646::PROTOBUF_NAMESPACE_ID::Metadata CondContextDef::GetMetadata() const {
1647 return GetMetadataStatic();
1648}
1649
1650
1651// ===================================================================
1652
1653void WhileContextDef::InitAsDefaultInstance() {
1654 ::tensorflow::_WhileContextDef_default_instance_._instance.get_mutable()->values_def_ = const_cast< ::tensorflow::ValuesDef*>(
1655 ::tensorflow::ValuesDef::internal_default_instance());
1656}
1657class WhileContextDef::_Internal {
1658 public:
1659 static const ::tensorflow::ValuesDef& values_def(const WhileContextDef* msg);
1660};
1661
1662const ::tensorflow::ValuesDef&
1663WhileContextDef::_Internal::values_def(const WhileContextDef* msg) {
1664 return *msg->values_def_;
1665}
1666void WhileContextDef::unsafe_arena_set_allocated_values_def(
1667 ::tensorflow::ValuesDef* values_def) {
1668 if (GetArenaNoVirtual() == nullptr) {
1669 delete values_def_;
1670 }
1671 values_def_ = values_def;
1672 if (values_def) {
1673
1674 } else {
1675
1676 }
1677 // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.WhileContextDef.values_def)
1678}
1679WhileContextDef::WhileContextDef()
1680 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
1681 SharedCtor();
1682 // @@protoc_insertion_point(constructor:tensorflow.WhileContextDef)
1683}
1684WhileContextDef::WhileContextDef(::PROTOBUF_NAMESPACE_ID::Arena* arena)
1685 : ::PROTOBUF_NAMESPACE_ID::Message(),
1686 _internal_metadata_(arena),
1687 loop_exit_names_(arena),
1688 loop_enter_names_(arena),
1689 nested_contexts_(arena) {
1690 SharedCtor();
1691 RegisterArenaDtor(arena);
1692 // @@protoc_insertion_point(arena_constructor:tensorflow.WhileContextDef)
1693}
1694WhileContextDef::WhileContextDef(const WhileContextDef& from)
1695 : ::PROTOBUF_NAMESPACE_ID::Message(),
1696 _internal_metadata_(nullptr),
1697 loop_exit_names_(from.loop_exit_names_),
1698 loop_enter_names_(from.loop_enter_names_),
1699 nested_contexts_(from.nested_contexts_) {
1700 _internal_metadata_.MergeFrom(from._internal_metadata_);
1701 context_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1702 if (!from.context_name().empty()) {
1703 context_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.context_name(),
1704 GetArenaNoVirtual());
1705 }
1706 pivot_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1707 if (!from.pivot_name().empty()) {
1708 pivot_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.pivot_name(),
1709 GetArenaNoVirtual());
1710 }
1711 pivot_for_pred_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1712 if (!from.pivot_for_pred_name().empty()) {
1713 pivot_for_pred_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.pivot_for_pred_name(),
1714 GetArenaNoVirtual());
1715 }
1716 pivot_for_body_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1717 if (!from.pivot_for_body_name().empty()) {
1718 pivot_for_body_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.pivot_for_body_name(),
1719 GetArenaNoVirtual());
1720 }
1721 maximum_iterations_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1722 if (!from.maximum_iterations_name().empty()) {
1723 maximum_iterations_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.maximum_iterations_name(),
1724 GetArenaNoVirtual());
1725 }
1726 if (from.has_values_def()) {
1727 values_def_ = new ::tensorflow::ValuesDef(*from.values_def_);
1728 } else {
1729 values_def_ = nullptr;
1730 }
1731 ::memcpy(&parallel_iterations_, &from.parallel_iterations_,
1732 static_cast<size_t>(reinterpret_cast<char*>(&swap_memory_) -
1733 reinterpret_cast<char*>(&parallel_iterations_)) + sizeof(swap_memory_));
1734 // @@protoc_insertion_point(copy_constructor:tensorflow.WhileContextDef)
1735}
1736
1737void WhileContextDef::SharedCtor() {
1738 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CondContextDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base);
1739 context_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1740 pivot_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1741 pivot_for_pred_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1742 pivot_for_body_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1743 maximum_iterations_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1744 ::memset(&values_def_, 0, static_cast<size_t>(
1745 reinterpret_cast<char*>(&swap_memory_) -
1746 reinterpret_cast<char*>(&values_def_)) + sizeof(swap_memory_));
1747}
1748
1749WhileContextDef::~WhileContextDef() {
1750 // @@protoc_insertion_point(destructor:tensorflow.WhileContextDef)
1751 SharedDtor();
1752}
1753
1754void WhileContextDef::SharedDtor() {
1755 GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr);
1756 context_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1757 pivot_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1758 pivot_for_pred_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1759 pivot_for_body_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1760 maximum_iterations_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
1761 if (this != internal_default_instance()) delete values_def_;
1762}
1763
1764void WhileContextDef::ArenaDtor(void* object) {
1765 WhileContextDef* _this = reinterpret_cast< WhileContextDef* >(object);
1766 (void)_this;
1767}
1768void WhileContextDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
1769}
1770void WhileContextDef::SetCachedSize(int size) const {
1771 _cached_size_.Set(size);
1772}
1773const WhileContextDef& WhileContextDef::default_instance() {
1774 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CondContextDef_tensorflow_2fcore_2fprotobuf_2fcontrol_5fflow_2eproto.base);
1775 return *internal_default_instance();
1776}
1777
1778
1779void WhileContextDef::Clear() {
1780// @@protoc_insertion_point(message_clear_start:tensorflow.WhileContextDef)
1781 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1782 // Prevent compiler warnings about cached_has_bits being unused
1783 (void) cached_has_bits;
1784
1785 loop_exit_names_.Clear();
1786 loop_enter_names_.Clear();
1787 nested_contexts_.Clear();
1788 context_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1789 pivot_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1790 pivot_for_pred_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1791 pivot_for_body_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1792 maximum_iterations_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1793 if (GetArenaNoVirtual() == nullptr && values_def_ != nullptr) {
1794 delete values_def_;
1795 }
1796 values_def_ = nullptr;
1797 ::memset(&parallel_iterations_, 0, static_cast<size_t>(
1798 reinterpret_cast<char*>(&swap_memory_) -
1799 reinterpret_cast<char*>(&parallel_iterations_)) + sizeof(swap_memory_));
1800 _internal_metadata_.Clear();
1801}
1802
1803#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1804const char* WhileContextDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1805#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1806 ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena;
1807 while (!ctx->Done(&ptr)) {
1808 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1809 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1810 CHK_(ptr);
1811 switch (tag >> 3) {
1812 // string context_name = 1;
1813 case 1:
1814 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
1815 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_context_name(), ptr, ctx, "tensorflow.WhileContextDef.context_name");
1816 CHK_(ptr);
1817 } else goto handle_unusual;
1818 continue;
1819 // int32 parallel_iterations = 2;
1820 case 2:
1821 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
1822 parallel_iterations_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1823 CHK_(ptr);
1824 } else goto handle_unusual;
1825 continue;
1826 // bool back_prop = 3;
1827 case 3:
1828 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
1829 back_prop_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1830 CHK_(ptr);
1831 } else goto handle_unusual;
1832 continue;
1833 // bool swap_memory = 4;
1834 case 4:
1835 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
1836 swap_memory_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1837 CHK_(ptr);
1838 } else goto handle_unusual;
1839 continue;
1840 // string pivot_name = 5;
1841 case 5:
1842 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
1843 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_pivot_name(), ptr, ctx, "tensorflow.WhileContextDef.pivot_name");
1844 CHK_(ptr);
1845 } else goto handle_unusual;
1846 continue;
1847 // string pivot_for_pred_name = 6;
1848 case 6:
1849 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
1850 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_pivot_for_pred_name(), ptr, ctx, "tensorflow.WhileContextDef.pivot_for_pred_name");
1851 CHK_(ptr);
1852 } else goto handle_unusual;
1853 continue;
1854 // string pivot_for_body_name = 7;
1855 case 7:
1856 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
1857 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_pivot_for_body_name(), ptr, ctx, "tensorflow.WhileContextDef.pivot_for_body_name");
1858 CHK_(ptr);
1859 } else goto handle_unusual;
1860 continue;
1861 // repeated string loop_exit_names = 8;
1862 case 8:
1863 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) {
1864 ptr -= 1;
1865 do {
1866 ptr += 1;
1867 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_loop_exit_names(), ptr, ctx, "tensorflow.WhileContextDef.loop_exit_names");
1868 CHK_(ptr);
1869 if (!ctx->DataAvailable(ptr)) break;
1870 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 66);
1871 } else goto handle_unusual;
1872 continue;
1873 // .tensorflow.ValuesDef values_def = 9;
1874 case 9:
1875 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) {
1876 ptr = ctx->ParseMessage(mutable_values_def(), ptr);
1877 CHK_(ptr);
1878 } else goto handle_unusual;
1879 continue;
1880 // repeated string loop_enter_names = 10;
1881 case 10:
1882 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) {
1883 ptr -= 1;
1884 do {
1885 ptr += 1;
1886 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_loop_enter_names(), ptr, ctx, "tensorflow.WhileContextDef.loop_enter_names");
1887 CHK_(ptr);
1888 if (!ctx->DataAvailable(ptr)) break;
1889 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 82);
1890 } else goto handle_unusual;
1891 continue;
1892 // string maximum_iterations_name = 11;
1893 case 11:
1894 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) {
1895 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_maximum_iterations_name(), ptr, ctx, "tensorflow.WhileContextDef.maximum_iterations_name");
1896 CHK_(ptr);
1897 } else goto handle_unusual;
1898 continue;
1899 // repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
1900 case 12:
1901 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) {
1902 ptr -= 1;
1903 do {
1904 ptr += 1;
1905 ptr = ctx->ParseMessage(add_nested_contexts(), ptr);
1906 CHK_(ptr);
1907 if (!ctx->DataAvailable(ptr)) break;
1908 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 98);
1909 } else goto handle_unusual;
1910 continue;
1911 default: {
1912 handle_unusual:
1913 if ((tag & 7) == 4 || tag == 0) {
1914 ctx->SetLastTag(tag);
1915 goto success;
1916 }
1917 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
1918 CHK_(ptr != nullptr);
1919 continue;
1920 }
1921 } // switch
1922 } // while
1923success:
1924 return ptr;
1925failure:
1926 ptr = nullptr;
1927 goto success;
1928#undef CHK_
1929}
1930#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1931bool WhileContextDef::MergePartialFromCodedStream(
1932 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
1933#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1934 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1935 // @@protoc_insertion_point(parse_start:tensorflow.WhileContextDef)
1936 for (;;) {
1937 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1938 tag = p.first;
1939 if (!p.second) goto handle_unusual;
1940 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1941 // string context_name = 1;
1942 case 1: {
1943 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
1944 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1945 input, this->mutable_context_name()));
1946 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1947 this->context_name().data(), static_cast<int>(this->context_name().length()),
1948 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
1949 "tensorflow.WhileContextDef.context_name"));
1950 } else {
1951 goto handle_unusual;
1952 }
1953 break;
1954 }
1955
1956 // int32 parallel_iterations = 2;
1957 case 2: {
1958 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
1959
1960 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1961 ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
1962 input, &parallel_iterations_)));
1963 } else {
1964 goto handle_unusual;
1965 }
1966 break;
1967 }
1968
1969 // bool back_prop = 3;
1970 case 3: {
1971 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
1972
1973 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1974 bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
1975 input, &back_prop_)));
1976 } else {
1977 goto handle_unusual;
1978 }
1979 break;
1980 }
1981
1982 // bool swap_memory = 4;
1983 case 4: {
1984 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
1985
1986 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1987 bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
1988 input, &swap_memory_)));
1989 } else {
1990 goto handle_unusual;
1991 }
1992 break;
1993 }
1994
1995 // string pivot_name = 5;
1996 case 5: {
1997 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
1998 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
1999 input, this->mutable_pivot_name()));
2000 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2001 this->pivot_name().data(), static_cast<int>(this->pivot_name().length()),
2002 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
2003 "tensorflow.WhileContextDef.pivot_name"));
2004 } else {
2005 goto handle_unusual;
2006 }
2007 break;
2008 }
2009
2010 // string pivot_for_pred_name = 6;
2011 case 6: {
2012 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) {
2013 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
2014 input, this->mutable_pivot_for_pred_name()));
2015 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2016 this->pivot_for_pred_name().data(), static_cast<int>(this->pivot_for_pred_name().length()),
2017 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
2018 "tensorflow.WhileContextDef.pivot_for_pred_name"));
2019 } else {
2020 goto handle_unusual;
2021 }
2022 break;
2023 }
2024
2025 // string pivot_for_body_name = 7;
2026 case 7: {
2027 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) {
2028 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
2029 input, this->mutable_pivot_for_body_name()));
2030 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2031 this->pivot_for_body_name().data(), static_cast<int>(this->pivot_for_body_name().length()),
2032 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
2033 "tensorflow.WhileContextDef.pivot_for_body_name"));
2034 } else {
2035 goto handle_unusual;
2036 }
2037 break;
2038 }
2039
2040 // repeated string loop_exit_names = 8;
2041 case 8: {
2042 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) {
2043 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
2044 input, this->add_loop_exit_names()));
2045 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2046 this->loop_exit_names(this->loop_exit_names_size() - 1).data(),
2047 static_cast<int>(this->loop_exit_names(this->loop_exit_names_size() - 1).length()),
2048 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
2049 "tensorflow.WhileContextDef.loop_exit_names"));
2050 } else {
2051 goto handle_unusual;
2052 }
2053 break;
2054 }
2055
2056 // .tensorflow.ValuesDef values_def = 9;
2057 case 9: {
2058 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) {
2059 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
2060 input, mutable_values_def()));
2061 } else {
2062 goto handle_unusual;
2063 }
2064 break;
2065 }
2066
2067 // repeated string loop_enter_names = 10;
2068 case 10: {
2069 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) {
2070 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
2071 input, this->add_loop_enter_names()));
2072 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2073 this->loop_enter_names(this->loop_enter_names_size() - 1).data(),
2074 static_cast<int>(this->loop_enter_names(this->loop_enter_names_size() - 1).length()),
2075 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
2076 "tensorflow.WhileContextDef.loop_enter_names"));
2077 } else {
2078 goto handle_unusual;
2079 }
2080 break;
2081 }
2082
2083 // string maximum_iterations_name = 11;
2084 case 11: {
2085 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) {
2086 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
2087 input, this->mutable_maximum_iterations_name()));
2088 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2089 this->maximum_iterations_name().data(), static_cast<int>(this->maximum_iterations_name().length()),
2090 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
2091 "tensorflow.WhileContextDef.maximum_iterations_name"));
2092 } else {
2093 goto handle_unusual;
2094 }
2095 break;
2096 }
2097
2098 // repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
2099 case 12: {
2100 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (98 & 0xFF)) {
2101 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
2102 input, add_nested_contexts()));
2103 } else {
2104 goto handle_unusual;
2105 }
2106 break;
2107 }
2108
2109 default: {
2110 handle_unusual:
2111 if (tag == 0) {
2112 goto success;
2113 }
2114 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
2115 input, tag, _internal_metadata_.mutable_unknown_fields()));
2116 break;
2117 }
2118 }
2119 }
2120success:
2121 // @@protoc_insertion_point(parse_success:tensorflow.WhileContextDef)
2122 return true;
2123failure:
2124 // @@protoc_insertion_point(parse_failure:tensorflow.WhileContextDef)
2125 return false;
2126#undef DO_
2127}
2128#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2129
2130void WhileContextDef::SerializeWithCachedSizes(
2131 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
2132 // @@protoc_insertion_point(serialize_start:tensorflow.WhileContextDef)
2133 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2134 (void) cached_has_bits;
2135
2136 // string context_name = 1;
2137 if (this->context_name().size() > 0) {
2138 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2139 this->context_name().data(), static_cast<int>(this->context_name().length()),
2140 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2141 "tensorflow.WhileContextDef.context_name");
2142 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
2143 1, this->context_name(), output);
2144 }
2145
2146 // int32 parallel_iterations = 2;
2147 if (this->parallel_iterations() != 0) {
2148 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->parallel_iterations(), output);
2149 }
2150
2151 // bool back_prop = 3;
2152 if (this->back_prop() != 0) {
2153 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->back_prop(), output);
2154 }
2155
2156 // bool swap_memory = 4;
2157 if (this->swap_memory() != 0) {
2158 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(4, this->swap_memory(), output);
2159 }
2160
2161 // string pivot_name = 5;
2162 if (this->pivot_name().size() > 0) {
2163 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2164 this->pivot_name().data(), static_cast<int>(this->pivot_name().length()),
2165 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2166 "tensorflow.WhileContextDef.pivot_name");
2167 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
2168 5, this->pivot_name(), output);
2169 }
2170
2171 // string pivot_for_pred_name = 6;
2172 if (this->pivot_for_pred_name().size() > 0) {
2173 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2174 this->pivot_for_pred_name().data(), static_cast<int>(this->pivot_for_pred_name().length()),
2175 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2176 "tensorflow.WhileContextDef.pivot_for_pred_name");
2177 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
2178 6, this->pivot_for_pred_name(), output);
2179 }
2180
2181 // string pivot_for_body_name = 7;
2182 if (this->pivot_for_body_name().size() > 0) {
2183 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2184 this->pivot_for_body_name().data(), static_cast<int>(this->pivot_for_body_name().length()),
2185 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2186 "tensorflow.WhileContextDef.pivot_for_body_name");
2187 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
2188 7, this->pivot_for_body_name(), output);
2189 }
2190
2191 // repeated string loop_exit_names = 8;
2192 for (int i = 0, n = this->loop_exit_names_size(); i < n; i++) {
2193 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2194 this->loop_exit_names(i).data(), static_cast<int>(this->loop_exit_names(i).length()),
2195 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2196 "tensorflow.WhileContextDef.loop_exit_names");
2197 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
2198 8, this->loop_exit_names(i), output);
2199 }
2200
2201 // .tensorflow.ValuesDef values_def = 9;
2202 if (this->has_values_def()) {
2203 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2204 9, _Internal::values_def(this), output);
2205 }
2206
2207 // repeated string loop_enter_names = 10;
2208 for (int i = 0, n = this->loop_enter_names_size(); i < n; i++) {
2209 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2210 this->loop_enter_names(i).data(), static_cast<int>(this->loop_enter_names(i).length()),
2211 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2212 "tensorflow.WhileContextDef.loop_enter_names");
2213 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString(
2214 10, this->loop_enter_names(i), output);
2215 }
2216
2217 // string maximum_iterations_name = 11;
2218 if (this->maximum_iterations_name().size() > 0) {
2219 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2220 this->maximum_iterations_name().data(), static_cast<int>(this->maximum_iterations_name().length()),
2221 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2222 "tensorflow.WhileContextDef.maximum_iterations_name");
2223 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
2224 11, this->maximum_iterations_name(), output);
2225 }
2226
2227 // repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
2228 for (unsigned int i = 0,
2229 n = static_cast<unsigned int>(this->nested_contexts_size()); i < n; i++) {
2230 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2231 12,
2232 this->nested_contexts(static_cast<int>(i)),
2233 output);
2234 }
2235
2236 if (_internal_metadata_.have_unknown_fields()) {
2237 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
2238 _internal_metadata_.unknown_fields(), output);
2239 }
2240 // @@protoc_insertion_point(serialize_end:tensorflow.WhileContextDef)
2241}
2242
2243::PROTOBUF_NAMESPACE_ID::uint8* WhileContextDef::InternalSerializeWithCachedSizesToArray(
2244 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
2245 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.WhileContextDef)
2246 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2247 (void) cached_has_bits;
2248
2249 // string context_name = 1;
2250 if (this->context_name().size() > 0) {
2251 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2252 this->context_name().data(), static_cast<int>(this->context_name().length()),
2253 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2254 "tensorflow.WhileContextDef.context_name");
2255 target =
2256 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2257 1, this->context_name(), target);
2258 }
2259
2260 // int32 parallel_iterations = 2;
2261 if (this->parallel_iterations() != 0) {
2262 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->parallel_iterations(), target);
2263 }
2264
2265 // bool back_prop = 3;
2266 if (this->back_prop() != 0) {
2267 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->back_prop(), target);
2268 }
2269
2270 // bool swap_memory = 4;
2271 if (this->swap_memory() != 0) {
2272 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->swap_memory(), target);
2273 }
2274
2275 // string pivot_name = 5;
2276 if (this->pivot_name().size() > 0) {
2277 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2278 this->pivot_name().data(), static_cast<int>(this->pivot_name().length()),
2279 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2280 "tensorflow.WhileContextDef.pivot_name");
2281 target =
2282 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2283 5, this->pivot_name(), target);
2284 }
2285
2286 // string pivot_for_pred_name = 6;
2287 if (this->pivot_for_pred_name().size() > 0) {
2288 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2289 this->pivot_for_pred_name().data(), static_cast<int>(this->pivot_for_pred_name().length()),
2290 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2291 "tensorflow.WhileContextDef.pivot_for_pred_name");
2292 target =
2293 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2294 6, this->pivot_for_pred_name(), target);
2295 }
2296
2297 // string pivot_for_body_name = 7;
2298 if (this->pivot_for_body_name().size() > 0) {
2299 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2300 this->pivot_for_body_name().data(), static_cast<int>(this->pivot_for_body_name().length()),
2301 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2302 "tensorflow.WhileContextDef.pivot_for_body_name");
2303 target =
2304 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2305 7, this->pivot_for_body_name(), target);
2306 }
2307
2308 // repeated string loop_exit_names = 8;
2309 for (int i = 0, n = this->loop_exit_names_size(); i < n; i++) {
2310 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2311 this->loop_exit_names(i).data(), static_cast<int>(this->loop_exit_names(i).length()),
2312 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2313 "tensorflow.WhileContextDef.loop_exit_names");
2314 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2315 WriteStringToArray(8, this->loop_exit_names(i), target);
2316 }
2317
2318 // .tensorflow.ValuesDef values_def = 9;
2319 if (this->has_values_def()) {
2320 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2321 InternalWriteMessageToArray(
2322 9, _Internal::values_def(this), target);
2323 }
2324
2325 // repeated string loop_enter_names = 10;
2326 for (int i = 0, n = this->loop_enter_names_size(); i < n; i++) {
2327 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2328 this->loop_enter_names(i).data(), static_cast<int>(this->loop_enter_names(i).length()),
2329 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2330 "tensorflow.WhileContextDef.loop_enter_names");
2331 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2332 WriteStringToArray(10, this->loop_enter_names(i), target);
2333 }
2334
2335 // string maximum_iterations_name = 11;
2336 if (this->maximum_iterations_name().size() > 0) {
2337 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2338 this->maximum_iterations_name().data(), static_cast<int>(this->maximum_iterations_name().length()),
2339 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2340 "tensorflow.WhileContextDef.maximum_iterations_name");
2341 target =
2342 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2343 11, this->maximum_iterations_name(), target);
2344 }
2345
2346 // repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
2347 for (unsigned int i = 0,
2348 n = static_cast<unsigned int>(this->nested_contexts_size()); i < n; i++) {
2349 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2350 InternalWriteMessageToArray(
2351 12, this->nested_contexts(static_cast<int>(i)), target);
2352 }
2353
2354 if (_internal_metadata_.have_unknown_fields()) {
2355 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
2356 _internal_metadata_.unknown_fields(), target);
2357 }
2358 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.WhileContextDef)
2359 return target;
2360}
2361
2362size_t WhileContextDef::ByteSizeLong() const {
2363// @@protoc_insertion_point(message_byte_size_start:tensorflow.WhileContextDef)
2364 size_t total_size = 0;
2365
2366 if (_internal_metadata_.have_unknown_fields()) {
2367 total_size +=
2368 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
2369 _internal_metadata_.unknown_fields());
2370 }
2371 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2372 // Prevent compiler warnings about cached_has_bits being unused
2373 (void) cached_has_bits;
2374
2375 // repeated string loop_exit_names = 8;
2376 total_size += 1 *
2377 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->loop_exit_names_size());
2378 for (int i = 0, n = this->loop_exit_names_size(); i < n; i++) {
2379 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2380 this->loop_exit_names(i));
2381 }
2382
2383 // repeated string loop_enter_names = 10;
2384 total_size += 1 *
2385 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->loop_enter_names_size());
2386 for (int i = 0, n = this->loop_enter_names_size(); i < n; i++) {
2387 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2388 this->loop_enter_names(i));
2389 }
2390
2391 // repeated .tensorflow.ControlFlowContextDef nested_contexts = 12;
2392 {
2393 unsigned int count = static_cast<unsigned int>(this->nested_contexts_size());
2394 total_size += 1UL * count;
2395 for (unsigned int i = 0; i < count; i++) {
2396 total_size +=
2397 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2398 this->nested_contexts(static_cast<int>(i)));
2399 }
2400 }
2401
2402 // string context_name = 1;
2403 if (this->context_name().size() > 0) {
2404 total_size += 1 +
2405 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2406 this->context_name());
2407 }
2408
2409 // string pivot_name = 5;
2410 if (this->pivot_name().size() > 0) {
2411 total_size += 1 +
2412 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2413 this->pivot_name());
2414 }
2415
2416 // string pivot_for_pred_name = 6;
2417 if (this->pivot_for_pred_name().size() > 0) {
2418 total_size += 1 +
2419 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2420 this->pivot_for_pred_name());
2421 }
2422
2423 // string pivot_for_body_name = 7;
2424 if (this->pivot_for_body_name().size() > 0) {
2425 total_size += 1 +
2426 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2427 this->pivot_for_body_name());
2428 }
2429
2430 // string maximum_iterations_name = 11;
2431 if (this->maximum_iterations_name().size() > 0) {
2432 total_size += 1 +
2433 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2434 this->maximum_iterations_name());
2435 }
2436
2437 // .tensorflow.ValuesDef values_def = 9;
2438 if (this->has_values_def()) {
2439 total_size += 1 +
2440 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2441 *values_def_);
2442 }
2443
2444 // int32 parallel_iterations = 2;
2445 if (this->parallel_iterations() != 0) {
2446 total_size += 1 +
2447 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
2448 this->parallel_iterations());
2449 }
2450
2451 // bool back_prop = 3;
2452 if (this->back_prop() != 0) {
2453 total_size += 1 + 1;
2454 }
2455
2456 // bool swap_memory = 4;
2457 if (this->swap_memory() != 0) {
2458 total_size += 1 + 1;
2459 }
2460
2461 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
2462 SetCachedSize(cached_size);
2463 return total_size;
2464}
2465
2466void WhileContextDef::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2467// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.WhileContextDef)
2468 GOOGLE_DCHECK_NE(&from, this);
2469 const WhileContextDef* source =
2470 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WhileContextDef>(
2471 &from);
2472 if (source == nullptr) {
2473 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.WhileContextDef)
2474 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
2475 } else {
2476 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.WhileContextDef)
2477 MergeFrom(*source);
2478 }
2479}
2480
2481void WhileContextDef::MergeFrom(const WhileContextDef& from) {
2482// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.WhileContextDef)
2483 GOOGLE_DCHECK_NE(&from, this);
2484 _internal_metadata_.MergeFrom(from._internal_metadata_);
2485 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2486 (void) cached_has_bits;
2487
2488 loop_exit_names_.MergeFrom(from.loop_exit_names_);
2489 loop_enter_names_.MergeFrom(from.loop_enter_names_);
2490 nested_contexts_.MergeFrom(from.nested_contexts_);
2491 if (from.context_name().size() > 0) {
2492 set_context_name(from.context_name());
2493 }
2494 if (from.pivot_name().size() > 0) {
2495 set_pivot_name(from.pivot_name());
2496 }
2497 if (from.pivot_for_pred_name().size() > 0) {
2498 set_pivot_for_pred_name(from.pivot_for_pred_name());
2499 }
2500 if (from.pivot_for_body_name().size() > 0) {
2501 set_pivot_for_body_name(from.pivot_for_body_name());
2502 }
2503 if (from.maximum_iterations_name().size() > 0) {
2504 set_maximum_iterations_name(from.maximum_iterations_name());
2505 }
2506 if (from.has_values_def()) {
2507 mutable_values_def()->::tensorflow::ValuesDef::MergeFrom(from.values_def());
2508 }
2509 if (from.parallel_iterations() != 0) {
2510 set_parallel_iterations(from.parallel_iterations());
2511 }
2512 if (from.back_prop() != 0) {
2513 set_back_prop(from.back_prop());
2514 }
2515 if (from.swap_memory() != 0) {
2516 set_swap_memory(from.swap_memory());
2517 }
2518}
2519
2520void WhileContextDef::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2521// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.WhileContextDef)
2522 if (&from == this) return;
2523 Clear();
2524 MergeFrom(from);
2525}
2526
2527void WhileContextDef::CopyFrom(const WhileContextDef& from) {
2528// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.WhileContextDef)
2529 if (&from == this) return;
2530 Clear();
2531 MergeFrom(from);
2532}
2533
2534bool WhileContextDef::IsInitialized() const {
2535 return true;
2536}
2537
2538void WhileContextDef::InternalSwap(WhileContextDef* other) {
2539 using std::swap;
2540 _internal_metadata_.Swap(&other->_internal_metadata_);
2541 loop_exit_names_.InternalSwap(CastToBase(&other->loop_exit_names_));
2542 loop_enter_names_.InternalSwap(CastToBase(&other->loop_enter_names_));
2543 CastToBase(&nested_contexts_)->InternalSwap(CastToBase(&other->nested_contexts_));
2544 context_name_.Swap(&other->context_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
2545 GetArenaNoVirtual());
2546 pivot_name_.Swap(&other->pivot_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
2547 GetArenaNoVirtual());
2548 pivot_for_pred_name_.Swap(&other->pivot_for_pred_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
2549 GetArenaNoVirtual());
2550 pivot_for_body_name_.Swap(&other->pivot_for_body_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
2551 GetArenaNoVirtual());
2552 maximum_iterations_name_.Swap(&other->maximum_iterations_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
2553 GetArenaNoVirtual());
2554 swap(values_def_, other->values_def_);
2555 swap(parallel_iterations_, other->parallel_iterations_);
2556 swap(back_prop_, other->back_prop_);
2557 swap(swap_memory_, other->swap_memory_);
2558}
2559
2560::PROTOBUF_NAMESPACE_ID::Metadata WhileContextDef::GetMetadata() const {
2561 return GetMetadataStatic();
2562}
2563
2564
2565// @@protoc_insertion_point(namespace_scope)
2566} // namespace tensorflow
2567PROTOBUF_NAMESPACE_OPEN
2568template<> PROTOBUF_NOINLINE ::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse >(Arena* arena) {
2569 return Arena::CreateMessageInternal< ::tensorflow::ValuesDef_ExternalValuesEntry_DoNotUse >(arena);
2570}
2571template<> PROTOBUF_NOINLINE ::tensorflow::ValuesDef* Arena::CreateMaybeMessage< ::tensorflow::ValuesDef >(Arena* arena) {
2572 return Arena::CreateMessageInternal< ::tensorflow::ValuesDef >(arena);
2573}
2574template<> PROTOBUF_NOINLINE ::tensorflow::ControlFlowContextDef* Arena::CreateMaybeMessage< ::tensorflow::ControlFlowContextDef >(Arena* arena) {
2575 return Arena::CreateMessageInternal< ::tensorflow::ControlFlowContextDef >(arena);
2576}
2577template<> PROTOBUF_NOINLINE ::tensorflow::CondContextDef* Arena::CreateMaybeMessage< ::tensorflow::CondContextDef >(Arena* arena) {
2578 return Arena::CreateMessageInternal< ::tensorflow::CondContextDef >(arena);
2579}
2580template<> PROTOBUF_NOINLINE ::tensorflow::WhileContextDef* Arena::CreateMaybeMessage< ::tensorflow::WhileContextDef >(Arena* arena) {
2581 return Arena::CreateMessageInternal< ::tensorflow::WhileContextDef >(arena);
2582}
2583PROTOBUF_NAMESPACE_CLOSE
2584
2585// @@protoc_insertion_point(global_scope)
2586#include <google/protobuf/port_undef.inc>
2587