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