1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: tensorflow/core/protobuf/graph_debug_info.proto
3
4 #include "tensorflow/core/protobuf/graph_debug_info.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 {
GraphDebugInfo_FileLineCol(::_pbi::ConstantInitialized)22 PROTOBUF_CONSTEXPR GraphDebugInfo_FileLineCol::GraphDebugInfo_FileLineCol(
23 ::_pbi::ConstantInitialized): _impl_{
24 /*decltype(_impl_.func_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
25 , /*decltype(_impl_.code_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
26 , /*decltype(_impl_.file_index_)*/0
27 , /*decltype(_impl_.line_)*/0
28 , /*decltype(_impl_.col_)*/0
29 , /*decltype(_impl_._cached_size_)*/{}} {}
30 struct GraphDebugInfo_FileLineColDefaultTypeInternal {
GraphDebugInfo_FileLineColDefaultTypeInternaltensorflow::GraphDebugInfo_FileLineColDefaultTypeInternal31 PROTOBUF_CONSTEXPR GraphDebugInfo_FileLineColDefaultTypeInternal()
32 : _instance(::_pbi::ConstantInitialized{}) {}
~GraphDebugInfo_FileLineColDefaultTypeInternaltensorflow::GraphDebugInfo_FileLineColDefaultTypeInternal33 ~GraphDebugInfo_FileLineColDefaultTypeInternal() {}
34 union { // NOLINT(misc-non-private-member-variables-in-classes)
35 GraphDebugInfo_FileLineCol _instance;
36 };
37 };
38 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GraphDebugInfo_FileLineColDefaultTypeInternal _GraphDebugInfo_FileLineCol_default_instance_;
GraphDebugInfo_StackTrace(::_pbi::ConstantInitialized)39 PROTOBUF_CONSTEXPR GraphDebugInfo_StackTrace::GraphDebugInfo_StackTrace(
40 ::_pbi::ConstantInitialized): _impl_{
41 /*decltype(_impl_.file_line_cols_)*/{}
42 , /*decltype(_impl_._cached_size_)*/{}} {}
43 struct GraphDebugInfo_StackTraceDefaultTypeInternal {
GraphDebugInfo_StackTraceDefaultTypeInternaltensorflow::GraphDebugInfo_StackTraceDefaultTypeInternal44 PROTOBUF_CONSTEXPR GraphDebugInfo_StackTraceDefaultTypeInternal()
45 : _instance(::_pbi::ConstantInitialized{}) {}
~GraphDebugInfo_StackTraceDefaultTypeInternaltensorflow::GraphDebugInfo_StackTraceDefaultTypeInternal46 ~GraphDebugInfo_StackTraceDefaultTypeInternal() {}
47 union { // NOLINT(misc-non-private-member-variables-in-classes)
48 GraphDebugInfo_StackTrace _instance;
49 };
50 };
51 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GraphDebugInfo_StackTraceDefaultTypeInternal _GraphDebugInfo_StackTrace_default_instance_;
GraphDebugInfo_TracesEntry_DoNotUse(::_pbi::ConstantInitialized)52 PROTOBUF_CONSTEXPR GraphDebugInfo_TracesEntry_DoNotUse::GraphDebugInfo_TracesEntry_DoNotUse(
53 ::_pbi::ConstantInitialized) {}
54 struct GraphDebugInfo_TracesEntry_DoNotUseDefaultTypeInternal {
GraphDebugInfo_TracesEntry_DoNotUseDefaultTypeInternaltensorflow::GraphDebugInfo_TracesEntry_DoNotUseDefaultTypeInternal55 PROTOBUF_CONSTEXPR GraphDebugInfo_TracesEntry_DoNotUseDefaultTypeInternal()
56 : _instance(::_pbi::ConstantInitialized{}) {}
~GraphDebugInfo_TracesEntry_DoNotUseDefaultTypeInternaltensorflow::GraphDebugInfo_TracesEntry_DoNotUseDefaultTypeInternal57 ~GraphDebugInfo_TracesEntry_DoNotUseDefaultTypeInternal() {}
58 union { // NOLINT(misc-non-private-member-variables-in-classes)
59 GraphDebugInfo_TracesEntry_DoNotUse _instance;
60 };
61 };
62 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GraphDebugInfo_TracesEntry_DoNotUseDefaultTypeInternal _GraphDebugInfo_TracesEntry_DoNotUse_default_instance_;
GraphDebugInfo(::_pbi::ConstantInitialized)63 PROTOBUF_CONSTEXPR GraphDebugInfo::GraphDebugInfo(
64 ::_pbi::ConstantInitialized): _impl_{
65 /*decltype(_impl_.files_)*/{}
66 , /*decltype(_impl_.traces_)*/{}
67 , /*decltype(_impl_._cached_size_)*/{}} {}
68 struct GraphDebugInfoDefaultTypeInternal {
GraphDebugInfoDefaultTypeInternaltensorflow::GraphDebugInfoDefaultTypeInternal69 PROTOBUF_CONSTEXPR GraphDebugInfoDefaultTypeInternal()
70 : _instance(::_pbi::ConstantInitialized{}) {}
~GraphDebugInfoDefaultTypeInternaltensorflow::GraphDebugInfoDefaultTypeInternal71 ~GraphDebugInfoDefaultTypeInternal() {}
72 union { // NOLINT(misc-non-private-member-variables-in-classes)
73 GraphDebugInfo _instance;
74 };
75 };
76 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GraphDebugInfoDefaultTypeInternal _GraphDebugInfo_default_instance_;
77 } // namespace tensorflow
78 namespace tensorflow {
79
80 // ===================================================================
81
82 class GraphDebugInfo_FileLineCol::_Internal {
83 public:
84 };
85
GraphDebugInfo_FileLineCol(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)86 GraphDebugInfo_FileLineCol::GraphDebugInfo_FileLineCol(::PROTOBUF_NAMESPACE_ID::Arena* arena,
87 bool is_message_owned)
88 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
89 SharedCtor(arena, is_message_owned);
90 // @@protoc_insertion_point(arena_constructor:tensorflow.GraphDebugInfo.FileLineCol)
91 }
GraphDebugInfo_FileLineCol(const GraphDebugInfo_FileLineCol & from)92 GraphDebugInfo_FileLineCol::GraphDebugInfo_FileLineCol(const GraphDebugInfo_FileLineCol& from)
93 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
94 GraphDebugInfo_FileLineCol* const _this = this; (void)_this;
95 new (&_impl_) Impl_{
96 decltype(_impl_.func_){}
97 , decltype(_impl_.code_){}
98 , decltype(_impl_.file_index_){}
99 , decltype(_impl_.line_){}
100 , decltype(_impl_.col_){}
101 , /*decltype(_impl_._cached_size_)*/{}};
102
103 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
104 _impl_.func_.InitDefault();
105 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
106 _impl_.func_.Set("", GetArenaForAllocation());
107 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
108 if (!from._internal_func().empty()) {
109 _this->_impl_.func_.Set(from._internal_func(),
110 _this->GetArenaForAllocation());
111 }
112 _impl_.code_.InitDefault();
113 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
114 _impl_.code_.Set("", GetArenaForAllocation());
115 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
116 if (!from._internal_code().empty()) {
117 _this->_impl_.code_.Set(from._internal_code(),
118 _this->GetArenaForAllocation());
119 }
120 ::memcpy(&_impl_.file_index_, &from._impl_.file_index_,
121 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.col_) -
122 reinterpret_cast<char*>(&_impl_.file_index_)) + sizeof(_impl_.col_));
123 // @@protoc_insertion_point(copy_constructor:tensorflow.GraphDebugInfo.FileLineCol)
124 }
125
SharedCtor(::_pb::Arena * arena,bool is_message_owned)126 inline void GraphDebugInfo_FileLineCol::SharedCtor(
127 ::_pb::Arena* arena, bool is_message_owned) {
128 (void)arena;
129 (void)is_message_owned;
130 new (&_impl_) Impl_{
131 decltype(_impl_.func_){}
132 , decltype(_impl_.code_){}
133 , decltype(_impl_.file_index_){0}
134 , decltype(_impl_.line_){0}
135 , decltype(_impl_.col_){0}
136 , /*decltype(_impl_._cached_size_)*/{}
137 };
138 _impl_.func_.InitDefault();
139 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
140 _impl_.func_.Set("", GetArenaForAllocation());
141 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
142 _impl_.code_.InitDefault();
143 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
144 _impl_.code_.Set("", GetArenaForAllocation());
145 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
146 }
147
~GraphDebugInfo_FileLineCol()148 GraphDebugInfo_FileLineCol::~GraphDebugInfo_FileLineCol() {
149 // @@protoc_insertion_point(destructor:tensorflow.GraphDebugInfo.FileLineCol)
150 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
151 (void)arena;
152 return;
153 }
154 SharedDtor();
155 }
156
SharedDtor()157 inline void GraphDebugInfo_FileLineCol::SharedDtor() {
158 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
159 _impl_.func_.Destroy();
160 _impl_.code_.Destroy();
161 }
162
SetCachedSize(int size) const163 void GraphDebugInfo_FileLineCol::SetCachedSize(int size) const {
164 _impl_._cached_size_.Set(size);
165 }
166
Clear()167 void GraphDebugInfo_FileLineCol::Clear() {
168 // @@protoc_insertion_point(message_clear_start:tensorflow.GraphDebugInfo.FileLineCol)
169 ::uint32_t cached_has_bits = 0;
170 // Prevent compiler warnings about cached_has_bits being unused
171 (void) cached_has_bits;
172
173 _impl_.func_.ClearToEmpty();
174 _impl_.code_.ClearToEmpty();
175 ::memset(&_impl_.file_index_, 0, static_cast<size_t>(
176 reinterpret_cast<char*>(&_impl_.col_) -
177 reinterpret_cast<char*>(&_impl_.file_index_)) + sizeof(_impl_.col_));
178 _internal_metadata_.Clear<std::string>();
179 }
180
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)181 const char* GraphDebugInfo_FileLineCol::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
182 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
183 while (!ctx->Done(&ptr)) {
184 ::uint32_t tag;
185 ptr = ::_pbi::ReadTag(ptr, &tag);
186 switch (tag >> 3) {
187 // int32 file_index = 1;
188 case 1:
189 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
190 _impl_.file_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
191 CHK_(ptr);
192 } else {
193 goto handle_unusual;
194 }
195 continue;
196 // int32 line = 2;
197 case 2:
198 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
199 _impl_.line_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
200 CHK_(ptr);
201 } else {
202 goto handle_unusual;
203 }
204 continue;
205 // int32 col = 3;
206 case 3:
207 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
208 _impl_.col_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
209 CHK_(ptr);
210 } else {
211 goto handle_unusual;
212 }
213 continue;
214 // string func = 4;
215 case 4:
216 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
217 auto str = _internal_mutable_func();
218 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
219 CHK_(ptr);
220 CHK_(::_pbi::VerifyUTF8(str, nullptr));
221 } else {
222 goto handle_unusual;
223 }
224 continue;
225 // string code = 5;
226 case 5:
227 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
228 auto str = _internal_mutable_code();
229 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
230 CHK_(ptr);
231 CHK_(::_pbi::VerifyUTF8(str, nullptr));
232 } else {
233 goto handle_unusual;
234 }
235 continue;
236 default:
237 goto handle_unusual;
238 } // switch
239 handle_unusual:
240 if ((tag == 0) || ((tag & 7) == 4)) {
241 CHK_(ptr);
242 ctx->SetLastTag(tag);
243 goto message_done;
244 }
245 ptr = UnknownFieldParse(
246 tag,
247 _internal_metadata_.mutable_unknown_fields<std::string>(),
248 ptr, ctx);
249 CHK_(ptr != nullptr);
250 } // while
251 message_done:
252 return ptr;
253 failure:
254 ptr = nullptr;
255 goto message_done;
256 #undef CHK_
257 }
258
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const259 ::uint8_t* GraphDebugInfo_FileLineCol::_InternalSerialize(
260 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
261 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.GraphDebugInfo.FileLineCol)
262 ::uint32_t cached_has_bits = 0;
263 (void) cached_has_bits;
264
265 // int32 file_index = 1;
266 if (this->_internal_file_index() != 0) {
267 target = stream->EnsureSpace(target);
268 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_file_index(), target);
269 }
270
271 // int32 line = 2;
272 if (this->_internal_line() != 0) {
273 target = stream->EnsureSpace(target);
274 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_line(), target);
275 }
276
277 // int32 col = 3;
278 if (this->_internal_col() != 0) {
279 target = stream->EnsureSpace(target);
280 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_col(), target);
281 }
282
283 // string func = 4;
284 if (!this->_internal_func().empty()) {
285 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
286 this->_internal_func().data(), static_cast<int>(this->_internal_func().length()),
287 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
288 "tensorflow.GraphDebugInfo.FileLineCol.func");
289 target = stream->WriteStringMaybeAliased(
290 4, this->_internal_func(), target);
291 }
292
293 // string code = 5;
294 if (!this->_internal_code().empty()) {
295 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
296 this->_internal_code().data(), static_cast<int>(this->_internal_code().length()),
297 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
298 "tensorflow.GraphDebugInfo.FileLineCol.code");
299 target = stream->WriteStringMaybeAliased(
300 5, this->_internal_code(), target);
301 }
302
303 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
304 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
305 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
306 }
307 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.GraphDebugInfo.FileLineCol)
308 return target;
309 }
310
ByteSizeLong() const311 size_t GraphDebugInfo_FileLineCol::ByteSizeLong() const {
312 // @@protoc_insertion_point(message_byte_size_start:tensorflow.GraphDebugInfo.FileLineCol)
313 size_t total_size = 0;
314
315 ::uint32_t cached_has_bits = 0;
316 // Prevent compiler warnings about cached_has_bits being unused
317 (void) cached_has_bits;
318
319 // string func = 4;
320 if (!this->_internal_func().empty()) {
321 total_size += 1 +
322 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
323 this->_internal_func());
324 }
325
326 // string code = 5;
327 if (!this->_internal_code().empty()) {
328 total_size += 1 +
329 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
330 this->_internal_code());
331 }
332
333 // int32 file_index = 1;
334 if (this->_internal_file_index() != 0) {
335 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_file_index());
336 }
337
338 // int32 line = 2;
339 if (this->_internal_line() != 0) {
340 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_line());
341 }
342
343 // int32 col = 3;
344 if (this->_internal_col() != 0) {
345 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_col());
346 }
347
348 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
349 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
350 }
351 int cached_size = ::_pbi::ToCachedSize(total_size);
352 SetCachedSize(cached_size);
353 return total_size;
354 }
355
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)356 void GraphDebugInfo_FileLineCol::CheckTypeAndMergeFrom(
357 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
358 MergeFrom(*::_pbi::DownCast<const GraphDebugInfo_FileLineCol*>(
359 &from));
360 }
361
MergeFrom(const GraphDebugInfo_FileLineCol & from)362 void GraphDebugInfo_FileLineCol::MergeFrom(const GraphDebugInfo_FileLineCol& from) {
363 GraphDebugInfo_FileLineCol* const _this = this;
364 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.GraphDebugInfo.FileLineCol)
365 GOOGLE_DCHECK_NE(&from, _this);
366 ::uint32_t cached_has_bits = 0;
367 (void) cached_has_bits;
368
369 if (!from._internal_func().empty()) {
370 _this->_internal_set_func(from._internal_func());
371 }
372 if (!from._internal_code().empty()) {
373 _this->_internal_set_code(from._internal_code());
374 }
375 if (from._internal_file_index() != 0) {
376 _this->_internal_set_file_index(from._internal_file_index());
377 }
378 if (from._internal_line() != 0) {
379 _this->_internal_set_line(from._internal_line());
380 }
381 if (from._internal_col() != 0) {
382 _this->_internal_set_col(from._internal_col());
383 }
384 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
385 }
386
CopyFrom(const GraphDebugInfo_FileLineCol & from)387 void GraphDebugInfo_FileLineCol::CopyFrom(const GraphDebugInfo_FileLineCol& from) {
388 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.GraphDebugInfo.FileLineCol)
389 if (&from == this) return;
390 Clear();
391 MergeFrom(from);
392 }
393
IsInitialized() const394 bool GraphDebugInfo_FileLineCol::IsInitialized() const {
395 return true;
396 }
397
InternalSwap(GraphDebugInfo_FileLineCol * other)398 void GraphDebugInfo_FileLineCol::InternalSwap(GraphDebugInfo_FileLineCol* other) {
399 using std::swap;
400 auto* lhs_arena = GetArenaForAllocation();
401 auto* rhs_arena = other->GetArenaForAllocation();
402 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
403 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
404 &_impl_.func_, lhs_arena,
405 &other->_impl_.func_, rhs_arena
406 );
407 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
408 &_impl_.code_, lhs_arena,
409 &other->_impl_.code_, rhs_arena
410 );
411 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
412 PROTOBUF_FIELD_OFFSET(GraphDebugInfo_FileLineCol, _impl_.col_)
413 + sizeof(GraphDebugInfo_FileLineCol::_impl_.col_) // NOLINT
414 - PROTOBUF_FIELD_OFFSET(GraphDebugInfo_FileLineCol, _impl_.file_index_)>(
415 reinterpret_cast<char*>(&_impl_.file_index_),
416 reinterpret_cast<char*>(&other->_impl_.file_index_));
417 }
418
GetTypeName() const419 std::string GraphDebugInfo_FileLineCol::GetTypeName() const {
420 return "tensorflow.GraphDebugInfo.FileLineCol";
421 }
422
423
424 // ===================================================================
425
426 class GraphDebugInfo_StackTrace::_Internal {
427 public:
428 };
429
GraphDebugInfo_StackTrace(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)430 GraphDebugInfo_StackTrace::GraphDebugInfo_StackTrace(::PROTOBUF_NAMESPACE_ID::Arena* arena,
431 bool is_message_owned)
432 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
433 SharedCtor(arena, is_message_owned);
434 // @@protoc_insertion_point(arena_constructor:tensorflow.GraphDebugInfo.StackTrace)
435 }
GraphDebugInfo_StackTrace(const GraphDebugInfo_StackTrace & from)436 GraphDebugInfo_StackTrace::GraphDebugInfo_StackTrace(const GraphDebugInfo_StackTrace& from)
437 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
438 GraphDebugInfo_StackTrace* const _this = this; (void)_this;
439 new (&_impl_) Impl_{
440 decltype(_impl_.file_line_cols_){from._impl_.file_line_cols_}
441 , /*decltype(_impl_._cached_size_)*/{}};
442
443 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
444 // @@protoc_insertion_point(copy_constructor:tensorflow.GraphDebugInfo.StackTrace)
445 }
446
SharedCtor(::_pb::Arena * arena,bool is_message_owned)447 inline void GraphDebugInfo_StackTrace::SharedCtor(
448 ::_pb::Arena* arena, bool is_message_owned) {
449 (void)arena;
450 (void)is_message_owned;
451 new (&_impl_) Impl_{
452 decltype(_impl_.file_line_cols_){arena}
453 , /*decltype(_impl_._cached_size_)*/{}
454 };
455 }
456
~GraphDebugInfo_StackTrace()457 GraphDebugInfo_StackTrace::~GraphDebugInfo_StackTrace() {
458 // @@protoc_insertion_point(destructor:tensorflow.GraphDebugInfo.StackTrace)
459 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
460 (void)arena;
461 return;
462 }
463 SharedDtor();
464 }
465
SharedDtor()466 inline void GraphDebugInfo_StackTrace::SharedDtor() {
467 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
468 _impl_.file_line_cols_.~RepeatedPtrField();
469 }
470
SetCachedSize(int size) const471 void GraphDebugInfo_StackTrace::SetCachedSize(int size) const {
472 _impl_._cached_size_.Set(size);
473 }
474
Clear()475 void GraphDebugInfo_StackTrace::Clear() {
476 // @@protoc_insertion_point(message_clear_start:tensorflow.GraphDebugInfo.StackTrace)
477 ::uint32_t cached_has_bits = 0;
478 // Prevent compiler warnings about cached_has_bits being unused
479 (void) cached_has_bits;
480
481 _impl_.file_line_cols_.Clear();
482 _internal_metadata_.Clear<std::string>();
483 }
484
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)485 const char* GraphDebugInfo_StackTrace::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
486 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
487 while (!ctx->Done(&ptr)) {
488 ::uint32_t tag;
489 ptr = ::_pbi::ReadTag(ptr, &tag);
490 switch (tag >> 3) {
491 // repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1;
492 case 1:
493 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
494 ptr -= 1;
495 do {
496 ptr += 1;
497 ptr = ctx->ParseMessage(_internal_add_file_line_cols(), ptr);
498 CHK_(ptr);
499 if (!ctx->DataAvailable(ptr)) break;
500 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
501 } else {
502 goto handle_unusual;
503 }
504 continue;
505 default:
506 goto handle_unusual;
507 } // switch
508 handle_unusual:
509 if ((tag == 0) || ((tag & 7) == 4)) {
510 CHK_(ptr);
511 ctx->SetLastTag(tag);
512 goto message_done;
513 }
514 ptr = UnknownFieldParse(
515 tag,
516 _internal_metadata_.mutable_unknown_fields<std::string>(),
517 ptr, ctx);
518 CHK_(ptr != nullptr);
519 } // while
520 message_done:
521 return ptr;
522 failure:
523 ptr = nullptr;
524 goto message_done;
525 #undef CHK_
526 }
527
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const528 ::uint8_t* GraphDebugInfo_StackTrace::_InternalSerialize(
529 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
530 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.GraphDebugInfo.StackTrace)
531 ::uint32_t cached_has_bits = 0;
532 (void) cached_has_bits;
533
534 // repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1;
535 for (unsigned i = 0,
536 n = static_cast<unsigned>(this->_internal_file_line_cols_size()); i < n; i++) {
537 const auto& repfield = this->_internal_file_line_cols(i);
538 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
539 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
540 }
541
542 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
543 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
544 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
545 }
546 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.GraphDebugInfo.StackTrace)
547 return target;
548 }
549
ByteSizeLong() const550 size_t GraphDebugInfo_StackTrace::ByteSizeLong() const {
551 // @@protoc_insertion_point(message_byte_size_start:tensorflow.GraphDebugInfo.StackTrace)
552 size_t total_size = 0;
553
554 ::uint32_t cached_has_bits = 0;
555 // Prevent compiler warnings about cached_has_bits being unused
556 (void) cached_has_bits;
557
558 // repeated .tensorflow.GraphDebugInfo.FileLineCol file_line_cols = 1;
559 total_size += 1UL * this->_internal_file_line_cols_size();
560 for (const auto& msg : this->_impl_.file_line_cols_) {
561 total_size +=
562 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
563 }
564
565 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
566 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
567 }
568 int cached_size = ::_pbi::ToCachedSize(total_size);
569 SetCachedSize(cached_size);
570 return total_size;
571 }
572
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)573 void GraphDebugInfo_StackTrace::CheckTypeAndMergeFrom(
574 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
575 MergeFrom(*::_pbi::DownCast<const GraphDebugInfo_StackTrace*>(
576 &from));
577 }
578
MergeFrom(const GraphDebugInfo_StackTrace & from)579 void GraphDebugInfo_StackTrace::MergeFrom(const GraphDebugInfo_StackTrace& from) {
580 GraphDebugInfo_StackTrace* const _this = this;
581 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.GraphDebugInfo.StackTrace)
582 GOOGLE_DCHECK_NE(&from, _this);
583 ::uint32_t cached_has_bits = 0;
584 (void) cached_has_bits;
585
586 _this->_impl_.file_line_cols_.MergeFrom(from._impl_.file_line_cols_);
587 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
588 }
589
CopyFrom(const GraphDebugInfo_StackTrace & from)590 void GraphDebugInfo_StackTrace::CopyFrom(const GraphDebugInfo_StackTrace& from) {
591 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.GraphDebugInfo.StackTrace)
592 if (&from == this) return;
593 Clear();
594 MergeFrom(from);
595 }
596
IsInitialized() const597 bool GraphDebugInfo_StackTrace::IsInitialized() const {
598 return true;
599 }
600
InternalSwap(GraphDebugInfo_StackTrace * other)601 void GraphDebugInfo_StackTrace::InternalSwap(GraphDebugInfo_StackTrace* other) {
602 using std::swap;
603 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
604 _impl_.file_line_cols_.InternalSwap(&other->_impl_.file_line_cols_);
605 }
606
GetTypeName() const607 std::string GraphDebugInfo_StackTrace::GetTypeName() const {
608 return "tensorflow.GraphDebugInfo.StackTrace";
609 }
610
611
612 // ===================================================================
613
GraphDebugInfo_TracesEntry_DoNotUse()614 GraphDebugInfo_TracesEntry_DoNotUse::GraphDebugInfo_TracesEntry_DoNotUse() {}
GraphDebugInfo_TracesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)615 GraphDebugInfo_TracesEntry_DoNotUse::GraphDebugInfo_TracesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
616 : SuperType(arena) {}
MergeFrom(const GraphDebugInfo_TracesEntry_DoNotUse & other)617 void GraphDebugInfo_TracesEntry_DoNotUse::MergeFrom(const GraphDebugInfo_TracesEntry_DoNotUse& other) {
618 MergeFromInternal(other);
619 }
620
621 // ===================================================================
622
623 class GraphDebugInfo::_Internal {
624 public:
625 };
626
GraphDebugInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)627 GraphDebugInfo::GraphDebugInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
628 bool is_message_owned)
629 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
630 SharedCtor(arena, is_message_owned);
631 // @@protoc_insertion_point(arena_constructor:tensorflow.GraphDebugInfo)
632 }
GraphDebugInfo(const GraphDebugInfo & from)633 GraphDebugInfo::GraphDebugInfo(const GraphDebugInfo& from)
634 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
635 GraphDebugInfo* const _this = this; (void)_this;
636 new (&_impl_) Impl_{
637 decltype(_impl_.files_){from._impl_.files_}
638 , /*decltype(_impl_.traces_)*/{}
639 , /*decltype(_impl_._cached_size_)*/{}};
640
641 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
642 _this->_impl_.traces_.MergeFrom(from._impl_.traces_);
643 // @@protoc_insertion_point(copy_constructor:tensorflow.GraphDebugInfo)
644 }
645
SharedCtor(::_pb::Arena * arena,bool is_message_owned)646 inline void GraphDebugInfo::SharedCtor(
647 ::_pb::Arena* arena, bool is_message_owned) {
648 (void)arena;
649 (void)is_message_owned;
650 new (&_impl_) Impl_{
651 decltype(_impl_.files_){arena}
652 , /*decltype(_impl_.traces_)*/{::_pbi::ArenaInitialized(), arena}
653 , /*decltype(_impl_._cached_size_)*/{}
654 };
655 }
656
~GraphDebugInfo()657 GraphDebugInfo::~GraphDebugInfo() {
658 // @@protoc_insertion_point(destructor:tensorflow.GraphDebugInfo)
659 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
660 (void)arena;
661 return;
662 }
663 SharedDtor();
664 }
665
SharedDtor()666 inline void GraphDebugInfo::SharedDtor() {
667 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
668 _impl_.files_.~RepeatedPtrField();
669 _impl_.traces_.Destruct();
670 _impl_.traces_.~MapFieldLite();
671 }
672
SetCachedSize(int size) const673 void GraphDebugInfo::SetCachedSize(int size) const {
674 _impl_._cached_size_.Set(size);
675 }
676
Clear()677 void GraphDebugInfo::Clear() {
678 // @@protoc_insertion_point(message_clear_start:tensorflow.GraphDebugInfo)
679 ::uint32_t cached_has_bits = 0;
680 // Prevent compiler warnings about cached_has_bits being unused
681 (void) cached_has_bits;
682
683 _impl_.files_.Clear();
684 _impl_.traces_.Clear();
685 _internal_metadata_.Clear<std::string>();
686 }
687
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)688 const char* GraphDebugInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
689 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
690 while (!ctx->Done(&ptr)) {
691 ::uint32_t tag;
692 ptr = ::_pbi::ReadTag(ptr, &tag);
693 switch (tag >> 3) {
694 // repeated string files = 1;
695 case 1:
696 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
697 ptr -= 1;
698 do {
699 ptr += 1;
700 auto str = _internal_add_files();
701 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
702 CHK_(ptr);
703 CHK_(::_pbi::VerifyUTF8(str, nullptr));
704 if (!ctx->DataAvailable(ptr)) break;
705 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
706 } else {
707 goto handle_unusual;
708 }
709 continue;
710 // map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
711 case 2:
712 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
713 ptr -= 1;
714 do {
715 ptr += 1;
716 ptr = ctx->ParseMessage(&_impl_.traces_, ptr);
717 CHK_(ptr);
718 if (!ctx->DataAvailable(ptr)) break;
719 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
720 } else {
721 goto handle_unusual;
722 }
723 continue;
724 default:
725 goto handle_unusual;
726 } // switch
727 handle_unusual:
728 if ((tag == 0) || ((tag & 7) == 4)) {
729 CHK_(ptr);
730 ctx->SetLastTag(tag);
731 goto message_done;
732 }
733 ptr = UnknownFieldParse(
734 tag,
735 _internal_metadata_.mutable_unknown_fields<std::string>(),
736 ptr, ctx);
737 CHK_(ptr != nullptr);
738 } // while
739 message_done:
740 return ptr;
741 failure:
742 ptr = nullptr;
743 goto message_done;
744 #undef CHK_
745 }
746
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const747 ::uint8_t* GraphDebugInfo::_InternalSerialize(
748 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
749 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.GraphDebugInfo)
750 ::uint32_t cached_has_bits = 0;
751 (void) cached_has_bits;
752
753 // repeated string files = 1;
754 for (int i = 0, n = this->_internal_files_size(); i < n; i++) {
755 const auto& s = this->_internal_files(i);
756 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
757 s.data(), static_cast<int>(s.length()),
758 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
759 "tensorflow.GraphDebugInfo.files");
760 target = stream->WriteString(1, s, target);
761 }
762
763 // map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
764 if (!this->_internal_traces().empty()) {
765 using MapType = ::_pb::Map<std::string, ::tensorflow::GraphDebugInfo_StackTrace>;
766 using WireHelper = GraphDebugInfo_TracesEntry_DoNotUse::Funcs;
767 const auto& map_field = this->_internal_traces();
768 auto check_utf8 = [](const MapType::value_type& entry) {
769 (void)entry;
770 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
771 entry.first.data(), static_cast<int>(entry.first.length()),
772 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
773 "tensorflow.GraphDebugInfo.TracesEntry.key");
774 };
775
776 if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
777 for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
778 target = WireHelper::InternalSerialize(2, entry.first, entry.second, target, stream);
779 check_utf8(entry);
780 }
781 } else {
782 for (const auto& entry : map_field) {
783 target = WireHelper::InternalSerialize(2, entry.first, entry.second, target, stream);
784 check_utf8(entry);
785 }
786 }
787 }
788
789 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
790 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
791 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
792 }
793 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.GraphDebugInfo)
794 return target;
795 }
796
ByteSizeLong() const797 size_t GraphDebugInfo::ByteSizeLong() const {
798 // @@protoc_insertion_point(message_byte_size_start:tensorflow.GraphDebugInfo)
799 size_t total_size = 0;
800
801 ::uint32_t cached_has_bits = 0;
802 // Prevent compiler warnings about cached_has_bits being unused
803 (void) cached_has_bits;
804
805 // repeated string files = 1;
806 total_size += 1 *
807 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.files_.size());
808 for (int i = 0, n = _impl_.files_.size(); i < n; i++) {
809 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
810 _impl_.files_.Get(i));
811 }
812
813 // map<string, .tensorflow.GraphDebugInfo.StackTrace> traces = 2;
814 total_size += 1 *
815 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_traces_size());
816 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::GraphDebugInfo_StackTrace >::const_iterator
817 it = this->_internal_traces().begin();
818 it != this->_internal_traces().end(); ++it) {
819 total_size += GraphDebugInfo_TracesEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
820 }
821
822 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
823 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
824 }
825 int cached_size = ::_pbi::ToCachedSize(total_size);
826 SetCachedSize(cached_size);
827 return total_size;
828 }
829
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)830 void GraphDebugInfo::CheckTypeAndMergeFrom(
831 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
832 MergeFrom(*::_pbi::DownCast<const GraphDebugInfo*>(
833 &from));
834 }
835
MergeFrom(const GraphDebugInfo & from)836 void GraphDebugInfo::MergeFrom(const GraphDebugInfo& from) {
837 GraphDebugInfo* const _this = this;
838 // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.GraphDebugInfo)
839 GOOGLE_DCHECK_NE(&from, _this);
840 ::uint32_t cached_has_bits = 0;
841 (void) cached_has_bits;
842
843 _this->_impl_.files_.MergeFrom(from._impl_.files_);
844 _this->_impl_.traces_.MergeFrom(from._impl_.traces_);
845 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
846 }
847
CopyFrom(const GraphDebugInfo & from)848 void GraphDebugInfo::CopyFrom(const GraphDebugInfo& from) {
849 // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.GraphDebugInfo)
850 if (&from == this) return;
851 Clear();
852 MergeFrom(from);
853 }
854
IsInitialized() const855 bool GraphDebugInfo::IsInitialized() const {
856 return true;
857 }
858
InternalSwap(GraphDebugInfo * other)859 void GraphDebugInfo::InternalSwap(GraphDebugInfo* other) {
860 using std::swap;
861 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
862 _impl_.files_.InternalSwap(&other->_impl_.files_);
863 _impl_.traces_.InternalSwap(&other->_impl_.traces_);
864 }
865
GetTypeName() const866 std::string GraphDebugInfo::GetTypeName() const {
867 return "tensorflow.GraphDebugInfo";
868 }
869
870
871 // @@protoc_insertion_point(namespace_scope)
872 } // namespace tensorflow
873 PROTOBUF_NAMESPACE_OPEN
874 template<> PROTOBUF_NOINLINE ::tensorflow::GraphDebugInfo_FileLineCol*
CreateMaybeMessage(Arena * arena)875 Arena::CreateMaybeMessage< ::tensorflow::GraphDebugInfo_FileLineCol >(Arena* arena) {
876 return Arena::CreateMessageInternal< ::tensorflow::GraphDebugInfo_FileLineCol >(arena);
877 }
878 template<> PROTOBUF_NOINLINE ::tensorflow::GraphDebugInfo_StackTrace*
CreateMaybeMessage(Arena * arena)879 Arena::CreateMaybeMessage< ::tensorflow::GraphDebugInfo_StackTrace >(Arena* arena) {
880 return Arena::CreateMessageInternal< ::tensorflow::GraphDebugInfo_StackTrace >(arena);
881 }
882 template<> PROTOBUF_NOINLINE ::tensorflow::GraphDebugInfo_TracesEntry_DoNotUse*
CreateMaybeMessage(Arena * arena)883 Arena::CreateMaybeMessage< ::tensorflow::GraphDebugInfo_TracesEntry_DoNotUse >(Arena* arena) {
884 return Arena::CreateMessageInternal< ::tensorflow::GraphDebugInfo_TracesEntry_DoNotUse >(arena);
885 }
886 template<> PROTOBUF_NOINLINE ::tensorflow::GraphDebugInfo*
CreateMaybeMessage(Arena * arena)887 Arena::CreateMaybeMessage< ::tensorflow::GraphDebugInfo >(Arena* arena) {
888 return Arena::CreateMessageInternal< ::tensorflow::GraphDebugInfo >(arena);
889 }
890 PROTOBUF_NAMESPACE_CLOSE
891
892 // @@protoc_insertion_point(global_scope)
893 #include <google/protobuf/port_undef.inc>
894