1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/core/framework/tensor_slice.proto |
3 | |
4 | #include "tensorflow/core/framework/tensor_slice.pb.h" |
5 | |
6 | #include <algorithm> |
7 | |
8 | #include <google/protobuf/stubs/common.h> |
9 | #include <google/protobuf/io/coded_stream.h> |
10 | #include <google/protobuf/extension_set.h> |
11 | #include <google/protobuf/wire_format_lite.h> |
12 | #include <google/protobuf/descriptor.h> |
13 | #include <google/protobuf/generated_message_reflection.h> |
14 | #include <google/protobuf/reflection_ops.h> |
15 | #include <google/protobuf/wire_format.h> |
16 | // @@protoc_insertion_point(includes) |
17 | #include <google/protobuf/port_def.inc> |
18 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TensorSliceProto_Extent_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto; |
19 | namespace tensorflow { |
20 | class TensorSliceProto_ExtentDefaultTypeInternal { |
21 | public: |
22 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TensorSliceProto_Extent> _instance; |
23 | ::PROTOBUF_NAMESPACE_ID::int64 length_; |
24 | } _TensorSliceProto_Extent_default_instance_; |
25 | class TensorSliceProtoDefaultTypeInternal { |
26 | public: |
27 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TensorSliceProto> _instance; |
28 | } _TensorSliceProto_default_instance_; |
29 | } // namespace tensorflow |
30 | static void InitDefaultsscc_info_TensorSliceProto_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto() { |
31 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
32 | |
33 | { |
34 | void* ptr = &::tensorflow::_TensorSliceProto_default_instance_; |
35 | new (ptr) ::tensorflow::TensorSliceProto(); |
36 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
37 | } |
38 | ::tensorflow::TensorSliceProto::InitAsDefaultInstance(); |
39 | } |
40 | |
41 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TensorSliceProto_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto = |
42 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_TensorSliceProto_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto}, { |
43 | &scc_info_TensorSliceProto_Extent_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto.base,}}; |
44 | |
45 | static void InitDefaultsscc_info_TensorSliceProto_Extent_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto() { |
46 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
47 | |
48 | { |
49 | void* ptr = &::tensorflow::_TensorSliceProto_Extent_default_instance_; |
50 | new (ptr) ::tensorflow::TensorSliceProto_Extent(); |
51 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
52 | } |
53 | ::tensorflow::TensorSliceProto_Extent::InitAsDefaultInstance(); |
54 | } |
55 | |
56 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TensorSliceProto_Extent_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto = |
57 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_TensorSliceProto_Extent_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto}, {}}; |
58 | |
59 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto[2]; |
60 | static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto = nullptr; |
61 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto = nullptr; |
62 | |
63 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
64 | ~0u, // no _has_bits_ |
65 | PROTOBUF_FIELD_OFFSET(::tensorflow::TensorSliceProto_Extent, _internal_metadata_), |
66 | ~0u, // no _extensions_ |
67 | PROTOBUF_FIELD_OFFSET(::tensorflow::TensorSliceProto_Extent, _oneof_case_[0]), |
68 | ~0u, // no _weak_field_map_ |
69 | PROTOBUF_FIELD_OFFSET(::tensorflow::TensorSliceProto_Extent, start_), |
70 | offsetof(::tensorflow::TensorSliceProto_ExtentDefaultTypeInternal, length_), |
71 | PROTOBUF_FIELD_OFFSET(::tensorflow::TensorSliceProto_Extent, has_length_), |
72 | ~0u, // no _has_bits_ |
73 | PROTOBUF_FIELD_OFFSET(::tensorflow::TensorSliceProto, _internal_metadata_), |
74 | ~0u, // no _extensions_ |
75 | ~0u, // no _oneof_case_ |
76 | ~0u, // no _weak_field_map_ |
77 | PROTOBUF_FIELD_OFFSET(::tensorflow::TensorSliceProto, extent_), |
78 | }; |
79 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
80 | { 0, -1, sizeof(::tensorflow::TensorSliceProto_Extent)}, |
81 | { 8, -1, sizeof(::tensorflow::TensorSliceProto)}, |
82 | }; |
83 | |
84 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
85 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_TensorSliceProto_Extent_default_instance_), |
86 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_TensorSliceProto_default_instance_), |
87 | }; |
88 | |
89 | const char descriptor_table_protodef_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
90 | "\n,tensorflow/core/framework/tensor_slice" |
91 | ".proto\022\ntensorflow\"\200\001\n\020TensorSliceProto\022" |
92 | "3\n\006extent\030\001 \003(\0132#.tensorflow.TensorSlice" |
93 | "Proto.Extent\0327\n\006Extent\022\r\n\005start\030\001 \001(\003\022\020\n" |
94 | "\006length\030\002 \001(\003H\000B\014\n\nhas_lengthB\207\001\n\030org.te" |
95 | "nsorflow.frameworkB\021TensorSliceProtosP\001Z" |
96 | "Sgithub.com/tensorflow/tensorflow/tensor" |
97 | "flow/go/core/framework/tensor_slice_go_p" |
98 | "roto\370\001\001b\006proto3" |
99 | ; |
100 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto_deps[1] = { |
101 | }; |
102 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto_sccs[2] = { |
103 | &scc_info_TensorSliceProto_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto.base, |
104 | &scc_info_TensorSliceProto_Extent_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto.base, |
105 | }; |
106 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto_once; |
107 | static bool descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto_initialized = false; |
108 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto = { |
109 | &descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto_initialized, descriptor_table_protodef_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto, "tensorflow/core/framework/tensor_slice.proto" , 335, |
110 | &descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto_once, descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto_sccs, descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto_deps, 2, 0, |
111 | schemas, file_default_instances, TableStruct_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto::offsets, |
112 | file_level_metadata_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto, 2, file_level_enum_descriptors_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto, file_level_service_descriptors_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto, |
113 | }; |
114 | |
115 | // Force running AddDescriptors() at dynamic initialization time. |
116 | static bool dynamic_init_dummy_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto), true); |
117 | namespace tensorflow { |
118 | |
119 | // =================================================================== |
120 | |
121 | void TensorSliceProto_Extent::InitAsDefaultInstance() { |
122 | ::tensorflow::_TensorSliceProto_Extent_default_instance_.length_ = PROTOBUF_LONGLONG(0); |
123 | } |
124 | class TensorSliceProto_Extent::_Internal { |
125 | public: |
126 | }; |
127 | |
128 | TensorSliceProto_Extent::TensorSliceProto_Extent() |
129 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
130 | SharedCtor(); |
131 | // @@protoc_insertion_point(constructor:tensorflow.TensorSliceProto.Extent) |
132 | } |
133 | TensorSliceProto_Extent::TensorSliceProto_Extent(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
134 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
135 | _internal_metadata_(arena) { |
136 | SharedCtor(); |
137 | RegisterArenaDtor(arena); |
138 | // @@protoc_insertion_point(arena_constructor:tensorflow.TensorSliceProto.Extent) |
139 | } |
140 | TensorSliceProto_Extent::TensorSliceProto_Extent(const TensorSliceProto_Extent& from) |
141 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
142 | _internal_metadata_(nullptr) { |
143 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
144 | start_ = from.start_; |
145 | clear_has_has_length(); |
146 | switch (from.has_length_case()) { |
147 | case kLength: { |
148 | set_length(from.length()); |
149 | break; |
150 | } |
151 | case HAS_LENGTH_NOT_SET: { |
152 | break; |
153 | } |
154 | } |
155 | // @@protoc_insertion_point(copy_constructor:tensorflow.TensorSliceProto.Extent) |
156 | } |
157 | |
158 | void TensorSliceProto_Extent::SharedCtor() { |
159 | start_ = PROTOBUF_LONGLONG(0); |
160 | clear_has_has_length(); |
161 | } |
162 | |
163 | TensorSliceProto_Extent::~TensorSliceProto_Extent() { |
164 | // @@protoc_insertion_point(destructor:tensorflow.TensorSliceProto.Extent) |
165 | SharedDtor(); |
166 | } |
167 | |
168 | void TensorSliceProto_Extent::SharedDtor() { |
169 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
170 | if (has_has_length()) { |
171 | clear_has_length(); |
172 | } |
173 | } |
174 | |
175 | void TensorSliceProto_Extent::ArenaDtor(void* object) { |
176 | TensorSliceProto_Extent* _this = reinterpret_cast< TensorSliceProto_Extent* >(object); |
177 | (void)_this; |
178 | } |
179 | void TensorSliceProto_Extent::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
180 | } |
181 | void TensorSliceProto_Extent::SetCachedSize(int size) const { |
182 | _cached_size_.Set(size); |
183 | } |
184 | const TensorSliceProto_Extent& TensorSliceProto_Extent::default_instance() { |
185 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TensorSliceProto_Extent_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto.base); |
186 | return *internal_default_instance(); |
187 | } |
188 | |
189 | |
190 | void TensorSliceProto_Extent::clear_has_length() { |
191 | // @@protoc_insertion_point(one_of_clear_start:tensorflow.TensorSliceProto.Extent) |
192 | switch (has_length_case()) { |
193 | case kLength: { |
194 | // No need to clear |
195 | break; |
196 | } |
197 | case HAS_LENGTH_NOT_SET: { |
198 | break; |
199 | } |
200 | } |
201 | _oneof_case_[0] = HAS_LENGTH_NOT_SET; |
202 | } |
203 | |
204 | |
205 | void TensorSliceProto_Extent::Clear() { |
206 | // @@protoc_insertion_point(message_clear_start:tensorflow.TensorSliceProto.Extent) |
207 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
208 | // Prevent compiler warnings about cached_has_bits being unused |
209 | (void) cached_has_bits; |
210 | |
211 | start_ = PROTOBUF_LONGLONG(0); |
212 | clear_has_length(); |
213 | _internal_metadata_.Clear(); |
214 | } |
215 | |
216 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
217 | const char* TensorSliceProto_Extent::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
218 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
219 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
220 | while (!ctx->Done(&ptr)) { |
221 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
222 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
223 | CHK_(ptr); |
224 | switch (tag >> 3) { |
225 | // int64 start = 1; |
226 | case 1: |
227 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
228 | start_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
229 | CHK_(ptr); |
230 | } else goto handle_unusual; |
231 | continue; |
232 | // int64 length = 2; |
233 | case 2: |
234 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
235 | set_length(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
236 | CHK_(ptr); |
237 | } else goto handle_unusual; |
238 | continue; |
239 | default: { |
240 | handle_unusual: |
241 | if ((tag & 7) == 4 || tag == 0) { |
242 | ctx->SetLastTag(tag); |
243 | goto success; |
244 | } |
245 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
246 | CHK_(ptr != nullptr); |
247 | continue; |
248 | } |
249 | } // switch |
250 | } // while |
251 | success: |
252 | return ptr; |
253 | failure: |
254 | ptr = nullptr; |
255 | goto success; |
256 | #undef CHK_ |
257 | } |
258 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
259 | bool TensorSliceProto_Extent::MergePartialFromCodedStream( |
260 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
261 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
262 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
263 | // @@protoc_insertion_point(parse_start:tensorflow.TensorSliceProto.Extent) |
264 | for (;;) { |
265 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
266 | tag = p.first; |
267 | if (!p.second) goto handle_unusual; |
268 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
269 | // int64 start = 1; |
270 | case 1: { |
271 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
272 | |
273 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
274 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
275 | input, &start_))); |
276 | } else { |
277 | goto handle_unusual; |
278 | } |
279 | break; |
280 | } |
281 | |
282 | // int64 length = 2; |
283 | case 2: { |
284 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
285 | clear_has_length(); |
286 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
287 | ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( |
288 | input, &has_length_.length_))); |
289 | set_has_length(); |
290 | } else { |
291 | goto handle_unusual; |
292 | } |
293 | break; |
294 | } |
295 | |
296 | default: { |
297 | handle_unusual: |
298 | if (tag == 0) { |
299 | goto success; |
300 | } |
301 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
302 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
303 | break; |
304 | } |
305 | } |
306 | } |
307 | success: |
308 | // @@protoc_insertion_point(parse_success:tensorflow.TensorSliceProto.Extent) |
309 | return true; |
310 | failure: |
311 | // @@protoc_insertion_point(parse_failure:tensorflow.TensorSliceProto.Extent) |
312 | return false; |
313 | #undef DO_ |
314 | } |
315 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
316 | |
317 | void TensorSliceProto_Extent::SerializeWithCachedSizes( |
318 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
319 | // @@protoc_insertion_point(serialize_start:tensorflow.TensorSliceProto.Extent) |
320 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
321 | (void) cached_has_bits; |
322 | |
323 | // int64 start = 1; |
324 | if (this->start() != 0) { |
325 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->start(), output); |
326 | } |
327 | |
328 | // int64 length = 2; |
329 | if (has_length()) { |
330 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(2, this->length(), output); |
331 | } |
332 | |
333 | if (_internal_metadata_.have_unknown_fields()) { |
334 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
335 | _internal_metadata_.unknown_fields(), output); |
336 | } |
337 | // @@protoc_insertion_point(serialize_end:tensorflow.TensorSliceProto.Extent) |
338 | } |
339 | |
340 | ::PROTOBUF_NAMESPACE_ID::uint8* TensorSliceProto_Extent::InternalSerializeWithCachedSizesToArray( |
341 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
342 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorSliceProto.Extent) |
343 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
344 | (void) cached_has_bits; |
345 | |
346 | // int64 start = 1; |
347 | if (this->start() != 0) { |
348 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->start(), target); |
349 | } |
350 | |
351 | // int64 length = 2; |
352 | if (has_length()) { |
353 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->length(), target); |
354 | } |
355 | |
356 | if (_internal_metadata_.have_unknown_fields()) { |
357 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
358 | _internal_metadata_.unknown_fields(), target); |
359 | } |
360 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorSliceProto.Extent) |
361 | return target; |
362 | } |
363 | |
364 | size_t TensorSliceProto_Extent::ByteSizeLong() const { |
365 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorSliceProto.Extent) |
366 | size_t total_size = 0; |
367 | |
368 | if (_internal_metadata_.have_unknown_fields()) { |
369 | total_size += |
370 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
371 | _internal_metadata_.unknown_fields()); |
372 | } |
373 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
374 | // Prevent compiler warnings about cached_has_bits being unused |
375 | (void) cached_has_bits; |
376 | |
377 | // int64 start = 1; |
378 | if (this->start() != 0) { |
379 | total_size += 1 + |
380 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
381 | this->start()); |
382 | } |
383 | |
384 | switch (has_length_case()) { |
385 | // int64 length = 2; |
386 | case kLength: { |
387 | total_size += 1 + |
388 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( |
389 | this->length()); |
390 | break; |
391 | } |
392 | case HAS_LENGTH_NOT_SET: { |
393 | break; |
394 | } |
395 | } |
396 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
397 | SetCachedSize(cached_size); |
398 | return total_size; |
399 | } |
400 | |
401 | void TensorSliceProto_Extent::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
402 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorSliceProto.Extent) |
403 | GOOGLE_DCHECK_NE(&from, this); |
404 | const TensorSliceProto_Extent* source = |
405 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TensorSliceProto_Extent>( |
406 | &from); |
407 | if (source == nullptr) { |
408 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorSliceProto.Extent) |
409 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
410 | } else { |
411 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorSliceProto.Extent) |
412 | MergeFrom(*source); |
413 | } |
414 | } |
415 | |
416 | void TensorSliceProto_Extent::MergeFrom(const TensorSliceProto_Extent& from) { |
417 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorSliceProto.Extent) |
418 | GOOGLE_DCHECK_NE(&from, this); |
419 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
420 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
421 | (void) cached_has_bits; |
422 | |
423 | if (from.start() != 0) { |
424 | set_start(from.start()); |
425 | } |
426 | switch (from.has_length_case()) { |
427 | case kLength: { |
428 | set_length(from.length()); |
429 | break; |
430 | } |
431 | case HAS_LENGTH_NOT_SET: { |
432 | break; |
433 | } |
434 | } |
435 | } |
436 | |
437 | void TensorSliceProto_Extent::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
438 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorSliceProto.Extent) |
439 | if (&from == this) return; |
440 | Clear(); |
441 | MergeFrom(from); |
442 | } |
443 | |
444 | void TensorSliceProto_Extent::CopyFrom(const TensorSliceProto_Extent& from) { |
445 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorSliceProto.Extent) |
446 | if (&from == this) return; |
447 | Clear(); |
448 | MergeFrom(from); |
449 | } |
450 | |
451 | bool TensorSliceProto_Extent::IsInitialized() const { |
452 | return true; |
453 | } |
454 | |
455 | void TensorSliceProto_Extent::InternalSwap(TensorSliceProto_Extent* other) { |
456 | using std::swap; |
457 | _internal_metadata_.Swap(&other->_internal_metadata_); |
458 | swap(start_, other->start_); |
459 | swap(has_length_, other->has_length_); |
460 | swap(_oneof_case_[0], other->_oneof_case_[0]); |
461 | } |
462 | |
463 | ::PROTOBUF_NAMESPACE_ID::Metadata TensorSliceProto_Extent::GetMetadata() const { |
464 | return GetMetadataStatic(); |
465 | } |
466 | |
467 | |
468 | // =================================================================== |
469 | |
470 | void TensorSliceProto::InitAsDefaultInstance() { |
471 | } |
472 | class TensorSliceProto::_Internal { |
473 | public: |
474 | }; |
475 | |
476 | TensorSliceProto::TensorSliceProto() |
477 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
478 | SharedCtor(); |
479 | // @@protoc_insertion_point(constructor:tensorflow.TensorSliceProto) |
480 | } |
481 | TensorSliceProto::TensorSliceProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
482 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
483 | _internal_metadata_(arena), |
484 | extent_(arena) { |
485 | SharedCtor(); |
486 | RegisterArenaDtor(arena); |
487 | // @@protoc_insertion_point(arena_constructor:tensorflow.TensorSliceProto) |
488 | } |
489 | TensorSliceProto::TensorSliceProto(const TensorSliceProto& from) |
490 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
491 | _internal_metadata_(nullptr), |
492 | extent_(from.extent_) { |
493 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
494 | // @@protoc_insertion_point(copy_constructor:tensorflow.TensorSliceProto) |
495 | } |
496 | |
497 | void TensorSliceProto::SharedCtor() { |
498 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TensorSliceProto_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto.base); |
499 | } |
500 | |
501 | TensorSliceProto::~TensorSliceProto() { |
502 | // @@protoc_insertion_point(destructor:tensorflow.TensorSliceProto) |
503 | SharedDtor(); |
504 | } |
505 | |
506 | void TensorSliceProto::SharedDtor() { |
507 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
508 | } |
509 | |
510 | void TensorSliceProto::ArenaDtor(void* object) { |
511 | TensorSliceProto* _this = reinterpret_cast< TensorSliceProto* >(object); |
512 | (void)_this; |
513 | } |
514 | void TensorSliceProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
515 | } |
516 | void TensorSliceProto::SetCachedSize(int size) const { |
517 | _cached_size_.Set(size); |
518 | } |
519 | const TensorSliceProto& TensorSliceProto::default_instance() { |
520 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TensorSliceProto_tensorflow_2fcore_2fframework_2ftensor_5fslice_2eproto.base); |
521 | return *internal_default_instance(); |
522 | } |
523 | |
524 | |
525 | void TensorSliceProto::Clear() { |
526 | // @@protoc_insertion_point(message_clear_start:tensorflow.TensorSliceProto) |
527 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
528 | // Prevent compiler warnings about cached_has_bits being unused |
529 | (void) cached_has_bits; |
530 | |
531 | extent_.Clear(); |
532 | _internal_metadata_.Clear(); |
533 | } |
534 | |
535 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
536 | const char* TensorSliceProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
537 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
538 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
539 | while (!ctx->Done(&ptr)) { |
540 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
541 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
542 | CHK_(ptr); |
543 | switch (tag >> 3) { |
544 | // repeated .tensorflow.TensorSliceProto.Extent extent = 1; |
545 | case 1: |
546 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
547 | ptr -= 1; |
548 | do { |
549 | ptr += 1; |
550 | ptr = ctx->ParseMessage(add_extent(), ptr); |
551 | CHK_(ptr); |
552 | if (!ctx->DataAvailable(ptr)) break; |
553 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); |
554 | } else goto handle_unusual; |
555 | continue; |
556 | default: { |
557 | handle_unusual: |
558 | if ((tag & 7) == 4 || tag == 0) { |
559 | ctx->SetLastTag(tag); |
560 | goto success; |
561 | } |
562 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
563 | CHK_(ptr != nullptr); |
564 | continue; |
565 | } |
566 | } // switch |
567 | } // while |
568 | success: |
569 | return ptr; |
570 | failure: |
571 | ptr = nullptr; |
572 | goto success; |
573 | #undef CHK_ |
574 | } |
575 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
576 | bool TensorSliceProto::MergePartialFromCodedStream( |
577 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
578 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
579 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
580 | // @@protoc_insertion_point(parse_start:tensorflow.TensorSliceProto) |
581 | for (;;) { |
582 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
583 | tag = p.first; |
584 | if (!p.second) goto handle_unusual; |
585 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
586 | // repeated .tensorflow.TensorSliceProto.Extent extent = 1; |
587 | case 1: { |
588 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
589 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
590 | input, add_extent())); |
591 | } else { |
592 | goto handle_unusual; |
593 | } |
594 | break; |
595 | } |
596 | |
597 | default: { |
598 | handle_unusual: |
599 | if (tag == 0) { |
600 | goto success; |
601 | } |
602 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
603 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
604 | break; |
605 | } |
606 | } |
607 | } |
608 | success: |
609 | // @@protoc_insertion_point(parse_success:tensorflow.TensorSliceProto) |
610 | return true; |
611 | failure: |
612 | // @@protoc_insertion_point(parse_failure:tensorflow.TensorSliceProto) |
613 | return false; |
614 | #undef DO_ |
615 | } |
616 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
617 | |
618 | void TensorSliceProto::SerializeWithCachedSizes( |
619 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
620 | // @@protoc_insertion_point(serialize_start:tensorflow.TensorSliceProto) |
621 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
622 | (void) cached_has_bits; |
623 | |
624 | // repeated .tensorflow.TensorSliceProto.Extent extent = 1; |
625 | for (unsigned int i = 0, |
626 | n = static_cast<unsigned int>(this->extent_size()); i < n; i++) { |
627 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
628 | 1, |
629 | this->extent(static_cast<int>(i)), |
630 | output); |
631 | } |
632 | |
633 | if (_internal_metadata_.have_unknown_fields()) { |
634 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
635 | _internal_metadata_.unknown_fields(), output); |
636 | } |
637 | // @@protoc_insertion_point(serialize_end:tensorflow.TensorSliceProto) |
638 | } |
639 | |
640 | ::PROTOBUF_NAMESPACE_ID::uint8* TensorSliceProto::InternalSerializeWithCachedSizesToArray( |
641 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
642 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorSliceProto) |
643 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
644 | (void) cached_has_bits; |
645 | |
646 | // repeated .tensorflow.TensorSliceProto.Extent extent = 1; |
647 | for (unsigned int i = 0, |
648 | n = static_cast<unsigned int>(this->extent_size()); i < n; i++) { |
649 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
650 | InternalWriteMessageToArray( |
651 | 1, this->extent(static_cast<int>(i)), target); |
652 | } |
653 | |
654 | if (_internal_metadata_.have_unknown_fields()) { |
655 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
656 | _internal_metadata_.unknown_fields(), target); |
657 | } |
658 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorSliceProto) |
659 | return target; |
660 | } |
661 | |
662 | size_t TensorSliceProto::ByteSizeLong() const { |
663 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorSliceProto) |
664 | size_t total_size = 0; |
665 | |
666 | if (_internal_metadata_.have_unknown_fields()) { |
667 | total_size += |
668 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
669 | _internal_metadata_.unknown_fields()); |
670 | } |
671 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
672 | // Prevent compiler warnings about cached_has_bits being unused |
673 | (void) cached_has_bits; |
674 | |
675 | // repeated .tensorflow.TensorSliceProto.Extent extent = 1; |
676 | { |
677 | unsigned int count = static_cast<unsigned int>(this->extent_size()); |
678 | total_size += 1UL * count; |
679 | for (unsigned int i = 0; i < count; i++) { |
680 | total_size += |
681 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
682 | this->extent(static_cast<int>(i))); |
683 | } |
684 | } |
685 | |
686 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
687 | SetCachedSize(cached_size); |
688 | return total_size; |
689 | } |
690 | |
691 | void TensorSliceProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
692 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorSliceProto) |
693 | GOOGLE_DCHECK_NE(&from, this); |
694 | const TensorSliceProto* source = |
695 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TensorSliceProto>( |
696 | &from); |
697 | if (source == nullptr) { |
698 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorSliceProto) |
699 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
700 | } else { |
701 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorSliceProto) |
702 | MergeFrom(*source); |
703 | } |
704 | } |
705 | |
706 | void TensorSliceProto::MergeFrom(const TensorSliceProto& from) { |
707 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorSliceProto) |
708 | GOOGLE_DCHECK_NE(&from, this); |
709 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
710 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
711 | (void) cached_has_bits; |
712 | |
713 | extent_.MergeFrom(from.extent_); |
714 | } |
715 | |
716 | void TensorSliceProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
717 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorSliceProto) |
718 | if (&from == this) return; |
719 | Clear(); |
720 | MergeFrom(from); |
721 | } |
722 | |
723 | void TensorSliceProto::CopyFrom(const TensorSliceProto& from) { |
724 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorSliceProto) |
725 | if (&from == this) return; |
726 | Clear(); |
727 | MergeFrom(from); |
728 | } |
729 | |
730 | bool TensorSliceProto::IsInitialized() const { |
731 | return true; |
732 | } |
733 | |
734 | void TensorSliceProto::InternalSwap(TensorSliceProto* other) { |
735 | using std::swap; |
736 | _internal_metadata_.Swap(&other->_internal_metadata_); |
737 | CastToBase(&extent_)->InternalSwap(CastToBase(&other->extent_)); |
738 | } |
739 | |
740 | ::PROTOBUF_NAMESPACE_ID::Metadata TensorSliceProto::GetMetadata() const { |
741 | return GetMetadataStatic(); |
742 | } |
743 | |
744 | |
745 | // @@protoc_insertion_point(namespace_scope) |
746 | } // namespace tensorflow |
747 | PROTOBUF_NAMESPACE_OPEN |
748 | template<> PROTOBUF_NOINLINE ::tensorflow::TensorSliceProto_Extent* Arena::CreateMaybeMessage< ::tensorflow::TensorSliceProto_Extent >(Arena* arena) { |
749 | return Arena::CreateMessageInternal< ::tensorflow::TensorSliceProto_Extent >(arena); |
750 | } |
751 | template<> PROTOBUF_NOINLINE ::tensorflow::TensorSliceProto* Arena::CreateMaybeMessage< ::tensorflow::TensorSliceProto >(Arena* arena) { |
752 | return Arena::CreateMessageInternal< ::tensorflow::TensorSliceProto >(arena); |
753 | } |
754 | PROTOBUF_NAMESPACE_CLOSE |
755 | |
756 | // @@protoc_insertion_point(global_scope) |
757 | #include <google/protobuf/port_undef.inc> |
758 | |