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