1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/framework/summary.proto |
3 | |
4 | #include "tensorflow/core/framework/summary.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_2fsummary_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_HistogramProto_tensorflow_2fcore_2fframework_2fsummary_2eproto; |
19 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fsummary_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Summary_Audio_tensorflow_2fcore_2fframework_2fsummary_2eproto; |
20 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fsummary_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Summary_Image_tensorflow_2fcore_2fframework_2fsummary_2eproto; |
21 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fsummary_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_Summary_Value_tensorflow_2fcore_2fframework_2fsummary_2eproto; |
22 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fsummary_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SummaryMetadata_tensorflow_2fcore_2fframework_2fsummary_2eproto; |
23 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2fsummary_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SummaryMetadata_PluginData_tensorflow_2fcore_2fframework_2fsummary_2eproto; |
24 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ftensor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TensorProto_tensorflow_2fcore_2fframework_2ftensor_2eproto; |
25 | namespace tensorflow { |
26 | class SummaryDescriptionDefaultTypeInternal { |
27 | public: |
28 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SummaryDescription> _instance; |
29 | } _SummaryDescription_default_instance_; |
30 | class HistogramProtoDefaultTypeInternal { |
31 | public: |
32 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<HistogramProto> _instance; |
33 | } _HistogramProto_default_instance_; |
34 | class SummaryMetadata_PluginDataDefaultTypeInternal { |
35 | public: |
36 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SummaryMetadata_PluginData> _instance; |
37 | } _SummaryMetadata_PluginData_default_instance_; |
38 | class SummaryMetadataDefaultTypeInternal { |
39 | public: |
40 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SummaryMetadata> _instance; |
41 | } _SummaryMetadata_default_instance_; |
42 | class Summary_ImageDefaultTypeInternal { |
43 | public: |
44 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Summary_Image> _instance; |
45 | } _Summary_Image_default_instance_; |
46 | class Summary_AudioDefaultTypeInternal { |
47 | public: |
48 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Summary_Audio> _instance; |
49 | } _Summary_Audio_default_instance_; |
50 | class Summary_ValueDefaultTypeInternal { |
51 | public: |
52 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Summary_Value> _instance; |
53 | float simple_value_; |
54 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr obsolete_old_style_histogram_; |
55 | const ::tensorflow::Summary_Image* image_; |
56 | const ::tensorflow::HistogramProto* histo_; |
57 | const ::tensorflow::Summary_Audio* audio_; |
58 | const ::tensorflow::TensorProto* tensor_; |
59 | } _Summary_Value_default_instance_; |
60 | class SummaryDefaultTypeInternal { |
61 | public: |
62 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Summary> _instance; |
63 | } _Summary_default_instance_; |
64 | } // namespace tensorflow |
65 | static void InitDefaultsscc_info_HistogramProto_tensorflow_2fcore_2fframework_2fsummary_2eproto() { |
66 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
67 | |
68 | { |
69 | void* ptr = &::tensorflow::_HistogramProto_default_instance_; |
70 | new (ptr) ::tensorflow::HistogramProto(); |
71 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
72 | } |
73 | ::tensorflow::HistogramProto::InitAsDefaultInstance(); |
74 | } |
75 | |
76 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_HistogramProto_tensorflow_2fcore_2fframework_2fsummary_2eproto = |
77 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_HistogramProto_tensorflow_2fcore_2fframework_2fsummary_2eproto}, {}}; |
78 | |
79 | static void InitDefaultsscc_info_Summary_tensorflow_2fcore_2fframework_2fsummary_2eproto() { |
80 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
81 | |
82 | { |
83 | void* ptr = &::tensorflow::_Summary_default_instance_; |
84 | new (ptr) ::tensorflow::Summary(); |
85 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
86 | } |
87 | ::tensorflow::Summary::InitAsDefaultInstance(); |
88 | } |
89 | |
90 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Summary_tensorflow_2fcore_2fframework_2fsummary_2eproto = |
91 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Summary_tensorflow_2fcore_2fframework_2fsummary_2eproto}, { |
92 | &scc_info_Summary_Value_tensorflow_2fcore_2fframework_2fsummary_2eproto.base,}}; |
93 | |
94 | static void InitDefaultsscc_info_Summary_Audio_tensorflow_2fcore_2fframework_2fsummary_2eproto() { |
95 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
96 | |
97 | { |
98 | void* ptr = &::tensorflow::_Summary_Audio_default_instance_; |
99 | new (ptr) ::tensorflow::Summary_Audio(); |
100 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
101 | } |
102 | ::tensorflow::Summary_Audio::InitAsDefaultInstance(); |
103 | } |
104 | |
105 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Summary_Audio_tensorflow_2fcore_2fframework_2fsummary_2eproto = |
106 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Summary_Audio_tensorflow_2fcore_2fframework_2fsummary_2eproto}, {}}; |
107 | |
108 | static void InitDefaultsscc_info_Summary_Image_tensorflow_2fcore_2fframework_2fsummary_2eproto() { |
109 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
110 | |
111 | { |
112 | void* ptr = &::tensorflow::_Summary_Image_default_instance_; |
113 | new (ptr) ::tensorflow::Summary_Image(); |
114 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
115 | } |
116 | ::tensorflow::Summary_Image::InitAsDefaultInstance(); |
117 | } |
118 | |
119 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Summary_Image_tensorflow_2fcore_2fframework_2fsummary_2eproto = |
120 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Summary_Image_tensorflow_2fcore_2fframework_2fsummary_2eproto}, {}}; |
121 | |
122 | static void InitDefaultsscc_info_Summary_Value_tensorflow_2fcore_2fframework_2fsummary_2eproto() { |
123 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
124 | |
125 | { |
126 | void* ptr = &::tensorflow::_Summary_Value_default_instance_; |
127 | new (ptr) ::tensorflow::Summary_Value(); |
128 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
129 | } |
130 | ::tensorflow::Summary_Value::InitAsDefaultInstance(); |
131 | } |
132 | |
133 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_Summary_Value_tensorflow_2fcore_2fframework_2fsummary_2eproto = |
134 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 5, InitDefaultsscc_info_Summary_Value_tensorflow_2fcore_2fframework_2fsummary_2eproto}, { |
135 | &scc_info_SummaryMetadata_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
136 | &scc_info_Summary_Image_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
137 | &scc_info_HistogramProto_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
138 | &scc_info_Summary_Audio_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
139 | &scc_info_TensorProto_tensorflow_2fcore_2fframework_2ftensor_2eproto.base,}}; |
140 | |
141 | static void InitDefaultsscc_info_SummaryDescription_tensorflow_2fcore_2fframework_2fsummary_2eproto() { |
142 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
143 | |
144 | { |
145 | void* ptr = &::tensorflow::_SummaryDescription_default_instance_; |
146 | new (ptr) ::tensorflow::SummaryDescription(); |
147 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
148 | } |
149 | ::tensorflow::SummaryDescription::InitAsDefaultInstance(); |
150 | } |
151 | |
152 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SummaryDescription_tensorflow_2fcore_2fframework_2fsummary_2eproto = |
153 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_SummaryDescription_tensorflow_2fcore_2fframework_2fsummary_2eproto}, {}}; |
154 | |
155 | static void InitDefaultsscc_info_SummaryMetadata_tensorflow_2fcore_2fframework_2fsummary_2eproto() { |
156 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
157 | |
158 | { |
159 | void* ptr = &::tensorflow::_SummaryMetadata_default_instance_; |
160 | new (ptr) ::tensorflow::SummaryMetadata(); |
161 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
162 | } |
163 | ::tensorflow::SummaryMetadata::InitAsDefaultInstance(); |
164 | } |
165 | |
166 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SummaryMetadata_tensorflow_2fcore_2fframework_2fsummary_2eproto = |
167 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_SummaryMetadata_tensorflow_2fcore_2fframework_2fsummary_2eproto}, { |
168 | &scc_info_SummaryMetadata_PluginData_tensorflow_2fcore_2fframework_2fsummary_2eproto.base,}}; |
169 | |
170 | static void InitDefaultsscc_info_SummaryMetadata_PluginData_tensorflow_2fcore_2fframework_2fsummary_2eproto() { |
171 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
172 | |
173 | { |
174 | void* ptr = &::tensorflow::_SummaryMetadata_PluginData_default_instance_; |
175 | new (ptr) ::tensorflow::SummaryMetadata_PluginData(); |
176 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
177 | } |
178 | ::tensorflow::SummaryMetadata_PluginData::InitAsDefaultInstance(); |
179 | } |
180 | |
181 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SummaryMetadata_PluginData_tensorflow_2fcore_2fframework_2fsummary_2eproto = |
182 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_SummaryMetadata_PluginData_tensorflow_2fcore_2fframework_2fsummary_2eproto}, {}}; |
183 | |
184 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fframework_2fsummary_2eproto[8]; |
185 | static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fsummary_2eproto[1]; |
186 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fframework_2fsummary_2eproto = nullptr; |
187 | |
188 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fframework_2fsummary_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
189 | ~0u, // no _has_bits_ |
190 | PROTOBUF_FIELD_OFFSET(::tensorflow::SummaryDescription, _internal_metadata_), |
191 | ~0u, // no _extensions_ |
192 | ~0u, // no _oneof_case_ |
193 | ~0u, // no _weak_field_map_ |
194 | PROTOBUF_FIELD_OFFSET(::tensorflow::SummaryDescription, type_hint_), |
195 | ~0u, // no _has_bits_ |
196 | PROTOBUF_FIELD_OFFSET(::tensorflow::HistogramProto, _internal_metadata_), |
197 | ~0u, // no _extensions_ |
198 | ~0u, // no _oneof_case_ |
199 | ~0u, // no _weak_field_map_ |
200 | PROTOBUF_FIELD_OFFSET(::tensorflow::HistogramProto, min_), |
201 | PROTOBUF_FIELD_OFFSET(::tensorflow::HistogramProto, max_), |
202 | PROTOBUF_FIELD_OFFSET(::tensorflow::HistogramProto, num_), |
203 | PROTOBUF_FIELD_OFFSET(::tensorflow::HistogramProto, sum_), |
204 | PROTOBUF_FIELD_OFFSET(::tensorflow::HistogramProto, sum_squares_), |
205 | PROTOBUF_FIELD_OFFSET(::tensorflow::HistogramProto, bucket_limit_), |
206 | PROTOBUF_FIELD_OFFSET(::tensorflow::HistogramProto, bucket_), |
207 | ~0u, // no _has_bits_ |
208 | PROTOBUF_FIELD_OFFSET(::tensorflow::SummaryMetadata_PluginData, _internal_metadata_), |
209 | ~0u, // no _extensions_ |
210 | ~0u, // no _oneof_case_ |
211 | ~0u, // no _weak_field_map_ |
212 | PROTOBUF_FIELD_OFFSET(::tensorflow::SummaryMetadata_PluginData, plugin_name_), |
213 | PROTOBUF_FIELD_OFFSET(::tensorflow::SummaryMetadata_PluginData, content_), |
214 | ~0u, // no _has_bits_ |
215 | PROTOBUF_FIELD_OFFSET(::tensorflow::SummaryMetadata, _internal_metadata_), |
216 | ~0u, // no _extensions_ |
217 | ~0u, // no _oneof_case_ |
218 | ~0u, // no _weak_field_map_ |
219 | PROTOBUF_FIELD_OFFSET(::tensorflow::SummaryMetadata, plugin_data_), |
220 | PROTOBUF_FIELD_OFFSET(::tensorflow::SummaryMetadata, display_name_), |
221 | PROTOBUF_FIELD_OFFSET(::tensorflow::SummaryMetadata, summary_description_), |
222 | PROTOBUF_FIELD_OFFSET(::tensorflow::SummaryMetadata, data_class_), |
223 | ~0u, // no _has_bits_ |
224 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Image, _internal_metadata_), |
225 | ~0u, // no _extensions_ |
226 | ~0u, // no _oneof_case_ |
227 | ~0u, // no _weak_field_map_ |
228 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Image, height_), |
229 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Image, width_), |
230 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Image, colorspace_), |
231 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Image, encoded_image_string_), |
232 | ~0u, // no _has_bits_ |
233 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Audio, _internal_metadata_), |
234 | ~0u, // no _extensions_ |
235 | ~0u, // no _oneof_case_ |
236 | ~0u, // no _weak_field_map_ |
237 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Audio, sample_rate_), |
238 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Audio, num_channels_), |
239 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Audio, length_frames_), |
240 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Audio, encoded_audio_string_), |
241 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Audio, content_type_), |
242 | ~0u, // no _has_bits_ |
243 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Value, _internal_metadata_), |
244 | ~0u, // no _extensions_ |
245 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Value, _oneof_case_[0]), |
246 | ~0u, // no _weak_field_map_ |
247 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Value, node_name_), |
248 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Value, tag_), |
249 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Value, metadata_), |
250 | offsetof(::tensorflow::Summary_ValueDefaultTypeInternal, simple_value_), |
251 | offsetof(::tensorflow::Summary_ValueDefaultTypeInternal, obsolete_old_style_histogram_), |
252 | offsetof(::tensorflow::Summary_ValueDefaultTypeInternal, image_), |
253 | offsetof(::tensorflow::Summary_ValueDefaultTypeInternal, histo_), |
254 | offsetof(::tensorflow::Summary_ValueDefaultTypeInternal, audio_), |
255 | offsetof(::tensorflow::Summary_ValueDefaultTypeInternal, tensor_), |
256 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary_Value, value_), |
257 | ~0u, // no _has_bits_ |
258 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary, _internal_metadata_), |
259 | ~0u, // no _extensions_ |
260 | ~0u, // no _oneof_case_ |
261 | ~0u, // no _weak_field_map_ |
262 | PROTOBUF_FIELD_OFFSET(::tensorflow::Summary, value_), |
263 | }; |
264 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
265 | { 0, -1, sizeof(::tensorflow::SummaryDescription)}, |
266 | { 6, -1, sizeof(::tensorflow::HistogramProto)}, |
267 | { 18, -1, sizeof(::tensorflow::SummaryMetadata_PluginData)}, |
268 | { 25, -1, sizeof(::tensorflow::SummaryMetadata)}, |
269 | { 34, -1, sizeof(::tensorflow::Summary_Image)}, |
270 | { 43, -1, sizeof(::tensorflow::Summary_Audio)}, |
271 | { 53, -1, sizeof(::tensorflow::Summary_Value)}, |
272 | { 68, -1, sizeof(::tensorflow::Summary)}, |
273 | }; |
274 | |
275 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
276 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SummaryDescription_default_instance_), |
277 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_HistogramProto_default_instance_), |
278 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SummaryMetadata_PluginData_default_instance_), |
279 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_SummaryMetadata_default_instance_), |
280 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_Summary_Image_default_instance_), |
281 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_Summary_Audio_default_instance_), |
282 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_Summary_Value_default_instance_), |
283 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_Summary_default_instance_), |
284 | }; |
285 | |
286 | const char descriptor_table_protodef_tensorflow_2fcore_2fframework_2fsummary_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
287 | "\n\'tensorflow/core/framework/summary.prot" |
288 | "o\022\ntensorflow\032&tensorflow/core/framework" |
289 | "/tensor.proto\"\'\n\022SummaryDescription\022\021\n\tt" |
290 | "ype_hint\030\001 \001(\t\"\207\001\n\016HistogramProto\022\013\n\003min" |
291 | "\030\001 \001(\001\022\013\n\003max\030\002 \001(\001\022\013\n\003num\030\003 \001(\001\022\013\n\003sum\030" |
292 | "\004 \001(\001\022\023\n\013sum_squares\030\005 \001(\001\022\030\n\014bucket_lim" |
293 | "it\030\006 \003(\001B\002\020\001\022\022\n\006bucket\030\007 \003(\001B\002\020\001\"\340\001\n\017Sum" |
294 | "maryMetadata\022;\n\013plugin_data\030\001 \001(\0132&.tens" |
295 | "orflow.SummaryMetadata.PluginData\022\024\n\014dis" |
296 | "play_name\030\002 \001(\t\022\033\n\023summary_description\030\003" |
297 | " \001(\t\022)\n\ndata_class\030\004 \001(\0162\025.tensorflow.Da" |
298 | "taClass\0322\n\nPluginData\022\023\n\013plugin_name\030\001 \001" |
299 | "(\t\022\017\n\007content\030\002 \001(\014\"\336\004\n\007Summary\022(\n\005value" |
300 | "\030\001 \003(\0132\031.tensorflow.Summary.Value\032X\n\005Ima" |
301 | "ge\022\016\n\006height\030\001 \001(\005\022\r\n\005width\030\002 \001(\005\022\022\n\ncol" |
302 | "orspace\030\003 \001(\005\022\034\n\024encoded_image_string\030\004 " |
303 | "\001(\014\032}\n\005Audio\022\023\n\013sample_rate\030\001 \001(\002\022\024\n\014num" |
304 | "_channels\030\002 \001(\003\022\025\n\rlength_frames\030\003 \001(\003\022\034" |
305 | "\n\024encoded_audio_string\030\004 \001(\014\022\024\n\014content_" |
306 | "type\030\005 \001(\t\032\317\002\n\005Value\022\021\n\tnode_name\030\007 \001(\t\022" |
307 | "\013\n\003tag\030\001 \001(\t\022-\n\010metadata\030\t \001(\0132\033.tensorf" |
308 | "low.SummaryMetadata\022\026\n\014simple_value\030\002 \001(" |
309 | "\002H\000\022&\n\034obsolete_old_style_histogram\030\003 \001(" |
310 | "\014H\000\022*\n\005image\030\004 \001(\0132\031.tensorflow.Summary." |
311 | "ImageH\000\022+\n\005histo\030\005 \001(\0132\032.tensorflow.Hist" |
312 | "ogramProtoH\000\022*\n\005audio\030\006 \001(\0132\031.tensorflow" |
313 | ".Summary.AudioH\000\022)\n\006tensor\030\010 \001(\0132\027.tenso" |
314 | "rflow.TensorProtoH\000B\007\n\005value*o\n\tDataClas" |
315 | "s\022\026\n\022DATA_CLASS_UNKNOWN\020\000\022\025\n\021DATA_CLASS_" |
316 | "SCALAR\020\001\022\025\n\021DATA_CLASS_TENSOR\020\002\022\034\n\030DATA_" |
317 | "CLASS_BLOB_SEQUENCE\020\003B~\n\030org.tensorflow." |
318 | "frameworkB\rSummaryProtosP\001ZNgithub.com/t" |
319 | "ensorflow/tensorflow/tensorflow/go/core/" |
320 | "framework/summary_go_proto\370\001\001b\006proto3" |
321 | ; |
322 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fframework_2fsummary_2eproto_deps[1] = { |
323 | &::descriptor_table_tensorflow_2fcore_2fframework_2ftensor_2eproto, |
324 | }; |
325 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fframework_2fsummary_2eproto_sccs[8] = { |
326 | &scc_info_HistogramProto_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
327 | &scc_info_Summary_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
328 | &scc_info_Summary_Audio_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
329 | &scc_info_Summary_Image_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
330 | &scc_info_Summary_Value_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
331 | &scc_info_SummaryDescription_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
332 | &scc_info_SummaryMetadata_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
333 | &scc_info_SummaryMetadata_PluginData_tensorflow_2fcore_2fframework_2fsummary_2eproto.base, |
334 | }; |
335 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fframework_2fsummary_2eproto_once; |
336 | static bool descriptor_table_tensorflow_2fcore_2fframework_2fsummary_2eproto_initialized = false; |
337 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fframework_2fsummary_2eproto = { |
338 | &descriptor_table_tensorflow_2fcore_2fframework_2fsummary_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fframework_2fsummary_2eproto, "tensorflow/core/framework/summary.proto" , 1357, |
339 | &descriptor_table_tensorflow_2fcore_2fframework_2fsummary_2eproto_once, descriptor_table_tensorflow_2fcore_2fframework_2fsummary_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fframework_2fsummary_2eproto_deps, 8, 1, |
340 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fframework_2fsummary_2eproto::offsets, |
341 | file_level_metadata_tensorflow_2fcore_2fframework_2fsummary_2eproto, 8, file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fsummary_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fframework_2fsummary_2eproto, |
342 | }; |
343 | |
344 | // Force running AddDescriptors() at dynamic initialization time. |
345 | static bool dynamic_init_dummy_tensorflow_2fcore_2fframework_2fsummary_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2fsummary_2eproto), true); |
346 | namespace tensorflow { |
347 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DataClass_descriptor() { |
348 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2fsummary_2eproto); |
349 | return file_level_enum_descriptors_tensorflow_2fcore_2fframework_2fsummary_2eproto[0]; |
350 | } |
351 | bool DataClass_IsValid(int value) { |
352 | switch (value) { |
353 | case 0: |
354 | case 1: |
355 | case 2: |
356 | case 3: |
357 | return true; |
358 | default: |
359 | return false; |
360 | } |
361 | } |
362 | |
363 | |
364 | // =================================================================== |
365 | |
366 | void SummaryDescription::InitAsDefaultInstance() { |
367 | } |
368 | class SummaryDescription::_Internal { |
369 | public: |
370 | }; |
371 | |
372 | SummaryDescription::SummaryDescription() |
373 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
374 | SharedCtor(); |
375 | // @@protoc_insertion_point(constructor:tensorflow.SummaryDescription) |
376 | } |
377 | SummaryDescription::SummaryDescription(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
378 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
379 | _internal_metadata_(arena) { |
380 | SharedCtor(); |
381 | RegisterArenaDtor(arena); |
382 | // @@protoc_insertion_point(arena_constructor:tensorflow.SummaryDescription) |
383 | } |
384 | SummaryDescription::SummaryDescription(const SummaryDescription& from) |
385 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
386 | _internal_metadata_(nullptr) { |
387 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
388 | type_hint_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
389 | if (!from.type_hint().empty()) { |
390 | type_hint_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_hint(), |
391 | GetArenaNoVirtual()); |
392 | } |
393 | // @@protoc_insertion_point(copy_constructor:tensorflow.SummaryDescription) |
394 | } |
395 | |
396 | void SummaryDescription::SharedCtor() { |
397 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SummaryDescription_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
398 | type_hint_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
399 | } |
400 | |
401 | SummaryDescription::~SummaryDescription() { |
402 | // @@protoc_insertion_point(destructor:tensorflow.SummaryDescription) |
403 | SharedDtor(); |
404 | } |
405 | |
406 | void SummaryDescription::SharedDtor() { |
407 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
408 | type_hint_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
409 | } |
410 | |
411 | void SummaryDescription::ArenaDtor(void* object) { |
412 | SummaryDescription* _this = reinterpret_cast< SummaryDescription* >(object); |
413 | (void)_this; |
414 | } |
415 | void SummaryDescription::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
416 | } |
417 | void SummaryDescription::SetCachedSize(int size) const { |
418 | _cached_size_.Set(size); |
419 | } |
420 | const SummaryDescription& SummaryDescription::default_instance() { |
421 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SummaryDescription_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
422 | return *internal_default_instance(); |
423 | } |
424 | |
425 | |
426 | void SummaryDescription::Clear() { |
427 | // @@protoc_insertion_point(message_clear_start:tensorflow.SummaryDescription) |
428 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
429 | // Prevent compiler warnings about cached_has_bits being unused |
430 | (void) cached_has_bits; |
431 | |
432 | type_hint_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
433 | _internal_metadata_.Clear(); |
434 | } |
435 | |
436 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
437 | const char* SummaryDescription::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
438 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
439 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
440 | while (!ctx->Done(&ptr)) { |
441 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
442 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
443 | CHK_(ptr); |
444 | switch (tag >> 3) { |
445 | // string type_hint = 1; |
446 | case 1: |
447 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
448 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_type_hint(), ptr, ctx, "tensorflow.SummaryDescription.type_hint" ); |
449 | CHK_(ptr); |
450 | } else goto handle_unusual; |
451 | continue; |
452 | default: { |
453 | handle_unusual: |
454 | if ((tag & 7) == 4 || tag == 0) { |
455 | ctx->SetLastTag(tag); |
456 | goto success; |
457 | } |
458 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
459 | CHK_(ptr != nullptr); |
460 | continue; |
461 | } |
462 | } // switch |
463 | } // while |
464 | success: |
465 | return ptr; |
466 | failure: |
467 | ptr = nullptr; |
468 | goto success; |
469 | #undef CHK_ |
470 | } |
471 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
472 | bool SummaryDescription::MergePartialFromCodedStream( |
473 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
474 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
475 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
476 | // @@protoc_insertion_point(parse_start:tensorflow.SummaryDescription) |
477 | for (;;) { |
478 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
479 | tag = p.first; |
480 | if (!p.second) goto handle_unusual; |
481 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
482 | // string type_hint = 1; |
483 | case 1: { |
484 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
485 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
486 | input, this->mutable_type_hint())); |
487 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
488 | this->type_hint().data(), static_cast<int>(this->type_hint().length()), |
489 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
490 | "tensorflow.SummaryDescription.type_hint" )); |
491 | } else { |
492 | goto handle_unusual; |
493 | } |
494 | break; |
495 | } |
496 | |
497 | default: { |
498 | handle_unusual: |
499 | if (tag == 0) { |
500 | goto success; |
501 | } |
502 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
503 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
504 | break; |
505 | } |
506 | } |
507 | } |
508 | success: |
509 | // @@protoc_insertion_point(parse_success:tensorflow.SummaryDescription) |
510 | return true; |
511 | failure: |
512 | // @@protoc_insertion_point(parse_failure:tensorflow.SummaryDescription) |
513 | return false; |
514 | #undef DO_ |
515 | } |
516 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
517 | |
518 | void SummaryDescription::SerializeWithCachedSizes( |
519 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
520 | // @@protoc_insertion_point(serialize_start:tensorflow.SummaryDescription) |
521 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
522 | (void) cached_has_bits; |
523 | |
524 | // string type_hint = 1; |
525 | if (this->type_hint().size() > 0) { |
526 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
527 | this->type_hint().data(), static_cast<int>(this->type_hint().length()), |
528 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
529 | "tensorflow.SummaryDescription.type_hint" ); |
530 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
531 | 1, this->type_hint(), output); |
532 | } |
533 | |
534 | if (_internal_metadata_.have_unknown_fields()) { |
535 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
536 | _internal_metadata_.unknown_fields(), output); |
537 | } |
538 | // @@protoc_insertion_point(serialize_end:tensorflow.SummaryDescription) |
539 | } |
540 | |
541 | ::PROTOBUF_NAMESPACE_ID::uint8* SummaryDescription::InternalSerializeWithCachedSizesToArray( |
542 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
543 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SummaryDescription) |
544 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
545 | (void) cached_has_bits; |
546 | |
547 | // string type_hint = 1; |
548 | if (this->type_hint().size() > 0) { |
549 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
550 | this->type_hint().data(), static_cast<int>(this->type_hint().length()), |
551 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
552 | "tensorflow.SummaryDescription.type_hint" ); |
553 | target = |
554 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
555 | 1, this->type_hint(), target); |
556 | } |
557 | |
558 | if (_internal_metadata_.have_unknown_fields()) { |
559 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
560 | _internal_metadata_.unknown_fields(), target); |
561 | } |
562 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SummaryDescription) |
563 | return target; |
564 | } |
565 | |
566 | size_t SummaryDescription::ByteSizeLong() const { |
567 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SummaryDescription) |
568 | size_t total_size = 0; |
569 | |
570 | if (_internal_metadata_.have_unknown_fields()) { |
571 | total_size += |
572 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
573 | _internal_metadata_.unknown_fields()); |
574 | } |
575 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
576 | // Prevent compiler warnings about cached_has_bits being unused |
577 | (void) cached_has_bits; |
578 | |
579 | // string type_hint = 1; |
580 | if (this->type_hint().size() > 0) { |
581 | total_size += 1 + |
582 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
583 | this->type_hint()); |
584 | } |
585 | |
586 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
587 | SetCachedSize(cached_size); |
588 | return total_size; |
589 | } |
590 | |
591 | void SummaryDescription::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
592 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SummaryDescription) |
593 | GOOGLE_DCHECK_NE(&from, this); |
594 | const SummaryDescription* source = |
595 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SummaryDescription>( |
596 | &from); |
597 | if (source == nullptr) { |
598 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SummaryDescription) |
599 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
600 | } else { |
601 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SummaryDescription) |
602 | MergeFrom(*source); |
603 | } |
604 | } |
605 | |
606 | void SummaryDescription::MergeFrom(const SummaryDescription& from) { |
607 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SummaryDescription) |
608 | GOOGLE_DCHECK_NE(&from, this); |
609 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
610 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
611 | (void) cached_has_bits; |
612 | |
613 | if (from.type_hint().size() > 0) { |
614 | set_type_hint(from.type_hint()); |
615 | } |
616 | } |
617 | |
618 | void SummaryDescription::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
619 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SummaryDescription) |
620 | if (&from == this) return; |
621 | Clear(); |
622 | MergeFrom(from); |
623 | } |
624 | |
625 | void SummaryDescription::CopyFrom(const SummaryDescription& from) { |
626 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SummaryDescription) |
627 | if (&from == this) return; |
628 | Clear(); |
629 | MergeFrom(from); |
630 | } |
631 | |
632 | bool SummaryDescription::IsInitialized() const { |
633 | return true; |
634 | } |
635 | |
636 | void SummaryDescription::InternalSwap(SummaryDescription* other) { |
637 | using std::swap; |
638 | _internal_metadata_.Swap(&other->_internal_metadata_); |
639 | type_hint_.Swap(&other->type_hint_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
640 | GetArenaNoVirtual()); |
641 | } |
642 | |
643 | ::PROTOBUF_NAMESPACE_ID::Metadata SummaryDescription::GetMetadata() const { |
644 | return GetMetadataStatic(); |
645 | } |
646 | |
647 | |
648 | // =================================================================== |
649 | |
650 | void HistogramProto::InitAsDefaultInstance() { |
651 | } |
652 | class HistogramProto::_Internal { |
653 | public: |
654 | }; |
655 | |
656 | HistogramProto::HistogramProto() |
657 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
658 | SharedCtor(); |
659 | // @@protoc_insertion_point(constructor:tensorflow.HistogramProto) |
660 | } |
661 | HistogramProto::HistogramProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
662 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
663 | _internal_metadata_(arena), |
664 | bucket_limit_(arena), |
665 | bucket_(arena) { |
666 | SharedCtor(); |
667 | RegisterArenaDtor(arena); |
668 | // @@protoc_insertion_point(arena_constructor:tensorflow.HistogramProto) |
669 | } |
670 | HistogramProto::HistogramProto(const HistogramProto& from) |
671 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
672 | _internal_metadata_(nullptr), |
673 | bucket_limit_(from.bucket_limit_), |
674 | bucket_(from.bucket_) { |
675 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
676 | ::memcpy(&min_, &from.min_, |
677 | static_cast<size_t>(reinterpret_cast<char*>(&sum_squares_) - |
678 | reinterpret_cast<char*>(&min_)) + sizeof(sum_squares_)); |
679 | // @@protoc_insertion_point(copy_constructor:tensorflow.HistogramProto) |
680 | } |
681 | |
682 | void HistogramProto::SharedCtor() { |
683 | ::memset(&min_, 0, static_cast<size_t>( |
684 | reinterpret_cast<char*>(&sum_squares_) - |
685 | reinterpret_cast<char*>(&min_)) + sizeof(sum_squares_)); |
686 | } |
687 | |
688 | HistogramProto::~HistogramProto() { |
689 | // @@protoc_insertion_point(destructor:tensorflow.HistogramProto) |
690 | SharedDtor(); |
691 | } |
692 | |
693 | void HistogramProto::SharedDtor() { |
694 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
695 | } |
696 | |
697 | void HistogramProto::ArenaDtor(void* object) { |
698 | HistogramProto* _this = reinterpret_cast< HistogramProto* >(object); |
699 | (void)_this; |
700 | } |
701 | void HistogramProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
702 | } |
703 | void HistogramProto::SetCachedSize(int size) const { |
704 | _cached_size_.Set(size); |
705 | } |
706 | const HistogramProto& HistogramProto::default_instance() { |
707 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HistogramProto_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
708 | return *internal_default_instance(); |
709 | } |
710 | |
711 | |
712 | void HistogramProto::Clear() { |
713 | // @@protoc_insertion_point(message_clear_start:tensorflow.HistogramProto) |
714 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
715 | // Prevent compiler warnings about cached_has_bits being unused |
716 | (void) cached_has_bits; |
717 | |
718 | bucket_limit_.Clear(); |
719 | bucket_.Clear(); |
720 | ::memset(&min_, 0, static_cast<size_t>( |
721 | reinterpret_cast<char*>(&sum_squares_) - |
722 | reinterpret_cast<char*>(&min_)) + sizeof(sum_squares_)); |
723 | _internal_metadata_.Clear(); |
724 | } |
725 | |
726 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
727 | const char* HistogramProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
728 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
729 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
730 | while (!ctx->Done(&ptr)) { |
731 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
732 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
733 | CHK_(ptr); |
734 | switch (tag >> 3) { |
735 | // double min = 1; |
736 | case 1: |
737 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 9)) { |
738 | min_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr); |
739 | ptr += sizeof(double); |
740 | } else goto handle_unusual; |
741 | continue; |
742 | // double max = 2; |
743 | case 2: |
744 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 17)) { |
745 | max_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr); |
746 | ptr += sizeof(double); |
747 | } else goto handle_unusual; |
748 | continue; |
749 | // double num = 3; |
750 | case 3: |
751 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 25)) { |
752 | num_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr); |
753 | ptr += sizeof(double); |
754 | } else goto handle_unusual; |
755 | continue; |
756 | // double sum = 4; |
757 | case 4: |
758 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 33)) { |
759 | sum_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr); |
760 | ptr += sizeof(double); |
761 | } else goto handle_unusual; |
762 | continue; |
763 | // double sum_squares = 5; |
764 | case 5: |
765 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 41)) { |
766 | sum_squares_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr); |
767 | ptr += sizeof(double); |
768 | } else goto handle_unusual; |
769 | continue; |
770 | // repeated double bucket_limit = 6 [packed = true]; |
771 | case 6: |
772 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { |
773 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(mutable_bucket_limit(), ptr, ctx); |
774 | CHK_(ptr); |
775 | } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 49) { |
776 | add_bucket_limit(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr)); |
777 | ptr += sizeof(double); |
778 | } else goto handle_unusual; |
779 | continue; |
780 | // repeated double bucket = 7 [packed = true]; |
781 | case 7: |
782 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
783 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(mutable_bucket(), ptr, ctx); |
784 | CHK_(ptr); |
785 | } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 57) { |
786 | add_bucket(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr)); |
787 | ptr += sizeof(double); |
788 | } else goto handle_unusual; |
789 | continue; |
790 | default: { |
791 | handle_unusual: |
792 | if ((tag & 7) == 4 || tag == 0) { |
793 | ctx->SetLastTag(tag); |
794 | goto success; |
795 | } |
796 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
797 | CHK_(ptr != nullptr); |
798 | continue; |
799 | } |
800 | } // switch |
801 | } // while |
802 | success: |
803 | return ptr; |
804 | failure: |
805 | ptr = nullptr; |
806 | goto success; |
807 | #undef CHK_ |
808 | } |
809 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
810 | bool HistogramProto::MergePartialFromCodedStream( |
811 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
812 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
813 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
814 | // @@protoc_insertion_point(parse_start:tensorflow.HistogramProto) |
815 | for (;;) { |
816 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
817 | tag = p.first; |
818 | if (!p.second) goto handle_unusual; |
819 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
820 | // double min = 1; |
821 | case 1: { |
822 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (9 & 0xFF)) { |
823 | |
824 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
825 | double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( |
826 | input, &min_))); |
827 | } else { |
828 | goto handle_unusual; |
829 | } |
830 | break; |
831 | } |
832 | |
833 | // double max = 2; |
834 | case 2: { |
835 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (17 & 0xFF)) { |
836 | |
837 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
838 | double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( |
839 | input, &max_))); |
840 | } else { |
841 | goto handle_unusual; |
842 | } |
843 | break; |
844 | } |
845 | |
846 | // double num = 3; |
847 | case 3: { |
848 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (25 & 0xFF)) { |
849 | |
850 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
851 | double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( |
852 | input, &num_))); |
853 | } else { |
854 | goto handle_unusual; |
855 | } |
856 | break; |
857 | } |
858 | |
859 | // double sum = 4; |
860 | case 4: { |
861 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (33 & 0xFF)) { |
862 | |
863 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
864 | double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( |
865 | input, &sum_))); |
866 | } else { |
867 | goto handle_unusual; |
868 | } |
869 | break; |
870 | } |
871 | |
872 | // double sum_squares = 5; |
873 | case 5: { |
874 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (41 & 0xFF)) { |
875 | |
876 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
877 | double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( |
878 | input, &sum_squares_))); |
879 | } else { |
880 | goto handle_unusual; |
881 | } |
882 | break; |
883 | } |
884 | |
885 | // repeated double bucket_limit = 6 [packed = true]; |
886 | case 6: { |
887 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { |
888 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< |
889 | double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( |
890 | input, this->mutable_bucket_limit()))); |
891 | } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (49 & 0xFF)) { |
892 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
893 | double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( |
894 | 1, 50u, input, this->mutable_bucket_limit()))); |
895 | } else { |
896 | goto handle_unusual; |
897 | } |
898 | break; |
899 | } |
900 | |
901 | // repeated double bucket = 7 [packed = true]; |
902 | case 7: { |
903 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
904 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< |
905 | double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( |
906 | input, this->mutable_bucket()))); |
907 | } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (57 & 0xFF)) { |
908 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
909 | double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( |
910 | 1, 58u, input, this->mutable_bucket()))); |
911 | } else { |
912 | goto handle_unusual; |
913 | } |
914 | break; |
915 | } |
916 | |
917 | default: { |
918 | handle_unusual: |
919 | if (tag == 0) { |
920 | goto success; |
921 | } |
922 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
923 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
924 | break; |
925 | } |
926 | } |
927 | } |
928 | success: |
929 | // @@protoc_insertion_point(parse_success:tensorflow.HistogramProto) |
930 | return true; |
931 | failure: |
932 | // @@protoc_insertion_point(parse_failure:tensorflow.HistogramProto) |
933 | return false; |
934 | #undef DO_ |
935 | } |
936 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
937 | |
938 | void HistogramProto::SerializeWithCachedSizes( |
939 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
940 | // @@protoc_insertion_point(serialize_start:tensorflow.HistogramProto) |
941 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
942 | (void) cached_has_bits; |
943 | |
944 | // double min = 1; |
945 | if (!(this->min() <= 0 && this->min() >= 0)) { |
946 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(1, this->min(), output); |
947 | } |
948 | |
949 | // double max = 2; |
950 | if (!(this->max() <= 0 && this->max() >= 0)) { |
951 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(2, this->max(), output); |
952 | } |
953 | |
954 | // double num = 3; |
955 | if (!(this->num() <= 0 && this->num() >= 0)) { |
956 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(3, this->num(), output); |
957 | } |
958 | |
959 | // double sum = 4; |
960 | if (!(this->sum() <= 0 && this->sum() >= 0)) { |
961 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(4, this->sum(), output); |
962 | } |
963 | |
964 | // double sum_squares = 5; |
965 | if (!(this->sum_squares() <= 0 && this->sum_squares() >= 0)) { |
966 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDouble(5, this->sum_squares(), output); |
967 | } |
968 | |
969 | // repeated double bucket_limit = 6 [packed = true]; |
970 | if (this->bucket_limit_size() > 0) { |
971 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(6, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
972 | output->WriteVarint32(_bucket_limit_cached_byte_size_.load( |
973 | std::memory_order_relaxed)); |
974 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleArray( |
975 | this->bucket_limit().data(), this->bucket_limit_size(), output); |
976 | } |
977 | |
978 | // repeated double bucket = 7 [packed = true]; |
979 | if (this->bucket_size() > 0) { |
980 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(7, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
981 | output->WriteVarint32(_bucket_cached_byte_size_.load( |
982 | std::memory_order_relaxed)); |
983 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleArray( |
984 | this->bucket().data(), this->bucket_size(), output); |
985 | } |
986 | |
987 | if (_internal_metadata_.have_unknown_fields()) { |
988 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
989 | _internal_metadata_.unknown_fields(), output); |
990 | } |
991 | // @@protoc_insertion_point(serialize_end:tensorflow.HistogramProto) |
992 | } |
993 | |
994 | ::PROTOBUF_NAMESPACE_ID::uint8* HistogramProto::InternalSerializeWithCachedSizesToArray( |
995 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
996 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.HistogramProto) |
997 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
998 | (void) cached_has_bits; |
999 | |
1000 | // double min = 1; |
1001 | if (!(this->min() <= 0 && this->min() >= 0)) { |
1002 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(1, this->min(), target); |
1003 | } |
1004 | |
1005 | // double max = 2; |
1006 | if (!(this->max() <= 0 && this->max() >= 0)) { |
1007 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(2, this->max(), target); |
1008 | } |
1009 | |
1010 | // double num = 3; |
1011 | if (!(this->num() <= 0 && this->num() >= 0)) { |
1012 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(3, this->num(), target); |
1013 | } |
1014 | |
1015 | // double sum = 4; |
1016 | if (!(this->sum() <= 0 && this->sum() >= 0)) { |
1017 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(4, this->sum(), target); |
1018 | } |
1019 | |
1020 | // double sum_squares = 5; |
1021 | if (!(this->sum_squares() <= 0 && this->sum_squares() >= 0)) { |
1022 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(5, this->sum_squares(), target); |
1023 | } |
1024 | |
1025 | // repeated double bucket_limit = 6 [packed = true]; |
1026 | if (this->bucket_limit_size() > 0) { |
1027 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( |
1028 | 6, |
1029 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
1030 | target); |
1031 | target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( |
1032 | _bucket_limit_cached_byte_size_.load(std::memory_order_relaxed), |
1033 | target); |
1034 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1035 | WriteDoubleNoTagToArray(this->bucket_limit_, target); |
1036 | } |
1037 | |
1038 | // repeated double bucket = 7 [packed = true]; |
1039 | if (this->bucket_size() > 0) { |
1040 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( |
1041 | 7, |
1042 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
1043 | target); |
1044 | target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( |
1045 | _bucket_cached_byte_size_.load(std::memory_order_relaxed), |
1046 | target); |
1047 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1048 | WriteDoubleNoTagToArray(this->bucket_, target); |
1049 | } |
1050 | |
1051 | if (_internal_metadata_.have_unknown_fields()) { |
1052 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1053 | _internal_metadata_.unknown_fields(), target); |
1054 | } |
1055 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.HistogramProto) |
1056 | return target; |
1057 | } |
1058 | |
1059 | size_t HistogramProto::ByteSizeLong() const { |
1060 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.HistogramProto) |
1061 | size_t total_size = 0; |
1062 | |
1063 | if (_internal_metadata_.have_unknown_fields()) { |
1064 | total_size += |
1065 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1066 | _internal_metadata_.unknown_fields()); |
1067 | } |
1068 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1069 | // Prevent compiler warnings about cached_has_bits being unused |
1070 | (void) cached_has_bits; |
1071 | |
1072 | // repeated double bucket_limit = 6 [packed = true]; |
1073 | { |
1074 | unsigned int count = static_cast<unsigned int>(this->bucket_limit_size()); |
1075 | size_t data_size = 8UL * count; |
1076 | if (data_size > 0) { |
1077 | total_size += 1 + |
1078 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
1079 | static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); |
1080 | } |
1081 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); |
1082 | _bucket_limit_cached_byte_size_.store(cached_size, |
1083 | std::memory_order_relaxed); |
1084 | total_size += data_size; |
1085 | } |
1086 | |
1087 | // repeated double bucket = 7 [packed = true]; |
1088 | { |
1089 | unsigned int count = static_cast<unsigned int>(this->bucket_size()); |
1090 | size_t data_size = 8UL * count; |
1091 | if (data_size > 0) { |
1092 | total_size += 1 + |
1093 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
1094 | static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); |
1095 | } |
1096 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); |
1097 | _bucket_cached_byte_size_.store(cached_size, |
1098 | std::memory_order_relaxed); |
1099 | total_size += data_size; |
1100 | } |
1101 | |
1102 | // double min = 1; |
1103 | if (!(this->min() <= 0 && this->min() >= 0)) { |
1104 | total_size += 1 + 8; |
1105 | } |
1106 | |
1107 | // double max = 2; |
1108 | if (!(this->max() <= 0 && this->max() >= 0)) { |
1109 | total_size += 1 + 8; |
1110 | } |
1111 | |
1112 | // double num = 3; |
1113 | if (!(this->num() <= 0 && this->num() >= 0)) { |
1114 | total_size += 1 + 8; |
1115 | } |
1116 | |
1117 | // double sum = 4; |
1118 | if (!(this->sum() <= 0 && this->sum() >= 0)) { |
1119 | total_size += 1 + 8; |
1120 | } |
1121 | |
1122 | // double sum_squares = 5; |
1123 | if (!(this->sum_squares() <= 0 && this->sum_squares() >= 0)) { |
1124 | total_size += 1 + 8; |
1125 | } |
1126 | |
1127 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1128 | SetCachedSize(cached_size); |
1129 | return total_size; |
1130 | } |
1131 | |
1132 | void HistogramProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1133 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.HistogramProto) |
1134 | GOOGLE_DCHECK_NE(&from, this); |
1135 | const HistogramProto* source = |
1136 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<HistogramProto>( |
1137 | &from); |
1138 | if (source == nullptr) { |
1139 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.HistogramProto) |
1140 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1141 | } else { |
1142 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.HistogramProto) |
1143 | MergeFrom(*source); |
1144 | } |
1145 | } |
1146 | |
1147 | void HistogramProto::MergeFrom(const HistogramProto& from) { |
1148 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.HistogramProto) |
1149 | GOOGLE_DCHECK_NE(&from, this); |
1150 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1151 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1152 | (void) cached_has_bits; |
1153 | |
1154 | bucket_limit_.MergeFrom(from.bucket_limit_); |
1155 | bucket_.MergeFrom(from.bucket_); |
1156 | if (!(from.min() <= 0 && from.min() >= 0)) { |
1157 | set_min(from.min()); |
1158 | } |
1159 | if (!(from.max() <= 0 && from.max() >= 0)) { |
1160 | set_max(from.max()); |
1161 | } |
1162 | if (!(from.num() <= 0 && from.num() >= 0)) { |
1163 | set_num(from.num()); |
1164 | } |
1165 | if (!(from.sum() <= 0 && from.sum() >= 0)) { |
1166 | set_sum(from.sum()); |
1167 | } |
1168 | if (!(from.sum_squares() <= 0 && from.sum_squares() >= 0)) { |
1169 | set_sum_squares(from.sum_squares()); |
1170 | } |
1171 | } |
1172 | |
1173 | void HistogramProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1174 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.HistogramProto) |
1175 | if (&from == this) return; |
1176 | Clear(); |
1177 | MergeFrom(from); |
1178 | } |
1179 | |
1180 | void HistogramProto::CopyFrom(const HistogramProto& from) { |
1181 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.HistogramProto) |
1182 | if (&from == this) return; |
1183 | Clear(); |
1184 | MergeFrom(from); |
1185 | } |
1186 | |
1187 | bool HistogramProto::IsInitialized() const { |
1188 | return true; |
1189 | } |
1190 | |
1191 | void HistogramProto::InternalSwap(HistogramProto* other) { |
1192 | using std::swap; |
1193 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1194 | bucket_limit_.InternalSwap(&other->bucket_limit_); |
1195 | bucket_.InternalSwap(&other->bucket_); |
1196 | swap(min_, other->min_); |
1197 | swap(max_, other->max_); |
1198 | swap(num_, other->num_); |
1199 | swap(sum_, other->sum_); |
1200 | swap(sum_squares_, other->sum_squares_); |
1201 | } |
1202 | |
1203 | ::PROTOBUF_NAMESPACE_ID::Metadata HistogramProto::GetMetadata() const { |
1204 | return GetMetadataStatic(); |
1205 | } |
1206 | |
1207 | |
1208 | // =================================================================== |
1209 | |
1210 | void SummaryMetadata_PluginData::InitAsDefaultInstance() { |
1211 | } |
1212 | class SummaryMetadata_PluginData::_Internal { |
1213 | public: |
1214 | }; |
1215 | |
1216 | SummaryMetadata_PluginData::SummaryMetadata_PluginData() |
1217 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1218 | SharedCtor(); |
1219 | // @@protoc_insertion_point(constructor:tensorflow.SummaryMetadata.PluginData) |
1220 | } |
1221 | SummaryMetadata_PluginData::SummaryMetadata_PluginData(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
1222 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1223 | _internal_metadata_(arena) { |
1224 | SharedCtor(); |
1225 | RegisterArenaDtor(arena); |
1226 | // @@protoc_insertion_point(arena_constructor:tensorflow.SummaryMetadata.PluginData) |
1227 | } |
1228 | SummaryMetadata_PluginData::SummaryMetadata_PluginData(const SummaryMetadata_PluginData& from) |
1229 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1230 | _internal_metadata_(nullptr) { |
1231 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1232 | plugin_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1233 | if (!from.plugin_name().empty()) { |
1234 | plugin_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.plugin_name(), |
1235 | GetArenaNoVirtual()); |
1236 | } |
1237 | content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1238 | if (!from.content().empty()) { |
1239 | content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content(), |
1240 | GetArenaNoVirtual()); |
1241 | } |
1242 | // @@protoc_insertion_point(copy_constructor:tensorflow.SummaryMetadata.PluginData) |
1243 | } |
1244 | |
1245 | void SummaryMetadata_PluginData::SharedCtor() { |
1246 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SummaryMetadata_PluginData_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
1247 | plugin_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1248 | content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1249 | } |
1250 | |
1251 | SummaryMetadata_PluginData::~SummaryMetadata_PluginData() { |
1252 | // @@protoc_insertion_point(destructor:tensorflow.SummaryMetadata.PluginData) |
1253 | SharedDtor(); |
1254 | } |
1255 | |
1256 | void SummaryMetadata_PluginData::SharedDtor() { |
1257 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
1258 | plugin_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1259 | content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1260 | } |
1261 | |
1262 | void SummaryMetadata_PluginData::ArenaDtor(void* object) { |
1263 | SummaryMetadata_PluginData* _this = reinterpret_cast< SummaryMetadata_PluginData* >(object); |
1264 | (void)_this; |
1265 | } |
1266 | void SummaryMetadata_PluginData::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
1267 | } |
1268 | void SummaryMetadata_PluginData::SetCachedSize(int size) const { |
1269 | _cached_size_.Set(size); |
1270 | } |
1271 | const SummaryMetadata_PluginData& SummaryMetadata_PluginData::default_instance() { |
1272 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SummaryMetadata_PluginData_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
1273 | return *internal_default_instance(); |
1274 | } |
1275 | |
1276 | |
1277 | void SummaryMetadata_PluginData::Clear() { |
1278 | // @@protoc_insertion_point(message_clear_start:tensorflow.SummaryMetadata.PluginData) |
1279 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1280 | // Prevent compiler warnings about cached_has_bits being unused |
1281 | (void) cached_has_bits; |
1282 | |
1283 | plugin_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
1284 | content_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
1285 | _internal_metadata_.Clear(); |
1286 | } |
1287 | |
1288 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1289 | const char* SummaryMetadata_PluginData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1290 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1291 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
1292 | while (!ctx->Done(&ptr)) { |
1293 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1294 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1295 | CHK_(ptr); |
1296 | switch (tag >> 3) { |
1297 | // string plugin_name = 1; |
1298 | case 1: |
1299 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
1300 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_plugin_name(), ptr, ctx, "tensorflow.SummaryMetadata.PluginData.plugin_name" ); |
1301 | CHK_(ptr); |
1302 | } else goto handle_unusual; |
1303 | continue; |
1304 | // bytes content = 2; |
1305 | case 2: |
1306 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
1307 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_content(), ptr, ctx); |
1308 | CHK_(ptr); |
1309 | } else goto handle_unusual; |
1310 | continue; |
1311 | default: { |
1312 | handle_unusual: |
1313 | if ((tag & 7) == 4 || tag == 0) { |
1314 | ctx->SetLastTag(tag); |
1315 | goto success; |
1316 | } |
1317 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1318 | CHK_(ptr != nullptr); |
1319 | continue; |
1320 | } |
1321 | } // switch |
1322 | } // while |
1323 | success: |
1324 | return ptr; |
1325 | failure: |
1326 | ptr = nullptr; |
1327 | goto success; |
1328 | #undef CHK_ |
1329 | } |
1330 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1331 | bool SummaryMetadata_PluginData::MergePartialFromCodedStream( |
1332 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1333 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1334 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1335 | // @@protoc_insertion_point(parse_start:tensorflow.SummaryMetadata.PluginData) |
1336 | for (;;) { |
1337 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1338 | tag = p.first; |
1339 | if (!p.second) goto handle_unusual; |
1340 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1341 | // string plugin_name = 1; |
1342 | case 1: { |
1343 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
1344 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1345 | input, this->mutable_plugin_name())); |
1346 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1347 | this->plugin_name().data(), static_cast<int>(this->plugin_name().length()), |
1348 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1349 | "tensorflow.SummaryMetadata.PluginData.plugin_name" )); |
1350 | } else { |
1351 | goto handle_unusual; |
1352 | } |
1353 | break; |
1354 | } |
1355 | |
1356 | // bytes content = 2; |
1357 | case 2: { |
1358 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
1359 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( |
1360 | input, this->mutable_content())); |
1361 | } else { |
1362 | goto handle_unusual; |
1363 | } |
1364 | break; |
1365 | } |
1366 | |
1367 | default: { |
1368 | handle_unusual: |
1369 | if (tag == 0) { |
1370 | goto success; |
1371 | } |
1372 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1373 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1374 | break; |
1375 | } |
1376 | } |
1377 | } |
1378 | success: |
1379 | // @@protoc_insertion_point(parse_success:tensorflow.SummaryMetadata.PluginData) |
1380 | return true; |
1381 | failure: |
1382 | // @@protoc_insertion_point(parse_failure:tensorflow.SummaryMetadata.PluginData) |
1383 | return false; |
1384 | #undef DO_ |
1385 | } |
1386 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1387 | |
1388 | void SummaryMetadata_PluginData::SerializeWithCachedSizes( |
1389 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1390 | // @@protoc_insertion_point(serialize_start:tensorflow.SummaryMetadata.PluginData) |
1391 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1392 | (void) cached_has_bits; |
1393 | |
1394 | // string plugin_name = 1; |
1395 | if (this->plugin_name().size() > 0) { |
1396 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1397 | this->plugin_name().data(), static_cast<int>(this->plugin_name().length()), |
1398 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1399 | "tensorflow.SummaryMetadata.PluginData.plugin_name" ); |
1400 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1401 | 1, this->plugin_name(), output); |
1402 | } |
1403 | |
1404 | // bytes content = 2; |
1405 | if (this->content().size() > 0) { |
1406 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( |
1407 | 2, this->content(), output); |
1408 | } |
1409 | |
1410 | if (_internal_metadata_.have_unknown_fields()) { |
1411 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1412 | _internal_metadata_.unknown_fields(), output); |
1413 | } |
1414 | // @@protoc_insertion_point(serialize_end:tensorflow.SummaryMetadata.PluginData) |
1415 | } |
1416 | |
1417 | ::PROTOBUF_NAMESPACE_ID::uint8* SummaryMetadata_PluginData::InternalSerializeWithCachedSizesToArray( |
1418 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1419 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SummaryMetadata.PluginData) |
1420 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1421 | (void) cached_has_bits; |
1422 | |
1423 | // string plugin_name = 1; |
1424 | if (this->plugin_name().size() > 0) { |
1425 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1426 | this->plugin_name().data(), static_cast<int>(this->plugin_name().length()), |
1427 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1428 | "tensorflow.SummaryMetadata.PluginData.plugin_name" ); |
1429 | target = |
1430 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1431 | 1, this->plugin_name(), target); |
1432 | } |
1433 | |
1434 | // bytes content = 2; |
1435 | if (this->content().size() > 0) { |
1436 | target = |
1437 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( |
1438 | 2, this->content(), target); |
1439 | } |
1440 | |
1441 | if (_internal_metadata_.have_unknown_fields()) { |
1442 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1443 | _internal_metadata_.unknown_fields(), target); |
1444 | } |
1445 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SummaryMetadata.PluginData) |
1446 | return target; |
1447 | } |
1448 | |
1449 | size_t SummaryMetadata_PluginData::ByteSizeLong() const { |
1450 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SummaryMetadata.PluginData) |
1451 | size_t total_size = 0; |
1452 | |
1453 | if (_internal_metadata_.have_unknown_fields()) { |
1454 | total_size += |
1455 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1456 | _internal_metadata_.unknown_fields()); |
1457 | } |
1458 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1459 | // Prevent compiler warnings about cached_has_bits being unused |
1460 | (void) cached_has_bits; |
1461 | |
1462 | // string plugin_name = 1; |
1463 | if (this->plugin_name().size() > 0) { |
1464 | total_size += 1 + |
1465 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1466 | this->plugin_name()); |
1467 | } |
1468 | |
1469 | // bytes content = 2; |
1470 | if (this->content().size() > 0) { |
1471 | total_size += 1 + |
1472 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
1473 | this->content()); |
1474 | } |
1475 | |
1476 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1477 | SetCachedSize(cached_size); |
1478 | return total_size; |
1479 | } |
1480 | |
1481 | void SummaryMetadata_PluginData::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1482 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SummaryMetadata.PluginData) |
1483 | GOOGLE_DCHECK_NE(&from, this); |
1484 | const SummaryMetadata_PluginData* source = |
1485 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SummaryMetadata_PluginData>( |
1486 | &from); |
1487 | if (source == nullptr) { |
1488 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SummaryMetadata.PluginData) |
1489 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1490 | } else { |
1491 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SummaryMetadata.PluginData) |
1492 | MergeFrom(*source); |
1493 | } |
1494 | } |
1495 | |
1496 | void SummaryMetadata_PluginData::MergeFrom(const SummaryMetadata_PluginData& from) { |
1497 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SummaryMetadata.PluginData) |
1498 | GOOGLE_DCHECK_NE(&from, this); |
1499 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1500 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1501 | (void) cached_has_bits; |
1502 | |
1503 | if (from.plugin_name().size() > 0) { |
1504 | set_plugin_name(from.plugin_name()); |
1505 | } |
1506 | if (from.content().size() > 0) { |
1507 | set_content(from.content()); |
1508 | } |
1509 | } |
1510 | |
1511 | void SummaryMetadata_PluginData::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1512 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SummaryMetadata.PluginData) |
1513 | if (&from == this) return; |
1514 | Clear(); |
1515 | MergeFrom(from); |
1516 | } |
1517 | |
1518 | void SummaryMetadata_PluginData::CopyFrom(const SummaryMetadata_PluginData& from) { |
1519 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SummaryMetadata.PluginData) |
1520 | if (&from == this) return; |
1521 | Clear(); |
1522 | MergeFrom(from); |
1523 | } |
1524 | |
1525 | bool SummaryMetadata_PluginData::IsInitialized() const { |
1526 | return true; |
1527 | } |
1528 | |
1529 | void SummaryMetadata_PluginData::InternalSwap(SummaryMetadata_PluginData* other) { |
1530 | using std::swap; |
1531 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1532 | plugin_name_.Swap(&other->plugin_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1533 | GetArenaNoVirtual()); |
1534 | content_.Swap(&other->content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1535 | GetArenaNoVirtual()); |
1536 | } |
1537 | |
1538 | ::PROTOBUF_NAMESPACE_ID::Metadata SummaryMetadata_PluginData::GetMetadata() const { |
1539 | return GetMetadataStatic(); |
1540 | } |
1541 | |
1542 | |
1543 | // =================================================================== |
1544 | |
1545 | void SummaryMetadata::InitAsDefaultInstance() { |
1546 | ::tensorflow::_SummaryMetadata_default_instance_._instance.get_mutable()->plugin_data_ = const_cast< ::tensorflow::SummaryMetadata_PluginData*>( |
1547 | ::tensorflow::SummaryMetadata_PluginData::internal_default_instance()); |
1548 | } |
1549 | class SummaryMetadata::_Internal { |
1550 | public: |
1551 | static const ::tensorflow::SummaryMetadata_PluginData& plugin_data(const SummaryMetadata* msg); |
1552 | }; |
1553 | |
1554 | const ::tensorflow::SummaryMetadata_PluginData& |
1555 | SummaryMetadata::_Internal::plugin_data(const SummaryMetadata* msg) { |
1556 | return *msg->plugin_data_; |
1557 | } |
1558 | void SummaryMetadata::unsafe_arena_set_allocated_plugin_data( |
1559 | ::tensorflow::SummaryMetadata_PluginData* plugin_data) { |
1560 | if (GetArenaNoVirtual() == nullptr) { |
1561 | delete plugin_data_; |
1562 | } |
1563 | plugin_data_ = plugin_data; |
1564 | if (plugin_data) { |
1565 | |
1566 | } else { |
1567 | |
1568 | } |
1569 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.SummaryMetadata.plugin_data) |
1570 | } |
1571 | SummaryMetadata::SummaryMetadata() |
1572 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1573 | SharedCtor(); |
1574 | // @@protoc_insertion_point(constructor:tensorflow.SummaryMetadata) |
1575 | } |
1576 | SummaryMetadata::SummaryMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
1577 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1578 | _internal_metadata_(arena) { |
1579 | SharedCtor(); |
1580 | RegisterArenaDtor(arena); |
1581 | // @@protoc_insertion_point(arena_constructor:tensorflow.SummaryMetadata) |
1582 | } |
1583 | SummaryMetadata::SummaryMetadata(const SummaryMetadata& from) |
1584 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1585 | _internal_metadata_(nullptr) { |
1586 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1587 | display_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1588 | if (!from.display_name().empty()) { |
1589 | display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.display_name(), |
1590 | GetArenaNoVirtual()); |
1591 | } |
1592 | summary_description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1593 | if (!from.summary_description().empty()) { |
1594 | summary_description_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.summary_description(), |
1595 | GetArenaNoVirtual()); |
1596 | } |
1597 | if (from.has_plugin_data()) { |
1598 | plugin_data_ = new ::tensorflow::SummaryMetadata_PluginData(*from.plugin_data_); |
1599 | } else { |
1600 | plugin_data_ = nullptr; |
1601 | } |
1602 | data_class_ = from.data_class_; |
1603 | // @@protoc_insertion_point(copy_constructor:tensorflow.SummaryMetadata) |
1604 | } |
1605 | |
1606 | void SummaryMetadata::SharedCtor() { |
1607 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SummaryMetadata_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
1608 | display_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1609 | summary_description_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1610 | ::memset(&plugin_data_, 0, static_cast<size_t>( |
1611 | reinterpret_cast<char*>(&data_class_) - |
1612 | reinterpret_cast<char*>(&plugin_data_)) + sizeof(data_class_)); |
1613 | } |
1614 | |
1615 | SummaryMetadata::~SummaryMetadata() { |
1616 | // @@protoc_insertion_point(destructor:tensorflow.SummaryMetadata) |
1617 | SharedDtor(); |
1618 | } |
1619 | |
1620 | void SummaryMetadata::SharedDtor() { |
1621 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
1622 | display_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1623 | summary_description_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
1624 | if (this != internal_default_instance()) delete plugin_data_; |
1625 | } |
1626 | |
1627 | void SummaryMetadata::ArenaDtor(void* object) { |
1628 | SummaryMetadata* _this = reinterpret_cast< SummaryMetadata* >(object); |
1629 | (void)_this; |
1630 | } |
1631 | void SummaryMetadata::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
1632 | } |
1633 | void SummaryMetadata::SetCachedSize(int size) const { |
1634 | _cached_size_.Set(size); |
1635 | } |
1636 | const SummaryMetadata& SummaryMetadata::default_instance() { |
1637 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SummaryMetadata_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
1638 | return *internal_default_instance(); |
1639 | } |
1640 | |
1641 | |
1642 | void SummaryMetadata::Clear() { |
1643 | // @@protoc_insertion_point(message_clear_start:tensorflow.SummaryMetadata) |
1644 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1645 | // Prevent compiler warnings about cached_has_bits being unused |
1646 | (void) cached_has_bits; |
1647 | |
1648 | display_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
1649 | summary_description_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
1650 | if (GetArenaNoVirtual() == nullptr && plugin_data_ != nullptr) { |
1651 | delete plugin_data_; |
1652 | } |
1653 | plugin_data_ = nullptr; |
1654 | data_class_ = 0; |
1655 | _internal_metadata_.Clear(); |
1656 | } |
1657 | |
1658 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1659 | const char* SummaryMetadata::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1660 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1661 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
1662 | while (!ctx->Done(&ptr)) { |
1663 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1664 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1665 | CHK_(ptr); |
1666 | switch (tag >> 3) { |
1667 | // .tensorflow.SummaryMetadata.PluginData plugin_data = 1; |
1668 | case 1: |
1669 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
1670 | ptr = ctx->ParseMessage(mutable_plugin_data(), ptr); |
1671 | CHK_(ptr); |
1672 | } else goto handle_unusual; |
1673 | continue; |
1674 | // string display_name = 2; |
1675 | case 2: |
1676 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
1677 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_display_name(), ptr, ctx, "tensorflow.SummaryMetadata.display_name" ); |
1678 | CHK_(ptr); |
1679 | } else goto handle_unusual; |
1680 | continue; |
1681 | // string summary_description = 3; |
1682 | case 3: |
1683 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
1684 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_summary_description(), ptr, ctx, "tensorflow.SummaryMetadata.summary_description" ); |
1685 | CHK_(ptr); |
1686 | } else goto handle_unusual; |
1687 | continue; |
1688 | // .tensorflow.DataClass data_class = 4; |
1689 | case 4: |
1690 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { |
1691 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
1692 | CHK_(ptr); |
1693 | set_data_class(static_cast<::tensorflow::DataClass>(val)); |
1694 | } else goto handle_unusual; |
1695 | continue; |
1696 | default: { |
1697 | handle_unusual: |
1698 | if ((tag & 7) == 4 || tag == 0) { |
1699 | ctx->SetLastTag(tag); |
1700 | goto success; |
1701 | } |
1702 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1703 | CHK_(ptr != nullptr); |
1704 | continue; |
1705 | } |
1706 | } // switch |
1707 | } // while |
1708 | success: |
1709 | return ptr; |
1710 | failure: |
1711 | ptr = nullptr; |
1712 | goto success; |
1713 | #undef CHK_ |
1714 | } |
1715 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1716 | bool SummaryMetadata::MergePartialFromCodedStream( |
1717 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1718 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1719 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1720 | // @@protoc_insertion_point(parse_start:tensorflow.SummaryMetadata) |
1721 | for (;;) { |
1722 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1723 | tag = p.first; |
1724 | if (!p.second) goto handle_unusual; |
1725 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1726 | // .tensorflow.SummaryMetadata.PluginData plugin_data = 1; |
1727 | case 1: { |
1728 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
1729 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1730 | input, mutable_plugin_data())); |
1731 | } else { |
1732 | goto handle_unusual; |
1733 | } |
1734 | break; |
1735 | } |
1736 | |
1737 | // string display_name = 2; |
1738 | case 2: { |
1739 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
1740 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1741 | input, this->mutable_display_name())); |
1742 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1743 | this->display_name().data(), static_cast<int>(this->display_name().length()), |
1744 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1745 | "tensorflow.SummaryMetadata.display_name" )); |
1746 | } else { |
1747 | goto handle_unusual; |
1748 | } |
1749 | break; |
1750 | } |
1751 | |
1752 | // string summary_description = 3; |
1753 | case 3: { |
1754 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
1755 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
1756 | input, this->mutable_summary_description())); |
1757 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1758 | this->summary_description().data(), static_cast<int>(this->summary_description().length()), |
1759 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
1760 | "tensorflow.SummaryMetadata.summary_description" )); |
1761 | } else { |
1762 | goto handle_unusual; |
1763 | } |
1764 | break; |
1765 | } |
1766 | |
1767 | // .tensorflow.DataClass data_class = 4; |
1768 | case 4: { |
1769 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { |
1770 | int value = 0; |
1771 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
1772 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
1773 | input, &value))); |
1774 | set_data_class(static_cast< ::tensorflow::DataClass >(value)); |
1775 | } else { |
1776 | goto handle_unusual; |
1777 | } |
1778 | break; |
1779 | } |
1780 | |
1781 | default: { |
1782 | handle_unusual: |
1783 | if (tag == 0) { |
1784 | goto success; |
1785 | } |
1786 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1787 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1788 | break; |
1789 | } |
1790 | } |
1791 | } |
1792 | success: |
1793 | // @@protoc_insertion_point(parse_success:tensorflow.SummaryMetadata) |
1794 | return true; |
1795 | failure: |
1796 | // @@protoc_insertion_point(parse_failure:tensorflow.SummaryMetadata) |
1797 | return false; |
1798 | #undef DO_ |
1799 | } |
1800 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1801 | |
1802 | void SummaryMetadata::SerializeWithCachedSizes( |
1803 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1804 | // @@protoc_insertion_point(serialize_start:tensorflow.SummaryMetadata) |
1805 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1806 | (void) cached_has_bits; |
1807 | |
1808 | // .tensorflow.SummaryMetadata.PluginData plugin_data = 1; |
1809 | if (this->has_plugin_data()) { |
1810 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1811 | 1, _Internal::plugin_data(this), output); |
1812 | } |
1813 | |
1814 | // string display_name = 2; |
1815 | if (this->display_name().size() > 0) { |
1816 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1817 | this->display_name().data(), static_cast<int>(this->display_name().length()), |
1818 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1819 | "tensorflow.SummaryMetadata.display_name" ); |
1820 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1821 | 2, this->display_name(), output); |
1822 | } |
1823 | |
1824 | // string summary_description = 3; |
1825 | if (this->summary_description().size() > 0) { |
1826 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1827 | this->summary_description().data(), static_cast<int>(this->summary_description().length()), |
1828 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1829 | "tensorflow.SummaryMetadata.summary_description" ); |
1830 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
1831 | 3, this->summary_description(), output); |
1832 | } |
1833 | |
1834 | // .tensorflow.DataClass data_class = 4; |
1835 | if (this->data_class() != 0) { |
1836 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
1837 | 4, this->data_class(), output); |
1838 | } |
1839 | |
1840 | if (_internal_metadata_.have_unknown_fields()) { |
1841 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1842 | _internal_metadata_.unknown_fields(), output); |
1843 | } |
1844 | // @@protoc_insertion_point(serialize_end:tensorflow.SummaryMetadata) |
1845 | } |
1846 | |
1847 | ::PROTOBUF_NAMESPACE_ID::uint8* SummaryMetadata::InternalSerializeWithCachedSizesToArray( |
1848 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1849 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.SummaryMetadata) |
1850 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1851 | (void) cached_has_bits; |
1852 | |
1853 | // .tensorflow.SummaryMetadata.PluginData plugin_data = 1; |
1854 | if (this->has_plugin_data()) { |
1855 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1856 | InternalWriteMessageToArray( |
1857 | 1, _Internal::plugin_data(this), target); |
1858 | } |
1859 | |
1860 | // string display_name = 2; |
1861 | if (this->display_name().size() > 0) { |
1862 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1863 | this->display_name().data(), static_cast<int>(this->display_name().length()), |
1864 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1865 | "tensorflow.SummaryMetadata.display_name" ); |
1866 | target = |
1867 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1868 | 2, this->display_name(), target); |
1869 | } |
1870 | |
1871 | // string summary_description = 3; |
1872 | if (this->summary_description().size() > 0) { |
1873 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
1874 | this->summary_description().data(), static_cast<int>(this->summary_description().length()), |
1875 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
1876 | "tensorflow.SummaryMetadata.summary_description" ); |
1877 | target = |
1878 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
1879 | 3, this->summary_description(), target); |
1880 | } |
1881 | |
1882 | // .tensorflow.DataClass data_class = 4; |
1883 | if (this->data_class() != 0) { |
1884 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
1885 | 4, this->data_class(), target); |
1886 | } |
1887 | |
1888 | if (_internal_metadata_.have_unknown_fields()) { |
1889 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1890 | _internal_metadata_.unknown_fields(), target); |
1891 | } |
1892 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.SummaryMetadata) |
1893 | return target; |
1894 | } |
1895 | |
1896 | size_t SummaryMetadata::ByteSizeLong() const { |
1897 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.SummaryMetadata) |
1898 | size_t total_size = 0; |
1899 | |
1900 | if (_internal_metadata_.have_unknown_fields()) { |
1901 | total_size += |
1902 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1903 | _internal_metadata_.unknown_fields()); |
1904 | } |
1905 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1906 | // Prevent compiler warnings about cached_has_bits being unused |
1907 | (void) cached_has_bits; |
1908 | |
1909 | // string display_name = 2; |
1910 | if (this->display_name().size() > 0) { |
1911 | total_size += 1 + |
1912 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1913 | this->display_name()); |
1914 | } |
1915 | |
1916 | // string summary_description = 3; |
1917 | if (this->summary_description().size() > 0) { |
1918 | total_size += 1 + |
1919 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
1920 | this->summary_description()); |
1921 | } |
1922 | |
1923 | // .tensorflow.SummaryMetadata.PluginData plugin_data = 1; |
1924 | if (this->has_plugin_data()) { |
1925 | total_size += 1 + |
1926 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1927 | *plugin_data_); |
1928 | } |
1929 | |
1930 | // .tensorflow.DataClass data_class = 4; |
1931 | if (this->data_class() != 0) { |
1932 | total_size += 1 + |
1933 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->data_class()); |
1934 | } |
1935 | |
1936 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1937 | SetCachedSize(cached_size); |
1938 | return total_size; |
1939 | } |
1940 | |
1941 | void SummaryMetadata::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1942 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.SummaryMetadata) |
1943 | GOOGLE_DCHECK_NE(&from, this); |
1944 | const SummaryMetadata* source = |
1945 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SummaryMetadata>( |
1946 | &from); |
1947 | if (source == nullptr) { |
1948 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.SummaryMetadata) |
1949 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1950 | } else { |
1951 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.SummaryMetadata) |
1952 | MergeFrom(*source); |
1953 | } |
1954 | } |
1955 | |
1956 | void SummaryMetadata::MergeFrom(const SummaryMetadata& from) { |
1957 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.SummaryMetadata) |
1958 | GOOGLE_DCHECK_NE(&from, this); |
1959 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1960 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1961 | (void) cached_has_bits; |
1962 | |
1963 | if (from.display_name().size() > 0) { |
1964 | set_display_name(from.display_name()); |
1965 | } |
1966 | if (from.summary_description().size() > 0) { |
1967 | set_summary_description(from.summary_description()); |
1968 | } |
1969 | if (from.has_plugin_data()) { |
1970 | mutable_plugin_data()->::tensorflow::SummaryMetadata_PluginData::MergeFrom(from.plugin_data()); |
1971 | } |
1972 | if (from.data_class() != 0) { |
1973 | set_data_class(from.data_class()); |
1974 | } |
1975 | } |
1976 | |
1977 | void SummaryMetadata::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1978 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.SummaryMetadata) |
1979 | if (&from == this) return; |
1980 | Clear(); |
1981 | MergeFrom(from); |
1982 | } |
1983 | |
1984 | void SummaryMetadata::CopyFrom(const SummaryMetadata& from) { |
1985 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.SummaryMetadata) |
1986 | if (&from == this) return; |
1987 | Clear(); |
1988 | MergeFrom(from); |
1989 | } |
1990 | |
1991 | bool SummaryMetadata::IsInitialized() const { |
1992 | return true; |
1993 | } |
1994 | |
1995 | void SummaryMetadata::InternalSwap(SummaryMetadata* other) { |
1996 | using std::swap; |
1997 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1998 | display_name_.Swap(&other->display_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
1999 | GetArenaNoVirtual()); |
2000 | summary_description_.Swap(&other->summary_description_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
2001 | GetArenaNoVirtual()); |
2002 | swap(plugin_data_, other->plugin_data_); |
2003 | swap(data_class_, other->data_class_); |
2004 | } |
2005 | |
2006 | ::PROTOBUF_NAMESPACE_ID::Metadata SummaryMetadata::GetMetadata() const { |
2007 | return GetMetadataStatic(); |
2008 | } |
2009 | |
2010 | |
2011 | // =================================================================== |
2012 | |
2013 | void Summary_Image::InitAsDefaultInstance() { |
2014 | } |
2015 | class Summary_Image::_Internal { |
2016 | public: |
2017 | }; |
2018 | |
2019 | Summary_Image::Summary_Image() |
2020 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2021 | SharedCtor(); |
2022 | // @@protoc_insertion_point(constructor:tensorflow.Summary.Image) |
2023 | } |
2024 | Summary_Image::Summary_Image(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
2025 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2026 | _internal_metadata_(arena) { |
2027 | SharedCtor(); |
2028 | RegisterArenaDtor(arena); |
2029 | // @@protoc_insertion_point(arena_constructor:tensorflow.Summary.Image) |
2030 | } |
2031 | Summary_Image::Summary_Image(const Summary_Image& from) |
2032 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2033 | _internal_metadata_(nullptr) { |
2034 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2035 | encoded_image_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2036 | if (!from.encoded_image_string().empty()) { |
2037 | encoded_image_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.encoded_image_string(), |
2038 | GetArenaNoVirtual()); |
2039 | } |
2040 | ::memcpy(&height_, &from.height_, |
2041 | static_cast<size_t>(reinterpret_cast<char*>(&colorspace_) - |
2042 | reinterpret_cast<char*>(&height_)) + sizeof(colorspace_)); |
2043 | // @@protoc_insertion_point(copy_constructor:tensorflow.Summary.Image) |
2044 | } |
2045 | |
2046 | void Summary_Image::SharedCtor() { |
2047 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Summary_Image_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
2048 | encoded_image_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2049 | ::memset(&height_, 0, static_cast<size_t>( |
2050 | reinterpret_cast<char*>(&colorspace_) - |
2051 | reinterpret_cast<char*>(&height_)) + sizeof(colorspace_)); |
2052 | } |
2053 | |
2054 | Summary_Image::~Summary_Image() { |
2055 | // @@protoc_insertion_point(destructor:tensorflow.Summary.Image) |
2056 | SharedDtor(); |
2057 | } |
2058 | |
2059 | void Summary_Image::SharedDtor() { |
2060 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
2061 | encoded_image_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2062 | } |
2063 | |
2064 | void Summary_Image::ArenaDtor(void* object) { |
2065 | Summary_Image* _this = reinterpret_cast< Summary_Image* >(object); |
2066 | (void)_this; |
2067 | } |
2068 | void Summary_Image::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
2069 | } |
2070 | void Summary_Image::SetCachedSize(int size) const { |
2071 | _cached_size_.Set(size); |
2072 | } |
2073 | const Summary_Image& Summary_Image::default_instance() { |
2074 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Summary_Image_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
2075 | return *internal_default_instance(); |
2076 | } |
2077 | |
2078 | |
2079 | void Summary_Image::Clear() { |
2080 | // @@protoc_insertion_point(message_clear_start:tensorflow.Summary.Image) |
2081 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2082 | // Prevent compiler warnings about cached_has_bits being unused |
2083 | (void) cached_has_bits; |
2084 | |
2085 | encoded_image_string_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
2086 | ::memset(&height_, 0, static_cast<size_t>( |
2087 | reinterpret_cast<char*>(&colorspace_) - |
2088 | reinterpret_cast<char*>(&height_)) + sizeof(colorspace_)); |
2089 | _internal_metadata_.Clear(); |
2090 | } |
2091 | |
2092 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2093 | const char* Summary_Image::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2094 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2095 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
2096 | while (!ctx->Done(&ptr)) { |
2097 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2098 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2099 | CHK_(ptr); |
2100 | switch (tag >> 3) { |
2101 | // int32 height = 1; |
2102 | case 1: |
2103 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
2104 | height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2105 | CHK_(ptr); |
2106 | } else goto handle_unusual; |
2107 | continue; |
2108 | // int32 width = 2; |
2109 | case 2: |
2110 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
2111 | width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2112 | CHK_(ptr); |
2113 | } else goto handle_unusual; |
2114 | continue; |
2115 | // int32 colorspace = 3; |
2116 | case 3: |
2117 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
2118 | colorspace_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2119 | CHK_(ptr); |
2120 | } else goto handle_unusual; |
2121 | continue; |
2122 | // bytes encoded_image_string = 4; |
2123 | case 4: |
2124 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
2125 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_encoded_image_string(), ptr, ctx); |
2126 | CHK_(ptr); |
2127 | } else goto handle_unusual; |
2128 | continue; |
2129 | default: { |
2130 | handle_unusual: |
2131 | if ((tag & 7) == 4 || tag == 0) { |
2132 | ctx->SetLastTag(tag); |
2133 | goto success; |
2134 | } |
2135 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2136 | CHK_(ptr != nullptr); |
2137 | continue; |
2138 | } |
2139 | } // switch |
2140 | } // while |
2141 | success: |
2142 | return ptr; |
2143 | failure: |
2144 | ptr = nullptr; |
2145 | goto success; |
2146 | #undef CHK_ |
2147 | } |
2148 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2149 | bool Summary_Image::MergePartialFromCodedStream( |
2150 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2151 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2152 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2153 | // @@protoc_insertion_point(parse_start:tensorflow.Summary.Image) |
2154 | for (;;) { |
2155 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2156 | tag = p.first; |
2157 | if (!p.second) goto handle_unusual; |
2158 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2159 | // int32 height = 1; |
2160 | case 1: { |
2161 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
2162 | |
2163 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2164 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
2165 | input, &height_))); |
2166 | } else { |
2167 | goto handle_unusual; |
2168 | } |
2169 | break; |
2170 | } |
2171 | |
2172 | // int32 width = 2; |
2173 | case 2: { |
2174 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
2175 | |
2176 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2177 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
2178 | input, &width_))); |
2179 | } else { |
2180 | goto handle_unusual; |
2181 | } |
2182 | break; |
2183 | } |
2184 | |
2185 | // int32 colorspace = 3; |
2186 | case 3: { |
2187 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
2188 | |
2189 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2190 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
2191 | input, &colorspace_))); |
2192 | } else { |
2193 | goto handle_unusual; |
2194 | } |
2195 | break; |
2196 | } |
2197 | |
2198 | // bytes encoded_image_string = 4; |
2199 | case 4: { |
2200 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
2201 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( |
2202 | input, this->mutable_encoded_image_string())); |
2203 | } else { |
2204 | goto handle_unusual; |
2205 | } |
2206 | break; |
2207 | } |
2208 | |
2209 | default: { |
2210 | handle_unusual: |
2211 | if (tag == 0) { |
2212 | goto success; |
2213 | } |
2214 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2215 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2216 | break; |
2217 | } |
2218 | } |
2219 | } |
2220 | success: |
2221 | // @@protoc_insertion_point(parse_success:tensorflow.Summary.Image) |
2222 | return true; |
2223 | failure: |
2224 | // @@protoc_insertion_point(parse_failure:tensorflow.Summary.Image) |
2225 | return false; |
2226 | #undef DO_ |
2227 | } |
2228 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2229 | |
2230 | void Summary_Image::SerializeWithCachedSizes( |
2231 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2232 | // @@protoc_insertion_point(serialize_start:tensorflow.Summary.Image) |
2233 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2234 | (void) cached_has_bits; |
2235 | |
2236 | // int32 height = 1; |
2237 | if (this->height() != 0) { |
2238 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->height(), output); |
2239 | } |
2240 | |
2241 | // int32 width = 2; |
2242 | if (this->width() != 0) { |
2243 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(2, this->width(), output); |
2244 | } |
2245 | |
2246 | // int32 colorspace = 3; |
2247 | if (this->colorspace() != 0) { |
2248 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->colorspace(), output); |
2249 | } |
2250 | |
2251 | // bytes encoded_image_string = 4; |
2252 | if (this->encoded_image_string().size() > 0) { |
2253 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( |
2254 | 4, this->encoded_image_string(), output); |
2255 | } |
2256 | |
2257 | if (_internal_metadata_.have_unknown_fields()) { |
2258 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2259 | _internal_metadata_.unknown_fields(), output); |
2260 | } |
2261 | // @@protoc_insertion_point(serialize_end:tensorflow.Summary.Image) |
2262 | } |
2263 | |
2264 | ::PROTOBUF_NAMESPACE_ID::uint8* Summary_Image::InternalSerializeWithCachedSizesToArray( |
2265 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2266 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.Summary.Image) |
2267 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2268 | (void) cached_has_bits; |
2269 | |
2270 | // int32 height = 1; |
2271 | if (this->height() != 0) { |
2272 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->height(), target); |
2273 | } |
2274 | |
2275 | // int32 width = 2; |
2276 | if (this->width() != 0) { |
2277 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->width(), target); |
2278 | } |
2279 | |
2280 | // int32 colorspace = 3; |
2281 | if (this->colorspace() != 0) { |
2282 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->colorspace(), target); |
2283 | } |
2284 | |
2285 | // bytes encoded_image_string = 4; |
2286 | if (this->encoded_image_string().size() > 0) { |
2287 | target = |
2288 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( |
2289 | 4, this->encoded_image_string(), target); |
2290 | } |
2291 | |
2292 | if (_internal_metadata_.have_unknown_fields()) { |
2293 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2294 | _internal_metadata_.unknown_fields(), target); |
2295 | } |
2296 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.Summary.Image) |
2297 | return target; |
2298 | } |
2299 | |
2300 | size_t Summary_Image::ByteSizeLong() const { |
2301 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.Summary.Image) |
2302 | size_t total_size = 0; |
2303 | |
2304 | if (_internal_metadata_.have_unknown_fields()) { |
2305 | total_size += |
2306 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2307 | _internal_metadata_.unknown_fields()); |
2308 | } |
2309 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2310 | // Prevent compiler warnings about cached_has_bits being unused |
2311 | (void) cached_has_bits; |
2312 | |
2313 | // bytes encoded_image_string = 4; |
2314 | if (this->encoded_image_string().size() > 0) { |
2315 | total_size += 1 + |
2316 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
2317 | this->encoded_image_string()); |
2318 | } |
2319 | |
2320 | // int32 height = 1; |
2321 | if (this->height() != 0) { |
2322 | total_size += 1 + |
2323 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
2324 | this->height()); |
2325 | } |
2326 | |
2327 | // int32 width = 2; |
2328 | if (this->width() != 0) { |
2329 | total_size += 1 + |
2330 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
2331 | this->width()); |
2332 | } |
2333 | |
2334 | // int32 colorspace = 3; |
2335 | if (this->colorspace() != 0) { |
2336 | total_size += 1 + |
2337 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
2338 | this->colorspace()); |
2339 | } |
2340 | |
2341 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2342 | SetCachedSize(cached_size); |
2343 | return total_size; |
2344 | } |
2345 | |
2346 | void Summary_Image::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2347 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.Summary.Image) |
2348 | GOOGLE_DCHECK_NE(&from, this); |
2349 | const Summary_Image* source = |
2350 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Summary_Image>( |
2351 | &from); |
2352 | if (source == nullptr) { |
2353 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.Summary.Image) |
2354 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2355 | } else { |
2356 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.Summary.Image) |
2357 | MergeFrom(*source); |
2358 | } |
2359 | } |
2360 | |
2361 | void Summary_Image::MergeFrom(const Summary_Image& from) { |
2362 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.Summary.Image) |
2363 | GOOGLE_DCHECK_NE(&from, this); |
2364 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2365 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2366 | (void) cached_has_bits; |
2367 | |
2368 | if (from.encoded_image_string().size() > 0) { |
2369 | set_encoded_image_string(from.encoded_image_string()); |
2370 | } |
2371 | if (from.height() != 0) { |
2372 | set_height(from.height()); |
2373 | } |
2374 | if (from.width() != 0) { |
2375 | set_width(from.width()); |
2376 | } |
2377 | if (from.colorspace() != 0) { |
2378 | set_colorspace(from.colorspace()); |
2379 | } |
2380 | } |
2381 | |
2382 | void Summary_Image::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2383 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.Summary.Image) |
2384 | if (&from == this) return; |
2385 | Clear(); |
2386 | MergeFrom(from); |
2387 | } |
2388 | |
2389 | void Summary_Image::CopyFrom(const Summary_Image& from) { |
2390 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.Summary.Image) |
2391 | if (&from == this) return; |
2392 | Clear(); |
2393 | MergeFrom(from); |
2394 | } |
2395 | |
2396 | bool Summary_Image::IsInitialized() const { |
2397 | return true; |
2398 | } |
2399 | |
2400 | void Summary_Image::InternalSwap(Summary_Image* other) { |
2401 | using std::swap; |
2402 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2403 | encoded_image_string_.Swap(&other->encoded_image_string_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
2404 | GetArenaNoVirtual()); |
2405 | swap(height_, other->height_); |
2406 | swap(width_, other->width_); |
2407 | swap(colorspace_, other->colorspace_); |
2408 | } |
2409 | |
2410 | ::PROTOBUF_NAMESPACE_ID::Metadata Summary_Image::GetMetadata() const { |
2411 | return GetMetadataStatic(); |
2412 | } |
2413 | |
2414 | |
2415 | // =================================================================== |
2416 | |
2417 | void Summary_Audio::InitAsDefaultInstance() { |
2418 | } |
2419 | class Summary_Audio::_Internal { |
2420 | public: |
2421 | }; |
2422 | |
2423 | Summary_Audio::Summary_Audio() |
2424 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
2425 | SharedCtor(); |
2426 | // @@protoc_insertion_point(constructor:tensorflow.Summary.Audio) |
2427 | } |
2428 | Summary_Audio::Summary_Audio(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
2429 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2430 | _internal_metadata_(arena) { |
2431 | SharedCtor(); |
2432 | RegisterArenaDtor(arena); |
2433 | // @@protoc_insertion_point(arena_constructor:tensorflow.Summary.Audio) |
2434 | } |
2435 | Summary_Audio::Summary_Audio(const Summary_Audio& from) |
2436 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
2437 | _internal_metadata_(nullptr) { |
2438 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2439 | encoded_audio_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2440 | if (!from.encoded_audio_string().empty()) { |
2441 | encoded_audio_string_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.encoded_audio_string(), |
2442 | GetArenaNoVirtual()); |
2443 | } |
2444 | content_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2445 | if (!from.content_type().empty()) { |
2446 | content_type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.content_type(), |
2447 | GetArenaNoVirtual()); |
2448 | } |
2449 | ::memcpy(&num_channels_, &from.num_channels_, |
2450 | static_cast<size_t>(reinterpret_cast<char*>(&sample_rate_) - |
2451 | reinterpret_cast<char*>(&num_channels_)) + sizeof(sample_rate_)); |
2452 | // @@protoc_insertion_point(copy_constructor:tensorflow.Summary.Audio) |
2453 | } |
2454 | |
2455 | void Summary_Audio::SharedCtor() { |
2456 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Summary_Audio_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
2457 | encoded_audio_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2458 | content_type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2459 | ::memset(&num_channels_, 0, static_cast<size_t>( |
2460 | reinterpret_cast<char*>(&sample_rate_) - |
2461 | reinterpret_cast<char*>(&num_channels_)) + sizeof(sample_rate_)); |
2462 | } |
2463 | |
2464 | Summary_Audio::~Summary_Audio() { |
2465 | // @@protoc_insertion_point(destructor:tensorflow.Summary.Audio) |
2466 | SharedDtor(); |
2467 | } |
2468 | |
2469 | void Summary_Audio::SharedDtor() { |
2470 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
2471 | encoded_audio_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2472 | content_type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2473 | } |
2474 | |
2475 | void Summary_Audio::ArenaDtor(void* object) { |
2476 | Summary_Audio* _this = reinterpret_cast< Summary_Audio* >(object); |
2477 | (void)_this; |
2478 | } |
2479 | void Summary_Audio::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
2480 | } |
2481 | void Summary_Audio::SetCachedSize(int size) const { |
2482 | _cached_size_.Set(size); |
2483 | } |
2484 | const Summary_Audio& Summary_Audio::default_instance() { |
2485 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Summary_Audio_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
2486 | return *internal_default_instance(); |
2487 | } |
2488 | |
2489 | |
2490 | void Summary_Audio::Clear() { |
2491 | // @@protoc_insertion_point(message_clear_start:tensorflow.Summary.Audio) |
2492 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2493 | // Prevent compiler warnings about cached_has_bits being unused |
2494 | (void) cached_has_bits; |
2495 | |
2496 | encoded_audio_string_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
2497 | content_type_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
2498 | ::memset(&num_channels_, 0, static_cast<size_t>( |
2499 | reinterpret_cast<char*>(&sample_rate_) - |
2500 | reinterpret_cast<char*>(&num_channels_)) + sizeof(sample_rate_)); |
2501 | _internal_metadata_.Clear(); |
2502 | } |
2503 | |
2504 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2505 | const char* Summary_Audio::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
2506 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
2507 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
2508 | while (!ctx->Done(&ptr)) { |
2509 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2510 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
2511 | CHK_(ptr); |
2512 | switch (tag >> 3) { |
2513 | // float sample_rate = 1; |
2514 | case 1: |
2515 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 13)) { |
2516 | sample_rate_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr); |
2517 | ptr += sizeof(float); |
2518 | } else goto handle_unusual; |
2519 | continue; |
2520 | // int64 num_channels = 2; |
2521 | case 2: |
2522 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
2523 | num_channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2524 | CHK_(ptr); |
2525 | } else goto handle_unusual; |
2526 | continue; |
2527 | // int64 length_frames = 3; |
2528 | case 3: |
2529 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { |
2530 | length_frames_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
2531 | CHK_(ptr); |
2532 | } else goto handle_unusual; |
2533 | continue; |
2534 | // bytes encoded_audio_string = 4; |
2535 | case 4: |
2536 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
2537 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_encoded_audio_string(), ptr, ctx); |
2538 | CHK_(ptr); |
2539 | } else goto handle_unusual; |
2540 | continue; |
2541 | // string content_type = 5; |
2542 | case 5: |
2543 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
2544 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_content_type(), ptr, ctx, "tensorflow.Summary.Audio.content_type" ); |
2545 | CHK_(ptr); |
2546 | } else goto handle_unusual; |
2547 | continue; |
2548 | default: { |
2549 | handle_unusual: |
2550 | if ((tag & 7) == 4 || tag == 0) { |
2551 | ctx->SetLastTag(tag); |
2552 | goto success; |
2553 | } |
2554 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
2555 | CHK_(ptr != nullptr); |
2556 | continue; |
2557 | } |
2558 | } // switch |
2559 | } // while |
2560 | success: |
2561 | return ptr; |
2562 | failure: |
2563 | ptr = nullptr; |
2564 | goto success; |
2565 | #undef CHK_ |
2566 | } |
2567 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2568 | bool Summary_Audio::MergePartialFromCodedStream( |
2569 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
2570 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
2571 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
2572 | // @@protoc_insertion_point(parse_start:tensorflow.Summary.Audio) |
2573 | for (;;) { |
2574 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
2575 | tag = p.first; |
2576 | if (!p.second) goto handle_unusual; |
2577 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
2578 | // float sample_rate = 1; |
2579 | case 1: { |
2580 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (13 & 0xFF)) { |
2581 | |
2582 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2583 | float, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_FLOAT>( |
2584 | input, &sample_rate_))); |
2585 | } else { |
2586 | goto handle_unusual; |
2587 | } |
2588 | break; |
2589 | } |
2590 | |
2591 | // int64 num_channels = 2; |
2592 | case 2: { |
2593 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
2594 | |
2595 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2596 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
2597 | input, &num_channels_))); |
2598 | } else { |
2599 | goto handle_unusual; |
2600 | } |
2601 | break; |
2602 | } |
2603 | |
2604 | // int64 length_frames = 3; |
2605 | case 3: { |
2606 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { |
2607 | |
2608 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
2609 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
2610 | input, &length_frames_))); |
2611 | } else { |
2612 | goto handle_unusual; |
2613 | } |
2614 | break; |
2615 | } |
2616 | |
2617 | // bytes encoded_audio_string = 4; |
2618 | case 4: { |
2619 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
2620 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( |
2621 | input, this->mutable_encoded_audio_string())); |
2622 | } else { |
2623 | goto handle_unusual; |
2624 | } |
2625 | break; |
2626 | } |
2627 | |
2628 | // string content_type = 5; |
2629 | case 5: { |
2630 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
2631 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
2632 | input, this->mutable_content_type())); |
2633 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2634 | this->content_type().data(), static_cast<int>(this->content_type().length()), |
2635 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
2636 | "tensorflow.Summary.Audio.content_type" )); |
2637 | } else { |
2638 | goto handle_unusual; |
2639 | } |
2640 | break; |
2641 | } |
2642 | |
2643 | default: { |
2644 | handle_unusual: |
2645 | if (tag == 0) { |
2646 | goto success; |
2647 | } |
2648 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
2649 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
2650 | break; |
2651 | } |
2652 | } |
2653 | } |
2654 | success: |
2655 | // @@protoc_insertion_point(parse_success:tensorflow.Summary.Audio) |
2656 | return true; |
2657 | failure: |
2658 | // @@protoc_insertion_point(parse_failure:tensorflow.Summary.Audio) |
2659 | return false; |
2660 | #undef DO_ |
2661 | } |
2662 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
2663 | |
2664 | void Summary_Audio::SerializeWithCachedSizes( |
2665 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
2666 | // @@protoc_insertion_point(serialize_start:tensorflow.Summary.Audio) |
2667 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2668 | (void) cached_has_bits; |
2669 | |
2670 | // float sample_rate = 1; |
2671 | if (!(this->sample_rate() <= 0 && this->sample_rate() >= 0)) { |
2672 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloat(1, this->sample_rate(), output); |
2673 | } |
2674 | |
2675 | // int64 num_channels = 2; |
2676 | if (this->num_channels() != 0) { |
2677 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->num_channels(), output); |
2678 | } |
2679 | |
2680 | // int64 length_frames = 3; |
2681 | if (this->length_frames() != 0) { |
2682 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(3, this->length_frames(), output); |
2683 | } |
2684 | |
2685 | // bytes encoded_audio_string = 4; |
2686 | if (this->encoded_audio_string().size() > 0) { |
2687 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( |
2688 | 4, this->encoded_audio_string(), output); |
2689 | } |
2690 | |
2691 | // string content_type = 5; |
2692 | if (this->content_type().size() > 0) { |
2693 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2694 | this->content_type().data(), static_cast<int>(this->content_type().length()), |
2695 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2696 | "tensorflow.Summary.Audio.content_type" ); |
2697 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
2698 | 5, this->content_type(), output); |
2699 | } |
2700 | |
2701 | if (_internal_metadata_.have_unknown_fields()) { |
2702 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
2703 | _internal_metadata_.unknown_fields(), output); |
2704 | } |
2705 | // @@protoc_insertion_point(serialize_end:tensorflow.Summary.Audio) |
2706 | } |
2707 | |
2708 | ::PROTOBUF_NAMESPACE_ID::uint8* Summary_Audio::InternalSerializeWithCachedSizesToArray( |
2709 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
2710 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.Summary.Audio) |
2711 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2712 | (void) cached_has_bits; |
2713 | |
2714 | // float sample_rate = 1; |
2715 | if (!(this->sample_rate() <= 0 && this->sample_rate() >= 0)) { |
2716 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->sample_rate(), target); |
2717 | } |
2718 | |
2719 | // int64 num_channels = 2; |
2720 | if (this->num_channels() != 0) { |
2721 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->num_channels(), target); |
2722 | } |
2723 | |
2724 | // int64 length_frames = 3; |
2725 | if (this->length_frames() != 0) { |
2726 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->length_frames(), target); |
2727 | } |
2728 | |
2729 | // bytes encoded_audio_string = 4; |
2730 | if (this->encoded_audio_string().size() > 0) { |
2731 | target = |
2732 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( |
2733 | 4, this->encoded_audio_string(), target); |
2734 | } |
2735 | |
2736 | // string content_type = 5; |
2737 | if (this->content_type().size() > 0) { |
2738 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
2739 | this->content_type().data(), static_cast<int>(this->content_type().length()), |
2740 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
2741 | "tensorflow.Summary.Audio.content_type" ); |
2742 | target = |
2743 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
2744 | 5, this->content_type(), target); |
2745 | } |
2746 | |
2747 | if (_internal_metadata_.have_unknown_fields()) { |
2748 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
2749 | _internal_metadata_.unknown_fields(), target); |
2750 | } |
2751 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.Summary.Audio) |
2752 | return target; |
2753 | } |
2754 | |
2755 | size_t Summary_Audio::ByteSizeLong() const { |
2756 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.Summary.Audio) |
2757 | size_t total_size = 0; |
2758 | |
2759 | if (_internal_metadata_.have_unknown_fields()) { |
2760 | total_size += |
2761 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
2762 | _internal_metadata_.unknown_fields()); |
2763 | } |
2764 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2765 | // Prevent compiler warnings about cached_has_bits being unused |
2766 | (void) cached_has_bits; |
2767 | |
2768 | // bytes encoded_audio_string = 4; |
2769 | if (this->encoded_audio_string().size() > 0) { |
2770 | total_size += 1 + |
2771 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
2772 | this->encoded_audio_string()); |
2773 | } |
2774 | |
2775 | // string content_type = 5; |
2776 | if (this->content_type().size() > 0) { |
2777 | total_size += 1 + |
2778 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
2779 | this->content_type()); |
2780 | } |
2781 | |
2782 | // int64 num_channels = 2; |
2783 | if (this->num_channels() != 0) { |
2784 | total_size += 1 + |
2785 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
2786 | this->num_channels()); |
2787 | } |
2788 | |
2789 | // int64 length_frames = 3; |
2790 | if (this->length_frames() != 0) { |
2791 | total_size += 1 + |
2792 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
2793 | this->length_frames()); |
2794 | } |
2795 | |
2796 | // float sample_rate = 1; |
2797 | if (!(this->sample_rate() <= 0 && this->sample_rate() >= 0)) { |
2798 | total_size += 1 + 4; |
2799 | } |
2800 | |
2801 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
2802 | SetCachedSize(cached_size); |
2803 | return total_size; |
2804 | } |
2805 | |
2806 | void Summary_Audio::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2807 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.Summary.Audio) |
2808 | GOOGLE_DCHECK_NE(&from, this); |
2809 | const Summary_Audio* source = |
2810 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Summary_Audio>( |
2811 | &from); |
2812 | if (source == nullptr) { |
2813 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.Summary.Audio) |
2814 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
2815 | } else { |
2816 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.Summary.Audio) |
2817 | MergeFrom(*source); |
2818 | } |
2819 | } |
2820 | |
2821 | void Summary_Audio::MergeFrom(const Summary_Audio& from) { |
2822 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.Summary.Audio) |
2823 | GOOGLE_DCHECK_NE(&from, this); |
2824 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
2825 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
2826 | (void) cached_has_bits; |
2827 | |
2828 | if (from.encoded_audio_string().size() > 0) { |
2829 | set_encoded_audio_string(from.encoded_audio_string()); |
2830 | } |
2831 | if (from.content_type().size() > 0) { |
2832 | set_content_type(from.content_type()); |
2833 | } |
2834 | if (from.num_channels() != 0) { |
2835 | set_num_channels(from.num_channels()); |
2836 | } |
2837 | if (from.length_frames() != 0) { |
2838 | set_length_frames(from.length_frames()); |
2839 | } |
2840 | if (!(from.sample_rate() <= 0 && from.sample_rate() >= 0)) { |
2841 | set_sample_rate(from.sample_rate()); |
2842 | } |
2843 | } |
2844 | |
2845 | void Summary_Audio::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
2846 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.Summary.Audio) |
2847 | if (&from == this) return; |
2848 | Clear(); |
2849 | MergeFrom(from); |
2850 | } |
2851 | |
2852 | void Summary_Audio::CopyFrom(const Summary_Audio& from) { |
2853 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.Summary.Audio) |
2854 | if (&from == this) return; |
2855 | Clear(); |
2856 | MergeFrom(from); |
2857 | } |
2858 | |
2859 | bool Summary_Audio::IsInitialized() const { |
2860 | return true; |
2861 | } |
2862 | |
2863 | void Summary_Audio::InternalSwap(Summary_Audio* other) { |
2864 | using std::swap; |
2865 | _internal_metadata_.Swap(&other->_internal_metadata_); |
2866 | encoded_audio_string_.Swap(&other->encoded_audio_string_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
2867 | GetArenaNoVirtual()); |
2868 | content_type_.Swap(&other->content_type_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
2869 | GetArenaNoVirtual()); |
2870 | swap(num_channels_, other->num_channels_); |
2871 | swap(length_frames_, other->length_frames_); |
2872 | swap(sample_rate_, other->sample_rate_); |
2873 | } |
2874 | |
2875 | ::PROTOBUF_NAMESPACE_ID::Metadata Summary_Audio::GetMetadata() const { |
2876 | return GetMetadataStatic(); |
2877 | } |
2878 | |
2879 | |
2880 | // =================================================================== |
2881 | |
2882 | void Summary_Value::InitAsDefaultInstance() { |
2883 | ::tensorflow::_Summary_Value_default_instance_._instance.get_mutable()->metadata_ = const_cast< ::tensorflow::SummaryMetadata*>( |
2884 | ::tensorflow::SummaryMetadata::internal_default_instance()); |
2885 | ::tensorflow::_Summary_Value_default_instance_.simple_value_ = 0; |
2886 | ::tensorflow::_Summary_Value_default_instance_.obsolete_old_style_histogram_.UnsafeSetDefault( |
2887 | &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
2888 | ::tensorflow::_Summary_Value_default_instance_.image_ = const_cast< ::tensorflow::Summary_Image*>( |
2889 | ::tensorflow::Summary_Image::internal_default_instance()); |
2890 | ::tensorflow::_Summary_Value_default_instance_.histo_ = const_cast< ::tensorflow::HistogramProto*>( |
2891 | ::tensorflow::HistogramProto::internal_default_instance()); |
2892 | ::tensorflow::_Summary_Value_default_instance_.audio_ = const_cast< ::tensorflow::Summary_Audio*>( |
2893 | ::tensorflow::Summary_Audio::internal_default_instance()); |
2894 | ::tensorflow::_Summary_Value_default_instance_.tensor_ = const_cast< ::tensorflow::TensorProto*>( |
2895 | ::tensorflow::TensorProto::internal_default_instance()); |
2896 | } |
2897 | class Summary_Value::_Internal { |
2898 | public: |
2899 | static const ::tensorflow::SummaryMetadata& metadata(const Summary_Value* msg); |
2900 | static const ::tensorflow::Summary_Image& image(const Summary_Value* msg); |
2901 | static const ::tensorflow::HistogramProto& histo(const Summary_Value* msg); |
2902 | static const ::tensorflow::Summary_Audio& audio(const Summary_Value* msg); |
2903 | static const ::tensorflow::TensorProto& tensor(const Summary_Value* msg); |
2904 | }; |
2905 | |
2906 | const ::tensorflow::SummaryMetadata& |
2907 | Summary_Value::_Internal::metadata(const Summary_Value* msg) { |
2908 | return *msg->metadata_; |
2909 | } |
2910 | const ::tensorflow::Summary_Image& |
2911 | Summary_Value::_Internal::image(const Summary_Value* msg) { |
2912 | return *msg->value_.image_; |
2913 | } |
2914 | const ::tensorflow::HistogramProto& |
2915 | Summary_Value::_Internal::histo(const Summary_Value* msg) { |
2916 | return *msg->value_.histo_; |
2917 | } |
2918 | const ::tensorflow::Summary_Audio& |
2919 | Summary_Value::_Internal::audio(const Summary_Value* msg) { |
2920 | return *msg->value_.audio_; |
2921 | } |
2922 | const ::tensorflow::TensorProto& |
2923 | Summary_Value::_Internal::tensor(const Summary_Value* msg) { |
2924 | return *msg->value_.tensor_; |
2925 | } |
2926 | void Summary_Value::unsafe_arena_set_allocated_metadata( |
2927 | ::tensorflow::SummaryMetadata* metadata) { |
2928 | if (GetArenaNoVirtual() == nullptr) { |
2929 | delete metadata_; |
2930 | } |
2931 | metadata_ = metadata; |
2932 | if (metadata) { |
2933 | |
2934 | } else { |
2935 | |
2936 | } |
2937 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.Summary.Value.metadata) |
2938 | } |
2939 | void Summary_Value::set_allocated_image(::tensorflow::Summary_Image* image) { |
2940 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
2941 | clear_value(); |
2942 | if (image) { |
2943 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
2944 | ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(image); |
2945 | if (message_arena != submessage_arena) { |
2946 | image = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
2947 | message_arena, image, submessage_arena); |
2948 | } |
2949 | set_has_image(); |
2950 | value_.image_ = image; |
2951 | } |
2952 | // @@protoc_insertion_point(field_set_allocated:tensorflow.Summary.Value.image) |
2953 | } |
2954 | void Summary_Value::set_allocated_histo(::tensorflow::HistogramProto* histo) { |
2955 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
2956 | clear_value(); |
2957 | if (histo) { |
2958 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
2959 | ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(histo); |
2960 | if (message_arena != submessage_arena) { |
2961 | histo = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
2962 | message_arena, histo, submessage_arena); |
2963 | } |
2964 | set_has_histo(); |
2965 | value_.histo_ = histo; |
2966 | } |
2967 | // @@protoc_insertion_point(field_set_allocated:tensorflow.Summary.Value.histo) |
2968 | } |
2969 | void Summary_Value::set_allocated_audio(::tensorflow::Summary_Audio* audio) { |
2970 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
2971 | clear_value(); |
2972 | if (audio) { |
2973 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
2974 | ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(audio); |
2975 | if (message_arena != submessage_arena) { |
2976 | audio = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
2977 | message_arena, audio, submessage_arena); |
2978 | } |
2979 | set_has_audio(); |
2980 | value_.audio_ = audio; |
2981 | } |
2982 | // @@protoc_insertion_point(field_set_allocated:tensorflow.Summary.Value.audio) |
2983 | } |
2984 | void Summary_Value::set_allocated_tensor(::tensorflow::TensorProto* tensor) { |
2985 | ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); |
2986 | clear_value(); |
2987 | if (tensor) { |
2988 | ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = |
2989 | reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor)->GetArena(); |
2990 | if (message_arena != submessage_arena) { |
2991 | tensor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( |
2992 | message_arena, tensor, submessage_arena); |
2993 | } |
2994 | set_has_tensor(); |
2995 | value_.tensor_ = tensor; |
2996 | } |
2997 | // @@protoc_insertion_point(field_set_allocated:tensorflow.Summary.Value.tensor) |
2998 | } |
2999 | void Summary_Value::clear_tensor() { |
3000 | if (has_tensor()) { |
3001 | if (GetArenaNoVirtual() == nullptr) { |
3002 | delete value_.tensor_; |
3003 | } |
3004 | clear_has_value(); |
3005 | } |
3006 | } |
3007 | Summary_Value::Summary_Value() |
3008 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3009 | SharedCtor(); |
3010 | // @@protoc_insertion_point(constructor:tensorflow.Summary.Value) |
3011 | } |
3012 | Summary_Value::Summary_Value(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3013 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3014 | _internal_metadata_(arena) { |
3015 | SharedCtor(); |
3016 | RegisterArenaDtor(arena); |
3017 | // @@protoc_insertion_point(arena_constructor:tensorflow.Summary.Value) |
3018 | } |
3019 | Summary_Value::Summary_Value(const Summary_Value& from) |
3020 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3021 | _internal_metadata_(nullptr) { |
3022 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3023 | tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3024 | if (!from.tag().empty()) { |
3025 | tag_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.tag(), |
3026 | GetArenaNoVirtual()); |
3027 | } |
3028 | node_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3029 | if (!from.node_name().empty()) { |
3030 | node_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.node_name(), |
3031 | GetArenaNoVirtual()); |
3032 | } |
3033 | if (from.has_metadata()) { |
3034 | metadata_ = new ::tensorflow::SummaryMetadata(*from.metadata_); |
3035 | } else { |
3036 | metadata_ = nullptr; |
3037 | } |
3038 | clear_has_value(); |
3039 | switch (from.value_case()) { |
3040 | case kSimpleValue: { |
3041 | set_simple_value(from.simple_value()); |
3042 | break; |
3043 | } |
3044 | case kObsoleteOldStyleHistogram: { |
3045 | set_obsolete_old_style_histogram(from.obsolete_old_style_histogram()); |
3046 | break; |
3047 | } |
3048 | case kImage: { |
3049 | mutable_image()->::tensorflow::Summary_Image::MergeFrom(from.image()); |
3050 | break; |
3051 | } |
3052 | case kHisto: { |
3053 | mutable_histo()->::tensorflow::HistogramProto::MergeFrom(from.histo()); |
3054 | break; |
3055 | } |
3056 | case kAudio: { |
3057 | mutable_audio()->::tensorflow::Summary_Audio::MergeFrom(from.audio()); |
3058 | break; |
3059 | } |
3060 | case kTensor: { |
3061 | mutable_tensor()->::tensorflow::TensorProto::MergeFrom(from.tensor()); |
3062 | break; |
3063 | } |
3064 | case VALUE_NOT_SET: { |
3065 | break; |
3066 | } |
3067 | } |
3068 | // @@protoc_insertion_point(copy_constructor:tensorflow.Summary.Value) |
3069 | } |
3070 | |
3071 | void Summary_Value::SharedCtor() { |
3072 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Summary_Value_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
3073 | tag_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3074 | node_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3075 | metadata_ = nullptr; |
3076 | clear_has_value(); |
3077 | } |
3078 | |
3079 | Summary_Value::~Summary_Value() { |
3080 | // @@protoc_insertion_point(destructor:tensorflow.Summary.Value) |
3081 | SharedDtor(); |
3082 | } |
3083 | |
3084 | void Summary_Value::SharedDtor() { |
3085 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
3086 | tag_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3087 | node_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
3088 | if (this != internal_default_instance()) delete metadata_; |
3089 | if (has_value()) { |
3090 | clear_value(); |
3091 | } |
3092 | } |
3093 | |
3094 | void Summary_Value::ArenaDtor(void* object) { |
3095 | Summary_Value* _this = reinterpret_cast< Summary_Value* >(object); |
3096 | (void)_this; |
3097 | } |
3098 | void Summary_Value::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
3099 | } |
3100 | void Summary_Value::SetCachedSize(int size) const { |
3101 | _cached_size_.Set(size); |
3102 | } |
3103 | const Summary_Value& Summary_Value::default_instance() { |
3104 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Summary_Value_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
3105 | return *internal_default_instance(); |
3106 | } |
3107 | |
3108 | |
3109 | void Summary_Value::clear_value() { |
3110 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.Summary.Value) |
3111 | switch (value_case()) { |
3112 | case kSimpleValue: { |
3113 | // No need to clear |
3114 | break; |
3115 | } |
3116 | case kObsoleteOldStyleHistogram: { |
3117 | value_.obsolete_old_style_histogram_.Destroy(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
3118 | GetArenaNoVirtual()); |
3119 | break; |
3120 | } |
3121 | case kImage: { |
3122 | if (GetArenaNoVirtual() == nullptr) { |
3123 | delete value_.image_; |
3124 | } |
3125 | break; |
3126 | } |
3127 | case kHisto: { |
3128 | if (GetArenaNoVirtual() == nullptr) { |
3129 | delete value_.histo_; |
3130 | } |
3131 | break; |
3132 | } |
3133 | case kAudio: { |
3134 | if (GetArenaNoVirtual() == nullptr) { |
3135 | delete value_.audio_; |
3136 | } |
3137 | break; |
3138 | } |
3139 | case kTensor: { |
3140 | if (GetArenaNoVirtual() == nullptr) { |
3141 | delete value_.tensor_; |
3142 | } |
3143 | break; |
3144 | } |
3145 | case VALUE_NOT_SET: { |
3146 | break; |
3147 | } |
3148 | } |
3149 | _oneof_case_[0] = VALUE_NOT_SET; |
3150 | } |
3151 | |
3152 | |
3153 | void Summary_Value::Clear() { |
3154 | // @@protoc_insertion_point(message_clear_start:tensorflow.Summary.Value) |
3155 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3156 | // Prevent compiler warnings about cached_has_bits being unused |
3157 | (void) cached_has_bits; |
3158 | |
3159 | tag_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
3160 | node_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); |
3161 | if (GetArenaNoVirtual() == nullptr && metadata_ != nullptr) { |
3162 | delete metadata_; |
3163 | } |
3164 | metadata_ = nullptr; |
3165 | clear_value(); |
3166 | _internal_metadata_.Clear(); |
3167 | } |
3168 | |
3169 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3170 | const char* Summary_Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3171 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3172 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
3173 | while (!ctx->Done(&ptr)) { |
3174 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3175 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3176 | CHK_(ptr); |
3177 | switch (tag >> 3) { |
3178 | // string tag = 1; |
3179 | case 1: |
3180 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
3181 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_tag(), ptr, ctx, "tensorflow.Summary.Value.tag" ); |
3182 | CHK_(ptr); |
3183 | } else goto handle_unusual; |
3184 | continue; |
3185 | // float simple_value = 2; |
3186 | case 2: |
3187 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 21)) { |
3188 | set_simple_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr)); |
3189 | ptr += sizeof(float); |
3190 | } else goto handle_unusual; |
3191 | continue; |
3192 | // bytes obsolete_old_style_histogram = 3; |
3193 | case 3: |
3194 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { |
3195 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_obsolete_old_style_histogram(), ptr, ctx); |
3196 | CHK_(ptr); |
3197 | } else goto handle_unusual; |
3198 | continue; |
3199 | // .tensorflow.Summary.Image image = 4; |
3200 | case 4: |
3201 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
3202 | ptr = ctx->ParseMessage(mutable_image(), ptr); |
3203 | CHK_(ptr); |
3204 | } else goto handle_unusual; |
3205 | continue; |
3206 | // .tensorflow.HistogramProto histo = 5; |
3207 | case 5: |
3208 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { |
3209 | ptr = ctx->ParseMessage(mutable_histo(), ptr); |
3210 | CHK_(ptr); |
3211 | } else goto handle_unusual; |
3212 | continue; |
3213 | // .tensorflow.Summary.Audio audio = 6; |
3214 | case 6: |
3215 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { |
3216 | ptr = ctx->ParseMessage(mutable_audio(), ptr); |
3217 | CHK_(ptr); |
3218 | } else goto handle_unusual; |
3219 | continue; |
3220 | // string node_name = 7; |
3221 | case 7: |
3222 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { |
3223 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_node_name(), ptr, ctx, "tensorflow.Summary.Value.node_name" ); |
3224 | CHK_(ptr); |
3225 | } else goto handle_unusual; |
3226 | continue; |
3227 | // .tensorflow.TensorProto tensor = 8; |
3228 | case 8: |
3229 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { |
3230 | ptr = ctx->ParseMessage(mutable_tensor(), ptr); |
3231 | CHK_(ptr); |
3232 | } else goto handle_unusual; |
3233 | continue; |
3234 | // .tensorflow.SummaryMetadata metadata = 9; |
3235 | case 9: |
3236 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) { |
3237 | ptr = ctx->ParseMessage(mutable_metadata(), ptr); |
3238 | CHK_(ptr); |
3239 | } else goto handle_unusual; |
3240 | continue; |
3241 | default: { |
3242 | handle_unusual: |
3243 | if ((tag & 7) == 4 || tag == 0) { |
3244 | ctx->SetLastTag(tag); |
3245 | goto success; |
3246 | } |
3247 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3248 | CHK_(ptr != nullptr); |
3249 | continue; |
3250 | } |
3251 | } // switch |
3252 | } // while |
3253 | success: |
3254 | return ptr; |
3255 | failure: |
3256 | ptr = nullptr; |
3257 | goto success; |
3258 | #undef CHK_ |
3259 | } |
3260 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3261 | bool Summary_Value::MergePartialFromCodedStream( |
3262 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3263 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3264 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3265 | // @@protoc_insertion_point(parse_start:tensorflow.Summary.Value) |
3266 | for (;;) { |
3267 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3268 | tag = p.first; |
3269 | if (!p.second) goto handle_unusual; |
3270 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3271 | // string tag = 1; |
3272 | case 1: { |
3273 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
3274 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3275 | input, this->mutable_tag())); |
3276 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3277 | this->tag().data(), static_cast<int>(this->tag().length()), |
3278 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3279 | "tensorflow.Summary.Value.tag" )); |
3280 | } else { |
3281 | goto handle_unusual; |
3282 | } |
3283 | break; |
3284 | } |
3285 | |
3286 | // float simple_value = 2; |
3287 | case 2: { |
3288 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (21 & 0xFF)) { |
3289 | clear_value(); |
3290 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
3291 | float, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_FLOAT>( |
3292 | input, &value_.simple_value_))); |
3293 | set_has_simple_value(); |
3294 | } else { |
3295 | goto handle_unusual; |
3296 | } |
3297 | break; |
3298 | } |
3299 | |
3300 | // bytes obsolete_old_style_histogram = 3; |
3301 | case 3: { |
3302 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { |
3303 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( |
3304 | input, this->mutable_obsolete_old_style_histogram())); |
3305 | } else { |
3306 | goto handle_unusual; |
3307 | } |
3308 | break; |
3309 | } |
3310 | |
3311 | // .tensorflow.Summary.Image image = 4; |
3312 | case 4: { |
3313 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
3314 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3315 | input, mutable_image())); |
3316 | } else { |
3317 | goto handle_unusual; |
3318 | } |
3319 | break; |
3320 | } |
3321 | |
3322 | // .tensorflow.HistogramProto histo = 5; |
3323 | case 5: { |
3324 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { |
3325 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3326 | input, mutable_histo())); |
3327 | } else { |
3328 | goto handle_unusual; |
3329 | } |
3330 | break; |
3331 | } |
3332 | |
3333 | // .tensorflow.Summary.Audio audio = 6; |
3334 | case 6: { |
3335 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { |
3336 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3337 | input, mutable_audio())); |
3338 | } else { |
3339 | goto handle_unusual; |
3340 | } |
3341 | break; |
3342 | } |
3343 | |
3344 | // string node_name = 7; |
3345 | case 7: { |
3346 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { |
3347 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( |
3348 | input, this->mutable_node_name())); |
3349 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3350 | this->node_name().data(), static_cast<int>(this->node_name().length()), |
3351 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, |
3352 | "tensorflow.Summary.Value.node_name" )); |
3353 | } else { |
3354 | goto handle_unusual; |
3355 | } |
3356 | break; |
3357 | } |
3358 | |
3359 | // .tensorflow.TensorProto tensor = 8; |
3360 | case 8: { |
3361 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { |
3362 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3363 | input, mutable_tensor())); |
3364 | } else { |
3365 | goto handle_unusual; |
3366 | } |
3367 | break; |
3368 | } |
3369 | |
3370 | // .tensorflow.SummaryMetadata metadata = 9; |
3371 | case 9: { |
3372 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) { |
3373 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3374 | input, mutable_metadata())); |
3375 | } else { |
3376 | goto handle_unusual; |
3377 | } |
3378 | break; |
3379 | } |
3380 | |
3381 | default: { |
3382 | handle_unusual: |
3383 | if (tag == 0) { |
3384 | goto success; |
3385 | } |
3386 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3387 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3388 | break; |
3389 | } |
3390 | } |
3391 | } |
3392 | success: |
3393 | // @@protoc_insertion_point(parse_success:tensorflow.Summary.Value) |
3394 | return true; |
3395 | failure: |
3396 | // @@protoc_insertion_point(parse_failure:tensorflow.Summary.Value) |
3397 | return false; |
3398 | #undef DO_ |
3399 | } |
3400 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3401 | |
3402 | void Summary_Value::SerializeWithCachedSizes( |
3403 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3404 | // @@protoc_insertion_point(serialize_start:tensorflow.Summary.Value) |
3405 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3406 | (void) cached_has_bits; |
3407 | |
3408 | // string tag = 1; |
3409 | if (this->tag().size() > 0) { |
3410 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3411 | this->tag().data(), static_cast<int>(this->tag().length()), |
3412 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3413 | "tensorflow.Summary.Value.tag" ); |
3414 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
3415 | 1, this->tag(), output); |
3416 | } |
3417 | |
3418 | // float simple_value = 2; |
3419 | if (has_simple_value()) { |
3420 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloat(2, this->simple_value(), output); |
3421 | } |
3422 | |
3423 | // bytes obsolete_old_style_histogram = 3; |
3424 | if (has_obsolete_old_style_histogram()) { |
3425 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( |
3426 | 3, this->obsolete_old_style_histogram(), output); |
3427 | } |
3428 | |
3429 | // .tensorflow.Summary.Image image = 4; |
3430 | if (has_image()) { |
3431 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3432 | 4, _Internal::image(this), output); |
3433 | } |
3434 | |
3435 | // .tensorflow.HistogramProto histo = 5; |
3436 | if (has_histo()) { |
3437 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3438 | 5, _Internal::histo(this), output); |
3439 | } |
3440 | |
3441 | // .tensorflow.Summary.Audio audio = 6; |
3442 | if (has_audio()) { |
3443 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3444 | 6, _Internal::audio(this), output); |
3445 | } |
3446 | |
3447 | // string node_name = 7; |
3448 | if (this->node_name().size() > 0) { |
3449 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3450 | this->node_name().data(), static_cast<int>(this->node_name().length()), |
3451 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3452 | "tensorflow.Summary.Value.node_name" ); |
3453 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( |
3454 | 7, this->node_name(), output); |
3455 | } |
3456 | |
3457 | // .tensorflow.TensorProto tensor = 8; |
3458 | if (has_tensor()) { |
3459 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3460 | 8, _Internal::tensor(this), output); |
3461 | } |
3462 | |
3463 | // .tensorflow.SummaryMetadata metadata = 9; |
3464 | if (this->has_metadata()) { |
3465 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3466 | 9, _Internal::metadata(this), output); |
3467 | } |
3468 | |
3469 | if (_internal_metadata_.have_unknown_fields()) { |
3470 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3471 | _internal_metadata_.unknown_fields(), output); |
3472 | } |
3473 | // @@protoc_insertion_point(serialize_end:tensorflow.Summary.Value) |
3474 | } |
3475 | |
3476 | ::PROTOBUF_NAMESPACE_ID::uint8* Summary_Value::InternalSerializeWithCachedSizesToArray( |
3477 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3478 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.Summary.Value) |
3479 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3480 | (void) cached_has_bits; |
3481 | |
3482 | // string tag = 1; |
3483 | if (this->tag().size() > 0) { |
3484 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3485 | this->tag().data(), static_cast<int>(this->tag().length()), |
3486 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3487 | "tensorflow.Summary.Value.tag" ); |
3488 | target = |
3489 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
3490 | 1, this->tag(), target); |
3491 | } |
3492 | |
3493 | // float simple_value = 2; |
3494 | if (has_simple_value()) { |
3495 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->simple_value(), target); |
3496 | } |
3497 | |
3498 | // bytes obsolete_old_style_histogram = 3; |
3499 | if (has_obsolete_old_style_histogram()) { |
3500 | target = |
3501 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( |
3502 | 3, this->obsolete_old_style_histogram(), target); |
3503 | } |
3504 | |
3505 | // .tensorflow.Summary.Image image = 4; |
3506 | if (has_image()) { |
3507 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3508 | InternalWriteMessageToArray( |
3509 | 4, _Internal::image(this), target); |
3510 | } |
3511 | |
3512 | // .tensorflow.HistogramProto histo = 5; |
3513 | if (has_histo()) { |
3514 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3515 | InternalWriteMessageToArray( |
3516 | 5, _Internal::histo(this), target); |
3517 | } |
3518 | |
3519 | // .tensorflow.Summary.Audio audio = 6; |
3520 | if (has_audio()) { |
3521 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3522 | InternalWriteMessageToArray( |
3523 | 6, _Internal::audio(this), target); |
3524 | } |
3525 | |
3526 | // string node_name = 7; |
3527 | if (this->node_name().size() > 0) { |
3528 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
3529 | this->node_name().data(), static_cast<int>(this->node_name().length()), |
3530 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
3531 | "tensorflow.Summary.Value.node_name" ); |
3532 | target = |
3533 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( |
3534 | 7, this->node_name(), target); |
3535 | } |
3536 | |
3537 | // .tensorflow.TensorProto tensor = 8; |
3538 | if (has_tensor()) { |
3539 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3540 | InternalWriteMessageToArray( |
3541 | 8, _Internal::tensor(this), target); |
3542 | } |
3543 | |
3544 | // .tensorflow.SummaryMetadata metadata = 9; |
3545 | if (this->has_metadata()) { |
3546 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3547 | InternalWriteMessageToArray( |
3548 | 9, _Internal::metadata(this), target); |
3549 | } |
3550 | |
3551 | if (_internal_metadata_.have_unknown_fields()) { |
3552 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3553 | _internal_metadata_.unknown_fields(), target); |
3554 | } |
3555 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.Summary.Value) |
3556 | return target; |
3557 | } |
3558 | |
3559 | size_t Summary_Value::ByteSizeLong() const { |
3560 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.Summary.Value) |
3561 | size_t total_size = 0; |
3562 | |
3563 | if (_internal_metadata_.have_unknown_fields()) { |
3564 | total_size += |
3565 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3566 | _internal_metadata_.unknown_fields()); |
3567 | } |
3568 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3569 | // Prevent compiler warnings about cached_has_bits being unused |
3570 | (void) cached_has_bits; |
3571 | |
3572 | // string tag = 1; |
3573 | if (this->tag().size() > 0) { |
3574 | total_size += 1 + |
3575 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
3576 | this->tag()); |
3577 | } |
3578 | |
3579 | // string node_name = 7; |
3580 | if (this->node_name().size() > 0) { |
3581 | total_size += 1 + |
3582 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
3583 | this->node_name()); |
3584 | } |
3585 | |
3586 | // .tensorflow.SummaryMetadata metadata = 9; |
3587 | if (this->has_metadata()) { |
3588 | total_size += 1 + |
3589 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3590 | *metadata_); |
3591 | } |
3592 | |
3593 | switch (value_case()) { |
3594 | // float simple_value = 2; |
3595 | case kSimpleValue: { |
3596 | total_size += 1 + 4; |
3597 | break; |
3598 | } |
3599 | // bytes obsolete_old_style_histogram = 3; |
3600 | case kObsoleteOldStyleHistogram: { |
3601 | total_size += 1 + |
3602 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( |
3603 | this->obsolete_old_style_histogram()); |
3604 | break; |
3605 | } |
3606 | // .tensorflow.Summary.Image image = 4; |
3607 | case kImage: { |
3608 | total_size += 1 + |
3609 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3610 | *value_.image_); |
3611 | break; |
3612 | } |
3613 | // .tensorflow.HistogramProto histo = 5; |
3614 | case kHisto: { |
3615 | total_size += 1 + |
3616 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3617 | *value_.histo_); |
3618 | break; |
3619 | } |
3620 | // .tensorflow.Summary.Audio audio = 6; |
3621 | case kAudio: { |
3622 | total_size += 1 + |
3623 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3624 | *value_.audio_); |
3625 | break; |
3626 | } |
3627 | // .tensorflow.TensorProto tensor = 8; |
3628 | case kTensor: { |
3629 | total_size += 1 + |
3630 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3631 | *value_.tensor_); |
3632 | break; |
3633 | } |
3634 | case VALUE_NOT_SET: { |
3635 | break; |
3636 | } |
3637 | } |
3638 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3639 | SetCachedSize(cached_size); |
3640 | return total_size; |
3641 | } |
3642 | |
3643 | void Summary_Value::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3644 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.Summary.Value) |
3645 | GOOGLE_DCHECK_NE(&from, this); |
3646 | const Summary_Value* source = |
3647 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Summary_Value>( |
3648 | &from); |
3649 | if (source == nullptr) { |
3650 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.Summary.Value) |
3651 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3652 | } else { |
3653 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.Summary.Value) |
3654 | MergeFrom(*source); |
3655 | } |
3656 | } |
3657 | |
3658 | void Summary_Value::MergeFrom(const Summary_Value& from) { |
3659 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.Summary.Value) |
3660 | GOOGLE_DCHECK_NE(&from, this); |
3661 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3662 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3663 | (void) cached_has_bits; |
3664 | |
3665 | if (from.tag().size() > 0) { |
3666 | set_tag(from.tag()); |
3667 | } |
3668 | if (from.node_name().size() > 0) { |
3669 | set_node_name(from.node_name()); |
3670 | } |
3671 | if (from.has_metadata()) { |
3672 | mutable_metadata()->::tensorflow::SummaryMetadata::MergeFrom(from.metadata()); |
3673 | } |
3674 | switch (from.value_case()) { |
3675 | case kSimpleValue: { |
3676 | set_simple_value(from.simple_value()); |
3677 | break; |
3678 | } |
3679 | case kObsoleteOldStyleHistogram: { |
3680 | set_obsolete_old_style_histogram(from.obsolete_old_style_histogram()); |
3681 | break; |
3682 | } |
3683 | case kImage: { |
3684 | mutable_image()->::tensorflow::Summary_Image::MergeFrom(from.image()); |
3685 | break; |
3686 | } |
3687 | case kHisto: { |
3688 | mutable_histo()->::tensorflow::HistogramProto::MergeFrom(from.histo()); |
3689 | break; |
3690 | } |
3691 | case kAudio: { |
3692 | mutable_audio()->::tensorflow::Summary_Audio::MergeFrom(from.audio()); |
3693 | break; |
3694 | } |
3695 | case kTensor: { |
3696 | mutable_tensor()->::tensorflow::TensorProto::MergeFrom(from.tensor()); |
3697 | break; |
3698 | } |
3699 | case VALUE_NOT_SET: { |
3700 | break; |
3701 | } |
3702 | } |
3703 | } |
3704 | |
3705 | void Summary_Value::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3706 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.Summary.Value) |
3707 | if (&from == this) return; |
3708 | Clear(); |
3709 | MergeFrom(from); |
3710 | } |
3711 | |
3712 | void Summary_Value::CopyFrom(const Summary_Value& from) { |
3713 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.Summary.Value) |
3714 | if (&from == this) return; |
3715 | Clear(); |
3716 | MergeFrom(from); |
3717 | } |
3718 | |
3719 | bool Summary_Value::IsInitialized() const { |
3720 | return true; |
3721 | } |
3722 | |
3723 | void Summary_Value::InternalSwap(Summary_Value* other) { |
3724 | using std::swap; |
3725 | _internal_metadata_.Swap(&other->_internal_metadata_); |
3726 | tag_.Swap(&other->tag_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
3727 | GetArenaNoVirtual()); |
3728 | node_name_.Swap(&other->node_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
3729 | GetArenaNoVirtual()); |
3730 | swap(metadata_, other->metadata_); |
3731 | swap(value_, other->value_); |
3732 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
3733 | } |
3734 | |
3735 | ::PROTOBUF_NAMESPACE_ID::Metadata Summary_Value::GetMetadata() const { |
3736 | return GetMetadataStatic(); |
3737 | } |
3738 | |
3739 | |
3740 | // =================================================================== |
3741 | |
3742 | void Summary::InitAsDefaultInstance() { |
3743 | } |
3744 | class Summary::_Internal { |
3745 | public: |
3746 | }; |
3747 | |
3748 | Summary::Summary() |
3749 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
3750 | SharedCtor(); |
3751 | // @@protoc_insertion_point(constructor:tensorflow.Summary) |
3752 | } |
3753 | Summary::Summary(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
3754 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3755 | _internal_metadata_(arena), |
3756 | value_(arena) { |
3757 | SharedCtor(); |
3758 | RegisterArenaDtor(arena); |
3759 | // @@protoc_insertion_point(arena_constructor:tensorflow.Summary) |
3760 | } |
3761 | Summary::Summary(const Summary& from) |
3762 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
3763 | _internal_metadata_(nullptr), |
3764 | value_(from.value_) { |
3765 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3766 | // @@protoc_insertion_point(copy_constructor:tensorflow.Summary) |
3767 | } |
3768 | |
3769 | void Summary::SharedCtor() { |
3770 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Summary_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
3771 | } |
3772 | |
3773 | Summary::~Summary() { |
3774 | // @@protoc_insertion_point(destructor:tensorflow.Summary) |
3775 | SharedDtor(); |
3776 | } |
3777 | |
3778 | void Summary::SharedDtor() { |
3779 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
3780 | } |
3781 | |
3782 | void Summary::ArenaDtor(void* object) { |
3783 | Summary* _this = reinterpret_cast< Summary* >(object); |
3784 | (void)_this; |
3785 | } |
3786 | void Summary::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
3787 | } |
3788 | void Summary::SetCachedSize(int size) const { |
3789 | _cached_size_.Set(size); |
3790 | } |
3791 | const Summary& Summary::default_instance() { |
3792 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Summary_tensorflow_2fcore_2fframework_2fsummary_2eproto.base); |
3793 | return *internal_default_instance(); |
3794 | } |
3795 | |
3796 | |
3797 | void Summary::Clear() { |
3798 | // @@protoc_insertion_point(message_clear_start:tensorflow.Summary) |
3799 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3800 | // Prevent compiler warnings about cached_has_bits being unused |
3801 | (void) cached_has_bits; |
3802 | |
3803 | value_.Clear(); |
3804 | _internal_metadata_.Clear(); |
3805 | } |
3806 | |
3807 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3808 | const char* Summary::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
3809 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
3810 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
3811 | while (!ctx->Done(&ptr)) { |
3812 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3813 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
3814 | CHK_(ptr); |
3815 | switch (tag >> 3) { |
3816 | // repeated .tensorflow.Summary.Value value = 1; |
3817 | case 1: |
3818 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
3819 | ptr -= 1; |
3820 | do { |
3821 | ptr += 1; |
3822 | ptr = ctx->ParseMessage(add_value(), ptr); |
3823 | CHK_(ptr); |
3824 | if (!ctx->DataAvailable(ptr)) break; |
3825 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
3826 | } else goto handle_unusual; |
3827 | continue; |
3828 | default: { |
3829 | handle_unusual: |
3830 | if ((tag & 7) == 4 || tag == 0) { |
3831 | ctx->SetLastTag(tag); |
3832 | goto success; |
3833 | } |
3834 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
3835 | CHK_(ptr != nullptr); |
3836 | continue; |
3837 | } |
3838 | } // switch |
3839 | } // while |
3840 | success: |
3841 | return ptr; |
3842 | failure: |
3843 | ptr = nullptr; |
3844 | goto success; |
3845 | #undef CHK_ |
3846 | } |
3847 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3848 | bool Summary::MergePartialFromCodedStream( |
3849 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
3850 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
3851 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
3852 | // @@protoc_insertion_point(parse_start:tensorflow.Summary) |
3853 | for (;;) { |
3854 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
3855 | tag = p.first; |
3856 | if (!p.second) goto handle_unusual; |
3857 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
3858 | // repeated .tensorflow.Summary.Value value = 1; |
3859 | case 1: { |
3860 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
3861 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
3862 | input, add_value())); |
3863 | } else { |
3864 | goto handle_unusual; |
3865 | } |
3866 | break; |
3867 | } |
3868 | |
3869 | default: { |
3870 | handle_unusual: |
3871 | if (tag == 0) { |
3872 | goto success; |
3873 | } |
3874 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
3875 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
3876 | break; |
3877 | } |
3878 | } |
3879 | } |
3880 | success: |
3881 | // @@protoc_insertion_point(parse_success:tensorflow.Summary) |
3882 | return true; |
3883 | failure: |
3884 | // @@protoc_insertion_point(parse_failure:tensorflow.Summary) |
3885 | return false; |
3886 | #undef DO_ |
3887 | } |
3888 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
3889 | |
3890 | void Summary::SerializeWithCachedSizes( |
3891 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
3892 | // @@protoc_insertion_point(serialize_start:tensorflow.Summary) |
3893 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3894 | (void) cached_has_bits; |
3895 | |
3896 | // repeated .tensorflow.Summary.Value value = 1; |
3897 | for (unsigned int i = 0, |
3898 | n = static_cast<unsigned int>(this->value_size()); i < n; i++) { |
3899 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
3900 | 1, |
3901 | this->value(static_cast<int>(i)), |
3902 | output); |
3903 | } |
3904 | |
3905 | if (_internal_metadata_.have_unknown_fields()) { |
3906 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
3907 | _internal_metadata_.unknown_fields(), output); |
3908 | } |
3909 | // @@protoc_insertion_point(serialize_end:tensorflow.Summary) |
3910 | } |
3911 | |
3912 | ::PROTOBUF_NAMESPACE_ID::uint8* Summary::InternalSerializeWithCachedSizesToArray( |
3913 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
3914 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.Summary) |
3915 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3916 | (void) cached_has_bits; |
3917 | |
3918 | // repeated .tensorflow.Summary.Value value = 1; |
3919 | for (unsigned int i = 0, |
3920 | n = static_cast<unsigned int>(this->value_size()); i < n; i++) { |
3921 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
3922 | InternalWriteMessageToArray( |
3923 | 1, this->value(static_cast<int>(i)), target); |
3924 | } |
3925 | |
3926 | if (_internal_metadata_.have_unknown_fields()) { |
3927 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
3928 | _internal_metadata_.unknown_fields(), target); |
3929 | } |
3930 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.Summary) |
3931 | return target; |
3932 | } |
3933 | |
3934 | size_t Summary::ByteSizeLong() const { |
3935 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.Summary) |
3936 | size_t total_size = 0; |
3937 | |
3938 | if (_internal_metadata_.have_unknown_fields()) { |
3939 | total_size += |
3940 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
3941 | _internal_metadata_.unknown_fields()); |
3942 | } |
3943 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3944 | // Prevent compiler warnings about cached_has_bits being unused |
3945 | (void) cached_has_bits; |
3946 | |
3947 | // repeated .tensorflow.Summary.Value value = 1; |
3948 | { |
3949 | unsigned int count = static_cast<unsigned int>(this->value_size()); |
3950 | total_size += 1UL * count; |
3951 | for (unsigned int i = 0; i < count; i++) { |
3952 | total_size += |
3953 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
3954 | this->value(static_cast<int>(i))); |
3955 | } |
3956 | } |
3957 | |
3958 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
3959 | SetCachedSize(cached_size); |
3960 | return total_size; |
3961 | } |
3962 | |
3963 | void Summary::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3964 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.Summary) |
3965 | GOOGLE_DCHECK_NE(&from, this); |
3966 | const Summary* source = |
3967 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Summary>( |
3968 | &from); |
3969 | if (source == nullptr) { |
3970 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.Summary) |
3971 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
3972 | } else { |
3973 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.Summary) |
3974 | MergeFrom(*source); |
3975 | } |
3976 | } |
3977 | |
3978 | void Summary::MergeFrom(const Summary& from) { |
3979 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.Summary) |
3980 | GOOGLE_DCHECK_NE(&from, this); |
3981 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
3982 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
3983 | (void) cached_has_bits; |
3984 | |
3985 | value_.MergeFrom(from.value_); |
3986 | } |
3987 | |
3988 | void Summary::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
3989 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.Summary) |
3990 | if (&from == this) return; |
3991 | Clear(); |
3992 | MergeFrom(from); |
3993 | } |
3994 | |
3995 | void Summary::CopyFrom(const Summary& from) { |
3996 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.Summary) |
3997 | if (&from == this) return; |
3998 | Clear(); |
3999 | MergeFrom(from); |
4000 | } |
4001 | |
4002 | bool Summary::IsInitialized() const { |
4003 | return true; |
4004 | } |
4005 | |
4006 | void Summary::InternalSwap(Summary* other) { |
4007 | using std::swap; |
4008 | _internal_metadata_.Swap(&other->_internal_metadata_); |
4009 | CastToBase(&value_)->InternalSwap(CastToBase(&other->value_)); |
4010 | } |
4011 | |
4012 | ::PROTOBUF_NAMESPACE_ID::Metadata Summary::GetMetadata() const { |
4013 | return GetMetadataStatic(); |
4014 | } |
4015 | |
4016 | |
4017 | // @@protoc_insertion_point(namespace_scope) |
4018 | } // namespace tensorflow |
4019 | PROTOBUF_NAMESPACE_OPEN |
4020 | template<> PROTOBUF_NOINLINE ::tensorflow::SummaryDescription* Arena::CreateMaybeMessage< ::tensorflow::SummaryDescription >(Arena* arena) { |
4021 | return Arena::CreateMessageInternal< ::tensorflow::SummaryDescription >(arena); |
4022 | } |
4023 | template<> PROTOBUF_NOINLINE ::tensorflow::HistogramProto* Arena::CreateMaybeMessage< ::tensorflow::HistogramProto >(Arena* arena) { |
4024 | return Arena::CreateMessageInternal< ::tensorflow::HistogramProto >(arena); |
4025 | } |
4026 | template<> PROTOBUF_NOINLINE ::tensorflow::SummaryMetadata_PluginData* Arena::CreateMaybeMessage< ::tensorflow::SummaryMetadata_PluginData >(Arena* arena) { |
4027 | return Arena::CreateMessageInternal< ::tensorflow::SummaryMetadata_PluginData >(arena); |
4028 | } |
4029 | template<> PROTOBUF_NOINLINE ::tensorflow::SummaryMetadata* Arena::CreateMaybeMessage< ::tensorflow::SummaryMetadata >(Arena* arena) { |
4030 | return Arena::CreateMessageInternal< ::tensorflow::SummaryMetadata >(arena); |
4031 | } |
4032 | template<> PROTOBUF_NOINLINE ::tensorflow::Summary_Image* Arena::CreateMaybeMessage< ::tensorflow::Summary_Image >(Arena* arena) { |
4033 | return Arena::CreateMessageInternal< ::tensorflow::Summary_Image >(arena); |
4034 | } |
4035 | template<> PROTOBUF_NOINLINE ::tensorflow::Summary_Audio* Arena::CreateMaybeMessage< ::tensorflow::Summary_Audio >(Arena* arena) { |
4036 | return Arena::CreateMessageInternal< ::tensorflow::Summary_Audio >(arena); |
4037 | } |
4038 | template<> PROTOBUF_NOINLINE ::tensorflow::Summary_Value* Arena::CreateMaybeMessage< ::tensorflow::Summary_Value >(Arena* arena) { |
4039 | return Arena::CreateMessageInternal< ::tensorflow::Summary_Value >(arena); |
4040 | } |
4041 | template<> PROTOBUF_NOINLINE ::tensorflow::Summary* Arena::CreateMaybeMessage< ::tensorflow::Summary >(Arena* arena) { |
4042 | return Arena::CreateMessageInternal< ::tensorflow::Summary >(arena); |
4043 | } |
4044 | PROTOBUF_NAMESPACE_CLOSE |
4045 | |
4046 | // @@protoc_insertion_point(global_scope) |
4047 | #include <google/protobuf/port_undef.inc> |
4048 | |