1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: tensorflow/python/framework/cpp_shape_inference.proto |
3 | |
4 | #include "tensorflow/python/framework/cpp_shape_inference.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_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CppShapeInferenceResult_HandleData_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto; |
19 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_CppShapeInferenceResult_HandleShapeAndType_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto; |
20 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FullTypeDef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto; |
21 | extern PROTOBUF_INTERNAL_EXPORT_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto; |
22 | namespace tensorflow { |
23 | class CppShapeInferenceResult_HandleShapeAndTypeDefaultTypeInternal { |
24 | public: |
25 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CppShapeInferenceResult_HandleShapeAndType> _instance; |
26 | } _CppShapeInferenceResult_HandleShapeAndType_default_instance_; |
27 | class CppShapeInferenceResult_HandleDataDefaultTypeInternal { |
28 | public: |
29 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CppShapeInferenceResult_HandleData> _instance; |
30 | } _CppShapeInferenceResult_HandleData_default_instance_; |
31 | class CppShapeInferenceResultDefaultTypeInternal { |
32 | public: |
33 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CppShapeInferenceResult> _instance; |
34 | } _CppShapeInferenceResult_default_instance_; |
35 | class CppShapeInferenceInputsNeededDefaultTypeInternal { |
36 | public: |
37 | ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<CppShapeInferenceInputsNeeded> _instance; |
38 | } _CppShapeInferenceInputsNeeded_default_instance_; |
39 | } // namespace tensorflow |
40 | static void InitDefaultsscc_info_CppShapeInferenceInputsNeeded_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto() { |
41 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
42 | |
43 | { |
44 | void* ptr = &::tensorflow::_CppShapeInferenceInputsNeeded_default_instance_; |
45 | new (ptr) ::tensorflow::CppShapeInferenceInputsNeeded(); |
46 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
47 | } |
48 | ::tensorflow::CppShapeInferenceInputsNeeded::InitAsDefaultInstance(); |
49 | } |
50 | |
51 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_CppShapeInferenceInputsNeeded_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto = |
52 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_CppShapeInferenceInputsNeeded_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto}, {}}; |
53 | |
54 | static void InitDefaultsscc_info_CppShapeInferenceResult_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto() { |
55 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
56 | |
57 | { |
58 | void* ptr = &::tensorflow::_CppShapeInferenceResult_default_instance_; |
59 | new (ptr) ::tensorflow::CppShapeInferenceResult(); |
60 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
61 | } |
62 | ::tensorflow::CppShapeInferenceResult::InitAsDefaultInstance(); |
63 | } |
64 | |
65 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_CppShapeInferenceResult_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto = |
66 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_CppShapeInferenceResult_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto}, { |
67 | &scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto.base, |
68 | &scc_info_CppShapeInferenceResult_HandleData_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base,}}; |
69 | |
70 | static void InitDefaultsscc_info_CppShapeInferenceResult_HandleData_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto() { |
71 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
72 | |
73 | { |
74 | void* ptr = &::tensorflow::_CppShapeInferenceResult_HandleData_default_instance_; |
75 | new (ptr) ::tensorflow::CppShapeInferenceResult_HandleData(); |
76 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
77 | } |
78 | ::tensorflow::CppShapeInferenceResult_HandleData::InitAsDefaultInstance(); |
79 | } |
80 | |
81 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_CppShapeInferenceResult_HandleData_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto = |
82 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_CppShapeInferenceResult_HandleData_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto}, { |
83 | &scc_info_CppShapeInferenceResult_HandleShapeAndType_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base,}}; |
84 | |
85 | static void InitDefaultsscc_info_CppShapeInferenceResult_HandleShapeAndType_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto() { |
86 | GOOGLE_PROTOBUF_VERIFY_VERSION; |
87 | |
88 | { |
89 | void* ptr = &::tensorflow::_CppShapeInferenceResult_HandleShapeAndType_default_instance_; |
90 | new (ptr) ::tensorflow::CppShapeInferenceResult_HandleShapeAndType(); |
91 | ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); |
92 | } |
93 | ::tensorflow::CppShapeInferenceResult_HandleShapeAndType::InitAsDefaultInstance(); |
94 | } |
95 | |
96 | ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_CppShapeInferenceResult_HandleShapeAndType_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto = |
97 | {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_CppShapeInferenceResult_HandleShapeAndType_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto}, { |
98 | &scc_info_TensorShapeProto_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto.base, |
99 | &scc_info_FullTypeDef_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto.base,}}; |
100 | |
101 | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto[4]; |
102 | static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto = nullptr; |
103 | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto = nullptr; |
104 | |
105 | const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
106 | ~0u, // no _has_bits_ |
107 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceResult_HandleShapeAndType, _internal_metadata_), |
108 | ~0u, // no _extensions_ |
109 | ~0u, // no _oneof_case_ |
110 | ~0u, // no _weak_field_map_ |
111 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceResult_HandleShapeAndType, shape_), |
112 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceResult_HandleShapeAndType, dtype_), |
113 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceResult_HandleShapeAndType, type_), |
114 | ~0u, // no _has_bits_ |
115 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceResult_HandleData, _internal_metadata_), |
116 | ~0u, // no _extensions_ |
117 | ~0u, // no _oneof_case_ |
118 | ~0u, // no _weak_field_map_ |
119 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceResult_HandleData, is_set_), |
120 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceResult_HandleData, shape_and_type_), |
121 | ~0u, // no _has_bits_ |
122 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceResult, _internal_metadata_), |
123 | ~0u, // no _extensions_ |
124 | ~0u, // no _oneof_case_ |
125 | ~0u, // no _weak_field_map_ |
126 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceResult, shape_), |
127 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceResult, handle_data_), |
128 | ~0u, // no _has_bits_ |
129 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceInputsNeeded, _internal_metadata_), |
130 | ~0u, // no _extensions_ |
131 | ~0u, // no _oneof_case_ |
132 | ~0u, // no _weak_field_map_ |
133 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceInputsNeeded, input_tensors_needed_), |
134 | PROTOBUF_FIELD_OFFSET(::tensorflow::CppShapeInferenceInputsNeeded, input_tensors_as_shapes_needed_), |
135 | }; |
136 | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
137 | { 0, -1, sizeof(::tensorflow::CppShapeInferenceResult_HandleShapeAndType)}, |
138 | { 8, -1, sizeof(::tensorflow::CppShapeInferenceResult_HandleData)}, |
139 | { 15, -1, sizeof(::tensorflow::CppShapeInferenceResult)}, |
140 | { 22, -1, sizeof(::tensorflow::CppShapeInferenceInputsNeeded)}, |
141 | }; |
142 | |
143 | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
144 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_CppShapeInferenceResult_HandleShapeAndType_default_instance_), |
145 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_CppShapeInferenceResult_HandleData_default_instance_), |
146 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_CppShapeInferenceResult_default_instance_), |
147 | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_CppShapeInferenceInputsNeeded_default_instance_), |
148 | }; |
149 | |
150 | const char descriptor_table_protodef_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
151 | "\n5tensorflow/python/framework/cpp_shape_" |
152 | "inference.proto\022\ntensorflow\032)tensorflow/" |
153 | "core/framework/full_type.proto\032,tensorfl" |
154 | "ow/core/framework/tensor_shape.proto\032%te" |
155 | "nsorflow/core/framework/types.proto\"\233\003\n\027" |
156 | "CppShapeInferenceResult\022+\n\005shape\030\001 \001(\0132\034" |
157 | ".tensorflow.TensorShapeProto\022C\n\013handle_d" |
158 | "ata\030\004 \001(\0132..tensorflow.CppShapeInference" |
159 | "Result.HandleData\032\223\001\n\022HandleShapeAndType" |
160 | "\022+\n\005shape\030\001 \001(\0132\034.tensorflow.TensorShape" |
161 | "Proto\022#\n\005dtype\030\002 \001(\0162\024.tensorflow.DataTy" |
162 | "pe\022%\n\004type\030\004 \001(\0132\027.tensorflow.FullTypeDe" |
163 | "fJ\004\010\003\020\004\032l\n\nHandleData\022\016\n\006is_set\030\001 \001(\010\022N\n" |
164 | "\016shape_and_type\030\002 \003(\01326.tensorflow.CppSh" |
165 | "apeInferenceResult.HandleShapeAndTypeJ\004\010" |
166 | "\002\020\003J\004\010\003\020\004\"e\n\035CppShapeInferenceInputsNeed" |
167 | "ed\022\034\n\024input_tensors_needed\030\001 \003(\005\022&\n\036inpu" |
168 | "t_tensors_as_shapes_needed\030\002 \003(\005BaZ\\gith" |
169 | "ub.com/tensorflow/tensorflow/tensorflow/" |
170 | "go/python/framework/cpp_shape_inference_" |
171 | "go_proto\370\001\001b\006proto3" |
172 | ; |
173 | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto_deps[3] = { |
174 | &::descriptor_table_tensorflow_2fcore_2fframework_2ffull_5ftype_2eproto, |
175 | &::descriptor_table_tensorflow_2fcore_2fframework_2ftensor_5fshape_2eproto, |
176 | &::descriptor_table_tensorflow_2fcore_2fframework_2ftypes_2eproto, |
177 | }; |
178 | static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto_sccs[4] = { |
179 | &scc_info_CppShapeInferenceInputsNeeded_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base, |
180 | &scc_info_CppShapeInferenceResult_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base, |
181 | &scc_info_CppShapeInferenceResult_HandleData_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base, |
182 | &scc_info_CppShapeInferenceResult_HandleShapeAndType_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base, |
183 | }; |
184 | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto_once; |
185 | static bool descriptor_table_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto_initialized = false; |
186 | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto = { |
187 | &descriptor_table_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto_initialized, descriptor_table_protodef_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto, "tensorflow/python/framework/cpp_shape_inference.proto" , 819, |
188 | &descriptor_table_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto_once, descriptor_table_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto_sccs, descriptor_table_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto_deps, 4, 3, |
189 | schemas, file_default_instances, TableStruct_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto::offsets, |
190 | file_level_metadata_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto, 4, file_level_enum_descriptors_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto, file_level_service_descriptors_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto, |
191 | }; |
192 | |
193 | // Force running AddDescriptors() at dynamic initialization time. |
194 | static bool dynamic_init_dummy_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto), true); |
195 | namespace tensorflow { |
196 | |
197 | // =================================================================== |
198 | |
199 | void CppShapeInferenceResult_HandleShapeAndType::InitAsDefaultInstance() { |
200 | ::tensorflow::_CppShapeInferenceResult_HandleShapeAndType_default_instance_._instance.get_mutable()->shape_ = const_cast< ::tensorflow::TensorShapeProto*>( |
201 | ::tensorflow::TensorShapeProto::internal_default_instance()); |
202 | ::tensorflow::_CppShapeInferenceResult_HandleShapeAndType_default_instance_._instance.get_mutable()->type_ = const_cast< ::tensorflow::FullTypeDef*>( |
203 | ::tensorflow::FullTypeDef::internal_default_instance()); |
204 | } |
205 | class CppShapeInferenceResult_HandleShapeAndType::_Internal { |
206 | public: |
207 | static const ::tensorflow::TensorShapeProto& shape(const CppShapeInferenceResult_HandleShapeAndType* msg); |
208 | static const ::tensorflow::FullTypeDef& type(const CppShapeInferenceResult_HandleShapeAndType* msg); |
209 | }; |
210 | |
211 | const ::tensorflow::TensorShapeProto& |
212 | CppShapeInferenceResult_HandleShapeAndType::_Internal::shape(const CppShapeInferenceResult_HandleShapeAndType* msg) { |
213 | return *msg->shape_; |
214 | } |
215 | const ::tensorflow::FullTypeDef& |
216 | CppShapeInferenceResult_HandleShapeAndType::_Internal::type(const CppShapeInferenceResult_HandleShapeAndType* msg) { |
217 | return *msg->type_; |
218 | } |
219 | void CppShapeInferenceResult_HandleShapeAndType::unsafe_arena_set_allocated_shape( |
220 | ::tensorflow::TensorShapeProto* shape) { |
221 | if (GetArenaNoVirtual() == nullptr) { |
222 | delete shape_; |
223 | } |
224 | shape_ = shape; |
225 | if (shape) { |
226 | |
227 | } else { |
228 | |
229 | } |
230 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CppShapeInferenceResult.HandleShapeAndType.shape) |
231 | } |
232 | void CppShapeInferenceResult_HandleShapeAndType::clear_shape() { |
233 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
234 | delete shape_; |
235 | } |
236 | shape_ = nullptr; |
237 | } |
238 | void CppShapeInferenceResult_HandleShapeAndType::unsafe_arena_set_allocated_type( |
239 | ::tensorflow::FullTypeDef* type) { |
240 | if (GetArenaNoVirtual() == nullptr) { |
241 | delete type_; |
242 | } |
243 | type_ = type; |
244 | if (type) { |
245 | |
246 | } else { |
247 | |
248 | } |
249 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CppShapeInferenceResult.HandleShapeAndType.type) |
250 | } |
251 | void CppShapeInferenceResult_HandleShapeAndType::clear_type() { |
252 | if (GetArenaNoVirtual() == nullptr && type_ != nullptr) { |
253 | delete type_; |
254 | } |
255 | type_ = nullptr; |
256 | } |
257 | CppShapeInferenceResult_HandleShapeAndType::CppShapeInferenceResult_HandleShapeAndType() |
258 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
259 | SharedCtor(); |
260 | // @@protoc_insertion_point(constructor:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
261 | } |
262 | CppShapeInferenceResult_HandleShapeAndType::CppShapeInferenceResult_HandleShapeAndType(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
263 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
264 | _internal_metadata_(arena) { |
265 | SharedCtor(); |
266 | RegisterArenaDtor(arena); |
267 | // @@protoc_insertion_point(arena_constructor:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
268 | } |
269 | CppShapeInferenceResult_HandleShapeAndType::CppShapeInferenceResult_HandleShapeAndType(const CppShapeInferenceResult_HandleShapeAndType& from) |
270 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
271 | _internal_metadata_(nullptr) { |
272 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
273 | if (from.has_shape()) { |
274 | shape_ = new ::tensorflow::TensorShapeProto(*from.shape_); |
275 | } else { |
276 | shape_ = nullptr; |
277 | } |
278 | if (from.has_type()) { |
279 | type_ = new ::tensorflow::FullTypeDef(*from.type_); |
280 | } else { |
281 | type_ = nullptr; |
282 | } |
283 | dtype_ = from.dtype_; |
284 | // @@protoc_insertion_point(copy_constructor:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
285 | } |
286 | |
287 | void CppShapeInferenceResult_HandleShapeAndType::SharedCtor() { |
288 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CppShapeInferenceResult_HandleShapeAndType_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base); |
289 | ::memset(&shape_, 0, static_cast<size_t>( |
290 | reinterpret_cast<char*>(&dtype_) - |
291 | reinterpret_cast<char*>(&shape_)) + sizeof(dtype_)); |
292 | } |
293 | |
294 | CppShapeInferenceResult_HandleShapeAndType::~CppShapeInferenceResult_HandleShapeAndType() { |
295 | // @@protoc_insertion_point(destructor:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
296 | SharedDtor(); |
297 | } |
298 | |
299 | void CppShapeInferenceResult_HandleShapeAndType::SharedDtor() { |
300 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
301 | if (this != internal_default_instance()) delete shape_; |
302 | if (this != internal_default_instance()) delete type_; |
303 | } |
304 | |
305 | void CppShapeInferenceResult_HandleShapeAndType::ArenaDtor(void* object) { |
306 | CppShapeInferenceResult_HandleShapeAndType* _this = reinterpret_cast< CppShapeInferenceResult_HandleShapeAndType* >(object); |
307 | (void)_this; |
308 | } |
309 | void CppShapeInferenceResult_HandleShapeAndType::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
310 | } |
311 | void CppShapeInferenceResult_HandleShapeAndType::SetCachedSize(int size) const { |
312 | _cached_size_.Set(size); |
313 | } |
314 | const CppShapeInferenceResult_HandleShapeAndType& CppShapeInferenceResult_HandleShapeAndType::default_instance() { |
315 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CppShapeInferenceResult_HandleShapeAndType_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base); |
316 | return *internal_default_instance(); |
317 | } |
318 | |
319 | |
320 | void CppShapeInferenceResult_HandleShapeAndType::Clear() { |
321 | // @@protoc_insertion_point(message_clear_start:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
322 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
323 | // Prevent compiler warnings about cached_has_bits being unused |
324 | (void) cached_has_bits; |
325 | |
326 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
327 | delete shape_; |
328 | } |
329 | shape_ = nullptr; |
330 | if (GetArenaNoVirtual() == nullptr && type_ != nullptr) { |
331 | delete type_; |
332 | } |
333 | type_ = nullptr; |
334 | dtype_ = 0; |
335 | _internal_metadata_.Clear(); |
336 | } |
337 | |
338 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
339 | const char* CppShapeInferenceResult_HandleShapeAndType::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
340 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
341 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
342 | while (!ctx->Done(&ptr)) { |
343 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
344 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
345 | CHK_(ptr); |
346 | switch (tag >> 3) { |
347 | // .tensorflow.TensorShapeProto shape = 1; |
348 | case 1: |
349 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
350 | ptr = ctx->ParseMessage(mutable_shape(), ptr); |
351 | CHK_(ptr); |
352 | } else goto handle_unusual; |
353 | continue; |
354 | // .tensorflow.DataType dtype = 2; |
355 | case 2: |
356 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { |
357 | ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
358 | CHK_(ptr); |
359 | set_dtype(static_cast<::tensorflow::DataType>(val)); |
360 | } else goto handle_unusual; |
361 | continue; |
362 | // .tensorflow.FullTypeDef type = 4; |
363 | case 4: |
364 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
365 | ptr = ctx->ParseMessage(mutable_type(), ptr); |
366 | CHK_(ptr); |
367 | } else goto handle_unusual; |
368 | continue; |
369 | default: { |
370 | handle_unusual: |
371 | if ((tag & 7) == 4 || tag == 0) { |
372 | ctx->SetLastTag(tag); |
373 | goto success; |
374 | } |
375 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
376 | CHK_(ptr != nullptr); |
377 | continue; |
378 | } |
379 | } // switch |
380 | } // while |
381 | success: |
382 | return ptr; |
383 | failure: |
384 | ptr = nullptr; |
385 | goto success; |
386 | #undef CHK_ |
387 | } |
388 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
389 | bool CppShapeInferenceResult_HandleShapeAndType::MergePartialFromCodedStream( |
390 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
391 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
392 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
393 | // @@protoc_insertion_point(parse_start:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
394 | for (;;) { |
395 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
396 | tag = p.first; |
397 | if (!p.second) goto handle_unusual; |
398 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
399 | // .tensorflow.TensorShapeProto shape = 1; |
400 | case 1: { |
401 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
402 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
403 | input, mutable_shape())); |
404 | } else { |
405 | goto handle_unusual; |
406 | } |
407 | break; |
408 | } |
409 | |
410 | // .tensorflow.DataType dtype = 2; |
411 | case 2: { |
412 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
413 | int value = 0; |
414 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
415 | int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( |
416 | input, &value))); |
417 | set_dtype(static_cast< ::tensorflow::DataType >(value)); |
418 | } else { |
419 | goto handle_unusual; |
420 | } |
421 | break; |
422 | } |
423 | |
424 | // .tensorflow.FullTypeDef type = 4; |
425 | case 4: { |
426 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
427 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
428 | input, mutable_type())); |
429 | } else { |
430 | goto handle_unusual; |
431 | } |
432 | break; |
433 | } |
434 | |
435 | default: { |
436 | handle_unusual: |
437 | if (tag == 0) { |
438 | goto success; |
439 | } |
440 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
441 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
442 | break; |
443 | } |
444 | } |
445 | } |
446 | success: |
447 | // @@protoc_insertion_point(parse_success:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
448 | return true; |
449 | failure: |
450 | // @@protoc_insertion_point(parse_failure:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
451 | return false; |
452 | #undef DO_ |
453 | } |
454 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
455 | |
456 | void CppShapeInferenceResult_HandleShapeAndType::SerializeWithCachedSizes( |
457 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
458 | // @@protoc_insertion_point(serialize_start:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
459 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
460 | (void) cached_has_bits; |
461 | |
462 | // .tensorflow.TensorShapeProto shape = 1; |
463 | if (this->has_shape()) { |
464 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
465 | 1, _Internal::shape(this), output); |
466 | } |
467 | |
468 | // .tensorflow.DataType dtype = 2; |
469 | if (this->dtype() != 0) { |
470 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( |
471 | 2, this->dtype(), output); |
472 | } |
473 | |
474 | // .tensorflow.FullTypeDef type = 4; |
475 | if (this->has_type()) { |
476 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
477 | 4, _Internal::type(this), output); |
478 | } |
479 | |
480 | if (_internal_metadata_.have_unknown_fields()) { |
481 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
482 | _internal_metadata_.unknown_fields(), output); |
483 | } |
484 | // @@protoc_insertion_point(serialize_end:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
485 | } |
486 | |
487 | ::PROTOBUF_NAMESPACE_ID::uint8* CppShapeInferenceResult_HandleShapeAndType::InternalSerializeWithCachedSizesToArray( |
488 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
489 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
490 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
491 | (void) cached_has_bits; |
492 | |
493 | // .tensorflow.TensorShapeProto shape = 1; |
494 | if (this->has_shape()) { |
495 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
496 | InternalWriteMessageToArray( |
497 | 1, _Internal::shape(this), target); |
498 | } |
499 | |
500 | // .tensorflow.DataType dtype = 2; |
501 | if (this->dtype() != 0) { |
502 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( |
503 | 2, this->dtype(), target); |
504 | } |
505 | |
506 | // .tensorflow.FullTypeDef type = 4; |
507 | if (this->has_type()) { |
508 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
509 | InternalWriteMessageToArray( |
510 | 4, _Internal::type(this), target); |
511 | } |
512 | |
513 | if (_internal_metadata_.have_unknown_fields()) { |
514 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
515 | _internal_metadata_.unknown_fields(), target); |
516 | } |
517 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
518 | return target; |
519 | } |
520 | |
521 | size_t CppShapeInferenceResult_HandleShapeAndType::ByteSizeLong() const { |
522 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
523 | size_t total_size = 0; |
524 | |
525 | if (_internal_metadata_.have_unknown_fields()) { |
526 | total_size += |
527 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
528 | _internal_metadata_.unknown_fields()); |
529 | } |
530 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
531 | // Prevent compiler warnings about cached_has_bits being unused |
532 | (void) cached_has_bits; |
533 | |
534 | // .tensorflow.TensorShapeProto shape = 1; |
535 | if (this->has_shape()) { |
536 | total_size += 1 + |
537 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
538 | *shape_); |
539 | } |
540 | |
541 | // .tensorflow.FullTypeDef type = 4; |
542 | if (this->has_type()) { |
543 | total_size += 1 + |
544 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
545 | *type_); |
546 | } |
547 | |
548 | // .tensorflow.DataType dtype = 2; |
549 | if (this->dtype() != 0) { |
550 | total_size += 1 + |
551 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->dtype()); |
552 | } |
553 | |
554 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
555 | SetCachedSize(cached_size); |
556 | return total_size; |
557 | } |
558 | |
559 | void CppShapeInferenceResult_HandleShapeAndType::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
560 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
561 | GOOGLE_DCHECK_NE(&from, this); |
562 | const CppShapeInferenceResult_HandleShapeAndType* source = |
563 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CppShapeInferenceResult_HandleShapeAndType>( |
564 | &from); |
565 | if (source == nullptr) { |
566 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
567 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
568 | } else { |
569 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
570 | MergeFrom(*source); |
571 | } |
572 | } |
573 | |
574 | void CppShapeInferenceResult_HandleShapeAndType::MergeFrom(const CppShapeInferenceResult_HandleShapeAndType& from) { |
575 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
576 | GOOGLE_DCHECK_NE(&from, this); |
577 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
578 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
579 | (void) cached_has_bits; |
580 | |
581 | if (from.has_shape()) { |
582 | mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.shape()); |
583 | } |
584 | if (from.has_type()) { |
585 | mutable_type()->::tensorflow::FullTypeDef::MergeFrom(from.type()); |
586 | } |
587 | if (from.dtype() != 0) { |
588 | set_dtype(from.dtype()); |
589 | } |
590 | } |
591 | |
592 | void CppShapeInferenceResult_HandleShapeAndType::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
593 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
594 | if (&from == this) return; |
595 | Clear(); |
596 | MergeFrom(from); |
597 | } |
598 | |
599 | void CppShapeInferenceResult_HandleShapeAndType::CopyFrom(const CppShapeInferenceResult_HandleShapeAndType& from) { |
600 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CppShapeInferenceResult.HandleShapeAndType) |
601 | if (&from == this) return; |
602 | Clear(); |
603 | MergeFrom(from); |
604 | } |
605 | |
606 | bool CppShapeInferenceResult_HandleShapeAndType::IsInitialized() const { |
607 | return true; |
608 | } |
609 | |
610 | void CppShapeInferenceResult_HandleShapeAndType::InternalSwap(CppShapeInferenceResult_HandleShapeAndType* other) { |
611 | using std::swap; |
612 | _internal_metadata_.Swap(&other->_internal_metadata_); |
613 | swap(shape_, other->shape_); |
614 | swap(type_, other->type_); |
615 | swap(dtype_, other->dtype_); |
616 | } |
617 | |
618 | ::PROTOBUF_NAMESPACE_ID::Metadata CppShapeInferenceResult_HandleShapeAndType::GetMetadata() const { |
619 | return GetMetadataStatic(); |
620 | } |
621 | |
622 | |
623 | // =================================================================== |
624 | |
625 | void CppShapeInferenceResult_HandleData::InitAsDefaultInstance() { |
626 | } |
627 | class CppShapeInferenceResult_HandleData::_Internal { |
628 | public: |
629 | }; |
630 | |
631 | CppShapeInferenceResult_HandleData::CppShapeInferenceResult_HandleData() |
632 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
633 | SharedCtor(); |
634 | // @@protoc_insertion_point(constructor:tensorflow.CppShapeInferenceResult.HandleData) |
635 | } |
636 | CppShapeInferenceResult_HandleData::CppShapeInferenceResult_HandleData(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
637 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
638 | _internal_metadata_(arena), |
639 | shape_and_type_(arena) { |
640 | SharedCtor(); |
641 | RegisterArenaDtor(arena); |
642 | // @@protoc_insertion_point(arena_constructor:tensorflow.CppShapeInferenceResult.HandleData) |
643 | } |
644 | CppShapeInferenceResult_HandleData::CppShapeInferenceResult_HandleData(const CppShapeInferenceResult_HandleData& from) |
645 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
646 | _internal_metadata_(nullptr), |
647 | shape_and_type_(from.shape_and_type_) { |
648 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
649 | is_set_ = from.is_set_; |
650 | // @@protoc_insertion_point(copy_constructor:tensorflow.CppShapeInferenceResult.HandleData) |
651 | } |
652 | |
653 | void CppShapeInferenceResult_HandleData::SharedCtor() { |
654 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CppShapeInferenceResult_HandleData_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base); |
655 | is_set_ = false; |
656 | } |
657 | |
658 | CppShapeInferenceResult_HandleData::~CppShapeInferenceResult_HandleData() { |
659 | // @@protoc_insertion_point(destructor:tensorflow.CppShapeInferenceResult.HandleData) |
660 | SharedDtor(); |
661 | } |
662 | |
663 | void CppShapeInferenceResult_HandleData::SharedDtor() { |
664 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
665 | } |
666 | |
667 | void CppShapeInferenceResult_HandleData::ArenaDtor(void* object) { |
668 | CppShapeInferenceResult_HandleData* _this = reinterpret_cast< CppShapeInferenceResult_HandleData* >(object); |
669 | (void)_this; |
670 | } |
671 | void CppShapeInferenceResult_HandleData::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
672 | } |
673 | void CppShapeInferenceResult_HandleData::SetCachedSize(int size) const { |
674 | _cached_size_.Set(size); |
675 | } |
676 | const CppShapeInferenceResult_HandleData& CppShapeInferenceResult_HandleData::default_instance() { |
677 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CppShapeInferenceResult_HandleData_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base); |
678 | return *internal_default_instance(); |
679 | } |
680 | |
681 | |
682 | void CppShapeInferenceResult_HandleData::Clear() { |
683 | // @@protoc_insertion_point(message_clear_start:tensorflow.CppShapeInferenceResult.HandleData) |
684 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
685 | // Prevent compiler warnings about cached_has_bits being unused |
686 | (void) cached_has_bits; |
687 | |
688 | shape_and_type_.Clear(); |
689 | is_set_ = false; |
690 | _internal_metadata_.Clear(); |
691 | } |
692 | |
693 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
694 | const char* CppShapeInferenceResult_HandleData::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
695 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
696 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
697 | while (!ctx->Done(&ptr)) { |
698 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
699 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
700 | CHK_(ptr); |
701 | switch (tag >> 3) { |
702 | // bool is_set = 1; |
703 | case 1: |
704 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { |
705 | is_set_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); |
706 | CHK_(ptr); |
707 | } else goto handle_unusual; |
708 | continue; |
709 | // repeated .tensorflow.CppShapeInferenceResult.HandleShapeAndType shape_and_type = 2; |
710 | case 2: |
711 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
712 | ptr -= 1; |
713 | do { |
714 | ptr += 1; |
715 | ptr = ctx->ParseMessage(add_shape_and_type(), ptr); |
716 | CHK_(ptr); |
717 | if (!ctx->DataAvailable(ptr)) break; |
718 | } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); |
719 | } else goto handle_unusual; |
720 | continue; |
721 | default: { |
722 | handle_unusual: |
723 | if ((tag & 7) == 4 || tag == 0) { |
724 | ctx->SetLastTag(tag); |
725 | goto success; |
726 | } |
727 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
728 | CHK_(ptr != nullptr); |
729 | continue; |
730 | } |
731 | } // switch |
732 | } // while |
733 | success: |
734 | return ptr; |
735 | failure: |
736 | ptr = nullptr; |
737 | goto success; |
738 | #undef CHK_ |
739 | } |
740 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
741 | bool CppShapeInferenceResult_HandleData::MergePartialFromCodedStream( |
742 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
743 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
744 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
745 | // @@protoc_insertion_point(parse_start:tensorflow.CppShapeInferenceResult.HandleData) |
746 | for (;;) { |
747 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
748 | tag = p.first; |
749 | if (!p.second) goto handle_unusual; |
750 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
751 | // bool is_set = 1; |
752 | case 1: { |
753 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
754 | |
755 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< |
756 | bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( |
757 | input, &is_set_))); |
758 | } else { |
759 | goto handle_unusual; |
760 | } |
761 | break; |
762 | } |
763 | |
764 | // repeated .tensorflow.CppShapeInferenceResult.HandleShapeAndType shape_and_type = 2; |
765 | case 2: { |
766 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
767 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
768 | input, add_shape_and_type())); |
769 | } else { |
770 | goto handle_unusual; |
771 | } |
772 | break; |
773 | } |
774 | |
775 | default: { |
776 | handle_unusual: |
777 | if (tag == 0) { |
778 | goto success; |
779 | } |
780 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
781 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
782 | break; |
783 | } |
784 | } |
785 | } |
786 | success: |
787 | // @@protoc_insertion_point(parse_success:tensorflow.CppShapeInferenceResult.HandleData) |
788 | return true; |
789 | failure: |
790 | // @@protoc_insertion_point(parse_failure:tensorflow.CppShapeInferenceResult.HandleData) |
791 | return false; |
792 | #undef DO_ |
793 | } |
794 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
795 | |
796 | void CppShapeInferenceResult_HandleData::SerializeWithCachedSizes( |
797 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
798 | // @@protoc_insertion_point(serialize_start:tensorflow.CppShapeInferenceResult.HandleData) |
799 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
800 | (void) cached_has_bits; |
801 | |
802 | // bool is_set = 1; |
803 | if (this->is_set() != 0) { |
804 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(1, this->is_set(), output); |
805 | } |
806 | |
807 | // repeated .tensorflow.CppShapeInferenceResult.HandleShapeAndType shape_and_type = 2; |
808 | for (unsigned int i = 0, |
809 | n = static_cast<unsigned int>(this->shape_and_type_size()); i < n; i++) { |
810 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
811 | 2, |
812 | this->shape_and_type(static_cast<int>(i)), |
813 | output); |
814 | } |
815 | |
816 | if (_internal_metadata_.have_unknown_fields()) { |
817 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
818 | _internal_metadata_.unknown_fields(), output); |
819 | } |
820 | // @@protoc_insertion_point(serialize_end:tensorflow.CppShapeInferenceResult.HandleData) |
821 | } |
822 | |
823 | ::PROTOBUF_NAMESPACE_ID::uint8* CppShapeInferenceResult_HandleData::InternalSerializeWithCachedSizesToArray( |
824 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
825 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CppShapeInferenceResult.HandleData) |
826 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
827 | (void) cached_has_bits; |
828 | |
829 | // bool is_set = 1; |
830 | if (this->is_set() != 0) { |
831 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->is_set(), target); |
832 | } |
833 | |
834 | // repeated .tensorflow.CppShapeInferenceResult.HandleShapeAndType shape_and_type = 2; |
835 | for (unsigned int i = 0, |
836 | n = static_cast<unsigned int>(this->shape_and_type_size()); i < n; i++) { |
837 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
838 | InternalWriteMessageToArray( |
839 | 2, this->shape_and_type(static_cast<int>(i)), target); |
840 | } |
841 | |
842 | if (_internal_metadata_.have_unknown_fields()) { |
843 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
844 | _internal_metadata_.unknown_fields(), target); |
845 | } |
846 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CppShapeInferenceResult.HandleData) |
847 | return target; |
848 | } |
849 | |
850 | size_t CppShapeInferenceResult_HandleData::ByteSizeLong() const { |
851 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.CppShapeInferenceResult.HandleData) |
852 | size_t total_size = 0; |
853 | |
854 | if (_internal_metadata_.have_unknown_fields()) { |
855 | total_size += |
856 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
857 | _internal_metadata_.unknown_fields()); |
858 | } |
859 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
860 | // Prevent compiler warnings about cached_has_bits being unused |
861 | (void) cached_has_bits; |
862 | |
863 | // repeated .tensorflow.CppShapeInferenceResult.HandleShapeAndType shape_and_type = 2; |
864 | { |
865 | unsigned int count = static_cast<unsigned int>(this->shape_and_type_size()); |
866 | total_size += 1UL * count; |
867 | for (unsigned int i = 0; i < count; i++) { |
868 | total_size += |
869 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
870 | this->shape_and_type(static_cast<int>(i))); |
871 | } |
872 | } |
873 | |
874 | // bool is_set = 1; |
875 | if (this->is_set() != 0) { |
876 | total_size += 1 + 1; |
877 | } |
878 | |
879 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
880 | SetCachedSize(cached_size); |
881 | return total_size; |
882 | } |
883 | |
884 | void CppShapeInferenceResult_HandleData::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
885 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.CppShapeInferenceResult.HandleData) |
886 | GOOGLE_DCHECK_NE(&from, this); |
887 | const CppShapeInferenceResult_HandleData* source = |
888 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CppShapeInferenceResult_HandleData>( |
889 | &from); |
890 | if (source == nullptr) { |
891 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.CppShapeInferenceResult.HandleData) |
892 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
893 | } else { |
894 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.CppShapeInferenceResult.HandleData) |
895 | MergeFrom(*source); |
896 | } |
897 | } |
898 | |
899 | void CppShapeInferenceResult_HandleData::MergeFrom(const CppShapeInferenceResult_HandleData& from) { |
900 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CppShapeInferenceResult.HandleData) |
901 | GOOGLE_DCHECK_NE(&from, this); |
902 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
903 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
904 | (void) cached_has_bits; |
905 | |
906 | shape_and_type_.MergeFrom(from.shape_and_type_); |
907 | if (from.is_set() != 0) { |
908 | set_is_set(from.is_set()); |
909 | } |
910 | } |
911 | |
912 | void CppShapeInferenceResult_HandleData::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
913 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.CppShapeInferenceResult.HandleData) |
914 | if (&from == this) return; |
915 | Clear(); |
916 | MergeFrom(from); |
917 | } |
918 | |
919 | void CppShapeInferenceResult_HandleData::CopyFrom(const CppShapeInferenceResult_HandleData& from) { |
920 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CppShapeInferenceResult.HandleData) |
921 | if (&from == this) return; |
922 | Clear(); |
923 | MergeFrom(from); |
924 | } |
925 | |
926 | bool CppShapeInferenceResult_HandleData::IsInitialized() const { |
927 | return true; |
928 | } |
929 | |
930 | void CppShapeInferenceResult_HandleData::InternalSwap(CppShapeInferenceResult_HandleData* other) { |
931 | using std::swap; |
932 | _internal_metadata_.Swap(&other->_internal_metadata_); |
933 | CastToBase(&shape_and_type_)->InternalSwap(CastToBase(&other->shape_and_type_)); |
934 | swap(is_set_, other->is_set_); |
935 | } |
936 | |
937 | ::PROTOBUF_NAMESPACE_ID::Metadata CppShapeInferenceResult_HandleData::GetMetadata() const { |
938 | return GetMetadataStatic(); |
939 | } |
940 | |
941 | |
942 | // =================================================================== |
943 | |
944 | void CppShapeInferenceResult::InitAsDefaultInstance() { |
945 | ::tensorflow::_CppShapeInferenceResult_default_instance_._instance.get_mutable()->shape_ = const_cast< ::tensorflow::TensorShapeProto*>( |
946 | ::tensorflow::TensorShapeProto::internal_default_instance()); |
947 | ::tensorflow::_CppShapeInferenceResult_default_instance_._instance.get_mutable()->handle_data_ = const_cast< ::tensorflow::CppShapeInferenceResult_HandleData*>( |
948 | ::tensorflow::CppShapeInferenceResult_HandleData::internal_default_instance()); |
949 | } |
950 | class CppShapeInferenceResult::_Internal { |
951 | public: |
952 | static const ::tensorflow::TensorShapeProto& shape(const CppShapeInferenceResult* msg); |
953 | static const ::tensorflow::CppShapeInferenceResult_HandleData& handle_data(const CppShapeInferenceResult* msg); |
954 | }; |
955 | |
956 | const ::tensorflow::TensorShapeProto& |
957 | CppShapeInferenceResult::_Internal::shape(const CppShapeInferenceResult* msg) { |
958 | return *msg->shape_; |
959 | } |
960 | const ::tensorflow::CppShapeInferenceResult_HandleData& |
961 | CppShapeInferenceResult::_Internal::handle_data(const CppShapeInferenceResult* msg) { |
962 | return *msg->handle_data_; |
963 | } |
964 | void CppShapeInferenceResult::unsafe_arena_set_allocated_shape( |
965 | ::tensorflow::TensorShapeProto* shape) { |
966 | if (GetArenaNoVirtual() == nullptr) { |
967 | delete shape_; |
968 | } |
969 | shape_ = shape; |
970 | if (shape) { |
971 | |
972 | } else { |
973 | |
974 | } |
975 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CppShapeInferenceResult.shape) |
976 | } |
977 | void CppShapeInferenceResult::clear_shape() { |
978 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
979 | delete shape_; |
980 | } |
981 | shape_ = nullptr; |
982 | } |
983 | void CppShapeInferenceResult::unsafe_arena_set_allocated_handle_data( |
984 | ::tensorflow::CppShapeInferenceResult_HandleData* handle_data) { |
985 | if (GetArenaNoVirtual() == nullptr) { |
986 | delete handle_data_; |
987 | } |
988 | handle_data_ = handle_data; |
989 | if (handle_data) { |
990 | |
991 | } else { |
992 | |
993 | } |
994 | // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.CppShapeInferenceResult.handle_data) |
995 | } |
996 | CppShapeInferenceResult::CppShapeInferenceResult() |
997 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
998 | SharedCtor(); |
999 | // @@protoc_insertion_point(constructor:tensorflow.CppShapeInferenceResult) |
1000 | } |
1001 | CppShapeInferenceResult::CppShapeInferenceResult(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
1002 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1003 | _internal_metadata_(arena) { |
1004 | SharedCtor(); |
1005 | RegisterArenaDtor(arena); |
1006 | // @@protoc_insertion_point(arena_constructor:tensorflow.CppShapeInferenceResult) |
1007 | } |
1008 | CppShapeInferenceResult::CppShapeInferenceResult(const CppShapeInferenceResult& from) |
1009 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1010 | _internal_metadata_(nullptr) { |
1011 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1012 | if (from.has_shape()) { |
1013 | shape_ = new ::tensorflow::TensorShapeProto(*from.shape_); |
1014 | } else { |
1015 | shape_ = nullptr; |
1016 | } |
1017 | if (from.has_handle_data()) { |
1018 | handle_data_ = new ::tensorflow::CppShapeInferenceResult_HandleData(*from.handle_data_); |
1019 | } else { |
1020 | handle_data_ = nullptr; |
1021 | } |
1022 | // @@protoc_insertion_point(copy_constructor:tensorflow.CppShapeInferenceResult) |
1023 | } |
1024 | |
1025 | void CppShapeInferenceResult::SharedCtor() { |
1026 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_CppShapeInferenceResult_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base); |
1027 | ::memset(&shape_, 0, static_cast<size_t>( |
1028 | reinterpret_cast<char*>(&handle_data_) - |
1029 | reinterpret_cast<char*>(&shape_)) + sizeof(handle_data_)); |
1030 | } |
1031 | |
1032 | CppShapeInferenceResult::~CppShapeInferenceResult() { |
1033 | // @@protoc_insertion_point(destructor:tensorflow.CppShapeInferenceResult) |
1034 | SharedDtor(); |
1035 | } |
1036 | |
1037 | void CppShapeInferenceResult::SharedDtor() { |
1038 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
1039 | if (this != internal_default_instance()) delete shape_; |
1040 | if (this != internal_default_instance()) delete handle_data_; |
1041 | } |
1042 | |
1043 | void CppShapeInferenceResult::ArenaDtor(void* object) { |
1044 | CppShapeInferenceResult* _this = reinterpret_cast< CppShapeInferenceResult* >(object); |
1045 | (void)_this; |
1046 | } |
1047 | void CppShapeInferenceResult::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
1048 | } |
1049 | void CppShapeInferenceResult::SetCachedSize(int size) const { |
1050 | _cached_size_.Set(size); |
1051 | } |
1052 | const CppShapeInferenceResult& CppShapeInferenceResult::default_instance() { |
1053 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CppShapeInferenceResult_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base); |
1054 | return *internal_default_instance(); |
1055 | } |
1056 | |
1057 | |
1058 | void CppShapeInferenceResult::Clear() { |
1059 | // @@protoc_insertion_point(message_clear_start:tensorflow.CppShapeInferenceResult) |
1060 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1061 | // Prevent compiler warnings about cached_has_bits being unused |
1062 | (void) cached_has_bits; |
1063 | |
1064 | if (GetArenaNoVirtual() == nullptr && shape_ != nullptr) { |
1065 | delete shape_; |
1066 | } |
1067 | shape_ = nullptr; |
1068 | if (GetArenaNoVirtual() == nullptr && handle_data_ != nullptr) { |
1069 | delete handle_data_; |
1070 | } |
1071 | handle_data_ = nullptr; |
1072 | _internal_metadata_.Clear(); |
1073 | } |
1074 | |
1075 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1076 | const char* CppShapeInferenceResult::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1077 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1078 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
1079 | while (!ctx->Done(&ptr)) { |
1080 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1081 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1082 | CHK_(ptr); |
1083 | switch (tag >> 3) { |
1084 | // .tensorflow.TensorShapeProto shape = 1; |
1085 | case 1: |
1086 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
1087 | ptr = ctx->ParseMessage(mutable_shape(), ptr); |
1088 | CHK_(ptr); |
1089 | } else goto handle_unusual; |
1090 | continue; |
1091 | // .tensorflow.CppShapeInferenceResult.HandleData handle_data = 4; |
1092 | case 4: |
1093 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { |
1094 | ptr = ctx->ParseMessage(mutable_handle_data(), ptr); |
1095 | CHK_(ptr); |
1096 | } else goto handle_unusual; |
1097 | continue; |
1098 | default: { |
1099 | handle_unusual: |
1100 | if ((tag & 7) == 4 || tag == 0) { |
1101 | ctx->SetLastTag(tag); |
1102 | goto success; |
1103 | } |
1104 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1105 | CHK_(ptr != nullptr); |
1106 | continue; |
1107 | } |
1108 | } // switch |
1109 | } // while |
1110 | success: |
1111 | return ptr; |
1112 | failure: |
1113 | ptr = nullptr; |
1114 | goto success; |
1115 | #undef CHK_ |
1116 | } |
1117 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1118 | bool CppShapeInferenceResult::MergePartialFromCodedStream( |
1119 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1120 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1121 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1122 | // @@protoc_insertion_point(parse_start:tensorflow.CppShapeInferenceResult) |
1123 | for (;;) { |
1124 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1125 | tag = p.first; |
1126 | if (!p.second) goto handle_unusual; |
1127 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1128 | // .tensorflow.TensorShapeProto shape = 1; |
1129 | case 1: { |
1130 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
1131 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1132 | input, mutable_shape())); |
1133 | } else { |
1134 | goto handle_unusual; |
1135 | } |
1136 | break; |
1137 | } |
1138 | |
1139 | // .tensorflow.CppShapeInferenceResult.HandleData handle_data = 4; |
1140 | case 4: { |
1141 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { |
1142 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( |
1143 | input, mutable_handle_data())); |
1144 | } else { |
1145 | goto handle_unusual; |
1146 | } |
1147 | break; |
1148 | } |
1149 | |
1150 | default: { |
1151 | handle_unusual: |
1152 | if (tag == 0) { |
1153 | goto success; |
1154 | } |
1155 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1156 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1157 | break; |
1158 | } |
1159 | } |
1160 | } |
1161 | success: |
1162 | // @@protoc_insertion_point(parse_success:tensorflow.CppShapeInferenceResult) |
1163 | return true; |
1164 | failure: |
1165 | // @@protoc_insertion_point(parse_failure:tensorflow.CppShapeInferenceResult) |
1166 | return false; |
1167 | #undef DO_ |
1168 | } |
1169 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1170 | |
1171 | void CppShapeInferenceResult::SerializeWithCachedSizes( |
1172 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1173 | // @@protoc_insertion_point(serialize_start:tensorflow.CppShapeInferenceResult) |
1174 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1175 | (void) cached_has_bits; |
1176 | |
1177 | // .tensorflow.TensorShapeProto shape = 1; |
1178 | if (this->has_shape()) { |
1179 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1180 | 1, _Internal::shape(this), output); |
1181 | } |
1182 | |
1183 | // .tensorflow.CppShapeInferenceResult.HandleData handle_data = 4; |
1184 | if (this->has_handle_data()) { |
1185 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( |
1186 | 4, _Internal::handle_data(this), output); |
1187 | } |
1188 | |
1189 | if (_internal_metadata_.have_unknown_fields()) { |
1190 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1191 | _internal_metadata_.unknown_fields(), output); |
1192 | } |
1193 | // @@protoc_insertion_point(serialize_end:tensorflow.CppShapeInferenceResult) |
1194 | } |
1195 | |
1196 | ::PROTOBUF_NAMESPACE_ID::uint8* CppShapeInferenceResult::InternalSerializeWithCachedSizesToArray( |
1197 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1198 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CppShapeInferenceResult) |
1199 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1200 | (void) cached_has_bits; |
1201 | |
1202 | // .tensorflow.TensorShapeProto shape = 1; |
1203 | if (this->has_shape()) { |
1204 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1205 | InternalWriteMessageToArray( |
1206 | 1, _Internal::shape(this), target); |
1207 | } |
1208 | |
1209 | // .tensorflow.CppShapeInferenceResult.HandleData handle_data = 4; |
1210 | if (this->has_handle_data()) { |
1211 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1212 | InternalWriteMessageToArray( |
1213 | 4, _Internal::handle_data(this), target); |
1214 | } |
1215 | |
1216 | if (_internal_metadata_.have_unknown_fields()) { |
1217 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1218 | _internal_metadata_.unknown_fields(), target); |
1219 | } |
1220 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CppShapeInferenceResult) |
1221 | return target; |
1222 | } |
1223 | |
1224 | size_t CppShapeInferenceResult::ByteSizeLong() const { |
1225 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.CppShapeInferenceResult) |
1226 | size_t total_size = 0; |
1227 | |
1228 | if (_internal_metadata_.have_unknown_fields()) { |
1229 | total_size += |
1230 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1231 | _internal_metadata_.unknown_fields()); |
1232 | } |
1233 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1234 | // Prevent compiler warnings about cached_has_bits being unused |
1235 | (void) cached_has_bits; |
1236 | |
1237 | // .tensorflow.TensorShapeProto shape = 1; |
1238 | if (this->has_shape()) { |
1239 | total_size += 1 + |
1240 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1241 | *shape_); |
1242 | } |
1243 | |
1244 | // .tensorflow.CppShapeInferenceResult.HandleData handle_data = 4; |
1245 | if (this->has_handle_data()) { |
1246 | total_size += 1 + |
1247 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
1248 | *handle_data_); |
1249 | } |
1250 | |
1251 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1252 | SetCachedSize(cached_size); |
1253 | return total_size; |
1254 | } |
1255 | |
1256 | void CppShapeInferenceResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1257 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.CppShapeInferenceResult) |
1258 | GOOGLE_DCHECK_NE(&from, this); |
1259 | const CppShapeInferenceResult* source = |
1260 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CppShapeInferenceResult>( |
1261 | &from); |
1262 | if (source == nullptr) { |
1263 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.CppShapeInferenceResult) |
1264 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1265 | } else { |
1266 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.CppShapeInferenceResult) |
1267 | MergeFrom(*source); |
1268 | } |
1269 | } |
1270 | |
1271 | void CppShapeInferenceResult::MergeFrom(const CppShapeInferenceResult& from) { |
1272 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CppShapeInferenceResult) |
1273 | GOOGLE_DCHECK_NE(&from, this); |
1274 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1275 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1276 | (void) cached_has_bits; |
1277 | |
1278 | if (from.has_shape()) { |
1279 | mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.shape()); |
1280 | } |
1281 | if (from.has_handle_data()) { |
1282 | mutable_handle_data()->::tensorflow::CppShapeInferenceResult_HandleData::MergeFrom(from.handle_data()); |
1283 | } |
1284 | } |
1285 | |
1286 | void CppShapeInferenceResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1287 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.CppShapeInferenceResult) |
1288 | if (&from == this) return; |
1289 | Clear(); |
1290 | MergeFrom(from); |
1291 | } |
1292 | |
1293 | void CppShapeInferenceResult::CopyFrom(const CppShapeInferenceResult& from) { |
1294 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CppShapeInferenceResult) |
1295 | if (&from == this) return; |
1296 | Clear(); |
1297 | MergeFrom(from); |
1298 | } |
1299 | |
1300 | bool CppShapeInferenceResult::IsInitialized() const { |
1301 | return true; |
1302 | } |
1303 | |
1304 | void CppShapeInferenceResult::InternalSwap(CppShapeInferenceResult* other) { |
1305 | using std::swap; |
1306 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1307 | swap(shape_, other->shape_); |
1308 | swap(handle_data_, other->handle_data_); |
1309 | } |
1310 | |
1311 | ::PROTOBUF_NAMESPACE_ID::Metadata CppShapeInferenceResult::GetMetadata() const { |
1312 | return GetMetadataStatic(); |
1313 | } |
1314 | |
1315 | |
1316 | // =================================================================== |
1317 | |
1318 | void CppShapeInferenceInputsNeeded::InitAsDefaultInstance() { |
1319 | } |
1320 | class CppShapeInferenceInputsNeeded::_Internal { |
1321 | public: |
1322 | }; |
1323 | |
1324 | CppShapeInferenceInputsNeeded::CppShapeInferenceInputsNeeded() |
1325 | : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { |
1326 | SharedCtor(); |
1327 | // @@protoc_insertion_point(constructor:tensorflow.CppShapeInferenceInputsNeeded) |
1328 | } |
1329 | CppShapeInferenceInputsNeeded::CppShapeInferenceInputsNeeded(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
1330 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1331 | _internal_metadata_(arena), |
1332 | input_tensors_needed_(arena), |
1333 | input_tensors_as_shapes_needed_(arena) { |
1334 | SharedCtor(); |
1335 | RegisterArenaDtor(arena); |
1336 | // @@protoc_insertion_point(arena_constructor:tensorflow.CppShapeInferenceInputsNeeded) |
1337 | } |
1338 | CppShapeInferenceInputsNeeded::CppShapeInferenceInputsNeeded(const CppShapeInferenceInputsNeeded& from) |
1339 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
1340 | _internal_metadata_(nullptr), |
1341 | input_tensors_needed_(from.input_tensors_needed_), |
1342 | input_tensors_as_shapes_needed_(from.input_tensors_as_shapes_needed_) { |
1343 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1344 | // @@protoc_insertion_point(copy_constructor:tensorflow.CppShapeInferenceInputsNeeded) |
1345 | } |
1346 | |
1347 | void CppShapeInferenceInputsNeeded::SharedCtor() { |
1348 | } |
1349 | |
1350 | CppShapeInferenceInputsNeeded::~CppShapeInferenceInputsNeeded() { |
1351 | // @@protoc_insertion_point(destructor:tensorflow.CppShapeInferenceInputsNeeded) |
1352 | SharedDtor(); |
1353 | } |
1354 | |
1355 | void CppShapeInferenceInputsNeeded::SharedDtor() { |
1356 | GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); |
1357 | } |
1358 | |
1359 | void CppShapeInferenceInputsNeeded::ArenaDtor(void* object) { |
1360 | CppShapeInferenceInputsNeeded* _this = reinterpret_cast< CppShapeInferenceInputsNeeded* >(object); |
1361 | (void)_this; |
1362 | } |
1363 | void CppShapeInferenceInputsNeeded::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
1364 | } |
1365 | void CppShapeInferenceInputsNeeded::SetCachedSize(int size) const { |
1366 | _cached_size_.Set(size); |
1367 | } |
1368 | const CppShapeInferenceInputsNeeded& CppShapeInferenceInputsNeeded::default_instance() { |
1369 | ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_CppShapeInferenceInputsNeeded_tensorflow_2fpython_2fframework_2fcpp_5fshape_5finference_2eproto.base); |
1370 | return *internal_default_instance(); |
1371 | } |
1372 | |
1373 | |
1374 | void CppShapeInferenceInputsNeeded::Clear() { |
1375 | // @@protoc_insertion_point(message_clear_start:tensorflow.CppShapeInferenceInputsNeeded) |
1376 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1377 | // Prevent compiler warnings about cached_has_bits being unused |
1378 | (void) cached_has_bits; |
1379 | |
1380 | input_tensors_needed_.Clear(); |
1381 | input_tensors_as_shapes_needed_.Clear(); |
1382 | _internal_metadata_.Clear(); |
1383 | } |
1384 | |
1385 | #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1386 | const char* CppShapeInferenceInputsNeeded::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
1387 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
1388 | ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; |
1389 | while (!ctx->Done(&ptr)) { |
1390 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1391 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
1392 | CHK_(ptr); |
1393 | switch (tag >> 3) { |
1394 | // repeated int32 input_tensors_needed = 1; |
1395 | case 1: |
1396 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { |
1397 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_input_tensors_needed(), ptr, ctx); |
1398 | CHK_(ptr); |
1399 | } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8) { |
1400 | add_input_tensors_needed(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1401 | CHK_(ptr); |
1402 | } else goto handle_unusual; |
1403 | continue; |
1404 | // repeated int32 input_tensors_as_shapes_needed = 2; |
1405 | case 2: |
1406 | if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { |
1407 | ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_input_tensors_as_shapes_needed(), ptr, ctx); |
1408 | CHK_(ptr); |
1409 | } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { |
1410 | add_input_tensors_as_shapes_needed(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); |
1411 | CHK_(ptr); |
1412 | } else goto handle_unusual; |
1413 | continue; |
1414 | default: { |
1415 | handle_unusual: |
1416 | if ((tag & 7) == 4 || tag == 0) { |
1417 | ctx->SetLastTag(tag); |
1418 | goto success; |
1419 | } |
1420 | ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); |
1421 | CHK_(ptr != nullptr); |
1422 | continue; |
1423 | } |
1424 | } // switch |
1425 | } // while |
1426 | success: |
1427 | return ptr; |
1428 | failure: |
1429 | ptr = nullptr; |
1430 | goto success; |
1431 | #undef CHK_ |
1432 | } |
1433 | #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1434 | bool CppShapeInferenceInputsNeeded::MergePartialFromCodedStream( |
1435 | ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { |
1436 | #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure |
1437 | ::PROTOBUF_NAMESPACE_ID::uint32 tag; |
1438 | // @@protoc_insertion_point(parse_start:tensorflow.CppShapeInferenceInputsNeeded) |
1439 | for (;;) { |
1440 | ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); |
1441 | tag = p.first; |
1442 | if (!p.second) goto handle_unusual; |
1443 | switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { |
1444 | // repeated int32 input_tensors_needed = 1; |
1445 | case 1: { |
1446 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { |
1447 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< |
1448 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
1449 | input, this->mutable_input_tensors_needed()))); |
1450 | } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { |
1451 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
1452 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
1453 | 1, 10u, input, this->mutable_input_tensors_needed()))); |
1454 | } else { |
1455 | goto handle_unusual; |
1456 | } |
1457 | break; |
1458 | } |
1459 | |
1460 | // repeated int32 input_tensors_as_shapes_needed = 2; |
1461 | case 2: { |
1462 | if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { |
1463 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< |
1464 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
1465 | input, this->mutable_input_tensors_as_shapes_needed()))); |
1466 | } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (16 & 0xFF)) { |
1467 | DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< |
1468 | ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( |
1469 | 1, 18u, input, this->mutable_input_tensors_as_shapes_needed()))); |
1470 | } else { |
1471 | goto handle_unusual; |
1472 | } |
1473 | break; |
1474 | } |
1475 | |
1476 | default: { |
1477 | handle_unusual: |
1478 | if (tag == 0) { |
1479 | goto success; |
1480 | } |
1481 | DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( |
1482 | input, tag, _internal_metadata_.mutable_unknown_fields())); |
1483 | break; |
1484 | } |
1485 | } |
1486 | } |
1487 | success: |
1488 | // @@protoc_insertion_point(parse_success:tensorflow.CppShapeInferenceInputsNeeded) |
1489 | return true; |
1490 | failure: |
1491 | // @@protoc_insertion_point(parse_failure:tensorflow.CppShapeInferenceInputsNeeded) |
1492 | return false; |
1493 | #undef DO_ |
1494 | } |
1495 | #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER |
1496 | |
1497 | void CppShapeInferenceInputsNeeded::SerializeWithCachedSizes( |
1498 | ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { |
1499 | // @@protoc_insertion_point(serialize_start:tensorflow.CppShapeInferenceInputsNeeded) |
1500 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1501 | (void) cached_has_bits; |
1502 | |
1503 | // repeated int32 input_tensors_needed = 1; |
1504 | if (this->input_tensors_needed_size() > 0) { |
1505 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(1, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
1506 | output->WriteVarint32(_input_tensors_needed_cached_byte_size_.load( |
1507 | std::memory_order_relaxed)); |
1508 | } |
1509 | for (int i = 0, n = this->input_tensors_needed_size(); i < n; i++) { |
1510 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( |
1511 | this->input_tensors_needed(i), output); |
1512 | } |
1513 | |
1514 | // repeated int32 input_tensors_as_shapes_needed = 2; |
1515 | if (this->input_tensors_as_shapes_needed_size() > 0) { |
1516 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(2, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); |
1517 | output->WriteVarint32(_input_tensors_as_shapes_needed_cached_byte_size_.load( |
1518 | std::memory_order_relaxed)); |
1519 | } |
1520 | for (int i = 0, n = this->input_tensors_as_shapes_needed_size(); i < n; i++) { |
1521 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( |
1522 | this->input_tensors_as_shapes_needed(i), output); |
1523 | } |
1524 | |
1525 | if (_internal_metadata_.have_unknown_fields()) { |
1526 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( |
1527 | _internal_metadata_.unknown_fields(), output); |
1528 | } |
1529 | // @@protoc_insertion_point(serialize_end:tensorflow.CppShapeInferenceInputsNeeded) |
1530 | } |
1531 | |
1532 | ::PROTOBUF_NAMESPACE_ID::uint8* CppShapeInferenceInputsNeeded::InternalSerializeWithCachedSizesToArray( |
1533 | ::PROTOBUF_NAMESPACE_ID::uint8* target) const { |
1534 | // @@protoc_insertion_point(serialize_to_array_start:tensorflow.CppShapeInferenceInputsNeeded) |
1535 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1536 | (void) cached_has_bits; |
1537 | |
1538 | // repeated int32 input_tensors_needed = 1; |
1539 | if (this->input_tensors_needed_size() > 0) { |
1540 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( |
1541 | 1, |
1542 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
1543 | target); |
1544 | target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( |
1545 | _input_tensors_needed_cached_byte_size_.load(std::memory_order_relaxed), |
1546 | target); |
1547 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1548 | WriteInt32NoTagToArray(this->input_tensors_needed_, target); |
1549 | } |
1550 | |
1551 | // repeated int32 input_tensors_as_shapes_needed = 2; |
1552 | if (this->input_tensors_as_shapes_needed_size() > 0) { |
1553 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( |
1554 | 2, |
1555 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, |
1556 | target); |
1557 | target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( |
1558 | _input_tensors_as_shapes_needed_cached_byte_size_.load(std::memory_order_relaxed), |
1559 | target); |
1560 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1561 | WriteInt32NoTagToArray(this->input_tensors_as_shapes_needed_, target); |
1562 | } |
1563 | |
1564 | if (_internal_metadata_.have_unknown_fields()) { |
1565 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( |
1566 | _internal_metadata_.unknown_fields(), target); |
1567 | } |
1568 | // @@protoc_insertion_point(serialize_to_array_end:tensorflow.CppShapeInferenceInputsNeeded) |
1569 | return target; |
1570 | } |
1571 | |
1572 | size_t CppShapeInferenceInputsNeeded::ByteSizeLong() const { |
1573 | // @@protoc_insertion_point(message_byte_size_start:tensorflow.CppShapeInferenceInputsNeeded) |
1574 | size_t total_size = 0; |
1575 | |
1576 | if (_internal_metadata_.have_unknown_fields()) { |
1577 | total_size += |
1578 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( |
1579 | _internal_metadata_.unknown_fields()); |
1580 | } |
1581 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1582 | // Prevent compiler warnings about cached_has_bits being unused |
1583 | (void) cached_has_bits; |
1584 | |
1585 | // repeated int32 input_tensors_needed = 1; |
1586 | { |
1587 | size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1588 | Int32Size(this->input_tensors_needed_); |
1589 | if (data_size > 0) { |
1590 | total_size += 1 + |
1591 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
1592 | static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); |
1593 | } |
1594 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); |
1595 | _input_tensors_needed_cached_byte_size_.store(cached_size, |
1596 | std::memory_order_relaxed); |
1597 | total_size += data_size; |
1598 | } |
1599 | |
1600 | // repeated int32 input_tensors_as_shapes_needed = 2; |
1601 | { |
1602 | size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
1603 | Int32Size(this->input_tensors_as_shapes_needed_); |
1604 | if (data_size > 0) { |
1605 | total_size += 1 + |
1606 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( |
1607 | static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); |
1608 | } |
1609 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); |
1610 | _input_tensors_as_shapes_needed_cached_byte_size_.store(cached_size, |
1611 | std::memory_order_relaxed); |
1612 | total_size += data_size; |
1613 | } |
1614 | |
1615 | int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); |
1616 | SetCachedSize(cached_size); |
1617 | return total_size; |
1618 | } |
1619 | |
1620 | void CppShapeInferenceInputsNeeded::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1621 | // @@protoc_insertion_point(generalized_merge_from_start:tensorflow.CppShapeInferenceInputsNeeded) |
1622 | GOOGLE_DCHECK_NE(&from, this); |
1623 | const CppShapeInferenceInputsNeeded* source = |
1624 | ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<CppShapeInferenceInputsNeeded>( |
1625 | &from); |
1626 | if (source == nullptr) { |
1627 | // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.CppShapeInferenceInputsNeeded) |
1628 | ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); |
1629 | } else { |
1630 | // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.CppShapeInferenceInputsNeeded) |
1631 | MergeFrom(*source); |
1632 | } |
1633 | } |
1634 | |
1635 | void CppShapeInferenceInputsNeeded::MergeFrom(const CppShapeInferenceInputsNeeded& from) { |
1636 | // @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.CppShapeInferenceInputsNeeded) |
1637 | GOOGLE_DCHECK_NE(&from, this); |
1638 | _internal_metadata_.MergeFrom(from._internal_metadata_); |
1639 | ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; |
1640 | (void) cached_has_bits; |
1641 | |
1642 | input_tensors_needed_.MergeFrom(from.input_tensors_needed_); |
1643 | input_tensors_as_shapes_needed_.MergeFrom(from.input_tensors_as_shapes_needed_); |
1644 | } |
1645 | |
1646 | void CppShapeInferenceInputsNeeded::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
1647 | // @@protoc_insertion_point(generalized_copy_from_start:tensorflow.CppShapeInferenceInputsNeeded) |
1648 | if (&from == this) return; |
1649 | Clear(); |
1650 | MergeFrom(from); |
1651 | } |
1652 | |
1653 | void CppShapeInferenceInputsNeeded::CopyFrom(const CppShapeInferenceInputsNeeded& from) { |
1654 | // @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.CppShapeInferenceInputsNeeded) |
1655 | if (&from == this) return; |
1656 | Clear(); |
1657 | MergeFrom(from); |
1658 | } |
1659 | |
1660 | bool CppShapeInferenceInputsNeeded::IsInitialized() const { |
1661 | return true; |
1662 | } |
1663 | |
1664 | void CppShapeInferenceInputsNeeded::InternalSwap(CppShapeInferenceInputsNeeded* other) { |
1665 | using std::swap; |
1666 | _internal_metadata_.Swap(&other->_internal_metadata_); |
1667 | input_tensors_needed_.InternalSwap(&other->input_tensors_needed_); |
1668 | input_tensors_as_shapes_needed_.InternalSwap(&other->input_tensors_as_shapes_needed_); |
1669 | } |
1670 | |
1671 | ::PROTOBUF_NAMESPACE_ID::Metadata CppShapeInferenceInputsNeeded::GetMetadata() const { |
1672 | return GetMetadataStatic(); |
1673 | } |
1674 | |
1675 | |
1676 | // @@protoc_insertion_point(namespace_scope) |
1677 | } // namespace tensorflow |
1678 | PROTOBUF_NAMESPACE_OPEN |
1679 | template<> PROTOBUF_NOINLINE ::tensorflow::CppShapeInferenceResult_HandleShapeAndType* Arena::CreateMaybeMessage< ::tensorflow::CppShapeInferenceResult_HandleShapeAndType >(Arena* arena) { |
1680 | return Arena::CreateMessageInternal< ::tensorflow::CppShapeInferenceResult_HandleShapeAndType >(arena); |
1681 | } |
1682 | template<> PROTOBUF_NOINLINE ::tensorflow::CppShapeInferenceResult_HandleData* Arena::CreateMaybeMessage< ::tensorflow::CppShapeInferenceResult_HandleData >(Arena* arena) { |
1683 | return Arena::CreateMessageInternal< ::tensorflow::CppShapeInferenceResult_HandleData >(arena); |
1684 | } |
1685 | template<> PROTOBUF_NOINLINE ::tensorflow::CppShapeInferenceResult* Arena::CreateMaybeMessage< ::tensorflow::CppShapeInferenceResult >(Arena* arena) { |
1686 | return Arena::CreateMessageInternal< ::tensorflow::CppShapeInferenceResult >(arena); |
1687 | } |
1688 | template<> PROTOBUF_NOINLINE ::tensorflow::CppShapeInferenceInputsNeeded* Arena::CreateMaybeMessage< ::tensorflow::CppShapeInferenceInputsNeeded >(Arena* arena) { |
1689 | return Arena::CreateMessageInternal< ::tensorflow::CppShapeInferenceInputsNeeded >(arena); |
1690 | } |
1691 | PROTOBUF_NAMESPACE_CLOSE |
1692 | |
1693 | // @@protoc_insertion_point(global_scope) |
1694 | #include <google/protobuf/port_undef.inc> |
1695 | |