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