1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/protobuf/tensorflow_server.proto |
3 | |
4 | #include "tensorflow/core/protobuf/tensorflow_server.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_2fprotobuf_2fcluster_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ClusterDef_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto; |
19 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ClusterDeviceFilters_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto; |
20 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<7> scc_info_ConfigProto_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto; |
21 | namespace tensorflow { |
22 | class ServerDefDefaultTypeInternal { |
23 | public: |
24 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ServerDef> _instance; |
25 | } _ServerDef_default_instance_; |
26 | } // namespace tensorflow |
27 | static void InitDefaultsscc_info_ServerDef_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto() { |
28 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
29 | |
30 | { |
31 | void* ptr = &::tensorflow::_ServerDef_default_instance_; |
32 | new (ptr) ::tensorflow::ServerDef(); |
33 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
34 | } |
35 | ::tensorflow::ServerDef::InitAsDefaultInstance(); |
36 | } |
37 | |
38 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_ServerDef_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto = |
39 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_ServerDef_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto}, { |
40 | &scc_info_ClusterDef_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto.base, |
41 | &scc_info_ConfigProto_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto.base, |
42 | &scc_info_ClusterDeviceFilters_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto.base,}}; |
43 | |
44 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto[1]; |
45 | static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto = nullptr; |
46 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto = nullptr; |
47 | |
48 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
49 | ~0u, // no _has_bits_ |
50 | PROTOBUF_FIELD_OFFSET(::tensorflow::ServerDef, _internal_metadata_), |
51 | ~0u, // no _extensions_ |
52 | ~0u, // no _oneof_case_ |
53 | ~0u, // no _weak_field_map_ |
54 | PROTOBUF_FIELD_OFFSET(::tensorflow::ServerDef, cluster_), |
55 | PROTOBUF_FIELD_OFFSET(::tensorflow::ServerDef, job_name_), |
56 | PROTOBUF_FIELD_OFFSET(::tensorflow::ServerDef, task_index_), |
57 | PROTOBUF_FIELD_OFFSET(::tensorflow::ServerDef, default_session_config_), |
58 | PROTOBUF_FIELD_OFFSET(::tensorflow::ServerDef, protocol_), |
59 | PROTOBUF_FIELD_OFFSET(::tensorflow::ServerDef, port_), |
60 | PROTOBUF_FIELD_OFFSET(::tensorflow::ServerDef, cluster_device_filters_), |
61 | }; |
62 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
63 | { 0, -1, sizeof(::tensorflow::ServerDef)}, |
64 | }; |
65 | |
66 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
67 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_ServerDef_default_instance_), |
68 | }; |
69 | |
70 | const char descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
71 | "\n0tensorflow/core/protobuf/tensorflow_se" |
72 | "rver.proto\022\ntensorflow\032&tensorflow/core/" |
73 | "protobuf/cluster.proto\032%tensorflow/core/" |
74 | "protobuf/config.proto\032-tensorflow/core/p" |
75 | "rotobuf/device_filters.proto\"\365\001\n\tServerD" |
76 | "ef\022\'\n\007cluster\030\001 \001(\0132\026.tensorflow.Cluster" |
77 | "Def\022\020\n\010job_name\030\002 \001(\t\022\022\n\ntask_index\030\003 \001(" |
78 | "\005\0227\n\026default_session_config\030\004 \001(\0132\027.tens" |
79 | "orflow.ConfigProto\022\020\n\010protocol\030\005 \001(\t\022\014\n\004" |
80 | "port\030\006 \001(\005\022@\n\026cluster_device_filters\030\007 \001" |
81 | "(\0132 .tensorflow.ClusterDeviceFiltersB\206\001\n" |
82 | "\032org.tensorflow.distruntimeB\014ServerProto" |
83 | "sP\001ZUgithub.com/tensorflow/tensorflow/te" |
84 | "nsorflow/go/core/protobuf/for_core_proto" |
85 | "s_go_proto\370\001\001b\006proto3" |
86 | ; |
87 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto_deps[3] = { |
88 | &::descriptor_table_tensorflow_2fcore_2fprotobuf_2fcluster_2eproto, |
89 | &::descriptor_table_tensorflow_2fcore_2fprotobuf_2fconfig_2eproto, |
90 | &::descriptor_table_tensorflow_2fcore_2fprotobuf_2fdevice_5ffilters_2eproto, |
91 | }; |
92 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto_sccs[1] = { |
93 | &scc_info_ServerDef_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto.base, |
94 | }; |
95 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto_once; |
96 | static bool descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto_initialized = false; |
97 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto = { |
98 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto, "tensorflow/core/protobuf/tensorflow_server.proto" , 581, |
99 | &descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto_once, descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto_deps, 1, 3, |
100 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto::offsets, |
101 | file_level_metadata_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto, 1, file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto, |
102 | }; |
103 | |
104 | // Force running AddDescriptors() at dynamic initialization time. |
105 | static bool dynamic_init_dummy_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto), true); |
106 | namespace tensorflow { |
107 | |
108 | // =================================================================== |
109 | |
110 | void ServerDef::InitAsDefaultInstance() { |
111 | ::tensorflow::_ServerDef_default_instance_._instance.get_mutable()->cluster_ = const_cast< ::tensorflow::ClusterDef*>( |
112 | ::tensorflow::ClusterDef::internal_default_instance()); |
113 | ::tensorflow::_ServerDef_default_instance_._instance.get_mutable()->default_session_config_ = const_cast< ::tensorflow::ConfigProto*>( |
114 | ::tensorflow::ConfigProto::internal_default_instance()); |
115 | ::tensorflow::_ServerDef_default_instance_._instance.get_mutable()->cluster_device_filters_ = const_cast< ::tensorflow::ClusterDeviceFilters*>( |
116 | ::tensorflow::ClusterDeviceFilters::internal_default_instance()); |
117 | } |
118 | class ServerDef::_Internal { |
119 | public: |
120 | static const ::tensorflow::ClusterDef& cluster(const ServerDef* msg); |
121 | static const ::tensorflow::ConfigProto& default_session_config(const ServerDef* msg); |
122 | static const ::tensorflow::ClusterDeviceFilters& cluster_device_filters(const ServerDef* msg); |
123 | }; |
124 | |
125 | const ::tensorflow::ClusterDef& |
126 | ServerDef::_Internal::cluster(const ServerDef* msg) { |
127 | return *msg->cluster_; |
128 | } |
129 | const ::tensorflow::ConfigProto& |
130 | ServerDef::_Internal::default_session_config(const ServerDef* msg) { |
131 | return *msg->default_session_config_; |
132 | } |
133 | const ::tensorflow::ClusterDeviceFilters& |
134 | ServerDef::_Internal::cluster_device_filters(const ServerDef* msg) { |
135 | return *msg->cluster_device_filters_; |
136 | } |
137 | void ServerDef::unsafe_arena_set_allocated_cluster( |
138 | ::tensorflow::ClusterDef* cluster) { |
139 | if (GetArenaNoVirtual() == nullptr) { |
140 | delete cluster_; |
141 | } |
142 | cluster_ = cluster; |
143 | if (cluster) { |
144 | |
145 | } else { |
146 | |
147 | } |
148 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ServerDef.cluster) |
149 | } |
150 | void ServerDef::clear_cluster() { |
151 | if (GetArenaNoVirtual() == nullptr && cluster_ != nullptr) { |
152 | delete cluster_; |
153 | } |
154 | cluster_ = nullptr; |
155 | } |
156 | void ServerDef::unsafe_arena_set_allocated_default_session_config( |
157 | ::tensorflow::ConfigProto* default_session_config) { |
158 | if (GetArenaNoVirtual() == nullptr) { |
159 | delete default_session_config_; |
160 | } |
161 | default_session_config_ = default_session_config; |
162 | if (default_session_config) { |
163 | |
164 | } else { |
165 | |
166 | } |
167 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ServerDef.default_session_config) |
168 | } |
169 | void ServerDef::clear_default_session_config() { |
170 | if (GetArenaNoVirtual() == nullptr && default_session_config_ != nullptr) { |
171 | delete default_session_config_; |
172 | } |
173 | default_session_config_ = nullptr; |
174 | } |
175 | void ServerDef::unsafe_arena_set_allocated_cluster_device_filters( |
176 | ::tensorflow::ClusterDeviceFilters* cluster_device_filters) { |
177 | if (GetArenaNoVirtual() == nullptr) { |
178 | delete cluster_device_filters_; |
179 | } |
180 | cluster_device_filters_ = cluster_device_filters; |
181 | if (cluster_device_filters) { |
182 | |
183 | } else { |
184 | |
185 | } |
186 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ServerDef.cluster_device_filters) |
187 | } |
188 | void ServerDef::clear_cluster_device_filters() { |
189 | if (GetArenaNoVirtual() == nullptr && cluster_device_filters_ != nullptr) { |
190 | delete cluster_device_filters_; |
191 | } |
192 | cluster_device_filters_ = nullptr; |
193 | } |
194 | ServerDef::ServerDef() |
195 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
196 | SharedCtor(); |
197 | // @@protoc_insertion_point(constructor:tensorflow.ServerDef) |
198 | } |
199 | ServerDef::ServerDef(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
200 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
201 | _internal_metadata_(arena) { |
202 | SharedCtor(); |
203 | RegisterArenaDtor(arena); |
204 | // @@protoc_insertion_point(arena_constructor:tensorflow.ServerDef) |
205 | } |
206 | ServerDef::ServerDef(const ServerDef& from) |
207 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
208 | _internal_metadata_(nullptr) { |
209 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
210 | job_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
211 | if (!from.job_name().empty()) { |
212 | job_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.job_name(), |
213 | GetArenaNoVirtual()); |
214 | } |
215 | protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
216 | if (!from.protocol().empty()) { |
217 | protocol_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.protocol(), |
218 | GetArenaNoVirtual()); |
219 | } |
220 | if (from.has_cluster()) { |
221 | cluster_ = new ::tensorflow::ClusterDef(*from.cluster_); |
222 | } else { |
223 | cluster_ = nullptr; |
224 | } |
225 | if (from.has_default_session_config()) { |
226 | default_session_config_ = new ::tensorflow::ConfigProto(*from.default_session_config_); |
227 | } else { |
228 | default_session_config_ = nullptr; |
229 | } |
230 | if (from.has_cluster_device_filters()) { |
231 | cluster_device_filters_ = new ::tensorflow::ClusterDeviceFilters(*from.cluster_device_filters_); |
232 | } else { |
233 | cluster_device_filters_ = nullptr; |
234 | } |
235 | ::memcpy(&task_index_, &from.task_index_, |
236 | static_cast<size_t>(reinterpret_cast<char*>(&port_) - |
237 | reinterpret_cast<char*>(&task_index_)) + sizeof(port_)); |
238 | // @@protoc_insertion_point(copy_constructor:tensorflow.ServerDef) |
239 | } |
240 | |
241 | void ServerDef::SharedCtor() { |
242 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ServerDef_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto.base); |
243 | job_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
244 | protocol_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
245 | ::memset(&cluster_, 0, static_cast<size_t>( |
246 | reinterpret_cast<char*>(&port_) - |
247 | reinterpret_cast<char*>(&cluster_)) + sizeof(port_)); |
248 | } |
249 | |
250 | ServerDef::~ServerDef() { |
251 | // @@protoc_insertion_point(destructor:tensorflow.ServerDef) |
252 | SharedDtor(); |
253 | } |
254 | |
255 | void ServerDef::SharedDtor() { |
256 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
257 | job_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
258 | protocol_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
259 | if (this != internal_default_instance()) delete cluster_; |
260 | if (this != internal_default_instance()) delete default_session_config_; |
261 | if (this != internal_default_instance()) delete cluster_device_filters_; |
262 | } |
263 | |
264 | void ServerDef::ArenaDtor(void* object) { |
265 | ServerDef* _this = reinterpret_cast< ServerDef* >(object); |
266 | (void)_this; |
267 | } |
268 | void ServerDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
269 | } |
270 | void ServerDef::SetCachedSize(int size) const { |
271 | _cached_size_.Set(size); |
272 | } |
273 | const ServerDef& ServerDef::default_instance() { |
274 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ServerDef_tensorflow_2fcore_2fprotobuf_2ftensorflow_5fserver_2eproto.base); |
275 | return *internal_default_instance(); |
276 | } |
277 | |
278 | |
279 | void ServerDef::Clear() { |
280 | // @@protoc_insertion_point(message_clear_start:tensorflow.ServerDef) |
281 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
282 | // Prevent compiler warnings about cached_has_bits being unused |
283 | (void) cached_has_bits; |
284 | |
285 | job_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
286 | protocol_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
287 | if (GetArenaNoVirtual() == nullptr && cluster_ != nullptr) { |
288 | delete cluster_; |
289 | } |
290 | cluster_ = nullptr; |
291 | if (GetArenaNoVirtual() == nullptr && default_session_config_ != nullptr) { |
292 | delete default_session_config_; |
293 | } |
294 | default_session_config_ = nullptr; |
295 | if (GetArenaNoVirtual() == nullptr && cluster_device_filters_ != nullptr) { |
296 | delete cluster_device_filters_; |
297 | } |
298 | cluster_device_filters_ = nullptr; |
299 | ::memset(&task_index_, 0, static_cast<size_t>( |
300 | reinterpret_cast<char*>(&port_) - |
301 | reinterpret_cast<char*>(&task_index_)) + sizeof(port_)); |
302 | _internal_metadata_.Clear(); |
303 | } |
304 | |
305 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
306 | const char* ServerDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
307 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
308 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
309 | while (!ctx->Done(&ptr)) { |
310 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
311 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
312 | CHK_(ptr); |
313 | switch (tag >> 3) { |
314 | // .tensorflow.ClusterDef cluster = 1; |
315 | case 1: |
316 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
317 | ptr = ctx->ParseMessage(mutable_cluster(), ptr); |
318 | CHK_(ptr); |
319 | } else goto handle_unusual; |
320 | continue; |
321 | // string job_name = 2; |
322 | case 2: |
323 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
324 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_job_name(), ptr, ctx, "tensorflow.ServerDef.job_name" ); |
325 | CHK_(ptr); |
326 | } else goto handle_unusual; |
327 | continue; |
328 | // int32 task_index = 3; |
329 | case 3: |
330 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
331 | task_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
332 | CHK_(ptr); |
333 | } else goto handle_unusual; |
334 | continue; |
335 | // .tensorflow.ConfigProto default_session_config = 4; |
336 | case 4: |
337 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
338 | ptr = ctx->ParseMessage(mutable_default_session_config(), ptr); |
339 | CHK_(ptr); |
340 | } else goto handle_unusual; |
341 | continue; |
342 | // string protocol = 5; |
343 | case 5: |
344 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
345 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_protocol(), ptr, ctx, "tensorflow.ServerDef.protocol" ); |
346 | CHK_(ptr); |
347 | } else goto handle_unusual; |
348 | continue; |
349 | // int32 port = 6; |
350 | case 6: |
351 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { |
352 | port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
353 | CHK_(ptr); |
354 | } else goto handle_unusual; |
355 | continue; |
356 | // .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; |
357 | case 7: |
358 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
359 | ptr = ctx->ParseMessage(mutable_cluster_device_filters(), ptr); |
360 | CHK_(ptr); |
361 | } else goto handle_unusual; |
362 | continue; |
363 | default: { |
364 | handle_unusual: |
365 | if ((tag & 7) == 4 || tag == 0) { |
366 | ctx->SetLastTag(tag); |
367 | goto success; |
368 | } |
369 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
370 | CHK_(ptr != nullptr); |
371 | continue; |
372 | } |
373 | } // switch |
374 | } // while |
375 | success: |
376 | return ptr; |
377 | failure: |
378 | ptr = nullptr; |
379 | goto success; |
380 | #undef CHK_ |
381 | } |
382 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
383 | bool ServerDef::MergePartialFromCodedStream( |
384 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
385 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
386 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
387 | // @@protoc_insertion_point(parse_start:tensorflow.ServerDef) |
388 | for (;;) { |
389 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
390 | tag = p.first; |
391 | if (!p.second) goto handle_unusual; |
392 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
393 | // .tensorflow.ClusterDef cluster = 1; |
394 | case 1: { |
395 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
396 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
397 | input, mutable_cluster())); |
398 | } else { |
399 | goto handle_unusual; |
400 | } |
401 | break; |
402 | } |
403 | |
404 | // string job_name = 2; |
405 | case 2: { |
406 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
407 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
408 | input, this->mutable_job_name())); |
409 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
410 | this->job_name().data(), static_cast<int>(this->job_name().length()), |
411 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
412 | "tensorflow.ServerDef.job_name" )); |
413 | } else { |
414 | goto handle_unusual; |
415 | } |
416 | break; |
417 | } |
418 | |
419 | // int32 task_index = 3; |
420 | case 3: { |
421 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
422 | |
423 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
424 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
425 | input, &task_index_))); |
426 | } else { |
427 | goto handle_unusual; |
428 | } |
429 | break; |
430 | } |
431 | |
432 | // .tensorflow.ConfigProto default_session_config = 4; |
433 | case 4: { |
434 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
435 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
436 | input, mutable_default_session_config())); |
437 | } else { |
438 | goto handle_unusual; |
439 | } |
440 | break; |
441 | } |
442 | |
443 | // string protocol = 5; |
444 | case 5: { |
445 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
446 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
447 | input, this->mutable_protocol())); |
448 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
449 | this->protocol().data(), static_cast<int>(this->protocol().length()), |
450 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
451 | "tensorflow.ServerDef.protocol" )); |
452 | } else { |
453 | goto handle_unusual; |
454 | } |
455 | break; |
456 | } |
457 | |
458 | // int32 port = 6; |
459 | case 6: { |
460 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { |
461 | |
462 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
463 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
464 | input, &port_))); |
465 | } else { |
466 | goto handle_unusual; |
467 | } |
468 | break; |
469 | } |
470 | |
471 | // .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; |
472 | case 7: { |
473 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
474 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
475 | input, mutable_cluster_device_filters())); |
476 | } else { |
477 | goto handle_unusual; |
478 | } |
479 | break; |
480 | } |
481 | |
482 | default: { |
483 | handle_unusual: |
484 | if (tag == 0) { |
485 | goto success; |
486 | } |
487 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
488 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
489 | break; |
490 | } |
491 | } |
492 | } |
493 | success: |
494 | // @@protoc_insertion_point(parse_success:tensorflow.ServerDef) |
495 | return true; |
496 | failure: |
497 | // @@protoc_insertion_point(parse_failure:tensorflow.ServerDef) |
498 | return false; |
499 | #undef DO_ |
500 | } |
501 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
502 | |
503 | void ServerDef::SerializeWithCachedSizes( |
504 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
505 | // @@protoc_insertion_point(serialize_start:tensorflow.ServerDef) |
506 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
507 | (void) cached_has_bits; |
508 | |
509 | // .tensorflow.ClusterDef cluster = 1; |
510 | if (this->has_cluster()) { |
511 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
512 | 1, _Internal::cluster(this), output); |
513 | } |
514 | |
515 | // string job_name = 2; |
516 | if (this->job_name().size() > 0) { |
517 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
518 | this->job_name().data(), static_cast<int>(this->job_name().length()), |
519 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
520 | "tensorflow.ServerDef.job_name" ); |
521 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
522 | 2, this->job_name(), output); |
523 | } |
524 | |
525 | // int32 task_index = 3; |
526 | if (this->task_index() != 0) { |
527 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->task_index(), output); |
528 | } |
529 | |
530 | // .tensorflow.ConfigProto default_session_config = 4; |
531 | if (this->has_default_session_config()) { |
532 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
533 | 4, _Internal::default_session_config(this), output); |
534 | } |
535 | |
536 | // string protocol = 5; |
537 | if (this->protocol().size() > 0) { |
538 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
539 | this->protocol().data(), static_cast<int>(this->protocol().length()), |
540 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
541 | "tensorflow.ServerDef.protocol" ); |
542 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
543 | 5, this->protocol(), output); |
544 | } |
545 | |
546 | // int32 port = 6; |
547 | if (this->port() != 0) { |
548 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(6, this->port(), output); |
549 | } |
550 | |
551 | // .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; |
552 | if (this->has_cluster_device_filters()) { |
553 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
554 | 7, _Internal::cluster_device_filters(this), output); |
555 | } |
556 | |
557 | if (_internal_metadata_.have_unknown_fields()) { |
558 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
559 | _internal_metadata_.unknown_fields(), output); |
560 | } |
561 | // @@protoc_insertion_point(serialize_end:tensorflow.ServerDef) |
562 | } |
563 | |
564 | ::PROTOBUF_NAMESPACE_ID::uint8* ServerDef::InternalSerializeWithCachedSizesToArray( |
565 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
566 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ServerDef) |
567 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
568 | (void) cached_has_bits; |
569 | |
570 | // .tensorflow.ClusterDef cluster = 1; |
571 | if (this->has_cluster()) { |
572 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
573 | InternalWriteMessageToArray( |
574 | 1, _Internal::cluster(this), target); |
575 | } |
576 | |
577 | // string job_name = 2; |
578 | if (this->job_name().size() > 0) { |
579 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
580 | this->job_name().data(), static_cast<int>(this->job_name().length()), |
581 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
582 | "tensorflow.ServerDef.job_name" ); |
583 | target = |
584 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
585 | 2, this->job_name(), target); |
586 | } |
587 | |
588 | // int32 task_index = 3; |
589 | if (this->task_index() != 0) { |
590 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->task_index(), target); |
591 | } |
592 | |
593 | // .tensorflow.ConfigProto default_session_config = 4; |
594 | if (this->has_default_session_config()) { |
595 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
596 | InternalWriteMessageToArray( |
597 | 4, _Internal::default_session_config(this), target); |
598 | } |
599 | |
600 | // string protocol = 5; |
601 | if (this->protocol().size() > 0) { |
602 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
603 | this->protocol().data(), static_cast<int>(this->protocol().length()), |
604 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
605 | "tensorflow.ServerDef.protocol" ); |
606 | target = |
607 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
608 | 5, this->protocol(), target); |
609 | } |
610 | |
611 | // int32 port = 6; |
612 | if (this->port() != 0) { |
613 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->port(), target); |
614 | } |
615 | |
616 | // .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; |
617 | if (this->has_cluster_device_filters()) { |
618 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
619 | InternalWriteMessageToArray( |
620 | 7, _Internal::cluster_device_filters(this), target); |
621 | } |
622 | |
623 | if (_internal_metadata_.have_unknown_fields()) { |
624 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
625 | _internal_metadata_.unknown_fields(), target); |
626 | } |
627 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ServerDef) |
628 | return target; |
629 | } |
630 | |
631 | size_t ServerDef::ByteSizeLong() const { |
632 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.ServerDef) |
633 | size_t total_size = 0; |
634 | |
635 | if (_internal_metadata_.have_unknown_fields()) { |
636 | total_size += |
637 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
638 | _internal_metadata_.unknown_fields()); |
639 | } |
640 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
641 | // Prevent compiler warnings about cached_has_bits being unused |
642 | (void) cached_has_bits; |
643 | |
644 | // string job_name = 2; |
645 | if (this->job_name().size() > 0) { |
646 | total_size += 1 + |
647 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
648 | this->job_name()); |
649 | } |
650 | |
651 | // string protocol = 5; |
652 | if (this->protocol().size() > 0) { |
653 | total_size += 1 + |
654 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
655 | this->protocol()); |
656 | } |
657 | |
658 | // .tensorflow.ClusterDef cluster = 1; |
659 | if (this->has_cluster()) { |
660 | total_size += 1 + |
661 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
662 | *cluster_); |
663 | } |
664 | |
665 | // .tensorflow.ConfigProto default_session_config = 4; |
666 | if (this->has_default_session_config()) { |
667 | total_size += 1 + |
668 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
669 | *default_session_config_); |
670 | } |
671 | |
672 | // .tensorflow.ClusterDeviceFilters cluster_device_filters = 7; |
673 | if (this->has_cluster_device_filters()) { |
674 | total_size += 1 + |
675 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
676 | *cluster_device_filters_); |
677 | } |
678 | |
679 | // int32 task_index = 3; |
680 | if (this->task_index() != 0) { |
681 | total_size += 1 + |
682 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
683 | this->task_index()); |
684 | } |
685 | |
686 | // int32 port = 6; |
687 | if (this->port() != 0) { |
688 | total_size += 1 + |
689 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
690 | this->port()); |
691 | } |
692 | |
693 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
694 | SetCachedSize(cached_size); |
695 | return total_size; |
696 | } |
697 | |
698 | void ServerDef::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
699 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ServerDef) |
700 | GOOGLE_DCHECK_NE(&from, this); |
701 | const ServerDef* source = |
702 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ServerDef>( |
703 | &from); |
704 | if (source == nullptr) { |
705 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ServerDef) |
706 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
707 | } else { |
708 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ServerDef) |
709 | MergeFrom(*source); |
710 | } |
711 | } |
712 | |
713 | void ServerDef::MergeFrom(const ServerDef& from) { |
714 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ServerDef) |
715 | GOOGLE_DCHECK_NE(&from, this); |
716 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
717 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
718 | (void) cached_has_bits; |
719 | |
720 | if (from.job_name().size() > 0) { |
721 | set_job_name(from.job_name()); |
722 | } |
723 | if (from.protocol().size() > 0) { |
724 | set_protocol(from.protocol()); |
725 | } |
726 | if (from.has_cluster()) { |
727 | mutable_cluster()->::tensorflow::ClusterDef::MergeFrom(from.cluster()); |
728 | } |
729 | if (from.has_default_session_config()) { |
730 | mutable_default_session_config()->::tensorflow::ConfigProto::MergeFrom(from.default_session_config()); |
731 | } |
732 | if (from.has_cluster_device_filters()) { |
733 | mutable_cluster_device_filters()->::tensorflow::ClusterDeviceFilters::MergeFrom(from.cluster_device_filters()); |
734 | } |
735 | if (from.task_index() != 0) { |
736 | set_task_index(from.task_index()); |
737 | } |
738 | if (from.port() != 0) { |
739 | set_port(from.port()); |
740 | } |
741 | } |
742 | |
743 | void ServerDef::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
744 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ServerDef) |
745 | if (&from == this) return; |
746 | Clear(); |
747 | MergeFrom(from); |
748 | } |
749 | |
750 | void ServerDef::CopyFrom(const ServerDef& from) { |
751 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ServerDef) |
752 | if (&from == this) return; |
753 | Clear(); |
754 | MergeFrom(from); |
755 | } |
756 | |
757 | bool ServerDef::IsInitialized() const { |
758 | return true; |
759 | } |
760 | |
761 | void ServerDef::InternalSwap(ServerDef* other) { |
762 | using std::swap; |
763 | _internal_metadata_.Swap(&other->_internal_metadata_); |
764 | job_name_.Swap(&other->job_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
765 | GetArenaNoVirtual()); |
766 | protocol_.Swap(&other->protocol_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
767 | GetArenaNoVirtual()); |
768 | swap(cluster_, other->cluster_); |
769 | swap(default_session_config_, other->default_session_config_); |
770 | swap(cluster_device_filters_, other->cluster_device_filters_); |
771 | swap(task_index_, other->task_index_); |
772 | swap(port_, other->port_); |
773 | } |
774 | |
775 | ::PROTOBUF_NAMESPACE_ID::Metadata ServerDef::GetMetadata() const { |
776 | return GetMetadataStatic(); |
777 | } |
778 | |
779 | |
780 | // @@protoc_insertion_point(namespace_scope) |
781 | } // namespace tensorflow |
782 | PROTOBUF_NAMESPACE_OPEN |
783 | template<> PROTOBUF_NOINLINE ::tensorflow::ServerDef* Arena::CreateMaybeMessage< ::tensorflow::ServerDef >(Arena* arena) { |
784 | return Arena::CreateMessageInternal< ::tensorflow::ServerDef >(arena); |
785 | } |
786 | PROTOBUF_NAMESPACE_CLOSE |
787 | |
788 | // @@protoc_insertion_point(global_scope) |
789 | #include <google/protobuf/port_undef.inc> |
790 | |