1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/framework/node_def.proto |
3 | |
4 | #include "tensorflow/core/framework/node_def.pb.h" |
5 | |
6 | #include <algorithm> |
7 | |
8 | #include <google/protobuf/stubs/common.h> |
9 | #include <google/protobuf/io/coded_stream.h> |
10 | #include <google/protobuf/extension_set.h> |
11 | #include <google/protobuf/wire_format_lite.h> |
12 | #include <google/protobuf/descriptor.h> |
13 | #include <google/protobuf/generated_message_reflection.h> |
14 | #include <google/protobuf/reflection_ops.h> |
15 | #include <google/protobuf/wire_format.h> |
16 | // @@protoc_insertion_point(includes) |
17 | #include <google/protobuf/port_def.inc> |
18 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fattr_5fvalue_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_AttrValue_tensorflow_2fcore_2fframework_2fattr_5fvalue_2eproto; |
19 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FullTypeDef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto; |
20 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_NodeDef_AttrEntry_DoNotUse_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto; |
21 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_NodeDef_ExperimentalDebugInfo_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto; |
22 | namespace tensorflow { |
23 | class NodeDef_AttrEntry_DoNotUseDefaultTypeInternal { |
24 | public: |
25 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<NodeDef_AttrEntry_DoNotUse> _instance; |
26 | } _NodeDef_AttrEntry_DoNotUse_default_instance_; |
27 | class NodeDef_ExperimentalDebugInfoDefaultTypeInternal { |
28 | public: |
29 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<NodeDef_ExperimentalDebugInfo> _instance; |
30 | } _NodeDef_ExperimentalDebugInfo_default_instance_; |
31 | class NodeDefDefaultTypeInternal { |
32 | public: |
33 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<NodeDef> _instance; |
34 | } _NodeDef_default_instance_; |
35 | } // namespace tensorflow |
36 | static void InitDefaultsscc_info_NodeDef_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto() { |
37 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
38 | |
39 | { |
40 | void* ptr = &::tensorflow::_NodeDef_default_instance_; |
41 | new (ptr) ::tensorflow::NodeDef(); |
42 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
43 | } |
44 | ::tensorflow::NodeDef::InitAsDefaultInstance(); |
45 | } |
46 | |
47 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_NodeDef_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto = |
48 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_NodeDef_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto}, { |
49 | &scc_info_NodeDef_AttrEntry_DoNotUse_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto.base, |
50 | &scc_info_NodeDef_ExperimentalDebugInfo_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto.base, |
51 | &scc_info_FullTypeDef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto.base,}}; |
52 | |
53 | static void InitDefaultsscc_info_NodeDef_AttrEntry_DoNotUse_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto() { |
54 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
55 | |
56 | { |
57 | void* ptr = &::tensorflow::_NodeDef_AttrEntry_DoNotUse_default_instance_; |
58 | new (ptr) ::tensorflow::NodeDef_AttrEntry_DoNotUse(); |
59 | } |
60 | ::tensorflow::NodeDef_AttrEntry_DoNotUse::InitAsDefaultInstance(); |
61 | } |
62 | |
63 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_NodeDef_AttrEntry_DoNotUse_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto = |
64 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_NodeDef_AttrEntry_DoNotUse_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto}, { |
65 | &scc_info_AttrValue_tensorflow_2fcore_2fframework_2fattr_5fvalue_2eproto.base,}}; |
66 | |
67 | static void InitDefaultsscc_info_NodeDef_ExperimentalDebugInfo_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto() { |
68 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
69 | |
70 | { |
71 | void* ptr = &::tensorflow::_NodeDef_ExperimentalDebugInfo_default_instance_; |
72 | new (ptr) ::tensorflow::NodeDef_ExperimentalDebugInfo(); |
73 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
74 | } |
75 | ::tensorflow::NodeDef_ExperimentalDebugInfo::InitAsDefaultInstance(); |
76 | } |
77 | |
78 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_NodeDef_ExperimentalDebugInfo_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto = |
79 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_NodeDef_ExperimentalDebugInfo_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto}, {}}; |
80 | |
81 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto[3]; |
82 | static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto = nullptr; |
83 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto = nullptr; |
84 | |
85 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
86 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef_AttrEntry_DoNotUse, _has_bits_), |
87 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef_AttrEntry_DoNotUse, _internal_metadata_), |
88 | ~0u, // no _extensions_ |
89 | ~0u, // no _oneof_case_ |
90 | ~0u, // no _weak_field_map_ |
91 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef_AttrEntry_DoNotUse, key_), |
92 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef_AttrEntry_DoNotUse, value_), |
93 | 0, |
94 | 1, |
95 | ~0u, // no _has_bits_ |
96 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef_ExperimentalDebugInfo, _internal_metadata_), |
97 | ~0u, // no _extensions_ |
98 | ~0u, // no _oneof_case_ |
99 | ~0u, // no _weak_field_map_ |
100 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef_ExperimentalDebugInfo, original_node_names_), |
101 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef_ExperimentalDebugInfo, original_func_names_), |
102 | ~0u, // no _has_bits_ |
103 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef, _internal_metadata_), |
104 | ~0u, // no _extensions_ |
105 | ~0u, // no _oneof_case_ |
106 | ~0u, // no _weak_field_map_ |
107 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef, name_), |
108 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef, op_), |
109 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef, input_), |
110 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef, device_), |
111 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef, attr_), |
112 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef, experimental_debug_info_), |
113 | PROTOBUF_FIELD_OFFSET(::tensorflow::NodeDef, experimental_type_), |
114 | }; |
115 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
116 | { 0, 7, sizeof(::tensorflow::NodeDef_AttrEntry_DoNotUse)}, |
117 | { 9, -1, sizeof(::tensorflow::NodeDef_ExperimentalDebugInfo)}, |
118 | { 16, -1, sizeof(::tensorflow::NodeDef)}, |
119 | }; |
120 | |
121 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
122 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_NodeDef_AttrEntry_DoNotUse_default_instance_), |
123 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_NodeDef_ExperimentalDebugInfo_default_instance_), |
124 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_NodeDef_default_instance_), |
125 | }; |
126 | |
127 | const char descriptor_table_protodef_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
128 | "\n(tensorflow/core/framework/node_def.pro" |
129 | "to\022\ntensorflow\032*tensorflow/core/framewor" |
130 | "k/attr_value.proto\032)tensorflow/core/fram" |
131 | "ework/full_type.proto\"\206\003\n\007NodeDef\022\014\n\004nam" |
132 | "e\030\001 \001(\t\022\n\n\002op\030\002 \001(\t\022\r\n\005input\030\003 \003(\t\022\016\n\006de" |
133 | "vice\030\004 \001(\t\022+\n\004attr\030\005 \003(\0132\035.tensorflow.No" |
134 | "deDef.AttrEntry\022J\n\027experimental_debug_in" |
135 | "fo\030\006 \001(\0132).tensorflow.NodeDef.Experiment" |
136 | "alDebugInfo\0222\n\021experimental_type\030\007 \001(\0132\027" |
137 | ".tensorflow.FullTypeDef\032B\n\tAttrEntry\022\013\n\003" |
138 | "key\030\001 \001(\t\022$\n\005value\030\002 \001(\0132\025.tensorflow.At" |
139 | "trValue:\0028\001\032Q\n\025ExperimentalDebugInfo\022\033\n\023" |
140 | "original_node_names\030\001 \003(\t\022\033\n\023original_fu" |
141 | "nc_names\030\002 \003(\tB{\n\030org.tensorflow.framewo" |
142 | "rkB\tNodeProtoP\001ZOgithub.com/tensorflow/t" |
143 | "ensorflow/tensorflow/go/core/framework/n" |
144 | "ode_def_go_proto\370\001\001b\006proto3" |
145 | ; |
146 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto_deps[2] = { |
147 | &::descriptor_table_tensorflow_2fcore_2fframework_2fattr_5fvalue_2eproto, |
148 | &::descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto, |
149 | }; |
150 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto_sccs[3] = { |
151 | &scc_info_NodeDef_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto.base, |
152 | &scc_info_NodeDef_AttrEntry_DoNotUse_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto.base, |
153 | &scc_info_NodeDef_ExperimentalDebugInfo_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto.base, |
154 | }; |
155 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto_once; |
156 | static bool descriptor_table_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto_initialized = false; |
157 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto = { |
158 | &descriptor_table_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto, "tensorflow/core/framework/node_def.proto" , 667, |
159 | &descriptor_table_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto_once, descriptor_table_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto_deps, 3, 2, |
160 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto::offsets, |
161 | file_level_metadata_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto, 3, file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto, |
162 | }; |
163 | |
164 | // Force running AddDescriptors() at dynamic initialization time. |
165 | static bool dynamic_init_dummy_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto), true); |
166 | namespace tensorflow { |
167 | |
168 | // =================================================================== |
169 | |
170 | NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse() {} |
171 | NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
172 | : SuperType(arena) {} |
173 | void NodeDef_AttrEntry_DoNotUse::MergeFrom(const NodeDef_AttrEntry_DoNotUse& other) { |
174 | MergeFromInternal(other); |
175 | } |
176 | ::PROTOBUF_NAMESPACE_ID::Metadata NodeDef_AttrEntry_DoNotUse::GetMetadata() const { |
177 | return GetMetadataStatic(); |
178 | } |
179 | void NodeDef_AttrEntry_DoNotUse::MergeFrom( |
180 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
181 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
182 | } |
183 | |
184 | |
185 | // =================================================================== |
186 | |
187 | void NodeDef_ExperimentalDebugInfo::InitAsDefaultInstance() { |
188 | } |
189 | class NodeDef_ExperimentalDebugInfo::_Internal { |
190 | public: |
191 | }; |
192 | |
193 | NodeDef_ExperimentalDebugInfo::NodeDef_ExperimentalDebugInfo() |
194 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
195 | SharedCtor(); |
196 | // @@protoc_insertion_point(constructor:tensorflow.NodeDef.ExperimentalDebugInfo) |
197 | } |
198 | NodeDef_ExperimentalDebugInfo::NodeDef_ExperimentalDebugInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
199 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
200 | _internal_metadata_(arena), |
201 | original_node_names_(arena), |
202 | original_func_names_(arena) { |
203 | SharedCtor(); |
204 | RegisterArenaDtor(arena); |
205 | // @@protoc_insertion_point(arena_constructor:tensorflow.NodeDef.ExperimentalDebugInfo) |
206 | } |
207 | NodeDef_ExperimentalDebugInfo::NodeDef_ExperimentalDebugInfo(const NodeDef_ExperimentalDebugInfo& from) |
208 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
209 | _internal_metadata_(nullptr), |
210 | original_node_names_(from.original_node_names_), |
211 | original_func_names_(from.original_func_names_) { |
212 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
213 | // @@protoc_insertion_point(copy_constructor:tensorflow.NodeDef.ExperimentalDebugInfo) |
214 | } |
215 | |
216 | void NodeDef_ExperimentalDebugInfo::SharedCtor() { |
217 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_NodeDef_ExperimentalDebugInfo_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto.base); |
218 | } |
219 | |
220 | NodeDef_ExperimentalDebugInfo::~NodeDef_ExperimentalDebugInfo() { |
221 | // @@protoc_insertion_point(destructor:tensorflow.NodeDef.ExperimentalDebugInfo) |
222 | SharedDtor(); |
223 | } |
224 | |
225 | void NodeDef_ExperimentalDebugInfo::SharedDtor() { |
226 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
227 | } |
228 | |
229 | void NodeDef_ExperimentalDebugInfo::ArenaDtor(void* object) { |
230 | NodeDef_ExperimentalDebugInfo* _this = reinterpret_cast< NodeDef_ExperimentalDebugInfo* >(object); |
231 | (void)_this; |
232 | } |
233 | void NodeDef_ExperimentalDebugInfo::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
234 | } |
235 | void NodeDef_ExperimentalDebugInfo::SetCachedSize(int size) const { |
236 | _cached_size_.Set(size); |
237 | } |
238 | const NodeDef_ExperimentalDebugInfo& NodeDef_ExperimentalDebugInfo::default_instance() { |
239 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_NodeDef_ExperimentalDebugInfo_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto.base); |
240 | return *internal_default_instance(); |
241 | } |
242 | |
243 | |
244 | void NodeDef_ExperimentalDebugInfo::Clear() { |
245 | // @@protoc_insertion_point(message_clear_start:tensorflow.NodeDef.ExperimentalDebugInfo) |
246 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
247 | // Prevent compiler warnings about cached_has_bits being unused |
248 | (void) cached_has_bits; |
249 | |
250 | original_node_names_.Clear(); |
251 | original_func_names_.Clear(); |
252 | _internal_metadata_.Clear(); |
253 | } |
254 | |
255 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
256 | const char* NodeDef_ExperimentalDebugInfo::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
257 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
258 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
259 | while (!ctx->Done(&ptr)) { |
260 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
261 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
262 | CHK_(ptr); |
263 | switch (tag >> 3) { |
264 | // repeated string original_node_names = 1; |
265 | case 1: |
266 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
267 | ptr -= 1; |
268 | do { |
269 | ptr += 1; |
270 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_original_node_names(), ptr, ctx, "tensorflow.NodeDef.ExperimentalDebugInfo.original_node_names" ); |
271 | CHK_(ptr); |
272 | if (!ctx->DataAvailable(ptr)) break; |
273 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
274 | } else goto handle_unusual; |
275 | continue; |
276 | // repeated string original_func_names = 2; |
277 | case 2: |
278 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
279 | ptr -= 1; |
280 | do { |
281 | ptr += 1; |
282 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_original_func_names(), ptr, ctx, "tensorflow.NodeDef.ExperimentalDebugInfo.original_func_names" ); |
283 | CHK_(ptr); |
284 | if (!ctx->DataAvailable(ptr)) break; |
285 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); |
286 | } else goto handle_unusual; |
287 | continue; |
288 | default: { |
289 | handle_unusual: |
290 | if ((tag & 7) == 4 || tag == 0) { |
291 | ctx->SetLastTag(tag); |
292 | goto success; |
293 | } |
294 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
295 | CHK_(ptr != nullptr); |
296 | continue; |
297 | } |
298 | } // switch |
299 | } // while |
300 | success: |
301 | return ptr; |
302 | failure: |
303 | ptr = nullptr; |
304 | goto success; |
305 | #undef CHK_ |
306 | } |
307 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
308 | bool NodeDef_ExperimentalDebugInfo::MergePartialFromCodedStream( |
309 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
310 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
311 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
312 | // @@protoc_insertion_point(parse_start:tensorflow.NodeDef.ExperimentalDebugInfo) |
313 | for (;;) { |
314 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
315 | tag = p.first; |
316 | if (!p.second) goto handle_unusual; |
317 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
318 | // repeated string original_node_names = 1; |
319 | case 1: { |
320 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
321 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
322 | input, this->add_original_node_names())); |
323 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
324 | this->original_node_names(this->original_node_names_size() - 1).data(), |
325 | static_cast<int>(this->original_node_names(this->original_node_names_size() - 1).length()), |
326 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
327 | "tensorflow.NodeDef.ExperimentalDebugInfo.original_node_names" )); |
328 | } else { |
329 | goto handle_unusual; |
330 | } |
331 | break; |
332 | } |
333 | |
334 | // repeated string original_func_names = 2; |
335 | case 2: { |
336 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
337 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
338 | input, this->add_original_func_names())); |
339 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
340 | this->original_func_names(this->original_func_names_size() - 1).data(), |
341 | static_cast<int>(this->original_func_names(this->original_func_names_size() - 1).length()), |
342 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
343 | "tensorflow.NodeDef.ExperimentalDebugInfo.original_func_names" )); |
344 | } else { |
345 | goto handle_unusual; |
346 | } |
347 | break; |
348 | } |
349 | |
350 | default: { |
351 | handle_unusual: |
352 | if (tag == 0) { |
353 | goto success; |
354 | } |
355 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
356 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
357 | break; |
358 | } |
359 | } |
360 | } |
361 | success: |
362 | // @@protoc_insertion_point(parse_success:tensorflow.NodeDef.ExperimentalDebugInfo) |
363 | return true; |
364 | failure: |
365 | // @@protoc_insertion_point(parse_failure:tensorflow.NodeDef.ExperimentalDebugInfo) |
366 | return false; |
367 | #undef DO_ |
368 | } |
369 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
370 | |
371 | void NodeDef_ExperimentalDebugInfo::SerializeWithCachedSizes( |
372 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
373 | // @@protoc_insertion_point(serialize_start:tensorflow.NodeDef.ExperimentalDebugInfo) |
374 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
375 | (void) cached_has_bits; |
376 | |
377 | // repeated string original_node_names = 1; |
378 | for (int i = 0, n = this->original_node_names_size(); i < n; i++) { |
379 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
380 | this->original_node_names(i).data(), static_cast<int>(this->original_node_names(i).length()), |
381 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
382 | "tensorflow.NodeDef.ExperimentalDebugInfo.original_node_names" ); |
383 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( |
384 | 1, this->original_node_names(i), output); |
385 | } |
386 | |
387 | // repeated string original_func_names = 2; |
388 | for (int i = 0, n = this->original_func_names_size(); i < n; i++) { |
389 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
390 | this->original_func_names(i).data(), static_cast<int>(this->original_func_names(i).length()), |
391 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
392 | "tensorflow.NodeDef.ExperimentalDebugInfo.original_func_names" ); |
393 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( |
394 | 2, this->original_func_names(i), output); |
395 | } |
396 | |
397 | if (_internal_metadata_.have_unknown_fields()) { |
398 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
399 | _internal_metadata_.unknown_fields(), output); |
400 | } |
401 | // @@protoc_insertion_point(serialize_end:tensorflow.NodeDef.ExperimentalDebugInfo) |
402 | } |
403 | |
404 | ::PROTOBUF_NAMESPACE_ID::uint8* NodeDef_ExperimentalDebugInfo::InternalSerializeWithCachedSizesToArray( |
405 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
406 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.NodeDef.ExperimentalDebugInfo) |
407 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
408 | (void) cached_has_bits; |
409 | |
410 | // repeated string original_node_names = 1; |
411 | for (int i = 0, n = this->original_node_names_size(); i < n; i++) { |
412 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
413 | this->original_node_names(i).data(), static_cast<int>(this->original_node_names(i).length()), |
414 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
415 | "tensorflow.NodeDef.ExperimentalDebugInfo.original_node_names" ); |
416 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
417 | WriteStringToArray(1, this->original_node_names(i), target); |
418 | } |
419 | |
420 | // repeated string original_func_names = 2; |
421 | for (int i = 0, n = this->original_func_names_size(); i < n; i++) { |
422 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
423 | this->original_func_names(i).data(), static_cast<int>(this->original_func_names(i).length()), |
424 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
425 | "tensorflow.NodeDef.ExperimentalDebugInfo.original_func_names" ); |
426 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
427 | WriteStringToArray(2, this->original_func_names(i), target); |
428 | } |
429 | |
430 | if (_internal_metadata_.have_unknown_fields()) { |
431 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
432 | _internal_metadata_.unknown_fields(), target); |
433 | } |
434 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.NodeDef.ExperimentalDebugInfo) |
435 | return target; |
436 | } |
437 | |
438 | size_t NodeDef_ExperimentalDebugInfo::ByteSizeLong() const { |
439 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.NodeDef.ExperimentalDebugInfo) |
440 | size_t total_size = 0; |
441 | |
442 | if (_internal_metadata_.have_unknown_fields()) { |
443 | total_size += |
444 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
445 | _internal_metadata_.unknown_fields()); |
446 | } |
447 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
448 | // Prevent compiler warnings about cached_has_bits being unused |
449 | (void) cached_has_bits; |
450 | |
451 | // repeated string original_node_names = 1; |
452 | total_size += 1 * |
453 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->original_node_names_size()); |
454 | for (int i = 0, n = this->original_node_names_size(); i < n; i++) { |
455 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
456 | this->original_node_names(i)); |
457 | } |
458 | |
459 | // repeated string original_func_names = 2; |
460 | total_size += 1 * |
461 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->original_func_names_size()); |
462 | for (int i = 0, n = this->original_func_names_size(); i < n; i++) { |
463 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
464 | this->original_func_names(i)); |
465 | } |
466 | |
467 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
468 | SetCachedSize(cached_size); |
469 | return total_size; |
470 | } |
471 | |
472 | void NodeDef_ExperimentalDebugInfo::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
473 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.NodeDef.ExperimentalDebugInfo) |
474 | GOOGLE_DCHECK_NE(&from, this); |
475 | const NodeDef_ExperimentalDebugInfo* source = |
476 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<NodeDef_ExperimentalDebugInfo>( |
477 | &from); |
478 | if (source == nullptr) { |
479 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.NodeDef.ExperimentalDebugInfo) |
480 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
481 | } else { |
482 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.NodeDef.ExperimentalDebugInfo) |
483 | MergeFrom(*source); |
484 | } |
485 | } |
486 | |
487 | void NodeDef_ExperimentalDebugInfo::MergeFrom(const NodeDef_ExperimentalDebugInfo& from) { |
488 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.NodeDef.ExperimentalDebugInfo) |
489 | GOOGLE_DCHECK_NE(&from, this); |
490 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
491 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
492 | (void) cached_has_bits; |
493 | |
494 | original_node_names_.MergeFrom(from.original_node_names_); |
495 | original_func_names_.MergeFrom(from.original_func_names_); |
496 | } |
497 | |
498 | void NodeDef_ExperimentalDebugInfo::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
499 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.NodeDef.ExperimentalDebugInfo) |
500 | if (&from == this) return; |
501 | Clear(); |
502 | MergeFrom(from); |
503 | } |
504 | |
505 | void NodeDef_ExperimentalDebugInfo::CopyFrom(const NodeDef_ExperimentalDebugInfo& from) { |
506 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.NodeDef.ExperimentalDebugInfo) |
507 | if (&from == this) return; |
508 | Clear(); |
509 | MergeFrom(from); |
510 | } |
511 | |
512 | bool NodeDef_ExperimentalDebugInfo::IsInitialized() const { |
513 | return true; |
514 | } |
515 | |
516 | void NodeDef_ExperimentalDebugInfo::InternalSwap(NodeDef_ExperimentalDebugInfo* other) { |
517 | using std::swap; |
518 | _internal_metadata_.Swap(&other->_internal_metadata_); |
519 | original_node_names_.InternalSwap(CastToBase(&other->original_node_names_)); |
520 | original_func_names_.InternalSwap(CastToBase(&other->original_func_names_)); |
521 | } |
522 | |
523 | ::PROTOBUF_NAMESPACE_ID::Metadata NodeDef_ExperimentalDebugInfo::GetMetadata() const { |
524 | return GetMetadataStatic(); |
525 | } |
526 | |
527 | |
528 | // =================================================================== |
529 | |
530 | void NodeDef::InitAsDefaultInstance() { |
531 | ::tensorflow::_NodeDef_default_instance_._instance.get_mutable()->experimental_debug_info_ = const_cast< ::tensorflow::NodeDef_ExperimentalDebugInfo*>( |
532 | ::tensorflow::NodeDef_ExperimentalDebugInfo::internal_default_instance()); |
533 | ::tensorflow::_NodeDef_default_instance_._instance.get_mutable()->experimental_type_ = const_cast< ::tensorflow::FullTypeDef*>( |
534 | ::tensorflow::FullTypeDef::internal_default_instance()); |
535 | } |
536 | class NodeDef::_Internal { |
537 | public: |
538 | static const ::tensorflow::NodeDef_ExperimentalDebugInfo& experimental_debug_info(const NodeDef* msg); |
539 | static const ::tensorflow::FullTypeDef& experimental_type(const NodeDef* msg); |
540 | }; |
541 | |
542 | const ::tensorflow::NodeDef_ExperimentalDebugInfo& |
543 | NodeDef::_Internal::experimental_debug_info(const NodeDef* msg) { |
544 | return *msg->experimental_debug_info_; |
545 | } |
546 | const ::tensorflow::FullTypeDef& |
547 | NodeDef::_Internal::experimental_type(const NodeDef* msg) { |
548 | return *msg->experimental_type_; |
549 | } |
550 | void NodeDef::clear_attr() { |
551 | attr_.Clear(); |
552 | } |
553 | void NodeDef::unsafe_arena_set_allocated_experimental_debug_info( |
554 | ::tensorflow::NodeDef_ExperimentalDebugInfo* experimental_debug_info) { |
555 | if (GetArenaNoVirtual() == nullptr) { |
556 | delete experimental_debug_info_; |
557 | } |
558 | experimental_debug_info_ = experimental_debug_info; |
559 | if (experimental_debug_info) { |
560 | |
561 | } else { |
562 | |
563 | } |
564 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NodeDef.experimental_debug_info) |
565 | } |
566 | void NodeDef::unsafe_arena_set_allocated_experimental_type( |
567 | ::tensorflow::FullTypeDef* experimental_type) { |
568 | if (GetArenaNoVirtual() == nullptr) { |
569 | delete experimental_type_; |
570 | } |
571 | experimental_type_ = experimental_type; |
572 | if (experimental_type) { |
573 | |
574 | } else { |
575 | |
576 | } |
577 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.NodeDef.experimental_type) |
578 | } |
579 | void NodeDef::clear_experimental_type() { |
580 | if (GetArenaNoVirtual() == nullptr && experimental_type_ != nullptr) { |
581 | delete experimental_type_; |
582 | } |
583 | experimental_type_ = nullptr; |
584 | } |
585 | NodeDef::NodeDef() |
586 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
587 | SharedCtor(); |
588 | // @@protoc_insertion_point(constructor:tensorflow.NodeDef) |
589 | } |
590 | NodeDef::NodeDef(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
591 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
592 | _internal_metadata_(arena), |
593 | input_(arena), |
594 | attr_(arena) { |
595 | SharedCtor(); |
596 | RegisterArenaDtor(arena); |
597 | // @@protoc_insertion_point(arena_constructor:tensorflow.NodeDef) |
598 | } |
599 | NodeDef::NodeDef(const NodeDef& from) |
600 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
601 | _internal_metadata_(nullptr), |
602 | input_(from.input_) { |
603 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
604 | attr_.MergeFrom(from.attr_); |
605 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
606 | if (!from.name().empty()) { |
607 | name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), |
608 | GetArenaNoVirtual()); |
609 | } |
610 | op_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
611 | if (!from.op().empty()) { |
612 | op_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.op(), |
613 | GetArenaNoVirtual()); |
614 | } |
615 | device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
616 | if (!from.device().empty()) { |
617 | device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.device(), |
618 | GetArenaNoVirtual()); |
619 | } |
620 | if (from.has_experimental_debug_info()) { |
621 | experimental_debug_info_ = new ::tensorflow::NodeDef_ExperimentalDebugInfo(*from.experimental_debug_info_); |
622 | } else { |
623 | experimental_debug_info_ = nullptr; |
624 | } |
625 | if (from.has_experimental_type()) { |
626 | experimental_type_ = new ::tensorflow::FullTypeDef(*from.experimental_type_); |
627 | } else { |
628 | experimental_type_ = nullptr; |
629 | } |
630 | // @@protoc_insertion_point(copy_constructor:tensorflow.NodeDef) |
631 | } |
632 | |
633 | void NodeDef::SharedCtor() { |
634 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_NodeDef_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto.base); |
635 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
636 | op_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
637 | device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
638 | ::memset(&experimental_debug_info_, 0, static_cast<size_t>( |
639 | reinterpret_cast<char*>(&experimental_type_) - |
640 | reinterpret_cast<char*>(&experimental_debug_info_)) + sizeof(experimental_type_)); |
641 | } |
642 | |
643 | NodeDef::~NodeDef() { |
644 | // @@protoc_insertion_point(destructor:tensorflow.NodeDef) |
645 | SharedDtor(); |
646 | } |
647 | |
648 | void NodeDef::SharedDtor() { |
649 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
650 | name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
651 | op_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
652 | device_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
653 | if (this != internal_default_instance()) delete experimental_debug_info_; |
654 | if (this != internal_default_instance()) delete experimental_type_; |
655 | } |
656 | |
657 | void NodeDef::ArenaDtor(void* object) { |
658 | NodeDef* _this = reinterpret_cast< NodeDef* >(object); |
659 | (void)_this; |
660 | } |
661 | void NodeDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
662 | } |
663 | void NodeDef::SetCachedSize(int size) const { |
664 | _cached_size_.Set(size); |
665 | } |
666 | const NodeDef& NodeDef::default_instance() { |
667 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_NodeDef_tensorflow_2fcore_2fframework_2fnode_5fdef_2eproto.base); |
668 | return *internal_default_instance(); |
669 | } |
670 | |
671 | |
672 | void NodeDef::Clear() { |
673 | // @@protoc_insertion_point(message_clear_start:tensorflow.NodeDef) |
674 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
675 | // Prevent compiler warnings about cached_has_bits being unused |
676 | (void) cached_has_bits; |
677 | |
678 | input_.Clear(); |
679 | attr_.Clear(); |
680 | name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
681 | op_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
682 | device_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
683 | if (GetArenaNoVirtual() == nullptr && experimental_debug_info_ != nullptr) { |
684 | delete experimental_debug_info_; |
685 | } |
686 | experimental_debug_info_ = nullptr; |
687 | if (GetArenaNoVirtual() == nullptr && experimental_type_ != nullptr) { |
688 | delete experimental_type_; |
689 | } |
690 | experimental_type_ = nullptr; |
691 | _internal_metadata_.Clear(); |
692 | } |
693 | |
694 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
695 | const char* NodeDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
696 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
697 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
698 | while (!ctx->Done(&ptr)) { |
699 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
700 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
701 | CHK_(ptr); |
702 | switch (tag >> 3) { |
703 | // string name = 1; |
704 | case 1: |
705 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
706 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.NodeDef.name" ); |
707 | CHK_(ptr); |
708 | } else goto handle_unusual; |
709 | continue; |
710 | // string op = 2; |
711 | case 2: |
712 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
713 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_op(), ptr, ctx, "tensorflow.NodeDef.op" ); |
714 | CHK_(ptr); |
715 | } else goto handle_unusual; |
716 | continue; |
717 | // repeated string input = 3; |
718 | case 3: |
719 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
720 | ptr -= 1; |
721 | do { |
722 | ptr += 1; |
723 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_input(), ptr, ctx, "tensorflow.NodeDef.input" ); |
724 | CHK_(ptr); |
725 | if (!ctx->DataAvailable(ptr)) break; |
726 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); |
727 | } else goto handle_unusual; |
728 | continue; |
729 | // string device = 4; |
730 | case 4: |
731 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
732 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_device(), ptr, ctx, "tensorflow.NodeDef.device" ); |
733 | CHK_(ptr); |
734 | } else goto handle_unusual; |
735 | continue; |
736 | // map<string, .tensorflow.AttrValue> attr = 5; |
737 | case 5: |
738 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
739 | ptr -= 1; |
740 | do { |
741 | ptr += 1; |
742 | ptr = ctx->ParseMessage(&attr_, ptr); |
743 | CHK_(ptr); |
744 | if (!ctx->DataAvailable(ptr)) break; |
745 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42); |
746 | } else goto handle_unusual; |
747 | continue; |
748 | // .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; |
749 | case 6: |
750 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { |
751 | ptr = ctx->ParseMessage(mutable_experimental_debug_info(), ptr); |
752 | CHK_(ptr); |
753 | } else goto handle_unusual; |
754 | continue; |
755 | // .tensorflow.FullTypeDef experimental_type = 7; |
756 | case 7: |
757 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
758 | ptr = ctx->ParseMessage(mutable_experimental_type(), ptr); |
759 | CHK_(ptr); |
760 | } else goto handle_unusual; |
761 | continue; |
762 | default: { |
763 | handle_unusual: |
764 | if ((tag & 7) == 4 || tag == 0) { |
765 | ctx->SetLastTag(tag); |
766 | goto success; |
767 | } |
768 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
769 | CHK_(ptr != nullptr); |
770 | continue; |
771 | } |
772 | } // switch |
773 | } // while |
774 | success: |
775 | return ptr; |
776 | failure: |
777 | ptr = nullptr; |
778 | goto success; |
779 | #undef CHK_ |
780 | } |
781 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
782 | bool NodeDef::MergePartialFromCodedStream( |
783 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
784 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
785 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
786 | // @@protoc_insertion_point(parse_start:tensorflow.NodeDef) |
787 | for (;;) { |
788 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
789 | tag = p.first; |
790 | if (!p.second) goto handle_unusual; |
791 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
792 | // string name = 1; |
793 | case 1: { |
794 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
795 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
796 | input, this->mutable_name())); |
797 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
798 | this->name().data(), static_cast<int>(this->name().length()), |
799 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
800 | "tensorflow.NodeDef.name" )); |
801 | } else { |
802 | goto handle_unusual; |
803 | } |
804 | break; |
805 | } |
806 | |
807 | // string op = 2; |
808 | case 2: { |
809 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
810 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
811 | input, this->mutable_op())); |
812 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
813 | this->op().data(), static_cast<int>(this->op().length()), |
814 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
815 | "tensorflow.NodeDef.op" )); |
816 | } else { |
817 | goto handle_unusual; |
818 | } |
819 | break; |
820 | } |
821 | |
822 | // repeated string input = 3; |
823 | case 3: { |
824 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
825 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
826 | input, this->add_input())); |
827 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
828 | this->input(this->input_size() - 1).data(), |
829 | static_cast<int>(this->input(this->input_size() - 1).length()), |
830 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
831 | "tensorflow.NodeDef.input" )); |
832 | } else { |
833 | goto handle_unusual; |
834 | } |
835 | break; |
836 | } |
837 | |
838 | // string device = 4; |
839 | case 4: { |
840 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
841 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
842 | input, this->mutable_device())); |
843 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
844 | this->device().data(), static_cast<int>(this->device().length()), |
845 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
846 | "tensorflow.NodeDef.device" )); |
847 | } else { |
848 | goto handle_unusual; |
849 | } |
850 | break; |
851 | } |
852 | |
853 | // map<string, .tensorflow.AttrValue> attr = 5; |
854 | case 5: { |
855 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
856 | NodeDef_AttrEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
857 | NodeDef_AttrEntry_DoNotUse, |
858 | std::string, ::tensorflow::AttrValue, |
859 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, |
860 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
861 | 0 >, |
862 | ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue > > parser(&attr_); |
863 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
864 | input, &parser)); |
865 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
866 | parser.key().data(), static_cast<int>(parser.key().length()), |
867 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
868 | "tensorflow.NodeDef.AttrEntry.key" )); |
869 | } else { |
870 | goto handle_unusual; |
871 | } |
872 | break; |
873 | } |
874 | |
875 | // .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; |
876 | case 6: { |
877 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { |
878 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
879 | input, mutable_experimental_debug_info())); |
880 | } else { |
881 | goto handle_unusual; |
882 | } |
883 | break; |
884 | } |
885 | |
886 | // .tensorflow.FullTypeDef experimental_type = 7; |
887 | case 7: { |
888 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
889 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
890 | input, mutable_experimental_type())); |
891 | } else { |
892 | goto handle_unusual; |
893 | } |
894 | break; |
895 | } |
896 | |
897 | default: { |
898 | handle_unusual: |
899 | if (tag == 0) { |
900 | goto success; |
901 | } |
902 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
903 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
904 | break; |
905 | } |
906 | } |
907 | } |
908 | success: |
909 | // @@protoc_insertion_point(parse_success:tensorflow.NodeDef) |
910 | return true; |
911 | failure: |
912 | // @@protoc_insertion_point(parse_failure:tensorflow.NodeDef) |
913 | return false; |
914 | #undef DO_ |
915 | } |
916 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
917 | |
918 | void NodeDef::SerializeWithCachedSizes( |
919 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
920 | // @@protoc_insertion_point(serialize_start:tensorflow.NodeDef) |
921 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
922 | (void) cached_has_bits; |
923 | |
924 | // string name = 1; |
925 | if (this->name().size() > 0) { |
926 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
927 | this->name().data(), static_cast<int>(this->name().length()), |
928 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
929 | "tensorflow.NodeDef.name" ); |
930 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
931 | 1, this->name(), output); |
932 | } |
933 | |
934 | // string op = 2; |
935 | if (this->op().size() > 0) { |
936 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
937 | this->op().data(), static_cast<int>(this->op().length()), |
938 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
939 | "tensorflow.NodeDef.op" ); |
940 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
941 | 2, this->op(), output); |
942 | } |
943 | |
944 | // repeated string input = 3; |
945 | for (int i = 0, n = this->input_size(); i < n; i++) { |
946 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
947 | this->input(i).data(), static_cast<int>(this->input(i).length()), |
948 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
949 | "tensorflow.NodeDef.input" ); |
950 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( |
951 | 3, this->input(i), output); |
952 | } |
953 | |
954 | // string device = 4; |
955 | if (this->device().size() > 0) { |
956 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
957 | this->device().data(), static_cast<int>(this->device().length()), |
958 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
959 | "tensorflow.NodeDef.device" ); |
960 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
961 | 4, this->device(), output); |
962 | } |
963 | |
964 | // map<string, .tensorflow.AttrValue> attr = 5; |
965 | if (!this->attr().empty()) { |
966 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_pointer |
967 | ConstPtr; |
968 | typedef ConstPtr SortItem; |
969 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
970 | struct Utf8Check { |
971 | static void Check(ConstPtr p) { |
972 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
973 | p->first.data(), static_cast<int>(p->first.length()), |
974 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
975 | "tensorflow.NodeDef.AttrEntry.key" ); |
976 | } |
977 | }; |
978 | |
979 | if (output->IsSerializationDeterministic() && |
980 | this->attr().size() > 1) { |
981 | ::std::unique_ptr<SortItem[]> items( |
982 | new SortItem[this->attr().size()]); |
983 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::size_type size_type; |
984 | size_type n = 0; |
985 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_iterator |
986 | it = this->attr().begin(); |
987 | it != this->attr().end(); ++it, ++n) { |
988 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
989 | } |
990 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
991 | for (size_type i = 0; i < n; i++) { |
992 | NodeDef_AttrEntry_DoNotUse::Funcs::SerializeToCodedStream(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output); |
993 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
994 | } |
995 | } else { |
996 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_iterator |
997 | it = this->attr().begin(); |
998 | it != this->attr().end(); ++it) { |
999 | NodeDef_AttrEntry_DoNotUse::Funcs::SerializeToCodedStream(5, it->first, it->second, output); |
1000 | Utf8Check::Check(&(*it)); |
1001 | } |
1002 | } |
1003 | } |
1004 | |
1005 | // .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; |
1006 | if (this->has_experimental_debug_info()) { |
1007 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1008 | 6, _Internal::experimental_debug_info(this), output); |
1009 | } |
1010 | |
1011 | // .tensorflow.FullTypeDef experimental_type = 7; |
1012 | if (this->has_experimental_type()) { |
1013 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1014 | 7, _Internal::experimental_type(this), output); |
1015 | } |
1016 | |
1017 | if (_internal_metadata_.have_unknown_fields()) { |
1018 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1019 | _internal_metadata_.unknown_fields(), output); |
1020 | } |
1021 | // @@protoc_insertion_point(serialize_end:tensorflow.NodeDef) |
1022 | } |
1023 | |
1024 | ::PROTOBUF_NAMESPACE_ID::uint8* NodeDef::InternalSerializeWithCachedSizesToArray( |
1025 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1026 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.NodeDef) |
1027 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1028 | (void) cached_has_bits; |
1029 | |
1030 | // string name = 1; |
1031 | if (this->name().size() > 0) { |
1032 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1033 | this->name().data(), static_cast<int>(this->name().length()), |
1034 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1035 | "tensorflow.NodeDef.name" ); |
1036 | target = |
1037 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1038 | 1, this->name(), target); |
1039 | } |
1040 | |
1041 | // string op = 2; |
1042 | if (this->op().size() > 0) { |
1043 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1044 | this->op().data(), static_cast<int>(this->op().length()), |
1045 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1046 | "tensorflow.NodeDef.op" ); |
1047 | target = |
1048 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1049 | 2, this->op(), target); |
1050 | } |
1051 | |
1052 | // repeated string input = 3; |
1053 | for (int i = 0, n = this->input_size(); i < n; i++) { |
1054 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1055 | this->input(i).data(), static_cast<int>(this->input(i).length()), |
1056 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1057 | "tensorflow.NodeDef.input" ); |
1058 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1059 | WriteStringToArray(3, this->input(i), target); |
1060 | } |
1061 | |
1062 | // string device = 4; |
1063 | if (this->device().size() > 0) { |
1064 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1065 | this->device().data(), static_cast<int>(this->device().length()), |
1066 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1067 | "tensorflow.NodeDef.device" ); |
1068 | target = |
1069 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1070 | 4, this->device(), target); |
1071 | } |
1072 | |
1073 | // map<string, .tensorflow.AttrValue> attr = 5; |
1074 | if (!this->attr().empty()) { |
1075 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_pointer |
1076 | ConstPtr; |
1077 | typedef ConstPtr SortItem; |
1078 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
1079 | struct Utf8Check { |
1080 | static void Check(ConstPtr p) { |
1081 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1082 | p->first.data(), static_cast<int>(p->first.length()), |
1083 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1084 | "tensorflow.NodeDef.AttrEntry.key" ); |
1085 | } |
1086 | }; |
1087 | |
1088 | if (false && |
1089 | this->attr().size() > 1) { |
1090 | ::std::unique_ptr<SortItem[]> items( |
1091 | new SortItem[this->attr().size()]); |
1092 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::size_type size_type; |
1093 | size_type n = 0; |
1094 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_iterator |
1095 | it = this->attr().begin(); |
1096 | it != this->attr().end(); ++it, ++n) { |
1097 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
1098 | } |
1099 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
1100 | for (size_type i = 0; i < n; i++) { |
1101 | target = NodeDef_AttrEntry_DoNotUse::Funcs::SerializeToArray(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target); |
1102 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
1103 | } |
1104 | } else { |
1105 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_iterator |
1106 | it = this->attr().begin(); |
1107 | it != this->attr().end(); ++it) { |
1108 | target = NodeDef_AttrEntry_DoNotUse::Funcs::SerializeToArray(5, it->first, it->second, target); |
1109 | Utf8Check::Check(&(*it)); |
1110 | } |
1111 | } |
1112 | } |
1113 | |
1114 | // .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; |
1115 | if (this->has_experimental_debug_info()) { |
1116 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1117 | InternalWriteMessageToArray( |
1118 | 6, _Internal::experimental_debug_info(this), target); |
1119 | } |
1120 | |
1121 | // .tensorflow.FullTypeDef experimental_type = 7; |
1122 | if (this->has_experimental_type()) { |
1123 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1124 | InternalWriteMessageToArray( |
1125 | 7, _Internal::experimental_type(this), target); |
1126 | } |
1127 | |
1128 | if (_internal_metadata_.have_unknown_fields()) { |
1129 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1130 | _internal_metadata_.unknown_fields(), target); |
1131 | } |
1132 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.NodeDef) |
1133 | return target; |
1134 | } |
1135 | |
1136 | size_t NodeDef::ByteSizeLong() const { |
1137 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.NodeDef) |
1138 | size_t total_size = 0; |
1139 | |
1140 | if (_internal_metadata_.have_unknown_fields()) { |
1141 | total_size += |
1142 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1143 | _internal_metadata_.unknown_fields()); |
1144 | } |
1145 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1146 | // Prevent compiler warnings about cached_has_bits being unused |
1147 | (void) cached_has_bits; |
1148 | |
1149 | // repeated string input = 3; |
1150 | total_size += 1 * |
1151 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->input_size()); |
1152 | for (int i = 0, n = this->input_size(); i < n; i++) { |
1153 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1154 | this->input(i)); |
1155 | } |
1156 | |
1157 | // map<string, .tensorflow.AttrValue> attr = 5; |
1158 | total_size += 1 * |
1159 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->attr_size()); |
1160 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_iterator |
1161 | it = this->attr().begin(); |
1162 | it != this->attr().end(); ++it) { |
1163 | total_size += NodeDef_AttrEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
1164 | } |
1165 | |
1166 | // string name = 1; |
1167 | if (this->name().size() > 0) { |
1168 | total_size += 1 + |
1169 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1170 | this->name()); |
1171 | } |
1172 | |
1173 | // string op = 2; |
1174 | if (this->op().size() > 0) { |
1175 | total_size += 1 + |
1176 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1177 | this->op()); |
1178 | } |
1179 | |
1180 | // string device = 4; |
1181 | if (this->device().size() > 0) { |
1182 | total_size += 1 + |
1183 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1184 | this->device()); |
1185 | } |
1186 | |
1187 | // .tensorflow.NodeDef.ExperimentalDebugInfo experimental_debug_info = 6; |
1188 | if (this->has_experimental_debug_info()) { |
1189 | total_size += 1 + |
1190 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1191 | *experimental_debug_info_); |
1192 | } |
1193 | |
1194 | // .tensorflow.FullTypeDef experimental_type = 7; |
1195 | if (this->has_experimental_type()) { |
1196 | total_size += 1 + |
1197 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1198 | *experimental_type_); |
1199 | } |
1200 | |
1201 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1202 | SetCachedSize(cached_size); |
1203 | return total_size; |
1204 | } |
1205 | |
1206 | void NodeDef::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1207 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.NodeDef) |
1208 | GOOGLE_DCHECK_NE(&from, this); |
1209 | const NodeDef* source = |
1210 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<NodeDef>( |
1211 | &from); |
1212 | if (source == nullptr) { |
1213 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.NodeDef) |
1214 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1215 | } else { |
1216 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.NodeDef) |
1217 | MergeFrom(*source); |
1218 | } |
1219 | } |
1220 | |
1221 | void NodeDef::MergeFrom(const NodeDef& from) { |
1222 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.NodeDef) |
1223 | GOOGLE_DCHECK_NE(&from, this); |
1224 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1225 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1226 | (void) cached_has_bits; |
1227 | |
1228 | input_.MergeFrom(from.input_); |
1229 | attr_.MergeFrom(from.attr_); |
1230 | if (from.name().size() > 0) { |
1231 | set_name(from.name()); |
1232 | } |
1233 | if (from.op().size() > 0) { |
1234 | set_op(from.op()); |
1235 | } |
1236 | if (from.device().size() > 0) { |
1237 | set_device(from.device()); |
1238 | } |
1239 | if (from.has_experimental_debug_info()) { |
1240 | mutable_experimental_debug_info()->::tensorflow::NodeDef_ExperimentalDebugInfo::MergeFrom(from.experimental_debug_info()); |
1241 | } |
1242 | if (from.has_experimental_type()) { |
1243 | mutable_experimental_type()->::tensorflow::FullTypeDef::MergeFrom(from.experimental_type()); |
1244 | } |
1245 | } |
1246 | |
1247 | void NodeDef::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1248 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.NodeDef) |
1249 | if (&from == this) return; |
1250 | Clear(); |
1251 | MergeFrom(from); |
1252 | } |
1253 | |
1254 | void NodeDef::CopyFrom(const NodeDef& from) { |
1255 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.NodeDef) |
1256 | if (&from == this) return; |
1257 | Clear(); |
1258 | MergeFrom(from); |
1259 | } |
1260 | |
1261 | bool NodeDef::IsInitialized() const { |
1262 | return true; |
1263 | } |
1264 | |
1265 | void NodeDef::InternalSwap(NodeDef* other) { |
1266 | using std::swap; |
1267 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1268 | input_.InternalSwap(CastToBase(&other->input_)); |
1269 | attr_.Swap(&other->attr_); |
1270 | name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1271 | GetArenaNoVirtual()); |
1272 | op_.Swap(&other->op_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1273 | GetArenaNoVirtual()); |
1274 | device_.Swap(&other->device_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1275 | GetArenaNoVirtual()); |
1276 | swap(experimental_debug_info_, other->experimental_debug_info_); |
1277 | swap(experimental_type_, other->experimental_type_); |
1278 | } |
1279 | |
1280 | ::PROTOBUF_NAMESPACE_ID::Metadata NodeDef::GetMetadata() const { |
1281 | return GetMetadataStatic(); |
1282 | } |
1283 | |
1284 | |
1285 | // @@protoc_insertion_point(namespace_scope) |
1286 | } // namespace tensorflow |
1287 | PROTOBUF_NAMESPACE_OPEN |
1288 | template<> PROTOBUF_NOINLINE ::tensorflow::NodeDef_AttrEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::NodeDef_AttrEntry_DoNotUse >(Arena* arena) { |
1289 | return Arena::CreateMessageInternal< ::tensorflow::NodeDef_AttrEntry_DoNotUse >(arena); |
1290 | } |
1291 | template<> PROTOBUF_NOINLINE ::tensorflow::NodeDef_ExperimentalDebugInfo* Arena::CreateMaybeMessage< ::tensorflow::NodeDef_ExperimentalDebugInfo >(Arena* arena) { |
1292 | return Arena::CreateMessageInternal< ::tensorflow::NodeDef_ExperimentalDebugInfo >(arena); |
1293 | } |
1294 | template<> PROTOBUF_NOINLINE ::tensorflow::NodeDef* Arena::CreateMaybeMessage< ::tensorflow::NodeDef >(Arena* arena) { |
1295 | return Arena::CreateMessageInternal< ::tensorflow::NodeDef >(arena); |
1296 | } |
1297 | PROTOBUF_NAMESPACE_CLOSE |
1298 | |
1299 | // @@protoc_insertion_point(global_scope) |
1300 | #include <google/protobuf/port_undef.inc> |
1301 | |