1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: tensorflow/core/protobuf/debug_event.proto
3
4 #include "tensorflow/core/protobuf/debug_event.pb.h"
5
6 #include <algorithm>
7 #include <cstdint>
8
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15
16 PROTOBUF_PRAGMA_INIT_SEG
17
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20
21 namespace tensorflow {
DebugEvent(::_pbi::ConstantInitialized)22 PROTOBUF_CONSTEXPR DebugEvent::DebugEvent(
23 ::_pbi::ConstantInitialized): _impl_{
24 /*decltype(_impl_.wall_time_)*/0
25 , /*decltype(_impl_.step_)*/::int64_t{0}
26 , /*decltype(_impl_.what_)*/{}
27 , /*decltype(_impl_._cached_size_)*/{}
28 , /*decltype(_impl_._oneof_case_)*/{}} {}
29 struct DebugEventDefaultTypeInternal {
DebugEventDefaultTypeInternaltensorflow::DebugEventDefaultTypeInternal30 PROTOBUF_CONSTEXPR DebugEventDefaultTypeInternal()
31 : _instance(::_pbi::ConstantInitialized{}) {}
~DebugEventDefaultTypeInternaltensorflow::DebugEventDefaultTypeInternal32 ~DebugEventDefaultTypeInternal() {}
33 union { // NOLINT(misc-non-private-member-variables-in-classes)
34 DebugEvent _instance;
35 };
36 };
37 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DebugEventDefaultTypeInternal _DebugEvent_default_instance_;
DebugMetadata(::_pbi::ConstantInitialized)38 PROTOBUF_CONSTEXPR DebugMetadata::DebugMetadata(
39 ::_pbi::ConstantInitialized): _impl_{
40 /*decltype(_impl_.tensorflow_version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
41 , /*decltype(_impl_.file_version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
42 , /*decltype(_impl_.tfdbg_run_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
43 , /*decltype(_impl_._cached_size_)*/{}} {}
44 struct DebugMetadataDefaultTypeInternal {
DebugMetadataDefaultTypeInternaltensorflow::DebugMetadataDefaultTypeInternal45 PROTOBUF_CONSTEXPR DebugMetadataDefaultTypeInternal()
46 : _instance(::_pbi::ConstantInitialized{}) {}
~DebugMetadataDefaultTypeInternaltensorflow::DebugMetadataDefaultTypeInternal47 ~DebugMetadataDefaultTypeInternal() {}
48 union { // NOLINT(misc-non-private-member-variables-in-classes)
49 DebugMetadata _instance;
50 };
51 };
52 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DebugMetadataDefaultTypeInternal _DebugMetadata_default_instance_;
SourceFile(::_pbi::ConstantInitialized)53 PROTOBUF_CONSTEXPR SourceFile::SourceFile(
54 ::_pbi::ConstantInitialized): _impl_{
55 /*decltype(_impl_.lines_)*/{}
56 , /*decltype(_impl_.file_path_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
57 , /*decltype(_impl_.host_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
58 , /*decltype(_impl_._cached_size_)*/{}} {}
59 struct SourceFileDefaultTypeInternal {
SourceFileDefaultTypeInternaltensorflow::SourceFileDefaultTypeInternal60 PROTOBUF_CONSTEXPR SourceFileDefaultTypeInternal()
61 : _instance(::_pbi::ConstantInitialized{}) {}
~SourceFileDefaultTypeInternaltensorflow::SourceFileDefaultTypeInternal62 ~SourceFileDefaultTypeInternal() {}
63 union { // NOLINT(misc-non-private-member-variables-in-classes)
64 SourceFile _instance;
65 };
66 };
67 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SourceFileDefaultTypeInternal _SourceFile_default_instance_;
StackFrameWithId(::_pbi::ConstantInitialized)68 PROTOBUF_CONSTEXPR StackFrameWithId::StackFrameWithId(
69 ::_pbi::ConstantInitialized): _impl_{
70 /*decltype(_impl_.id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
71 , /*decltype(_impl_.file_line_col_)*/nullptr
72 , /*decltype(_impl_._cached_size_)*/{}} {}
73 struct StackFrameWithIdDefaultTypeInternal {
StackFrameWithIdDefaultTypeInternaltensorflow::StackFrameWithIdDefaultTypeInternal74 PROTOBUF_CONSTEXPR StackFrameWithIdDefaultTypeInternal()
75 : _instance(::_pbi::ConstantInitialized{}) {}
~StackFrameWithIdDefaultTypeInternaltensorflow::StackFrameWithIdDefaultTypeInternal76 ~StackFrameWithIdDefaultTypeInternal() {}
77 union { // NOLINT(misc-non-private-member-variables-in-classes)
78 StackFrameWithId _instance;
79 };
80 };
81 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StackFrameWithIdDefaultTypeInternal _StackFrameWithId_default_instance_;
CodeLocation(::_pbi::ConstantInitialized)82 PROTOBUF_CONSTEXPR CodeLocation::CodeLocation(
83 ::_pbi::ConstantInitialized): _impl_{
84 /*decltype(_impl_.stack_frame_ids_)*/{}
85 , /*decltype(_impl_.host_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
86 , /*decltype(_impl_._cached_size_)*/{}} {}
87 struct CodeLocationDefaultTypeInternal {
CodeLocationDefaultTypeInternaltensorflow::CodeLocationDefaultTypeInternal88 PROTOBUF_CONSTEXPR CodeLocationDefaultTypeInternal()
89 : _instance(::_pbi::ConstantInitialized{}) {}
~CodeLocationDefaultTypeInternaltensorflow::CodeLocationDefaultTypeInternal90 ~CodeLocationDefaultTypeInternal() {}
91 union { // NOLINT(misc-non-private-member-variables-in-classes)
92 CodeLocation _instance;
93 };
94 };
95 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CodeLocationDefaultTypeInternal _CodeLocation_default_instance_;
GraphOpCreation(::_pbi::ConstantInitialized)96 PROTOBUF_CONSTEXPR GraphOpCreation::GraphOpCreation(
97 ::_pbi::ConstantInitialized): _impl_{
98 /*decltype(_impl_.input_names_)*/{}
99 , /*decltype(_impl_.output_tensor_ids_)*/{}
100 , /*decltype(_impl_._output_tensor_ids_cached_byte_size_)*/{0}
101 , /*decltype(_impl_.op_type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
102 , /*decltype(_impl_.op_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
103 , /*decltype(_impl_.graph_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
104 , /*decltype(_impl_.graph_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
105 , /*decltype(_impl_.device_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
106 , /*decltype(_impl_.code_location_)*/nullptr
107 , /*decltype(_impl_.num_outputs_)*/0
108 , /*decltype(_impl_._cached_size_)*/{}} {}
109 struct GraphOpCreationDefaultTypeInternal {
GraphOpCreationDefaultTypeInternaltensorflow::GraphOpCreationDefaultTypeInternal110 PROTOBUF_CONSTEXPR GraphOpCreationDefaultTypeInternal()
111 : _instance(::_pbi::ConstantInitialized{}) {}
~GraphOpCreationDefaultTypeInternaltensorflow::GraphOpCreationDefaultTypeInternal112 ~GraphOpCreationDefaultTypeInternal() {}
113 union { // NOLINT(misc-non-private-member-variables-in-classes)
114 GraphOpCreation _instance;
115 };
116 };
117 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GraphOpCreationDefaultTypeInternal _GraphOpCreation_default_instance_;
DebuggedGraph(::_pbi::ConstantInitialized)118 PROTOBUF_CONSTEXPR DebuggedGraph::DebuggedGraph(
119 ::_pbi::ConstantInitialized): _impl_{
120 /*decltype(_impl_.instrumented_ops_)*/{}
121 , /*decltype(_impl_.graph_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
122 , /*decltype(_impl_.graph_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
123 , /*decltype(_impl_.original_graph_def_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
124 , /*decltype(_impl_.instrumented_graph_def_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
125 , /*decltype(_impl_.outer_context_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
126 , /*decltype(_impl_._cached_size_)*/{}} {}
127 struct DebuggedGraphDefaultTypeInternal {
DebuggedGraphDefaultTypeInternaltensorflow::DebuggedGraphDefaultTypeInternal128 PROTOBUF_CONSTEXPR DebuggedGraphDefaultTypeInternal()
129 : _instance(::_pbi::ConstantInitialized{}) {}
~DebuggedGraphDefaultTypeInternaltensorflow::DebuggedGraphDefaultTypeInternal130 ~DebuggedGraphDefaultTypeInternal() {}
131 union { // NOLINT(misc-non-private-member-variables-in-classes)
132 DebuggedGraph _instance;
133 };
134 };
135 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DebuggedGraphDefaultTypeInternal _DebuggedGraph_default_instance_;
DebuggedDevice(::_pbi::ConstantInitialized)136 PROTOBUF_CONSTEXPR DebuggedDevice::DebuggedDevice(
137 ::_pbi::ConstantInitialized): _impl_{
138 /*decltype(_impl_.device_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
139 , /*decltype(_impl_.device_id_)*/0
140 , /*decltype(_impl_._cached_size_)*/{}} {}
141 struct DebuggedDeviceDefaultTypeInternal {
DebuggedDeviceDefaultTypeInternaltensorflow::DebuggedDeviceDefaultTypeInternal142 PROTOBUF_CONSTEXPR DebuggedDeviceDefaultTypeInternal()
143 : _instance(::_pbi::ConstantInitialized{}) {}
~DebuggedDeviceDefaultTypeInternaltensorflow::DebuggedDeviceDefaultTypeInternal144 ~DebuggedDeviceDefaultTypeInternal() {}
145 union { // NOLINT(misc-non-private-member-variables-in-classes)
146 DebuggedDevice _instance;
147 };
148 };
149 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DebuggedDeviceDefaultTypeInternal _DebuggedDevice_default_instance_;
Execution(::_pbi::ConstantInitialized)150 PROTOBUF_CONSTEXPR Execution::Execution(
151 ::_pbi::ConstantInitialized): _impl_{
152 /*decltype(_impl_.input_tensor_ids_)*/{}
153 , /*decltype(_impl_._input_tensor_ids_cached_byte_size_)*/{0}
154 , /*decltype(_impl_.output_tensor_ids_)*/{}
155 , /*decltype(_impl_._output_tensor_ids_cached_byte_size_)*/{0}
156 , /*decltype(_impl_.tensor_protos_)*/{}
157 , /*decltype(_impl_.output_tensor_device_ids_)*/{}
158 , /*decltype(_impl_._output_tensor_device_ids_cached_byte_size_)*/{0}
159 , /*decltype(_impl_.op_type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
160 , /*decltype(_impl_.graph_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
161 , /*decltype(_impl_.code_location_)*/nullptr
162 , /*decltype(_impl_.num_outputs_)*/0
163 , /*decltype(_impl_.tensor_debug_mode_)*/0
164 , /*decltype(_impl_._cached_size_)*/{}} {}
165 struct ExecutionDefaultTypeInternal {
ExecutionDefaultTypeInternaltensorflow::ExecutionDefaultTypeInternal166 PROTOBUF_CONSTEXPR ExecutionDefaultTypeInternal()
167 : _instance(::_pbi::ConstantInitialized{}) {}
~ExecutionDefaultTypeInternaltensorflow::ExecutionDefaultTypeInternal168 ~ExecutionDefaultTypeInternal() {}
169 union { // NOLINT(misc-non-private-member-variables-in-classes)
170 Execution _instance;
171 };
172 };
173 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExecutionDefaultTypeInternal _Execution_default_instance_;
GraphExecutionTrace(::_pbi::ConstantInitialized)174 PROTOBUF_CONSTEXPR GraphExecutionTrace::GraphExecutionTrace(
175 ::_pbi::ConstantInitialized): _impl_{
176 /*decltype(_impl_.tfdbg_context_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
177 , /*decltype(_impl_.op_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
178 , /*decltype(_impl_.device_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
179 , /*decltype(_impl_.tensor_proto_)*/nullptr
180 , /*decltype(_impl_.output_slot_)*/0
181 , /*decltype(_impl_.tensor_debug_mode_)*/0
182 , /*decltype(_impl_._cached_size_)*/{}} {}
183 struct GraphExecutionTraceDefaultTypeInternal {
GraphExecutionTraceDefaultTypeInternaltensorflow::GraphExecutionTraceDefaultTypeInternal184 PROTOBUF_CONSTEXPR GraphExecutionTraceDefaultTypeInternal()
185 : _instance(::_pbi::ConstantInitialized{}) {}
~GraphExecutionTraceDefaultTypeInternaltensorflow::GraphExecutionTraceDefaultTypeInternal186 ~GraphExecutionTraceDefaultTypeInternal() {}
187 union { // NOLINT(misc-non-private-member-variables-in-classes)
188 GraphExecutionTrace _instance;
189 };
190 };
191 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GraphExecutionTraceDefaultTypeInternal _GraphExecutionTrace_default_instance_;
192 } // namespace tensorflow
193 namespace tensorflow {
TensorDebugMode_IsValid(int value)194 bool TensorDebugMode_IsValid(int value) {
195 switch (value) {
196 case 0:
197 case 1:
198 case 2:
199 case 3:
200 case 4:
201 case 5:
202 case 6:
203 case 7:
204 case 8:
205 return true;
206 default:
207 return false;
208 }
209 }
210
211 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> TensorDebugMode_strings[9] = {};
212
213 static const char TensorDebugMode_names[] =
214 "CONCISE_HEALTH"
215 "CURT_HEALTH"
216 "FULL_HEALTH"
217 "FULL_NUMERICS"
218 "FULL_TENSOR"
219 "NO_TENSOR"
220 "REDUCE_INF_NAN_THREE_SLOTS"
221 "SHAPE"
222 "UNSPECIFIED";
223
224 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry TensorDebugMode_entries[] = {
225 { {TensorDebugMode_names + 0, 14}, 3 },
226 { {TensorDebugMode_names + 14, 11}, 2 },
227 { {TensorDebugMode_names + 25, 11}, 4 },
228 { {TensorDebugMode_names + 36, 13}, 6 },
229 { {TensorDebugMode_names + 49, 11}, 7 },
230 { {TensorDebugMode_names + 60, 9}, 1 },
231 { {TensorDebugMode_names + 69, 26}, 8 },
232 { {TensorDebugMode_names + 95, 5}, 5 },
233 { {TensorDebugMode_names + 100, 11}, 0 },
234 };
235
236 static const int TensorDebugMode_entries_by_number[] = {
237 8, // 0 -> UNSPECIFIED
238 5, // 1 -> NO_TENSOR
239 1, // 2 -> CURT_HEALTH
240 0, // 3 -> CONCISE_HEALTH
241 2, // 4 -> FULL_HEALTH
242 7, // 5 -> SHAPE
243 3, // 6 -> FULL_NUMERICS
244 4, // 7 -> FULL_TENSOR
245 6, // 8 -> REDUCE_INF_NAN_THREE_SLOTS
246 };
247
TensorDebugMode_Name(TensorDebugMode value)248 const std::string& TensorDebugMode_Name(
249 TensorDebugMode value) {
250 static const bool dummy =
251 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
252 TensorDebugMode_entries,
253 TensorDebugMode_entries_by_number,
254 9, TensorDebugMode_strings);
255 (void) dummy;
256 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
257 TensorDebugMode_entries,
258 TensorDebugMode_entries_by_number,
259 9, value);
260 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
261 TensorDebugMode_strings[idx].get();
262 }
TensorDebugMode_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,TensorDebugMode * value)263 bool TensorDebugMode_Parse(
264 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, TensorDebugMode* value) {
265 int int_value;
266 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
267 TensorDebugMode_entries, 9, name, &int_value);
268 if (success) {
269 *value = static_cast<TensorDebugMode>(int_value);
270 }
271 return success;
272 }
273
274 // ===================================================================
275
276 class DebugEvent::_Internal {
277 public:
278 static const ::tensorflow::DebugMetadata& debug_metadata(const DebugEvent* msg);
279 static const ::tensorflow::SourceFile& source_file(const DebugEvent* msg);
280 static const ::tensorflow::StackFrameWithId& stack_frame_with_id(const DebugEvent* msg);
281 static const ::tensorflow::GraphOpCreation& graph_op_creation(const DebugEvent* msg);
282 static const ::tensorflow::DebuggedGraph& debugged_graph(const DebugEvent* msg);
283 static const ::tensorflow::Execution& execution(const DebugEvent* msg);
284 static const ::tensorflow::GraphExecutionTrace& graph_execution_trace(const DebugEvent* msg);
285 static const ::tensorflow::DebuggedDevice& debugged_device(const DebugEvent* msg);
286 };
287
288 const ::tensorflow::DebugMetadata&
debug_metadata(const DebugEvent * msg)289 DebugEvent::_Internal::debug_metadata(const DebugEvent* msg) {
290 return *msg->_impl_.what_.debug_metadata_;
291 }
292 const ::tensorflow::SourceFile&
source_file(const DebugEvent * msg)293 DebugEvent::_Internal::source_file(const DebugEvent* msg) {
294 return *msg->_impl_.what_.source_file_;
295 }
296 const ::tensorflow::StackFrameWithId&
stack_frame_with_id(const DebugEvent * msg)297 DebugEvent::_Internal::stack_frame_with_id(const DebugEvent* msg) {
298 return *msg->_impl_.what_.stack_frame_with_id_;
299 }
300 const ::tensorflow::GraphOpCreation&
graph_op_creation(const DebugEvent * msg)301 DebugEvent::_Internal::graph_op_creation(const DebugEvent* msg) {
302 return *msg->_impl_.what_.graph_op_creation_;
303 }
304 const ::tensorflow::DebuggedGraph&
debugged_graph(const DebugEvent * msg)305 DebugEvent::_Internal::debugged_graph(const DebugEvent* msg) {
306 return *msg->_impl_.what_.debugged_graph_;
307 }
308 const ::tensorflow::Execution&
execution(const DebugEvent * msg)309 DebugEvent::_Internal::execution(const DebugEvent* msg) {
310 return *msg->_impl_.what_.execution_;
311 }
312 const ::tensorflow::GraphExecutionTrace&
graph_execution_trace(const DebugEvent * msg)313 DebugEvent::_Internal::graph_execution_trace(const DebugEvent* msg) {
314 return *msg->_impl_.what_.graph_execution_trace_;
315 }
316 const ::tensorflow::DebuggedDevice&
debugged_device(const DebugEvent * msg)317 DebugEvent::_Internal::debugged_device(const DebugEvent* msg) {
318 return *msg->_impl_.what_.debugged_device_;
319 }
set_allocated_debug_metadata(::tensorflow::DebugMetadata * debug_metadata)320 void DebugEvent::set_allocated_debug_metadata(::tensorflow::DebugMetadata* debug_metadata) {
321 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
322 clear_what();
323 if (debug_metadata) {
324 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
325 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(debug_metadata);
326 if (message_arena != submessage_arena) {
327 debug_metadata = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
328 message_arena, debug_metadata, submessage_arena);
329 }
330 set_has_debug_metadata();
331 _impl_.what_.debug_metadata_ = debug_metadata;
332 }
333 // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugEvent.debug_metadata)
334 }
set_allocated_source_file(::tensorflow::SourceFile * source_file)335 void DebugEvent::set_allocated_source_file(::tensorflow::SourceFile* source_file) {
336 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
337 clear_what();
338 if (source_file) {
339 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
340 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(source_file);
341 if (message_arena != submessage_arena) {
342 source_file = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
343 message_arena, source_file, submessage_arena);
344 }
345 set_has_source_file();
346 _impl_.what_.source_file_ = source_file;
347 }
348 // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugEvent.source_file)
349 }
set_allocated_stack_frame_with_id(::tensorflow::StackFrameWithId * stack_frame_with_id)350 void DebugEvent::set_allocated_stack_frame_with_id(::tensorflow::StackFrameWithId* stack_frame_with_id) {
351 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
352 clear_what();
353 if (stack_frame_with_id) {
354 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
355 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(stack_frame_with_id);
356 if (message_arena != submessage_arena) {
357 stack_frame_with_id = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
358 message_arena, stack_frame_with_id, submessage_arena);
359 }
360 set_has_stack_frame_with_id();
361 _impl_.what_.stack_frame_with_id_ = stack_frame_with_id;
362 }
363 // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugEvent.stack_frame_with_id)
364 }
set_allocated_graph_op_creation(::tensorflow::GraphOpCreation * graph_op_creation)365 void DebugEvent::set_allocated_graph_op_creation(::tensorflow::GraphOpCreation* graph_op_creation) {
366 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
367 clear_what();
368 if (graph_op_creation) {
369 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
370 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(graph_op_creation);
371 if (message_arena != submessage_arena) {
372 graph_op_creation = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
373 message_arena, graph_op_creation, submessage_arena);
374 }
375 set_has_graph_op_creation();
376 _impl_.what_.graph_op_creation_ = graph_op_creation;
377 }
378 // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugEvent.graph_op_creation)
379 }
set_allocated_debugged_graph(::tensorflow::DebuggedGraph * debugged_graph)380 void DebugEvent::set_allocated_debugged_graph(::tensorflow::DebuggedGraph* debugged_graph) {
381 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
382 clear_what();
383 if (debugged_graph) {
384 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
385 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(debugged_graph);
386 if (message_arena != submessage_arena) {
387 debugged_graph = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
388 message_arena, debugged_graph, submessage_arena);
389 }
390 set_has_debugged_graph();
391 _impl_.what_.debugged_graph_ = debugged_graph;
392 }
393 // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugEvent.debugged_graph)
394 }
set_allocated_execution(::tensorflow::Execution * execution)395 void DebugEvent::set_allocated_execution(::tensorflow::Execution* execution) {
396 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
397 clear_what();
398 if (execution) {
399 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
400 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(execution);
401 if (message_arena != submessage_arena) {
402 execution = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
403 message_arena, execution, submessage_arena);
404 }
405 set_has_execution();
406 _impl_.what_.execution_ = execution;
407 }
408 // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugEvent.execution)
409 }
set_allocated_graph_execution_trace(::tensorflow::GraphExecutionTrace * graph_execution_trace)410 void DebugEvent::set_allocated_graph_execution_trace(::tensorflow::GraphExecutionTrace* graph_execution_trace) {
411 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
412 clear_what();
413 if (graph_execution_trace) {
414 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
415 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(graph_execution_trace);
416 if (message_arena != submessage_arena) {
417 graph_execution_trace = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
418 message_arena, graph_execution_trace, submessage_arena);
419 }
420 set_has_graph_execution_trace();
421 _impl_.what_.graph_execution_trace_ = graph_execution_trace;
422 }
423 // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugEvent.graph_execution_trace)
424 }
set_allocated_debugged_device(::tensorflow::DebuggedDevice * debugged_device)425 void DebugEvent::set_allocated_debugged_device(::tensorflow::DebuggedDevice* debugged_device) {
426 ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
427 clear_what();
428 if (debugged_device) {
429 ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
430 ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(debugged_device);
431 if (message_arena != submessage_arena) {
432 debugged_device = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
433 message_arena, debugged_device, submessage_arena);
434 }
435 set_has_debugged_device();
436 _impl_.what_.debugged_device_ = debugged_device;
437 }
438 // @@protoc_insertion_point(field_set_allocated:tensorflow.DebugEvent.debugged_device)
439 }
DebugEvent(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)440 DebugEvent::DebugEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena,
441 bool is_message_owned)
442 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
443 SharedCtor(arena, is_message_owned);
444 // @@protoc_insertion_point(arena_constructor:tensorflow.DebugEvent)
445 }
DebugEvent(const DebugEvent & from)446 DebugEvent::DebugEvent(const DebugEvent& from)
447 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
448 DebugEvent* const _this = this; (void)_this;
449 new (&_impl_) Impl_{
450 decltype(_impl_.wall_time_){}
451 , decltype(_impl_.step_){}
452 , decltype(_impl_.what_){}
453 , /*decltype(_impl_._cached_size_)*/{}
454 , /*decltype(_impl_._oneof_case_)*/{}};
455
456 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
457 ::memcpy(&_impl_.wall_time_, &from._impl_.wall_time_,
458 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.step_) -
459 reinterpret_cast<char*>(&_impl_.wall_time_)) + sizeof(_impl_.step_));
460 clear_has_what();
461 switch (from.what_case()) {
462 case kDebugMetadata: {
463 _this->_internal_mutable_debug_metadata()->::tensorflow::DebugMetadata::MergeFrom(
464 from._internal_debug_metadata());
465 break;
466 }
467 case kSourceFile: {
468 _this->_internal_mutable_source_file()->::tensorflow::SourceFile::MergeFrom(
469 from._internal_source_file());
470 break;
471 }
472 case kStackFrameWithId: {
473 _this->_internal_mutable_stack_frame_with_id()->::tensorflow::StackFrameWithId::MergeFrom(
474 from._internal_stack_frame_with_id());
475 break;
476 }
477 case kGraphOpCreation: {
478 _this->_internal_mutable_graph_op_creation()->::tensorflow::GraphOpCreation::MergeFrom(
479 from._internal_graph_op_creation());
480 break;
481 }
482 case kDebuggedGraph: {
483 _this->_internal_mutable_debugged_graph()->::tensorflow::DebuggedGraph::MergeFrom(
484 from._internal_debugged_graph());
485 break;
486 }
487 case kExecution: {
488 _this->_internal_mutable_execution()->::tensorflow::Execution::MergeFrom(
489 from._internal_execution());
490 break;
491 }
492 case kGraphExecutionTrace: {
493 _this->_internal_mutable_graph_execution_trace()->::tensorflow::GraphExecutionTrace::MergeFrom(
494 from._internal_graph_execution_trace());
495 break;
496 }
497 case kGraphId: {
498 _this->_internal_set_graph_id(from._internal_graph_id());
499 break;
500 }
501 case kDebuggedDevice: {
502 _this->_internal_mutable_debugged_device()->::tensorflow::DebuggedDevice::MergeFrom(
503 from._internal_debugged_device());
504 break;
505 }
506 case WHAT_NOT_SET: {
507 break;
508 }
509 }
510 // @@protoc_insertion_point(copy_constructor:tensorflow.DebugEvent)
511 }
512
SharedCtor(::_pb::Arena * arena,bool is_message_owned)513 inline void DebugEvent::SharedCtor(
514 ::_pb::Arena* arena, bool is_message_owned) {
515 (void)arena;
516 (void)is_message_owned;
517 new (&_impl_) Impl_{
518 decltype(_impl_.wall_time_){0}
519 , decltype(_impl_.step_){::int64_t{0}}
520 , decltype(_impl_.what_){}
521 , /*decltype(_impl_._cached_size_)*/{}
522 , /*decltype(_impl_._oneof_case_)*/{}
523 };
524 clear_has_what();
525 }
526
~DebugEvent()527 DebugEvent::~DebugEvent() {
528 // @@protoc_insertion_point(destructor:tensorflow.DebugEvent)
529 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
530 (void)arena;
531 return;
532 }
533 SharedDtor();
534 }
535
SharedDtor()536 inline void DebugEvent::SharedDtor() {
537 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
538 if (has_what()) {
539 clear_what();
540 }
541 }
542
SetCachedSize(int size) const543 void DebugEvent::SetCachedSize(int size) const {
544 _impl_._cached_size_.Set(size);
545 }
546
clear_what()547 void DebugEvent::clear_what() {
548 // @@protoc_insertion_point(one_of_clear_start:tensorflow.DebugEvent)
549 switch (what_case()) {
550 case kDebugMetadata: {
551 if (GetArenaForAllocation() == nullptr) {
552 delete _impl_.what_.debug_metadata_;
553 }
554 break;
555 }
556 case kSourceFile: {
557 if (GetArenaForAllocation() == nullptr) {
558 delete _impl_.what_.source_file_;
559 }
560 break;
561 }
562 case kStackFrameWithId: {
563 if (GetArenaForAllocation() == nullptr) {
564 delete _impl_.what_.stack_frame_with_id_;
565 }
566 break;
567 }
568 case kGraphOpCreation: {
569 if (GetArenaForAllocation() == nullptr) {
570 delete _impl_.what_.graph_op_creation_;
571 }
572 break;
573 }
574 case kDebuggedGraph: {
575 if (GetArenaForAllocation() == nullptr) {
576 delete _impl_.what_.debugged_graph_;
577 }
578 break;
579 }
580 case kExecution: {
581 if (GetArenaForAllocation() == nullptr) {
582 delete _impl_.what_.execution_;
583 }
584 break;
585 }
586 case kGraphExecutionTrace: {
587 if (GetArenaForAllocation() == nullptr) {
588 delete _impl_.what_.graph_execution_trace_;
589 }
590 break;
591 }
592 case kGraphId: {
593 _impl_.what_.graph_id_.Destroy();
594 break;
595 }
596 case kDebuggedDevice: {
597 if (GetArenaForAllocation() == nullptr) {
598 delete _impl_.what_.debugged_device_;
599 }
600 break;
601 }
602 case WHAT_NOT_SET: {
603 break;
604 }
605 }
606 _impl_._oneof_case_[0] = WHAT_NOT_SET;
607 }
608
609
Clear()610 void DebugEvent::Clear() {
611 // @@protoc_insertion_point(message_clear_start:tensorflow.DebugEvent)
612 ::uint32_t cached_has_bits = 0;
613 // Prevent compiler warnings about cached_has_bits being unused
614 (void) cached_has_bits;
615
616 ::memset(&_impl_.wall_time_, 0, static_cast<size_t>(
617 reinterpret_cast<char*>(&_impl_.step_) -
618 reinterpret_cast<char*>(&_impl_.wall_time_)) + sizeof(_impl_.step_));
619 clear_what();
620 _internal_metadata_.Clear<std::string>();
621 }
622
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)623 const char* DebugEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
624 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
625 while (!ctx->Done(&ptr)) {
626 ::uint32_t tag;
627 ptr = ::_pbi::ReadTag(ptr, &tag);
628 switch (tag >> 3) {
629 // double wall_time = 1;
630 case 1:
631 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 9)) {
632 _impl_.wall_time_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
633 ptr += sizeof(double);
634 } else {
635 goto handle_unusual;
636 }
637 continue;
638 // int64 step = 2;
639 case 2:
640 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
641 _impl_.step_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
642 CHK_(ptr);
643 } else {
644 goto handle_unusual;
645 }
646 continue;
647 // .tensorflow.DebugMetadata debug_metadata = 3;
648 case 3:
649 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
650 ptr = ctx->ParseMessage(_internal_mutable_debug_metadata(), ptr);
651 CHK_(ptr);
652 } else {
653 goto handle_unusual;
654 }
655 continue;
656 // .tensorflow.SourceFile source_file = 4;
657 case 4:
658 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
659 ptr = ctx->ParseMessage(_internal_mutable_source_file(), ptr);
660 CHK_(ptr);
661 } else {
662 goto handle_unusual;
663 }
664 continue;
665 // .tensorflow.StackFrameWithId stack_frame_with_id = 6;
666 case 6:
667 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
668 ptr = ctx->ParseMessage(_internal_mutable_stack_frame_with_id(), ptr);
669 CHK_(ptr);
670 } else {
671 goto handle_unusual;
672 }
673 continue;
674 // .tensorflow.GraphOpCreation graph_op_creation = 7;
675 case 7:
676 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
677 ptr = ctx->ParseMessage(_internal_mutable_graph_op_creation(), ptr);
678 CHK_(ptr);
679 } else {
680 goto handle_unusual;
681 }
682 continue;
683 // .tensorflow.DebuggedGraph debugged_graph = 8;
684 case 8:
685 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
686 ptr = ctx->ParseMessage(_internal_mutable_debugged_graph(), ptr);
687 CHK_(ptr);
688 } else {
689 goto handle_unusual;
690 }
691 continue;
692 // .tensorflow.Execution execution = 9;
693 case 9:
694 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
695 ptr = ctx->ParseMessage(_internal_mutable_execution(), ptr);
696 CHK_(ptr);
697 } else {
698 goto handle_unusual;
699 }
700 continue;
701 // .tensorflow.GraphExecutionTrace graph_execution_trace = 10;
702 case 10:
703 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
704 ptr = ctx->ParseMessage(_internal_mutable_graph_execution_trace(), ptr);
705 CHK_(ptr);
706 } else {
707 goto handle_unusual;
708 }
709 continue;
710 // string graph_id = 11;
711 case 11:
712 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
713 auto str = _internal_mutable_graph_id();
714 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
715 CHK_(ptr);
716 CHK_(::_pbi::VerifyUTF8(str, nullptr));
717 } else {
718 goto handle_unusual;
719 }
720 continue;
721 // .tensorflow.DebuggedDevice debugged_device = 12;
722 case 12:
723 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 98)) {
724 ptr = ctx->ParseMessage(_internal_mutable_debugged_device(), ptr);
725 CHK_(ptr);
726 } else {
727 goto handle_unusual;
728 }
729 continue;
730 default:
731 goto handle_unusual;
732 } // switch
733 handle_unusual:
734 if ((tag == 0) || ((tag & 7) == 4)) {
735 CHK_(ptr);
736 ctx->SetLastTag(tag);
737 goto message_done;
738 }
739 ptr = UnknownFieldParse(
740 tag,
741 _internal_metadata_.mutable_unknown_fields<std::string>(),
742 ptr, ctx);
743 CHK_(ptr != nullptr);
744 } // while
745 message_done:
746 return ptr;
747 failure:
748 ptr = nullptr;
749 goto message_done;
750 #undef CHK_
751 }
752
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const753 ::uint8_t* DebugEvent::_InternalSerialize(
754 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
755 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.DebugEvent)
756 ::uint32_t cached_has_bits = 0;
757 (void) cached_has_bits;
758
759 // double wall_time = 1;
760 static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
761 double tmp_wall_time = this->_internal_wall_time();
762 ::uint64_t raw_wall_time;
763 memcpy(&raw_wall_time, &tmp_wall_time, sizeof(tmp_wall_time));
764 if (raw_wall_time != 0) {
765 target = stream->EnsureSpace(target);
766 target = ::_pbi::WireFormatLite::WriteDoubleToArray(1, this->_internal_wall_time(), target);
767 }
768
769 // int64 step = 2;
770 if (this->_internal_step() != 0) {
771 target = stream->EnsureSpace(target);
772 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_step(), target);
773 }
774
775 // .tensorflow.DebugMetadata debug_metadata = 3;
776 if (_internal_has_debug_metadata()) {
777 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
778 InternalWriteMessage(3, _Internal::debug_metadata(this),
779 _Internal::debug_metadata(this).GetCachedSize(), target, stream);
780 }
781
782 // .tensorflow.SourceFile source_file = 4;
783 if (_internal_has_source_file()) {
784 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
785 InternalWriteMessage(4, _Internal::source_file(this),
786 _Internal::source_file(this).GetCachedSize(), target, stream);
787 }
788
789 // .tensorflow.StackFrameWithId stack_frame_with_id = 6;
790 if (_internal_has_stack_frame_with_id()) {
791 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
792 InternalWriteMessage(6, _Internal::stack_frame_with_id(this),
793 _Internal::stack_frame_with_id(this).GetCachedSize(), target, stream);
794 }
795
796 // .tensorflow.GraphOpCreation graph_op_creation = 7;
797 if (_internal_has_graph_op_creation()) {
798 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
799 InternalWriteMessage(7, _Internal::graph_op_creation(this),
800 _Internal::graph_op_creation(this).GetCachedSize(), target, stream);
801 }
802
803 // .tensorflow.DebuggedGraph debugged_graph = 8;
804 if (_internal_has_debugged_graph()) {
805 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
806 InternalWriteMessage(8, _Internal::debugged_graph(this),
807 _Internal::debugged_graph(this).GetCachedSize(), target, stream);
808 }
809
810 // .tensorflow.Execution execution = 9;
811 if (_internal_has_execution()) {
812 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
813 InternalWriteMessage(9, _Internal::execution(this),
814 _Internal::execution(this).GetCachedSize(), target, stream);
815 }
816
817 // .tensorflow.GraphExecutionTrace graph_execution_trace = 10;
818 if (_internal_has_graph_execution_trace()) {
819 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
820 InternalWriteMessage(10, _Internal::graph_execution_trace(this),
821 _Internal::graph_execution_trace(this).GetCachedSize(), target, stream);
822 }
823
824 // string graph_id = 11;
825 if (_internal_has_graph_id()) {
826 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
827 this->_internal_graph_id().data(), static_cast<int>(this->_internal_graph_id().length()),
828 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
829 "tensorflow.DebugEvent.graph_id");
830 target = stream->WriteStringMaybeAliased(
831 11, this->_internal_graph_id(), target);
832 }
833
834 // .tensorflow.DebuggedDevice debugged_device = 12;
835 if (_internal_has_debugged_device()) {
836 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
837 InternalWriteMessage(12, _Internal::debugged_device(this),
838 _Internal::debugged_device(this).GetCachedSize(), target, stream);
839 }
840
841 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
842 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
843 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
844 }
845 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.DebugEvent)
846 return target;
847 }
848
ByteSizeLong() const849 size_t DebugEvent::ByteSizeLong() const {
850 // @@protoc_insertion_point(message_byte_size_start:tensorflow.DebugEvent)
851 size_t total_size = 0;
852
853 ::uint32_t cached_has_bits = 0;
854 // Prevent compiler warnings about cached_has_bits being unused
855 (void) cached_has_bits;
856
857 // double wall_time = 1;
858 static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
859 double tmp_wall_time = this->_internal_wall_time();
860 ::uint64_t raw_wall_time;
861 memcpy(&raw_wall_time, &tmp_wall_time, sizeof(tmp_wall_time));
862 if (raw_wall_time != 0) {
863 total_size += 1 + 8;
864 }
865
866 // int64 step = 2;
867 if (this->_internal_step() != 0) {
868 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_step());
869 }
870
871 switch (what_case()) {
872 // .tensorflow.DebugMetadata debug_metadata = 3;
873 case kDebugMetadata: {
874 total_size += 1 +
875 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
876 *_impl_.what_.debug_metadata_);
877 break;
878 }
879 // .tensorflow.SourceFile source_file = 4;
880 case kSourceFile: {
881 total_size += 1 +
882 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
883 *_impl_.what_.source_file_);
884 break;
885 }
886 // .tensorflow.StackFrameWithId stack_frame_with_id = 6;
887 case kStackFrameWithId: {
888 total_size += 1 +
889 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
890 *_impl_.what_.stack_frame_with_id_);
891 break;
892 }
893 // .tensorflow.GraphOpCreation graph_op_creation = 7;
894 case kGraphOpCreation: {
895 total_size += 1 +
896 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
897 *_impl_.what_.graph_op_creation_);
898 break;
899 }
900 // .tensorflow.DebuggedGraph debugged_graph = 8;
901 case kDebuggedGraph: {
902 total_size += 1 +
903 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
904 *_impl_.what_.debugged_graph_);
905 break;
906 }
907 // .tensorflow.Execution execution = 9;
908 case kExecution: {
909 total_size += 1 +
910 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
911 *_impl_.what_.execution_);
912 break;
913 }
914 // .tensorflow.GraphExecutionTrace graph_execution_trace = 10;
915 case kGraphExecutionTrace: {
916 total_size += 1 +
917 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
918 *_impl_.what_.graph_execution_trace_);
919 break;
920 }
921 // string graph_id = 11;
922 case kGraphId: {
923 total_size += 1 +
924 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
925 this->_internal_graph_id());
926 break;
927 }
928 // .tensorflow.DebuggedDevice debugged_device = 12;
929 case kDebuggedDevice: {
930 total_size += 1 +
931 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
932 *_impl_.what_.debugged_device_);
933 break;
934 }
935 case WHAT_NOT_SET: {
936 break;
937 }
938 }
939 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
940 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
941 }
942 int cached_size = ::_pbi::ToCachedSize(total_size);
943 SetCachedSize(cached_size);
944 return total_size;
945 }
946
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)947 void DebugEvent::CheckTypeAndMergeFrom(
948 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
949 MergeFrom(*::_pbi::DownCast<const DebugEvent*>(
950 &from));
951 }
952
MergeFrom(const DebugEvent & from)953 void DebugEvent::MergeFrom(const DebugEvent& from) {
954 DebugEvent* const _this = this;
955 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.DebugEvent)
956 GOOGLE_DCHECK_NE(&from, _this);
957 ::uint32_t cached_has_bits = 0;
958 (void) cached_has_bits;
959
960 static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size.");
961 double tmp_wall_time = from._internal_wall_time();
962 ::uint64_t raw_wall_time;
963 memcpy(&raw_wall_time, &tmp_wall_time, sizeof(tmp_wall_time));
964 if (raw_wall_time != 0) {
965 _this->_internal_set_wall_time(from._internal_wall_time());
966 }
967 if (from._internal_step() != 0) {
968 _this->_internal_set_step(from._internal_step());
969 }
970 switch (from.what_case()) {
971 case kDebugMetadata: {
972 _this->_internal_mutable_debug_metadata()->::tensorflow::DebugMetadata::MergeFrom(
973 from._internal_debug_metadata());
974 break;
975 }
976 case kSourceFile: {
977 _this->_internal_mutable_source_file()->::tensorflow::SourceFile::MergeFrom(
978 from._internal_source_file());
979 break;
980 }
981 case kStackFrameWithId: {
982 _this->_internal_mutable_stack_frame_with_id()->::tensorflow::StackFrameWithId::MergeFrom(
983 from._internal_stack_frame_with_id());
984 break;
985 }
986 case kGraphOpCreation: {
987 _this->_internal_mutable_graph_op_creation()->::tensorflow::GraphOpCreation::MergeFrom(
988 from._internal_graph_op_creation());
989 break;
990 }
991 case kDebuggedGraph: {
992 _this->_internal_mutable_debugged_graph()->::tensorflow::DebuggedGraph::MergeFrom(
993 from._internal_debugged_graph());
994 break;
995 }
996 case kExecution: {
997 _this->_internal_mutable_execution()->::tensorflow::Execution::MergeFrom(
998 from._internal_execution());
999 break;
1000 }
1001 case kGraphExecutionTrace: {
1002 _this->_internal_mutable_graph_execution_trace()->::tensorflow::GraphExecutionTrace::MergeFrom(
1003 from._internal_graph_execution_trace());
1004 break;
1005 }
1006 case kGraphId: {
1007 _this->_internal_set_graph_id(from._internal_graph_id());
1008 break;
1009 }
1010 case kDebuggedDevice: {
1011 _this->_internal_mutable_debugged_device()->::tensorflow::DebuggedDevice::MergeFrom(
1012 from._internal_debugged_device());
1013 break;
1014 }
1015 case WHAT_NOT_SET: {
1016 break;
1017 }
1018 }
1019 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1020 }
1021
CopyFrom(const DebugEvent & from)1022 void DebugEvent::CopyFrom(const DebugEvent& from) {
1023 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.DebugEvent)
1024 if (&from == this) return;
1025 Clear();
1026 MergeFrom(from);
1027 }
1028
IsInitialized() const1029 bool DebugEvent::IsInitialized() const {
1030 return true;
1031 }
1032
InternalSwap(DebugEvent * other)1033 void DebugEvent::InternalSwap(DebugEvent* other) {
1034 using std::swap;
1035 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1036 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1037 PROTOBUF_FIELD_OFFSET(DebugEvent, _impl_.step_)
1038 + sizeof(DebugEvent::_impl_.step_) // NOLINT
1039 - PROTOBUF_FIELD_OFFSET(DebugEvent, _impl_.wall_time_)>(
1040 reinterpret_cast<char*>(&_impl_.wall_time_),
1041 reinterpret_cast<char*>(&other->_impl_.wall_time_));
1042 swap(_impl_.what_, other->_impl_.what_);
1043 swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
1044 }
1045
GetTypeName() const1046 std::string DebugEvent::GetTypeName() const {
1047 return "tensorflow.DebugEvent";
1048 }
1049
1050
1051 // ===================================================================
1052
1053 class DebugMetadata::_Internal {
1054 public:
1055 };
1056
DebugMetadata(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1057 DebugMetadata::DebugMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1058 bool is_message_owned)
1059 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1060 SharedCtor(arena, is_message_owned);
1061 // @@protoc_insertion_point(arena_constructor:tensorflow.DebugMetadata)
1062 }
DebugMetadata(const DebugMetadata & from)1063 DebugMetadata::DebugMetadata(const DebugMetadata& from)
1064 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1065 DebugMetadata* const _this = this; (void)_this;
1066 new (&_impl_) Impl_{
1067 decltype(_impl_.tensorflow_version_){}
1068 , decltype(_impl_.file_version_){}
1069 , decltype(_impl_.tfdbg_run_id_){}
1070 , /*decltype(_impl_._cached_size_)*/{}};
1071
1072 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1073 _impl_.tensorflow_version_.InitDefault();
1074 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1075 _impl_.tensorflow_version_.Set("", GetArenaForAllocation());
1076 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1077 if (!from._internal_tensorflow_version().empty()) {
1078 _this->_impl_.tensorflow_version_.Set(from._internal_tensorflow_version(),
1079 _this->GetArenaForAllocation());
1080 }
1081 _impl_.file_version_.InitDefault();
1082 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1083 _impl_.file_version_.Set("", GetArenaForAllocation());
1084 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1085 if (!from._internal_file_version().empty()) {
1086 _this->_impl_.file_version_.Set(from._internal_file_version(),
1087 _this->GetArenaForAllocation());
1088 }
1089 _impl_.tfdbg_run_id_.InitDefault();
1090 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1091 _impl_.tfdbg_run_id_.Set("", GetArenaForAllocation());
1092 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1093 if (!from._internal_tfdbg_run_id().empty()) {
1094 _this->_impl_.tfdbg_run_id_.Set(from._internal_tfdbg_run_id(),
1095 _this->GetArenaForAllocation());
1096 }
1097 // @@protoc_insertion_point(copy_constructor:tensorflow.DebugMetadata)
1098 }
1099
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1100 inline void DebugMetadata::SharedCtor(
1101 ::_pb::Arena* arena, bool is_message_owned) {
1102 (void)arena;
1103 (void)is_message_owned;
1104 new (&_impl_) Impl_{
1105 decltype(_impl_.tensorflow_version_){}
1106 , decltype(_impl_.file_version_){}
1107 , decltype(_impl_.tfdbg_run_id_){}
1108 , /*decltype(_impl_._cached_size_)*/{}
1109 };
1110 _impl_.tensorflow_version_.InitDefault();
1111 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1112 _impl_.tensorflow_version_.Set("", GetArenaForAllocation());
1113 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1114 _impl_.file_version_.InitDefault();
1115 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1116 _impl_.file_version_.Set("", GetArenaForAllocation());
1117 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1118 _impl_.tfdbg_run_id_.InitDefault();
1119 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1120 _impl_.tfdbg_run_id_.Set("", GetArenaForAllocation());
1121 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1122 }
1123
~DebugMetadata()1124 DebugMetadata::~DebugMetadata() {
1125 // @@protoc_insertion_point(destructor:tensorflow.DebugMetadata)
1126 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1127 (void)arena;
1128 return;
1129 }
1130 SharedDtor();
1131 }
1132
SharedDtor()1133 inline void DebugMetadata::SharedDtor() {
1134 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1135 _impl_.tensorflow_version_.Destroy();
1136 _impl_.file_version_.Destroy();
1137 _impl_.tfdbg_run_id_.Destroy();
1138 }
1139
SetCachedSize(int size) const1140 void DebugMetadata::SetCachedSize(int size) const {
1141 _impl_._cached_size_.Set(size);
1142 }
1143
Clear()1144 void DebugMetadata::Clear() {
1145 // @@protoc_insertion_point(message_clear_start:tensorflow.DebugMetadata)
1146 ::uint32_t cached_has_bits = 0;
1147 // Prevent compiler warnings about cached_has_bits being unused
1148 (void) cached_has_bits;
1149
1150 _impl_.tensorflow_version_.ClearToEmpty();
1151 _impl_.file_version_.ClearToEmpty();
1152 _impl_.tfdbg_run_id_.ClearToEmpty();
1153 _internal_metadata_.Clear<std::string>();
1154 }
1155
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1156 const char* DebugMetadata::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1157 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1158 while (!ctx->Done(&ptr)) {
1159 ::uint32_t tag;
1160 ptr = ::_pbi::ReadTag(ptr, &tag);
1161 switch (tag >> 3) {
1162 // string tensorflow_version = 1;
1163 case 1:
1164 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1165 auto str = _internal_mutable_tensorflow_version();
1166 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1167 CHK_(ptr);
1168 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1169 } else {
1170 goto handle_unusual;
1171 }
1172 continue;
1173 // string file_version = 2;
1174 case 2:
1175 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1176 auto str = _internal_mutable_file_version();
1177 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1178 CHK_(ptr);
1179 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1180 } else {
1181 goto handle_unusual;
1182 }
1183 continue;
1184 // string tfdbg_run_id = 3;
1185 case 3:
1186 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1187 auto str = _internal_mutable_tfdbg_run_id();
1188 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1189 CHK_(ptr);
1190 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1191 } else {
1192 goto handle_unusual;
1193 }
1194 continue;
1195 default:
1196 goto handle_unusual;
1197 } // switch
1198 handle_unusual:
1199 if ((tag == 0) || ((tag & 7) == 4)) {
1200 CHK_(ptr);
1201 ctx->SetLastTag(tag);
1202 goto message_done;
1203 }
1204 ptr = UnknownFieldParse(
1205 tag,
1206 _internal_metadata_.mutable_unknown_fields<std::string>(),
1207 ptr, ctx);
1208 CHK_(ptr != nullptr);
1209 } // while
1210 message_done:
1211 return ptr;
1212 failure:
1213 ptr = nullptr;
1214 goto message_done;
1215 #undef CHK_
1216 }
1217
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1218 ::uint8_t* DebugMetadata::_InternalSerialize(
1219 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1220 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.DebugMetadata)
1221 ::uint32_t cached_has_bits = 0;
1222 (void) cached_has_bits;
1223
1224 // string tensorflow_version = 1;
1225 if (!this->_internal_tensorflow_version().empty()) {
1226 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1227 this->_internal_tensorflow_version().data(), static_cast<int>(this->_internal_tensorflow_version().length()),
1228 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1229 "tensorflow.DebugMetadata.tensorflow_version");
1230 target = stream->WriteStringMaybeAliased(
1231 1, this->_internal_tensorflow_version(), target);
1232 }
1233
1234 // string file_version = 2;
1235 if (!this->_internal_file_version().empty()) {
1236 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1237 this->_internal_file_version().data(), static_cast<int>(this->_internal_file_version().length()),
1238 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1239 "tensorflow.DebugMetadata.file_version");
1240 target = stream->WriteStringMaybeAliased(
1241 2, this->_internal_file_version(), target);
1242 }
1243
1244 // string tfdbg_run_id = 3;
1245 if (!this->_internal_tfdbg_run_id().empty()) {
1246 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1247 this->_internal_tfdbg_run_id().data(), static_cast<int>(this->_internal_tfdbg_run_id().length()),
1248 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1249 "tensorflow.DebugMetadata.tfdbg_run_id");
1250 target = stream->WriteStringMaybeAliased(
1251 3, this->_internal_tfdbg_run_id(), target);
1252 }
1253
1254 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1255 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1256 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1257 }
1258 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.DebugMetadata)
1259 return target;
1260 }
1261
ByteSizeLong() const1262 size_t DebugMetadata::ByteSizeLong() const {
1263 // @@protoc_insertion_point(message_byte_size_start:tensorflow.DebugMetadata)
1264 size_t total_size = 0;
1265
1266 ::uint32_t cached_has_bits = 0;
1267 // Prevent compiler warnings about cached_has_bits being unused
1268 (void) cached_has_bits;
1269
1270 // string tensorflow_version = 1;
1271 if (!this->_internal_tensorflow_version().empty()) {
1272 total_size += 1 +
1273 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1274 this->_internal_tensorflow_version());
1275 }
1276
1277 // string file_version = 2;
1278 if (!this->_internal_file_version().empty()) {
1279 total_size += 1 +
1280 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1281 this->_internal_file_version());
1282 }
1283
1284 // string tfdbg_run_id = 3;
1285 if (!this->_internal_tfdbg_run_id().empty()) {
1286 total_size += 1 +
1287 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1288 this->_internal_tfdbg_run_id());
1289 }
1290
1291 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1292 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1293 }
1294 int cached_size = ::_pbi::ToCachedSize(total_size);
1295 SetCachedSize(cached_size);
1296 return total_size;
1297 }
1298
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1299 void DebugMetadata::CheckTypeAndMergeFrom(
1300 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1301 MergeFrom(*::_pbi::DownCast<const DebugMetadata*>(
1302 &from));
1303 }
1304
MergeFrom(const DebugMetadata & from)1305 void DebugMetadata::MergeFrom(const DebugMetadata& from) {
1306 DebugMetadata* const _this = this;
1307 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.DebugMetadata)
1308 GOOGLE_DCHECK_NE(&from, _this);
1309 ::uint32_t cached_has_bits = 0;
1310 (void) cached_has_bits;
1311
1312 if (!from._internal_tensorflow_version().empty()) {
1313 _this->_internal_set_tensorflow_version(from._internal_tensorflow_version());
1314 }
1315 if (!from._internal_file_version().empty()) {
1316 _this->_internal_set_file_version(from._internal_file_version());
1317 }
1318 if (!from._internal_tfdbg_run_id().empty()) {
1319 _this->_internal_set_tfdbg_run_id(from._internal_tfdbg_run_id());
1320 }
1321 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1322 }
1323
CopyFrom(const DebugMetadata & from)1324 void DebugMetadata::CopyFrom(const DebugMetadata& from) {
1325 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.DebugMetadata)
1326 if (&from == this) return;
1327 Clear();
1328 MergeFrom(from);
1329 }
1330
IsInitialized() const1331 bool DebugMetadata::IsInitialized() const {
1332 return true;
1333 }
1334
InternalSwap(DebugMetadata * other)1335 void DebugMetadata::InternalSwap(DebugMetadata* other) {
1336 using std::swap;
1337 auto* lhs_arena = GetArenaForAllocation();
1338 auto* rhs_arena = other->GetArenaForAllocation();
1339 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1340 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1341 &_impl_.tensorflow_version_, lhs_arena,
1342 &other->_impl_.tensorflow_version_, rhs_arena
1343 );
1344 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1345 &_impl_.file_version_, lhs_arena,
1346 &other->_impl_.file_version_, rhs_arena
1347 );
1348 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1349 &_impl_.tfdbg_run_id_, lhs_arena,
1350 &other->_impl_.tfdbg_run_id_, rhs_arena
1351 );
1352 }
1353
GetTypeName() const1354 std::string DebugMetadata::GetTypeName() const {
1355 return "tensorflow.DebugMetadata";
1356 }
1357
1358
1359 // ===================================================================
1360
1361 class SourceFile::_Internal {
1362 public:
1363 };
1364
SourceFile(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1365 SourceFile::SourceFile(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1366 bool is_message_owned)
1367 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1368 SharedCtor(arena, is_message_owned);
1369 // @@protoc_insertion_point(arena_constructor:tensorflow.SourceFile)
1370 }
SourceFile(const SourceFile & from)1371 SourceFile::SourceFile(const SourceFile& from)
1372 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1373 SourceFile* const _this = this; (void)_this;
1374 new (&_impl_) Impl_{
1375 decltype(_impl_.lines_){from._impl_.lines_}
1376 , decltype(_impl_.file_path_){}
1377 , decltype(_impl_.host_name_){}
1378 , /*decltype(_impl_._cached_size_)*/{}};
1379
1380 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1381 _impl_.file_path_.InitDefault();
1382 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1383 _impl_.file_path_.Set("", GetArenaForAllocation());
1384 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1385 if (!from._internal_file_path().empty()) {
1386 _this->_impl_.file_path_.Set(from._internal_file_path(),
1387 _this->GetArenaForAllocation());
1388 }
1389 _impl_.host_name_.InitDefault();
1390 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1391 _impl_.host_name_.Set("", GetArenaForAllocation());
1392 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1393 if (!from._internal_host_name().empty()) {
1394 _this->_impl_.host_name_.Set(from._internal_host_name(),
1395 _this->GetArenaForAllocation());
1396 }
1397 // @@protoc_insertion_point(copy_constructor:tensorflow.SourceFile)
1398 }
1399
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1400 inline void SourceFile::SharedCtor(
1401 ::_pb::Arena* arena, bool is_message_owned) {
1402 (void)arena;
1403 (void)is_message_owned;
1404 new (&_impl_) Impl_{
1405 decltype(_impl_.lines_){arena}
1406 , decltype(_impl_.file_path_){}
1407 , decltype(_impl_.host_name_){}
1408 , /*decltype(_impl_._cached_size_)*/{}
1409 };
1410 _impl_.file_path_.InitDefault();
1411 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1412 _impl_.file_path_.Set("", GetArenaForAllocation());
1413 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1414 _impl_.host_name_.InitDefault();
1415 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1416 _impl_.host_name_.Set("", GetArenaForAllocation());
1417 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1418 }
1419
~SourceFile()1420 SourceFile::~SourceFile() {
1421 // @@protoc_insertion_point(destructor:tensorflow.SourceFile)
1422 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1423 (void)arena;
1424 return;
1425 }
1426 SharedDtor();
1427 }
1428
SharedDtor()1429 inline void SourceFile::SharedDtor() {
1430 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1431 _impl_.lines_.~RepeatedPtrField();
1432 _impl_.file_path_.Destroy();
1433 _impl_.host_name_.Destroy();
1434 }
1435
SetCachedSize(int size) const1436 void SourceFile::SetCachedSize(int size) const {
1437 _impl_._cached_size_.Set(size);
1438 }
1439
Clear()1440 void SourceFile::Clear() {
1441 // @@protoc_insertion_point(message_clear_start:tensorflow.SourceFile)
1442 ::uint32_t cached_has_bits = 0;
1443 // Prevent compiler warnings about cached_has_bits being unused
1444 (void) cached_has_bits;
1445
1446 _impl_.lines_.Clear();
1447 _impl_.file_path_.ClearToEmpty();
1448 _impl_.host_name_.ClearToEmpty();
1449 _internal_metadata_.Clear<std::string>();
1450 }
1451
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1452 const char* SourceFile::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1453 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1454 while (!ctx->Done(&ptr)) {
1455 ::uint32_t tag;
1456 ptr = ::_pbi::ReadTag(ptr, &tag);
1457 switch (tag >> 3) {
1458 // string file_path = 1;
1459 case 1:
1460 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1461 auto str = _internal_mutable_file_path();
1462 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1463 CHK_(ptr);
1464 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1465 } else {
1466 goto handle_unusual;
1467 }
1468 continue;
1469 // string host_name = 2;
1470 case 2:
1471 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1472 auto str = _internal_mutable_host_name();
1473 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1474 CHK_(ptr);
1475 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1476 } else {
1477 goto handle_unusual;
1478 }
1479 continue;
1480 // repeated string lines = 3;
1481 case 3:
1482 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
1483 ptr -= 1;
1484 do {
1485 ptr += 1;
1486 auto str = _internal_add_lines();
1487 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1488 CHK_(ptr);
1489 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1490 if (!ctx->DataAvailable(ptr)) break;
1491 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
1492 } else {
1493 goto handle_unusual;
1494 }
1495 continue;
1496 default:
1497 goto handle_unusual;
1498 } // switch
1499 handle_unusual:
1500 if ((tag == 0) || ((tag & 7) == 4)) {
1501 CHK_(ptr);
1502 ctx->SetLastTag(tag);
1503 goto message_done;
1504 }
1505 ptr = UnknownFieldParse(
1506 tag,
1507 _internal_metadata_.mutable_unknown_fields<std::string>(),
1508 ptr, ctx);
1509 CHK_(ptr != nullptr);
1510 } // while
1511 message_done:
1512 return ptr;
1513 failure:
1514 ptr = nullptr;
1515 goto message_done;
1516 #undef CHK_
1517 }
1518
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1519 ::uint8_t* SourceFile::_InternalSerialize(
1520 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1521 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SourceFile)
1522 ::uint32_t cached_has_bits = 0;
1523 (void) cached_has_bits;
1524
1525 // string file_path = 1;
1526 if (!this->_internal_file_path().empty()) {
1527 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1528 this->_internal_file_path().data(), static_cast<int>(this->_internal_file_path().length()),
1529 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1530 "tensorflow.SourceFile.file_path");
1531 target = stream->WriteStringMaybeAliased(
1532 1, this->_internal_file_path(), target);
1533 }
1534
1535 // string host_name = 2;
1536 if (!this->_internal_host_name().empty()) {
1537 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1538 this->_internal_host_name().data(), static_cast<int>(this->_internal_host_name().length()),
1539 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1540 "tensorflow.SourceFile.host_name");
1541 target = stream->WriteStringMaybeAliased(
1542 2, this->_internal_host_name(), target);
1543 }
1544
1545 // repeated string lines = 3;
1546 for (int i = 0, n = this->_internal_lines_size(); i < n; i++) {
1547 const auto& s = this->_internal_lines(i);
1548 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1549 s.data(), static_cast<int>(s.length()),
1550 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1551 "tensorflow.SourceFile.lines");
1552 target = stream->WriteString(3, s, target);
1553 }
1554
1555 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1556 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1557 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1558 }
1559 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SourceFile)
1560 return target;
1561 }
1562
ByteSizeLong() const1563 size_t SourceFile::ByteSizeLong() const {
1564 // @@protoc_insertion_point(message_byte_size_start:tensorflow.SourceFile)
1565 size_t total_size = 0;
1566
1567 ::uint32_t cached_has_bits = 0;
1568 // Prevent compiler warnings about cached_has_bits being unused
1569 (void) cached_has_bits;
1570
1571 // repeated string lines = 3;
1572 total_size += 1 *
1573 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.lines_.size());
1574 for (int i = 0, n = _impl_.lines_.size(); i < n; i++) {
1575 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1576 _impl_.lines_.Get(i));
1577 }
1578
1579 // string file_path = 1;
1580 if (!this->_internal_file_path().empty()) {
1581 total_size += 1 +
1582 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1583 this->_internal_file_path());
1584 }
1585
1586 // string host_name = 2;
1587 if (!this->_internal_host_name().empty()) {
1588 total_size += 1 +
1589 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1590 this->_internal_host_name());
1591 }
1592
1593 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1594 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1595 }
1596 int cached_size = ::_pbi::ToCachedSize(total_size);
1597 SetCachedSize(cached_size);
1598 return total_size;
1599 }
1600
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1601 void SourceFile::CheckTypeAndMergeFrom(
1602 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1603 MergeFrom(*::_pbi::DownCast<const SourceFile*>(
1604 &from));
1605 }
1606
MergeFrom(const SourceFile & from)1607 void SourceFile::MergeFrom(const SourceFile& from) {
1608 SourceFile* const _this = this;
1609 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SourceFile)
1610 GOOGLE_DCHECK_NE(&from, _this);
1611 ::uint32_t cached_has_bits = 0;
1612 (void) cached_has_bits;
1613
1614 _this->_impl_.lines_.MergeFrom(from._impl_.lines_);
1615 if (!from._internal_file_path().empty()) {
1616 _this->_internal_set_file_path(from._internal_file_path());
1617 }
1618 if (!from._internal_host_name().empty()) {
1619 _this->_internal_set_host_name(from._internal_host_name());
1620 }
1621 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1622 }
1623
CopyFrom(const SourceFile & from)1624 void SourceFile::CopyFrom(const SourceFile& from) {
1625 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SourceFile)
1626 if (&from == this) return;
1627 Clear();
1628 MergeFrom(from);
1629 }
1630
IsInitialized() const1631 bool SourceFile::IsInitialized() const {
1632 return true;
1633 }
1634
InternalSwap(SourceFile * other)1635 void SourceFile::InternalSwap(SourceFile* other) {
1636 using std::swap;
1637 auto* lhs_arena = GetArenaForAllocation();
1638 auto* rhs_arena = other->GetArenaForAllocation();
1639 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1640 _impl_.lines_.InternalSwap(&other->_impl_.lines_);
1641 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1642 &_impl_.file_path_, lhs_arena,
1643 &other->_impl_.file_path_, rhs_arena
1644 );
1645 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1646 &_impl_.host_name_, lhs_arena,
1647 &other->_impl_.host_name_, rhs_arena
1648 );
1649 }
1650
GetTypeName() const1651 std::string SourceFile::GetTypeName() const {
1652 return "tensorflow.SourceFile";
1653 }
1654
1655
1656 // ===================================================================
1657
1658 class StackFrameWithId::_Internal {
1659 public:
1660 static const ::tensorflow::GraphDebugInfo_FileLineCol& file_line_col(const StackFrameWithId* msg);
1661 };
1662
1663 const ::tensorflow::GraphDebugInfo_FileLineCol&
file_line_col(const StackFrameWithId * msg)1664 StackFrameWithId::_Internal::file_line_col(const StackFrameWithId* msg) {
1665 return *msg->_impl_.file_line_col_;
1666 }
clear_file_line_col()1667 void StackFrameWithId::clear_file_line_col() {
1668 if (GetArenaForAllocation() == nullptr && _impl_.file_line_col_ != nullptr) {
1669 delete _impl_.file_line_col_;
1670 }
1671 _impl_.file_line_col_ = nullptr;
1672 }
StackFrameWithId(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1673 StackFrameWithId::StackFrameWithId(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1674 bool is_message_owned)
1675 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1676 SharedCtor(arena, is_message_owned);
1677 // @@protoc_insertion_point(arena_constructor:tensorflow.StackFrameWithId)
1678 }
StackFrameWithId(const StackFrameWithId & from)1679 StackFrameWithId::StackFrameWithId(const StackFrameWithId& from)
1680 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1681 StackFrameWithId* const _this = this; (void)_this;
1682 new (&_impl_) Impl_{
1683 decltype(_impl_.id_){}
1684 , decltype(_impl_.file_line_col_){nullptr}
1685 , /*decltype(_impl_._cached_size_)*/{}};
1686
1687 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1688 _impl_.id_.InitDefault();
1689 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1690 _impl_.id_.Set("", GetArenaForAllocation());
1691 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1692 if (!from._internal_id().empty()) {
1693 _this->_impl_.id_.Set(from._internal_id(),
1694 _this->GetArenaForAllocation());
1695 }
1696 if (from._internal_has_file_line_col()) {
1697 _this->_impl_.file_line_col_ = new ::tensorflow::GraphDebugInfo_FileLineCol(*from._impl_.file_line_col_);
1698 }
1699 // @@protoc_insertion_point(copy_constructor:tensorflow.StackFrameWithId)
1700 }
1701
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1702 inline void StackFrameWithId::SharedCtor(
1703 ::_pb::Arena* arena, bool is_message_owned) {
1704 (void)arena;
1705 (void)is_message_owned;
1706 new (&_impl_) Impl_{
1707 decltype(_impl_.id_){}
1708 , decltype(_impl_.file_line_col_){nullptr}
1709 , /*decltype(_impl_._cached_size_)*/{}
1710 };
1711 _impl_.id_.InitDefault();
1712 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1713 _impl_.id_.Set("", GetArenaForAllocation());
1714 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1715 }
1716
~StackFrameWithId()1717 StackFrameWithId::~StackFrameWithId() {
1718 // @@protoc_insertion_point(destructor:tensorflow.StackFrameWithId)
1719 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1720 (void)arena;
1721 return;
1722 }
1723 SharedDtor();
1724 }
1725
SharedDtor()1726 inline void StackFrameWithId::SharedDtor() {
1727 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1728 _impl_.id_.Destroy();
1729 if (this != internal_default_instance()) delete _impl_.file_line_col_;
1730 }
1731
SetCachedSize(int size) const1732 void StackFrameWithId::SetCachedSize(int size) const {
1733 _impl_._cached_size_.Set(size);
1734 }
1735
Clear()1736 void StackFrameWithId::Clear() {
1737 // @@protoc_insertion_point(message_clear_start:tensorflow.StackFrameWithId)
1738 ::uint32_t cached_has_bits = 0;
1739 // Prevent compiler warnings about cached_has_bits being unused
1740 (void) cached_has_bits;
1741
1742 _impl_.id_.ClearToEmpty();
1743 if (GetArenaForAllocation() == nullptr && _impl_.file_line_col_ != nullptr) {
1744 delete _impl_.file_line_col_;
1745 }
1746 _impl_.file_line_col_ = nullptr;
1747 _internal_metadata_.Clear<std::string>();
1748 }
1749
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1750 const char* StackFrameWithId::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1751 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1752 while (!ctx->Done(&ptr)) {
1753 ::uint32_t tag;
1754 ptr = ::_pbi::ReadTag(ptr, &tag);
1755 switch (tag >> 3) {
1756 // string id = 1;
1757 case 1:
1758 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1759 auto str = _internal_mutable_id();
1760 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1761 CHK_(ptr);
1762 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1763 } else {
1764 goto handle_unusual;
1765 }
1766 continue;
1767 // .tensorflow.GraphDebugInfo.FileLineCol file_line_col = 2;
1768 case 2:
1769 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1770 ptr = ctx->ParseMessage(_internal_mutable_file_line_col(), ptr);
1771 CHK_(ptr);
1772 } else {
1773 goto handle_unusual;
1774 }
1775 continue;
1776 default:
1777 goto handle_unusual;
1778 } // switch
1779 handle_unusual:
1780 if ((tag == 0) || ((tag & 7) == 4)) {
1781 CHK_(ptr);
1782 ctx->SetLastTag(tag);
1783 goto message_done;
1784 }
1785 ptr = UnknownFieldParse(
1786 tag,
1787 _internal_metadata_.mutable_unknown_fields<std::string>(),
1788 ptr, ctx);
1789 CHK_(ptr != nullptr);
1790 } // while
1791 message_done:
1792 return ptr;
1793 failure:
1794 ptr = nullptr;
1795 goto message_done;
1796 #undef CHK_
1797 }
1798
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1799 ::uint8_t* StackFrameWithId::_InternalSerialize(
1800 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1801 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.StackFrameWithId)
1802 ::uint32_t cached_has_bits = 0;
1803 (void) cached_has_bits;
1804
1805 // string id = 1;
1806 if (!this->_internal_id().empty()) {
1807 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1808 this->_internal_id().data(), static_cast<int>(this->_internal_id().length()),
1809 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1810 "tensorflow.StackFrameWithId.id");
1811 target = stream->WriteStringMaybeAliased(
1812 1, this->_internal_id(), target);
1813 }
1814
1815 // .tensorflow.GraphDebugInfo.FileLineCol file_line_col = 2;
1816 if (this->_internal_has_file_line_col()) {
1817 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1818 InternalWriteMessage(2, _Internal::file_line_col(this),
1819 _Internal::file_line_col(this).GetCachedSize(), target, stream);
1820 }
1821
1822 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1823 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1824 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1825 }
1826 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.StackFrameWithId)
1827 return target;
1828 }
1829
ByteSizeLong() const1830 size_t StackFrameWithId::ByteSizeLong() const {
1831 // @@protoc_insertion_point(message_byte_size_start:tensorflow.StackFrameWithId)
1832 size_t total_size = 0;
1833
1834 ::uint32_t cached_has_bits = 0;
1835 // Prevent compiler warnings about cached_has_bits being unused
1836 (void) cached_has_bits;
1837
1838 // string id = 1;
1839 if (!this->_internal_id().empty()) {
1840 total_size += 1 +
1841 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1842 this->_internal_id());
1843 }
1844
1845 // .tensorflow.GraphDebugInfo.FileLineCol file_line_col = 2;
1846 if (this->_internal_has_file_line_col()) {
1847 total_size += 1 +
1848 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1849 *_impl_.file_line_col_);
1850 }
1851
1852 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1853 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1854 }
1855 int cached_size = ::_pbi::ToCachedSize(total_size);
1856 SetCachedSize(cached_size);
1857 return total_size;
1858 }
1859
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1860 void StackFrameWithId::CheckTypeAndMergeFrom(
1861 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1862 MergeFrom(*::_pbi::DownCast<const StackFrameWithId*>(
1863 &from));
1864 }
1865
MergeFrom(const StackFrameWithId & from)1866 void StackFrameWithId::MergeFrom(const StackFrameWithId& from) {
1867 StackFrameWithId* const _this = this;
1868 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.StackFrameWithId)
1869 GOOGLE_DCHECK_NE(&from, _this);
1870 ::uint32_t cached_has_bits = 0;
1871 (void) cached_has_bits;
1872
1873 if (!from._internal_id().empty()) {
1874 _this->_internal_set_id(from._internal_id());
1875 }
1876 if (from._internal_has_file_line_col()) {
1877 _this->_internal_mutable_file_line_col()->::tensorflow::GraphDebugInfo_FileLineCol::MergeFrom(
1878 from._internal_file_line_col());
1879 }
1880 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1881 }
1882
CopyFrom(const StackFrameWithId & from)1883 void StackFrameWithId::CopyFrom(const StackFrameWithId& from) {
1884 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.StackFrameWithId)
1885 if (&from == this) return;
1886 Clear();
1887 MergeFrom(from);
1888 }
1889
IsInitialized() const1890 bool StackFrameWithId::IsInitialized() const {
1891 return true;
1892 }
1893
InternalSwap(StackFrameWithId * other)1894 void StackFrameWithId::InternalSwap(StackFrameWithId* other) {
1895 using std::swap;
1896 auto* lhs_arena = GetArenaForAllocation();
1897 auto* rhs_arena = other->GetArenaForAllocation();
1898 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1899 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1900 &_impl_.id_, lhs_arena,
1901 &other->_impl_.id_, rhs_arena
1902 );
1903 swap(_impl_.file_line_col_, other->_impl_.file_line_col_);
1904 }
1905
GetTypeName() const1906 std::string StackFrameWithId::GetTypeName() const {
1907 return "tensorflow.StackFrameWithId";
1908 }
1909
1910
1911 // ===================================================================
1912
1913 class CodeLocation::_Internal {
1914 public:
1915 };
1916
CodeLocation(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1917 CodeLocation::CodeLocation(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1918 bool is_message_owned)
1919 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1920 SharedCtor(arena, is_message_owned);
1921 // @@protoc_insertion_point(arena_constructor:tensorflow.CodeLocation)
1922 }
CodeLocation(const CodeLocation & from)1923 CodeLocation::CodeLocation(const CodeLocation& from)
1924 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1925 CodeLocation* const _this = this; (void)_this;
1926 new (&_impl_) Impl_{
1927 decltype(_impl_.stack_frame_ids_){from._impl_.stack_frame_ids_}
1928 , decltype(_impl_.host_name_){}
1929 , /*decltype(_impl_._cached_size_)*/{}};
1930
1931 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1932 _impl_.host_name_.InitDefault();
1933 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1934 _impl_.host_name_.Set("", GetArenaForAllocation());
1935 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1936 if (!from._internal_host_name().empty()) {
1937 _this->_impl_.host_name_.Set(from._internal_host_name(),
1938 _this->GetArenaForAllocation());
1939 }
1940 // @@protoc_insertion_point(copy_constructor:tensorflow.CodeLocation)
1941 }
1942
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1943 inline void CodeLocation::SharedCtor(
1944 ::_pb::Arena* arena, bool is_message_owned) {
1945 (void)arena;
1946 (void)is_message_owned;
1947 new (&_impl_) Impl_{
1948 decltype(_impl_.stack_frame_ids_){arena}
1949 , decltype(_impl_.host_name_){}
1950 , /*decltype(_impl_._cached_size_)*/{}
1951 };
1952 _impl_.host_name_.InitDefault();
1953 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1954 _impl_.host_name_.Set("", GetArenaForAllocation());
1955 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1956 }
1957
~CodeLocation()1958 CodeLocation::~CodeLocation() {
1959 // @@protoc_insertion_point(destructor:tensorflow.CodeLocation)
1960 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1961 (void)arena;
1962 return;
1963 }
1964 SharedDtor();
1965 }
1966
SharedDtor()1967 inline void CodeLocation::SharedDtor() {
1968 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1969 _impl_.stack_frame_ids_.~RepeatedPtrField();
1970 _impl_.host_name_.Destroy();
1971 }
1972
SetCachedSize(int size) const1973 void CodeLocation::SetCachedSize(int size) const {
1974 _impl_._cached_size_.Set(size);
1975 }
1976
Clear()1977 void CodeLocation::Clear() {
1978 // @@protoc_insertion_point(message_clear_start:tensorflow.CodeLocation)
1979 ::uint32_t cached_has_bits = 0;
1980 // Prevent compiler warnings about cached_has_bits being unused
1981 (void) cached_has_bits;
1982
1983 _impl_.stack_frame_ids_.Clear();
1984 _impl_.host_name_.ClearToEmpty();
1985 _internal_metadata_.Clear<std::string>();
1986 }
1987
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1988 const char* CodeLocation::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1989 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1990 while (!ctx->Done(&ptr)) {
1991 ::uint32_t tag;
1992 ptr = ::_pbi::ReadTag(ptr, &tag);
1993 switch (tag >> 3) {
1994 // string host_name = 1;
1995 case 1:
1996 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1997 auto str = _internal_mutable_host_name();
1998 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1999 CHK_(ptr);
2000 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2001 } else {
2002 goto handle_unusual;
2003 }
2004 continue;
2005 // repeated string stack_frame_ids = 2;
2006 case 2:
2007 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2008 ptr -= 1;
2009 do {
2010 ptr += 1;
2011 auto str = _internal_add_stack_frame_ids();
2012 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2013 CHK_(ptr);
2014 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2015 if (!ctx->DataAvailable(ptr)) break;
2016 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
2017 } else {
2018 goto handle_unusual;
2019 }
2020 continue;
2021 default:
2022 goto handle_unusual;
2023 } // switch
2024 handle_unusual:
2025 if ((tag == 0) || ((tag & 7) == 4)) {
2026 CHK_(ptr);
2027 ctx->SetLastTag(tag);
2028 goto message_done;
2029 }
2030 ptr = UnknownFieldParse(
2031 tag,
2032 _internal_metadata_.mutable_unknown_fields<std::string>(),
2033 ptr, ctx);
2034 CHK_(ptr != nullptr);
2035 } // while
2036 message_done:
2037 return ptr;
2038 failure:
2039 ptr = nullptr;
2040 goto message_done;
2041 #undef CHK_
2042 }
2043
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2044 ::uint8_t* CodeLocation::_InternalSerialize(
2045 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2046 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CodeLocation)
2047 ::uint32_t cached_has_bits = 0;
2048 (void) cached_has_bits;
2049
2050 // string host_name = 1;
2051 if (!this->_internal_host_name().empty()) {
2052 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2053 this->_internal_host_name().data(), static_cast<int>(this->_internal_host_name().length()),
2054 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2055 "tensorflow.CodeLocation.host_name");
2056 target = stream->WriteStringMaybeAliased(
2057 1, this->_internal_host_name(), target);
2058 }
2059
2060 // repeated string stack_frame_ids = 2;
2061 for (int i = 0, n = this->_internal_stack_frame_ids_size(); i < n; i++) {
2062 const auto& s = this->_internal_stack_frame_ids(i);
2063 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2064 s.data(), static_cast<int>(s.length()),
2065 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2066 "tensorflow.CodeLocation.stack_frame_ids");
2067 target = stream->WriteString(2, s, target);
2068 }
2069
2070 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2071 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2072 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2073 }
2074 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CodeLocation)
2075 return target;
2076 }
2077
ByteSizeLong() const2078 size_t CodeLocation::ByteSizeLong() const {
2079 // @@protoc_insertion_point(message_byte_size_start:tensorflow.CodeLocation)
2080 size_t total_size = 0;
2081
2082 ::uint32_t cached_has_bits = 0;
2083 // Prevent compiler warnings about cached_has_bits being unused
2084 (void) cached_has_bits;
2085
2086 // repeated string stack_frame_ids = 2;
2087 total_size += 1 *
2088 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.stack_frame_ids_.size());
2089 for (int i = 0, n = _impl_.stack_frame_ids_.size(); i < n; i++) {
2090 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2091 _impl_.stack_frame_ids_.Get(i));
2092 }
2093
2094 // string host_name = 1;
2095 if (!this->_internal_host_name().empty()) {
2096 total_size += 1 +
2097 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2098 this->_internal_host_name());
2099 }
2100
2101 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2102 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2103 }
2104 int cached_size = ::_pbi::ToCachedSize(total_size);
2105 SetCachedSize(cached_size);
2106 return total_size;
2107 }
2108
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2109 void CodeLocation::CheckTypeAndMergeFrom(
2110 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2111 MergeFrom(*::_pbi::DownCast<const CodeLocation*>(
2112 &from));
2113 }
2114
MergeFrom(const CodeLocation & from)2115 void CodeLocation::MergeFrom(const CodeLocation& from) {
2116 CodeLocation* const _this = this;
2117 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CodeLocation)
2118 GOOGLE_DCHECK_NE(&from, _this);
2119 ::uint32_t cached_has_bits = 0;
2120 (void) cached_has_bits;
2121
2122 _this->_impl_.stack_frame_ids_.MergeFrom(from._impl_.stack_frame_ids_);
2123 if (!from._internal_host_name().empty()) {
2124 _this->_internal_set_host_name(from._internal_host_name());
2125 }
2126 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2127 }
2128
CopyFrom(const CodeLocation & from)2129 void CodeLocation::CopyFrom(const CodeLocation& from) {
2130 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CodeLocation)
2131 if (&from == this) return;
2132 Clear();
2133 MergeFrom(from);
2134 }
2135
IsInitialized() const2136 bool CodeLocation::IsInitialized() const {
2137 return true;
2138 }
2139
InternalSwap(CodeLocation * other)2140 void CodeLocation::InternalSwap(CodeLocation* other) {
2141 using std::swap;
2142 auto* lhs_arena = GetArenaForAllocation();
2143 auto* rhs_arena = other->GetArenaForAllocation();
2144 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2145 _impl_.stack_frame_ids_.InternalSwap(&other->_impl_.stack_frame_ids_);
2146 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2147 &_impl_.host_name_, lhs_arena,
2148 &other->_impl_.host_name_, rhs_arena
2149 );
2150 }
2151
GetTypeName() const2152 std::string CodeLocation::GetTypeName() const {
2153 return "tensorflow.CodeLocation";
2154 }
2155
2156
2157 // ===================================================================
2158
2159 class GraphOpCreation::_Internal {
2160 public:
2161 static const ::tensorflow::CodeLocation& code_location(const GraphOpCreation* msg);
2162 };
2163
2164 const ::tensorflow::CodeLocation&
code_location(const GraphOpCreation * msg)2165 GraphOpCreation::_Internal::code_location(const GraphOpCreation* msg) {
2166 return *msg->_impl_.code_location_;
2167 }
GraphOpCreation(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2168 GraphOpCreation::GraphOpCreation(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2169 bool is_message_owned)
2170 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2171 SharedCtor(arena, is_message_owned);
2172 // @@protoc_insertion_point(arena_constructor:tensorflow.GraphOpCreation)
2173 }
GraphOpCreation(const GraphOpCreation & from)2174 GraphOpCreation::GraphOpCreation(const GraphOpCreation& from)
2175 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2176 GraphOpCreation* const _this = this; (void)_this;
2177 new (&_impl_) Impl_{
2178 decltype(_impl_.input_names_){from._impl_.input_names_}
2179 , decltype(_impl_.output_tensor_ids_){from._impl_.output_tensor_ids_}
2180 , /*decltype(_impl_._output_tensor_ids_cached_byte_size_)*/{0}
2181 , decltype(_impl_.op_type_){}
2182 , decltype(_impl_.op_name_){}
2183 , decltype(_impl_.graph_name_){}
2184 , decltype(_impl_.graph_id_){}
2185 , decltype(_impl_.device_name_){}
2186 , decltype(_impl_.code_location_){nullptr}
2187 , decltype(_impl_.num_outputs_){}
2188 , /*decltype(_impl_._cached_size_)*/{}};
2189
2190 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2191 _impl_.op_type_.InitDefault();
2192 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2193 _impl_.op_type_.Set("", GetArenaForAllocation());
2194 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2195 if (!from._internal_op_type().empty()) {
2196 _this->_impl_.op_type_.Set(from._internal_op_type(),
2197 _this->GetArenaForAllocation());
2198 }
2199 _impl_.op_name_.InitDefault();
2200 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2201 _impl_.op_name_.Set("", GetArenaForAllocation());
2202 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2203 if (!from._internal_op_name().empty()) {
2204 _this->_impl_.op_name_.Set(from._internal_op_name(),
2205 _this->GetArenaForAllocation());
2206 }
2207 _impl_.graph_name_.InitDefault();
2208 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2209 _impl_.graph_name_.Set("", GetArenaForAllocation());
2210 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2211 if (!from._internal_graph_name().empty()) {
2212 _this->_impl_.graph_name_.Set(from._internal_graph_name(),
2213 _this->GetArenaForAllocation());
2214 }
2215 _impl_.graph_id_.InitDefault();
2216 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2217 _impl_.graph_id_.Set("", GetArenaForAllocation());
2218 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2219 if (!from._internal_graph_id().empty()) {
2220 _this->_impl_.graph_id_.Set(from._internal_graph_id(),
2221 _this->GetArenaForAllocation());
2222 }
2223 _impl_.device_name_.InitDefault();
2224 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2225 _impl_.device_name_.Set("", GetArenaForAllocation());
2226 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2227 if (!from._internal_device_name().empty()) {
2228 _this->_impl_.device_name_.Set(from._internal_device_name(),
2229 _this->GetArenaForAllocation());
2230 }
2231 if (from._internal_has_code_location()) {
2232 _this->_impl_.code_location_ = new ::tensorflow::CodeLocation(*from._impl_.code_location_);
2233 }
2234 _this->_impl_.num_outputs_ = from._impl_.num_outputs_;
2235 // @@protoc_insertion_point(copy_constructor:tensorflow.GraphOpCreation)
2236 }
2237
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2238 inline void GraphOpCreation::SharedCtor(
2239 ::_pb::Arena* arena, bool is_message_owned) {
2240 (void)arena;
2241 (void)is_message_owned;
2242 new (&_impl_) Impl_{
2243 decltype(_impl_.input_names_){arena}
2244 , decltype(_impl_.output_tensor_ids_){arena}
2245 , /*decltype(_impl_._output_tensor_ids_cached_byte_size_)*/{0}
2246 , decltype(_impl_.op_type_){}
2247 , decltype(_impl_.op_name_){}
2248 , decltype(_impl_.graph_name_){}
2249 , decltype(_impl_.graph_id_){}
2250 , decltype(_impl_.device_name_){}
2251 , decltype(_impl_.code_location_){nullptr}
2252 , decltype(_impl_.num_outputs_){0}
2253 , /*decltype(_impl_._cached_size_)*/{}
2254 };
2255 _impl_.op_type_.InitDefault();
2256 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2257 _impl_.op_type_.Set("", GetArenaForAllocation());
2258 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2259 _impl_.op_name_.InitDefault();
2260 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2261 _impl_.op_name_.Set("", GetArenaForAllocation());
2262 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2263 _impl_.graph_name_.InitDefault();
2264 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2265 _impl_.graph_name_.Set("", GetArenaForAllocation());
2266 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2267 _impl_.graph_id_.InitDefault();
2268 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2269 _impl_.graph_id_.Set("", GetArenaForAllocation());
2270 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2271 _impl_.device_name_.InitDefault();
2272 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2273 _impl_.device_name_.Set("", GetArenaForAllocation());
2274 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2275 }
2276
~GraphOpCreation()2277 GraphOpCreation::~GraphOpCreation() {
2278 // @@protoc_insertion_point(destructor:tensorflow.GraphOpCreation)
2279 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2280 (void)arena;
2281 return;
2282 }
2283 SharedDtor();
2284 }
2285
SharedDtor()2286 inline void GraphOpCreation::SharedDtor() {
2287 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2288 _impl_.input_names_.~RepeatedPtrField();
2289 _impl_.output_tensor_ids_.~RepeatedField();
2290 _impl_.op_type_.Destroy();
2291 _impl_.op_name_.Destroy();
2292 _impl_.graph_name_.Destroy();
2293 _impl_.graph_id_.Destroy();
2294 _impl_.device_name_.Destroy();
2295 if (this != internal_default_instance()) delete _impl_.code_location_;
2296 }
2297
SetCachedSize(int size) const2298 void GraphOpCreation::SetCachedSize(int size) const {
2299 _impl_._cached_size_.Set(size);
2300 }
2301
Clear()2302 void GraphOpCreation::Clear() {
2303 // @@protoc_insertion_point(message_clear_start:tensorflow.GraphOpCreation)
2304 ::uint32_t cached_has_bits = 0;
2305 // Prevent compiler warnings about cached_has_bits being unused
2306 (void) cached_has_bits;
2307
2308 _impl_.input_names_.Clear();
2309 _impl_.output_tensor_ids_.Clear();
2310 _impl_.op_type_.ClearToEmpty();
2311 _impl_.op_name_.ClearToEmpty();
2312 _impl_.graph_name_.ClearToEmpty();
2313 _impl_.graph_id_.ClearToEmpty();
2314 _impl_.device_name_.ClearToEmpty();
2315 if (GetArenaForAllocation() == nullptr && _impl_.code_location_ != nullptr) {
2316 delete _impl_.code_location_;
2317 }
2318 _impl_.code_location_ = nullptr;
2319 _impl_.num_outputs_ = 0;
2320 _internal_metadata_.Clear<std::string>();
2321 }
2322
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2323 const char* GraphOpCreation::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2324 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2325 while (!ctx->Done(&ptr)) {
2326 ::uint32_t tag;
2327 ptr = ::_pbi::ReadTag(ptr, &tag);
2328 switch (tag >> 3) {
2329 // string op_type = 1;
2330 case 1:
2331 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2332 auto str = _internal_mutable_op_type();
2333 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2334 CHK_(ptr);
2335 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2336 } else {
2337 goto handle_unusual;
2338 }
2339 continue;
2340 // string op_name = 2;
2341 case 2:
2342 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2343 auto str = _internal_mutable_op_name();
2344 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2345 CHK_(ptr);
2346 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2347 } else {
2348 goto handle_unusual;
2349 }
2350 continue;
2351 // string graph_name = 3;
2352 case 3:
2353 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2354 auto str = _internal_mutable_graph_name();
2355 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2356 CHK_(ptr);
2357 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2358 } else {
2359 goto handle_unusual;
2360 }
2361 continue;
2362 // string graph_id = 4;
2363 case 4:
2364 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
2365 auto str = _internal_mutable_graph_id();
2366 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2367 CHK_(ptr);
2368 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2369 } else {
2370 goto handle_unusual;
2371 }
2372 continue;
2373 // string device_name = 5;
2374 case 5:
2375 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
2376 auto str = _internal_mutable_device_name();
2377 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2378 CHK_(ptr);
2379 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2380 } else {
2381 goto handle_unusual;
2382 }
2383 continue;
2384 // repeated string input_names = 6;
2385 case 6:
2386 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
2387 ptr -= 1;
2388 do {
2389 ptr += 1;
2390 auto str = _internal_add_input_names();
2391 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2392 CHK_(ptr);
2393 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2394 if (!ctx->DataAvailable(ptr)) break;
2395 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
2396 } else {
2397 goto handle_unusual;
2398 }
2399 continue;
2400 // int32 num_outputs = 7;
2401 case 7:
2402 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
2403 _impl_.num_outputs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2404 CHK_(ptr);
2405 } else {
2406 goto handle_unusual;
2407 }
2408 continue;
2409 // .tensorflow.CodeLocation code_location = 8;
2410 case 8:
2411 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
2412 ptr = ctx->ParseMessage(_internal_mutable_code_location(), ptr);
2413 CHK_(ptr);
2414 } else {
2415 goto handle_unusual;
2416 }
2417 continue;
2418 // repeated int32 output_tensor_ids = 9;
2419 case 9:
2420 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
2421 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_output_tensor_ids(), ptr, ctx);
2422 CHK_(ptr);
2423 } else if (static_cast<::uint8_t>(tag) == 72) {
2424 _internal_add_output_tensor_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
2425 CHK_(ptr);
2426 } else {
2427 goto handle_unusual;
2428 }
2429 continue;
2430 default:
2431 goto handle_unusual;
2432 } // switch
2433 handle_unusual:
2434 if ((tag == 0) || ((tag & 7) == 4)) {
2435 CHK_(ptr);
2436 ctx->SetLastTag(tag);
2437 goto message_done;
2438 }
2439 ptr = UnknownFieldParse(
2440 tag,
2441 _internal_metadata_.mutable_unknown_fields<std::string>(),
2442 ptr, ctx);
2443 CHK_(ptr != nullptr);
2444 } // while
2445 message_done:
2446 return ptr;
2447 failure:
2448 ptr = nullptr;
2449 goto message_done;
2450 #undef CHK_
2451 }
2452
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2453 ::uint8_t* GraphOpCreation::_InternalSerialize(
2454 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2455 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.GraphOpCreation)
2456 ::uint32_t cached_has_bits = 0;
2457 (void) cached_has_bits;
2458
2459 // string op_type = 1;
2460 if (!this->_internal_op_type().empty()) {
2461 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2462 this->_internal_op_type().data(), static_cast<int>(this->_internal_op_type().length()),
2463 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2464 "tensorflow.GraphOpCreation.op_type");
2465 target = stream->WriteStringMaybeAliased(
2466 1, this->_internal_op_type(), target);
2467 }
2468
2469 // string op_name = 2;
2470 if (!this->_internal_op_name().empty()) {
2471 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2472 this->_internal_op_name().data(), static_cast<int>(this->_internal_op_name().length()),
2473 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2474 "tensorflow.GraphOpCreation.op_name");
2475 target = stream->WriteStringMaybeAliased(
2476 2, this->_internal_op_name(), target);
2477 }
2478
2479 // string graph_name = 3;
2480 if (!this->_internal_graph_name().empty()) {
2481 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2482 this->_internal_graph_name().data(), static_cast<int>(this->_internal_graph_name().length()),
2483 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2484 "tensorflow.GraphOpCreation.graph_name");
2485 target = stream->WriteStringMaybeAliased(
2486 3, this->_internal_graph_name(), target);
2487 }
2488
2489 // string graph_id = 4;
2490 if (!this->_internal_graph_id().empty()) {
2491 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2492 this->_internal_graph_id().data(), static_cast<int>(this->_internal_graph_id().length()),
2493 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2494 "tensorflow.GraphOpCreation.graph_id");
2495 target = stream->WriteStringMaybeAliased(
2496 4, this->_internal_graph_id(), target);
2497 }
2498
2499 // string device_name = 5;
2500 if (!this->_internal_device_name().empty()) {
2501 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2502 this->_internal_device_name().data(), static_cast<int>(this->_internal_device_name().length()),
2503 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2504 "tensorflow.GraphOpCreation.device_name");
2505 target = stream->WriteStringMaybeAliased(
2506 5, this->_internal_device_name(), target);
2507 }
2508
2509 // repeated string input_names = 6;
2510 for (int i = 0, n = this->_internal_input_names_size(); i < n; i++) {
2511 const auto& s = this->_internal_input_names(i);
2512 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2513 s.data(), static_cast<int>(s.length()),
2514 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2515 "tensorflow.GraphOpCreation.input_names");
2516 target = stream->WriteString(6, s, target);
2517 }
2518
2519 // int32 num_outputs = 7;
2520 if (this->_internal_num_outputs() != 0) {
2521 target = stream->EnsureSpace(target);
2522 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_num_outputs(), target);
2523 }
2524
2525 // .tensorflow.CodeLocation code_location = 8;
2526 if (this->_internal_has_code_location()) {
2527 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2528 InternalWriteMessage(8, _Internal::code_location(this),
2529 _Internal::code_location(this).GetCachedSize(), target, stream);
2530 }
2531
2532 // repeated int32 output_tensor_ids = 9;
2533 {
2534 int byte_size = _impl_._output_tensor_ids_cached_byte_size_.load(std::memory_order_relaxed);
2535 if (byte_size > 0) {
2536 target = stream->WriteInt32Packed(
2537 9, _internal_output_tensor_ids(), byte_size, target);
2538 }
2539 }
2540
2541 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2542 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2543 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2544 }
2545 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.GraphOpCreation)
2546 return target;
2547 }
2548
ByteSizeLong() const2549 size_t GraphOpCreation::ByteSizeLong() const {
2550 // @@protoc_insertion_point(message_byte_size_start:tensorflow.GraphOpCreation)
2551 size_t total_size = 0;
2552
2553 ::uint32_t cached_has_bits = 0;
2554 // Prevent compiler warnings about cached_has_bits being unused
2555 (void) cached_has_bits;
2556
2557 // repeated string input_names = 6;
2558 total_size += 1 *
2559 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.input_names_.size());
2560 for (int i = 0, n = _impl_.input_names_.size(); i < n; i++) {
2561 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2562 _impl_.input_names_.Get(i));
2563 }
2564
2565 // repeated int32 output_tensor_ids = 9;
2566 {
2567 size_t data_size = ::_pbi::WireFormatLite::
2568 Int32Size(this->_impl_.output_tensor_ids_);
2569 if (data_size > 0) {
2570 total_size += 1 +
2571 ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
2572 }
2573 int cached_size = ::_pbi::ToCachedSize(data_size);
2574 _impl_._output_tensor_ids_cached_byte_size_.store(cached_size,
2575 std::memory_order_relaxed);
2576 total_size += data_size;
2577 }
2578
2579 // string op_type = 1;
2580 if (!this->_internal_op_type().empty()) {
2581 total_size += 1 +
2582 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2583 this->_internal_op_type());
2584 }
2585
2586 // string op_name = 2;
2587 if (!this->_internal_op_name().empty()) {
2588 total_size += 1 +
2589 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2590 this->_internal_op_name());
2591 }
2592
2593 // string graph_name = 3;
2594 if (!this->_internal_graph_name().empty()) {
2595 total_size += 1 +
2596 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2597 this->_internal_graph_name());
2598 }
2599
2600 // string graph_id = 4;
2601 if (!this->_internal_graph_id().empty()) {
2602 total_size += 1 +
2603 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2604 this->_internal_graph_id());
2605 }
2606
2607 // string device_name = 5;
2608 if (!this->_internal_device_name().empty()) {
2609 total_size += 1 +
2610 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2611 this->_internal_device_name());
2612 }
2613
2614 // .tensorflow.CodeLocation code_location = 8;
2615 if (this->_internal_has_code_location()) {
2616 total_size += 1 +
2617 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2618 *_impl_.code_location_);
2619 }
2620
2621 // int32 num_outputs = 7;
2622 if (this->_internal_num_outputs() != 0) {
2623 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_outputs());
2624 }
2625
2626 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2627 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2628 }
2629 int cached_size = ::_pbi::ToCachedSize(total_size);
2630 SetCachedSize(cached_size);
2631 return total_size;
2632 }
2633
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2634 void GraphOpCreation::CheckTypeAndMergeFrom(
2635 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2636 MergeFrom(*::_pbi::DownCast<const GraphOpCreation*>(
2637 &from));
2638 }
2639
MergeFrom(const GraphOpCreation & from)2640 void GraphOpCreation::MergeFrom(const GraphOpCreation& from) {
2641 GraphOpCreation* const _this = this;
2642 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.GraphOpCreation)
2643 GOOGLE_DCHECK_NE(&from, _this);
2644 ::uint32_t cached_has_bits = 0;
2645 (void) cached_has_bits;
2646
2647 _this->_impl_.input_names_.MergeFrom(from._impl_.input_names_);
2648 _this->_impl_.output_tensor_ids_.MergeFrom(from._impl_.output_tensor_ids_);
2649 if (!from._internal_op_type().empty()) {
2650 _this->_internal_set_op_type(from._internal_op_type());
2651 }
2652 if (!from._internal_op_name().empty()) {
2653 _this->_internal_set_op_name(from._internal_op_name());
2654 }
2655 if (!from._internal_graph_name().empty()) {
2656 _this->_internal_set_graph_name(from._internal_graph_name());
2657 }
2658 if (!from._internal_graph_id().empty()) {
2659 _this->_internal_set_graph_id(from._internal_graph_id());
2660 }
2661 if (!from._internal_device_name().empty()) {
2662 _this->_internal_set_device_name(from._internal_device_name());
2663 }
2664 if (from._internal_has_code_location()) {
2665 _this->_internal_mutable_code_location()->::tensorflow::CodeLocation::MergeFrom(
2666 from._internal_code_location());
2667 }
2668 if (from._internal_num_outputs() != 0) {
2669 _this->_internal_set_num_outputs(from._internal_num_outputs());
2670 }
2671 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2672 }
2673
CopyFrom(const GraphOpCreation & from)2674 void GraphOpCreation::CopyFrom(const GraphOpCreation& from) {
2675 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.GraphOpCreation)
2676 if (&from == this) return;
2677 Clear();
2678 MergeFrom(from);
2679 }
2680
IsInitialized() const2681 bool GraphOpCreation::IsInitialized() const {
2682 return true;
2683 }
2684
InternalSwap(GraphOpCreation * other)2685 void GraphOpCreation::InternalSwap(GraphOpCreation* other) {
2686 using std::swap;
2687 auto* lhs_arena = GetArenaForAllocation();
2688 auto* rhs_arena = other->GetArenaForAllocation();
2689 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2690 _impl_.input_names_.InternalSwap(&other->_impl_.input_names_);
2691 _impl_.output_tensor_ids_.InternalSwap(&other->_impl_.output_tensor_ids_);
2692 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2693 &_impl_.op_type_, lhs_arena,
2694 &other->_impl_.op_type_, rhs_arena
2695 );
2696 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2697 &_impl_.op_name_, lhs_arena,
2698 &other->_impl_.op_name_, rhs_arena
2699 );
2700 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2701 &_impl_.graph_name_, lhs_arena,
2702 &other->_impl_.graph_name_, rhs_arena
2703 );
2704 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2705 &_impl_.graph_id_, lhs_arena,
2706 &other->_impl_.graph_id_, rhs_arena
2707 );
2708 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
2709 &_impl_.device_name_, lhs_arena,
2710 &other->_impl_.device_name_, rhs_arena
2711 );
2712 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2713 PROTOBUF_FIELD_OFFSET(GraphOpCreation, _impl_.num_outputs_)
2714 + sizeof(GraphOpCreation::_impl_.num_outputs_) // NOLINT
2715 - PROTOBUF_FIELD_OFFSET(GraphOpCreation, _impl_.code_location_)>(
2716 reinterpret_cast<char*>(&_impl_.code_location_),
2717 reinterpret_cast<char*>(&other->_impl_.code_location_));
2718 }
2719
GetTypeName() const2720 std::string GraphOpCreation::GetTypeName() const {
2721 return "tensorflow.GraphOpCreation";
2722 }
2723
2724
2725 // ===================================================================
2726
2727 class DebuggedGraph::_Internal {
2728 public:
2729 };
2730
DebuggedGraph(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2731 DebuggedGraph::DebuggedGraph(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2732 bool is_message_owned)
2733 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2734 SharedCtor(arena, is_message_owned);
2735 // @@protoc_insertion_point(arena_constructor:tensorflow.DebuggedGraph)
2736 }
DebuggedGraph(const DebuggedGraph & from)2737 DebuggedGraph::DebuggedGraph(const DebuggedGraph& from)
2738 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2739 DebuggedGraph* const _this = this; (void)_this;
2740 new (&_impl_) Impl_{
2741 decltype(_impl_.instrumented_ops_){from._impl_.instrumented_ops_}
2742 , decltype(_impl_.graph_id_){}
2743 , decltype(_impl_.graph_name_){}
2744 , decltype(_impl_.original_graph_def_){}
2745 , decltype(_impl_.instrumented_graph_def_){}
2746 , decltype(_impl_.outer_context_id_){}
2747 , /*decltype(_impl_._cached_size_)*/{}};
2748
2749 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2750 _impl_.graph_id_.InitDefault();
2751 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2752 _impl_.graph_id_.Set("", GetArenaForAllocation());
2753 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2754 if (!from._internal_graph_id().empty()) {
2755 _this->_impl_.graph_id_.Set(from._internal_graph_id(),
2756 _this->GetArenaForAllocation());
2757 }
2758 _impl_.graph_name_.InitDefault();
2759 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2760 _impl_.graph_name_.Set("", GetArenaForAllocation());
2761 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2762 if (!from._internal_graph_name().empty()) {
2763 _this->_impl_.graph_name_.Set(from._internal_graph_name(),
2764 _this->GetArenaForAllocation());
2765 }
2766 _impl_.original_graph_def_.InitDefault();
2767 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2768 _impl_.original_graph_def_.Set("", GetArenaForAllocation());
2769 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2770 if (!from._internal_original_graph_def().empty()) {
2771 _this->_impl_.original_graph_def_.Set(from._internal_original_graph_def(),
2772 _this->GetArenaForAllocation());
2773 }
2774 _impl_.instrumented_graph_def_.InitDefault();
2775 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2776 _impl_.instrumented_graph_def_.Set("", GetArenaForAllocation());
2777 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2778 if (!from._internal_instrumented_graph_def().empty()) {
2779 _this->_impl_.instrumented_graph_def_.Set(from._internal_instrumented_graph_def(),
2780 _this->GetArenaForAllocation());
2781 }
2782 _impl_.outer_context_id_.InitDefault();
2783 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2784 _impl_.outer_context_id_.Set("", GetArenaForAllocation());
2785 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2786 if (!from._internal_outer_context_id().empty()) {
2787 _this->_impl_.outer_context_id_.Set(from._internal_outer_context_id(),
2788 _this->GetArenaForAllocation());
2789 }
2790 // @@protoc_insertion_point(copy_constructor:tensorflow.DebuggedGraph)
2791 }
2792
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2793 inline void DebuggedGraph::SharedCtor(
2794 ::_pb::Arena* arena, bool is_message_owned) {
2795 (void)arena;
2796 (void)is_message_owned;
2797 new (&_impl_) Impl_{
2798 decltype(_impl_.instrumented_ops_){arena}
2799 , decltype(_impl_.graph_id_){}
2800 , decltype(_impl_.graph_name_){}
2801 , decltype(_impl_.original_graph_def_){}
2802 , decltype(_impl_.instrumented_graph_def_){}
2803 , decltype(_impl_.outer_context_id_){}
2804 , /*decltype(_impl_._cached_size_)*/{}
2805 };
2806 _impl_.graph_id_.InitDefault();
2807 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2808 _impl_.graph_id_.Set("", GetArenaForAllocation());
2809 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2810 _impl_.graph_name_.InitDefault();
2811 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2812 _impl_.graph_name_.Set("", GetArenaForAllocation());
2813 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2814 _impl_.original_graph_def_.InitDefault();
2815 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2816 _impl_.original_graph_def_.Set("", GetArenaForAllocation());
2817 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2818 _impl_.instrumented_graph_def_.InitDefault();
2819 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2820 _impl_.instrumented_graph_def_.Set("", GetArenaForAllocation());
2821 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2822 _impl_.outer_context_id_.InitDefault();
2823 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
2824 _impl_.outer_context_id_.Set("", GetArenaForAllocation());
2825 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
2826 }
2827
~DebuggedGraph()2828 DebuggedGraph::~DebuggedGraph() {
2829 // @@protoc_insertion_point(destructor:tensorflow.DebuggedGraph)
2830 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2831 (void)arena;
2832 return;
2833 }
2834 SharedDtor();
2835 }
2836
SharedDtor()2837 inline void DebuggedGraph::SharedDtor() {
2838 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2839 _impl_.instrumented_ops_.~RepeatedPtrField();
2840 _impl_.graph_id_.Destroy();
2841 _impl_.graph_name_.Destroy();
2842 _impl_.original_graph_def_.Destroy();
2843 _impl_.instrumented_graph_def_.Destroy();
2844 _impl_.outer_context_id_.Destroy();
2845 }
2846
SetCachedSize(int size) const2847 void DebuggedGraph::SetCachedSize(int size) const {
2848 _impl_._cached_size_.Set(size);
2849 }
2850
Clear()2851 void DebuggedGraph::Clear() {
2852 // @@protoc_insertion_point(message_clear_start:tensorflow.DebuggedGraph)
2853 ::uint32_t cached_has_bits = 0;
2854 // Prevent compiler warnings about cached_has_bits being unused
2855 (void) cached_has_bits;
2856
2857 _impl_.instrumented_ops_.Clear();
2858 _impl_.graph_id_.ClearToEmpty();
2859 _impl_.graph_name_.ClearToEmpty();
2860 _impl_.original_graph_def_.ClearToEmpty();
2861 _impl_.instrumented_graph_def_.ClearToEmpty();
2862 _impl_.outer_context_id_.ClearToEmpty();
2863 _internal_metadata_.Clear<std::string>();
2864 }
2865
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2866 const char* DebuggedGraph::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2867 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2868 while (!ctx->Done(&ptr)) {
2869 ::uint32_t tag;
2870 ptr = ::_pbi::ReadTag(ptr, &tag);
2871 switch (tag >> 3) {
2872 // string graph_id = 1;
2873 case 1:
2874 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2875 auto str = _internal_mutable_graph_id();
2876 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2877 CHK_(ptr);
2878 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2879 } else {
2880 goto handle_unusual;
2881 }
2882 continue;
2883 // string graph_name = 2;
2884 case 2:
2885 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
2886 auto str = _internal_mutable_graph_name();
2887 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2888 CHK_(ptr);
2889 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2890 } else {
2891 goto handle_unusual;
2892 }
2893 continue;
2894 // repeated string instrumented_ops = 3;
2895 case 3:
2896 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2897 ptr -= 1;
2898 do {
2899 ptr += 1;
2900 auto str = _internal_add_instrumented_ops();
2901 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2902 CHK_(ptr);
2903 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2904 if (!ctx->DataAvailable(ptr)) break;
2905 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
2906 } else {
2907 goto handle_unusual;
2908 }
2909 continue;
2910 // bytes original_graph_def = 4;
2911 case 4:
2912 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
2913 auto str = _internal_mutable_original_graph_def();
2914 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2915 CHK_(ptr);
2916 } else {
2917 goto handle_unusual;
2918 }
2919 continue;
2920 // bytes instrumented_graph_def = 5;
2921 case 5:
2922 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
2923 auto str = _internal_mutable_instrumented_graph_def();
2924 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2925 CHK_(ptr);
2926 } else {
2927 goto handle_unusual;
2928 }
2929 continue;
2930 // string outer_context_id = 6;
2931 case 6:
2932 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
2933 auto str = _internal_mutable_outer_context_id();
2934 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
2935 CHK_(ptr);
2936 CHK_(::_pbi::VerifyUTF8(str, nullptr));
2937 } else {
2938 goto handle_unusual;
2939 }
2940 continue;
2941 default:
2942 goto handle_unusual;
2943 } // switch
2944 handle_unusual:
2945 if ((tag == 0) || ((tag & 7) == 4)) {
2946 CHK_(ptr);
2947 ctx->SetLastTag(tag);
2948 goto message_done;
2949 }
2950 ptr = UnknownFieldParse(
2951 tag,
2952 _internal_metadata_.mutable_unknown_fields<std::string>(),
2953 ptr, ctx);
2954 CHK_(ptr != nullptr);
2955 } // while
2956 message_done:
2957 return ptr;
2958 failure:
2959 ptr = nullptr;
2960 goto message_done;
2961 #undef CHK_
2962 }
2963
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2964 ::uint8_t* DebuggedGraph::_InternalSerialize(
2965 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2966 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.DebuggedGraph)
2967 ::uint32_t cached_has_bits = 0;
2968 (void) cached_has_bits;
2969
2970 // string graph_id = 1;
2971 if (!this->_internal_graph_id().empty()) {
2972 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2973 this->_internal_graph_id().data(), static_cast<int>(this->_internal_graph_id().length()),
2974 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2975 "tensorflow.DebuggedGraph.graph_id");
2976 target = stream->WriteStringMaybeAliased(
2977 1, this->_internal_graph_id(), target);
2978 }
2979
2980 // string graph_name = 2;
2981 if (!this->_internal_graph_name().empty()) {
2982 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2983 this->_internal_graph_name().data(), static_cast<int>(this->_internal_graph_name().length()),
2984 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2985 "tensorflow.DebuggedGraph.graph_name");
2986 target = stream->WriteStringMaybeAliased(
2987 2, this->_internal_graph_name(), target);
2988 }
2989
2990 // repeated string instrumented_ops = 3;
2991 for (int i = 0, n = this->_internal_instrumented_ops_size(); i < n; i++) {
2992 const auto& s = this->_internal_instrumented_ops(i);
2993 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2994 s.data(), static_cast<int>(s.length()),
2995 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2996 "tensorflow.DebuggedGraph.instrumented_ops");
2997 target = stream->WriteString(3, s, target);
2998 }
2999
3000 // bytes original_graph_def = 4;
3001 if (!this->_internal_original_graph_def().empty()) {
3002 target = stream->WriteBytesMaybeAliased(
3003 4, this->_internal_original_graph_def(), target);
3004 }
3005
3006 // bytes instrumented_graph_def = 5;
3007 if (!this->_internal_instrumented_graph_def().empty()) {
3008 target = stream->WriteBytesMaybeAliased(
3009 5, this->_internal_instrumented_graph_def(), target);
3010 }
3011
3012 // string outer_context_id = 6;
3013 if (!this->_internal_outer_context_id().empty()) {
3014 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
3015 this->_internal_outer_context_id().data(), static_cast<int>(this->_internal_outer_context_id().length()),
3016 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
3017 "tensorflow.DebuggedGraph.outer_context_id");
3018 target = stream->WriteStringMaybeAliased(
3019 6, this->_internal_outer_context_id(), target);
3020 }
3021
3022 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3023 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3024 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3025 }
3026 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.DebuggedGraph)
3027 return target;
3028 }
3029
ByteSizeLong() const3030 size_t DebuggedGraph::ByteSizeLong() const {
3031 // @@protoc_insertion_point(message_byte_size_start:tensorflow.DebuggedGraph)
3032 size_t total_size = 0;
3033
3034 ::uint32_t cached_has_bits = 0;
3035 // Prevent compiler warnings about cached_has_bits being unused
3036 (void) cached_has_bits;
3037
3038 // repeated string instrumented_ops = 3;
3039 total_size += 1 *
3040 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.instrumented_ops_.size());
3041 for (int i = 0, n = _impl_.instrumented_ops_.size(); i < n; i++) {
3042 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3043 _impl_.instrumented_ops_.Get(i));
3044 }
3045
3046 // string graph_id = 1;
3047 if (!this->_internal_graph_id().empty()) {
3048 total_size += 1 +
3049 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3050 this->_internal_graph_id());
3051 }
3052
3053 // string graph_name = 2;
3054 if (!this->_internal_graph_name().empty()) {
3055 total_size += 1 +
3056 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3057 this->_internal_graph_name());
3058 }
3059
3060 // bytes original_graph_def = 4;
3061 if (!this->_internal_original_graph_def().empty()) {
3062 total_size += 1 +
3063 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
3064 this->_internal_original_graph_def());
3065 }
3066
3067 // bytes instrumented_graph_def = 5;
3068 if (!this->_internal_instrumented_graph_def().empty()) {
3069 total_size += 1 +
3070 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
3071 this->_internal_instrumented_graph_def());
3072 }
3073
3074 // string outer_context_id = 6;
3075 if (!this->_internal_outer_context_id().empty()) {
3076 total_size += 1 +
3077 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3078 this->_internal_outer_context_id());
3079 }
3080
3081 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3082 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3083 }
3084 int cached_size = ::_pbi::ToCachedSize(total_size);
3085 SetCachedSize(cached_size);
3086 return total_size;
3087 }
3088
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3089 void DebuggedGraph::CheckTypeAndMergeFrom(
3090 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3091 MergeFrom(*::_pbi::DownCast<const DebuggedGraph*>(
3092 &from));
3093 }
3094
MergeFrom(const DebuggedGraph & from)3095 void DebuggedGraph::MergeFrom(const DebuggedGraph& from) {
3096 DebuggedGraph* const _this = this;
3097 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.DebuggedGraph)
3098 GOOGLE_DCHECK_NE(&from, _this);
3099 ::uint32_t cached_has_bits = 0;
3100 (void) cached_has_bits;
3101
3102 _this->_impl_.instrumented_ops_.MergeFrom(from._impl_.instrumented_ops_);
3103 if (!from._internal_graph_id().empty()) {
3104 _this->_internal_set_graph_id(from._internal_graph_id());
3105 }
3106 if (!from._internal_graph_name().empty()) {
3107 _this->_internal_set_graph_name(from._internal_graph_name());
3108 }
3109 if (!from._internal_original_graph_def().empty()) {
3110 _this->_internal_set_original_graph_def(from._internal_original_graph_def());
3111 }
3112 if (!from._internal_instrumented_graph_def().empty()) {
3113 _this->_internal_set_instrumented_graph_def(from._internal_instrumented_graph_def());
3114 }
3115 if (!from._internal_outer_context_id().empty()) {
3116 _this->_internal_set_outer_context_id(from._internal_outer_context_id());
3117 }
3118 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3119 }
3120
CopyFrom(const DebuggedGraph & from)3121 void DebuggedGraph::CopyFrom(const DebuggedGraph& from) {
3122 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.DebuggedGraph)
3123 if (&from == this) return;
3124 Clear();
3125 MergeFrom(from);
3126 }
3127
IsInitialized() const3128 bool DebuggedGraph::IsInitialized() const {
3129 return true;
3130 }
3131
InternalSwap(DebuggedGraph * other)3132 void DebuggedGraph::InternalSwap(DebuggedGraph* other) {
3133 using std::swap;
3134 auto* lhs_arena = GetArenaForAllocation();
3135 auto* rhs_arena = other->GetArenaForAllocation();
3136 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3137 _impl_.instrumented_ops_.InternalSwap(&other->_impl_.instrumented_ops_);
3138 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3139 &_impl_.graph_id_, lhs_arena,
3140 &other->_impl_.graph_id_, rhs_arena
3141 );
3142 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3143 &_impl_.graph_name_, lhs_arena,
3144 &other->_impl_.graph_name_, rhs_arena
3145 );
3146 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3147 &_impl_.original_graph_def_, lhs_arena,
3148 &other->_impl_.original_graph_def_, rhs_arena
3149 );
3150 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3151 &_impl_.instrumented_graph_def_, lhs_arena,
3152 &other->_impl_.instrumented_graph_def_, rhs_arena
3153 );
3154 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3155 &_impl_.outer_context_id_, lhs_arena,
3156 &other->_impl_.outer_context_id_, rhs_arena
3157 );
3158 }
3159
GetTypeName() const3160 std::string DebuggedGraph::GetTypeName() const {
3161 return "tensorflow.DebuggedGraph";
3162 }
3163
3164
3165 // ===================================================================
3166
3167 class DebuggedDevice::_Internal {
3168 public:
3169 };
3170
DebuggedDevice(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3171 DebuggedDevice::DebuggedDevice(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3172 bool is_message_owned)
3173 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3174 SharedCtor(arena, is_message_owned);
3175 // @@protoc_insertion_point(arena_constructor:tensorflow.DebuggedDevice)
3176 }
DebuggedDevice(const DebuggedDevice & from)3177 DebuggedDevice::DebuggedDevice(const DebuggedDevice& from)
3178 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3179 DebuggedDevice* const _this = this; (void)_this;
3180 new (&_impl_) Impl_{
3181 decltype(_impl_.device_name_){}
3182 , decltype(_impl_.device_id_){}
3183 , /*decltype(_impl_._cached_size_)*/{}};
3184
3185 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3186 _impl_.device_name_.InitDefault();
3187 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3188 _impl_.device_name_.Set("", GetArenaForAllocation());
3189 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3190 if (!from._internal_device_name().empty()) {
3191 _this->_impl_.device_name_.Set(from._internal_device_name(),
3192 _this->GetArenaForAllocation());
3193 }
3194 _this->_impl_.device_id_ = from._impl_.device_id_;
3195 // @@protoc_insertion_point(copy_constructor:tensorflow.DebuggedDevice)
3196 }
3197
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3198 inline void DebuggedDevice::SharedCtor(
3199 ::_pb::Arena* arena, bool is_message_owned) {
3200 (void)arena;
3201 (void)is_message_owned;
3202 new (&_impl_) Impl_{
3203 decltype(_impl_.device_name_){}
3204 , decltype(_impl_.device_id_){0}
3205 , /*decltype(_impl_._cached_size_)*/{}
3206 };
3207 _impl_.device_name_.InitDefault();
3208 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3209 _impl_.device_name_.Set("", GetArenaForAllocation());
3210 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3211 }
3212
~DebuggedDevice()3213 DebuggedDevice::~DebuggedDevice() {
3214 // @@protoc_insertion_point(destructor:tensorflow.DebuggedDevice)
3215 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3216 (void)arena;
3217 return;
3218 }
3219 SharedDtor();
3220 }
3221
SharedDtor()3222 inline void DebuggedDevice::SharedDtor() {
3223 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3224 _impl_.device_name_.Destroy();
3225 }
3226
SetCachedSize(int size) const3227 void DebuggedDevice::SetCachedSize(int size) const {
3228 _impl_._cached_size_.Set(size);
3229 }
3230
Clear()3231 void DebuggedDevice::Clear() {
3232 // @@protoc_insertion_point(message_clear_start:tensorflow.DebuggedDevice)
3233 ::uint32_t cached_has_bits = 0;
3234 // Prevent compiler warnings about cached_has_bits being unused
3235 (void) cached_has_bits;
3236
3237 _impl_.device_name_.ClearToEmpty();
3238 _impl_.device_id_ = 0;
3239 _internal_metadata_.Clear<std::string>();
3240 }
3241
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3242 const char* DebuggedDevice::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3243 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3244 while (!ctx->Done(&ptr)) {
3245 ::uint32_t tag;
3246 ptr = ::_pbi::ReadTag(ptr, &tag);
3247 switch (tag >> 3) {
3248 // string device_name = 1;
3249 case 1:
3250 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3251 auto str = _internal_mutable_device_name();
3252 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3253 CHK_(ptr);
3254 CHK_(::_pbi::VerifyUTF8(str, nullptr));
3255 } else {
3256 goto handle_unusual;
3257 }
3258 continue;
3259 // int32 device_id = 2;
3260 case 2:
3261 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3262 _impl_.device_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3263 CHK_(ptr);
3264 } else {
3265 goto handle_unusual;
3266 }
3267 continue;
3268 default:
3269 goto handle_unusual;
3270 } // switch
3271 handle_unusual:
3272 if ((tag == 0) || ((tag & 7) == 4)) {
3273 CHK_(ptr);
3274 ctx->SetLastTag(tag);
3275 goto message_done;
3276 }
3277 ptr = UnknownFieldParse(
3278 tag,
3279 _internal_metadata_.mutable_unknown_fields<std::string>(),
3280 ptr, ctx);
3281 CHK_(ptr != nullptr);
3282 } // while
3283 message_done:
3284 return ptr;
3285 failure:
3286 ptr = nullptr;
3287 goto message_done;
3288 #undef CHK_
3289 }
3290
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3291 ::uint8_t* DebuggedDevice::_InternalSerialize(
3292 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3293 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.DebuggedDevice)
3294 ::uint32_t cached_has_bits = 0;
3295 (void) cached_has_bits;
3296
3297 // string device_name = 1;
3298 if (!this->_internal_device_name().empty()) {
3299 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
3300 this->_internal_device_name().data(), static_cast<int>(this->_internal_device_name().length()),
3301 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
3302 "tensorflow.DebuggedDevice.device_name");
3303 target = stream->WriteStringMaybeAliased(
3304 1, this->_internal_device_name(), target);
3305 }
3306
3307 // int32 device_id = 2;
3308 if (this->_internal_device_id() != 0) {
3309 target = stream->EnsureSpace(target);
3310 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_device_id(), target);
3311 }
3312
3313 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3314 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3315 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3316 }
3317 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.DebuggedDevice)
3318 return target;
3319 }
3320
ByteSizeLong() const3321 size_t DebuggedDevice::ByteSizeLong() const {
3322 // @@protoc_insertion_point(message_byte_size_start:tensorflow.DebuggedDevice)
3323 size_t total_size = 0;
3324
3325 ::uint32_t cached_has_bits = 0;
3326 // Prevent compiler warnings about cached_has_bits being unused
3327 (void) cached_has_bits;
3328
3329 // string device_name = 1;
3330 if (!this->_internal_device_name().empty()) {
3331 total_size += 1 +
3332 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3333 this->_internal_device_name());
3334 }
3335
3336 // int32 device_id = 2;
3337 if (this->_internal_device_id() != 0) {
3338 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_device_id());
3339 }
3340
3341 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3342 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3343 }
3344 int cached_size = ::_pbi::ToCachedSize(total_size);
3345 SetCachedSize(cached_size);
3346 return total_size;
3347 }
3348
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3349 void DebuggedDevice::CheckTypeAndMergeFrom(
3350 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3351 MergeFrom(*::_pbi::DownCast<const DebuggedDevice*>(
3352 &from));
3353 }
3354
MergeFrom(const DebuggedDevice & from)3355 void DebuggedDevice::MergeFrom(const DebuggedDevice& from) {
3356 DebuggedDevice* const _this = this;
3357 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.DebuggedDevice)
3358 GOOGLE_DCHECK_NE(&from, _this);
3359 ::uint32_t cached_has_bits = 0;
3360 (void) cached_has_bits;
3361
3362 if (!from._internal_device_name().empty()) {
3363 _this->_internal_set_device_name(from._internal_device_name());
3364 }
3365 if (from._internal_device_id() != 0) {
3366 _this->_internal_set_device_id(from._internal_device_id());
3367 }
3368 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3369 }
3370
CopyFrom(const DebuggedDevice & from)3371 void DebuggedDevice::CopyFrom(const DebuggedDevice& from) {
3372 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.DebuggedDevice)
3373 if (&from == this) return;
3374 Clear();
3375 MergeFrom(from);
3376 }
3377
IsInitialized() const3378 bool DebuggedDevice::IsInitialized() const {
3379 return true;
3380 }
3381
InternalSwap(DebuggedDevice * other)3382 void DebuggedDevice::InternalSwap(DebuggedDevice* other) {
3383 using std::swap;
3384 auto* lhs_arena = GetArenaForAllocation();
3385 auto* rhs_arena = other->GetArenaForAllocation();
3386 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3387 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3388 &_impl_.device_name_, lhs_arena,
3389 &other->_impl_.device_name_, rhs_arena
3390 );
3391 swap(_impl_.device_id_, other->_impl_.device_id_);
3392 }
3393
GetTypeName() const3394 std::string DebuggedDevice::GetTypeName() const {
3395 return "tensorflow.DebuggedDevice";
3396 }
3397
3398
3399 // ===================================================================
3400
3401 class Execution::_Internal {
3402 public:
3403 static const ::tensorflow::CodeLocation& code_location(const Execution* msg);
3404 };
3405
3406 const ::tensorflow::CodeLocation&
code_location(const Execution * msg)3407 Execution::_Internal::code_location(const Execution* msg) {
3408 return *msg->_impl_.code_location_;
3409 }
clear_tensor_protos()3410 void Execution::clear_tensor_protos() {
3411 _impl_.tensor_protos_.Clear();
3412 }
Execution(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3413 Execution::Execution(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3414 bool is_message_owned)
3415 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3416 SharedCtor(arena, is_message_owned);
3417 // @@protoc_insertion_point(arena_constructor:tensorflow.Execution)
3418 }
Execution(const Execution & from)3419 Execution::Execution(const Execution& from)
3420 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3421 Execution* const _this = this; (void)_this;
3422 new (&_impl_) Impl_{
3423 decltype(_impl_.input_tensor_ids_){from._impl_.input_tensor_ids_}
3424 , /*decltype(_impl_._input_tensor_ids_cached_byte_size_)*/{0}
3425 , decltype(_impl_.output_tensor_ids_){from._impl_.output_tensor_ids_}
3426 , /*decltype(_impl_._output_tensor_ids_cached_byte_size_)*/{0}
3427 , decltype(_impl_.tensor_protos_){from._impl_.tensor_protos_}
3428 , decltype(_impl_.output_tensor_device_ids_){from._impl_.output_tensor_device_ids_}
3429 , /*decltype(_impl_._output_tensor_device_ids_cached_byte_size_)*/{0}
3430 , decltype(_impl_.op_type_){}
3431 , decltype(_impl_.graph_id_){}
3432 , decltype(_impl_.code_location_){nullptr}
3433 , decltype(_impl_.num_outputs_){}
3434 , decltype(_impl_.tensor_debug_mode_){}
3435 , /*decltype(_impl_._cached_size_)*/{}};
3436
3437 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3438 _impl_.op_type_.InitDefault();
3439 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3440 _impl_.op_type_.Set("", GetArenaForAllocation());
3441 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3442 if (!from._internal_op_type().empty()) {
3443 _this->_impl_.op_type_.Set(from._internal_op_type(),
3444 _this->GetArenaForAllocation());
3445 }
3446 _impl_.graph_id_.InitDefault();
3447 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3448 _impl_.graph_id_.Set("", GetArenaForAllocation());
3449 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3450 if (!from._internal_graph_id().empty()) {
3451 _this->_impl_.graph_id_.Set(from._internal_graph_id(),
3452 _this->GetArenaForAllocation());
3453 }
3454 if (from._internal_has_code_location()) {
3455 _this->_impl_.code_location_ = new ::tensorflow::CodeLocation(*from._impl_.code_location_);
3456 }
3457 ::memcpy(&_impl_.num_outputs_, &from._impl_.num_outputs_,
3458 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.tensor_debug_mode_) -
3459 reinterpret_cast<char*>(&_impl_.num_outputs_)) + sizeof(_impl_.tensor_debug_mode_));
3460 // @@protoc_insertion_point(copy_constructor:tensorflow.Execution)
3461 }
3462
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3463 inline void Execution::SharedCtor(
3464 ::_pb::Arena* arena, bool is_message_owned) {
3465 (void)arena;
3466 (void)is_message_owned;
3467 new (&_impl_) Impl_{
3468 decltype(_impl_.input_tensor_ids_){arena}
3469 , /*decltype(_impl_._input_tensor_ids_cached_byte_size_)*/{0}
3470 , decltype(_impl_.output_tensor_ids_){arena}
3471 , /*decltype(_impl_._output_tensor_ids_cached_byte_size_)*/{0}
3472 , decltype(_impl_.tensor_protos_){arena}
3473 , decltype(_impl_.output_tensor_device_ids_){arena}
3474 , /*decltype(_impl_._output_tensor_device_ids_cached_byte_size_)*/{0}
3475 , decltype(_impl_.op_type_){}
3476 , decltype(_impl_.graph_id_){}
3477 , decltype(_impl_.code_location_){nullptr}
3478 , decltype(_impl_.num_outputs_){0}
3479 , decltype(_impl_.tensor_debug_mode_){0}
3480 , /*decltype(_impl_._cached_size_)*/{}
3481 };
3482 _impl_.op_type_.InitDefault();
3483 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3484 _impl_.op_type_.Set("", GetArenaForAllocation());
3485 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3486 _impl_.graph_id_.InitDefault();
3487 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3488 _impl_.graph_id_.Set("", GetArenaForAllocation());
3489 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3490 }
3491
~Execution()3492 Execution::~Execution() {
3493 // @@protoc_insertion_point(destructor:tensorflow.Execution)
3494 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3495 (void)arena;
3496 return;
3497 }
3498 SharedDtor();
3499 }
3500
SharedDtor()3501 inline void Execution::SharedDtor() {
3502 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3503 _impl_.input_tensor_ids_.~RepeatedField();
3504 _impl_.output_tensor_ids_.~RepeatedField();
3505 _impl_.tensor_protos_.~RepeatedPtrField();
3506 _impl_.output_tensor_device_ids_.~RepeatedField();
3507 _impl_.op_type_.Destroy();
3508 _impl_.graph_id_.Destroy();
3509 if (this != internal_default_instance()) delete _impl_.code_location_;
3510 }
3511
SetCachedSize(int size) const3512 void Execution::SetCachedSize(int size) const {
3513 _impl_._cached_size_.Set(size);
3514 }
3515
Clear()3516 void Execution::Clear() {
3517 // @@protoc_insertion_point(message_clear_start:tensorflow.Execution)
3518 ::uint32_t cached_has_bits = 0;
3519 // Prevent compiler warnings about cached_has_bits being unused
3520 (void) cached_has_bits;
3521
3522 _impl_.input_tensor_ids_.Clear();
3523 _impl_.output_tensor_ids_.Clear();
3524 _impl_.tensor_protos_.Clear();
3525 _impl_.output_tensor_device_ids_.Clear();
3526 _impl_.op_type_.ClearToEmpty();
3527 _impl_.graph_id_.ClearToEmpty();
3528 if (GetArenaForAllocation() == nullptr && _impl_.code_location_ != nullptr) {
3529 delete _impl_.code_location_;
3530 }
3531 _impl_.code_location_ = nullptr;
3532 ::memset(&_impl_.num_outputs_, 0, static_cast<size_t>(
3533 reinterpret_cast<char*>(&_impl_.tensor_debug_mode_) -
3534 reinterpret_cast<char*>(&_impl_.num_outputs_)) + sizeof(_impl_.tensor_debug_mode_));
3535 _internal_metadata_.Clear<std::string>();
3536 }
3537
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3538 const char* Execution::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3539 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3540 while (!ctx->Done(&ptr)) {
3541 ::uint32_t tag;
3542 ptr = ::_pbi::ReadTag(ptr, &tag);
3543 switch (tag >> 3) {
3544 // string op_type = 1;
3545 case 1:
3546 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3547 auto str = _internal_mutable_op_type();
3548 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3549 CHK_(ptr);
3550 CHK_(::_pbi::VerifyUTF8(str, nullptr));
3551 } else {
3552 goto handle_unusual;
3553 }
3554 continue;
3555 // int32 num_outputs = 2;
3556 case 2:
3557 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3558 _impl_.num_outputs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3559 CHK_(ptr);
3560 } else {
3561 goto handle_unusual;
3562 }
3563 continue;
3564 // string graph_id = 3;
3565 case 3:
3566 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
3567 auto str = _internal_mutable_graph_id();
3568 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3569 CHK_(ptr);
3570 CHK_(::_pbi::VerifyUTF8(str, nullptr));
3571 } else {
3572 goto handle_unusual;
3573 }
3574 continue;
3575 // repeated int64 input_tensor_ids = 4;
3576 case 4:
3577 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
3578 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_input_tensor_ids(), ptr, ctx);
3579 CHK_(ptr);
3580 } else if (static_cast<::uint8_t>(tag) == 32) {
3581 _internal_add_input_tensor_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3582 CHK_(ptr);
3583 } else {
3584 goto handle_unusual;
3585 }
3586 continue;
3587 // repeated int64 output_tensor_ids = 5;
3588 case 5:
3589 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
3590 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_output_tensor_ids(), ptr, ctx);
3591 CHK_(ptr);
3592 } else if (static_cast<::uint8_t>(tag) == 40) {
3593 _internal_add_output_tensor_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
3594 CHK_(ptr);
3595 } else {
3596 goto handle_unusual;
3597 }
3598 continue;
3599 // .tensorflow.TensorDebugMode tensor_debug_mode = 6;
3600 case 6:
3601 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
3602 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3603 CHK_(ptr);
3604 _internal_set_tensor_debug_mode(static_cast<::tensorflow::TensorDebugMode>(val));
3605 } else {
3606 goto handle_unusual;
3607 }
3608 continue;
3609 // repeated .tensorflow.TensorProto tensor_protos = 7;
3610 case 7:
3611 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
3612 ptr -= 1;
3613 do {
3614 ptr += 1;
3615 ptr = ctx->ParseMessage(_internal_add_tensor_protos(), ptr);
3616 CHK_(ptr);
3617 if (!ctx->DataAvailable(ptr)) break;
3618 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
3619 } else {
3620 goto handle_unusual;
3621 }
3622 continue;
3623 // .tensorflow.CodeLocation code_location = 8;
3624 case 8:
3625 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
3626 ptr = ctx->ParseMessage(_internal_mutable_code_location(), ptr);
3627 CHK_(ptr);
3628 } else {
3629 goto handle_unusual;
3630 }
3631 continue;
3632 // repeated int32 output_tensor_device_ids = 9;
3633 case 9:
3634 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 74)) {
3635 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_output_tensor_device_ids(), ptr, ctx);
3636 CHK_(ptr);
3637 } else if (static_cast<::uint8_t>(tag) == 72) {
3638 _internal_add_output_tensor_device_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
3639 CHK_(ptr);
3640 } else {
3641 goto handle_unusual;
3642 }
3643 continue;
3644 default:
3645 goto handle_unusual;
3646 } // switch
3647 handle_unusual:
3648 if ((tag == 0) || ((tag & 7) == 4)) {
3649 CHK_(ptr);
3650 ctx->SetLastTag(tag);
3651 goto message_done;
3652 }
3653 ptr = UnknownFieldParse(
3654 tag,
3655 _internal_metadata_.mutable_unknown_fields<std::string>(),
3656 ptr, ctx);
3657 CHK_(ptr != nullptr);
3658 } // while
3659 message_done:
3660 return ptr;
3661 failure:
3662 ptr = nullptr;
3663 goto message_done;
3664 #undef CHK_
3665 }
3666
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3667 ::uint8_t* Execution::_InternalSerialize(
3668 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3669 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.Execution)
3670 ::uint32_t cached_has_bits = 0;
3671 (void) cached_has_bits;
3672
3673 // string op_type = 1;
3674 if (!this->_internal_op_type().empty()) {
3675 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
3676 this->_internal_op_type().data(), static_cast<int>(this->_internal_op_type().length()),
3677 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
3678 "tensorflow.Execution.op_type");
3679 target = stream->WriteStringMaybeAliased(
3680 1, this->_internal_op_type(), target);
3681 }
3682
3683 // int32 num_outputs = 2;
3684 if (this->_internal_num_outputs() != 0) {
3685 target = stream->EnsureSpace(target);
3686 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_outputs(), target);
3687 }
3688
3689 // string graph_id = 3;
3690 if (!this->_internal_graph_id().empty()) {
3691 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
3692 this->_internal_graph_id().data(), static_cast<int>(this->_internal_graph_id().length()),
3693 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
3694 "tensorflow.Execution.graph_id");
3695 target = stream->WriteStringMaybeAliased(
3696 3, this->_internal_graph_id(), target);
3697 }
3698
3699 // repeated int64 input_tensor_ids = 4;
3700 {
3701 int byte_size = _impl_._input_tensor_ids_cached_byte_size_.load(std::memory_order_relaxed);
3702 if (byte_size > 0) {
3703 target = stream->WriteInt64Packed(
3704 4, _internal_input_tensor_ids(), byte_size, target);
3705 }
3706 }
3707
3708 // repeated int64 output_tensor_ids = 5;
3709 {
3710 int byte_size = _impl_._output_tensor_ids_cached_byte_size_.load(std::memory_order_relaxed);
3711 if (byte_size > 0) {
3712 target = stream->WriteInt64Packed(
3713 5, _internal_output_tensor_ids(), byte_size, target);
3714 }
3715 }
3716
3717 // .tensorflow.TensorDebugMode tensor_debug_mode = 6;
3718 if (this->_internal_tensor_debug_mode() != 0) {
3719 target = stream->EnsureSpace(target);
3720 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3721 6, this->_internal_tensor_debug_mode(), target);
3722 }
3723
3724 // repeated .tensorflow.TensorProto tensor_protos = 7;
3725 for (unsigned i = 0,
3726 n = static_cast<unsigned>(this->_internal_tensor_protos_size()); i < n; i++) {
3727 const auto& repfield = this->_internal_tensor_protos(i);
3728 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3729 InternalWriteMessage(7, repfield, repfield.GetCachedSize(), target, stream);
3730 }
3731
3732 // .tensorflow.CodeLocation code_location = 8;
3733 if (this->_internal_has_code_location()) {
3734 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3735 InternalWriteMessage(8, _Internal::code_location(this),
3736 _Internal::code_location(this).GetCachedSize(), target, stream);
3737 }
3738
3739 // repeated int32 output_tensor_device_ids = 9;
3740 {
3741 int byte_size = _impl_._output_tensor_device_ids_cached_byte_size_.load(std::memory_order_relaxed);
3742 if (byte_size > 0) {
3743 target = stream->WriteInt32Packed(
3744 9, _internal_output_tensor_device_ids(), byte_size, target);
3745 }
3746 }
3747
3748 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3749 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3750 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3751 }
3752 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.Execution)
3753 return target;
3754 }
3755
ByteSizeLong() const3756 size_t Execution::ByteSizeLong() const {
3757 // @@protoc_insertion_point(message_byte_size_start:tensorflow.Execution)
3758 size_t total_size = 0;
3759
3760 ::uint32_t cached_has_bits = 0;
3761 // Prevent compiler warnings about cached_has_bits being unused
3762 (void) cached_has_bits;
3763
3764 // repeated int64 input_tensor_ids = 4;
3765 {
3766 size_t data_size = ::_pbi::WireFormatLite::
3767 Int64Size(this->_impl_.input_tensor_ids_);
3768 if (data_size > 0) {
3769 total_size += 1 +
3770 ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
3771 }
3772 int cached_size = ::_pbi::ToCachedSize(data_size);
3773 _impl_._input_tensor_ids_cached_byte_size_.store(cached_size,
3774 std::memory_order_relaxed);
3775 total_size += data_size;
3776 }
3777
3778 // repeated int64 output_tensor_ids = 5;
3779 {
3780 size_t data_size = ::_pbi::WireFormatLite::
3781 Int64Size(this->_impl_.output_tensor_ids_);
3782 if (data_size > 0) {
3783 total_size += 1 +
3784 ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
3785 }
3786 int cached_size = ::_pbi::ToCachedSize(data_size);
3787 _impl_._output_tensor_ids_cached_byte_size_.store(cached_size,
3788 std::memory_order_relaxed);
3789 total_size += data_size;
3790 }
3791
3792 // repeated .tensorflow.TensorProto tensor_protos = 7;
3793 total_size += 1UL * this->_internal_tensor_protos_size();
3794 for (const auto& msg : this->_impl_.tensor_protos_) {
3795 total_size +=
3796 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
3797 }
3798
3799 // repeated int32 output_tensor_device_ids = 9;
3800 {
3801 size_t data_size = ::_pbi::WireFormatLite::
3802 Int32Size(this->_impl_.output_tensor_device_ids_);
3803 if (data_size > 0) {
3804 total_size += 1 +
3805 ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
3806 }
3807 int cached_size = ::_pbi::ToCachedSize(data_size);
3808 _impl_._output_tensor_device_ids_cached_byte_size_.store(cached_size,
3809 std::memory_order_relaxed);
3810 total_size += data_size;
3811 }
3812
3813 // string op_type = 1;
3814 if (!this->_internal_op_type().empty()) {
3815 total_size += 1 +
3816 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3817 this->_internal_op_type());
3818 }
3819
3820 // string graph_id = 3;
3821 if (!this->_internal_graph_id().empty()) {
3822 total_size += 1 +
3823 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3824 this->_internal_graph_id());
3825 }
3826
3827 // .tensorflow.CodeLocation code_location = 8;
3828 if (this->_internal_has_code_location()) {
3829 total_size += 1 +
3830 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3831 *_impl_.code_location_);
3832 }
3833
3834 // int32 num_outputs = 2;
3835 if (this->_internal_num_outputs() != 0) {
3836 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_outputs());
3837 }
3838
3839 // .tensorflow.TensorDebugMode tensor_debug_mode = 6;
3840 if (this->_internal_tensor_debug_mode() != 0) {
3841 total_size += 1 +
3842 ::_pbi::WireFormatLite::EnumSize(this->_internal_tensor_debug_mode());
3843 }
3844
3845 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3846 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3847 }
3848 int cached_size = ::_pbi::ToCachedSize(total_size);
3849 SetCachedSize(cached_size);
3850 return total_size;
3851 }
3852
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3853 void Execution::CheckTypeAndMergeFrom(
3854 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3855 MergeFrom(*::_pbi::DownCast<const Execution*>(
3856 &from));
3857 }
3858
MergeFrom(const Execution & from)3859 void Execution::MergeFrom(const Execution& from) {
3860 Execution* const _this = this;
3861 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.Execution)
3862 GOOGLE_DCHECK_NE(&from, _this);
3863 ::uint32_t cached_has_bits = 0;
3864 (void) cached_has_bits;
3865
3866 _this->_impl_.input_tensor_ids_.MergeFrom(from._impl_.input_tensor_ids_);
3867 _this->_impl_.output_tensor_ids_.MergeFrom(from._impl_.output_tensor_ids_);
3868 _this->_impl_.tensor_protos_.MergeFrom(from._impl_.tensor_protos_);
3869 _this->_impl_.output_tensor_device_ids_.MergeFrom(from._impl_.output_tensor_device_ids_);
3870 if (!from._internal_op_type().empty()) {
3871 _this->_internal_set_op_type(from._internal_op_type());
3872 }
3873 if (!from._internal_graph_id().empty()) {
3874 _this->_internal_set_graph_id(from._internal_graph_id());
3875 }
3876 if (from._internal_has_code_location()) {
3877 _this->_internal_mutable_code_location()->::tensorflow::CodeLocation::MergeFrom(
3878 from._internal_code_location());
3879 }
3880 if (from._internal_num_outputs() != 0) {
3881 _this->_internal_set_num_outputs(from._internal_num_outputs());
3882 }
3883 if (from._internal_tensor_debug_mode() != 0) {
3884 _this->_internal_set_tensor_debug_mode(from._internal_tensor_debug_mode());
3885 }
3886 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3887 }
3888
CopyFrom(const Execution & from)3889 void Execution::CopyFrom(const Execution& from) {
3890 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.Execution)
3891 if (&from == this) return;
3892 Clear();
3893 MergeFrom(from);
3894 }
3895
IsInitialized() const3896 bool Execution::IsInitialized() const {
3897 return true;
3898 }
3899
InternalSwap(Execution * other)3900 void Execution::InternalSwap(Execution* other) {
3901 using std::swap;
3902 auto* lhs_arena = GetArenaForAllocation();
3903 auto* rhs_arena = other->GetArenaForAllocation();
3904 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3905 _impl_.input_tensor_ids_.InternalSwap(&other->_impl_.input_tensor_ids_);
3906 _impl_.output_tensor_ids_.InternalSwap(&other->_impl_.output_tensor_ids_);
3907 _impl_.tensor_protos_.InternalSwap(&other->_impl_.tensor_protos_);
3908 _impl_.output_tensor_device_ids_.InternalSwap(&other->_impl_.output_tensor_device_ids_);
3909 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3910 &_impl_.op_type_, lhs_arena,
3911 &other->_impl_.op_type_, rhs_arena
3912 );
3913 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3914 &_impl_.graph_id_, lhs_arena,
3915 &other->_impl_.graph_id_, rhs_arena
3916 );
3917 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3918 PROTOBUF_FIELD_OFFSET(Execution, _impl_.tensor_debug_mode_)
3919 + sizeof(Execution::_impl_.tensor_debug_mode_) // NOLINT
3920 - PROTOBUF_FIELD_OFFSET(Execution, _impl_.code_location_)>(
3921 reinterpret_cast<char*>(&_impl_.code_location_),
3922 reinterpret_cast<char*>(&other->_impl_.code_location_));
3923 }
3924
GetTypeName() const3925 std::string Execution::GetTypeName() const {
3926 return "tensorflow.Execution";
3927 }
3928
3929
3930 // ===================================================================
3931
3932 class GraphExecutionTrace::_Internal {
3933 public:
3934 static const ::tensorflow::TensorProto& tensor_proto(const GraphExecutionTrace* msg);
3935 };
3936
3937 const ::tensorflow::TensorProto&
tensor_proto(const GraphExecutionTrace * msg)3938 GraphExecutionTrace::_Internal::tensor_proto(const GraphExecutionTrace* msg) {
3939 return *msg->_impl_.tensor_proto_;
3940 }
clear_tensor_proto()3941 void GraphExecutionTrace::clear_tensor_proto() {
3942 if (GetArenaForAllocation() == nullptr && _impl_.tensor_proto_ != nullptr) {
3943 delete _impl_.tensor_proto_;
3944 }
3945 _impl_.tensor_proto_ = nullptr;
3946 }
GraphExecutionTrace(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3947 GraphExecutionTrace::GraphExecutionTrace(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3948 bool is_message_owned)
3949 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3950 SharedCtor(arena, is_message_owned);
3951 // @@protoc_insertion_point(arena_constructor:tensorflow.GraphExecutionTrace)
3952 }
GraphExecutionTrace(const GraphExecutionTrace & from)3953 GraphExecutionTrace::GraphExecutionTrace(const GraphExecutionTrace& from)
3954 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3955 GraphExecutionTrace* const _this = this; (void)_this;
3956 new (&_impl_) Impl_{
3957 decltype(_impl_.tfdbg_context_id_){}
3958 , decltype(_impl_.op_name_){}
3959 , decltype(_impl_.device_name_){}
3960 , decltype(_impl_.tensor_proto_){nullptr}
3961 , decltype(_impl_.output_slot_){}
3962 , decltype(_impl_.tensor_debug_mode_){}
3963 , /*decltype(_impl_._cached_size_)*/{}};
3964
3965 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3966 _impl_.tfdbg_context_id_.InitDefault();
3967 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3968 _impl_.tfdbg_context_id_.Set("", GetArenaForAllocation());
3969 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3970 if (!from._internal_tfdbg_context_id().empty()) {
3971 _this->_impl_.tfdbg_context_id_.Set(from._internal_tfdbg_context_id(),
3972 _this->GetArenaForAllocation());
3973 }
3974 _impl_.op_name_.InitDefault();
3975 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3976 _impl_.op_name_.Set("", GetArenaForAllocation());
3977 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3978 if (!from._internal_op_name().empty()) {
3979 _this->_impl_.op_name_.Set(from._internal_op_name(),
3980 _this->GetArenaForAllocation());
3981 }
3982 _impl_.device_name_.InitDefault();
3983 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3984 _impl_.device_name_.Set("", GetArenaForAllocation());
3985 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3986 if (!from._internal_device_name().empty()) {
3987 _this->_impl_.device_name_.Set(from._internal_device_name(),
3988 _this->GetArenaForAllocation());
3989 }
3990 if (from._internal_has_tensor_proto()) {
3991 _this->_impl_.tensor_proto_ = new ::tensorflow::TensorProto(*from._impl_.tensor_proto_);
3992 }
3993 ::memcpy(&_impl_.output_slot_, &from._impl_.output_slot_,
3994 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.tensor_debug_mode_) -
3995 reinterpret_cast<char*>(&_impl_.output_slot_)) + sizeof(_impl_.tensor_debug_mode_));
3996 // @@protoc_insertion_point(copy_constructor:tensorflow.GraphExecutionTrace)
3997 }
3998
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3999 inline void GraphExecutionTrace::SharedCtor(
4000 ::_pb::Arena* arena, bool is_message_owned) {
4001 (void)arena;
4002 (void)is_message_owned;
4003 new (&_impl_) Impl_{
4004 decltype(_impl_.tfdbg_context_id_){}
4005 , decltype(_impl_.op_name_){}
4006 , decltype(_impl_.device_name_){}
4007 , decltype(_impl_.tensor_proto_){nullptr}
4008 , decltype(_impl_.output_slot_){0}
4009 , decltype(_impl_.tensor_debug_mode_){0}
4010 , /*decltype(_impl_._cached_size_)*/{}
4011 };
4012 _impl_.tfdbg_context_id_.InitDefault();
4013 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
4014 _impl_.tfdbg_context_id_.Set("", GetArenaForAllocation());
4015 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
4016 _impl_.op_name_.InitDefault();
4017 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
4018 _impl_.op_name_.Set("", GetArenaForAllocation());
4019 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
4020 _impl_.device_name_.InitDefault();
4021 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
4022 _impl_.device_name_.Set("", GetArenaForAllocation());
4023 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
4024 }
4025
~GraphExecutionTrace()4026 GraphExecutionTrace::~GraphExecutionTrace() {
4027 // @@protoc_insertion_point(destructor:tensorflow.GraphExecutionTrace)
4028 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4029 (void)arena;
4030 return;
4031 }
4032 SharedDtor();
4033 }
4034
SharedDtor()4035 inline void GraphExecutionTrace::SharedDtor() {
4036 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4037 _impl_.tfdbg_context_id_.Destroy();
4038 _impl_.op_name_.Destroy();
4039 _impl_.device_name_.Destroy();
4040 if (this != internal_default_instance()) delete _impl_.tensor_proto_;
4041 }
4042
SetCachedSize(int size) const4043 void GraphExecutionTrace::SetCachedSize(int size) const {
4044 _impl_._cached_size_.Set(size);
4045 }
4046
Clear()4047 void GraphExecutionTrace::Clear() {
4048 // @@protoc_insertion_point(message_clear_start:tensorflow.GraphExecutionTrace)
4049 ::uint32_t cached_has_bits = 0;
4050 // Prevent compiler warnings about cached_has_bits being unused
4051 (void) cached_has_bits;
4052
4053 _impl_.tfdbg_context_id_.ClearToEmpty();
4054 _impl_.op_name_.ClearToEmpty();
4055 _impl_.device_name_.ClearToEmpty();
4056 if (GetArenaForAllocation() == nullptr && _impl_.tensor_proto_ != nullptr) {
4057 delete _impl_.tensor_proto_;
4058 }
4059 _impl_.tensor_proto_ = nullptr;
4060 ::memset(&_impl_.output_slot_, 0, static_cast<size_t>(
4061 reinterpret_cast<char*>(&_impl_.tensor_debug_mode_) -
4062 reinterpret_cast<char*>(&_impl_.output_slot_)) + sizeof(_impl_.tensor_debug_mode_));
4063 _internal_metadata_.Clear<std::string>();
4064 }
4065
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4066 const char* GraphExecutionTrace::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4067 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4068 while (!ctx->Done(&ptr)) {
4069 ::uint32_t tag;
4070 ptr = ::_pbi::ReadTag(ptr, &tag);
4071 switch (tag >> 3) {
4072 // string tfdbg_context_id = 1;
4073 case 1:
4074 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
4075 auto str = _internal_mutable_tfdbg_context_id();
4076 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
4077 CHK_(ptr);
4078 CHK_(::_pbi::VerifyUTF8(str, nullptr));
4079 } else {
4080 goto handle_unusual;
4081 }
4082 continue;
4083 // string op_name = 2;
4084 case 2:
4085 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
4086 auto str = _internal_mutable_op_name();
4087 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
4088 CHK_(ptr);
4089 CHK_(::_pbi::VerifyUTF8(str, nullptr));
4090 } else {
4091 goto handle_unusual;
4092 }
4093 continue;
4094 // int32 output_slot = 3;
4095 case 3:
4096 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
4097 _impl_.output_slot_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4098 CHK_(ptr);
4099 } else {
4100 goto handle_unusual;
4101 }
4102 continue;
4103 // .tensorflow.TensorDebugMode tensor_debug_mode = 4;
4104 case 4:
4105 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
4106 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
4107 CHK_(ptr);
4108 _internal_set_tensor_debug_mode(static_cast<::tensorflow::TensorDebugMode>(val));
4109 } else {
4110 goto handle_unusual;
4111 }
4112 continue;
4113 // .tensorflow.TensorProto tensor_proto = 5;
4114 case 5:
4115 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
4116 ptr = ctx->ParseMessage(_internal_mutable_tensor_proto(), ptr);
4117 CHK_(ptr);
4118 } else {
4119 goto handle_unusual;
4120 }
4121 continue;
4122 // string device_name = 6;
4123 case 6:
4124 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
4125 auto str = _internal_mutable_device_name();
4126 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
4127 CHK_(ptr);
4128 CHK_(::_pbi::VerifyUTF8(str, nullptr));
4129 } else {
4130 goto handle_unusual;
4131 }
4132 continue;
4133 default:
4134 goto handle_unusual;
4135 } // switch
4136 handle_unusual:
4137 if ((tag == 0) || ((tag & 7) == 4)) {
4138 CHK_(ptr);
4139 ctx->SetLastTag(tag);
4140 goto message_done;
4141 }
4142 ptr = UnknownFieldParse(
4143 tag,
4144 _internal_metadata_.mutable_unknown_fields<std::string>(),
4145 ptr, ctx);
4146 CHK_(ptr != nullptr);
4147 } // while
4148 message_done:
4149 return ptr;
4150 failure:
4151 ptr = nullptr;
4152 goto message_done;
4153 #undef CHK_
4154 }
4155
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4156 ::uint8_t* GraphExecutionTrace::_InternalSerialize(
4157 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4158 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.GraphExecutionTrace)
4159 ::uint32_t cached_has_bits = 0;
4160 (void) cached_has_bits;
4161
4162 // string tfdbg_context_id = 1;
4163 if (!this->_internal_tfdbg_context_id().empty()) {
4164 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
4165 this->_internal_tfdbg_context_id().data(), static_cast<int>(this->_internal_tfdbg_context_id().length()),
4166 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
4167 "tensorflow.GraphExecutionTrace.tfdbg_context_id");
4168 target = stream->WriteStringMaybeAliased(
4169 1, this->_internal_tfdbg_context_id(), target);
4170 }
4171
4172 // string op_name = 2;
4173 if (!this->_internal_op_name().empty()) {
4174 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
4175 this->_internal_op_name().data(), static_cast<int>(this->_internal_op_name().length()),
4176 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
4177 "tensorflow.GraphExecutionTrace.op_name");
4178 target = stream->WriteStringMaybeAliased(
4179 2, this->_internal_op_name(), target);
4180 }
4181
4182 // int32 output_slot = 3;
4183 if (this->_internal_output_slot() != 0) {
4184 target = stream->EnsureSpace(target);
4185 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_output_slot(), target);
4186 }
4187
4188 // .tensorflow.TensorDebugMode tensor_debug_mode = 4;
4189 if (this->_internal_tensor_debug_mode() != 0) {
4190 target = stream->EnsureSpace(target);
4191 target = ::_pbi::WireFormatLite::WriteEnumToArray(
4192 4, this->_internal_tensor_debug_mode(), target);
4193 }
4194
4195 // .tensorflow.TensorProto tensor_proto = 5;
4196 if (this->_internal_has_tensor_proto()) {
4197 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4198 InternalWriteMessage(5, _Internal::tensor_proto(this),
4199 _Internal::tensor_proto(this).GetCachedSize(), target, stream);
4200 }
4201
4202 // string device_name = 6;
4203 if (!this->_internal_device_name().empty()) {
4204 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
4205 this->_internal_device_name().data(), static_cast<int>(this->_internal_device_name().length()),
4206 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
4207 "tensorflow.GraphExecutionTrace.device_name");
4208 target = stream->WriteStringMaybeAliased(
4209 6, this->_internal_device_name(), target);
4210 }
4211
4212 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4213 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4214 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4215 }
4216 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.GraphExecutionTrace)
4217 return target;
4218 }
4219
ByteSizeLong() const4220 size_t GraphExecutionTrace::ByteSizeLong() const {
4221 // @@protoc_insertion_point(message_byte_size_start:tensorflow.GraphExecutionTrace)
4222 size_t total_size = 0;
4223
4224 ::uint32_t cached_has_bits = 0;
4225 // Prevent compiler warnings about cached_has_bits being unused
4226 (void) cached_has_bits;
4227
4228 // string tfdbg_context_id = 1;
4229 if (!this->_internal_tfdbg_context_id().empty()) {
4230 total_size += 1 +
4231 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
4232 this->_internal_tfdbg_context_id());
4233 }
4234
4235 // string op_name = 2;
4236 if (!this->_internal_op_name().empty()) {
4237 total_size += 1 +
4238 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
4239 this->_internal_op_name());
4240 }
4241
4242 // string device_name = 6;
4243 if (!this->_internal_device_name().empty()) {
4244 total_size += 1 +
4245 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
4246 this->_internal_device_name());
4247 }
4248
4249 // .tensorflow.TensorProto tensor_proto = 5;
4250 if (this->_internal_has_tensor_proto()) {
4251 total_size += 1 +
4252 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4253 *_impl_.tensor_proto_);
4254 }
4255
4256 // int32 output_slot = 3;
4257 if (this->_internal_output_slot() != 0) {
4258 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_output_slot());
4259 }
4260
4261 // .tensorflow.TensorDebugMode tensor_debug_mode = 4;
4262 if (this->_internal_tensor_debug_mode() != 0) {
4263 total_size += 1 +
4264 ::_pbi::WireFormatLite::EnumSize(this->_internal_tensor_debug_mode());
4265 }
4266
4267 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4268 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4269 }
4270 int cached_size = ::_pbi::ToCachedSize(total_size);
4271 SetCachedSize(cached_size);
4272 return total_size;
4273 }
4274
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4275 void GraphExecutionTrace::CheckTypeAndMergeFrom(
4276 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4277 MergeFrom(*::_pbi::DownCast<const GraphExecutionTrace*>(
4278 &from));
4279 }
4280
MergeFrom(const GraphExecutionTrace & from)4281 void GraphExecutionTrace::MergeFrom(const GraphExecutionTrace& from) {
4282 GraphExecutionTrace* const _this = this;
4283 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.GraphExecutionTrace)
4284 GOOGLE_DCHECK_NE(&from, _this);
4285 ::uint32_t cached_has_bits = 0;
4286 (void) cached_has_bits;
4287
4288 if (!from._internal_tfdbg_context_id().empty()) {
4289 _this->_internal_set_tfdbg_context_id(from._internal_tfdbg_context_id());
4290 }
4291 if (!from._internal_op_name().empty()) {
4292 _this->_internal_set_op_name(from._internal_op_name());
4293 }
4294 if (!from._internal_device_name().empty()) {
4295 _this->_internal_set_device_name(from._internal_device_name());
4296 }
4297 if (from._internal_has_tensor_proto()) {
4298 _this->_internal_mutable_tensor_proto()->::tensorflow::TensorProto::MergeFrom(
4299 from._internal_tensor_proto());
4300 }
4301 if (from._internal_output_slot() != 0) {
4302 _this->_internal_set_output_slot(from._internal_output_slot());
4303 }
4304 if (from._internal_tensor_debug_mode() != 0) {
4305 _this->_internal_set_tensor_debug_mode(from._internal_tensor_debug_mode());
4306 }
4307 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4308 }
4309
CopyFrom(const GraphExecutionTrace & from)4310 void GraphExecutionTrace::CopyFrom(const GraphExecutionTrace& from) {
4311 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.GraphExecutionTrace)
4312 if (&from == this) return;
4313 Clear();
4314 MergeFrom(from);
4315 }
4316
IsInitialized() const4317 bool GraphExecutionTrace::IsInitialized() const {
4318 return true;
4319 }
4320
InternalSwap(GraphExecutionTrace * other)4321 void GraphExecutionTrace::InternalSwap(GraphExecutionTrace* other) {
4322 using std::swap;
4323 auto* lhs_arena = GetArenaForAllocation();
4324 auto* rhs_arena = other->GetArenaForAllocation();
4325 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4326 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4327 &_impl_.tfdbg_context_id_, lhs_arena,
4328 &other->_impl_.tfdbg_context_id_, rhs_arena
4329 );
4330 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4331 &_impl_.op_name_, lhs_arena,
4332 &other->_impl_.op_name_, rhs_arena
4333 );
4334 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4335 &_impl_.device_name_, lhs_arena,
4336 &other->_impl_.device_name_, rhs_arena
4337 );
4338 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
4339 PROTOBUF_FIELD_OFFSET(GraphExecutionTrace, _impl_.tensor_debug_mode_)
4340 + sizeof(GraphExecutionTrace::_impl_.tensor_debug_mode_) // NOLINT
4341 - PROTOBUF_FIELD_OFFSET(GraphExecutionTrace, _impl_.tensor_proto_)>(
4342 reinterpret_cast<char*>(&_impl_.tensor_proto_),
4343 reinterpret_cast<char*>(&other->_impl_.tensor_proto_));
4344 }
4345
GetTypeName() const4346 std::string GraphExecutionTrace::GetTypeName() const {
4347 return "tensorflow.GraphExecutionTrace";
4348 }
4349
4350
4351 // @@protoc_insertion_point(namespace_scope)
4352 } // namespace tensorflow
4353 PROTOBUF_NAMESPACE_OPEN
4354 template<> PROTOBUF_NOINLINE ::tensorflow::DebugEvent*
CreateMaybeMessage(Arena * arena)4355 Arena::CreateMaybeMessage< ::tensorflow::DebugEvent >(Arena* arena) {
4356 return Arena::CreateMessageInternal< ::tensorflow::DebugEvent >(arena);
4357 }
4358 template<> PROTOBUF_NOINLINE ::tensorflow::DebugMetadata*
CreateMaybeMessage(Arena * arena)4359 Arena::CreateMaybeMessage< ::tensorflow::DebugMetadata >(Arena* arena) {
4360 return Arena::CreateMessageInternal< ::tensorflow::DebugMetadata >(arena);
4361 }
4362 template<> PROTOBUF_NOINLINE ::tensorflow::SourceFile*
CreateMaybeMessage(Arena * arena)4363 Arena::CreateMaybeMessage< ::tensorflow::SourceFile >(Arena* arena) {
4364 return Arena::CreateMessageInternal< ::tensorflow::SourceFile >(arena);
4365 }
4366 template<> PROTOBUF_NOINLINE ::tensorflow::StackFrameWithId*
CreateMaybeMessage(Arena * arena)4367 Arena::CreateMaybeMessage< ::tensorflow::StackFrameWithId >(Arena* arena) {
4368 return Arena::CreateMessageInternal< ::tensorflow::StackFrameWithId >(arena);
4369 }
4370 template<> PROTOBUF_NOINLINE ::tensorflow::CodeLocation*
CreateMaybeMessage(Arena * arena)4371 Arena::CreateMaybeMessage< ::tensorflow::CodeLocation >(Arena* arena) {
4372 return Arena::CreateMessageInternal< ::tensorflow::CodeLocation >(arena);
4373 }
4374 template<> PROTOBUF_NOINLINE ::tensorflow::GraphOpCreation*
CreateMaybeMessage(Arena * arena)4375 Arena::CreateMaybeMessage< ::tensorflow::GraphOpCreation >(Arena* arena) {
4376 return Arena::CreateMessageInternal< ::tensorflow::GraphOpCreation >(arena);
4377 }
4378 template<> PROTOBUF_NOINLINE ::tensorflow::DebuggedGraph*
CreateMaybeMessage(Arena * arena)4379 Arena::CreateMaybeMessage< ::tensorflow::DebuggedGraph >(Arena* arena) {
4380 return Arena::CreateMessageInternal< ::tensorflow::DebuggedGraph >(arena);
4381 }
4382 template<> PROTOBUF_NOINLINE ::tensorflow::DebuggedDevice*
CreateMaybeMessage(Arena * arena)4383 Arena::CreateMaybeMessage< ::tensorflow::DebuggedDevice >(Arena* arena) {
4384 return Arena::CreateMessageInternal< ::tensorflow::DebuggedDevice >(arena);
4385 }
4386 template<> PROTOBUF_NOINLINE ::tensorflow::Execution*
CreateMaybeMessage(Arena * arena)4387 Arena::CreateMaybeMessage< ::tensorflow::Execution >(Arena* arena) {
4388 return Arena::CreateMessageInternal< ::tensorflow::Execution >(arena);
4389 }
4390 template<> PROTOBUF_NOINLINE ::tensorflow::GraphExecutionTrace*
CreateMaybeMessage(Arena * arena)4391 Arena::CreateMaybeMessage< ::tensorflow::GraphExecutionTrace >(Arena* arena) {
4392 return Arena::CreateMessageInternal< ::tensorflow::GraphExecutionTrace >(arena);
4393 }
4394 PROTOBUF_NAMESPACE_CLOSE
4395
4396 // @@protoc_insertion_point(global_scope)
4397 #include <google/protobuf/port_undef.inc>
4398