/src/opencv/modules/dnn/misc/tensorflow/graph.pb.cc
Line | Count | Source |
1 | | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | | // source: graph.proto |
3 | | |
4 | | #include "graph.pb.h" |
5 | | |
6 | | #include <algorithm> |
7 | | |
8 | | #include <google/protobuf/io/coded_stream.h> |
9 | | #include <google/protobuf/extension_set.h> |
10 | | #include <google/protobuf/wire_format_lite.h> |
11 | | #include <google/protobuf/descriptor.h> |
12 | | #include <google/protobuf/generated_message_reflection.h> |
13 | | #include <google/protobuf/reflection_ops.h> |
14 | | #include <google/protobuf/wire_format.h> |
15 | | // @@protoc_insertion_point(includes) |
16 | | #include <google/protobuf/port_def.inc> |
17 | | |
18 | | PROTOBUF_PRAGMA_INIT_SEG |
19 | | namespace opencv_tensorflow { |
20 | | constexpr GraphDef::GraphDef( |
21 | | ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) |
22 | | : node_() |
23 | | , library_(nullptr) |
24 | | , versions_(nullptr) |
25 | | , version_(0){} |
26 | | struct GraphDefDefaultTypeInternal { |
27 | | constexpr GraphDefDefaultTypeInternal() |
28 | 0 | : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} |
29 | 0 | ~GraphDefDefaultTypeInternal() {} |
30 | | union { |
31 | | GraphDef _instance; |
32 | | }; |
33 | | }; |
34 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GraphDefDefaultTypeInternal _GraphDef_default_instance_; |
35 | | constexpr NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse( |
36 | | ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){} |
37 | | struct NodeDef_AttrEntry_DoNotUseDefaultTypeInternal { |
38 | | constexpr NodeDef_AttrEntry_DoNotUseDefaultTypeInternal() |
39 | 0 | : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} |
40 | 0 | ~NodeDef_AttrEntry_DoNotUseDefaultTypeInternal() {} |
41 | | union { |
42 | | NodeDef_AttrEntry_DoNotUse _instance; |
43 | | }; |
44 | | }; |
45 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeDef_AttrEntry_DoNotUseDefaultTypeInternal _NodeDef_AttrEntry_DoNotUse_default_instance_; |
46 | | constexpr NodeDef::NodeDef( |
47 | | ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) |
48 | | : input_() |
49 | | , attr_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) |
50 | | , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) |
51 | | , op_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) |
52 | | , device_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){} |
53 | | struct NodeDefDefaultTypeInternal { |
54 | | constexpr NodeDefDefaultTypeInternal() |
55 | 0 | : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} |
56 | 0 | ~NodeDefDefaultTypeInternal() {} |
57 | | union { |
58 | | NodeDef _instance; |
59 | | }; |
60 | | }; |
61 | | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeDefDefaultTypeInternal _NodeDef_default_instance_; |
62 | | } // namespace opencv_tensorflow |
63 | | static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_graph_2eproto[3]; |
64 | | static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_graph_2eproto = nullptr; |
65 | | static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_graph_2eproto = nullptr; |
66 | | |
67 | | const uint32_t TableStruct_graph_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
68 | | ~0u, // no _has_bits_ |
69 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, _internal_metadata_), |
70 | | ~0u, // no _extensions_ |
71 | | ~0u, // no _oneof_case_ |
72 | | ~0u, // no _weak_field_map_ |
73 | | ~0u, // no _inlined_string_donated_ |
74 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, node_), |
75 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, versions_), |
76 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, version_), |
77 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, library_), |
78 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, _has_bits_), |
79 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, _internal_metadata_), |
80 | | ~0u, // no _extensions_ |
81 | | ~0u, // no _oneof_case_ |
82 | | ~0u, // no _weak_field_map_ |
83 | | ~0u, // no _inlined_string_donated_ |
84 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, key_), |
85 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, value_), |
86 | | 0, |
87 | | 1, |
88 | | ~0u, // no _has_bits_ |
89 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, _internal_metadata_), |
90 | | ~0u, // no _extensions_ |
91 | | ~0u, // no _oneof_case_ |
92 | | ~0u, // no _weak_field_map_ |
93 | | ~0u, // no _inlined_string_donated_ |
94 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, name_), |
95 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, op_), |
96 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, input_), |
97 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, device_), |
98 | | PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, attr_), |
99 | | }; |
100 | | static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
101 | | { 0, -1, -1, sizeof(::opencv_tensorflow::GraphDef)}, |
102 | | { 10, 18, -1, sizeof(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse)}, |
103 | | { 20, -1, -1, sizeof(::opencv_tensorflow::NodeDef)}, |
104 | | }; |
105 | | |
106 | | static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { |
107 | | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_GraphDef_default_instance_), |
108 | | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_NodeDef_AttrEntry_DoNotUse_default_instance_), |
109 | | reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_NodeDef_default_instance_), |
110 | | }; |
111 | | |
112 | | const char descriptor_table_protodef_graph_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
113 | | "\n\013graph.proto\022\021opencv_tensorflow\032\020attr_v" |
114 | | "alue.proto\032\016function.proto\032\016versions.pro" |
115 | | "to\"\262\001\n\010GraphDef\022(\n\004node\030\001 \003(\0132\032.opencv_t" |
116 | | "ensorflow.NodeDef\022/\n\010versions\030\004 \001(\0132\035.op" |
117 | | "encv_tensorflow.VersionDef\022\023\n\007version\030\003 " |
118 | | "\001(\005B\002\030\001\0226\n\007library\030\002 \001(\0132%.opencv_tensor" |
119 | | "flow.FunctionDefLibrary\"\301\001\n\007NodeDef\022\014\n\004n" |
120 | | "ame\030\001 \001(\t\022\n\n\002op\030\002 \001(\t\022\r\n\005input\030\003 \003(\t\022\016\n\006" |
121 | | "device\030\004 \001(\t\0222\n\004attr\030\005 \003(\0132$.opencv_tens" |
122 | | "orflow.NodeDef.AttrEntry\032I\n\tAttrEntry\022\013\n" |
123 | | "\003key\030\001 \001(\t\022+\n\005value\030\002 \001(\0132\034.opencv_tenso" |
124 | | "rflow.AttrValue:\0028\001B,\n\030org.tensorflow.fr" |
125 | | "ameworkB\013GraphProtosP\001\370\001\001b\006proto3" |
126 | | ; |
127 | | static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_graph_2eproto_deps[3] = { |
128 | | &::descriptor_table_attr_5fvalue_2eproto, |
129 | | &::descriptor_table_function_2eproto, |
130 | | &::descriptor_table_versions_2eproto, |
131 | | }; |
132 | | static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_graph_2eproto_once; |
133 | | const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_graph_2eproto = { |
134 | | false, false, 513, descriptor_table_protodef_graph_2eproto, "graph.proto", |
135 | | &descriptor_table_graph_2eproto_once, descriptor_table_graph_2eproto_deps, 3, 3, |
136 | | schemas, file_default_instances, TableStruct_graph_2eproto::offsets, |
137 | | file_level_metadata_graph_2eproto, file_level_enum_descriptors_graph_2eproto, file_level_service_descriptors_graph_2eproto, |
138 | | }; |
139 | 0 | PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_graph_2eproto_getter() { |
140 | 0 | return &descriptor_table_graph_2eproto; |
141 | 0 | } |
142 | | |
143 | | // Force running AddDescriptors() at dynamic initialization time. |
144 | | PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_graph_2eproto(&descriptor_table_graph_2eproto); |
145 | | namespace opencv_tensorflow { |
146 | | |
147 | | // =================================================================== |
148 | | |
149 | | class GraphDef::_Internal { |
150 | | public: |
151 | | static const ::opencv_tensorflow::VersionDef& versions(const GraphDef* msg); |
152 | | static const ::opencv_tensorflow::FunctionDefLibrary& library(const GraphDef* msg); |
153 | | }; |
154 | | |
155 | | const ::opencv_tensorflow::VersionDef& |
156 | 0 | GraphDef::_Internal::versions(const GraphDef* msg) { |
157 | 0 | return *msg->versions_; |
158 | 0 | } |
159 | | const ::opencv_tensorflow::FunctionDefLibrary& |
160 | 0 | GraphDef::_Internal::library(const GraphDef* msg) { |
161 | 0 | return *msg->library_; |
162 | 0 | } |
163 | 0 | void GraphDef::clear_versions() { |
164 | 0 | if (GetArenaForAllocation() == nullptr && versions_ != nullptr) { |
165 | 0 | delete versions_; |
166 | 0 | } |
167 | 0 | versions_ = nullptr; |
168 | 0 | } |
169 | 0 | void GraphDef::clear_library() { |
170 | 0 | if (GetArenaForAllocation() == nullptr && library_ != nullptr) { |
171 | 0 | delete library_; |
172 | 0 | } |
173 | 0 | library_ = nullptr; |
174 | 0 | } |
175 | | GraphDef::GraphDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
176 | | bool is_message_owned) |
177 | 36.8k | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), |
178 | 36.8k | node_(arena) { |
179 | 36.8k | SharedCtor(); |
180 | 36.8k | if (!is_message_owned) { |
181 | 36.8k | RegisterArenaDtor(arena); |
182 | 36.8k | } |
183 | | // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.GraphDef) |
184 | 36.8k | } |
185 | | GraphDef::GraphDef(const GraphDef& from) |
186 | 0 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
187 | 0 | node_(from.node_) { |
188 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
189 | 0 | if (from._internal_has_library()) { |
190 | 0 | library_ = new ::opencv_tensorflow::FunctionDefLibrary(*from.library_); |
191 | 0 | } else { |
192 | 0 | library_ = nullptr; |
193 | 0 | } |
194 | 0 | if (from._internal_has_versions()) { |
195 | 0 | versions_ = new ::opencv_tensorflow::VersionDef(*from.versions_); |
196 | 0 | } else { |
197 | 0 | versions_ = nullptr; |
198 | 0 | } |
199 | 0 | version_ = from.version_; |
200 | | // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.GraphDef) |
201 | 0 | } |
202 | | |
203 | 36.8k | inline void GraphDef::SharedCtor() { |
204 | 36.8k | ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>( |
205 | 36.8k | reinterpret_cast<char*>(&library_) - reinterpret_cast<char*>(this)), |
206 | 36.8k | 0, static_cast<size_t>(reinterpret_cast<char*>(&version_) - |
207 | 36.8k | reinterpret_cast<char*>(&library_)) + sizeof(version_)); |
208 | 36.8k | } |
209 | | |
210 | 36.8k | GraphDef::~GraphDef() { |
211 | | // @@protoc_insertion_point(destructor:opencv_tensorflow.GraphDef) |
212 | 36.8k | if (GetArenaForAllocation() != nullptr) return; |
213 | 36.8k | SharedDtor(); |
214 | 36.8k | _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
215 | 36.8k | } |
216 | | |
217 | 36.8k | inline void GraphDef::SharedDtor() { |
218 | 36.8k | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
219 | 36.8k | if (this != internal_default_instance()) delete library_; |
220 | 36.8k | if (this != internal_default_instance()) delete versions_; |
221 | 36.8k | } |
222 | | |
223 | 0 | void GraphDef::ArenaDtor(void* object) { |
224 | 0 | GraphDef* _this = reinterpret_cast< GraphDef* >(object); |
225 | 0 | (void)_this; |
226 | 0 | } |
227 | 36.8k | void GraphDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { |
228 | 36.8k | } |
229 | 0 | void GraphDef::SetCachedSize(int size) const { |
230 | 0 | _cached_size_.Set(size); |
231 | 0 | } |
232 | | |
233 | 18.4k | void GraphDef::Clear() { |
234 | | // @@protoc_insertion_point(message_clear_start:opencv_tensorflow.GraphDef) |
235 | 18.4k | uint32_t cached_has_bits = 0; |
236 | | // Prevent compiler warnings about cached_has_bits being unused |
237 | 18.4k | (void) cached_has_bits; |
238 | | |
239 | 18.4k | node_.Clear(); |
240 | 18.4k | if (GetArenaForAllocation() == nullptr && library_ != nullptr) { |
241 | 0 | delete library_; |
242 | 0 | } |
243 | 18.4k | library_ = nullptr; |
244 | 18.4k | if (GetArenaForAllocation() == nullptr && versions_ != nullptr) { |
245 | 0 | delete versions_; |
246 | 0 | } |
247 | 18.4k | versions_ = nullptr; |
248 | 18.4k | version_ = 0; |
249 | 18.4k | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
250 | 18.4k | } |
251 | | |
252 | 18.4k | const char* GraphDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
253 | 5.42M | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
254 | 4.43M | while (!ctx->Done(&ptr)) { |
255 | 4.43M | uint32_t tag; |
256 | 4.43M | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
257 | 4.43M | switch (tag >> 3) { |
258 | | // repeated .opencv_tensorflow.NodeDef node = 1; |
259 | 109k | case 1: |
260 | 109k | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
261 | 72.7k | ptr -= 1; |
262 | 1.06M | do { |
263 | 1.06M | ptr += 1; |
264 | 1.06M | ptr = ctx->ParseMessage(_internal_add_node(), ptr); |
265 | 1.06M | CHK_(ptr); |
266 | 1.05M | if (!ctx->DataAvailable(ptr)) break; |
267 | 1.05M | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); |
268 | 72.7k | } else |
269 | 36.4k | goto handle_unusual; |
270 | 66.3k | continue; |
271 | | // .opencv_tensorflow.FunctionDefLibrary library = 2; |
272 | 821k | case 2: |
273 | 821k | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { |
274 | 60.4k | ptr = ctx->ParseMessage(_internal_mutable_library(), ptr); |
275 | 60.4k | CHK_(ptr); |
276 | 60.4k | } else |
277 | 761k | goto handle_unusual; |
278 | 56.3k | continue; |
279 | | // int32 version = 3 [deprecated = true]; |
280 | 327k | case 3: |
281 | 327k | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) { |
282 | 311k | version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); |
283 | 311k | CHK_(ptr); |
284 | 311k | } else |
285 | 16.6k | goto handle_unusual; |
286 | 311k | continue; |
287 | | // .opencv_tensorflow.VersionDef versions = 4; |
288 | 311k | case 4: |
289 | 58.3k | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { |
290 | 10.3k | ptr = ctx->ParseMessage(_internal_mutable_versions(), ptr); |
291 | 10.3k | CHK_(ptr); |
292 | 10.3k | } else |
293 | 47.9k | goto handle_unusual; |
294 | 9.67k | continue; |
295 | 3.11M | default: |
296 | 3.11M | goto handle_unusual; |
297 | 4.43M | } // switch |
298 | 3.97M | handle_unusual: |
299 | 3.97M | if ((tag == 0) || ((tag & 7) == 4)) { |
300 | 2.06k | CHK_(ptr); |
301 | 2.06k | ctx->SetLastTag(tag); |
302 | 2.06k | goto message_done; |
303 | 2.06k | } |
304 | 3.97M | ptr = UnknownFieldParse( |
305 | 3.97M | tag, |
306 | 3.97M | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
307 | 3.97M | ptr, ctx); |
308 | 3.97M | CHK_(ptr != nullptr); |
309 | 3.97M | } // while |
310 | 18.4k | message_done: |
311 | 18.4k | return ptr; |
312 | 11.6k | failure: |
313 | 11.6k | ptr = nullptr; |
314 | 11.6k | goto message_done; |
315 | 18.4k | #undef CHK_ |
316 | 18.4k | } |
317 | | |
318 | | uint8_t* GraphDef::_InternalSerialize( |
319 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
320 | | // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.GraphDef) |
321 | 0 | uint32_t cached_has_bits = 0; |
322 | 0 | (void) cached_has_bits; |
323 | | |
324 | | // repeated .opencv_tensorflow.NodeDef node = 1; |
325 | 0 | for (unsigned int i = 0, |
326 | 0 | n = static_cast<unsigned int>(this->_internal_node_size()); i < n; i++) { |
327 | 0 | target = stream->EnsureSpace(target); |
328 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
329 | 0 | InternalWriteMessage(1, this->_internal_node(i), target, stream); |
330 | 0 | } |
331 | | |
332 | | // .opencv_tensorflow.FunctionDefLibrary library = 2; |
333 | 0 | if (this->_internal_has_library()) { |
334 | 0 | target = stream->EnsureSpace(target); |
335 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
336 | 0 | InternalWriteMessage( |
337 | 0 | 2, _Internal::library(this), target, stream); |
338 | 0 | } |
339 | | |
340 | | // int32 version = 3 [deprecated = true]; |
341 | 0 | if (this->_internal_version() != 0) { |
342 | 0 | target = stream->EnsureSpace(target); |
343 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_version(), target); |
344 | 0 | } |
345 | | |
346 | | // .opencv_tensorflow.VersionDef versions = 4; |
347 | 0 | if (this->_internal_has_versions()) { |
348 | 0 | target = stream->EnsureSpace(target); |
349 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: |
350 | 0 | InternalWriteMessage( |
351 | 0 | 4, _Internal::versions(this), target, stream); |
352 | 0 | } |
353 | |
|
354 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
355 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( |
356 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
357 | 0 | } |
358 | | // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.GraphDef) |
359 | 0 | return target; |
360 | 0 | } |
361 | | |
362 | 31.3k | size_t GraphDef::ByteSizeLong() const { |
363 | | // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.GraphDef) |
364 | 31.3k | size_t total_size = 0; |
365 | | |
366 | 31.3k | uint32_t cached_has_bits = 0; |
367 | | // Prevent compiler warnings about cached_has_bits being unused |
368 | 31.3k | (void) cached_has_bits; |
369 | | |
370 | | // repeated .opencv_tensorflow.NodeDef node = 1; |
371 | 31.3k | total_size += 1UL * this->_internal_node_size(); |
372 | 998k | for (const auto& msg : this->node_) { |
373 | 998k | total_size += |
374 | 998k | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); |
375 | 998k | } |
376 | | |
377 | | // .opencv_tensorflow.FunctionDefLibrary library = 2; |
378 | 31.3k | if (this->_internal_has_library()) { |
379 | 1.41k | total_size += 1 + |
380 | 1.41k | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
381 | 1.41k | *library_); |
382 | 1.41k | } |
383 | | |
384 | | // .opencv_tensorflow.VersionDef versions = 4; |
385 | 31.3k | if (this->_internal_has_versions()) { |
386 | 574 | total_size += 1 + |
387 | 574 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( |
388 | 574 | *versions_); |
389 | 574 | } |
390 | | |
391 | | // int32 version = 3 [deprecated = true]; |
392 | 31.3k | if (this->_internal_version() != 0) { |
393 | 943 | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_version()); |
394 | 943 | } |
395 | | |
396 | 31.3k | return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); |
397 | 31.3k | } |
398 | | |
399 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GraphDef::_class_data_ = { |
400 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, |
401 | | GraphDef::MergeImpl |
402 | | }; |
403 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GraphDef::GetClassData() const { return &_class_data_; } |
404 | | |
405 | | void GraphDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, |
406 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
407 | 0 | static_cast<GraphDef *>(to)->MergeFrom( |
408 | 0 | static_cast<const GraphDef &>(from)); |
409 | 0 | } |
410 | | |
411 | | |
412 | 0 | void GraphDef::MergeFrom(const GraphDef& from) { |
413 | | // @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.GraphDef) |
414 | 0 | GOOGLE_DCHECK_NE(&from, this); |
415 | 0 | uint32_t cached_has_bits = 0; |
416 | 0 | (void) cached_has_bits; |
417 | |
|
418 | 0 | node_.MergeFrom(from.node_); |
419 | 0 | if (from._internal_has_library()) { |
420 | 0 | _internal_mutable_library()->::opencv_tensorflow::FunctionDefLibrary::MergeFrom(from._internal_library()); |
421 | 0 | } |
422 | 0 | if (from._internal_has_versions()) { |
423 | 0 | _internal_mutable_versions()->::opencv_tensorflow::VersionDef::MergeFrom(from._internal_versions()); |
424 | 0 | } |
425 | 0 | if (from._internal_version() != 0) { |
426 | 0 | _internal_set_version(from._internal_version()); |
427 | 0 | } |
428 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
429 | 0 | } |
430 | | |
431 | 0 | void GraphDef::CopyFrom(const GraphDef& from) { |
432 | | // @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.GraphDef) |
433 | 0 | if (&from == this) return; |
434 | 0 | Clear(); |
435 | 0 | MergeFrom(from); |
436 | 0 | } |
437 | | |
438 | 6.43k | bool GraphDef::IsInitialized() const { |
439 | 6.43k | return true; |
440 | 6.43k | } |
441 | | |
442 | 0 | void GraphDef::InternalSwap(GraphDef* other) { |
443 | 0 | using std::swap; |
444 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
445 | 0 | node_.InternalSwap(&other->node_); |
446 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
447 | 0 | PROTOBUF_FIELD_OFFSET(GraphDef, version_) |
448 | 0 | + sizeof(GraphDef::version_) |
449 | 0 | - PROTOBUF_FIELD_OFFSET(GraphDef, library_)>( |
450 | 0 | reinterpret_cast<char*>(&library_), |
451 | 0 | reinterpret_cast<char*>(&other->library_)); |
452 | 0 | } |
453 | | |
454 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata GraphDef::GetMetadata() const { |
455 | 0 | return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( |
456 | 0 | &descriptor_table_graph_2eproto_getter, &descriptor_table_graph_2eproto_once, |
457 | 0 | file_level_metadata_graph_2eproto[0]); |
458 | 0 | } |
459 | | |
460 | | // =================================================================== |
461 | | |
462 | 0 | NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse() {} |
463 | | NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) |
464 | 82.4k | : SuperType(arena) {} |
465 | 0 | void NodeDef_AttrEntry_DoNotUse::MergeFrom(const NodeDef_AttrEntry_DoNotUse& other) { |
466 | 0 | MergeFromInternal(other); |
467 | 0 | } |
468 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata NodeDef_AttrEntry_DoNotUse::GetMetadata() const { |
469 | 0 | return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( |
470 | 0 | &descriptor_table_graph_2eproto_getter, &descriptor_table_graph_2eproto_once, |
471 | 0 | file_level_metadata_graph_2eproto[1]); |
472 | 0 | } |
473 | | |
474 | | // =================================================================== |
475 | | |
476 | | class NodeDef::_Internal { |
477 | | public: |
478 | | }; |
479 | | |
480 | 0 | void NodeDef::clear_attr() { |
481 | 0 | attr_.Clear(); |
482 | 0 | } |
483 | | NodeDef::NodeDef(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
484 | | bool is_message_owned) |
485 | 1.06M | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), |
486 | 1.06M | input_(arena), |
487 | 1.06M | attr_(arena) { |
488 | 1.06M | SharedCtor(); |
489 | 1.06M | if (!is_message_owned) { |
490 | 1.06M | RegisterArenaDtor(arena); |
491 | 1.06M | } |
492 | | // @@protoc_insertion_point(arena_constructor:opencv_tensorflow.NodeDef) |
493 | 1.06M | } |
494 | | NodeDef::NodeDef(const NodeDef& from) |
495 | 179 | : ::PROTOBUF_NAMESPACE_ID::Message(), |
496 | 179 | input_(from.input_) { |
497 | 179 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
498 | 179 | attr_.MergeFrom(from.attr_); |
499 | 179 | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
500 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
501 | | name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); |
502 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
503 | 179 | if (!from._internal_name().empty()) { |
504 | 150 | name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), |
505 | 150 | GetArenaForAllocation()); |
506 | 150 | } |
507 | 179 | op_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
508 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
509 | | op_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); |
510 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
511 | 179 | if (!from._internal_op().empty()) { |
512 | 179 | op_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_op(), |
513 | 179 | GetArenaForAllocation()); |
514 | 179 | } |
515 | 179 | device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
516 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
517 | | device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); |
518 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
519 | 179 | if (!from._internal_device().empty()) { |
520 | 15 | device_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device(), |
521 | 15 | GetArenaForAllocation()); |
522 | 15 | } |
523 | | // @@protoc_insertion_point(copy_constructor:opencv_tensorflow.NodeDef) |
524 | 179 | } |
525 | | |
526 | 1.06M | inline void NodeDef::SharedCtor() { |
527 | 1.06M | name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
528 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
529 | | name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); |
530 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
531 | 1.06M | op_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
532 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
533 | | op_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); |
534 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
535 | 1.06M | device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
536 | | #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING |
537 | | device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); |
538 | | #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING |
539 | 1.06M | } |
540 | | |
541 | 1.06M | NodeDef::~NodeDef() { |
542 | | // @@protoc_insertion_point(destructor:opencv_tensorflow.NodeDef) |
543 | 1.06M | if (GetArenaForAllocation() != nullptr) return; |
544 | 1.06M | SharedDtor(); |
545 | 1.06M | _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
546 | 1.06M | } |
547 | | |
548 | 1.06M | inline void NodeDef::SharedDtor() { |
549 | 1.06M | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
550 | 1.06M | name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
551 | 1.06M | op_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
552 | 1.06M | device_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); |
553 | 1.06M | } |
554 | | |
555 | 0 | void NodeDef::ArenaDtor(void* object) { |
556 | 0 | NodeDef* _this = reinterpret_cast< NodeDef* >(object); |
557 | 0 | (void)_this; |
558 | 0 | _this->attr_. ~MapField(); |
559 | 0 | } |
560 | 1.06M | inline void NodeDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) { |
561 | 1.06M | if (arena != nullptr) { |
562 | 0 | arena->OwnCustomDestructor(this, &NodeDef::ArenaDtor); |
563 | 0 | } |
564 | 1.06M | } |
565 | 0 | void NodeDef::SetCachedSize(int size) const { |
566 | 0 | _cached_size_.Set(size); |
567 | 0 | } |
568 | | |
569 | 0 | void NodeDef::Clear() { |
570 | | // @@protoc_insertion_point(message_clear_start:opencv_tensorflow.NodeDef) |
571 | 0 | uint32_t cached_has_bits = 0; |
572 | | // Prevent compiler warnings about cached_has_bits being unused |
573 | 0 | (void) cached_has_bits; |
574 | |
|
575 | 0 | input_.Clear(); |
576 | 0 | attr_.Clear(); |
577 | 0 | name_.ClearToEmpty(); |
578 | 0 | op_.ClearToEmpty(); |
579 | 0 | device_.ClearToEmpty(); |
580 | 0 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
581 | 0 | } |
582 | | |
583 | 1.06M | const char* NodeDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { |
584 | 1.12M | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
585 | 1.72M | while (!ctx->Done(&ptr)) { |
586 | 669k | uint32_t tag; |
587 | 669k | ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); |
588 | 669k | switch (tag >> 3) { |
589 | | // string name = 1; |
590 | 76.7k | case 1: |
591 | 76.7k | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) { |
592 | 61.1k | auto str = _internal_mutable_name(); |
593 | 61.1k | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
594 | 61.1k | CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NodeDef.name")); |
595 | 61.0k | CHK_(ptr); |
596 | 61.0k | } else |
597 | 15.6k | goto handle_unusual; |
598 | 60.9k | continue; |
599 | | // string op = 2; |
600 | 164k | case 2: |
601 | 164k | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) { |
602 | 108k | auto str = _internal_mutable_op(); |
603 | 108k | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
604 | 108k | CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NodeDef.op")); |
605 | 108k | CHK_(ptr); |
606 | 108k | } else |
607 | 56.4k | goto handle_unusual; |
608 | 108k | continue; |
609 | | // repeated string input = 3; |
610 | 192k | case 3: |
611 | 192k | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) { |
612 | 110k | ptr -= 1; |
613 | 185k | do { |
614 | 185k | ptr += 1; |
615 | 185k | auto str = _internal_add_input(); |
616 | 185k | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
617 | 185k | CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NodeDef.input")); |
618 | 185k | CHK_(ptr); |
619 | 185k | if (!ctx->DataAvailable(ptr)) break; |
620 | 185k | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); |
621 | 110k | } else |
622 | 81.9k | goto handle_unusual; |
623 | 110k | continue; |
624 | | // string device = 4; |
625 | 110k | case 4: |
626 | 19.3k | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) { |
627 | 6.71k | auto str = _internal_mutable_device(); |
628 | 6.71k | ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); |
629 | 6.71k | CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NodeDef.device")); |
630 | 6.70k | CHK_(ptr); |
631 | 6.70k | } else |
632 | 12.6k | goto handle_unusual; |
633 | 6.67k | continue; |
634 | | // map<string, .opencv_tensorflow.AttrValue> attr = 5; |
635 | 94.3k | case 5: |
636 | 94.3k | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) { |
637 | 70.8k | ptr -= 1; |
638 | 86.6k | do { |
639 | 86.6k | ptr += 1; |
640 | 86.6k | ptr = ctx->ParseMessage(&attr_, ptr); |
641 | 86.6k | CHK_(ptr); |
642 | 81.1k | if (!ctx->DataAvailable(ptr)) break; |
643 | 81.1k | } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); |
644 | 70.8k | } else |
645 | 23.4k | goto handle_unusual; |
646 | 65.3k | continue; |
647 | 122k | default: |
648 | 122k | goto handle_unusual; |
649 | 669k | } // switch |
650 | 312k | handle_unusual: |
651 | 312k | if ((tag == 0) || ((tag & 7) == 4)) { |
652 | 70 | CHK_(ptr); |
653 | 66 | ctx->SetLastTag(tag); |
654 | 66 | goto message_done; |
655 | 70 | } |
656 | 312k | ptr = UnknownFieldParse( |
657 | 312k | tag, |
658 | 312k | _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
659 | 312k | ptr, ctx); |
660 | 312k | CHK_(ptr != nullptr); |
661 | 312k | } // while |
662 | 1.06M | message_done: |
663 | 1.06M | return ptr; |
664 | 5.90k | failure: |
665 | 5.90k | ptr = nullptr; |
666 | 5.90k | goto message_done; |
667 | 1.06M | #undef CHK_ |
668 | 1.06M | } |
669 | | |
670 | | uint8_t* NodeDef::_InternalSerialize( |
671 | 0 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
672 | | // @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.NodeDef) |
673 | 0 | uint32_t cached_has_bits = 0; |
674 | 0 | (void) cached_has_bits; |
675 | | |
676 | | // string name = 1; |
677 | 0 | if (!this->_internal_name().empty()) { |
678 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
679 | 0 | this->_internal_name().data(), static_cast<int>(this->_internal_name().length()), |
680 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
681 | 0 | "opencv_tensorflow.NodeDef.name"); |
682 | 0 | target = stream->WriteStringMaybeAliased( |
683 | 0 | 1, this->_internal_name(), target); |
684 | 0 | } |
685 | | |
686 | | // string op = 2; |
687 | 0 | if (!this->_internal_op().empty()) { |
688 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
689 | 0 | this->_internal_op().data(), static_cast<int>(this->_internal_op().length()), |
690 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
691 | 0 | "opencv_tensorflow.NodeDef.op"); |
692 | 0 | target = stream->WriteStringMaybeAliased( |
693 | 0 | 2, this->_internal_op(), target); |
694 | 0 | } |
695 | | |
696 | | // repeated string input = 3; |
697 | 0 | for (int i = 0, n = this->_internal_input_size(); i < n; i++) { |
698 | 0 | const auto& s = this->_internal_input(i); |
699 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
700 | 0 | s.data(), static_cast<int>(s.length()), |
701 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
702 | 0 | "opencv_tensorflow.NodeDef.input"); |
703 | 0 | target = stream->WriteString(3, s, target); |
704 | 0 | } |
705 | | |
706 | | // string device = 4; |
707 | 0 | if (!this->_internal_device().empty()) { |
708 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
709 | 0 | this->_internal_device().data(), static_cast<int>(this->_internal_device().length()), |
710 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
711 | 0 | "opencv_tensorflow.NodeDef.device"); |
712 | 0 | target = stream->WriteStringMaybeAliased( |
713 | 0 | 4, this->_internal_device(), target); |
714 | 0 | } |
715 | | |
716 | | // map<string, .opencv_tensorflow.AttrValue> attr = 5; |
717 | 0 | if (!this->_internal_attr().empty()) { |
718 | 0 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_pointer |
719 | 0 | ConstPtr; |
720 | 0 | typedef ConstPtr SortItem; |
721 | 0 | typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; |
722 | 0 | struct Utf8Check { |
723 | 0 | static void Check(ConstPtr p) { |
724 | 0 | (void)p; |
725 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( |
726 | 0 | p->first.data(), static_cast<int>(p->first.length()), |
727 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, |
728 | 0 | "opencv_tensorflow.NodeDef.AttrEntry.key"); |
729 | 0 | } |
730 | 0 | }; |
731 | |
|
732 | 0 | if (stream->IsSerializationDeterministic() && |
733 | 0 | this->_internal_attr().size() > 1) { |
734 | 0 | ::std::unique_ptr<SortItem[]> items( |
735 | 0 | new SortItem[this->_internal_attr().size()]); |
736 | 0 | typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::size_type size_type; |
737 | 0 | size_type n = 0; |
738 | 0 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator |
739 | 0 | it = this->_internal_attr().begin(); |
740 | 0 | it != this->_internal_attr().end(); ++it, ++n) { |
741 | 0 | items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); |
742 | 0 | } |
743 | 0 | ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); |
744 | 0 | for (size_type i = 0; i < n; i++) { |
745 | 0 | target = NodeDef_AttrEntry_DoNotUse::Funcs::InternalSerialize(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream); |
746 | 0 | Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); |
747 | 0 | } |
748 | 0 | } else { |
749 | 0 | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator |
750 | 0 | it = this->_internal_attr().begin(); |
751 | 0 | it != this->_internal_attr().end(); ++it) { |
752 | 0 | target = NodeDef_AttrEntry_DoNotUse::Funcs::InternalSerialize(5, it->first, it->second, target, stream); |
753 | 0 | Utf8Check::Check(&(*it)); |
754 | 0 | } |
755 | 0 | } |
756 | 0 | } |
757 | |
|
758 | 0 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
759 | 0 | target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( |
760 | 0 | _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
761 | 0 | } |
762 | | // @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.NodeDef) |
763 | 0 | return target; |
764 | 0 | } |
765 | | |
766 | 998k | size_t NodeDef::ByteSizeLong() const { |
767 | | // @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.NodeDef) |
768 | 998k | size_t total_size = 0; |
769 | | |
770 | 998k | uint32_t cached_has_bits = 0; |
771 | | // Prevent compiler warnings about cached_has_bits being unused |
772 | 998k | (void) cached_has_bits; |
773 | | |
774 | | // repeated string input = 3; |
775 | 998k | total_size += 1 * |
776 | 998k | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(input_.size()); |
777 | 1.18M | for (int i = 0, n = input_.size(); i < n; i++) { |
778 | 182k | total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
779 | 182k | input_.Get(i)); |
780 | 182k | } |
781 | | |
782 | | // map<string, .opencv_tensorflow.AttrValue> attr = 5; |
783 | 998k | total_size += 1 * |
784 | 998k | ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_attr_size()); |
785 | 998k | for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator |
786 | 998k | it = this->_internal_attr().begin(); |
787 | 1.06M | it != this->_internal_attr().end(); ++it) { |
788 | 68.4k | total_size += NodeDef_AttrEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); |
789 | 68.4k | } |
790 | | |
791 | | // string name = 1; |
792 | 998k | if (!this->_internal_name().empty()) { |
793 | 34.9k | total_size += 1 + |
794 | 34.9k | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
795 | 34.9k | this->_internal_name()); |
796 | 34.9k | } |
797 | | |
798 | | // string op = 2; |
799 | 998k | if (!this->_internal_op().empty()) { |
800 | 87.3k | total_size += 1 + |
801 | 87.3k | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
802 | 87.3k | this->_internal_op()); |
803 | 87.3k | } |
804 | | |
805 | | // string device = 4; |
806 | 998k | if (!this->_internal_device().empty()) { |
807 | 3.13k | total_size += 1 + |
808 | 3.13k | ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( |
809 | 3.13k | this->_internal_device()); |
810 | 3.13k | } |
811 | | |
812 | 998k | return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); |
813 | 998k | } |
814 | | |
815 | | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NodeDef::_class_data_ = { |
816 | | ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, |
817 | | NodeDef::MergeImpl |
818 | | }; |
819 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NodeDef::GetClassData() const { return &_class_data_; } |
820 | | |
821 | | void NodeDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, |
822 | 0 | const ::PROTOBUF_NAMESPACE_ID::Message& from) { |
823 | 0 | static_cast<NodeDef *>(to)->MergeFrom( |
824 | 0 | static_cast<const NodeDef &>(from)); |
825 | 0 | } |
826 | | |
827 | | |
828 | 0 | void NodeDef::MergeFrom(const NodeDef& from) { |
829 | | // @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.NodeDef) |
830 | 0 | GOOGLE_DCHECK_NE(&from, this); |
831 | 0 | uint32_t cached_has_bits = 0; |
832 | 0 | (void) cached_has_bits; |
833 | |
|
834 | 0 | input_.MergeFrom(from.input_); |
835 | 0 | attr_.MergeFrom(from.attr_); |
836 | 0 | if (!from._internal_name().empty()) { |
837 | 0 | _internal_set_name(from._internal_name()); |
838 | 0 | } |
839 | 0 | if (!from._internal_op().empty()) { |
840 | 0 | _internal_set_op(from._internal_op()); |
841 | 0 | } |
842 | 0 | if (!from._internal_device().empty()) { |
843 | 0 | _internal_set_device(from._internal_device()); |
844 | 0 | } |
845 | 0 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); |
846 | 0 | } |
847 | | |
848 | 0 | void NodeDef::CopyFrom(const NodeDef& from) { |
849 | | // @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.NodeDef) |
850 | 0 | if (&from == this) return; |
851 | 0 | Clear(); |
852 | 0 | MergeFrom(from); |
853 | 0 | } |
854 | | |
855 | 0 | bool NodeDef::IsInitialized() const { |
856 | 0 | return true; |
857 | 0 | } |
858 | | |
859 | 0 | void NodeDef::InternalSwap(NodeDef* other) { |
860 | 0 | using std::swap; |
861 | 0 | auto* lhs_arena = GetArenaForAllocation(); |
862 | 0 | auto* rhs_arena = other->GetArenaForAllocation(); |
863 | 0 | _internal_metadata_.InternalSwap(&other->_internal_metadata_); |
864 | 0 | input_.InternalSwap(&other->input_); |
865 | 0 | attr_.InternalSwap(&other->attr_); |
866 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
867 | 0 | &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
868 | 0 | &name_, lhs_arena, |
869 | 0 | &other->name_, rhs_arena |
870 | 0 | ); |
871 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
872 | 0 | &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
873 | 0 | &op_, lhs_arena, |
874 | 0 | &other->op_, rhs_arena |
875 | 0 | ); |
876 | 0 | ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( |
877 | 0 | &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), |
878 | 0 | &device_, lhs_arena, |
879 | 0 | &other->device_, rhs_arena |
880 | 0 | ); |
881 | 0 | } |
882 | | |
883 | 0 | ::PROTOBUF_NAMESPACE_ID::Metadata NodeDef::GetMetadata() const { |
884 | 0 | return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( |
885 | 0 | &descriptor_table_graph_2eproto_getter, &descriptor_table_graph_2eproto_once, |
886 | 0 | file_level_metadata_graph_2eproto[2]); |
887 | 0 | } |
888 | | |
889 | | // @@protoc_insertion_point(namespace_scope) |
890 | | } // namespace opencv_tensorflow |
891 | | PROTOBUF_NAMESPACE_OPEN |
892 | 0 | template<> PROTOBUF_NOINLINE ::opencv_tensorflow::GraphDef* Arena::CreateMaybeMessage< ::opencv_tensorflow::GraphDef >(Arena* arena) { |
893 | 0 | return Arena::CreateMessageInternal< ::opencv_tensorflow::GraphDef >(arena); |
894 | 0 | } |
895 | 82.4k | template<> PROTOBUF_NOINLINE ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse* Arena::CreateMaybeMessage< ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse >(Arena* arena) { |
896 | 82.4k | return Arena::CreateMessageInternal< ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse >(arena); |
897 | 82.4k | } |
898 | 1.06M | template<> PROTOBUF_NOINLINE ::opencv_tensorflow::NodeDef* Arena::CreateMaybeMessage< ::opencv_tensorflow::NodeDef >(Arena* arena) { |
899 | 1.06M | return Arena::CreateMessageInternal< ::opencv_tensorflow::NodeDef >(arena); |
900 | 1.06M | } |
901 | | PROTOBUF_NAMESPACE_CLOSE |
902 | | |
903 | | // @@protoc_insertion_point(global_scope) |
904 | | #include <google/protobuf/port_undef.inc> |