1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: tensorflow/core/framework/op_def.proto
3
4 #include "tensorflow/core/framework/op_def.pb.h"
5
6 #include <algorithm>
7 #include <cstdint>
8
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/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15
16 PROTOBUF_PRAGMA_INIT_SEG
17
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20
21 namespace tensorflow {
OpDef_ArgDef(::_pbi::ConstantInitialized)22 PROTOBUF_CONSTEXPR OpDef_ArgDef::OpDef_ArgDef(
23 ::_pbi::ConstantInitialized): _impl_{
24 /*decltype(_impl_.handle_data_)*/{}
25 , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
26 , /*decltype(_impl_.description_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
27 , /*decltype(_impl_.type_attr_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28 , /*decltype(_impl_.number_attr_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
29 , /*decltype(_impl_.type_list_attr_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
30 , /*decltype(_impl_.experimental_full_type_)*/nullptr
31 , /*decltype(_impl_.type_)*/0
32 , /*decltype(_impl_.is_ref_)*/false
33 , /*decltype(_impl_._cached_size_)*/{}} {}
34 struct OpDef_ArgDefDefaultTypeInternal {
OpDef_ArgDefDefaultTypeInternaltensorflow::OpDef_ArgDefDefaultTypeInternal35 PROTOBUF_CONSTEXPR OpDef_ArgDefDefaultTypeInternal()
36 : _instance(::_pbi::ConstantInitialized{}) {}
~OpDef_ArgDefDefaultTypeInternaltensorflow::OpDef_ArgDefDefaultTypeInternal37 ~OpDef_ArgDefDefaultTypeInternal() {}
38 union { // NOLINT(misc-non-private-member-variables-in-classes)
39 OpDef_ArgDef _instance;
40 };
41 };
42 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OpDef_ArgDefDefaultTypeInternal _OpDef_ArgDef_default_instance_;
OpDef_AttrDef(::_pbi::ConstantInitialized)43 PROTOBUF_CONSTEXPR OpDef_AttrDef::OpDef_AttrDef(
44 ::_pbi::ConstantInitialized): _impl_{
45 /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
46 , /*decltype(_impl_.type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
47 , /*decltype(_impl_.description_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
48 , /*decltype(_impl_.default_value_)*/nullptr
49 , /*decltype(_impl_.allowed_values_)*/nullptr
50 , /*decltype(_impl_.minimum_)*/::int64_t{0}
51 , /*decltype(_impl_.has_minimum_)*/false
52 , /*decltype(_impl_._cached_size_)*/{}} {}
53 struct OpDef_AttrDefDefaultTypeInternal {
OpDef_AttrDefDefaultTypeInternaltensorflow::OpDef_AttrDefDefaultTypeInternal54 PROTOBUF_CONSTEXPR OpDef_AttrDefDefaultTypeInternal()
55 : _instance(::_pbi::ConstantInitialized{}) {}
~OpDef_AttrDefDefaultTypeInternaltensorflow::OpDef_AttrDefDefaultTypeInternal56 ~OpDef_AttrDefDefaultTypeInternal() {}
57 union { // NOLINT(misc-non-private-member-variables-in-classes)
58 OpDef_AttrDef _instance;
59 };
60 };
61 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OpDef_AttrDefDefaultTypeInternal _OpDef_AttrDef_default_instance_;
OpDef(::_pbi::ConstantInitialized)62 PROTOBUF_CONSTEXPR OpDef::OpDef(
63 ::_pbi::ConstantInitialized): _impl_{
64 /*decltype(_impl_.input_arg_)*/{}
65 , /*decltype(_impl_.output_arg_)*/{}
66 , /*decltype(_impl_.attr_)*/{}
67 , /*decltype(_impl_.control_output_)*/{}
68 , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
69 , /*decltype(_impl_.summary_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
70 , /*decltype(_impl_.description_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
71 , /*decltype(_impl_.deprecation_)*/nullptr
72 , /*decltype(_impl_.is_commutative_)*/false
73 , /*decltype(_impl_.is_aggregate_)*/false
74 , /*decltype(_impl_.is_stateful_)*/false
75 , /*decltype(_impl_.allows_uninitialized_input_)*/false
76 , /*decltype(_impl_.is_distributed_communication_)*/false
77 , /*decltype(_impl_._cached_size_)*/{}} {}
78 struct OpDefDefaultTypeInternal {
OpDefDefaultTypeInternaltensorflow::OpDefDefaultTypeInternal79 PROTOBUF_CONSTEXPR OpDefDefaultTypeInternal()
80 : _instance(::_pbi::ConstantInitialized{}) {}
~OpDefDefaultTypeInternaltensorflow::OpDefDefaultTypeInternal81 ~OpDefDefaultTypeInternal() {}
82 union { // NOLINT(misc-non-private-member-variables-in-classes)
83 OpDef _instance;
84 };
85 };
86 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OpDefDefaultTypeInternal _OpDef_default_instance_;
OpDeprecation(::_pbi::ConstantInitialized)87 PROTOBUF_CONSTEXPR OpDeprecation::OpDeprecation(
88 ::_pbi::ConstantInitialized): _impl_{
89 /*decltype(_impl_.explanation_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
90 , /*decltype(_impl_.version_)*/0
91 , /*decltype(_impl_._cached_size_)*/{}} {}
92 struct OpDeprecationDefaultTypeInternal {
OpDeprecationDefaultTypeInternaltensorflow::OpDeprecationDefaultTypeInternal93 PROTOBUF_CONSTEXPR OpDeprecationDefaultTypeInternal()
94 : _instance(::_pbi::ConstantInitialized{}) {}
~OpDeprecationDefaultTypeInternaltensorflow::OpDeprecationDefaultTypeInternal95 ~OpDeprecationDefaultTypeInternal() {}
96 union { // NOLINT(misc-non-private-member-variables-in-classes)
97 OpDeprecation _instance;
98 };
99 };
100 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OpDeprecationDefaultTypeInternal _OpDeprecation_default_instance_;
OpList(::_pbi::ConstantInitialized)101 PROTOBUF_CONSTEXPR OpList::OpList(
102 ::_pbi::ConstantInitialized): _impl_{
103 /*decltype(_impl_.op_)*/{}
104 , /*decltype(_impl_._cached_size_)*/{}} {}
105 struct OpListDefaultTypeInternal {
OpListDefaultTypeInternaltensorflow::OpListDefaultTypeInternal106 PROTOBUF_CONSTEXPR OpListDefaultTypeInternal()
107 : _instance(::_pbi::ConstantInitialized{}) {}
~OpListDefaultTypeInternaltensorflow::OpListDefaultTypeInternal108 ~OpListDefaultTypeInternal() {}
109 union { // NOLINT(misc-non-private-member-variables-in-classes)
110 OpList _instance;
111 };
112 };
113 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OpListDefaultTypeInternal _OpList_default_instance_;
114 } // namespace tensorflow
115 namespace tensorflow {
116
117 // ===================================================================
118
119 class OpDef_ArgDef::_Internal {
120 public:
121 static const ::tensorflow::FullTypeDef& experimental_full_type(const OpDef_ArgDef* msg);
122 };
123
124 const ::tensorflow::FullTypeDef&
experimental_full_type(const OpDef_ArgDef * msg)125 OpDef_ArgDef::_Internal::experimental_full_type(const OpDef_ArgDef* msg) {
126 return *msg->_impl_.experimental_full_type_;
127 }
clear_handle_data()128 void OpDef_ArgDef::clear_handle_data() {
129 _impl_.handle_data_.Clear();
130 }
clear_experimental_full_type()131 void OpDef_ArgDef::clear_experimental_full_type() {
132 if (GetArenaForAllocation() == nullptr && _impl_.experimental_full_type_ != nullptr) {
133 delete _impl_.experimental_full_type_;
134 }
135 _impl_.experimental_full_type_ = nullptr;
136 }
OpDef_ArgDef(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)137 OpDef_ArgDef::OpDef_ArgDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
138 bool is_message_owned)
139 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
140 SharedCtor(arena, is_message_owned);
141 // @@protoc_insertion_point(arena_constructor:tensorflow.OpDef.ArgDef)
142 }
OpDef_ArgDef(const OpDef_ArgDef & from)143 OpDef_ArgDef::OpDef_ArgDef(const OpDef_ArgDef& from)
144 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
145 OpDef_ArgDef* const _this = this; (void)_this;
146 new (&_impl_) Impl_{
147 decltype(_impl_.handle_data_){from._impl_.handle_data_}
148 , decltype(_impl_.name_){}
149 , decltype(_impl_.description_){}
150 , decltype(_impl_.type_attr_){}
151 , decltype(_impl_.number_attr_){}
152 , decltype(_impl_.type_list_attr_){}
153 , decltype(_impl_.experimental_full_type_){nullptr}
154 , decltype(_impl_.type_){}
155 , decltype(_impl_.is_ref_){}
156 , /*decltype(_impl_._cached_size_)*/{}};
157
158 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
159 _impl_.name_.InitDefault();
160 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
161 _impl_.name_.Set("", GetArenaForAllocation());
162 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
163 if (!from._internal_name().empty()) {
164 _this->_impl_.name_.Set(from._internal_name(),
165 _this->GetArenaForAllocation());
166 }
167 _impl_.description_.InitDefault();
168 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
169 _impl_.description_.Set("", GetArenaForAllocation());
170 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
171 if (!from._internal_description().empty()) {
172 _this->_impl_.description_.Set(from._internal_description(),
173 _this->GetArenaForAllocation());
174 }
175 _impl_.type_attr_.InitDefault();
176 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
177 _impl_.type_attr_.Set("", GetArenaForAllocation());
178 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
179 if (!from._internal_type_attr().empty()) {
180 _this->_impl_.type_attr_.Set(from._internal_type_attr(),
181 _this->GetArenaForAllocation());
182 }
183 _impl_.number_attr_.InitDefault();
184 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
185 _impl_.number_attr_.Set("", GetArenaForAllocation());
186 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
187 if (!from._internal_number_attr().empty()) {
188 _this->_impl_.number_attr_.Set(from._internal_number_attr(),
189 _this->GetArenaForAllocation());
190 }
191 _impl_.type_list_attr_.InitDefault();
192 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
193 _impl_.type_list_attr_.Set("", GetArenaForAllocation());
194 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
195 if (!from._internal_type_list_attr().empty()) {
196 _this->_impl_.type_list_attr_.Set(from._internal_type_list_attr(),
197 _this->GetArenaForAllocation());
198 }
199 if (from._internal_has_experimental_full_type()) {
200 _this->_impl_.experimental_full_type_ = new ::tensorflow::FullTypeDef(*from._impl_.experimental_full_type_);
201 }
202 ::memcpy(&_impl_.type_, &from._impl_.type_,
203 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.is_ref_) -
204 reinterpret_cast<char*>(&_impl_.type_)) + sizeof(_impl_.is_ref_));
205 // @@protoc_insertion_point(copy_constructor:tensorflow.OpDef.ArgDef)
206 }
207
SharedCtor(::_pb::Arena * arena,bool is_message_owned)208 inline void OpDef_ArgDef::SharedCtor(
209 ::_pb::Arena* arena, bool is_message_owned) {
210 (void)arena;
211 (void)is_message_owned;
212 new (&_impl_) Impl_{
213 decltype(_impl_.handle_data_){arena}
214 , decltype(_impl_.name_){}
215 , decltype(_impl_.description_){}
216 , decltype(_impl_.type_attr_){}
217 , decltype(_impl_.number_attr_){}
218 , decltype(_impl_.type_list_attr_){}
219 , decltype(_impl_.experimental_full_type_){nullptr}
220 , decltype(_impl_.type_){0}
221 , decltype(_impl_.is_ref_){false}
222 , /*decltype(_impl_._cached_size_)*/{}
223 };
224 _impl_.name_.InitDefault();
225 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
226 _impl_.name_.Set("", GetArenaForAllocation());
227 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
228 _impl_.description_.InitDefault();
229 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
230 _impl_.description_.Set("", GetArenaForAllocation());
231 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
232 _impl_.type_attr_.InitDefault();
233 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
234 _impl_.type_attr_.Set("", GetArenaForAllocation());
235 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
236 _impl_.number_attr_.InitDefault();
237 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
238 _impl_.number_attr_.Set("", GetArenaForAllocation());
239 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
240 _impl_.type_list_attr_.InitDefault();
241 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
242 _impl_.type_list_attr_.Set("", GetArenaForAllocation());
243 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
244 }
245
~OpDef_ArgDef()246 OpDef_ArgDef::~OpDef_ArgDef() {
247 // @@protoc_insertion_point(destructor:tensorflow.OpDef.ArgDef)
248 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
249 (void)arena;
250 return;
251 }
252 SharedDtor();
253 }
254
SharedDtor()255 inline void OpDef_ArgDef::SharedDtor() {
256 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
257 _impl_.handle_data_.~RepeatedPtrField();
258 _impl_.name_.Destroy();
259 _impl_.description_.Destroy();
260 _impl_.type_attr_.Destroy();
261 _impl_.number_attr_.Destroy();
262 _impl_.type_list_attr_.Destroy();
263 if (this != internal_default_instance()) delete _impl_.experimental_full_type_;
264 }
265
SetCachedSize(int size) const266 void OpDef_ArgDef::SetCachedSize(int size) const {
267 _impl_._cached_size_.Set(size);
268 }
269
Clear()270 void OpDef_ArgDef::Clear() {
271 // @@protoc_insertion_point(message_clear_start:tensorflow.OpDef.ArgDef)
272 ::uint32_t cached_has_bits = 0;
273 // Prevent compiler warnings about cached_has_bits being unused
274 (void) cached_has_bits;
275
276 _impl_.handle_data_.Clear();
277 _impl_.name_.ClearToEmpty();
278 _impl_.description_.ClearToEmpty();
279 _impl_.type_attr_.ClearToEmpty();
280 _impl_.number_attr_.ClearToEmpty();
281 _impl_.type_list_attr_.ClearToEmpty();
282 if (GetArenaForAllocation() == nullptr && _impl_.experimental_full_type_ != nullptr) {
283 delete _impl_.experimental_full_type_;
284 }
285 _impl_.experimental_full_type_ = nullptr;
286 ::memset(&_impl_.type_, 0, static_cast<size_t>(
287 reinterpret_cast<char*>(&_impl_.is_ref_) -
288 reinterpret_cast<char*>(&_impl_.type_)) + sizeof(_impl_.is_ref_));
289 _internal_metadata_.Clear<std::string>();
290 }
291
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)292 const char* OpDef_ArgDef::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
293 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
294 while (!ctx->Done(&ptr)) {
295 ::uint32_t tag;
296 ptr = ::_pbi::ReadTag(ptr, &tag);
297 switch (tag >> 3) {
298 // string name = 1;
299 case 1:
300 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
301 auto str = _internal_mutable_name();
302 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
303 CHK_(ptr);
304 CHK_(::_pbi::VerifyUTF8(str, nullptr));
305 } else {
306 goto handle_unusual;
307 }
308 continue;
309 // string description = 2;
310 case 2:
311 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
312 auto str = _internal_mutable_description();
313 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
314 CHK_(ptr);
315 CHK_(::_pbi::VerifyUTF8(str, nullptr));
316 } else {
317 goto handle_unusual;
318 }
319 continue;
320 // .tensorflow.DataType type = 3;
321 case 3:
322 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
323 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
324 CHK_(ptr);
325 _internal_set_type(static_cast<::tensorflow::DataType>(val));
326 } else {
327 goto handle_unusual;
328 }
329 continue;
330 // string type_attr = 4;
331 case 4:
332 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
333 auto str = _internal_mutable_type_attr();
334 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
335 CHK_(ptr);
336 CHK_(::_pbi::VerifyUTF8(str, nullptr));
337 } else {
338 goto handle_unusual;
339 }
340 continue;
341 // string number_attr = 5;
342 case 5:
343 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
344 auto str = _internal_mutable_number_attr();
345 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
346 CHK_(ptr);
347 CHK_(::_pbi::VerifyUTF8(str, nullptr));
348 } else {
349 goto handle_unusual;
350 }
351 continue;
352 // string type_list_attr = 6;
353 case 6:
354 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
355 auto str = _internal_mutable_type_list_attr();
356 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
357 CHK_(ptr);
358 CHK_(::_pbi::VerifyUTF8(str, nullptr));
359 } else {
360 goto handle_unusual;
361 }
362 continue;
363 // repeated .tensorflow.ResourceHandleProto.DtypeAndShape handle_data = 7;
364 case 7:
365 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
366 ptr -= 1;
367 do {
368 ptr += 1;
369 ptr = ctx->ParseMessage(_internal_add_handle_data(), ptr);
370 CHK_(ptr);
371 if (!ctx->DataAvailable(ptr)) break;
372 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
373 } else {
374 goto handle_unusual;
375 }
376 continue;
377 // bool is_ref = 16;
378 case 16:
379 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 128)) {
380 _impl_.is_ref_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
381 CHK_(ptr);
382 } else {
383 goto handle_unusual;
384 }
385 continue;
386 // .tensorflow.FullTypeDef experimental_full_type = 17;
387 case 17:
388 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 138)) {
389 ptr = ctx->ParseMessage(_internal_mutable_experimental_full_type(), ptr);
390 CHK_(ptr);
391 } else {
392 goto handle_unusual;
393 }
394 continue;
395 default:
396 goto handle_unusual;
397 } // switch
398 handle_unusual:
399 if ((tag == 0) || ((tag & 7) == 4)) {
400 CHK_(ptr);
401 ctx->SetLastTag(tag);
402 goto message_done;
403 }
404 ptr = UnknownFieldParse(
405 tag,
406 _internal_metadata_.mutable_unknown_fields<std::string>(),
407 ptr, ctx);
408 CHK_(ptr != nullptr);
409 } // while
410 message_done:
411 return ptr;
412 failure:
413 ptr = nullptr;
414 goto message_done;
415 #undef CHK_
416 }
417
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const418 ::uint8_t* OpDef_ArgDef::_InternalSerialize(
419 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
420 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDef.ArgDef)
421 ::uint32_t cached_has_bits = 0;
422 (void) cached_has_bits;
423
424 // string name = 1;
425 if (!this->_internal_name().empty()) {
426 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
427 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
428 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
429 "tensorflow.OpDef.ArgDef.name");
430 target = stream->WriteStringMaybeAliased(
431 1, this->_internal_name(), target);
432 }
433
434 // string description = 2;
435 if (!this->_internal_description().empty()) {
436 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
437 this->_internal_description().data(), static_cast<int>(this->_internal_description().length()),
438 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
439 "tensorflow.OpDef.ArgDef.description");
440 target = stream->WriteStringMaybeAliased(
441 2, this->_internal_description(), target);
442 }
443
444 // .tensorflow.DataType type = 3;
445 if (this->_internal_type() != 0) {
446 target = stream->EnsureSpace(target);
447 target = ::_pbi::WireFormatLite::WriteEnumToArray(
448 3, this->_internal_type(), target);
449 }
450
451 // string type_attr = 4;
452 if (!this->_internal_type_attr().empty()) {
453 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
454 this->_internal_type_attr().data(), static_cast<int>(this->_internal_type_attr().length()),
455 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
456 "tensorflow.OpDef.ArgDef.type_attr");
457 target = stream->WriteStringMaybeAliased(
458 4, this->_internal_type_attr(), target);
459 }
460
461 // string number_attr = 5;
462 if (!this->_internal_number_attr().empty()) {
463 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
464 this->_internal_number_attr().data(), static_cast<int>(this->_internal_number_attr().length()),
465 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
466 "tensorflow.OpDef.ArgDef.number_attr");
467 target = stream->WriteStringMaybeAliased(
468 5, this->_internal_number_attr(), target);
469 }
470
471 // string type_list_attr = 6;
472 if (!this->_internal_type_list_attr().empty()) {
473 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
474 this->_internal_type_list_attr().data(), static_cast<int>(this->_internal_type_list_attr().length()),
475 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
476 "tensorflow.OpDef.ArgDef.type_list_attr");
477 target = stream->WriteStringMaybeAliased(
478 6, this->_internal_type_list_attr(), target);
479 }
480
481 // repeated .tensorflow.ResourceHandleProto.DtypeAndShape handle_data = 7;
482 for (unsigned i = 0,
483 n = static_cast<unsigned>(this->_internal_handle_data_size()); i < n; i++) {
484 const auto& repfield = this->_internal_handle_data(i);
485 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
486 InternalWriteMessage(7, repfield, repfield.GetCachedSize(), target, stream);
487 }
488
489 // bool is_ref = 16;
490 if (this->_internal_is_ref() != 0) {
491 target = stream->EnsureSpace(target);
492 target = ::_pbi::WireFormatLite::WriteBoolToArray(16, this->_internal_is_ref(), target);
493 }
494
495 // .tensorflow.FullTypeDef experimental_full_type = 17;
496 if (this->_internal_has_experimental_full_type()) {
497 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
498 InternalWriteMessage(17, _Internal::experimental_full_type(this),
499 _Internal::experimental_full_type(this).GetCachedSize(), target, stream);
500 }
501
502 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
503 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
504 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
505 }
506 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDef.ArgDef)
507 return target;
508 }
509
ByteSizeLong() const510 size_t OpDef_ArgDef::ByteSizeLong() const {
511 // @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDef.ArgDef)
512 size_t total_size = 0;
513
514 ::uint32_t cached_has_bits = 0;
515 // Prevent compiler warnings about cached_has_bits being unused
516 (void) cached_has_bits;
517
518 // repeated .tensorflow.ResourceHandleProto.DtypeAndShape handle_data = 7;
519 total_size += 1UL * this->_internal_handle_data_size();
520 for (const auto& msg : this->_impl_.handle_data_) {
521 total_size +=
522 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
523 }
524
525 // string name = 1;
526 if (!this->_internal_name().empty()) {
527 total_size += 1 +
528 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
529 this->_internal_name());
530 }
531
532 // string description = 2;
533 if (!this->_internal_description().empty()) {
534 total_size += 1 +
535 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
536 this->_internal_description());
537 }
538
539 // string type_attr = 4;
540 if (!this->_internal_type_attr().empty()) {
541 total_size += 1 +
542 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
543 this->_internal_type_attr());
544 }
545
546 // string number_attr = 5;
547 if (!this->_internal_number_attr().empty()) {
548 total_size += 1 +
549 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
550 this->_internal_number_attr());
551 }
552
553 // string type_list_attr = 6;
554 if (!this->_internal_type_list_attr().empty()) {
555 total_size += 1 +
556 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
557 this->_internal_type_list_attr());
558 }
559
560 // .tensorflow.FullTypeDef experimental_full_type = 17;
561 if (this->_internal_has_experimental_full_type()) {
562 total_size += 2 +
563 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
564 *_impl_.experimental_full_type_);
565 }
566
567 // .tensorflow.DataType type = 3;
568 if (this->_internal_type() != 0) {
569 total_size += 1 +
570 ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
571 }
572
573 // bool is_ref = 16;
574 if (this->_internal_is_ref() != 0) {
575 total_size += 2 + 1;
576 }
577
578 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
579 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
580 }
581 int cached_size = ::_pbi::ToCachedSize(total_size);
582 SetCachedSize(cached_size);
583 return total_size;
584 }
585
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)586 void OpDef_ArgDef::CheckTypeAndMergeFrom(
587 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
588 MergeFrom(*::_pbi::DownCast<const OpDef_ArgDef*>(
589 &from));
590 }
591
MergeFrom(const OpDef_ArgDef & from)592 void OpDef_ArgDef::MergeFrom(const OpDef_ArgDef& from) {
593 OpDef_ArgDef* const _this = this;
594 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDef.ArgDef)
595 GOOGLE_DCHECK_NE(&from, _this);
596 ::uint32_t cached_has_bits = 0;
597 (void) cached_has_bits;
598
599 _this->_impl_.handle_data_.MergeFrom(from._impl_.handle_data_);
600 if (!from._internal_name().empty()) {
601 _this->_internal_set_name(from._internal_name());
602 }
603 if (!from._internal_description().empty()) {
604 _this->_internal_set_description(from._internal_description());
605 }
606 if (!from._internal_type_attr().empty()) {
607 _this->_internal_set_type_attr(from._internal_type_attr());
608 }
609 if (!from._internal_number_attr().empty()) {
610 _this->_internal_set_number_attr(from._internal_number_attr());
611 }
612 if (!from._internal_type_list_attr().empty()) {
613 _this->_internal_set_type_list_attr(from._internal_type_list_attr());
614 }
615 if (from._internal_has_experimental_full_type()) {
616 _this->_internal_mutable_experimental_full_type()->::tensorflow::FullTypeDef::MergeFrom(
617 from._internal_experimental_full_type());
618 }
619 if (from._internal_type() != 0) {
620 _this->_internal_set_type(from._internal_type());
621 }
622 if (from._internal_is_ref() != 0) {
623 _this->_internal_set_is_ref(from._internal_is_ref());
624 }
625 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
626 }
627
CopyFrom(const OpDef_ArgDef & from)628 void OpDef_ArgDef::CopyFrom(const OpDef_ArgDef& from) {
629 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDef.ArgDef)
630 if (&from == this) return;
631 Clear();
632 MergeFrom(from);
633 }
634
IsInitialized() const635 bool OpDef_ArgDef::IsInitialized() const {
636 return true;
637 }
638
InternalSwap(OpDef_ArgDef * other)639 void OpDef_ArgDef::InternalSwap(OpDef_ArgDef* other) {
640 using std::swap;
641 auto* lhs_arena = GetArenaForAllocation();
642 auto* rhs_arena = other->GetArenaForAllocation();
643 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
644 _impl_.handle_data_.InternalSwap(&other->_impl_.handle_data_);
645 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
646 &_impl_.name_, lhs_arena,
647 &other->_impl_.name_, rhs_arena
648 );
649 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
650 &_impl_.description_, lhs_arena,
651 &other->_impl_.description_, rhs_arena
652 );
653 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
654 &_impl_.type_attr_, lhs_arena,
655 &other->_impl_.type_attr_, rhs_arena
656 );
657 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
658 &_impl_.number_attr_, lhs_arena,
659 &other->_impl_.number_attr_, rhs_arena
660 );
661 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
662 &_impl_.type_list_attr_, lhs_arena,
663 &other->_impl_.type_list_attr_, rhs_arena
664 );
665 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
666 PROTOBUF_FIELD_OFFSET(OpDef_ArgDef, _impl_.is_ref_)
667 + sizeof(OpDef_ArgDef::_impl_.is_ref_) // NOLINT
668 - PROTOBUF_FIELD_OFFSET(OpDef_ArgDef, _impl_.experimental_full_type_)>(
669 reinterpret_cast<char*>(&_impl_.experimental_full_type_),
670 reinterpret_cast<char*>(&other->_impl_.experimental_full_type_));
671 }
672
GetTypeName() const673 std::string OpDef_ArgDef::GetTypeName() const {
674 return "tensorflow.OpDef.ArgDef";
675 }
676
677
678 // ===================================================================
679
680 class OpDef_AttrDef::_Internal {
681 public:
682 static const ::tensorflow::AttrValue& default_value(const OpDef_AttrDef* msg);
683 static const ::tensorflow::AttrValue& allowed_values(const OpDef_AttrDef* msg);
684 };
685
686 const ::tensorflow::AttrValue&
default_value(const OpDef_AttrDef * msg)687 OpDef_AttrDef::_Internal::default_value(const OpDef_AttrDef* msg) {
688 return *msg->_impl_.default_value_;
689 }
690 const ::tensorflow::AttrValue&
allowed_values(const OpDef_AttrDef * msg)691 OpDef_AttrDef::_Internal::allowed_values(const OpDef_AttrDef* msg) {
692 return *msg->_impl_.allowed_values_;
693 }
clear_default_value()694 void OpDef_AttrDef::clear_default_value() {
695 if (GetArenaForAllocation() == nullptr && _impl_.default_value_ != nullptr) {
696 delete _impl_.default_value_;
697 }
698 _impl_.default_value_ = nullptr;
699 }
clear_allowed_values()700 void OpDef_AttrDef::clear_allowed_values() {
701 if (GetArenaForAllocation() == nullptr && _impl_.allowed_values_ != nullptr) {
702 delete _impl_.allowed_values_;
703 }
704 _impl_.allowed_values_ = nullptr;
705 }
OpDef_AttrDef(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)706 OpDef_AttrDef::OpDef_AttrDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
707 bool is_message_owned)
708 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
709 SharedCtor(arena, is_message_owned);
710 // @@protoc_insertion_point(arena_constructor:tensorflow.OpDef.AttrDef)
711 }
OpDef_AttrDef(const OpDef_AttrDef & from)712 OpDef_AttrDef::OpDef_AttrDef(const OpDef_AttrDef& from)
713 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
714 OpDef_AttrDef* const _this = this; (void)_this;
715 new (&_impl_) Impl_{
716 decltype(_impl_.name_){}
717 , decltype(_impl_.type_){}
718 , decltype(_impl_.description_){}
719 , decltype(_impl_.default_value_){nullptr}
720 , decltype(_impl_.allowed_values_){nullptr}
721 , decltype(_impl_.minimum_){}
722 , decltype(_impl_.has_minimum_){}
723 , /*decltype(_impl_._cached_size_)*/{}};
724
725 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
726 _impl_.name_.InitDefault();
727 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
728 _impl_.name_.Set("", GetArenaForAllocation());
729 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
730 if (!from._internal_name().empty()) {
731 _this->_impl_.name_.Set(from._internal_name(),
732 _this->GetArenaForAllocation());
733 }
734 _impl_.type_.InitDefault();
735 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
736 _impl_.type_.Set("", GetArenaForAllocation());
737 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
738 if (!from._internal_type().empty()) {
739 _this->_impl_.type_.Set(from._internal_type(),
740 _this->GetArenaForAllocation());
741 }
742 _impl_.description_.InitDefault();
743 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
744 _impl_.description_.Set("", GetArenaForAllocation());
745 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
746 if (!from._internal_description().empty()) {
747 _this->_impl_.description_.Set(from._internal_description(),
748 _this->GetArenaForAllocation());
749 }
750 if (from._internal_has_default_value()) {
751 _this->_impl_.default_value_ = new ::tensorflow::AttrValue(*from._impl_.default_value_);
752 }
753 if (from._internal_has_allowed_values()) {
754 _this->_impl_.allowed_values_ = new ::tensorflow::AttrValue(*from._impl_.allowed_values_);
755 }
756 ::memcpy(&_impl_.minimum_, &from._impl_.minimum_,
757 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.has_minimum_) -
758 reinterpret_cast<char*>(&_impl_.minimum_)) + sizeof(_impl_.has_minimum_));
759 // @@protoc_insertion_point(copy_constructor:tensorflow.OpDef.AttrDef)
760 }
761
SharedCtor(::_pb::Arena * arena,bool is_message_owned)762 inline void OpDef_AttrDef::SharedCtor(
763 ::_pb::Arena* arena, bool is_message_owned) {
764 (void)arena;
765 (void)is_message_owned;
766 new (&_impl_) Impl_{
767 decltype(_impl_.name_){}
768 , decltype(_impl_.type_){}
769 , decltype(_impl_.description_){}
770 , decltype(_impl_.default_value_){nullptr}
771 , decltype(_impl_.allowed_values_){nullptr}
772 , decltype(_impl_.minimum_){::int64_t{0}}
773 , decltype(_impl_.has_minimum_){false}
774 , /*decltype(_impl_._cached_size_)*/{}
775 };
776 _impl_.name_.InitDefault();
777 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
778 _impl_.name_.Set("", GetArenaForAllocation());
779 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
780 _impl_.type_.InitDefault();
781 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
782 _impl_.type_.Set("", GetArenaForAllocation());
783 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
784 _impl_.description_.InitDefault();
785 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
786 _impl_.description_.Set("", GetArenaForAllocation());
787 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
788 }
789
~OpDef_AttrDef()790 OpDef_AttrDef::~OpDef_AttrDef() {
791 // @@protoc_insertion_point(destructor:tensorflow.OpDef.AttrDef)
792 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
793 (void)arena;
794 return;
795 }
796 SharedDtor();
797 }
798
SharedDtor()799 inline void OpDef_AttrDef::SharedDtor() {
800 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
801 _impl_.name_.Destroy();
802 _impl_.type_.Destroy();
803 _impl_.description_.Destroy();
804 if (this != internal_default_instance()) delete _impl_.default_value_;
805 if (this != internal_default_instance()) delete _impl_.allowed_values_;
806 }
807
SetCachedSize(int size) const808 void OpDef_AttrDef::SetCachedSize(int size) const {
809 _impl_._cached_size_.Set(size);
810 }
811
Clear()812 void OpDef_AttrDef::Clear() {
813 // @@protoc_insertion_point(message_clear_start:tensorflow.OpDef.AttrDef)
814 ::uint32_t cached_has_bits = 0;
815 // Prevent compiler warnings about cached_has_bits being unused
816 (void) cached_has_bits;
817
818 _impl_.name_.ClearToEmpty();
819 _impl_.type_.ClearToEmpty();
820 _impl_.description_.ClearToEmpty();
821 if (GetArenaForAllocation() == nullptr && _impl_.default_value_ != nullptr) {
822 delete _impl_.default_value_;
823 }
824 _impl_.default_value_ = nullptr;
825 if (GetArenaForAllocation() == nullptr && _impl_.allowed_values_ != nullptr) {
826 delete _impl_.allowed_values_;
827 }
828 _impl_.allowed_values_ = nullptr;
829 ::memset(&_impl_.minimum_, 0, static_cast<size_t>(
830 reinterpret_cast<char*>(&_impl_.has_minimum_) -
831 reinterpret_cast<char*>(&_impl_.minimum_)) + sizeof(_impl_.has_minimum_));
832 _internal_metadata_.Clear<std::string>();
833 }
834
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)835 const char* OpDef_AttrDef::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
836 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
837 while (!ctx->Done(&ptr)) {
838 ::uint32_t tag;
839 ptr = ::_pbi::ReadTag(ptr, &tag);
840 switch (tag >> 3) {
841 // string name = 1;
842 case 1:
843 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
844 auto str = _internal_mutable_name();
845 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
846 CHK_(ptr);
847 CHK_(::_pbi::VerifyUTF8(str, nullptr));
848 } else {
849 goto handle_unusual;
850 }
851 continue;
852 // string type = 2;
853 case 2:
854 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
855 auto str = _internal_mutable_type();
856 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
857 CHK_(ptr);
858 CHK_(::_pbi::VerifyUTF8(str, nullptr));
859 } else {
860 goto handle_unusual;
861 }
862 continue;
863 // .tensorflow.AttrValue default_value = 3;
864 case 3:
865 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
866 ptr = ctx->ParseMessage(_internal_mutable_default_value(), ptr);
867 CHK_(ptr);
868 } else {
869 goto handle_unusual;
870 }
871 continue;
872 // string description = 4;
873 case 4:
874 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
875 auto str = _internal_mutable_description();
876 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
877 CHK_(ptr);
878 CHK_(::_pbi::VerifyUTF8(str, nullptr));
879 } else {
880 goto handle_unusual;
881 }
882 continue;
883 // bool has_minimum = 5;
884 case 5:
885 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
886 _impl_.has_minimum_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
887 CHK_(ptr);
888 } else {
889 goto handle_unusual;
890 }
891 continue;
892 // int64 minimum = 6;
893 case 6:
894 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
895 _impl_.minimum_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
896 CHK_(ptr);
897 } else {
898 goto handle_unusual;
899 }
900 continue;
901 // .tensorflow.AttrValue allowed_values = 7;
902 case 7:
903 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
904 ptr = ctx->ParseMessage(_internal_mutable_allowed_values(), ptr);
905 CHK_(ptr);
906 } else {
907 goto handle_unusual;
908 }
909 continue;
910 default:
911 goto handle_unusual;
912 } // switch
913 handle_unusual:
914 if ((tag == 0) || ((tag & 7) == 4)) {
915 CHK_(ptr);
916 ctx->SetLastTag(tag);
917 goto message_done;
918 }
919 ptr = UnknownFieldParse(
920 tag,
921 _internal_metadata_.mutable_unknown_fields<std::string>(),
922 ptr, ctx);
923 CHK_(ptr != nullptr);
924 } // while
925 message_done:
926 return ptr;
927 failure:
928 ptr = nullptr;
929 goto message_done;
930 #undef CHK_
931 }
932
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const933 ::uint8_t* OpDef_AttrDef::_InternalSerialize(
934 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
935 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDef.AttrDef)
936 ::uint32_t cached_has_bits = 0;
937 (void) cached_has_bits;
938
939 // string name = 1;
940 if (!this->_internal_name().empty()) {
941 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
942 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
943 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
944 "tensorflow.OpDef.AttrDef.name");
945 target = stream->WriteStringMaybeAliased(
946 1, this->_internal_name(), target);
947 }
948
949 // string type = 2;
950 if (!this->_internal_type().empty()) {
951 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
952 this->_internal_type().data(), static_cast<int>(this->_internal_type().length()),
953 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
954 "tensorflow.OpDef.AttrDef.type");
955 target = stream->WriteStringMaybeAliased(
956 2, this->_internal_type(), target);
957 }
958
959 // .tensorflow.AttrValue default_value = 3;
960 if (this->_internal_has_default_value()) {
961 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
962 InternalWriteMessage(3, _Internal::default_value(this),
963 _Internal::default_value(this).GetCachedSize(), target, stream);
964 }
965
966 // string description = 4;
967 if (!this->_internal_description().empty()) {
968 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
969 this->_internal_description().data(), static_cast<int>(this->_internal_description().length()),
970 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
971 "tensorflow.OpDef.AttrDef.description");
972 target = stream->WriteStringMaybeAliased(
973 4, this->_internal_description(), target);
974 }
975
976 // bool has_minimum = 5;
977 if (this->_internal_has_minimum() != 0) {
978 target = stream->EnsureSpace(target);
979 target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_has_minimum(), target);
980 }
981
982 // int64 minimum = 6;
983 if (this->_internal_minimum() != 0) {
984 target = stream->EnsureSpace(target);
985 target = ::_pbi::WireFormatLite::WriteInt64ToArray(6, this->_internal_minimum(), target);
986 }
987
988 // .tensorflow.AttrValue allowed_values = 7;
989 if (this->_internal_has_allowed_values()) {
990 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
991 InternalWriteMessage(7, _Internal::allowed_values(this),
992 _Internal::allowed_values(this).GetCachedSize(), target, stream);
993 }
994
995 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
996 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
997 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
998 }
999 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDef.AttrDef)
1000 return target;
1001 }
1002
ByteSizeLong() const1003 size_t OpDef_AttrDef::ByteSizeLong() const {
1004 // @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDef.AttrDef)
1005 size_t total_size = 0;
1006
1007 ::uint32_t cached_has_bits = 0;
1008 // Prevent compiler warnings about cached_has_bits being unused
1009 (void) cached_has_bits;
1010
1011 // string name = 1;
1012 if (!this->_internal_name().empty()) {
1013 total_size += 1 +
1014 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1015 this->_internal_name());
1016 }
1017
1018 // string type = 2;
1019 if (!this->_internal_type().empty()) {
1020 total_size += 1 +
1021 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1022 this->_internal_type());
1023 }
1024
1025 // string description = 4;
1026 if (!this->_internal_description().empty()) {
1027 total_size += 1 +
1028 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1029 this->_internal_description());
1030 }
1031
1032 // .tensorflow.AttrValue default_value = 3;
1033 if (this->_internal_has_default_value()) {
1034 total_size += 1 +
1035 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1036 *_impl_.default_value_);
1037 }
1038
1039 // .tensorflow.AttrValue allowed_values = 7;
1040 if (this->_internal_has_allowed_values()) {
1041 total_size += 1 +
1042 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1043 *_impl_.allowed_values_);
1044 }
1045
1046 // int64 minimum = 6;
1047 if (this->_internal_minimum() != 0) {
1048 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_minimum());
1049 }
1050
1051 // bool has_minimum = 5;
1052 if (this->_internal_has_minimum() != 0) {
1053 total_size += 1 + 1;
1054 }
1055
1056 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1057 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1058 }
1059 int cached_size = ::_pbi::ToCachedSize(total_size);
1060 SetCachedSize(cached_size);
1061 return total_size;
1062 }
1063
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1064 void OpDef_AttrDef::CheckTypeAndMergeFrom(
1065 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1066 MergeFrom(*::_pbi::DownCast<const OpDef_AttrDef*>(
1067 &from));
1068 }
1069
MergeFrom(const OpDef_AttrDef & from)1070 void OpDef_AttrDef::MergeFrom(const OpDef_AttrDef& from) {
1071 OpDef_AttrDef* const _this = this;
1072 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDef.AttrDef)
1073 GOOGLE_DCHECK_NE(&from, _this);
1074 ::uint32_t cached_has_bits = 0;
1075 (void) cached_has_bits;
1076
1077 if (!from._internal_name().empty()) {
1078 _this->_internal_set_name(from._internal_name());
1079 }
1080 if (!from._internal_type().empty()) {
1081 _this->_internal_set_type(from._internal_type());
1082 }
1083 if (!from._internal_description().empty()) {
1084 _this->_internal_set_description(from._internal_description());
1085 }
1086 if (from._internal_has_default_value()) {
1087 _this->_internal_mutable_default_value()->::tensorflow::AttrValue::MergeFrom(
1088 from._internal_default_value());
1089 }
1090 if (from._internal_has_allowed_values()) {
1091 _this->_internal_mutable_allowed_values()->::tensorflow::AttrValue::MergeFrom(
1092 from._internal_allowed_values());
1093 }
1094 if (from._internal_minimum() != 0) {
1095 _this->_internal_set_minimum(from._internal_minimum());
1096 }
1097 if (from._internal_has_minimum() != 0) {
1098 _this->_internal_set_has_minimum(from._internal_has_minimum());
1099 }
1100 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1101 }
1102
CopyFrom(const OpDef_AttrDef & from)1103 void OpDef_AttrDef::CopyFrom(const OpDef_AttrDef& from) {
1104 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDef.AttrDef)
1105 if (&from == this) return;
1106 Clear();
1107 MergeFrom(from);
1108 }
1109
IsInitialized() const1110 bool OpDef_AttrDef::IsInitialized() const {
1111 return true;
1112 }
1113
InternalSwap(OpDef_AttrDef * other)1114 void OpDef_AttrDef::InternalSwap(OpDef_AttrDef* other) {
1115 using std::swap;
1116 auto* lhs_arena = GetArenaForAllocation();
1117 auto* rhs_arena = other->GetArenaForAllocation();
1118 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1119 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1120 &_impl_.name_, lhs_arena,
1121 &other->_impl_.name_, rhs_arena
1122 );
1123 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1124 &_impl_.type_, lhs_arena,
1125 &other->_impl_.type_, rhs_arena
1126 );
1127 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1128 &_impl_.description_, lhs_arena,
1129 &other->_impl_.description_, rhs_arena
1130 );
1131 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1132 PROTOBUF_FIELD_OFFSET(OpDef_AttrDef, _impl_.has_minimum_)
1133 + sizeof(OpDef_AttrDef::_impl_.has_minimum_) // NOLINT
1134 - PROTOBUF_FIELD_OFFSET(OpDef_AttrDef, _impl_.default_value_)>(
1135 reinterpret_cast<char*>(&_impl_.default_value_),
1136 reinterpret_cast<char*>(&other->_impl_.default_value_));
1137 }
1138
GetTypeName() const1139 std::string OpDef_AttrDef::GetTypeName() const {
1140 return "tensorflow.OpDef.AttrDef";
1141 }
1142
1143
1144 // ===================================================================
1145
1146 class OpDef::_Internal {
1147 public:
1148 static const ::tensorflow::OpDeprecation& deprecation(const OpDef* msg);
1149 };
1150
1151 const ::tensorflow::OpDeprecation&
deprecation(const OpDef * msg)1152 OpDef::_Internal::deprecation(const OpDef* msg) {
1153 return *msg->_impl_.deprecation_;
1154 }
OpDef(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1155 OpDef::OpDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1156 bool is_message_owned)
1157 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1158 SharedCtor(arena, is_message_owned);
1159 // @@protoc_insertion_point(arena_constructor:tensorflow.OpDef)
1160 }
OpDef(const OpDef & from)1161 OpDef::OpDef(const OpDef& from)
1162 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1163 OpDef* const _this = this; (void)_this;
1164 new (&_impl_) Impl_{
1165 decltype(_impl_.input_arg_){from._impl_.input_arg_}
1166 , decltype(_impl_.output_arg_){from._impl_.output_arg_}
1167 , decltype(_impl_.attr_){from._impl_.attr_}
1168 , decltype(_impl_.control_output_){from._impl_.control_output_}
1169 , decltype(_impl_.name_){}
1170 , decltype(_impl_.summary_){}
1171 , decltype(_impl_.description_){}
1172 , decltype(_impl_.deprecation_){nullptr}
1173 , decltype(_impl_.is_commutative_){}
1174 , decltype(_impl_.is_aggregate_){}
1175 , decltype(_impl_.is_stateful_){}
1176 , decltype(_impl_.allows_uninitialized_input_){}
1177 , decltype(_impl_.is_distributed_communication_){}
1178 , /*decltype(_impl_._cached_size_)*/{}};
1179
1180 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1181 _impl_.name_.InitDefault();
1182 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1183 _impl_.name_.Set("", GetArenaForAllocation());
1184 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1185 if (!from._internal_name().empty()) {
1186 _this->_impl_.name_.Set(from._internal_name(),
1187 _this->GetArenaForAllocation());
1188 }
1189 _impl_.summary_.InitDefault();
1190 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1191 _impl_.summary_.Set("", GetArenaForAllocation());
1192 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1193 if (!from._internal_summary().empty()) {
1194 _this->_impl_.summary_.Set(from._internal_summary(),
1195 _this->GetArenaForAllocation());
1196 }
1197 _impl_.description_.InitDefault();
1198 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1199 _impl_.description_.Set("", GetArenaForAllocation());
1200 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1201 if (!from._internal_description().empty()) {
1202 _this->_impl_.description_.Set(from._internal_description(),
1203 _this->GetArenaForAllocation());
1204 }
1205 if (from._internal_has_deprecation()) {
1206 _this->_impl_.deprecation_ = new ::tensorflow::OpDeprecation(*from._impl_.deprecation_);
1207 }
1208 ::memcpy(&_impl_.is_commutative_, &from._impl_.is_commutative_,
1209 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.is_distributed_communication_) -
1210 reinterpret_cast<char*>(&_impl_.is_commutative_)) + sizeof(_impl_.is_distributed_communication_));
1211 // @@protoc_insertion_point(copy_constructor:tensorflow.OpDef)
1212 }
1213
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1214 inline void OpDef::SharedCtor(
1215 ::_pb::Arena* arena, bool is_message_owned) {
1216 (void)arena;
1217 (void)is_message_owned;
1218 new (&_impl_) Impl_{
1219 decltype(_impl_.input_arg_){arena}
1220 , decltype(_impl_.output_arg_){arena}
1221 , decltype(_impl_.attr_){arena}
1222 , decltype(_impl_.control_output_){arena}
1223 , decltype(_impl_.name_){}
1224 , decltype(_impl_.summary_){}
1225 , decltype(_impl_.description_){}
1226 , decltype(_impl_.deprecation_){nullptr}
1227 , decltype(_impl_.is_commutative_){false}
1228 , decltype(_impl_.is_aggregate_){false}
1229 , decltype(_impl_.is_stateful_){false}
1230 , decltype(_impl_.allows_uninitialized_input_){false}
1231 , decltype(_impl_.is_distributed_communication_){false}
1232 , /*decltype(_impl_._cached_size_)*/{}
1233 };
1234 _impl_.name_.InitDefault();
1235 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1236 _impl_.name_.Set("", GetArenaForAllocation());
1237 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1238 _impl_.summary_.InitDefault();
1239 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1240 _impl_.summary_.Set("", GetArenaForAllocation());
1241 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1242 _impl_.description_.InitDefault();
1243 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1244 _impl_.description_.Set("", GetArenaForAllocation());
1245 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1246 }
1247
~OpDef()1248 OpDef::~OpDef() {
1249 // @@protoc_insertion_point(destructor:tensorflow.OpDef)
1250 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1251 (void)arena;
1252 return;
1253 }
1254 SharedDtor();
1255 }
1256
SharedDtor()1257 inline void OpDef::SharedDtor() {
1258 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1259 _impl_.input_arg_.~RepeatedPtrField();
1260 _impl_.output_arg_.~RepeatedPtrField();
1261 _impl_.attr_.~RepeatedPtrField();
1262 _impl_.control_output_.~RepeatedPtrField();
1263 _impl_.name_.Destroy();
1264 _impl_.summary_.Destroy();
1265 _impl_.description_.Destroy();
1266 if (this != internal_default_instance()) delete _impl_.deprecation_;
1267 }
1268
SetCachedSize(int size) const1269 void OpDef::SetCachedSize(int size) const {
1270 _impl_._cached_size_.Set(size);
1271 }
1272
Clear()1273 void OpDef::Clear() {
1274 // @@protoc_insertion_point(message_clear_start:tensorflow.OpDef)
1275 ::uint32_t cached_has_bits = 0;
1276 // Prevent compiler warnings about cached_has_bits being unused
1277 (void) cached_has_bits;
1278
1279 _impl_.input_arg_.Clear();
1280 _impl_.output_arg_.Clear();
1281 _impl_.attr_.Clear();
1282 _impl_.control_output_.Clear();
1283 _impl_.name_.ClearToEmpty();
1284 _impl_.summary_.ClearToEmpty();
1285 _impl_.description_.ClearToEmpty();
1286 if (GetArenaForAllocation() == nullptr && _impl_.deprecation_ != nullptr) {
1287 delete _impl_.deprecation_;
1288 }
1289 _impl_.deprecation_ = nullptr;
1290 ::memset(&_impl_.is_commutative_, 0, static_cast<size_t>(
1291 reinterpret_cast<char*>(&_impl_.is_distributed_communication_) -
1292 reinterpret_cast<char*>(&_impl_.is_commutative_)) + sizeof(_impl_.is_distributed_communication_));
1293 _internal_metadata_.Clear<std::string>();
1294 }
1295
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1296 const char* OpDef::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1297 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1298 while (!ctx->Done(&ptr)) {
1299 ::uint32_t tag;
1300 ptr = ::_pbi::ReadTag(ptr, &tag);
1301 switch (tag >> 3) {
1302 // string name = 1;
1303 case 1:
1304 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1305 auto str = _internal_mutable_name();
1306 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1307 CHK_(ptr);
1308 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1309 } else {
1310 goto handle_unusual;
1311 }
1312 continue;
1313 // repeated .tensorflow.OpDef.ArgDef input_arg = 2;
1314 case 2:
1315 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1316 ptr -= 1;
1317 do {
1318 ptr += 1;
1319 ptr = ctx->ParseMessage(_internal_add_input_arg(), ptr);
1320 CHK_(ptr);
1321 if (!ctx->DataAvailable(ptr)) break;
1322 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1323 } else {
1324 goto handle_unusual;
1325 }
1326 continue;
1327 // repeated .tensorflow.OpDef.ArgDef output_arg = 3;
1328 case 3:
1329 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1330 ptr -= 1;
1331 do {
1332 ptr += 1;
1333 ptr = ctx->ParseMessage(_internal_add_output_arg(), ptr);
1334 CHK_(ptr);
1335 if (!ctx->DataAvailable(ptr)) break;
1336 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1337 } else {
1338 goto handle_unusual;
1339 }
1340 continue;
1341 // repeated .tensorflow.OpDef.AttrDef attr = 4;
1342 case 4:
1343 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1344 ptr -= 1;
1345 do {
1346 ptr += 1;
1347 ptr = ctx->ParseMessage(_internal_add_attr(), ptr);
1348 CHK_(ptr);
1349 if (!ctx->DataAvailable(ptr)) break;
1350 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
1351 } else {
1352 goto handle_unusual;
1353 }
1354 continue;
1355 // string summary = 5;
1356 case 5:
1357 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
1358 auto str = _internal_mutable_summary();
1359 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1360 CHK_(ptr);
1361 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1362 } else {
1363 goto handle_unusual;
1364 }
1365 continue;
1366 // string description = 6;
1367 case 6:
1368 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
1369 auto str = _internal_mutable_description();
1370 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1371 CHK_(ptr);
1372 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1373 } else {
1374 goto handle_unusual;
1375 }
1376 continue;
1377 // .tensorflow.OpDeprecation deprecation = 8;
1378 case 8:
1379 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
1380 ptr = ctx->ParseMessage(_internal_mutable_deprecation(), ptr);
1381 CHK_(ptr);
1382 } else {
1383 goto handle_unusual;
1384 }
1385 continue;
1386 // bool is_aggregate = 16;
1387 case 16:
1388 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 128)) {
1389 _impl_.is_aggregate_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1390 CHK_(ptr);
1391 } else {
1392 goto handle_unusual;
1393 }
1394 continue;
1395 // bool is_stateful = 17;
1396 case 17:
1397 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
1398 _impl_.is_stateful_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1399 CHK_(ptr);
1400 } else {
1401 goto handle_unusual;
1402 }
1403 continue;
1404 // bool is_commutative = 18;
1405 case 18:
1406 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 144)) {
1407 _impl_.is_commutative_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1408 CHK_(ptr);
1409 } else {
1410 goto handle_unusual;
1411 }
1412 continue;
1413 // bool allows_uninitialized_input = 19;
1414 case 19:
1415 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 152)) {
1416 _impl_.allows_uninitialized_input_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1417 CHK_(ptr);
1418 } else {
1419 goto handle_unusual;
1420 }
1421 continue;
1422 // repeated string control_output = 20;
1423 case 20:
1424 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 162)) {
1425 ptr -= 2;
1426 do {
1427 ptr += 2;
1428 auto str = _internal_add_control_output();
1429 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1430 CHK_(ptr);
1431 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1432 if (!ctx->DataAvailable(ptr)) break;
1433 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<162>(ptr));
1434 } else {
1435 goto handle_unusual;
1436 }
1437 continue;
1438 // bool is_distributed_communication = 21;
1439 case 21:
1440 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 168)) {
1441 _impl_.is_distributed_communication_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1442 CHK_(ptr);
1443 } else {
1444 goto handle_unusual;
1445 }
1446 continue;
1447 default:
1448 goto handle_unusual;
1449 } // switch
1450 handle_unusual:
1451 if ((tag == 0) || ((tag & 7) == 4)) {
1452 CHK_(ptr);
1453 ctx->SetLastTag(tag);
1454 goto message_done;
1455 }
1456 ptr = UnknownFieldParse(
1457 tag,
1458 _internal_metadata_.mutable_unknown_fields<std::string>(),
1459 ptr, ctx);
1460 CHK_(ptr != nullptr);
1461 } // while
1462 message_done:
1463 return ptr;
1464 failure:
1465 ptr = nullptr;
1466 goto message_done;
1467 #undef CHK_
1468 }
1469
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1470 ::uint8_t* OpDef::_InternalSerialize(
1471 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1472 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDef)
1473 ::uint32_t cached_has_bits = 0;
1474 (void) cached_has_bits;
1475
1476 // string name = 1;
1477 if (!this->_internal_name().empty()) {
1478 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1479 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
1480 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1481 "tensorflow.OpDef.name");
1482 target = stream->WriteStringMaybeAliased(
1483 1, this->_internal_name(), target);
1484 }
1485
1486 // repeated .tensorflow.OpDef.ArgDef input_arg = 2;
1487 for (unsigned i = 0,
1488 n = static_cast<unsigned>(this->_internal_input_arg_size()); i < n; i++) {
1489 const auto& repfield = this->_internal_input_arg(i);
1490 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1491 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
1492 }
1493
1494 // repeated .tensorflow.OpDef.ArgDef output_arg = 3;
1495 for (unsigned i = 0,
1496 n = static_cast<unsigned>(this->_internal_output_arg_size()); i < n; i++) {
1497 const auto& repfield = this->_internal_output_arg(i);
1498 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1499 InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
1500 }
1501
1502 // repeated .tensorflow.OpDef.AttrDef attr = 4;
1503 for (unsigned i = 0,
1504 n = static_cast<unsigned>(this->_internal_attr_size()); i < n; i++) {
1505 const auto& repfield = this->_internal_attr(i);
1506 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1507 InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
1508 }
1509
1510 // string summary = 5;
1511 if (!this->_internal_summary().empty()) {
1512 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1513 this->_internal_summary().data(), static_cast<int>(this->_internal_summary().length()),
1514 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1515 "tensorflow.OpDef.summary");
1516 target = stream->WriteStringMaybeAliased(
1517 5, this->_internal_summary(), target);
1518 }
1519
1520 // string description = 6;
1521 if (!this->_internal_description().empty()) {
1522 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1523 this->_internal_description().data(), static_cast<int>(this->_internal_description().length()),
1524 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1525 "tensorflow.OpDef.description");
1526 target = stream->WriteStringMaybeAliased(
1527 6, this->_internal_description(), target);
1528 }
1529
1530 // .tensorflow.OpDeprecation deprecation = 8;
1531 if (this->_internal_has_deprecation()) {
1532 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1533 InternalWriteMessage(8, _Internal::deprecation(this),
1534 _Internal::deprecation(this).GetCachedSize(), target, stream);
1535 }
1536
1537 // bool is_aggregate = 16;
1538 if (this->_internal_is_aggregate() != 0) {
1539 target = stream->EnsureSpace(target);
1540 target = ::_pbi::WireFormatLite::WriteBoolToArray(16, this->_internal_is_aggregate(), target);
1541 }
1542
1543 // bool is_stateful = 17;
1544 if (this->_internal_is_stateful() != 0) {
1545 target = stream->EnsureSpace(target);
1546 target = ::_pbi::WireFormatLite::WriteBoolToArray(17, this->_internal_is_stateful(), target);
1547 }
1548
1549 // bool is_commutative = 18;
1550 if (this->_internal_is_commutative() != 0) {
1551 target = stream->EnsureSpace(target);
1552 target = ::_pbi::WireFormatLite::WriteBoolToArray(18, this->_internal_is_commutative(), target);
1553 }
1554
1555 // bool allows_uninitialized_input = 19;
1556 if (this->_internal_allows_uninitialized_input() != 0) {
1557 target = stream->EnsureSpace(target);
1558 target = ::_pbi::WireFormatLite::WriteBoolToArray(19, this->_internal_allows_uninitialized_input(), target);
1559 }
1560
1561 // repeated string control_output = 20;
1562 for (int i = 0, n = this->_internal_control_output_size(); i < n; i++) {
1563 const auto& s = this->_internal_control_output(i);
1564 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1565 s.data(), static_cast<int>(s.length()),
1566 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1567 "tensorflow.OpDef.control_output");
1568 target = stream->WriteString(20, s, target);
1569 }
1570
1571 // bool is_distributed_communication = 21;
1572 if (this->_internal_is_distributed_communication() != 0) {
1573 target = stream->EnsureSpace(target);
1574 target = ::_pbi::WireFormatLite::WriteBoolToArray(21, this->_internal_is_distributed_communication(), target);
1575 }
1576
1577 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1578 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1579 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1580 }
1581 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDef)
1582 return target;
1583 }
1584
ByteSizeLong() const1585 size_t OpDef::ByteSizeLong() const {
1586 // @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDef)
1587 size_t total_size = 0;
1588
1589 ::uint32_t cached_has_bits = 0;
1590 // Prevent compiler warnings about cached_has_bits being unused
1591 (void) cached_has_bits;
1592
1593 // repeated .tensorflow.OpDef.ArgDef input_arg = 2;
1594 total_size += 1UL * this->_internal_input_arg_size();
1595 for (const auto& msg : this->_impl_.input_arg_) {
1596 total_size +=
1597 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1598 }
1599
1600 // repeated .tensorflow.OpDef.ArgDef output_arg = 3;
1601 total_size += 1UL * this->_internal_output_arg_size();
1602 for (const auto& msg : this->_impl_.output_arg_) {
1603 total_size +=
1604 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1605 }
1606
1607 // repeated .tensorflow.OpDef.AttrDef attr = 4;
1608 total_size += 1UL * this->_internal_attr_size();
1609 for (const auto& msg : this->_impl_.attr_) {
1610 total_size +=
1611 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1612 }
1613
1614 // repeated string control_output = 20;
1615 total_size += 2 *
1616 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.control_output_.size());
1617 for (int i = 0, n = _impl_.control_output_.size(); i < n; i++) {
1618 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1619 _impl_.control_output_.Get(i));
1620 }
1621
1622 // string name = 1;
1623 if (!this->_internal_name().empty()) {
1624 total_size += 1 +
1625 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1626 this->_internal_name());
1627 }
1628
1629 // string summary = 5;
1630 if (!this->_internal_summary().empty()) {
1631 total_size += 1 +
1632 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1633 this->_internal_summary());
1634 }
1635
1636 // string description = 6;
1637 if (!this->_internal_description().empty()) {
1638 total_size += 1 +
1639 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1640 this->_internal_description());
1641 }
1642
1643 // .tensorflow.OpDeprecation deprecation = 8;
1644 if (this->_internal_has_deprecation()) {
1645 total_size += 1 +
1646 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1647 *_impl_.deprecation_);
1648 }
1649
1650 // bool is_commutative = 18;
1651 if (this->_internal_is_commutative() != 0) {
1652 total_size += 2 + 1;
1653 }
1654
1655 // bool is_aggregate = 16;
1656 if (this->_internal_is_aggregate() != 0) {
1657 total_size += 2 + 1;
1658 }
1659
1660 // bool is_stateful = 17;
1661 if (this->_internal_is_stateful() != 0) {
1662 total_size += 2 + 1;
1663 }
1664
1665 // bool allows_uninitialized_input = 19;
1666 if (this->_internal_allows_uninitialized_input() != 0) {
1667 total_size += 2 + 1;
1668 }
1669
1670 // bool is_distributed_communication = 21;
1671 if (this->_internal_is_distributed_communication() != 0) {
1672 total_size += 2 + 1;
1673 }
1674
1675 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1676 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1677 }
1678 int cached_size = ::_pbi::ToCachedSize(total_size);
1679 SetCachedSize(cached_size);
1680 return total_size;
1681 }
1682
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1683 void OpDef::CheckTypeAndMergeFrom(
1684 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1685 MergeFrom(*::_pbi::DownCast<const OpDef*>(
1686 &from));
1687 }
1688
MergeFrom(const OpDef & from)1689 void OpDef::MergeFrom(const OpDef& from) {
1690 OpDef* const _this = this;
1691 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDef)
1692 GOOGLE_DCHECK_NE(&from, _this);
1693 ::uint32_t cached_has_bits = 0;
1694 (void) cached_has_bits;
1695
1696 _this->_impl_.input_arg_.MergeFrom(from._impl_.input_arg_);
1697 _this->_impl_.output_arg_.MergeFrom(from._impl_.output_arg_);
1698 _this->_impl_.attr_.MergeFrom(from._impl_.attr_);
1699 _this->_impl_.control_output_.MergeFrom(from._impl_.control_output_);
1700 if (!from._internal_name().empty()) {
1701 _this->_internal_set_name(from._internal_name());
1702 }
1703 if (!from._internal_summary().empty()) {
1704 _this->_internal_set_summary(from._internal_summary());
1705 }
1706 if (!from._internal_description().empty()) {
1707 _this->_internal_set_description(from._internal_description());
1708 }
1709 if (from._internal_has_deprecation()) {
1710 _this->_internal_mutable_deprecation()->::tensorflow::OpDeprecation::MergeFrom(
1711 from._internal_deprecation());
1712 }
1713 if (from._internal_is_commutative() != 0) {
1714 _this->_internal_set_is_commutative(from._internal_is_commutative());
1715 }
1716 if (from._internal_is_aggregate() != 0) {
1717 _this->_internal_set_is_aggregate(from._internal_is_aggregate());
1718 }
1719 if (from._internal_is_stateful() != 0) {
1720 _this->_internal_set_is_stateful(from._internal_is_stateful());
1721 }
1722 if (from._internal_allows_uninitialized_input() != 0) {
1723 _this->_internal_set_allows_uninitialized_input(from._internal_allows_uninitialized_input());
1724 }
1725 if (from._internal_is_distributed_communication() != 0) {
1726 _this->_internal_set_is_distributed_communication(from._internal_is_distributed_communication());
1727 }
1728 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1729 }
1730
CopyFrom(const OpDef & from)1731 void OpDef::CopyFrom(const OpDef& from) {
1732 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDef)
1733 if (&from == this) return;
1734 Clear();
1735 MergeFrom(from);
1736 }
1737
IsInitialized() const1738 bool OpDef::IsInitialized() const {
1739 return true;
1740 }
1741
InternalSwap(OpDef * other)1742 void OpDef::InternalSwap(OpDef* other) {
1743 using std::swap;
1744 auto* lhs_arena = GetArenaForAllocation();
1745 auto* rhs_arena = other->GetArenaForAllocation();
1746 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1747 _impl_.input_arg_.InternalSwap(&other->_impl_.input_arg_);
1748 _impl_.output_arg_.InternalSwap(&other->_impl_.output_arg_);
1749 _impl_.attr_.InternalSwap(&other->_impl_.attr_);
1750 _impl_.control_output_.InternalSwap(&other->_impl_.control_output_);
1751 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1752 &_impl_.name_, lhs_arena,
1753 &other->_impl_.name_, rhs_arena
1754 );
1755 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1756 &_impl_.summary_, lhs_arena,
1757 &other->_impl_.summary_, rhs_arena
1758 );
1759 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1760 &_impl_.description_, lhs_arena,
1761 &other->_impl_.description_, rhs_arena
1762 );
1763 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1764 PROTOBUF_FIELD_OFFSET(OpDef, _impl_.is_distributed_communication_)
1765 + sizeof(OpDef::_impl_.is_distributed_communication_) // NOLINT
1766 - PROTOBUF_FIELD_OFFSET(OpDef, _impl_.deprecation_)>(
1767 reinterpret_cast<char*>(&_impl_.deprecation_),
1768 reinterpret_cast<char*>(&other->_impl_.deprecation_));
1769 }
1770
GetTypeName() const1771 std::string OpDef::GetTypeName() const {
1772 return "tensorflow.OpDef";
1773 }
1774
1775
1776 // ===================================================================
1777
1778 class OpDeprecation::_Internal {
1779 public:
1780 };
1781
OpDeprecation(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1782 OpDeprecation::OpDeprecation(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1783 bool is_message_owned)
1784 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1785 SharedCtor(arena, is_message_owned);
1786 // @@protoc_insertion_point(arena_constructor:tensorflow.OpDeprecation)
1787 }
OpDeprecation(const OpDeprecation & from)1788 OpDeprecation::OpDeprecation(const OpDeprecation& from)
1789 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1790 OpDeprecation* const _this = this; (void)_this;
1791 new (&_impl_) Impl_{
1792 decltype(_impl_.explanation_){}
1793 , decltype(_impl_.version_){}
1794 , /*decltype(_impl_._cached_size_)*/{}};
1795
1796 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1797 _impl_.explanation_.InitDefault();
1798 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1799 _impl_.explanation_.Set("", GetArenaForAllocation());
1800 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1801 if (!from._internal_explanation().empty()) {
1802 _this->_impl_.explanation_.Set(from._internal_explanation(),
1803 _this->GetArenaForAllocation());
1804 }
1805 _this->_impl_.version_ = from._impl_.version_;
1806 // @@protoc_insertion_point(copy_constructor:tensorflow.OpDeprecation)
1807 }
1808
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1809 inline void OpDeprecation::SharedCtor(
1810 ::_pb::Arena* arena, bool is_message_owned) {
1811 (void)arena;
1812 (void)is_message_owned;
1813 new (&_impl_) Impl_{
1814 decltype(_impl_.explanation_){}
1815 , decltype(_impl_.version_){0}
1816 , /*decltype(_impl_._cached_size_)*/{}
1817 };
1818 _impl_.explanation_.InitDefault();
1819 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1820 _impl_.explanation_.Set("", GetArenaForAllocation());
1821 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1822 }
1823
~OpDeprecation()1824 OpDeprecation::~OpDeprecation() {
1825 // @@protoc_insertion_point(destructor:tensorflow.OpDeprecation)
1826 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1827 (void)arena;
1828 return;
1829 }
1830 SharedDtor();
1831 }
1832
SharedDtor()1833 inline void OpDeprecation::SharedDtor() {
1834 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1835 _impl_.explanation_.Destroy();
1836 }
1837
SetCachedSize(int size) const1838 void OpDeprecation::SetCachedSize(int size) const {
1839 _impl_._cached_size_.Set(size);
1840 }
1841
Clear()1842 void OpDeprecation::Clear() {
1843 // @@protoc_insertion_point(message_clear_start:tensorflow.OpDeprecation)
1844 ::uint32_t cached_has_bits = 0;
1845 // Prevent compiler warnings about cached_has_bits being unused
1846 (void) cached_has_bits;
1847
1848 _impl_.explanation_.ClearToEmpty();
1849 _impl_.version_ = 0;
1850 _internal_metadata_.Clear<std::string>();
1851 }
1852
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1853 const char* OpDeprecation::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1854 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1855 while (!ctx->Done(&ptr)) {
1856 ::uint32_t tag;
1857 ptr = ::_pbi::ReadTag(ptr, &tag);
1858 switch (tag >> 3) {
1859 // int32 version = 1;
1860 case 1:
1861 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1862 _impl_.version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1863 CHK_(ptr);
1864 } else {
1865 goto handle_unusual;
1866 }
1867 continue;
1868 // string explanation = 2;
1869 case 2:
1870 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1871 auto str = _internal_mutable_explanation();
1872 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1873 CHK_(ptr);
1874 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1875 } else {
1876 goto handle_unusual;
1877 }
1878 continue;
1879 default:
1880 goto handle_unusual;
1881 } // switch
1882 handle_unusual:
1883 if ((tag == 0) || ((tag & 7) == 4)) {
1884 CHK_(ptr);
1885 ctx->SetLastTag(tag);
1886 goto message_done;
1887 }
1888 ptr = UnknownFieldParse(
1889 tag,
1890 _internal_metadata_.mutable_unknown_fields<std::string>(),
1891 ptr, ctx);
1892 CHK_(ptr != nullptr);
1893 } // while
1894 message_done:
1895 return ptr;
1896 failure:
1897 ptr = nullptr;
1898 goto message_done;
1899 #undef CHK_
1900 }
1901
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1902 ::uint8_t* OpDeprecation::_InternalSerialize(
1903 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1904 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpDeprecation)
1905 ::uint32_t cached_has_bits = 0;
1906 (void) cached_has_bits;
1907
1908 // int32 version = 1;
1909 if (this->_internal_version() != 0) {
1910 target = stream->EnsureSpace(target);
1911 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_version(), target);
1912 }
1913
1914 // string explanation = 2;
1915 if (!this->_internal_explanation().empty()) {
1916 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1917 this->_internal_explanation().data(), static_cast<int>(this->_internal_explanation().length()),
1918 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1919 "tensorflow.OpDeprecation.explanation");
1920 target = stream->WriteStringMaybeAliased(
1921 2, this->_internal_explanation(), target);
1922 }
1923
1924 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1925 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1926 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1927 }
1928 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpDeprecation)
1929 return target;
1930 }
1931
ByteSizeLong() const1932 size_t OpDeprecation::ByteSizeLong() const {
1933 // @@protoc_insertion_point(message_byte_size_start:tensorflow.OpDeprecation)
1934 size_t total_size = 0;
1935
1936 ::uint32_t cached_has_bits = 0;
1937 // Prevent compiler warnings about cached_has_bits being unused
1938 (void) cached_has_bits;
1939
1940 // string explanation = 2;
1941 if (!this->_internal_explanation().empty()) {
1942 total_size += 1 +
1943 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1944 this->_internal_explanation());
1945 }
1946
1947 // int32 version = 1;
1948 if (this->_internal_version() != 0) {
1949 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_version());
1950 }
1951
1952 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1953 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1954 }
1955 int cached_size = ::_pbi::ToCachedSize(total_size);
1956 SetCachedSize(cached_size);
1957 return total_size;
1958 }
1959
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1960 void OpDeprecation::CheckTypeAndMergeFrom(
1961 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1962 MergeFrom(*::_pbi::DownCast<const OpDeprecation*>(
1963 &from));
1964 }
1965
MergeFrom(const OpDeprecation & from)1966 void OpDeprecation::MergeFrom(const OpDeprecation& from) {
1967 OpDeprecation* const _this = this;
1968 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpDeprecation)
1969 GOOGLE_DCHECK_NE(&from, _this);
1970 ::uint32_t cached_has_bits = 0;
1971 (void) cached_has_bits;
1972
1973 if (!from._internal_explanation().empty()) {
1974 _this->_internal_set_explanation(from._internal_explanation());
1975 }
1976 if (from._internal_version() != 0) {
1977 _this->_internal_set_version(from._internal_version());
1978 }
1979 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1980 }
1981
CopyFrom(const OpDeprecation & from)1982 void OpDeprecation::CopyFrom(const OpDeprecation& from) {
1983 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpDeprecation)
1984 if (&from == this) return;
1985 Clear();
1986 MergeFrom(from);
1987 }
1988
IsInitialized() const1989 bool OpDeprecation::IsInitialized() const {
1990 return true;
1991 }
1992
InternalSwap(OpDeprecation * other)1993 void OpDeprecation::InternalSwap(OpDeprecation* other) {
1994 using std::swap;
1995 auto* lhs_arena = GetArenaForAllocation();
1996 auto* rhs_arena = other->GetArenaForAllocation();
1997 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1998 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1999 &_impl_.explanation_, lhs_arena,
2000 &other->_impl_.explanation_, rhs_arena
2001 );
2002 swap(_impl_.version_, other->_impl_.version_);
2003 }
2004
GetTypeName() const2005 std::string OpDeprecation::GetTypeName() const {
2006 return "tensorflow.OpDeprecation";
2007 }
2008
2009
2010 // ===================================================================
2011
2012 class OpList::_Internal {
2013 public:
2014 };
2015
OpList(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2016 OpList::OpList(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2017 bool is_message_owned)
2018 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2019 SharedCtor(arena, is_message_owned);
2020 // @@protoc_insertion_point(arena_constructor:tensorflow.OpList)
2021 }
OpList(const OpList & from)2022 OpList::OpList(const OpList& from)
2023 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2024 OpList* const _this = this; (void)_this;
2025 new (&_impl_) Impl_{
2026 decltype(_impl_.op_){from._impl_.op_}
2027 , /*decltype(_impl_._cached_size_)*/{}};
2028
2029 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2030 // @@protoc_insertion_point(copy_constructor:tensorflow.OpList)
2031 }
2032
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2033 inline void OpList::SharedCtor(
2034 ::_pb::Arena* arena, bool is_message_owned) {
2035 (void)arena;
2036 (void)is_message_owned;
2037 new (&_impl_) Impl_{
2038 decltype(_impl_.op_){arena}
2039 , /*decltype(_impl_._cached_size_)*/{}
2040 };
2041 }
2042
~OpList()2043 OpList::~OpList() {
2044 // @@protoc_insertion_point(destructor:tensorflow.OpList)
2045 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2046 (void)arena;
2047 return;
2048 }
2049 SharedDtor();
2050 }
2051
SharedDtor()2052 inline void OpList::SharedDtor() {
2053 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2054 _impl_.op_.~RepeatedPtrField();
2055 }
2056
SetCachedSize(int size) const2057 void OpList::SetCachedSize(int size) const {
2058 _impl_._cached_size_.Set(size);
2059 }
2060
Clear()2061 void OpList::Clear() {
2062 // @@protoc_insertion_point(message_clear_start:tensorflow.OpList)
2063 ::uint32_t cached_has_bits = 0;
2064 // Prevent compiler warnings about cached_has_bits being unused
2065 (void) cached_has_bits;
2066
2067 _impl_.op_.Clear();
2068 _internal_metadata_.Clear<std::string>();
2069 }
2070
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2071 const char* OpList::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2072 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2073 while (!ctx->Done(&ptr)) {
2074 ::uint32_t tag;
2075 ptr = ::_pbi::ReadTag(ptr, &tag);
2076 switch (tag >> 3) {
2077 // repeated .tensorflow.OpDef op = 1;
2078 case 1:
2079 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2080 ptr -= 1;
2081 do {
2082 ptr += 1;
2083 ptr = ctx->ParseMessage(_internal_add_op(), ptr);
2084 CHK_(ptr);
2085 if (!ctx->DataAvailable(ptr)) break;
2086 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
2087 } else {
2088 goto handle_unusual;
2089 }
2090 continue;
2091 default:
2092 goto handle_unusual;
2093 } // switch
2094 handle_unusual:
2095 if ((tag == 0) || ((tag & 7) == 4)) {
2096 CHK_(ptr);
2097 ctx->SetLastTag(tag);
2098 goto message_done;
2099 }
2100 ptr = UnknownFieldParse(
2101 tag,
2102 _internal_metadata_.mutable_unknown_fields<std::string>(),
2103 ptr, ctx);
2104 CHK_(ptr != nullptr);
2105 } // while
2106 message_done:
2107 return ptr;
2108 failure:
2109 ptr = nullptr;
2110 goto message_done;
2111 #undef CHK_
2112 }
2113
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2114 ::uint8_t* OpList::_InternalSerialize(
2115 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2116 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.OpList)
2117 ::uint32_t cached_has_bits = 0;
2118 (void) cached_has_bits;
2119
2120 // repeated .tensorflow.OpDef op = 1;
2121 for (unsigned i = 0,
2122 n = static_cast<unsigned>(this->_internal_op_size()); i < n; i++) {
2123 const auto& repfield = this->_internal_op(i);
2124 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2125 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
2126 }
2127
2128 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2129 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2130 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2131 }
2132 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.OpList)
2133 return target;
2134 }
2135
ByteSizeLong() const2136 size_t OpList::ByteSizeLong() const {
2137 // @@protoc_insertion_point(message_byte_size_start:tensorflow.OpList)
2138 size_t total_size = 0;
2139
2140 ::uint32_t cached_has_bits = 0;
2141 // Prevent compiler warnings about cached_has_bits being unused
2142 (void) cached_has_bits;
2143
2144 // repeated .tensorflow.OpDef op = 1;
2145 total_size += 1UL * this->_internal_op_size();
2146 for (const auto& msg : this->_impl_.op_) {
2147 total_size +=
2148 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2149 }
2150
2151 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2152 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2153 }
2154 int cached_size = ::_pbi::ToCachedSize(total_size);
2155 SetCachedSize(cached_size);
2156 return total_size;
2157 }
2158
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2159 void OpList::CheckTypeAndMergeFrom(
2160 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2161 MergeFrom(*::_pbi::DownCast<const OpList*>(
2162 &from));
2163 }
2164
MergeFrom(const OpList & from)2165 void OpList::MergeFrom(const OpList& from) {
2166 OpList* const _this = this;
2167 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.OpList)
2168 GOOGLE_DCHECK_NE(&from, _this);
2169 ::uint32_t cached_has_bits = 0;
2170 (void) cached_has_bits;
2171
2172 _this->_impl_.op_.MergeFrom(from._impl_.op_);
2173 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2174 }
2175
CopyFrom(const OpList & from)2176 void OpList::CopyFrom(const OpList& from) {
2177 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.OpList)
2178 if (&from == this) return;
2179 Clear();
2180 MergeFrom(from);
2181 }
2182
IsInitialized() const2183 bool OpList::IsInitialized() const {
2184 return true;
2185 }
2186
InternalSwap(OpList * other)2187 void OpList::InternalSwap(OpList* other) {
2188 using std::swap;
2189 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2190 _impl_.op_.InternalSwap(&other->_impl_.op_);
2191 }
2192
GetTypeName() const2193 std::string OpList::GetTypeName() const {
2194 return "tensorflow.OpList";
2195 }
2196
2197
2198 // @@protoc_insertion_point(namespace_scope)
2199 } // namespace tensorflow
2200 PROTOBUF_NAMESPACE_OPEN
2201 template<> PROTOBUF_NOINLINE ::tensorflow::OpDef_ArgDef*
CreateMaybeMessage(Arena * arena)2202 Arena::CreateMaybeMessage< ::tensorflow::OpDef_ArgDef >(Arena* arena) {
2203 return Arena::CreateMessageInternal< ::tensorflow::OpDef_ArgDef >(arena);
2204 }
2205 template<> PROTOBUF_NOINLINE ::tensorflow::OpDef_AttrDef*
CreateMaybeMessage(Arena * arena)2206 Arena::CreateMaybeMessage< ::tensorflow::OpDef_AttrDef >(Arena* arena) {
2207 return Arena::CreateMessageInternal< ::tensorflow::OpDef_AttrDef >(arena);
2208 }
2209 template<> PROTOBUF_NOINLINE ::tensorflow::OpDef*
CreateMaybeMessage(Arena * arena)2210 Arena::CreateMaybeMessage< ::tensorflow::OpDef >(Arena* arena) {
2211 return Arena::CreateMessageInternal< ::tensorflow::OpDef >(arena);
2212 }
2213 template<> PROTOBUF_NOINLINE ::tensorflow::OpDeprecation*
CreateMaybeMessage(Arena * arena)2214 Arena::CreateMaybeMessage< ::tensorflow::OpDeprecation >(Arena* arena) {
2215 return Arena::CreateMessageInternal< ::tensorflow::OpDeprecation >(arena);
2216 }
2217 template<> PROTOBUF_NOINLINE ::tensorflow::OpList*
CreateMaybeMessage(Arena * arena)2218 Arena::CreateMaybeMessage< ::tensorflow::OpList >(Arena* arena) {
2219 return Arena::CreateMessageInternal< ::tensorflow::OpList >(arena);
2220 }
2221 PROTOBUF_NAMESPACE_CLOSE
2222
2223 // @@protoc_insertion_point(global_scope)
2224 #include <google/protobuf/port_undef.inc>
2225