1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: tensorflow/core/framework/cost_graph.proto
3 
4 #include "tensorflow/core/framework/cost_graph.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 {
CostGraphDef_Node_InputInfo(::_pbi::ConstantInitialized)22 PROTOBUF_CONSTEXPR CostGraphDef_Node_InputInfo::CostGraphDef_Node_InputInfo(
23     ::_pbi::ConstantInitialized): _impl_{
24     /*decltype(_impl_.preceding_node_)*/0
25   , /*decltype(_impl_.preceding_port_)*/0
26   , /*decltype(_impl_._cached_size_)*/{}} {}
27 struct CostGraphDef_Node_InputInfoDefaultTypeInternal {
CostGraphDef_Node_InputInfoDefaultTypeInternaltensorflow::CostGraphDef_Node_InputInfoDefaultTypeInternal28   PROTOBUF_CONSTEXPR CostGraphDef_Node_InputInfoDefaultTypeInternal()
29       : _instance(::_pbi::ConstantInitialized{}) {}
~CostGraphDef_Node_InputInfoDefaultTypeInternaltensorflow::CostGraphDef_Node_InputInfoDefaultTypeInternal30   ~CostGraphDef_Node_InputInfoDefaultTypeInternal() {}
31   union {  // NOLINT(misc-non-private-member-variables-in-classes)
32     CostGraphDef_Node_InputInfo _instance;
33   };
34 };
35 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CostGraphDef_Node_InputInfoDefaultTypeInternal _CostGraphDef_Node_InputInfo_default_instance_;
CostGraphDef_Node_OutputInfo(::_pbi::ConstantInitialized)36 PROTOBUF_CONSTEXPR CostGraphDef_Node_OutputInfo::CostGraphDef_Node_OutputInfo(
37     ::_pbi::ConstantInitialized): _impl_{
38     /*decltype(_impl_.shape_)*/nullptr
39   , /*decltype(_impl_.size_)*/::int64_t{0}
40   , /*decltype(_impl_.alias_input_port_)*/::int64_t{0}
41   , /*decltype(_impl_.dtype_)*/0
42   , /*decltype(_impl_._cached_size_)*/{}} {}
43 struct CostGraphDef_Node_OutputInfoDefaultTypeInternal {
CostGraphDef_Node_OutputInfoDefaultTypeInternaltensorflow::CostGraphDef_Node_OutputInfoDefaultTypeInternal44   PROTOBUF_CONSTEXPR CostGraphDef_Node_OutputInfoDefaultTypeInternal()
45       : _instance(::_pbi::ConstantInitialized{}) {}
~CostGraphDef_Node_OutputInfoDefaultTypeInternaltensorflow::CostGraphDef_Node_OutputInfoDefaultTypeInternal46   ~CostGraphDef_Node_OutputInfoDefaultTypeInternal() {}
47   union {  // NOLINT(misc-non-private-member-variables-in-classes)
48     CostGraphDef_Node_OutputInfo _instance;
49   };
50 };
51 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CostGraphDef_Node_OutputInfoDefaultTypeInternal _CostGraphDef_Node_OutputInfo_default_instance_;
CostGraphDef_Node(::_pbi::ConstantInitialized)52 PROTOBUF_CONSTEXPR CostGraphDef_Node::CostGraphDef_Node(
53     ::_pbi::ConstantInitialized): _impl_{
54     /*decltype(_impl_.input_info_)*/{}
55   , /*decltype(_impl_.output_info_)*/{}
56   , /*decltype(_impl_.control_input_)*/{}
57   , /*decltype(_impl_._control_input_cached_byte_size_)*/{0}
58   , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
59   , /*decltype(_impl_.device_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
60   , /*decltype(_impl_.temporary_memory_size_)*/::int64_t{0}
61   , /*decltype(_impl_.compute_cost_)*/::int64_t{0}
62   , /*decltype(_impl_.id_)*/0
63   , /*decltype(_impl_.is_final_)*/false
64   , /*decltype(_impl_.inaccurate_)*/false
65   , /*decltype(_impl_.host_temp_memory_size_)*/::int64_t{0}
66   , /*decltype(_impl_.device_temp_memory_size_)*/::int64_t{0}
67   , /*decltype(_impl_.persistent_memory_size_)*/::int64_t{0}
68   , /*decltype(_impl_.compute_time_)*/::int64_t{0}
69   , /*decltype(_impl_.memory_time_)*/::int64_t{0}
70   , /*decltype(_impl_.device_persistent_memory_size_)*/::int64_t{0}
71   , /*decltype(_impl_._cached_size_)*/{}} {}
72 struct CostGraphDef_NodeDefaultTypeInternal {
CostGraphDef_NodeDefaultTypeInternaltensorflow::CostGraphDef_NodeDefaultTypeInternal73   PROTOBUF_CONSTEXPR CostGraphDef_NodeDefaultTypeInternal()
74       : _instance(::_pbi::ConstantInitialized{}) {}
~CostGraphDef_NodeDefaultTypeInternaltensorflow::CostGraphDef_NodeDefaultTypeInternal75   ~CostGraphDef_NodeDefaultTypeInternal() {}
76   union {  // NOLINT(misc-non-private-member-variables-in-classes)
77     CostGraphDef_Node _instance;
78   };
79 };
80 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CostGraphDef_NodeDefaultTypeInternal _CostGraphDef_Node_default_instance_;
CostGraphDef_AggregatedCost(::_pbi::ConstantInitialized)81 PROTOBUF_CONSTEXPR CostGraphDef_AggregatedCost::CostGraphDef_AggregatedCost(
82     ::_pbi::ConstantInitialized): _impl_{
83     /*decltype(_impl_.dimension_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
84   , /*decltype(_impl_.cost_)*/0
85   , /*decltype(_impl_._cached_size_)*/{}} {}
86 struct CostGraphDef_AggregatedCostDefaultTypeInternal {
CostGraphDef_AggregatedCostDefaultTypeInternaltensorflow::CostGraphDef_AggregatedCostDefaultTypeInternal87   PROTOBUF_CONSTEXPR CostGraphDef_AggregatedCostDefaultTypeInternal()
88       : _instance(::_pbi::ConstantInitialized{}) {}
~CostGraphDef_AggregatedCostDefaultTypeInternaltensorflow::CostGraphDef_AggregatedCostDefaultTypeInternal89   ~CostGraphDef_AggregatedCostDefaultTypeInternal() {}
90   union {  // NOLINT(misc-non-private-member-variables-in-classes)
91     CostGraphDef_AggregatedCost _instance;
92   };
93 };
94 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CostGraphDef_AggregatedCostDefaultTypeInternal _CostGraphDef_AggregatedCost_default_instance_;
CostGraphDef(::_pbi::ConstantInitialized)95 PROTOBUF_CONSTEXPR CostGraphDef::CostGraphDef(
96     ::_pbi::ConstantInitialized): _impl_{
97     /*decltype(_impl_.node_)*/{}
98   , /*decltype(_impl_.cost_)*/{}
99   , /*decltype(_impl_._cached_size_)*/{}} {}
100 struct CostGraphDefDefaultTypeInternal {
CostGraphDefDefaultTypeInternaltensorflow::CostGraphDefDefaultTypeInternal101   PROTOBUF_CONSTEXPR CostGraphDefDefaultTypeInternal()
102       : _instance(::_pbi::ConstantInitialized{}) {}
~CostGraphDefDefaultTypeInternaltensorflow::CostGraphDefDefaultTypeInternal103   ~CostGraphDefDefaultTypeInternal() {}
104   union {  // NOLINT(misc-non-private-member-variables-in-classes)
105     CostGraphDef _instance;
106   };
107 };
108 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CostGraphDefDefaultTypeInternal _CostGraphDef_default_instance_;
109 }  // namespace tensorflow
110 namespace tensorflow {
111 
112 // ===================================================================
113 
114 class CostGraphDef_Node_InputInfo::_Internal {
115  public:
116 };
117 
CostGraphDef_Node_InputInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)118 CostGraphDef_Node_InputInfo::CostGraphDef_Node_InputInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
119                          bool is_message_owned)
120   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
121   SharedCtor(arena, is_message_owned);
122   // @@protoc_insertion_point(arena_constructor:tensorflow.CostGraphDef.Node.InputInfo)
123 }
CostGraphDef_Node_InputInfo(const CostGraphDef_Node_InputInfo & from)124 CostGraphDef_Node_InputInfo::CostGraphDef_Node_InputInfo(const CostGraphDef_Node_InputInfo& from)
125   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
126   CostGraphDef_Node_InputInfo* const _this = this; (void)_this;
127   new (&_impl_) Impl_{
128       decltype(_impl_.preceding_node_){}
129     , decltype(_impl_.preceding_port_){}
130     , /*decltype(_impl_._cached_size_)*/{}};
131 
132   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
133   ::memcpy(&_impl_.preceding_node_, &from._impl_.preceding_node_,
134     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.preceding_port_) -
135     reinterpret_cast<char*>(&_impl_.preceding_node_)) + sizeof(_impl_.preceding_port_));
136   // @@protoc_insertion_point(copy_constructor:tensorflow.CostGraphDef.Node.InputInfo)
137 }
138 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)139 inline void CostGraphDef_Node_InputInfo::SharedCtor(
140     ::_pb::Arena* arena, bool is_message_owned) {
141   (void)arena;
142   (void)is_message_owned;
143   new (&_impl_) Impl_{
144       decltype(_impl_.preceding_node_){0}
145     , decltype(_impl_.preceding_port_){0}
146     , /*decltype(_impl_._cached_size_)*/{}
147   };
148 }
149 
~CostGraphDef_Node_InputInfo()150 CostGraphDef_Node_InputInfo::~CostGraphDef_Node_InputInfo() {
151   // @@protoc_insertion_point(destructor:tensorflow.CostGraphDef.Node.InputInfo)
152   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
153   (void)arena;
154     return;
155   }
156   SharedDtor();
157 }
158 
SharedDtor()159 inline void CostGraphDef_Node_InputInfo::SharedDtor() {
160   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
161 }
162 
SetCachedSize(int size) const163 void CostGraphDef_Node_InputInfo::SetCachedSize(int size) const {
164   _impl_._cached_size_.Set(size);
165 }
166 
Clear()167 void CostGraphDef_Node_InputInfo::Clear() {
168 // @@protoc_insertion_point(message_clear_start:tensorflow.CostGraphDef.Node.InputInfo)
169   ::uint32_t cached_has_bits = 0;
170   // Prevent compiler warnings about cached_has_bits being unused
171   (void) cached_has_bits;
172 
173   ::memset(&_impl_.preceding_node_, 0, static_cast<size_t>(
174       reinterpret_cast<char*>(&_impl_.preceding_port_) -
175       reinterpret_cast<char*>(&_impl_.preceding_node_)) + sizeof(_impl_.preceding_port_));
176   _internal_metadata_.Clear<std::string>();
177 }
178 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)179 const char* CostGraphDef_Node_InputInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
180 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
181   while (!ctx->Done(&ptr)) {
182     ::uint32_t tag;
183     ptr = ::_pbi::ReadTag(ptr, &tag);
184     switch (tag >> 3) {
185       // int32 preceding_node = 1;
186       case 1:
187         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
188           _impl_.preceding_node_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
189           CHK_(ptr);
190         } else {
191           goto handle_unusual;
192         }
193         continue;
194       // int32 preceding_port = 2;
195       case 2:
196         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
197           _impl_.preceding_port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
198           CHK_(ptr);
199         } else {
200           goto handle_unusual;
201         }
202         continue;
203       default:
204         goto handle_unusual;
205     }  // switch
206   handle_unusual:
207     if ((tag == 0) || ((tag & 7) == 4)) {
208       CHK_(ptr);
209       ctx->SetLastTag(tag);
210       goto message_done;
211     }
212     ptr = UnknownFieldParse(
213         tag,
214         _internal_metadata_.mutable_unknown_fields<std::string>(),
215         ptr, ctx);
216     CHK_(ptr != nullptr);
217   }  // while
218 message_done:
219   return ptr;
220 failure:
221   ptr = nullptr;
222   goto message_done;
223 #undef CHK_
224 }
225 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const226 ::uint8_t* CostGraphDef_Node_InputInfo::_InternalSerialize(
227     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
228   // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CostGraphDef.Node.InputInfo)
229   ::uint32_t cached_has_bits = 0;
230   (void) cached_has_bits;
231 
232   // int32 preceding_node = 1;
233   if (this->_internal_preceding_node() != 0) {
234     target = stream->EnsureSpace(target);
235     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_preceding_node(), target);
236   }
237 
238   // int32 preceding_port = 2;
239   if (this->_internal_preceding_port() != 0) {
240     target = stream->EnsureSpace(target);
241     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_preceding_port(), target);
242   }
243 
244   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
245     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
246         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
247   }
248   // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CostGraphDef.Node.InputInfo)
249   return target;
250 }
251 
ByteSizeLong() const252 size_t CostGraphDef_Node_InputInfo::ByteSizeLong() const {
253 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CostGraphDef.Node.InputInfo)
254   size_t total_size = 0;
255 
256   ::uint32_t cached_has_bits = 0;
257   // Prevent compiler warnings about cached_has_bits being unused
258   (void) cached_has_bits;
259 
260   // int32 preceding_node = 1;
261   if (this->_internal_preceding_node() != 0) {
262     total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_preceding_node());
263   }
264 
265   // int32 preceding_port = 2;
266   if (this->_internal_preceding_port() != 0) {
267     total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_preceding_port());
268   }
269 
270   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
271     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
272   }
273   int cached_size = ::_pbi::ToCachedSize(total_size);
274   SetCachedSize(cached_size);
275   return total_size;
276 }
277 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)278 void CostGraphDef_Node_InputInfo::CheckTypeAndMergeFrom(
279     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
280   MergeFrom(*::_pbi::DownCast<const CostGraphDef_Node_InputInfo*>(
281       &from));
282 }
283 
MergeFrom(const CostGraphDef_Node_InputInfo & from)284 void CostGraphDef_Node_InputInfo::MergeFrom(const CostGraphDef_Node_InputInfo& from) {
285   CostGraphDef_Node_InputInfo* const _this = this;
286   // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CostGraphDef.Node.InputInfo)
287   GOOGLE_DCHECK_NE(&from, _this);
288   ::uint32_t cached_has_bits = 0;
289   (void) cached_has_bits;
290 
291   if (from._internal_preceding_node() != 0) {
292     _this->_internal_set_preceding_node(from._internal_preceding_node());
293   }
294   if (from._internal_preceding_port() != 0) {
295     _this->_internal_set_preceding_port(from._internal_preceding_port());
296   }
297   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
298 }
299 
CopyFrom(const CostGraphDef_Node_InputInfo & from)300 void CostGraphDef_Node_InputInfo::CopyFrom(const CostGraphDef_Node_InputInfo& from) {
301 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CostGraphDef.Node.InputInfo)
302   if (&from == this) return;
303   Clear();
304   MergeFrom(from);
305 }
306 
IsInitialized() const307 bool CostGraphDef_Node_InputInfo::IsInitialized() const {
308   return true;
309 }
310 
InternalSwap(CostGraphDef_Node_InputInfo * other)311 void CostGraphDef_Node_InputInfo::InternalSwap(CostGraphDef_Node_InputInfo* other) {
312   using std::swap;
313   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
314   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
315       PROTOBUF_FIELD_OFFSET(CostGraphDef_Node_InputInfo, _impl_.preceding_port_)
316       + sizeof(CostGraphDef_Node_InputInfo::_impl_.preceding_port_)  // NOLINT
317       - PROTOBUF_FIELD_OFFSET(CostGraphDef_Node_InputInfo, _impl_.preceding_node_)>(
318           reinterpret_cast<char*>(&_impl_.preceding_node_),
319           reinterpret_cast<char*>(&other->_impl_.preceding_node_));
320 }
321 
GetTypeName() const322 std::string CostGraphDef_Node_InputInfo::GetTypeName() const {
323   return "tensorflow.CostGraphDef.Node.InputInfo";
324 }
325 
326 
327 // ===================================================================
328 
329 class CostGraphDef_Node_OutputInfo::_Internal {
330  public:
331   static const ::tensorflow::TensorShapeProto& shape(const CostGraphDef_Node_OutputInfo* msg);
332 };
333 
334 const ::tensorflow::TensorShapeProto&
shape(const CostGraphDef_Node_OutputInfo * msg)335 CostGraphDef_Node_OutputInfo::_Internal::shape(const CostGraphDef_Node_OutputInfo* msg) {
336   return *msg->_impl_.shape_;
337 }
clear_shape()338 void CostGraphDef_Node_OutputInfo::clear_shape() {
339   if (GetArenaForAllocation() == nullptr && _impl_.shape_ != nullptr) {
340     delete _impl_.shape_;
341   }
342   _impl_.shape_ = nullptr;
343 }
CostGraphDef_Node_OutputInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)344 CostGraphDef_Node_OutputInfo::CostGraphDef_Node_OutputInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
345                          bool is_message_owned)
346   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
347   SharedCtor(arena, is_message_owned);
348   // @@protoc_insertion_point(arena_constructor:tensorflow.CostGraphDef.Node.OutputInfo)
349 }
CostGraphDef_Node_OutputInfo(const CostGraphDef_Node_OutputInfo & from)350 CostGraphDef_Node_OutputInfo::CostGraphDef_Node_OutputInfo(const CostGraphDef_Node_OutputInfo& from)
351   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
352   CostGraphDef_Node_OutputInfo* const _this = this; (void)_this;
353   new (&_impl_) Impl_{
354       decltype(_impl_.shape_){nullptr}
355     , decltype(_impl_.size_){}
356     , decltype(_impl_.alias_input_port_){}
357     , decltype(_impl_.dtype_){}
358     , /*decltype(_impl_._cached_size_)*/{}};
359 
360   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
361   if (from._internal_has_shape()) {
362     _this->_impl_.shape_ = new ::tensorflow::TensorShapeProto(*from._impl_.shape_);
363   }
364   ::memcpy(&_impl_.size_, &from._impl_.size_,
365     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.dtype_) -
366     reinterpret_cast<char*>(&_impl_.size_)) + sizeof(_impl_.dtype_));
367   // @@protoc_insertion_point(copy_constructor:tensorflow.CostGraphDef.Node.OutputInfo)
368 }
369 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)370 inline void CostGraphDef_Node_OutputInfo::SharedCtor(
371     ::_pb::Arena* arena, bool is_message_owned) {
372   (void)arena;
373   (void)is_message_owned;
374   new (&_impl_) Impl_{
375       decltype(_impl_.shape_){nullptr}
376     , decltype(_impl_.size_){::int64_t{0}}
377     , decltype(_impl_.alias_input_port_){::int64_t{0}}
378     , decltype(_impl_.dtype_){0}
379     , /*decltype(_impl_._cached_size_)*/{}
380   };
381 }
382 
~CostGraphDef_Node_OutputInfo()383 CostGraphDef_Node_OutputInfo::~CostGraphDef_Node_OutputInfo() {
384   // @@protoc_insertion_point(destructor:tensorflow.CostGraphDef.Node.OutputInfo)
385   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
386   (void)arena;
387     return;
388   }
389   SharedDtor();
390 }
391 
SharedDtor()392 inline void CostGraphDef_Node_OutputInfo::SharedDtor() {
393   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
394   if (this != internal_default_instance()) delete _impl_.shape_;
395 }
396 
SetCachedSize(int size) const397 void CostGraphDef_Node_OutputInfo::SetCachedSize(int size) const {
398   _impl_._cached_size_.Set(size);
399 }
400 
Clear()401 void CostGraphDef_Node_OutputInfo::Clear() {
402 // @@protoc_insertion_point(message_clear_start:tensorflow.CostGraphDef.Node.OutputInfo)
403   ::uint32_t cached_has_bits = 0;
404   // Prevent compiler warnings about cached_has_bits being unused
405   (void) cached_has_bits;
406 
407   if (GetArenaForAllocation() == nullptr && _impl_.shape_ != nullptr) {
408     delete _impl_.shape_;
409   }
410   _impl_.shape_ = nullptr;
411   ::memset(&_impl_.size_, 0, static_cast<size_t>(
412       reinterpret_cast<char*>(&_impl_.dtype_) -
413       reinterpret_cast<char*>(&_impl_.size_)) + sizeof(_impl_.dtype_));
414   _internal_metadata_.Clear<std::string>();
415 }
416 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)417 const char* CostGraphDef_Node_OutputInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
418 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
419   while (!ctx->Done(&ptr)) {
420     ::uint32_t tag;
421     ptr = ::_pbi::ReadTag(ptr, &tag);
422     switch (tag >> 3) {
423       // int64 size = 1;
424       case 1:
425         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
426           _impl_.size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
427           CHK_(ptr);
428         } else {
429           goto handle_unusual;
430         }
431         continue;
432       // int64 alias_input_port = 2;
433       case 2:
434         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
435           _impl_.alias_input_port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
436           CHK_(ptr);
437         } else {
438           goto handle_unusual;
439         }
440         continue;
441       // .tensorflow.TensorShapeProto shape = 3;
442       case 3:
443         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
444           ptr = ctx->ParseMessage(_internal_mutable_shape(), ptr);
445           CHK_(ptr);
446         } else {
447           goto handle_unusual;
448         }
449         continue;
450       // .tensorflow.DataType dtype = 4;
451       case 4:
452         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
453           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
454           CHK_(ptr);
455           _internal_set_dtype(static_cast<::tensorflow::DataType>(val));
456         } else {
457           goto handle_unusual;
458         }
459         continue;
460       default:
461         goto handle_unusual;
462     }  // switch
463   handle_unusual:
464     if ((tag == 0) || ((tag & 7) == 4)) {
465       CHK_(ptr);
466       ctx->SetLastTag(tag);
467       goto message_done;
468     }
469     ptr = UnknownFieldParse(
470         tag,
471         _internal_metadata_.mutable_unknown_fields<std::string>(),
472         ptr, ctx);
473     CHK_(ptr != nullptr);
474   }  // while
475 message_done:
476   return ptr;
477 failure:
478   ptr = nullptr;
479   goto message_done;
480 #undef CHK_
481 }
482 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const483 ::uint8_t* CostGraphDef_Node_OutputInfo::_InternalSerialize(
484     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
485   // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CostGraphDef.Node.OutputInfo)
486   ::uint32_t cached_has_bits = 0;
487   (void) cached_has_bits;
488 
489   // int64 size = 1;
490   if (this->_internal_size() != 0) {
491     target = stream->EnsureSpace(target);
492     target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_size(), target);
493   }
494 
495   // int64 alias_input_port = 2;
496   if (this->_internal_alias_input_port() != 0) {
497     target = stream->EnsureSpace(target);
498     target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_alias_input_port(), target);
499   }
500 
501   // .tensorflow.TensorShapeProto shape = 3;
502   if (this->_internal_has_shape()) {
503     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
504       InternalWriteMessage(3, _Internal::shape(this),
505         _Internal::shape(this).GetCachedSize(), target, stream);
506   }
507 
508   // .tensorflow.DataType dtype = 4;
509   if (this->_internal_dtype() != 0) {
510     target = stream->EnsureSpace(target);
511     target = ::_pbi::WireFormatLite::WriteEnumToArray(
512       4, this->_internal_dtype(), target);
513   }
514 
515   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
516     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
517         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
518   }
519   // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CostGraphDef.Node.OutputInfo)
520   return target;
521 }
522 
ByteSizeLong() const523 size_t CostGraphDef_Node_OutputInfo::ByteSizeLong() const {
524 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CostGraphDef.Node.OutputInfo)
525   size_t total_size = 0;
526 
527   ::uint32_t cached_has_bits = 0;
528   // Prevent compiler warnings about cached_has_bits being unused
529   (void) cached_has_bits;
530 
531   // .tensorflow.TensorShapeProto shape = 3;
532   if (this->_internal_has_shape()) {
533     total_size += 1 +
534       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
535         *_impl_.shape_);
536   }
537 
538   // int64 size = 1;
539   if (this->_internal_size() != 0) {
540     total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_size());
541   }
542 
543   // int64 alias_input_port = 2;
544   if (this->_internal_alias_input_port() != 0) {
545     total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_alias_input_port());
546   }
547 
548   // .tensorflow.DataType dtype = 4;
549   if (this->_internal_dtype() != 0) {
550     total_size += 1 +
551       ::_pbi::WireFormatLite::EnumSize(this->_internal_dtype());
552   }
553 
554   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
555     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
556   }
557   int cached_size = ::_pbi::ToCachedSize(total_size);
558   SetCachedSize(cached_size);
559   return total_size;
560 }
561 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)562 void CostGraphDef_Node_OutputInfo::CheckTypeAndMergeFrom(
563     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
564   MergeFrom(*::_pbi::DownCast<const CostGraphDef_Node_OutputInfo*>(
565       &from));
566 }
567 
MergeFrom(const CostGraphDef_Node_OutputInfo & from)568 void CostGraphDef_Node_OutputInfo::MergeFrom(const CostGraphDef_Node_OutputInfo& from) {
569   CostGraphDef_Node_OutputInfo* const _this = this;
570   // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CostGraphDef.Node.OutputInfo)
571   GOOGLE_DCHECK_NE(&from, _this);
572   ::uint32_t cached_has_bits = 0;
573   (void) cached_has_bits;
574 
575   if (from._internal_has_shape()) {
576     _this->_internal_mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(
577         from._internal_shape());
578   }
579   if (from._internal_size() != 0) {
580     _this->_internal_set_size(from._internal_size());
581   }
582   if (from._internal_alias_input_port() != 0) {
583     _this->_internal_set_alias_input_port(from._internal_alias_input_port());
584   }
585   if (from._internal_dtype() != 0) {
586     _this->_internal_set_dtype(from._internal_dtype());
587   }
588   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
589 }
590 
CopyFrom(const CostGraphDef_Node_OutputInfo & from)591 void CostGraphDef_Node_OutputInfo::CopyFrom(const CostGraphDef_Node_OutputInfo& from) {
592 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CostGraphDef.Node.OutputInfo)
593   if (&from == this) return;
594   Clear();
595   MergeFrom(from);
596 }
597 
IsInitialized() const598 bool CostGraphDef_Node_OutputInfo::IsInitialized() const {
599   return true;
600 }
601 
InternalSwap(CostGraphDef_Node_OutputInfo * other)602 void CostGraphDef_Node_OutputInfo::InternalSwap(CostGraphDef_Node_OutputInfo* other) {
603   using std::swap;
604   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
605   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
606       PROTOBUF_FIELD_OFFSET(CostGraphDef_Node_OutputInfo, _impl_.dtype_)
607       + sizeof(CostGraphDef_Node_OutputInfo::_impl_.dtype_)  // NOLINT
608       - PROTOBUF_FIELD_OFFSET(CostGraphDef_Node_OutputInfo, _impl_.shape_)>(
609           reinterpret_cast<char*>(&_impl_.shape_),
610           reinterpret_cast<char*>(&other->_impl_.shape_));
611 }
612 
GetTypeName() const613 std::string CostGraphDef_Node_OutputInfo::GetTypeName() const {
614   return "tensorflow.CostGraphDef.Node.OutputInfo";
615 }
616 
617 
618 // ===================================================================
619 
620 class CostGraphDef_Node::_Internal {
621  public:
622 };
623 
CostGraphDef_Node(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)624 CostGraphDef_Node::CostGraphDef_Node(::PROTOBUF_NAMESPACE_ID::Arena* arena,
625                          bool is_message_owned)
626   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
627   SharedCtor(arena, is_message_owned);
628   // @@protoc_insertion_point(arena_constructor:tensorflow.CostGraphDef.Node)
629 }
CostGraphDef_Node(const CostGraphDef_Node & from)630 CostGraphDef_Node::CostGraphDef_Node(const CostGraphDef_Node& from)
631   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
632   CostGraphDef_Node* const _this = this; (void)_this;
633   new (&_impl_) Impl_{
634       decltype(_impl_.input_info_){from._impl_.input_info_}
635     , decltype(_impl_.output_info_){from._impl_.output_info_}
636     , decltype(_impl_.control_input_){from._impl_.control_input_}
637     , /*decltype(_impl_._control_input_cached_byte_size_)*/{0}
638     , decltype(_impl_.name_){}
639     , decltype(_impl_.device_){}
640     , decltype(_impl_.temporary_memory_size_){}
641     , decltype(_impl_.compute_cost_){}
642     , decltype(_impl_.id_){}
643     , decltype(_impl_.is_final_){}
644     , decltype(_impl_.inaccurate_){}
645     , decltype(_impl_.host_temp_memory_size_){}
646     , decltype(_impl_.device_temp_memory_size_){}
647     , decltype(_impl_.persistent_memory_size_){}
648     , decltype(_impl_.compute_time_){}
649     , decltype(_impl_.memory_time_){}
650     , decltype(_impl_.device_persistent_memory_size_){}
651     , /*decltype(_impl_._cached_size_)*/{}};
652 
653   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
654   _impl_.name_.InitDefault();
655   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
656     _impl_.name_.Set("", GetArenaForAllocation());
657   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
658   if (!from._internal_name().empty()) {
659     _this->_impl_.name_.Set(from._internal_name(),
660       _this->GetArenaForAllocation());
661   }
662   _impl_.device_.InitDefault();
663   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
664     _impl_.device_.Set("", GetArenaForAllocation());
665   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
666   if (!from._internal_device().empty()) {
667     _this->_impl_.device_.Set(from._internal_device(),
668       _this->GetArenaForAllocation());
669   }
670   ::memcpy(&_impl_.temporary_memory_size_, &from._impl_.temporary_memory_size_,
671     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.device_persistent_memory_size_) -
672     reinterpret_cast<char*>(&_impl_.temporary_memory_size_)) + sizeof(_impl_.device_persistent_memory_size_));
673   // @@protoc_insertion_point(copy_constructor:tensorflow.CostGraphDef.Node)
674 }
675 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)676 inline void CostGraphDef_Node::SharedCtor(
677     ::_pb::Arena* arena, bool is_message_owned) {
678   (void)arena;
679   (void)is_message_owned;
680   new (&_impl_) Impl_{
681       decltype(_impl_.input_info_){arena}
682     , decltype(_impl_.output_info_){arena}
683     , decltype(_impl_.control_input_){arena}
684     , /*decltype(_impl_._control_input_cached_byte_size_)*/{0}
685     , decltype(_impl_.name_){}
686     , decltype(_impl_.device_){}
687     , decltype(_impl_.temporary_memory_size_){::int64_t{0}}
688     , decltype(_impl_.compute_cost_){::int64_t{0}}
689     , decltype(_impl_.id_){0}
690     , decltype(_impl_.is_final_){false}
691     , decltype(_impl_.inaccurate_){false}
692     , decltype(_impl_.host_temp_memory_size_){::int64_t{0}}
693     , decltype(_impl_.device_temp_memory_size_){::int64_t{0}}
694     , decltype(_impl_.persistent_memory_size_){::int64_t{0}}
695     , decltype(_impl_.compute_time_){::int64_t{0}}
696     , decltype(_impl_.memory_time_){::int64_t{0}}
697     , decltype(_impl_.device_persistent_memory_size_){::int64_t{0}}
698     , /*decltype(_impl_._cached_size_)*/{}
699   };
700   _impl_.name_.InitDefault();
701   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
702     _impl_.name_.Set("", GetArenaForAllocation());
703   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
704   _impl_.device_.InitDefault();
705   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
706     _impl_.device_.Set("", GetArenaForAllocation());
707   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
708 }
709 
~CostGraphDef_Node()710 CostGraphDef_Node::~CostGraphDef_Node() {
711   // @@protoc_insertion_point(destructor:tensorflow.CostGraphDef.Node)
712   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
713   (void)arena;
714     return;
715   }
716   SharedDtor();
717 }
718 
SharedDtor()719 inline void CostGraphDef_Node::SharedDtor() {
720   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
721   _impl_.input_info_.~RepeatedPtrField();
722   _impl_.output_info_.~RepeatedPtrField();
723   _impl_.control_input_.~RepeatedField();
724   _impl_.name_.Destroy();
725   _impl_.device_.Destroy();
726 }
727 
SetCachedSize(int size) const728 void CostGraphDef_Node::SetCachedSize(int size) const {
729   _impl_._cached_size_.Set(size);
730 }
731 
Clear()732 void CostGraphDef_Node::Clear() {
733 // @@protoc_insertion_point(message_clear_start:tensorflow.CostGraphDef.Node)
734   ::uint32_t cached_has_bits = 0;
735   // Prevent compiler warnings about cached_has_bits being unused
736   (void) cached_has_bits;
737 
738   _impl_.input_info_.Clear();
739   _impl_.output_info_.Clear();
740   _impl_.control_input_.Clear();
741   _impl_.name_.ClearToEmpty();
742   _impl_.device_.ClearToEmpty();
743   ::memset(&_impl_.temporary_memory_size_, 0, static_cast<size_t>(
744       reinterpret_cast<char*>(&_impl_.device_persistent_memory_size_) -
745       reinterpret_cast<char*>(&_impl_.temporary_memory_size_)) + sizeof(_impl_.device_persistent_memory_size_));
746   _internal_metadata_.Clear<std::string>();
747 }
748 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)749 const char* CostGraphDef_Node::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
750 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
751   while (!ctx->Done(&ptr)) {
752     ::uint32_t tag;
753     ptr = ::_pbi::ReadTag(ptr, &tag);
754     switch (tag >> 3) {
755       // string name = 1;
756       case 1:
757         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
758           auto str = _internal_mutable_name();
759           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
760           CHK_(ptr);
761           CHK_(::_pbi::VerifyUTF8(str, nullptr));
762         } else {
763           goto handle_unusual;
764         }
765         continue;
766       // string device = 2;
767       case 2:
768         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
769           auto str = _internal_mutable_device();
770           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
771           CHK_(ptr);
772           CHK_(::_pbi::VerifyUTF8(str, nullptr));
773         } else {
774           goto handle_unusual;
775         }
776         continue;
777       // int32 id = 3;
778       case 3:
779         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
780           _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
781           CHK_(ptr);
782         } else {
783           goto handle_unusual;
784         }
785         continue;
786       // repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
787       case 4:
788         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
789           ptr -= 1;
790           do {
791             ptr += 1;
792             ptr = ctx->ParseMessage(_internal_add_input_info(), ptr);
793             CHK_(ptr);
794             if (!ctx->DataAvailable(ptr)) break;
795           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
796         } else {
797           goto handle_unusual;
798         }
799         continue;
800       // repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
801       case 5:
802         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
803           ptr -= 1;
804           do {
805             ptr += 1;
806             ptr = ctx->ParseMessage(_internal_add_output_info(), ptr);
807             CHK_(ptr);
808             if (!ctx->DataAvailable(ptr)) break;
809           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
810         } else {
811           goto handle_unusual;
812         }
813         continue;
814       // int64 temporary_memory_size = 6;
815       case 6:
816         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
817           _impl_.temporary_memory_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
818           CHK_(ptr);
819         } else {
820           goto handle_unusual;
821         }
822         continue;
823       // bool is_final = 7;
824       case 7:
825         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
826           _impl_.is_final_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
827           CHK_(ptr);
828         } else {
829           goto handle_unusual;
830         }
831         continue;
832       // repeated int32 control_input = 8;
833       case 8:
834         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
835           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_control_input(), ptr, ctx);
836           CHK_(ptr);
837         } else if (static_cast<::uint8_t>(tag) == 64) {
838           _internal_add_control_input(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
839           CHK_(ptr);
840         } else {
841           goto handle_unusual;
842         }
843         continue;
844       // int64 compute_cost = 9;
845       case 9:
846         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
847           _impl_.compute_cost_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
848           CHK_(ptr);
849         } else {
850           goto handle_unusual;
851         }
852         continue;
853       // int64 host_temp_memory_size = 10 [deprecated = true];
854       case 10:
855         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
856           _impl_.host_temp_memory_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
857           CHK_(ptr);
858         } else {
859           goto handle_unusual;
860         }
861         continue;
862       // int64 device_temp_memory_size = 11 [deprecated = true];
863       case 11:
864         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
865           _impl_.device_temp_memory_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
866           CHK_(ptr);
867         } else {
868           goto handle_unusual;
869         }
870         continue;
871       // int64 persistent_memory_size = 12;
872       case 12:
873         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
874           _impl_.persistent_memory_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
875           CHK_(ptr);
876         } else {
877           goto handle_unusual;
878         }
879         continue;
880       // int64 compute_time = 14;
881       case 14:
882         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
883           _impl_.compute_time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
884           CHK_(ptr);
885         } else {
886           goto handle_unusual;
887         }
888         continue;
889       // int64 memory_time = 15;
890       case 15:
891         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 120)) {
892           _impl_.memory_time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
893           CHK_(ptr);
894         } else {
895           goto handle_unusual;
896         }
897         continue;
898       // int64 device_persistent_memory_size = 16 [deprecated = true];
899       case 16:
900         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 128)) {
901           _impl_.device_persistent_memory_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
902           CHK_(ptr);
903         } else {
904           goto handle_unusual;
905         }
906         continue;
907       // bool inaccurate = 17;
908       case 17:
909         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
910           _impl_.inaccurate_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
911           CHK_(ptr);
912         } else {
913           goto handle_unusual;
914         }
915         continue;
916       default:
917         goto handle_unusual;
918     }  // switch
919   handle_unusual:
920     if ((tag == 0) || ((tag & 7) == 4)) {
921       CHK_(ptr);
922       ctx->SetLastTag(tag);
923       goto message_done;
924     }
925     ptr = UnknownFieldParse(
926         tag,
927         _internal_metadata_.mutable_unknown_fields<std::string>(),
928         ptr, ctx);
929     CHK_(ptr != nullptr);
930   }  // while
931 message_done:
932   return ptr;
933 failure:
934   ptr = nullptr;
935   goto message_done;
936 #undef CHK_
937 }
938 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const939 ::uint8_t* CostGraphDef_Node::_InternalSerialize(
940     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
941   // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CostGraphDef.Node)
942   ::uint32_t cached_has_bits = 0;
943   (void) cached_has_bits;
944 
945   // string name = 1;
946   if (!this->_internal_name().empty()) {
947     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
948       this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
949       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
950       "tensorflow.CostGraphDef.Node.name");
951     target = stream->WriteStringMaybeAliased(
952         1, this->_internal_name(), target);
953   }
954 
955   // string device = 2;
956   if (!this->_internal_device().empty()) {
957     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
958       this->_internal_device().data(), static_cast<int>(this->_internal_device().length()),
959       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
960       "tensorflow.CostGraphDef.Node.device");
961     target = stream->WriteStringMaybeAliased(
962         2, this->_internal_device(), target);
963   }
964 
965   // int32 id = 3;
966   if (this->_internal_id() != 0) {
967     target = stream->EnsureSpace(target);
968     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_id(), target);
969   }
970 
971   // repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
972   for (unsigned i = 0,
973       n = static_cast<unsigned>(this->_internal_input_info_size()); i < n; i++) {
974     const auto& repfield = this->_internal_input_info(i);
975     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
976         InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
977   }
978 
979   // repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
980   for (unsigned i = 0,
981       n = static_cast<unsigned>(this->_internal_output_info_size()); i < n; i++) {
982     const auto& repfield = this->_internal_output_info(i);
983     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
984         InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
985   }
986 
987   // int64 temporary_memory_size = 6;
988   if (this->_internal_temporary_memory_size() != 0) {
989     target = stream->EnsureSpace(target);
990     target = ::_pbi::WireFormatLite::WriteInt64ToArray(6, this->_internal_temporary_memory_size(), target);
991   }
992 
993   // bool is_final = 7;
994   if (this->_internal_is_final() != 0) {
995     target = stream->EnsureSpace(target);
996     target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_is_final(), target);
997   }
998 
999   // repeated int32 control_input = 8;
1000   {
1001     int byte_size = _impl_._control_input_cached_byte_size_.load(std::memory_order_relaxed);
1002     if (byte_size > 0) {
1003       target = stream->WriteInt32Packed(
1004           8, _internal_control_input(), byte_size, target);
1005     }
1006   }
1007 
1008   // int64 compute_cost = 9;
1009   if (this->_internal_compute_cost() != 0) {
1010     target = stream->EnsureSpace(target);
1011     target = ::_pbi::WireFormatLite::WriteInt64ToArray(9, this->_internal_compute_cost(), target);
1012   }
1013 
1014   // int64 host_temp_memory_size = 10 [deprecated = true];
1015   if (this->_internal_host_temp_memory_size() != 0) {
1016     target = stream->EnsureSpace(target);
1017     target = ::_pbi::WireFormatLite::WriteInt64ToArray(10, this->_internal_host_temp_memory_size(), target);
1018   }
1019 
1020   // int64 device_temp_memory_size = 11 [deprecated = true];
1021   if (this->_internal_device_temp_memory_size() != 0) {
1022     target = stream->EnsureSpace(target);
1023     target = ::_pbi::WireFormatLite::WriteInt64ToArray(11, this->_internal_device_temp_memory_size(), target);
1024   }
1025 
1026   // int64 persistent_memory_size = 12;
1027   if (this->_internal_persistent_memory_size() != 0) {
1028     target = stream->EnsureSpace(target);
1029     target = ::_pbi::WireFormatLite::WriteInt64ToArray(12, this->_internal_persistent_memory_size(), target);
1030   }
1031 
1032   // int64 compute_time = 14;
1033   if (this->_internal_compute_time() != 0) {
1034     target = stream->EnsureSpace(target);
1035     target = ::_pbi::WireFormatLite::WriteInt64ToArray(14, this->_internal_compute_time(), target);
1036   }
1037 
1038   // int64 memory_time = 15;
1039   if (this->_internal_memory_time() != 0) {
1040     target = stream->EnsureSpace(target);
1041     target = ::_pbi::WireFormatLite::WriteInt64ToArray(15, this->_internal_memory_time(), target);
1042   }
1043 
1044   // int64 device_persistent_memory_size = 16 [deprecated = true];
1045   if (this->_internal_device_persistent_memory_size() != 0) {
1046     target = stream->EnsureSpace(target);
1047     target = ::_pbi::WireFormatLite::WriteInt64ToArray(16, this->_internal_device_persistent_memory_size(), target);
1048   }
1049 
1050   // bool inaccurate = 17;
1051   if (this->_internal_inaccurate() != 0) {
1052     target = stream->EnsureSpace(target);
1053     target = ::_pbi::WireFormatLite::WriteBoolToArray(17, this->_internal_inaccurate(), target);
1054   }
1055 
1056   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1057     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1058         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1059   }
1060   // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CostGraphDef.Node)
1061   return target;
1062 }
1063 
ByteSizeLong() const1064 size_t CostGraphDef_Node::ByteSizeLong() const {
1065 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CostGraphDef.Node)
1066   size_t total_size = 0;
1067 
1068   ::uint32_t cached_has_bits = 0;
1069   // Prevent compiler warnings about cached_has_bits being unused
1070   (void) cached_has_bits;
1071 
1072   // repeated .tensorflow.CostGraphDef.Node.InputInfo input_info = 4;
1073   total_size += 1UL * this->_internal_input_info_size();
1074   for (const auto& msg : this->_impl_.input_info_) {
1075     total_size +=
1076       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1077   }
1078 
1079   // repeated .tensorflow.CostGraphDef.Node.OutputInfo output_info = 5;
1080   total_size += 1UL * this->_internal_output_info_size();
1081   for (const auto& msg : this->_impl_.output_info_) {
1082     total_size +=
1083       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1084   }
1085 
1086   // repeated int32 control_input = 8;
1087   {
1088     size_t data_size = ::_pbi::WireFormatLite::
1089       Int32Size(this->_impl_.control_input_);
1090     if (data_size > 0) {
1091       total_size += 1 +
1092         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
1093     }
1094     int cached_size = ::_pbi::ToCachedSize(data_size);
1095     _impl_._control_input_cached_byte_size_.store(cached_size,
1096                                     std::memory_order_relaxed);
1097     total_size += data_size;
1098   }
1099 
1100   // string name = 1;
1101   if (!this->_internal_name().empty()) {
1102     total_size += 1 +
1103       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1104         this->_internal_name());
1105   }
1106 
1107   // string device = 2;
1108   if (!this->_internal_device().empty()) {
1109     total_size += 1 +
1110       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1111         this->_internal_device());
1112   }
1113 
1114   // int64 temporary_memory_size = 6;
1115   if (this->_internal_temporary_memory_size() != 0) {
1116     total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_temporary_memory_size());
1117   }
1118 
1119   // int64 compute_cost = 9;
1120   if (this->_internal_compute_cost() != 0) {
1121     total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_compute_cost());
1122   }
1123 
1124   // int32 id = 3;
1125   if (this->_internal_id() != 0) {
1126     total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_id());
1127   }
1128 
1129   // bool is_final = 7;
1130   if (this->_internal_is_final() != 0) {
1131     total_size += 1 + 1;
1132   }
1133 
1134   // bool inaccurate = 17;
1135   if (this->_internal_inaccurate() != 0) {
1136     total_size += 2 + 1;
1137   }
1138 
1139   // int64 host_temp_memory_size = 10 [deprecated = true];
1140   if (this->_internal_host_temp_memory_size() != 0) {
1141     total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_host_temp_memory_size());
1142   }
1143 
1144   // int64 device_temp_memory_size = 11 [deprecated = true];
1145   if (this->_internal_device_temp_memory_size() != 0) {
1146     total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_device_temp_memory_size());
1147   }
1148 
1149   // int64 persistent_memory_size = 12;
1150   if (this->_internal_persistent_memory_size() != 0) {
1151     total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_persistent_memory_size());
1152   }
1153 
1154   // int64 compute_time = 14;
1155   if (this->_internal_compute_time() != 0) {
1156     total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_compute_time());
1157   }
1158 
1159   // int64 memory_time = 15;
1160   if (this->_internal_memory_time() != 0) {
1161     total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_memory_time());
1162   }
1163 
1164   // int64 device_persistent_memory_size = 16 [deprecated = true];
1165   if (this->_internal_device_persistent_memory_size() != 0) {
1166     total_size += 2 +
1167       ::_pbi::WireFormatLite::Int64Size(
1168         this->_internal_device_persistent_memory_size());
1169   }
1170 
1171   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1172     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1173   }
1174   int cached_size = ::_pbi::ToCachedSize(total_size);
1175   SetCachedSize(cached_size);
1176   return total_size;
1177 }
1178 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1179 void CostGraphDef_Node::CheckTypeAndMergeFrom(
1180     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1181   MergeFrom(*::_pbi::DownCast<const CostGraphDef_Node*>(
1182       &from));
1183 }
1184 
MergeFrom(const CostGraphDef_Node & from)1185 void CostGraphDef_Node::MergeFrom(const CostGraphDef_Node& from) {
1186   CostGraphDef_Node* const _this = this;
1187   // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CostGraphDef.Node)
1188   GOOGLE_DCHECK_NE(&from, _this);
1189   ::uint32_t cached_has_bits = 0;
1190   (void) cached_has_bits;
1191 
1192   _this->_impl_.input_info_.MergeFrom(from._impl_.input_info_);
1193   _this->_impl_.output_info_.MergeFrom(from._impl_.output_info_);
1194   _this->_impl_.control_input_.MergeFrom(from._impl_.control_input_);
1195   if (!from._internal_name().empty()) {
1196     _this->_internal_set_name(from._internal_name());
1197   }
1198   if (!from._internal_device().empty()) {
1199     _this->_internal_set_device(from._internal_device());
1200   }
1201   if (from._internal_temporary_memory_size() != 0) {
1202     _this->_internal_set_temporary_memory_size(from._internal_temporary_memory_size());
1203   }
1204   if (from._internal_compute_cost() != 0) {
1205     _this->_internal_set_compute_cost(from._internal_compute_cost());
1206   }
1207   if (from._internal_id() != 0) {
1208     _this->_internal_set_id(from._internal_id());
1209   }
1210   if (from._internal_is_final() != 0) {
1211     _this->_internal_set_is_final(from._internal_is_final());
1212   }
1213   if (from._internal_inaccurate() != 0) {
1214     _this->_internal_set_inaccurate(from._internal_inaccurate());
1215   }
1216   if (from._internal_host_temp_memory_size() != 0) {
1217     _this->_internal_set_host_temp_memory_size(from._internal_host_temp_memory_size());
1218   }
1219   if (from._internal_device_temp_memory_size() != 0) {
1220     _this->_internal_set_device_temp_memory_size(from._internal_device_temp_memory_size());
1221   }
1222   if (from._internal_persistent_memory_size() != 0) {
1223     _this->_internal_set_persistent_memory_size(from._internal_persistent_memory_size());
1224   }
1225   if (from._internal_compute_time() != 0) {
1226     _this->_internal_set_compute_time(from._internal_compute_time());
1227   }
1228   if (from._internal_memory_time() != 0) {
1229     _this->_internal_set_memory_time(from._internal_memory_time());
1230   }
1231   if (from._internal_device_persistent_memory_size() != 0) {
1232     _this->_internal_set_device_persistent_memory_size(from._internal_device_persistent_memory_size());
1233   }
1234   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1235 }
1236 
CopyFrom(const CostGraphDef_Node & from)1237 void CostGraphDef_Node::CopyFrom(const CostGraphDef_Node& from) {
1238 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CostGraphDef.Node)
1239   if (&from == this) return;
1240   Clear();
1241   MergeFrom(from);
1242 }
1243 
IsInitialized() const1244 bool CostGraphDef_Node::IsInitialized() const {
1245   return true;
1246 }
1247 
InternalSwap(CostGraphDef_Node * other)1248 void CostGraphDef_Node::InternalSwap(CostGraphDef_Node* other) {
1249   using std::swap;
1250   auto* lhs_arena = GetArenaForAllocation();
1251   auto* rhs_arena = other->GetArenaForAllocation();
1252   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1253   _impl_.input_info_.InternalSwap(&other->_impl_.input_info_);
1254   _impl_.output_info_.InternalSwap(&other->_impl_.output_info_);
1255   _impl_.control_input_.InternalSwap(&other->_impl_.control_input_);
1256   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1257       &_impl_.name_, lhs_arena,
1258       &other->_impl_.name_, rhs_arena
1259   );
1260   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1261       &_impl_.device_, lhs_arena,
1262       &other->_impl_.device_, rhs_arena
1263   );
1264   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1265       PROTOBUF_FIELD_OFFSET(CostGraphDef_Node, _impl_.device_persistent_memory_size_)
1266       + sizeof(CostGraphDef_Node::_impl_.device_persistent_memory_size_)  // NOLINT
1267       - PROTOBUF_FIELD_OFFSET(CostGraphDef_Node, _impl_.temporary_memory_size_)>(
1268           reinterpret_cast<char*>(&_impl_.temporary_memory_size_),
1269           reinterpret_cast<char*>(&other->_impl_.temporary_memory_size_));
1270 }
1271 
GetTypeName() const1272 std::string CostGraphDef_Node::GetTypeName() const {
1273   return "tensorflow.CostGraphDef.Node";
1274 }
1275 
1276 
1277 // ===================================================================
1278 
1279 class CostGraphDef_AggregatedCost::_Internal {
1280  public:
1281 };
1282 
CostGraphDef_AggregatedCost(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1283 CostGraphDef_AggregatedCost::CostGraphDef_AggregatedCost(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1284                          bool is_message_owned)
1285   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1286   SharedCtor(arena, is_message_owned);
1287   // @@protoc_insertion_point(arena_constructor:tensorflow.CostGraphDef.AggregatedCost)
1288 }
CostGraphDef_AggregatedCost(const CostGraphDef_AggregatedCost & from)1289 CostGraphDef_AggregatedCost::CostGraphDef_AggregatedCost(const CostGraphDef_AggregatedCost& from)
1290   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1291   CostGraphDef_AggregatedCost* const _this = this; (void)_this;
1292   new (&_impl_) Impl_{
1293       decltype(_impl_.dimension_){}
1294     , decltype(_impl_.cost_){}
1295     , /*decltype(_impl_._cached_size_)*/{}};
1296 
1297   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1298   _impl_.dimension_.InitDefault();
1299   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1300     _impl_.dimension_.Set("", GetArenaForAllocation());
1301   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1302   if (!from._internal_dimension().empty()) {
1303     _this->_impl_.dimension_.Set(from._internal_dimension(),
1304       _this->GetArenaForAllocation());
1305   }
1306   _this->_impl_.cost_ = from._impl_.cost_;
1307   // @@protoc_insertion_point(copy_constructor:tensorflow.CostGraphDef.AggregatedCost)
1308 }
1309 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1310 inline void CostGraphDef_AggregatedCost::SharedCtor(
1311     ::_pb::Arena* arena, bool is_message_owned) {
1312   (void)arena;
1313   (void)is_message_owned;
1314   new (&_impl_) Impl_{
1315       decltype(_impl_.dimension_){}
1316     , decltype(_impl_.cost_){0}
1317     , /*decltype(_impl_._cached_size_)*/{}
1318   };
1319   _impl_.dimension_.InitDefault();
1320   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1321     _impl_.dimension_.Set("", GetArenaForAllocation());
1322   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1323 }
1324 
~CostGraphDef_AggregatedCost()1325 CostGraphDef_AggregatedCost::~CostGraphDef_AggregatedCost() {
1326   // @@protoc_insertion_point(destructor:tensorflow.CostGraphDef.AggregatedCost)
1327   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1328   (void)arena;
1329     return;
1330   }
1331   SharedDtor();
1332 }
1333 
SharedDtor()1334 inline void CostGraphDef_AggregatedCost::SharedDtor() {
1335   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1336   _impl_.dimension_.Destroy();
1337 }
1338 
SetCachedSize(int size) const1339 void CostGraphDef_AggregatedCost::SetCachedSize(int size) const {
1340   _impl_._cached_size_.Set(size);
1341 }
1342 
Clear()1343 void CostGraphDef_AggregatedCost::Clear() {
1344 // @@protoc_insertion_point(message_clear_start:tensorflow.CostGraphDef.AggregatedCost)
1345   ::uint32_t cached_has_bits = 0;
1346   // Prevent compiler warnings about cached_has_bits being unused
1347   (void) cached_has_bits;
1348 
1349   _impl_.dimension_.ClearToEmpty();
1350   _impl_.cost_ = 0;
1351   _internal_metadata_.Clear<std::string>();
1352 }
1353 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1354 const char* CostGraphDef_AggregatedCost::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1355 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1356   while (!ctx->Done(&ptr)) {
1357     ::uint32_t tag;
1358     ptr = ::_pbi::ReadTag(ptr, &tag);
1359     switch (tag >> 3) {
1360       // float cost = 1;
1361       case 1:
1362         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 13)) {
1363           _impl_.cost_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1364           ptr += sizeof(float);
1365         } else {
1366           goto handle_unusual;
1367         }
1368         continue;
1369       // string dimension = 2;
1370       case 2:
1371         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1372           auto str = _internal_mutable_dimension();
1373           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1374           CHK_(ptr);
1375           CHK_(::_pbi::VerifyUTF8(str, nullptr));
1376         } else {
1377           goto handle_unusual;
1378         }
1379         continue;
1380       default:
1381         goto handle_unusual;
1382     }  // switch
1383   handle_unusual:
1384     if ((tag == 0) || ((tag & 7) == 4)) {
1385       CHK_(ptr);
1386       ctx->SetLastTag(tag);
1387       goto message_done;
1388     }
1389     ptr = UnknownFieldParse(
1390         tag,
1391         _internal_metadata_.mutable_unknown_fields<std::string>(),
1392         ptr, ctx);
1393     CHK_(ptr != nullptr);
1394   }  // while
1395 message_done:
1396   return ptr;
1397 failure:
1398   ptr = nullptr;
1399   goto message_done;
1400 #undef CHK_
1401 }
1402 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1403 ::uint8_t* CostGraphDef_AggregatedCost::_InternalSerialize(
1404     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1405   // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CostGraphDef.AggregatedCost)
1406   ::uint32_t cached_has_bits = 0;
1407   (void) cached_has_bits;
1408 
1409   // float cost = 1;
1410   static_assert(sizeof(::uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size.");
1411   float tmp_cost = this->_internal_cost();
1412   ::uint32_t raw_cost;
1413   memcpy(&raw_cost, &tmp_cost, sizeof(tmp_cost));
1414   if (raw_cost != 0) {
1415     target = stream->EnsureSpace(target);
1416     target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_cost(), target);
1417   }
1418 
1419   // string dimension = 2;
1420   if (!this->_internal_dimension().empty()) {
1421     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1422       this->_internal_dimension().data(), static_cast<int>(this->_internal_dimension().length()),
1423       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1424       "tensorflow.CostGraphDef.AggregatedCost.dimension");
1425     target = stream->WriteStringMaybeAliased(
1426         2, this->_internal_dimension(), target);
1427   }
1428 
1429   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1430     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1431         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1432   }
1433   // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CostGraphDef.AggregatedCost)
1434   return target;
1435 }
1436 
ByteSizeLong() const1437 size_t CostGraphDef_AggregatedCost::ByteSizeLong() const {
1438 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CostGraphDef.AggregatedCost)
1439   size_t total_size = 0;
1440 
1441   ::uint32_t cached_has_bits = 0;
1442   // Prevent compiler warnings about cached_has_bits being unused
1443   (void) cached_has_bits;
1444 
1445   // string dimension = 2;
1446   if (!this->_internal_dimension().empty()) {
1447     total_size += 1 +
1448       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1449         this->_internal_dimension());
1450   }
1451 
1452   // float cost = 1;
1453   static_assert(sizeof(::uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size.");
1454   float tmp_cost = this->_internal_cost();
1455   ::uint32_t raw_cost;
1456   memcpy(&raw_cost, &tmp_cost, sizeof(tmp_cost));
1457   if (raw_cost != 0) {
1458     total_size += 1 + 4;
1459   }
1460 
1461   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1462     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1463   }
1464   int cached_size = ::_pbi::ToCachedSize(total_size);
1465   SetCachedSize(cached_size);
1466   return total_size;
1467 }
1468 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1469 void CostGraphDef_AggregatedCost::CheckTypeAndMergeFrom(
1470     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1471   MergeFrom(*::_pbi::DownCast<const CostGraphDef_AggregatedCost*>(
1472       &from));
1473 }
1474 
MergeFrom(const CostGraphDef_AggregatedCost & from)1475 void CostGraphDef_AggregatedCost::MergeFrom(const CostGraphDef_AggregatedCost& from) {
1476   CostGraphDef_AggregatedCost* const _this = this;
1477   // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CostGraphDef.AggregatedCost)
1478   GOOGLE_DCHECK_NE(&from, _this);
1479   ::uint32_t cached_has_bits = 0;
1480   (void) cached_has_bits;
1481 
1482   if (!from._internal_dimension().empty()) {
1483     _this->_internal_set_dimension(from._internal_dimension());
1484   }
1485   static_assert(sizeof(::uint32_t) == sizeof(float), "Code assumes uint32_t and float are the same size.");
1486   float tmp_cost = from._internal_cost();
1487   ::uint32_t raw_cost;
1488   memcpy(&raw_cost, &tmp_cost, sizeof(tmp_cost));
1489   if (raw_cost != 0) {
1490     _this->_internal_set_cost(from._internal_cost());
1491   }
1492   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1493 }
1494 
CopyFrom(const CostGraphDef_AggregatedCost & from)1495 void CostGraphDef_AggregatedCost::CopyFrom(const CostGraphDef_AggregatedCost& from) {
1496 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CostGraphDef.AggregatedCost)
1497   if (&from == this) return;
1498   Clear();
1499   MergeFrom(from);
1500 }
1501 
IsInitialized() const1502 bool CostGraphDef_AggregatedCost::IsInitialized() const {
1503   return true;
1504 }
1505 
InternalSwap(CostGraphDef_AggregatedCost * other)1506 void CostGraphDef_AggregatedCost::InternalSwap(CostGraphDef_AggregatedCost* other) {
1507   using std::swap;
1508   auto* lhs_arena = GetArenaForAllocation();
1509   auto* rhs_arena = other->GetArenaForAllocation();
1510   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1511   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1512       &_impl_.dimension_, lhs_arena,
1513       &other->_impl_.dimension_, rhs_arena
1514   );
1515   swap(_impl_.cost_, other->_impl_.cost_);
1516 }
1517 
GetTypeName() const1518 std::string CostGraphDef_AggregatedCost::GetTypeName() const {
1519   return "tensorflow.CostGraphDef.AggregatedCost";
1520 }
1521 
1522 
1523 // ===================================================================
1524 
1525 class CostGraphDef::_Internal {
1526  public:
1527 };
1528 
CostGraphDef(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1529 CostGraphDef::CostGraphDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1530                          bool is_message_owned)
1531   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1532   SharedCtor(arena, is_message_owned);
1533   // @@protoc_insertion_point(arena_constructor:tensorflow.CostGraphDef)
1534 }
CostGraphDef(const CostGraphDef & from)1535 CostGraphDef::CostGraphDef(const CostGraphDef& from)
1536   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1537   CostGraphDef* const _this = this; (void)_this;
1538   new (&_impl_) Impl_{
1539       decltype(_impl_.node_){from._impl_.node_}
1540     , decltype(_impl_.cost_){from._impl_.cost_}
1541     , /*decltype(_impl_._cached_size_)*/{}};
1542 
1543   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1544   // @@protoc_insertion_point(copy_constructor:tensorflow.CostGraphDef)
1545 }
1546 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1547 inline void CostGraphDef::SharedCtor(
1548     ::_pb::Arena* arena, bool is_message_owned) {
1549   (void)arena;
1550   (void)is_message_owned;
1551   new (&_impl_) Impl_{
1552       decltype(_impl_.node_){arena}
1553     , decltype(_impl_.cost_){arena}
1554     , /*decltype(_impl_._cached_size_)*/{}
1555   };
1556 }
1557 
~CostGraphDef()1558 CostGraphDef::~CostGraphDef() {
1559   // @@protoc_insertion_point(destructor:tensorflow.CostGraphDef)
1560   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1561   (void)arena;
1562     return;
1563   }
1564   SharedDtor();
1565 }
1566 
SharedDtor()1567 inline void CostGraphDef::SharedDtor() {
1568   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1569   _impl_.node_.~RepeatedPtrField();
1570   _impl_.cost_.~RepeatedPtrField();
1571 }
1572 
SetCachedSize(int size) const1573 void CostGraphDef::SetCachedSize(int size) const {
1574   _impl_._cached_size_.Set(size);
1575 }
1576 
Clear()1577 void CostGraphDef::Clear() {
1578 // @@protoc_insertion_point(message_clear_start:tensorflow.CostGraphDef)
1579   ::uint32_t cached_has_bits = 0;
1580   // Prevent compiler warnings about cached_has_bits being unused
1581   (void) cached_has_bits;
1582 
1583   _impl_.node_.Clear();
1584   _impl_.cost_.Clear();
1585   _internal_metadata_.Clear<std::string>();
1586 }
1587 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1588 const char* CostGraphDef::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1589 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1590   while (!ctx->Done(&ptr)) {
1591     ::uint32_t tag;
1592     ptr = ::_pbi::ReadTag(ptr, &tag);
1593     switch (tag >> 3) {
1594       // repeated .tensorflow.CostGraphDef.Node node = 1;
1595       case 1:
1596         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1597           ptr -= 1;
1598           do {
1599             ptr += 1;
1600             ptr = ctx->ParseMessage(_internal_add_node(), ptr);
1601             CHK_(ptr);
1602             if (!ctx->DataAvailable(ptr)) break;
1603           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1604         } else {
1605           goto handle_unusual;
1606         }
1607         continue;
1608       // repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;
1609       case 2:
1610         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1611           ptr -= 1;
1612           do {
1613             ptr += 1;
1614             ptr = ctx->ParseMessage(_internal_add_cost(), ptr);
1615             CHK_(ptr);
1616             if (!ctx->DataAvailable(ptr)) break;
1617           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
1618         } else {
1619           goto handle_unusual;
1620         }
1621         continue;
1622       default:
1623         goto handle_unusual;
1624     }  // switch
1625   handle_unusual:
1626     if ((tag == 0) || ((tag & 7) == 4)) {
1627       CHK_(ptr);
1628       ctx->SetLastTag(tag);
1629       goto message_done;
1630     }
1631     ptr = UnknownFieldParse(
1632         tag,
1633         _internal_metadata_.mutable_unknown_fields<std::string>(),
1634         ptr, ctx);
1635     CHK_(ptr != nullptr);
1636   }  // while
1637 message_done:
1638   return ptr;
1639 failure:
1640   ptr = nullptr;
1641   goto message_done;
1642 #undef CHK_
1643 }
1644 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1645 ::uint8_t* CostGraphDef::_InternalSerialize(
1646     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1647   // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CostGraphDef)
1648   ::uint32_t cached_has_bits = 0;
1649   (void) cached_has_bits;
1650 
1651   // repeated .tensorflow.CostGraphDef.Node node = 1;
1652   for (unsigned i = 0,
1653       n = static_cast<unsigned>(this->_internal_node_size()); i < n; i++) {
1654     const auto& repfield = this->_internal_node(i);
1655     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1656         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
1657   }
1658 
1659   // repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;
1660   for (unsigned i = 0,
1661       n = static_cast<unsigned>(this->_internal_cost_size()); i < n; i++) {
1662     const auto& repfield = this->_internal_cost(i);
1663     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1664         InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
1665   }
1666 
1667   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1668     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1669         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1670   }
1671   // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CostGraphDef)
1672   return target;
1673 }
1674 
ByteSizeLong() const1675 size_t CostGraphDef::ByteSizeLong() const {
1676 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CostGraphDef)
1677   size_t total_size = 0;
1678 
1679   ::uint32_t cached_has_bits = 0;
1680   // Prevent compiler warnings about cached_has_bits being unused
1681   (void) cached_has_bits;
1682 
1683   // repeated .tensorflow.CostGraphDef.Node node = 1;
1684   total_size += 1UL * this->_internal_node_size();
1685   for (const auto& msg : this->_impl_.node_) {
1686     total_size +=
1687       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1688   }
1689 
1690   // repeated .tensorflow.CostGraphDef.AggregatedCost cost = 2;
1691   total_size += 1UL * this->_internal_cost_size();
1692   for (const auto& msg : this->_impl_.cost_) {
1693     total_size +=
1694       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1695   }
1696 
1697   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1698     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1699   }
1700   int cached_size = ::_pbi::ToCachedSize(total_size);
1701   SetCachedSize(cached_size);
1702   return total_size;
1703 }
1704 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1705 void CostGraphDef::CheckTypeAndMergeFrom(
1706     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1707   MergeFrom(*::_pbi::DownCast<const CostGraphDef*>(
1708       &from));
1709 }
1710 
MergeFrom(const CostGraphDef & from)1711 void CostGraphDef::MergeFrom(const CostGraphDef& from) {
1712   CostGraphDef* const _this = this;
1713   // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CostGraphDef)
1714   GOOGLE_DCHECK_NE(&from, _this);
1715   ::uint32_t cached_has_bits = 0;
1716   (void) cached_has_bits;
1717 
1718   _this->_impl_.node_.MergeFrom(from._impl_.node_);
1719   _this->_impl_.cost_.MergeFrom(from._impl_.cost_);
1720   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1721 }
1722 
CopyFrom(const CostGraphDef & from)1723 void CostGraphDef::CopyFrom(const CostGraphDef& from) {
1724 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CostGraphDef)
1725   if (&from == this) return;
1726   Clear();
1727   MergeFrom(from);
1728 }
1729 
IsInitialized() const1730 bool CostGraphDef::IsInitialized() const {
1731   return true;
1732 }
1733 
InternalSwap(CostGraphDef * other)1734 void CostGraphDef::InternalSwap(CostGraphDef* other) {
1735   using std::swap;
1736   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1737   _impl_.node_.InternalSwap(&other->_impl_.node_);
1738   _impl_.cost_.InternalSwap(&other->_impl_.cost_);
1739 }
1740 
GetTypeName() const1741 std::string CostGraphDef::GetTypeName() const {
1742   return "tensorflow.CostGraphDef";
1743 }
1744 
1745 
1746 // @@protoc_insertion_point(namespace_scope)
1747 }  // namespace tensorflow
1748 PROTOBUF_NAMESPACE_OPEN
1749 template<> PROTOBUF_NOINLINE ::tensorflow::CostGraphDef_Node_InputInfo*
CreateMaybeMessage(Arena * arena)1750 Arena::CreateMaybeMessage< ::tensorflow::CostGraphDef_Node_InputInfo >(Arena* arena) {
1751   return Arena::CreateMessageInternal< ::tensorflow::CostGraphDef_Node_InputInfo >(arena);
1752 }
1753 template<> PROTOBUF_NOINLINE ::tensorflow::CostGraphDef_Node_OutputInfo*
CreateMaybeMessage(Arena * arena)1754 Arena::CreateMaybeMessage< ::tensorflow::CostGraphDef_Node_OutputInfo >(Arena* arena) {
1755   return Arena::CreateMessageInternal< ::tensorflow::CostGraphDef_Node_OutputInfo >(arena);
1756 }
1757 template<> PROTOBUF_NOINLINE ::tensorflow::CostGraphDef_Node*
CreateMaybeMessage(Arena * arena)1758 Arena::CreateMaybeMessage< ::tensorflow::CostGraphDef_Node >(Arena* arena) {
1759   return Arena::CreateMessageInternal< ::tensorflow::CostGraphDef_Node >(arena);
1760 }
1761 template<> PROTOBUF_NOINLINE ::tensorflow::CostGraphDef_AggregatedCost*
CreateMaybeMessage(Arena * arena)1762 Arena::CreateMaybeMessage< ::tensorflow::CostGraphDef_AggregatedCost >(Arena* arena) {
1763   return Arena::CreateMessageInternal< ::tensorflow::CostGraphDef_AggregatedCost >(arena);
1764 }
1765 template<> PROTOBUF_NOINLINE ::tensorflow::CostGraphDef*
CreateMaybeMessage(Arena * arena)1766 Arena::CreateMaybeMessage< ::tensorflow::CostGraphDef >(Arena* arena) {
1767   return Arena::CreateMessageInternal< ::tensorflow::CostGraphDef >(arena);
1768 }
1769 PROTOBUF_NAMESPACE_CLOSE
1770 
1771 // @@protoc_insertion_point(global_scope)
1772 #include <google/protobuf/port_undef.inc>
1773