1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: tensorflow/core/protobuf/bfc_memory_map.proto
3
4#include "tensorflow/core/protobuf/bfc_memory_map.pb.h"
5
6#include <algorithm>
7
8#include <google/protobuf/stubs/common.h>
9#include <google/protobuf/io/coded_stream.h>
10#include <google/protobuf/extension_set.h>
11#include <google/protobuf/wire_format_lite.h>
12#include <google/protobuf/descriptor.h>
13#include <google/protobuf/generated_message_reflection.h>
14#include <google/protobuf/reflection_ops.h>
15#include <google/protobuf/wire_format.h>
16// @@protoc_insertion_point(includes)
17#include <google/protobuf/port_def.inc>
18extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_BinSummary_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto;
19extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MemAllocatorStats_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto;
20extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MemChunk_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto;
21extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SnapShot_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto;
22namespace tensorflow {
23class MemAllocatorStatsDefaultTypeInternal {
24 public:
25 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MemAllocatorStats> _instance;
26} _MemAllocatorStats_default_instance_;
27class MemChunkDefaultTypeInternal {
28 public:
29 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MemChunk> _instance;
30} _MemChunk_default_instance_;
31class BinSummaryDefaultTypeInternal {
32 public:
33 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<BinSummary> _instance;
34} _BinSummary_default_instance_;
35class SnapShotDefaultTypeInternal {
36 public:
37 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SnapShot> _instance;
38} _SnapShot_default_instance_;
39class MemoryDumpDefaultTypeInternal {
40 public:
41 ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<MemoryDump> _instance;
42} _MemoryDump_default_instance_;
43} // namespace tensorflow
44static void InitDefaultsscc_info_BinSummary_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto() {
45 GOOGLE_PROTOBUF_VERIFY_VERSION;
46
47 {
48 void* ptr = &::tensorflow::_BinSummary_default_instance_;
49 new (ptr) ::tensorflow::BinSummary();
50 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
51 }
52 ::tensorflow::BinSummary::InitAsDefaultInstance();
53}
54
55::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_BinSummary_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto =
56 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_BinSummary_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto}, {}};
57
58static void InitDefaultsscc_info_MemAllocatorStats_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto() {
59 GOOGLE_PROTOBUF_VERIFY_VERSION;
60
61 {
62 void* ptr = &::tensorflow::_MemAllocatorStats_default_instance_;
63 new (ptr) ::tensorflow::MemAllocatorStats();
64 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
65 }
66 ::tensorflow::MemAllocatorStats::InitAsDefaultInstance();
67}
68
69::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MemAllocatorStats_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto =
70 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_MemAllocatorStats_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto}, {}};
71
72static void InitDefaultsscc_info_MemChunk_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto() {
73 GOOGLE_PROTOBUF_VERIFY_VERSION;
74
75 {
76 void* ptr = &::tensorflow::_MemChunk_default_instance_;
77 new (ptr) ::tensorflow::MemChunk();
78 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
79 }
80 ::tensorflow::MemChunk::InitAsDefaultInstance();
81}
82
83::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MemChunk_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto =
84 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_MemChunk_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto}, {}};
85
86static void InitDefaultsscc_info_MemoryDump_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto() {
87 GOOGLE_PROTOBUF_VERIFY_VERSION;
88
89 {
90 void* ptr = &::tensorflow::_MemoryDump_default_instance_;
91 new (ptr) ::tensorflow::MemoryDump();
92 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
93 }
94 ::tensorflow::MemoryDump::InitAsDefaultInstance();
95}
96
97::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_MemoryDump_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto =
98 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsscc_info_MemoryDump_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto}, {
99 &scc_info_BinSummary_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base,
100 &scc_info_MemChunk_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base,
101 &scc_info_SnapShot_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base,
102 &scc_info_MemAllocatorStats_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base,}};
103
104static void InitDefaultsscc_info_SnapShot_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto() {
105 GOOGLE_PROTOBUF_VERIFY_VERSION;
106
107 {
108 void* ptr = &::tensorflow::_SnapShot_default_instance_;
109 new (ptr) ::tensorflow::SnapShot();
110 ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
111 }
112 ::tensorflow::SnapShot::InitAsDefaultInstance();
113}
114
115::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SnapShot_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto =
116 {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_SnapShot_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto}, {}};
117
118static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto[5];
119static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto = nullptr;
120static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto = nullptr;
121
122const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
123 ~0u, // no _has_bits_
124 PROTOBUF_FIELD_OFFSET(::tensorflow::MemAllocatorStats, _internal_metadata_),
125 ~0u, // no _extensions_
126 ~0u, // no _oneof_case_
127 ~0u, // no _weak_field_map_
128 PROTOBUF_FIELD_OFFSET(::tensorflow::MemAllocatorStats, num_allocs_),
129 PROTOBUF_FIELD_OFFSET(::tensorflow::MemAllocatorStats, bytes_in_use_),
130 PROTOBUF_FIELD_OFFSET(::tensorflow::MemAllocatorStats, peak_bytes_in_use_),
131 PROTOBUF_FIELD_OFFSET(::tensorflow::MemAllocatorStats, largest_alloc_size_),
132 PROTOBUF_FIELD_OFFSET(::tensorflow::MemAllocatorStats, fragmentation_metric_),
133 ~0u, // no _has_bits_
134 PROTOBUF_FIELD_OFFSET(::tensorflow::MemChunk, _internal_metadata_),
135 ~0u, // no _extensions_
136 ~0u, // no _oneof_case_
137 ~0u, // no _weak_field_map_
138 PROTOBUF_FIELD_OFFSET(::tensorflow::MemChunk, address_),
139 PROTOBUF_FIELD_OFFSET(::tensorflow::MemChunk, size_),
140 PROTOBUF_FIELD_OFFSET(::tensorflow::MemChunk, requested_size_),
141 PROTOBUF_FIELD_OFFSET(::tensorflow::MemChunk, bin_),
142 PROTOBUF_FIELD_OFFSET(::tensorflow::MemChunk, op_name_),
143 PROTOBUF_FIELD_OFFSET(::tensorflow::MemChunk, freed_at_count_),
144 PROTOBUF_FIELD_OFFSET(::tensorflow::MemChunk, action_count_),
145 PROTOBUF_FIELD_OFFSET(::tensorflow::MemChunk, in_use_),
146 PROTOBUF_FIELD_OFFSET(::tensorflow::MemChunk, step_id_),
147 ~0u, // no _has_bits_
148 PROTOBUF_FIELD_OFFSET(::tensorflow::BinSummary, _internal_metadata_),
149 ~0u, // no _extensions_
150 ~0u, // no _oneof_case_
151 ~0u, // no _weak_field_map_
152 PROTOBUF_FIELD_OFFSET(::tensorflow::BinSummary, bin_),
153 PROTOBUF_FIELD_OFFSET(::tensorflow::BinSummary, total_bytes_in_use_),
154 PROTOBUF_FIELD_OFFSET(::tensorflow::BinSummary, total_bytes_in_bin_),
155 PROTOBUF_FIELD_OFFSET(::tensorflow::BinSummary, total_chunks_in_use_),
156 PROTOBUF_FIELD_OFFSET(::tensorflow::BinSummary, total_chunks_in_bin_),
157 ~0u, // no _has_bits_
158 PROTOBUF_FIELD_OFFSET(::tensorflow::SnapShot, _internal_metadata_),
159 ~0u, // no _extensions_
160 ~0u, // no _oneof_case_
161 ~0u, // no _weak_field_map_
162 PROTOBUF_FIELD_OFFSET(::tensorflow::SnapShot, action_count_),
163 PROTOBUF_FIELD_OFFSET(::tensorflow::SnapShot, size_),
164 ~0u, // no _has_bits_
165 PROTOBUF_FIELD_OFFSET(::tensorflow::MemoryDump, _internal_metadata_),
166 ~0u, // no _extensions_
167 ~0u, // no _oneof_case_
168 ~0u, // no _weak_field_map_
169 PROTOBUF_FIELD_OFFSET(::tensorflow::MemoryDump, allocator_name_),
170 PROTOBUF_FIELD_OFFSET(::tensorflow::MemoryDump, bin_summary_),
171 PROTOBUF_FIELD_OFFSET(::tensorflow::MemoryDump, chunk_),
172 PROTOBUF_FIELD_OFFSET(::tensorflow::MemoryDump, snap_shot_),
173 PROTOBUF_FIELD_OFFSET(::tensorflow::MemoryDump, stats_),
174};
175static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
176 { 0, -1, sizeof(::tensorflow::MemAllocatorStats)},
177 { 10, -1, sizeof(::tensorflow::MemChunk)},
178 { 24, -1, sizeof(::tensorflow::BinSummary)},
179 { 34, -1, sizeof(::tensorflow::SnapShot)},
180 { 41, -1, sizeof(::tensorflow::MemoryDump)},
181};
182
183static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
184 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_MemAllocatorStats_default_instance_),
185 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_MemChunk_default_instance_),
186 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_BinSummary_default_instance_),
187 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SnapShot_default_instance_),
188 reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_MemoryDump_default_instance_),
189};
190
191const char descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
192 "\n-tensorflow/core/protobuf/bfc_memory_ma"
193 "p.proto\022\ntensorflow\"\222\001\n\021MemAllocatorStat"
194 "s\022\022\n\nnum_allocs\030\001 \001(\003\022\024\n\014bytes_in_use\030\002 "
195 "\001(\003\022\031\n\021peak_bytes_in_use\030\003 \001(\003\022\032\n\022larges"
196 "t_alloc_size\030\004 \001(\003\022\034\n\024fragmentation_metr"
197 "ic\030\005 \001(\002\"\256\001\n\010MemChunk\022\017\n\007address\030\001 \001(\004\022\014"
198 "\n\004size\030\002 \001(\003\022\026\n\016requested_size\030\003 \001(\003\022\013\n\003"
199 "bin\030\004 \001(\005\022\017\n\007op_name\030\005 \001(\t\022\026\n\016freed_at_c"
200 "ount\030\006 \001(\004\022\024\n\014action_count\030\007 \001(\004\022\016\n\006in_u"
201 "se\030\010 \001(\010\022\017\n\007step_id\030\t \001(\004\"\213\001\n\nBinSummary"
202 "\022\013\n\003bin\030\001 \001(\005\022\032\n\022total_bytes_in_use\030\002 \001("
203 "\003\022\032\n\022total_bytes_in_bin\030\003 \001(\003\022\033\n\023total_c"
204 "hunks_in_use\030\004 \001(\003\022\033\n\023total_chunks_in_bi"
205 "n\030\005 \001(\003\".\n\010SnapShot\022\024\n\014action_count\030\001 \001("
206 "\004\022\014\n\004size\030\002 \001(\003\"\315\001\n\nMemoryDump\022\026\n\016alloca"
207 "tor_name\030\001 \001(\t\022+\n\013bin_summary\030\002 \003(\0132\026.te"
208 "nsorflow.BinSummary\022#\n\005chunk\030\003 \003(\0132\024.ten"
209 "sorflow.MemChunk\022\'\n\tsnap_shot\030\004 \003(\0132\024.te"
210 "nsorflow.SnapShot\022,\n\005stats\030\005 \001(\0132\035.tenso"
211 "rflow.MemAllocatorStatsBWZUgithub.com/te"
212 "nsorflow/tensorflow/tensorflow/go/core/p"
213 "rotobuf/for_core_protos_go_protob\006proto3"
214 ;
215static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto_deps[1] = {
216};
217static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto_sccs[5] = {
218 &scc_info_BinSummary_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base,
219 &scc_info_MemAllocatorStats_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base,
220 &scc_info_MemChunk_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base,
221 &scc_info_MemoryDump_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base,
222 &scc_info_SnapShot_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base,
223};
224static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto_once;
225static bool descriptor_table_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto_initialized = false;
226const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto = {
227 &descriptor_table_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto, "tensorflow/core/protobuf/bfc_memory_map.proto", 880,
228 &descriptor_table_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto_once, descriptor_table_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto_deps, 5, 0,
229 schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto::offsets,
230 file_level_metadata_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto, 5, file_level_enum_descriptors_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto,
231};
232
233// Force running AddDescriptors() at dynamic initialization time.
234static bool dynamic_init_dummy_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto), true);
235namespace tensorflow {
236
237// ===================================================================
238
239void MemAllocatorStats::InitAsDefaultInstance() {
240}
241class MemAllocatorStats::_Internal {
242 public:
243};
244
245MemAllocatorStats::MemAllocatorStats()
246 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
247 SharedCtor();
248 // @@protoc_insertion_point(constructor:tensorflow.MemAllocatorStats)
249}
250MemAllocatorStats::MemAllocatorStats(const MemAllocatorStats& from)
251 : ::PROTOBUF_NAMESPACE_ID::Message(),
252 _internal_metadata_(nullptr) {
253 _internal_metadata_.MergeFrom(from._internal_metadata_);
254 ::memcpy(&num_allocs_, &from.num_allocs_,
255 static_cast<size_t>(reinterpret_cast<char*>(&fragmentation_metric_) -
256 reinterpret_cast<char*>(&num_allocs_)) + sizeof(fragmentation_metric_));
257 // @@protoc_insertion_point(copy_constructor:tensorflow.MemAllocatorStats)
258}
259
260void MemAllocatorStats::SharedCtor() {
261 ::memset(&num_allocs_, 0, static_cast<size_t>(
262 reinterpret_cast<char*>(&fragmentation_metric_) -
263 reinterpret_cast<char*>(&num_allocs_)) + sizeof(fragmentation_metric_));
264}
265
266MemAllocatorStats::~MemAllocatorStats() {
267 // @@protoc_insertion_point(destructor:tensorflow.MemAllocatorStats)
268 SharedDtor();
269}
270
271void MemAllocatorStats::SharedDtor() {
272}
273
274void MemAllocatorStats::SetCachedSize(int size) const {
275 _cached_size_.Set(size);
276}
277const MemAllocatorStats& MemAllocatorStats::default_instance() {
278 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MemAllocatorStats_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base);
279 return *internal_default_instance();
280}
281
282
283void MemAllocatorStats::Clear() {
284// @@protoc_insertion_point(message_clear_start:tensorflow.MemAllocatorStats)
285 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
286 // Prevent compiler warnings about cached_has_bits being unused
287 (void) cached_has_bits;
288
289 ::memset(&num_allocs_, 0, static_cast<size_t>(
290 reinterpret_cast<char*>(&fragmentation_metric_) -
291 reinterpret_cast<char*>(&num_allocs_)) + sizeof(fragmentation_metric_));
292 _internal_metadata_.Clear();
293}
294
295#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
296const char* MemAllocatorStats::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
297#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
298 while (!ctx->Done(&ptr)) {
299 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
300 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
301 CHK_(ptr);
302 switch (tag >> 3) {
303 // int64 num_allocs = 1;
304 case 1:
305 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
306 num_allocs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
307 CHK_(ptr);
308 } else goto handle_unusual;
309 continue;
310 // int64 bytes_in_use = 2;
311 case 2:
312 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
313 bytes_in_use_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
314 CHK_(ptr);
315 } else goto handle_unusual;
316 continue;
317 // int64 peak_bytes_in_use = 3;
318 case 3:
319 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
320 peak_bytes_in_use_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
321 CHK_(ptr);
322 } else goto handle_unusual;
323 continue;
324 // int64 largest_alloc_size = 4;
325 case 4:
326 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
327 largest_alloc_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
328 CHK_(ptr);
329 } else goto handle_unusual;
330 continue;
331 // float fragmentation_metric = 5;
332 case 5:
333 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45)) {
334 fragmentation_metric_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
335 ptr += sizeof(float);
336 } else goto handle_unusual;
337 continue;
338 default: {
339 handle_unusual:
340 if ((tag & 7) == 4 || tag == 0) {
341 ctx->SetLastTag(tag);
342 goto success;
343 }
344 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
345 CHK_(ptr != nullptr);
346 continue;
347 }
348 } // switch
349 } // while
350success:
351 return ptr;
352failure:
353 ptr = nullptr;
354 goto success;
355#undef CHK_
356}
357#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
358bool MemAllocatorStats::MergePartialFromCodedStream(
359 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
360#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
361 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
362 // @@protoc_insertion_point(parse_start:tensorflow.MemAllocatorStats)
363 for (;;) {
364 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
365 tag = p.first;
366 if (!p.second) goto handle_unusual;
367 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
368 // int64 num_allocs = 1;
369 case 1: {
370 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
371
372 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
373 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
374 input, &num_allocs_)));
375 } else {
376 goto handle_unusual;
377 }
378 break;
379 }
380
381 // int64 bytes_in_use = 2;
382 case 2: {
383 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
384
385 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
386 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
387 input, &bytes_in_use_)));
388 } else {
389 goto handle_unusual;
390 }
391 break;
392 }
393
394 // int64 peak_bytes_in_use = 3;
395 case 3: {
396 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
397
398 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
399 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
400 input, &peak_bytes_in_use_)));
401 } else {
402 goto handle_unusual;
403 }
404 break;
405 }
406
407 // int64 largest_alloc_size = 4;
408 case 4: {
409 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
410
411 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
412 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
413 input, &largest_alloc_size_)));
414 } else {
415 goto handle_unusual;
416 }
417 break;
418 }
419
420 // float fragmentation_metric = 5;
421 case 5: {
422 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (45 & 0xFF)) {
423
424 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
425 float, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_FLOAT>(
426 input, &fragmentation_metric_)));
427 } else {
428 goto handle_unusual;
429 }
430 break;
431 }
432
433 default: {
434 handle_unusual:
435 if (tag == 0) {
436 goto success;
437 }
438 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
439 input, tag, _internal_metadata_.mutable_unknown_fields()));
440 break;
441 }
442 }
443 }
444success:
445 // @@protoc_insertion_point(parse_success:tensorflow.MemAllocatorStats)
446 return true;
447failure:
448 // @@protoc_insertion_point(parse_failure:tensorflow.MemAllocatorStats)
449 return false;
450#undef DO_
451}
452#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
453
454void MemAllocatorStats::SerializeWithCachedSizes(
455 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
456 // @@protoc_insertion_point(serialize_start:tensorflow.MemAllocatorStats)
457 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
458 (void) cached_has_bits;
459
460 // int64 num_allocs = 1;
461 if (this->num_allocs() != 0) {
462 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->num_allocs(), output);
463 }
464
465 // int64 bytes_in_use = 2;
466 if (this->bytes_in_use() != 0) {
467 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->bytes_in_use(), output);
468 }
469
470 // int64 peak_bytes_in_use = 3;
471 if (this->peak_bytes_in_use() != 0) {
472 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->peak_bytes_in_use(), output);
473 }
474
475 // int64 largest_alloc_size = 4;
476 if (this->largest_alloc_size() != 0) {
477 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->largest_alloc_size(), output);
478 }
479
480 // float fragmentation_metric = 5;
481 if (!(this->fragmentation_metric() <= 0 && this->fragmentation_metric() >= 0)) {
482 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloat(5, this->fragmentation_metric(), output);
483 }
484
485 if (_internal_metadata_.have_unknown_fields()) {
486 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
487 _internal_metadata_.unknown_fields(), output);
488 }
489 // @@protoc_insertion_point(serialize_end:tensorflow.MemAllocatorStats)
490}
491
492::PROTOBUF_NAMESPACE_ID::uint8* MemAllocatorStats::InternalSerializeWithCachedSizesToArray(
493 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
494 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.MemAllocatorStats)
495 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
496 (void) cached_has_bits;
497
498 // int64 num_allocs = 1;
499 if (this->num_allocs() != 0) {
500 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->num_allocs(), target);
501 }
502
503 // int64 bytes_in_use = 2;
504 if (this->bytes_in_use() != 0) {
505 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->bytes_in_use(), target);
506 }
507
508 // int64 peak_bytes_in_use = 3;
509 if (this->peak_bytes_in_use() != 0) {
510 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->peak_bytes_in_use(), target);
511 }
512
513 // int64 largest_alloc_size = 4;
514 if (this->largest_alloc_size() != 0) {
515 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->largest_alloc_size(), target);
516 }
517
518 // float fragmentation_metric = 5;
519 if (!(this->fragmentation_metric() <= 0 && this->fragmentation_metric() >= 0)) {
520 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->fragmentation_metric(), target);
521 }
522
523 if (_internal_metadata_.have_unknown_fields()) {
524 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
525 _internal_metadata_.unknown_fields(), target);
526 }
527 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.MemAllocatorStats)
528 return target;
529}
530
531size_t MemAllocatorStats::ByteSizeLong() const {
532// @@protoc_insertion_point(message_byte_size_start:tensorflow.MemAllocatorStats)
533 size_t total_size = 0;
534
535 if (_internal_metadata_.have_unknown_fields()) {
536 total_size +=
537 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
538 _internal_metadata_.unknown_fields());
539 }
540 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
541 // Prevent compiler warnings about cached_has_bits being unused
542 (void) cached_has_bits;
543
544 // int64 num_allocs = 1;
545 if (this->num_allocs() != 0) {
546 total_size += 1 +
547 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
548 this->num_allocs());
549 }
550
551 // int64 bytes_in_use = 2;
552 if (this->bytes_in_use() != 0) {
553 total_size += 1 +
554 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
555 this->bytes_in_use());
556 }
557
558 // int64 peak_bytes_in_use = 3;
559 if (this->peak_bytes_in_use() != 0) {
560 total_size += 1 +
561 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
562 this->peak_bytes_in_use());
563 }
564
565 // int64 largest_alloc_size = 4;
566 if (this->largest_alloc_size() != 0) {
567 total_size += 1 +
568 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
569 this->largest_alloc_size());
570 }
571
572 // float fragmentation_metric = 5;
573 if (!(this->fragmentation_metric() <= 0 && this->fragmentation_metric() >= 0)) {
574 total_size += 1 + 4;
575 }
576
577 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
578 SetCachedSize(cached_size);
579 return total_size;
580}
581
582void MemAllocatorStats::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
583// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.MemAllocatorStats)
584 GOOGLE_DCHECK_NE(&from, this);
585 const MemAllocatorStats* source =
586 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<MemAllocatorStats>(
587 &from);
588 if (source == nullptr) {
589 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.MemAllocatorStats)
590 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
591 } else {
592 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.MemAllocatorStats)
593 MergeFrom(*source);
594 }
595}
596
597void MemAllocatorStats::MergeFrom(const MemAllocatorStats& from) {
598// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.MemAllocatorStats)
599 GOOGLE_DCHECK_NE(&from, this);
600 _internal_metadata_.MergeFrom(from._internal_metadata_);
601 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
602 (void) cached_has_bits;
603
604 if (from.num_allocs() != 0) {
605 set_num_allocs(from.num_allocs());
606 }
607 if (from.bytes_in_use() != 0) {
608 set_bytes_in_use(from.bytes_in_use());
609 }
610 if (from.peak_bytes_in_use() != 0) {
611 set_peak_bytes_in_use(from.peak_bytes_in_use());
612 }
613 if (from.largest_alloc_size() != 0) {
614 set_largest_alloc_size(from.largest_alloc_size());
615 }
616 if (!(from.fragmentation_metric() <= 0 && from.fragmentation_metric() >= 0)) {
617 set_fragmentation_metric(from.fragmentation_metric());
618 }
619}
620
621void MemAllocatorStats::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
622// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.MemAllocatorStats)
623 if (&from == this) return;
624 Clear();
625 MergeFrom(from);
626}
627
628void MemAllocatorStats::CopyFrom(const MemAllocatorStats& from) {
629// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.MemAllocatorStats)
630 if (&from == this) return;
631 Clear();
632 MergeFrom(from);
633}
634
635bool MemAllocatorStats::IsInitialized() const {
636 return true;
637}
638
639void MemAllocatorStats::InternalSwap(MemAllocatorStats* other) {
640 using std::swap;
641 _internal_metadata_.Swap(&other->_internal_metadata_);
642 swap(num_allocs_, other->num_allocs_);
643 swap(bytes_in_use_, other->bytes_in_use_);
644 swap(peak_bytes_in_use_, other->peak_bytes_in_use_);
645 swap(largest_alloc_size_, other->largest_alloc_size_);
646 swap(fragmentation_metric_, other->fragmentation_metric_);
647}
648
649::PROTOBUF_NAMESPACE_ID::Metadata MemAllocatorStats::GetMetadata() const {
650 return GetMetadataStatic();
651}
652
653
654// ===================================================================
655
656void MemChunk::InitAsDefaultInstance() {
657}
658class MemChunk::_Internal {
659 public:
660};
661
662MemChunk::MemChunk()
663 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
664 SharedCtor();
665 // @@protoc_insertion_point(constructor:tensorflow.MemChunk)
666}
667MemChunk::MemChunk(const MemChunk& from)
668 : ::PROTOBUF_NAMESPACE_ID::Message(),
669 _internal_metadata_(nullptr) {
670 _internal_metadata_.MergeFrom(from._internal_metadata_);
671 op_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
672 if (!from.op_name().empty()) {
673 op_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.op_name_);
674 }
675 ::memcpy(&address_, &from.address_,
676 static_cast<size_t>(reinterpret_cast<char*>(&step_id_) -
677 reinterpret_cast<char*>(&address_)) + sizeof(step_id_));
678 // @@protoc_insertion_point(copy_constructor:tensorflow.MemChunk)
679}
680
681void MemChunk::SharedCtor() {
682 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MemChunk_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base);
683 op_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
684 ::memset(&address_, 0, static_cast<size_t>(
685 reinterpret_cast<char*>(&step_id_) -
686 reinterpret_cast<char*>(&address_)) + sizeof(step_id_));
687}
688
689MemChunk::~MemChunk() {
690 // @@protoc_insertion_point(destructor:tensorflow.MemChunk)
691 SharedDtor();
692}
693
694void MemChunk::SharedDtor() {
695 op_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
696}
697
698void MemChunk::SetCachedSize(int size) const {
699 _cached_size_.Set(size);
700}
701const MemChunk& MemChunk::default_instance() {
702 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MemChunk_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base);
703 return *internal_default_instance();
704}
705
706
707void MemChunk::Clear() {
708// @@protoc_insertion_point(message_clear_start:tensorflow.MemChunk)
709 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
710 // Prevent compiler warnings about cached_has_bits being unused
711 (void) cached_has_bits;
712
713 op_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
714 ::memset(&address_, 0, static_cast<size_t>(
715 reinterpret_cast<char*>(&step_id_) -
716 reinterpret_cast<char*>(&address_)) + sizeof(step_id_));
717 _internal_metadata_.Clear();
718}
719
720#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
721const char* MemChunk::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
722#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
723 while (!ctx->Done(&ptr)) {
724 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
725 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
726 CHK_(ptr);
727 switch (tag >> 3) {
728 // uint64 address = 1;
729 case 1:
730 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
731 address_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
732 CHK_(ptr);
733 } else goto handle_unusual;
734 continue;
735 // int64 size = 2;
736 case 2:
737 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
738 size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
739 CHK_(ptr);
740 } else goto handle_unusual;
741 continue;
742 // int64 requested_size = 3;
743 case 3:
744 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
745 requested_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
746 CHK_(ptr);
747 } else goto handle_unusual;
748 continue;
749 // int32 bin = 4;
750 case 4:
751 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
752 bin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
753 CHK_(ptr);
754 } else goto handle_unusual;
755 continue;
756 // string op_name = 5;
757 case 5:
758 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
759 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_op_name(), ptr, ctx, "tensorflow.MemChunk.op_name");
760 CHK_(ptr);
761 } else goto handle_unusual;
762 continue;
763 // uint64 freed_at_count = 6;
764 case 6:
765 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
766 freed_at_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
767 CHK_(ptr);
768 } else goto handle_unusual;
769 continue;
770 // uint64 action_count = 7;
771 case 7:
772 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
773 action_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
774 CHK_(ptr);
775 } else goto handle_unusual;
776 continue;
777 // bool in_use = 8;
778 case 8:
779 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
780 in_use_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
781 CHK_(ptr);
782 } else goto handle_unusual;
783 continue;
784 // uint64 step_id = 9;
785 case 9:
786 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) {
787 step_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
788 CHK_(ptr);
789 } else goto handle_unusual;
790 continue;
791 default: {
792 handle_unusual:
793 if ((tag & 7) == 4 || tag == 0) {
794 ctx->SetLastTag(tag);
795 goto success;
796 }
797 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
798 CHK_(ptr != nullptr);
799 continue;
800 }
801 } // switch
802 } // while
803success:
804 return ptr;
805failure:
806 ptr = nullptr;
807 goto success;
808#undef CHK_
809}
810#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
811bool MemChunk::MergePartialFromCodedStream(
812 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
813#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
814 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
815 // @@protoc_insertion_point(parse_start:tensorflow.MemChunk)
816 for (;;) {
817 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
818 tag = p.first;
819 if (!p.second) goto handle_unusual;
820 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
821 // uint64 address = 1;
822 case 1: {
823 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
824
825 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
826 ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
827 input, &address_)));
828 } else {
829 goto handle_unusual;
830 }
831 break;
832 }
833
834 // int64 size = 2;
835 case 2: {
836 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
837
838 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
839 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
840 input, &size_)));
841 } else {
842 goto handle_unusual;
843 }
844 break;
845 }
846
847 // int64 requested_size = 3;
848 case 3: {
849 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
850
851 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
852 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
853 input, &requested_size_)));
854 } else {
855 goto handle_unusual;
856 }
857 break;
858 }
859
860 // int32 bin = 4;
861 case 4: {
862 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
863
864 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
865 ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
866 input, &bin_)));
867 } else {
868 goto handle_unusual;
869 }
870 break;
871 }
872
873 // string op_name = 5;
874 case 5: {
875 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
876 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
877 input, this->mutable_op_name()));
878 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
879 this->op_name().data(), static_cast<int>(this->op_name().length()),
880 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
881 "tensorflow.MemChunk.op_name"));
882 } else {
883 goto handle_unusual;
884 }
885 break;
886 }
887
888 // uint64 freed_at_count = 6;
889 case 6: {
890 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) {
891
892 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
893 ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
894 input, &freed_at_count_)));
895 } else {
896 goto handle_unusual;
897 }
898 break;
899 }
900
901 // uint64 action_count = 7;
902 case 7: {
903 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) {
904
905 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
906 ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
907 input, &action_count_)));
908 } else {
909 goto handle_unusual;
910 }
911 break;
912 }
913
914 // bool in_use = 8;
915 case 8: {
916 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) {
917
918 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
919 bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>(
920 input, &in_use_)));
921 } else {
922 goto handle_unusual;
923 }
924 break;
925 }
926
927 // uint64 step_id = 9;
928 case 9: {
929 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) {
930
931 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
932 ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
933 input, &step_id_)));
934 } else {
935 goto handle_unusual;
936 }
937 break;
938 }
939
940 default: {
941 handle_unusual:
942 if (tag == 0) {
943 goto success;
944 }
945 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
946 input, tag, _internal_metadata_.mutable_unknown_fields()));
947 break;
948 }
949 }
950 }
951success:
952 // @@protoc_insertion_point(parse_success:tensorflow.MemChunk)
953 return true;
954failure:
955 // @@protoc_insertion_point(parse_failure:tensorflow.MemChunk)
956 return false;
957#undef DO_
958}
959#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
960
961void MemChunk::SerializeWithCachedSizes(
962 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
963 // @@protoc_insertion_point(serialize_start:tensorflow.MemChunk)
964 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
965 (void) cached_has_bits;
966
967 // uint64 address = 1;
968 if (this->address() != 0) {
969 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->address(), output);
970 }
971
972 // int64 size = 2;
973 if (this->size() != 0) {
974 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->size(), output);
975 }
976
977 // int64 requested_size = 3;
978 if (this->requested_size() != 0) {
979 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->requested_size(), output);
980 }
981
982 // int32 bin = 4;
983 if (this->bin() != 0) {
984 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(4, this->bin(), output);
985 }
986
987 // string op_name = 5;
988 if (this->op_name().size() > 0) {
989 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
990 this->op_name().data(), static_cast<int>(this->op_name().length()),
991 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
992 "tensorflow.MemChunk.op_name");
993 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
994 5, this->op_name(), output);
995 }
996
997 // uint64 freed_at_count = 6;
998 if (this->freed_at_count() != 0) {
999 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(6, this->freed_at_count(), output);
1000 }
1001
1002 // uint64 action_count = 7;
1003 if (this->action_count() != 0) {
1004 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(7, this->action_count(), output);
1005 }
1006
1007 // bool in_use = 8;
1008 if (this->in_use() != 0) {
1009 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(8, this->in_use(), output);
1010 }
1011
1012 // uint64 step_id = 9;
1013 if (this->step_id() != 0) {
1014 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(9, this->step_id(), output);
1015 }
1016
1017 if (_internal_metadata_.have_unknown_fields()) {
1018 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
1019 _internal_metadata_.unknown_fields(), output);
1020 }
1021 // @@protoc_insertion_point(serialize_end:tensorflow.MemChunk)
1022}
1023
1024::PROTOBUF_NAMESPACE_ID::uint8* MemChunk::InternalSerializeWithCachedSizesToArray(
1025 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
1026 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.MemChunk)
1027 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1028 (void) cached_has_bits;
1029
1030 // uint64 address = 1;
1031 if (this->address() != 0) {
1032 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->address(), target);
1033 }
1034
1035 // int64 size = 2;
1036 if (this->size() != 0) {
1037 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->size(), target);
1038 }
1039
1040 // int64 requested_size = 3;
1041 if (this->requested_size() != 0) {
1042 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->requested_size(), target);
1043 }
1044
1045 // int32 bin = 4;
1046 if (this->bin() != 0) {
1047 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->bin(), target);
1048 }
1049
1050 // string op_name = 5;
1051 if (this->op_name().size() > 0) {
1052 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1053 this->op_name().data(), static_cast<int>(this->op_name().length()),
1054 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1055 "tensorflow.MemChunk.op_name");
1056 target =
1057 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
1058 5, this->op_name(), target);
1059 }
1060
1061 // uint64 freed_at_count = 6;
1062 if (this->freed_at_count() != 0) {
1063 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(6, this->freed_at_count(), target);
1064 }
1065
1066 // uint64 action_count = 7;
1067 if (this->action_count() != 0) {
1068 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(7, this->action_count(), target);
1069 }
1070
1071 // bool in_use = 8;
1072 if (this->in_use() != 0) {
1073 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->in_use(), target);
1074 }
1075
1076 // uint64 step_id = 9;
1077 if (this->step_id() != 0) {
1078 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(9, this->step_id(), target);
1079 }
1080
1081 if (_internal_metadata_.have_unknown_fields()) {
1082 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
1083 _internal_metadata_.unknown_fields(), target);
1084 }
1085 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.MemChunk)
1086 return target;
1087}
1088
1089size_t MemChunk::ByteSizeLong() const {
1090// @@protoc_insertion_point(message_byte_size_start:tensorflow.MemChunk)
1091 size_t total_size = 0;
1092
1093 if (_internal_metadata_.have_unknown_fields()) {
1094 total_size +=
1095 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
1096 _internal_metadata_.unknown_fields());
1097 }
1098 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1099 // Prevent compiler warnings about cached_has_bits being unused
1100 (void) cached_has_bits;
1101
1102 // string op_name = 5;
1103 if (this->op_name().size() > 0) {
1104 total_size += 1 +
1105 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1106 this->op_name());
1107 }
1108
1109 // uint64 address = 1;
1110 if (this->address() != 0) {
1111 total_size += 1 +
1112 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
1113 this->address());
1114 }
1115
1116 // int64 size = 2;
1117 if (this->size() != 0) {
1118 total_size += 1 +
1119 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1120 this->size());
1121 }
1122
1123 // int64 requested_size = 3;
1124 if (this->requested_size() != 0) {
1125 total_size += 1 +
1126 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1127 this->requested_size());
1128 }
1129
1130 // uint64 freed_at_count = 6;
1131 if (this->freed_at_count() != 0) {
1132 total_size += 1 +
1133 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
1134 this->freed_at_count());
1135 }
1136
1137 // int32 bin = 4;
1138 if (this->bin() != 0) {
1139 total_size += 1 +
1140 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1141 this->bin());
1142 }
1143
1144 // bool in_use = 8;
1145 if (this->in_use() != 0) {
1146 total_size += 1 + 1;
1147 }
1148
1149 // uint64 action_count = 7;
1150 if (this->action_count() != 0) {
1151 total_size += 1 +
1152 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
1153 this->action_count());
1154 }
1155
1156 // uint64 step_id = 9;
1157 if (this->step_id() != 0) {
1158 total_size += 1 +
1159 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
1160 this->step_id());
1161 }
1162
1163 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1164 SetCachedSize(cached_size);
1165 return total_size;
1166}
1167
1168void MemChunk::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1169// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.MemChunk)
1170 GOOGLE_DCHECK_NE(&from, this);
1171 const MemChunk* source =
1172 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<MemChunk>(
1173 &from);
1174 if (source == nullptr) {
1175 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.MemChunk)
1176 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1177 } else {
1178 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.MemChunk)
1179 MergeFrom(*source);
1180 }
1181}
1182
1183void MemChunk::MergeFrom(const MemChunk& from) {
1184// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.MemChunk)
1185 GOOGLE_DCHECK_NE(&from, this);
1186 _internal_metadata_.MergeFrom(from._internal_metadata_);
1187 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1188 (void) cached_has_bits;
1189
1190 if (from.op_name().size() > 0) {
1191
1192 op_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.op_name_);
1193 }
1194 if (from.address() != 0) {
1195 set_address(from.address());
1196 }
1197 if (from.size() != 0) {
1198 set_size(from.size());
1199 }
1200 if (from.requested_size() != 0) {
1201 set_requested_size(from.requested_size());
1202 }
1203 if (from.freed_at_count() != 0) {
1204 set_freed_at_count(from.freed_at_count());
1205 }
1206 if (from.bin() != 0) {
1207 set_bin(from.bin());
1208 }
1209 if (from.in_use() != 0) {
1210 set_in_use(from.in_use());
1211 }
1212 if (from.action_count() != 0) {
1213 set_action_count(from.action_count());
1214 }
1215 if (from.step_id() != 0) {
1216 set_step_id(from.step_id());
1217 }
1218}
1219
1220void MemChunk::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1221// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.MemChunk)
1222 if (&from == this) return;
1223 Clear();
1224 MergeFrom(from);
1225}
1226
1227void MemChunk::CopyFrom(const MemChunk& from) {
1228// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.MemChunk)
1229 if (&from == this) return;
1230 Clear();
1231 MergeFrom(from);
1232}
1233
1234bool MemChunk::IsInitialized() const {
1235 return true;
1236}
1237
1238void MemChunk::InternalSwap(MemChunk* other) {
1239 using std::swap;
1240 _internal_metadata_.Swap(&other->_internal_metadata_);
1241 op_name_.Swap(&other->op_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1242 GetArenaNoVirtual());
1243 swap(address_, other->address_);
1244 swap(size_, other->size_);
1245 swap(requested_size_, other->requested_size_);
1246 swap(freed_at_count_, other->freed_at_count_);
1247 swap(bin_, other->bin_);
1248 swap(in_use_, other->in_use_);
1249 swap(action_count_, other->action_count_);
1250 swap(step_id_, other->step_id_);
1251}
1252
1253::PROTOBUF_NAMESPACE_ID::Metadata MemChunk::GetMetadata() const {
1254 return GetMetadataStatic();
1255}
1256
1257
1258// ===================================================================
1259
1260void BinSummary::InitAsDefaultInstance() {
1261}
1262class BinSummary::_Internal {
1263 public:
1264};
1265
1266BinSummary::BinSummary()
1267 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
1268 SharedCtor();
1269 // @@protoc_insertion_point(constructor:tensorflow.BinSummary)
1270}
1271BinSummary::BinSummary(const BinSummary& from)
1272 : ::PROTOBUF_NAMESPACE_ID::Message(),
1273 _internal_metadata_(nullptr) {
1274 _internal_metadata_.MergeFrom(from._internal_metadata_);
1275 ::memcpy(&total_bytes_in_use_, &from.total_bytes_in_use_,
1276 static_cast<size_t>(reinterpret_cast<char*>(&bin_) -
1277 reinterpret_cast<char*>(&total_bytes_in_use_)) + sizeof(bin_));
1278 // @@protoc_insertion_point(copy_constructor:tensorflow.BinSummary)
1279}
1280
1281void BinSummary::SharedCtor() {
1282 ::memset(&total_bytes_in_use_, 0, static_cast<size_t>(
1283 reinterpret_cast<char*>(&bin_) -
1284 reinterpret_cast<char*>(&total_bytes_in_use_)) + sizeof(bin_));
1285}
1286
1287BinSummary::~BinSummary() {
1288 // @@protoc_insertion_point(destructor:tensorflow.BinSummary)
1289 SharedDtor();
1290}
1291
1292void BinSummary::SharedDtor() {
1293}
1294
1295void BinSummary::SetCachedSize(int size) const {
1296 _cached_size_.Set(size);
1297}
1298const BinSummary& BinSummary::default_instance() {
1299 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_BinSummary_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base);
1300 return *internal_default_instance();
1301}
1302
1303
1304void BinSummary::Clear() {
1305// @@protoc_insertion_point(message_clear_start:tensorflow.BinSummary)
1306 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1307 // Prevent compiler warnings about cached_has_bits being unused
1308 (void) cached_has_bits;
1309
1310 ::memset(&total_bytes_in_use_, 0, static_cast<size_t>(
1311 reinterpret_cast<char*>(&bin_) -
1312 reinterpret_cast<char*>(&total_bytes_in_use_)) + sizeof(bin_));
1313 _internal_metadata_.Clear();
1314}
1315
1316#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1317const char* BinSummary::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1318#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1319 while (!ctx->Done(&ptr)) {
1320 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1321 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1322 CHK_(ptr);
1323 switch (tag >> 3) {
1324 // int32 bin = 1;
1325 case 1:
1326 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
1327 bin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1328 CHK_(ptr);
1329 } else goto handle_unusual;
1330 continue;
1331 // int64 total_bytes_in_use = 2;
1332 case 2:
1333 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
1334 total_bytes_in_use_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1335 CHK_(ptr);
1336 } else goto handle_unusual;
1337 continue;
1338 // int64 total_bytes_in_bin = 3;
1339 case 3:
1340 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
1341 total_bytes_in_bin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1342 CHK_(ptr);
1343 } else goto handle_unusual;
1344 continue;
1345 // int64 total_chunks_in_use = 4;
1346 case 4:
1347 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) {
1348 total_chunks_in_use_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1349 CHK_(ptr);
1350 } else goto handle_unusual;
1351 continue;
1352 // int64 total_chunks_in_bin = 5;
1353 case 5:
1354 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
1355 total_chunks_in_bin_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1356 CHK_(ptr);
1357 } else goto handle_unusual;
1358 continue;
1359 default: {
1360 handle_unusual:
1361 if ((tag & 7) == 4 || tag == 0) {
1362 ctx->SetLastTag(tag);
1363 goto success;
1364 }
1365 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
1366 CHK_(ptr != nullptr);
1367 continue;
1368 }
1369 } // switch
1370 } // while
1371success:
1372 return ptr;
1373failure:
1374 ptr = nullptr;
1375 goto success;
1376#undef CHK_
1377}
1378#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1379bool BinSummary::MergePartialFromCodedStream(
1380 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
1381#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1382 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1383 // @@protoc_insertion_point(parse_start:tensorflow.BinSummary)
1384 for (;;) {
1385 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1386 tag = p.first;
1387 if (!p.second) goto handle_unusual;
1388 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1389 // int32 bin = 1;
1390 case 1: {
1391 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
1392
1393 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1394 ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
1395 input, &bin_)));
1396 } else {
1397 goto handle_unusual;
1398 }
1399 break;
1400 }
1401
1402 // int64 total_bytes_in_use = 2;
1403 case 2: {
1404 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
1405
1406 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1407 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1408 input, &total_bytes_in_use_)));
1409 } else {
1410 goto handle_unusual;
1411 }
1412 break;
1413 }
1414
1415 // int64 total_bytes_in_bin = 3;
1416 case 3: {
1417 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) {
1418
1419 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1420 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1421 input, &total_bytes_in_bin_)));
1422 } else {
1423 goto handle_unusual;
1424 }
1425 break;
1426 }
1427
1428 // int64 total_chunks_in_use = 4;
1429 case 4: {
1430 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) {
1431
1432 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1433 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1434 input, &total_chunks_in_use_)));
1435 } else {
1436 goto handle_unusual;
1437 }
1438 break;
1439 }
1440
1441 // int64 total_chunks_in_bin = 5;
1442 case 5: {
1443 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) {
1444
1445 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1446 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1447 input, &total_chunks_in_bin_)));
1448 } else {
1449 goto handle_unusual;
1450 }
1451 break;
1452 }
1453
1454 default: {
1455 handle_unusual:
1456 if (tag == 0) {
1457 goto success;
1458 }
1459 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
1460 input, tag, _internal_metadata_.mutable_unknown_fields()));
1461 break;
1462 }
1463 }
1464 }
1465success:
1466 // @@protoc_insertion_point(parse_success:tensorflow.BinSummary)
1467 return true;
1468failure:
1469 // @@protoc_insertion_point(parse_failure:tensorflow.BinSummary)
1470 return false;
1471#undef DO_
1472}
1473#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1474
1475void BinSummary::SerializeWithCachedSizes(
1476 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
1477 // @@protoc_insertion_point(serialize_start:tensorflow.BinSummary)
1478 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1479 (void) cached_has_bits;
1480
1481 // int32 bin = 1;
1482 if (this->bin() != 0) {
1483 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->bin(), output);
1484 }
1485
1486 // int64 total_bytes_in_use = 2;
1487 if (this->total_bytes_in_use() != 0) {
1488 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->total_bytes_in_use(), output);
1489 }
1490
1491 // int64 total_bytes_in_bin = 3;
1492 if (this->total_bytes_in_bin() != 0) {
1493 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->total_bytes_in_bin(), output);
1494 }
1495
1496 // int64 total_chunks_in_use = 4;
1497 if (this->total_chunks_in_use() != 0) {
1498 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->total_chunks_in_use(), output);
1499 }
1500
1501 // int64 total_chunks_in_bin = 5;
1502 if (this->total_chunks_in_bin() != 0) {
1503 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(5, this->total_chunks_in_bin(), output);
1504 }
1505
1506 if (_internal_metadata_.have_unknown_fields()) {
1507 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
1508 _internal_metadata_.unknown_fields(), output);
1509 }
1510 // @@protoc_insertion_point(serialize_end:tensorflow.BinSummary)
1511}
1512
1513::PROTOBUF_NAMESPACE_ID::uint8* BinSummary::InternalSerializeWithCachedSizesToArray(
1514 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
1515 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.BinSummary)
1516 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1517 (void) cached_has_bits;
1518
1519 // int32 bin = 1;
1520 if (this->bin() != 0) {
1521 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->bin(), target);
1522 }
1523
1524 // int64 total_bytes_in_use = 2;
1525 if (this->total_bytes_in_use() != 0) {
1526 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->total_bytes_in_use(), target);
1527 }
1528
1529 // int64 total_bytes_in_bin = 3;
1530 if (this->total_bytes_in_bin() != 0) {
1531 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->total_bytes_in_bin(), target);
1532 }
1533
1534 // int64 total_chunks_in_use = 4;
1535 if (this->total_chunks_in_use() != 0) {
1536 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->total_chunks_in_use(), target);
1537 }
1538
1539 // int64 total_chunks_in_bin = 5;
1540 if (this->total_chunks_in_bin() != 0) {
1541 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->total_chunks_in_bin(), target);
1542 }
1543
1544 if (_internal_metadata_.have_unknown_fields()) {
1545 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
1546 _internal_metadata_.unknown_fields(), target);
1547 }
1548 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.BinSummary)
1549 return target;
1550}
1551
1552size_t BinSummary::ByteSizeLong() const {
1553// @@protoc_insertion_point(message_byte_size_start:tensorflow.BinSummary)
1554 size_t total_size = 0;
1555
1556 if (_internal_metadata_.have_unknown_fields()) {
1557 total_size +=
1558 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
1559 _internal_metadata_.unknown_fields());
1560 }
1561 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1562 // Prevent compiler warnings about cached_has_bits being unused
1563 (void) cached_has_bits;
1564
1565 // int64 total_bytes_in_use = 2;
1566 if (this->total_bytes_in_use() != 0) {
1567 total_size += 1 +
1568 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1569 this->total_bytes_in_use());
1570 }
1571
1572 // int64 total_bytes_in_bin = 3;
1573 if (this->total_bytes_in_bin() != 0) {
1574 total_size += 1 +
1575 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1576 this->total_bytes_in_bin());
1577 }
1578
1579 // int64 total_chunks_in_use = 4;
1580 if (this->total_chunks_in_use() != 0) {
1581 total_size += 1 +
1582 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1583 this->total_chunks_in_use());
1584 }
1585
1586 // int64 total_chunks_in_bin = 5;
1587 if (this->total_chunks_in_bin() != 0) {
1588 total_size += 1 +
1589 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1590 this->total_chunks_in_bin());
1591 }
1592
1593 // int32 bin = 1;
1594 if (this->bin() != 0) {
1595 total_size += 1 +
1596 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
1597 this->bin());
1598 }
1599
1600 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1601 SetCachedSize(cached_size);
1602 return total_size;
1603}
1604
1605void BinSummary::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1606// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.BinSummary)
1607 GOOGLE_DCHECK_NE(&from, this);
1608 const BinSummary* source =
1609 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<BinSummary>(
1610 &from);
1611 if (source == nullptr) {
1612 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.BinSummary)
1613 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1614 } else {
1615 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.BinSummary)
1616 MergeFrom(*source);
1617 }
1618}
1619
1620void BinSummary::MergeFrom(const BinSummary& from) {
1621// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.BinSummary)
1622 GOOGLE_DCHECK_NE(&from, this);
1623 _internal_metadata_.MergeFrom(from._internal_metadata_);
1624 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1625 (void) cached_has_bits;
1626
1627 if (from.total_bytes_in_use() != 0) {
1628 set_total_bytes_in_use(from.total_bytes_in_use());
1629 }
1630 if (from.total_bytes_in_bin() != 0) {
1631 set_total_bytes_in_bin(from.total_bytes_in_bin());
1632 }
1633 if (from.total_chunks_in_use() != 0) {
1634 set_total_chunks_in_use(from.total_chunks_in_use());
1635 }
1636 if (from.total_chunks_in_bin() != 0) {
1637 set_total_chunks_in_bin(from.total_chunks_in_bin());
1638 }
1639 if (from.bin() != 0) {
1640 set_bin(from.bin());
1641 }
1642}
1643
1644void BinSummary::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1645// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.BinSummary)
1646 if (&from == this) return;
1647 Clear();
1648 MergeFrom(from);
1649}
1650
1651void BinSummary::CopyFrom(const BinSummary& from) {
1652// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.BinSummary)
1653 if (&from == this) return;
1654 Clear();
1655 MergeFrom(from);
1656}
1657
1658bool BinSummary::IsInitialized() const {
1659 return true;
1660}
1661
1662void BinSummary::InternalSwap(BinSummary* other) {
1663 using std::swap;
1664 _internal_metadata_.Swap(&other->_internal_metadata_);
1665 swap(total_bytes_in_use_, other->total_bytes_in_use_);
1666 swap(total_bytes_in_bin_, other->total_bytes_in_bin_);
1667 swap(total_chunks_in_use_, other->total_chunks_in_use_);
1668 swap(total_chunks_in_bin_, other->total_chunks_in_bin_);
1669 swap(bin_, other->bin_);
1670}
1671
1672::PROTOBUF_NAMESPACE_ID::Metadata BinSummary::GetMetadata() const {
1673 return GetMetadataStatic();
1674}
1675
1676
1677// ===================================================================
1678
1679void SnapShot::InitAsDefaultInstance() {
1680}
1681class SnapShot::_Internal {
1682 public:
1683};
1684
1685SnapShot::SnapShot()
1686 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
1687 SharedCtor();
1688 // @@protoc_insertion_point(constructor:tensorflow.SnapShot)
1689}
1690SnapShot::SnapShot(const SnapShot& from)
1691 : ::PROTOBUF_NAMESPACE_ID::Message(),
1692 _internal_metadata_(nullptr) {
1693 _internal_metadata_.MergeFrom(from._internal_metadata_);
1694 ::memcpy(&action_count_, &from.action_count_,
1695 static_cast<size_t>(reinterpret_cast<char*>(&size_) -
1696 reinterpret_cast<char*>(&action_count_)) + sizeof(size_));
1697 // @@protoc_insertion_point(copy_constructor:tensorflow.SnapShot)
1698}
1699
1700void SnapShot::SharedCtor() {
1701 ::memset(&action_count_, 0, static_cast<size_t>(
1702 reinterpret_cast<char*>(&size_) -
1703 reinterpret_cast<char*>(&action_count_)) + sizeof(size_));
1704}
1705
1706SnapShot::~SnapShot() {
1707 // @@protoc_insertion_point(destructor:tensorflow.SnapShot)
1708 SharedDtor();
1709}
1710
1711void SnapShot::SharedDtor() {
1712}
1713
1714void SnapShot::SetCachedSize(int size) const {
1715 _cached_size_.Set(size);
1716}
1717const SnapShot& SnapShot::default_instance() {
1718 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SnapShot_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base);
1719 return *internal_default_instance();
1720}
1721
1722
1723void SnapShot::Clear() {
1724// @@protoc_insertion_point(message_clear_start:tensorflow.SnapShot)
1725 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1726 // Prevent compiler warnings about cached_has_bits being unused
1727 (void) cached_has_bits;
1728
1729 ::memset(&action_count_, 0, static_cast<size_t>(
1730 reinterpret_cast<char*>(&size_) -
1731 reinterpret_cast<char*>(&action_count_)) + sizeof(size_));
1732 _internal_metadata_.Clear();
1733}
1734
1735#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1736const char* SnapShot::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
1737#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1738 while (!ctx->Done(&ptr)) {
1739 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1740 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
1741 CHK_(ptr);
1742 switch (tag >> 3) {
1743 // uint64 action_count = 1;
1744 case 1:
1745 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
1746 action_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1747 CHK_(ptr);
1748 } else goto handle_unusual;
1749 continue;
1750 // int64 size = 2;
1751 case 2:
1752 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
1753 size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
1754 CHK_(ptr);
1755 } else goto handle_unusual;
1756 continue;
1757 default: {
1758 handle_unusual:
1759 if ((tag & 7) == 4 || tag == 0) {
1760 ctx->SetLastTag(tag);
1761 goto success;
1762 }
1763 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
1764 CHK_(ptr != nullptr);
1765 continue;
1766 }
1767 } // switch
1768 } // while
1769success:
1770 return ptr;
1771failure:
1772 ptr = nullptr;
1773 goto success;
1774#undef CHK_
1775}
1776#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1777bool SnapShot::MergePartialFromCodedStream(
1778 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
1779#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
1780 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
1781 // @@protoc_insertion_point(parse_start:tensorflow.SnapShot)
1782 for (;;) {
1783 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1784 tag = p.first;
1785 if (!p.second) goto handle_unusual;
1786 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1787 // uint64 action_count = 1;
1788 case 1: {
1789 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
1790
1791 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1792 ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>(
1793 input, &action_count_)));
1794 } else {
1795 goto handle_unusual;
1796 }
1797 break;
1798 }
1799
1800 // int64 size = 2;
1801 case 2: {
1802 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) {
1803
1804 DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
1805 ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>(
1806 input, &size_)));
1807 } else {
1808 goto handle_unusual;
1809 }
1810 break;
1811 }
1812
1813 default: {
1814 handle_unusual:
1815 if (tag == 0) {
1816 goto success;
1817 }
1818 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
1819 input, tag, _internal_metadata_.mutable_unknown_fields()));
1820 break;
1821 }
1822 }
1823 }
1824success:
1825 // @@protoc_insertion_point(parse_success:tensorflow.SnapShot)
1826 return true;
1827failure:
1828 // @@protoc_insertion_point(parse_failure:tensorflow.SnapShot)
1829 return false;
1830#undef DO_
1831}
1832#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
1833
1834void SnapShot::SerializeWithCachedSizes(
1835 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
1836 // @@protoc_insertion_point(serialize_start:tensorflow.SnapShot)
1837 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1838 (void) cached_has_bits;
1839
1840 // uint64 action_count = 1;
1841 if (this->action_count() != 0) {
1842 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(1, this->action_count(), output);
1843 }
1844
1845 // int64 size = 2;
1846 if (this->size() != 0) {
1847 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->size(), output);
1848 }
1849
1850 if (_internal_metadata_.have_unknown_fields()) {
1851 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
1852 _internal_metadata_.unknown_fields(), output);
1853 }
1854 // @@protoc_insertion_point(serialize_end:tensorflow.SnapShot)
1855}
1856
1857::PROTOBUF_NAMESPACE_ID::uint8* SnapShot::InternalSerializeWithCachedSizesToArray(
1858 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
1859 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SnapShot)
1860 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1861 (void) cached_has_bits;
1862
1863 // uint64 action_count = 1;
1864 if (this->action_count() != 0) {
1865 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->action_count(), target);
1866 }
1867
1868 // int64 size = 2;
1869 if (this->size() != 0) {
1870 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->size(), target);
1871 }
1872
1873 if (_internal_metadata_.have_unknown_fields()) {
1874 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
1875 _internal_metadata_.unknown_fields(), target);
1876 }
1877 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SnapShot)
1878 return target;
1879}
1880
1881size_t SnapShot::ByteSizeLong() const {
1882// @@protoc_insertion_point(message_byte_size_start:tensorflow.SnapShot)
1883 size_t total_size = 0;
1884
1885 if (_internal_metadata_.have_unknown_fields()) {
1886 total_size +=
1887 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
1888 _internal_metadata_.unknown_fields());
1889 }
1890 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1891 // Prevent compiler warnings about cached_has_bits being unused
1892 (void) cached_has_bits;
1893
1894 // uint64 action_count = 1;
1895 if (this->action_count() != 0) {
1896 total_size += 1 +
1897 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
1898 this->action_count());
1899 }
1900
1901 // int64 size = 2;
1902 if (this->size() != 0) {
1903 total_size += 1 +
1904 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
1905 this->size());
1906 }
1907
1908 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
1909 SetCachedSize(cached_size);
1910 return total_size;
1911}
1912
1913void SnapShot::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1914// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SnapShot)
1915 GOOGLE_DCHECK_NE(&from, this);
1916 const SnapShot* source =
1917 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SnapShot>(
1918 &from);
1919 if (source == nullptr) {
1920 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SnapShot)
1921 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
1922 } else {
1923 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SnapShot)
1924 MergeFrom(*source);
1925 }
1926}
1927
1928void SnapShot::MergeFrom(const SnapShot& from) {
1929// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SnapShot)
1930 GOOGLE_DCHECK_NE(&from, this);
1931 _internal_metadata_.MergeFrom(from._internal_metadata_);
1932 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1933 (void) cached_has_bits;
1934
1935 if (from.action_count() != 0) {
1936 set_action_count(from.action_count());
1937 }
1938 if (from.size() != 0) {
1939 set_size(from.size());
1940 }
1941}
1942
1943void SnapShot::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
1944// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SnapShot)
1945 if (&from == this) return;
1946 Clear();
1947 MergeFrom(from);
1948}
1949
1950void SnapShot::CopyFrom(const SnapShot& from) {
1951// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SnapShot)
1952 if (&from == this) return;
1953 Clear();
1954 MergeFrom(from);
1955}
1956
1957bool SnapShot::IsInitialized() const {
1958 return true;
1959}
1960
1961void SnapShot::InternalSwap(SnapShot* other) {
1962 using std::swap;
1963 _internal_metadata_.Swap(&other->_internal_metadata_);
1964 swap(action_count_, other->action_count_);
1965 swap(size_, other->size_);
1966}
1967
1968::PROTOBUF_NAMESPACE_ID::Metadata SnapShot::GetMetadata() const {
1969 return GetMetadataStatic();
1970}
1971
1972
1973// ===================================================================
1974
1975void MemoryDump::InitAsDefaultInstance() {
1976 ::tensorflow::_MemoryDump_default_instance_._instance.get_mutable()->stats_ = const_cast< ::tensorflow::MemAllocatorStats*>(
1977 ::tensorflow::MemAllocatorStats::internal_default_instance());
1978}
1979class MemoryDump::_Internal {
1980 public:
1981 static const ::tensorflow::MemAllocatorStats& stats(const MemoryDump* msg);
1982};
1983
1984const ::tensorflow::MemAllocatorStats&
1985MemoryDump::_Internal::stats(const MemoryDump* msg) {
1986 return *msg->stats_;
1987}
1988MemoryDump::MemoryDump()
1989 : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
1990 SharedCtor();
1991 // @@protoc_insertion_point(constructor:tensorflow.MemoryDump)
1992}
1993MemoryDump::MemoryDump(const MemoryDump& from)
1994 : ::PROTOBUF_NAMESPACE_ID::Message(),
1995 _internal_metadata_(nullptr),
1996 bin_summary_(from.bin_summary_),
1997 chunk_(from.chunk_),
1998 snap_shot_(from.snap_shot_) {
1999 _internal_metadata_.MergeFrom(from._internal_metadata_);
2000 allocator_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
2001 if (!from.allocator_name().empty()) {
2002 allocator_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.allocator_name_);
2003 }
2004 if (from.has_stats()) {
2005 stats_ = new ::tensorflow::MemAllocatorStats(*from.stats_);
2006 } else {
2007 stats_ = nullptr;
2008 }
2009 // @@protoc_insertion_point(copy_constructor:tensorflow.MemoryDump)
2010}
2011
2012void MemoryDump::SharedCtor() {
2013 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_MemoryDump_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base);
2014 allocator_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
2015 stats_ = nullptr;
2016}
2017
2018MemoryDump::~MemoryDump() {
2019 // @@protoc_insertion_point(destructor:tensorflow.MemoryDump)
2020 SharedDtor();
2021}
2022
2023void MemoryDump::SharedDtor() {
2024 allocator_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
2025 if (this != internal_default_instance()) delete stats_;
2026}
2027
2028void MemoryDump::SetCachedSize(int size) const {
2029 _cached_size_.Set(size);
2030}
2031const MemoryDump& MemoryDump::default_instance() {
2032 ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_MemoryDump_tensorflow_2fcore_2fprotobuf_2fbfc_5fmemory_5fmap_2eproto.base);
2033 return *internal_default_instance();
2034}
2035
2036
2037void MemoryDump::Clear() {
2038// @@protoc_insertion_point(message_clear_start:tensorflow.MemoryDump)
2039 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2040 // Prevent compiler warnings about cached_has_bits being unused
2041 (void) cached_has_bits;
2042
2043 bin_summary_.Clear();
2044 chunk_.Clear();
2045 snap_shot_.Clear();
2046 allocator_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
2047 if (GetArenaNoVirtual() == nullptr && stats_ != nullptr) {
2048 delete stats_;
2049 }
2050 stats_ = nullptr;
2051 _internal_metadata_.Clear();
2052}
2053
2054#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2055const char* MemoryDump::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
2056#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2057 while (!ctx->Done(&ptr)) {
2058 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
2059 ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
2060 CHK_(ptr);
2061 switch (tag >> 3) {
2062 // string allocator_name = 1;
2063 case 1:
2064 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
2065 ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_allocator_name(), ptr, ctx, "tensorflow.MemoryDump.allocator_name");
2066 CHK_(ptr);
2067 } else goto handle_unusual;
2068 continue;
2069 // repeated .tensorflow.BinSummary bin_summary = 2;
2070 case 2:
2071 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
2072 ptr -= 1;
2073 do {
2074 ptr += 1;
2075 ptr = ctx->ParseMessage(add_bin_summary(), ptr);
2076 CHK_(ptr);
2077 if (!ctx->DataAvailable(ptr)) break;
2078 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18);
2079 } else goto handle_unusual;
2080 continue;
2081 // repeated .tensorflow.MemChunk chunk = 3;
2082 case 3:
2083 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
2084 ptr -= 1;
2085 do {
2086 ptr += 1;
2087 ptr = ctx->ParseMessage(add_chunk(), ptr);
2088 CHK_(ptr);
2089 if (!ctx->DataAvailable(ptr)) break;
2090 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
2091 } else goto handle_unusual;
2092 continue;
2093 // repeated .tensorflow.SnapShot snap_shot = 4;
2094 case 4:
2095 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
2096 ptr -= 1;
2097 do {
2098 ptr += 1;
2099 ptr = ctx->ParseMessage(add_snap_shot(), ptr);
2100 CHK_(ptr);
2101 if (!ctx->DataAvailable(ptr)) break;
2102 } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34);
2103 } else goto handle_unusual;
2104 continue;
2105 // .tensorflow.MemAllocatorStats stats = 5;
2106 case 5:
2107 if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
2108 ptr = ctx->ParseMessage(mutable_stats(), ptr);
2109 CHK_(ptr);
2110 } else goto handle_unusual;
2111 continue;
2112 default: {
2113 handle_unusual:
2114 if ((tag & 7) == 4 || tag == 0) {
2115 ctx->SetLastTag(tag);
2116 goto success;
2117 }
2118 ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
2119 CHK_(ptr != nullptr);
2120 continue;
2121 }
2122 } // switch
2123 } // while
2124success:
2125 return ptr;
2126failure:
2127 ptr = nullptr;
2128 goto success;
2129#undef CHK_
2130}
2131#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2132bool MemoryDump::MergePartialFromCodedStream(
2133 ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
2134#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
2135 ::PROTOBUF_NAMESPACE_ID::uint32 tag;
2136 // @@protoc_insertion_point(parse_start:tensorflow.MemoryDump)
2137 for (;;) {
2138 ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
2139 tag = p.first;
2140 if (!p.second) goto handle_unusual;
2141 switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2142 // string allocator_name = 1;
2143 case 1: {
2144 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) {
2145 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
2146 input, this->mutable_allocator_name()));
2147 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2148 this->allocator_name().data(), static_cast<int>(this->allocator_name().length()),
2149 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
2150 "tensorflow.MemoryDump.allocator_name"));
2151 } else {
2152 goto handle_unusual;
2153 }
2154 break;
2155 }
2156
2157 // repeated .tensorflow.BinSummary bin_summary = 2;
2158 case 2: {
2159 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
2160 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
2161 input, add_bin_summary()));
2162 } else {
2163 goto handle_unusual;
2164 }
2165 break;
2166 }
2167
2168 // repeated .tensorflow.MemChunk chunk = 3;
2169 case 3: {
2170 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
2171 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
2172 input, add_chunk()));
2173 } else {
2174 goto handle_unusual;
2175 }
2176 break;
2177 }
2178
2179 // repeated .tensorflow.SnapShot snap_shot = 4;
2180 case 4: {
2181 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) {
2182 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
2183 input, add_snap_shot()));
2184 } else {
2185 goto handle_unusual;
2186 }
2187 break;
2188 }
2189
2190 // .tensorflow.MemAllocatorStats stats = 5;
2191 case 5: {
2192 if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) {
2193 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
2194 input, mutable_stats()));
2195 } else {
2196 goto handle_unusual;
2197 }
2198 break;
2199 }
2200
2201 default: {
2202 handle_unusual:
2203 if (tag == 0) {
2204 goto success;
2205 }
2206 DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
2207 input, tag, _internal_metadata_.mutable_unknown_fields()));
2208 break;
2209 }
2210 }
2211 }
2212success:
2213 // @@protoc_insertion_point(parse_success:tensorflow.MemoryDump)
2214 return true;
2215failure:
2216 // @@protoc_insertion_point(parse_failure:tensorflow.MemoryDump)
2217 return false;
2218#undef DO_
2219}
2220#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
2221
2222void MemoryDump::SerializeWithCachedSizes(
2223 ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
2224 // @@protoc_insertion_point(serialize_start:tensorflow.MemoryDump)
2225 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2226 (void) cached_has_bits;
2227
2228 // string allocator_name = 1;
2229 if (this->allocator_name().size() > 0) {
2230 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2231 this->allocator_name().data(), static_cast<int>(this->allocator_name().length()),
2232 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2233 "tensorflow.MemoryDump.allocator_name");
2234 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
2235 1, this->allocator_name(), output);
2236 }
2237
2238 // repeated .tensorflow.BinSummary bin_summary = 2;
2239 for (unsigned int i = 0,
2240 n = static_cast<unsigned int>(this->bin_summary_size()); i < n; i++) {
2241 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2242 2,
2243 this->bin_summary(static_cast<int>(i)),
2244 output);
2245 }
2246
2247 // repeated .tensorflow.MemChunk chunk = 3;
2248 for (unsigned int i = 0,
2249 n = static_cast<unsigned int>(this->chunk_size()); i < n; i++) {
2250 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2251 3,
2252 this->chunk(static_cast<int>(i)),
2253 output);
2254 }
2255
2256 // repeated .tensorflow.SnapShot snap_shot = 4;
2257 for (unsigned int i = 0,
2258 n = static_cast<unsigned int>(this->snap_shot_size()); i < n; i++) {
2259 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2260 4,
2261 this->snap_shot(static_cast<int>(i)),
2262 output);
2263 }
2264
2265 // .tensorflow.MemAllocatorStats stats = 5;
2266 if (this->has_stats()) {
2267 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
2268 5, _Internal::stats(this), output);
2269 }
2270
2271 if (_internal_metadata_.have_unknown_fields()) {
2272 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
2273 _internal_metadata_.unknown_fields(), output);
2274 }
2275 // @@protoc_insertion_point(serialize_end:tensorflow.MemoryDump)
2276}
2277
2278::PROTOBUF_NAMESPACE_ID::uint8* MemoryDump::InternalSerializeWithCachedSizesToArray(
2279 ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
2280 // @@protoc_insertion_point(serialize_to_array_start:tensorflow.MemoryDump)
2281 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2282 (void) cached_has_bits;
2283
2284 // string allocator_name = 1;
2285 if (this->allocator_name().size() > 0) {
2286 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
2287 this->allocator_name().data(), static_cast<int>(this->allocator_name().length()),
2288 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
2289 "tensorflow.MemoryDump.allocator_name");
2290 target =
2291 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
2292 1, this->allocator_name(), target);
2293 }
2294
2295 // repeated .tensorflow.BinSummary bin_summary = 2;
2296 for (unsigned int i = 0,
2297 n = static_cast<unsigned int>(this->bin_summary_size()); i < n; i++) {
2298 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2299 InternalWriteMessageToArray(
2300 2, this->bin_summary(static_cast<int>(i)), target);
2301 }
2302
2303 // repeated .tensorflow.MemChunk chunk = 3;
2304 for (unsigned int i = 0,
2305 n = static_cast<unsigned int>(this->chunk_size()); i < n; i++) {
2306 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2307 InternalWriteMessageToArray(
2308 3, this->chunk(static_cast<int>(i)), target);
2309 }
2310
2311 // repeated .tensorflow.SnapShot snap_shot = 4;
2312 for (unsigned int i = 0,
2313 n = static_cast<unsigned int>(this->snap_shot_size()); i < n; i++) {
2314 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2315 InternalWriteMessageToArray(
2316 4, this->snap_shot(static_cast<int>(i)), target);
2317 }
2318
2319 // .tensorflow.MemAllocatorStats stats = 5;
2320 if (this->has_stats()) {
2321 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2322 InternalWriteMessageToArray(
2323 5, _Internal::stats(this), target);
2324 }
2325
2326 if (_internal_metadata_.have_unknown_fields()) {
2327 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
2328 _internal_metadata_.unknown_fields(), target);
2329 }
2330 // @@protoc_insertion_point(serialize_to_array_end:tensorflow.MemoryDump)
2331 return target;
2332}
2333
2334size_t MemoryDump::ByteSizeLong() const {
2335// @@protoc_insertion_point(message_byte_size_start:tensorflow.MemoryDump)
2336 size_t total_size = 0;
2337
2338 if (_internal_metadata_.have_unknown_fields()) {
2339 total_size +=
2340 ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
2341 _internal_metadata_.unknown_fields());
2342 }
2343 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2344 // Prevent compiler warnings about cached_has_bits being unused
2345 (void) cached_has_bits;
2346
2347 // repeated .tensorflow.BinSummary bin_summary = 2;
2348 {
2349 unsigned int count = static_cast<unsigned int>(this->bin_summary_size());
2350 total_size += 1UL * count;
2351 for (unsigned int i = 0; i < count; i++) {
2352 total_size +=
2353 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2354 this->bin_summary(static_cast<int>(i)));
2355 }
2356 }
2357
2358 // repeated .tensorflow.MemChunk chunk = 3;
2359 {
2360 unsigned int count = static_cast<unsigned int>(this->chunk_size());
2361 total_size += 1UL * count;
2362 for (unsigned int i = 0; i < count; i++) {
2363 total_size +=
2364 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2365 this->chunk(static_cast<int>(i)));
2366 }
2367 }
2368
2369 // repeated .tensorflow.SnapShot snap_shot = 4;
2370 {
2371 unsigned int count = static_cast<unsigned int>(this->snap_shot_size());
2372 total_size += 1UL * count;
2373 for (unsigned int i = 0; i < count; i++) {
2374 total_size +=
2375 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2376 this->snap_shot(static_cast<int>(i)));
2377 }
2378 }
2379
2380 // string allocator_name = 1;
2381 if (this->allocator_name().size() > 0) {
2382 total_size += 1 +
2383 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
2384 this->allocator_name());
2385 }
2386
2387 // .tensorflow.MemAllocatorStats stats = 5;
2388 if (this->has_stats()) {
2389 total_size += 1 +
2390 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2391 *stats_);
2392 }
2393
2394 int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
2395 SetCachedSize(cached_size);
2396 return total_size;
2397}
2398
2399void MemoryDump::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2400// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.MemoryDump)
2401 GOOGLE_DCHECK_NE(&from, this);
2402 const MemoryDump* source =
2403 ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<MemoryDump>(
2404 &from);
2405 if (source == nullptr) {
2406 // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.MemoryDump)
2407 ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
2408 } else {
2409 // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.MemoryDump)
2410 MergeFrom(*source);
2411 }
2412}
2413
2414void MemoryDump::MergeFrom(const MemoryDump& from) {
2415// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.MemoryDump)
2416 GOOGLE_DCHECK_NE(&from, this);
2417 _internal_metadata_.MergeFrom(from._internal_metadata_);
2418 ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
2419 (void) cached_has_bits;
2420
2421 bin_summary_.MergeFrom(from.bin_summary_);
2422 chunk_.MergeFrom(from.chunk_);
2423 snap_shot_.MergeFrom(from.snap_shot_);
2424 if (from.allocator_name().size() > 0) {
2425
2426 allocator_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.allocator_name_);
2427 }
2428 if (from.has_stats()) {
2429 mutable_stats()->::tensorflow::MemAllocatorStats::MergeFrom(from.stats());
2430 }
2431}
2432
2433void MemoryDump::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
2434// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.MemoryDump)
2435 if (&from == this) return;
2436 Clear();
2437 MergeFrom(from);
2438}
2439
2440void MemoryDump::CopyFrom(const MemoryDump& from) {
2441// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.MemoryDump)
2442 if (&from == this) return;
2443 Clear();
2444 MergeFrom(from);
2445}
2446
2447bool MemoryDump::IsInitialized() const {
2448 return true;
2449}
2450
2451void MemoryDump::InternalSwap(MemoryDump* other) {
2452 using std::swap;
2453 _internal_metadata_.Swap(&other->_internal_metadata_);
2454 CastToBase(&bin_summary_)->InternalSwap(CastToBase(&other->bin_summary_));
2455 CastToBase(&chunk_)->InternalSwap(CastToBase(&other->chunk_));
2456 CastToBase(&snap_shot_)->InternalSwap(CastToBase(&other->snap_shot_));
2457 allocator_name_.Swap(&other->allocator_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
2458 GetArenaNoVirtual());
2459 swap(stats_, other->stats_);
2460}
2461
2462::PROTOBUF_NAMESPACE_ID::Metadata MemoryDump::GetMetadata() const {
2463 return GetMetadataStatic();
2464}
2465
2466
2467// @@protoc_insertion_point(namespace_scope)
2468} // namespace tensorflow
2469PROTOBUF_NAMESPACE_OPEN
2470template<> PROTOBUF_NOINLINE ::tensorflow::MemAllocatorStats* Arena::CreateMaybeMessage< ::tensorflow::MemAllocatorStats >(Arena* arena) {
2471 return Arena::CreateInternal< ::tensorflow::MemAllocatorStats >(arena);
2472}
2473template<> PROTOBUF_NOINLINE ::tensorflow::MemChunk* Arena::CreateMaybeMessage< ::tensorflow::MemChunk >(Arena* arena) {
2474 return Arena::CreateInternal< ::tensorflow::MemChunk >(arena);
2475}
2476template<> PROTOBUF_NOINLINE ::tensorflow::BinSummary* Arena::CreateMaybeMessage< ::tensorflow::BinSummary >(Arena* arena) {
2477 return Arena::CreateInternal< ::tensorflow::BinSummary >(arena);
2478}
2479template<> PROTOBUF_NOINLINE ::tensorflow::SnapShot* Arena::CreateMaybeMessage< ::tensorflow::SnapShot >(Arena* arena) {
2480 return Arena::CreateInternal< ::tensorflow::SnapShot >(arena);
2481}
2482template<> PROTOBUF_NOINLINE ::tensorflow::MemoryDump* Arena::CreateMaybeMessage< ::tensorflow::MemoryDump >(Arena* arena) {
2483 return Arena::CreateInternal< ::tensorflow::MemoryDump >(arena);
2484}
2485PROTOBUF_NAMESPACE_CLOSE
2486
2487// @@protoc_insertion_point(global_scope)
2488#include <google/protobuf/port_undef.inc>
2489