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