1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/profiler/tfprof_log.proto |
3 | |
4 | #include "tensorflow/core/profiler/tfprof_log.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> |
18 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fstep_5fstats_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_AllocationRecord_tensorflow_2fcore_2fframework_2fstep_5fstats_2eproto; |
19 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fattr_5fvalue_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_AttrValue_tensorflow_2fcore_2fframework_2fattr_5fvalue_2eproto; |
20 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CodeDef_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
21 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CodeDef_Trace_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
22 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExecMemory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
23 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExecMemory_OutputMemoryEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
24 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_ExecProfile_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
25 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExecProfile_AcceleratorExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
26 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExecProfile_CpuExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
27 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExecTime_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
28 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Memory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
29 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_OpLogEntry_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
30 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_OpLogProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
31 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<8> scc_info_ProfileNode_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
32 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ProfileNode_AttrsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
33 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ProfileNode_ExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
34 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ProfileNode_InputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
35 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfileNode_InputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
36 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ProfileNode_OutputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
37 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfileNode_OutputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
38 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfileNode_SrcOutputIndexEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
39 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfileProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
40 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ProfileProto_NodesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
41 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Tuple_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto; |
42 | namespace tensorflow { |
43 | namespace tfprof { |
44 | class CodeDef_TraceDefaultTypeInternal { |
45 | public: |
46 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CodeDef_Trace> _instance; |
47 | } _CodeDef_Trace_default_instance_; |
48 | class CodeDefDefaultTypeInternal { |
49 | public: |
50 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CodeDef> _instance; |
51 | } _CodeDef_default_instance_; |
52 | class OpLogEntryDefaultTypeInternal { |
53 | public: |
54 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<OpLogEntry> _instance; |
55 | } _OpLogEntry_default_instance_; |
56 | class OpLogProto_IdToStringEntry_DoNotUseDefaultTypeInternal { |
57 | public: |
58 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<OpLogProto_IdToStringEntry_DoNotUse> _instance; |
59 | } _OpLogProto_IdToStringEntry_DoNotUse_default_instance_; |
60 | class OpLogProtoDefaultTypeInternal { |
61 | public: |
62 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<OpLogProto> _instance; |
63 | } _OpLogProto_default_instance_; |
64 | class ProfileProto_NodesEntry_DoNotUseDefaultTypeInternal { |
65 | public: |
66 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfileProto_NodesEntry_DoNotUse> _instance; |
67 | } _ProfileProto_NodesEntry_DoNotUse_default_instance_; |
68 | class ProfileProto_IdToStringEntry_DoNotUseDefaultTypeInternal { |
69 | public: |
70 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfileProto_IdToStringEntry_DoNotUse> _instance; |
71 | } _ProfileProto_IdToStringEntry_DoNotUse_default_instance_; |
72 | class ProfileProtoDefaultTypeInternal { |
73 | public: |
74 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfileProto> _instance; |
75 | } _ProfileProto_default_instance_; |
76 | class ProfileNode_InputsEntry_DoNotUseDefaultTypeInternal { |
77 | public: |
78 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfileNode_InputsEntry_DoNotUse> _instance; |
79 | } _ProfileNode_InputsEntry_DoNotUse_default_instance_; |
80 | class ProfileNode_InputShapesEntry_DoNotUseDefaultTypeInternal { |
81 | public: |
82 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfileNode_InputShapesEntry_DoNotUse> _instance; |
83 | } _ProfileNode_InputShapesEntry_DoNotUse_default_instance_; |
84 | class ProfileNode_OutputsEntry_DoNotUseDefaultTypeInternal { |
85 | public: |
86 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfileNode_OutputsEntry_DoNotUse> _instance; |
87 | } _ProfileNode_OutputsEntry_DoNotUse_default_instance_; |
88 | class ProfileNode_OutputShapesEntry_DoNotUseDefaultTypeInternal { |
89 | public: |
90 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfileNode_OutputShapesEntry_DoNotUse> _instance; |
91 | } _ProfileNode_OutputShapesEntry_DoNotUse_default_instance_; |
92 | class ProfileNode_SrcOutputIndexEntry_DoNotUseDefaultTypeInternal { |
93 | public: |
94 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfileNode_SrcOutputIndexEntry_DoNotUse> _instance; |
95 | } _ProfileNode_SrcOutputIndexEntry_DoNotUse_default_instance_; |
96 | class ProfileNode_AttrsEntry_DoNotUseDefaultTypeInternal { |
97 | public: |
98 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfileNode_AttrsEntry_DoNotUse> _instance; |
99 | } _ProfileNode_AttrsEntry_DoNotUse_default_instance_; |
100 | class ProfileNode_ExecsEntry_DoNotUseDefaultTypeInternal { |
101 | public: |
102 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfileNode_ExecsEntry_DoNotUse> _instance; |
103 | } _ProfileNode_ExecsEntry_DoNotUse_default_instance_; |
104 | class ProfileNodeDefaultTypeInternal { |
105 | public: |
106 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ProfileNode> _instance; |
107 | } _ProfileNode_default_instance_; |
108 | class ExecProfile_AcceleratorExecsEntry_DoNotUseDefaultTypeInternal { |
109 | public: |
110 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ExecProfile_AcceleratorExecsEntry_DoNotUse> _instance; |
111 | } _ExecProfile_AcceleratorExecsEntry_DoNotUse_default_instance_; |
112 | class ExecProfile_CpuExecsEntry_DoNotUseDefaultTypeInternal { |
113 | public: |
114 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ExecProfile_CpuExecsEntry_DoNotUse> _instance; |
115 | } _ExecProfile_CpuExecsEntry_DoNotUse_default_instance_; |
116 | class ExecProfileDefaultTypeInternal { |
117 | public: |
118 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ExecProfile> _instance; |
119 | } _ExecProfile_default_instance_; |
120 | class ExecTimeDefaultTypeInternal { |
121 | public: |
122 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ExecTime> _instance; |
123 | } _ExecTime_default_instance_; |
124 | class ExecMemory_OutputMemoryEntry_DoNotUseDefaultTypeInternal { |
125 | public: |
126 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ExecMemory_OutputMemoryEntry_DoNotUse> _instance; |
127 | } _ExecMemory_OutputMemoryEntry_DoNotUse_default_instance_; |
128 | class ExecMemoryDefaultTypeInternal { |
129 | public: |
130 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ExecMemory> _instance; |
131 | } _ExecMemory_default_instance_; |
132 | class TupleDefaultTypeInternal { |
133 | public: |
134 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Tuple> _instance; |
135 | } _Tuple_default_instance_; |
136 | class MemoryDefaultTypeInternal { |
137 | public: |
138 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Memory> _instance; |
139 | } _Memory_default_instance_; |
140 | } // namespace tfprof |
141 | } // namespace tensorflow |
142 | static void InitDefaultsscc_info_CodeDef_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
143 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
144 | |
145 | { |
146 | void* ptr = &::tensorflow::tfprof::_CodeDef_default_instance_; |
147 | new (ptr) ::tensorflow::tfprof::CodeDef(); |
148 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
149 | } |
150 | ::tensorflow::tfprof::CodeDef::InitAsDefaultInstance(); |
151 | } |
152 | |
153 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CodeDef_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
154 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_CodeDef_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
155 | &scc_info_CodeDef_Trace_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
156 | |
157 | static void InitDefaultsscc_info_CodeDef_Trace_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
158 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
159 | |
160 | { |
161 | void* ptr = &::tensorflow::tfprof::_CodeDef_Trace_default_instance_; |
162 | new (ptr) ::tensorflow::tfprof::CodeDef_Trace(); |
163 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
164 | } |
165 | ::tensorflow::tfprof::CodeDef_Trace::InitAsDefaultInstance(); |
166 | } |
167 | |
168 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CodeDef_Trace_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
169 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_CodeDef_Trace_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, {}}; |
170 | |
171 | static void InitDefaultsscc_info_ExecMemory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
172 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
173 | |
174 | { |
175 | void* ptr = &::tensorflow::tfprof::_ExecMemory_default_instance_; |
176 | new (ptr) ::tensorflow::tfprof::ExecMemory(); |
177 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
178 | } |
179 | ::tensorflow::tfprof::ExecMemory::InitAsDefaultInstance(); |
180 | } |
181 | |
182 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExecMemory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
183 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ExecMemory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
184 | &scc_info_ExecMemory_OutputMemoryEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
185 | |
186 | static void InitDefaultsscc_info_ExecMemory_OutputMemoryEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
187 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
188 | |
189 | { |
190 | void* ptr = &::tensorflow::tfprof::_ExecMemory_OutputMemoryEntry_DoNotUse_default_instance_; |
191 | new (ptr) ::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse(); |
192 | } |
193 | ::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse::InitAsDefaultInstance(); |
194 | } |
195 | |
196 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExecMemory_OutputMemoryEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
197 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ExecMemory_OutputMemoryEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
198 | &scc_info_Memory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
199 | |
200 | static void InitDefaultsscc_info_ExecProfile_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
201 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
202 | |
203 | { |
204 | void* ptr = &::tensorflow::tfprof::_ExecProfile_default_instance_; |
205 | new (ptr) ::tensorflow::tfprof::ExecProfile(); |
206 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
207 | } |
208 | ::tensorflow::tfprof::ExecProfile::InitAsDefaultInstance(); |
209 | } |
210 | |
211 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<4> scc_info_ExecProfile_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
212 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 4, InitDefaultsscc_info_ExecProfile_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
213 | &scc_info_ExecProfile_AcceleratorExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
214 | &scc_info_ExecProfile_CpuExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
215 | &scc_info_ExecMemory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
216 | &scc_info_AllocationRecord_tensorflow_2fcore_2fframework_2fstep_5fstats_2eproto.base,}}; |
217 | |
218 | static void InitDefaultsscc_info_ExecProfile_AcceleratorExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
219 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
220 | |
221 | { |
222 | void* ptr = &::tensorflow::tfprof::_ExecProfile_AcceleratorExecsEntry_DoNotUse_default_instance_; |
223 | new (ptr) ::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse(); |
224 | } |
225 | ::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse::InitAsDefaultInstance(); |
226 | } |
227 | |
228 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExecProfile_AcceleratorExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
229 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ExecProfile_AcceleratorExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
230 | &scc_info_ExecTime_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
231 | |
232 | static void InitDefaultsscc_info_ExecProfile_CpuExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
233 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
234 | |
235 | { |
236 | void* ptr = &::tensorflow::tfprof::_ExecProfile_CpuExecsEntry_DoNotUse_default_instance_; |
237 | new (ptr) ::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse(); |
238 | } |
239 | ::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse::InitAsDefaultInstance(); |
240 | } |
241 | |
242 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExecProfile_CpuExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
243 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ExecProfile_CpuExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
244 | &scc_info_ExecTime_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
245 | |
246 | static void InitDefaultsscc_info_ExecTime_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
247 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
248 | |
249 | { |
250 | void* ptr = &::tensorflow::tfprof::_ExecTime_default_instance_; |
251 | new (ptr) ::tensorflow::tfprof::ExecTime(); |
252 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
253 | } |
254 | ::tensorflow::tfprof::ExecTime::InitAsDefaultInstance(); |
255 | } |
256 | |
257 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ExecTime_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
258 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ExecTime_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
259 | &scc_info_Tuple_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
260 | |
261 | static void InitDefaultsscc_info_Memory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
262 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
263 | |
264 | { |
265 | void* ptr = &::tensorflow::tfprof::_Memory_default_instance_; |
266 | new (ptr) ::tensorflow::tfprof::Memory(); |
267 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
268 | } |
269 | ::tensorflow::tfprof::Memory::InitAsDefaultInstance(); |
270 | } |
271 | |
272 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Memory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
273 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Memory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, {}}; |
274 | |
275 | static void InitDefaultsscc_info_OpLogEntry_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
276 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
277 | |
278 | { |
279 | void* ptr = &::tensorflow::tfprof::_OpLogEntry_default_instance_; |
280 | new (ptr) ::tensorflow::tfprof::OpLogEntry(); |
281 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
282 | } |
283 | ::tensorflow::tfprof::OpLogEntry::InitAsDefaultInstance(); |
284 | } |
285 | |
286 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_OpLogEntry_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
287 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_OpLogEntry_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
288 | &scc_info_CodeDef_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
289 | |
290 | static void InitDefaultsscc_info_OpLogProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
291 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
292 | |
293 | { |
294 | void* ptr = &::tensorflow::tfprof::_OpLogProto_default_instance_; |
295 | new (ptr) ::tensorflow::tfprof::OpLogProto(); |
296 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
297 | } |
298 | ::tensorflow::tfprof::OpLogProto::InitAsDefaultInstance(); |
299 | } |
300 | |
301 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_OpLogProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
302 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_OpLogProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
303 | &scc_info_OpLogEntry_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
304 | &scc_info_OpLogProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
305 | |
306 | static void InitDefaultsscc_info_OpLogProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
307 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
308 | |
309 | { |
310 | void* ptr = &::tensorflow::tfprof::_OpLogProto_IdToStringEntry_DoNotUse_default_instance_; |
311 | new (ptr) ::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse(); |
312 | } |
313 | ::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse::InitAsDefaultInstance(); |
314 | } |
315 | |
316 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_OpLogProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
317 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_OpLogProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, {}}; |
318 | |
319 | static void InitDefaultsscc_info_ProfileNode_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
320 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
321 | |
322 | { |
323 | void* ptr = &::tensorflow::tfprof::_ProfileNode_default_instance_; |
324 | new (ptr) ::tensorflow::tfprof::ProfileNode(); |
325 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
326 | } |
327 | ::tensorflow::tfprof::ProfileNode::InitAsDefaultInstance(); |
328 | } |
329 | |
330 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<8> scc_info_ProfileNode_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
331 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 8, InitDefaultsscc_info_ProfileNode_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
332 | &scc_info_ProfileNode_InputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
333 | &scc_info_ProfileNode_InputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
334 | &scc_info_ProfileNode_OutputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
335 | &scc_info_ProfileNode_OutputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
336 | &scc_info_ProfileNode_SrcOutputIndexEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
337 | &scc_info_CodeDef_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
338 | &scc_info_ProfileNode_AttrsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
339 | &scc_info_ProfileNode_ExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
340 | |
341 | static void InitDefaultsscc_info_ProfileNode_AttrsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
342 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
343 | |
344 | { |
345 | void* ptr = &::tensorflow::tfprof::_ProfileNode_AttrsEntry_DoNotUse_default_instance_; |
346 | new (ptr) ::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse(); |
347 | } |
348 | ::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse::InitAsDefaultInstance(); |
349 | } |
350 | |
351 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ProfileNode_AttrsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
352 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ProfileNode_AttrsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
353 | &scc_info_AttrValue_tensorflow_2fcore_2fframework_2fattr_5fvalue_2eproto.base,}}; |
354 | |
355 | static void InitDefaultsscc_info_ProfileNode_ExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
356 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
357 | |
358 | { |
359 | void* ptr = &::tensorflow::tfprof::_ProfileNode_ExecsEntry_DoNotUse_default_instance_; |
360 | new (ptr) ::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse(); |
361 | } |
362 | ::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse::InitAsDefaultInstance(); |
363 | } |
364 | |
365 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ProfileNode_ExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
366 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ProfileNode_ExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
367 | &scc_info_ExecProfile_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
368 | |
369 | static void InitDefaultsscc_info_ProfileNode_InputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
370 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
371 | |
372 | { |
373 | void* ptr = &::tensorflow::tfprof::_ProfileNode_InputShapesEntry_DoNotUse_default_instance_; |
374 | new (ptr) ::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse(); |
375 | } |
376 | ::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse::InitAsDefaultInstance(); |
377 | } |
378 | |
379 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ProfileNode_InputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
380 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ProfileNode_InputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
381 | &scc_info_Tuple_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
382 | |
383 | static void InitDefaultsscc_info_ProfileNode_InputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
384 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
385 | |
386 | { |
387 | void* ptr = &::tensorflow::tfprof::_ProfileNode_InputsEntry_DoNotUse_default_instance_; |
388 | new (ptr) ::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse(); |
389 | } |
390 | ::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse::InitAsDefaultInstance(); |
391 | } |
392 | |
393 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfileNode_InputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
394 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ProfileNode_InputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, {}}; |
395 | |
396 | static void InitDefaultsscc_info_ProfileNode_OutputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
397 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
398 | |
399 | { |
400 | void* ptr = &::tensorflow::tfprof::_ProfileNode_OutputShapesEntry_DoNotUse_default_instance_; |
401 | new (ptr) ::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse(); |
402 | } |
403 | ::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse::InitAsDefaultInstance(); |
404 | } |
405 | |
406 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ProfileNode_OutputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
407 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ProfileNode_OutputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
408 | &scc_info_Tuple_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
409 | |
410 | static void InitDefaultsscc_info_ProfileNode_OutputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
411 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
412 | |
413 | { |
414 | void* ptr = &::tensorflow::tfprof::_ProfileNode_OutputsEntry_DoNotUse_default_instance_; |
415 | new (ptr) ::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse(); |
416 | } |
417 | ::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse::InitAsDefaultInstance(); |
418 | } |
419 | |
420 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfileNode_OutputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
421 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ProfileNode_OutputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, {}}; |
422 | |
423 | static void InitDefaultsscc_info_ProfileNode_SrcOutputIndexEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
424 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
425 | |
426 | { |
427 | void* ptr = &::tensorflow::tfprof::_ProfileNode_SrcOutputIndexEntry_DoNotUse_default_instance_; |
428 | new (ptr) ::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse(); |
429 | } |
430 | ::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse::InitAsDefaultInstance(); |
431 | } |
432 | |
433 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfileNode_SrcOutputIndexEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
434 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ProfileNode_SrcOutputIndexEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, {}}; |
435 | |
436 | static void InitDefaultsscc_info_ProfileProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
437 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
438 | |
439 | { |
440 | void* ptr = &::tensorflow::tfprof::_ProfileProto_default_instance_; |
441 | new (ptr) ::tensorflow::tfprof::ProfileProto(); |
442 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
443 | } |
444 | ::tensorflow::tfprof::ProfileProto::InitAsDefaultInstance(); |
445 | } |
446 | |
447 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ProfileProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
448 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_ProfileProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
449 | &scc_info_ProfileProto_NodesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
450 | &scc_info_ProfileProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
451 | |
452 | static void InitDefaultsscc_info_ProfileProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
453 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
454 | |
455 | { |
456 | void* ptr = &::tensorflow::tfprof::_ProfileProto_IdToStringEntry_DoNotUse_default_instance_; |
457 | new (ptr) ::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse(); |
458 | } |
459 | ::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse::InitAsDefaultInstance(); |
460 | } |
461 | |
462 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfileProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
463 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ProfileProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, {}}; |
464 | |
465 | static void InitDefaultsscc_info_ProfileProto_NodesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
466 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
467 | |
468 | { |
469 | void* ptr = &::tensorflow::tfprof::_ProfileProto_NodesEntry_DoNotUse_default_instance_; |
470 | new (ptr) ::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse(); |
471 | } |
472 | ::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse::InitAsDefaultInstance(); |
473 | } |
474 | |
475 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ProfileProto_NodesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
476 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ProfileProto_NodesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, { |
477 | &scc_info_ProfileNode_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base,}}; |
478 | |
479 | static void InitDefaultsscc_info_Tuple_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto() { |
480 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
481 | |
482 | { |
483 | void* ptr = &::tensorflow::tfprof::_Tuple_default_instance_; |
484 | new (ptr) ::tensorflow::tfprof::Tuple(); |
485 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
486 | } |
487 | ::tensorflow::tfprof::Tuple::InitAsDefaultInstance(); |
488 | } |
489 | |
490 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Tuple_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = |
491 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Tuple_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto}, {}}; |
492 | |
493 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto[24]; |
494 | static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = nullptr; |
495 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = nullptr; |
496 | |
497 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
498 | ~0u, // no _has_bits_ |
499 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::CodeDef_Trace, _internal_metadata_), |
500 | ~0u, // no _extensions_ |
501 | ~0u, // no _oneof_case_ |
502 | ~0u, // no _weak_field_map_ |
503 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::CodeDef_Trace, file_), |
504 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::CodeDef_Trace, file_id_), |
505 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::CodeDef_Trace, lineno_), |
506 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::CodeDef_Trace, function_), |
507 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::CodeDef_Trace, function_id_), |
508 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::CodeDef_Trace, line_), |
509 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::CodeDef_Trace, line_id_), |
510 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::CodeDef_Trace, func_start_line_), |
511 | ~0u, // no _has_bits_ |
512 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::CodeDef, _internal_metadata_), |
513 | ~0u, // no _extensions_ |
514 | ~0u, // no _oneof_case_ |
515 | ~0u, // no _weak_field_map_ |
516 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::CodeDef, traces_), |
517 | ~0u, // no _has_bits_ |
518 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogEntry, _internal_metadata_), |
519 | ~0u, // no _extensions_ |
520 | ~0u, // no _oneof_case_ |
521 | ~0u, // no _weak_field_map_ |
522 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogEntry, name_), |
523 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogEntry, float_ops_), |
524 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogEntry, types_), |
525 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogEntry, code_def_), |
526 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse, _has_bits_), |
527 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse, _internal_metadata_), |
528 | ~0u, // no _extensions_ |
529 | ~0u, // no _oneof_case_ |
530 | ~0u, // no _weak_field_map_ |
531 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse, key_), |
532 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse, value_), |
533 | 0, |
534 | 1, |
535 | ~0u, // no _has_bits_ |
536 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogProto, _internal_metadata_), |
537 | ~0u, // no _extensions_ |
538 | ~0u, // no _oneof_case_ |
539 | ~0u, // no _weak_field_map_ |
540 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogProto, log_entries_), |
541 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::OpLogProto, id_to_string_), |
542 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse, _has_bits_), |
543 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse, _internal_metadata_), |
544 | ~0u, // no _extensions_ |
545 | ~0u, // no _oneof_case_ |
546 | ~0u, // no _weak_field_map_ |
547 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse, key_), |
548 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse, value_), |
549 | 0, |
550 | 1, |
551 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse, _has_bits_), |
552 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse, _internal_metadata_), |
553 | ~0u, // no _extensions_ |
554 | ~0u, // no _oneof_case_ |
555 | ~0u, // no _weak_field_map_ |
556 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse, key_), |
557 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse, value_), |
558 | 0, |
559 | 1, |
560 | ~0u, // no _has_bits_ |
561 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto, _internal_metadata_), |
562 | ~0u, // no _extensions_ |
563 | ~0u, // no _oneof_case_ |
564 | ~0u, // no _weak_field_map_ |
565 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto, nodes_), |
566 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto, has_trace_), |
567 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto, miss_accelerator_stream_), |
568 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto, steps_), |
569 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileProto, id_to_string_), |
570 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse, _has_bits_), |
571 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse, _internal_metadata_), |
572 | ~0u, // no _extensions_ |
573 | ~0u, // no _oneof_case_ |
574 | ~0u, // no _weak_field_map_ |
575 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse, key_), |
576 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse, value_), |
577 | 0, |
578 | 1, |
579 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse, _has_bits_), |
580 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse, _internal_metadata_), |
581 | ~0u, // no _extensions_ |
582 | ~0u, // no _oneof_case_ |
583 | ~0u, // no _weak_field_map_ |
584 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse, key_), |
585 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse, value_), |
586 | 0, |
587 | 1, |
588 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse, _has_bits_), |
589 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse, _internal_metadata_), |
590 | ~0u, // no _extensions_ |
591 | ~0u, // no _oneof_case_ |
592 | ~0u, // no _weak_field_map_ |
593 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse, key_), |
594 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse, value_), |
595 | 0, |
596 | 1, |
597 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse, _has_bits_), |
598 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse, _internal_metadata_), |
599 | ~0u, // no _extensions_ |
600 | ~0u, // no _oneof_case_ |
601 | ~0u, // no _weak_field_map_ |
602 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse, key_), |
603 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse, value_), |
604 | 0, |
605 | 1, |
606 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse, _has_bits_), |
607 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse, _internal_metadata_), |
608 | ~0u, // no _extensions_ |
609 | ~0u, // no _oneof_case_ |
610 | ~0u, // no _weak_field_map_ |
611 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse, key_), |
612 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse, value_), |
613 | 0, |
614 | 1, |
615 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse, _has_bits_), |
616 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse, _internal_metadata_), |
617 | ~0u, // no _extensions_ |
618 | ~0u, // no _oneof_case_ |
619 | ~0u, // no _weak_field_map_ |
620 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse, key_), |
621 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse, value_), |
622 | 0, |
623 | 1, |
624 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse, _has_bits_), |
625 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse, _internal_metadata_), |
626 | ~0u, // no _extensions_ |
627 | ~0u, // no _oneof_case_ |
628 | ~0u, // no _weak_field_map_ |
629 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse, key_), |
630 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse, value_), |
631 | 0, |
632 | 1, |
633 | ~0u, // no _has_bits_ |
634 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, _internal_metadata_), |
635 | ~0u, // no _extensions_ |
636 | ~0u, // no _oneof_case_ |
637 | ~0u, // no _weak_field_map_ |
638 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, name_), |
639 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, op_), |
640 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, id_), |
641 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, inputs_), |
642 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, input_shapes_), |
643 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, outputs_), |
644 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, output_shapes_), |
645 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, src_output_index_), |
646 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, shape_), |
647 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, op_types_), |
648 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, canonical_device_), |
649 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, host_device_), |
650 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, float_ops_), |
651 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, trace_), |
652 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, attrs_), |
653 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ProfileNode, execs_), |
654 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse, _has_bits_), |
655 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse, _internal_metadata_), |
656 | ~0u, // no _extensions_ |
657 | ~0u, // no _oneof_case_ |
658 | ~0u, // no _weak_field_map_ |
659 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse, key_), |
660 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse, value_), |
661 | 0, |
662 | 1, |
663 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse, _has_bits_), |
664 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse, _internal_metadata_), |
665 | ~0u, // no _extensions_ |
666 | ~0u, // no _oneof_case_ |
667 | ~0u, // no _weak_field_map_ |
668 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse, key_), |
669 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse, value_), |
670 | 0, |
671 | 1, |
672 | ~0u, // no _has_bits_ |
673 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile, _internal_metadata_), |
674 | ~0u, // no _extensions_ |
675 | ~0u, // no _oneof_case_ |
676 | ~0u, // no _weak_field_map_ |
677 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile, run_count_), |
678 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile, all_start_micros_), |
679 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile, latest_end_micros_), |
680 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile, accelerator_execs_), |
681 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile, cpu_execs_), |
682 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile, memory_execs_), |
683 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile, allocations_), |
684 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecProfile, devices_), |
685 | ~0u, // no _has_bits_ |
686 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecTime, _internal_metadata_), |
687 | ~0u, // no _extensions_ |
688 | ~0u, // no _oneof_case_ |
689 | ~0u, // no _weak_field_map_ |
690 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecTime, times_), |
691 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse, _has_bits_), |
692 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse, _internal_metadata_), |
693 | ~0u, // no _extensions_ |
694 | ~0u, // no _oneof_case_ |
695 | ~0u, // no _weak_field_map_ |
696 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse, key_), |
697 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse, value_), |
698 | 0, |
699 | 1, |
700 | ~0u, // no _has_bits_ |
701 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, _internal_metadata_), |
702 | ~0u, // no _extensions_ |
703 | ~0u, // no _oneof_case_ |
704 | ~0u, // no _weak_field_map_ |
705 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, memory_micros_), |
706 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, host_temp_bytes_), |
707 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, host_persistent_bytes_), |
708 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, accelerator_temp_bytes_), |
709 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, accelerator_persistent_bytes_), |
710 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, requested_bytes_), |
711 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, peak_bytes_), |
712 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, residual_bytes_), |
713 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, output_bytes_), |
714 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, allocator_bytes_in_use_), |
715 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::ExecMemory, output_memory_), |
716 | ~0u, // no _has_bits_ |
717 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::Tuple, _internal_metadata_), |
718 | ~0u, // no _extensions_ |
719 | ~0u, // no _oneof_case_ |
720 | ~0u, // no _weak_field_map_ |
721 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::Tuple, int64_values_), |
722 | ~0u, // no _has_bits_ |
723 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::Memory, _internal_metadata_), |
724 | ~0u, // no _extensions_ |
725 | ~0u, // no _oneof_case_ |
726 | ~0u, // no _weak_field_map_ |
727 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::Memory, bytes_), |
728 | PROTOBUF_FIELD_OFFSET(::tensorflow::tfprof::Memory, ptr_), |
729 | }; |
730 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
731 | { 0, -1, sizeof(::tensorflow::tfprof::CodeDef_Trace)}, |
732 | { 13, -1, sizeof(::tensorflow::tfprof::CodeDef)}, |
733 | { 19, -1, sizeof(::tensorflow::tfprof::OpLogEntry)}, |
734 | { 28, 35, sizeof(::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse)}, |
735 | { 37, -1, sizeof(::tensorflow::tfprof::OpLogProto)}, |
736 | { 44, 51, sizeof(::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse)}, |
737 | { 53, 60, sizeof(::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse)}, |
738 | { 62, -1, sizeof(::tensorflow::tfprof::ProfileProto)}, |
739 | { 72, 79, sizeof(::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse)}, |
740 | { 81, 88, sizeof(::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse)}, |
741 | { 90, 97, sizeof(::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse)}, |
742 | { 99, 106, sizeof(::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse)}, |
743 | { 108, 115, sizeof(::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse)}, |
744 | { 117, 124, sizeof(::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse)}, |
745 | { 126, 133, sizeof(::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse)}, |
746 | { 135, -1, sizeof(::tensorflow::tfprof::ProfileNode)}, |
747 | { 156, 163, sizeof(::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse)}, |
748 | { 165, 172, sizeof(::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse)}, |
749 | { 174, -1, sizeof(::tensorflow::tfprof::ExecProfile)}, |
750 | { 187, -1, sizeof(::tensorflow::tfprof::ExecTime)}, |
751 | { 193, 200, sizeof(::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse)}, |
752 | { 202, -1, sizeof(::tensorflow::tfprof::ExecMemory)}, |
753 | { 218, -1, sizeof(::tensorflow::tfprof::Tuple)}, |
754 | { 224, -1, sizeof(::tensorflow::tfprof::Memory)}, |
755 | }; |
756 | |
757 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
758 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_CodeDef_Trace_default_instance_), |
759 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_CodeDef_default_instance_), |
760 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_OpLogEntry_default_instance_), |
761 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_OpLogProto_IdToStringEntry_DoNotUse_default_instance_), |
762 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_OpLogProto_default_instance_), |
763 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ProfileProto_NodesEntry_DoNotUse_default_instance_), |
764 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ProfileProto_IdToStringEntry_DoNotUse_default_instance_), |
765 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ProfileProto_default_instance_), |
766 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ProfileNode_InputsEntry_DoNotUse_default_instance_), |
767 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ProfileNode_InputShapesEntry_DoNotUse_default_instance_), |
768 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ProfileNode_OutputsEntry_DoNotUse_default_instance_), |
769 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ProfileNode_OutputShapesEntry_DoNotUse_default_instance_), |
770 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ProfileNode_SrcOutputIndexEntry_DoNotUse_default_instance_), |
771 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ProfileNode_AttrsEntry_DoNotUse_default_instance_), |
772 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ProfileNode_ExecsEntry_DoNotUse_default_instance_), |
773 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ProfileNode_default_instance_), |
774 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ExecProfile_AcceleratorExecsEntry_DoNotUse_default_instance_), |
775 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ExecProfile_CpuExecsEntry_DoNotUse_default_instance_), |
776 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ExecProfile_default_instance_), |
777 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ExecTime_default_instance_), |
778 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ExecMemory_OutputMemoryEntry_DoNotUse_default_instance_), |
779 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_ExecMemory_default_instance_), |
780 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_Tuple_default_instance_), |
781 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::tfprof::_Memory_default_instance_), |
782 | }; |
783 | |
784 | const char descriptor_table_protodef_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
785 | "\n)tensorflow/core/profiler/tfprof_log.pr" |
786 | "oto\022\021tensorflow.tfprof\032*tensorflow/core/" |
787 | "framework/attr_value.proto\032*tensorflow/c" |
788 | "ore/framework/step_stats.proto\"\337\001\n\007CodeD" |
789 | "ef\0220\n\006traces\030\001 \003(\0132 .tensorflow.tfprof.C" |
790 | "odeDef.Trace\032\241\001\n\005Trace\022\020\n\004file\030\001 \001(\tB\002\030\001" |
791 | "\022\017\n\007file_id\030\006 \001(\003\022\016\n\006lineno\030\002 \001(\005\022\024\n\010fun" |
792 | "ction\030\003 \001(\tB\002\030\001\022\023\n\013function_id\030\007 \001(\003\022\020\n\004" |
793 | "line\030\004 \001(\tB\002\030\001\022\017\n\007line_id\030\010 \001(\003\022\027\n\017func_" |
794 | "start_line\030\005 \001(\005\"j\n\nOpLogEntry\022\014\n\004name\030\001" |
795 | " \001(\t\022\021\n\tfloat_ops\030\002 \001(\003\022\r\n\005types\030\003 \003(\t\022," |
796 | "\n\010code_def\030\004 \001(\0132\032.tensorflow.tfprof.Cod" |
797 | "eDef\"\270\001\n\nOpLogProto\0222\n\013log_entries\030\001 \003(\013" |
798 | "2\035.tensorflow.tfprof.OpLogEntry\022C\n\014id_to" |
799 | "_string\030\002 \003(\0132-.tensorflow.tfprof.OpLogP" |
800 | "roto.IdToStringEntry\0321\n\017IdToStringEntry\022" |
801 | "\013\n\003key\030\001 \001(\003\022\r\n\005value\030\002 \001(\t:\0028\001\"\324\002\n\014Prof" |
802 | "ileProto\0229\n\005nodes\030\001 \003(\0132*.tensorflow.tfp" |
803 | "rof.ProfileProto.NodesEntry\022\021\n\thas_trace" |
804 | "\030\002 \001(\010\022\037\n\027miss_accelerator_stream\030\005 \001(\010\022" |
805 | "\r\n\005steps\030\003 \003(\003\022E\n\014id_to_string\030\004 \003(\0132/.t" |
806 | "ensorflow.tfprof.ProfileProto.IdToString" |
807 | "Entry\032L\n\nNodesEntry\022\013\n\003key\030\001 \001(\003\022-\n\005valu" |
808 | "e\030\002 \001(\0132\036.tensorflow.tfprof.ProfileNode:" |
809 | "\0028\001\0321\n\017IdToStringEntry\022\013\n\003key\030\001 \001(\003\022\r\n\005v" |
810 | "alue\030\002 \001(\t:\0028\001\"\323\010\n\013ProfileNode\022\014\n\004name\030\001" |
811 | " \001(\t\022\n\n\002op\030\t \001(\t\022\n\n\002id\030\r \001(\003\022:\n\006inputs\030\002" |
812 | " \003(\0132*.tensorflow.tfprof.ProfileNode.Inp" |
813 | "utsEntry\022E\n\014input_shapes\030\020 \003(\0132/.tensorf" |
814 | "low.tfprof.ProfileNode.InputShapesEntry\022" |
815 | "<\n\007outputs\030\003 \003(\0132+.tensorflow.tfprof.Pro" |
816 | "fileNode.OutputsEntry\022G\n\routput_shapes\030\017" |
817 | " \003(\01320.tensorflow.tfprof.ProfileNode.Out" |
818 | "putShapesEntry\022L\n\020src_output_index\030\016 \003(\013" |
819 | "22.tensorflow.tfprof.ProfileNode.SrcOutp" |
820 | "utIndexEntry\022\r\n\005shape\030\004 \003(\003\022\020\n\010op_types\030" |
821 | "\005 \003(\t\022\030\n\020canonical_device\030\006 \001(\t\022\023\n\013host_" |
822 | "device\030\007 \001(\t\022\021\n\tfloat_ops\030\010 \001(\003\022)\n\005trace" |
823 | "\030\n \001(\0132\032.tensorflow.tfprof.CodeDef\0228\n\005at" |
824 | "trs\030\013 \003(\0132).tensorflow.tfprof.ProfileNod" |
825 | "e.AttrsEntry\0228\n\005execs\030\014 \003(\0132).tensorflow" |
826 | ".tfprof.ProfileNode.ExecsEntry\032-\n\013Inputs" |
827 | "Entry\022\013\n\003key\030\001 \001(\005\022\r\n\005value\030\002 \001(\003:\0028\001\032L\n" |
828 | "\020InputShapesEntry\022\013\n\003key\030\001 \001(\005\022\'\n\005value\030" |
829 | "\002 \001(\0132\030.tensorflow.tfprof.Tuple:\0028\001\032.\n\014O" |
830 | "utputsEntry\022\013\n\003key\030\001 \001(\005\022\r\n\005value\030\002 \001(\003:" |
831 | "\0028\001\032M\n\021OutputShapesEntry\022\013\n\003key\030\001 \001(\005\022\'\n" |
832 | "\005value\030\002 \001(\0132\030.tensorflow.tfprof.Tuple:\002" |
833 | "8\001\0325\n\023SrcOutputIndexEntry\022\013\n\003key\030\001 \001(\003\022\r" |
834 | "\n\005value\030\002 \001(\005:\0028\001\032C\n\nAttrsEntry\022\013\n\003key\030\001" |
835 | " \001(\t\022$\n\005value\030\002 \001(\0132\025.tensorflow.AttrVal" |
836 | "ue:\0028\001\032L\n\nExecsEntry\022\013\n\003key\030\001 \001(\003\022-\n\005val" |
837 | "ue\030\002 \001(\0132\036.tensorflow.tfprof.ExecProfile" |
838 | ":\0028\001\"\204\004\n\013ExecProfile\022\021\n\trun_count\030\001 \001(\003\022" |
839 | "\030\n\020all_start_micros\030\002 \001(\003\022\031\n\021latest_end_" |
840 | "micros\030\003 \001(\003\022O\n\021accelerator_execs\030\004 \003(\0132" |
841 | "4.tensorflow.tfprof.ExecProfile.Accelera" |
842 | "torExecsEntry\022\?\n\tcpu_execs\030\005 \003(\0132,.tenso" |
843 | "rflow.tfprof.ExecProfile.CpuExecsEntry\0223" |
844 | "\n\014memory_execs\030\007 \003(\0132\035.tensorflow.tfprof" |
845 | ".ExecMemory\0221\n\013allocations\030\013 \003(\0132\034.tenso" |
846 | "rflow.AllocationRecord\022\017\n\007devices\030\006 \003(\t\032" |
847 | "T\n\025AcceleratorExecsEntry\022\013\n\003key\030\001 \001(\t\022*\n" |
848 | "\005value\030\002 \001(\0132\033.tensorflow.tfprof.ExecTim" |
849 | "e:\0028\001\032L\n\rCpuExecsEntry\022\013\n\003key\030\001 \001(\t\022*\n\005v" |
850 | "alue\030\002 \001(\0132\033.tensorflow.tfprof.ExecTime:" |
851 | "\0028\001\"3\n\010ExecTime\022\'\n\005times\030\001 \003(\0132\030.tensorf" |
852 | "low.tfprof.Tuple\"\264\003\n\nExecMemory\022\025\n\rmemor" |
853 | "y_micros\030\001 \001(\003\022\027\n\017host_temp_bytes\030\002 \001(\003\022" |
854 | "\035\n\025host_persistent_bytes\030\003 \001(\003\022\036\n\026accele" |
855 | "rator_temp_bytes\030\004 \001(\003\022$\n\034accelerator_pe" |
856 | "rsistent_bytes\030\005 \001(\003\022\027\n\017requested_bytes\030" |
857 | "\006 \001(\003\022\022\n\npeak_bytes\030\007 \001(\003\022\026\n\016residual_by" |
858 | "tes\030\010 \001(\003\022\024\n\014output_bytes\030\t \001(\003\022\036\n\026alloc" |
859 | "ator_bytes_in_use\030\n \001(\003\022F\n\routput_memory" |
860 | "\030\013 \003(\0132/.tensorflow.tfprof.ExecMemory.Ou" |
861 | "tputMemoryEntry\032N\n\021OutputMemoryEntry\022\013\n\003" |
862 | "key\030\001 \001(\005\022(\n\005value\030\002 \001(\0132\031.tensorflow.tf" |
863 | "prof.Memory:\0028\001\"\035\n\005Tuple\022\024\n\014int64_values" |
864 | "\030\001 \003(\003\"$\n\006Memory\022\r\n\005bytes\030\001 \001(\003\022\013\n\003ptr\030\002" |
865 | " \001(\004BRZPgithub.com/tensorflow/tensorflow" |
866 | "/tensorflow/go/core/profiler/tfprof_log_" |
867 | "go_protob\006proto3" |
868 | ; |
869 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto_deps[2] = { |
870 | &::descriptor_table_tensorflow_2fcore_2fframework_2fattr_5fvalue_2eproto, |
871 | &::descriptor_table_tensorflow_2fcore_2fframework_2fstep_5fstats_2eproto, |
872 | }; |
873 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto_sccs[24] = { |
874 | &scc_info_CodeDef_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
875 | &scc_info_CodeDef_Trace_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
876 | &scc_info_ExecMemory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
877 | &scc_info_ExecMemory_OutputMemoryEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
878 | &scc_info_ExecProfile_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
879 | &scc_info_ExecProfile_AcceleratorExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
880 | &scc_info_ExecProfile_CpuExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
881 | &scc_info_ExecTime_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
882 | &scc_info_Memory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
883 | &scc_info_OpLogEntry_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
884 | &scc_info_OpLogProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
885 | &scc_info_OpLogProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
886 | &scc_info_ProfileNode_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
887 | &scc_info_ProfileNode_AttrsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
888 | &scc_info_ProfileNode_ExecsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
889 | &scc_info_ProfileNode_InputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
890 | &scc_info_ProfileNode_InputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
891 | &scc_info_ProfileNode_OutputShapesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
892 | &scc_info_ProfileNode_OutputsEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
893 | &scc_info_ProfileNode_SrcOutputIndexEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
894 | &scc_info_ProfileProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
895 | &scc_info_ProfileProto_IdToStringEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
896 | &scc_info_ProfileProto_NodesEntry_DoNotUse_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
897 | &scc_info_Tuple_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base, |
898 | }; |
899 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto_once; |
900 | static bool descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto_initialized = false; |
901 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = { |
902 | &descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto, "tensorflow/core/profiler/tfprof_log.proto" , 3296, |
903 | &descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto_once, descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto_deps, 24, 2, |
904 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto::offsets, |
905 | file_level_metadata_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto, 24, file_level_enum_descriptors_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto, |
906 | }; |
907 | |
908 | // Force running AddDescriptors() at dynamic initialization time. |
909 | static bool dynamic_init_dummy_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto), true); |
910 | namespace tensorflow { |
911 | namespace tfprof { |
912 | |
913 | // =================================================================== |
914 | |
915 | void CodeDef_Trace::InitAsDefaultInstance() { |
916 | } |
917 | class CodeDef_Trace::_Internal { |
918 | public: |
919 | }; |
920 | |
921 | CodeDef_Trace::CodeDef_Trace() |
922 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
923 | SharedCtor(); |
924 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.CodeDef.Trace) |
925 | } |
926 | CodeDef_Trace::CodeDef_Trace(const CodeDef_Trace& from) |
927 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
928 | _internal_metadata_(nullptr) { |
929 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
930 | file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
931 | if (!from.file().empty()) { |
932 | file_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.file_); |
933 | } |
934 | function_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
935 | if (!from.function().empty()) { |
936 | function_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.function_); |
937 | } |
938 | line_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
939 | if (!from.line().empty()) { |
940 | line_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.line_); |
941 | } |
942 | ::memcpy(&lineno_, &from.lineno_, |
943 | static_cast<size_t>(reinterpret_cast<char*>(&line_id_) - |
944 | reinterpret_cast<char*>(&lineno_)) + sizeof(line_id_)); |
945 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.CodeDef.Trace) |
946 | } |
947 | |
948 | void CodeDef_Trace::SharedCtor() { |
949 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CodeDef_Trace_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
950 | file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
951 | function_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
952 | line_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
953 | ::memset(&lineno_, 0, static_cast<size_t>( |
954 | reinterpret_cast<char*>(&line_id_) - |
955 | reinterpret_cast<char*>(&lineno_)) + sizeof(line_id_)); |
956 | } |
957 | |
958 | CodeDef_Trace::~CodeDef_Trace() { |
959 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.CodeDef.Trace) |
960 | SharedDtor(); |
961 | } |
962 | |
963 | void CodeDef_Trace::SharedDtor() { |
964 | file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
965 | function_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
966 | line_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
967 | } |
968 | |
969 | void CodeDef_Trace::SetCachedSize(int size) const { |
970 | _cached_size_.Set(size); |
971 | } |
972 | const CodeDef_Trace& CodeDef_Trace::default_instance() { |
973 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CodeDef_Trace_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
974 | return *internal_default_instance(); |
975 | } |
976 | |
977 | |
978 | void CodeDef_Trace::Clear() { |
979 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.CodeDef.Trace) |
980 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
981 | // Prevent compiler warnings about cached_has_bits being unused |
982 | (void) cached_has_bits; |
983 | |
984 | file_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
985 | function_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
986 | line_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
987 | ::memset(&lineno_, 0, static_cast<size_t>( |
988 | reinterpret_cast<char*>(&line_id_) - |
989 | reinterpret_cast<char*>(&lineno_)) + sizeof(line_id_)); |
990 | _internal_metadata_.Clear(); |
991 | } |
992 | |
993 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
994 | const char* CodeDef_Trace::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
995 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
996 | while (!ctx->Done(&ptr)) { |
997 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
998 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
999 | CHK_(ptr); |
1000 | switch (tag >> 3) { |
1001 | // string file = 1 [deprecated = true]; |
1002 | case 1: |
1003 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
1004 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_file(), ptr, ctx, "tensorflow.tfprof.CodeDef.Trace.file" ); |
1005 | CHK_(ptr); |
1006 | } else goto handle_unusual; |
1007 | continue; |
1008 | // int32 lineno = 2; |
1009 | case 2: |
1010 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
1011 | lineno_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1012 | CHK_(ptr); |
1013 | } else goto handle_unusual; |
1014 | continue; |
1015 | // string function = 3 [deprecated = true]; |
1016 | case 3: |
1017 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
1018 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_function(), ptr, ctx, "tensorflow.tfprof.CodeDef.Trace.function" ); |
1019 | CHK_(ptr); |
1020 | } else goto handle_unusual; |
1021 | continue; |
1022 | // string line = 4 [deprecated = true]; |
1023 | case 4: |
1024 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
1025 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_line(), ptr, ctx, "tensorflow.tfprof.CodeDef.Trace.line" ); |
1026 | CHK_(ptr); |
1027 | } else goto handle_unusual; |
1028 | continue; |
1029 | // int32 func_start_line = 5; |
1030 | case 5: |
1031 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { |
1032 | func_start_line_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1033 | CHK_(ptr); |
1034 | } else goto handle_unusual; |
1035 | continue; |
1036 | // int64 file_id = 6; |
1037 | case 6: |
1038 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { |
1039 | file_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1040 | CHK_(ptr); |
1041 | } else goto handle_unusual; |
1042 | continue; |
1043 | // int64 function_id = 7; |
1044 | case 7: |
1045 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { |
1046 | function_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1047 | CHK_(ptr); |
1048 | } else goto handle_unusual; |
1049 | continue; |
1050 | // int64 line_id = 8; |
1051 | case 8: |
1052 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { |
1053 | line_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1054 | CHK_(ptr); |
1055 | } else goto handle_unusual; |
1056 | continue; |
1057 | default: { |
1058 | handle_unusual: |
1059 | if ((tag & 7) == 4 || tag == 0) { |
1060 | ctx->SetLastTag(tag); |
1061 | goto success; |
1062 | } |
1063 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1064 | CHK_(ptr != nullptr); |
1065 | continue; |
1066 | } |
1067 | } // switch |
1068 | } // while |
1069 | success: |
1070 | return ptr; |
1071 | failure: |
1072 | ptr = nullptr; |
1073 | goto success; |
1074 | #undef CHK_ |
1075 | } |
1076 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1077 | bool CodeDef_Trace::MergePartialFromCodedStream( |
1078 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1079 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1080 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1081 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.CodeDef.Trace) |
1082 | for (;;) { |
1083 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1084 | tag = p.first; |
1085 | if (!p.second) goto handle_unusual; |
1086 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1087 | // string file = 1 [deprecated = true]; |
1088 | case 1: { |
1089 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
1090 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1091 | input, this->mutable_file())); |
1092 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1093 | this->file().data(), static_cast<int>(this->file().length()), |
1094 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1095 | "tensorflow.tfprof.CodeDef.Trace.file" )); |
1096 | } else { |
1097 | goto handle_unusual; |
1098 | } |
1099 | break; |
1100 | } |
1101 | |
1102 | // int32 lineno = 2; |
1103 | case 2: { |
1104 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
1105 | |
1106 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1107 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
1108 | input, &lineno_))); |
1109 | } else { |
1110 | goto handle_unusual; |
1111 | } |
1112 | break; |
1113 | } |
1114 | |
1115 | // string function = 3 [deprecated = true]; |
1116 | case 3: { |
1117 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
1118 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1119 | input, this->mutable_function())); |
1120 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1121 | this->function().data(), static_cast<int>(this->function().length()), |
1122 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1123 | "tensorflow.tfprof.CodeDef.Trace.function" )); |
1124 | } else { |
1125 | goto handle_unusual; |
1126 | } |
1127 | break; |
1128 | } |
1129 | |
1130 | // string line = 4 [deprecated = true]; |
1131 | case 4: { |
1132 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
1133 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1134 | input, this->mutable_line())); |
1135 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1136 | this->line().data(), static_cast<int>(this->line().length()), |
1137 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1138 | "tensorflow.tfprof.CodeDef.Trace.line" )); |
1139 | } else { |
1140 | goto handle_unusual; |
1141 | } |
1142 | break; |
1143 | } |
1144 | |
1145 | // int32 func_start_line = 5; |
1146 | case 5: { |
1147 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { |
1148 | |
1149 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1150 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
1151 | input, &func_start_line_))); |
1152 | } else { |
1153 | goto handle_unusual; |
1154 | } |
1155 | break; |
1156 | } |
1157 | |
1158 | // int64 file_id = 6; |
1159 | case 6: { |
1160 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { |
1161 | |
1162 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1163 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1164 | input, &file_id_))); |
1165 | } else { |
1166 | goto handle_unusual; |
1167 | } |
1168 | break; |
1169 | } |
1170 | |
1171 | // int64 function_id = 7; |
1172 | case 7: { |
1173 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { |
1174 | |
1175 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1176 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1177 | input, &function_id_))); |
1178 | } else { |
1179 | goto handle_unusual; |
1180 | } |
1181 | break; |
1182 | } |
1183 | |
1184 | // int64 line_id = 8; |
1185 | case 8: { |
1186 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) { |
1187 | |
1188 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1189 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1190 | input, &line_id_))); |
1191 | } else { |
1192 | goto handle_unusual; |
1193 | } |
1194 | break; |
1195 | } |
1196 | |
1197 | default: { |
1198 | handle_unusual: |
1199 | if (tag == 0) { |
1200 | goto success; |
1201 | } |
1202 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1203 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1204 | break; |
1205 | } |
1206 | } |
1207 | } |
1208 | success: |
1209 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.CodeDef.Trace) |
1210 | return true; |
1211 | failure: |
1212 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.CodeDef.Trace) |
1213 | return false; |
1214 | #undef DO_ |
1215 | } |
1216 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1217 | |
1218 | void CodeDef_Trace::SerializeWithCachedSizes( |
1219 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1220 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.CodeDef.Trace) |
1221 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1222 | (void) cached_has_bits; |
1223 | |
1224 | // string file = 1 [deprecated = true]; |
1225 | if (this->file().size() > 0) { |
1226 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1227 | this->file().data(), static_cast<int>(this->file().length()), |
1228 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1229 | "tensorflow.tfprof.CodeDef.Trace.file" ); |
1230 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1231 | 1, this->file(), output); |
1232 | } |
1233 | |
1234 | // int32 lineno = 2; |
1235 | if (this->lineno() != 0) { |
1236 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->lineno(), output); |
1237 | } |
1238 | |
1239 | // string function = 3 [deprecated = true]; |
1240 | if (this->function().size() > 0) { |
1241 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1242 | this->function().data(), static_cast<int>(this->function().length()), |
1243 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1244 | "tensorflow.tfprof.CodeDef.Trace.function" ); |
1245 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1246 | 3, this->function(), output); |
1247 | } |
1248 | |
1249 | // string line = 4 [deprecated = true]; |
1250 | if (this->line().size() > 0) { |
1251 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1252 | this->line().data(), static_cast<int>(this->line().length()), |
1253 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1254 | "tensorflow.tfprof.CodeDef.Trace.line" ); |
1255 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1256 | 4, this->line(), output); |
1257 | } |
1258 | |
1259 | // int32 func_start_line = 5; |
1260 | if (this->func_start_line() != 0) { |
1261 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(5, this->func_start_line(), output); |
1262 | } |
1263 | |
1264 | // int64 file_id = 6; |
1265 | if (this->file_id() != 0) { |
1266 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(6, this->file_id(), output); |
1267 | } |
1268 | |
1269 | // int64 function_id = 7; |
1270 | if (this->function_id() != 0) { |
1271 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(7, this->function_id(), output); |
1272 | } |
1273 | |
1274 | // int64 line_id = 8; |
1275 | if (this->line_id() != 0) { |
1276 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(8, this->line_id(), output); |
1277 | } |
1278 | |
1279 | if (_internal_metadata_.have_unknown_fields()) { |
1280 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1281 | _internal_metadata_.unknown_fields(), output); |
1282 | } |
1283 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.CodeDef.Trace) |
1284 | } |
1285 | |
1286 | ::PROTOBUF_NAMESPACE_ID::uint8* CodeDef_Trace::InternalSerializeWithCachedSizesToArray( |
1287 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1288 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.CodeDef.Trace) |
1289 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1290 | (void) cached_has_bits; |
1291 | |
1292 | // string file = 1 [deprecated = true]; |
1293 | if (this->file().size() > 0) { |
1294 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1295 | this->file().data(), static_cast<int>(this->file().length()), |
1296 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1297 | "tensorflow.tfprof.CodeDef.Trace.file" ); |
1298 | target = |
1299 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1300 | 1, this->file(), target); |
1301 | } |
1302 | |
1303 | // int32 lineno = 2; |
1304 | if (this->lineno() != 0) { |
1305 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->lineno(), target); |
1306 | } |
1307 | |
1308 | // string function = 3 [deprecated = true]; |
1309 | if (this->function().size() > 0) { |
1310 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1311 | this->function().data(), static_cast<int>(this->function().length()), |
1312 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1313 | "tensorflow.tfprof.CodeDef.Trace.function" ); |
1314 | target = |
1315 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1316 | 3, this->function(), target); |
1317 | } |
1318 | |
1319 | // string line = 4 [deprecated = true]; |
1320 | if (this->line().size() > 0) { |
1321 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1322 | this->line().data(), static_cast<int>(this->line().length()), |
1323 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1324 | "tensorflow.tfprof.CodeDef.Trace.line" ); |
1325 | target = |
1326 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1327 | 4, this->line(), target); |
1328 | } |
1329 | |
1330 | // int32 func_start_line = 5; |
1331 | if (this->func_start_line() != 0) { |
1332 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->func_start_line(), target); |
1333 | } |
1334 | |
1335 | // int64 file_id = 6; |
1336 | if (this->file_id() != 0) { |
1337 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->file_id(), target); |
1338 | } |
1339 | |
1340 | // int64 function_id = 7; |
1341 | if (this->function_id() != 0) { |
1342 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(7, this->function_id(), target); |
1343 | } |
1344 | |
1345 | // int64 line_id = 8; |
1346 | if (this->line_id() != 0) { |
1347 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->line_id(), target); |
1348 | } |
1349 | |
1350 | if (_internal_metadata_.have_unknown_fields()) { |
1351 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1352 | _internal_metadata_.unknown_fields(), target); |
1353 | } |
1354 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.CodeDef.Trace) |
1355 | return target; |
1356 | } |
1357 | |
1358 | size_t CodeDef_Trace::ByteSizeLong() const { |
1359 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.CodeDef.Trace) |
1360 | size_t total_size = 0; |
1361 | |
1362 | if (_internal_metadata_.have_unknown_fields()) { |
1363 | total_size += |
1364 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1365 | _internal_metadata_.unknown_fields()); |
1366 | } |
1367 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1368 | // Prevent compiler warnings about cached_has_bits being unused |
1369 | (void) cached_has_bits; |
1370 | |
1371 | // string file = 1 [deprecated = true]; |
1372 | if (this->file().size() > 0) { |
1373 | total_size += 1 + |
1374 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1375 | this->file()); |
1376 | } |
1377 | |
1378 | // string function = 3 [deprecated = true]; |
1379 | if (this->function().size() > 0) { |
1380 | total_size += 1 + |
1381 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1382 | this->function()); |
1383 | } |
1384 | |
1385 | // string line = 4 [deprecated = true]; |
1386 | if (this->line().size() > 0) { |
1387 | total_size += 1 + |
1388 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1389 | this->line()); |
1390 | } |
1391 | |
1392 | // int32 lineno = 2; |
1393 | if (this->lineno() != 0) { |
1394 | total_size += 1 + |
1395 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
1396 | this->lineno()); |
1397 | } |
1398 | |
1399 | // int32 func_start_line = 5; |
1400 | if (this->func_start_line() != 0) { |
1401 | total_size += 1 + |
1402 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
1403 | this->func_start_line()); |
1404 | } |
1405 | |
1406 | // int64 file_id = 6; |
1407 | if (this->file_id() != 0) { |
1408 | total_size += 1 + |
1409 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1410 | this->file_id()); |
1411 | } |
1412 | |
1413 | // int64 function_id = 7; |
1414 | if (this->function_id() != 0) { |
1415 | total_size += 1 + |
1416 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1417 | this->function_id()); |
1418 | } |
1419 | |
1420 | // int64 line_id = 8; |
1421 | if (this->line_id() != 0) { |
1422 | total_size += 1 + |
1423 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
1424 | this->line_id()); |
1425 | } |
1426 | |
1427 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1428 | SetCachedSize(cached_size); |
1429 | return total_size; |
1430 | } |
1431 | |
1432 | void CodeDef_Trace::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1433 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.CodeDef.Trace) |
1434 | GOOGLE_DCHECK_NE(&from, this); |
1435 | const CodeDef_Trace* source = |
1436 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CodeDef_Trace>( |
1437 | &from); |
1438 | if (source == nullptr) { |
1439 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.CodeDef.Trace) |
1440 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1441 | } else { |
1442 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.CodeDef.Trace) |
1443 | MergeFrom(*source); |
1444 | } |
1445 | } |
1446 | |
1447 | void CodeDef_Trace::MergeFrom(const CodeDef_Trace& from) { |
1448 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.CodeDef.Trace) |
1449 | GOOGLE_DCHECK_NE(&from, this); |
1450 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1451 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1452 | (void) cached_has_bits; |
1453 | |
1454 | if (from.file().size() > 0) { |
1455 | |
1456 | file_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.file_); |
1457 | } |
1458 | if (from.function().size() > 0) { |
1459 | |
1460 | function_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.function_); |
1461 | } |
1462 | if (from.line().size() > 0) { |
1463 | |
1464 | line_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.line_); |
1465 | } |
1466 | if (from.lineno() != 0) { |
1467 | set_lineno(from.lineno()); |
1468 | } |
1469 | if (from.func_start_line() != 0) { |
1470 | set_func_start_line(from.func_start_line()); |
1471 | } |
1472 | if (from.file_id() != 0) { |
1473 | set_file_id(from.file_id()); |
1474 | } |
1475 | if (from.function_id() != 0) { |
1476 | set_function_id(from.function_id()); |
1477 | } |
1478 | if (from.line_id() != 0) { |
1479 | set_line_id(from.line_id()); |
1480 | } |
1481 | } |
1482 | |
1483 | void CodeDef_Trace::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1484 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.CodeDef.Trace) |
1485 | if (&from == this) return; |
1486 | Clear(); |
1487 | MergeFrom(from); |
1488 | } |
1489 | |
1490 | void CodeDef_Trace::CopyFrom(const CodeDef_Trace& from) { |
1491 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.CodeDef.Trace) |
1492 | if (&from == this) return; |
1493 | Clear(); |
1494 | MergeFrom(from); |
1495 | } |
1496 | |
1497 | bool CodeDef_Trace::IsInitialized() const { |
1498 | return true; |
1499 | } |
1500 | |
1501 | void CodeDef_Trace::InternalSwap(CodeDef_Trace* other) { |
1502 | using std::swap; |
1503 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1504 | file_.Swap(&other->file_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1505 | GetArenaNoVirtual()); |
1506 | function_.Swap(&other->function_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1507 | GetArenaNoVirtual()); |
1508 | line_.Swap(&other->line_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1509 | GetArenaNoVirtual()); |
1510 | swap(lineno_, other->lineno_); |
1511 | swap(func_start_line_, other->func_start_line_); |
1512 | swap(file_id_, other->file_id_); |
1513 | swap(function_id_, other->function_id_); |
1514 | swap(line_id_, other->line_id_); |
1515 | } |
1516 | |
1517 | ::PROTOBUF_NAMESPACE_ID::Metadata CodeDef_Trace::GetMetadata() const { |
1518 | return GetMetadataStatic(); |
1519 | } |
1520 | |
1521 | |
1522 | // =================================================================== |
1523 | |
1524 | void CodeDef::InitAsDefaultInstance() { |
1525 | } |
1526 | class CodeDef::_Internal { |
1527 | public: |
1528 | }; |
1529 | |
1530 | CodeDef::CodeDef() |
1531 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1532 | SharedCtor(); |
1533 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.CodeDef) |
1534 | } |
1535 | CodeDef::CodeDef(const CodeDef& from) |
1536 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1537 | _internal_metadata_(nullptr), |
1538 | traces_(from.traces_) { |
1539 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1540 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.CodeDef) |
1541 | } |
1542 | |
1543 | void CodeDef::SharedCtor() { |
1544 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CodeDef_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
1545 | } |
1546 | |
1547 | CodeDef::~CodeDef() { |
1548 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.CodeDef) |
1549 | SharedDtor(); |
1550 | } |
1551 | |
1552 | void CodeDef::SharedDtor() { |
1553 | } |
1554 | |
1555 | void CodeDef::SetCachedSize(int size) const { |
1556 | _cached_size_.Set(size); |
1557 | } |
1558 | const CodeDef& CodeDef::default_instance() { |
1559 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CodeDef_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
1560 | return *internal_default_instance(); |
1561 | } |
1562 | |
1563 | |
1564 | void CodeDef::Clear() { |
1565 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.CodeDef) |
1566 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1567 | // Prevent compiler warnings about cached_has_bits being unused |
1568 | (void) cached_has_bits; |
1569 | |
1570 | traces_.Clear(); |
1571 | _internal_metadata_.Clear(); |
1572 | } |
1573 | |
1574 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1575 | const char* CodeDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1576 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1577 | while (!ctx->Done(&ptr)) { |
1578 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1579 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1580 | CHK_(ptr); |
1581 | switch (tag >> 3) { |
1582 | // repeated .tensorflow.tfprof.CodeDef.Trace traces = 1; |
1583 | case 1: |
1584 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
1585 | ptr -= 1; |
1586 | do { |
1587 | ptr += 1; |
1588 | ptr = ctx->ParseMessage(add_traces(), ptr); |
1589 | CHK_(ptr); |
1590 | if (!ctx->DataAvailable(ptr)) break; |
1591 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
1592 | } else goto handle_unusual; |
1593 | continue; |
1594 | default: { |
1595 | handle_unusual: |
1596 | if ((tag & 7) == 4 || tag == 0) { |
1597 | ctx->SetLastTag(tag); |
1598 | goto success; |
1599 | } |
1600 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1601 | CHK_(ptr != nullptr); |
1602 | continue; |
1603 | } |
1604 | } // switch |
1605 | } // while |
1606 | success: |
1607 | return ptr; |
1608 | failure: |
1609 | ptr = nullptr; |
1610 | goto success; |
1611 | #undef CHK_ |
1612 | } |
1613 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1614 | bool CodeDef::MergePartialFromCodedStream( |
1615 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1616 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1617 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1618 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.CodeDef) |
1619 | for (;;) { |
1620 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1621 | tag = p.first; |
1622 | if (!p.second) goto handle_unusual; |
1623 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1624 | // repeated .tensorflow.tfprof.CodeDef.Trace traces = 1; |
1625 | case 1: { |
1626 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
1627 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1628 | input, add_traces())); |
1629 | } else { |
1630 | goto handle_unusual; |
1631 | } |
1632 | break; |
1633 | } |
1634 | |
1635 | default: { |
1636 | handle_unusual: |
1637 | if (tag == 0) { |
1638 | goto success; |
1639 | } |
1640 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1641 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1642 | break; |
1643 | } |
1644 | } |
1645 | } |
1646 | success: |
1647 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.CodeDef) |
1648 | return true; |
1649 | failure: |
1650 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.CodeDef) |
1651 | return false; |
1652 | #undef DO_ |
1653 | } |
1654 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1655 | |
1656 | void CodeDef::SerializeWithCachedSizes( |
1657 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1658 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.CodeDef) |
1659 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1660 | (void) cached_has_bits; |
1661 | |
1662 | // repeated .tensorflow.tfprof.CodeDef.Trace traces = 1; |
1663 | for (unsigned int i = 0, |
1664 | n = static_cast<unsigned int>(this->traces_size()); i < n; i++) { |
1665 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1666 | 1, |
1667 | this->traces(static_cast<int>(i)), |
1668 | output); |
1669 | } |
1670 | |
1671 | if (_internal_metadata_.have_unknown_fields()) { |
1672 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1673 | _internal_metadata_.unknown_fields(), output); |
1674 | } |
1675 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.CodeDef) |
1676 | } |
1677 | |
1678 | ::PROTOBUF_NAMESPACE_ID::uint8* CodeDef::InternalSerializeWithCachedSizesToArray( |
1679 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1680 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.CodeDef) |
1681 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1682 | (void) cached_has_bits; |
1683 | |
1684 | // repeated .tensorflow.tfprof.CodeDef.Trace traces = 1; |
1685 | for (unsigned int i = 0, |
1686 | n = static_cast<unsigned int>(this->traces_size()); i < n; i++) { |
1687 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1688 | InternalWriteMessageToArray( |
1689 | 1, this->traces(static_cast<int>(i)), target); |
1690 | } |
1691 | |
1692 | if (_internal_metadata_.have_unknown_fields()) { |
1693 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1694 | _internal_metadata_.unknown_fields(), target); |
1695 | } |
1696 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.CodeDef) |
1697 | return target; |
1698 | } |
1699 | |
1700 | size_t CodeDef::ByteSizeLong() const { |
1701 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.CodeDef) |
1702 | size_t total_size = 0; |
1703 | |
1704 | if (_internal_metadata_.have_unknown_fields()) { |
1705 | total_size += |
1706 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1707 | _internal_metadata_.unknown_fields()); |
1708 | } |
1709 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1710 | // Prevent compiler warnings about cached_has_bits being unused |
1711 | (void) cached_has_bits; |
1712 | |
1713 | // repeated .tensorflow.tfprof.CodeDef.Trace traces = 1; |
1714 | { |
1715 | unsigned int count = static_cast<unsigned int>(this->traces_size()); |
1716 | total_size += 1UL * count; |
1717 | for (unsigned int i = 0; i < count; i++) { |
1718 | total_size += |
1719 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1720 | this->traces(static_cast<int>(i))); |
1721 | } |
1722 | } |
1723 | |
1724 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1725 | SetCachedSize(cached_size); |
1726 | return total_size; |
1727 | } |
1728 | |
1729 | void CodeDef::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1730 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.CodeDef) |
1731 | GOOGLE_DCHECK_NE(&from, this); |
1732 | const CodeDef* source = |
1733 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CodeDef>( |
1734 | &from); |
1735 | if (source == nullptr) { |
1736 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.CodeDef) |
1737 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1738 | } else { |
1739 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.CodeDef) |
1740 | MergeFrom(*source); |
1741 | } |
1742 | } |
1743 | |
1744 | void CodeDef::MergeFrom(const CodeDef& from) { |
1745 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.CodeDef) |
1746 | GOOGLE_DCHECK_NE(&from, this); |
1747 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1748 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1749 | (void) cached_has_bits; |
1750 | |
1751 | traces_.MergeFrom(from.traces_); |
1752 | } |
1753 | |
1754 | void CodeDef::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1755 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.CodeDef) |
1756 | if (&from == this) return; |
1757 | Clear(); |
1758 | MergeFrom(from); |
1759 | } |
1760 | |
1761 | void CodeDef::CopyFrom(const CodeDef& from) { |
1762 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.CodeDef) |
1763 | if (&from == this) return; |
1764 | Clear(); |
1765 | MergeFrom(from); |
1766 | } |
1767 | |
1768 | bool CodeDef::IsInitialized() const { |
1769 | return true; |
1770 | } |
1771 | |
1772 | void CodeDef::InternalSwap(CodeDef* other) { |
1773 | using std::swap; |
1774 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1775 | CastToBase(&traces_)->InternalSwap(CastToBase(&other->traces_)); |
1776 | } |
1777 | |
1778 | ::PROTOBUF_NAMESPACE_ID::Metadata CodeDef::GetMetadata() const { |
1779 | return GetMetadataStatic(); |
1780 | } |
1781 | |
1782 | |
1783 | // =================================================================== |
1784 | |
1785 | void OpLogEntry::InitAsDefaultInstance() { |
1786 | ::tensorflow::tfprof::_OpLogEntry_default_instance_._instance.get_mutable()->code_def_ = const_cast< ::tensorflow::tfprof::CodeDef*>( |
1787 | ::tensorflow::tfprof::CodeDef::internal_default_instance()); |
1788 | } |
1789 | class OpLogEntry::_Internal { |
1790 | public: |
1791 | static const ::tensorflow::tfprof::CodeDef& code_def(const OpLogEntry* msg); |
1792 | }; |
1793 | |
1794 | const ::tensorflow::tfprof::CodeDef& |
1795 | OpLogEntry::_Internal::code_def(const OpLogEntry* msg) { |
1796 | return *msg->code_def_; |
1797 | } |
1798 | OpLogEntry::OpLogEntry() |
1799 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1800 | SharedCtor(); |
1801 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.OpLogEntry) |
1802 | } |
1803 | OpLogEntry::OpLogEntry(const OpLogEntry& from) |
1804 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1805 | _internal_metadata_(nullptr), |
1806 | types_(from.types_) { |
1807 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1808 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1809 | if (!from.name().empty()) { |
1810 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
1811 | } |
1812 | if (from.has_code_def()) { |
1813 | code_def_ = new ::tensorflow::tfprof::CodeDef(*from.code_def_); |
1814 | } else { |
1815 | code_def_ = nullptr; |
1816 | } |
1817 | float_ops_ = from.float_ops_; |
1818 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.OpLogEntry) |
1819 | } |
1820 | |
1821 | void OpLogEntry::SharedCtor() { |
1822 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_OpLogEntry_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
1823 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1824 | ::memset(&code_def_, 0, static_cast<size_t>( |
1825 | reinterpret_cast<char*>(&float_ops_) - |
1826 | reinterpret_cast<char*>(&code_def_)) + sizeof(float_ops_)); |
1827 | } |
1828 | |
1829 | OpLogEntry::~OpLogEntry() { |
1830 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.OpLogEntry) |
1831 | SharedDtor(); |
1832 | } |
1833 | |
1834 | void OpLogEntry::SharedDtor() { |
1835 | name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1836 | if (this != internal_default_instance()) delete code_def_; |
1837 | } |
1838 | |
1839 | void OpLogEntry::SetCachedSize(int size) const { |
1840 | _cached_size_.Set(size); |
1841 | } |
1842 | const OpLogEntry& OpLogEntry::default_instance() { |
1843 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_OpLogEntry_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
1844 | return *internal_default_instance(); |
1845 | } |
1846 | |
1847 | |
1848 | void OpLogEntry::Clear() { |
1849 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.OpLogEntry) |
1850 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1851 | // Prevent compiler warnings about cached_has_bits being unused |
1852 | (void) cached_has_bits; |
1853 | |
1854 | types_.Clear(); |
1855 | name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1856 | if (GetArenaNoVirtual() == nullptr && code_def_ != nullptr) { |
1857 | delete code_def_; |
1858 | } |
1859 | code_def_ = nullptr; |
1860 | float_ops_ = PROTOBUF_LONGLONG(0); |
1861 | _internal_metadata_.Clear(); |
1862 | } |
1863 | |
1864 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1865 | const char* OpLogEntry::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1866 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1867 | while (!ctx->Done(&ptr)) { |
1868 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1869 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1870 | CHK_(ptr); |
1871 | switch (tag >> 3) { |
1872 | // string name = 1; |
1873 | case 1: |
1874 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
1875 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.tfprof.OpLogEntry.name" ); |
1876 | CHK_(ptr); |
1877 | } else goto handle_unusual; |
1878 | continue; |
1879 | // int64 float_ops = 2; |
1880 | case 2: |
1881 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
1882 | float_ops_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1883 | CHK_(ptr); |
1884 | } else goto handle_unusual; |
1885 | continue; |
1886 | // repeated string types = 3; |
1887 | case 3: |
1888 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
1889 | ptr -= 1; |
1890 | do { |
1891 | ptr += 1; |
1892 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_types(), ptr, ctx, "tensorflow.tfprof.OpLogEntry.types" ); |
1893 | CHK_(ptr); |
1894 | if (!ctx->DataAvailable(ptr)) break; |
1895 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); |
1896 | } else goto handle_unusual; |
1897 | continue; |
1898 | // .tensorflow.tfprof.CodeDef code_def = 4; |
1899 | case 4: |
1900 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
1901 | ptr = ctx->ParseMessage(mutable_code_def(), ptr); |
1902 | CHK_(ptr); |
1903 | } else goto handle_unusual; |
1904 | continue; |
1905 | default: { |
1906 | handle_unusual: |
1907 | if ((tag & 7) == 4 || tag == 0) { |
1908 | ctx->SetLastTag(tag); |
1909 | goto success; |
1910 | } |
1911 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1912 | CHK_(ptr != nullptr); |
1913 | continue; |
1914 | } |
1915 | } // switch |
1916 | } // while |
1917 | success: |
1918 | return ptr; |
1919 | failure: |
1920 | ptr = nullptr; |
1921 | goto success; |
1922 | #undef CHK_ |
1923 | } |
1924 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1925 | bool OpLogEntry::MergePartialFromCodedStream( |
1926 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1927 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1928 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1929 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.OpLogEntry) |
1930 | for (;;) { |
1931 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1932 | tag = p.first; |
1933 | if (!p.second) goto handle_unusual; |
1934 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1935 | // string name = 1; |
1936 | case 1: { |
1937 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
1938 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1939 | input, this->mutable_name())); |
1940 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1941 | this->name().data(), static_cast<int>(this->name().length()), |
1942 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1943 | "tensorflow.tfprof.OpLogEntry.name" )); |
1944 | } else { |
1945 | goto handle_unusual; |
1946 | } |
1947 | break; |
1948 | } |
1949 | |
1950 | // int64 float_ops = 2; |
1951 | case 2: { |
1952 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
1953 | |
1954 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1955 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
1956 | input, &float_ops_))); |
1957 | } else { |
1958 | goto handle_unusual; |
1959 | } |
1960 | break; |
1961 | } |
1962 | |
1963 | // repeated string types = 3; |
1964 | case 3: { |
1965 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
1966 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1967 | input, this->add_types())); |
1968 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1969 | this->types(this->types_size() - 1).data(), |
1970 | static_cast<int>(this->types(this->types_size() - 1).length()), |
1971 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1972 | "tensorflow.tfprof.OpLogEntry.types" )); |
1973 | } else { |
1974 | goto handle_unusual; |
1975 | } |
1976 | break; |
1977 | } |
1978 | |
1979 | // .tensorflow.tfprof.CodeDef code_def = 4; |
1980 | case 4: { |
1981 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
1982 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1983 | input, mutable_code_def())); |
1984 | } else { |
1985 | goto handle_unusual; |
1986 | } |
1987 | break; |
1988 | } |
1989 | |
1990 | default: { |
1991 | handle_unusual: |
1992 | if (tag == 0) { |
1993 | goto success; |
1994 | } |
1995 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1996 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1997 | break; |
1998 | } |
1999 | } |
2000 | } |
2001 | success: |
2002 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.OpLogEntry) |
2003 | return true; |
2004 | failure: |
2005 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.OpLogEntry) |
2006 | return false; |
2007 | #undef DO_ |
2008 | } |
2009 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2010 | |
2011 | void OpLogEntry::SerializeWithCachedSizes( |
2012 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2013 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.OpLogEntry) |
2014 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2015 | (void) cached_has_bits; |
2016 | |
2017 | // string name = 1; |
2018 | if (this->name().size() > 0) { |
2019 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2020 | this->name().data(), static_cast<int>(this->name().length()), |
2021 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2022 | "tensorflow.tfprof.OpLogEntry.name" ); |
2023 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
2024 | 1, this->name(), output); |
2025 | } |
2026 | |
2027 | // int64 float_ops = 2; |
2028 | if (this->float_ops() != 0) { |
2029 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->float_ops(), output); |
2030 | } |
2031 | |
2032 | // repeated string types = 3; |
2033 | for (int i = 0, n = this->types_size(); i < n; i++) { |
2034 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2035 | this->types(i).data(), static_cast<int>(this->types(i).length()), |
2036 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2037 | "tensorflow.tfprof.OpLogEntry.types" ); |
2038 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( |
2039 | 3, this->types(i), output); |
2040 | } |
2041 | |
2042 | // .tensorflow.tfprof.CodeDef code_def = 4; |
2043 | if (this->has_code_def()) { |
2044 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
2045 | 4, _Internal::code_def(this), output); |
2046 | } |
2047 | |
2048 | if (_internal_metadata_.have_unknown_fields()) { |
2049 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2050 | _internal_metadata_.unknown_fields(), output); |
2051 | } |
2052 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.OpLogEntry) |
2053 | } |
2054 | |
2055 | ::PROTOBUF_NAMESPACE_ID::uint8* OpLogEntry::InternalSerializeWithCachedSizesToArray( |
2056 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2057 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.OpLogEntry) |
2058 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2059 | (void) cached_has_bits; |
2060 | |
2061 | // string name = 1; |
2062 | if (this->name().size() > 0) { |
2063 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2064 | this->name().data(), static_cast<int>(this->name().length()), |
2065 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2066 | "tensorflow.tfprof.OpLogEntry.name" ); |
2067 | target = |
2068 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
2069 | 1, this->name(), target); |
2070 | } |
2071 | |
2072 | // int64 float_ops = 2; |
2073 | if (this->float_ops() != 0) { |
2074 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->float_ops(), target); |
2075 | } |
2076 | |
2077 | // repeated string types = 3; |
2078 | for (int i = 0, n = this->types_size(); i < n; i++) { |
2079 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2080 | this->types(i).data(), static_cast<int>(this->types(i).length()), |
2081 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2082 | "tensorflow.tfprof.OpLogEntry.types" ); |
2083 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2084 | WriteStringToArray(3, this->types(i), target); |
2085 | } |
2086 | |
2087 | // .tensorflow.tfprof.CodeDef code_def = 4; |
2088 | if (this->has_code_def()) { |
2089 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2090 | InternalWriteMessageToArray( |
2091 | 4, _Internal::code_def(this), target); |
2092 | } |
2093 | |
2094 | if (_internal_metadata_.have_unknown_fields()) { |
2095 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2096 | _internal_metadata_.unknown_fields(), target); |
2097 | } |
2098 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.OpLogEntry) |
2099 | return target; |
2100 | } |
2101 | |
2102 | size_t OpLogEntry::ByteSizeLong() const { |
2103 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.OpLogEntry) |
2104 | size_t total_size = 0; |
2105 | |
2106 | if (_internal_metadata_.have_unknown_fields()) { |
2107 | total_size += |
2108 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2109 | _internal_metadata_.unknown_fields()); |
2110 | } |
2111 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2112 | // Prevent compiler warnings about cached_has_bits being unused |
2113 | (void) cached_has_bits; |
2114 | |
2115 | // repeated string types = 3; |
2116 | total_size += 1 * |
2117 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->types_size()); |
2118 | for (int i = 0, n = this->types_size(); i < n; i++) { |
2119 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
2120 | this->types(i)); |
2121 | } |
2122 | |
2123 | // string name = 1; |
2124 | if (this->name().size() > 0) { |
2125 | total_size += 1 + |
2126 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
2127 | this->name()); |
2128 | } |
2129 | |
2130 | // .tensorflow.tfprof.CodeDef code_def = 4; |
2131 | if (this->has_code_def()) { |
2132 | total_size += 1 + |
2133 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2134 | *code_def_); |
2135 | } |
2136 | |
2137 | // int64 float_ops = 2; |
2138 | if (this->float_ops() != 0) { |
2139 | total_size += 1 + |
2140 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
2141 | this->float_ops()); |
2142 | } |
2143 | |
2144 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2145 | SetCachedSize(cached_size); |
2146 | return total_size; |
2147 | } |
2148 | |
2149 | void OpLogEntry::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2150 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.OpLogEntry) |
2151 | GOOGLE_DCHECK_NE(&from, this); |
2152 | const OpLogEntry* source = |
2153 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<OpLogEntry>( |
2154 | &from); |
2155 | if (source == nullptr) { |
2156 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.OpLogEntry) |
2157 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2158 | } else { |
2159 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.OpLogEntry) |
2160 | MergeFrom(*source); |
2161 | } |
2162 | } |
2163 | |
2164 | void OpLogEntry::MergeFrom(const OpLogEntry& from) { |
2165 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.OpLogEntry) |
2166 | GOOGLE_DCHECK_NE(&from, this); |
2167 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2168 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2169 | (void) cached_has_bits; |
2170 | |
2171 | types_.MergeFrom(from.types_); |
2172 | if (from.name().size() > 0) { |
2173 | |
2174 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
2175 | } |
2176 | if (from.has_code_def()) { |
2177 | mutable_code_def()->::tensorflow::tfprof::CodeDef::MergeFrom(from.code_def()); |
2178 | } |
2179 | if (from.float_ops() != 0) { |
2180 | set_float_ops(from.float_ops()); |
2181 | } |
2182 | } |
2183 | |
2184 | void OpLogEntry::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2185 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.OpLogEntry) |
2186 | if (&from == this) return; |
2187 | Clear(); |
2188 | MergeFrom(from); |
2189 | } |
2190 | |
2191 | void OpLogEntry::CopyFrom(const OpLogEntry& from) { |
2192 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.OpLogEntry) |
2193 | if (&from == this) return; |
2194 | Clear(); |
2195 | MergeFrom(from); |
2196 | } |
2197 | |
2198 | bool OpLogEntry::IsInitialized() const { |
2199 | return true; |
2200 | } |
2201 | |
2202 | void OpLogEntry::InternalSwap(OpLogEntry* other) { |
2203 | using std::swap; |
2204 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2205 | types_.InternalSwap(CastToBase(&other->types_)); |
2206 | name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
2207 | GetArenaNoVirtual()); |
2208 | swap(code_def_, other->code_def_); |
2209 | swap(float_ops_, other->float_ops_); |
2210 | } |
2211 | |
2212 | ::PROTOBUF_NAMESPACE_ID::Metadata OpLogEntry::GetMetadata() const { |
2213 | return GetMetadataStatic(); |
2214 | } |
2215 | |
2216 | |
2217 | // =================================================================== |
2218 | |
2219 | OpLogProto_IdToStringEntry_DoNotUse::OpLogProto_IdToStringEntry_DoNotUse() {} |
2220 | OpLogProto_IdToStringEntry_DoNotUse::OpLogProto_IdToStringEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
2221 | : SuperType(arena) {} |
2222 | void OpLogProto_IdToStringEntry_DoNotUse::MergeFrom(const OpLogProto_IdToStringEntry_DoNotUse& other) { |
2223 | MergeFromInternal(other); |
2224 | } |
2225 | ::PROTOBUF_NAMESPACE_ID::Metadata OpLogProto_IdToStringEntry_DoNotUse::GetMetadata() const { |
2226 | return GetMetadataStatic(); |
2227 | } |
2228 | void OpLogProto_IdToStringEntry_DoNotUse::MergeFrom( |
2229 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
2230 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
2231 | } |
2232 | |
2233 | |
2234 | // =================================================================== |
2235 | |
2236 | void OpLogProto::InitAsDefaultInstance() { |
2237 | } |
2238 | class OpLogProto::_Internal { |
2239 | public: |
2240 | }; |
2241 | |
2242 | OpLogProto::OpLogProto() |
2243 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2244 | SharedCtor(); |
2245 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.OpLogProto) |
2246 | } |
2247 | OpLogProto::OpLogProto(const OpLogProto& from) |
2248 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2249 | _internal_metadata_(nullptr), |
2250 | log_entries_(from.log_entries_) { |
2251 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2252 | id_to_string_.MergeFrom(from.id_to_string_); |
2253 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.OpLogProto) |
2254 | } |
2255 | |
2256 | void OpLogProto::SharedCtor() { |
2257 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_OpLogProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
2258 | } |
2259 | |
2260 | OpLogProto::~OpLogProto() { |
2261 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.OpLogProto) |
2262 | SharedDtor(); |
2263 | } |
2264 | |
2265 | void OpLogProto::SharedDtor() { |
2266 | } |
2267 | |
2268 | void OpLogProto::SetCachedSize(int size) const { |
2269 | _cached_size_.Set(size); |
2270 | } |
2271 | const OpLogProto& OpLogProto::default_instance() { |
2272 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_OpLogProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
2273 | return *internal_default_instance(); |
2274 | } |
2275 | |
2276 | |
2277 | void OpLogProto::Clear() { |
2278 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.OpLogProto) |
2279 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2280 | // Prevent compiler warnings about cached_has_bits being unused |
2281 | (void) cached_has_bits; |
2282 | |
2283 | log_entries_.Clear(); |
2284 | id_to_string_.Clear(); |
2285 | _internal_metadata_.Clear(); |
2286 | } |
2287 | |
2288 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2289 | const char* OpLogProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2290 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2291 | while (!ctx->Done(&ptr)) { |
2292 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2293 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2294 | CHK_(ptr); |
2295 | switch (tag >> 3) { |
2296 | // repeated .tensorflow.tfprof.OpLogEntry log_entries = 1; |
2297 | case 1: |
2298 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
2299 | ptr -= 1; |
2300 | do { |
2301 | ptr += 1; |
2302 | ptr = ctx->ParseMessage(add_log_entries(), ptr); |
2303 | CHK_(ptr); |
2304 | if (!ctx->DataAvailable(ptr)) break; |
2305 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
2306 | } else goto handle_unusual; |
2307 | continue; |
2308 | // map<int64, string> id_to_string = 2; |
2309 | case 2: |
2310 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
2311 | ptr -= 1; |
2312 | do { |
2313 | ptr += 1; |
2314 | ptr = ctx->ParseMessage(&id_to_string_, ptr); |
2315 | CHK_(ptr); |
2316 | if (!ctx->DataAvailable(ptr)) break; |
2317 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); |
2318 | } else goto handle_unusual; |
2319 | continue; |
2320 | default: { |
2321 | handle_unusual: |
2322 | if ((tag & 7) == 4 || tag == 0) { |
2323 | ctx->SetLastTag(tag); |
2324 | goto success; |
2325 | } |
2326 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2327 | CHK_(ptr != nullptr); |
2328 | continue; |
2329 | } |
2330 | } // switch |
2331 | } // while |
2332 | success: |
2333 | return ptr; |
2334 | failure: |
2335 | ptr = nullptr; |
2336 | goto success; |
2337 | #undef CHK_ |
2338 | } |
2339 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2340 | bool OpLogProto::MergePartialFromCodedStream( |
2341 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2342 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2343 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2344 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.OpLogProto) |
2345 | for (;;) { |
2346 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2347 | tag = p.first; |
2348 | if (!p.second) goto handle_unusual; |
2349 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2350 | // repeated .tensorflow.tfprof.OpLogEntry log_entries = 1; |
2351 | case 1: { |
2352 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
2353 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
2354 | input, add_log_entries())); |
2355 | } else { |
2356 | goto handle_unusual; |
2357 | } |
2358 | break; |
2359 | } |
2360 | |
2361 | // map<int64, string> id_to_string = 2; |
2362 | case 2: { |
2363 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
2364 | OpLogProto_IdToStringEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
2365 | OpLogProto_IdToStringEntry_DoNotUse, |
2366 | ::PROTOBUF_NAMESPACE_ID::int64, std::string, |
2367 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, |
2368 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, |
2369 | 0 >, |
2370 | ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string > > parser(&id_to_string_); |
2371 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
2372 | input, &parser)); |
2373 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2374 | parser.value().data(), static_cast<int>(parser.value().length()), |
2375 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
2376 | "tensorflow.tfprof.OpLogProto.IdToStringEntry.value" )); |
2377 | } else { |
2378 | goto handle_unusual; |
2379 | } |
2380 | break; |
2381 | } |
2382 | |
2383 | default: { |
2384 | handle_unusual: |
2385 | if (tag == 0) { |
2386 | goto success; |
2387 | } |
2388 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2389 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2390 | break; |
2391 | } |
2392 | } |
2393 | } |
2394 | success: |
2395 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.OpLogProto) |
2396 | return true; |
2397 | failure: |
2398 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.OpLogProto) |
2399 | return false; |
2400 | #undef DO_ |
2401 | } |
2402 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2403 | |
2404 | void OpLogProto::SerializeWithCachedSizes( |
2405 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2406 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.OpLogProto) |
2407 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2408 | (void) cached_has_bits; |
2409 | |
2410 | // repeated .tensorflow.tfprof.OpLogEntry log_entries = 1; |
2411 | for (unsigned int i = 0, |
2412 | n = static_cast<unsigned int>(this->log_entries_size()); i < n; i++) { |
2413 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
2414 | 1, |
2415 | this->log_entries(static_cast<int>(i)), |
2416 | output); |
2417 | } |
2418 | |
2419 | // map<int64, string> id_to_string = 2; |
2420 | if (!this->id_to_string().empty()) { |
2421 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_pointer |
2422 | ConstPtr; |
2423 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int64, ConstPtr > SortItem; |
2424 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
2425 | struct Utf8Check { |
2426 | static void Check(ConstPtr p) { |
2427 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2428 | p->second.data(), static_cast<int>(p->second.length()), |
2429 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2430 | "tensorflow.tfprof.OpLogProto.IdToStringEntry.value" ); |
2431 | } |
2432 | }; |
2433 | |
2434 | if (output->IsSerializationDeterministic() && |
2435 | this->id_to_string().size() > 1) { |
2436 | ::std::unique_ptr<SortItem[]> items( |
2437 | new SortItem[this->id_to_string().size()]); |
2438 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::size_type size_type; |
2439 | size_type n = 0; |
2440 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_iterator |
2441 | it = this->id_to_string().begin(); |
2442 | it != this->id_to_string().end(); ++it, ++n) { |
2443 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
2444 | } |
2445 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
2446 | for (size_type i = 0; i < n; i++) { |
2447 | OpLogProto_IdToStringEntry_DoNotUse::Funcs::SerializeToCodedStream(2, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, output); |
2448 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)].second)); |
2449 | } |
2450 | } else { |
2451 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_iterator |
2452 | it = this->id_to_string().begin(); |
2453 | it != this->id_to_string().end(); ++it) { |
2454 | OpLogProto_IdToStringEntry_DoNotUse::Funcs::SerializeToCodedStream(2, it->first, it->second, output); |
2455 | Utf8Check::Check(&(*it)); |
2456 | } |
2457 | } |
2458 | } |
2459 | |
2460 | if (_internal_metadata_.have_unknown_fields()) { |
2461 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2462 | _internal_metadata_.unknown_fields(), output); |
2463 | } |
2464 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.OpLogProto) |
2465 | } |
2466 | |
2467 | ::PROTOBUF_NAMESPACE_ID::uint8* OpLogProto::InternalSerializeWithCachedSizesToArray( |
2468 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2469 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.OpLogProto) |
2470 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2471 | (void) cached_has_bits; |
2472 | |
2473 | // repeated .tensorflow.tfprof.OpLogEntry log_entries = 1; |
2474 | for (unsigned int i = 0, |
2475 | n = static_cast<unsigned int>(this->log_entries_size()); i < n; i++) { |
2476 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
2477 | InternalWriteMessageToArray( |
2478 | 1, this->log_entries(static_cast<int>(i)), target); |
2479 | } |
2480 | |
2481 | // map<int64, string> id_to_string = 2; |
2482 | if (!this->id_to_string().empty()) { |
2483 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_pointer |
2484 | ConstPtr; |
2485 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int64, ConstPtr > SortItem; |
2486 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
2487 | struct Utf8Check { |
2488 | static void Check(ConstPtr p) { |
2489 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2490 | p->second.data(), static_cast<int>(p->second.length()), |
2491 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2492 | "tensorflow.tfprof.OpLogProto.IdToStringEntry.value" ); |
2493 | } |
2494 | }; |
2495 | |
2496 | if (false && |
2497 | this->id_to_string().size() > 1) { |
2498 | ::std::unique_ptr<SortItem[]> items( |
2499 | new SortItem[this->id_to_string().size()]); |
2500 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::size_type size_type; |
2501 | size_type n = 0; |
2502 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_iterator |
2503 | it = this->id_to_string().begin(); |
2504 | it != this->id_to_string().end(); ++it, ++n) { |
2505 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
2506 | } |
2507 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
2508 | for (size_type i = 0; i < n; i++) { |
2509 | target = OpLogProto_IdToStringEntry_DoNotUse::Funcs::SerializeToArray(2, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, target); |
2510 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)].second)); |
2511 | } |
2512 | } else { |
2513 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_iterator |
2514 | it = this->id_to_string().begin(); |
2515 | it != this->id_to_string().end(); ++it) { |
2516 | target = OpLogProto_IdToStringEntry_DoNotUse::Funcs::SerializeToArray(2, it->first, it->second, target); |
2517 | Utf8Check::Check(&(*it)); |
2518 | } |
2519 | } |
2520 | } |
2521 | |
2522 | if (_internal_metadata_.have_unknown_fields()) { |
2523 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2524 | _internal_metadata_.unknown_fields(), target); |
2525 | } |
2526 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.OpLogProto) |
2527 | return target; |
2528 | } |
2529 | |
2530 | size_t OpLogProto::ByteSizeLong() const { |
2531 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.OpLogProto) |
2532 | size_t total_size = 0; |
2533 | |
2534 | if (_internal_metadata_.have_unknown_fields()) { |
2535 | total_size += |
2536 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2537 | _internal_metadata_.unknown_fields()); |
2538 | } |
2539 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2540 | // Prevent compiler warnings about cached_has_bits being unused |
2541 | (void) cached_has_bits; |
2542 | |
2543 | // repeated .tensorflow.tfprof.OpLogEntry log_entries = 1; |
2544 | { |
2545 | unsigned int count = static_cast<unsigned int>(this->log_entries_size()); |
2546 | total_size += 1UL * count; |
2547 | for (unsigned int i = 0; i < count; i++) { |
2548 | total_size += |
2549 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
2550 | this->log_entries(static_cast<int>(i))); |
2551 | } |
2552 | } |
2553 | |
2554 | // map<int64, string> id_to_string = 2; |
2555 | total_size += 1 * |
2556 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->id_to_string_size()); |
2557 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_iterator |
2558 | it = this->id_to_string().begin(); |
2559 | it != this->id_to_string().end(); ++it) { |
2560 | total_size += OpLogProto_IdToStringEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
2561 | } |
2562 | |
2563 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2564 | SetCachedSize(cached_size); |
2565 | return total_size; |
2566 | } |
2567 | |
2568 | void OpLogProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2569 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.OpLogProto) |
2570 | GOOGLE_DCHECK_NE(&from, this); |
2571 | const OpLogProto* source = |
2572 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<OpLogProto>( |
2573 | &from); |
2574 | if (source == nullptr) { |
2575 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.OpLogProto) |
2576 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2577 | } else { |
2578 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.OpLogProto) |
2579 | MergeFrom(*source); |
2580 | } |
2581 | } |
2582 | |
2583 | void OpLogProto::MergeFrom(const OpLogProto& from) { |
2584 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.OpLogProto) |
2585 | GOOGLE_DCHECK_NE(&from, this); |
2586 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2587 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2588 | (void) cached_has_bits; |
2589 | |
2590 | log_entries_.MergeFrom(from.log_entries_); |
2591 | id_to_string_.MergeFrom(from.id_to_string_); |
2592 | } |
2593 | |
2594 | void OpLogProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2595 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.OpLogProto) |
2596 | if (&from == this) return; |
2597 | Clear(); |
2598 | MergeFrom(from); |
2599 | } |
2600 | |
2601 | void OpLogProto::CopyFrom(const OpLogProto& from) { |
2602 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.OpLogProto) |
2603 | if (&from == this) return; |
2604 | Clear(); |
2605 | MergeFrom(from); |
2606 | } |
2607 | |
2608 | bool OpLogProto::IsInitialized() const { |
2609 | return true; |
2610 | } |
2611 | |
2612 | void OpLogProto::InternalSwap(OpLogProto* other) { |
2613 | using std::swap; |
2614 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2615 | CastToBase(&log_entries_)->InternalSwap(CastToBase(&other->log_entries_)); |
2616 | id_to_string_.Swap(&other->id_to_string_); |
2617 | } |
2618 | |
2619 | ::PROTOBUF_NAMESPACE_ID::Metadata OpLogProto::GetMetadata() const { |
2620 | return GetMetadataStatic(); |
2621 | } |
2622 | |
2623 | |
2624 | // =================================================================== |
2625 | |
2626 | ProfileProto_NodesEntry_DoNotUse::ProfileProto_NodesEntry_DoNotUse() {} |
2627 | ProfileProto_NodesEntry_DoNotUse::ProfileProto_NodesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
2628 | : SuperType(arena) {} |
2629 | void ProfileProto_NodesEntry_DoNotUse::MergeFrom(const ProfileProto_NodesEntry_DoNotUse& other) { |
2630 | MergeFromInternal(other); |
2631 | } |
2632 | ::PROTOBUF_NAMESPACE_ID::Metadata ProfileProto_NodesEntry_DoNotUse::GetMetadata() const { |
2633 | return GetMetadataStatic(); |
2634 | } |
2635 | void ProfileProto_NodesEntry_DoNotUse::MergeFrom( |
2636 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
2637 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
2638 | } |
2639 | |
2640 | |
2641 | // =================================================================== |
2642 | |
2643 | ProfileProto_IdToStringEntry_DoNotUse::ProfileProto_IdToStringEntry_DoNotUse() {} |
2644 | ProfileProto_IdToStringEntry_DoNotUse::ProfileProto_IdToStringEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
2645 | : SuperType(arena) {} |
2646 | void ProfileProto_IdToStringEntry_DoNotUse::MergeFrom(const ProfileProto_IdToStringEntry_DoNotUse& other) { |
2647 | MergeFromInternal(other); |
2648 | } |
2649 | ::PROTOBUF_NAMESPACE_ID::Metadata ProfileProto_IdToStringEntry_DoNotUse::GetMetadata() const { |
2650 | return GetMetadataStatic(); |
2651 | } |
2652 | void ProfileProto_IdToStringEntry_DoNotUse::MergeFrom( |
2653 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
2654 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
2655 | } |
2656 | |
2657 | |
2658 | // =================================================================== |
2659 | |
2660 | void ProfileProto::InitAsDefaultInstance() { |
2661 | } |
2662 | class ProfileProto::_Internal { |
2663 | public: |
2664 | }; |
2665 | |
2666 | ProfileProto::ProfileProto() |
2667 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2668 | SharedCtor(); |
2669 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.ProfileProto) |
2670 | } |
2671 | ProfileProto::ProfileProto(const ProfileProto& from) |
2672 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2673 | _internal_metadata_(nullptr), |
2674 | steps_(from.steps_) { |
2675 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2676 | nodes_.MergeFrom(from.nodes_); |
2677 | id_to_string_.MergeFrom(from.id_to_string_); |
2678 | ::memcpy(&has_trace_, &from.has_trace_, |
2679 | static_cast<size_t>(reinterpret_cast<char*>(&miss_accelerator_stream_) - |
2680 | reinterpret_cast<char*>(&has_trace_)) + sizeof(miss_accelerator_stream_)); |
2681 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.ProfileProto) |
2682 | } |
2683 | |
2684 | void ProfileProto::SharedCtor() { |
2685 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ProfileProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
2686 | ::memset(&has_trace_, 0, static_cast<size_t>( |
2687 | reinterpret_cast<char*>(&miss_accelerator_stream_) - |
2688 | reinterpret_cast<char*>(&has_trace_)) + sizeof(miss_accelerator_stream_)); |
2689 | } |
2690 | |
2691 | ProfileProto::~ProfileProto() { |
2692 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.ProfileProto) |
2693 | SharedDtor(); |
2694 | } |
2695 | |
2696 | void ProfileProto::SharedDtor() { |
2697 | } |
2698 | |
2699 | void ProfileProto::SetCachedSize(int size) const { |
2700 | _cached_size_.Set(size); |
2701 | } |
2702 | const ProfileProto& ProfileProto::default_instance() { |
2703 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ProfileProto_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
2704 | return *internal_default_instance(); |
2705 | } |
2706 | |
2707 | |
2708 | void ProfileProto::Clear() { |
2709 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.ProfileProto) |
2710 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2711 | // Prevent compiler warnings about cached_has_bits being unused |
2712 | (void) cached_has_bits; |
2713 | |
2714 | nodes_.Clear(); |
2715 | steps_.Clear(); |
2716 | id_to_string_.Clear(); |
2717 | ::memset(&has_trace_, 0, static_cast<size_t>( |
2718 | reinterpret_cast<char*>(&miss_accelerator_stream_) - |
2719 | reinterpret_cast<char*>(&has_trace_)) + sizeof(miss_accelerator_stream_)); |
2720 | _internal_metadata_.Clear(); |
2721 | } |
2722 | |
2723 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2724 | const char* ProfileProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2725 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2726 | while (!ctx->Done(&ptr)) { |
2727 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2728 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2729 | CHK_(ptr); |
2730 | switch (tag >> 3) { |
2731 | // map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1; |
2732 | case 1: |
2733 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
2734 | ptr -= 1; |
2735 | do { |
2736 | ptr += 1; |
2737 | ptr = ctx->ParseMessage(&nodes_, ptr); |
2738 | CHK_(ptr); |
2739 | if (!ctx->DataAvailable(ptr)) break; |
2740 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
2741 | } else goto handle_unusual; |
2742 | continue; |
2743 | // bool has_trace = 2; |
2744 | case 2: |
2745 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
2746 | has_trace_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2747 | CHK_(ptr); |
2748 | } else goto handle_unusual; |
2749 | continue; |
2750 | // repeated int64 steps = 3; |
2751 | case 3: |
2752 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
2753 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_steps(), ptr, ctx); |
2754 | CHK_(ptr); |
2755 | } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24) { |
2756 | add_steps(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
2757 | CHK_(ptr); |
2758 | } else goto handle_unusual; |
2759 | continue; |
2760 | // map<int64, string> id_to_string = 4; |
2761 | case 4: |
2762 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
2763 | ptr -= 1; |
2764 | do { |
2765 | ptr += 1; |
2766 | ptr = ctx->ParseMessage(&id_to_string_, ptr); |
2767 | CHK_(ptr); |
2768 | if (!ctx->DataAvailable(ptr)) break; |
2769 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); |
2770 | } else goto handle_unusual; |
2771 | continue; |
2772 | // bool miss_accelerator_stream = 5; |
2773 | case 5: |
2774 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { |
2775 | miss_accelerator_stream_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2776 | CHK_(ptr); |
2777 | } else goto handle_unusual; |
2778 | continue; |
2779 | default: { |
2780 | handle_unusual: |
2781 | if ((tag & 7) == 4 || tag == 0) { |
2782 | ctx->SetLastTag(tag); |
2783 | goto success; |
2784 | } |
2785 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2786 | CHK_(ptr != nullptr); |
2787 | continue; |
2788 | } |
2789 | } // switch |
2790 | } // while |
2791 | success: |
2792 | return ptr; |
2793 | failure: |
2794 | ptr = nullptr; |
2795 | goto success; |
2796 | #undef CHK_ |
2797 | } |
2798 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2799 | bool ProfileProto::MergePartialFromCodedStream( |
2800 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2801 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2802 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2803 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.ProfileProto) |
2804 | for (;;) { |
2805 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2806 | tag = p.first; |
2807 | if (!p.second) goto handle_unusual; |
2808 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2809 | // map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1; |
2810 | case 1: { |
2811 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
2812 | ProfileProto_NodesEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
2813 | ProfileProto_NodesEntry_DoNotUse, |
2814 | ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ProfileNode, |
2815 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, |
2816 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
2817 | 0 >, |
2818 | ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ProfileNode > > parser(&nodes_); |
2819 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
2820 | input, &parser)); |
2821 | } else { |
2822 | goto handle_unusual; |
2823 | } |
2824 | break; |
2825 | } |
2826 | |
2827 | // bool has_trace = 2; |
2828 | case 2: { |
2829 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
2830 | |
2831 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2832 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2833 | input, &has_trace_))); |
2834 | } else { |
2835 | goto handle_unusual; |
2836 | } |
2837 | break; |
2838 | } |
2839 | |
2840 | // repeated int64 steps = 3; |
2841 | case 3: { |
2842 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
2843 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< |
2844 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
2845 | input, this->mutable_steps()))); |
2846 | } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
2847 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
2848 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
2849 | 1, 26u, input, this->mutable_steps()))); |
2850 | } else { |
2851 | goto handle_unusual; |
2852 | } |
2853 | break; |
2854 | } |
2855 | |
2856 | // map<int64, string> id_to_string = 4; |
2857 | case 4: { |
2858 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
2859 | ProfileProto_IdToStringEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
2860 | ProfileProto_IdToStringEntry_DoNotUse, |
2861 | ::PROTOBUF_NAMESPACE_ID::int64, std::string, |
2862 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, |
2863 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, |
2864 | 0 >, |
2865 | ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string > > parser(&id_to_string_); |
2866 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
2867 | input, &parser)); |
2868 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2869 | parser.value().data(), static_cast<int>(parser.value().length()), |
2870 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
2871 | "tensorflow.tfprof.ProfileProto.IdToStringEntry.value" )); |
2872 | } else { |
2873 | goto handle_unusual; |
2874 | } |
2875 | break; |
2876 | } |
2877 | |
2878 | // bool miss_accelerator_stream = 5; |
2879 | case 5: { |
2880 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { |
2881 | |
2882 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2883 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
2884 | input, &miss_accelerator_stream_))); |
2885 | } else { |
2886 | goto handle_unusual; |
2887 | } |
2888 | break; |
2889 | } |
2890 | |
2891 | default: { |
2892 | handle_unusual: |
2893 | if (tag == 0) { |
2894 | goto success; |
2895 | } |
2896 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2897 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2898 | break; |
2899 | } |
2900 | } |
2901 | } |
2902 | success: |
2903 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.ProfileProto) |
2904 | return true; |
2905 | failure: |
2906 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.ProfileProto) |
2907 | return false; |
2908 | #undef DO_ |
2909 | } |
2910 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2911 | |
2912 | void ProfileProto::SerializeWithCachedSizes( |
2913 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2914 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.ProfileProto) |
2915 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2916 | (void) cached_has_bits; |
2917 | |
2918 | // map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1; |
2919 | if (!this->nodes().empty()) { |
2920 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ProfileNode >::const_pointer |
2921 | ConstPtr; |
2922 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int64, ConstPtr > SortItem; |
2923 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
2924 | |
2925 | if (output->IsSerializationDeterministic() && |
2926 | this->nodes().size() > 1) { |
2927 | ::std::unique_ptr<SortItem[]> items( |
2928 | new SortItem[this->nodes().size()]); |
2929 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ProfileNode >::size_type size_type; |
2930 | size_type n = 0; |
2931 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ProfileNode >::const_iterator |
2932 | it = this->nodes().begin(); |
2933 | it != this->nodes().end(); ++it, ++n) { |
2934 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
2935 | } |
2936 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
2937 | for (size_type i = 0; i < n; i++) { |
2938 | ProfileProto_NodesEntry_DoNotUse::Funcs::SerializeToCodedStream(1, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, output); |
2939 | } |
2940 | } else { |
2941 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ProfileNode >::const_iterator |
2942 | it = this->nodes().begin(); |
2943 | it != this->nodes().end(); ++it) { |
2944 | ProfileProto_NodesEntry_DoNotUse::Funcs::SerializeToCodedStream(1, it->first, it->second, output); |
2945 | } |
2946 | } |
2947 | } |
2948 | |
2949 | // bool has_trace = 2; |
2950 | if (this->has_trace() != 0) { |
2951 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(2, this->has_trace(), output); |
2952 | } |
2953 | |
2954 | // repeated int64 steps = 3; |
2955 | if (this->steps_size() > 0) { |
2956 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(3, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
2957 | output->WriteVarint32(_steps_cached_byte_size_.load( |
2958 | std::memory_order_relaxed)); |
2959 | } |
2960 | for (int i = 0, n = this->steps_size(); i < n; i++) { |
2961 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64NoTag( |
2962 | this->steps(i), output); |
2963 | } |
2964 | |
2965 | // map<int64, string> id_to_string = 4; |
2966 | if (!this->id_to_string().empty()) { |
2967 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_pointer |
2968 | ConstPtr; |
2969 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int64, ConstPtr > SortItem; |
2970 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
2971 | struct Utf8Check { |
2972 | static void Check(ConstPtr p) { |
2973 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2974 | p->second.data(), static_cast<int>(p->second.length()), |
2975 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2976 | "tensorflow.tfprof.ProfileProto.IdToStringEntry.value" ); |
2977 | } |
2978 | }; |
2979 | |
2980 | if (output->IsSerializationDeterministic() && |
2981 | this->id_to_string().size() > 1) { |
2982 | ::std::unique_ptr<SortItem[]> items( |
2983 | new SortItem[this->id_to_string().size()]); |
2984 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::size_type size_type; |
2985 | size_type n = 0; |
2986 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_iterator |
2987 | it = this->id_to_string().begin(); |
2988 | it != this->id_to_string().end(); ++it, ++n) { |
2989 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
2990 | } |
2991 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
2992 | for (size_type i = 0; i < n; i++) { |
2993 | ProfileProto_IdToStringEntry_DoNotUse::Funcs::SerializeToCodedStream(4, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, output); |
2994 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)].second)); |
2995 | } |
2996 | } else { |
2997 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_iterator |
2998 | it = this->id_to_string().begin(); |
2999 | it != this->id_to_string().end(); ++it) { |
3000 | ProfileProto_IdToStringEntry_DoNotUse::Funcs::SerializeToCodedStream(4, it->first, it->second, output); |
3001 | Utf8Check::Check(&(*it)); |
3002 | } |
3003 | } |
3004 | } |
3005 | |
3006 | // bool miss_accelerator_stream = 5; |
3007 | if (this->miss_accelerator_stream() != 0) { |
3008 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(5, this->miss_accelerator_stream(), output); |
3009 | } |
3010 | |
3011 | if (_internal_metadata_.have_unknown_fields()) { |
3012 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3013 | _internal_metadata_.unknown_fields(), output); |
3014 | } |
3015 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.ProfileProto) |
3016 | } |
3017 | |
3018 | ::PROTOBUF_NAMESPACE_ID::uint8* ProfileProto::InternalSerializeWithCachedSizesToArray( |
3019 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3020 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.ProfileProto) |
3021 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3022 | (void) cached_has_bits; |
3023 | |
3024 | // map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1; |
3025 | if (!this->nodes().empty()) { |
3026 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ProfileNode >::const_pointer |
3027 | ConstPtr; |
3028 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int64, ConstPtr > SortItem; |
3029 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
3030 | |
3031 | if (false && |
3032 | this->nodes().size() > 1) { |
3033 | ::std::unique_ptr<SortItem[]> items( |
3034 | new SortItem[this->nodes().size()]); |
3035 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ProfileNode >::size_type size_type; |
3036 | size_type n = 0; |
3037 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ProfileNode >::const_iterator |
3038 | it = this->nodes().begin(); |
3039 | it != this->nodes().end(); ++it, ++n) { |
3040 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
3041 | } |
3042 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
3043 | for (size_type i = 0; i < n; i++) { |
3044 | target = ProfileProto_NodesEntry_DoNotUse::Funcs::SerializeToArray(1, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, target); |
3045 | } |
3046 | } else { |
3047 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ProfileNode >::const_iterator |
3048 | it = this->nodes().begin(); |
3049 | it != this->nodes().end(); ++it) { |
3050 | target = ProfileProto_NodesEntry_DoNotUse::Funcs::SerializeToArray(1, it->first, it->second, target); |
3051 | } |
3052 | } |
3053 | } |
3054 | |
3055 | // bool has_trace = 2; |
3056 | if (this->has_trace() != 0) { |
3057 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->has_trace(), target); |
3058 | } |
3059 | |
3060 | // repeated int64 steps = 3; |
3061 | if (this->steps_size() > 0) { |
3062 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( |
3063 | 3, |
3064 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
3065 | target); |
3066 | target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( |
3067 | _steps_cached_byte_size_.load(std::memory_order_relaxed), |
3068 | target); |
3069 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3070 | WriteInt64NoTagToArray(this->steps_, target); |
3071 | } |
3072 | |
3073 | // map<int64, string> id_to_string = 4; |
3074 | if (!this->id_to_string().empty()) { |
3075 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_pointer |
3076 | ConstPtr; |
3077 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int64, ConstPtr > SortItem; |
3078 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
3079 | struct Utf8Check { |
3080 | static void Check(ConstPtr p) { |
3081 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3082 | p->second.data(), static_cast<int>(p->second.length()), |
3083 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3084 | "tensorflow.tfprof.ProfileProto.IdToStringEntry.value" ); |
3085 | } |
3086 | }; |
3087 | |
3088 | if (false && |
3089 | this->id_to_string().size() > 1) { |
3090 | ::std::unique_ptr<SortItem[]> items( |
3091 | new SortItem[this->id_to_string().size()]); |
3092 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::size_type size_type; |
3093 | size_type n = 0; |
3094 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_iterator |
3095 | it = this->id_to_string().begin(); |
3096 | it != this->id_to_string().end(); ++it, ++n) { |
3097 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
3098 | } |
3099 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
3100 | for (size_type i = 0; i < n; i++) { |
3101 | target = ProfileProto_IdToStringEntry_DoNotUse::Funcs::SerializeToArray(4, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, target); |
3102 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)].second)); |
3103 | } |
3104 | } else { |
3105 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_iterator |
3106 | it = this->id_to_string().begin(); |
3107 | it != this->id_to_string().end(); ++it) { |
3108 | target = ProfileProto_IdToStringEntry_DoNotUse::Funcs::SerializeToArray(4, it->first, it->second, target); |
3109 | Utf8Check::Check(&(*it)); |
3110 | } |
3111 | } |
3112 | } |
3113 | |
3114 | // bool miss_accelerator_stream = 5; |
3115 | if (this->miss_accelerator_stream() != 0) { |
3116 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->miss_accelerator_stream(), target); |
3117 | } |
3118 | |
3119 | if (_internal_metadata_.have_unknown_fields()) { |
3120 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3121 | _internal_metadata_.unknown_fields(), target); |
3122 | } |
3123 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.ProfileProto) |
3124 | return target; |
3125 | } |
3126 | |
3127 | size_t ProfileProto::ByteSizeLong() const { |
3128 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.ProfileProto) |
3129 | size_t total_size = 0; |
3130 | |
3131 | if (_internal_metadata_.have_unknown_fields()) { |
3132 | total_size += |
3133 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3134 | _internal_metadata_.unknown_fields()); |
3135 | } |
3136 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3137 | // Prevent compiler warnings about cached_has_bits being unused |
3138 | (void) cached_has_bits; |
3139 | |
3140 | // map<int64, .tensorflow.tfprof.ProfileNode> nodes = 1; |
3141 | total_size += 1 * |
3142 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->nodes_size()); |
3143 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ProfileNode >::const_iterator |
3144 | it = this->nodes().begin(); |
3145 | it != this->nodes().end(); ++it) { |
3146 | total_size += ProfileProto_NodesEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
3147 | } |
3148 | |
3149 | // repeated int64 steps = 3; |
3150 | { |
3151 | size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3152 | Int64Size(this->steps_); |
3153 | if (data_size > 0) { |
3154 | total_size += 1 + |
3155 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
3156 | static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); |
3157 | } |
3158 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); |
3159 | _steps_cached_byte_size_.store(cached_size, |
3160 | std::memory_order_relaxed); |
3161 | total_size += data_size; |
3162 | } |
3163 | |
3164 | // map<int64, string> id_to_string = 4; |
3165 | total_size += 1 * |
3166 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->id_to_string_size()); |
3167 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, std::string >::const_iterator |
3168 | it = this->id_to_string().begin(); |
3169 | it != this->id_to_string().end(); ++it) { |
3170 | total_size += ProfileProto_IdToStringEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
3171 | } |
3172 | |
3173 | // bool has_trace = 2; |
3174 | if (this->has_trace() != 0) { |
3175 | total_size += 1 + 1; |
3176 | } |
3177 | |
3178 | // bool miss_accelerator_stream = 5; |
3179 | if (this->miss_accelerator_stream() != 0) { |
3180 | total_size += 1 + 1; |
3181 | } |
3182 | |
3183 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3184 | SetCachedSize(cached_size); |
3185 | return total_size; |
3186 | } |
3187 | |
3188 | void ProfileProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3189 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.ProfileProto) |
3190 | GOOGLE_DCHECK_NE(&from, this); |
3191 | const ProfileProto* source = |
3192 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ProfileProto>( |
3193 | &from); |
3194 | if (source == nullptr) { |
3195 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.ProfileProto) |
3196 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3197 | } else { |
3198 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.ProfileProto) |
3199 | MergeFrom(*source); |
3200 | } |
3201 | } |
3202 | |
3203 | void ProfileProto::MergeFrom(const ProfileProto& from) { |
3204 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.ProfileProto) |
3205 | GOOGLE_DCHECK_NE(&from, this); |
3206 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3207 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3208 | (void) cached_has_bits; |
3209 | |
3210 | nodes_.MergeFrom(from.nodes_); |
3211 | steps_.MergeFrom(from.steps_); |
3212 | id_to_string_.MergeFrom(from.id_to_string_); |
3213 | if (from.has_trace() != 0) { |
3214 | set_has_trace(from.has_trace()); |
3215 | } |
3216 | if (from.miss_accelerator_stream() != 0) { |
3217 | set_miss_accelerator_stream(from.miss_accelerator_stream()); |
3218 | } |
3219 | } |
3220 | |
3221 | void ProfileProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3222 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.ProfileProto) |
3223 | if (&from == this) return; |
3224 | Clear(); |
3225 | MergeFrom(from); |
3226 | } |
3227 | |
3228 | void ProfileProto::CopyFrom(const ProfileProto& from) { |
3229 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.ProfileProto) |
3230 | if (&from == this) return; |
3231 | Clear(); |
3232 | MergeFrom(from); |
3233 | } |
3234 | |
3235 | bool ProfileProto::IsInitialized() const { |
3236 | return true; |
3237 | } |
3238 | |
3239 | void ProfileProto::InternalSwap(ProfileProto* other) { |
3240 | using std::swap; |
3241 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3242 | nodes_.Swap(&other->nodes_); |
3243 | steps_.InternalSwap(&other->steps_); |
3244 | id_to_string_.Swap(&other->id_to_string_); |
3245 | swap(has_trace_, other->has_trace_); |
3246 | swap(miss_accelerator_stream_, other->miss_accelerator_stream_); |
3247 | } |
3248 | |
3249 | ::PROTOBUF_NAMESPACE_ID::Metadata ProfileProto::GetMetadata() const { |
3250 | return GetMetadataStatic(); |
3251 | } |
3252 | |
3253 | |
3254 | // =================================================================== |
3255 | |
3256 | ProfileNode_InputsEntry_DoNotUse::ProfileNode_InputsEntry_DoNotUse() {} |
3257 | ProfileNode_InputsEntry_DoNotUse::ProfileNode_InputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3258 | : SuperType(arena) {} |
3259 | void ProfileNode_InputsEntry_DoNotUse::MergeFrom(const ProfileNode_InputsEntry_DoNotUse& other) { |
3260 | MergeFromInternal(other); |
3261 | } |
3262 | ::PROTOBUF_NAMESPACE_ID::Metadata ProfileNode_InputsEntry_DoNotUse::GetMetadata() const { |
3263 | return GetMetadataStatic(); |
3264 | } |
3265 | void ProfileNode_InputsEntry_DoNotUse::MergeFrom( |
3266 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
3267 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
3268 | } |
3269 | |
3270 | |
3271 | // =================================================================== |
3272 | |
3273 | ProfileNode_InputShapesEntry_DoNotUse::ProfileNode_InputShapesEntry_DoNotUse() {} |
3274 | ProfileNode_InputShapesEntry_DoNotUse::ProfileNode_InputShapesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3275 | : SuperType(arena) {} |
3276 | void ProfileNode_InputShapesEntry_DoNotUse::MergeFrom(const ProfileNode_InputShapesEntry_DoNotUse& other) { |
3277 | MergeFromInternal(other); |
3278 | } |
3279 | ::PROTOBUF_NAMESPACE_ID::Metadata ProfileNode_InputShapesEntry_DoNotUse::GetMetadata() const { |
3280 | return GetMetadataStatic(); |
3281 | } |
3282 | void ProfileNode_InputShapesEntry_DoNotUse::MergeFrom( |
3283 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
3284 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
3285 | } |
3286 | |
3287 | |
3288 | // =================================================================== |
3289 | |
3290 | ProfileNode_OutputsEntry_DoNotUse::ProfileNode_OutputsEntry_DoNotUse() {} |
3291 | ProfileNode_OutputsEntry_DoNotUse::ProfileNode_OutputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3292 | : SuperType(arena) {} |
3293 | void ProfileNode_OutputsEntry_DoNotUse::MergeFrom(const ProfileNode_OutputsEntry_DoNotUse& other) { |
3294 | MergeFromInternal(other); |
3295 | } |
3296 | ::PROTOBUF_NAMESPACE_ID::Metadata ProfileNode_OutputsEntry_DoNotUse::GetMetadata() const { |
3297 | return GetMetadataStatic(); |
3298 | } |
3299 | void ProfileNode_OutputsEntry_DoNotUse::MergeFrom( |
3300 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
3301 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
3302 | } |
3303 | |
3304 | |
3305 | // =================================================================== |
3306 | |
3307 | ProfileNode_OutputShapesEntry_DoNotUse::ProfileNode_OutputShapesEntry_DoNotUse() {} |
3308 | ProfileNode_OutputShapesEntry_DoNotUse::ProfileNode_OutputShapesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3309 | : SuperType(arena) {} |
3310 | void ProfileNode_OutputShapesEntry_DoNotUse::MergeFrom(const ProfileNode_OutputShapesEntry_DoNotUse& other) { |
3311 | MergeFromInternal(other); |
3312 | } |
3313 | ::PROTOBUF_NAMESPACE_ID::Metadata ProfileNode_OutputShapesEntry_DoNotUse::GetMetadata() const { |
3314 | return GetMetadataStatic(); |
3315 | } |
3316 | void ProfileNode_OutputShapesEntry_DoNotUse::MergeFrom( |
3317 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
3318 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
3319 | } |
3320 | |
3321 | |
3322 | // =================================================================== |
3323 | |
3324 | ProfileNode_SrcOutputIndexEntry_DoNotUse::ProfileNode_SrcOutputIndexEntry_DoNotUse() {} |
3325 | ProfileNode_SrcOutputIndexEntry_DoNotUse::ProfileNode_SrcOutputIndexEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3326 | : SuperType(arena) {} |
3327 | void ProfileNode_SrcOutputIndexEntry_DoNotUse::MergeFrom(const ProfileNode_SrcOutputIndexEntry_DoNotUse& other) { |
3328 | MergeFromInternal(other); |
3329 | } |
3330 | ::PROTOBUF_NAMESPACE_ID::Metadata ProfileNode_SrcOutputIndexEntry_DoNotUse::GetMetadata() const { |
3331 | return GetMetadataStatic(); |
3332 | } |
3333 | void ProfileNode_SrcOutputIndexEntry_DoNotUse::MergeFrom( |
3334 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
3335 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
3336 | } |
3337 | |
3338 | |
3339 | // =================================================================== |
3340 | |
3341 | ProfileNode_AttrsEntry_DoNotUse::ProfileNode_AttrsEntry_DoNotUse() {} |
3342 | ProfileNode_AttrsEntry_DoNotUse::ProfileNode_AttrsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3343 | : SuperType(arena) {} |
3344 | void ProfileNode_AttrsEntry_DoNotUse::MergeFrom(const ProfileNode_AttrsEntry_DoNotUse& other) { |
3345 | MergeFromInternal(other); |
3346 | } |
3347 | ::PROTOBUF_NAMESPACE_ID::Metadata ProfileNode_AttrsEntry_DoNotUse::GetMetadata() const { |
3348 | return GetMetadataStatic(); |
3349 | } |
3350 | void ProfileNode_AttrsEntry_DoNotUse::MergeFrom( |
3351 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
3352 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
3353 | } |
3354 | |
3355 | |
3356 | // =================================================================== |
3357 | |
3358 | ProfileNode_ExecsEntry_DoNotUse::ProfileNode_ExecsEntry_DoNotUse() {} |
3359 | ProfileNode_ExecsEntry_DoNotUse::ProfileNode_ExecsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3360 | : SuperType(arena) {} |
3361 | void ProfileNode_ExecsEntry_DoNotUse::MergeFrom(const ProfileNode_ExecsEntry_DoNotUse& other) { |
3362 | MergeFromInternal(other); |
3363 | } |
3364 | ::PROTOBUF_NAMESPACE_ID::Metadata ProfileNode_ExecsEntry_DoNotUse::GetMetadata() const { |
3365 | return GetMetadataStatic(); |
3366 | } |
3367 | void ProfileNode_ExecsEntry_DoNotUse::MergeFrom( |
3368 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
3369 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
3370 | } |
3371 | |
3372 | |
3373 | // =================================================================== |
3374 | |
3375 | void ProfileNode::InitAsDefaultInstance() { |
3376 | ::tensorflow::tfprof::_ProfileNode_default_instance_._instance.get_mutable()->trace_ = const_cast< ::tensorflow::tfprof::CodeDef*>( |
3377 | ::tensorflow::tfprof::CodeDef::internal_default_instance()); |
3378 | } |
3379 | class ProfileNode::_Internal { |
3380 | public: |
3381 | static const ::tensorflow::tfprof::CodeDef& trace(const ProfileNode* msg); |
3382 | }; |
3383 | |
3384 | const ::tensorflow::tfprof::CodeDef& |
3385 | ProfileNode::_Internal::trace(const ProfileNode* msg) { |
3386 | return *msg->trace_; |
3387 | } |
3388 | void ProfileNode::clear_attrs() { |
3389 | attrs_.Clear(); |
3390 | } |
3391 | ProfileNode::ProfileNode() |
3392 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3393 | SharedCtor(); |
3394 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.ProfileNode) |
3395 | } |
3396 | ProfileNode::ProfileNode(const ProfileNode& from) |
3397 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3398 | _internal_metadata_(nullptr), |
3399 | shape_(from.shape_), |
3400 | op_types_(from.op_types_) { |
3401 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3402 | inputs_.MergeFrom(from.inputs_); |
3403 | outputs_.MergeFrom(from.outputs_); |
3404 | attrs_.MergeFrom(from.attrs_); |
3405 | execs_.MergeFrom(from.execs_); |
3406 | src_output_index_.MergeFrom(from.src_output_index_); |
3407 | output_shapes_.MergeFrom(from.output_shapes_); |
3408 | input_shapes_.MergeFrom(from.input_shapes_); |
3409 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3410 | if (!from.name().empty()) { |
3411 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
3412 | } |
3413 | canonical_device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3414 | if (!from.canonical_device().empty()) { |
3415 | canonical_device_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.canonical_device_); |
3416 | } |
3417 | host_device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3418 | if (!from.host_device().empty()) { |
3419 | host_device_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.host_device_); |
3420 | } |
3421 | op_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3422 | if (!from.op().empty()) { |
3423 | op_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.op_); |
3424 | } |
3425 | if (from.has_trace()) { |
3426 | trace_ = new ::tensorflow::tfprof::CodeDef(*from.trace_); |
3427 | } else { |
3428 | trace_ = nullptr; |
3429 | } |
3430 | ::memcpy(&float_ops_, &from.float_ops_, |
3431 | static_cast<size_t>(reinterpret_cast<char*>(&id_) - |
3432 | reinterpret_cast<char*>(&float_ops_)) + sizeof(id_)); |
3433 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.ProfileNode) |
3434 | } |
3435 | |
3436 | void ProfileNode::SharedCtor() { |
3437 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ProfileNode_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
3438 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3439 | canonical_device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3440 | host_device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3441 | op_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3442 | ::memset(&trace_, 0, static_cast<size_t>( |
3443 | reinterpret_cast<char*>(&id_) - |
3444 | reinterpret_cast<char*>(&trace_)) + sizeof(id_)); |
3445 | } |
3446 | |
3447 | ProfileNode::~ProfileNode() { |
3448 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.ProfileNode) |
3449 | SharedDtor(); |
3450 | } |
3451 | |
3452 | void ProfileNode::SharedDtor() { |
3453 | name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3454 | canonical_device_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3455 | host_device_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3456 | op_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3457 | if (this != internal_default_instance()) delete trace_; |
3458 | } |
3459 | |
3460 | void ProfileNode::SetCachedSize(int size) const { |
3461 | _cached_size_.Set(size); |
3462 | } |
3463 | const ProfileNode& ProfileNode::default_instance() { |
3464 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ProfileNode_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
3465 | return *internal_default_instance(); |
3466 | } |
3467 | |
3468 | |
3469 | void ProfileNode::Clear() { |
3470 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.ProfileNode) |
3471 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3472 | // Prevent compiler warnings about cached_has_bits being unused |
3473 | (void) cached_has_bits; |
3474 | |
3475 | inputs_.Clear(); |
3476 | outputs_.Clear(); |
3477 | shape_.Clear(); |
3478 | op_types_.Clear(); |
3479 | attrs_.Clear(); |
3480 | execs_.Clear(); |
3481 | src_output_index_.Clear(); |
3482 | output_shapes_.Clear(); |
3483 | input_shapes_.Clear(); |
3484 | name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3485 | canonical_device_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3486 | host_device_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3487 | op_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3488 | if (GetArenaNoVirtual() == nullptr && trace_ != nullptr) { |
3489 | delete trace_; |
3490 | } |
3491 | trace_ = nullptr; |
3492 | ::memset(&float_ops_, 0, static_cast<size_t>( |
3493 | reinterpret_cast<char*>(&id_) - |
3494 | reinterpret_cast<char*>(&float_ops_)) + sizeof(id_)); |
3495 | _internal_metadata_.Clear(); |
3496 | } |
3497 | |
3498 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3499 | const char* ProfileNode::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3500 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3501 | while (!ctx->Done(&ptr)) { |
3502 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3503 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3504 | CHK_(ptr); |
3505 | switch (tag >> 3) { |
3506 | // string name = 1; |
3507 | case 1: |
3508 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
3509 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.tfprof.ProfileNode.name" ); |
3510 | CHK_(ptr); |
3511 | } else goto handle_unusual; |
3512 | continue; |
3513 | // map<int32, int64> inputs = 2; |
3514 | case 2: |
3515 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
3516 | ptr -= 1; |
3517 | do { |
3518 | ptr += 1; |
3519 | ptr = ctx->ParseMessage(&inputs_, ptr); |
3520 | CHK_(ptr); |
3521 | if (!ctx->DataAvailable(ptr)) break; |
3522 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); |
3523 | } else goto handle_unusual; |
3524 | continue; |
3525 | // map<int32, int64> outputs = 3; |
3526 | case 3: |
3527 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
3528 | ptr -= 1; |
3529 | do { |
3530 | ptr += 1; |
3531 | ptr = ctx->ParseMessage(&outputs_, ptr); |
3532 | CHK_(ptr); |
3533 | if (!ctx->DataAvailable(ptr)) break; |
3534 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); |
3535 | } else goto handle_unusual; |
3536 | continue; |
3537 | // repeated int64 shape = 4; |
3538 | case 4: |
3539 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
3540 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_shape(), ptr, ctx); |
3541 | CHK_(ptr); |
3542 | } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32) { |
3543 | add_shape(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
3544 | CHK_(ptr); |
3545 | } else goto handle_unusual; |
3546 | continue; |
3547 | // repeated string op_types = 5; |
3548 | case 5: |
3549 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
3550 | ptr -= 1; |
3551 | do { |
3552 | ptr += 1; |
3553 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_op_types(), ptr, ctx, "tensorflow.tfprof.ProfileNode.op_types" ); |
3554 | CHK_(ptr); |
3555 | if (!ctx->DataAvailable(ptr)) break; |
3556 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42); |
3557 | } else goto handle_unusual; |
3558 | continue; |
3559 | // string canonical_device = 6; |
3560 | case 6: |
3561 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { |
3562 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_canonical_device(), ptr, ctx, "tensorflow.tfprof.ProfileNode.canonical_device" ); |
3563 | CHK_(ptr); |
3564 | } else goto handle_unusual; |
3565 | continue; |
3566 | // string host_device = 7; |
3567 | case 7: |
3568 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
3569 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_host_device(), ptr, ctx, "tensorflow.tfprof.ProfileNode.host_device" ); |
3570 | CHK_(ptr); |
3571 | } else goto handle_unusual; |
3572 | continue; |
3573 | // int64 float_ops = 8; |
3574 | case 8: |
3575 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { |
3576 | float_ops_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3577 | CHK_(ptr); |
3578 | } else goto handle_unusual; |
3579 | continue; |
3580 | // string op = 9; |
3581 | case 9: |
3582 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) { |
3583 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_op(), ptr, ctx, "tensorflow.tfprof.ProfileNode.op" ); |
3584 | CHK_(ptr); |
3585 | } else goto handle_unusual; |
3586 | continue; |
3587 | // .tensorflow.tfprof.CodeDef trace = 10; |
3588 | case 10: |
3589 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { |
3590 | ptr = ctx->ParseMessage(mutable_trace(), ptr); |
3591 | CHK_(ptr); |
3592 | } else goto handle_unusual; |
3593 | continue; |
3594 | // map<string, .tensorflow.AttrValue> attrs = 11; |
3595 | case 11: |
3596 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) { |
3597 | ptr -= 1; |
3598 | do { |
3599 | ptr += 1; |
3600 | ptr = ctx->ParseMessage(&attrs_, ptr); |
3601 | CHK_(ptr); |
3602 | if (!ctx->DataAvailable(ptr)) break; |
3603 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 90); |
3604 | } else goto handle_unusual; |
3605 | continue; |
3606 | // map<int64, .tensorflow.tfprof.ExecProfile> execs = 12; |
3607 | case 12: |
3608 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { |
3609 | ptr -= 1; |
3610 | do { |
3611 | ptr += 1; |
3612 | ptr = ctx->ParseMessage(&execs_, ptr); |
3613 | CHK_(ptr); |
3614 | if (!ctx->DataAvailable(ptr)) break; |
3615 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 98); |
3616 | } else goto handle_unusual; |
3617 | continue; |
3618 | // int64 id = 13; |
3619 | case 13: |
3620 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104)) { |
3621 | id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
3622 | CHK_(ptr); |
3623 | } else goto handle_unusual; |
3624 | continue; |
3625 | // map<int64, int32> src_output_index = 14; |
3626 | case 14: |
3627 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 114)) { |
3628 | ptr -= 1; |
3629 | do { |
3630 | ptr += 1; |
3631 | ptr = ctx->ParseMessage(&src_output_index_, ptr); |
3632 | CHK_(ptr); |
3633 | if (!ctx->DataAvailable(ptr)) break; |
3634 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 114); |
3635 | } else goto handle_unusual; |
3636 | continue; |
3637 | // map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15; |
3638 | case 15: |
3639 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) { |
3640 | ptr -= 1; |
3641 | do { |
3642 | ptr += 1; |
3643 | ptr = ctx->ParseMessage(&output_shapes_, ptr); |
3644 | CHK_(ptr); |
3645 | if (!ctx->DataAvailable(ptr)) break; |
3646 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 122); |
3647 | } else goto handle_unusual; |
3648 | continue; |
3649 | // map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16; |
3650 | case 16: |
3651 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 130)) { |
3652 | ptr -= 2; |
3653 | do { |
3654 | ptr += 2; |
3655 | ptr = ctx->ParseMessage(&input_shapes_, ptr); |
3656 | CHK_(ptr); |
3657 | if (!ctx->DataAvailable(ptr)) break; |
3658 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint16>(ptr) == 386); |
3659 | } else goto handle_unusual; |
3660 | continue; |
3661 | default: { |
3662 | handle_unusual: |
3663 | if ((tag & 7) == 4 || tag == 0) { |
3664 | ctx->SetLastTag(tag); |
3665 | goto success; |
3666 | } |
3667 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3668 | CHK_(ptr != nullptr); |
3669 | continue; |
3670 | } |
3671 | } // switch |
3672 | } // while |
3673 | success: |
3674 | return ptr; |
3675 | failure: |
3676 | ptr = nullptr; |
3677 | goto success; |
3678 | #undef CHK_ |
3679 | } |
3680 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3681 | bool ProfileNode::MergePartialFromCodedStream( |
3682 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3683 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3684 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3685 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.ProfileNode) |
3686 | for (;;) { |
3687 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); |
3688 | tag = p.first; |
3689 | if (!p.second) goto handle_unusual; |
3690 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3691 | // string name = 1; |
3692 | case 1: { |
3693 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
3694 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3695 | input, this->mutable_name())); |
3696 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3697 | this->name().data(), static_cast<int>(this->name().length()), |
3698 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3699 | "tensorflow.tfprof.ProfileNode.name" )); |
3700 | } else { |
3701 | goto handle_unusual; |
3702 | } |
3703 | break; |
3704 | } |
3705 | |
3706 | // map<int32, int64> inputs = 2; |
3707 | case 2: { |
3708 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
3709 | ProfileNode_InputsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
3710 | ProfileNode_InputsEntry_DoNotUse, |
3711 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64, |
3712 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, |
3713 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, |
3714 | 0 >, |
3715 | ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 > > parser(&inputs_); |
3716 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
3717 | input, &parser)); |
3718 | } else { |
3719 | goto handle_unusual; |
3720 | } |
3721 | break; |
3722 | } |
3723 | |
3724 | // map<int32, int64> outputs = 3; |
3725 | case 3: { |
3726 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
3727 | ProfileNode_OutputsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
3728 | ProfileNode_OutputsEntry_DoNotUse, |
3729 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64, |
3730 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, |
3731 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, |
3732 | 0 >, |
3733 | ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 > > parser(&outputs_); |
3734 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
3735 | input, &parser)); |
3736 | } else { |
3737 | goto handle_unusual; |
3738 | } |
3739 | break; |
3740 | } |
3741 | |
3742 | // repeated int64 shape = 4; |
3743 | case 4: { |
3744 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
3745 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< |
3746 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
3747 | input, this->mutable_shape()))); |
3748 | } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
3749 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
3750 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
3751 | 1, 34u, input, this->mutable_shape()))); |
3752 | } else { |
3753 | goto handle_unusual; |
3754 | } |
3755 | break; |
3756 | } |
3757 | |
3758 | // repeated string op_types = 5; |
3759 | case 5: { |
3760 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
3761 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3762 | input, this->add_op_types())); |
3763 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3764 | this->op_types(this->op_types_size() - 1).data(), |
3765 | static_cast<int>(this->op_types(this->op_types_size() - 1).length()), |
3766 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3767 | "tensorflow.tfprof.ProfileNode.op_types" )); |
3768 | } else { |
3769 | goto handle_unusual; |
3770 | } |
3771 | break; |
3772 | } |
3773 | |
3774 | // string canonical_device = 6; |
3775 | case 6: { |
3776 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { |
3777 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3778 | input, this->mutable_canonical_device())); |
3779 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3780 | this->canonical_device().data(), static_cast<int>(this->canonical_device().length()), |
3781 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3782 | "tensorflow.tfprof.ProfileNode.canonical_device" )); |
3783 | } else { |
3784 | goto handle_unusual; |
3785 | } |
3786 | break; |
3787 | } |
3788 | |
3789 | // string host_device = 7; |
3790 | case 7: { |
3791 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
3792 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3793 | input, this->mutable_host_device())); |
3794 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3795 | this->host_device().data(), static_cast<int>(this->host_device().length()), |
3796 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3797 | "tensorflow.tfprof.ProfileNode.host_device" )); |
3798 | } else { |
3799 | goto handle_unusual; |
3800 | } |
3801 | break; |
3802 | } |
3803 | |
3804 | // int64 float_ops = 8; |
3805 | case 8: { |
3806 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) { |
3807 | |
3808 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3809 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
3810 | input, &float_ops_))); |
3811 | } else { |
3812 | goto handle_unusual; |
3813 | } |
3814 | break; |
3815 | } |
3816 | |
3817 | // string op = 9; |
3818 | case 9: { |
3819 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) { |
3820 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3821 | input, this->mutable_op())); |
3822 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3823 | this->op().data(), static_cast<int>(this->op().length()), |
3824 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3825 | "tensorflow.tfprof.ProfileNode.op" )); |
3826 | } else { |
3827 | goto handle_unusual; |
3828 | } |
3829 | break; |
3830 | } |
3831 | |
3832 | // .tensorflow.tfprof.CodeDef trace = 10; |
3833 | case 10: { |
3834 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { |
3835 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3836 | input, mutable_trace())); |
3837 | } else { |
3838 | goto handle_unusual; |
3839 | } |
3840 | break; |
3841 | } |
3842 | |
3843 | // map<string, .tensorflow.AttrValue> attrs = 11; |
3844 | case 11: { |
3845 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) { |
3846 | ProfileNode_AttrsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
3847 | ProfileNode_AttrsEntry_DoNotUse, |
3848 | std::string, ::tensorflow::AttrValue, |
3849 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, |
3850 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
3851 | 0 >, |
3852 | ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue > > parser(&attrs_); |
3853 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
3854 | input, &parser)); |
3855 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3856 | parser.key().data(), static_cast<int>(parser.key().length()), |
3857 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3858 | "tensorflow.tfprof.ProfileNode.AttrsEntry.key" )); |
3859 | } else { |
3860 | goto handle_unusual; |
3861 | } |
3862 | break; |
3863 | } |
3864 | |
3865 | // map<int64, .tensorflow.tfprof.ExecProfile> execs = 12; |
3866 | case 12: { |
3867 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (98 & 0xFF)) { |
3868 | ProfileNode_ExecsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
3869 | ProfileNode_ExecsEntry_DoNotUse, |
3870 | ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ExecProfile, |
3871 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, |
3872 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
3873 | 0 >, |
3874 | ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ExecProfile > > parser(&execs_); |
3875 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
3876 | input, &parser)); |
3877 | } else { |
3878 | goto handle_unusual; |
3879 | } |
3880 | break; |
3881 | } |
3882 | |
3883 | // int64 id = 13; |
3884 | case 13: { |
3885 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (104 & 0xFF)) { |
3886 | |
3887 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3888 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
3889 | input, &id_))); |
3890 | } else { |
3891 | goto handle_unusual; |
3892 | } |
3893 | break; |
3894 | } |
3895 | |
3896 | // map<int64, int32> src_output_index = 14; |
3897 | case 14: { |
3898 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (114 & 0xFF)) { |
3899 | ProfileNode_SrcOutputIndexEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
3900 | ProfileNode_SrcOutputIndexEntry_DoNotUse, |
3901 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::int32, |
3902 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64, |
3903 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, |
3904 | 0 >, |
3905 | ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::int32 > > parser(&src_output_index_); |
3906 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
3907 | input, &parser)); |
3908 | } else { |
3909 | goto handle_unusual; |
3910 | } |
3911 | break; |
3912 | } |
3913 | |
3914 | // map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15; |
3915 | case 15: { |
3916 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) { |
3917 | ProfileNode_OutputShapesEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
3918 | ProfileNode_OutputShapesEntry_DoNotUse, |
3919 | ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple, |
3920 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, |
3921 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
3922 | 0 >, |
3923 | ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple > > parser(&output_shapes_); |
3924 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
3925 | input, &parser)); |
3926 | } else { |
3927 | goto handle_unusual; |
3928 | } |
3929 | break; |
3930 | } |
3931 | |
3932 | // map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16; |
3933 | case 16: { |
3934 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (130 & 0xFF)) { |
3935 | ProfileNode_InputShapesEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
3936 | ProfileNode_InputShapesEntry_DoNotUse, |
3937 | ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple, |
3938 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, |
3939 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
3940 | 0 >, |
3941 | ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple > > parser(&input_shapes_); |
3942 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
3943 | input, &parser)); |
3944 | } else { |
3945 | goto handle_unusual; |
3946 | } |
3947 | break; |
3948 | } |
3949 | |
3950 | default: { |
3951 | handle_unusual: |
3952 | if (tag == 0) { |
3953 | goto success; |
3954 | } |
3955 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3956 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3957 | break; |
3958 | } |
3959 | } |
3960 | } |
3961 | success: |
3962 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.ProfileNode) |
3963 | return true; |
3964 | failure: |
3965 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.ProfileNode) |
3966 | return false; |
3967 | #undef DO_ |
3968 | } |
3969 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3970 | |
3971 | void ProfileNode::SerializeWithCachedSizes( |
3972 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3973 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.ProfileNode) |
3974 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3975 | (void) cached_has_bits; |
3976 | |
3977 | // string name = 1; |
3978 | if (this->name().size() > 0) { |
3979 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3980 | this->name().data(), static_cast<int>(this->name().length()), |
3981 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3982 | "tensorflow.tfprof.ProfileNode.name" ); |
3983 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
3984 | 1, this->name(), output); |
3985 | } |
3986 | |
3987 | // map<int32, int64> inputs = 2; |
3988 | if (!this->inputs().empty()) { |
3989 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_pointer |
3990 | ConstPtr; |
3991 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int32, ConstPtr > SortItem; |
3992 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
3993 | |
3994 | if (output->IsSerializationDeterministic() && |
3995 | this->inputs().size() > 1) { |
3996 | ::std::unique_ptr<SortItem[]> items( |
3997 | new SortItem[this->inputs().size()]); |
3998 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::size_type size_type; |
3999 | size_type n = 0; |
4000 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator |
4001 | it = this->inputs().begin(); |
4002 | it != this->inputs().end(); ++it, ++n) { |
4003 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4004 | } |
4005 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4006 | for (size_type i = 0; i < n; i++) { |
4007 | ProfileNode_InputsEntry_DoNotUse::Funcs::SerializeToCodedStream(2, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, output); |
4008 | } |
4009 | } else { |
4010 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator |
4011 | it = this->inputs().begin(); |
4012 | it != this->inputs().end(); ++it) { |
4013 | ProfileNode_InputsEntry_DoNotUse::Funcs::SerializeToCodedStream(2, it->first, it->second, output); |
4014 | } |
4015 | } |
4016 | } |
4017 | |
4018 | // map<int32, int64> outputs = 3; |
4019 | if (!this->outputs().empty()) { |
4020 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_pointer |
4021 | ConstPtr; |
4022 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int32, ConstPtr > SortItem; |
4023 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
4024 | |
4025 | if (output->IsSerializationDeterministic() && |
4026 | this->outputs().size() > 1) { |
4027 | ::std::unique_ptr<SortItem[]> items( |
4028 | new SortItem[this->outputs().size()]); |
4029 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::size_type size_type; |
4030 | size_type n = 0; |
4031 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator |
4032 | it = this->outputs().begin(); |
4033 | it != this->outputs().end(); ++it, ++n) { |
4034 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4035 | } |
4036 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4037 | for (size_type i = 0; i < n; i++) { |
4038 | ProfileNode_OutputsEntry_DoNotUse::Funcs::SerializeToCodedStream(3, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, output); |
4039 | } |
4040 | } else { |
4041 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator |
4042 | it = this->outputs().begin(); |
4043 | it != this->outputs().end(); ++it) { |
4044 | ProfileNode_OutputsEntry_DoNotUse::Funcs::SerializeToCodedStream(3, it->first, it->second, output); |
4045 | } |
4046 | } |
4047 | } |
4048 | |
4049 | // repeated int64 shape = 4; |
4050 | if (this->shape_size() > 0) { |
4051 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(4, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
4052 | output->WriteVarint32(_shape_cached_byte_size_.load( |
4053 | std::memory_order_relaxed)); |
4054 | } |
4055 | for (int i = 0, n = this->shape_size(); i < n; i++) { |
4056 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64NoTag( |
4057 | this->shape(i), output); |
4058 | } |
4059 | |
4060 | // repeated string op_types = 5; |
4061 | for (int i = 0, n = this->op_types_size(); i < n; i++) { |
4062 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4063 | this->op_types(i).data(), static_cast<int>(this->op_types(i).length()), |
4064 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4065 | "tensorflow.tfprof.ProfileNode.op_types" ); |
4066 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( |
4067 | 5, this->op_types(i), output); |
4068 | } |
4069 | |
4070 | // string canonical_device = 6; |
4071 | if (this->canonical_device().size() > 0) { |
4072 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4073 | this->canonical_device().data(), static_cast<int>(this->canonical_device().length()), |
4074 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4075 | "tensorflow.tfprof.ProfileNode.canonical_device" ); |
4076 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
4077 | 6, this->canonical_device(), output); |
4078 | } |
4079 | |
4080 | // string host_device = 7; |
4081 | if (this->host_device().size() > 0) { |
4082 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4083 | this->host_device().data(), static_cast<int>(this->host_device().length()), |
4084 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4085 | "tensorflow.tfprof.ProfileNode.host_device" ); |
4086 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
4087 | 7, this->host_device(), output); |
4088 | } |
4089 | |
4090 | // int64 float_ops = 8; |
4091 | if (this->float_ops() != 0) { |
4092 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(8, this->float_ops(), output); |
4093 | } |
4094 | |
4095 | // string op = 9; |
4096 | if (this->op().size() > 0) { |
4097 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4098 | this->op().data(), static_cast<int>(this->op().length()), |
4099 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4100 | "tensorflow.tfprof.ProfileNode.op" ); |
4101 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
4102 | 9, this->op(), output); |
4103 | } |
4104 | |
4105 | // .tensorflow.tfprof.CodeDef trace = 10; |
4106 | if (this->has_trace()) { |
4107 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
4108 | 10, _Internal::trace(this), output); |
4109 | } |
4110 | |
4111 | // map<string, .tensorflow.AttrValue> attrs = 11; |
4112 | if (!this->attrs().empty()) { |
4113 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_pointer |
4114 | ConstPtr; |
4115 | typedef ConstPtr SortItem; |
4116 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
4117 | struct Utf8Check { |
4118 | static void Check(ConstPtr p) { |
4119 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4120 | p->first.data(), static_cast<int>(p->first.length()), |
4121 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4122 | "tensorflow.tfprof.ProfileNode.AttrsEntry.key" ); |
4123 | } |
4124 | }; |
4125 | |
4126 | if (output->IsSerializationDeterministic() && |
4127 | this->attrs().size() > 1) { |
4128 | ::std::unique_ptr<SortItem[]> items( |
4129 | new SortItem[this->attrs().size()]); |
4130 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::size_type size_type; |
4131 | size_type n = 0; |
4132 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_iterator |
4133 | it = this->attrs().begin(); |
4134 | it != this->attrs().end(); ++it, ++n) { |
4135 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4136 | } |
4137 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4138 | for (size_type i = 0; i < n; i++) { |
4139 | ProfileNode_AttrsEntry_DoNotUse::Funcs::SerializeToCodedStream(11, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output); |
4140 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
4141 | } |
4142 | } else { |
4143 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_iterator |
4144 | it = this->attrs().begin(); |
4145 | it != this->attrs().end(); ++it) { |
4146 | ProfileNode_AttrsEntry_DoNotUse::Funcs::SerializeToCodedStream(11, it->first, it->second, output); |
4147 | Utf8Check::Check(&(*it)); |
4148 | } |
4149 | } |
4150 | } |
4151 | |
4152 | // map<int64, .tensorflow.tfprof.ExecProfile> execs = 12; |
4153 | if (!this->execs().empty()) { |
4154 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ExecProfile >::const_pointer |
4155 | ConstPtr; |
4156 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int64, ConstPtr > SortItem; |
4157 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
4158 | |
4159 | if (output->IsSerializationDeterministic() && |
4160 | this->execs().size() > 1) { |
4161 | ::std::unique_ptr<SortItem[]> items( |
4162 | new SortItem[this->execs().size()]); |
4163 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ExecProfile >::size_type size_type; |
4164 | size_type n = 0; |
4165 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ExecProfile >::const_iterator |
4166 | it = this->execs().begin(); |
4167 | it != this->execs().end(); ++it, ++n) { |
4168 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4169 | } |
4170 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4171 | for (size_type i = 0; i < n; i++) { |
4172 | ProfileNode_ExecsEntry_DoNotUse::Funcs::SerializeToCodedStream(12, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, output); |
4173 | } |
4174 | } else { |
4175 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ExecProfile >::const_iterator |
4176 | it = this->execs().begin(); |
4177 | it != this->execs().end(); ++it) { |
4178 | ProfileNode_ExecsEntry_DoNotUse::Funcs::SerializeToCodedStream(12, it->first, it->second, output); |
4179 | } |
4180 | } |
4181 | } |
4182 | |
4183 | // int64 id = 13; |
4184 | if (this->id() != 0) { |
4185 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(13, this->id(), output); |
4186 | } |
4187 | |
4188 | // map<int64, int32> src_output_index = 14; |
4189 | if (!this->src_output_index().empty()) { |
4190 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::int32 >::const_pointer |
4191 | ConstPtr; |
4192 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int64, ConstPtr > SortItem; |
4193 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
4194 | |
4195 | if (output->IsSerializationDeterministic() && |
4196 | this->src_output_index().size() > 1) { |
4197 | ::std::unique_ptr<SortItem[]> items( |
4198 | new SortItem[this->src_output_index().size()]); |
4199 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::int32 >::size_type size_type; |
4200 | size_type n = 0; |
4201 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::int32 >::const_iterator |
4202 | it = this->src_output_index().begin(); |
4203 | it != this->src_output_index().end(); ++it, ++n) { |
4204 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4205 | } |
4206 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4207 | for (size_type i = 0; i < n; i++) { |
4208 | ProfileNode_SrcOutputIndexEntry_DoNotUse::Funcs::SerializeToCodedStream(14, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, output); |
4209 | } |
4210 | } else { |
4211 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::int32 >::const_iterator |
4212 | it = this->src_output_index().begin(); |
4213 | it != this->src_output_index().end(); ++it) { |
4214 | ProfileNode_SrcOutputIndexEntry_DoNotUse::Funcs::SerializeToCodedStream(14, it->first, it->second, output); |
4215 | } |
4216 | } |
4217 | } |
4218 | |
4219 | // map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15; |
4220 | if (!this->output_shapes().empty()) { |
4221 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_pointer |
4222 | ConstPtr; |
4223 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int32, ConstPtr > SortItem; |
4224 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
4225 | |
4226 | if (output->IsSerializationDeterministic() && |
4227 | this->output_shapes().size() > 1) { |
4228 | ::std::unique_ptr<SortItem[]> items( |
4229 | new SortItem[this->output_shapes().size()]); |
4230 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::size_type size_type; |
4231 | size_type n = 0; |
4232 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_iterator |
4233 | it = this->output_shapes().begin(); |
4234 | it != this->output_shapes().end(); ++it, ++n) { |
4235 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4236 | } |
4237 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4238 | for (size_type i = 0; i < n; i++) { |
4239 | ProfileNode_OutputShapesEntry_DoNotUse::Funcs::SerializeToCodedStream(15, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, output); |
4240 | } |
4241 | } else { |
4242 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_iterator |
4243 | it = this->output_shapes().begin(); |
4244 | it != this->output_shapes().end(); ++it) { |
4245 | ProfileNode_OutputShapesEntry_DoNotUse::Funcs::SerializeToCodedStream(15, it->first, it->second, output); |
4246 | } |
4247 | } |
4248 | } |
4249 | |
4250 | // map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16; |
4251 | if (!this->input_shapes().empty()) { |
4252 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_pointer |
4253 | ConstPtr; |
4254 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int32, ConstPtr > SortItem; |
4255 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
4256 | |
4257 | if (output->IsSerializationDeterministic() && |
4258 | this->input_shapes().size() > 1) { |
4259 | ::std::unique_ptr<SortItem[]> items( |
4260 | new SortItem[this->input_shapes().size()]); |
4261 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::size_type size_type; |
4262 | size_type n = 0; |
4263 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_iterator |
4264 | it = this->input_shapes().begin(); |
4265 | it != this->input_shapes().end(); ++it, ++n) { |
4266 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4267 | } |
4268 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4269 | for (size_type i = 0; i < n; i++) { |
4270 | ProfileNode_InputShapesEntry_DoNotUse::Funcs::SerializeToCodedStream(16, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, output); |
4271 | } |
4272 | } else { |
4273 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_iterator |
4274 | it = this->input_shapes().begin(); |
4275 | it != this->input_shapes().end(); ++it) { |
4276 | ProfileNode_InputShapesEntry_DoNotUse::Funcs::SerializeToCodedStream(16, it->first, it->second, output); |
4277 | } |
4278 | } |
4279 | } |
4280 | |
4281 | if (_internal_metadata_.have_unknown_fields()) { |
4282 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
4283 | _internal_metadata_.unknown_fields(), output); |
4284 | } |
4285 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.ProfileNode) |
4286 | } |
4287 | |
4288 | ::PROTOBUF_NAMESPACE_ID::uint8* ProfileNode::InternalSerializeWithCachedSizesToArray( |
4289 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
4290 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.ProfileNode) |
4291 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4292 | (void) cached_has_bits; |
4293 | |
4294 | // string name = 1; |
4295 | if (this->name().size() > 0) { |
4296 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4297 | this->name().data(), static_cast<int>(this->name().length()), |
4298 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4299 | "tensorflow.tfprof.ProfileNode.name" ); |
4300 | target = |
4301 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
4302 | 1, this->name(), target); |
4303 | } |
4304 | |
4305 | // map<int32, int64> inputs = 2; |
4306 | if (!this->inputs().empty()) { |
4307 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_pointer |
4308 | ConstPtr; |
4309 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int32, ConstPtr > SortItem; |
4310 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
4311 | |
4312 | if (false && |
4313 | this->inputs().size() > 1) { |
4314 | ::std::unique_ptr<SortItem[]> items( |
4315 | new SortItem[this->inputs().size()]); |
4316 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::size_type size_type; |
4317 | size_type n = 0; |
4318 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator |
4319 | it = this->inputs().begin(); |
4320 | it != this->inputs().end(); ++it, ++n) { |
4321 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4322 | } |
4323 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4324 | for (size_type i = 0; i < n; i++) { |
4325 | target = ProfileNode_InputsEntry_DoNotUse::Funcs::SerializeToArray(2, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, target); |
4326 | } |
4327 | } else { |
4328 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator |
4329 | it = this->inputs().begin(); |
4330 | it != this->inputs().end(); ++it) { |
4331 | target = ProfileNode_InputsEntry_DoNotUse::Funcs::SerializeToArray(2, it->first, it->second, target); |
4332 | } |
4333 | } |
4334 | } |
4335 | |
4336 | // map<int32, int64> outputs = 3; |
4337 | if (!this->outputs().empty()) { |
4338 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_pointer |
4339 | ConstPtr; |
4340 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int32, ConstPtr > SortItem; |
4341 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
4342 | |
4343 | if (false && |
4344 | this->outputs().size() > 1) { |
4345 | ::std::unique_ptr<SortItem[]> items( |
4346 | new SortItem[this->outputs().size()]); |
4347 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::size_type size_type; |
4348 | size_type n = 0; |
4349 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator |
4350 | it = this->outputs().begin(); |
4351 | it != this->outputs().end(); ++it, ++n) { |
4352 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4353 | } |
4354 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4355 | for (size_type i = 0; i < n; i++) { |
4356 | target = ProfileNode_OutputsEntry_DoNotUse::Funcs::SerializeToArray(3, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, target); |
4357 | } |
4358 | } else { |
4359 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator |
4360 | it = this->outputs().begin(); |
4361 | it != this->outputs().end(); ++it) { |
4362 | target = ProfileNode_OutputsEntry_DoNotUse::Funcs::SerializeToArray(3, it->first, it->second, target); |
4363 | } |
4364 | } |
4365 | } |
4366 | |
4367 | // repeated int64 shape = 4; |
4368 | if (this->shape_size() > 0) { |
4369 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( |
4370 | 4, |
4371 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
4372 | target); |
4373 | target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( |
4374 | _shape_cached_byte_size_.load(std::memory_order_relaxed), |
4375 | target); |
4376 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4377 | WriteInt64NoTagToArray(this->shape_, target); |
4378 | } |
4379 | |
4380 | // repeated string op_types = 5; |
4381 | for (int i = 0, n = this->op_types_size(); i < n; i++) { |
4382 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4383 | this->op_types(i).data(), static_cast<int>(this->op_types(i).length()), |
4384 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4385 | "tensorflow.tfprof.ProfileNode.op_types" ); |
4386 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4387 | WriteStringToArray(5, this->op_types(i), target); |
4388 | } |
4389 | |
4390 | // string canonical_device = 6; |
4391 | if (this->canonical_device().size() > 0) { |
4392 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4393 | this->canonical_device().data(), static_cast<int>(this->canonical_device().length()), |
4394 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4395 | "tensorflow.tfprof.ProfileNode.canonical_device" ); |
4396 | target = |
4397 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
4398 | 6, this->canonical_device(), target); |
4399 | } |
4400 | |
4401 | // string host_device = 7; |
4402 | if (this->host_device().size() > 0) { |
4403 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4404 | this->host_device().data(), static_cast<int>(this->host_device().length()), |
4405 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4406 | "tensorflow.tfprof.ProfileNode.host_device" ); |
4407 | target = |
4408 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
4409 | 7, this->host_device(), target); |
4410 | } |
4411 | |
4412 | // int64 float_ops = 8; |
4413 | if (this->float_ops() != 0) { |
4414 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->float_ops(), target); |
4415 | } |
4416 | |
4417 | // string op = 9; |
4418 | if (this->op().size() > 0) { |
4419 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4420 | this->op().data(), static_cast<int>(this->op().length()), |
4421 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4422 | "tensorflow.tfprof.ProfileNode.op" ); |
4423 | target = |
4424 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
4425 | 9, this->op(), target); |
4426 | } |
4427 | |
4428 | // .tensorflow.tfprof.CodeDef trace = 10; |
4429 | if (this->has_trace()) { |
4430 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4431 | InternalWriteMessageToArray( |
4432 | 10, _Internal::trace(this), target); |
4433 | } |
4434 | |
4435 | // map<string, .tensorflow.AttrValue> attrs = 11; |
4436 | if (!this->attrs().empty()) { |
4437 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_pointer |
4438 | ConstPtr; |
4439 | typedef ConstPtr SortItem; |
4440 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
4441 | struct Utf8Check { |
4442 | static void Check(ConstPtr p) { |
4443 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
4444 | p->first.data(), static_cast<int>(p->first.length()), |
4445 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
4446 | "tensorflow.tfprof.ProfileNode.AttrsEntry.key" ); |
4447 | } |
4448 | }; |
4449 | |
4450 | if (false && |
4451 | this->attrs().size() > 1) { |
4452 | ::std::unique_ptr<SortItem[]> items( |
4453 | new SortItem[this->attrs().size()]); |
4454 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::size_type size_type; |
4455 | size_type n = 0; |
4456 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_iterator |
4457 | it = this->attrs().begin(); |
4458 | it != this->attrs().end(); ++it, ++n) { |
4459 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4460 | } |
4461 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4462 | for (size_type i = 0; i < n; i++) { |
4463 | target = ProfileNode_AttrsEntry_DoNotUse::Funcs::SerializeToArray(11, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target); |
4464 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
4465 | } |
4466 | } else { |
4467 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_iterator |
4468 | it = this->attrs().begin(); |
4469 | it != this->attrs().end(); ++it) { |
4470 | target = ProfileNode_AttrsEntry_DoNotUse::Funcs::SerializeToArray(11, it->first, it->second, target); |
4471 | Utf8Check::Check(&(*it)); |
4472 | } |
4473 | } |
4474 | } |
4475 | |
4476 | // map<int64, .tensorflow.tfprof.ExecProfile> execs = 12; |
4477 | if (!this->execs().empty()) { |
4478 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ExecProfile >::const_pointer |
4479 | ConstPtr; |
4480 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int64, ConstPtr > SortItem; |
4481 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
4482 | |
4483 | if (false && |
4484 | this->execs().size() > 1) { |
4485 | ::std::unique_ptr<SortItem[]> items( |
4486 | new SortItem[this->execs().size()]); |
4487 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ExecProfile >::size_type size_type; |
4488 | size_type n = 0; |
4489 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ExecProfile >::const_iterator |
4490 | it = this->execs().begin(); |
4491 | it != this->execs().end(); ++it, ++n) { |
4492 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4493 | } |
4494 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4495 | for (size_type i = 0; i < n; i++) { |
4496 | target = ProfileNode_ExecsEntry_DoNotUse::Funcs::SerializeToArray(12, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, target); |
4497 | } |
4498 | } else { |
4499 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ExecProfile >::const_iterator |
4500 | it = this->execs().begin(); |
4501 | it != this->execs().end(); ++it) { |
4502 | target = ProfileNode_ExecsEntry_DoNotUse::Funcs::SerializeToArray(12, it->first, it->second, target); |
4503 | } |
4504 | } |
4505 | } |
4506 | |
4507 | // int64 id = 13; |
4508 | if (this->id() != 0) { |
4509 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(13, this->id(), target); |
4510 | } |
4511 | |
4512 | // map<int64, int32> src_output_index = 14; |
4513 | if (!this->src_output_index().empty()) { |
4514 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::int32 >::const_pointer |
4515 | ConstPtr; |
4516 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int64, ConstPtr > SortItem; |
4517 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
4518 | |
4519 | if (false && |
4520 | this->src_output_index().size() > 1) { |
4521 | ::std::unique_ptr<SortItem[]> items( |
4522 | new SortItem[this->src_output_index().size()]); |
4523 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::int32 >::size_type size_type; |
4524 | size_type n = 0; |
4525 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::int32 >::const_iterator |
4526 | it = this->src_output_index().begin(); |
4527 | it != this->src_output_index().end(); ++it, ++n) { |
4528 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4529 | } |
4530 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4531 | for (size_type i = 0; i < n; i++) { |
4532 | target = ProfileNode_SrcOutputIndexEntry_DoNotUse::Funcs::SerializeToArray(14, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, target); |
4533 | } |
4534 | } else { |
4535 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::int32 >::const_iterator |
4536 | it = this->src_output_index().begin(); |
4537 | it != this->src_output_index().end(); ++it) { |
4538 | target = ProfileNode_SrcOutputIndexEntry_DoNotUse::Funcs::SerializeToArray(14, it->first, it->second, target); |
4539 | } |
4540 | } |
4541 | } |
4542 | |
4543 | // map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15; |
4544 | if (!this->output_shapes().empty()) { |
4545 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_pointer |
4546 | ConstPtr; |
4547 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int32, ConstPtr > SortItem; |
4548 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
4549 | |
4550 | if (false && |
4551 | this->output_shapes().size() > 1) { |
4552 | ::std::unique_ptr<SortItem[]> items( |
4553 | new SortItem[this->output_shapes().size()]); |
4554 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::size_type size_type; |
4555 | size_type n = 0; |
4556 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_iterator |
4557 | it = this->output_shapes().begin(); |
4558 | it != this->output_shapes().end(); ++it, ++n) { |
4559 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4560 | } |
4561 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4562 | for (size_type i = 0; i < n; i++) { |
4563 | target = ProfileNode_OutputShapesEntry_DoNotUse::Funcs::SerializeToArray(15, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, target); |
4564 | } |
4565 | } else { |
4566 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_iterator |
4567 | it = this->output_shapes().begin(); |
4568 | it != this->output_shapes().end(); ++it) { |
4569 | target = ProfileNode_OutputShapesEntry_DoNotUse::Funcs::SerializeToArray(15, it->first, it->second, target); |
4570 | } |
4571 | } |
4572 | } |
4573 | |
4574 | // map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16; |
4575 | if (!this->input_shapes().empty()) { |
4576 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_pointer |
4577 | ConstPtr; |
4578 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int32, ConstPtr > SortItem; |
4579 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
4580 | |
4581 | if (false && |
4582 | this->input_shapes().size() > 1) { |
4583 | ::std::unique_ptr<SortItem[]> items( |
4584 | new SortItem[this->input_shapes().size()]); |
4585 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::size_type size_type; |
4586 | size_type n = 0; |
4587 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_iterator |
4588 | it = this->input_shapes().begin(); |
4589 | it != this->input_shapes().end(); ++it, ++n) { |
4590 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
4591 | } |
4592 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
4593 | for (size_type i = 0; i < n; i++) { |
4594 | target = ProfileNode_InputShapesEntry_DoNotUse::Funcs::SerializeToArray(16, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, target); |
4595 | } |
4596 | } else { |
4597 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_iterator |
4598 | it = this->input_shapes().begin(); |
4599 | it != this->input_shapes().end(); ++it) { |
4600 | target = ProfileNode_InputShapesEntry_DoNotUse::Funcs::SerializeToArray(16, it->first, it->second, target); |
4601 | } |
4602 | } |
4603 | } |
4604 | |
4605 | if (_internal_metadata_.have_unknown_fields()) { |
4606 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
4607 | _internal_metadata_.unknown_fields(), target); |
4608 | } |
4609 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.ProfileNode) |
4610 | return target; |
4611 | } |
4612 | |
4613 | size_t ProfileNode::ByteSizeLong() const { |
4614 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.ProfileNode) |
4615 | size_t total_size = 0; |
4616 | |
4617 | if (_internal_metadata_.have_unknown_fields()) { |
4618 | total_size += |
4619 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
4620 | _internal_metadata_.unknown_fields()); |
4621 | } |
4622 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4623 | // Prevent compiler warnings about cached_has_bits being unused |
4624 | (void) cached_has_bits; |
4625 | |
4626 | // map<int32, int64> inputs = 2; |
4627 | total_size += 1 * |
4628 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->inputs_size()); |
4629 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator |
4630 | it = this->inputs().begin(); |
4631 | it != this->inputs().end(); ++it) { |
4632 | total_size += ProfileNode_InputsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
4633 | } |
4634 | |
4635 | // map<int32, int64> outputs = 3; |
4636 | total_size += 1 * |
4637 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->outputs_size()); |
4638 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::int64 >::const_iterator |
4639 | it = this->outputs().begin(); |
4640 | it != this->outputs().end(); ++it) { |
4641 | total_size += ProfileNode_OutputsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
4642 | } |
4643 | |
4644 | // repeated int64 shape = 4; |
4645 | { |
4646 | size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
4647 | Int64Size(this->shape_); |
4648 | if (data_size > 0) { |
4649 | total_size += 1 + |
4650 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
4651 | static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); |
4652 | } |
4653 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); |
4654 | _shape_cached_byte_size_.store(cached_size, |
4655 | std::memory_order_relaxed); |
4656 | total_size += data_size; |
4657 | } |
4658 | |
4659 | // repeated string op_types = 5; |
4660 | total_size += 1 * |
4661 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->op_types_size()); |
4662 | for (int i = 0, n = this->op_types_size(); i < n; i++) { |
4663 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
4664 | this->op_types(i)); |
4665 | } |
4666 | |
4667 | // map<string, .tensorflow.AttrValue> attrs = 11; |
4668 | total_size += 1 * |
4669 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->attrs_size()); |
4670 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::AttrValue >::const_iterator |
4671 | it = this->attrs().begin(); |
4672 | it != this->attrs().end(); ++it) { |
4673 | total_size += ProfileNode_AttrsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
4674 | } |
4675 | |
4676 | // map<int64, .tensorflow.tfprof.ExecProfile> execs = 12; |
4677 | total_size += 1 * |
4678 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->execs_size()); |
4679 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::tensorflow::tfprof::ExecProfile >::const_iterator |
4680 | it = this->execs().begin(); |
4681 | it != this->execs().end(); ++it) { |
4682 | total_size += ProfileNode_ExecsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
4683 | } |
4684 | |
4685 | // map<int64, int32> src_output_index = 14; |
4686 | total_size += 1 * |
4687 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->src_output_index_size()); |
4688 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::int32 >::const_iterator |
4689 | it = this->src_output_index().begin(); |
4690 | it != this->src_output_index().end(); ++it) { |
4691 | total_size += ProfileNode_SrcOutputIndexEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
4692 | } |
4693 | |
4694 | // map<int32, .tensorflow.tfprof.Tuple> output_shapes = 15; |
4695 | total_size += 1 * |
4696 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->output_shapes_size()); |
4697 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_iterator |
4698 | it = this->output_shapes().begin(); |
4699 | it != this->output_shapes().end(); ++it) { |
4700 | total_size += ProfileNode_OutputShapesEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
4701 | } |
4702 | |
4703 | // map<int32, .tensorflow.tfprof.Tuple> input_shapes = 16; |
4704 | total_size += 2 * |
4705 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->input_shapes_size()); |
4706 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Tuple >::const_iterator |
4707 | it = this->input_shapes().begin(); |
4708 | it != this->input_shapes().end(); ++it) { |
4709 | total_size += ProfileNode_InputShapesEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
4710 | } |
4711 | |
4712 | // string name = 1; |
4713 | if (this->name().size() > 0) { |
4714 | total_size += 1 + |
4715 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
4716 | this->name()); |
4717 | } |
4718 | |
4719 | // string canonical_device = 6; |
4720 | if (this->canonical_device().size() > 0) { |
4721 | total_size += 1 + |
4722 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
4723 | this->canonical_device()); |
4724 | } |
4725 | |
4726 | // string host_device = 7; |
4727 | if (this->host_device().size() > 0) { |
4728 | total_size += 1 + |
4729 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
4730 | this->host_device()); |
4731 | } |
4732 | |
4733 | // string op = 9; |
4734 | if (this->op().size() > 0) { |
4735 | total_size += 1 + |
4736 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
4737 | this->op()); |
4738 | } |
4739 | |
4740 | // .tensorflow.tfprof.CodeDef trace = 10; |
4741 | if (this->has_trace()) { |
4742 | total_size += 1 + |
4743 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
4744 | *trace_); |
4745 | } |
4746 | |
4747 | // int64 float_ops = 8; |
4748 | if (this->float_ops() != 0) { |
4749 | total_size += 1 + |
4750 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
4751 | this->float_ops()); |
4752 | } |
4753 | |
4754 | // int64 id = 13; |
4755 | if (this->id() != 0) { |
4756 | total_size += 1 + |
4757 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
4758 | this->id()); |
4759 | } |
4760 | |
4761 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
4762 | SetCachedSize(cached_size); |
4763 | return total_size; |
4764 | } |
4765 | |
4766 | void ProfileNode::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4767 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.ProfileNode) |
4768 | GOOGLE_DCHECK_NE(&from, this); |
4769 | const ProfileNode* source = |
4770 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ProfileNode>( |
4771 | &from); |
4772 | if (source == nullptr) { |
4773 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.ProfileNode) |
4774 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
4775 | } else { |
4776 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.ProfileNode) |
4777 | MergeFrom(*source); |
4778 | } |
4779 | } |
4780 | |
4781 | void ProfileNode::MergeFrom(const ProfileNode& from) { |
4782 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.ProfileNode) |
4783 | GOOGLE_DCHECK_NE(&from, this); |
4784 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
4785 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4786 | (void) cached_has_bits; |
4787 | |
4788 | inputs_.MergeFrom(from.inputs_); |
4789 | outputs_.MergeFrom(from.outputs_); |
4790 | shape_.MergeFrom(from.shape_); |
4791 | op_types_.MergeFrom(from.op_types_); |
4792 | attrs_.MergeFrom(from.attrs_); |
4793 | execs_.MergeFrom(from.execs_); |
4794 | src_output_index_.MergeFrom(from.src_output_index_); |
4795 | output_shapes_.MergeFrom(from.output_shapes_); |
4796 | input_shapes_.MergeFrom(from.input_shapes_); |
4797 | if (from.name().size() > 0) { |
4798 | |
4799 | name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); |
4800 | } |
4801 | if (from.canonical_device().size() > 0) { |
4802 | |
4803 | canonical_device_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.canonical_device_); |
4804 | } |
4805 | if (from.host_device().size() > 0) { |
4806 | |
4807 | host_device_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.host_device_); |
4808 | } |
4809 | if (from.op().size() > 0) { |
4810 | |
4811 | op_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.op_); |
4812 | } |
4813 | if (from.has_trace()) { |
4814 | mutable_trace()->::tensorflow::tfprof::CodeDef::MergeFrom(from.trace()); |
4815 | } |
4816 | if (from.float_ops() != 0) { |
4817 | set_float_ops(from.float_ops()); |
4818 | } |
4819 | if (from.id() != 0) { |
4820 | set_id(from.id()); |
4821 | } |
4822 | } |
4823 | |
4824 | void ProfileNode::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
4825 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.ProfileNode) |
4826 | if (&from == this) return; |
4827 | Clear(); |
4828 | MergeFrom(from); |
4829 | } |
4830 | |
4831 | void ProfileNode::CopyFrom(const ProfileNode& from) { |
4832 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.ProfileNode) |
4833 | if (&from == this) return; |
4834 | Clear(); |
4835 | MergeFrom(from); |
4836 | } |
4837 | |
4838 | bool ProfileNode::IsInitialized() const { |
4839 | return true; |
4840 | } |
4841 | |
4842 | void ProfileNode::InternalSwap(ProfileNode* other) { |
4843 | using std::swap; |
4844 | _internal_metadata_.Swap(&other->_internal_metadata_); |
4845 | inputs_.Swap(&other->inputs_); |
4846 | outputs_.Swap(&other->outputs_); |
4847 | shape_.InternalSwap(&other->shape_); |
4848 | op_types_.InternalSwap(CastToBase(&other->op_types_)); |
4849 | attrs_.Swap(&other->attrs_); |
4850 | execs_.Swap(&other->execs_); |
4851 | src_output_index_.Swap(&other->src_output_index_); |
4852 | output_shapes_.Swap(&other->output_shapes_); |
4853 | input_shapes_.Swap(&other->input_shapes_); |
4854 | name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
4855 | GetArenaNoVirtual()); |
4856 | canonical_device_.Swap(&other->canonical_device_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
4857 | GetArenaNoVirtual()); |
4858 | host_device_.Swap(&other->host_device_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
4859 | GetArenaNoVirtual()); |
4860 | op_.Swap(&other->op_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
4861 | GetArenaNoVirtual()); |
4862 | swap(trace_, other->trace_); |
4863 | swap(float_ops_, other->float_ops_); |
4864 | swap(id_, other->id_); |
4865 | } |
4866 | |
4867 | ::PROTOBUF_NAMESPACE_ID::Metadata ProfileNode::GetMetadata() const { |
4868 | return GetMetadataStatic(); |
4869 | } |
4870 | |
4871 | |
4872 | // =================================================================== |
4873 | |
4874 | ExecProfile_AcceleratorExecsEntry_DoNotUse::ExecProfile_AcceleratorExecsEntry_DoNotUse() {} |
4875 | ExecProfile_AcceleratorExecsEntry_DoNotUse::ExecProfile_AcceleratorExecsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
4876 | : SuperType(arena) {} |
4877 | void ExecProfile_AcceleratorExecsEntry_DoNotUse::MergeFrom(const ExecProfile_AcceleratorExecsEntry_DoNotUse& other) { |
4878 | MergeFromInternal(other); |
4879 | } |
4880 | ::PROTOBUF_NAMESPACE_ID::Metadata ExecProfile_AcceleratorExecsEntry_DoNotUse::GetMetadata() const { |
4881 | return GetMetadataStatic(); |
4882 | } |
4883 | void ExecProfile_AcceleratorExecsEntry_DoNotUse::MergeFrom( |
4884 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
4885 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
4886 | } |
4887 | |
4888 | |
4889 | // =================================================================== |
4890 | |
4891 | ExecProfile_CpuExecsEntry_DoNotUse::ExecProfile_CpuExecsEntry_DoNotUse() {} |
4892 | ExecProfile_CpuExecsEntry_DoNotUse::ExecProfile_CpuExecsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
4893 | : SuperType(arena) {} |
4894 | void ExecProfile_CpuExecsEntry_DoNotUse::MergeFrom(const ExecProfile_CpuExecsEntry_DoNotUse& other) { |
4895 | MergeFromInternal(other); |
4896 | } |
4897 | ::PROTOBUF_NAMESPACE_ID::Metadata ExecProfile_CpuExecsEntry_DoNotUse::GetMetadata() const { |
4898 | return GetMetadataStatic(); |
4899 | } |
4900 | void ExecProfile_CpuExecsEntry_DoNotUse::MergeFrom( |
4901 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
4902 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
4903 | } |
4904 | |
4905 | |
4906 | // =================================================================== |
4907 | |
4908 | void ExecProfile::InitAsDefaultInstance() { |
4909 | } |
4910 | class ExecProfile::_Internal { |
4911 | public: |
4912 | }; |
4913 | |
4914 | void ExecProfile::clear_allocations() { |
4915 | allocations_.Clear(); |
4916 | } |
4917 | ExecProfile::ExecProfile() |
4918 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
4919 | SharedCtor(); |
4920 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.ExecProfile) |
4921 | } |
4922 | ExecProfile::ExecProfile(const ExecProfile& from) |
4923 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
4924 | _internal_metadata_(nullptr), |
4925 | devices_(from.devices_), |
4926 | memory_execs_(from.memory_execs_), |
4927 | allocations_(from.allocations_) { |
4928 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
4929 | accelerator_execs_.MergeFrom(from.accelerator_execs_); |
4930 | cpu_execs_.MergeFrom(from.cpu_execs_); |
4931 | ::memcpy(&run_count_, &from.run_count_, |
4932 | static_cast<size_t>(reinterpret_cast<char*>(&latest_end_micros_) - |
4933 | reinterpret_cast<char*>(&run_count_)) + sizeof(latest_end_micros_)); |
4934 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.ExecProfile) |
4935 | } |
4936 | |
4937 | void ExecProfile::SharedCtor() { |
4938 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ExecProfile_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
4939 | ::memset(&run_count_, 0, static_cast<size_t>( |
4940 | reinterpret_cast<char*>(&latest_end_micros_) - |
4941 | reinterpret_cast<char*>(&run_count_)) + sizeof(latest_end_micros_)); |
4942 | } |
4943 | |
4944 | ExecProfile::~ExecProfile() { |
4945 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.ExecProfile) |
4946 | SharedDtor(); |
4947 | } |
4948 | |
4949 | void ExecProfile::SharedDtor() { |
4950 | } |
4951 | |
4952 | void ExecProfile::SetCachedSize(int size) const { |
4953 | _cached_size_.Set(size); |
4954 | } |
4955 | const ExecProfile& ExecProfile::default_instance() { |
4956 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ExecProfile_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
4957 | return *internal_default_instance(); |
4958 | } |
4959 | |
4960 | |
4961 | void ExecProfile::Clear() { |
4962 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.ExecProfile) |
4963 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
4964 | // Prevent compiler warnings about cached_has_bits being unused |
4965 | (void) cached_has_bits; |
4966 | |
4967 | accelerator_execs_.Clear(); |
4968 | cpu_execs_.Clear(); |
4969 | devices_.Clear(); |
4970 | memory_execs_.Clear(); |
4971 | allocations_.Clear(); |
4972 | ::memset(&run_count_, 0, static_cast<size_t>( |
4973 | reinterpret_cast<char*>(&latest_end_micros_) - |
4974 | reinterpret_cast<char*>(&run_count_)) + sizeof(latest_end_micros_)); |
4975 | _internal_metadata_.Clear(); |
4976 | } |
4977 | |
4978 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
4979 | const char* ExecProfile::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
4980 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
4981 | while (!ctx->Done(&ptr)) { |
4982 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
4983 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
4984 | CHK_(ptr); |
4985 | switch (tag >> 3) { |
4986 | // int64 run_count = 1; |
4987 | case 1: |
4988 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
4989 | run_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
4990 | CHK_(ptr); |
4991 | } else goto handle_unusual; |
4992 | continue; |
4993 | // int64 all_start_micros = 2; |
4994 | case 2: |
4995 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
4996 | all_start_micros_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
4997 | CHK_(ptr); |
4998 | } else goto handle_unusual; |
4999 | continue; |
5000 | // int64 latest_end_micros = 3; |
5001 | case 3: |
5002 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
5003 | latest_end_micros_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
5004 | CHK_(ptr); |
5005 | } else goto handle_unusual; |
5006 | continue; |
5007 | // map<string, .tensorflow.tfprof.ExecTime> accelerator_execs = 4; |
5008 | case 4: |
5009 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
5010 | ptr -= 1; |
5011 | do { |
5012 | ptr += 1; |
5013 | ptr = ctx->ParseMessage(&accelerator_execs_, ptr); |
5014 | CHK_(ptr); |
5015 | if (!ctx->DataAvailable(ptr)) break; |
5016 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 34); |
5017 | } else goto handle_unusual; |
5018 | continue; |
5019 | // map<string, .tensorflow.tfprof.ExecTime> cpu_execs = 5; |
5020 | case 5: |
5021 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
5022 | ptr -= 1; |
5023 | do { |
5024 | ptr += 1; |
5025 | ptr = ctx->ParseMessage(&cpu_execs_, ptr); |
5026 | CHK_(ptr); |
5027 | if (!ctx->DataAvailable(ptr)) break; |
5028 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 42); |
5029 | } else goto handle_unusual; |
5030 | continue; |
5031 | // repeated string devices = 6; |
5032 | case 6: |
5033 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { |
5034 | ptr -= 1; |
5035 | do { |
5036 | ptr += 1; |
5037 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_devices(), ptr, ctx, "tensorflow.tfprof.ExecProfile.devices" ); |
5038 | CHK_(ptr); |
5039 | if (!ctx->DataAvailable(ptr)) break; |
5040 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 50); |
5041 | } else goto handle_unusual; |
5042 | continue; |
5043 | // repeated .tensorflow.tfprof.ExecMemory memory_execs = 7; |
5044 | case 7: |
5045 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
5046 | ptr -= 1; |
5047 | do { |
5048 | ptr += 1; |
5049 | ptr = ctx->ParseMessage(add_memory_execs(), ptr); |
5050 | CHK_(ptr); |
5051 | if (!ctx->DataAvailable(ptr)) break; |
5052 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 58); |
5053 | } else goto handle_unusual; |
5054 | continue; |
5055 | // repeated .tensorflow.AllocationRecord allocations = 11; |
5056 | case 11: |
5057 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) { |
5058 | ptr -= 1; |
5059 | do { |
5060 | ptr += 1; |
5061 | ptr = ctx->ParseMessage(add_allocations(), ptr); |
5062 | CHK_(ptr); |
5063 | if (!ctx->DataAvailable(ptr)) break; |
5064 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 90); |
5065 | } else goto handle_unusual; |
5066 | continue; |
5067 | default: { |
5068 | handle_unusual: |
5069 | if ((tag & 7) == 4 || tag == 0) { |
5070 | ctx->SetLastTag(tag); |
5071 | goto success; |
5072 | } |
5073 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
5074 | CHK_(ptr != nullptr); |
5075 | continue; |
5076 | } |
5077 | } // switch |
5078 | } // while |
5079 | success: |
5080 | return ptr; |
5081 | failure: |
5082 | ptr = nullptr; |
5083 | goto success; |
5084 | #undef CHK_ |
5085 | } |
5086 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
5087 | bool ExecProfile::MergePartialFromCodedStream( |
5088 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
5089 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
5090 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
5091 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.ExecProfile) |
5092 | for (;;) { |
5093 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
5094 | tag = p.first; |
5095 | if (!p.second) goto handle_unusual; |
5096 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
5097 | // int64 run_count = 1; |
5098 | case 1: { |
5099 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
5100 | |
5101 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
5102 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
5103 | input, &run_count_))); |
5104 | } else { |
5105 | goto handle_unusual; |
5106 | } |
5107 | break; |
5108 | } |
5109 | |
5110 | // int64 all_start_micros = 2; |
5111 | case 2: { |
5112 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
5113 | |
5114 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
5115 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
5116 | input, &all_start_micros_))); |
5117 | } else { |
5118 | goto handle_unusual; |
5119 | } |
5120 | break; |
5121 | } |
5122 | |
5123 | // int64 latest_end_micros = 3; |
5124 | case 3: { |
5125 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
5126 | |
5127 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
5128 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
5129 | input, &latest_end_micros_))); |
5130 | } else { |
5131 | goto handle_unusual; |
5132 | } |
5133 | break; |
5134 | } |
5135 | |
5136 | // map<string, .tensorflow.tfprof.ExecTime> accelerator_execs = 4; |
5137 | case 4: { |
5138 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
5139 | ExecProfile_AcceleratorExecsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
5140 | ExecProfile_AcceleratorExecsEntry_DoNotUse, |
5141 | std::string, ::tensorflow::tfprof::ExecTime, |
5142 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, |
5143 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
5144 | 0 >, |
5145 | ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime > > parser(&accelerator_execs_); |
5146 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
5147 | input, &parser)); |
5148 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5149 | parser.key().data(), static_cast<int>(parser.key().length()), |
5150 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
5151 | "tensorflow.tfprof.ExecProfile.AcceleratorExecsEntry.key" )); |
5152 | } else { |
5153 | goto handle_unusual; |
5154 | } |
5155 | break; |
5156 | } |
5157 | |
5158 | // map<string, .tensorflow.tfprof.ExecTime> cpu_execs = 5; |
5159 | case 5: { |
5160 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
5161 | ExecProfile_CpuExecsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
5162 | ExecProfile_CpuExecsEntry_DoNotUse, |
5163 | std::string, ::tensorflow::tfprof::ExecTime, |
5164 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, |
5165 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
5166 | 0 >, |
5167 | ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime > > parser(&cpu_execs_); |
5168 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
5169 | input, &parser)); |
5170 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5171 | parser.key().data(), static_cast<int>(parser.key().length()), |
5172 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
5173 | "tensorflow.tfprof.ExecProfile.CpuExecsEntry.key" )); |
5174 | } else { |
5175 | goto handle_unusual; |
5176 | } |
5177 | break; |
5178 | } |
5179 | |
5180 | // repeated string devices = 6; |
5181 | case 6: { |
5182 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { |
5183 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
5184 | input, this->add_devices())); |
5185 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5186 | this->devices(this->devices_size() - 1).data(), |
5187 | static_cast<int>(this->devices(this->devices_size() - 1).length()), |
5188 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
5189 | "tensorflow.tfprof.ExecProfile.devices" )); |
5190 | } else { |
5191 | goto handle_unusual; |
5192 | } |
5193 | break; |
5194 | } |
5195 | |
5196 | // repeated .tensorflow.tfprof.ExecMemory memory_execs = 7; |
5197 | case 7: { |
5198 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
5199 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
5200 | input, add_memory_execs())); |
5201 | } else { |
5202 | goto handle_unusual; |
5203 | } |
5204 | break; |
5205 | } |
5206 | |
5207 | // repeated .tensorflow.AllocationRecord allocations = 11; |
5208 | case 11: { |
5209 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) { |
5210 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
5211 | input, add_allocations())); |
5212 | } else { |
5213 | goto handle_unusual; |
5214 | } |
5215 | break; |
5216 | } |
5217 | |
5218 | default: { |
5219 | handle_unusual: |
5220 | if (tag == 0) { |
5221 | goto success; |
5222 | } |
5223 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
5224 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
5225 | break; |
5226 | } |
5227 | } |
5228 | } |
5229 | success: |
5230 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.ExecProfile) |
5231 | return true; |
5232 | failure: |
5233 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.ExecProfile) |
5234 | return false; |
5235 | #undef DO_ |
5236 | } |
5237 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
5238 | |
5239 | void ExecProfile::SerializeWithCachedSizes( |
5240 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
5241 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.ExecProfile) |
5242 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5243 | (void) cached_has_bits; |
5244 | |
5245 | // int64 run_count = 1; |
5246 | if (this->run_count() != 0) { |
5247 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->run_count(), output); |
5248 | } |
5249 | |
5250 | // int64 all_start_micros = 2; |
5251 | if (this->all_start_micros() != 0) { |
5252 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->all_start_micros(), output); |
5253 | } |
5254 | |
5255 | // int64 latest_end_micros = 3; |
5256 | if (this->latest_end_micros() != 0) { |
5257 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->latest_end_micros(), output); |
5258 | } |
5259 | |
5260 | // map<string, .tensorflow.tfprof.ExecTime> accelerator_execs = 4; |
5261 | if (!this->accelerator_execs().empty()) { |
5262 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_pointer |
5263 | ConstPtr; |
5264 | typedef ConstPtr SortItem; |
5265 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
5266 | struct Utf8Check { |
5267 | static void Check(ConstPtr p) { |
5268 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5269 | p->first.data(), static_cast<int>(p->first.length()), |
5270 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
5271 | "tensorflow.tfprof.ExecProfile.AcceleratorExecsEntry.key" ); |
5272 | } |
5273 | }; |
5274 | |
5275 | if (output->IsSerializationDeterministic() && |
5276 | this->accelerator_execs().size() > 1) { |
5277 | ::std::unique_ptr<SortItem[]> items( |
5278 | new SortItem[this->accelerator_execs().size()]); |
5279 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::size_type size_type; |
5280 | size_type n = 0; |
5281 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_iterator |
5282 | it = this->accelerator_execs().begin(); |
5283 | it != this->accelerator_execs().end(); ++it, ++n) { |
5284 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
5285 | } |
5286 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
5287 | for (size_type i = 0; i < n; i++) { |
5288 | ExecProfile_AcceleratorExecsEntry_DoNotUse::Funcs::SerializeToCodedStream(4, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output); |
5289 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
5290 | } |
5291 | } else { |
5292 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_iterator |
5293 | it = this->accelerator_execs().begin(); |
5294 | it != this->accelerator_execs().end(); ++it) { |
5295 | ExecProfile_AcceleratorExecsEntry_DoNotUse::Funcs::SerializeToCodedStream(4, it->first, it->second, output); |
5296 | Utf8Check::Check(&(*it)); |
5297 | } |
5298 | } |
5299 | } |
5300 | |
5301 | // map<string, .tensorflow.tfprof.ExecTime> cpu_execs = 5; |
5302 | if (!this->cpu_execs().empty()) { |
5303 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_pointer |
5304 | ConstPtr; |
5305 | typedef ConstPtr SortItem; |
5306 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
5307 | struct Utf8Check { |
5308 | static void Check(ConstPtr p) { |
5309 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5310 | p->first.data(), static_cast<int>(p->first.length()), |
5311 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
5312 | "tensorflow.tfprof.ExecProfile.CpuExecsEntry.key" ); |
5313 | } |
5314 | }; |
5315 | |
5316 | if (output->IsSerializationDeterministic() && |
5317 | this->cpu_execs().size() > 1) { |
5318 | ::std::unique_ptr<SortItem[]> items( |
5319 | new SortItem[this->cpu_execs().size()]); |
5320 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::size_type size_type; |
5321 | size_type n = 0; |
5322 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_iterator |
5323 | it = this->cpu_execs().begin(); |
5324 | it != this->cpu_execs().end(); ++it, ++n) { |
5325 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
5326 | } |
5327 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
5328 | for (size_type i = 0; i < n; i++) { |
5329 | ExecProfile_CpuExecsEntry_DoNotUse::Funcs::SerializeToCodedStream(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output); |
5330 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
5331 | } |
5332 | } else { |
5333 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_iterator |
5334 | it = this->cpu_execs().begin(); |
5335 | it != this->cpu_execs().end(); ++it) { |
5336 | ExecProfile_CpuExecsEntry_DoNotUse::Funcs::SerializeToCodedStream(5, it->first, it->second, output); |
5337 | Utf8Check::Check(&(*it)); |
5338 | } |
5339 | } |
5340 | } |
5341 | |
5342 | // repeated string devices = 6; |
5343 | for (int i = 0, n = this->devices_size(); i < n; i++) { |
5344 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5345 | this->devices(i).data(), static_cast<int>(this->devices(i).length()), |
5346 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
5347 | "tensorflow.tfprof.ExecProfile.devices" ); |
5348 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( |
5349 | 6, this->devices(i), output); |
5350 | } |
5351 | |
5352 | // repeated .tensorflow.tfprof.ExecMemory memory_execs = 7; |
5353 | for (unsigned int i = 0, |
5354 | n = static_cast<unsigned int>(this->memory_execs_size()); i < n; i++) { |
5355 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
5356 | 7, |
5357 | this->memory_execs(static_cast<int>(i)), |
5358 | output); |
5359 | } |
5360 | |
5361 | // repeated .tensorflow.AllocationRecord allocations = 11; |
5362 | for (unsigned int i = 0, |
5363 | n = static_cast<unsigned int>(this->allocations_size()); i < n; i++) { |
5364 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
5365 | 11, |
5366 | this->allocations(static_cast<int>(i)), |
5367 | output); |
5368 | } |
5369 | |
5370 | if (_internal_metadata_.have_unknown_fields()) { |
5371 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
5372 | _internal_metadata_.unknown_fields(), output); |
5373 | } |
5374 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.ExecProfile) |
5375 | } |
5376 | |
5377 | ::PROTOBUF_NAMESPACE_ID::uint8* ExecProfile::InternalSerializeWithCachedSizesToArray( |
5378 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
5379 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.ExecProfile) |
5380 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5381 | (void) cached_has_bits; |
5382 | |
5383 | // int64 run_count = 1; |
5384 | if (this->run_count() != 0) { |
5385 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->run_count(), target); |
5386 | } |
5387 | |
5388 | // int64 all_start_micros = 2; |
5389 | if (this->all_start_micros() != 0) { |
5390 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->all_start_micros(), target); |
5391 | } |
5392 | |
5393 | // int64 latest_end_micros = 3; |
5394 | if (this->latest_end_micros() != 0) { |
5395 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->latest_end_micros(), target); |
5396 | } |
5397 | |
5398 | // map<string, .tensorflow.tfprof.ExecTime> accelerator_execs = 4; |
5399 | if (!this->accelerator_execs().empty()) { |
5400 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_pointer |
5401 | ConstPtr; |
5402 | typedef ConstPtr SortItem; |
5403 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
5404 | struct Utf8Check { |
5405 | static void Check(ConstPtr p) { |
5406 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5407 | p->first.data(), static_cast<int>(p->first.length()), |
5408 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
5409 | "tensorflow.tfprof.ExecProfile.AcceleratorExecsEntry.key" ); |
5410 | } |
5411 | }; |
5412 | |
5413 | if (false && |
5414 | this->accelerator_execs().size() > 1) { |
5415 | ::std::unique_ptr<SortItem[]> items( |
5416 | new SortItem[this->accelerator_execs().size()]); |
5417 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::size_type size_type; |
5418 | size_type n = 0; |
5419 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_iterator |
5420 | it = this->accelerator_execs().begin(); |
5421 | it != this->accelerator_execs().end(); ++it, ++n) { |
5422 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
5423 | } |
5424 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
5425 | for (size_type i = 0; i < n; i++) { |
5426 | target = ExecProfile_AcceleratorExecsEntry_DoNotUse::Funcs::SerializeToArray(4, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target); |
5427 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
5428 | } |
5429 | } else { |
5430 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_iterator |
5431 | it = this->accelerator_execs().begin(); |
5432 | it != this->accelerator_execs().end(); ++it) { |
5433 | target = ExecProfile_AcceleratorExecsEntry_DoNotUse::Funcs::SerializeToArray(4, it->first, it->second, target); |
5434 | Utf8Check::Check(&(*it)); |
5435 | } |
5436 | } |
5437 | } |
5438 | |
5439 | // map<string, .tensorflow.tfprof.ExecTime> cpu_execs = 5; |
5440 | if (!this->cpu_execs().empty()) { |
5441 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_pointer |
5442 | ConstPtr; |
5443 | typedef ConstPtr SortItem; |
5444 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
5445 | struct Utf8Check { |
5446 | static void Check(ConstPtr p) { |
5447 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5448 | p->first.data(), static_cast<int>(p->first.length()), |
5449 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
5450 | "tensorflow.tfprof.ExecProfile.CpuExecsEntry.key" ); |
5451 | } |
5452 | }; |
5453 | |
5454 | if (false && |
5455 | this->cpu_execs().size() > 1) { |
5456 | ::std::unique_ptr<SortItem[]> items( |
5457 | new SortItem[this->cpu_execs().size()]); |
5458 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::size_type size_type; |
5459 | size_type n = 0; |
5460 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_iterator |
5461 | it = this->cpu_execs().begin(); |
5462 | it != this->cpu_execs().end(); ++it, ++n) { |
5463 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
5464 | } |
5465 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
5466 | for (size_type i = 0; i < n; i++) { |
5467 | target = ExecProfile_CpuExecsEntry_DoNotUse::Funcs::SerializeToArray(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target); |
5468 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
5469 | } |
5470 | } else { |
5471 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_iterator |
5472 | it = this->cpu_execs().begin(); |
5473 | it != this->cpu_execs().end(); ++it) { |
5474 | target = ExecProfile_CpuExecsEntry_DoNotUse::Funcs::SerializeToArray(5, it->first, it->second, target); |
5475 | Utf8Check::Check(&(*it)); |
5476 | } |
5477 | } |
5478 | } |
5479 | |
5480 | // repeated string devices = 6; |
5481 | for (int i = 0, n = this->devices_size(); i < n; i++) { |
5482 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
5483 | this->devices(i).data(), static_cast<int>(this->devices(i).length()), |
5484 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
5485 | "tensorflow.tfprof.ExecProfile.devices" ); |
5486 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
5487 | WriteStringToArray(6, this->devices(i), target); |
5488 | } |
5489 | |
5490 | // repeated .tensorflow.tfprof.ExecMemory memory_execs = 7; |
5491 | for (unsigned int i = 0, |
5492 | n = static_cast<unsigned int>(this->memory_execs_size()); i < n; i++) { |
5493 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
5494 | InternalWriteMessageToArray( |
5495 | 7, this->memory_execs(static_cast<int>(i)), target); |
5496 | } |
5497 | |
5498 | // repeated .tensorflow.AllocationRecord allocations = 11; |
5499 | for (unsigned int i = 0, |
5500 | n = static_cast<unsigned int>(this->allocations_size()); i < n; i++) { |
5501 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
5502 | InternalWriteMessageToArray( |
5503 | 11, this->allocations(static_cast<int>(i)), target); |
5504 | } |
5505 | |
5506 | if (_internal_metadata_.have_unknown_fields()) { |
5507 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
5508 | _internal_metadata_.unknown_fields(), target); |
5509 | } |
5510 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.ExecProfile) |
5511 | return target; |
5512 | } |
5513 | |
5514 | size_t ExecProfile::ByteSizeLong() const { |
5515 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.ExecProfile) |
5516 | size_t total_size = 0; |
5517 | |
5518 | if (_internal_metadata_.have_unknown_fields()) { |
5519 | total_size += |
5520 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
5521 | _internal_metadata_.unknown_fields()); |
5522 | } |
5523 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5524 | // Prevent compiler warnings about cached_has_bits being unused |
5525 | (void) cached_has_bits; |
5526 | |
5527 | // map<string, .tensorflow.tfprof.ExecTime> accelerator_execs = 4; |
5528 | total_size += 1 * |
5529 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->accelerator_execs_size()); |
5530 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_iterator |
5531 | it = this->accelerator_execs().begin(); |
5532 | it != this->accelerator_execs().end(); ++it) { |
5533 | total_size += ExecProfile_AcceleratorExecsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
5534 | } |
5535 | |
5536 | // map<string, .tensorflow.tfprof.ExecTime> cpu_execs = 5; |
5537 | total_size += 1 * |
5538 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->cpu_execs_size()); |
5539 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::tfprof::ExecTime >::const_iterator |
5540 | it = this->cpu_execs().begin(); |
5541 | it != this->cpu_execs().end(); ++it) { |
5542 | total_size += ExecProfile_CpuExecsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
5543 | } |
5544 | |
5545 | // repeated string devices = 6; |
5546 | total_size += 1 * |
5547 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->devices_size()); |
5548 | for (int i = 0, n = this->devices_size(); i < n; i++) { |
5549 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
5550 | this->devices(i)); |
5551 | } |
5552 | |
5553 | // repeated .tensorflow.tfprof.ExecMemory memory_execs = 7; |
5554 | { |
5555 | unsigned int count = static_cast<unsigned int>(this->memory_execs_size()); |
5556 | total_size += 1UL * count; |
5557 | for (unsigned int i = 0; i < count; i++) { |
5558 | total_size += |
5559 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
5560 | this->memory_execs(static_cast<int>(i))); |
5561 | } |
5562 | } |
5563 | |
5564 | // repeated .tensorflow.AllocationRecord allocations = 11; |
5565 | { |
5566 | unsigned int count = static_cast<unsigned int>(this->allocations_size()); |
5567 | total_size += 1UL * count; |
5568 | for (unsigned int i = 0; i < count; i++) { |
5569 | total_size += |
5570 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
5571 | this->allocations(static_cast<int>(i))); |
5572 | } |
5573 | } |
5574 | |
5575 | // int64 run_count = 1; |
5576 | if (this->run_count() != 0) { |
5577 | total_size += 1 + |
5578 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
5579 | this->run_count()); |
5580 | } |
5581 | |
5582 | // int64 all_start_micros = 2; |
5583 | if (this->all_start_micros() != 0) { |
5584 | total_size += 1 + |
5585 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
5586 | this->all_start_micros()); |
5587 | } |
5588 | |
5589 | // int64 latest_end_micros = 3; |
5590 | if (this->latest_end_micros() != 0) { |
5591 | total_size += 1 + |
5592 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
5593 | this->latest_end_micros()); |
5594 | } |
5595 | |
5596 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
5597 | SetCachedSize(cached_size); |
5598 | return total_size; |
5599 | } |
5600 | |
5601 | void ExecProfile::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
5602 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.ExecProfile) |
5603 | GOOGLE_DCHECK_NE(&from, this); |
5604 | const ExecProfile* source = |
5605 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ExecProfile>( |
5606 | &from); |
5607 | if (source == nullptr) { |
5608 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.ExecProfile) |
5609 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
5610 | } else { |
5611 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.ExecProfile) |
5612 | MergeFrom(*source); |
5613 | } |
5614 | } |
5615 | |
5616 | void ExecProfile::MergeFrom(const ExecProfile& from) { |
5617 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.ExecProfile) |
5618 | GOOGLE_DCHECK_NE(&from, this); |
5619 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
5620 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5621 | (void) cached_has_bits; |
5622 | |
5623 | accelerator_execs_.MergeFrom(from.accelerator_execs_); |
5624 | cpu_execs_.MergeFrom(from.cpu_execs_); |
5625 | devices_.MergeFrom(from.devices_); |
5626 | memory_execs_.MergeFrom(from.memory_execs_); |
5627 | allocations_.MergeFrom(from.allocations_); |
5628 | if (from.run_count() != 0) { |
5629 | set_run_count(from.run_count()); |
5630 | } |
5631 | if (from.all_start_micros() != 0) { |
5632 | set_all_start_micros(from.all_start_micros()); |
5633 | } |
5634 | if (from.latest_end_micros() != 0) { |
5635 | set_latest_end_micros(from.latest_end_micros()); |
5636 | } |
5637 | } |
5638 | |
5639 | void ExecProfile::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
5640 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.ExecProfile) |
5641 | if (&from == this) return; |
5642 | Clear(); |
5643 | MergeFrom(from); |
5644 | } |
5645 | |
5646 | void ExecProfile::CopyFrom(const ExecProfile& from) { |
5647 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.ExecProfile) |
5648 | if (&from == this) return; |
5649 | Clear(); |
5650 | MergeFrom(from); |
5651 | } |
5652 | |
5653 | bool ExecProfile::IsInitialized() const { |
5654 | return true; |
5655 | } |
5656 | |
5657 | void ExecProfile::InternalSwap(ExecProfile* other) { |
5658 | using std::swap; |
5659 | _internal_metadata_.Swap(&other->_internal_metadata_); |
5660 | accelerator_execs_.Swap(&other->accelerator_execs_); |
5661 | cpu_execs_.Swap(&other->cpu_execs_); |
5662 | devices_.InternalSwap(CastToBase(&other->devices_)); |
5663 | CastToBase(&memory_execs_)->InternalSwap(CastToBase(&other->memory_execs_)); |
5664 | CastToBase(&allocations_)->InternalSwap(CastToBase(&other->allocations_)); |
5665 | swap(run_count_, other->run_count_); |
5666 | swap(all_start_micros_, other->all_start_micros_); |
5667 | swap(latest_end_micros_, other->latest_end_micros_); |
5668 | } |
5669 | |
5670 | ::PROTOBUF_NAMESPACE_ID::Metadata ExecProfile::GetMetadata() const { |
5671 | return GetMetadataStatic(); |
5672 | } |
5673 | |
5674 | |
5675 | // =================================================================== |
5676 | |
5677 | void ExecTime::InitAsDefaultInstance() { |
5678 | } |
5679 | class ExecTime::_Internal { |
5680 | public: |
5681 | }; |
5682 | |
5683 | ExecTime::ExecTime() |
5684 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
5685 | SharedCtor(); |
5686 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.ExecTime) |
5687 | } |
5688 | ExecTime::ExecTime(const ExecTime& from) |
5689 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
5690 | _internal_metadata_(nullptr), |
5691 | times_(from.times_) { |
5692 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
5693 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.ExecTime) |
5694 | } |
5695 | |
5696 | void ExecTime::SharedCtor() { |
5697 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ExecTime_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
5698 | } |
5699 | |
5700 | ExecTime::~ExecTime() { |
5701 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.ExecTime) |
5702 | SharedDtor(); |
5703 | } |
5704 | |
5705 | void ExecTime::SharedDtor() { |
5706 | } |
5707 | |
5708 | void ExecTime::SetCachedSize(int size) const { |
5709 | _cached_size_.Set(size); |
5710 | } |
5711 | const ExecTime& ExecTime::default_instance() { |
5712 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ExecTime_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
5713 | return *internal_default_instance(); |
5714 | } |
5715 | |
5716 | |
5717 | void ExecTime::Clear() { |
5718 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.ExecTime) |
5719 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5720 | // Prevent compiler warnings about cached_has_bits being unused |
5721 | (void) cached_has_bits; |
5722 | |
5723 | times_.Clear(); |
5724 | _internal_metadata_.Clear(); |
5725 | } |
5726 | |
5727 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
5728 | const char* ExecTime::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
5729 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
5730 | while (!ctx->Done(&ptr)) { |
5731 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
5732 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
5733 | CHK_(ptr); |
5734 | switch (tag >> 3) { |
5735 | // repeated .tensorflow.tfprof.Tuple times = 1; |
5736 | case 1: |
5737 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
5738 | ptr -= 1; |
5739 | do { |
5740 | ptr += 1; |
5741 | ptr = ctx->ParseMessage(add_times(), ptr); |
5742 | CHK_(ptr); |
5743 | if (!ctx->DataAvailable(ptr)) break; |
5744 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
5745 | } else goto handle_unusual; |
5746 | continue; |
5747 | default: { |
5748 | handle_unusual: |
5749 | if ((tag & 7) == 4 || tag == 0) { |
5750 | ctx->SetLastTag(tag); |
5751 | goto success; |
5752 | } |
5753 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
5754 | CHK_(ptr != nullptr); |
5755 | continue; |
5756 | } |
5757 | } // switch |
5758 | } // while |
5759 | success: |
5760 | return ptr; |
5761 | failure: |
5762 | ptr = nullptr; |
5763 | goto success; |
5764 | #undef CHK_ |
5765 | } |
5766 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
5767 | bool ExecTime::MergePartialFromCodedStream( |
5768 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
5769 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
5770 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
5771 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.ExecTime) |
5772 | for (;;) { |
5773 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
5774 | tag = p.first; |
5775 | if (!p.second) goto handle_unusual; |
5776 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
5777 | // repeated .tensorflow.tfprof.Tuple times = 1; |
5778 | case 1: { |
5779 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
5780 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
5781 | input, add_times())); |
5782 | } else { |
5783 | goto handle_unusual; |
5784 | } |
5785 | break; |
5786 | } |
5787 | |
5788 | default: { |
5789 | handle_unusual: |
5790 | if (tag == 0) { |
5791 | goto success; |
5792 | } |
5793 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
5794 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
5795 | break; |
5796 | } |
5797 | } |
5798 | } |
5799 | success: |
5800 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.ExecTime) |
5801 | return true; |
5802 | failure: |
5803 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.ExecTime) |
5804 | return false; |
5805 | #undef DO_ |
5806 | } |
5807 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
5808 | |
5809 | void ExecTime::SerializeWithCachedSizes( |
5810 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
5811 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.ExecTime) |
5812 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5813 | (void) cached_has_bits; |
5814 | |
5815 | // repeated .tensorflow.tfprof.Tuple times = 1; |
5816 | for (unsigned int i = 0, |
5817 | n = static_cast<unsigned int>(this->times_size()); i < n; i++) { |
5818 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
5819 | 1, |
5820 | this->times(static_cast<int>(i)), |
5821 | output); |
5822 | } |
5823 | |
5824 | if (_internal_metadata_.have_unknown_fields()) { |
5825 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
5826 | _internal_metadata_.unknown_fields(), output); |
5827 | } |
5828 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.ExecTime) |
5829 | } |
5830 | |
5831 | ::PROTOBUF_NAMESPACE_ID::uint8* ExecTime::InternalSerializeWithCachedSizesToArray( |
5832 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
5833 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.ExecTime) |
5834 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5835 | (void) cached_has_bits; |
5836 | |
5837 | // repeated .tensorflow.tfprof.Tuple times = 1; |
5838 | for (unsigned int i = 0, |
5839 | n = static_cast<unsigned int>(this->times_size()); i < n; i++) { |
5840 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
5841 | InternalWriteMessageToArray( |
5842 | 1, this->times(static_cast<int>(i)), target); |
5843 | } |
5844 | |
5845 | if (_internal_metadata_.have_unknown_fields()) { |
5846 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
5847 | _internal_metadata_.unknown_fields(), target); |
5848 | } |
5849 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.ExecTime) |
5850 | return target; |
5851 | } |
5852 | |
5853 | size_t ExecTime::ByteSizeLong() const { |
5854 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.ExecTime) |
5855 | size_t total_size = 0; |
5856 | |
5857 | if (_internal_metadata_.have_unknown_fields()) { |
5858 | total_size += |
5859 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
5860 | _internal_metadata_.unknown_fields()); |
5861 | } |
5862 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5863 | // Prevent compiler warnings about cached_has_bits being unused |
5864 | (void) cached_has_bits; |
5865 | |
5866 | // repeated .tensorflow.tfprof.Tuple times = 1; |
5867 | { |
5868 | unsigned int count = static_cast<unsigned int>(this->times_size()); |
5869 | total_size += 1UL * count; |
5870 | for (unsigned int i = 0; i < count; i++) { |
5871 | total_size += |
5872 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
5873 | this->times(static_cast<int>(i))); |
5874 | } |
5875 | } |
5876 | |
5877 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
5878 | SetCachedSize(cached_size); |
5879 | return total_size; |
5880 | } |
5881 | |
5882 | void ExecTime::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
5883 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.ExecTime) |
5884 | GOOGLE_DCHECK_NE(&from, this); |
5885 | const ExecTime* source = |
5886 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ExecTime>( |
5887 | &from); |
5888 | if (source == nullptr) { |
5889 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.ExecTime) |
5890 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
5891 | } else { |
5892 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.ExecTime) |
5893 | MergeFrom(*source); |
5894 | } |
5895 | } |
5896 | |
5897 | void ExecTime::MergeFrom(const ExecTime& from) { |
5898 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.ExecTime) |
5899 | GOOGLE_DCHECK_NE(&from, this); |
5900 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
5901 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
5902 | (void) cached_has_bits; |
5903 | |
5904 | times_.MergeFrom(from.times_); |
5905 | } |
5906 | |
5907 | void ExecTime::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
5908 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.ExecTime) |
5909 | if (&from == this) return; |
5910 | Clear(); |
5911 | MergeFrom(from); |
5912 | } |
5913 | |
5914 | void ExecTime::CopyFrom(const ExecTime& from) { |
5915 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.ExecTime) |
5916 | if (&from == this) return; |
5917 | Clear(); |
5918 | MergeFrom(from); |
5919 | } |
5920 | |
5921 | bool ExecTime::IsInitialized() const { |
5922 | return true; |
5923 | } |
5924 | |
5925 | void ExecTime::InternalSwap(ExecTime* other) { |
5926 | using std::swap; |
5927 | _internal_metadata_.Swap(&other->_internal_metadata_); |
5928 | CastToBase(×_)->InternalSwap(CastToBase(&other->times_)); |
5929 | } |
5930 | |
5931 | ::PROTOBUF_NAMESPACE_ID::Metadata ExecTime::GetMetadata() const { |
5932 | return GetMetadataStatic(); |
5933 | } |
5934 | |
5935 | |
5936 | // =================================================================== |
5937 | |
5938 | ExecMemory_OutputMemoryEntry_DoNotUse::ExecMemory_OutputMemoryEntry_DoNotUse() {} |
5939 | ExecMemory_OutputMemoryEntry_DoNotUse::ExecMemory_OutputMemoryEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
5940 | : SuperType(arena) {} |
5941 | void ExecMemory_OutputMemoryEntry_DoNotUse::MergeFrom(const ExecMemory_OutputMemoryEntry_DoNotUse& other) { |
5942 | MergeFromInternal(other); |
5943 | } |
5944 | ::PROTOBUF_NAMESPACE_ID::Metadata ExecMemory_OutputMemoryEntry_DoNotUse::GetMetadata() const { |
5945 | return GetMetadataStatic(); |
5946 | } |
5947 | void ExecMemory_OutputMemoryEntry_DoNotUse::MergeFrom( |
5948 | const ::PROTOBUF_NAMESPACE_ID::Message& other) { |
5949 | ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); |
5950 | } |
5951 | |
5952 | |
5953 | // =================================================================== |
5954 | |
5955 | void ExecMemory::InitAsDefaultInstance() { |
5956 | } |
5957 | class ExecMemory::_Internal { |
5958 | public: |
5959 | }; |
5960 | |
5961 | ExecMemory::ExecMemory() |
5962 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
5963 | SharedCtor(); |
5964 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.ExecMemory) |
5965 | } |
5966 | ExecMemory::ExecMemory(const ExecMemory& from) |
5967 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
5968 | _internal_metadata_(nullptr) { |
5969 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
5970 | output_memory_.MergeFrom(from.output_memory_); |
5971 | ::memcpy(&memory_micros_, &from.memory_micros_, |
5972 | static_cast<size_t>(reinterpret_cast<char*>(&allocator_bytes_in_use_) - |
5973 | reinterpret_cast<char*>(&memory_micros_)) + sizeof(allocator_bytes_in_use_)); |
5974 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.ExecMemory) |
5975 | } |
5976 | |
5977 | void ExecMemory::SharedCtor() { |
5978 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ExecMemory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
5979 | ::memset(&memory_micros_, 0, static_cast<size_t>( |
5980 | reinterpret_cast<char*>(&allocator_bytes_in_use_) - |
5981 | reinterpret_cast<char*>(&memory_micros_)) + sizeof(allocator_bytes_in_use_)); |
5982 | } |
5983 | |
5984 | ExecMemory::~ExecMemory() { |
5985 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.ExecMemory) |
5986 | SharedDtor(); |
5987 | } |
5988 | |
5989 | void ExecMemory::SharedDtor() { |
5990 | } |
5991 | |
5992 | void ExecMemory::SetCachedSize(int size) const { |
5993 | _cached_size_.Set(size); |
5994 | } |
5995 | const ExecMemory& ExecMemory::default_instance() { |
5996 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ExecMemory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
5997 | return *internal_default_instance(); |
5998 | } |
5999 | |
6000 | |
6001 | void ExecMemory::Clear() { |
6002 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.ExecMemory) |
6003 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6004 | // Prevent compiler warnings about cached_has_bits being unused |
6005 | (void) cached_has_bits; |
6006 | |
6007 | output_memory_.Clear(); |
6008 | ::memset(&memory_micros_, 0, static_cast<size_t>( |
6009 | reinterpret_cast<char*>(&allocator_bytes_in_use_) - |
6010 | reinterpret_cast<char*>(&memory_micros_)) + sizeof(allocator_bytes_in_use_)); |
6011 | _internal_metadata_.Clear(); |
6012 | } |
6013 | |
6014 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6015 | const char* ExecMemory::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
6016 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
6017 | while (!ctx->Done(&ptr)) { |
6018 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
6019 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
6020 | CHK_(ptr); |
6021 | switch (tag >> 3) { |
6022 | // int64 memory_micros = 1; |
6023 | case 1: |
6024 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
6025 | memory_micros_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6026 | CHK_(ptr); |
6027 | } else goto handle_unusual; |
6028 | continue; |
6029 | // int64 host_temp_bytes = 2; |
6030 | case 2: |
6031 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
6032 | host_temp_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6033 | CHK_(ptr); |
6034 | } else goto handle_unusual; |
6035 | continue; |
6036 | // int64 host_persistent_bytes = 3; |
6037 | case 3: |
6038 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
6039 | host_persistent_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6040 | CHK_(ptr); |
6041 | } else goto handle_unusual; |
6042 | continue; |
6043 | // int64 accelerator_temp_bytes = 4; |
6044 | case 4: |
6045 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
6046 | accelerator_temp_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6047 | CHK_(ptr); |
6048 | } else goto handle_unusual; |
6049 | continue; |
6050 | // int64 accelerator_persistent_bytes = 5; |
6051 | case 5: |
6052 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) { |
6053 | accelerator_persistent_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6054 | CHK_(ptr); |
6055 | } else goto handle_unusual; |
6056 | continue; |
6057 | // int64 requested_bytes = 6; |
6058 | case 6: |
6059 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { |
6060 | requested_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6061 | CHK_(ptr); |
6062 | } else goto handle_unusual; |
6063 | continue; |
6064 | // int64 peak_bytes = 7; |
6065 | case 7: |
6066 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { |
6067 | peak_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6068 | CHK_(ptr); |
6069 | } else goto handle_unusual; |
6070 | continue; |
6071 | // int64 residual_bytes = 8; |
6072 | case 8: |
6073 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { |
6074 | residual_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6075 | CHK_(ptr); |
6076 | } else goto handle_unusual; |
6077 | continue; |
6078 | // int64 output_bytes = 9; |
6079 | case 9: |
6080 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 72)) { |
6081 | output_bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6082 | CHK_(ptr); |
6083 | } else goto handle_unusual; |
6084 | continue; |
6085 | // int64 allocator_bytes_in_use = 10; |
6086 | case 10: |
6087 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80)) { |
6088 | allocator_bytes_in_use_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
6089 | CHK_(ptr); |
6090 | } else goto handle_unusual; |
6091 | continue; |
6092 | // map<int32, .tensorflow.tfprof.Memory> output_memory = 11; |
6093 | case 11: |
6094 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) { |
6095 | ptr -= 1; |
6096 | do { |
6097 | ptr += 1; |
6098 | ptr = ctx->ParseMessage(&output_memory_, ptr); |
6099 | CHK_(ptr); |
6100 | if (!ctx->DataAvailable(ptr)) break; |
6101 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 90); |
6102 | } else goto handle_unusual; |
6103 | continue; |
6104 | default: { |
6105 | handle_unusual: |
6106 | if ((tag & 7) == 4 || tag == 0) { |
6107 | ctx->SetLastTag(tag); |
6108 | goto success; |
6109 | } |
6110 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
6111 | CHK_(ptr != nullptr); |
6112 | continue; |
6113 | } |
6114 | } // switch |
6115 | } // while |
6116 | success: |
6117 | return ptr; |
6118 | failure: |
6119 | ptr = nullptr; |
6120 | goto success; |
6121 | #undef CHK_ |
6122 | } |
6123 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6124 | bool ExecMemory::MergePartialFromCodedStream( |
6125 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
6126 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
6127 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
6128 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.ExecMemory) |
6129 | for (;;) { |
6130 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
6131 | tag = p.first; |
6132 | if (!p.second) goto handle_unusual; |
6133 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
6134 | // int64 memory_micros = 1; |
6135 | case 1: { |
6136 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
6137 | |
6138 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6139 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6140 | input, &memory_micros_))); |
6141 | } else { |
6142 | goto handle_unusual; |
6143 | } |
6144 | break; |
6145 | } |
6146 | |
6147 | // int64 host_temp_bytes = 2; |
6148 | case 2: { |
6149 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
6150 | |
6151 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6152 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6153 | input, &host_temp_bytes_))); |
6154 | } else { |
6155 | goto handle_unusual; |
6156 | } |
6157 | break; |
6158 | } |
6159 | |
6160 | // int64 host_persistent_bytes = 3; |
6161 | case 3: { |
6162 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
6163 | |
6164 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6165 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6166 | input, &host_persistent_bytes_))); |
6167 | } else { |
6168 | goto handle_unusual; |
6169 | } |
6170 | break; |
6171 | } |
6172 | |
6173 | // int64 accelerator_temp_bytes = 4; |
6174 | case 4: { |
6175 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
6176 | |
6177 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6178 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6179 | input, &accelerator_temp_bytes_))); |
6180 | } else { |
6181 | goto handle_unusual; |
6182 | } |
6183 | break; |
6184 | } |
6185 | |
6186 | // int64 accelerator_persistent_bytes = 5; |
6187 | case 5: { |
6188 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (40 & 0xFF)) { |
6189 | |
6190 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6191 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6192 | input, &accelerator_persistent_bytes_))); |
6193 | } else { |
6194 | goto handle_unusual; |
6195 | } |
6196 | break; |
6197 | } |
6198 | |
6199 | // int64 requested_bytes = 6; |
6200 | case 6: { |
6201 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (48 & 0xFF)) { |
6202 | |
6203 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6204 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6205 | input, &requested_bytes_))); |
6206 | } else { |
6207 | goto handle_unusual; |
6208 | } |
6209 | break; |
6210 | } |
6211 | |
6212 | // int64 peak_bytes = 7; |
6213 | case 7: { |
6214 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { |
6215 | |
6216 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6217 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6218 | input, &peak_bytes_))); |
6219 | } else { |
6220 | goto handle_unusual; |
6221 | } |
6222 | break; |
6223 | } |
6224 | |
6225 | // int64 residual_bytes = 8; |
6226 | case 8: { |
6227 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (64 & 0xFF)) { |
6228 | |
6229 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6230 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6231 | input, &residual_bytes_))); |
6232 | } else { |
6233 | goto handle_unusual; |
6234 | } |
6235 | break; |
6236 | } |
6237 | |
6238 | // int64 output_bytes = 9; |
6239 | case 9: { |
6240 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (72 & 0xFF)) { |
6241 | |
6242 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6243 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6244 | input, &output_bytes_))); |
6245 | } else { |
6246 | goto handle_unusual; |
6247 | } |
6248 | break; |
6249 | } |
6250 | |
6251 | // int64 allocator_bytes_in_use = 10; |
6252 | case 10: { |
6253 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) { |
6254 | |
6255 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
6256 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6257 | input, &allocator_bytes_in_use_))); |
6258 | } else { |
6259 | goto handle_unusual; |
6260 | } |
6261 | break; |
6262 | } |
6263 | |
6264 | // map<int32, .tensorflow.tfprof.Memory> output_memory = 11; |
6265 | case 11: { |
6266 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) { |
6267 | ExecMemory_OutputMemoryEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< |
6268 | ExecMemory_OutputMemoryEntry_DoNotUse, |
6269 | ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Memory, |
6270 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32, |
6271 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, |
6272 | 0 >, |
6273 | ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Memory > > parser(&output_memory_); |
6274 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( |
6275 | input, &parser)); |
6276 | } else { |
6277 | goto handle_unusual; |
6278 | } |
6279 | break; |
6280 | } |
6281 | |
6282 | default: { |
6283 | handle_unusual: |
6284 | if (tag == 0) { |
6285 | goto success; |
6286 | } |
6287 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
6288 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
6289 | break; |
6290 | } |
6291 | } |
6292 | } |
6293 | success: |
6294 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.ExecMemory) |
6295 | return true; |
6296 | failure: |
6297 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.ExecMemory) |
6298 | return false; |
6299 | #undef DO_ |
6300 | } |
6301 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6302 | |
6303 | void ExecMemory::SerializeWithCachedSizes( |
6304 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
6305 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.ExecMemory) |
6306 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6307 | (void) cached_has_bits; |
6308 | |
6309 | // int64 memory_micros = 1; |
6310 | if (this->memory_micros() != 0) { |
6311 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->memory_micros(), output); |
6312 | } |
6313 | |
6314 | // int64 host_temp_bytes = 2; |
6315 | if (this->host_temp_bytes() != 0) { |
6316 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->host_temp_bytes(), output); |
6317 | } |
6318 | |
6319 | // int64 host_persistent_bytes = 3; |
6320 | if (this->host_persistent_bytes() != 0) { |
6321 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->host_persistent_bytes(), output); |
6322 | } |
6323 | |
6324 | // int64 accelerator_temp_bytes = 4; |
6325 | if (this->accelerator_temp_bytes() != 0) { |
6326 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(4, this->accelerator_temp_bytes(), output); |
6327 | } |
6328 | |
6329 | // int64 accelerator_persistent_bytes = 5; |
6330 | if (this->accelerator_persistent_bytes() != 0) { |
6331 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(5, this->accelerator_persistent_bytes(), output); |
6332 | } |
6333 | |
6334 | // int64 requested_bytes = 6; |
6335 | if (this->requested_bytes() != 0) { |
6336 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(6, this->requested_bytes(), output); |
6337 | } |
6338 | |
6339 | // int64 peak_bytes = 7; |
6340 | if (this->peak_bytes() != 0) { |
6341 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(7, this->peak_bytes(), output); |
6342 | } |
6343 | |
6344 | // int64 residual_bytes = 8; |
6345 | if (this->residual_bytes() != 0) { |
6346 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(8, this->residual_bytes(), output); |
6347 | } |
6348 | |
6349 | // int64 output_bytes = 9; |
6350 | if (this->output_bytes() != 0) { |
6351 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(9, this->output_bytes(), output); |
6352 | } |
6353 | |
6354 | // int64 allocator_bytes_in_use = 10; |
6355 | if (this->allocator_bytes_in_use() != 0) { |
6356 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(10, this->allocator_bytes_in_use(), output); |
6357 | } |
6358 | |
6359 | // map<int32, .tensorflow.tfprof.Memory> output_memory = 11; |
6360 | if (!this->output_memory().empty()) { |
6361 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Memory >::const_pointer |
6362 | ConstPtr; |
6363 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int32, ConstPtr > SortItem; |
6364 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
6365 | |
6366 | if (output->IsSerializationDeterministic() && |
6367 | this->output_memory().size() > 1) { |
6368 | ::std::unique_ptr<SortItem[]> items( |
6369 | new SortItem[this->output_memory().size()]); |
6370 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Memory >::size_type size_type; |
6371 | size_type n = 0; |
6372 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Memory >::const_iterator |
6373 | it = this->output_memory().begin(); |
6374 | it != this->output_memory().end(); ++it, ++n) { |
6375 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
6376 | } |
6377 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
6378 | for (size_type i = 0; i < n; i++) { |
6379 | ExecMemory_OutputMemoryEntry_DoNotUse::Funcs::SerializeToCodedStream(11, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, output); |
6380 | } |
6381 | } else { |
6382 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Memory >::const_iterator |
6383 | it = this->output_memory().begin(); |
6384 | it != this->output_memory().end(); ++it) { |
6385 | ExecMemory_OutputMemoryEntry_DoNotUse::Funcs::SerializeToCodedStream(11, it->first, it->second, output); |
6386 | } |
6387 | } |
6388 | } |
6389 | |
6390 | if (_internal_metadata_.have_unknown_fields()) { |
6391 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
6392 | _internal_metadata_.unknown_fields(), output); |
6393 | } |
6394 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.ExecMemory) |
6395 | } |
6396 | |
6397 | ::PROTOBUF_NAMESPACE_ID::uint8* ExecMemory::InternalSerializeWithCachedSizesToArray( |
6398 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
6399 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.ExecMemory) |
6400 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6401 | (void) cached_has_bits; |
6402 | |
6403 | // int64 memory_micros = 1; |
6404 | if (this->memory_micros() != 0) { |
6405 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->memory_micros(), target); |
6406 | } |
6407 | |
6408 | // int64 host_temp_bytes = 2; |
6409 | if (this->host_temp_bytes() != 0) { |
6410 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->host_temp_bytes(), target); |
6411 | } |
6412 | |
6413 | // int64 host_persistent_bytes = 3; |
6414 | if (this->host_persistent_bytes() != 0) { |
6415 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->host_persistent_bytes(), target); |
6416 | } |
6417 | |
6418 | // int64 accelerator_temp_bytes = 4; |
6419 | if (this->accelerator_temp_bytes() != 0) { |
6420 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->accelerator_temp_bytes(), target); |
6421 | } |
6422 | |
6423 | // int64 accelerator_persistent_bytes = 5; |
6424 | if (this->accelerator_persistent_bytes() != 0) { |
6425 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(5, this->accelerator_persistent_bytes(), target); |
6426 | } |
6427 | |
6428 | // int64 requested_bytes = 6; |
6429 | if (this->requested_bytes() != 0) { |
6430 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(6, this->requested_bytes(), target); |
6431 | } |
6432 | |
6433 | // int64 peak_bytes = 7; |
6434 | if (this->peak_bytes() != 0) { |
6435 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(7, this->peak_bytes(), target); |
6436 | } |
6437 | |
6438 | // int64 residual_bytes = 8; |
6439 | if (this->residual_bytes() != 0) { |
6440 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->residual_bytes(), target); |
6441 | } |
6442 | |
6443 | // int64 output_bytes = 9; |
6444 | if (this->output_bytes() != 0) { |
6445 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(9, this->output_bytes(), target); |
6446 | } |
6447 | |
6448 | // int64 allocator_bytes_in_use = 10; |
6449 | if (this->allocator_bytes_in_use() != 0) { |
6450 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(10, this->allocator_bytes_in_use(), target); |
6451 | } |
6452 | |
6453 | // map<int32, .tensorflow.tfprof.Memory> output_memory = 11; |
6454 | if (!this->output_memory().empty()) { |
6455 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Memory >::const_pointer |
6456 | ConstPtr; |
6457 | typedef ::PROTOBUF_NAMESPACE_ID::internal::SortItem< ::PROTOBUF_NAMESPACE_ID::int32, ConstPtr > SortItem; |
6458 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByFirstField<SortItem> Less; |
6459 | |
6460 | if (false && |
6461 | this->output_memory().size() > 1) { |
6462 | ::std::unique_ptr<SortItem[]> items( |
6463 | new SortItem[this->output_memory().size()]); |
6464 | typedef ::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Memory >::size_type size_type; |
6465 | size_type n = 0; |
6466 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Memory >::const_iterator |
6467 | it = this->output_memory().begin(); |
6468 | it != this->output_memory().end(); ++it, ++n) { |
6469 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
6470 | } |
6471 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
6472 | for (size_type i = 0; i < n; i++) { |
6473 | target = ExecMemory_OutputMemoryEntry_DoNotUse::Funcs::SerializeToArray(11, items[static_cast<ptrdiff_t>(i)].second->first, items[static_cast<ptrdiff_t>(i)].second->second, target); |
6474 | } |
6475 | } else { |
6476 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Memory >::const_iterator |
6477 | it = this->output_memory().begin(); |
6478 | it != this->output_memory().end(); ++it) { |
6479 | target = ExecMemory_OutputMemoryEntry_DoNotUse::Funcs::SerializeToArray(11, it->first, it->second, target); |
6480 | } |
6481 | } |
6482 | } |
6483 | |
6484 | if (_internal_metadata_.have_unknown_fields()) { |
6485 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
6486 | _internal_metadata_.unknown_fields(), target); |
6487 | } |
6488 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.ExecMemory) |
6489 | return target; |
6490 | } |
6491 | |
6492 | size_t ExecMemory::ByteSizeLong() const { |
6493 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.ExecMemory) |
6494 | size_t total_size = 0; |
6495 | |
6496 | if (_internal_metadata_.have_unknown_fields()) { |
6497 | total_size += |
6498 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
6499 | _internal_metadata_.unknown_fields()); |
6500 | } |
6501 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6502 | // Prevent compiler warnings about cached_has_bits being unused |
6503 | (void) cached_has_bits; |
6504 | |
6505 | // map<int32, .tensorflow.tfprof.Memory> output_memory = 11; |
6506 | total_size += 1 * |
6507 | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->output_memory_size()); |
6508 | for (::PROTOBUF_NAMESPACE_ID::Map< ::PROTOBUF_NAMESPACE_ID::int32, ::tensorflow::tfprof::Memory >::const_iterator |
6509 | it = this->output_memory().begin(); |
6510 | it != this->output_memory().end(); ++it) { |
6511 | total_size += ExecMemory_OutputMemoryEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
6512 | } |
6513 | |
6514 | // int64 memory_micros = 1; |
6515 | if (this->memory_micros() != 0) { |
6516 | total_size += 1 + |
6517 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
6518 | this->memory_micros()); |
6519 | } |
6520 | |
6521 | // int64 host_temp_bytes = 2; |
6522 | if (this->host_temp_bytes() != 0) { |
6523 | total_size += 1 + |
6524 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
6525 | this->host_temp_bytes()); |
6526 | } |
6527 | |
6528 | // int64 host_persistent_bytes = 3; |
6529 | if (this->host_persistent_bytes() != 0) { |
6530 | total_size += 1 + |
6531 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
6532 | this->host_persistent_bytes()); |
6533 | } |
6534 | |
6535 | // int64 accelerator_temp_bytes = 4; |
6536 | if (this->accelerator_temp_bytes() != 0) { |
6537 | total_size += 1 + |
6538 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
6539 | this->accelerator_temp_bytes()); |
6540 | } |
6541 | |
6542 | // int64 accelerator_persistent_bytes = 5; |
6543 | if (this->accelerator_persistent_bytes() != 0) { |
6544 | total_size += 1 + |
6545 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
6546 | this->accelerator_persistent_bytes()); |
6547 | } |
6548 | |
6549 | // int64 requested_bytes = 6; |
6550 | if (this->requested_bytes() != 0) { |
6551 | total_size += 1 + |
6552 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
6553 | this->requested_bytes()); |
6554 | } |
6555 | |
6556 | // int64 peak_bytes = 7; |
6557 | if (this->peak_bytes() != 0) { |
6558 | total_size += 1 + |
6559 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
6560 | this->peak_bytes()); |
6561 | } |
6562 | |
6563 | // int64 residual_bytes = 8; |
6564 | if (this->residual_bytes() != 0) { |
6565 | total_size += 1 + |
6566 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
6567 | this->residual_bytes()); |
6568 | } |
6569 | |
6570 | // int64 output_bytes = 9; |
6571 | if (this->output_bytes() != 0) { |
6572 | total_size += 1 + |
6573 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
6574 | this->output_bytes()); |
6575 | } |
6576 | |
6577 | // int64 allocator_bytes_in_use = 10; |
6578 | if (this->allocator_bytes_in_use() != 0) { |
6579 | total_size += 1 + |
6580 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
6581 | this->allocator_bytes_in_use()); |
6582 | } |
6583 | |
6584 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
6585 | SetCachedSize(cached_size); |
6586 | return total_size; |
6587 | } |
6588 | |
6589 | void ExecMemory::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
6590 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.ExecMemory) |
6591 | GOOGLE_DCHECK_NE(&from, this); |
6592 | const ExecMemory* source = |
6593 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ExecMemory>( |
6594 | &from); |
6595 | if (source == nullptr) { |
6596 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.ExecMemory) |
6597 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
6598 | } else { |
6599 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.ExecMemory) |
6600 | MergeFrom(*source); |
6601 | } |
6602 | } |
6603 | |
6604 | void ExecMemory::MergeFrom(const ExecMemory& from) { |
6605 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.ExecMemory) |
6606 | GOOGLE_DCHECK_NE(&from, this); |
6607 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
6608 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6609 | (void) cached_has_bits; |
6610 | |
6611 | output_memory_.MergeFrom(from.output_memory_); |
6612 | if (from.memory_micros() != 0) { |
6613 | set_memory_micros(from.memory_micros()); |
6614 | } |
6615 | if (from.host_temp_bytes() != 0) { |
6616 | set_host_temp_bytes(from.host_temp_bytes()); |
6617 | } |
6618 | if (from.host_persistent_bytes() != 0) { |
6619 | set_host_persistent_bytes(from.host_persistent_bytes()); |
6620 | } |
6621 | if (from.accelerator_temp_bytes() != 0) { |
6622 | set_accelerator_temp_bytes(from.accelerator_temp_bytes()); |
6623 | } |
6624 | if (from.accelerator_persistent_bytes() != 0) { |
6625 | set_accelerator_persistent_bytes(from.accelerator_persistent_bytes()); |
6626 | } |
6627 | if (from.requested_bytes() != 0) { |
6628 | set_requested_bytes(from.requested_bytes()); |
6629 | } |
6630 | if (from.peak_bytes() != 0) { |
6631 | set_peak_bytes(from.peak_bytes()); |
6632 | } |
6633 | if (from.residual_bytes() != 0) { |
6634 | set_residual_bytes(from.residual_bytes()); |
6635 | } |
6636 | if (from.output_bytes() != 0) { |
6637 | set_output_bytes(from.output_bytes()); |
6638 | } |
6639 | if (from.allocator_bytes_in_use() != 0) { |
6640 | set_allocator_bytes_in_use(from.allocator_bytes_in_use()); |
6641 | } |
6642 | } |
6643 | |
6644 | void ExecMemory::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
6645 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.ExecMemory) |
6646 | if (&from == this) return; |
6647 | Clear(); |
6648 | MergeFrom(from); |
6649 | } |
6650 | |
6651 | void ExecMemory::CopyFrom(const ExecMemory& from) { |
6652 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.ExecMemory) |
6653 | if (&from == this) return; |
6654 | Clear(); |
6655 | MergeFrom(from); |
6656 | } |
6657 | |
6658 | bool ExecMemory::IsInitialized() const { |
6659 | return true; |
6660 | } |
6661 | |
6662 | void ExecMemory::InternalSwap(ExecMemory* other) { |
6663 | using std::swap; |
6664 | _internal_metadata_.Swap(&other->_internal_metadata_); |
6665 | output_memory_.Swap(&other->output_memory_); |
6666 | swap(memory_micros_, other->memory_micros_); |
6667 | swap(host_temp_bytes_, other->host_temp_bytes_); |
6668 | swap(host_persistent_bytes_, other->host_persistent_bytes_); |
6669 | swap(accelerator_temp_bytes_, other->accelerator_temp_bytes_); |
6670 | swap(accelerator_persistent_bytes_, other->accelerator_persistent_bytes_); |
6671 | swap(requested_bytes_, other->requested_bytes_); |
6672 | swap(peak_bytes_, other->peak_bytes_); |
6673 | swap(residual_bytes_, other->residual_bytes_); |
6674 | swap(output_bytes_, other->output_bytes_); |
6675 | swap(allocator_bytes_in_use_, other->allocator_bytes_in_use_); |
6676 | } |
6677 | |
6678 | ::PROTOBUF_NAMESPACE_ID::Metadata ExecMemory::GetMetadata() const { |
6679 | return GetMetadataStatic(); |
6680 | } |
6681 | |
6682 | |
6683 | // =================================================================== |
6684 | |
6685 | void Tuple::InitAsDefaultInstance() { |
6686 | } |
6687 | class Tuple::_Internal { |
6688 | public: |
6689 | }; |
6690 | |
6691 | Tuple::Tuple() |
6692 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
6693 | SharedCtor(); |
6694 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.Tuple) |
6695 | } |
6696 | Tuple::Tuple(const Tuple& from) |
6697 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
6698 | _internal_metadata_(nullptr), |
6699 | int64_values_(from.int64_values_) { |
6700 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
6701 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.Tuple) |
6702 | } |
6703 | |
6704 | void Tuple::SharedCtor() { |
6705 | } |
6706 | |
6707 | Tuple::~Tuple() { |
6708 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.Tuple) |
6709 | SharedDtor(); |
6710 | } |
6711 | |
6712 | void Tuple::SharedDtor() { |
6713 | } |
6714 | |
6715 | void Tuple::SetCachedSize(int size) const { |
6716 | _cached_size_.Set(size); |
6717 | } |
6718 | const Tuple& Tuple::default_instance() { |
6719 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Tuple_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
6720 | return *internal_default_instance(); |
6721 | } |
6722 | |
6723 | |
6724 | void Tuple::Clear() { |
6725 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.Tuple) |
6726 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6727 | // Prevent compiler warnings about cached_has_bits being unused |
6728 | (void) cached_has_bits; |
6729 | |
6730 | int64_values_.Clear(); |
6731 | _internal_metadata_.Clear(); |
6732 | } |
6733 | |
6734 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6735 | const char* Tuple::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
6736 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
6737 | while (!ctx->Done(&ptr)) { |
6738 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
6739 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
6740 | CHK_(ptr); |
6741 | switch (tag >> 3) { |
6742 | // repeated int64 int64_values = 1; |
6743 | case 1: |
6744 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
6745 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_int64_values(), ptr, ctx); |
6746 | CHK_(ptr); |
6747 | } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8) { |
6748 | add_int64_values(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
6749 | CHK_(ptr); |
6750 | } else goto handle_unusual; |
6751 | continue; |
6752 | default: { |
6753 | handle_unusual: |
6754 | if ((tag & 7) == 4 || tag == 0) { |
6755 | ctx->SetLastTag(tag); |
6756 | goto success; |
6757 | } |
6758 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
6759 | CHK_(ptr != nullptr); |
6760 | continue; |
6761 | } |
6762 | } // switch |
6763 | } // while |
6764 | success: |
6765 | return ptr; |
6766 | failure: |
6767 | ptr = nullptr; |
6768 | goto success; |
6769 | #undef CHK_ |
6770 | } |
6771 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6772 | bool Tuple::MergePartialFromCodedStream( |
6773 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
6774 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
6775 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
6776 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.Tuple) |
6777 | for (;;) { |
6778 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
6779 | tag = p.first; |
6780 | if (!p.second) goto handle_unusual; |
6781 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
6782 | // repeated int64 int64_values = 1; |
6783 | case 1: { |
6784 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
6785 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< |
6786 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6787 | input, this->mutable_int64_values()))); |
6788 | } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
6789 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
6790 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
6791 | 1, 10u, input, this->mutable_int64_values()))); |
6792 | } else { |
6793 | goto handle_unusual; |
6794 | } |
6795 | break; |
6796 | } |
6797 | |
6798 | default: { |
6799 | handle_unusual: |
6800 | if (tag == 0) { |
6801 | goto success; |
6802 | } |
6803 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
6804 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
6805 | break; |
6806 | } |
6807 | } |
6808 | } |
6809 | success: |
6810 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.Tuple) |
6811 | return true; |
6812 | failure: |
6813 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.Tuple) |
6814 | return false; |
6815 | #undef DO_ |
6816 | } |
6817 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
6818 | |
6819 | void Tuple::SerializeWithCachedSizes( |
6820 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
6821 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.Tuple) |
6822 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6823 | (void) cached_has_bits; |
6824 | |
6825 | // repeated int64 int64_values = 1; |
6826 | if (this->int64_values_size() > 0) { |
6827 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(1, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
6828 | output->WriteVarint32(_int64_values_cached_byte_size_.load( |
6829 | std::memory_order_relaxed)); |
6830 | } |
6831 | for (int i = 0, n = this->int64_values_size(); i < n; i++) { |
6832 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64NoTag( |
6833 | this->int64_values(i), output); |
6834 | } |
6835 | |
6836 | if (_internal_metadata_.have_unknown_fields()) { |
6837 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
6838 | _internal_metadata_.unknown_fields(), output); |
6839 | } |
6840 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.Tuple) |
6841 | } |
6842 | |
6843 | ::PROTOBUF_NAMESPACE_ID::uint8* Tuple::InternalSerializeWithCachedSizesToArray( |
6844 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
6845 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.Tuple) |
6846 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6847 | (void) cached_has_bits; |
6848 | |
6849 | // repeated int64 int64_values = 1; |
6850 | if (this->int64_values_size() > 0) { |
6851 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( |
6852 | 1, |
6853 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
6854 | target); |
6855 | target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( |
6856 | _int64_values_cached_byte_size_.load(std::memory_order_relaxed), |
6857 | target); |
6858 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
6859 | WriteInt64NoTagToArray(this->int64_values_, target); |
6860 | } |
6861 | |
6862 | if (_internal_metadata_.have_unknown_fields()) { |
6863 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
6864 | _internal_metadata_.unknown_fields(), target); |
6865 | } |
6866 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.Tuple) |
6867 | return target; |
6868 | } |
6869 | |
6870 | size_t Tuple::ByteSizeLong() const { |
6871 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.Tuple) |
6872 | size_t total_size = 0; |
6873 | |
6874 | if (_internal_metadata_.have_unknown_fields()) { |
6875 | total_size += |
6876 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
6877 | _internal_metadata_.unknown_fields()); |
6878 | } |
6879 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6880 | // Prevent compiler warnings about cached_has_bits being unused |
6881 | (void) cached_has_bits; |
6882 | |
6883 | // repeated int64 int64_values = 1; |
6884 | { |
6885 | size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
6886 | Int64Size(this->int64_values_); |
6887 | if (data_size > 0) { |
6888 | total_size += 1 + |
6889 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
6890 | static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); |
6891 | } |
6892 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); |
6893 | _int64_values_cached_byte_size_.store(cached_size, |
6894 | std::memory_order_relaxed); |
6895 | total_size += data_size; |
6896 | } |
6897 | |
6898 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
6899 | SetCachedSize(cached_size); |
6900 | return total_size; |
6901 | } |
6902 | |
6903 | void Tuple::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
6904 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.Tuple) |
6905 | GOOGLE_DCHECK_NE(&from, this); |
6906 | const Tuple* source = |
6907 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Tuple>( |
6908 | &from); |
6909 | if (source == nullptr) { |
6910 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.Tuple) |
6911 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
6912 | } else { |
6913 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.Tuple) |
6914 | MergeFrom(*source); |
6915 | } |
6916 | } |
6917 | |
6918 | void Tuple::MergeFrom(const Tuple& from) { |
6919 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.Tuple) |
6920 | GOOGLE_DCHECK_NE(&from, this); |
6921 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
6922 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
6923 | (void) cached_has_bits; |
6924 | |
6925 | int64_values_.MergeFrom(from.int64_values_); |
6926 | } |
6927 | |
6928 | void Tuple::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
6929 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.Tuple) |
6930 | if (&from == this) return; |
6931 | Clear(); |
6932 | MergeFrom(from); |
6933 | } |
6934 | |
6935 | void Tuple::CopyFrom(const Tuple& from) { |
6936 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.Tuple) |
6937 | if (&from == this) return; |
6938 | Clear(); |
6939 | MergeFrom(from); |
6940 | } |
6941 | |
6942 | bool Tuple::IsInitialized() const { |
6943 | return true; |
6944 | } |
6945 | |
6946 | void Tuple::InternalSwap(Tuple* other) { |
6947 | using std::swap; |
6948 | _internal_metadata_.Swap(&other->_internal_metadata_); |
6949 | int64_values_.InternalSwap(&other->int64_values_); |
6950 | } |
6951 | |
6952 | ::PROTOBUF_NAMESPACE_ID::Metadata Tuple::GetMetadata() const { |
6953 | return GetMetadataStatic(); |
6954 | } |
6955 | |
6956 | |
6957 | // =================================================================== |
6958 | |
6959 | void Memory::InitAsDefaultInstance() { |
6960 | } |
6961 | class Memory::_Internal { |
6962 | public: |
6963 | }; |
6964 | |
6965 | Memory::Memory() |
6966 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
6967 | SharedCtor(); |
6968 | // @@protoc_insertion_point(constructor:tensorflow.tfprof.Memory) |
6969 | } |
6970 | Memory::Memory(const Memory& from) |
6971 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
6972 | _internal_metadata_(nullptr) { |
6973 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
6974 | ::memcpy(&bytes_, &from.bytes_, |
6975 | static_cast<size_t>(reinterpret_cast<char*>(&ptr_) - |
6976 | reinterpret_cast<char*>(&bytes_)) + sizeof(ptr_)); |
6977 | // @@protoc_insertion_point(copy_constructor:tensorflow.tfprof.Memory) |
6978 | } |
6979 | |
6980 | void Memory::SharedCtor() { |
6981 | ::memset(&bytes_, 0, static_cast<size_t>( |
6982 | reinterpret_cast<char*>(&ptr_) - |
6983 | reinterpret_cast<char*>(&bytes_)) + sizeof(ptr_)); |
6984 | } |
6985 | |
6986 | Memory::~Memory() { |
6987 | // @@protoc_insertion_point(destructor:tensorflow.tfprof.Memory) |
6988 | SharedDtor(); |
6989 | } |
6990 | |
6991 | void Memory::SharedDtor() { |
6992 | } |
6993 | |
6994 | void Memory::SetCachedSize(int size) const { |
6995 | _cached_size_.Set(size); |
6996 | } |
6997 | const Memory& Memory::default_instance() { |
6998 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Memory_tensorflow_2fcore_2fprofiler_2ftfprof_5flog_2eproto.base); |
6999 | return *internal_default_instance(); |
7000 | } |
7001 | |
7002 | |
7003 | void Memory::Clear() { |
7004 | // @@protoc_insertion_point(message_clear_start:tensorflow.tfprof.Memory) |
7005 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
7006 | // Prevent compiler warnings about cached_has_bits being unused |
7007 | (void) cached_has_bits; |
7008 | |
7009 | ::memset(&bytes_, 0, static_cast<size_t>( |
7010 | reinterpret_cast<char*>(&ptr_) - |
7011 | reinterpret_cast<char*>(&bytes_)) + sizeof(ptr_)); |
7012 | _internal_metadata_.Clear(); |
7013 | } |
7014 | |
7015 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
7016 | const char* Memory::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
7017 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
7018 | while (!ctx->Done(&ptr)) { |
7019 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
7020 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
7021 | CHK_(ptr); |
7022 | switch (tag >> 3) { |
7023 | // int64 bytes = 1; |
7024 | case 1: |
7025 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
7026 | bytes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
7027 | CHK_(ptr); |
7028 | } else goto handle_unusual; |
7029 | continue; |
7030 | // uint64 ptr = 2; |
7031 | case 2: |
7032 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
7033 | ptr_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
7034 | CHK_(ptr); |
7035 | } else goto handle_unusual; |
7036 | continue; |
7037 | default: { |
7038 | handle_unusual: |
7039 | if ((tag & 7) == 4 || tag == 0) { |
7040 | ctx->SetLastTag(tag); |
7041 | goto success; |
7042 | } |
7043 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
7044 | CHK_(ptr != nullptr); |
7045 | continue; |
7046 | } |
7047 | } // switch |
7048 | } // while |
7049 | success: |
7050 | return ptr; |
7051 | failure: |
7052 | ptr = nullptr; |
7053 | goto success; |
7054 | #undef CHK_ |
7055 | } |
7056 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
7057 | bool Memory::MergePartialFromCodedStream( |
7058 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
7059 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
7060 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
7061 | // @@protoc_insertion_point(parse_start:tensorflow.tfprof.Memory) |
7062 | for (;;) { |
7063 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
7064 | tag = p.first; |
7065 | if (!p.second) goto handle_unusual; |
7066 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
7067 | // int64 bytes = 1; |
7068 | case 1: { |
7069 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
7070 | |
7071 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
7072 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
7073 | input, &bytes_))); |
7074 | } else { |
7075 | goto handle_unusual; |
7076 | } |
7077 | break; |
7078 | } |
7079 | |
7080 | // uint64 ptr = 2; |
7081 | case 2: { |
7082 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
7083 | |
7084 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
7085 | ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( |
7086 | input, &ptr_))); |
7087 | } else { |
7088 | goto handle_unusual; |
7089 | } |
7090 | break; |
7091 | } |
7092 | |
7093 | default: { |
7094 | handle_unusual: |
7095 | if (tag == 0) { |
7096 | goto success; |
7097 | } |
7098 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
7099 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
7100 | break; |
7101 | } |
7102 | } |
7103 | } |
7104 | success: |
7105 | // @@protoc_insertion_point(parse_success:tensorflow.tfprof.Memory) |
7106 | return true; |
7107 | failure: |
7108 | // @@protoc_insertion_point(parse_failure:tensorflow.tfprof.Memory) |
7109 | return false; |
7110 | #undef DO_ |
7111 | } |
7112 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
7113 | |
7114 | void Memory::SerializeWithCachedSizes( |
7115 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
7116 | // @@protoc_insertion_point(serialize_start:tensorflow.tfprof.Memory) |
7117 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
7118 | (void) cached_has_bits; |
7119 | |
7120 | // int64 bytes = 1; |
7121 | if (this->bytes() != 0) { |
7122 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->bytes(), output); |
7123 | } |
7124 | |
7125 | // uint64 ptr = 2; |
7126 | if (this->ptr() != 0) { |
7127 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(2, this->ptr(), output); |
7128 | } |
7129 | |
7130 | if (_internal_metadata_.have_unknown_fields()) { |
7131 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
7132 | _internal_metadata_.unknown_fields(), output); |
7133 | } |
7134 | // @@protoc_insertion_point(serialize_end:tensorflow.tfprof.Memory) |
7135 | } |
7136 | |
7137 | ::PROTOBUF_NAMESPACE_ID::uint8* Memory::InternalSerializeWithCachedSizesToArray( |
7138 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
7139 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.tfprof.Memory) |
7140 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
7141 | (void) cached_has_bits; |
7142 | |
7143 | // int64 bytes = 1; |
7144 | if (this->bytes() != 0) { |
7145 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->bytes(), target); |
7146 | } |
7147 | |
7148 | // uint64 ptr = 2; |
7149 | if (this->ptr() != 0) { |
7150 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(2, this->ptr(), target); |
7151 | } |
7152 | |
7153 | if (_internal_metadata_.have_unknown_fields()) { |
7154 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
7155 | _internal_metadata_.unknown_fields(), target); |
7156 | } |
7157 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.tfprof.Memory) |
7158 | return target; |
7159 | } |
7160 | |
7161 | size_t Memory::ByteSizeLong() const { |
7162 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.tfprof.Memory) |
7163 | size_t total_size = 0; |
7164 | |
7165 | if (_internal_metadata_.have_unknown_fields()) { |
7166 | total_size += |
7167 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
7168 | _internal_metadata_.unknown_fields()); |
7169 | } |
7170 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
7171 | // Prevent compiler warnings about cached_has_bits being unused |
7172 | (void) cached_has_bits; |
7173 | |
7174 | // int64 bytes = 1; |
7175 | if (this->bytes() != 0) { |
7176 | total_size += 1 + |
7177 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
7178 | this->bytes()); |
7179 | } |
7180 | |
7181 | // uint64 ptr = 2; |
7182 | if (this->ptr() != 0) { |
7183 | total_size += 1 + |
7184 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( |
7185 | this->ptr()); |
7186 | } |
7187 | |
7188 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
7189 | SetCachedSize(cached_size); |
7190 | return total_size; |
7191 | } |
7192 | |
7193 | void Memory::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
7194 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.tfprof.Memory) |
7195 | GOOGLE_DCHECK_NE(&from, this); |
7196 | const Memory* source = |
7197 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Memory>( |
7198 | &from); |
7199 | if (source == nullptr) { |
7200 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.tfprof.Memory) |
7201 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
7202 | } else { |
7203 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.tfprof.Memory) |
7204 | MergeFrom(*source); |
7205 | } |
7206 | } |
7207 | |
7208 | void Memory::MergeFrom(const Memory& from) { |
7209 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.tfprof.Memory) |
7210 | GOOGLE_DCHECK_NE(&from, this); |
7211 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
7212 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
7213 | (void) cached_has_bits; |
7214 | |
7215 | if (from.bytes() != 0) { |
7216 | set_bytes(from.bytes()); |
7217 | } |
7218 | if (from.ptr() != 0) { |
7219 | set_ptr(from.ptr()); |
7220 | } |
7221 | } |
7222 | |
7223 | void Memory::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
7224 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.tfprof.Memory) |
7225 | if (&from == this) return; |
7226 | Clear(); |
7227 | MergeFrom(from); |
7228 | } |
7229 | |
7230 | void Memory::CopyFrom(const Memory& from) { |
7231 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.tfprof.Memory) |
7232 | if (&from == this) return; |
7233 | Clear(); |
7234 | MergeFrom(from); |
7235 | } |
7236 | |
7237 | bool Memory::IsInitialized() const { |
7238 | return true; |
7239 | } |
7240 | |
7241 | void Memory::InternalSwap(Memory* other) { |
7242 | using std::swap; |
7243 | _internal_metadata_.Swap(&other->_internal_metadata_); |
7244 | swap(bytes_, other->bytes_); |
7245 | swap(ptr_, other->ptr_); |
7246 | } |
7247 | |
7248 | ::PROTOBUF_NAMESPACE_ID::Metadata Memory::GetMetadata() const { |
7249 | return GetMetadataStatic(); |
7250 | } |
7251 | |
7252 | |
7253 | // @@protoc_insertion_point(namespace_scope) |
7254 | } // namespace tfprof |
7255 | } // namespace tensorflow |
7256 | PROTOBUF_NAMESPACE_OPEN |
7257 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::CodeDef_Trace* Arena::CreateMaybeMessage< ::tensorflow::tfprof::CodeDef_Trace >(Arena* arena) { |
7258 | return Arena::CreateInternal< ::tensorflow::tfprof::CodeDef_Trace >(arena); |
7259 | } |
7260 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::CodeDef* Arena::CreateMaybeMessage< ::tensorflow::tfprof::CodeDef >(Arena* arena) { |
7261 | return Arena::CreateInternal< ::tensorflow::tfprof::CodeDef >(arena); |
7262 | } |
7263 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::OpLogEntry* Arena::CreateMaybeMessage< ::tensorflow::tfprof::OpLogEntry >(Arena* arena) { |
7264 | return Arena::CreateInternal< ::tensorflow::tfprof::OpLogEntry >(arena); |
7265 | } |
7266 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse >(Arena* arena) { |
7267 | return Arena::CreateInternal< ::tensorflow::tfprof::OpLogProto_IdToStringEntry_DoNotUse >(arena); |
7268 | } |
7269 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::OpLogProto* Arena::CreateMaybeMessage< ::tensorflow::tfprof::OpLogProto >(Arena* arena) { |
7270 | return Arena::CreateInternal< ::tensorflow::tfprof::OpLogProto >(arena); |
7271 | } |
7272 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse >(Arena* arena) { |
7273 | return Arena::CreateInternal< ::tensorflow::tfprof::ProfileProto_NodesEntry_DoNotUse >(arena); |
7274 | } |
7275 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse >(Arena* arena) { |
7276 | return Arena::CreateInternal< ::tensorflow::tfprof::ProfileProto_IdToStringEntry_DoNotUse >(arena); |
7277 | } |
7278 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ProfileProto* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ProfileProto >(Arena* arena) { |
7279 | return Arena::CreateInternal< ::tensorflow::tfprof::ProfileProto >(arena); |
7280 | } |
7281 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse >(Arena* arena) { |
7282 | return Arena::CreateInternal< ::tensorflow::tfprof::ProfileNode_InputsEntry_DoNotUse >(arena); |
7283 | } |
7284 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse >(Arena* arena) { |
7285 | return Arena::CreateInternal< ::tensorflow::tfprof::ProfileNode_InputShapesEntry_DoNotUse >(arena); |
7286 | } |
7287 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse >(Arena* arena) { |
7288 | return Arena::CreateInternal< ::tensorflow::tfprof::ProfileNode_OutputsEntry_DoNotUse >(arena); |
7289 | } |
7290 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse >(Arena* arena) { |
7291 | return Arena::CreateInternal< ::tensorflow::tfprof::ProfileNode_OutputShapesEntry_DoNotUse >(arena); |
7292 | } |
7293 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse >(Arena* arena) { |
7294 | return Arena::CreateInternal< ::tensorflow::tfprof::ProfileNode_SrcOutputIndexEntry_DoNotUse >(arena); |
7295 | } |
7296 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse >(Arena* arena) { |
7297 | return Arena::CreateInternal< ::tensorflow::tfprof::ProfileNode_AttrsEntry_DoNotUse >(arena); |
7298 | } |
7299 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse >(Arena* arena) { |
7300 | return Arena::CreateInternal< ::tensorflow::tfprof::ProfileNode_ExecsEntry_DoNotUse >(arena); |
7301 | } |
7302 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ProfileNode* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ProfileNode >(Arena* arena) { |
7303 | return Arena::CreateInternal< ::tensorflow::tfprof::ProfileNode >(arena); |
7304 | } |
7305 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse >(Arena* arena) { |
7306 | return Arena::CreateInternal< ::tensorflow::tfprof::ExecProfile_AcceleratorExecsEntry_DoNotUse >(arena); |
7307 | } |
7308 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse >(Arena* arena) { |
7309 | return Arena::CreateInternal< ::tensorflow::tfprof::ExecProfile_CpuExecsEntry_DoNotUse >(arena); |
7310 | } |
7311 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ExecProfile* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ExecProfile >(Arena* arena) { |
7312 | return Arena::CreateInternal< ::tensorflow::tfprof::ExecProfile >(arena); |
7313 | } |
7314 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ExecTime* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ExecTime >(Arena* arena) { |
7315 | return Arena::CreateInternal< ::tensorflow::tfprof::ExecTime >(arena); |
7316 | } |
7317 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse >(Arena* arena) { |
7318 | return Arena::CreateInternal< ::tensorflow::tfprof::ExecMemory_OutputMemoryEntry_DoNotUse >(arena); |
7319 | } |
7320 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::ExecMemory* Arena::CreateMaybeMessage< ::tensorflow::tfprof::ExecMemory >(Arena* arena) { |
7321 | return Arena::CreateInternal< ::tensorflow::tfprof::ExecMemory >(arena); |
7322 | } |
7323 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::Tuple* Arena::CreateMaybeMessage< ::tensorflow::tfprof::Tuple >(Arena* arena) { |
7324 | return Arena::CreateInternal< ::tensorflow::tfprof::Tuple >(arena); |
7325 | } |
7326 | template<> PROTOBUF_NOINLINE ::tensorflow::tfprof::Memory* Arena::CreateMaybeMessage< ::tensorflow::tfprof::Memory >(Arena* arena) { |
7327 | return Arena::CreateInternal< ::tensorflow::tfprof::Memory >(arena); |
7328 | } |
7329 | PROTOBUF_NAMESPACE_CLOSE |
7330 | |
7331 | // @@protoc_insertion_point(global_scope) |
7332 | #include <google/protobuf/port_undef.inc> |
7333 | |