1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: tensorflow/compiler/xla/pjrt/distributed/protocol.proto
3
4 #include "tensorflow/compiler/xla/pjrt/distributed/protocol.pb.h"
5
6 #include <algorithm>
7 #include <cstdint>
8
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15
16 PROTOBUF_PRAGMA_INIT_SEG
17
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20
21 namespace xla {
DeviceProto(::_pbi::ConstantInitialized)22 PROTOBUF_CONSTEXPR DeviceProto::DeviceProto(
23 ::_pbi::ConstantInitialized): _impl_{
24 /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
25 , /*decltype(_impl_.vendor_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
26 , /*decltype(_impl_.local_device_ordinal_)*/0
27 , /*decltype(_impl_.global_device_id_)*/0
28 , /*decltype(_impl_._cached_size_)*/{}} {}
29 struct DeviceProtoDefaultTypeInternal {
DeviceProtoDefaultTypeInternalxla::DeviceProtoDefaultTypeInternal30 PROTOBUF_CONSTEXPR DeviceProtoDefaultTypeInternal()
31 : _instance(::_pbi::ConstantInitialized{}) {}
~DeviceProtoDefaultTypeInternalxla::DeviceProtoDefaultTypeInternal32 ~DeviceProtoDefaultTypeInternal() {}
33 union { // NOLINT(misc-non-private-member-variables-in-classes)
34 DeviceProto _instance;
35 };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceProtoDefaultTypeInternal _DeviceProto_default_instance_;
LocalTopologyProto(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR LocalTopologyProto::LocalTopologyProto(
39 ::_pbi::ConstantInitialized): _impl_{
40 /*decltype(_impl_.devices_)*/{}
41 , /*decltype(_impl_.node_id_)*/0
42 , /*decltype(_impl_._cached_size_)*/{}} {}
43 struct LocalTopologyProtoDefaultTypeInternal {
LocalTopologyProtoDefaultTypeInternalxla::LocalTopologyProtoDefaultTypeInternal44 PROTOBUF_CONSTEXPR LocalTopologyProtoDefaultTypeInternal()
45 : _instance(::_pbi::ConstantInitialized{}) {}
~LocalTopologyProtoDefaultTypeInternalxla::LocalTopologyProtoDefaultTypeInternal46 ~LocalTopologyProtoDefaultTypeInternal() {}
47 union { // NOLINT(misc-non-private-member-variables-in-classes)
48 LocalTopologyProto _instance;
49 };
50 };
51 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LocalTopologyProtoDefaultTypeInternal _LocalTopologyProto_default_instance_;
GlobalTopologyProto(::_pbi::ConstantInitialized)52 PROTOBUF_CONSTEXPR GlobalTopologyProto::GlobalTopologyProto(
53 ::_pbi::ConstantInitialized): _impl_{
54 /*decltype(_impl_.nodes_)*/{}
55 , /*decltype(_impl_._cached_size_)*/{}} {}
56 struct GlobalTopologyProtoDefaultTypeInternal {
GlobalTopologyProtoDefaultTypeInternalxla::GlobalTopologyProtoDefaultTypeInternal57 PROTOBUF_CONSTEXPR GlobalTopologyProtoDefaultTypeInternal()
58 : _instance(::_pbi::ConstantInitialized{}) {}
~GlobalTopologyProtoDefaultTypeInternalxla::GlobalTopologyProtoDefaultTypeInternal59 ~GlobalTopologyProtoDefaultTypeInternal() {}
60 union { // NOLINT(misc-non-private-member-variables-in-classes)
61 GlobalTopologyProto _instance;
62 };
63 };
64 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GlobalTopologyProtoDefaultTypeInternal _GlobalTopologyProto_default_instance_;
ConnectRequest(::_pbi::ConstantInitialized)65 PROTOBUF_CONSTEXPR ConnectRequest::ConnectRequest(
66 ::_pbi::ConstantInitialized): _impl_{
67 /*decltype(_impl_.protocol_version_)*/0
68 , /*decltype(_impl_.timeout_milliseconds_)*/0
69 , /*decltype(_impl_.client_id_)*/::uint64_t{0u}
70 , /*decltype(_impl_.node_id_)*/0
71 , /*decltype(_impl_._cached_size_)*/{}} {}
72 struct ConnectRequestDefaultTypeInternal {
ConnectRequestDefaultTypeInternalxla::ConnectRequestDefaultTypeInternal73 PROTOBUF_CONSTEXPR ConnectRequestDefaultTypeInternal()
74 : _instance(::_pbi::ConstantInitialized{}) {}
~ConnectRequestDefaultTypeInternalxla::ConnectRequestDefaultTypeInternal75 ~ConnectRequestDefaultTypeInternal() {}
76 union { // NOLINT(misc-non-private-member-variables-in-classes)
77 ConnectRequest _instance;
78 };
79 };
80 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConnectRequestDefaultTypeInternal _ConnectRequest_default_instance_;
ConnectResponse(::_pbi::ConstantInitialized)81 PROTOBUF_CONSTEXPR ConnectResponse::ConnectResponse(
82 ::_pbi::ConstantInitialized): _impl_{
83 /*decltype(_impl_.session_id_)*/::uint64_t{0u}
84 , /*decltype(_impl_._cached_size_)*/{}} {}
85 struct ConnectResponseDefaultTypeInternal {
ConnectResponseDefaultTypeInternalxla::ConnectResponseDefaultTypeInternal86 PROTOBUF_CONSTEXPR ConnectResponseDefaultTypeInternal()
87 : _instance(::_pbi::ConstantInitialized{}) {}
~ConnectResponseDefaultTypeInternalxla::ConnectResponseDefaultTypeInternal88 ~ConnectResponseDefaultTypeInternal() {}
89 union { // NOLINT(misc-non-private-member-variables-in-classes)
90 ConnectResponse _instance;
91 };
92 };
93 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConnectResponseDefaultTypeInternal _ConnectResponse_default_instance_;
EnumerateDevicesRequest(::_pbi::ConstantInitialized)94 PROTOBUF_CONSTEXPR EnumerateDevicesRequest::EnumerateDevicesRequest(
95 ::_pbi::ConstantInitialized): _impl_{
96 /*decltype(_impl_.local_topology_)*/nullptr
97 , /*decltype(_impl_.session_id_)*/::uint64_t{0u}
98 , /*decltype(_impl_._cached_size_)*/{}} {}
99 struct EnumerateDevicesRequestDefaultTypeInternal {
EnumerateDevicesRequestDefaultTypeInternalxla::EnumerateDevicesRequestDefaultTypeInternal100 PROTOBUF_CONSTEXPR EnumerateDevicesRequestDefaultTypeInternal()
101 : _instance(::_pbi::ConstantInitialized{}) {}
~EnumerateDevicesRequestDefaultTypeInternalxla::EnumerateDevicesRequestDefaultTypeInternal102 ~EnumerateDevicesRequestDefaultTypeInternal() {}
103 union { // NOLINT(misc-non-private-member-variables-in-classes)
104 EnumerateDevicesRequest _instance;
105 };
106 };
107 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumerateDevicesRequestDefaultTypeInternal _EnumerateDevicesRequest_default_instance_;
EnumerateDevicesResponse(::_pbi::ConstantInitialized)108 PROTOBUF_CONSTEXPR EnumerateDevicesResponse::EnumerateDevicesResponse(
109 ::_pbi::ConstantInitialized): _impl_{
110 /*decltype(_impl_.global_topology_)*/nullptr
111 , /*decltype(_impl_._cached_size_)*/{}} {}
112 struct EnumerateDevicesResponseDefaultTypeInternal {
EnumerateDevicesResponseDefaultTypeInternalxla::EnumerateDevicesResponseDefaultTypeInternal113 PROTOBUF_CONSTEXPR EnumerateDevicesResponseDefaultTypeInternal()
114 : _instance(::_pbi::ConstantInitialized{}) {}
~EnumerateDevicesResponseDefaultTypeInternalxla::EnumerateDevicesResponseDefaultTypeInternal115 ~EnumerateDevicesResponseDefaultTypeInternal() {}
116 union { // NOLINT(misc-non-private-member-variables-in-classes)
117 EnumerateDevicesResponse _instance;
118 };
119 };
120 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EnumerateDevicesResponseDefaultTypeInternal _EnumerateDevicesResponse_default_instance_;
KeyValueGetRequest(::_pbi::ConstantInitialized)121 PROTOBUF_CONSTEXPR KeyValueGetRequest::KeyValueGetRequest(
122 ::_pbi::ConstantInitialized): _impl_{
123 /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
124 , /*decltype(_impl_.session_id_)*/::uint64_t{0u}
125 , /*decltype(_impl_.timeout_milliseconds_)*/0
126 , /*decltype(_impl_._cached_size_)*/{}} {}
127 struct KeyValueGetRequestDefaultTypeInternal {
KeyValueGetRequestDefaultTypeInternalxla::KeyValueGetRequestDefaultTypeInternal128 PROTOBUF_CONSTEXPR KeyValueGetRequestDefaultTypeInternal()
129 : _instance(::_pbi::ConstantInitialized{}) {}
~KeyValueGetRequestDefaultTypeInternalxla::KeyValueGetRequestDefaultTypeInternal130 ~KeyValueGetRequestDefaultTypeInternal() {}
131 union { // NOLINT(misc-non-private-member-variables-in-classes)
132 KeyValueGetRequest _instance;
133 };
134 };
135 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyValueGetRequestDefaultTypeInternal _KeyValueGetRequest_default_instance_;
KeyValueGetResponse(::_pbi::ConstantInitialized)136 PROTOBUF_CONSTEXPR KeyValueGetResponse::KeyValueGetResponse(
137 ::_pbi::ConstantInitialized): _impl_{
138 /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
139 , /*decltype(_impl_.found_)*/false
140 , /*decltype(_impl_._cached_size_)*/{}} {}
141 struct KeyValueGetResponseDefaultTypeInternal {
KeyValueGetResponseDefaultTypeInternalxla::KeyValueGetResponseDefaultTypeInternal142 PROTOBUF_CONSTEXPR KeyValueGetResponseDefaultTypeInternal()
143 : _instance(::_pbi::ConstantInitialized{}) {}
~KeyValueGetResponseDefaultTypeInternalxla::KeyValueGetResponseDefaultTypeInternal144 ~KeyValueGetResponseDefaultTypeInternal() {}
145 union { // NOLINT(misc-non-private-member-variables-in-classes)
146 KeyValueGetResponse _instance;
147 };
148 };
149 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyValueGetResponseDefaultTypeInternal _KeyValueGetResponse_default_instance_;
KeyValueSetRequest(::_pbi::ConstantInitialized)150 PROTOBUF_CONSTEXPR KeyValueSetRequest::KeyValueSetRequest(
151 ::_pbi::ConstantInitialized): _impl_{
152 /*decltype(_impl_.key_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
153 , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
154 , /*decltype(_impl_.session_id_)*/::uint64_t{0u}
155 , /*decltype(_impl_._cached_size_)*/{}} {}
156 struct KeyValueSetRequestDefaultTypeInternal {
KeyValueSetRequestDefaultTypeInternalxla::KeyValueSetRequestDefaultTypeInternal157 PROTOBUF_CONSTEXPR KeyValueSetRequestDefaultTypeInternal()
158 : _instance(::_pbi::ConstantInitialized{}) {}
~KeyValueSetRequestDefaultTypeInternalxla::KeyValueSetRequestDefaultTypeInternal159 ~KeyValueSetRequestDefaultTypeInternal() {}
160 union { // NOLINT(misc-non-private-member-variables-in-classes)
161 KeyValueSetRequest _instance;
162 };
163 };
164 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyValueSetRequestDefaultTypeInternal _KeyValueSetRequest_default_instance_;
KeyValueSetResponse(::_pbi::ConstantInitialized)165 PROTOBUF_CONSTEXPR KeyValueSetResponse::KeyValueSetResponse(
166 ::_pbi::ConstantInitialized): _impl_{
167 /*decltype(_impl_._cached_size_)*/{}} {}
168 struct KeyValueSetResponseDefaultTypeInternal {
KeyValueSetResponseDefaultTypeInternalxla::KeyValueSetResponseDefaultTypeInternal169 PROTOBUF_CONSTEXPR KeyValueSetResponseDefaultTypeInternal()
170 : _instance(::_pbi::ConstantInitialized{}) {}
~KeyValueSetResponseDefaultTypeInternalxla::KeyValueSetResponseDefaultTypeInternal171 ~KeyValueSetResponseDefaultTypeInternal() {}
172 union { // NOLINT(misc-non-private-member-variables-in-classes)
173 KeyValueSetResponse _instance;
174 };
175 };
176 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 KeyValueSetResponseDefaultTypeInternal _KeyValueSetResponse_default_instance_;
WaitAtBarrierRequest(::_pbi::ConstantInitialized)177 PROTOBUF_CONSTEXPR WaitAtBarrierRequest::WaitAtBarrierRequest(
178 ::_pbi::ConstantInitialized): _impl_{
179 /*decltype(_impl_.barrier_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
180 , /*decltype(_impl_.session_id_)*/::uint64_t{0u}
181 , /*decltype(_impl_.node_id_)*/0
182 , /*decltype(_impl_.timeout_milliseconds_)*/0
183 , /*decltype(_impl_._cached_size_)*/{}} {}
184 struct WaitAtBarrierRequestDefaultTypeInternal {
WaitAtBarrierRequestDefaultTypeInternalxla::WaitAtBarrierRequestDefaultTypeInternal185 PROTOBUF_CONSTEXPR WaitAtBarrierRequestDefaultTypeInternal()
186 : _instance(::_pbi::ConstantInitialized{}) {}
~WaitAtBarrierRequestDefaultTypeInternalxla::WaitAtBarrierRequestDefaultTypeInternal187 ~WaitAtBarrierRequestDefaultTypeInternal() {}
188 union { // NOLINT(misc-non-private-member-variables-in-classes)
189 WaitAtBarrierRequest _instance;
190 };
191 };
192 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WaitAtBarrierRequestDefaultTypeInternal _WaitAtBarrierRequest_default_instance_;
WaitAtBarrierResponse(::_pbi::ConstantInitialized)193 PROTOBUF_CONSTEXPR WaitAtBarrierResponse::WaitAtBarrierResponse(
194 ::_pbi::ConstantInitialized): _impl_{
195 /*decltype(_impl_._cached_size_)*/{}} {}
196 struct WaitAtBarrierResponseDefaultTypeInternal {
WaitAtBarrierResponseDefaultTypeInternalxla::WaitAtBarrierResponseDefaultTypeInternal197 PROTOBUF_CONSTEXPR WaitAtBarrierResponseDefaultTypeInternal()
198 : _instance(::_pbi::ConstantInitialized{}) {}
~WaitAtBarrierResponseDefaultTypeInternalxla::WaitAtBarrierResponseDefaultTypeInternal199 ~WaitAtBarrierResponseDefaultTypeInternal() {}
200 union { // NOLINT(misc-non-private-member-variables-in-classes)
201 WaitAtBarrierResponse _instance;
202 };
203 };
204 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WaitAtBarrierResponseDefaultTypeInternal _WaitAtBarrierResponse_default_instance_;
HeartbeatRequest(::_pbi::ConstantInitialized)205 PROTOBUF_CONSTEXPR HeartbeatRequest::HeartbeatRequest(
206 ::_pbi::ConstantInitialized): _impl_{
207 /*decltype(_impl_.session_id_)*/::uint64_t{0u}
208 , /*decltype(_impl_.node_id_)*/0
209 , /*decltype(_impl_._cached_size_)*/{}} {}
210 struct HeartbeatRequestDefaultTypeInternal {
HeartbeatRequestDefaultTypeInternalxla::HeartbeatRequestDefaultTypeInternal211 PROTOBUF_CONSTEXPR HeartbeatRequestDefaultTypeInternal()
212 : _instance(::_pbi::ConstantInitialized{}) {}
~HeartbeatRequestDefaultTypeInternalxla::HeartbeatRequestDefaultTypeInternal213 ~HeartbeatRequestDefaultTypeInternal() {}
214 union { // NOLINT(misc-non-private-member-variables-in-classes)
215 HeartbeatRequest _instance;
216 };
217 };
218 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeartbeatRequestDefaultTypeInternal _HeartbeatRequest_default_instance_;
HeartbeatResponse(::_pbi::ConstantInitialized)219 PROTOBUF_CONSTEXPR HeartbeatResponse::HeartbeatResponse(
220 ::_pbi::ConstantInitialized): _impl_{
221 /*decltype(_impl_._cached_size_)*/{}} {}
222 struct HeartbeatResponseDefaultTypeInternal {
HeartbeatResponseDefaultTypeInternalxla::HeartbeatResponseDefaultTypeInternal223 PROTOBUF_CONSTEXPR HeartbeatResponseDefaultTypeInternal()
224 : _instance(::_pbi::ConstantInitialized{}) {}
~HeartbeatResponseDefaultTypeInternalxla::HeartbeatResponseDefaultTypeInternal225 ~HeartbeatResponseDefaultTypeInternal() {}
226 union { // NOLINT(misc-non-private-member-variables-in-classes)
227 HeartbeatResponse _instance;
228 };
229 };
230 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeartbeatResponseDefaultTypeInternal _HeartbeatResponse_default_instance_;
ShutdownRequest(::_pbi::ConstantInitialized)231 PROTOBUF_CONSTEXPR ShutdownRequest::ShutdownRequest(
232 ::_pbi::ConstantInitialized): _impl_{
233 /*decltype(_impl_.session_id_)*/::uint64_t{0u}
234 , /*decltype(_impl_.node_id_)*/0
235 , /*decltype(_impl_._cached_size_)*/{}} {}
236 struct ShutdownRequestDefaultTypeInternal {
ShutdownRequestDefaultTypeInternalxla::ShutdownRequestDefaultTypeInternal237 PROTOBUF_CONSTEXPR ShutdownRequestDefaultTypeInternal()
238 : _instance(::_pbi::ConstantInitialized{}) {}
~ShutdownRequestDefaultTypeInternalxla::ShutdownRequestDefaultTypeInternal239 ~ShutdownRequestDefaultTypeInternal() {}
240 union { // NOLINT(misc-non-private-member-variables-in-classes)
241 ShutdownRequest _instance;
242 };
243 };
244 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ShutdownRequestDefaultTypeInternal _ShutdownRequest_default_instance_;
ShutdownResponse(::_pbi::ConstantInitialized)245 PROTOBUF_CONSTEXPR ShutdownResponse::ShutdownResponse(
246 ::_pbi::ConstantInitialized): _impl_{
247 /*decltype(_impl_._cached_size_)*/{}} {}
248 struct ShutdownResponseDefaultTypeInternal {
ShutdownResponseDefaultTypeInternalxla::ShutdownResponseDefaultTypeInternal249 PROTOBUF_CONSTEXPR ShutdownResponseDefaultTypeInternal()
250 : _instance(::_pbi::ConstantInitialized{}) {}
~ShutdownResponseDefaultTypeInternalxla::ShutdownResponseDefaultTypeInternal251 ~ShutdownResponseDefaultTypeInternal() {}
252 union { // NOLINT(misc-non-private-member-variables-in-classes)
253 ShutdownResponse _instance;
254 };
255 };
256 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ShutdownResponseDefaultTypeInternal _ShutdownResponse_default_instance_;
257 } // namespace xla
258 namespace xla {
259
260 // ===================================================================
261
262 class DeviceProto::_Internal {
263 public:
264 };
265
DeviceProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)266 DeviceProto::DeviceProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
267 bool is_message_owned)
268 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
269 SharedCtor(arena, is_message_owned);
270 // @@protoc_insertion_point(arena_constructor:xla.DeviceProto)
271 }
DeviceProto(const DeviceProto & from)272 DeviceProto::DeviceProto(const DeviceProto& from)
273 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
274 DeviceProto* const _this = this; (void)_this;
275 new (&_impl_) Impl_{
276 decltype(_impl_.name_){}
277 , decltype(_impl_.vendor_){}
278 , decltype(_impl_.local_device_ordinal_){}
279 , decltype(_impl_.global_device_id_){}
280 , /*decltype(_impl_._cached_size_)*/{}};
281
282 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
283 _impl_.name_.InitDefault();
284 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
285 _impl_.name_.Set("", GetArenaForAllocation());
286 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
287 if (!from._internal_name().empty()) {
288 _this->_impl_.name_.Set(from._internal_name(),
289 _this->GetArenaForAllocation());
290 }
291 _impl_.vendor_.InitDefault();
292 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
293 _impl_.vendor_.Set("", GetArenaForAllocation());
294 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
295 if (!from._internal_vendor().empty()) {
296 _this->_impl_.vendor_.Set(from._internal_vendor(),
297 _this->GetArenaForAllocation());
298 }
299 ::memcpy(&_impl_.local_device_ordinal_, &from._impl_.local_device_ordinal_,
300 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.global_device_id_) -
301 reinterpret_cast<char*>(&_impl_.local_device_ordinal_)) + sizeof(_impl_.global_device_id_));
302 // @@protoc_insertion_point(copy_constructor:xla.DeviceProto)
303 }
304
SharedCtor(::_pb::Arena * arena,bool is_message_owned)305 inline void DeviceProto::SharedCtor(
306 ::_pb::Arena* arena, bool is_message_owned) {
307 (void)arena;
308 (void)is_message_owned;
309 new (&_impl_) Impl_{
310 decltype(_impl_.name_){}
311 , decltype(_impl_.vendor_){}
312 , decltype(_impl_.local_device_ordinal_){0}
313 , decltype(_impl_.global_device_id_){0}
314 , /*decltype(_impl_._cached_size_)*/{}
315 };
316 _impl_.name_.InitDefault();
317 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
318 _impl_.name_.Set("", GetArenaForAllocation());
319 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
320 _impl_.vendor_.InitDefault();
321 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
322 _impl_.vendor_.Set("", GetArenaForAllocation());
323 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
324 }
325
~DeviceProto()326 DeviceProto::~DeviceProto() {
327 // @@protoc_insertion_point(destructor:xla.DeviceProto)
328 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
329 (void)arena;
330 return;
331 }
332 SharedDtor();
333 }
334
SharedDtor()335 inline void DeviceProto::SharedDtor() {
336 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
337 _impl_.name_.Destroy();
338 _impl_.vendor_.Destroy();
339 }
340
SetCachedSize(int size) const341 void DeviceProto::SetCachedSize(int size) const {
342 _impl_._cached_size_.Set(size);
343 }
344
Clear()345 void DeviceProto::Clear() {
346 // @@protoc_insertion_point(message_clear_start:xla.DeviceProto)
347 ::uint32_t cached_has_bits = 0;
348 // Prevent compiler warnings about cached_has_bits being unused
349 (void) cached_has_bits;
350
351 _impl_.name_.ClearToEmpty();
352 _impl_.vendor_.ClearToEmpty();
353 ::memset(&_impl_.local_device_ordinal_, 0, static_cast<size_t>(
354 reinterpret_cast<char*>(&_impl_.global_device_id_) -
355 reinterpret_cast<char*>(&_impl_.local_device_ordinal_)) + sizeof(_impl_.global_device_id_));
356 _internal_metadata_.Clear<std::string>();
357 }
358
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)359 const char* DeviceProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
360 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
361 while (!ctx->Done(&ptr)) {
362 ::uint32_t tag;
363 ptr = ::_pbi::ReadTag(ptr, &tag);
364 switch (tag >> 3) {
365 // int32 local_device_ordinal = 1;
366 case 1:
367 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
368 _impl_.local_device_ordinal_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
369 CHK_(ptr);
370 } else {
371 goto handle_unusual;
372 }
373 continue;
374 // string name = 2;
375 case 2:
376 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
377 auto str = _internal_mutable_name();
378 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
379 CHK_(ptr);
380 CHK_(::_pbi::VerifyUTF8(str, nullptr));
381 } else {
382 goto handle_unusual;
383 }
384 continue;
385 // string vendor = 3;
386 case 3:
387 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
388 auto str = _internal_mutable_vendor();
389 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
390 CHK_(ptr);
391 CHK_(::_pbi::VerifyUTF8(str, nullptr));
392 } else {
393 goto handle_unusual;
394 }
395 continue;
396 // int32 global_device_id = 4;
397 case 4:
398 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
399 _impl_.global_device_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
400 CHK_(ptr);
401 } else {
402 goto handle_unusual;
403 }
404 continue;
405 default:
406 goto handle_unusual;
407 } // switch
408 handle_unusual:
409 if ((tag == 0) || ((tag & 7) == 4)) {
410 CHK_(ptr);
411 ctx->SetLastTag(tag);
412 goto message_done;
413 }
414 ptr = UnknownFieldParse(
415 tag,
416 _internal_metadata_.mutable_unknown_fields<std::string>(),
417 ptr, ctx);
418 CHK_(ptr != nullptr);
419 } // while
420 message_done:
421 return ptr;
422 failure:
423 ptr = nullptr;
424 goto message_done;
425 #undef CHK_
426 }
427
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const428 ::uint8_t* DeviceProto::_InternalSerialize(
429 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
430 // @@protoc_insertion_point(serialize_to_array_start:xla.DeviceProto)
431 ::uint32_t cached_has_bits = 0;
432 (void) cached_has_bits;
433
434 // int32 local_device_ordinal = 1;
435 if (this->_internal_local_device_ordinal() != 0) {
436 target = stream->EnsureSpace(target);
437 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_local_device_ordinal(), target);
438 }
439
440 // string name = 2;
441 if (!this->_internal_name().empty()) {
442 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
443 this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
444 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
445 "xla.DeviceProto.name");
446 target = stream->WriteStringMaybeAliased(
447 2, this->_internal_name(), target);
448 }
449
450 // string vendor = 3;
451 if (!this->_internal_vendor().empty()) {
452 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
453 this->_internal_vendor().data(), static_cast<int>(this->_internal_vendor().length()),
454 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
455 "xla.DeviceProto.vendor");
456 target = stream->WriteStringMaybeAliased(
457 3, this->_internal_vendor(), target);
458 }
459
460 // int32 global_device_id = 4;
461 if (this->_internal_global_device_id() != 0) {
462 target = stream->EnsureSpace(target);
463 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_global_device_id(), target);
464 }
465
466 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
467 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
468 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
469 }
470 // @@protoc_insertion_point(serialize_to_array_end:xla.DeviceProto)
471 return target;
472 }
473
ByteSizeLong() const474 size_t DeviceProto::ByteSizeLong() const {
475 // @@protoc_insertion_point(message_byte_size_start:xla.DeviceProto)
476 size_t total_size = 0;
477
478 ::uint32_t cached_has_bits = 0;
479 // Prevent compiler warnings about cached_has_bits being unused
480 (void) cached_has_bits;
481
482 // string name = 2;
483 if (!this->_internal_name().empty()) {
484 total_size += 1 +
485 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
486 this->_internal_name());
487 }
488
489 // string vendor = 3;
490 if (!this->_internal_vendor().empty()) {
491 total_size += 1 +
492 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
493 this->_internal_vendor());
494 }
495
496 // int32 local_device_ordinal = 1;
497 if (this->_internal_local_device_ordinal() != 0) {
498 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_local_device_ordinal());
499 }
500
501 // int32 global_device_id = 4;
502 if (this->_internal_global_device_id() != 0) {
503 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_global_device_id());
504 }
505
506 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
507 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
508 }
509 int cached_size = ::_pbi::ToCachedSize(total_size);
510 SetCachedSize(cached_size);
511 return total_size;
512 }
513
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)514 void DeviceProto::CheckTypeAndMergeFrom(
515 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
516 MergeFrom(*::_pbi::DownCast<const DeviceProto*>(
517 &from));
518 }
519
MergeFrom(const DeviceProto & from)520 void DeviceProto::MergeFrom(const DeviceProto& from) {
521 DeviceProto* const _this = this;
522 // @@protoc_insertion_point(class_specific_merge_from_start:xla.DeviceProto)
523 GOOGLE_DCHECK_NE(&from, _this);
524 ::uint32_t cached_has_bits = 0;
525 (void) cached_has_bits;
526
527 if (!from._internal_name().empty()) {
528 _this->_internal_set_name(from._internal_name());
529 }
530 if (!from._internal_vendor().empty()) {
531 _this->_internal_set_vendor(from._internal_vendor());
532 }
533 if (from._internal_local_device_ordinal() != 0) {
534 _this->_internal_set_local_device_ordinal(from._internal_local_device_ordinal());
535 }
536 if (from._internal_global_device_id() != 0) {
537 _this->_internal_set_global_device_id(from._internal_global_device_id());
538 }
539 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
540 }
541
CopyFrom(const DeviceProto & from)542 void DeviceProto::CopyFrom(const DeviceProto& from) {
543 // @@protoc_insertion_point(class_specific_copy_from_start:xla.DeviceProto)
544 if (&from == this) return;
545 Clear();
546 MergeFrom(from);
547 }
548
IsInitialized() const549 bool DeviceProto::IsInitialized() const {
550 return true;
551 }
552
InternalSwap(DeviceProto * other)553 void DeviceProto::InternalSwap(DeviceProto* other) {
554 using std::swap;
555 auto* lhs_arena = GetArenaForAllocation();
556 auto* rhs_arena = other->GetArenaForAllocation();
557 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
558 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
559 &_impl_.name_, lhs_arena,
560 &other->_impl_.name_, rhs_arena
561 );
562 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
563 &_impl_.vendor_, lhs_arena,
564 &other->_impl_.vendor_, rhs_arena
565 );
566 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
567 PROTOBUF_FIELD_OFFSET(DeviceProto, _impl_.global_device_id_)
568 + sizeof(DeviceProto::_impl_.global_device_id_) // NOLINT
569 - PROTOBUF_FIELD_OFFSET(DeviceProto, _impl_.local_device_ordinal_)>(
570 reinterpret_cast<char*>(&_impl_.local_device_ordinal_),
571 reinterpret_cast<char*>(&other->_impl_.local_device_ordinal_));
572 }
573
GetTypeName() const574 std::string DeviceProto::GetTypeName() const {
575 return "xla.DeviceProto";
576 }
577
578
579 // ===================================================================
580
581 class LocalTopologyProto::_Internal {
582 public:
583 };
584
LocalTopologyProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)585 LocalTopologyProto::LocalTopologyProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
586 bool is_message_owned)
587 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
588 SharedCtor(arena, is_message_owned);
589 // @@protoc_insertion_point(arena_constructor:xla.LocalTopologyProto)
590 }
LocalTopologyProto(const LocalTopologyProto & from)591 LocalTopologyProto::LocalTopologyProto(const LocalTopologyProto& from)
592 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
593 LocalTopologyProto* const _this = this; (void)_this;
594 new (&_impl_) Impl_{
595 decltype(_impl_.devices_){from._impl_.devices_}
596 , decltype(_impl_.node_id_){}
597 , /*decltype(_impl_._cached_size_)*/{}};
598
599 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
600 _this->_impl_.node_id_ = from._impl_.node_id_;
601 // @@protoc_insertion_point(copy_constructor:xla.LocalTopologyProto)
602 }
603
SharedCtor(::_pb::Arena * arena,bool is_message_owned)604 inline void LocalTopologyProto::SharedCtor(
605 ::_pb::Arena* arena, bool is_message_owned) {
606 (void)arena;
607 (void)is_message_owned;
608 new (&_impl_) Impl_{
609 decltype(_impl_.devices_){arena}
610 , decltype(_impl_.node_id_){0}
611 , /*decltype(_impl_._cached_size_)*/{}
612 };
613 }
614
~LocalTopologyProto()615 LocalTopologyProto::~LocalTopologyProto() {
616 // @@protoc_insertion_point(destructor:xla.LocalTopologyProto)
617 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
618 (void)arena;
619 return;
620 }
621 SharedDtor();
622 }
623
SharedDtor()624 inline void LocalTopologyProto::SharedDtor() {
625 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
626 _impl_.devices_.~RepeatedPtrField();
627 }
628
SetCachedSize(int size) const629 void LocalTopologyProto::SetCachedSize(int size) const {
630 _impl_._cached_size_.Set(size);
631 }
632
Clear()633 void LocalTopologyProto::Clear() {
634 // @@protoc_insertion_point(message_clear_start:xla.LocalTopologyProto)
635 ::uint32_t cached_has_bits = 0;
636 // Prevent compiler warnings about cached_has_bits being unused
637 (void) cached_has_bits;
638
639 _impl_.devices_.Clear();
640 _impl_.node_id_ = 0;
641 _internal_metadata_.Clear<std::string>();
642 }
643
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)644 const char* LocalTopologyProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
645 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
646 while (!ctx->Done(&ptr)) {
647 ::uint32_t tag;
648 ptr = ::_pbi::ReadTag(ptr, &tag);
649 switch (tag >> 3) {
650 // int32 node_id = 1;
651 case 1:
652 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
653 _impl_.node_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
654 CHK_(ptr);
655 } else {
656 goto handle_unusual;
657 }
658 continue;
659 // repeated .xla.DeviceProto devices = 2;
660 case 2:
661 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
662 ptr -= 1;
663 do {
664 ptr += 1;
665 ptr = ctx->ParseMessage(_internal_add_devices(), ptr);
666 CHK_(ptr);
667 if (!ctx->DataAvailable(ptr)) break;
668 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
669 } else {
670 goto handle_unusual;
671 }
672 continue;
673 default:
674 goto handle_unusual;
675 } // switch
676 handle_unusual:
677 if ((tag == 0) || ((tag & 7) == 4)) {
678 CHK_(ptr);
679 ctx->SetLastTag(tag);
680 goto message_done;
681 }
682 ptr = UnknownFieldParse(
683 tag,
684 _internal_metadata_.mutable_unknown_fields<std::string>(),
685 ptr, ctx);
686 CHK_(ptr != nullptr);
687 } // while
688 message_done:
689 return ptr;
690 failure:
691 ptr = nullptr;
692 goto message_done;
693 #undef CHK_
694 }
695
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const696 ::uint8_t* LocalTopologyProto::_InternalSerialize(
697 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
698 // @@protoc_insertion_point(serialize_to_array_start:xla.LocalTopologyProto)
699 ::uint32_t cached_has_bits = 0;
700 (void) cached_has_bits;
701
702 // int32 node_id = 1;
703 if (this->_internal_node_id() != 0) {
704 target = stream->EnsureSpace(target);
705 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_node_id(), target);
706 }
707
708 // repeated .xla.DeviceProto devices = 2;
709 for (unsigned i = 0,
710 n = static_cast<unsigned>(this->_internal_devices_size()); i < n; i++) {
711 const auto& repfield = this->_internal_devices(i);
712 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
713 InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
714 }
715
716 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
717 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
718 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
719 }
720 // @@protoc_insertion_point(serialize_to_array_end:xla.LocalTopologyProto)
721 return target;
722 }
723
ByteSizeLong() const724 size_t LocalTopologyProto::ByteSizeLong() const {
725 // @@protoc_insertion_point(message_byte_size_start:xla.LocalTopologyProto)
726 size_t total_size = 0;
727
728 ::uint32_t cached_has_bits = 0;
729 // Prevent compiler warnings about cached_has_bits being unused
730 (void) cached_has_bits;
731
732 // repeated .xla.DeviceProto devices = 2;
733 total_size += 1UL * this->_internal_devices_size();
734 for (const auto& msg : this->_impl_.devices_) {
735 total_size +=
736 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
737 }
738
739 // int32 node_id = 1;
740 if (this->_internal_node_id() != 0) {
741 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_node_id());
742 }
743
744 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
745 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
746 }
747 int cached_size = ::_pbi::ToCachedSize(total_size);
748 SetCachedSize(cached_size);
749 return total_size;
750 }
751
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)752 void LocalTopologyProto::CheckTypeAndMergeFrom(
753 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
754 MergeFrom(*::_pbi::DownCast<const LocalTopologyProto*>(
755 &from));
756 }
757
MergeFrom(const LocalTopologyProto & from)758 void LocalTopologyProto::MergeFrom(const LocalTopologyProto& from) {
759 LocalTopologyProto* const _this = this;
760 // @@protoc_insertion_point(class_specific_merge_from_start:xla.LocalTopologyProto)
761 GOOGLE_DCHECK_NE(&from, _this);
762 ::uint32_t cached_has_bits = 0;
763 (void) cached_has_bits;
764
765 _this->_impl_.devices_.MergeFrom(from._impl_.devices_);
766 if (from._internal_node_id() != 0) {
767 _this->_internal_set_node_id(from._internal_node_id());
768 }
769 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
770 }
771
CopyFrom(const LocalTopologyProto & from)772 void LocalTopologyProto::CopyFrom(const LocalTopologyProto& from) {
773 // @@protoc_insertion_point(class_specific_copy_from_start:xla.LocalTopologyProto)
774 if (&from == this) return;
775 Clear();
776 MergeFrom(from);
777 }
778
IsInitialized() const779 bool LocalTopologyProto::IsInitialized() const {
780 return true;
781 }
782
InternalSwap(LocalTopologyProto * other)783 void LocalTopologyProto::InternalSwap(LocalTopologyProto* other) {
784 using std::swap;
785 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
786 _impl_.devices_.InternalSwap(&other->_impl_.devices_);
787 swap(_impl_.node_id_, other->_impl_.node_id_);
788 }
789
GetTypeName() const790 std::string LocalTopologyProto::GetTypeName() const {
791 return "xla.LocalTopologyProto";
792 }
793
794
795 // ===================================================================
796
797 class GlobalTopologyProto::_Internal {
798 public:
799 };
800
GlobalTopologyProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)801 GlobalTopologyProto::GlobalTopologyProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
802 bool is_message_owned)
803 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
804 SharedCtor(arena, is_message_owned);
805 // @@protoc_insertion_point(arena_constructor:xla.GlobalTopologyProto)
806 }
GlobalTopologyProto(const GlobalTopologyProto & from)807 GlobalTopologyProto::GlobalTopologyProto(const GlobalTopologyProto& from)
808 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
809 GlobalTopologyProto* const _this = this; (void)_this;
810 new (&_impl_) Impl_{
811 decltype(_impl_.nodes_){from._impl_.nodes_}
812 , /*decltype(_impl_._cached_size_)*/{}};
813
814 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
815 // @@protoc_insertion_point(copy_constructor:xla.GlobalTopologyProto)
816 }
817
SharedCtor(::_pb::Arena * arena,bool is_message_owned)818 inline void GlobalTopologyProto::SharedCtor(
819 ::_pb::Arena* arena, bool is_message_owned) {
820 (void)arena;
821 (void)is_message_owned;
822 new (&_impl_) Impl_{
823 decltype(_impl_.nodes_){arena}
824 , /*decltype(_impl_._cached_size_)*/{}
825 };
826 }
827
~GlobalTopologyProto()828 GlobalTopologyProto::~GlobalTopologyProto() {
829 // @@protoc_insertion_point(destructor:xla.GlobalTopologyProto)
830 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
831 (void)arena;
832 return;
833 }
834 SharedDtor();
835 }
836
SharedDtor()837 inline void GlobalTopologyProto::SharedDtor() {
838 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
839 _impl_.nodes_.~RepeatedPtrField();
840 }
841
SetCachedSize(int size) const842 void GlobalTopologyProto::SetCachedSize(int size) const {
843 _impl_._cached_size_.Set(size);
844 }
845
Clear()846 void GlobalTopologyProto::Clear() {
847 // @@protoc_insertion_point(message_clear_start:xla.GlobalTopologyProto)
848 ::uint32_t cached_has_bits = 0;
849 // Prevent compiler warnings about cached_has_bits being unused
850 (void) cached_has_bits;
851
852 _impl_.nodes_.Clear();
853 _internal_metadata_.Clear<std::string>();
854 }
855
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)856 const char* GlobalTopologyProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
857 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
858 while (!ctx->Done(&ptr)) {
859 ::uint32_t tag;
860 ptr = ::_pbi::ReadTag(ptr, &tag);
861 switch (tag >> 3) {
862 // repeated .xla.LocalTopologyProto nodes = 1;
863 case 1:
864 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
865 ptr -= 1;
866 do {
867 ptr += 1;
868 ptr = ctx->ParseMessage(_internal_add_nodes(), ptr);
869 CHK_(ptr);
870 if (!ctx->DataAvailable(ptr)) break;
871 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
872 } else {
873 goto handle_unusual;
874 }
875 continue;
876 default:
877 goto handle_unusual;
878 } // switch
879 handle_unusual:
880 if ((tag == 0) || ((tag & 7) == 4)) {
881 CHK_(ptr);
882 ctx->SetLastTag(tag);
883 goto message_done;
884 }
885 ptr = UnknownFieldParse(
886 tag,
887 _internal_metadata_.mutable_unknown_fields<std::string>(),
888 ptr, ctx);
889 CHK_(ptr != nullptr);
890 } // while
891 message_done:
892 return ptr;
893 failure:
894 ptr = nullptr;
895 goto message_done;
896 #undef CHK_
897 }
898
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const899 ::uint8_t* GlobalTopologyProto::_InternalSerialize(
900 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
901 // @@protoc_insertion_point(serialize_to_array_start:xla.GlobalTopologyProto)
902 ::uint32_t cached_has_bits = 0;
903 (void) cached_has_bits;
904
905 // repeated .xla.LocalTopologyProto nodes = 1;
906 for (unsigned i = 0,
907 n = static_cast<unsigned>(this->_internal_nodes_size()); i < n; i++) {
908 const auto& repfield = this->_internal_nodes(i);
909 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
910 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
911 }
912
913 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
914 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
915 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
916 }
917 // @@protoc_insertion_point(serialize_to_array_end:xla.GlobalTopologyProto)
918 return target;
919 }
920
ByteSizeLong() const921 size_t GlobalTopologyProto::ByteSizeLong() const {
922 // @@protoc_insertion_point(message_byte_size_start:xla.GlobalTopologyProto)
923 size_t total_size = 0;
924
925 ::uint32_t cached_has_bits = 0;
926 // Prevent compiler warnings about cached_has_bits being unused
927 (void) cached_has_bits;
928
929 // repeated .xla.LocalTopologyProto nodes = 1;
930 total_size += 1UL * this->_internal_nodes_size();
931 for (const auto& msg : this->_impl_.nodes_) {
932 total_size +=
933 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
934 }
935
936 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
937 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
938 }
939 int cached_size = ::_pbi::ToCachedSize(total_size);
940 SetCachedSize(cached_size);
941 return total_size;
942 }
943
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)944 void GlobalTopologyProto::CheckTypeAndMergeFrom(
945 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
946 MergeFrom(*::_pbi::DownCast<const GlobalTopologyProto*>(
947 &from));
948 }
949
MergeFrom(const GlobalTopologyProto & from)950 void GlobalTopologyProto::MergeFrom(const GlobalTopologyProto& from) {
951 GlobalTopologyProto* const _this = this;
952 // @@protoc_insertion_point(class_specific_merge_from_start:xla.GlobalTopologyProto)
953 GOOGLE_DCHECK_NE(&from, _this);
954 ::uint32_t cached_has_bits = 0;
955 (void) cached_has_bits;
956
957 _this->_impl_.nodes_.MergeFrom(from._impl_.nodes_);
958 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
959 }
960
CopyFrom(const GlobalTopologyProto & from)961 void GlobalTopologyProto::CopyFrom(const GlobalTopologyProto& from) {
962 // @@protoc_insertion_point(class_specific_copy_from_start:xla.GlobalTopologyProto)
963 if (&from == this) return;
964 Clear();
965 MergeFrom(from);
966 }
967
IsInitialized() const968 bool GlobalTopologyProto::IsInitialized() const {
969 return true;
970 }
971
InternalSwap(GlobalTopologyProto * other)972 void GlobalTopologyProto::InternalSwap(GlobalTopologyProto* other) {
973 using std::swap;
974 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
975 _impl_.nodes_.InternalSwap(&other->_impl_.nodes_);
976 }
977
GetTypeName() const978 std::string GlobalTopologyProto::GetTypeName() const {
979 return "xla.GlobalTopologyProto";
980 }
981
982
983 // ===================================================================
984
985 class ConnectRequest::_Internal {
986 public:
987 };
988
ConnectRequest(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)989 ConnectRequest::ConnectRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
990 bool is_message_owned)
991 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
992 SharedCtor(arena, is_message_owned);
993 // @@protoc_insertion_point(arena_constructor:xla.ConnectRequest)
994 }
ConnectRequest(const ConnectRequest & from)995 ConnectRequest::ConnectRequest(const ConnectRequest& from)
996 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
997 ConnectRequest* const _this = this; (void)_this;
998 new (&_impl_) Impl_{
999 decltype(_impl_.protocol_version_){}
1000 , decltype(_impl_.timeout_milliseconds_){}
1001 , decltype(_impl_.client_id_){}
1002 , decltype(_impl_.node_id_){}
1003 , /*decltype(_impl_._cached_size_)*/{}};
1004
1005 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1006 ::memcpy(&_impl_.protocol_version_, &from._impl_.protocol_version_,
1007 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.node_id_) -
1008 reinterpret_cast<char*>(&_impl_.protocol_version_)) + sizeof(_impl_.node_id_));
1009 // @@protoc_insertion_point(copy_constructor:xla.ConnectRequest)
1010 }
1011
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1012 inline void ConnectRequest::SharedCtor(
1013 ::_pb::Arena* arena, bool is_message_owned) {
1014 (void)arena;
1015 (void)is_message_owned;
1016 new (&_impl_) Impl_{
1017 decltype(_impl_.protocol_version_){0}
1018 , decltype(_impl_.timeout_milliseconds_){0}
1019 , decltype(_impl_.client_id_){::uint64_t{0u}}
1020 , decltype(_impl_.node_id_){0}
1021 , /*decltype(_impl_._cached_size_)*/{}
1022 };
1023 }
1024
~ConnectRequest()1025 ConnectRequest::~ConnectRequest() {
1026 // @@protoc_insertion_point(destructor:xla.ConnectRequest)
1027 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1028 (void)arena;
1029 return;
1030 }
1031 SharedDtor();
1032 }
1033
SharedDtor()1034 inline void ConnectRequest::SharedDtor() {
1035 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1036 }
1037
SetCachedSize(int size) const1038 void ConnectRequest::SetCachedSize(int size) const {
1039 _impl_._cached_size_.Set(size);
1040 }
1041
Clear()1042 void ConnectRequest::Clear() {
1043 // @@protoc_insertion_point(message_clear_start:xla.ConnectRequest)
1044 ::uint32_t cached_has_bits = 0;
1045 // Prevent compiler warnings about cached_has_bits being unused
1046 (void) cached_has_bits;
1047
1048 ::memset(&_impl_.protocol_version_, 0, static_cast<size_t>(
1049 reinterpret_cast<char*>(&_impl_.node_id_) -
1050 reinterpret_cast<char*>(&_impl_.protocol_version_)) + sizeof(_impl_.node_id_));
1051 _internal_metadata_.Clear<std::string>();
1052 }
1053
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1054 const char* ConnectRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1055 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1056 while (!ctx->Done(&ptr)) {
1057 ::uint32_t tag;
1058 ptr = ::_pbi::ReadTag(ptr, &tag);
1059 switch (tag >> 3) {
1060 // int32 protocol_version = 1;
1061 case 1:
1062 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1063 _impl_.protocol_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1064 CHK_(ptr);
1065 } else {
1066 goto handle_unusual;
1067 }
1068 continue;
1069 // int32 timeout_milliseconds = 2;
1070 case 2:
1071 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1072 _impl_.timeout_milliseconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1073 CHK_(ptr);
1074 } else {
1075 goto handle_unusual;
1076 }
1077 continue;
1078 // int32 node_id = 3;
1079 case 3:
1080 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1081 _impl_.node_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1082 CHK_(ptr);
1083 } else {
1084 goto handle_unusual;
1085 }
1086 continue;
1087 // uint64 client_id = 4;
1088 case 4:
1089 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1090 _impl_.client_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1091 CHK_(ptr);
1092 } else {
1093 goto handle_unusual;
1094 }
1095 continue;
1096 default:
1097 goto handle_unusual;
1098 } // switch
1099 handle_unusual:
1100 if ((tag == 0) || ((tag & 7) == 4)) {
1101 CHK_(ptr);
1102 ctx->SetLastTag(tag);
1103 goto message_done;
1104 }
1105 ptr = UnknownFieldParse(
1106 tag,
1107 _internal_metadata_.mutable_unknown_fields<std::string>(),
1108 ptr, ctx);
1109 CHK_(ptr != nullptr);
1110 } // while
1111 message_done:
1112 return ptr;
1113 failure:
1114 ptr = nullptr;
1115 goto message_done;
1116 #undef CHK_
1117 }
1118
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1119 ::uint8_t* ConnectRequest::_InternalSerialize(
1120 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1121 // @@protoc_insertion_point(serialize_to_array_start:xla.ConnectRequest)
1122 ::uint32_t cached_has_bits = 0;
1123 (void) cached_has_bits;
1124
1125 // int32 protocol_version = 1;
1126 if (this->_internal_protocol_version() != 0) {
1127 target = stream->EnsureSpace(target);
1128 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_protocol_version(), target);
1129 }
1130
1131 // int32 timeout_milliseconds = 2;
1132 if (this->_internal_timeout_milliseconds() != 0) {
1133 target = stream->EnsureSpace(target);
1134 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_timeout_milliseconds(), target);
1135 }
1136
1137 // int32 node_id = 3;
1138 if (this->_internal_node_id() != 0) {
1139 target = stream->EnsureSpace(target);
1140 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_node_id(), target);
1141 }
1142
1143 // uint64 client_id = 4;
1144 if (this->_internal_client_id() != 0) {
1145 target = stream->EnsureSpace(target);
1146 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_client_id(), target);
1147 }
1148
1149 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1150 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1151 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1152 }
1153 // @@protoc_insertion_point(serialize_to_array_end:xla.ConnectRequest)
1154 return target;
1155 }
1156
ByteSizeLong() const1157 size_t ConnectRequest::ByteSizeLong() const {
1158 // @@protoc_insertion_point(message_byte_size_start:xla.ConnectRequest)
1159 size_t total_size = 0;
1160
1161 ::uint32_t cached_has_bits = 0;
1162 // Prevent compiler warnings about cached_has_bits being unused
1163 (void) cached_has_bits;
1164
1165 // int32 protocol_version = 1;
1166 if (this->_internal_protocol_version() != 0) {
1167 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_protocol_version());
1168 }
1169
1170 // int32 timeout_milliseconds = 2;
1171 if (this->_internal_timeout_milliseconds() != 0) {
1172 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_timeout_milliseconds());
1173 }
1174
1175 // uint64 client_id = 4;
1176 if (this->_internal_client_id() != 0) {
1177 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_client_id());
1178 }
1179
1180 // int32 node_id = 3;
1181 if (this->_internal_node_id() != 0) {
1182 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_node_id());
1183 }
1184
1185 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1186 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1187 }
1188 int cached_size = ::_pbi::ToCachedSize(total_size);
1189 SetCachedSize(cached_size);
1190 return total_size;
1191 }
1192
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1193 void ConnectRequest::CheckTypeAndMergeFrom(
1194 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1195 MergeFrom(*::_pbi::DownCast<const ConnectRequest*>(
1196 &from));
1197 }
1198
MergeFrom(const ConnectRequest & from)1199 void ConnectRequest::MergeFrom(const ConnectRequest& from) {
1200 ConnectRequest* const _this = this;
1201 // @@protoc_insertion_point(class_specific_merge_from_start:xla.ConnectRequest)
1202 GOOGLE_DCHECK_NE(&from, _this);
1203 ::uint32_t cached_has_bits = 0;
1204 (void) cached_has_bits;
1205
1206 if (from._internal_protocol_version() != 0) {
1207 _this->_internal_set_protocol_version(from._internal_protocol_version());
1208 }
1209 if (from._internal_timeout_milliseconds() != 0) {
1210 _this->_internal_set_timeout_milliseconds(from._internal_timeout_milliseconds());
1211 }
1212 if (from._internal_client_id() != 0) {
1213 _this->_internal_set_client_id(from._internal_client_id());
1214 }
1215 if (from._internal_node_id() != 0) {
1216 _this->_internal_set_node_id(from._internal_node_id());
1217 }
1218 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1219 }
1220
CopyFrom(const ConnectRequest & from)1221 void ConnectRequest::CopyFrom(const ConnectRequest& from) {
1222 // @@protoc_insertion_point(class_specific_copy_from_start:xla.ConnectRequest)
1223 if (&from == this) return;
1224 Clear();
1225 MergeFrom(from);
1226 }
1227
IsInitialized() const1228 bool ConnectRequest::IsInitialized() const {
1229 return true;
1230 }
1231
InternalSwap(ConnectRequest * other)1232 void ConnectRequest::InternalSwap(ConnectRequest* other) {
1233 using std::swap;
1234 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1235 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1236 PROTOBUF_FIELD_OFFSET(ConnectRequest, _impl_.node_id_)
1237 + sizeof(ConnectRequest::_impl_.node_id_) // NOLINT
1238 - PROTOBUF_FIELD_OFFSET(ConnectRequest, _impl_.protocol_version_)>(
1239 reinterpret_cast<char*>(&_impl_.protocol_version_),
1240 reinterpret_cast<char*>(&other->_impl_.protocol_version_));
1241 }
1242
GetTypeName() const1243 std::string ConnectRequest::GetTypeName() const {
1244 return "xla.ConnectRequest";
1245 }
1246
1247
1248 // ===================================================================
1249
1250 class ConnectResponse::_Internal {
1251 public:
1252 };
1253
ConnectResponse(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1254 ConnectResponse::ConnectResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1255 bool is_message_owned)
1256 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1257 SharedCtor(arena, is_message_owned);
1258 // @@protoc_insertion_point(arena_constructor:xla.ConnectResponse)
1259 }
ConnectResponse(const ConnectResponse & from)1260 ConnectResponse::ConnectResponse(const ConnectResponse& from)
1261 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1262 ConnectResponse* const _this = this; (void)_this;
1263 new (&_impl_) Impl_{
1264 decltype(_impl_.session_id_){}
1265 , /*decltype(_impl_._cached_size_)*/{}};
1266
1267 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1268 _this->_impl_.session_id_ = from._impl_.session_id_;
1269 // @@protoc_insertion_point(copy_constructor:xla.ConnectResponse)
1270 }
1271
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1272 inline void ConnectResponse::SharedCtor(
1273 ::_pb::Arena* arena, bool is_message_owned) {
1274 (void)arena;
1275 (void)is_message_owned;
1276 new (&_impl_) Impl_{
1277 decltype(_impl_.session_id_){::uint64_t{0u}}
1278 , /*decltype(_impl_._cached_size_)*/{}
1279 };
1280 }
1281
~ConnectResponse()1282 ConnectResponse::~ConnectResponse() {
1283 // @@protoc_insertion_point(destructor:xla.ConnectResponse)
1284 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1285 (void)arena;
1286 return;
1287 }
1288 SharedDtor();
1289 }
1290
SharedDtor()1291 inline void ConnectResponse::SharedDtor() {
1292 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1293 }
1294
SetCachedSize(int size) const1295 void ConnectResponse::SetCachedSize(int size) const {
1296 _impl_._cached_size_.Set(size);
1297 }
1298
Clear()1299 void ConnectResponse::Clear() {
1300 // @@protoc_insertion_point(message_clear_start:xla.ConnectResponse)
1301 ::uint32_t cached_has_bits = 0;
1302 // Prevent compiler warnings about cached_has_bits being unused
1303 (void) cached_has_bits;
1304
1305 _impl_.session_id_ = ::uint64_t{0u};
1306 _internal_metadata_.Clear<std::string>();
1307 }
1308
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1309 const char* ConnectResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1310 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1311 while (!ctx->Done(&ptr)) {
1312 ::uint32_t tag;
1313 ptr = ::_pbi::ReadTag(ptr, &tag);
1314 switch (tag >> 3) {
1315 // uint64 session_id = 1;
1316 case 1:
1317 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1318 _impl_.session_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1319 CHK_(ptr);
1320 } else {
1321 goto handle_unusual;
1322 }
1323 continue;
1324 default:
1325 goto handle_unusual;
1326 } // switch
1327 handle_unusual:
1328 if ((tag == 0) || ((tag & 7) == 4)) {
1329 CHK_(ptr);
1330 ctx->SetLastTag(tag);
1331 goto message_done;
1332 }
1333 ptr = UnknownFieldParse(
1334 tag,
1335 _internal_metadata_.mutable_unknown_fields<std::string>(),
1336 ptr, ctx);
1337 CHK_(ptr != nullptr);
1338 } // while
1339 message_done:
1340 return ptr;
1341 failure:
1342 ptr = nullptr;
1343 goto message_done;
1344 #undef CHK_
1345 }
1346
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1347 ::uint8_t* ConnectResponse::_InternalSerialize(
1348 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1349 // @@protoc_insertion_point(serialize_to_array_start:xla.ConnectResponse)
1350 ::uint32_t cached_has_bits = 0;
1351 (void) cached_has_bits;
1352
1353 // uint64 session_id = 1;
1354 if (this->_internal_session_id() != 0) {
1355 target = stream->EnsureSpace(target);
1356 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_session_id(), target);
1357 }
1358
1359 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1360 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1361 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1362 }
1363 // @@protoc_insertion_point(serialize_to_array_end:xla.ConnectResponse)
1364 return target;
1365 }
1366
ByteSizeLong() const1367 size_t ConnectResponse::ByteSizeLong() const {
1368 // @@protoc_insertion_point(message_byte_size_start:xla.ConnectResponse)
1369 size_t total_size = 0;
1370
1371 ::uint32_t cached_has_bits = 0;
1372 // Prevent compiler warnings about cached_has_bits being unused
1373 (void) cached_has_bits;
1374
1375 // uint64 session_id = 1;
1376 if (this->_internal_session_id() != 0) {
1377 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_session_id());
1378 }
1379
1380 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1381 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1382 }
1383 int cached_size = ::_pbi::ToCachedSize(total_size);
1384 SetCachedSize(cached_size);
1385 return total_size;
1386 }
1387
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1388 void ConnectResponse::CheckTypeAndMergeFrom(
1389 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1390 MergeFrom(*::_pbi::DownCast<const ConnectResponse*>(
1391 &from));
1392 }
1393
MergeFrom(const ConnectResponse & from)1394 void ConnectResponse::MergeFrom(const ConnectResponse& from) {
1395 ConnectResponse* const _this = this;
1396 // @@protoc_insertion_point(class_specific_merge_from_start:xla.ConnectResponse)
1397 GOOGLE_DCHECK_NE(&from, _this);
1398 ::uint32_t cached_has_bits = 0;
1399 (void) cached_has_bits;
1400
1401 if (from._internal_session_id() != 0) {
1402 _this->_internal_set_session_id(from._internal_session_id());
1403 }
1404 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1405 }
1406
CopyFrom(const ConnectResponse & from)1407 void ConnectResponse::CopyFrom(const ConnectResponse& from) {
1408 // @@protoc_insertion_point(class_specific_copy_from_start:xla.ConnectResponse)
1409 if (&from == this) return;
1410 Clear();
1411 MergeFrom(from);
1412 }
1413
IsInitialized() const1414 bool ConnectResponse::IsInitialized() const {
1415 return true;
1416 }
1417
InternalSwap(ConnectResponse * other)1418 void ConnectResponse::InternalSwap(ConnectResponse* other) {
1419 using std::swap;
1420 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1421 swap(_impl_.session_id_, other->_impl_.session_id_);
1422 }
1423
GetTypeName() const1424 std::string ConnectResponse::GetTypeName() const {
1425 return "xla.ConnectResponse";
1426 }
1427
1428
1429 // ===================================================================
1430
1431 class EnumerateDevicesRequest::_Internal {
1432 public:
1433 static const ::xla::LocalTopologyProto& local_topology(const EnumerateDevicesRequest* msg);
1434 };
1435
1436 const ::xla::LocalTopologyProto&
local_topology(const EnumerateDevicesRequest * msg)1437 EnumerateDevicesRequest::_Internal::local_topology(const EnumerateDevicesRequest* msg) {
1438 return *msg->_impl_.local_topology_;
1439 }
EnumerateDevicesRequest(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1440 EnumerateDevicesRequest::EnumerateDevicesRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1441 bool is_message_owned)
1442 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1443 SharedCtor(arena, is_message_owned);
1444 // @@protoc_insertion_point(arena_constructor:xla.EnumerateDevicesRequest)
1445 }
EnumerateDevicesRequest(const EnumerateDevicesRequest & from)1446 EnumerateDevicesRequest::EnumerateDevicesRequest(const EnumerateDevicesRequest& from)
1447 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1448 EnumerateDevicesRequest* const _this = this; (void)_this;
1449 new (&_impl_) Impl_{
1450 decltype(_impl_.local_topology_){nullptr}
1451 , decltype(_impl_.session_id_){}
1452 , /*decltype(_impl_._cached_size_)*/{}};
1453
1454 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1455 if (from._internal_has_local_topology()) {
1456 _this->_impl_.local_topology_ = new ::xla::LocalTopologyProto(*from._impl_.local_topology_);
1457 }
1458 _this->_impl_.session_id_ = from._impl_.session_id_;
1459 // @@protoc_insertion_point(copy_constructor:xla.EnumerateDevicesRequest)
1460 }
1461
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1462 inline void EnumerateDevicesRequest::SharedCtor(
1463 ::_pb::Arena* arena, bool is_message_owned) {
1464 (void)arena;
1465 (void)is_message_owned;
1466 new (&_impl_) Impl_{
1467 decltype(_impl_.local_topology_){nullptr}
1468 , decltype(_impl_.session_id_){::uint64_t{0u}}
1469 , /*decltype(_impl_._cached_size_)*/{}
1470 };
1471 }
1472
~EnumerateDevicesRequest()1473 EnumerateDevicesRequest::~EnumerateDevicesRequest() {
1474 // @@protoc_insertion_point(destructor:xla.EnumerateDevicesRequest)
1475 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1476 (void)arena;
1477 return;
1478 }
1479 SharedDtor();
1480 }
1481
SharedDtor()1482 inline void EnumerateDevicesRequest::SharedDtor() {
1483 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1484 if (this != internal_default_instance()) delete _impl_.local_topology_;
1485 }
1486
SetCachedSize(int size) const1487 void EnumerateDevicesRequest::SetCachedSize(int size) const {
1488 _impl_._cached_size_.Set(size);
1489 }
1490
Clear()1491 void EnumerateDevicesRequest::Clear() {
1492 // @@protoc_insertion_point(message_clear_start:xla.EnumerateDevicesRequest)
1493 ::uint32_t cached_has_bits = 0;
1494 // Prevent compiler warnings about cached_has_bits being unused
1495 (void) cached_has_bits;
1496
1497 if (GetArenaForAllocation() == nullptr && _impl_.local_topology_ != nullptr) {
1498 delete _impl_.local_topology_;
1499 }
1500 _impl_.local_topology_ = nullptr;
1501 _impl_.session_id_ = ::uint64_t{0u};
1502 _internal_metadata_.Clear<std::string>();
1503 }
1504
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1505 const char* EnumerateDevicesRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1506 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1507 while (!ctx->Done(&ptr)) {
1508 ::uint32_t tag;
1509 ptr = ::_pbi::ReadTag(ptr, &tag);
1510 switch (tag >> 3) {
1511 // uint64 session_id = 1;
1512 case 1:
1513 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1514 _impl_.session_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1515 CHK_(ptr);
1516 } else {
1517 goto handle_unusual;
1518 }
1519 continue;
1520 // .xla.LocalTopologyProto local_topology = 3;
1521 case 3:
1522 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1523 ptr = ctx->ParseMessage(_internal_mutable_local_topology(), ptr);
1524 CHK_(ptr);
1525 } else {
1526 goto handle_unusual;
1527 }
1528 continue;
1529 default:
1530 goto handle_unusual;
1531 } // switch
1532 handle_unusual:
1533 if ((tag == 0) || ((tag & 7) == 4)) {
1534 CHK_(ptr);
1535 ctx->SetLastTag(tag);
1536 goto message_done;
1537 }
1538 ptr = UnknownFieldParse(
1539 tag,
1540 _internal_metadata_.mutable_unknown_fields<std::string>(),
1541 ptr, ctx);
1542 CHK_(ptr != nullptr);
1543 } // while
1544 message_done:
1545 return ptr;
1546 failure:
1547 ptr = nullptr;
1548 goto message_done;
1549 #undef CHK_
1550 }
1551
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1552 ::uint8_t* EnumerateDevicesRequest::_InternalSerialize(
1553 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1554 // @@protoc_insertion_point(serialize_to_array_start:xla.EnumerateDevicesRequest)
1555 ::uint32_t cached_has_bits = 0;
1556 (void) cached_has_bits;
1557
1558 // uint64 session_id = 1;
1559 if (this->_internal_session_id() != 0) {
1560 target = stream->EnsureSpace(target);
1561 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_session_id(), target);
1562 }
1563
1564 // .xla.LocalTopologyProto local_topology = 3;
1565 if (this->_internal_has_local_topology()) {
1566 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1567 InternalWriteMessage(3, _Internal::local_topology(this),
1568 _Internal::local_topology(this).GetCachedSize(), target, stream);
1569 }
1570
1571 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1572 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1573 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1574 }
1575 // @@protoc_insertion_point(serialize_to_array_end:xla.EnumerateDevicesRequest)
1576 return target;
1577 }
1578
ByteSizeLong() const1579 size_t EnumerateDevicesRequest::ByteSizeLong() const {
1580 // @@protoc_insertion_point(message_byte_size_start:xla.EnumerateDevicesRequest)
1581 size_t total_size = 0;
1582
1583 ::uint32_t cached_has_bits = 0;
1584 // Prevent compiler warnings about cached_has_bits being unused
1585 (void) cached_has_bits;
1586
1587 // .xla.LocalTopologyProto local_topology = 3;
1588 if (this->_internal_has_local_topology()) {
1589 total_size += 1 +
1590 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1591 *_impl_.local_topology_);
1592 }
1593
1594 // uint64 session_id = 1;
1595 if (this->_internal_session_id() != 0) {
1596 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_session_id());
1597 }
1598
1599 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1600 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1601 }
1602 int cached_size = ::_pbi::ToCachedSize(total_size);
1603 SetCachedSize(cached_size);
1604 return total_size;
1605 }
1606
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1607 void EnumerateDevicesRequest::CheckTypeAndMergeFrom(
1608 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1609 MergeFrom(*::_pbi::DownCast<const EnumerateDevicesRequest*>(
1610 &from));
1611 }
1612
MergeFrom(const EnumerateDevicesRequest & from)1613 void EnumerateDevicesRequest::MergeFrom(const EnumerateDevicesRequest& from) {
1614 EnumerateDevicesRequest* const _this = this;
1615 // @@protoc_insertion_point(class_specific_merge_from_start:xla.EnumerateDevicesRequest)
1616 GOOGLE_DCHECK_NE(&from, _this);
1617 ::uint32_t cached_has_bits = 0;
1618 (void) cached_has_bits;
1619
1620 if (from._internal_has_local_topology()) {
1621 _this->_internal_mutable_local_topology()->::xla::LocalTopologyProto::MergeFrom(
1622 from._internal_local_topology());
1623 }
1624 if (from._internal_session_id() != 0) {
1625 _this->_internal_set_session_id(from._internal_session_id());
1626 }
1627 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1628 }
1629
CopyFrom(const EnumerateDevicesRequest & from)1630 void EnumerateDevicesRequest::CopyFrom(const EnumerateDevicesRequest& from) {
1631 // @@protoc_insertion_point(class_specific_copy_from_start:xla.EnumerateDevicesRequest)
1632 if (&from == this) return;
1633 Clear();
1634 MergeFrom(from);
1635 }
1636
IsInitialized() const1637 bool EnumerateDevicesRequest::IsInitialized() const {
1638 return true;
1639 }
1640
InternalSwap(EnumerateDevicesRequest * other)1641 void EnumerateDevicesRequest::InternalSwap(EnumerateDevicesRequest* other) {
1642 using std::swap;
1643 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1644 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1645 PROTOBUF_FIELD_OFFSET(EnumerateDevicesRequest, _impl_.session_id_)
1646 + sizeof(EnumerateDevicesRequest::_impl_.session_id_) // NOLINT
1647 - PROTOBUF_FIELD_OFFSET(EnumerateDevicesRequest, _impl_.local_topology_)>(
1648 reinterpret_cast<char*>(&_impl_.local_topology_),
1649 reinterpret_cast<char*>(&other->_impl_.local_topology_));
1650 }
1651
GetTypeName() const1652 std::string EnumerateDevicesRequest::GetTypeName() const {
1653 return "xla.EnumerateDevicesRequest";
1654 }
1655
1656
1657 // ===================================================================
1658
1659 class EnumerateDevicesResponse::_Internal {
1660 public:
1661 static const ::xla::GlobalTopologyProto& global_topology(const EnumerateDevicesResponse* msg);
1662 };
1663
1664 const ::xla::GlobalTopologyProto&
global_topology(const EnumerateDevicesResponse * msg)1665 EnumerateDevicesResponse::_Internal::global_topology(const EnumerateDevicesResponse* msg) {
1666 return *msg->_impl_.global_topology_;
1667 }
EnumerateDevicesResponse(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1668 EnumerateDevicesResponse::EnumerateDevicesResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1669 bool is_message_owned)
1670 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1671 SharedCtor(arena, is_message_owned);
1672 // @@protoc_insertion_point(arena_constructor:xla.EnumerateDevicesResponse)
1673 }
EnumerateDevicesResponse(const EnumerateDevicesResponse & from)1674 EnumerateDevicesResponse::EnumerateDevicesResponse(const EnumerateDevicesResponse& from)
1675 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1676 EnumerateDevicesResponse* const _this = this; (void)_this;
1677 new (&_impl_) Impl_{
1678 decltype(_impl_.global_topology_){nullptr}
1679 , /*decltype(_impl_._cached_size_)*/{}};
1680
1681 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1682 if (from._internal_has_global_topology()) {
1683 _this->_impl_.global_topology_ = new ::xla::GlobalTopologyProto(*from._impl_.global_topology_);
1684 }
1685 // @@protoc_insertion_point(copy_constructor:xla.EnumerateDevicesResponse)
1686 }
1687
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1688 inline void EnumerateDevicesResponse::SharedCtor(
1689 ::_pb::Arena* arena, bool is_message_owned) {
1690 (void)arena;
1691 (void)is_message_owned;
1692 new (&_impl_) Impl_{
1693 decltype(_impl_.global_topology_){nullptr}
1694 , /*decltype(_impl_._cached_size_)*/{}
1695 };
1696 }
1697
~EnumerateDevicesResponse()1698 EnumerateDevicesResponse::~EnumerateDevicesResponse() {
1699 // @@protoc_insertion_point(destructor:xla.EnumerateDevicesResponse)
1700 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1701 (void)arena;
1702 return;
1703 }
1704 SharedDtor();
1705 }
1706
SharedDtor()1707 inline void EnumerateDevicesResponse::SharedDtor() {
1708 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1709 if (this != internal_default_instance()) delete _impl_.global_topology_;
1710 }
1711
SetCachedSize(int size) const1712 void EnumerateDevicesResponse::SetCachedSize(int size) const {
1713 _impl_._cached_size_.Set(size);
1714 }
1715
Clear()1716 void EnumerateDevicesResponse::Clear() {
1717 // @@protoc_insertion_point(message_clear_start:xla.EnumerateDevicesResponse)
1718 ::uint32_t cached_has_bits = 0;
1719 // Prevent compiler warnings about cached_has_bits being unused
1720 (void) cached_has_bits;
1721
1722 if (GetArenaForAllocation() == nullptr && _impl_.global_topology_ != nullptr) {
1723 delete _impl_.global_topology_;
1724 }
1725 _impl_.global_topology_ = nullptr;
1726 _internal_metadata_.Clear<std::string>();
1727 }
1728
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1729 const char* EnumerateDevicesResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1730 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1731 while (!ctx->Done(&ptr)) {
1732 ::uint32_t tag;
1733 ptr = ::_pbi::ReadTag(ptr, &tag);
1734 switch (tag >> 3) {
1735 // .xla.GlobalTopologyProto global_topology = 1;
1736 case 1:
1737 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1738 ptr = ctx->ParseMessage(_internal_mutable_global_topology(), ptr);
1739 CHK_(ptr);
1740 } else {
1741 goto handle_unusual;
1742 }
1743 continue;
1744 default:
1745 goto handle_unusual;
1746 } // switch
1747 handle_unusual:
1748 if ((tag == 0) || ((tag & 7) == 4)) {
1749 CHK_(ptr);
1750 ctx->SetLastTag(tag);
1751 goto message_done;
1752 }
1753 ptr = UnknownFieldParse(
1754 tag,
1755 _internal_metadata_.mutable_unknown_fields<std::string>(),
1756 ptr, ctx);
1757 CHK_(ptr != nullptr);
1758 } // while
1759 message_done:
1760 return ptr;
1761 failure:
1762 ptr = nullptr;
1763 goto message_done;
1764 #undef CHK_
1765 }
1766
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1767 ::uint8_t* EnumerateDevicesResponse::_InternalSerialize(
1768 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1769 // @@protoc_insertion_point(serialize_to_array_start:xla.EnumerateDevicesResponse)
1770 ::uint32_t cached_has_bits = 0;
1771 (void) cached_has_bits;
1772
1773 // .xla.GlobalTopologyProto global_topology = 1;
1774 if (this->_internal_has_global_topology()) {
1775 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1776 InternalWriteMessage(1, _Internal::global_topology(this),
1777 _Internal::global_topology(this).GetCachedSize(), target, stream);
1778 }
1779
1780 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1781 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1782 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1783 }
1784 // @@protoc_insertion_point(serialize_to_array_end:xla.EnumerateDevicesResponse)
1785 return target;
1786 }
1787
ByteSizeLong() const1788 size_t EnumerateDevicesResponse::ByteSizeLong() const {
1789 // @@protoc_insertion_point(message_byte_size_start:xla.EnumerateDevicesResponse)
1790 size_t total_size = 0;
1791
1792 ::uint32_t cached_has_bits = 0;
1793 // Prevent compiler warnings about cached_has_bits being unused
1794 (void) cached_has_bits;
1795
1796 // .xla.GlobalTopologyProto global_topology = 1;
1797 if (this->_internal_has_global_topology()) {
1798 total_size += 1 +
1799 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1800 *_impl_.global_topology_);
1801 }
1802
1803 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1804 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1805 }
1806 int cached_size = ::_pbi::ToCachedSize(total_size);
1807 SetCachedSize(cached_size);
1808 return total_size;
1809 }
1810
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1811 void EnumerateDevicesResponse::CheckTypeAndMergeFrom(
1812 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1813 MergeFrom(*::_pbi::DownCast<const EnumerateDevicesResponse*>(
1814 &from));
1815 }
1816
MergeFrom(const EnumerateDevicesResponse & from)1817 void EnumerateDevicesResponse::MergeFrom(const EnumerateDevicesResponse& from) {
1818 EnumerateDevicesResponse* const _this = this;
1819 // @@protoc_insertion_point(class_specific_merge_from_start:xla.EnumerateDevicesResponse)
1820 GOOGLE_DCHECK_NE(&from, _this);
1821 ::uint32_t cached_has_bits = 0;
1822 (void) cached_has_bits;
1823
1824 if (from._internal_has_global_topology()) {
1825 _this->_internal_mutable_global_topology()->::xla::GlobalTopologyProto::MergeFrom(
1826 from._internal_global_topology());
1827 }
1828 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1829 }
1830
CopyFrom(const EnumerateDevicesResponse & from)1831 void EnumerateDevicesResponse::CopyFrom(const EnumerateDevicesResponse& from) {
1832 // @@protoc_insertion_point(class_specific_copy_from_start:xla.EnumerateDevicesResponse)
1833 if (&from == this) return;
1834 Clear();
1835 MergeFrom(from);
1836 }
1837
IsInitialized() const1838 bool EnumerateDevicesResponse::IsInitialized() const {
1839 return true;
1840 }
1841
InternalSwap(EnumerateDevicesResponse * other)1842 void EnumerateDevicesResponse::InternalSwap(EnumerateDevicesResponse* other) {
1843 using std::swap;
1844 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1845 swap(_impl_.global_topology_, other->_impl_.global_topology_);
1846 }
1847
GetTypeName() const1848 std::string EnumerateDevicesResponse::GetTypeName() const {
1849 return "xla.EnumerateDevicesResponse";
1850 }
1851
1852
1853 // ===================================================================
1854
1855 class KeyValueGetRequest::_Internal {
1856 public:
1857 };
1858
KeyValueGetRequest(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1859 KeyValueGetRequest::KeyValueGetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1860 bool is_message_owned)
1861 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1862 SharedCtor(arena, is_message_owned);
1863 // @@protoc_insertion_point(arena_constructor:xla.KeyValueGetRequest)
1864 }
KeyValueGetRequest(const KeyValueGetRequest & from)1865 KeyValueGetRequest::KeyValueGetRequest(const KeyValueGetRequest& from)
1866 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1867 KeyValueGetRequest* const _this = this; (void)_this;
1868 new (&_impl_) Impl_{
1869 decltype(_impl_.key_){}
1870 , decltype(_impl_.session_id_){}
1871 , decltype(_impl_.timeout_milliseconds_){}
1872 , /*decltype(_impl_._cached_size_)*/{}};
1873
1874 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1875 _impl_.key_.InitDefault();
1876 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1877 _impl_.key_.Set("", GetArenaForAllocation());
1878 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1879 if (!from._internal_key().empty()) {
1880 _this->_impl_.key_.Set(from._internal_key(),
1881 _this->GetArenaForAllocation());
1882 }
1883 ::memcpy(&_impl_.session_id_, &from._impl_.session_id_,
1884 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.timeout_milliseconds_) -
1885 reinterpret_cast<char*>(&_impl_.session_id_)) + sizeof(_impl_.timeout_milliseconds_));
1886 // @@protoc_insertion_point(copy_constructor:xla.KeyValueGetRequest)
1887 }
1888
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1889 inline void KeyValueGetRequest::SharedCtor(
1890 ::_pb::Arena* arena, bool is_message_owned) {
1891 (void)arena;
1892 (void)is_message_owned;
1893 new (&_impl_) Impl_{
1894 decltype(_impl_.key_){}
1895 , decltype(_impl_.session_id_){::uint64_t{0u}}
1896 , decltype(_impl_.timeout_milliseconds_){0}
1897 , /*decltype(_impl_._cached_size_)*/{}
1898 };
1899 _impl_.key_.InitDefault();
1900 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1901 _impl_.key_.Set("", GetArenaForAllocation());
1902 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1903 }
1904
~KeyValueGetRequest()1905 KeyValueGetRequest::~KeyValueGetRequest() {
1906 // @@protoc_insertion_point(destructor:xla.KeyValueGetRequest)
1907 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1908 (void)arena;
1909 return;
1910 }
1911 SharedDtor();
1912 }
1913
SharedDtor()1914 inline void KeyValueGetRequest::SharedDtor() {
1915 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1916 _impl_.key_.Destroy();
1917 }
1918
SetCachedSize(int size) const1919 void KeyValueGetRequest::SetCachedSize(int size) const {
1920 _impl_._cached_size_.Set(size);
1921 }
1922
Clear()1923 void KeyValueGetRequest::Clear() {
1924 // @@protoc_insertion_point(message_clear_start:xla.KeyValueGetRequest)
1925 ::uint32_t cached_has_bits = 0;
1926 // Prevent compiler warnings about cached_has_bits being unused
1927 (void) cached_has_bits;
1928
1929 _impl_.key_.ClearToEmpty();
1930 ::memset(&_impl_.session_id_, 0, static_cast<size_t>(
1931 reinterpret_cast<char*>(&_impl_.timeout_milliseconds_) -
1932 reinterpret_cast<char*>(&_impl_.session_id_)) + sizeof(_impl_.timeout_milliseconds_));
1933 _internal_metadata_.Clear<std::string>();
1934 }
1935
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1936 const char* KeyValueGetRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1937 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1938 while (!ctx->Done(&ptr)) {
1939 ::uint32_t tag;
1940 ptr = ::_pbi::ReadTag(ptr, &tag);
1941 switch (tag >> 3) {
1942 // uint64 session_id = 1;
1943 case 1:
1944 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1945 _impl_.session_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1946 CHK_(ptr);
1947 } else {
1948 goto handle_unusual;
1949 }
1950 continue;
1951 // bytes key = 2;
1952 case 2:
1953 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1954 auto str = _internal_mutable_key();
1955 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1956 CHK_(ptr);
1957 } else {
1958 goto handle_unusual;
1959 }
1960 continue;
1961 // int32 timeout_milliseconds = 3;
1962 case 3:
1963 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1964 _impl_.timeout_milliseconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1965 CHK_(ptr);
1966 } else {
1967 goto handle_unusual;
1968 }
1969 continue;
1970 default:
1971 goto handle_unusual;
1972 } // switch
1973 handle_unusual:
1974 if ((tag == 0) || ((tag & 7) == 4)) {
1975 CHK_(ptr);
1976 ctx->SetLastTag(tag);
1977 goto message_done;
1978 }
1979 ptr = UnknownFieldParse(
1980 tag,
1981 _internal_metadata_.mutable_unknown_fields<std::string>(),
1982 ptr, ctx);
1983 CHK_(ptr != nullptr);
1984 } // while
1985 message_done:
1986 return ptr;
1987 failure:
1988 ptr = nullptr;
1989 goto message_done;
1990 #undef CHK_
1991 }
1992
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1993 ::uint8_t* KeyValueGetRequest::_InternalSerialize(
1994 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1995 // @@protoc_insertion_point(serialize_to_array_start:xla.KeyValueGetRequest)
1996 ::uint32_t cached_has_bits = 0;
1997 (void) cached_has_bits;
1998
1999 // uint64 session_id = 1;
2000 if (this->_internal_session_id() != 0) {
2001 target = stream->EnsureSpace(target);
2002 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_session_id(), target);
2003 }
2004
2005 // bytes key = 2;
2006 if (!this->_internal_key().empty()) {
2007 target = stream->WriteBytesMaybeAliased(
2008 2, this->_internal_key(), target);
2009 }
2010
2011 // int32 timeout_milliseconds = 3;
2012 if (this->_internal_timeout_milliseconds() != 0) {
2013 target = stream->EnsureSpace(target);
2014 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_timeout_milliseconds(), target);
2015 }
2016
2017 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2018 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2019 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2020 }
2021 // @@protoc_insertion_point(serialize_to_array_end:xla.KeyValueGetRequest)
2022 return target;
2023 }
2024
ByteSizeLong() const2025 size_t KeyValueGetRequest::ByteSizeLong() const {
2026 // @@protoc_insertion_point(message_byte_size_start:xla.KeyValueGetRequest)
2027 size_t total_size = 0;
2028
2029 ::uint32_t cached_has_bits = 0;
2030 // Prevent compiler warnings about cached_has_bits being unused
2031 (void) cached_has_bits;
2032
2033 // bytes key = 2;
2034 if (!this->_internal_key().empty()) {
2035 total_size += 1 +
2036 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
2037 this->_internal_key());
2038 }
2039
2040 // uint64 session_id = 1;
2041 if (this->_internal_session_id() != 0) {
2042 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_session_id());
2043 }
2044
2045 // int32 timeout_milliseconds = 3;
2046 if (this->_internal_timeout_milliseconds() != 0) {
2047 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_timeout_milliseconds());
2048 }
2049
2050 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2051 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2052 }
2053 int cached_size = ::_pbi::ToCachedSize(total_size);
2054 SetCachedSize(cached_size);
2055 return total_size;
2056 }
2057
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2058 void KeyValueGetRequest::CheckTypeAndMergeFrom(
2059 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2060 MergeFrom(*::_pbi::DownCast<const KeyValueGetRequest*>(
2061 &from));
2062 }
2063
MergeFrom(const KeyValueGetRequest & from)2064 void KeyValueGetRequest::MergeFrom(const KeyValueGetRequest& from) {
2065 KeyValueGetRequest* const _this = this;
2066 // @@protoc_insertion_point(class_specific_merge_from_start:xla.KeyValueGetRequest)
2067 GOOGLE_DCHECK_NE(&from, _this);
2068 ::uint32_t cached_has_bits = 0;
2069 (void) cached_has_bits;
2070
2071 if (!from._internal_key().empty()) {
2072 _this->_internal_set_key(from._internal_key());
2073 }
2074 if (from._internal_session_id() != 0) {
2075 _this->_internal_set_session_id(from._internal_session_id());
2076 }
2077 if (from._internal_timeout_milliseconds() != 0) {
2078 _this->_internal_set_timeout_milliseconds(from._internal_timeout_milliseconds());
2079 }
2080 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2081 }
2082
CopyFrom(const KeyValueGetRequest & from)2083 void KeyValueGetRequest::CopyFrom(const KeyValueGetRequest& from) {
2084 // @@protoc_insertion_point(class_specific_copy_from_start:xla.KeyValueGetRequest)
2085 if (&from == this) return;
2086 Clear();
2087 MergeFrom(from);
2088 }
2089
IsInitialized() const2090 bool KeyValueGetRequest::IsInitialized() const {
2091 return true;
2092 }
2093
InternalSwap(KeyValueGetRequest * other)2094 void KeyValueGetRequest::InternalSwap(KeyValueGetRequest* other) {
2095 using std::swap;
2096 auto* lhs_arena = GetArenaForAllocation();
2097 auto* rhs_arena = other->GetArenaForAllocation();
2098 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2099 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2100 &_impl_.key_, lhs_arena,
2101 &other->_impl_.key_, rhs_arena
2102 );
2103 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2104 PROTOBUF_FIELD_OFFSET(KeyValueGetRequest, _impl_.timeout_milliseconds_)
2105 + sizeof(KeyValueGetRequest::_impl_.timeout_milliseconds_) // NOLINT
2106 - PROTOBUF_FIELD_OFFSET(KeyValueGetRequest, _impl_.session_id_)>(
2107 reinterpret_cast<char*>(&_impl_.session_id_),
2108 reinterpret_cast<char*>(&other->_impl_.session_id_));
2109 }
2110
GetTypeName() const2111 std::string KeyValueGetRequest::GetTypeName() const {
2112 return "xla.KeyValueGetRequest";
2113 }
2114
2115
2116 // ===================================================================
2117
2118 class KeyValueGetResponse::_Internal {
2119 public:
2120 };
2121
KeyValueGetResponse(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2122 KeyValueGetResponse::KeyValueGetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2123 bool is_message_owned)
2124 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2125 SharedCtor(arena, is_message_owned);
2126 // @@protoc_insertion_point(arena_constructor:xla.KeyValueGetResponse)
2127 }
KeyValueGetResponse(const KeyValueGetResponse & from)2128 KeyValueGetResponse::KeyValueGetResponse(const KeyValueGetResponse& from)
2129 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2130 KeyValueGetResponse* const _this = this; (void)_this;
2131 new (&_impl_) Impl_{
2132 decltype(_impl_.value_){}
2133 , decltype(_impl_.found_){}
2134 , /*decltype(_impl_._cached_size_)*/{}};
2135
2136 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2137 _impl_.value_.InitDefault();
2138 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2139 _impl_.value_.Set("", GetArenaForAllocation());
2140 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2141 if (!from._internal_value().empty()) {
2142 _this->_impl_.value_.Set(from._internal_value(),
2143 _this->GetArenaForAllocation());
2144 }
2145 _this->_impl_.found_ = from._impl_.found_;
2146 // @@protoc_insertion_point(copy_constructor:xla.KeyValueGetResponse)
2147 }
2148
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2149 inline void KeyValueGetResponse::SharedCtor(
2150 ::_pb::Arena* arena, bool is_message_owned) {
2151 (void)arena;
2152 (void)is_message_owned;
2153 new (&_impl_) Impl_{
2154 decltype(_impl_.value_){}
2155 , decltype(_impl_.found_){false}
2156 , /*decltype(_impl_._cached_size_)*/{}
2157 };
2158 _impl_.value_.InitDefault();
2159 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2160 _impl_.value_.Set("", GetArenaForAllocation());
2161 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2162 }
2163
~KeyValueGetResponse()2164 KeyValueGetResponse::~KeyValueGetResponse() {
2165 // @@protoc_insertion_point(destructor:xla.KeyValueGetResponse)
2166 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2167 (void)arena;
2168 return;
2169 }
2170 SharedDtor();
2171 }
2172
SharedDtor()2173 inline void KeyValueGetResponse::SharedDtor() {
2174 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2175 _impl_.value_.Destroy();
2176 }
2177
SetCachedSize(int size) const2178 void KeyValueGetResponse::SetCachedSize(int size) const {
2179 _impl_._cached_size_.Set(size);
2180 }
2181
Clear()2182 void KeyValueGetResponse::Clear() {
2183 // @@protoc_insertion_point(message_clear_start:xla.KeyValueGetResponse)
2184 ::uint32_t cached_has_bits = 0;
2185 // Prevent compiler warnings about cached_has_bits being unused
2186 (void) cached_has_bits;
2187
2188 _impl_.value_.ClearToEmpty();
2189 _impl_.found_ = false;
2190 _internal_metadata_.Clear<std::string>();
2191 }
2192
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2193 const char* KeyValueGetResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2194 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2195 while (!ctx->Done(&ptr)) {
2196 ::uint32_t tag;
2197 ptr = ::_pbi::ReadTag(ptr, &tag);
2198 switch (tag >> 3) {
2199 // bool found = 1;
2200 case 1:
2201 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2202 _impl_.found_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2203 CHK_(ptr);
2204 } else {
2205 goto handle_unusual;
2206 }
2207 continue;
2208 // bytes value = 2;
2209 case 2:
2210 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2211 auto str = _internal_mutable_value();
2212 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2213 CHK_(ptr);
2214 } else {
2215 goto handle_unusual;
2216 }
2217 continue;
2218 default:
2219 goto handle_unusual;
2220 } // switch
2221 handle_unusual:
2222 if ((tag == 0) || ((tag & 7) == 4)) {
2223 CHK_(ptr);
2224 ctx->SetLastTag(tag);
2225 goto message_done;
2226 }
2227 ptr = UnknownFieldParse(
2228 tag,
2229 _internal_metadata_.mutable_unknown_fields<std::string>(),
2230 ptr, ctx);
2231 CHK_(ptr != nullptr);
2232 } // while
2233 message_done:
2234 return ptr;
2235 failure:
2236 ptr = nullptr;
2237 goto message_done;
2238 #undef CHK_
2239 }
2240
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2241 ::uint8_t* KeyValueGetResponse::_InternalSerialize(
2242 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2243 // @@protoc_insertion_point(serialize_to_array_start:xla.KeyValueGetResponse)
2244 ::uint32_t cached_has_bits = 0;
2245 (void) cached_has_bits;
2246
2247 // bool found = 1;
2248 if (this->_internal_found() != 0) {
2249 target = stream->EnsureSpace(target);
2250 target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_found(), target);
2251 }
2252
2253 // bytes value = 2;
2254 if (!this->_internal_value().empty()) {
2255 target = stream->WriteBytesMaybeAliased(
2256 2, this->_internal_value(), target);
2257 }
2258
2259 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2260 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2261 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2262 }
2263 // @@protoc_insertion_point(serialize_to_array_end:xla.KeyValueGetResponse)
2264 return target;
2265 }
2266
ByteSizeLong() const2267 size_t KeyValueGetResponse::ByteSizeLong() const {
2268 // @@protoc_insertion_point(message_byte_size_start:xla.KeyValueGetResponse)
2269 size_t total_size = 0;
2270
2271 ::uint32_t cached_has_bits = 0;
2272 // Prevent compiler warnings about cached_has_bits being unused
2273 (void) cached_has_bits;
2274
2275 // bytes value = 2;
2276 if (!this->_internal_value().empty()) {
2277 total_size += 1 +
2278 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
2279 this->_internal_value());
2280 }
2281
2282 // bool found = 1;
2283 if (this->_internal_found() != 0) {
2284 total_size += 1 + 1;
2285 }
2286
2287 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2288 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2289 }
2290 int cached_size = ::_pbi::ToCachedSize(total_size);
2291 SetCachedSize(cached_size);
2292 return total_size;
2293 }
2294
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2295 void KeyValueGetResponse::CheckTypeAndMergeFrom(
2296 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2297 MergeFrom(*::_pbi::DownCast<const KeyValueGetResponse*>(
2298 &from));
2299 }
2300
MergeFrom(const KeyValueGetResponse & from)2301 void KeyValueGetResponse::MergeFrom(const KeyValueGetResponse& from) {
2302 KeyValueGetResponse* const _this = this;
2303 // @@protoc_insertion_point(class_specific_merge_from_start:xla.KeyValueGetResponse)
2304 GOOGLE_DCHECK_NE(&from, _this);
2305 ::uint32_t cached_has_bits = 0;
2306 (void) cached_has_bits;
2307
2308 if (!from._internal_value().empty()) {
2309 _this->_internal_set_value(from._internal_value());
2310 }
2311 if (from._internal_found() != 0) {
2312 _this->_internal_set_found(from._internal_found());
2313 }
2314 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2315 }
2316
CopyFrom(const KeyValueGetResponse & from)2317 void KeyValueGetResponse::CopyFrom(const KeyValueGetResponse& from) {
2318 // @@protoc_insertion_point(class_specific_copy_from_start:xla.KeyValueGetResponse)
2319 if (&from == this) return;
2320 Clear();
2321 MergeFrom(from);
2322 }
2323
IsInitialized() const2324 bool KeyValueGetResponse::IsInitialized() const {
2325 return true;
2326 }
2327
InternalSwap(KeyValueGetResponse * other)2328 void KeyValueGetResponse::InternalSwap(KeyValueGetResponse* other) {
2329 using std::swap;
2330 auto* lhs_arena = GetArenaForAllocation();
2331 auto* rhs_arena = other->GetArenaForAllocation();
2332 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2333 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2334 &_impl_.value_, lhs_arena,
2335 &other->_impl_.value_, rhs_arena
2336 );
2337 swap(_impl_.found_, other->_impl_.found_);
2338 }
2339
GetTypeName() const2340 std::string KeyValueGetResponse::GetTypeName() const {
2341 return "xla.KeyValueGetResponse";
2342 }
2343
2344
2345 // ===================================================================
2346
2347 class KeyValueSetRequest::_Internal {
2348 public:
2349 };
2350
KeyValueSetRequest(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2351 KeyValueSetRequest::KeyValueSetRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2352 bool is_message_owned)
2353 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2354 SharedCtor(arena, is_message_owned);
2355 // @@protoc_insertion_point(arena_constructor:xla.KeyValueSetRequest)
2356 }
KeyValueSetRequest(const KeyValueSetRequest & from)2357 KeyValueSetRequest::KeyValueSetRequest(const KeyValueSetRequest& from)
2358 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2359 KeyValueSetRequest* const _this = this; (void)_this;
2360 new (&_impl_) Impl_{
2361 decltype(_impl_.key_){}
2362 , decltype(_impl_.value_){}
2363 , decltype(_impl_.session_id_){}
2364 , /*decltype(_impl_._cached_size_)*/{}};
2365
2366 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2367 _impl_.key_.InitDefault();
2368 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2369 _impl_.key_.Set("", GetArenaForAllocation());
2370 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2371 if (!from._internal_key().empty()) {
2372 _this->_impl_.key_.Set(from._internal_key(),
2373 _this->GetArenaForAllocation());
2374 }
2375 _impl_.value_.InitDefault();
2376 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2377 _impl_.value_.Set("", GetArenaForAllocation());
2378 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2379 if (!from._internal_value().empty()) {
2380 _this->_impl_.value_.Set(from._internal_value(),
2381 _this->GetArenaForAllocation());
2382 }
2383 _this->_impl_.session_id_ = from._impl_.session_id_;
2384 // @@protoc_insertion_point(copy_constructor:xla.KeyValueSetRequest)
2385 }
2386
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2387 inline void KeyValueSetRequest::SharedCtor(
2388 ::_pb::Arena* arena, bool is_message_owned) {
2389 (void)arena;
2390 (void)is_message_owned;
2391 new (&_impl_) Impl_{
2392 decltype(_impl_.key_){}
2393 , decltype(_impl_.value_){}
2394 , decltype(_impl_.session_id_){::uint64_t{0u}}
2395 , /*decltype(_impl_._cached_size_)*/{}
2396 };
2397 _impl_.key_.InitDefault();
2398 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2399 _impl_.key_.Set("", GetArenaForAllocation());
2400 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2401 _impl_.value_.InitDefault();
2402 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2403 _impl_.value_.Set("", GetArenaForAllocation());
2404 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2405 }
2406
~KeyValueSetRequest()2407 KeyValueSetRequest::~KeyValueSetRequest() {
2408 // @@protoc_insertion_point(destructor:xla.KeyValueSetRequest)
2409 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2410 (void)arena;
2411 return;
2412 }
2413 SharedDtor();
2414 }
2415
SharedDtor()2416 inline void KeyValueSetRequest::SharedDtor() {
2417 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2418 _impl_.key_.Destroy();
2419 _impl_.value_.Destroy();
2420 }
2421
SetCachedSize(int size) const2422 void KeyValueSetRequest::SetCachedSize(int size) const {
2423 _impl_._cached_size_.Set(size);
2424 }
2425
Clear()2426 void KeyValueSetRequest::Clear() {
2427 // @@protoc_insertion_point(message_clear_start:xla.KeyValueSetRequest)
2428 ::uint32_t cached_has_bits = 0;
2429 // Prevent compiler warnings about cached_has_bits being unused
2430 (void) cached_has_bits;
2431
2432 _impl_.key_.ClearToEmpty();
2433 _impl_.value_.ClearToEmpty();
2434 _impl_.session_id_ = ::uint64_t{0u};
2435 _internal_metadata_.Clear<std::string>();
2436 }
2437
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2438 const char* KeyValueSetRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2439 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2440 while (!ctx->Done(&ptr)) {
2441 ::uint32_t tag;
2442 ptr = ::_pbi::ReadTag(ptr, &tag);
2443 switch (tag >> 3) {
2444 // uint64 session_id = 1;
2445 case 1:
2446 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2447 _impl_.session_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2448 CHK_(ptr);
2449 } else {
2450 goto handle_unusual;
2451 }
2452 continue;
2453 // bytes key = 2;
2454 case 2:
2455 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2456 auto str = _internal_mutable_key();
2457 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2458 CHK_(ptr);
2459 } else {
2460 goto handle_unusual;
2461 }
2462 continue;
2463 // bytes value = 3;
2464 case 3:
2465 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2466 auto str = _internal_mutable_value();
2467 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2468 CHK_(ptr);
2469 } else {
2470 goto handle_unusual;
2471 }
2472 continue;
2473 default:
2474 goto handle_unusual;
2475 } // switch
2476 handle_unusual:
2477 if ((tag == 0) || ((tag & 7) == 4)) {
2478 CHK_(ptr);
2479 ctx->SetLastTag(tag);
2480 goto message_done;
2481 }
2482 ptr = UnknownFieldParse(
2483 tag,
2484 _internal_metadata_.mutable_unknown_fields<std::string>(),
2485 ptr, ctx);
2486 CHK_(ptr != nullptr);
2487 } // while
2488 message_done:
2489 return ptr;
2490 failure:
2491 ptr = nullptr;
2492 goto message_done;
2493 #undef CHK_
2494 }
2495
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2496 ::uint8_t* KeyValueSetRequest::_InternalSerialize(
2497 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2498 // @@protoc_insertion_point(serialize_to_array_start:xla.KeyValueSetRequest)
2499 ::uint32_t cached_has_bits = 0;
2500 (void) cached_has_bits;
2501
2502 // uint64 session_id = 1;
2503 if (this->_internal_session_id() != 0) {
2504 target = stream->EnsureSpace(target);
2505 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_session_id(), target);
2506 }
2507
2508 // bytes key = 2;
2509 if (!this->_internal_key().empty()) {
2510 target = stream->WriteBytesMaybeAliased(
2511 2, this->_internal_key(), target);
2512 }
2513
2514 // bytes value = 3;
2515 if (!this->_internal_value().empty()) {
2516 target = stream->WriteBytesMaybeAliased(
2517 3, this->_internal_value(), target);
2518 }
2519
2520 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2521 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2522 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2523 }
2524 // @@protoc_insertion_point(serialize_to_array_end:xla.KeyValueSetRequest)
2525 return target;
2526 }
2527
ByteSizeLong() const2528 size_t KeyValueSetRequest::ByteSizeLong() const {
2529 // @@protoc_insertion_point(message_byte_size_start:xla.KeyValueSetRequest)
2530 size_t total_size = 0;
2531
2532 ::uint32_t cached_has_bits = 0;
2533 // Prevent compiler warnings about cached_has_bits being unused
2534 (void) cached_has_bits;
2535
2536 // bytes key = 2;
2537 if (!this->_internal_key().empty()) {
2538 total_size += 1 +
2539 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
2540 this->_internal_key());
2541 }
2542
2543 // bytes value = 3;
2544 if (!this->_internal_value().empty()) {
2545 total_size += 1 +
2546 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
2547 this->_internal_value());
2548 }
2549
2550 // uint64 session_id = 1;
2551 if (this->_internal_session_id() != 0) {
2552 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_session_id());
2553 }
2554
2555 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2556 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2557 }
2558 int cached_size = ::_pbi::ToCachedSize(total_size);
2559 SetCachedSize(cached_size);
2560 return total_size;
2561 }
2562
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2563 void KeyValueSetRequest::CheckTypeAndMergeFrom(
2564 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2565 MergeFrom(*::_pbi::DownCast<const KeyValueSetRequest*>(
2566 &from));
2567 }
2568
MergeFrom(const KeyValueSetRequest & from)2569 void KeyValueSetRequest::MergeFrom(const KeyValueSetRequest& from) {
2570 KeyValueSetRequest* const _this = this;
2571 // @@protoc_insertion_point(class_specific_merge_from_start:xla.KeyValueSetRequest)
2572 GOOGLE_DCHECK_NE(&from, _this);
2573 ::uint32_t cached_has_bits = 0;
2574 (void) cached_has_bits;
2575
2576 if (!from._internal_key().empty()) {
2577 _this->_internal_set_key(from._internal_key());
2578 }
2579 if (!from._internal_value().empty()) {
2580 _this->_internal_set_value(from._internal_value());
2581 }
2582 if (from._internal_session_id() != 0) {
2583 _this->_internal_set_session_id(from._internal_session_id());
2584 }
2585 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2586 }
2587
CopyFrom(const KeyValueSetRequest & from)2588 void KeyValueSetRequest::CopyFrom(const KeyValueSetRequest& from) {
2589 // @@protoc_insertion_point(class_specific_copy_from_start:xla.KeyValueSetRequest)
2590 if (&from == this) return;
2591 Clear();
2592 MergeFrom(from);
2593 }
2594
IsInitialized() const2595 bool KeyValueSetRequest::IsInitialized() const {
2596 return true;
2597 }
2598
InternalSwap(KeyValueSetRequest * other)2599 void KeyValueSetRequest::InternalSwap(KeyValueSetRequest* other) {
2600 using std::swap;
2601 auto* lhs_arena = GetArenaForAllocation();
2602 auto* rhs_arena = other->GetArenaForAllocation();
2603 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2604 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2605 &_impl_.key_, lhs_arena,
2606 &other->_impl_.key_, rhs_arena
2607 );
2608 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2609 &_impl_.value_, lhs_arena,
2610 &other->_impl_.value_, rhs_arena
2611 );
2612 swap(_impl_.session_id_, other->_impl_.session_id_);
2613 }
2614
GetTypeName() const2615 std::string KeyValueSetRequest::GetTypeName() const {
2616 return "xla.KeyValueSetRequest";
2617 }
2618
2619
2620 // ===================================================================
2621
2622 class KeyValueSetResponse::_Internal {
2623 public:
2624 };
2625
KeyValueSetResponse(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2626 KeyValueSetResponse::KeyValueSetResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2627 bool is_message_owned)
2628 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2629 SharedCtor(arena, is_message_owned);
2630 // @@protoc_insertion_point(arena_constructor:xla.KeyValueSetResponse)
2631 }
KeyValueSetResponse(const KeyValueSetResponse & from)2632 KeyValueSetResponse::KeyValueSetResponse(const KeyValueSetResponse& from)
2633 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2634 KeyValueSetResponse* const _this = this; (void)_this;
2635 new (&_impl_) Impl_{
2636 /*decltype(_impl_._cached_size_)*/{}};
2637
2638 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2639 // @@protoc_insertion_point(copy_constructor:xla.KeyValueSetResponse)
2640 }
2641
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2642 inline void KeyValueSetResponse::SharedCtor(
2643 ::_pb::Arena* arena, bool is_message_owned) {
2644 (void)arena;
2645 (void)is_message_owned;
2646 new (&_impl_) Impl_{
2647 /*decltype(_impl_._cached_size_)*/{}
2648 };
2649 }
2650
~KeyValueSetResponse()2651 KeyValueSetResponse::~KeyValueSetResponse() {
2652 // @@protoc_insertion_point(destructor:xla.KeyValueSetResponse)
2653 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2654 (void)arena;
2655 return;
2656 }
2657 SharedDtor();
2658 }
2659
SharedDtor()2660 inline void KeyValueSetResponse::SharedDtor() {
2661 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2662 }
2663
SetCachedSize(int size) const2664 void KeyValueSetResponse::SetCachedSize(int size) const {
2665 _impl_._cached_size_.Set(size);
2666 }
2667
Clear()2668 void KeyValueSetResponse::Clear() {
2669 // @@protoc_insertion_point(message_clear_start:xla.KeyValueSetResponse)
2670 ::uint32_t cached_has_bits = 0;
2671 // Prevent compiler warnings about cached_has_bits being unused
2672 (void) cached_has_bits;
2673
2674 _internal_metadata_.Clear<std::string>();
2675 }
2676
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2677 const char* KeyValueSetResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2678 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2679 while (!ctx->Done(&ptr)) {
2680 ::uint32_t tag;
2681 ptr = ::_pbi::ReadTag(ptr, &tag);
2682 if ((tag == 0) || ((tag & 7) == 4)) {
2683 CHK_(ptr);
2684 ctx->SetLastTag(tag);
2685 goto message_done;
2686 }
2687 ptr = UnknownFieldParse(
2688 tag,
2689 _internal_metadata_.mutable_unknown_fields<std::string>(),
2690 ptr, ctx);
2691 CHK_(ptr != nullptr);
2692 } // while
2693 message_done:
2694 return ptr;
2695 failure:
2696 ptr = nullptr;
2697 goto message_done;
2698 #undef CHK_
2699 }
2700
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2701 ::uint8_t* KeyValueSetResponse::_InternalSerialize(
2702 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2703 // @@protoc_insertion_point(serialize_to_array_start:xla.KeyValueSetResponse)
2704 ::uint32_t cached_has_bits = 0;
2705 (void) cached_has_bits;
2706
2707 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2708 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2709 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2710 }
2711 // @@protoc_insertion_point(serialize_to_array_end:xla.KeyValueSetResponse)
2712 return target;
2713 }
2714
ByteSizeLong() const2715 size_t KeyValueSetResponse::ByteSizeLong() const {
2716 // @@protoc_insertion_point(message_byte_size_start:xla.KeyValueSetResponse)
2717 size_t total_size = 0;
2718
2719 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2720 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2721 }
2722 int cached_size = ::_pbi::ToCachedSize(total_size);
2723 SetCachedSize(cached_size);
2724 return total_size;
2725 }
2726
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2727 void KeyValueSetResponse::CheckTypeAndMergeFrom(
2728 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2729 MergeFrom(*::_pbi::DownCast<const KeyValueSetResponse*>(
2730 &from));
2731 }
2732
MergeFrom(const KeyValueSetResponse & from)2733 void KeyValueSetResponse::MergeFrom(const KeyValueSetResponse& from) {
2734 KeyValueSetResponse* const _this = this;
2735 // @@protoc_insertion_point(class_specific_merge_from_start:xla.KeyValueSetResponse)
2736 GOOGLE_DCHECK_NE(&from, _this);
2737 ::uint32_t cached_has_bits = 0;
2738 (void) cached_has_bits;
2739
2740 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2741 }
2742
CopyFrom(const KeyValueSetResponse & from)2743 void KeyValueSetResponse::CopyFrom(const KeyValueSetResponse& from) {
2744 // @@protoc_insertion_point(class_specific_copy_from_start:xla.KeyValueSetResponse)
2745 if (&from == this) return;
2746 Clear();
2747 MergeFrom(from);
2748 }
2749
IsInitialized() const2750 bool KeyValueSetResponse::IsInitialized() const {
2751 return true;
2752 }
2753
InternalSwap(KeyValueSetResponse * other)2754 void KeyValueSetResponse::InternalSwap(KeyValueSetResponse* other) {
2755 using std::swap;
2756 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2757 }
2758
GetTypeName() const2759 std::string KeyValueSetResponse::GetTypeName() const {
2760 return "xla.KeyValueSetResponse";
2761 }
2762
2763
2764 // ===================================================================
2765
2766 class WaitAtBarrierRequest::_Internal {
2767 public:
2768 };
2769
WaitAtBarrierRequest(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2770 WaitAtBarrierRequest::WaitAtBarrierRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2771 bool is_message_owned)
2772 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2773 SharedCtor(arena, is_message_owned);
2774 // @@protoc_insertion_point(arena_constructor:xla.WaitAtBarrierRequest)
2775 }
WaitAtBarrierRequest(const WaitAtBarrierRequest & from)2776 WaitAtBarrierRequest::WaitAtBarrierRequest(const WaitAtBarrierRequest& from)
2777 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2778 WaitAtBarrierRequest* const _this = this; (void)_this;
2779 new (&_impl_) Impl_{
2780 decltype(_impl_.barrier_id_){}
2781 , decltype(_impl_.session_id_){}
2782 , decltype(_impl_.node_id_){}
2783 , decltype(_impl_.timeout_milliseconds_){}
2784 , /*decltype(_impl_._cached_size_)*/{}};
2785
2786 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2787 _impl_.barrier_id_.InitDefault();
2788 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2789 _impl_.barrier_id_.Set("", GetArenaForAllocation());
2790 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2791 if (!from._internal_barrier_id().empty()) {
2792 _this->_impl_.barrier_id_.Set(from._internal_barrier_id(),
2793 _this->GetArenaForAllocation());
2794 }
2795 ::memcpy(&_impl_.session_id_, &from._impl_.session_id_,
2796 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.timeout_milliseconds_) -
2797 reinterpret_cast<char*>(&_impl_.session_id_)) + sizeof(_impl_.timeout_milliseconds_));
2798 // @@protoc_insertion_point(copy_constructor:xla.WaitAtBarrierRequest)
2799 }
2800
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2801 inline void WaitAtBarrierRequest::SharedCtor(
2802 ::_pb::Arena* arena, bool is_message_owned) {
2803 (void)arena;
2804 (void)is_message_owned;
2805 new (&_impl_) Impl_{
2806 decltype(_impl_.barrier_id_){}
2807 , decltype(_impl_.session_id_){::uint64_t{0u}}
2808 , decltype(_impl_.node_id_){0}
2809 , decltype(_impl_.timeout_milliseconds_){0}
2810 , /*decltype(_impl_._cached_size_)*/{}
2811 };
2812 _impl_.barrier_id_.InitDefault();
2813 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2814 _impl_.barrier_id_.Set("", GetArenaForAllocation());
2815 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2816 }
2817
~WaitAtBarrierRequest()2818 WaitAtBarrierRequest::~WaitAtBarrierRequest() {
2819 // @@protoc_insertion_point(destructor:xla.WaitAtBarrierRequest)
2820 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2821 (void)arena;
2822 return;
2823 }
2824 SharedDtor();
2825 }
2826
SharedDtor()2827 inline void WaitAtBarrierRequest::SharedDtor() {
2828 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2829 _impl_.barrier_id_.Destroy();
2830 }
2831
SetCachedSize(int size) const2832 void WaitAtBarrierRequest::SetCachedSize(int size) const {
2833 _impl_._cached_size_.Set(size);
2834 }
2835
Clear()2836 void WaitAtBarrierRequest::Clear() {
2837 // @@protoc_insertion_point(message_clear_start:xla.WaitAtBarrierRequest)
2838 ::uint32_t cached_has_bits = 0;
2839 // Prevent compiler warnings about cached_has_bits being unused
2840 (void) cached_has_bits;
2841
2842 _impl_.barrier_id_.ClearToEmpty();
2843 ::memset(&_impl_.session_id_, 0, static_cast<size_t>(
2844 reinterpret_cast<char*>(&_impl_.timeout_milliseconds_) -
2845 reinterpret_cast<char*>(&_impl_.session_id_)) + sizeof(_impl_.timeout_milliseconds_));
2846 _internal_metadata_.Clear<std::string>();
2847 }
2848
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2849 const char* WaitAtBarrierRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2850 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2851 while (!ctx->Done(&ptr)) {
2852 ::uint32_t tag;
2853 ptr = ::_pbi::ReadTag(ptr, &tag);
2854 switch (tag >> 3) {
2855 // uint64 session_id = 1;
2856 case 1:
2857 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2858 _impl_.session_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2859 CHK_(ptr);
2860 } else {
2861 goto handle_unusual;
2862 }
2863 continue;
2864 // bytes barrier_id = 2;
2865 case 2:
2866 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2867 auto str = _internal_mutable_barrier_id();
2868 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2869 CHK_(ptr);
2870 } else {
2871 goto handle_unusual;
2872 }
2873 continue;
2874 // int32 node_id = 3;
2875 case 3:
2876 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2877 _impl_.node_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2878 CHK_(ptr);
2879 } else {
2880 goto handle_unusual;
2881 }
2882 continue;
2883 // int32 timeout_milliseconds = 4;
2884 case 4:
2885 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2886 _impl_.timeout_milliseconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2887 CHK_(ptr);
2888 } else {
2889 goto handle_unusual;
2890 }
2891 continue;
2892 default:
2893 goto handle_unusual;
2894 } // switch
2895 handle_unusual:
2896 if ((tag == 0) || ((tag & 7) == 4)) {
2897 CHK_(ptr);
2898 ctx->SetLastTag(tag);
2899 goto message_done;
2900 }
2901 ptr = UnknownFieldParse(
2902 tag,
2903 _internal_metadata_.mutable_unknown_fields<std::string>(),
2904 ptr, ctx);
2905 CHK_(ptr != nullptr);
2906 } // while
2907 message_done:
2908 return ptr;
2909 failure:
2910 ptr = nullptr;
2911 goto message_done;
2912 #undef CHK_
2913 }
2914
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2915 ::uint8_t* WaitAtBarrierRequest::_InternalSerialize(
2916 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2917 // @@protoc_insertion_point(serialize_to_array_start:xla.WaitAtBarrierRequest)
2918 ::uint32_t cached_has_bits = 0;
2919 (void) cached_has_bits;
2920
2921 // uint64 session_id = 1;
2922 if (this->_internal_session_id() != 0) {
2923 target = stream->EnsureSpace(target);
2924 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_session_id(), target);
2925 }
2926
2927 // bytes barrier_id = 2;
2928 if (!this->_internal_barrier_id().empty()) {
2929 target = stream->WriteBytesMaybeAliased(
2930 2, this->_internal_barrier_id(), target);
2931 }
2932
2933 // int32 node_id = 3;
2934 if (this->_internal_node_id() != 0) {
2935 target = stream->EnsureSpace(target);
2936 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_node_id(), target);
2937 }
2938
2939 // int32 timeout_milliseconds = 4;
2940 if (this->_internal_timeout_milliseconds() != 0) {
2941 target = stream->EnsureSpace(target);
2942 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_timeout_milliseconds(), target);
2943 }
2944
2945 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2946 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2947 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2948 }
2949 // @@protoc_insertion_point(serialize_to_array_end:xla.WaitAtBarrierRequest)
2950 return target;
2951 }
2952
ByteSizeLong() const2953 size_t WaitAtBarrierRequest::ByteSizeLong() const {
2954 // @@protoc_insertion_point(message_byte_size_start:xla.WaitAtBarrierRequest)
2955 size_t total_size = 0;
2956
2957 ::uint32_t cached_has_bits = 0;
2958 // Prevent compiler warnings about cached_has_bits being unused
2959 (void) cached_has_bits;
2960
2961 // bytes barrier_id = 2;
2962 if (!this->_internal_barrier_id().empty()) {
2963 total_size += 1 +
2964 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
2965 this->_internal_barrier_id());
2966 }
2967
2968 // uint64 session_id = 1;
2969 if (this->_internal_session_id() != 0) {
2970 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_session_id());
2971 }
2972
2973 // int32 node_id = 3;
2974 if (this->_internal_node_id() != 0) {
2975 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_node_id());
2976 }
2977
2978 // int32 timeout_milliseconds = 4;
2979 if (this->_internal_timeout_milliseconds() != 0) {
2980 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_timeout_milliseconds());
2981 }
2982
2983 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2984 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2985 }
2986 int cached_size = ::_pbi::ToCachedSize(total_size);
2987 SetCachedSize(cached_size);
2988 return total_size;
2989 }
2990
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2991 void WaitAtBarrierRequest::CheckTypeAndMergeFrom(
2992 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2993 MergeFrom(*::_pbi::DownCast<const WaitAtBarrierRequest*>(
2994 &from));
2995 }
2996
MergeFrom(const WaitAtBarrierRequest & from)2997 void WaitAtBarrierRequest::MergeFrom(const WaitAtBarrierRequest& from) {
2998 WaitAtBarrierRequest* const _this = this;
2999 // @@protoc_insertion_point(class_specific_merge_from_start:xla.WaitAtBarrierRequest)
3000 GOOGLE_DCHECK_NE(&from, _this);
3001 ::uint32_t cached_has_bits = 0;
3002 (void) cached_has_bits;
3003
3004 if (!from._internal_barrier_id().empty()) {
3005 _this->_internal_set_barrier_id(from._internal_barrier_id());
3006 }
3007 if (from._internal_session_id() != 0) {
3008 _this->_internal_set_session_id(from._internal_session_id());
3009 }
3010 if (from._internal_node_id() != 0) {
3011 _this->_internal_set_node_id(from._internal_node_id());
3012 }
3013 if (from._internal_timeout_milliseconds() != 0) {
3014 _this->_internal_set_timeout_milliseconds(from._internal_timeout_milliseconds());
3015 }
3016 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3017 }
3018
CopyFrom(const WaitAtBarrierRequest & from)3019 void WaitAtBarrierRequest::CopyFrom(const WaitAtBarrierRequest& from) {
3020 // @@protoc_insertion_point(class_specific_copy_from_start:xla.WaitAtBarrierRequest)
3021 if (&from == this) return;
3022 Clear();
3023 MergeFrom(from);
3024 }
3025
IsInitialized() const3026 bool WaitAtBarrierRequest::IsInitialized() const {
3027 return true;
3028 }
3029
InternalSwap(WaitAtBarrierRequest * other)3030 void WaitAtBarrierRequest::InternalSwap(WaitAtBarrierRequest* other) {
3031 using std::swap;
3032 auto* lhs_arena = GetArenaForAllocation();
3033 auto* rhs_arena = other->GetArenaForAllocation();
3034 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3035 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3036 &_impl_.barrier_id_, lhs_arena,
3037 &other->_impl_.barrier_id_, rhs_arena
3038 );
3039 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3040 PROTOBUF_FIELD_OFFSET(WaitAtBarrierRequest, _impl_.timeout_milliseconds_)
3041 + sizeof(WaitAtBarrierRequest::_impl_.timeout_milliseconds_) // NOLINT
3042 - PROTOBUF_FIELD_OFFSET(WaitAtBarrierRequest, _impl_.session_id_)>(
3043 reinterpret_cast<char*>(&_impl_.session_id_),
3044 reinterpret_cast<char*>(&other->_impl_.session_id_));
3045 }
3046
GetTypeName() const3047 std::string WaitAtBarrierRequest::GetTypeName() const {
3048 return "xla.WaitAtBarrierRequest";
3049 }
3050
3051
3052 // ===================================================================
3053
3054 class WaitAtBarrierResponse::_Internal {
3055 public:
3056 };
3057
WaitAtBarrierResponse(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3058 WaitAtBarrierResponse::WaitAtBarrierResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3059 bool is_message_owned)
3060 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3061 SharedCtor(arena, is_message_owned);
3062 // @@protoc_insertion_point(arena_constructor:xla.WaitAtBarrierResponse)
3063 }
WaitAtBarrierResponse(const WaitAtBarrierResponse & from)3064 WaitAtBarrierResponse::WaitAtBarrierResponse(const WaitAtBarrierResponse& from)
3065 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3066 WaitAtBarrierResponse* const _this = this; (void)_this;
3067 new (&_impl_) Impl_{
3068 /*decltype(_impl_._cached_size_)*/{}};
3069
3070 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3071 // @@protoc_insertion_point(copy_constructor:xla.WaitAtBarrierResponse)
3072 }
3073
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3074 inline void WaitAtBarrierResponse::SharedCtor(
3075 ::_pb::Arena* arena, bool is_message_owned) {
3076 (void)arena;
3077 (void)is_message_owned;
3078 new (&_impl_) Impl_{
3079 /*decltype(_impl_._cached_size_)*/{}
3080 };
3081 }
3082
~WaitAtBarrierResponse()3083 WaitAtBarrierResponse::~WaitAtBarrierResponse() {
3084 // @@protoc_insertion_point(destructor:xla.WaitAtBarrierResponse)
3085 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3086 (void)arena;
3087 return;
3088 }
3089 SharedDtor();
3090 }
3091
SharedDtor()3092 inline void WaitAtBarrierResponse::SharedDtor() {
3093 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3094 }
3095
SetCachedSize(int size) const3096 void WaitAtBarrierResponse::SetCachedSize(int size) const {
3097 _impl_._cached_size_.Set(size);
3098 }
3099
Clear()3100 void WaitAtBarrierResponse::Clear() {
3101 // @@protoc_insertion_point(message_clear_start:xla.WaitAtBarrierResponse)
3102 ::uint32_t cached_has_bits = 0;
3103 // Prevent compiler warnings about cached_has_bits being unused
3104 (void) cached_has_bits;
3105
3106 _internal_metadata_.Clear<std::string>();
3107 }
3108
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3109 const char* WaitAtBarrierResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3110 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3111 while (!ctx->Done(&ptr)) {
3112 ::uint32_t tag;
3113 ptr = ::_pbi::ReadTag(ptr, &tag);
3114 if ((tag == 0) || ((tag & 7) == 4)) {
3115 CHK_(ptr);
3116 ctx->SetLastTag(tag);
3117 goto message_done;
3118 }
3119 ptr = UnknownFieldParse(
3120 tag,
3121 _internal_metadata_.mutable_unknown_fields<std::string>(),
3122 ptr, ctx);
3123 CHK_(ptr != nullptr);
3124 } // while
3125 message_done:
3126 return ptr;
3127 failure:
3128 ptr = nullptr;
3129 goto message_done;
3130 #undef CHK_
3131 }
3132
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3133 ::uint8_t* WaitAtBarrierResponse::_InternalSerialize(
3134 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3135 // @@protoc_insertion_point(serialize_to_array_start:xla.WaitAtBarrierResponse)
3136 ::uint32_t cached_has_bits = 0;
3137 (void) cached_has_bits;
3138
3139 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3140 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3141 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3142 }
3143 // @@protoc_insertion_point(serialize_to_array_end:xla.WaitAtBarrierResponse)
3144 return target;
3145 }
3146
ByteSizeLong() const3147 size_t WaitAtBarrierResponse::ByteSizeLong() const {
3148 // @@protoc_insertion_point(message_byte_size_start:xla.WaitAtBarrierResponse)
3149 size_t total_size = 0;
3150
3151 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3152 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3153 }
3154 int cached_size = ::_pbi::ToCachedSize(total_size);
3155 SetCachedSize(cached_size);
3156 return total_size;
3157 }
3158
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3159 void WaitAtBarrierResponse::CheckTypeAndMergeFrom(
3160 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3161 MergeFrom(*::_pbi::DownCast<const WaitAtBarrierResponse*>(
3162 &from));
3163 }
3164
MergeFrom(const WaitAtBarrierResponse & from)3165 void WaitAtBarrierResponse::MergeFrom(const WaitAtBarrierResponse& from) {
3166 WaitAtBarrierResponse* const _this = this;
3167 // @@protoc_insertion_point(class_specific_merge_from_start:xla.WaitAtBarrierResponse)
3168 GOOGLE_DCHECK_NE(&from, _this);
3169 ::uint32_t cached_has_bits = 0;
3170 (void) cached_has_bits;
3171
3172 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3173 }
3174
CopyFrom(const WaitAtBarrierResponse & from)3175 void WaitAtBarrierResponse::CopyFrom(const WaitAtBarrierResponse& from) {
3176 // @@protoc_insertion_point(class_specific_copy_from_start:xla.WaitAtBarrierResponse)
3177 if (&from == this) return;
3178 Clear();
3179 MergeFrom(from);
3180 }
3181
IsInitialized() const3182 bool WaitAtBarrierResponse::IsInitialized() const {
3183 return true;
3184 }
3185
InternalSwap(WaitAtBarrierResponse * other)3186 void WaitAtBarrierResponse::InternalSwap(WaitAtBarrierResponse* other) {
3187 using std::swap;
3188 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3189 }
3190
GetTypeName() const3191 std::string WaitAtBarrierResponse::GetTypeName() const {
3192 return "xla.WaitAtBarrierResponse";
3193 }
3194
3195
3196 // ===================================================================
3197
3198 class HeartbeatRequest::_Internal {
3199 public:
3200 };
3201
HeartbeatRequest(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3202 HeartbeatRequest::HeartbeatRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3203 bool is_message_owned)
3204 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3205 SharedCtor(arena, is_message_owned);
3206 // @@protoc_insertion_point(arena_constructor:xla.HeartbeatRequest)
3207 }
HeartbeatRequest(const HeartbeatRequest & from)3208 HeartbeatRequest::HeartbeatRequest(const HeartbeatRequest& from)
3209 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3210 HeartbeatRequest* const _this = this; (void)_this;
3211 new (&_impl_) Impl_{
3212 decltype(_impl_.session_id_){}
3213 , decltype(_impl_.node_id_){}
3214 , /*decltype(_impl_._cached_size_)*/{}};
3215
3216 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3217 ::memcpy(&_impl_.session_id_, &from._impl_.session_id_,
3218 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.node_id_) -
3219 reinterpret_cast<char*>(&_impl_.session_id_)) + sizeof(_impl_.node_id_));
3220 // @@protoc_insertion_point(copy_constructor:xla.HeartbeatRequest)
3221 }
3222
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3223 inline void HeartbeatRequest::SharedCtor(
3224 ::_pb::Arena* arena, bool is_message_owned) {
3225 (void)arena;
3226 (void)is_message_owned;
3227 new (&_impl_) Impl_{
3228 decltype(_impl_.session_id_){::uint64_t{0u}}
3229 , decltype(_impl_.node_id_){0}
3230 , /*decltype(_impl_._cached_size_)*/{}
3231 };
3232 }
3233
~HeartbeatRequest()3234 HeartbeatRequest::~HeartbeatRequest() {
3235 // @@protoc_insertion_point(destructor:xla.HeartbeatRequest)
3236 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3237 (void)arena;
3238 return;
3239 }
3240 SharedDtor();
3241 }
3242
SharedDtor()3243 inline void HeartbeatRequest::SharedDtor() {
3244 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3245 }
3246
SetCachedSize(int size) const3247 void HeartbeatRequest::SetCachedSize(int size) const {
3248 _impl_._cached_size_.Set(size);
3249 }
3250
Clear()3251 void HeartbeatRequest::Clear() {
3252 // @@protoc_insertion_point(message_clear_start:xla.HeartbeatRequest)
3253 ::uint32_t cached_has_bits = 0;
3254 // Prevent compiler warnings about cached_has_bits being unused
3255 (void) cached_has_bits;
3256
3257 ::memset(&_impl_.session_id_, 0, static_cast<size_t>(
3258 reinterpret_cast<char*>(&_impl_.node_id_) -
3259 reinterpret_cast<char*>(&_impl_.session_id_)) + sizeof(_impl_.node_id_));
3260 _internal_metadata_.Clear<std::string>();
3261 }
3262
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3263 const char* HeartbeatRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3264 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3265 while (!ctx->Done(&ptr)) {
3266 ::uint32_t tag;
3267 ptr = ::_pbi::ReadTag(ptr, &tag);
3268 switch (tag >> 3) {
3269 // uint64 session_id = 1;
3270 case 1:
3271 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
3272 _impl_.session_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3273 CHK_(ptr);
3274 } else {
3275 goto handle_unusual;
3276 }
3277 continue;
3278 // int32 node_id = 2;
3279 case 2:
3280 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3281 _impl_.node_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3282 CHK_(ptr);
3283 } else {
3284 goto handle_unusual;
3285 }
3286 continue;
3287 default:
3288 goto handle_unusual;
3289 } // switch
3290 handle_unusual:
3291 if ((tag == 0) || ((tag & 7) == 4)) {
3292 CHK_(ptr);
3293 ctx->SetLastTag(tag);
3294 goto message_done;
3295 }
3296 ptr = UnknownFieldParse(
3297 tag,
3298 _internal_metadata_.mutable_unknown_fields<std::string>(),
3299 ptr, ctx);
3300 CHK_(ptr != nullptr);
3301 } // while
3302 message_done:
3303 return ptr;
3304 failure:
3305 ptr = nullptr;
3306 goto message_done;
3307 #undef CHK_
3308 }
3309
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3310 ::uint8_t* HeartbeatRequest::_InternalSerialize(
3311 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3312 // @@protoc_insertion_point(serialize_to_array_start:xla.HeartbeatRequest)
3313 ::uint32_t cached_has_bits = 0;
3314 (void) cached_has_bits;
3315
3316 // uint64 session_id = 1;
3317 if (this->_internal_session_id() != 0) {
3318 target = stream->EnsureSpace(target);
3319 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_session_id(), target);
3320 }
3321
3322 // int32 node_id = 2;
3323 if (this->_internal_node_id() != 0) {
3324 target = stream->EnsureSpace(target);
3325 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_node_id(), target);
3326 }
3327
3328 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3329 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3330 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3331 }
3332 // @@protoc_insertion_point(serialize_to_array_end:xla.HeartbeatRequest)
3333 return target;
3334 }
3335
ByteSizeLong() const3336 size_t HeartbeatRequest::ByteSizeLong() const {
3337 // @@protoc_insertion_point(message_byte_size_start:xla.HeartbeatRequest)
3338 size_t total_size = 0;
3339
3340 ::uint32_t cached_has_bits = 0;
3341 // Prevent compiler warnings about cached_has_bits being unused
3342 (void) cached_has_bits;
3343
3344 // uint64 session_id = 1;
3345 if (this->_internal_session_id() != 0) {
3346 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_session_id());
3347 }
3348
3349 // int32 node_id = 2;
3350 if (this->_internal_node_id() != 0) {
3351 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_node_id());
3352 }
3353
3354 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3355 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3356 }
3357 int cached_size = ::_pbi::ToCachedSize(total_size);
3358 SetCachedSize(cached_size);
3359 return total_size;
3360 }
3361
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3362 void HeartbeatRequest::CheckTypeAndMergeFrom(
3363 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3364 MergeFrom(*::_pbi::DownCast<const HeartbeatRequest*>(
3365 &from));
3366 }
3367
MergeFrom(const HeartbeatRequest & from)3368 void HeartbeatRequest::MergeFrom(const HeartbeatRequest& from) {
3369 HeartbeatRequest* const _this = this;
3370 // @@protoc_insertion_point(class_specific_merge_from_start:xla.HeartbeatRequest)
3371 GOOGLE_DCHECK_NE(&from, _this);
3372 ::uint32_t cached_has_bits = 0;
3373 (void) cached_has_bits;
3374
3375 if (from._internal_session_id() != 0) {
3376 _this->_internal_set_session_id(from._internal_session_id());
3377 }
3378 if (from._internal_node_id() != 0) {
3379 _this->_internal_set_node_id(from._internal_node_id());
3380 }
3381 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3382 }
3383
CopyFrom(const HeartbeatRequest & from)3384 void HeartbeatRequest::CopyFrom(const HeartbeatRequest& from) {
3385 // @@protoc_insertion_point(class_specific_copy_from_start:xla.HeartbeatRequest)
3386 if (&from == this) return;
3387 Clear();
3388 MergeFrom(from);
3389 }
3390
IsInitialized() const3391 bool HeartbeatRequest::IsInitialized() const {
3392 return true;
3393 }
3394
InternalSwap(HeartbeatRequest * other)3395 void HeartbeatRequest::InternalSwap(HeartbeatRequest* other) {
3396 using std::swap;
3397 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3398 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3399 PROTOBUF_FIELD_OFFSET(HeartbeatRequest, _impl_.node_id_)
3400 + sizeof(HeartbeatRequest::_impl_.node_id_) // NOLINT
3401 - PROTOBUF_FIELD_OFFSET(HeartbeatRequest, _impl_.session_id_)>(
3402 reinterpret_cast<char*>(&_impl_.session_id_),
3403 reinterpret_cast<char*>(&other->_impl_.session_id_));
3404 }
3405
GetTypeName() const3406 std::string HeartbeatRequest::GetTypeName() const {
3407 return "xla.HeartbeatRequest";
3408 }
3409
3410
3411 // ===================================================================
3412
3413 class HeartbeatResponse::_Internal {
3414 public:
3415 };
3416
HeartbeatResponse(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3417 HeartbeatResponse::HeartbeatResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3418 bool is_message_owned)
3419 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3420 SharedCtor(arena, is_message_owned);
3421 // @@protoc_insertion_point(arena_constructor:xla.HeartbeatResponse)
3422 }
HeartbeatResponse(const HeartbeatResponse & from)3423 HeartbeatResponse::HeartbeatResponse(const HeartbeatResponse& from)
3424 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3425 HeartbeatResponse* const _this = this; (void)_this;
3426 new (&_impl_) Impl_{
3427 /*decltype(_impl_._cached_size_)*/{}};
3428
3429 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3430 // @@protoc_insertion_point(copy_constructor:xla.HeartbeatResponse)
3431 }
3432
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3433 inline void HeartbeatResponse::SharedCtor(
3434 ::_pb::Arena* arena, bool is_message_owned) {
3435 (void)arena;
3436 (void)is_message_owned;
3437 new (&_impl_) Impl_{
3438 /*decltype(_impl_._cached_size_)*/{}
3439 };
3440 }
3441
~HeartbeatResponse()3442 HeartbeatResponse::~HeartbeatResponse() {
3443 // @@protoc_insertion_point(destructor:xla.HeartbeatResponse)
3444 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3445 (void)arena;
3446 return;
3447 }
3448 SharedDtor();
3449 }
3450
SharedDtor()3451 inline void HeartbeatResponse::SharedDtor() {
3452 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3453 }
3454
SetCachedSize(int size) const3455 void HeartbeatResponse::SetCachedSize(int size) const {
3456 _impl_._cached_size_.Set(size);
3457 }
3458
Clear()3459 void HeartbeatResponse::Clear() {
3460 // @@protoc_insertion_point(message_clear_start:xla.HeartbeatResponse)
3461 ::uint32_t cached_has_bits = 0;
3462 // Prevent compiler warnings about cached_has_bits being unused
3463 (void) cached_has_bits;
3464
3465 _internal_metadata_.Clear<std::string>();
3466 }
3467
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3468 const char* HeartbeatResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3469 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3470 while (!ctx->Done(&ptr)) {
3471 ::uint32_t tag;
3472 ptr = ::_pbi::ReadTag(ptr, &tag);
3473 if ((tag == 0) || ((tag & 7) == 4)) {
3474 CHK_(ptr);
3475 ctx->SetLastTag(tag);
3476 goto message_done;
3477 }
3478 ptr = UnknownFieldParse(
3479 tag,
3480 _internal_metadata_.mutable_unknown_fields<std::string>(),
3481 ptr, ctx);
3482 CHK_(ptr != nullptr);
3483 } // while
3484 message_done:
3485 return ptr;
3486 failure:
3487 ptr = nullptr;
3488 goto message_done;
3489 #undef CHK_
3490 }
3491
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3492 ::uint8_t* HeartbeatResponse::_InternalSerialize(
3493 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3494 // @@protoc_insertion_point(serialize_to_array_start:xla.HeartbeatResponse)
3495 ::uint32_t cached_has_bits = 0;
3496 (void) cached_has_bits;
3497
3498 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3499 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3500 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3501 }
3502 // @@protoc_insertion_point(serialize_to_array_end:xla.HeartbeatResponse)
3503 return target;
3504 }
3505
ByteSizeLong() const3506 size_t HeartbeatResponse::ByteSizeLong() const {
3507 // @@protoc_insertion_point(message_byte_size_start:xla.HeartbeatResponse)
3508 size_t total_size = 0;
3509
3510 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3511 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3512 }
3513 int cached_size = ::_pbi::ToCachedSize(total_size);
3514 SetCachedSize(cached_size);
3515 return total_size;
3516 }
3517
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3518 void HeartbeatResponse::CheckTypeAndMergeFrom(
3519 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3520 MergeFrom(*::_pbi::DownCast<const HeartbeatResponse*>(
3521 &from));
3522 }
3523
MergeFrom(const HeartbeatResponse & from)3524 void HeartbeatResponse::MergeFrom(const HeartbeatResponse& from) {
3525 HeartbeatResponse* const _this = this;
3526 // @@protoc_insertion_point(class_specific_merge_from_start:xla.HeartbeatResponse)
3527 GOOGLE_DCHECK_NE(&from, _this);
3528 ::uint32_t cached_has_bits = 0;
3529 (void) cached_has_bits;
3530
3531 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3532 }
3533
CopyFrom(const HeartbeatResponse & from)3534 void HeartbeatResponse::CopyFrom(const HeartbeatResponse& from) {
3535 // @@protoc_insertion_point(class_specific_copy_from_start:xla.HeartbeatResponse)
3536 if (&from == this) return;
3537 Clear();
3538 MergeFrom(from);
3539 }
3540
IsInitialized() const3541 bool HeartbeatResponse::IsInitialized() const {
3542 return true;
3543 }
3544
InternalSwap(HeartbeatResponse * other)3545 void HeartbeatResponse::InternalSwap(HeartbeatResponse* other) {
3546 using std::swap;
3547 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3548 }
3549
GetTypeName() const3550 std::string HeartbeatResponse::GetTypeName() const {
3551 return "xla.HeartbeatResponse";
3552 }
3553
3554
3555 // ===================================================================
3556
3557 class ShutdownRequest::_Internal {
3558 public:
3559 };
3560
ShutdownRequest(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3561 ShutdownRequest::ShutdownRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3562 bool is_message_owned)
3563 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3564 SharedCtor(arena, is_message_owned);
3565 // @@protoc_insertion_point(arena_constructor:xla.ShutdownRequest)
3566 }
ShutdownRequest(const ShutdownRequest & from)3567 ShutdownRequest::ShutdownRequest(const ShutdownRequest& from)
3568 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3569 ShutdownRequest* const _this = this; (void)_this;
3570 new (&_impl_) Impl_{
3571 decltype(_impl_.session_id_){}
3572 , decltype(_impl_.node_id_){}
3573 , /*decltype(_impl_._cached_size_)*/{}};
3574
3575 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3576 ::memcpy(&_impl_.session_id_, &from._impl_.session_id_,
3577 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.node_id_) -
3578 reinterpret_cast<char*>(&_impl_.session_id_)) + sizeof(_impl_.node_id_));
3579 // @@protoc_insertion_point(copy_constructor:xla.ShutdownRequest)
3580 }
3581
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3582 inline void ShutdownRequest::SharedCtor(
3583 ::_pb::Arena* arena, bool is_message_owned) {
3584 (void)arena;
3585 (void)is_message_owned;
3586 new (&_impl_) Impl_{
3587 decltype(_impl_.session_id_){::uint64_t{0u}}
3588 , decltype(_impl_.node_id_){0}
3589 , /*decltype(_impl_._cached_size_)*/{}
3590 };
3591 }
3592
~ShutdownRequest()3593 ShutdownRequest::~ShutdownRequest() {
3594 // @@protoc_insertion_point(destructor:xla.ShutdownRequest)
3595 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3596 (void)arena;
3597 return;
3598 }
3599 SharedDtor();
3600 }
3601
SharedDtor()3602 inline void ShutdownRequest::SharedDtor() {
3603 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3604 }
3605
SetCachedSize(int size) const3606 void ShutdownRequest::SetCachedSize(int size) const {
3607 _impl_._cached_size_.Set(size);
3608 }
3609
Clear()3610 void ShutdownRequest::Clear() {
3611 // @@protoc_insertion_point(message_clear_start:xla.ShutdownRequest)
3612 ::uint32_t cached_has_bits = 0;
3613 // Prevent compiler warnings about cached_has_bits being unused
3614 (void) cached_has_bits;
3615
3616 ::memset(&_impl_.session_id_, 0, static_cast<size_t>(
3617 reinterpret_cast<char*>(&_impl_.node_id_) -
3618 reinterpret_cast<char*>(&_impl_.session_id_)) + sizeof(_impl_.node_id_));
3619 _internal_metadata_.Clear<std::string>();
3620 }
3621
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3622 const char* ShutdownRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3623 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3624 while (!ctx->Done(&ptr)) {
3625 ::uint32_t tag;
3626 ptr = ::_pbi::ReadTag(ptr, &tag);
3627 switch (tag >> 3) {
3628 // uint64 session_id = 1;
3629 case 1:
3630 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
3631 _impl_.session_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3632 CHK_(ptr);
3633 } else {
3634 goto handle_unusual;
3635 }
3636 continue;
3637 // int32 node_id = 2;
3638 case 2:
3639 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3640 _impl_.node_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3641 CHK_(ptr);
3642 } else {
3643 goto handle_unusual;
3644 }
3645 continue;
3646 default:
3647 goto handle_unusual;
3648 } // switch
3649 handle_unusual:
3650 if ((tag == 0) || ((tag & 7) == 4)) {
3651 CHK_(ptr);
3652 ctx->SetLastTag(tag);
3653 goto message_done;
3654 }
3655 ptr = UnknownFieldParse(
3656 tag,
3657 _internal_metadata_.mutable_unknown_fields<std::string>(),
3658 ptr, ctx);
3659 CHK_(ptr != nullptr);
3660 } // while
3661 message_done:
3662 return ptr;
3663 failure:
3664 ptr = nullptr;
3665 goto message_done;
3666 #undef CHK_
3667 }
3668
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3669 ::uint8_t* ShutdownRequest::_InternalSerialize(
3670 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3671 // @@protoc_insertion_point(serialize_to_array_start:xla.ShutdownRequest)
3672 ::uint32_t cached_has_bits = 0;
3673 (void) cached_has_bits;
3674
3675 // uint64 session_id = 1;
3676 if (this->_internal_session_id() != 0) {
3677 target = stream->EnsureSpace(target);
3678 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_session_id(), target);
3679 }
3680
3681 // int32 node_id = 2;
3682 if (this->_internal_node_id() != 0) {
3683 target = stream->EnsureSpace(target);
3684 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_node_id(), target);
3685 }
3686
3687 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3688 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3689 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3690 }
3691 // @@protoc_insertion_point(serialize_to_array_end:xla.ShutdownRequest)
3692 return target;
3693 }
3694
ByteSizeLong() const3695 size_t ShutdownRequest::ByteSizeLong() const {
3696 // @@protoc_insertion_point(message_byte_size_start:xla.ShutdownRequest)
3697 size_t total_size = 0;
3698
3699 ::uint32_t cached_has_bits = 0;
3700 // Prevent compiler warnings about cached_has_bits being unused
3701 (void) cached_has_bits;
3702
3703 // uint64 session_id = 1;
3704 if (this->_internal_session_id() != 0) {
3705 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_session_id());
3706 }
3707
3708 // int32 node_id = 2;
3709 if (this->_internal_node_id() != 0) {
3710 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_node_id());
3711 }
3712
3713 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3714 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3715 }
3716 int cached_size = ::_pbi::ToCachedSize(total_size);
3717 SetCachedSize(cached_size);
3718 return total_size;
3719 }
3720
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3721 void ShutdownRequest::CheckTypeAndMergeFrom(
3722 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3723 MergeFrom(*::_pbi::DownCast<const ShutdownRequest*>(
3724 &from));
3725 }
3726
MergeFrom(const ShutdownRequest & from)3727 void ShutdownRequest::MergeFrom(const ShutdownRequest& from) {
3728 ShutdownRequest* const _this = this;
3729 // @@protoc_insertion_point(class_specific_merge_from_start:xla.ShutdownRequest)
3730 GOOGLE_DCHECK_NE(&from, _this);
3731 ::uint32_t cached_has_bits = 0;
3732 (void) cached_has_bits;
3733
3734 if (from._internal_session_id() != 0) {
3735 _this->_internal_set_session_id(from._internal_session_id());
3736 }
3737 if (from._internal_node_id() != 0) {
3738 _this->_internal_set_node_id(from._internal_node_id());
3739 }
3740 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3741 }
3742
CopyFrom(const ShutdownRequest & from)3743 void ShutdownRequest::CopyFrom(const ShutdownRequest& from) {
3744 // @@protoc_insertion_point(class_specific_copy_from_start:xla.ShutdownRequest)
3745 if (&from == this) return;
3746 Clear();
3747 MergeFrom(from);
3748 }
3749
IsInitialized() const3750 bool ShutdownRequest::IsInitialized() const {
3751 return true;
3752 }
3753
InternalSwap(ShutdownRequest * other)3754 void ShutdownRequest::InternalSwap(ShutdownRequest* other) {
3755 using std::swap;
3756 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3757 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3758 PROTOBUF_FIELD_OFFSET(ShutdownRequest, _impl_.node_id_)
3759 + sizeof(ShutdownRequest::_impl_.node_id_) // NOLINT
3760 - PROTOBUF_FIELD_OFFSET(ShutdownRequest, _impl_.session_id_)>(
3761 reinterpret_cast<char*>(&_impl_.session_id_),
3762 reinterpret_cast<char*>(&other->_impl_.session_id_));
3763 }
3764
GetTypeName() const3765 std::string ShutdownRequest::GetTypeName() const {
3766 return "xla.ShutdownRequest";
3767 }
3768
3769
3770 // ===================================================================
3771
3772 class ShutdownResponse::_Internal {
3773 public:
3774 };
3775
ShutdownResponse(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3776 ShutdownResponse::ShutdownResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3777 bool is_message_owned)
3778 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3779 SharedCtor(arena, is_message_owned);
3780 // @@protoc_insertion_point(arena_constructor:xla.ShutdownResponse)
3781 }
ShutdownResponse(const ShutdownResponse & from)3782 ShutdownResponse::ShutdownResponse(const ShutdownResponse& from)
3783 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3784 ShutdownResponse* const _this = this; (void)_this;
3785 new (&_impl_) Impl_{
3786 /*decltype(_impl_._cached_size_)*/{}};
3787
3788 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3789 // @@protoc_insertion_point(copy_constructor:xla.ShutdownResponse)
3790 }
3791
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3792 inline void ShutdownResponse::SharedCtor(
3793 ::_pb::Arena* arena, bool is_message_owned) {
3794 (void)arena;
3795 (void)is_message_owned;
3796 new (&_impl_) Impl_{
3797 /*decltype(_impl_._cached_size_)*/{}
3798 };
3799 }
3800
~ShutdownResponse()3801 ShutdownResponse::~ShutdownResponse() {
3802 // @@protoc_insertion_point(destructor:xla.ShutdownResponse)
3803 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3804 (void)arena;
3805 return;
3806 }
3807 SharedDtor();
3808 }
3809
SharedDtor()3810 inline void ShutdownResponse::SharedDtor() {
3811 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3812 }
3813
SetCachedSize(int size) const3814 void ShutdownResponse::SetCachedSize(int size) const {
3815 _impl_._cached_size_.Set(size);
3816 }
3817
Clear()3818 void ShutdownResponse::Clear() {
3819 // @@protoc_insertion_point(message_clear_start:xla.ShutdownResponse)
3820 ::uint32_t cached_has_bits = 0;
3821 // Prevent compiler warnings about cached_has_bits being unused
3822 (void) cached_has_bits;
3823
3824 _internal_metadata_.Clear<std::string>();
3825 }
3826
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3827 const char* ShutdownResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3828 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3829 while (!ctx->Done(&ptr)) {
3830 ::uint32_t tag;
3831 ptr = ::_pbi::ReadTag(ptr, &tag);
3832 if ((tag == 0) || ((tag & 7) == 4)) {
3833 CHK_(ptr);
3834 ctx->SetLastTag(tag);
3835 goto message_done;
3836 }
3837 ptr = UnknownFieldParse(
3838 tag,
3839 _internal_metadata_.mutable_unknown_fields<std::string>(),
3840 ptr, ctx);
3841 CHK_(ptr != nullptr);
3842 } // while
3843 message_done:
3844 return ptr;
3845 failure:
3846 ptr = nullptr;
3847 goto message_done;
3848 #undef CHK_
3849 }
3850
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3851 ::uint8_t* ShutdownResponse::_InternalSerialize(
3852 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3853 // @@protoc_insertion_point(serialize_to_array_start:xla.ShutdownResponse)
3854 ::uint32_t cached_has_bits = 0;
3855 (void) cached_has_bits;
3856
3857 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3858 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3859 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3860 }
3861 // @@protoc_insertion_point(serialize_to_array_end:xla.ShutdownResponse)
3862 return target;
3863 }
3864
ByteSizeLong() const3865 size_t ShutdownResponse::ByteSizeLong() const {
3866 // @@protoc_insertion_point(message_byte_size_start:xla.ShutdownResponse)
3867 size_t total_size = 0;
3868
3869 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3870 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3871 }
3872 int cached_size = ::_pbi::ToCachedSize(total_size);
3873 SetCachedSize(cached_size);
3874 return total_size;
3875 }
3876
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3877 void ShutdownResponse::CheckTypeAndMergeFrom(
3878 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3879 MergeFrom(*::_pbi::DownCast<const ShutdownResponse*>(
3880 &from));
3881 }
3882
MergeFrom(const ShutdownResponse & from)3883 void ShutdownResponse::MergeFrom(const ShutdownResponse& from) {
3884 ShutdownResponse* const _this = this;
3885 // @@protoc_insertion_point(class_specific_merge_from_start:xla.ShutdownResponse)
3886 GOOGLE_DCHECK_NE(&from, _this);
3887 ::uint32_t cached_has_bits = 0;
3888 (void) cached_has_bits;
3889
3890 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3891 }
3892
CopyFrom(const ShutdownResponse & from)3893 void ShutdownResponse::CopyFrom(const ShutdownResponse& from) {
3894 // @@protoc_insertion_point(class_specific_copy_from_start:xla.ShutdownResponse)
3895 if (&from == this) return;
3896 Clear();
3897 MergeFrom(from);
3898 }
3899
IsInitialized() const3900 bool ShutdownResponse::IsInitialized() const {
3901 return true;
3902 }
3903
InternalSwap(ShutdownResponse * other)3904 void ShutdownResponse::InternalSwap(ShutdownResponse* other) {
3905 using std::swap;
3906 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3907 }
3908
GetTypeName() const3909 std::string ShutdownResponse::GetTypeName() const {
3910 return "xla.ShutdownResponse";
3911 }
3912
3913
3914 // @@protoc_insertion_point(namespace_scope)
3915 } // namespace xla
3916 PROTOBUF_NAMESPACE_OPEN
3917 template<> PROTOBUF_NOINLINE ::xla::DeviceProto*
CreateMaybeMessage(Arena * arena)3918 Arena::CreateMaybeMessage< ::xla::DeviceProto >(Arena* arena) {
3919 return Arena::CreateMessageInternal< ::xla::DeviceProto >(arena);
3920 }
3921 template<> PROTOBUF_NOINLINE ::xla::LocalTopologyProto*
CreateMaybeMessage(Arena * arena)3922 Arena::CreateMaybeMessage< ::xla::LocalTopologyProto >(Arena* arena) {
3923 return Arena::CreateMessageInternal< ::xla::LocalTopologyProto >(arena);
3924 }
3925 template<> PROTOBUF_NOINLINE ::xla::GlobalTopologyProto*
CreateMaybeMessage(Arena * arena)3926 Arena::CreateMaybeMessage< ::xla::GlobalTopologyProto >(Arena* arena) {
3927 return Arena::CreateMessageInternal< ::xla::GlobalTopologyProto >(arena);
3928 }
3929 template<> PROTOBUF_NOINLINE ::xla::ConnectRequest*
CreateMaybeMessage(Arena * arena)3930 Arena::CreateMaybeMessage< ::xla::ConnectRequest >(Arena* arena) {
3931 return Arena::CreateMessageInternal< ::xla::ConnectRequest >(arena);
3932 }
3933 template<> PROTOBUF_NOINLINE ::xla::ConnectResponse*
CreateMaybeMessage(Arena * arena)3934 Arena::CreateMaybeMessage< ::xla::ConnectResponse >(Arena* arena) {
3935 return Arena::CreateMessageInternal< ::xla::ConnectResponse >(arena);
3936 }
3937 template<> PROTOBUF_NOINLINE ::xla::EnumerateDevicesRequest*
CreateMaybeMessage(Arena * arena)3938 Arena::CreateMaybeMessage< ::xla::EnumerateDevicesRequest >(Arena* arena) {
3939 return Arena::CreateMessageInternal< ::xla::EnumerateDevicesRequest >(arena);
3940 }
3941 template<> PROTOBUF_NOINLINE ::xla::EnumerateDevicesResponse*
CreateMaybeMessage(Arena * arena)3942 Arena::CreateMaybeMessage< ::xla::EnumerateDevicesResponse >(Arena* arena) {
3943 return Arena::CreateMessageInternal< ::xla::EnumerateDevicesResponse >(arena);
3944 }
3945 template<> PROTOBUF_NOINLINE ::xla::KeyValueGetRequest*
CreateMaybeMessage(Arena * arena)3946 Arena::CreateMaybeMessage< ::xla::KeyValueGetRequest >(Arena* arena) {
3947 return Arena::CreateMessageInternal< ::xla::KeyValueGetRequest >(arena);
3948 }
3949 template<> PROTOBUF_NOINLINE ::xla::KeyValueGetResponse*
CreateMaybeMessage(Arena * arena)3950 Arena::CreateMaybeMessage< ::xla::KeyValueGetResponse >(Arena* arena) {
3951 return Arena::CreateMessageInternal< ::xla::KeyValueGetResponse >(arena);
3952 }
3953 template<> PROTOBUF_NOINLINE ::xla::KeyValueSetRequest*
CreateMaybeMessage(Arena * arena)3954 Arena::CreateMaybeMessage< ::xla::KeyValueSetRequest >(Arena* arena) {
3955 return Arena::CreateMessageInternal< ::xla::KeyValueSetRequest >(arena);
3956 }
3957 template<> PROTOBUF_NOINLINE ::xla::KeyValueSetResponse*
CreateMaybeMessage(Arena * arena)3958 Arena::CreateMaybeMessage< ::xla::KeyValueSetResponse >(Arena* arena) {
3959 return Arena::CreateMessageInternal< ::xla::KeyValueSetResponse >(arena);
3960 }
3961 template<> PROTOBUF_NOINLINE ::xla::WaitAtBarrierRequest*
CreateMaybeMessage(Arena * arena)3962 Arena::CreateMaybeMessage< ::xla::WaitAtBarrierRequest >(Arena* arena) {
3963 return Arena::CreateMessageInternal< ::xla::WaitAtBarrierRequest >(arena);
3964 }
3965 template<> PROTOBUF_NOINLINE ::xla::WaitAtBarrierResponse*
CreateMaybeMessage(Arena * arena)3966 Arena::CreateMaybeMessage< ::xla::WaitAtBarrierResponse >(Arena* arena) {
3967 return Arena::CreateMessageInternal< ::xla::WaitAtBarrierResponse >(arena);
3968 }
3969 template<> PROTOBUF_NOINLINE ::xla::HeartbeatRequest*
CreateMaybeMessage(Arena * arena)3970 Arena::CreateMaybeMessage< ::xla::HeartbeatRequest >(Arena* arena) {
3971 return Arena::CreateMessageInternal< ::xla::HeartbeatRequest >(arena);
3972 }
3973 template<> PROTOBUF_NOINLINE ::xla::HeartbeatResponse*
CreateMaybeMessage(Arena * arena)3974 Arena::CreateMaybeMessage< ::xla::HeartbeatResponse >(Arena* arena) {
3975 return Arena::CreateMessageInternal< ::xla::HeartbeatResponse >(arena);
3976 }
3977 template<> PROTOBUF_NOINLINE ::xla::ShutdownRequest*
CreateMaybeMessage(Arena * arena)3978 Arena::CreateMaybeMessage< ::xla::ShutdownRequest >(Arena* arena) {
3979 return Arena::CreateMessageInternal< ::xla::ShutdownRequest >(arena);
3980 }
3981 template<> PROTOBUF_NOINLINE ::xla::ShutdownResponse*
CreateMaybeMessage(Arena * arena)3982 Arena::CreateMaybeMessage< ::xla::ShutdownResponse >(Arena* arena) {
3983 return Arena::CreateMessageInternal< ::xla::ShutdownResponse >(arena);
3984 }
3985 PROTOBUF_NAMESPACE_CLOSE
3986
3987 // @@protoc_insertion_point(global_scope)
3988 #include <google/protobuf/port_undef.inc>
3989