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