Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/dnn/misc/onnx/opencv-onnx.pb.cc
16349 views
1
// Generated by the protocol buffer compiler. DO NOT EDIT!
2
// source: opencv-onnx.proto
3
4
#include "opencv-onnx.pb.h"
5
6
#include <algorithm>
7
8
#include <google/protobuf/stubs/common.h>
9
#include <google/protobuf/stubs/port.h>
10
#include <google/protobuf/stubs/once.h>
11
#include <google/protobuf/io/coded_stream.h>
12
#include <google/protobuf/wire_format_lite_inl.h>
13
#include <google/protobuf/descriptor.h>
14
#include <google/protobuf/generated_message_reflection.h>
15
#include <google/protobuf/reflection_ops.h>
16
#include <google/protobuf/wire_format.h>
17
// This is a temporary google only hack
18
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
19
#include "third_party/protobuf/version.h"
20
#endif
21
// @@protoc_insertion_point(includes)
22
namespace opencv_onnx {
23
class AttributeProtoDefaultTypeInternal {
24
public:
25
::google::protobuf::internal::ExplicitlyConstructed<AttributeProto>
26
_instance;
27
} _AttributeProto_default_instance_;
28
class ValueInfoProtoDefaultTypeInternal {
29
public:
30
::google::protobuf::internal::ExplicitlyConstructed<ValueInfoProto>
31
_instance;
32
} _ValueInfoProto_default_instance_;
33
class NodeProtoDefaultTypeInternal {
34
public:
35
::google::protobuf::internal::ExplicitlyConstructed<NodeProto>
36
_instance;
37
} _NodeProto_default_instance_;
38
class ModelProtoDefaultTypeInternal {
39
public:
40
::google::protobuf::internal::ExplicitlyConstructed<ModelProto>
41
_instance;
42
} _ModelProto_default_instance_;
43
class StringStringEntryProtoDefaultTypeInternal {
44
public:
45
::google::protobuf::internal::ExplicitlyConstructed<StringStringEntryProto>
46
_instance;
47
} _StringStringEntryProto_default_instance_;
48
class GraphProtoDefaultTypeInternal {
49
public:
50
::google::protobuf::internal::ExplicitlyConstructed<GraphProto>
51
_instance;
52
} _GraphProto_default_instance_;
53
class TensorProto_SegmentDefaultTypeInternal {
54
public:
55
::google::protobuf::internal::ExplicitlyConstructed<TensorProto_Segment>
56
_instance;
57
} _TensorProto_Segment_default_instance_;
58
class TensorProtoDefaultTypeInternal {
59
public:
60
::google::protobuf::internal::ExplicitlyConstructed<TensorProto>
61
_instance;
62
} _TensorProto_default_instance_;
63
class TensorShapeProto_DimensionDefaultTypeInternal {
64
public:
65
::google::protobuf::internal::ExplicitlyConstructed<TensorShapeProto_Dimension>
66
_instance;
67
::google::protobuf::int64 dim_value_;
68
::google::protobuf::internal::ArenaStringPtr dim_param_;
69
} _TensorShapeProto_Dimension_default_instance_;
70
class TensorShapeProtoDefaultTypeInternal {
71
public:
72
::google::protobuf::internal::ExplicitlyConstructed<TensorShapeProto>
73
_instance;
74
} _TensorShapeProto_default_instance_;
75
class TypeProto_TensorDefaultTypeInternal {
76
public:
77
::google::protobuf::internal::ExplicitlyConstructed<TypeProto_Tensor>
78
_instance;
79
} _TypeProto_Tensor_default_instance_;
80
class TypeProtoDefaultTypeInternal {
81
public:
82
::google::protobuf::internal::ExplicitlyConstructed<TypeProto>
83
_instance;
84
const ::opencv_onnx::TypeProto_Tensor* tensor_type_;
85
} _TypeProto_default_instance_;
86
class OperatorSetIdProtoDefaultTypeInternal {
87
public:
88
::google::protobuf::internal::ExplicitlyConstructed<OperatorSetIdProto>
89
_instance;
90
} _OperatorSetIdProto_default_instance_;
91
} // namespace opencv_onnx
92
namespace protobuf_opencv_2donnx_2eproto {
93
void InitDefaultsAttributeProtoImpl() {
94
GOOGLE_PROTOBUF_VERIFY_VERSION;
95
96
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
97
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
98
#else
99
::google::protobuf::internal::InitProtobufDefaults();
100
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
101
protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto();
102
protobuf_opencv_2donnx_2eproto::InitDefaultsValueInfoProto();
103
{
104
void* ptr = &::opencv_onnx::_AttributeProto_default_instance_;
105
new (ptr) ::opencv_onnx::AttributeProto();
106
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
107
}
108
{
109
void* ptr = &::opencv_onnx::_NodeProto_default_instance_;
110
new (ptr) ::opencv_onnx::NodeProto();
111
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
112
}
113
{
114
void* ptr = &::opencv_onnx::_GraphProto_default_instance_;
115
new (ptr) ::opencv_onnx::GraphProto();
116
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
117
}
118
::opencv_onnx::AttributeProto::InitAsDefaultInstance();
119
::opencv_onnx::NodeProto::InitAsDefaultInstance();
120
::opencv_onnx::GraphProto::InitAsDefaultInstance();
121
}
122
123
void InitDefaultsAttributeProto() {
124
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
125
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsAttributeProtoImpl);
126
}
127
128
void InitDefaultsValueInfoProtoImpl() {
129
GOOGLE_PROTOBUF_VERIFY_VERSION;
130
131
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
132
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
133
#else
134
::google::protobuf::internal::InitProtobufDefaults();
135
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
136
protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto();
137
{
138
void* ptr = &::opencv_onnx::_ValueInfoProto_default_instance_;
139
new (ptr) ::opencv_onnx::ValueInfoProto();
140
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
141
}
142
::opencv_onnx::ValueInfoProto::InitAsDefaultInstance();
143
}
144
145
void InitDefaultsValueInfoProto() {
146
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
147
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsValueInfoProtoImpl);
148
}
149
150
void InitDefaultsModelProtoImpl() {
151
GOOGLE_PROTOBUF_VERIFY_VERSION;
152
153
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
154
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
155
#else
156
::google::protobuf::internal::InitProtobufDefaults();
157
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
158
protobuf_opencv_2donnx_2eproto::InitDefaultsOperatorSetIdProto();
159
protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
160
protobuf_opencv_2donnx_2eproto::InitDefaultsStringStringEntryProto();
161
{
162
void* ptr = &::opencv_onnx::_ModelProto_default_instance_;
163
new (ptr) ::opencv_onnx::ModelProto();
164
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
165
}
166
::opencv_onnx::ModelProto::InitAsDefaultInstance();
167
}
168
169
void InitDefaultsModelProto() {
170
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
171
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsModelProtoImpl);
172
}
173
174
void InitDefaultsStringStringEntryProtoImpl() {
175
GOOGLE_PROTOBUF_VERIFY_VERSION;
176
177
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
178
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
179
#else
180
::google::protobuf::internal::InitProtobufDefaults();
181
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
182
{
183
void* ptr = &::opencv_onnx::_StringStringEntryProto_default_instance_;
184
new (ptr) ::opencv_onnx::StringStringEntryProto();
185
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
186
}
187
::opencv_onnx::StringStringEntryProto::InitAsDefaultInstance();
188
}
189
190
void InitDefaultsStringStringEntryProto() {
191
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
192
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStringStringEntryProtoImpl);
193
}
194
195
void InitDefaultsTensorProto_SegmentImpl() {
196
GOOGLE_PROTOBUF_VERIFY_VERSION;
197
198
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
199
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
200
#else
201
::google::protobuf::internal::InitProtobufDefaults();
202
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
203
{
204
void* ptr = &::opencv_onnx::_TensorProto_Segment_default_instance_;
205
new (ptr) ::opencv_onnx::TensorProto_Segment();
206
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
207
}
208
::opencv_onnx::TensorProto_Segment::InitAsDefaultInstance();
209
}
210
211
void InitDefaultsTensorProto_Segment() {
212
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
213
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorProto_SegmentImpl);
214
}
215
216
void InitDefaultsTensorProtoImpl() {
217
GOOGLE_PROTOBUF_VERIFY_VERSION;
218
219
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
220
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
221
#else
222
::google::protobuf::internal::InitProtobufDefaults();
223
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
224
protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto_Segment();
225
{
226
void* ptr = &::opencv_onnx::_TensorProto_default_instance_;
227
new (ptr) ::opencv_onnx::TensorProto();
228
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
229
}
230
::opencv_onnx::TensorProto::InitAsDefaultInstance();
231
}
232
233
void InitDefaultsTensorProto() {
234
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
235
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorProtoImpl);
236
}
237
238
void InitDefaultsTensorShapeProto_DimensionImpl() {
239
GOOGLE_PROTOBUF_VERIFY_VERSION;
240
241
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
242
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
243
#else
244
::google::protobuf::internal::InitProtobufDefaults();
245
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
246
{
247
void* ptr = &::opencv_onnx::_TensorShapeProto_Dimension_default_instance_;
248
new (ptr) ::opencv_onnx::TensorShapeProto_Dimension();
249
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
250
}
251
::opencv_onnx::TensorShapeProto_Dimension::InitAsDefaultInstance();
252
}
253
254
void InitDefaultsTensorShapeProto_Dimension() {
255
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
256
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorShapeProto_DimensionImpl);
257
}
258
259
void InitDefaultsTensorShapeProtoImpl() {
260
GOOGLE_PROTOBUF_VERIFY_VERSION;
261
262
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
263
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
264
#else
265
::google::protobuf::internal::InitProtobufDefaults();
266
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
267
protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto_Dimension();
268
{
269
void* ptr = &::opencv_onnx::_TensorShapeProto_default_instance_;
270
new (ptr) ::opencv_onnx::TensorShapeProto();
271
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
272
}
273
::opencv_onnx::TensorShapeProto::InitAsDefaultInstance();
274
}
275
276
void InitDefaultsTensorShapeProto() {
277
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
278
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorShapeProtoImpl);
279
}
280
281
void InitDefaultsTypeProto_TensorImpl() {
282
GOOGLE_PROTOBUF_VERIFY_VERSION;
283
284
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
285
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
286
#else
287
::google::protobuf::internal::InitProtobufDefaults();
288
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
289
protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto();
290
{
291
void* ptr = &::opencv_onnx::_TypeProto_Tensor_default_instance_;
292
new (ptr) ::opencv_onnx::TypeProto_Tensor();
293
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
294
}
295
::opencv_onnx::TypeProto_Tensor::InitAsDefaultInstance();
296
}
297
298
void InitDefaultsTypeProto_Tensor() {
299
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
300
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTypeProto_TensorImpl);
301
}
302
303
void InitDefaultsTypeProtoImpl() {
304
GOOGLE_PROTOBUF_VERIFY_VERSION;
305
306
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
307
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
308
#else
309
::google::protobuf::internal::InitProtobufDefaults();
310
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
311
protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto_Tensor();
312
{
313
void* ptr = &::opencv_onnx::_TypeProto_default_instance_;
314
new (ptr) ::opencv_onnx::TypeProto();
315
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
316
}
317
::opencv_onnx::TypeProto::InitAsDefaultInstance();
318
}
319
320
void InitDefaultsTypeProto() {
321
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
322
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTypeProtoImpl);
323
}
324
325
void InitDefaultsOperatorSetIdProtoImpl() {
326
GOOGLE_PROTOBUF_VERIFY_VERSION;
327
328
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
329
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
330
#else
331
::google::protobuf::internal::InitProtobufDefaults();
332
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
333
{
334
void* ptr = &::opencv_onnx::_OperatorSetIdProto_default_instance_;
335
new (ptr) ::opencv_onnx::OperatorSetIdProto();
336
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
337
}
338
::opencv_onnx::OperatorSetIdProto::InitAsDefaultInstance();
339
}
340
341
void InitDefaultsOperatorSetIdProto() {
342
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
343
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsOperatorSetIdProtoImpl);
344
}
345
346
::google::protobuf::Metadata file_level_metadata[13];
347
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[3];
348
349
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
350
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, _has_bits_),
351
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, _internal_metadata_),
352
~0u, // no _extensions_
353
~0u, // no _oneof_case_
354
~0u, // no _weak_field_map_
355
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, name_),
356
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, ref_attr_name_),
357
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, doc_string_),
358
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, type_),
359
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, f_),
360
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, i_),
361
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, s_),
362
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, t_),
363
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, g_),
364
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, floats_),
365
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, ints_),
366
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, strings_),
367
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, tensors_),
368
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::AttributeProto, graphs_),
369
0,
370
3,
371
2,
372
8,
373
7,
374
6,
375
1,
376
4,
377
5,
378
~0u,
379
~0u,
380
~0u,
381
~0u,
382
~0u,
383
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _has_bits_),
384
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, _internal_metadata_),
385
~0u, // no _extensions_
386
~0u, // no _oneof_case_
387
~0u, // no _weak_field_map_
388
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, name_),
389
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, type_),
390
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ValueInfoProto, doc_string_),
391
0,
392
2,
393
1,
394
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, _has_bits_),
395
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, _internal_metadata_),
396
~0u, // no _extensions_
397
~0u, // no _oneof_case_
398
~0u, // no _weak_field_map_
399
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, input_),
400
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, output_),
401
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, name_),
402
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, op_type_),
403
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, domain_),
404
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, attribute_),
405
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::NodeProto, doc_string_),
406
~0u,
407
~0u,
408
0,
409
1,
410
3,
411
~0u,
412
2,
413
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, _has_bits_),
414
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, _internal_metadata_),
415
~0u, // no _extensions_
416
~0u, // no _oneof_case_
417
~0u, // no _weak_field_map_
418
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, ir_version_),
419
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, opset_import_),
420
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_name_),
421
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, producer_version_),
422
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, domain_),
423
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, model_version_),
424
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, doc_string_),
425
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, graph_),
426
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::ModelProto, metadata_props_),
427
5,
428
~0u,
429
0,
430
1,
431
2,
432
6,
433
3,
434
4,
435
~0u,
436
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _has_bits_),
437
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, _internal_metadata_),
438
~0u, // no _extensions_
439
~0u, // no _oneof_case_
440
~0u, // no _weak_field_map_
441
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, key_),
442
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::StringStringEntryProto, value_),
443
0,
444
1,
445
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, _has_bits_),
446
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, _internal_metadata_),
447
~0u, // no _extensions_
448
~0u, // no _oneof_case_
449
~0u, // no _weak_field_map_
450
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, node_),
451
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, name_),
452
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, initializer_),
453
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, doc_string_),
454
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, input_),
455
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, output_),
456
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::GraphProto, value_info_),
457
~0u,
458
0,
459
~0u,
460
1,
461
~0u,
462
~0u,
463
~0u,
464
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _has_bits_),
465
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, _internal_metadata_),
466
~0u, // no _extensions_
467
~0u, // no _oneof_case_
468
~0u, // no _weak_field_map_
469
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, begin_),
470
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto_Segment, end_),
471
0,
472
1,
473
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, _has_bits_),
474
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, _internal_metadata_),
475
~0u, // no _extensions_
476
~0u, // no _oneof_case_
477
~0u, // no _weak_field_map_
478
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, dims_),
479
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, data_type_),
480
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, segment_),
481
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, float_data_),
482
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, int32_data_),
483
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, string_data_),
484
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, int64_data_),
485
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, name_),
486
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, doc_string_),
487
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, raw_data_),
488
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, double_data_),
489
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorProto, uint64_data_),
490
~0u,
491
4,
492
3,
493
~0u,
494
~0u,
495
~0u,
496
~0u,
497
0,
498
2,
499
1,
500
~0u,
501
~0u,
502
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _has_bits_),
503
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _internal_metadata_),
504
~0u, // no _extensions_
505
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, _oneof_case_[0]),
506
~0u, // no _weak_field_map_
507
offsetof(::opencv_onnx::TensorShapeProto_DimensionDefaultTypeInternal, dim_value_),
508
offsetof(::opencv_onnx::TensorShapeProto_DimensionDefaultTypeInternal, dim_param_),
509
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, denotation_),
510
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto_Dimension, value_),
511
~0u,
512
~0u,
513
0,
514
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, _has_bits_),
515
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, _internal_metadata_),
516
~0u, // no _extensions_
517
~0u, // no _oneof_case_
518
~0u, // no _weak_field_map_
519
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TensorShapeProto, dim_),
520
~0u,
521
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _has_bits_),
522
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, _internal_metadata_),
523
~0u, // no _extensions_
524
~0u, // no _oneof_case_
525
~0u, // no _weak_field_map_
526
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, elem_type_),
527
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto_Tensor, shape_),
528
1,
529
0,
530
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, _has_bits_),
531
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, _internal_metadata_),
532
~0u, // no _extensions_
533
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, _oneof_case_[0]),
534
~0u, // no _weak_field_map_
535
offsetof(::opencv_onnx::TypeProtoDefaultTypeInternal, tensor_type_),
536
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, denotation_),
537
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::TypeProto, value_),
538
~0u,
539
0,
540
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _has_bits_),
541
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, _internal_metadata_),
542
~0u, // no _extensions_
543
~0u, // no _oneof_case_
544
~0u, // no _weak_field_map_
545
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, domain_),
546
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_onnx::OperatorSetIdProto, version_),
547
0,
548
1,
549
};
550
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
551
{ 0, 19, sizeof(::opencv_onnx::AttributeProto)},
552
{ 33, 41, sizeof(::opencv_onnx::ValueInfoProto)},
553
{ 44, 56, sizeof(::opencv_onnx::NodeProto)},
554
{ 63, 77, sizeof(::opencv_onnx::ModelProto)},
555
{ 86, 93, sizeof(::opencv_onnx::StringStringEntryProto)},
556
{ 95, 107, sizeof(::opencv_onnx::GraphProto)},
557
{ 114, 121, sizeof(::opencv_onnx::TensorProto_Segment)},
558
{ 123, 140, sizeof(::opencv_onnx::TensorProto)},
559
{ 152, 161, sizeof(::opencv_onnx::TensorShapeProto_Dimension)},
560
{ 164, 170, sizeof(::opencv_onnx::TensorShapeProto)},
561
{ 171, 178, sizeof(::opencv_onnx::TypeProto_Tensor)},
562
{ 180, 188, sizeof(::opencv_onnx::TypeProto)},
563
{ 190, 197, sizeof(::opencv_onnx::OperatorSetIdProto)},
564
};
565
566
static ::google::protobuf::Message const * const file_default_instances[] = {
567
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_AttributeProto_default_instance_),
568
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_ValueInfoProto_default_instance_),
569
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_NodeProto_default_instance_),
570
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_ModelProto_default_instance_),
571
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_StringStringEntryProto_default_instance_),
572
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_GraphProto_default_instance_),
573
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TensorProto_Segment_default_instance_),
574
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TensorProto_default_instance_),
575
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TensorShapeProto_Dimension_default_instance_),
576
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TensorShapeProto_default_instance_),
577
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TypeProto_Tensor_default_instance_),
578
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_TypeProto_default_instance_),
579
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_onnx::_OperatorSetIdProto_default_instance_),
580
};
581
582
void protobuf_AssignDescriptors() {
583
AddDescriptors();
584
::google::protobuf::MessageFactory* factory = NULL;
585
AssignDescriptors(
586
"opencv-onnx.proto", schemas, file_default_instances, TableStruct::offsets, factory,
587
file_level_metadata, file_level_enum_descriptors, NULL);
588
}
589
590
void protobuf_AssignDescriptorsOnce() {
591
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
592
::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
593
}
594
595
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
596
void protobuf_RegisterTypes(const ::std::string&) {
597
protobuf_AssignDescriptorsOnce();
598
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 13);
599
}
600
601
void AddDescriptorsImpl() {
602
InitDefaults();
603
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
604
"\n\021opencv-onnx.proto\022\013opencv_onnx\"\203\004\n\016Att"
605
"ributeProto\022\014\n\004name\030\001 \001(\t\022\025\n\rref_attr_na"
606
"me\030\025 \001(\t\022\022\n\ndoc_string\030\r \001(\t\0227\n\004type\030\024 \001"
607
"(\0162).opencv_onnx.AttributeProto.Attribut"
608
"eType\022\t\n\001f\030\002 \001(\002\022\t\n\001i\030\003 \001(\003\022\t\n\001s\030\004 \001(\014\022#"
609
"\n\001t\030\005 \001(\0132\030.opencv_onnx.TensorProto\022\"\n\001g"
610
"\030\006 \001(\0132\027.opencv_onnx.GraphProto\022\016\n\006float"
611
"s\030\007 \003(\002\022\014\n\004ints\030\010 \003(\003\022\017\n\007strings\030\t \003(\014\022)"
612
"\n\007tensors\030\n \003(\0132\030.opencv_onnx.TensorProt"
613
"o\022\'\n\006graphs\030\013 \003(\0132\027.opencv_onnx.GraphPro"
614
"to\"\221\001\n\rAttributeType\022\r\n\tUNDEFINED\020\000\022\t\n\005F"
615
"LOAT\020\001\022\007\n\003INT\020\002\022\n\n\006STRING\020\003\022\n\n\006TENSOR\020\004\022"
616
"\t\n\005GRAPH\020\005\022\n\n\006FLOATS\020\006\022\010\n\004INTS\020\007\022\013\n\007STRI"
617
"NGS\020\010\022\013\n\007TENSORS\020\t\022\n\n\006GRAPHS\020\n\"X\n\016ValueI"
618
"nfoProto\022\014\n\004name\030\001 \001(\t\022$\n\004type\030\002 \001(\0132\026.o"
619
"pencv_onnx.TypeProto\022\022\n\ndoc_string\030\003 \001(\t"
620
"\"\235\001\n\tNodeProto\022\r\n\005input\030\001 \003(\t\022\016\n\006output\030"
621
"\002 \003(\t\022\014\n\004name\030\003 \001(\t\022\017\n\007op_type\030\004 \001(\t\022\016\n\006"
622
"domain\030\007 \001(\t\022.\n\tattribute\030\005 \003(\0132\033.opencv"
623
"_onnx.AttributeProto\022\022\n\ndoc_string\030\006 \001(\t"
624
"\"\250\002\n\nModelProto\022\022\n\nir_version\030\001 \001(\003\0225\n\014o"
625
"pset_import\030\010 \003(\0132\037.opencv_onnx.Operator"
626
"SetIdProto\022\025\n\rproducer_name\030\002 \001(\t\022\030\n\020pro"
627
"ducer_version\030\003 \001(\t\022\016\n\006domain\030\004 \001(\t\022\025\n\rm"
628
"odel_version\030\005 \001(\003\022\022\n\ndoc_string\030\006 \001(\t\022&"
629
"\n\005graph\030\007 \001(\0132\027.opencv_onnx.GraphProto\022;"
630
"\n\016metadata_props\030\016 \003(\0132#.opencv_onnx.Str"
631
"ingStringEntryProto\"4\n\026StringStringEntry"
632
"Proto\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\215\002\n\nGr"
633
"aphProto\022$\n\004node\030\001 \003(\0132\026.opencv_onnx.Nod"
634
"eProto\022\014\n\004name\030\002 \001(\t\022-\n\013initializer\030\005 \003("
635
"\0132\030.opencv_onnx.TensorProto\022\022\n\ndoc_strin"
636
"g\030\n \001(\t\022*\n\005input\030\013 \003(\0132\033.opencv_onnx.Val"
637
"ueInfoProto\022+\n\006output\030\014 \003(\0132\033.opencv_onn"
638
"x.ValueInfoProto\022/\n\nvalue_info\030\r \003(\0132\033.o"
639
"pencv_onnx.ValueInfoProto\"\275\004\n\013TensorProt"
640
"o\022\014\n\004dims\030\001 \003(\003\0224\n\tdata_type\030\002 \001(\0162!.ope"
641
"ncv_onnx.TensorProto.DataType\0221\n\007segment"
642
"\030\003 \001(\0132 .opencv_onnx.TensorProto.Segment"
643
"\022\026\n\nfloat_data\030\004 \003(\002B\002\020\001\022\026\n\nint32_data\030\005"
644
" \003(\005B\002\020\001\022\023\n\013string_data\030\006 \003(\014\022\026\n\nint64_d"
645
"ata\030\007 \003(\003B\002\020\001\022\014\n\004name\030\010 \001(\t\022\022\n\ndoc_strin"
646
"g\030\014 \001(\t\022\020\n\010raw_data\030\t \001(\014\022\027\n\013double_data"
647
"\030\n \003(\001B\002\020\001\022\027\n\013uint64_data\030\013 \003(\004B\002\020\001\032%\n\007S"
648
"egment\022\r\n\005begin\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\"\314\001\n\010D"
649
"ataType\022\r\n\tUNDEFINED\020\000\022\t\n\005FLOAT\020\001\022\t\n\005UIN"
650
"T8\020\002\022\010\n\004INT8\020\003\022\n\n\006UINT16\020\004\022\t\n\005INT16\020\005\022\t\n"
651
"\005INT32\020\006\022\t\n\005INT64\020\007\022\n\n\006STRING\020\010\022\010\n\004BOOL\020"
652
"\t\022\013\n\007FLOAT16\020\n\022\n\n\006DOUBLE\020\013\022\n\n\006UINT32\020\014\022\n"
653
"\n\006UINT64\020\r\022\r\n\tCOMPLEX64\020\016\022\016\n\nCOMPLEX128\020"
654
"\017\"\234\001\n\020TensorShapeProto\0224\n\003dim\030\001 \003(\0132\'.op"
655
"encv_onnx.TensorShapeProto.Dimension\032R\n\t"
656
"Dimension\022\023\n\tdim_value\030\001 \001(\003H\000\022\023\n\tdim_pa"
657
"ram\030\002 \001(\tH\000\022\022\n\ndenotation\030\003 \001(\tB\007\n\005value"
658
"\"\314\001\n\tTypeProto\0224\n\013tensor_type\030\001 \001(\0132\035.op"
659
"encv_onnx.TypeProto.TensorH\000\022\022\n\ndenotati"
660
"on\030\006 \001(\t\032l\n\006Tensor\0224\n\telem_type\030\001 \001(\0162!."
661
"opencv_onnx.TensorProto.DataType\022,\n\005shap"
662
"e\030\002 \001(\0132\035.opencv_onnx.TensorShapeProtoB\007"
663
"\n\005value\"5\n\022OperatorSetIdProto\022\016\n\006domain\030"
664
"\001 \001(\t\022\017\n\007version\030\002 \001(\003*c\n\007Version\022\022\n\016_ST"
665
"ART_VERSION\020\000\022\031\n\025IR_VERSION_2017_10_10\020\001"
666
"\022\031\n\025IR_VERSION_2017_10_30\020\002\022\016\n\nIR_VERSIO"
667
"N\020\003"
668
};
669
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
670
descriptor, 2523);
671
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
672
"opencv-onnx.proto", &protobuf_RegisterTypes);
673
}
674
675
void AddDescriptors() {
676
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
677
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
678
}
679
// Force AddDescriptors() to be called at dynamic initialization time.
680
struct StaticDescriptorInitializer {
681
StaticDescriptorInitializer() {
682
AddDescriptors();
683
}
684
} static_descriptor_initializer;
685
} // namespace protobuf_opencv_2donnx_2eproto
686
namespace opencv_onnx {
687
const ::google::protobuf::EnumDescriptor* AttributeProto_AttributeType_descriptor() {
688
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
689
return protobuf_opencv_2donnx_2eproto::file_level_enum_descriptors[0];
690
}
691
bool AttributeProto_AttributeType_IsValid(int value) {
692
switch (value) {
693
case 0:
694
case 1:
695
case 2:
696
case 3:
697
case 4:
698
case 5:
699
case 6:
700
case 7:
701
case 8:
702
case 9:
703
case 10:
704
return true;
705
default:
706
return false;
707
}
708
}
709
710
#if !defined(_MSC_VER) || _MSC_VER >= 1900
711
const AttributeProto_AttributeType AttributeProto::UNDEFINED;
712
const AttributeProto_AttributeType AttributeProto::FLOAT;
713
const AttributeProto_AttributeType AttributeProto::INT;
714
const AttributeProto_AttributeType AttributeProto::STRING;
715
const AttributeProto_AttributeType AttributeProto::TENSOR;
716
const AttributeProto_AttributeType AttributeProto::GRAPH;
717
const AttributeProto_AttributeType AttributeProto::FLOATS;
718
const AttributeProto_AttributeType AttributeProto::INTS;
719
const AttributeProto_AttributeType AttributeProto::STRINGS;
720
const AttributeProto_AttributeType AttributeProto::TENSORS;
721
const AttributeProto_AttributeType AttributeProto::GRAPHS;
722
const AttributeProto_AttributeType AttributeProto::AttributeType_MIN;
723
const AttributeProto_AttributeType AttributeProto::AttributeType_MAX;
724
const int AttributeProto::AttributeType_ARRAYSIZE;
725
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
726
const ::google::protobuf::EnumDescriptor* TensorProto_DataType_descriptor() {
727
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
728
return protobuf_opencv_2donnx_2eproto::file_level_enum_descriptors[1];
729
}
730
bool TensorProto_DataType_IsValid(int value) {
731
switch (value) {
732
case 0:
733
case 1:
734
case 2:
735
case 3:
736
case 4:
737
case 5:
738
case 6:
739
case 7:
740
case 8:
741
case 9:
742
case 10:
743
case 11:
744
case 12:
745
case 13:
746
case 14:
747
case 15:
748
return true;
749
default:
750
return false;
751
}
752
}
753
754
#if !defined(_MSC_VER) || _MSC_VER >= 1900
755
const TensorProto_DataType TensorProto::UNDEFINED;
756
const TensorProto_DataType TensorProto::FLOAT;
757
const TensorProto_DataType TensorProto::UINT8;
758
const TensorProto_DataType TensorProto::INT8;
759
const TensorProto_DataType TensorProto::UINT16;
760
const TensorProto_DataType TensorProto::INT16;
761
const TensorProto_DataType TensorProto::INT32;
762
const TensorProto_DataType TensorProto::INT64;
763
const TensorProto_DataType TensorProto::STRING;
764
const TensorProto_DataType TensorProto::BOOL;
765
const TensorProto_DataType TensorProto::FLOAT16;
766
const TensorProto_DataType TensorProto::DOUBLE;
767
const TensorProto_DataType TensorProto::UINT32;
768
const TensorProto_DataType TensorProto::UINT64;
769
const TensorProto_DataType TensorProto::COMPLEX64;
770
const TensorProto_DataType TensorProto::COMPLEX128;
771
const TensorProto_DataType TensorProto::DataType_MIN;
772
const TensorProto_DataType TensorProto::DataType_MAX;
773
const int TensorProto::DataType_ARRAYSIZE;
774
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
775
const ::google::protobuf::EnumDescriptor* Version_descriptor() {
776
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
777
return protobuf_opencv_2donnx_2eproto::file_level_enum_descriptors[2];
778
}
779
bool Version_IsValid(int value) {
780
switch (value) {
781
case 0:
782
case 1:
783
case 2:
784
case 3:
785
return true;
786
default:
787
return false;
788
}
789
}
790
791
792
// ===================================================================
793
794
void AttributeProto::InitAsDefaultInstance() {
795
::opencv_onnx::_AttributeProto_default_instance_._instance.get_mutable()->t_ = const_cast< ::opencv_onnx::TensorProto*>(
796
::opencv_onnx::TensorProto::internal_default_instance());
797
::opencv_onnx::_AttributeProto_default_instance_._instance.get_mutable()->g_ = const_cast< ::opencv_onnx::GraphProto*>(
798
::opencv_onnx::GraphProto::internal_default_instance());
799
}
800
#if !defined(_MSC_VER) || _MSC_VER >= 1900
801
const int AttributeProto::kNameFieldNumber;
802
const int AttributeProto::kRefAttrNameFieldNumber;
803
const int AttributeProto::kDocStringFieldNumber;
804
const int AttributeProto::kTypeFieldNumber;
805
const int AttributeProto::kFFieldNumber;
806
const int AttributeProto::kIFieldNumber;
807
const int AttributeProto::kSFieldNumber;
808
const int AttributeProto::kTFieldNumber;
809
const int AttributeProto::kGFieldNumber;
810
const int AttributeProto::kFloatsFieldNumber;
811
const int AttributeProto::kIntsFieldNumber;
812
const int AttributeProto::kStringsFieldNumber;
813
const int AttributeProto::kTensorsFieldNumber;
814
const int AttributeProto::kGraphsFieldNumber;
815
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
816
817
AttributeProto::AttributeProto()
818
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
819
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
820
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
821
}
822
SharedCtor();
823
// @@protoc_insertion_point(constructor:opencv_onnx.AttributeProto)
824
}
825
AttributeProto::AttributeProto(const AttributeProto& from)
826
: ::google::protobuf::Message(),
827
_internal_metadata_(NULL),
828
_has_bits_(from._has_bits_),
829
_cached_size_(0),
830
floats_(from.floats_),
831
ints_(from.ints_),
832
strings_(from.strings_),
833
tensors_(from.tensors_),
834
graphs_(from.graphs_) {
835
_internal_metadata_.MergeFrom(from._internal_metadata_);
836
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
837
if (from.has_name()) {
838
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
839
}
840
s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
841
if (from.has_s()) {
842
s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
843
}
844
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
845
if (from.has_doc_string()) {
846
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
847
}
848
ref_attr_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
849
if (from.has_ref_attr_name()) {
850
ref_attr_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ref_attr_name_);
851
}
852
if (from.has_t()) {
853
t_ = new ::opencv_onnx::TensorProto(*from.t_);
854
} else {
855
t_ = NULL;
856
}
857
if (from.has_g()) {
858
g_ = new ::opencv_onnx::GraphProto(*from.g_);
859
} else {
860
g_ = NULL;
861
}
862
::memcpy(&i_, &from.i_,
863
static_cast<size_t>(reinterpret_cast<char*>(&type_) -
864
reinterpret_cast<char*>(&i_)) + sizeof(type_));
865
// @@protoc_insertion_point(copy_constructor:opencv_onnx.AttributeProto)
866
}
867
868
void AttributeProto::SharedCtor() {
869
_cached_size_ = 0;
870
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
871
s_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
872
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
873
ref_attr_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
874
::memset(&t_, 0, static_cast<size_t>(
875
reinterpret_cast<char*>(&type_) -
876
reinterpret_cast<char*>(&t_)) + sizeof(type_));
877
}
878
879
AttributeProto::~AttributeProto() {
880
// @@protoc_insertion_point(destructor:opencv_onnx.AttributeProto)
881
SharedDtor();
882
}
883
884
void AttributeProto::SharedDtor() {
885
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
886
s_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
887
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
888
ref_attr_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
889
if (this != internal_default_instance()) delete t_;
890
if (this != internal_default_instance()) delete g_;
891
}
892
893
void AttributeProto::SetCachedSize(int size) const {
894
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
895
_cached_size_ = size;
896
GOOGLE_SAFE_CONCURRENT_WRITES_END();
897
}
898
const ::google::protobuf::Descriptor* AttributeProto::descriptor() {
899
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
900
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
901
}
902
903
const AttributeProto& AttributeProto::default_instance() {
904
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
905
return *internal_default_instance();
906
}
907
908
AttributeProto* AttributeProto::New(::google::protobuf::Arena* arena) const {
909
AttributeProto* n = new AttributeProto;
910
if (arena != NULL) {
911
arena->Own(n);
912
}
913
return n;
914
}
915
916
void AttributeProto::Clear() {
917
// @@protoc_insertion_point(message_clear_start:opencv_onnx.AttributeProto)
918
::google::protobuf::uint32 cached_has_bits = 0;
919
// Prevent compiler warnings about cached_has_bits being unused
920
(void) cached_has_bits;
921
922
floats_.Clear();
923
ints_.Clear();
924
strings_.Clear();
925
tensors_.Clear();
926
graphs_.Clear();
927
cached_has_bits = _has_bits_[0];
928
if (cached_has_bits & 63u) {
929
if (cached_has_bits & 0x00000001u) {
930
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
931
(*name_.UnsafeRawStringPointer())->clear();
932
}
933
if (cached_has_bits & 0x00000002u) {
934
GOOGLE_DCHECK(!s_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
935
(*s_.UnsafeRawStringPointer())->clear();
936
}
937
if (cached_has_bits & 0x00000004u) {
938
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
939
(*doc_string_.UnsafeRawStringPointer())->clear();
940
}
941
if (cached_has_bits & 0x00000008u) {
942
GOOGLE_DCHECK(!ref_attr_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
943
(*ref_attr_name_.UnsafeRawStringPointer())->clear();
944
}
945
if (cached_has_bits & 0x00000010u) {
946
GOOGLE_DCHECK(t_ != NULL);
947
t_->Clear();
948
}
949
if (cached_has_bits & 0x00000020u) {
950
GOOGLE_DCHECK(g_ != NULL);
951
g_->Clear();
952
}
953
}
954
if (cached_has_bits & 192u) {
955
::memset(&i_, 0, static_cast<size_t>(
956
reinterpret_cast<char*>(&f_) -
957
reinterpret_cast<char*>(&i_)) + sizeof(f_));
958
}
959
type_ = 0;
960
_has_bits_.Clear();
961
_internal_metadata_.Clear();
962
}
963
964
bool AttributeProto::MergePartialFromCodedStream(
965
::google::protobuf::io::CodedInputStream* input) {
966
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
967
::google::protobuf::uint32 tag;
968
// @@protoc_insertion_point(parse_start:opencv_onnx.AttributeProto)
969
for (;;) {
970
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
971
tag = p.first;
972
if (!p.second) goto handle_unusual;
973
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
974
// optional string name = 1;
975
case 1: {
976
if (static_cast< ::google::protobuf::uint8>(tag) ==
977
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
978
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
979
input, this->mutable_name()));
980
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
981
this->name().data(), static_cast<int>(this->name().length()),
982
::google::protobuf::internal::WireFormat::PARSE,
983
"opencv_onnx.AttributeProto.name");
984
} else {
985
goto handle_unusual;
986
}
987
break;
988
}
989
990
// optional float f = 2;
991
case 2: {
992
if (static_cast< ::google::protobuf::uint8>(tag) ==
993
static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
994
set_has_f();
995
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
996
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
997
input, &f_)));
998
} else {
999
goto handle_unusual;
1000
}
1001
break;
1002
}
1003
1004
// optional int64 i = 3;
1005
case 3: {
1006
if (static_cast< ::google::protobuf::uint8>(tag) ==
1007
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
1008
set_has_i();
1009
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1010
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1011
input, &i_)));
1012
} else {
1013
goto handle_unusual;
1014
}
1015
break;
1016
}
1017
1018
// optional bytes s = 4;
1019
case 4: {
1020
if (static_cast< ::google::protobuf::uint8>(tag) ==
1021
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
1022
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1023
input, this->mutable_s()));
1024
} else {
1025
goto handle_unusual;
1026
}
1027
break;
1028
}
1029
1030
// optional .opencv_onnx.TensorProto t = 5;
1031
case 5: {
1032
if (static_cast< ::google::protobuf::uint8>(tag) ==
1033
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
1034
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
1035
input, mutable_t()));
1036
} else {
1037
goto handle_unusual;
1038
}
1039
break;
1040
}
1041
1042
// optional .opencv_onnx.GraphProto g = 6;
1043
case 6: {
1044
if (static_cast< ::google::protobuf::uint8>(tag) ==
1045
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
1046
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
1047
input, mutable_g()));
1048
} else {
1049
goto handle_unusual;
1050
}
1051
break;
1052
}
1053
1054
// repeated float floats = 7;
1055
case 7: {
1056
if (static_cast< ::google::protobuf::uint8>(tag) ==
1057
static_cast< ::google::protobuf::uint8>(61u /* 61 & 0xFF */)) {
1058
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1059
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
1060
1, 61u, input, this->mutable_floats())));
1061
} else if (
1062
static_cast< ::google::protobuf::uint8>(tag) ==
1063
static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
1064
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1065
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
1066
input, this->mutable_floats())));
1067
} else {
1068
goto handle_unusual;
1069
}
1070
break;
1071
}
1072
1073
// repeated int64 ints = 8;
1074
case 8: {
1075
if (static_cast< ::google::protobuf::uint8>(tag) ==
1076
static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
1077
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
1078
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1079
1, 64u, input, this->mutable_ints())));
1080
} else if (
1081
static_cast< ::google::protobuf::uint8>(tag) ==
1082
static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
1083
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
1084
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1085
input, this->mutable_ints())));
1086
} else {
1087
goto handle_unusual;
1088
}
1089
break;
1090
}
1091
1092
// repeated bytes strings = 9;
1093
case 9: {
1094
if (static_cast< ::google::protobuf::uint8>(tag) ==
1095
static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
1096
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1097
input, this->add_strings()));
1098
} else {
1099
goto handle_unusual;
1100
}
1101
break;
1102
}
1103
1104
// repeated .opencv_onnx.TensorProto tensors = 10;
1105
case 10: {
1106
if (static_cast< ::google::protobuf::uint8>(tag) ==
1107
static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
1108
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_tensors()));
1109
} else {
1110
goto handle_unusual;
1111
}
1112
break;
1113
}
1114
1115
// repeated .opencv_onnx.GraphProto graphs = 11;
1116
case 11: {
1117
if (static_cast< ::google::protobuf::uint8>(tag) ==
1118
static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
1119
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_graphs()));
1120
} else {
1121
goto handle_unusual;
1122
}
1123
break;
1124
}
1125
1126
// optional string doc_string = 13;
1127
case 13: {
1128
if (static_cast< ::google::protobuf::uint8>(tag) ==
1129
static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
1130
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1131
input, this->mutable_doc_string()));
1132
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1133
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
1134
::google::protobuf::internal::WireFormat::PARSE,
1135
"opencv_onnx.AttributeProto.doc_string");
1136
} else {
1137
goto handle_unusual;
1138
}
1139
break;
1140
}
1141
1142
// optional .opencv_onnx.AttributeProto.AttributeType type = 20;
1143
case 20: {
1144
if (static_cast< ::google::protobuf::uint8>(tag) ==
1145
static_cast< ::google::protobuf::uint8>(160u /* 160 & 0xFF */)) {
1146
int value;
1147
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1148
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
1149
input, &value)));
1150
if (::opencv_onnx::AttributeProto_AttributeType_IsValid(value)) {
1151
set_type(static_cast< ::opencv_onnx::AttributeProto_AttributeType >(value));
1152
} else {
1153
mutable_unknown_fields()->AddVarint(
1154
20, static_cast< ::google::protobuf::uint64>(value));
1155
}
1156
} else {
1157
goto handle_unusual;
1158
}
1159
break;
1160
}
1161
1162
// optional string ref_attr_name = 21;
1163
case 21: {
1164
if (static_cast< ::google::protobuf::uint8>(tag) ==
1165
static_cast< ::google::protobuf::uint8>(170u /* 170 & 0xFF */)) {
1166
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1167
input, this->mutable_ref_attr_name()));
1168
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1169
this->ref_attr_name().data(), static_cast<int>(this->ref_attr_name().length()),
1170
::google::protobuf::internal::WireFormat::PARSE,
1171
"opencv_onnx.AttributeProto.ref_attr_name");
1172
} else {
1173
goto handle_unusual;
1174
}
1175
break;
1176
}
1177
1178
default: {
1179
handle_unusual:
1180
if (tag == 0) {
1181
goto success;
1182
}
1183
DO_(::google::protobuf::internal::WireFormat::SkipField(
1184
input, tag, _internal_metadata_.mutable_unknown_fields()));
1185
break;
1186
}
1187
}
1188
}
1189
success:
1190
// @@protoc_insertion_point(parse_success:opencv_onnx.AttributeProto)
1191
return true;
1192
failure:
1193
// @@protoc_insertion_point(parse_failure:opencv_onnx.AttributeProto)
1194
return false;
1195
#undef DO_
1196
}
1197
1198
void AttributeProto::SerializeWithCachedSizes(
1199
::google::protobuf::io::CodedOutputStream* output) const {
1200
// @@protoc_insertion_point(serialize_start:opencv_onnx.AttributeProto)
1201
::google::protobuf::uint32 cached_has_bits = 0;
1202
(void) cached_has_bits;
1203
1204
cached_has_bits = _has_bits_[0];
1205
// optional string name = 1;
1206
if (cached_has_bits & 0x00000001u) {
1207
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1208
this->name().data(), static_cast<int>(this->name().length()),
1209
::google::protobuf::internal::WireFormat::SERIALIZE,
1210
"opencv_onnx.AttributeProto.name");
1211
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1212
1, this->name(), output);
1213
}
1214
1215
// optional float f = 2;
1216
if (cached_has_bits & 0x00000080u) {
1217
::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->f(), output);
1218
}
1219
1220
// optional int64 i = 3;
1221
if (cached_has_bits & 0x00000040u) {
1222
::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->i(), output);
1223
}
1224
1225
// optional bytes s = 4;
1226
if (cached_has_bits & 0x00000002u) {
1227
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
1228
4, this->s(), output);
1229
}
1230
1231
// optional .opencv_onnx.TensorProto t = 5;
1232
if (cached_has_bits & 0x00000010u) {
1233
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1234
5, *this->t_, output);
1235
}
1236
1237
// optional .opencv_onnx.GraphProto g = 6;
1238
if (cached_has_bits & 0x00000020u) {
1239
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1240
6, *this->g_, output);
1241
}
1242
1243
// repeated float floats = 7;
1244
for (int i = 0, n = this->floats_size(); i < n; i++) {
1245
::google::protobuf::internal::WireFormatLite::WriteFloat(
1246
7, this->floats(i), output);
1247
}
1248
1249
// repeated int64 ints = 8;
1250
for (int i = 0, n = this->ints_size(); i < n; i++) {
1251
::google::protobuf::internal::WireFormatLite::WriteInt64(
1252
8, this->ints(i), output);
1253
}
1254
1255
// repeated bytes strings = 9;
1256
for (int i = 0, n = this->strings_size(); i < n; i++) {
1257
::google::protobuf::internal::WireFormatLite::WriteBytes(
1258
9, this->strings(i), output);
1259
}
1260
1261
// repeated .opencv_onnx.TensorProto tensors = 10;
1262
for (unsigned int i = 0,
1263
n = static_cast<unsigned int>(this->tensors_size()); i < n; i++) {
1264
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1265
10, this->tensors(static_cast<int>(i)), output);
1266
}
1267
1268
// repeated .opencv_onnx.GraphProto graphs = 11;
1269
for (unsigned int i = 0,
1270
n = static_cast<unsigned int>(this->graphs_size()); i < n; i++) {
1271
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1272
11, this->graphs(static_cast<int>(i)), output);
1273
}
1274
1275
// optional string doc_string = 13;
1276
if (cached_has_bits & 0x00000004u) {
1277
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1278
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
1279
::google::protobuf::internal::WireFormat::SERIALIZE,
1280
"opencv_onnx.AttributeProto.doc_string");
1281
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1282
13, this->doc_string(), output);
1283
}
1284
1285
// optional .opencv_onnx.AttributeProto.AttributeType type = 20;
1286
if (cached_has_bits & 0x00000100u) {
1287
::google::protobuf::internal::WireFormatLite::WriteEnum(
1288
20, this->type(), output);
1289
}
1290
1291
// optional string ref_attr_name = 21;
1292
if (cached_has_bits & 0x00000008u) {
1293
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1294
this->ref_attr_name().data(), static_cast<int>(this->ref_attr_name().length()),
1295
::google::protobuf::internal::WireFormat::SERIALIZE,
1296
"opencv_onnx.AttributeProto.ref_attr_name");
1297
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1298
21, this->ref_attr_name(), output);
1299
}
1300
1301
if (_internal_metadata_.have_unknown_fields()) {
1302
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1303
_internal_metadata_.unknown_fields(), output);
1304
}
1305
// @@protoc_insertion_point(serialize_end:opencv_onnx.AttributeProto)
1306
}
1307
1308
::google::protobuf::uint8* AttributeProto::InternalSerializeWithCachedSizesToArray(
1309
bool deterministic, ::google::protobuf::uint8* target) const {
1310
(void)deterministic; // Unused
1311
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.AttributeProto)
1312
::google::protobuf::uint32 cached_has_bits = 0;
1313
(void) cached_has_bits;
1314
1315
cached_has_bits = _has_bits_[0];
1316
// optional string name = 1;
1317
if (cached_has_bits & 0x00000001u) {
1318
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1319
this->name().data(), static_cast<int>(this->name().length()),
1320
::google::protobuf::internal::WireFormat::SERIALIZE,
1321
"opencv_onnx.AttributeProto.name");
1322
target =
1323
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1324
1, this->name(), target);
1325
}
1326
1327
// optional float f = 2;
1328
if (cached_has_bits & 0x00000080u) {
1329
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->f(), target);
1330
}
1331
1332
// optional int64 i = 3;
1333
if (cached_has_bits & 0x00000040u) {
1334
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->i(), target);
1335
}
1336
1337
// optional bytes s = 4;
1338
if (cached_has_bits & 0x00000002u) {
1339
target =
1340
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1341
4, this->s(), target);
1342
}
1343
1344
// optional .opencv_onnx.TensorProto t = 5;
1345
if (cached_has_bits & 0x00000010u) {
1346
target = ::google::protobuf::internal::WireFormatLite::
1347
InternalWriteMessageToArray(
1348
5, *this->t_, deterministic, target);
1349
}
1350
1351
// optional .opencv_onnx.GraphProto g = 6;
1352
if (cached_has_bits & 0x00000020u) {
1353
target = ::google::protobuf::internal::WireFormatLite::
1354
InternalWriteMessageToArray(
1355
6, *this->g_, deterministic, target);
1356
}
1357
1358
// repeated float floats = 7;
1359
target = ::google::protobuf::internal::WireFormatLite::
1360
WriteFloatToArray(7, this->floats_, target);
1361
1362
// repeated int64 ints = 8;
1363
target = ::google::protobuf::internal::WireFormatLite::
1364
WriteInt64ToArray(8, this->ints_, target);
1365
1366
// repeated bytes strings = 9;
1367
for (int i = 0, n = this->strings_size(); i < n; i++) {
1368
target = ::google::protobuf::internal::WireFormatLite::
1369
WriteBytesToArray(9, this->strings(i), target);
1370
}
1371
1372
// repeated .opencv_onnx.TensorProto tensors = 10;
1373
for (unsigned int i = 0,
1374
n = static_cast<unsigned int>(this->tensors_size()); i < n; i++) {
1375
target = ::google::protobuf::internal::WireFormatLite::
1376
InternalWriteMessageToArray(
1377
10, this->tensors(static_cast<int>(i)), deterministic, target);
1378
}
1379
1380
// repeated .opencv_onnx.GraphProto graphs = 11;
1381
for (unsigned int i = 0,
1382
n = static_cast<unsigned int>(this->graphs_size()); i < n; i++) {
1383
target = ::google::protobuf::internal::WireFormatLite::
1384
InternalWriteMessageToArray(
1385
11, this->graphs(static_cast<int>(i)), deterministic, target);
1386
}
1387
1388
// optional string doc_string = 13;
1389
if (cached_has_bits & 0x00000004u) {
1390
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1391
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
1392
::google::protobuf::internal::WireFormat::SERIALIZE,
1393
"opencv_onnx.AttributeProto.doc_string");
1394
target =
1395
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1396
13, this->doc_string(), target);
1397
}
1398
1399
// optional .opencv_onnx.AttributeProto.AttributeType type = 20;
1400
if (cached_has_bits & 0x00000100u) {
1401
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1402
20, this->type(), target);
1403
}
1404
1405
// optional string ref_attr_name = 21;
1406
if (cached_has_bits & 0x00000008u) {
1407
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1408
this->ref_attr_name().data(), static_cast<int>(this->ref_attr_name().length()),
1409
::google::protobuf::internal::WireFormat::SERIALIZE,
1410
"opencv_onnx.AttributeProto.ref_attr_name");
1411
target =
1412
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1413
21, this->ref_attr_name(), target);
1414
}
1415
1416
if (_internal_metadata_.have_unknown_fields()) {
1417
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1418
_internal_metadata_.unknown_fields(), target);
1419
}
1420
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.AttributeProto)
1421
return target;
1422
}
1423
1424
size_t AttributeProto::ByteSizeLong() const {
1425
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.AttributeProto)
1426
size_t total_size = 0;
1427
1428
if (_internal_metadata_.have_unknown_fields()) {
1429
total_size +=
1430
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1431
_internal_metadata_.unknown_fields());
1432
}
1433
// repeated float floats = 7;
1434
{
1435
unsigned int count = static_cast<unsigned int>(this->floats_size());
1436
size_t data_size = 4UL * count;
1437
total_size += 1 *
1438
::google::protobuf::internal::FromIntSize(this->floats_size());
1439
total_size += data_size;
1440
}
1441
1442
// repeated int64 ints = 8;
1443
{
1444
size_t data_size = ::google::protobuf::internal::WireFormatLite::
1445
Int64Size(this->ints_);
1446
total_size += 1 *
1447
::google::protobuf::internal::FromIntSize(this->ints_size());
1448
total_size += data_size;
1449
}
1450
1451
// repeated bytes strings = 9;
1452
total_size += 1 *
1453
::google::protobuf::internal::FromIntSize(this->strings_size());
1454
for (int i = 0, n = this->strings_size(); i < n; i++) {
1455
total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
1456
this->strings(i));
1457
}
1458
1459
// repeated .opencv_onnx.TensorProto tensors = 10;
1460
{
1461
unsigned int count = static_cast<unsigned int>(this->tensors_size());
1462
total_size += 1UL * count;
1463
for (unsigned int i = 0; i < count; i++) {
1464
total_size +=
1465
::google::protobuf::internal::WireFormatLite::MessageSize(
1466
this->tensors(static_cast<int>(i)));
1467
}
1468
}
1469
1470
// repeated .opencv_onnx.GraphProto graphs = 11;
1471
{
1472
unsigned int count = static_cast<unsigned int>(this->graphs_size());
1473
total_size += 1UL * count;
1474
for (unsigned int i = 0; i < count; i++) {
1475
total_size +=
1476
::google::protobuf::internal::WireFormatLite::MessageSize(
1477
this->graphs(static_cast<int>(i)));
1478
}
1479
}
1480
1481
if (_has_bits_[0 / 32] & 255u) {
1482
// optional string name = 1;
1483
if (has_name()) {
1484
total_size += 1 +
1485
::google::protobuf::internal::WireFormatLite::StringSize(
1486
this->name());
1487
}
1488
1489
// optional bytes s = 4;
1490
if (has_s()) {
1491
total_size += 1 +
1492
::google::protobuf::internal::WireFormatLite::BytesSize(
1493
this->s());
1494
}
1495
1496
// optional string doc_string = 13;
1497
if (has_doc_string()) {
1498
total_size += 1 +
1499
::google::protobuf::internal::WireFormatLite::StringSize(
1500
this->doc_string());
1501
}
1502
1503
// optional string ref_attr_name = 21;
1504
if (has_ref_attr_name()) {
1505
total_size += 2 +
1506
::google::protobuf::internal::WireFormatLite::StringSize(
1507
this->ref_attr_name());
1508
}
1509
1510
// optional .opencv_onnx.TensorProto t = 5;
1511
if (has_t()) {
1512
total_size += 1 +
1513
::google::protobuf::internal::WireFormatLite::MessageSize(
1514
*this->t_);
1515
}
1516
1517
// optional .opencv_onnx.GraphProto g = 6;
1518
if (has_g()) {
1519
total_size += 1 +
1520
::google::protobuf::internal::WireFormatLite::MessageSize(
1521
*this->g_);
1522
}
1523
1524
// optional int64 i = 3;
1525
if (has_i()) {
1526
total_size += 1 +
1527
::google::protobuf::internal::WireFormatLite::Int64Size(
1528
this->i());
1529
}
1530
1531
// optional float f = 2;
1532
if (has_f()) {
1533
total_size += 1 + 4;
1534
}
1535
1536
}
1537
// optional .opencv_onnx.AttributeProto.AttributeType type = 20;
1538
if (has_type()) {
1539
total_size += 2 +
1540
::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
1541
}
1542
1543
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1544
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1545
_cached_size_ = cached_size;
1546
GOOGLE_SAFE_CONCURRENT_WRITES_END();
1547
return total_size;
1548
}
1549
1550
void AttributeProto::MergeFrom(const ::google::protobuf::Message& from) {
1551
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.AttributeProto)
1552
GOOGLE_DCHECK_NE(&from, this);
1553
const AttributeProto* source =
1554
::google::protobuf::internal::DynamicCastToGenerated<const AttributeProto>(
1555
&from);
1556
if (source == NULL) {
1557
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.AttributeProto)
1558
::google::protobuf::internal::ReflectionOps::Merge(from, this);
1559
} else {
1560
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.AttributeProto)
1561
MergeFrom(*source);
1562
}
1563
}
1564
1565
void AttributeProto::MergeFrom(const AttributeProto& from) {
1566
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.AttributeProto)
1567
GOOGLE_DCHECK_NE(&from, this);
1568
_internal_metadata_.MergeFrom(from._internal_metadata_);
1569
::google::protobuf::uint32 cached_has_bits = 0;
1570
(void) cached_has_bits;
1571
1572
floats_.MergeFrom(from.floats_);
1573
ints_.MergeFrom(from.ints_);
1574
strings_.MergeFrom(from.strings_);
1575
tensors_.MergeFrom(from.tensors_);
1576
graphs_.MergeFrom(from.graphs_);
1577
cached_has_bits = from._has_bits_[0];
1578
if (cached_has_bits & 255u) {
1579
if (cached_has_bits & 0x00000001u) {
1580
set_has_name();
1581
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
1582
}
1583
if (cached_has_bits & 0x00000002u) {
1584
set_has_s();
1585
s_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.s_);
1586
}
1587
if (cached_has_bits & 0x00000004u) {
1588
set_has_doc_string();
1589
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
1590
}
1591
if (cached_has_bits & 0x00000008u) {
1592
set_has_ref_attr_name();
1593
ref_attr_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.ref_attr_name_);
1594
}
1595
if (cached_has_bits & 0x00000010u) {
1596
mutable_t()->::opencv_onnx::TensorProto::MergeFrom(from.t());
1597
}
1598
if (cached_has_bits & 0x00000020u) {
1599
mutable_g()->::opencv_onnx::GraphProto::MergeFrom(from.g());
1600
}
1601
if (cached_has_bits & 0x00000040u) {
1602
i_ = from.i_;
1603
}
1604
if (cached_has_bits & 0x00000080u) {
1605
f_ = from.f_;
1606
}
1607
_has_bits_[0] |= cached_has_bits;
1608
}
1609
if (cached_has_bits & 0x00000100u) {
1610
set_type(from.type());
1611
}
1612
}
1613
1614
void AttributeProto::CopyFrom(const ::google::protobuf::Message& from) {
1615
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.AttributeProto)
1616
if (&from == this) return;
1617
Clear();
1618
MergeFrom(from);
1619
}
1620
1621
void AttributeProto::CopyFrom(const AttributeProto& from) {
1622
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.AttributeProto)
1623
if (&from == this) return;
1624
Clear();
1625
MergeFrom(from);
1626
}
1627
1628
bool AttributeProto::IsInitialized() const {
1629
return true;
1630
}
1631
1632
void AttributeProto::Swap(AttributeProto* other) {
1633
if (other == this) return;
1634
InternalSwap(other);
1635
}
1636
void AttributeProto::InternalSwap(AttributeProto* other) {
1637
using std::swap;
1638
floats_.InternalSwap(&other->floats_);
1639
ints_.InternalSwap(&other->ints_);
1640
strings_.InternalSwap(&other->strings_);
1641
tensors_.InternalSwap(&other->tensors_);
1642
graphs_.InternalSwap(&other->graphs_);
1643
name_.Swap(&other->name_);
1644
s_.Swap(&other->s_);
1645
doc_string_.Swap(&other->doc_string_);
1646
ref_attr_name_.Swap(&other->ref_attr_name_);
1647
swap(t_, other->t_);
1648
swap(g_, other->g_);
1649
swap(i_, other->i_);
1650
swap(f_, other->f_);
1651
swap(type_, other->type_);
1652
swap(_has_bits_[0], other->_has_bits_[0]);
1653
_internal_metadata_.Swap(&other->_internal_metadata_);
1654
swap(_cached_size_, other->_cached_size_);
1655
}
1656
1657
::google::protobuf::Metadata AttributeProto::GetMetadata() const {
1658
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
1659
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
1660
}
1661
1662
1663
// ===================================================================
1664
1665
void ValueInfoProto::InitAsDefaultInstance() {
1666
::opencv_onnx::_ValueInfoProto_default_instance_._instance.get_mutable()->type_ = const_cast< ::opencv_onnx::TypeProto*>(
1667
::opencv_onnx::TypeProto::internal_default_instance());
1668
}
1669
#if !defined(_MSC_VER) || _MSC_VER >= 1900
1670
const int ValueInfoProto::kNameFieldNumber;
1671
const int ValueInfoProto::kTypeFieldNumber;
1672
const int ValueInfoProto::kDocStringFieldNumber;
1673
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
1674
1675
ValueInfoProto::ValueInfoProto()
1676
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
1677
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
1678
::protobuf_opencv_2donnx_2eproto::InitDefaultsValueInfoProto();
1679
}
1680
SharedCtor();
1681
// @@protoc_insertion_point(constructor:opencv_onnx.ValueInfoProto)
1682
}
1683
ValueInfoProto::ValueInfoProto(const ValueInfoProto& from)
1684
: ::google::protobuf::Message(),
1685
_internal_metadata_(NULL),
1686
_has_bits_(from._has_bits_),
1687
_cached_size_(0) {
1688
_internal_metadata_.MergeFrom(from._internal_metadata_);
1689
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1690
if (from.has_name()) {
1691
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
1692
}
1693
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1694
if (from.has_doc_string()) {
1695
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
1696
}
1697
if (from.has_type()) {
1698
type_ = new ::opencv_onnx::TypeProto(*from.type_);
1699
} else {
1700
type_ = NULL;
1701
}
1702
// @@protoc_insertion_point(copy_constructor:opencv_onnx.ValueInfoProto)
1703
}
1704
1705
void ValueInfoProto::SharedCtor() {
1706
_cached_size_ = 0;
1707
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1708
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1709
type_ = NULL;
1710
}
1711
1712
ValueInfoProto::~ValueInfoProto() {
1713
// @@protoc_insertion_point(destructor:opencv_onnx.ValueInfoProto)
1714
SharedDtor();
1715
}
1716
1717
void ValueInfoProto::SharedDtor() {
1718
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1719
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1720
if (this != internal_default_instance()) delete type_;
1721
}
1722
1723
void ValueInfoProto::SetCachedSize(int size) const {
1724
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1725
_cached_size_ = size;
1726
GOOGLE_SAFE_CONCURRENT_WRITES_END();
1727
}
1728
const ::google::protobuf::Descriptor* ValueInfoProto::descriptor() {
1729
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
1730
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
1731
}
1732
1733
const ValueInfoProto& ValueInfoProto::default_instance() {
1734
::protobuf_opencv_2donnx_2eproto::InitDefaultsValueInfoProto();
1735
return *internal_default_instance();
1736
}
1737
1738
ValueInfoProto* ValueInfoProto::New(::google::protobuf::Arena* arena) const {
1739
ValueInfoProto* n = new ValueInfoProto;
1740
if (arena != NULL) {
1741
arena->Own(n);
1742
}
1743
return n;
1744
}
1745
1746
void ValueInfoProto::Clear() {
1747
// @@protoc_insertion_point(message_clear_start:opencv_onnx.ValueInfoProto)
1748
::google::protobuf::uint32 cached_has_bits = 0;
1749
// Prevent compiler warnings about cached_has_bits being unused
1750
(void) cached_has_bits;
1751
1752
cached_has_bits = _has_bits_[0];
1753
if (cached_has_bits & 7u) {
1754
if (cached_has_bits & 0x00000001u) {
1755
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
1756
(*name_.UnsafeRawStringPointer())->clear();
1757
}
1758
if (cached_has_bits & 0x00000002u) {
1759
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
1760
(*doc_string_.UnsafeRawStringPointer())->clear();
1761
}
1762
if (cached_has_bits & 0x00000004u) {
1763
GOOGLE_DCHECK(type_ != NULL);
1764
type_->Clear();
1765
}
1766
}
1767
_has_bits_.Clear();
1768
_internal_metadata_.Clear();
1769
}
1770
1771
bool ValueInfoProto::MergePartialFromCodedStream(
1772
::google::protobuf::io::CodedInputStream* input) {
1773
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
1774
::google::protobuf::uint32 tag;
1775
// @@protoc_insertion_point(parse_start:opencv_onnx.ValueInfoProto)
1776
for (;;) {
1777
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1778
tag = p.first;
1779
if (!p.second) goto handle_unusual;
1780
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1781
// optional string name = 1;
1782
case 1: {
1783
if (static_cast< ::google::protobuf::uint8>(tag) ==
1784
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
1785
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1786
input, this->mutable_name()));
1787
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1788
this->name().data(), static_cast<int>(this->name().length()),
1789
::google::protobuf::internal::WireFormat::PARSE,
1790
"opencv_onnx.ValueInfoProto.name");
1791
} else {
1792
goto handle_unusual;
1793
}
1794
break;
1795
}
1796
1797
// optional .opencv_onnx.TypeProto type = 2;
1798
case 2: {
1799
if (static_cast< ::google::protobuf::uint8>(tag) ==
1800
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
1801
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
1802
input, mutable_type()));
1803
} else {
1804
goto handle_unusual;
1805
}
1806
break;
1807
}
1808
1809
// optional string doc_string = 3;
1810
case 3: {
1811
if (static_cast< ::google::protobuf::uint8>(tag) ==
1812
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
1813
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1814
input, this->mutable_doc_string()));
1815
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1816
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
1817
::google::protobuf::internal::WireFormat::PARSE,
1818
"opencv_onnx.ValueInfoProto.doc_string");
1819
} else {
1820
goto handle_unusual;
1821
}
1822
break;
1823
}
1824
1825
default: {
1826
handle_unusual:
1827
if (tag == 0) {
1828
goto success;
1829
}
1830
DO_(::google::protobuf::internal::WireFormat::SkipField(
1831
input, tag, _internal_metadata_.mutable_unknown_fields()));
1832
break;
1833
}
1834
}
1835
}
1836
success:
1837
// @@protoc_insertion_point(parse_success:opencv_onnx.ValueInfoProto)
1838
return true;
1839
failure:
1840
// @@protoc_insertion_point(parse_failure:opencv_onnx.ValueInfoProto)
1841
return false;
1842
#undef DO_
1843
}
1844
1845
void ValueInfoProto::SerializeWithCachedSizes(
1846
::google::protobuf::io::CodedOutputStream* output) const {
1847
// @@protoc_insertion_point(serialize_start:opencv_onnx.ValueInfoProto)
1848
::google::protobuf::uint32 cached_has_bits = 0;
1849
(void) cached_has_bits;
1850
1851
cached_has_bits = _has_bits_[0];
1852
// optional string name = 1;
1853
if (cached_has_bits & 0x00000001u) {
1854
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1855
this->name().data(), static_cast<int>(this->name().length()),
1856
::google::protobuf::internal::WireFormat::SERIALIZE,
1857
"opencv_onnx.ValueInfoProto.name");
1858
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1859
1, this->name(), output);
1860
}
1861
1862
// optional .opencv_onnx.TypeProto type = 2;
1863
if (cached_has_bits & 0x00000004u) {
1864
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1865
2, *this->type_, output);
1866
}
1867
1868
// optional string doc_string = 3;
1869
if (cached_has_bits & 0x00000002u) {
1870
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1871
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
1872
::google::protobuf::internal::WireFormat::SERIALIZE,
1873
"opencv_onnx.ValueInfoProto.doc_string");
1874
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1875
3, this->doc_string(), output);
1876
}
1877
1878
if (_internal_metadata_.have_unknown_fields()) {
1879
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1880
_internal_metadata_.unknown_fields(), output);
1881
}
1882
// @@protoc_insertion_point(serialize_end:opencv_onnx.ValueInfoProto)
1883
}
1884
1885
::google::protobuf::uint8* ValueInfoProto::InternalSerializeWithCachedSizesToArray(
1886
bool deterministic, ::google::protobuf::uint8* target) const {
1887
(void)deterministic; // Unused
1888
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ValueInfoProto)
1889
::google::protobuf::uint32 cached_has_bits = 0;
1890
(void) cached_has_bits;
1891
1892
cached_has_bits = _has_bits_[0];
1893
// optional string name = 1;
1894
if (cached_has_bits & 0x00000001u) {
1895
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1896
this->name().data(), static_cast<int>(this->name().length()),
1897
::google::protobuf::internal::WireFormat::SERIALIZE,
1898
"opencv_onnx.ValueInfoProto.name");
1899
target =
1900
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1901
1, this->name(), target);
1902
}
1903
1904
// optional .opencv_onnx.TypeProto type = 2;
1905
if (cached_has_bits & 0x00000004u) {
1906
target = ::google::protobuf::internal::WireFormatLite::
1907
InternalWriteMessageToArray(
1908
2, *this->type_, deterministic, target);
1909
}
1910
1911
// optional string doc_string = 3;
1912
if (cached_has_bits & 0x00000002u) {
1913
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
1914
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
1915
::google::protobuf::internal::WireFormat::SERIALIZE,
1916
"opencv_onnx.ValueInfoProto.doc_string");
1917
target =
1918
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1919
3, this->doc_string(), target);
1920
}
1921
1922
if (_internal_metadata_.have_unknown_fields()) {
1923
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1924
_internal_metadata_.unknown_fields(), target);
1925
}
1926
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ValueInfoProto)
1927
return target;
1928
}
1929
1930
size_t ValueInfoProto::ByteSizeLong() const {
1931
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ValueInfoProto)
1932
size_t total_size = 0;
1933
1934
if (_internal_metadata_.have_unknown_fields()) {
1935
total_size +=
1936
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1937
_internal_metadata_.unknown_fields());
1938
}
1939
if (_has_bits_[0 / 32] & 7u) {
1940
// optional string name = 1;
1941
if (has_name()) {
1942
total_size += 1 +
1943
::google::protobuf::internal::WireFormatLite::StringSize(
1944
this->name());
1945
}
1946
1947
// optional string doc_string = 3;
1948
if (has_doc_string()) {
1949
total_size += 1 +
1950
::google::protobuf::internal::WireFormatLite::StringSize(
1951
this->doc_string());
1952
}
1953
1954
// optional .opencv_onnx.TypeProto type = 2;
1955
if (has_type()) {
1956
total_size += 1 +
1957
::google::protobuf::internal::WireFormatLite::MessageSize(
1958
*this->type_);
1959
}
1960
1961
}
1962
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1963
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1964
_cached_size_ = cached_size;
1965
GOOGLE_SAFE_CONCURRENT_WRITES_END();
1966
return total_size;
1967
}
1968
1969
void ValueInfoProto::MergeFrom(const ::google::protobuf::Message& from) {
1970
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.ValueInfoProto)
1971
GOOGLE_DCHECK_NE(&from, this);
1972
const ValueInfoProto* source =
1973
::google::protobuf::internal::DynamicCastToGenerated<const ValueInfoProto>(
1974
&from);
1975
if (source == NULL) {
1976
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.ValueInfoProto)
1977
::google::protobuf::internal::ReflectionOps::Merge(from, this);
1978
} else {
1979
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.ValueInfoProto)
1980
MergeFrom(*source);
1981
}
1982
}
1983
1984
void ValueInfoProto::MergeFrom(const ValueInfoProto& from) {
1985
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ValueInfoProto)
1986
GOOGLE_DCHECK_NE(&from, this);
1987
_internal_metadata_.MergeFrom(from._internal_metadata_);
1988
::google::protobuf::uint32 cached_has_bits = 0;
1989
(void) cached_has_bits;
1990
1991
cached_has_bits = from._has_bits_[0];
1992
if (cached_has_bits & 7u) {
1993
if (cached_has_bits & 0x00000001u) {
1994
set_has_name();
1995
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
1996
}
1997
if (cached_has_bits & 0x00000002u) {
1998
set_has_doc_string();
1999
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
2000
}
2001
if (cached_has_bits & 0x00000004u) {
2002
mutable_type()->::opencv_onnx::TypeProto::MergeFrom(from.type());
2003
}
2004
}
2005
}
2006
2007
void ValueInfoProto::CopyFrom(const ::google::protobuf::Message& from) {
2008
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.ValueInfoProto)
2009
if (&from == this) return;
2010
Clear();
2011
MergeFrom(from);
2012
}
2013
2014
void ValueInfoProto::CopyFrom(const ValueInfoProto& from) {
2015
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ValueInfoProto)
2016
if (&from == this) return;
2017
Clear();
2018
MergeFrom(from);
2019
}
2020
2021
bool ValueInfoProto::IsInitialized() const {
2022
return true;
2023
}
2024
2025
void ValueInfoProto::Swap(ValueInfoProto* other) {
2026
if (other == this) return;
2027
InternalSwap(other);
2028
}
2029
void ValueInfoProto::InternalSwap(ValueInfoProto* other) {
2030
using std::swap;
2031
name_.Swap(&other->name_);
2032
doc_string_.Swap(&other->doc_string_);
2033
swap(type_, other->type_);
2034
swap(_has_bits_[0], other->_has_bits_[0]);
2035
_internal_metadata_.Swap(&other->_internal_metadata_);
2036
swap(_cached_size_, other->_cached_size_);
2037
}
2038
2039
::google::protobuf::Metadata ValueInfoProto::GetMetadata() const {
2040
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
2041
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
2042
}
2043
2044
2045
// ===================================================================
2046
2047
void NodeProto::InitAsDefaultInstance() {
2048
}
2049
#if !defined(_MSC_VER) || _MSC_VER >= 1900
2050
const int NodeProto::kInputFieldNumber;
2051
const int NodeProto::kOutputFieldNumber;
2052
const int NodeProto::kNameFieldNumber;
2053
const int NodeProto::kOpTypeFieldNumber;
2054
const int NodeProto::kDomainFieldNumber;
2055
const int NodeProto::kAttributeFieldNumber;
2056
const int NodeProto::kDocStringFieldNumber;
2057
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
2058
2059
NodeProto::NodeProto()
2060
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
2061
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
2062
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
2063
}
2064
SharedCtor();
2065
// @@protoc_insertion_point(constructor:opencv_onnx.NodeProto)
2066
}
2067
NodeProto::NodeProto(const NodeProto& from)
2068
: ::google::protobuf::Message(),
2069
_internal_metadata_(NULL),
2070
_has_bits_(from._has_bits_),
2071
_cached_size_(0),
2072
input_(from.input_),
2073
output_(from.output_),
2074
attribute_(from.attribute_) {
2075
_internal_metadata_.MergeFrom(from._internal_metadata_);
2076
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2077
if (from.has_name()) {
2078
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
2079
}
2080
op_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2081
if (from.has_op_type()) {
2082
op_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.op_type_);
2083
}
2084
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2085
if (from.has_doc_string()) {
2086
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
2087
}
2088
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2089
if (from.has_domain()) {
2090
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
2091
}
2092
// @@protoc_insertion_point(copy_constructor:opencv_onnx.NodeProto)
2093
}
2094
2095
void NodeProto::SharedCtor() {
2096
_cached_size_ = 0;
2097
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2098
op_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2099
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2100
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2101
}
2102
2103
NodeProto::~NodeProto() {
2104
// @@protoc_insertion_point(destructor:opencv_onnx.NodeProto)
2105
SharedDtor();
2106
}
2107
2108
void NodeProto::SharedDtor() {
2109
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2110
op_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2111
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2112
domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2113
}
2114
2115
void NodeProto::SetCachedSize(int size) const {
2116
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2117
_cached_size_ = size;
2118
GOOGLE_SAFE_CONCURRENT_WRITES_END();
2119
}
2120
const ::google::protobuf::Descriptor* NodeProto::descriptor() {
2121
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
2122
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
2123
}
2124
2125
const NodeProto& NodeProto::default_instance() {
2126
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
2127
return *internal_default_instance();
2128
}
2129
2130
NodeProto* NodeProto::New(::google::protobuf::Arena* arena) const {
2131
NodeProto* n = new NodeProto;
2132
if (arena != NULL) {
2133
arena->Own(n);
2134
}
2135
return n;
2136
}
2137
2138
void NodeProto::Clear() {
2139
// @@protoc_insertion_point(message_clear_start:opencv_onnx.NodeProto)
2140
::google::protobuf::uint32 cached_has_bits = 0;
2141
// Prevent compiler warnings about cached_has_bits being unused
2142
(void) cached_has_bits;
2143
2144
input_.Clear();
2145
output_.Clear();
2146
attribute_.Clear();
2147
cached_has_bits = _has_bits_[0];
2148
if (cached_has_bits & 15u) {
2149
if (cached_has_bits & 0x00000001u) {
2150
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
2151
(*name_.UnsafeRawStringPointer())->clear();
2152
}
2153
if (cached_has_bits & 0x00000002u) {
2154
GOOGLE_DCHECK(!op_type_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
2155
(*op_type_.UnsafeRawStringPointer())->clear();
2156
}
2157
if (cached_has_bits & 0x00000004u) {
2158
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
2159
(*doc_string_.UnsafeRawStringPointer())->clear();
2160
}
2161
if (cached_has_bits & 0x00000008u) {
2162
GOOGLE_DCHECK(!domain_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
2163
(*domain_.UnsafeRawStringPointer())->clear();
2164
}
2165
}
2166
_has_bits_.Clear();
2167
_internal_metadata_.Clear();
2168
}
2169
2170
bool NodeProto::MergePartialFromCodedStream(
2171
::google::protobuf::io::CodedInputStream* input) {
2172
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
2173
::google::protobuf::uint32 tag;
2174
// @@protoc_insertion_point(parse_start:opencv_onnx.NodeProto)
2175
for (;;) {
2176
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
2177
tag = p.first;
2178
if (!p.second) goto handle_unusual;
2179
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2180
// repeated string input = 1;
2181
case 1: {
2182
if (static_cast< ::google::protobuf::uint8>(tag) ==
2183
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
2184
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2185
input, this->add_input()));
2186
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2187
this->input(this->input_size() - 1).data(),
2188
static_cast<int>(this->input(this->input_size() - 1).length()),
2189
::google::protobuf::internal::WireFormat::PARSE,
2190
"opencv_onnx.NodeProto.input");
2191
} else {
2192
goto handle_unusual;
2193
}
2194
break;
2195
}
2196
2197
// repeated string output = 2;
2198
case 2: {
2199
if (static_cast< ::google::protobuf::uint8>(tag) ==
2200
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
2201
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2202
input, this->add_output()));
2203
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2204
this->output(this->output_size() - 1).data(),
2205
static_cast<int>(this->output(this->output_size() - 1).length()),
2206
::google::protobuf::internal::WireFormat::PARSE,
2207
"opencv_onnx.NodeProto.output");
2208
} else {
2209
goto handle_unusual;
2210
}
2211
break;
2212
}
2213
2214
// optional string name = 3;
2215
case 3: {
2216
if (static_cast< ::google::protobuf::uint8>(tag) ==
2217
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
2218
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2219
input, this->mutable_name()));
2220
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2221
this->name().data(), static_cast<int>(this->name().length()),
2222
::google::protobuf::internal::WireFormat::PARSE,
2223
"opencv_onnx.NodeProto.name");
2224
} else {
2225
goto handle_unusual;
2226
}
2227
break;
2228
}
2229
2230
// optional string op_type = 4;
2231
case 4: {
2232
if (static_cast< ::google::protobuf::uint8>(tag) ==
2233
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
2234
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2235
input, this->mutable_op_type()));
2236
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2237
this->op_type().data(), static_cast<int>(this->op_type().length()),
2238
::google::protobuf::internal::WireFormat::PARSE,
2239
"opencv_onnx.NodeProto.op_type");
2240
} else {
2241
goto handle_unusual;
2242
}
2243
break;
2244
}
2245
2246
// repeated .opencv_onnx.AttributeProto attribute = 5;
2247
case 5: {
2248
if (static_cast< ::google::protobuf::uint8>(tag) ==
2249
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
2250
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_attribute()));
2251
} else {
2252
goto handle_unusual;
2253
}
2254
break;
2255
}
2256
2257
// optional string doc_string = 6;
2258
case 6: {
2259
if (static_cast< ::google::protobuf::uint8>(tag) ==
2260
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
2261
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2262
input, this->mutable_doc_string()));
2263
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2264
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
2265
::google::protobuf::internal::WireFormat::PARSE,
2266
"opencv_onnx.NodeProto.doc_string");
2267
} else {
2268
goto handle_unusual;
2269
}
2270
break;
2271
}
2272
2273
// optional string domain = 7;
2274
case 7: {
2275
if (static_cast< ::google::protobuf::uint8>(tag) ==
2276
static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
2277
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2278
input, this->mutable_domain()));
2279
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2280
this->domain().data(), static_cast<int>(this->domain().length()),
2281
::google::protobuf::internal::WireFormat::PARSE,
2282
"opencv_onnx.NodeProto.domain");
2283
} else {
2284
goto handle_unusual;
2285
}
2286
break;
2287
}
2288
2289
default: {
2290
handle_unusual:
2291
if (tag == 0) {
2292
goto success;
2293
}
2294
DO_(::google::protobuf::internal::WireFormat::SkipField(
2295
input, tag, _internal_metadata_.mutable_unknown_fields()));
2296
break;
2297
}
2298
}
2299
}
2300
success:
2301
// @@protoc_insertion_point(parse_success:opencv_onnx.NodeProto)
2302
return true;
2303
failure:
2304
// @@protoc_insertion_point(parse_failure:opencv_onnx.NodeProto)
2305
return false;
2306
#undef DO_
2307
}
2308
2309
void NodeProto::SerializeWithCachedSizes(
2310
::google::protobuf::io::CodedOutputStream* output) const {
2311
// @@protoc_insertion_point(serialize_start:opencv_onnx.NodeProto)
2312
::google::protobuf::uint32 cached_has_bits = 0;
2313
(void) cached_has_bits;
2314
2315
// repeated string input = 1;
2316
for (int i = 0, n = this->input_size(); i < n; i++) {
2317
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2318
this->input(i).data(), static_cast<int>(this->input(i).length()),
2319
::google::protobuf::internal::WireFormat::SERIALIZE,
2320
"opencv_onnx.NodeProto.input");
2321
::google::protobuf::internal::WireFormatLite::WriteString(
2322
1, this->input(i), output);
2323
}
2324
2325
// repeated string output = 2;
2326
for (int i = 0, n = this->output_size(); i < n; i++) {
2327
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2328
this->output(i).data(), static_cast<int>(this->output(i).length()),
2329
::google::protobuf::internal::WireFormat::SERIALIZE,
2330
"opencv_onnx.NodeProto.output");
2331
::google::protobuf::internal::WireFormatLite::WriteString(
2332
2, this->output(i), output);
2333
}
2334
2335
cached_has_bits = _has_bits_[0];
2336
// optional string name = 3;
2337
if (cached_has_bits & 0x00000001u) {
2338
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2339
this->name().data(), static_cast<int>(this->name().length()),
2340
::google::protobuf::internal::WireFormat::SERIALIZE,
2341
"opencv_onnx.NodeProto.name");
2342
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2343
3, this->name(), output);
2344
}
2345
2346
// optional string op_type = 4;
2347
if (cached_has_bits & 0x00000002u) {
2348
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2349
this->op_type().data(), static_cast<int>(this->op_type().length()),
2350
::google::protobuf::internal::WireFormat::SERIALIZE,
2351
"opencv_onnx.NodeProto.op_type");
2352
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2353
4, this->op_type(), output);
2354
}
2355
2356
// repeated .opencv_onnx.AttributeProto attribute = 5;
2357
for (unsigned int i = 0,
2358
n = static_cast<unsigned int>(this->attribute_size()); i < n; i++) {
2359
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
2360
5, this->attribute(static_cast<int>(i)), output);
2361
}
2362
2363
// optional string doc_string = 6;
2364
if (cached_has_bits & 0x00000004u) {
2365
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2366
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
2367
::google::protobuf::internal::WireFormat::SERIALIZE,
2368
"opencv_onnx.NodeProto.doc_string");
2369
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2370
6, this->doc_string(), output);
2371
}
2372
2373
// optional string domain = 7;
2374
if (cached_has_bits & 0x00000008u) {
2375
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2376
this->domain().data(), static_cast<int>(this->domain().length()),
2377
::google::protobuf::internal::WireFormat::SERIALIZE,
2378
"opencv_onnx.NodeProto.domain");
2379
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2380
7, this->domain(), output);
2381
}
2382
2383
if (_internal_metadata_.have_unknown_fields()) {
2384
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
2385
_internal_metadata_.unknown_fields(), output);
2386
}
2387
// @@protoc_insertion_point(serialize_end:opencv_onnx.NodeProto)
2388
}
2389
2390
::google::protobuf::uint8* NodeProto::InternalSerializeWithCachedSizesToArray(
2391
bool deterministic, ::google::protobuf::uint8* target) const {
2392
(void)deterministic; // Unused
2393
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.NodeProto)
2394
::google::protobuf::uint32 cached_has_bits = 0;
2395
(void) cached_has_bits;
2396
2397
// repeated string input = 1;
2398
for (int i = 0, n = this->input_size(); i < n; i++) {
2399
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2400
this->input(i).data(), static_cast<int>(this->input(i).length()),
2401
::google::protobuf::internal::WireFormat::SERIALIZE,
2402
"opencv_onnx.NodeProto.input");
2403
target = ::google::protobuf::internal::WireFormatLite::
2404
WriteStringToArray(1, this->input(i), target);
2405
}
2406
2407
// repeated string output = 2;
2408
for (int i = 0, n = this->output_size(); i < n; i++) {
2409
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2410
this->output(i).data(), static_cast<int>(this->output(i).length()),
2411
::google::protobuf::internal::WireFormat::SERIALIZE,
2412
"opencv_onnx.NodeProto.output");
2413
target = ::google::protobuf::internal::WireFormatLite::
2414
WriteStringToArray(2, this->output(i), target);
2415
}
2416
2417
cached_has_bits = _has_bits_[0];
2418
// optional string name = 3;
2419
if (cached_has_bits & 0x00000001u) {
2420
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2421
this->name().data(), static_cast<int>(this->name().length()),
2422
::google::protobuf::internal::WireFormat::SERIALIZE,
2423
"opencv_onnx.NodeProto.name");
2424
target =
2425
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2426
3, this->name(), target);
2427
}
2428
2429
// optional string op_type = 4;
2430
if (cached_has_bits & 0x00000002u) {
2431
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2432
this->op_type().data(), static_cast<int>(this->op_type().length()),
2433
::google::protobuf::internal::WireFormat::SERIALIZE,
2434
"opencv_onnx.NodeProto.op_type");
2435
target =
2436
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2437
4, this->op_type(), target);
2438
}
2439
2440
// repeated .opencv_onnx.AttributeProto attribute = 5;
2441
for (unsigned int i = 0,
2442
n = static_cast<unsigned int>(this->attribute_size()); i < n; i++) {
2443
target = ::google::protobuf::internal::WireFormatLite::
2444
InternalWriteMessageToArray(
2445
5, this->attribute(static_cast<int>(i)), deterministic, target);
2446
}
2447
2448
// optional string doc_string = 6;
2449
if (cached_has_bits & 0x00000004u) {
2450
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2451
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
2452
::google::protobuf::internal::WireFormat::SERIALIZE,
2453
"opencv_onnx.NodeProto.doc_string");
2454
target =
2455
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2456
6, this->doc_string(), target);
2457
}
2458
2459
// optional string domain = 7;
2460
if (cached_has_bits & 0x00000008u) {
2461
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2462
this->domain().data(), static_cast<int>(this->domain().length()),
2463
::google::protobuf::internal::WireFormat::SERIALIZE,
2464
"opencv_onnx.NodeProto.domain");
2465
target =
2466
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2467
7, this->domain(), target);
2468
}
2469
2470
if (_internal_metadata_.have_unknown_fields()) {
2471
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
2472
_internal_metadata_.unknown_fields(), target);
2473
}
2474
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.NodeProto)
2475
return target;
2476
}
2477
2478
size_t NodeProto::ByteSizeLong() const {
2479
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.NodeProto)
2480
size_t total_size = 0;
2481
2482
if (_internal_metadata_.have_unknown_fields()) {
2483
total_size +=
2484
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
2485
_internal_metadata_.unknown_fields());
2486
}
2487
// repeated string input = 1;
2488
total_size += 1 *
2489
::google::protobuf::internal::FromIntSize(this->input_size());
2490
for (int i = 0, n = this->input_size(); i < n; i++) {
2491
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
2492
this->input(i));
2493
}
2494
2495
// repeated string output = 2;
2496
total_size += 1 *
2497
::google::protobuf::internal::FromIntSize(this->output_size());
2498
for (int i = 0, n = this->output_size(); i < n; i++) {
2499
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
2500
this->output(i));
2501
}
2502
2503
// repeated .opencv_onnx.AttributeProto attribute = 5;
2504
{
2505
unsigned int count = static_cast<unsigned int>(this->attribute_size());
2506
total_size += 1UL * count;
2507
for (unsigned int i = 0; i < count; i++) {
2508
total_size +=
2509
::google::protobuf::internal::WireFormatLite::MessageSize(
2510
this->attribute(static_cast<int>(i)));
2511
}
2512
}
2513
2514
if (_has_bits_[0 / 32] & 15u) {
2515
// optional string name = 3;
2516
if (has_name()) {
2517
total_size += 1 +
2518
::google::protobuf::internal::WireFormatLite::StringSize(
2519
this->name());
2520
}
2521
2522
// optional string op_type = 4;
2523
if (has_op_type()) {
2524
total_size += 1 +
2525
::google::protobuf::internal::WireFormatLite::StringSize(
2526
this->op_type());
2527
}
2528
2529
// optional string doc_string = 6;
2530
if (has_doc_string()) {
2531
total_size += 1 +
2532
::google::protobuf::internal::WireFormatLite::StringSize(
2533
this->doc_string());
2534
}
2535
2536
// optional string domain = 7;
2537
if (has_domain()) {
2538
total_size += 1 +
2539
::google::protobuf::internal::WireFormatLite::StringSize(
2540
this->domain());
2541
}
2542
2543
}
2544
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
2545
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2546
_cached_size_ = cached_size;
2547
GOOGLE_SAFE_CONCURRENT_WRITES_END();
2548
return total_size;
2549
}
2550
2551
void NodeProto::MergeFrom(const ::google::protobuf::Message& from) {
2552
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.NodeProto)
2553
GOOGLE_DCHECK_NE(&from, this);
2554
const NodeProto* source =
2555
::google::protobuf::internal::DynamicCastToGenerated<const NodeProto>(
2556
&from);
2557
if (source == NULL) {
2558
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.NodeProto)
2559
::google::protobuf::internal::ReflectionOps::Merge(from, this);
2560
} else {
2561
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.NodeProto)
2562
MergeFrom(*source);
2563
}
2564
}
2565
2566
void NodeProto::MergeFrom(const NodeProto& from) {
2567
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.NodeProto)
2568
GOOGLE_DCHECK_NE(&from, this);
2569
_internal_metadata_.MergeFrom(from._internal_metadata_);
2570
::google::protobuf::uint32 cached_has_bits = 0;
2571
(void) cached_has_bits;
2572
2573
input_.MergeFrom(from.input_);
2574
output_.MergeFrom(from.output_);
2575
attribute_.MergeFrom(from.attribute_);
2576
cached_has_bits = from._has_bits_[0];
2577
if (cached_has_bits & 15u) {
2578
if (cached_has_bits & 0x00000001u) {
2579
set_has_name();
2580
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
2581
}
2582
if (cached_has_bits & 0x00000002u) {
2583
set_has_op_type();
2584
op_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.op_type_);
2585
}
2586
if (cached_has_bits & 0x00000004u) {
2587
set_has_doc_string();
2588
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
2589
}
2590
if (cached_has_bits & 0x00000008u) {
2591
set_has_domain();
2592
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
2593
}
2594
}
2595
}
2596
2597
void NodeProto::CopyFrom(const ::google::protobuf::Message& from) {
2598
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.NodeProto)
2599
if (&from == this) return;
2600
Clear();
2601
MergeFrom(from);
2602
}
2603
2604
void NodeProto::CopyFrom(const NodeProto& from) {
2605
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.NodeProto)
2606
if (&from == this) return;
2607
Clear();
2608
MergeFrom(from);
2609
}
2610
2611
bool NodeProto::IsInitialized() const {
2612
return true;
2613
}
2614
2615
void NodeProto::Swap(NodeProto* other) {
2616
if (other == this) return;
2617
InternalSwap(other);
2618
}
2619
void NodeProto::InternalSwap(NodeProto* other) {
2620
using std::swap;
2621
input_.InternalSwap(&other->input_);
2622
output_.InternalSwap(&other->output_);
2623
attribute_.InternalSwap(&other->attribute_);
2624
name_.Swap(&other->name_);
2625
op_type_.Swap(&other->op_type_);
2626
doc_string_.Swap(&other->doc_string_);
2627
domain_.Swap(&other->domain_);
2628
swap(_has_bits_[0], other->_has_bits_[0]);
2629
_internal_metadata_.Swap(&other->_internal_metadata_);
2630
swap(_cached_size_, other->_cached_size_);
2631
}
2632
2633
::google::protobuf::Metadata NodeProto::GetMetadata() const {
2634
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
2635
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
2636
}
2637
2638
2639
// ===================================================================
2640
2641
void ModelProto::InitAsDefaultInstance() {
2642
::opencv_onnx::_ModelProto_default_instance_._instance.get_mutable()->graph_ = const_cast< ::opencv_onnx::GraphProto*>(
2643
::opencv_onnx::GraphProto::internal_default_instance());
2644
}
2645
#if !defined(_MSC_VER) || _MSC_VER >= 1900
2646
const int ModelProto::kIrVersionFieldNumber;
2647
const int ModelProto::kOpsetImportFieldNumber;
2648
const int ModelProto::kProducerNameFieldNumber;
2649
const int ModelProto::kProducerVersionFieldNumber;
2650
const int ModelProto::kDomainFieldNumber;
2651
const int ModelProto::kModelVersionFieldNumber;
2652
const int ModelProto::kDocStringFieldNumber;
2653
const int ModelProto::kGraphFieldNumber;
2654
const int ModelProto::kMetadataPropsFieldNumber;
2655
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
2656
2657
ModelProto::ModelProto()
2658
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
2659
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
2660
::protobuf_opencv_2donnx_2eproto::InitDefaultsModelProto();
2661
}
2662
SharedCtor();
2663
// @@protoc_insertion_point(constructor:opencv_onnx.ModelProto)
2664
}
2665
ModelProto::ModelProto(const ModelProto& from)
2666
: ::google::protobuf::Message(),
2667
_internal_metadata_(NULL),
2668
_has_bits_(from._has_bits_),
2669
_cached_size_(0),
2670
opset_import_(from.opset_import_),
2671
metadata_props_(from.metadata_props_) {
2672
_internal_metadata_.MergeFrom(from._internal_metadata_);
2673
producer_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2674
if (from.has_producer_name()) {
2675
producer_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_name_);
2676
}
2677
producer_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2678
if (from.has_producer_version()) {
2679
producer_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_version_);
2680
}
2681
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2682
if (from.has_domain()) {
2683
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
2684
}
2685
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2686
if (from.has_doc_string()) {
2687
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
2688
}
2689
if (from.has_graph()) {
2690
graph_ = new ::opencv_onnx::GraphProto(*from.graph_);
2691
} else {
2692
graph_ = NULL;
2693
}
2694
::memcpy(&ir_version_, &from.ir_version_,
2695
static_cast<size_t>(reinterpret_cast<char*>(&model_version_) -
2696
reinterpret_cast<char*>(&ir_version_)) + sizeof(model_version_));
2697
// @@protoc_insertion_point(copy_constructor:opencv_onnx.ModelProto)
2698
}
2699
2700
void ModelProto::SharedCtor() {
2701
_cached_size_ = 0;
2702
producer_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2703
producer_version_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2704
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2705
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2706
::memset(&graph_, 0, static_cast<size_t>(
2707
reinterpret_cast<char*>(&model_version_) -
2708
reinterpret_cast<char*>(&graph_)) + sizeof(model_version_));
2709
}
2710
2711
ModelProto::~ModelProto() {
2712
// @@protoc_insertion_point(destructor:opencv_onnx.ModelProto)
2713
SharedDtor();
2714
}
2715
2716
void ModelProto::SharedDtor() {
2717
producer_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2718
producer_version_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2719
domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2720
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
2721
if (this != internal_default_instance()) delete graph_;
2722
}
2723
2724
void ModelProto::SetCachedSize(int size) const {
2725
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
2726
_cached_size_ = size;
2727
GOOGLE_SAFE_CONCURRENT_WRITES_END();
2728
}
2729
const ::google::protobuf::Descriptor* ModelProto::descriptor() {
2730
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
2731
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
2732
}
2733
2734
const ModelProto& ModelProto::default_instance() {
2735
::protobuf_opencv_2donnx_2eproto::InitDefaultsModelProto();
2736
return *internal_default_instance();
2737
}
2738
2739
ModelProto* ModelProto::New(::google::protobuf::Arena* arena) const {
2740
ModelProto* n = new ModelProto;
2741
if (arena != NULL) {
2742
arena->Own(n);
2743
}
2744
return n;
2745
}
2746
2747
void ModelProto::Clear() {
2748
// @@protoc_insertion_point(message_clear_start:opencv_onnx.ModelProto)
2749
::google::protobuf::uint32 cached_has_bits = 0;
2750
// Prevent compiler warnings about cached_has_bits being unused
2751
(void) cached_has_bits;
2752
2753
opset_import_.Clear();
2754
metadata_props_.Clear();
2755
cached_has_bits = _has_bits_[0];
2756
if (cached_has_bits & 31u) {
2757
if (cached_has_bits & 0x00000001u) {
2758
GOOGLE_DCHECK(!producer_name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
2759
(*producer_name_.UnsafeRawStringPointer())->clear();
2760
}
2761
if (cached_has_bits & 0x00000002u) {
2762
GOOGLE_DCHECK(!producer_version_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
2763
(*producer_version_.UnsafeRawStringPointer())->clear();
2764
}
2765
if (cached_has_bits & 0x00000004u) {
2766
GOOGLE_DCHECK(!domain_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
2767
(*domain_.UnsafeRawStringPointer())->clear();
2768
}
2769
if (cached_has_bits & 0x00000008u) {
2770
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
2771
(*doc_string_.UnsafeRawStringPointer())->clear();
2772
}
2773
if (cached_has_bits & 0x00000010u) {
2774
GOOGLE_DCHECK(graph_ != NULL);
2775
graph_->Clear();
2776
}
2777
}
2778
if (cached_has_bits & 96u) {
2779
::memset(&ir_version_, 0, static_cast<size_t>(
2780
reinterpret_cast<char*>(&model_version_) -
2781
reinterpret_cast<char*>(&ir_version_)) + sizeof(model_version_));
2782
}
2783
_has_bits_.Clear();
2784
_internal_metadata_.Clear();
2785
}
2786
2787
bool ModelProto::MergePartialFromCodedStream(
2788
::google::protobuf::io::CodedInputStream* input) {
2789
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
2790
::google::protobuf::uint32 tag;
2791
// @@protoc_insertion_point(parse_start:opencv_onnx.ModelProto)
2792
for (;;) {
2793
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
2794
tag = p.first;
2795
if (!p.second) goto handle_unusual;
2796
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
2797
// optional int64 ir_version = 1;
2798
case 1: {
2799
if (static_cast< ::google::protobuf::uint8>(tag) ==
2800
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
2801
set_has_ir_version();
2802
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2803
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
2804
input, &ir_version_)));
2805
} else {
2806
goto handle_unusual;
2807
}
2808
break;
2809
}
2810
2811
// optional string producer_name = 2;
2812
case 2: {
2813
if (static_cast< ::google::protobuf::uint8>(tag) ==
2814
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
2815
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2816
input, this->mutable_producer_name()));
2817
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2818
this->producer_name().data(), static_cast<int>(this->producer_name().length()),
2819
::google::protobuf::internal::WireFormat::PARSE,
2820
"opencv_onnx.ModelProto.producer_name");
2821
} else {
2822
goto handle_unusual;
2823
}
2824
break;
2825
}
2826
2827
// optional string producer_version = 3;
2828
case 3: {
2829
if (static_cast< ::google::protobuf::uint8>(tag) ==
2830
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
2831
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2832
input, this->mutable_producer_version()));
2833
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2834
this->producer_version().data(), static_cast<int>(this->producer_version().length()),
2835
::google::protobuf::internal::WireFormat::PARSE,
2836
"opencv_onnx.ModelProto.producer_version");
2837
} else {
2838
goto handle_unusual;
2839
}
2840
break;
2841
}
2842
2843
// optional string domain = 4;
2844
case 4: {
2845
if (static_cast< ::google::protobuf::uint8>(tag) ==
2846
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
2847
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2848
input, this->mutable_domain()));
2849
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2850
this->domain().data(), static_cast<int>(this->domain().length()),
2851
::google::protobuf::internal::WireFormat::PARSE,
2852
"opencv_onnx.ModelProto.domain");
2853
} else {
2854
goto handle_unusual;
2855
}
2856
break;
2857
}
2858
2859
// optional int64 model_version = 5;
2860
case 5: {
2861
if (static_cast< ::google::protobuf::uint8>(tag) ==
2862
static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
2863
set_has_model_version();
2864
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
2865
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
2866
input, &model_version_)));
2867
} else {
2868
goto handle_unusual;
2869
}
2870
break;
2871
}
2872
2873
// optional string doc_string = 6;
2874
case 6: {
2875
if (static_cast< ::google::protobuf::uint8>(tag) ==
2876
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
2877
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
2878
input, this->mutable_doc_string()));
2879
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2880
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
2881
::google::protobuf::internal::WireFormat::PARSE,
2882
"opencv_onnx.ModelProto.doc_string");
2883
} else {
2884
goto handle_unusual;
2885
}
2886
break;
2887
}
2888
2889
// optional .opencv_onnx.GraphProto graph = 7;
2890
case 7: {
2891
if (static_cast< ::google::protobuf::uint8>(tag) ==
2892
static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
2893
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
2894
input, mutable_graph()));
2895
} else {
2896
goto handle_unusual;
2897
}
2898
break;
2899
}
2900
2901
// repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
2902
case 8: {
2903
if (static_cast< ::google::protobuf::uint8>(tag) ==
2904
static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
2905
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_opset_import()));
2906
} else {
2907
goto handle_unusual;
2908
}
2909
break;
2910
}
2911
2912
// repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
2913
case 14: {
2914
if (static_cast< ::google::protobuf::uint8>(tag) ==
2915
static_cast< ::google::protobuf::uint8>(114u /* 114 & 0xFF */)) {
2916
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_metadata_props()));
2917
} else {
2918
goto handle_unusual;
2919
}
2920
break;
2921
}
2922
2923
default: {
2924
handle_unusual:
2925
if (tag == 0) {
2926
goto success;
2927
}
2928
DO_(::google::protobuf::internal::WireFormat::SkipField(
2929
input, tag, _internal_metadata_.mutable_unknown_fields()));
2930
break;
2931
}
2932
}
2933
}
2934
success:
2935
// @@protoc_insertion_point(parse_success:opencv_onnx.ModelProto)
2936
return true;
2937
failure:
2938
// @@protoc_insertion_point(parse_failure:opencv_onnx.ModelProto)
2939
return false;
2940
#undef DO_
2941
}
2942
2943
void ModelProto::SerializeWithCachedSizes(
2944
::google::protobuf::io::CodedOutputStream* output) const {
2945
// @@protoc_insertion_point(serialize_start:opencv_onnx.ModelProto)
2946
::google::protobuf::uint32 cached_has_bits = 0;
2947
(void) cached_has_bits;
2948
2949
cached_has_bits = _has_bits_[0];
2950
// optional int64 ir_version = 1;
2951
if (cached_has_bits & 0x00000020u) {
2952
::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->ir_version(), output);
2953
}
2954
2955
// optional string producer_name = 2;
2956
if (cached_has_bits & 0x00000001u) {
2957
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2958
this->producer_name().data(), static_cast<int>(this->producer_name().length()),
2959
::google::protobuf::internal::WireFormat::SERIALIZE,
2960
"opencv_onnx.ModelProto.producer_name");
2961
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2962
2, this->producer_name(), output);
2963
}
2964
2965
// optional string producer_version = 3;
2966
if (cached_has_bits & 0x00000002u) {
2967
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2968
this->producer_version().data(), static_cast<int>(this->producer_version().length()),
2969
::google::protobuf::internal::WireFormat::SERIALIZE,
2970
"opencv_onnx.ModelProto.producer_version");
2971
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2972
3, this->producer_version(), output);
2973
}
2974
2975
// optional string domain = 4;
2976
if (cached_has_bits & 0x00000004u) {
2977
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2978
this->domain().data(), static_cast<int>(this->domain().length()),
2979
::google::protobuf::internal::WireFormat::SERIALIZE,
2980
"opencv_onnx.ModelProto.domain");
2981
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2982
4, this->domain(), output);
2983
}
2984
2985
// optional int64 model_version = 5;
2986
if (cached_has_bits & 0x00000040u) {
2987
::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->model_version(), output);
2988
}
2989
2990
// optional string doc_string = 6;
2991
if (cached_has_bits & 0x00000008u) {
2992
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
2993
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
2994
::google::protobuf::internal::WireFormat::SERIALIZE,
2995
"opencv_onnx.ModelProto.doc_string");
2996
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
2997
6, this->doc_string(), output);
2998
}
2999
3000
// optional .opencv_onnx.GraphProto graph = 7;
3001
if (cached_has_bits & 0x00000010u) {
3002
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3003
7, *this->graph_, output);
3004
}
3005
3006
// repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
3007
for (unsigned int i = 0,
3008
n = static_cast<unsigned int>(this->opset_import_size()); i < n; i++) {
3009
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3010
8, this->opset_import(static_cast<int>(i)), output);
3011
}
3012
3013
// repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
3014
for (unsigned int i = 0,
3015
n = static_cast<unsigned int>(this->metadata_props_size()); i < n; i++) {
3016
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3017
14, this->metadata_props(static_cast<int>(i)), output);
3018
}
3019
3020
if (_internal_metadata_.have_unknown_fields()) {
3021
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3022
_internal_metadata_.unknown_fields(), output);
3023
}
3024
// @@protoc_insertion_point(serialize_end:opencv_onnx.ModelProto)
3025
}
3026
3027
::google::protobuf::uint8* ModelProto::InternalSerializeWithCachedSizesToArray(
3028
bool deterministic, ::google::protobuf::uint8* target) const {
3029
(void)deterministic; // Unused
3030
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.ModelProto)
3031
::google::protobuf::uint32 cached_has_bits = 0;
3032
(void) cached_has_bits;
3033
3034
cached_has_bits = _has_bits_[0];
3035
// optional int64 ir_version = 1;
3036
if (cached_has_bits & 0x00000020u) {
3037
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->ir_version(), target);
3038
}
3039
3040
// optional string producer_name = 2;
3041
if (cached_has_bits & 0x00000001u) {
3042
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3043
this->producer_name().data(), static_cast<int>(this->producer_name().length()),
3044
::google::protobuf::internal::WireFormat::SERIALIZE,
3045
"opencv_onnx.ModelProto.producer_name");
3046
target =
3047
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3048
2, this->producer_name(), target);
3049
}
3050
3051
// optional string producer_version = 3;
3052
if (cached_has_bits & 0x00000002u) {
3053
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3054
this->producer_version().data(), static_cast<int>(this->producer_version().length()),
3055
::google::protobuf::internal::WireFormat::SERIALIZE,
3056
"opencv_onnx.ModelProto.producer_version");
3057
target =
3058
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3059
3, this->producer_version(), target);
3060
}
3061
3062
// optional string domain = 4;
3063
if (cached_has_bits & 0x00000004u) {
3064
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3065
this->domain().data(), static_cast<int>(this->domain().length()),
3066
::google::protobuf::internal::WireFormat::SERIALIZE,
3067
"opencv_onnx.ModelProto.domain");
3068
target =
3069
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3070
4, this->domain(), target);
3071
}
3072
3073
// optional int64 model_version = 5;
3074
if (cached_has_bits & 0x00000040u) {
3075
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(5, this->model_version(), target);
3076
}
3077
3078
// optional string doc_string = 6;
3079
if (cached_has_bits & 0x00000008u) {
3080
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3081
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
3082
::google::protobuf::internal::WireFormat::SERIALIZE,
3083
"opencv_onnx.ModelProto.doc_string");
3084
target =
3085
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3086
6, this->doc_string(), target);
3087
}
3088
3089
// optional .opencv_onnx.GraphProto graph = 7;
3090
if (cached_has_bits & 0x00000010u) {
3091
target = ::google::protobuf::internal::WireFormatLite::
3092
InternalWriteMessageToArray(
3093
7, *this->graph_, deterministic, target);
3094
}
3095
3096
// repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
3097
for (unsigned int i = 0,
3098
n = static_cast<unsigned int>(this->opset_import_size()); i < n; i++) {
3099
target = ::google::protobuf::internal::WireFormatLite::
3100
InternalWriteMessageToArray(
3101
8, this->opset_import(static_cast<int>(i)), deterministic, target);
3102
}
3103
3104
// repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
3105
for (unsigned int i = 0,
3106
n = static_cast<unsigned int>(this->metadata_props_size()); i < n; i++) {
3107
target = ::google::protobuf::internal::WireFormatLite::
3108
InternalWriteMessageToArray(
3109
14, this->metadata_props(static_cast<int>(i)), deterministic, target);
3110
}
3111
3112
if (_internal_metadata_.have_unknown_fields()) {
3113
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3114
_internal_metadata_.unknown_fields(), target);
3115
}
3116
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.ModelProto)
3117
return target;
3118
}
3119
3120
size_t ModelProto::ByteSizeLong() const {
3121
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.ModelProto)
3122
size_t total_size = 0;
3123
3124
if (_internal_metadata_.have_unknown_fields()) {
3125
total_size +=
3126
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3127
_internal_metadata_.unknown_fields());
3128
}
3129
// repeated .opencv_onnx.OperatorSetIdProto opset_import = 8;
3130
{
3131
unsigned int count = static_cast<unsigned int>(this->opset_import_size());
3132
total_size += 1UL * count;
3133
for (unsigned int i = 0; i < count; i++) {
3134
total_size +=
3135
::google::protobuf::internal::WireFormatLite::MessageSize(
3136
this->opset_import(static_cast<int>(i)));
3137
}
3138
}
3139
3140
// repeated .opencv_onnx.StringStringEntryProto metadata_props = 14;
3141
{
3142
unsigned int count = static_cast<unsigned int>(this->metadata_props_size());
3143
total_size += 1UL * count;
3144
for (unsigned int i = 0; i < count; i++) {
3145
total_size +=
3146
::google::protobuf::internal::WireFormatLite::MessageSize(
3147
this->metadata_props(static_cast<int>(i)));
3148
}
3149
}
3150
3151
if (_has_bits_[0 / 32] & 127u) {
3152
// optional string producer_name = 2;
3153
if (has_producer_name()) {
3154
total_size += 1 +
3155
::google::protobuf::internal::WireFormatLite::StringSize(
3156
this->producer_name());
3157
}
3158
3159
// optional string producer_version = 3;
3160
if (has_producer_version()) {
3161
total_size += 1 +
3162
::google::protobuf::internal::WireFormatLite::StringSize(
3163
this->producer_version());
3164
}
3165
3166
// optional string domain = 4;
3167
if (has_domain()) {
3168
total_size += 1 +
3169
::google::protobuf::internal::WireFormatLite::StringSize(
3170
this->domain());
3171
}
3172
3173
// optional string doc_string = 6;
3174
if (has_doc_string()) {
3175
total_size += 1 +
3176
::google::protobuf::internal::WireFormatLite::StringSize(
3177
this->doc_string());
3178
}
3179
3180
// optional .opencv_onnx.GraphProto graph = 7;
3181
if (has_graph()) {
3182
total_size += 1 +
3183
::google::protobuf::internal::WireFormatLite::MessageSize(
3184
*this->graph_);
3185
}
3186
3187
// optional int64 ir_version = 1;
3188
if (has_ir_version()) {
3189
total_size += 1 +
3190
::google::protobuf::internal::WireFormatLite::Int64Size(
3191
this->ir_version());
3192
}
3193
3194
// optional int64 model_version = 5;
3195
if (has_model_version()) {
3196
total_size += 1 +
3197
::google::protobuf::internal::WireFormatLite::Int64Size(
3198
this->model_version());
3199
}
3200
3201
}
3202
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
3203
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3204
_cached_size_ = cached_size;
3205
GOOGLE_SAFE_CONCURRENT_WRITES_END();
3206
return total_size;
3207
}
3208
3209
void ModelProto::MergeFrom(const ::google::protobuf::Message& from) {
3210
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.ModelProto)
3211
GOOGLE_DCHECK_NE(&from, this);
3212
const ModelProto* source =
3213
::google::protobuf::internal::DynamicCastToGenerated<const ModelProto>(
3214
&from);
3215
if (source == NULL) {
3216
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.ModelProto)
3217
::google::protobuf::internal::ReflectionOps::Merge(from, this);
3218
} else {
3219
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.ModelProto)
3220
MergeFrom(*source);
3221
}
3222
}
3223
3224
void ModelProto::MergeFrom(const ModelProto& from) {
3225
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.ModelProto)
3226
GOOGLE_DCHECK_NE(&from, this);
3227
_internal_metadata_.MergeFrom(from._internal_metadata_);
3228
::google::protobuf::uint32 cached_has_bits = 0;
3229
(void) cached_has_bits;
3230
3231
opset_import_.MergeFrom(from.opset_import_);
3232
metadata_props_.MergeFrom(from.metadata_props_);
3233
cached_has_bits = from._has_bits_[0];
3234
if (cached_has_bits & 127u) {
3235
if (cached_has_bits & 0x00000001u) {
3236
set_has_producer_name();
3237
producer_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_name_);
3238
}
3239
if (cached_has_bits & 0x00000002u) {
3240
set_has_producer_version();
3241
producer_version_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.producer_version_);
3242
}
3243
if (cached_has_bits & 0x00000004u) {
3244
set_has_domain();
3245
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
3246
}
3247
if (cached_has_bits & 0x00000008u) {
3248
set_has_doc_string();
3249
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
3250
}
3251
if (cached_has_bits & 0x00000010u) {
3252
mutable_graph()->::opencv_onnx::GraphProto::MergeFrom(from.graph());
3253
}
3254
if (cached_has_bits & 0x00000020u) {
3255
ir_version_ = from.ir_version_;
3256
}
3257
if (cached_has_bits & 0x00000040u) {
3258
model_version_ = from.model_version_;
3259
}
3260
_has_bits_[0] |= cached_has_bits;
3261
}
3262
}
3263
3264
void ModelProto::CopyFrom(const ::google::protobuf::Message& from) {
3265
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.ModelProto)
3266
if (&from == this) return;
3267
Clear();
3268
MergeFrom(from);
3269
}
3270
3271
void ModelProto::CopyFrom(const ModelProto& from) {
3272
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.ModelProto)
3273
if (&from == this) return;
3274
Clear();
3275
MergeFrom(from);
3276
}
3277
3278
bool ModelProto::IsInitialized() const {
3279
return true;
3280
}
3281
3282
void ModelProto::Swap(ModelProto* other) {
3283
if (other == this) return;
3284
InternalSwap(other);
3285
}
3286
void ModelProto::InternalSwap(ModelProto* other) {
3287
using std::swap;
3288
opset_import_.InternalSwap(&other->opset_import_);
3289
metadata_props_.InternalSwap(&other->metadata_props_);
3290
producer_name_.Swap(&other->producer_name_);
3291
producer_version_.Swap(&other->producer_version_);
3292
domain_.Swap(&other->domain_);
3293
doc_string_.Swap(&other->doc_string_);
3294
swap(graph_, other->graph_);
3295
swap(ir_version_, other->ir_version_);
3296
swap(model_version_, other->model_version_);
3297
swap(_has_bits_[0], other->_has_bits_[0]);
3298
_internal_metadata_.Swap(&other->_internal_metadata_);
3299
swap(_cached_size_, other->_cached_size_);
3300
}
3301
3302
::google::protobuf::Metadata ModelProto::GetMetadata() const {
3303
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
3304
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
3305
}
3306
3307
3308
// ===================================================================
3309
3310
void StringStringEntryProto::InitAsDefaultInstance() {
3311
}
3312
#if !defined(_MSC_VER) || _MSC_VER >= 1900
3313
const int StringStringEntryProto::kKeyFieldNumber;
3314
const int StringStringEntryProto::kValueFieldNumber;
3315
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
3316
3317
StringStringEntryProto::StringStringEntryProto()
3318
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
3319
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
3320
::protobuf_opencv_2donnx_2eproto::InitDefaultsStringStringEntryProto();
3321
}
3322
SharedCtor();
3323
// @@protoc_insertion_point(constructor:opencv_onnx.StringStringEntryProto)
3324
}
3325
StringStringEntryProto::StringStringEntryProto(const StringStringEntryProto& from)
3326
: ::google::protobuf::Message(),
3327
_internal_metadata_(NULL),
3328
_has_bits_(from._has_bits_),
3329
_cached_size_(0) {
3330
_internal_metadata_.MergeFrom(from._internal_metadata_);
3331
key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3332
if (from.has_key()) {
3333
key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
3334
}
3335
value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3336
if (from.has_value()) {
3337
value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
3338
}
3339
// @@protoc_insertion_point(copy_constructor:opencv_onnx.StringStringEntryProto)
3340
}
3341
3342
void StringStringEntryProto::SharedCtor() {
3343
_cached_size_ = 0;
3344
key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3345
value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3346
}
3347
3348
StringStringEntryProto::~StringStringEntryProto() {
3349
// @@protoc_insertion_point(destructor:opencv_onnx.StringStringEntryProto)
3350
SharedDtor();
3351
}
3352
3353
void StringStringEntryProto::SharedDtor() {
3354
key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3355
value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3356
}
3357
3358
void StringStringEntryProto::SetCachedSize(int size) const {
3359
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3360
_cached_size_ = size;
3361
GOOGLE_SAFE_CONCURRENT_WRITES_END();
3362
}
3363
const ::google::protobuf::Descriptor* StringStringEntryProto::descriptor() {
3364
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
3365
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
3366
}
3367
3368
const StringStringEntryProto& StringStringEntryProto::default_instance() {
3369
::protobuf_opencv_2donnx_2eproto::InitDefaultsStringStringEntryProto();
3370
return *internal_default_instance();
3371
}
3372
3373
StringStringEntryProto* StringStringEntryProto::New(::google::protobuf::Arena* arena) const {
3374
StringStringEntryProto* n = new StringStringEntryProto;
3375
if (arena != NULL) {
3376
arena->Own(n);
3377
}
3378
return n;
3379
}
3380
3381
void StringStringEntryProto::Clear() {
3382
// @@protoc_insertion_point(message_clear_start:opencv_onnx.StringStringEntryProto)
3383
::google::protobuf::uint32 cached_has_bits = 0;
3384
// Prevent compiler warnings about cached_has_bits being unused
3385
(void) cached_has_bits;
3386
3387
cached_has_bits = _has_bits_[0];
3388
if (cached_has_bits & 3u) {
3389
if (cached_has_bits & 0x00000001u) {
3390
GOOGLE_DCHECK(!key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
3391
(*key_.UnsafeRawStringPointer())->clear();
3392
}
3393
if (cached_has_bits & 0x00000002u) {
3394
GOOGLE_DCHECK(!value_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
3395
(*value_.UnsafeRawStringPointer())->clear();
3396
}
3397
}
3398
_has_bits_.Clear();
3399
_internal_metadata_.Clear();
3400
}
3401
3402
bool StringStringEntryProto::MergePartialFromCodedStream(
3403
::google::protobuf::io::CodedInputStream* input) {
3404
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
3405
::google::protobuf::uint32 tag;
3406
// @@protoc_insertion_point(parse_start:opencv_onnx.StringStringEntryProto)
3407
for (;;) {
3408
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
3409
tag = p.first;
3410
if (!p.second) goto handle_unusual;
3411
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
3412
// optional string key = 1;
3413
case 1: {
3414
if (static_cast< ::google::protobuf::uint8>(tag) ==
3415
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
3416
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3417
input, this->mutable_key()));
3418
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3419
this->key().data(), static_cast<int>(this->key().length()),
3420
::google::protobuf::internal::WireFormat::PARSE,
3421
"opencv_onnx.StringStringEntryProto.key");
3422
} else {
3423
goto handle_unusual;
3424
}
3425
break;
3426
}
3427
3428
// optional string value = 2;
3429
case 2: {
3430
if (static_cast< ::google::protobuf::uint8>(tag) ==
3431
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
3432
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3433
input, this->mutable_value()));
3434
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3435
this->value().data(), static_cast<int>(this->value().length()),
3436
::google::protobuf::internal::WireFormat::PARSE,
3437
"opencv_onnx.StringStringEntryProto.value");
3438
} else {
3439
goto handle_unusual;
3440
}
3441
break;
3442
}
3443
3444
default: {
3445
handle_unusual:
3446
if (tag == 0) {
3447
goto success;
3448
}
3449
DO_(::google::protobuf::internal::WireFormat::SkipField(
3450
input, tag, _internal_metadata_.mutable_unknown_fields()));
3451
break;
3452
}
3453
}
3454
}
3455
success:
3456
// @@protoc_insertion_point(parse_success:opencv_onnx.StringStringEntryProto)
3457
return true;
3458
failure:
3459
// @@protoc_insertion_point(parse_failure:opencv_onnx.StringStringEntryProto)
3460
return false;
3461
#undef DO_
3462
}
3463
3464
void StringStringEntryProto::SerializeWithCachedSizes(
3465
::google::protobuf::io::CodedOutputStream* output) const {
3466
// @@protoc_insertion_point(serialize_start:opencv_onnx.StringStringEntryProto)
3467
::google::protobuf::uint32 cached_has_bits = 0;
3468
(void) cached_has_bits;
3469
3470
cached_has_bits = _has_bits_[0];
3471
// optional string key = 1;
3472
if (cached_has_bits & 0x00000001u) {
3473
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3474
this->key().data(), static_cast<int>(this->key().length()),
3475
::google::protobuf::internal::WireFormat::SERIALIZE,
3476
"opencv_onnx.StringStringEntryProto.key");
3477
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3478
1, this->key(), output);
3479
}
3480
3481
// optional string value = 2;
3482
if (cached_has_bits & 0x00000002u) {
3483
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3484
this->value().data(), static_cast<int>(this->value().length()),
3485
::google::protobuf::internal::WireFormat::SERIALIZE,
3486
"opencv_onnx.StringStringEntryProto.value");
3487
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3488
2, this->value(), output);
3489
}
3490
3491
if (_internal_metadata_.have_unknown_fields()) {
3492
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3493
_internal_metadata_.unknown_fields(), output);
3494
}
3495
// @@protoc_insertion_point(serialize_end:opencv_onnx.StringStringEntryProto)
3496
}
3497
3498
::google::protobuf::uint8* StringStringEntryProto::InternalSerializeWithCachedSizesToArray(
3499
bool deterministic, ::google::protobuf::uint8* target) const {
3500
(void)deterministic; // Unused
3501
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.StringStringEntryProto)
3502
::google::protobuf::uint32 cached_has_bits = 0;
3503
(void) cached_has_bits;
3504
3505
cached_has_bits = _has_bits_[0];
3506
// optional string key = 1;
3507
if (cached_has_bits & 0x00000001u) {
3508
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3509
this->key().data(), static_cast<int>(this->key().length()),
3510
::google::protobuf::internal::WireFormat::SERIALIZE,
3511
"opencv_onnx.StringStringEntryProto.key");
3512
target =
3513
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3514
1, this->key(), target);
3515
}
3516
3517
// optional string value = 2;
3518
if (cached_has_bits & 0x00000002u) {
3519
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3520
this->value().data(), static_cast<int>(this->value().length()),
3521
::google::protobuf::internal::WireFormat::SERIALIZE,
3522
"opencv_onnx.StringStringEntryProto.value");
3523
target =
3524
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3525
2, this->value(), target);
3526
}
3527
3528
if (_internal_metadata_.have_unknown_fields()) {
3529
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
3530
_internal_metadata_.unknown_fields(), target);
3531
}
3532
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.StringStringEntryProto)
3533
return target;
3534
}
3535
3536
size_t StringStringEntryProto::ByteSizeLong() const {
3537
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.StringStringEntryProto)
3538
size_t total_size = 0;
3539
3540
if (_internal_metadata_.have_unknown_fields()) {
3541
total_size +=
3542
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
3543
_internal_metadata_.unknown_fields());
3544
}
3545
if (_has_bits_[0 / 32] & 3u) {
3546
// optional string key = 1;
3547
if (has_key()) {
3548
total_size += 1 +
3549
::google::protobuf::internal::WireFormatLite::StringSize(
3550
this->key());
3551
}
3552
3553
// optional string value = 2;
3554
if (has_value()) {
3555
total_size += 1 +
3556
::google::protobuf::internal::WireFormatLite::StringSize(
3557
this->value());
3558
}
3559
3560
}
3561
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
3562
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3563
_cached_size_ = cached_size;
3564
GOOGLE_SAFE_CONCURRENT_WRITES_END();
3565
return total_size;
3566
}
3567
3568
void StringStringEntryProto::MergeFrom(const ::google::protobuf::Message& from) {
3569
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.StringStringEntryProto)
3570
GOOGLE_DCHECK_NE(&from, this);
3571
const StringStringEntryProto* source =
3572
::google::protobuf::internal::DynamicCastToGenerated<const StringStringEntryProto>(
3573
&from);
3574
if (source == NULL) {
3575
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.StringStringEntryProto)
3576
::google::protobuf::internal::ReflectionOps::Merge(from, this);
3577
} else {
3578
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.StringStringEntryProto)
3579
MergeFrom(*source);
3580
}
3581
}
3582
3583
void StringStringEntryProto::MergeFrom(const StringStringEntryProto& from) {
3584
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.StringStringEntryProto)
3585
GOOGLE_DCHECK_NE(&from, this);
3586
_internal_metadata_.MergeFrom(from._internal_metadata_);
3587
::google::protobuf::uint32 cached_has_bits = 0;
3588
(void) cached_has_bits;
3589
3590
cached_has_bits = from._has_bits_[0];
3591
if (cached_has_bits & 3u) {
3592
if (cached_has_bits & 0x00000001u) {
3593
set_has_key();
3594
key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
3595
}
3596
if (cached_has_bits & 0x00000002u) {
3597
set_has_value();
3598
value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
3599
}
3600
}
3601
}
3602
3603
void StringStringEntryProto::CopyFrom(const ::google::protobuf::Message& from) {
3604
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.StringStringEntryProto)
3605
if (&from == this) return;
3606
Clear();
3607
MergeFrom(from);
3608
}
3609
3610
void StringStringEntryProto::CopyFrom(const StringStringEntryProto& from) {
3611
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.StringStringEntryProto)
3612
if (&from == this) return;
3613
Clear();
3614
MergeFrom(from);
3615
}
3616
3617
bool StringStringEntryProto::IsInitialized() const {
3618
return true;
3619
}
3620
3621
void StringStringEntryProto::Swap(StringStringEntryProto* other) {
3622
if (other == this) return;
3623
InternalSwap(other);
3624
}
3625
void StringStringEntryProto::InternalSwap(StringStringEntryProto* other) {
3626
using std::swap;
3627
key_.Swap(&other->key_);
3628
value_.Swap(&other->value_);
3629
swap(_has_bits_[0], other->_has_bits_[0]);
3630
_internal_metadata_.Swap(&other->_internal_metadata_);
3631
swap(_cached_size_, other->_cached_size_);
3632
}
3633
3634
::google::protobuf::Metadata StringStringEntryProto::GetMetadata() const {
3635
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
3636
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
3637
}
3638
3639
3640
// ===================================================================
3641
3642
void GraphProto::InitAsDefaultInstance() {
3643
}
3644
#if !defined(_MSC_VER) || _MSC_VER >= 1900
3645
const int GraphProto::kNodeFieldNumber;
3646
const int GraphProto::kNameFieldNumber;
3647
const int GraphProto::kInitializerFieldNumber;
3648
const int GraphProto::kDocStringFieldNumber;
3649
const int GraphProto::kInputFieldNumber;
3650
const int GraphProto::kOutputFieldNumber;
3651
const int GraphProto::kValueInfoFieldNumber;
3652
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
3653
3654
GraphProto::GraphProto()
3655
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
3656
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
3657
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
3658
}
3659
SharedCtor();
3660
// @@protoc_insertion_point(constructor:opencv_onnx.GraphProto)
3661
}
3662
GraphProto::GraphProto(const GraphProto& from)
3663
: ::google::protobuf::Message(),
3664
_internal_metadata_(NULL),
3665
_has_bits_(from._has_bits_),
3666
_cached_size_(0),
3667
node_(from.node_),
3668
initializer_(from.initializer_),
3669
input_(from.input_),
3670
output_(from.output_),
3671
value_info_(from.value_info_) {
3672
_internal_metadata_.MergeFrom(from._internal_metadata_);
3673
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3674
if (from.has_name()) {
3675
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
3676
}
3677
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3678
if (from.has_doc_string()) {
3679
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
3680
}
3681
// @@protoc_insertion_point(copy_constructor:opencv_onnx.GraphProto)
3682
}
3683
3684
void GraphProto::SharedCtor() {
3685
_cached_size_ = 0;
3686
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3687
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3688
}
3689
3690
GraphProto::~GraphProto() {
3691
// @@protoc_insertion_point(destructor:opencv_onnx.GraphProto)
3692
SharedDtor();
3693
}
3694
3695
void GraphProto::SharedDtor() {
3696
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3697
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
3698
}
3699
3700
void GraphProto::SetCachedSize(int size) const {
3701
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
3702
_cached_size_ = size;
3703
GOOGLE_SAFE_CONCURRENT_WRITES_END();
3704
}
3705
const ::google::protobuf::Descriptor* GraphProto::descriptor() {
3706
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
3707
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
3708
}
3709
3710
const GraphProto& GraphProto::default_instance() {
3711
::protobuf_opencv_2donnx_2eproto::InitDefaultsAttributeProto();
3712
return *internal_default_instance();
3713
}
3714
3715
GraphProto* GraphProto::New(::google::protobuf::Arena* arena) const {
3716
GraphProto* n = new GraphProto;
3717
if (arena != NULL) {
3718
arena->Own(n);
3719
}
3720
return n;
3721
}
3722
3723
void GraphProto::Clear() {
3724
// @@protoc_insertion_point(message_clear_start:opencv_onnx.GraphProto)
3725
::google::protobuf::uint32 cached_has_bits = 0;
3726
// Prevent compiler warnings about cached_has_bits being unused
3727
(void) cached_has_bits;
3728
3729
node_.Clear();
3730
initializer_.Clear();
3731
input_.Clear();
3732
output_.Clear();
3733
value_info_.Clear();
3734
cached_has_bits = _has_bits_[0];
3735
if (cached_has_bits & 3u) {
3736
if (cached_has_bits & 0x00000001u) {
3737
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
3738
(*name_.UnsafeRawStringPointer())->clear();
3739
}
3740
if (cached_has_bits & 0x00000002u) {
3741
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
3742
(*doc_string_.UnsafeRawStringPointer())->clear();
3743
}
3744
}
3745
_has_bits_.Clear();
3746
_internal_metadata_.Clear();
3747
}
3748
3749
bool GraphProto::MergePartialFromCodedStream(
3750
::google::protobuf::io::CodedInputStream* input) {
3751
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
3752
::google::protobuf::uint32 tag;
3753
// @@protoc_insertion_point(parse_start:opencv_onnx.GraphProto)
3754
for (;;) {
3755
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
3756
tag = p.first;
3757
if (!p.second) goto handle_unusual;
3758
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
3759
// repeated .opencv_onnx.NodeProto node = 1;
3760
case 1: {
3761
if (static_cast< ::google::protobuf::uint8>(tag) ==
3762
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
3763
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_node()));
3764
} else {
3765
goto handle_unusual;
3766
}
3767
break;
3768
}
3769
3770
// optional string name = 2;
3771
case 2: {
3772
if (static_cast< ::google::protobuf::uint8>(tag) ==
3773
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
3774
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3775
input, this->mutable_name()));
3776
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3777
this->name().data(), static_cast<int>(this->name().length()),
3778
::google::protobuf::internal::WireFormat::PARSE,
3779
"opencv_onnx.GraphProto.name");
3780
} else {
3781
goto handle_unusual;
3782
}
3783
break;
3784
}
3785
3786
// repeated .opencv_onnx.TensorProto initializer = 5;
3787
case 5: {
3788
if (static_cast< ::google::protobuf::uint8>(tag) ==
3789
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
3790
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_initializer()));
3791
} else {
3792
goto handle_unusual;
3793
}
3794
break;
3795
}
3796
3797
// optional string doc_string = 10;
3798
case 10: {
3799
if (static_cast< ::google::protobuf::uint8>(tag) ==
3800
static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
3801
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
3802
input, this->mutable_doc_string()));
3803
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3804
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
3805
::google::protobuf::internal::WireFormat::PARSE,
3806
"opencv_onnx.GraphProto.doc_string");
3807
} else {
3808
goto handle_unusual;
3809
}
3810
break;
3811
}
3812
3813
// repeated .opencv_onnx.ValueInfoProto input = 11;
3814
case 11: {
3815
if (static_cast< ::google::protobuf::uint8>(tag) ==
3816
static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
3817
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_input()));
3818
} else {
3819
goto handle_unusual;
3820
}
3821
break;
3822
}
3823
3824
// repeated .opencv_onnx.ValueInfoProto output = 12;
3825
case 12: {
3826
if (static_cast< ::google::protobuf::uint8>(tag) ==
3827
static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
3828
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_output()));
3829
} else {
3830
goto handle_unusual;
3831
}
3832
break;
3833
}
3834
3835
// repeated .opencv_onnx.ValueInfoProto value_info = 13;
3836
case 13: {
3837
if (static_cast< ::google::protobuf::uint8>(tag) ==
3838
static_cast< ::google::protobuf::uint8>(106u /* 106 & 0xFF */)) {
3839
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_value_info()));
3840
} else {
3841
goto handle_unusual;
3842
}
3843
break;
3844
}
3845
3846
default: {
3847
handle_unusual:
3848
if (tag == 0) {
3849
goto success;
3850
}
3851
DO_(::google::protobuf::internal::WireFormat::SkipField(
3852
input, tag, _internal_metadata_.mutable_unknown_fields()));
3853
break;
3854
}
3855
}
3856
}
3857
success:
3858
// @@protoc_insertion_point(parse_success:opencv_onnx.GraphProto)
3859
return true;
3860
failure:
3861
// @@protoc_insertion_point(parse_failure:opencv_onnx.GraphProto)
3862
return false;
3863
#undef DO_
3864
}
3865
3866
void GraphProto::SerializeWithCachedSizes(
3867
::google::protobuf::io::CodedOutputStream* output) const {
3868
// @@protoc_insertion_point(serialize_start:opencv_onnx.GraphProto)
3869
::google::protobuf::uint32 cached_has_bits = 0;
3870
(void) cached_has_bits;
3871
3872
// repeated .opencv_onnx.NodeProto node = 1;
3873
for (unsigned int i = 0,
3874
n = static_cast<unsigned int>(this->node_size()); i < n; i++) {
3875
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3876
1, this->node(static_cast<int>(i)), output);
3877
}
3878
3879
cached_has_bits = _has_bits_[0];
3880
// optional string name = 2;
3881
if (cached_has_bits & 0x00000001u) {
3882
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3883
this->name().data(), static_cast<int>(this->name().length()),
3884
::google::protobuf::internal::WireFormat::SERIALIZE,
3885
"opencv_onnx.GraphProto.name");
3886
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3887
2, this->name(), output);
3888
}
3889
3890
// repeated .opencv_onnx.TensorProto initializer = 5;
3891
for (unsigned int i = 0,
3892
n = static_cast<unsigned int>(this->initializer_size()); i < n; i++) {
3893
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3894
5, this->initializer(static_cast<int>(i)), output);
3895
}
3896
3897
// optional string doc_string = 10;
3898
if (cached_has_bits & 0x00000002u) {
3899
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3900
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
3901
::google::protobuf::internal::WireFormat::SERIALIZE,
3902
"opencv_onnx.GraphProto.doc_string");
3903
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
3904
10, this->doc_string(), output);
3905
}
3906
3907
// repeated .opencv_onnx.ValueInfoProto input = 11;
3908
for (unsigned int i = 0,
3909
n = static_cast<unsigned int>(this->input_size()); i < n; i++) {
3910
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3911
11, this->input(static_cast<int>(i)), output);
3912
}
3913
3914
// repeated .opencv_onnx.ValueInfoProto output = 12;
3915
for (unsigned int i = 0,
3916
n = static_cast<unsigned int>(this->output_size()); i < n; i++) {
3917
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3918
12, this->output(static_cast<int>(i)), output);
3919
}
3920
3921
// repeated .opencv_onnx.ValueInfoProto value_info = 13;
3922
for (unsigned int i = 0,
3923
n = static_cast<unsigned int>(this->value_info_size()); i < n; i++) {
3924
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
3925
13, this->value_info(static_cast<int>(i)), output);
3926
}
3927
3928
if (_internal_metadata_.have_unknown_fields()) {
3929
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
3930
_internal_metadata_.unknown_fields(), output);
3931
}
3932
// @@protoc_insertion_point(serialize_end:opencv_onnx.GraphProto)
3933
}
3934
3935
::google::protobuf::uint8* GraphProto::InternalSerializeWithCachedSizesToArray(
3936
bool deterministic, ::google::protobuf::uint8* target) const {
3937
(void)deterministic; // Unused
3938
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.GraphProto)
3939
::google::protobuf::uint32 cached_has_bits = 0;
3940
(void) cached_has_bits;
3941
3942
// repeated .opencv_onnx.NodeProto node = 1;
3943
for (unsigned int i = 0,
3944
n = static_cast<unsigned int>(this->node_size()); i < n; i++) {
3945
target = ::google::protobuf::internal::WireFormatLite::
3946
InternalWriteMessageToArray(
3947
1, this->node(static_cast<int>(i)), deterministic, target);
3948
}
3949
3950
cached_has_bits = _has_bits_[0];
3951
// optional string name = 2;
3952
if (cached_has_bits & 0x00000001u) {
3953
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3954
this->name().data(), static_cast<int>(this->name().length()),
3955
::google::protobuf::internal::WireFormat::SERIALIZE,
3956
"opencv_onnx.GraphProto.name");
3957
target =
3958
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3959
2, this->name(), target);
3960
}
3961
3962
// repeated .opencv_onnx.TensorProto initializer = 5;
3963
for (unsigned int i = 0,
3964
n = static_cast<unsigned int>(this->initializer_size()); i < n; i++) {
3965
target = ::google::protobuf::internal::WireFormatLite::
3966
InternalWriteMessageToArray(
3967
5, this->initializer(static_cast<int>(i)), deterministic, target);
3968
}
3969
3970
// optional string doc_string = 10;
3971
if (cached_has_bits & 0x00000002u) {
3972
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
3973
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
3974
::google::protobuf::internal::WireFormat::SERIALIZE,
3975
"opencv_onnx.GraphProto.doc_string");
3976
target =
3977
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
3978
10, this->doc_string(), target);
3979
}
3980
3981
// repeated .opencv_onnx.ValueInfoProto input = 11;
3982
for (unsigned int i = 0,
3983
n = static_cast<unsigned int>(this->input_size()); i < n; i++) {
3984
target = ::google::protobuf::internal::WireFormatLite::
3985
InternalWriteMessageToArray(
3986
11, this->input(static_cast<int>(i)), deterministic, target);
3987
}
3988
3989
// repeated .opencv_onnx.ValueInfoProto output = 12;
3990
for (unsigned int i = 0,
3991
n = static_cast<unsigned int>(this->output_size()); i < n; i++) {
3992
target = ::google::protobuf::internal::WireFormatLite::
3993
InternalWriteMessageToArray(
3994
12, this->output(static_cast<int>(i)), deterministic, target);
3995
}
3996
3997
// repeated .opencv_onnx.ValueInfoProto value_info = 13;
3998
for (unsigned int i = 0,
3999
n = static_cast<unsigned int>(this->value_info_size()); i < n; i++) {
4000
target = ::google::protobuf::internal::WireFormatLite::
4001
InternalWriteMessageToArray(
4002
13, this->value_info(static_cast<int>(i)), deterministic, target);
4003
}
4004
4005
if (_internal_metadata_.have_unknown_fields()) {
4006
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
4007
_internal_metadata_.unknown_fields(), target);
4008
}
4009
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.GraphProto)
4010
return target;
4011
}
4012
4013
size_t GraphProto::ByteSizeLong() const {
4014
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.GraphProto)
4015
size_t total_size = 0;
4016
4017
if (_internal_metadata_.have_unknown_fields()) {
4018
total_size +=
4019
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4020
_internal_metadata_.unknown_fields());
4021
}
4022
// repeated .opencv_onnx.NodeProto node = 1;
4023
{
4024
unsigned int count = static_cast<unsigned int>(this->node_size());
4025
total_size += 1UL * count;
4026
for (unsigned int i = 0; i < count; i++) {
4027
total_size +=
4028
::google::protobuf::internal::WireFormatLite::MessageSize(
4029
this->node(static_cast<int>(i)));
4030
}
4031
}
4032
4033
// repeated .opencv_onnx.TensorProto initializer = 5;
4034
{
4035
unsigned int count = static_cast<unsigned int>(this->initializer_size());
4036
total_size += 1UL * count;
4037
for (unsigned int i = 0; i < count; i++) {
4038
total_size +=
4039
::google::protobuf::internal::WireFormatLite::MessageSize(
4040
this->initializer(static_cast<int>(i)));
4041
}
4042
}
4043
4044
// repeated .opencv_onnx.ValueInfoProto input = 11;
4045
{
4046
unsigned int count = static_cast<unsigned int>(this->input_size());
4047
total_size += 1UL * count;
4048
for (unsigned int i = 0; i < count; i++) {
4049
total_size +=
4050
::google::protobuf::internal::WireFormatLite::MessageSize(
4051
this->input(static_cast<int>(i)));
4052
}
4053
}
4054
4055
// repeated .opencv_onnx.ValueInfoProto output = 12;
4056
{
4057
unsigned int count = static_cast<unsigned int>(this->output_size());
4058
total_size += 1UL * count;
4059
for (unsigned int i = 0; i < count; i++) {
4060
total_size +=
4061
::google::protobuf::internal::WireFormatLite::MessageSize(
4062
this->output(static_cast<int>(i)));
4063
}
4064
}
4065
4066
// repeated .opencv_onnx.ValueInfoProto value_info = 13;
4067
{
4068
unsigned int count = static_cast<unsigned int>(this->value_info_size());
4069
total_size += 1UL * count;
4070
for (unsigned int i = 0; i < count; i++) {
4071
total_size +=
4072
::google::protobuf::internal::WireFormatLite::MessageSize(
4073
this->value_info(static_cast<int>(i)));
4074
}
4075
}
4076
4077
if (_has_bits_[0 / 32] & 3u) {
4078
// optional string name = 2;
4079
if (has_name()) {
4080
total_size += 1 +
4081
::google::protobuf::internal::WireFormatLite::StringSize(
4082
this->name());
4083
}
4084
4085
// optional string doc_string = 10;
4086
if (has_doc_string()) {
4087
total_size += 1 +
4088
::google::protobuf::internal::WireFormatLite::StringSize(
4089
this->doc_string());
4090
}
4091
4092
}
4093
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
4094
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
4095
_cached_size_ = cached_size;
4096
GOOGLE_SAFE_CONCURRENT_WRITES_END();
4097
return total_size;
4098
}
4099
4100
void GraphProto::MergeFrom(const ::google::protobuf::Message& from) {
4101
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.GraphProto)
4102
GOOGLE_DCHECK_NE(&from, this);
4103
const GraphProto* source =
4104
::google::protobuf::internal::DynamicCastToGenerated<const GraphProto>(
4105
&from);
4106
if (source == NULL) {
4107
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.GraphProto)
4108
::google::protobuf::internal::ReflectionOps::Merge(from, this);
4109
} else {
4110
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.GraphProto)
4111
MergeFrom(*source);
4112
}
4113
}
4114
4115
void GraphProto::MergeFrom(const GraphProto& from) {
4116
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.GraphProto)
4117
GOOGLE_DCHECK_NE(&from, this);
4118
_internal_metadata_.MergeFrom(from._internal_metadata_);
4119
::google::protobuf::uint32 cached_has_bits = 0;
4120
(void) cached_has_bits;
4121
4122
node_.MergeFrom(from.node_);
4123
initializer_.MergeFrom(from.initializer_);
4124
input_.MergeFrom(from.input_);
4125
output_.MergeFrom(from.output_);
4126
value_info_.MergeFrom(from.value_info_);
4127
cached_has_bits = from._has_bits_[0];
4128
if (cached_has_bits & 3u) {
4129
if (cached_has_bits & 0x00000001u) {
4130
set_has_name();
4131
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
4132
}
4133
if (cached_has_bits & 0x00000002u) {
4134
set_has_doc_string();
4135
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
4136
}
4137
}
4138
}
4139
4140
void GraphProto::CopyFrom(const ::google::protobuf::Message& from) {
4141
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.GraphProto)
4142
if (&from == this) return;
4143
Clear();
4144
MergeFrom(from);
4145
}
4146
4147
void GraphProto::CopyFrom(const GraphProto& from) {
4148
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.GraphProto)
4149
if (&from == this) return;
4150
Clear();
4151
MergeFrom(from);
4152
}
4153
4154
bool GraphProto::IsInitialized() const {
4155
return true;
4156
}
4157
4158
void GraphProto::Swap(GraphProto* other) {
4159
if (other == this) return;
4160
InternalSwap(other);
4161
}
4162
void GraphProto::InternalSwap(GraphProto* other) {
4163
using std::swap;
4164
node_.InternalSwap(&other->node_);
4165
initializer_.InternalSwap(&other->initializer_);
4166
input_.InternalSwap(&other->input_);
4167
output_.InternalSwap(&other->output_);
4168
value_info_.InternalSwap(&other->value_info_);
4169
name_.Swap(&other->name_);
4170
doc_string_.Swap(&other->doc_string_);
4171
swap(_has_bits_[0], other->_has_bits_[0]);
4172
_internal_metadata_.Swap(&other->_internal_metadata_);
4173
swap(_cached_size_, other->_cached_size_);
4174
}
4175
4176
::google::protobuf::Metadata GraphProto::GetMetadata() const {
4177
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
4178
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
4179
}
4180
4181
4182
// ===================================================================
4183
4184
void TensorProto_Segment::InitAsDefaultInstance() {
4185
}
4186
#if !defined(_MSC_VER) || _MSC_VER >= 1900
4187
const int TensorProto_Segment::kBeginFieldNumber;
4188
const int TensorProto_Segment::kEndFieldNumber;
4189
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
4190
4191
TensorProto_Segment::TensorProto_Segment()
4192
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
4193
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
4194
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto_Segment();
4195
}
4196
SharedCtor();
4197
// @@protoc_insertion_point(constructor:opencv_onnx.TensorProto.Segment)
4198
}
4199
TensorProto_Segment::TensorProto_Segment(const TensorProto_Segment& from)
4200
: ::google::protobuf::Message(),
4201
_internal_metadata_(NULL),
4202
_has_bits_(from._has_bits_),
4203
_cached_size_(0) {
4204
_internal_metadata_.MergeFrom(from._internal_metadata_);
4205
::memcpy(&begin_, &from.begin_,
4206
static_cast<size_t>(reinterpret_cast<char*>(&end_) -
4207
reinterpret_cast<char*>(&begin_)) + sizeof(end_));
4208
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto.Segment)
4209
}
4210
4211
void TensorProto_Segment::SharedCtor() {
4212
_cached_size_ = 0;
4213
::memset(&begin_, 0, static_cast<size_t>(
4214
reinterpret_cast<char*>(&end_) -
4215
reinterpret_cast<char*>(&begin_)) + sizeof(end_));
4216
}
4217
4218
TensorProto_Segment::~TensorProto_Segment() {
4219
// @@protoc_insertion_point(destructor:opencv_onnx.TensorProto.Segment)
4220
SharedDtor();
4221
}
4222
4223
void TensorProto_Segment::SharedDtor() {
4224
}
4225
4226
void TensorProto_Segment::SetCachedSize(int size) const {
4227
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
4228
_cached_size_ = size;
4229
GOOGLE_SAFE_CONCURRENT_WRITES_END();
4230
}
4231
const ::google::protobuf::Descriptor* TensorProto_Segment::descriptor() {
4232
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
4233
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
4234
}
4235
4236
const TensorProto_Segment& TensorProto_Segment::default_instance() {
4237
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto_Segment();
4238
return *internal_default_instance();
4239
}
4240
4241
TensorProto_Segment* TensorProto_Segment::New(::google::protobuf::Arena* arena) const {
4242
TensorProto_Segment* n = new TensorProto_Segment;
4243
if (arena != NULL) {
4244
arena->Own(n);
4245
}
4246
return n;
4247
}
4248
4249
void TensorProto_Segment::Clear() {
4250
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto.Segment)
4251
::google::protobuf::uint32 cached_has_bits = 0;
4252
// Prevent compiler warnings about cached_has_bits being unused
4253
(void) cached_has_bits;
4254
4255
cached_has_bits = _has_bits_[0];
4256
if (cached_has_bits & 3u) {
4257
::memset(&begin_, 0, static_cast<size_t>(
4258
reinterpret_cast<char*>(&end_) -
4259
reinterpret_cast<char*>(&begin_)) + sizeof(end_));
4260
}
4261
_has_bits_.Clear();
4262
_internal_metadata_.Clear();
4263
}
4264
4265
bool TensorProto_Segment::MergePartialFromCodedStream(
4266
::google::protobuf::io::CodedInputStream* input) {
4267
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
4268
::google::protobuf::uint32 tag;
4269
// @@protoc_insertion_point(parse_start:opencv_onnx.TensorProto.Segment)
4270
for (;;) {
4271
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
4272
tag = p.first;
4273
if (!p.second) goto handle_unusual;
4274
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
4275
// optional int64 begin = 1;
4276
case 1: {
4277
if (static_cast< ::google::protobuf::uint8>(tag) ==
4278
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
4279
set_has_begin();
4280
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4281
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
4282
input, &begin_)));
4283
} else {
4284
goto handle_unusual;
4285
}
4286
break;
4287
}
4288
4289
// optional int64 end = 2;
4290
case 2: {
4291
if (static_cast< ::google::protobuf::uint8>(tag) ==
4292
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
4293
set_has_end();
4294
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4295
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
4296
input, &end_)));
4297
} else {
4298
goto handle_unusual;
4299
}
4300
break;
4301
}
4302
4303
default: {
4304
handle_unusual:
4305
if (tag == 0) {
4306
goto success;
4307
}
4308
DO_(::google::protobuf::internal::WireFormat::SkipField(
4309
input, tag, _internal_metadata_.mutable_unknown_fields()));
4310
break;
4311
}
4312
}
4313
}
4314
success:
4315
// @@protoc_insertion_point(parse_success:opencv_onnx.TensorProto.Segment)
4316
return true;
4317
failure:
4318
// @@protoc_insertion_point(parse_failure:opencv_onnx.TensorProto.Segment)
4319
return false;
4320
#undef DO_
4321
}
4322
4323
void TensorProto_Segment::SerializeWithCachedSizes(
4324
::google::protobuf::io::CodedOutputStream* output) const {
4325
// @@protoc_insertion_point(serialize_start:opencv_onnx.TensorProto.Segment)
4326
::google::protobuf::uint32 cached_has_bits = 0;
4327
(void) cached_has_bits;
4328
4329
cached_has_bits = _has_bits_[0];
4330
// optional int64 begin = 1;
4331
if (cached_has_bits & 0x00000001u) {
4332
::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->begin(), output);
4333
}
4334
4335
// optional int64 end = 2;
4336
if (cached_has_bits & 0x00000002u) {
4337
::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->end(), output);
4338
}
4339
4340
if (_internal_metadata_.have_unknown_fields()) {
4341
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4342
_internal_metadata_.unknown_fields(), output);
4343
}
4344
// @@protoc_insertion_point(serialize_end:opencv_onnx.TensorProto.Segment)
4345
}
4346
4347
::google::protobuf::uint8* TensorProto_Segment::InternalSerializeWithCachedSizesToArray(
4348
bool deterministic, ::google::protobuf::uint8* target) const {
4349
(void)deterministic; // Unused
4350
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto.Segment)
4351
::google::protobuf::uint32 cached_has_bits = 0;
4352
(void) cached_has_bits;
4353
4354
cached_has_bits = _has_bits_[0];
4355
// optional int64 begin = 1;
4356
if (cached_has_bits & 0x00000001u) {
4357
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->begin(), target);
4358
}
4359
4360
// optional int64 end = 2;
4361
if (cached_has_bits & 0x00000002u) {
4362
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->end(), target);
4363
}
4364
4365
if (_internal_metadata_.have_unknown_fields()) {
4366
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
4367
_internal_metadata_.unknown_fields(), target);
4368
}
4369
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto.Segment)
4370
return target;
4371
}
4372
4373
size_t TensorProto_Segment::ByteSizeLong() const {
4374
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto.Segment)
4375
size_t total_size = 0;
4376
4377
if (_internal_metadata_.have_unknown_fields()) {
4378
total_size +=
4379
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
4380
_internal_metadata_.unknown_fields());
4381
}
4382
if (_has_bits_[0 / 32] & 3u) {
4383
// optional int64 begin = 1;
4384
if (has_begin()) {
4385
total_size += 1 +
4386
::google::protobuf::internal::WireFormatLite::Int64Size(
4387
this->begin());
4388
}
4389
4390
// optional int64 end = 2;
4391
if (has_end()) {
4392
total_size += 1 +
4393
::google::protobuf::internal::WireFormatLite::Int64Size(
4394
this->end());
4395
}
4396
4397
}
4398
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
4399
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
4400
_cached_size_ = cached_size;
4401
GOOGLE_SAFE_CONCURRENT_WRITES_END();
4402
return total_size;
4403
}
4404
4405
void TensorProto_Segment::MergeFrom(const ::google::protobuf::Message& from) {
4406
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorProto.Segment)
4407
GOOGLE_DCHECK_NE(&from, this);
4408
const TensorProto_Segment* source =
4409
::google::protobuf::internal::DynamicCastToGenerated<const TensorProto_Segment>(
4410
&from);
4411
if (source == NULL) {
4412
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorProto.Segment)
4413
::google::protobuf::internal::ReflectionOps::Merge(from, this);
4414
} else {
4415
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorProto.Segment)
4416
MergeFrom(*source);
4417
}
4418
}
4419
4420
void TensorProto_Segment::MergeFrom(const TensorProto_Segment& from) {
4421
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto.Segment)
4422
GOOGLE_DCHECK_NE(&from, this);
4423
_internal_metadata_.MergeFrom(from._internal_metadata_);
4424
::google::protobuf::uint32 cached_has_bits = 0;
4425
(void) cached_has_bits;
4426
4427
cached_has_bits = from._has_bits_[0];
4428
if (cached_has_bits & 3u) {
4429
if (cached_has_bits & 0x00000001u) {
4430
begin_ = from.begin_;
4431
}
4432
if (cached_has_bits & 0x00000002u) {
4433
end_ = from.end_;
4434
}
4435
_has_bits_[0] |= cached_has_bits;
4436
}
4437
}
4438
4439
void TensorProto_Segment::CopyFrom(const ::google::protobuf::Message& from) {
4440
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorProto.Segment)
4441
if (&from == this) return;
4442
Clear();
4443
MergeFrom(from);
4444
}
4445
4446
void TensorProto_Segment::CopyFrom(const TensorProto_Segment& from) {
4447
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorProto.Segment)
4448
if (&from == this) return;
4449
Clear();
4450
MergeFrom(from);
4451
}
4452
4453
bool TensorProto_Segment::IsInitialized() const {
4454
return true;
4455
}
4456
4457
void TensorProto_Segment::Swap(TensorProto_Segment* other) {
4458
if (other == this) return;
4459
InternalSwap(other);
4460
}
4461
void TensorProto_Segment::InternalSwap(TensorProto_Segment* other) {
4462
using std::swap;
4463
swap(begin_, other->begin_);
4464
swap(end_, other->end_);
4465
swap(_has_bits_[0], other->_has_bits_[0]);
4466
_internal_metadata_.Swap(&other->_internal_metadata_);
4467
swap(_cached_size_, other->_cached_size_);
4468
}
4469
4470
::google::protobuf::Metadata TensorProto_Segment::GetMetadata() const {
4471
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
4472
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
4473
}
4474
4475
4476
// ===================================================================
4477
4478
void TensorProto::InitAsDefaultInstance() {
4479
::opencv_onnx::_TensorProto_default_instance_._instance.get_mutable()->segment_ = const_cast< ::opencv_onnx::TensorProto_Segment*>(
4480
::opencv_onnx::TensorProto_Segment::internal_default_instance());
4481
}
4482
#if !defined(_MSC_VER) || _MSC_VER >= 1900
4483
const int TensorProto::kDimsFieldNumber;
4484
const int TensorProto::kDataTypeFieldNumber;
4485
const int TensorProto::kSegmentFieldNumber;
4486
const int TensorProto::kFloatDataFieldNumber;
4487
const int TensorProto::kInt32DataFieldNumber;
4488
const int TensorProto::kStringDataFieldNumber;
4489
const int TensorProto::kInt64DataFieldNumber;
4490
const int TensorProto::kNameFieldNumber;
4491
const int TensorProto::kDocStringFieldNumber;
4492
const int TensorProto::kRawDataFieldNumber;
4493
const int TensorProto::kDoubleDataFieldNumber;
4494
const int TensorProto::kUint64DataFieldNumber;
4495
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
4496
4497
TensorProto::TensorProto()
4498
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
4499
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
4500
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto();
4501
}
4502
SharedCtor();
4503
// @@protoc_insertion_point(constructor:opencv_onnx.TensorProto)
4504
}
4505
TensorProto::TensorProto(const TensorProto& from)
4506
: ::google::protobuf::Message(),
4507
_internal_metadata_(NULL),
4508
_has_bits_(from._has_bits_),
4509
_cached_size_(0),
4510
dims_(from.dims_),
4511
float_data_(from.float_data_),
4512
int32_data_(from.int32_data_),
4513
string_data_(from.string_data_),
4514
int64_data_(from.int64_data_),
4515
double_data_(from.double_data_),
4516
uint64_data_(from.uint64_data_) {
4517
_internal_metadata_.MergeFrom(from._internal_metadata_);
4518
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4519
if (from.has_name()) {
4520
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
4521
}
4522
raw_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4523
if (from.has_raw_data()) {
4524
raw_data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.raw_data_);
4525
}
4526
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4527
if (from.has_doc_string()) {
4528
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
4529
}
4530
if (from.has_segment()) {
4531
segment_ = new ::opencv_onnx::TensorProto_Segment(*from.segment_);
4532
} else {
4533
segment_ = NULL;
4534
}
4535
data_type_ = from.data_type_;
4536
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorProto)
4537
}
4538
4539
void TensorProto::SharedCtor() {
4540
_cached_size_ = 0;
4541
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4542
raw_data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4543
doc_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4544
::memset(&segment_, 0, static_cast<size_t>(
4545
reinterpret_cast<char*>(&data_type_) -
4546
reinterpret_cast<char*>(&segment_)) + sizeof(data_type_));
4547
}
4548
4549
TensorProto::~TensorProto() {
4550
// @@protoc_insertion_point(destructor:opencv_onnx.TensorProto)
4551
SharedDtor();
4552
}
4553
4554
void TensorProto::SharedDtor() {
4555
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4556
raw_data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4557
doc_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
4558
if (this != internal_default_instance()) delete segment_;
4559
}
4560
4561
void TensorProto::SetCachedSize(int size) const {
4562
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
4563
_cached_size_ = size;
4564
GOOGLE_SAFE_CONCURRENT_WRITES_END();
4565
}
4566
const ::google::protobuf::Descriptor* TensorProto::descriptor() {
4567
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
4568
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
4569
}
4570
4571
const TensorProto& TensorProto::default_instance() {
4572
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorProto();
4573
return *internal_default_instance();
4574
}
4575
4576
TensorProto* TensorProto::New(::google::protobuf::Arena* arena) const {
4577
TensorProto* n = new TensorProto;
4578
if (arena != NULL) {
4579
arena->Own(n);
4580
}
4581
return n;
4582
}
4583
4584
void TensorProto::Clear() {
4585
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorProto)
4586
::google::protobuf::uint32 cached_has_bits = 0;
4587
// Prevent compiler warnings about cached_has_bits being unused
4588
(void) cached_has_bits;
4589
4590
dims_.Clear();
4591
float_data_.Clear();
4592
int32_data_.Clear();
4593
string_data_.Clear();
4594
int64_data_.Clear();
4595
double_data_.Clear();
4596
uint64_data_.Clear();
4597
cached_has_bits = _has_bits_[0];
4598
if (cached_has_bits & 15u) {
4599
if (cached_has_bits & 0x00000001u) {
4600
GOOGLE_DCHECK(!name_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
4601
(*name_.UnsafeRawStringPointer())->clear();
4602
}
4603
if (cached_has_bits & 0x00000002u) {
4604
GOOGLE_DCHECK(!raw_data_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
4605
(*raw_data_.UnsafeRawStringPointer())->clear();
4606
}
4607
if (cached_has_bits & 0x00000004u) {
4608
GOOGLE_DCHECK(!doc_string_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
4609
(*doc_string_.UnsafeRawStringPointer())->clear();
4610
}
4611
if (cached_has_bits & 0x00000008u) {
4612
GOOGLE_DCHECK(segment_ != NULL);
4613
segment_->Clear();
4614
}
4615
}
4616
data_type_ = 0;
4617
_has_bits_.Clear();
4618
_internal_metadata_.Clear();
4619
}
4620
4621
bool TensorProto::MergePartialFromCodedStream(
4622
::google::protobuf::io::CodedInputStream* input) {
4623
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
4624
::google::protobuf::uint32 tag;
4625
// @@protoc_insertion_point(parse_start:opencv_onnx.TensorProto)
4626
for (;;) {
4627
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
4628
tag = p.first;
4629
if (!p.second) goto handle_unusual;
4630
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
4631
// repeated int64 dims = 1;
4632
case 1: {
4633
if (static_cast< ::google::protobuf::uint8>(tag) ==
4634
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
4635
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
4636
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
4637
1, 8u, input, this->mutable_dims())));
4638
} else if (
4639
static_cast< ::google::protobuf::uint8>(tag) ==
4640
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
4641
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
4642
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
4643
input, this->mutable_dims())));
4644
} else {
4645
goto handle_unusual;
4646
}
4647
break;
4648
}
4649
4650
// optional .opencv_onnx.TensorProto.DataType data_type = 2;
4651
case 2: {
4652
if (static_cast< ::google::protobuf::uint8>(tag) ==
4653
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
4654
int value;
4655
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
4656
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
4657
input, &value)));
4658
if (::opencv_onnx::TensorProto_DataType_IsValid(value)) {
4659
set_data_type(static_cast< ::opencv_onnx::TensorProto_DataType >(value));
4660
} else {
4661
mutable_unknown_fields()->AddVarint(
4662
2, static_cast< ::google::protobuf::uint64>(value));
4663
}
4664
} else {
4665
goto handle_unusual;
4666
}
4667
break;
4668
}
4669
4670
// optional .opencv_onnx.TensorProto.Segment segment = 3;
4671
case 3: {
4672
if (static_cast< ::google::protobuf::uint8>(tag) ==
4673
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
4674
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
4675
input, mutable_segment()));
4676
} else {
4677
goto handle_unusual;
4678
}
4679
break;
4680
}
4681
4682
// repeated float float_data = 4 [packed = true];
4683
case 4: {
4684
if (static_cast< ::google::protobuf::uint8>(tag) ==
4685
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
4686
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
4687
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
4688
input, this->mutable_float_data())));
4689
} else if (
4690
static_cast< ::google::protobuf::uint8>(tag) ==
4691
static_cast< ::google::protobuf::uint8>(37u /* 37 & 0xFF */)) {
4692
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
4693
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
4694
1, 34u, input, this->mutable_float_data())));
4695
} else {
4696
goto handle_unusual;
4697
}
4698
break;
4699
}
4700
4701
// repeated int32 int32_data = 5 [packed = true];
4702
case 5: {
4703
if (static_cast< ::google::protobuf::uint8>(tag) ==
4704
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
4705
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
4706
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
4707
input, this->mutable_int32_data())));
4708
} else if (
4709
static_cast< ::google::protobuf::uint8>(tag) ==
4710
static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
4711
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
4712
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
4713
1, 42u, input, this->mutable_int32_data())));
4714
} else {
4715
goto handle_unusual;
4716
}
4717
break;
4718
}
4719
4720
// repeated bytes string_data = 6;
4721
case 6: {
4722
if (static_cast< ::google::protobuf::uint8>(tag) ==
4723
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
4724
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
4725
input, this->add_string_data()));
4726
} else {
4727
goto handle_unusual;
4728
}
4729
break;
4730
}
4731
4732
// repeated int64 int64_data = 7 [packed = true];
4733
case 7: {
4734
if (static_cast< ::google::protobuf::uint8>(tag) ==
4735
static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
4736
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
4737
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
4738
input, this->mutable_int64_data())));
4739
} else if (
4740
static_cast< ::google::protobuf::uint8>(tag) ==
4741
static_cast< ::google::protobuf::uint8>(56u /* 56 & 0xFF */)) {
4742
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
4743
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
4744
1, 58u, input, this->mutable_int64_data())));
4745
} else {
4746
goto handle_unusual;
4747
}
4748
break;
4749
}
4750
4751
// optional string name = 8;
4752
case 8: {
4753
if (static_cast< ::google::protobuf::uint8>(tag) ==
4754
static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
4755
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4756
input, this->mutable_name()));
4757
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
4758
this->name().data(), static_cast<int>(this->name().length()),
4759
::google::protobuf::internal::WireFormat::PARSE,
4760
"opencv_onnx.TensorProto.name");
4761
} else {
4762
goto handle_unusual;
4763
}
4764
break;
4765
}
4766
4767
// optional bytes raw_data = 9;
4768
case 9: {
4769
if (static_cast< ::google::protobuf::uint8>(tag) ==
4770
static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
4771
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
4772
input, this->mutable_raw_data()));
4773
} else {
4774
goto handle_unusual;
4775
}
4776
break;
4777
}
4778
4779
// repeated double double_data = 10 [packed = true];
4780
case 10: {
4781
if (static_cast< ::google::protobuf::uint8>(tag) ==
4782
static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
4783
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
4784
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
4785
input, this->mutable_double_data())));
4786
} else if (
4787
static_cast< ::google::protobuf::uint8>(tag) ==
4788
static_cast< ::google::protobuf::uint8>(81u /* 81 & 0xFF */)) {
4789
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
4790
double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
4791
1, 82u, input, this->mutable_double_data())));
4792
} else {
4793
goto handle_unusual;
4794
}
4795
break;
4796
}
4797
4798
// repeated uint64 uint64_data = 11 [packed = true];
4799
case 11: {
4800
if (static_cast< ::google::protobuf::uint8>(tag) ==
4801
static_cast< ::google::protobuf::uint8>(90u /* 90 & 0xFF */)) {
4802
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
4803
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
4804
input, this->mutable_uint64_data())));
4805
} else if (
4806
static_cast< ::google::protobuf::uint8>(tag) ==
4807
static_cast< ::google::protobuf::uint8>(88u /* 88 & 0xFF */)) {
4808
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
4809
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
4810
1, 90u, input, this->mutable_uint64_data())));
4811
} else {
4812
goto handle_unusual;
4813
}
4814
break;
4815
}
4816
4817
// optional string doc_string = 12;
4818
case 12: {
4819
if (static_cast< ::google::protobuf::uint8>(tag) ==
4820
static_cast< ::google::protobuf::uint8>(98u /* 98 & 0xFF */)) {
4821
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
4822
input, this->mutable_doc_string()));
4823
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
4824
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
4825
::google::protobuf::internal::WireFormat::PARSE,
4826
"opencv_onnx.TensorProto.doc_string");
4827
} else {
4828
goto handle_unusual;
4829
}
4830
break;
4831
}
4832
4833
default: {
4834
handle_unusual:
4835
if (tag == 0) {
4836
goto success;
4837
}
4838
DO_(::google::protobuf::internal::WireFormat::SkipField(
4839
input, tag, _internal_metadata_.mutable_unknown_fields()));
4840
break;
4841
}
4842
}
4843
}
4844
success:
4845
// @@protoc_insertion_point(parse_success:opencv_onnx.TensorProto)
4846
return true;
4847
failure:
4848
// @@protoc_insertion_point(parse_failure:opencv_onnx.TensorProto)
4849
return false;
4850
#undef DO_
4851
}
4852
4853
void TensorProto::SerializeWithCachedSizes(
4854
::google::protobuf::io::CodedOutputStream* output) const {
4855
// @@protoc_insertion_point(serialize_start:opencv_onnx.TensorProto)
4856
::google::protobuf::uint32 cached_has_bits = 0;
4857
(void) cached_has_bits;
4858
4859
// repeated int64 dims = 1;
4860
for (int i = 0, n = this->dims_size(); i < n; i++) {
4861
::google::protobuf::internal::WireFormatLite::WriteInt64(
4862
1, this->dims(i), output);
4863
}
4864
4865
cached_has_bits = _has_bits_[0];
4866
// optional .opencv_onnx.TensorProto.DataType data_type = 2;
4867
if (cached_has_bits & 0x00000010u) {
4868
::google::protobuf::internal::WireFormatLite::WriteEnum(
4869
2, this->data_type(), output);
4870
}
4871
4872
// optional .opencv_onnx.TensorProto.Segment segment = 3;
4873
if (cached_has_bits & 0x00000008u) {
4874
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
4875
3, *this->segment_, output);
4876
}
4877
4878
// repeated float float_data = 4 [packed = true];
4879
if (this->float_data_size() > 0) {
4880
::google::protobuf::internal::WireFormatLite::WriteTag(4, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
4881
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
4882
_float_data_cached_byte_size_));
4883
::google::protobuf::internal::WireFormatLite::WriteFloatArray(
4884
this->float_data().data(), this->float_data_size(), output);
4885
}
4886
4887
// repeated int32 int32_data = 5 [packed = true];
4888
if (this->int32_data_size() > 0) {
4889
::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
4890
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
4891
_int32_data_cached_byte_size_));
4892
}
4893
for (int i = 0, n = this->int32_data_size(); i < n; i++) {
4894
::google::protobuf::internal::WireFormatLite::WriteInt32NoTag(
4895
this->int32_data(i), output);
4896
}
4897
4898
// repeated bytes string_data = 6;
4899
for (int i = 0, n = this->string_data_size(); i < n; i++) {
4900
::google::protobuf::internal::WireFormatLite::WriteBytes(
4901
6, this->string_data(i), output);
4902
}
4903
4904
// repeated int64 int64_data = 7 [packed = true];
4905
if (this->int64_data_size() > 0) {
4906
::google::protobuf::internal::WireFormatLite::WriteTag(7, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
4907
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
4908
_int64_data_cached_byte_size_));
4909
}
4910
for (int i = 0, n = this->int64_data_size(); i < n; i++) {
4911
::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
4912
this->int64_data(i), output);
4913
}
4914
4915
// optional string name = 8;
4916
if (cached_has_bits & 0x00000001u) {
4917
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
4918
this->name().data(), static_cast<int>(this->name().length()),
4919
::google::protobuf::internal::WireFormat::SERIALIZE,
4920
"opencv_onnx.TensorProto.name");
4921
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
4922
8, this->name(), output);
4923
}
4924
4925
// optional bytes raw_data = 9;
4926
if (cached_has_bits & 0x00000002u) {
4927
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
4928
9, this->raw_data(), output);
4929
}
4930
4931
// repeated double double_data = 10 [packed = true];
4932
if (this->double_data_size() > 0) {
4933
::google::protobuf::internal::WireFormatLite::WriteTag(10, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
4934
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
4935
_double_data_cached_byte_size_));
4936
::google::protobuf::internal::WireFormatLite::WriteDoubleArray(
4937
this->double_data().data(), this->double_data_size(), output);
4938
}
4939
4940
// repeated uint64 uint64_data = 11 [packed = true];
4941
if (this->uint64_data_size() > 0) {
4942
::google::protobuf::internal::WireFormatLite::WriteTag(11, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
4943
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
4944
_uint64_data_cached_byte_size_));
4945
}
4946
for (int i = 0, n = this->uint64_data_size(); i < n; i++) {
4947
::google::protobuf::internal::WireFormatLite::WriteUInt64NoTag(
4948
this->uint64_data(i), output);
4949
}
4950
4951
// optional string doc_string = 12;
4952
if (cached_has_bits & 0x00000004u) {
4953
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
4954
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
4955
::google::protobuf::internal::WireFormat::SERIALIZE,
4956
"opencv_onnx.TensorProto.doc_string");
4957
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
4958
12, this->doc_string(), output);
4959
}
4960
4961
if (_internal_metadata_.have_unknown_fields()) {
4962
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
4963
_internal_metadata_.unknown_fields(), output);
4964
}
4965
// @@protoc_insertion_point(serialize_end:opencv_onnx.TensorProto)
4966
}
4967
4968
::google::protobuf::uint8* TensorProto::InternalSerializeWithCachedSizesToArray(
4969
bool deterministic, ::google::protobuf::uint8* target) const {
4970
(void)deterministic; // Unused
4971
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorProto)
4972
::google::protobuf::uint32 cached_has_bits = 0;
4973
(void) cached_has_bits;
4974
4975
// repeated int64 dims = 1;
4976
target = ::google::protobuf::internal::WireFormatLite::
4977
WriteInt64ToArray(1, this->dims_, target);
4978
4979
cached_has_bits = _has_bits_[0];
4980
// optional .opencv_onnx.TensorProto.DataType data_type = 2;
4981
if (cached_has_bits & 0x00000010u) {
4982
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
4983
2, this->data_type(), target);
4984
}
4985
4986
// optional .opencv_onnx.TensorProto.Segment segment = 3;
4987
if (cached_has_bits & 0x00000008u) {
4988
target = ::google::protobuf::internal::WireFormatLite::
4989
InternalWriteMessageToArray(
4990
3, *this->segment_, deterministic, target);
4991
}
4992
4993
// repeated float float_data = 4 [packed = true];
4994
if (this->float_data_size() > 0) {
4995
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
4996
4,
4997
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
4998
target);
4999
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
5000
static_cast< ::google::protobuf::int32>(
5001
_float_data_cached_byte_size_), target);
5002
target = ::google::protobuf::internal::WireFormatLite::
5003
WriteFloatNoTagToArray(this->float_data_, target);
5004
}
5005
5006
// repeated int32 int32_data = 5 [packed = true];
5007
if (this->int32_data_size() > 0) {
5008
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
5009
5,
5010
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
5011
target);
5012
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
5013
static_cast< ::google::protobuf::int32>(
5014
_int32_data_cached_byte_size_), target);
5015
target = ::google::protobuf::internal::WireFormatLite::
5016
WriteInt32NoTagToArray(this->int32_data_, target);
5017
}
5018
5019
// repeated bytes string_data = 6;
5020
for (int i = 0, n = this->string_data_size(); i < n; i++) {
5021
target = ::google::protobuf::internal::WireFormatLite::
5022
WriteBytesToArray(6, this->string_data(i), target);
5023
}
5024
5025
// repeated int64 int64_data = 7 [packed = true];
5026
if (this->int64_data_size() > 0) {
5027
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
5028
7,
5029
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
5030
target);
5031
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
5032
static_cast< ::google::protobuf::int32>(
5033
_int64_data_cached_byte_size_), target);
5034
target = ::google::protobuf::internal::WireFormatLite::
5035
WriteInt64NoTagToArray(this->int64_data_, target);
5036
}
5037
5038
// optional string name = 8;
5039
if (cached_has_bits & 0x00000001u) {
5040
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5041
this->name().data(), static_cast<int>(this->name().length()),
5042
::google::protobuf::internal::WireFormat::SERIALIZE,
5043
"opencv_onnx.TensorProto.name");
5044
target =
5045
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5046
8, this->name(), target);
5047
}
5048
5049
// optional bytes raw_data = 9;
5050
if (cached_has_bits & 0x00000002u) {
5051
target =
5052
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
5053
9, this->raw_data(), target);
5054
}
5055
5056
// repeated double double_data = 10 [packed = true];
5057
if (this->double_data_size() > 0) {
5058
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
5059
10,
5060
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
5061
target);
5062
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
5063
static_cast< ::google::protobuf::int32>(
5064
_double_data_cached_byte_size_), target);
5065
target = ::google::protobuf::internal::WireFormatLite::
5066
WriteDoubleNoTagToArray(this->double_data_, target);
5067
}
5068
5069
// repeated uint64 uint64_data = 11 [packed = true];
5070
if (this->uint64_data_size() > 0) {
5071
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
5072
11,
5073
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
5074
target);
5075
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
5076
static_cast< ::google::protobuf::int32>(
5077
_uint64_data_cached_byte_size_), target);
5078
target = ::google::protobuf::internal::WireFormatLite::
5079
WriteUInt64NoTagToArray(this->uint64_data_, target);
5080
}
5081
5082
// optional string doc_string = 12;
5083
if (cached_has_bits & 0x00000004u) {
5084
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5085
this->doc_string().data(), static_cast<int>(this->doc_string().length()),
5086
::google::protobuf::internal::WireFormat::SERIALIZE,
5087
"opencv_onnx.TensorProto.doc_string");
5088
target =
5089
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5090
12, this->doc_string(), target);
5091
}
5092
5093
if (_internal_metadata_.have_unknown_fields()) {
5094
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5095
_internal_metadata_.unknown_fields(), target);
5096
}
5097
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorProto)
5098
return target;
5099
}
5100
5101
size_t TensorProto::ByteSizeLong() const {
5102
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorProto)
5103
size_t total_size = 0;
5104
5105
if (_internal_metadata_.have_unknown_fields()) {
5106
total_size +=
5107
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5108
_internal_metadata_.unknown_fields());
5109
}
5110
// repeated int64 dims = 1;
5111
{
5112
size_t data_size = ::google::protobuf::internal::WireFormatLite::
5113
Int64Size(this->dims_);
5114
total_size += 1 *
5115
::google::protobuf::internal::FromIntSize(this->dims_size());
5116
total_size += data_size;
5117
}
5118
5119
// repeated float float_data = 4 [packed = true];
5120
{
5121
unsigned int count = static_cast<unsigned int>(this->float_data_size());
5122
size_t data_size = 4UL * count;
5123
if (data_size > 0) {
5124
total_size += 1 +
5125
::google::protobuf::internal::WireFormatLite::Int32Size(
5126
static_cast< ::google::protobuf::int32>(data_size));
5127
}
5128
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
5129
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5130
_float_data_cached_byte_size_ = cached_size;
5131
GOOGLE_SAFE_CONCURRENT_WRITES_END();
5132
total_size += data_size;
5133
}
5134
5135
// repeated int32 int32_data = 5 [packed = true];
5136
{
5137
size_t data_size = ::google::protobuf::internal::WireFormatLite::
5138
Int32Size(this->int32_data_);
5139
if (data_size > 0) {
5140
total_size += 1 +
5141
::google::protobuf::internal::WireFormatLite::Int32Size(
5142
static_cast< ::google::protobuf::int32>(data_size));
5143
}
5144
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
5145
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5146
_int32_data_cached_byte_size_ = cached_size;
5147
GOOGLE_SAFE_CONCURRENT_WRITES_END();
5148
total_size += data_size;
5149
}
5150
5151
// repeated bytes string_data = 6;
5152
total_size += 1 *
5153
::google::protobuf::internal::FromIntSize(this->string_data_size());
5154
for (int i = 0, n = this->string_data_size(); i < n; i++) {
5155
total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
5156
this->string_data(i));
5157
}
5158
5159
// repeated int64 int64_data = 7 [packed = true];
5160
{
5161
size_t data_size = ::google::protobuf::internal::WireFormatLite::
5162
Int64Size(this->int64_data_);
5163
if (data_size > 0) {
5164
total_size += 1 +
5165
::google::protobuf::internal::WireFormatLite::Int32Size(
5166
static_cast< ::google::protobuf::int32>(data_size));
5167
}
5168
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
5169
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5170
_int64_data_cached_byte_size_ = cached_size;
5171
GOOGLE_SAFE_CONCURRENT_WRITES_END();
5172
total_size += data_size;
5173
}
5174
5175
// repeated double double_data = 10 [packed = true];
5176
{
5177
unsigned int count = static_cast<unsigned int>(this->double_data_size());
5178
size_t data_size = 8UL * count;
5179
if (data_size > 0) {
5180
total_size += 1 +
5181
::google::protobuf::internal::WireFormatLite::Int32Size(
5182
static_cast< ::google::protobuf::int32>(data_size));
5183
}
5184
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
5185
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5186
_double_data_cached_byte_size_ = cached_size;
5187
GOOGLE_SAFE_CONCURRENT_WRITES_END();
5188
total_size += data_size;
5189
}
5190
5191
// repeated uint64 uint64_data = 11 [packed = true];
5192
{
5193
size_t data_size = ::google::protobuf::internal::WireFormatLite::
5194
UInt64Size(this->uint64_data_);
5195
if (data_size > 0) {
5196
total_size += 1 +
5197
::google::protobuf::internal::WireFormatLite::Int32Size(
5198
static_cast< ::google::protobuf::int32>(data_size));
5199
}
5200
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
5201
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5202
_uint64_data_cached_byte_size_ = cached_size;
5203
GOOGLE_SAFE_CONCURRENT_WRITES_END();
5204
total_size += data_size;
5205
}
5206
5207
if (_has_bits_[0 / 32] & 31u) {
5208
// optional string name = 8;
5209
if (has_name()) {
5210
total_size += 1 +
5211
::google::protobuf::internal::WireFormatLite::StringSize(
5212
this->name());
5213
}
5214
5215
// optional bytes raw_data = 9;
5216
if (has_raw_data()) {
5217
total_size += 1 +
5218
::google::protobuf::internal::WireFormatLite::BytesSize(
5219
this->raw_data());
5220
}
5221
5222
// optional string doc_string = 12;
5223
if (has_doc_string()) {
5224
total_size += 1 +
5225
::google::protobuf::internal::WireFormatLite::StringSize(
5226
this->doc_string());
5227
}
5228
5229
// optional .opencv_onnx.TensorProto.Segment segment = 3;
5230
if (has_segment()) {
5231
total_size += 1 +
5232
::google::protobuf::internal::WireFormatLite::MessageSize(
5233
*this->segment_);
5234
}
5235
5236
// optional .opencv_onnx.TensorProto.DataType data_type = 2;
5237
if (has_data_type()) {
5238
total_size += 1 +
5239
::google::protobuf::internal::WireFormatLite::EnumSize(this->data_type());
5240
}
5241
5242
}
5243
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
5244
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5245
_cached_size_ = cached_size;
5246
GOOGLE_SAFE_CONCURRENT_WRITES_END();
5247
return total_size;
5248
}
5249
5250
void TensorProto::MergeFrom(const ::google::protobuf::Message& from) {
5251
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorProto)
5252
GOOGLE_DCHECK_NE(&from, this);
5253
const TensorProto* source =
5254
::google::protobuf::internal::DynamicCastToGenerated<const TensorProto>(
5255
&from);
5256
if (source == NULL) {
5257
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorProto)
5258
::google::protobuf::internal::ReflectionOps::Merge(from, this);
5259
} else {
5260
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorProto)
5261
MergeFrom(*source);
5262
}
5263
}
5264
5265
void TensorProto::MergeFrom(const TensorProto& from) {
5266
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorProto)
5267
GOOGLE_DCHECK_NE(&from, this);
5268
_internal_metadata_.MergeFrom(from._internal_metadata_);
5269
::google::protobuf::uint32 cached_has_bits = 0;
5270
(void) cached_has_bits;
5271
5272
dims_.MergeFrom(from.dims_);
5273
float_data_.MergeFrom(from.float_data_);
5274
int32_data_.MergeFrom(from.int32_data_);
5275
string_data_.MergeFrom(from.string_data_);
5276
int64_data_.MergeFrom(from.int64_data_);
5277
double_data_.MergeFrom(from.double_data_);
5278
uint64_data_.MergeFrom(from.uint64_data_);
5279
cached_has_bits = from._has_bits_[0];
5280
if (cached_has_bits & 31u) {
5281
if (cached_has_bits & 0x00000001u) {
5282
set_has_name();
5283
name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
5284
}
5285
if (cached_has_bits & 0x00000002u) {
5286
set_has_raw_data();
5287
raw_data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.raw_data_);
5288
}
5289
if (cached_has_bits & 0x00000004u) {
5290
set_has_doc_string();
5291
doc_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.doc_string_);
5292
}
5293
if (cached_has_bits & 0x00000008u) {
5294
mutable_segment()->::opencv_onnx::TensorProto_Segment::MergeFrom(from.segment());
5295
}
5296
if (cached_has_bits & 0x00000010u) {
5297
data_type_ = from.data_type_;
5298
}
5299
_has_bits_[0] |= cached_has_bits;
5300
}
5301
}
5302
5303
void TensorProto::CopyFrom(const ::google::protobuf::Message& from) {
5304
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorProto)
5305
if (&from == this) return;
5306
Clear();
5307
MergeFrom(from);
5308
}
5309
5310
void TensorProto::CopyFrom(const TensorProto& from) {
5311
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorProto)
5312
if (&from == this) return;
5313
Clear();
5314
MergeFrom(from);
5315
}
5316
5317
bool TensorProto::IsInitialized() const {
5318
return true;
5319
}
5320
5321
void TensorProto::Swap(TensorProto* other) {
5322
if (other == this) return;
5323
InternalSwap(other);
5324
}
5325
void TensorProto::InternalSwap(TensorProto* other) {
5326
using std::swap;
5327
dims_.InternalSwap(&other->dims_);
5328
float_data_.InternalSwap(&other->float_data_);
5329
int32_data_.InternalSwap(&other->int32_data_);
5330
string_data_.InternalSwap(&other->string_data_);
5331
int64_data_.InternalSwap(&other->int64_data_);
5332
double_data_.InternalSwap(&other->double_data_);
5333
uint64_data_.InternalSwap(&other->uint64_data_);
5334
name_.Swap(&other->name_);
5335
raw_data_.Swap(&other->raw_data_);
5336
doc_string_.Swap(&other->doc_string_);
5337
swap(segment_, other->segment_);
5338
swap(data_type_, other->data_type_);
5339
swap(_has_bits_[0], other->_has_bits_[0]);
5340
_internal_metadata_.Swap(&other->_internal_metadata_);
5341
swap(_cached_size_, other->_cached_size_);
5342
}
5343
5344
::google::protobuf::Metadata TensorProto::GetMetadata() const {
5345
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
5346
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
5347
}
5348
5349
5350
// ===================================================================
5351
5352
void TensorShapeProto_Dimension::InitAsDefaultInstance() {
5353
::opencv_onnx::_TensorShapeProto_Dimension_default_instance_.dim_value_ = GOOGLE_LONGLONG(0);
5354
::opencv_onnx::_TensorShapeProto_Dimension_default_instance_.dim_param_.UnsafeSetDefault(
5355
&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5356
}
5357
#if !defined(_MSC_VER) || _MSC_VER >= 1900
5358
const int TensorShapeProto_Dimension::kDimValueFieldNumber;
5359
const int TensorShapeProto_Dimension::kDimParamFieldNumber;
5360
const int TensorShapeProto_Dimension::kDenotationFieldNumber;
5361
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
5362
5363
TensorShapeProto_Dimension::TensorShapeProto_Dimension()
5364
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
5365
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
5366
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto_Dimension();
5367
}
5368
SharedCtor();
5369
// @@protoc_insertion_point(constructor:opencv_onnx.TensorShapeProto.Dimension)
5370
}
5371
TensorShapeProto_Dimension::TensorShapeProto_Dimension(const TensorShapeProto_Dimension& from)
5372
: ::google::protobuf::Message(),
5373
_internal_metadata_(NULL),
5374
_has_bits_(from._has_bits_),
5375
_cached_size_(0) {
5376
_internal_metadata_.MergeFrom(from._internal_metadata_);
5377
denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5378
if (from.has_denotation()) {
5379
denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
5380
}
5381
clear_has_value();
5382
switch (from.value_case()) {
5383
case kDimValue: {
5384
set_dim_value(from.dim_value());
5385
break;
5386
}
5387
case kDimParam: {
5388
set_dim_param(from.dim_param());
5389
break;
5390
}
5391
case VALUE_NOT_SET: {
5392
break;
5393
}
5394
}
5395
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto.Dimension)
5396
}
5397
5398
void TensorShapeProto_Dimension::SharedCtor() {
5399
_cached_size_ = 0;
5400
denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5401
clear_has_value();
5402
}
5403
5404
TensorShapeProto_Dimension::~TensorShapeProto_Dimension() {
5405
// @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto.Dimension)
5406
SharedDtor();
5407
}
5408
5409
void TensorShapeProto_Dimension::SharedDtor() {
5410
denotation_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5411
if (has_value()) {
5412
clear_value();
5413
}
5414
}
5415
5416
void TensorShapeProto_Dimension::SetCachedSize(int size) const {
5417
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5418
_cached_size_ = size;
5419
GOOGLE_SAFE_CONCURRENT_WRITES_END();
5420
}
5421
const ::google::protobuf::Descriptor* TensorShapeProto_Dimension::descriptor() {
5422
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
5423
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
5424
}
5425
5426
const TensorShapeProto_Dimension& TensorShapeProto_Dimension::default_instance() {
5427
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto_Dimension();
5428
return *internal_default_instance();
5429
}
5430
5431
TensorShapeProto_Dimension* TensorShapeProto_Dimension::New(::google::protobuf::Arena* arena) const {
5432
TensorShapeProto_Dimension* n = new TensorShapeProto_Dimension;
5433
if (arena != NULL) {
5434
arena->Own(n);
5435
}
5436
return n;
5437
}
5438
5439
void TensorShapeProto_Dimension::clear_value() {
5440
// @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TensorShapeProto.Dimension)
5441
switch (value_case()) {
5442
case kDimValue: {
5443
// No need to clear
5444
break;
5445
}
5446
case kDimParam: {
5447
value_.dim_param_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
5448
break;
5449
}
5450
case VALUE_NOT_SET: {
5451
break;
5452
}
5453
}
5454
_oneof_case_[0] = VALUE_NOT_SET;
5455
}
5456
5457
5458
void TensorShapeProto_Dimension::Clear() {
5459
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto.Dimension)
5460
::google::protobuf::uint32 cached_has_bits = 0;
5461
// Prevent compiler warnings about cached_has_bits being unused
5462
(void) cached_has_bits;
5463
5464
cached_has_bits = _has_bits_[0];
5465
if (cached_has_bits & 0x00000001u) {
5466
GOOGLE_DCHECK(!denotation_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
5467
(*denotation_.UnsafeRawStringPointer())->clear();
5468
}
5469
clear_value();
5470
_has_bits_.Clear();
5471
_internal_metadata_.Clear();
5472
}
5473
5474
bool TensorShapeProto_Dimension::MergePartialFromCodedStream(
5475
::google::protobuf::io::CodedInputStream* input) {
5476
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
5477
::google::protobuf::uint32 tag;
5478
// @@protoc_insertion_point(parse_start:opencv_onnx.TensorShapeProto.Dimension)
5479
for (;;) {
5480
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
5481
tag = p.first;
5482
if (!p.second) goto handle_unusual;
5483
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
5484
// optional int64 dim_value = 1;
5485
case 1: {
5486
if (static_cast< ::google::protobuf::uint8>(tag) ==
5487
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
5488
clear_value();
5489
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
5490
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
5491
input, &value_.dim_value_)));
5492
set_has_dim_value();
5493
} else {
5494
goto handle_unusual;
5495
}
5496
break;
5497
}
5498
5499
// optional string dim_param = 2;
5500
case 2: {
5501
if (static_cast< ::google::protobuf::uint8>(tag) ==
5502
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
5503
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
5504
input, this->mutable_dim_param()));
5505
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5506
this->dim_param().data(), static_cast<int>(this->dim_param().length()),
5507
::google::protobuf::internal::WireFormat::PARSE,
5508
"opencv_onnx.TensorShapeProto.Dimension.dim_param");
5509
} else {
5510
goto handle_unusual;
5511
}
5512
break;
5513
}
5514
5515
// optional string denotation = 3;
5516
case 3: {
5517
if (static_cast< ::google::protobuf::uint8>(tag) ==
5518
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
5519
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
5520
input, this->mutable_denotation()));
5521
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5522
this->denotation().data(), static_cast<int>(this->denotation().length()),
5523
::google::protobuf::internal::WireFormat::PARSE,
5524
"opencv_onnx.TensorShapeProto.Dimension.denotation");
5525
} else {
5526
goto handle_unusual;
5527
}
5528
break;
5529
}
5530
5531
default: {
5532
handle_unusual:
5533
if (tag == 0) {
5534
goto success;
5535
}
5536
DO_(::google::protobuf::internal::WireFormat::SkipField(
5537
input, tag, _internal_metadata_.mutable_unknown_fields()));
5538
break;
5539
}
5540
}
5541
}
5542
success:
5543
// @@protoc_insertion_point(parse_success:opencv_onnx.TensorShapeProto.Dimension)
5544
return true;
5545
failure:
5546
// @@protoc_insertion_point(parse_failure:opencv_onnx.TensorShapeProto.Dimension)
5547
return false;
5548
#undef DO_
5549
}
5550
5551
void TensorShapeProto_Dimension::SerializeWithCachedSizes(
5552
::google::protobuf::io::CodedOutputStream* output) const {
5553
// @@protoc_insertion_point(serialize_start:opencv_onnx.TensorShapeProto.Dimension)
5554
::google::protobuf::uint32 cached_has_bits = 0;
5555
(void) cached_has_bits;
5556
5557
switch (value_case()) {
5558
case kDimValue:
5559
::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->dim_value(), output);
5560
break;
5561
case kDimParam:
5562
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5563
this->dim_param().data(), static_cast<int>(this->dim_param().length()),
5564
::google::protobuf::internal::WireFormat::SERIALIZE,
5565
"opencv_onnx.TensorShapeProto.Dimension.dim_param");
5566
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
5567
2, this->dim_param(), output);
5568
break;
5569
default: ;
5570
}
5571
cached_has_bits = _has_bits_[0];
5572
// optional string denotation = 3;
5573
if (cached_has_bits & 0x00000001u) {
5574
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5575
this->denotation().data(), static_cast<int>(this->denotation().length()),
5576
::google::protobuf::internal::WireFormat::SERIALIZE,
5577
"opencv_onnx.TensorShapeProto.Dimension.denotation");
5578
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
5579
3, this->denotation(), output);
5580
}
5581
5582
if (_internal_metadata_.have_unknown_fields()) {
5583
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5584
_internal_metadata_.unknown_fields(), output);
5585
}
5586
// @@protoc_insertion_point(serialize_end:opencv_onnx.TensorShapeProto.Dimension)
5587
}
5588
5589
::google::protobuf::uint8* TensorShapeProto_Dimension::InternalSerializeWithCachedSizesToArray(
5590
bool deterministic, ::google::protobuf::uint8* target) const {
5591
(void)deterministic; // Unused
5592
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto.Dimension)
5593
::google::protobuf::uint32 cached_has_bits = 0;
5594
(void) cached_has_bits;
5595
5596
switch (value_case()) {
5597
case kDimValue:
5598
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->dim_value(), target);
5599
break;
5600
case kDimParam:
5601
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5602
this->dim_param().data(), static_cast<int>(this->dim_param().length()),
5603
::google::protobuf::internal::WireFormat::SERIALIZE,
5604
"opencv_onnx.TensorShapeProto.Dimension.dim_param");
5605
target =
5606
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5607
2, this->dim_param(), target);
5608
break;
5609
default: ;
5610
}
5611
cached_has_bits = _has_bits_[0];
5612
// optional string denotation = 3;
5613
if (cached_has_bits & 0x00000001u) {
5614
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
5615
this->denotation().data(), static_cast<int>(this->denotation().length()),
5616
::google::protobuf::internal::WireFormat::SERIALIZE,
5617
"opencv_onnx.TensorShapeProto.Dimension.denotation");
5618
target =
5619
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
5620
3, this->denotation(), target);
5621
}
5622
5623
if (_internal_metadata_.have_unknown_fields()) {
5624
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5625
_internal_metadata_.unknown_fields(), target);
5626
}
5627
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto.Dimension)
5628
return target;
5629
}
5630
5631
size_t TensorShapeProto_Dimension::ByteSizeLong() const {
5632
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorShapeProto.Dimension)
5633
size_t total_size = 0;
5634
5635
if (_internal_metadata_.have_unknown_fields()) {
5636
total_size +=
5637
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5638
_internal_metadata_.unknown_fields());
5639
}
5640
// optional string denotation = 3;
5641
if (has_denotation()) {
5642
total_size += 1 +
5643
::google::protobuf::internal::WireFormatLite::StringSize(
5644
this->denotation());
5645
}
5646
5647
switch (value_case()) {
5648
// optional int64 dim_value = 1;
5649
case kDimValue: {
5650
total_size += 1 +
5651
::google::protobuf::internal::WireFormatLite::Int64Size(
5652
this->dim_value());
5653
break;
5654
}
5655
// optional string dim_param = 2;
5656
case kDimParam: {
5657
total_size += 1 +
5658
::google::protobuf::internal::WireFormatLite::StringSize(
5659
this->dim_param());
5660
break;
5661
}
5662
case VALUE_NOT_SET: {
5663
break;
5664
}
5665
}
5666
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
5667
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5668
_cached_size_ = cached_size;
5669
GOOGLE_SAFE_CONCURRENT_WRITES_END();
5670
return total_size;
5671
}
5672
5673
void TensorShapeProto_Dimension::MergeFrom(const ::google::protobuf::Message& from) {
5674
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorShapeProto.Dimension)
5675
GOOGLE_DCHECK_NE(&from, this);
5676
const TensorShapeProto_Dimension* source =
5677
::google::protobuf::internal::DynamicCastToGenerated<const TensorShapeProto_Dimension>(
5678
&from);
5679
if (source == NULL) {
5680
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorShapeProto.Dimension)
5681
::google::protobuf::internal::ReflectionOps::Merge(from, this);
5682
} else {
5683
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorShapeProto.Dimension)
5684
MergeFrom(*source);
5685
}
5686
}
5687
5688
void TensorShapeProto_Dimension::MergeFrom(const TensorShapeProto_Dimension& from) {
5689
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto.Dimension)
5690
GOOGLE_DCHECK_NE(&from, this);
5691
_internal_metadata_.MergeFrom(from._internal_metadata_);
5692
::google::protobuf::uint32 cached_has_bits = 0;
5693
(void) cached_has_bits;
5694
5695
if (from.has_denotation()) {
5696
set_has_denotation();
5697
denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
5698
}
5699
switch (from.value_case()) {
5700
case kDimValue: {
5701
set_dim_value(from.dim_value());
5702
break;
5703
}
5704
case kDimParam: {
5705
set_dim_param(from.dim_param());
5706
break;
5707
}
5708
case VALUE_NOT_SET: {
5709
break;
5710
}
5711
}
5712
}
5713
5714
void TensorShapeProto_Dimension::CopyFrom(const ::google::protobuf::Message& from) {
5715
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorShapeProto.Dimension)
5716
if (&from == this) return;
5717
Clear();
5718
MergeFrom(from);
5719
}
5720
5721
void TensorShapeProto_Dimension::CopyFrom(const TensorShapeProto_Dimension& from) {
5722
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorShapeProto.Dimension)
5723
if (&from == this) return;
5724
Clear();
5725
MergeFrom(from);
5726
}
5727
5728
bool TensorShapeProto_Dimension::IsInitialized() const {
5729
return true;
5730
}
5731
5732
void TensorShapeProto_Dimension::Swap(TensorShapeProto_Dimension* other) {
5733
if (other == this) return;
5734
InternalSwap(other);
5735
}
5736
void TensorShapeProto_Dimension::InternalSwap(TensorShapeProto_Dimension* other) {
5737
using std::swap;
5738
denotation_.Swap(&other->denotation_);
5739
swap(value_, other->value_);
5740
swap(_oneof_case_[0], other->_oneof_case_[0]);
5741
swap(_has_bits_[0], other->_has_bits_[0]);
5742
_internal_metadata_.Swap(&other->_internal_metadata_);
5743
swap(_cached_size_, other->_cached_size_);
5744
}
5745
5746
::google::protobuf::Metadata TensorShapeProto_Dimension::GetMetadata() const {
5747
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
5748
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
5749
}
5750
5751
5752
// ===================================================================
5753
5754
void TensorShapeProto::InitAsDefaultInstance() {
5755
}
5756
#if !defined(_MSC_VER) || _MSC_VER >= 1900
5757
const int TensorShapeProto::kDimFieldNumber;
5758
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
5759
5760
TensorShapeProto::TensorShapeProto()
5761
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
5762
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
5763
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto();
5764
}
5765
SharedCtor();
5766
// @@protoc_insertion_point(constructor:opencv_onnx.TensorShapeProto)
5767
}
5768
TensorShapeProto::TensorShapeProto(const TensorShapeProto& from)
5769
: ::google::protobuf::Message(),
5770
_internal_metadata_(NULL),
5771
_has_bits_(from._has_bits_),
5772
_cached_size_(0),
5773
dim_(from.dim_) {
5774
_internal_metadata_.MergeFrom(from._internal_metadata_);
5775
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TensorShapeProto)
5776
}
5777
5778
void TensorShapeProto::SharedCtor() {
5779
_cached_size_ = 0;
5780
}
5781
5782
TensorShapeProto::~TensorShapeProto() {
5783
// @@protoc_insertion_point(destructor:opencv_onnx.TensorShapeProto)
5784
SharedDtor();
5785
}
5786
5787
void TensorShapeProto::SharedDtor() {
5788
}
5789
5790
void TensorShapeProto::SetCachedSize(int size) const {
5791
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5792
_cached_size_ = size;
5793
GOOGLE_SAFE_CONCURRENT_WRITES_END();
5794
}
5795
const ::google::protobuf::Descriptor* TensorShapeProto::descriptor() {
5796
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
5797
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
5798
}
5799
5800
const TensorShapeProto& TensorShapeProto::default_instance() {
5801
::protobuf_opencv_2donnx_2eproto::InitDefaultsTensorShapeProto();
5802
return *internal_default_instance();
5803
}
5804
5805
TensorShapeProto* TensorShapeProto::New(::google::protobuf::Arena* arena) const {
5806
TensorShapeProto* n = new TensorShapeProto;
5807
if (arena != NULL) {
5808
arena->Own(n);
5809
}
5810
return n;
5811
}
5812
5813
void TensorShapeProto::Clear() {
5814
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TensorShapeProto)
5815
::google::protobuf::uint32 cached_has_bits = 0;
5816
// Prevent compiler warnings about cached_has_bits being unused
5817
(void) cached_has_bits;
5818
5819
dim_.Clear();
5820
_has_bits_.Clear();
5821
_internal_metadata_.Clear();
5822
}
5823
5824
bool TensorShapeProto::MergePartialFromCodedStream(
5825
::google::protobuf::io::CodedInputStream* input) {
5826
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
5827
::google::protobuf::uint32 tag;
5828
// @@protoc_insertion_point(parse_start:opencv_onnx.TensorShapeProto)
5829
for (;;) {
5830
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
5831
tag = p.first;
5832
if (!p.second) goto handle_unusual;
5833
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
5834
// repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
5835
case 1: {
5836
if (static_cast< ::google::protobuf::uint8>(tag) ==
5837
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
5838
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_dim()));
5839
} else {
5840
goto handle_unusual;
5841
}
5842
break;
5843
}
5844
5845
default: {
5846
handle_unusual:
5847
if (tag == 0) {
5848
goto success;
5849
}
5850
DO_(::google::protobuf::internal::WireFormat::SkipField(
5851
input, tag, _internal_metadata_.mutable_unknown_fields()));
5852
break;
5853
}
5854
}
5855
}
5856
success:
5857
// @@protoc_insertion_point(parse_success:opencv_onnx.TensorShapeProto)
5858
return true;
5859
failure:
5860
// @@protoc_insertion_point(parse_failure:opencv_onnx.TensorShapeProto)
5861
return false;
5862
#undef DO_
5863
}
5864
5865
void TensorShapeProto::SerializeWithCachedSizes(
5866
::google::protobuf::io::CodedOutputStream* output) const {
5867
// @@protoc_insertion_point(serialize_start:opencv_onnx.TensorShapeProto)
5868
::google::protobuf::uint32 cached_has_bits = 0;
5869
(void) cached_has_bits;
5870
5871
// repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
5872
for (unsigned int i = 0,
5873
n = static_cast<unsigned int>(this->dim_size()); i < n; i++) {
5874
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
5875
1, this->dim(static_cast<int>(i)), output);
5876
}
5877
5878
if (_internal_metadata_.have_unknown_fields()) {
5879
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
5880
_internal_metadata_.unknown_fields(), output);
5881
}
5882
// @@protoc_insertion_point(serialize_end:opencv_onnx.TensorShapeProto)
5883
}
5884
5885
::google::protobuf::uint8* TensorShapeProto::InternalSerializeWithCachedSizesToArray(
5886
bool deterministic, ::google::protobuf::uint8* target) const {
5887
(void)deterministic; // Unused
5888
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TensorShapeProto)
5889
::google::protobuf::uint32 cached_has_bits = 0;
5890
(void) cached_has_bits;
5891
5892
// repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
5893
for (unsigned int i = 0,
5894
n = static_cast<unsigned int>(this->dim_size()); i < n; i++) {
5895
target = ::google::protobuf::internal::WireFormatLite::
5896
InternalWriteMessageToArray(
5897
1, this->dim(static_cast<int>(i)), deterministic, target);
5898
}
5899
5900
if (_internal_metadata_.have_unknown_fields()) {
5901
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
5902
_internal_metadata_.unknown_fields(), target);
5903
}
5904
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TensorShapeProto)
5905
return target;
5906
}
5907
5908
size_t TensorShapeProto::ByteSizeLong() const {
5909
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TensorShapeProto)
5910
size_t total_size = 0;
5911
5912
if (_internal_metadata_.have_unknown_fields()) {
5913
total_size +=
5914
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
5915
_internal_metadata_.unknown_fields());
5916
}
5917
// repeated .opencv_onnx.TensorShapeProto.Dimension dim = 1;
5918
{
5919
unsigned int count = static_cast<unsigned int>(this->dim_size());
5920
total_size += 1UL * count;
5921
for (unsigned int i = 0; i < count; i++) {
5922
total_size +=
5923
::google::protobuf::internal::WireFormatLite::MessageSize(
5924
this->dim(static_cast<int>(i)));
5925
}
5926
}
5927
5928
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
5929
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
5930
_cached_size_ = cached_size;
5931
GOOGLE_SAFE_CONCURRENT_WRITES_END();
5932
return total_size;
5933
}
5934
5935
void TensorShapeProto::MergeFrom(const ::google::protobuf::Message& from) {
5936
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TensorShapeProto)
5937
GOOGLE_DCHECK_NE(&from, this);
5938
const TensorShapeProto* source =
5939
::google::protobuf::internal::DynamicCastToGenerated<const TensorShapeProto>(
5940
&from);
5941
if (source == NULL) {
5942
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TensorShapeProto)
5943
::google::protobuf::internal::ReflectionOps::Merge(from, this);
5944
} else {
5945
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TensorShapeProto)
5946
MergeFrom(*source);
5947
}
5948
}
5949
5950
void TensorShapeProto::MergeFrom(const TensorShapeProto& from) {
5951
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TensorShapeProto)
5952
GOOGLE_DCHECK_NE(&from, this);
5953
_internal_metadata_.MergeFrom(from._internal_metadata_);
5954
::google::protobuf::uint32 cached_has_bits = 0;
5955
(void) cached_has_bits;
5956
5957
dim_.MergeFrom(from.dim_);
5958
}
5959
5960
void TensorShapeProto::CopyFrom(const ::google::protobuf::Message& from) {
5961
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TensorShapeProto)
5962
if (&from == this) return;
5963
Clear();
5964
MergeFrom(from);
5965
}
5966
5967
void TensorShapeProto::CopyFrom(const TensorShapeProto& from) {
5968
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TensorShapeProto)
5969
if (&from == this) return;
5970
Clear();
5971
MergeFrom(from);
5972
}
5973
5974
bool TensorShapeProto::IsInitialized() const {
5975
return true;
5976
}
5977
5978
void TensorShapeProto::Swap(TensorShapeProto* other) {
5979
if (other == this) return;
5980
InternalSwap(other);
5981
}
5982
void TensorShapeProto::InternalSwap(TensorShapeProto* other) {
5983
using std::swap;
5984
dim_.InternalSwap(&other->dim_);
5985
swap(_has_bits_[0], other->_has_bits_[0]);
5986
_internal_metadata_.Swap(&other->_internal_metadata_);
5987
swap(_cached_size_, other->_cached_size_);
5988
}
5989
5990
::google::protobuf::Metadata TensorShapeProto::GetMetadata() const {
5991
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
5992
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
5993
}
5994
5995
5996
// ===================================================================
5997
5998
void TypeProto_Tensor::InitAsDefaultInstance() {
5999
::opencv_onnx::_TypeProto_Tensor_default_instance_._instance.get_mutable()->shape_ = const_cast< ::opencv_onnx::TensorShapeProto*>(
6000
::opencv_onnx::TensorShapeProto::internal_default_instance());
6001
}
6002
#if !defined(_MSC_VER) || _MSC_VER >= 1900
6003
const int TypeProto_Tensor::kElemTypeFieldNumber;
6004
const int TypeProto_Tensor::kShapeFieldNumber;
6005
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
6006
6007
TypeProto_Tensor::TypeProto_Tensor()
6008
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
6009
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
6010
::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto_Tensor();
6011
}
6012
SharedCtor();
6013
// @@protoc_insertion_point(constructor:opencv_onnx.TypeProto.Tensor)
6014
}
6015
TypeProto_Tensor::TypeProto_Tensor(const TypeProto_Tensor& from)
6016
: ::google::protobuf::Message(),
6017
_internal_metadata_(NULL),
6018
_has_bits_(from._has_bits_),
6019
_cached_size_(0) {
6020
_internal_metadata_.MergeFrom(from._internal_metadata_);
6021
if (from.has_shape()) {
6022
shape_ = new ::opencv_onnx::TensorShapeProto(*from.shape_);
6023
} else {
6024
shape_ = NULL;
6025
}
6026
elem_type_ = from.elem_type_;
6027
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto.Tensor)
6028
}
6029
6030
void TypeProto_Tensor::SharedCtor() {
6031
_cached_size_ = 0;
6032
::memset(&shape_, 0, static_cast<size_t>(
6033
reinterpret_cast<char*>(&elem_type_) -
6034
reinterpret_cast<char*>(&shape_)) + sizeof(elem_type_));
6035
}
6036
6037
TypeProto_Tensor::~TypeProto_Tensor() {
6038
// @@protoc_insertion_point(destructor:opencv_onnx.TypeProto.Tensor)
6039
SharedDtor();
6040
}
6041
6042
void TypeProto_Tensor::SharedDtor() {
6043
if (this != internal_default_instance()) delete shape_;
6044
}
6045
6046
void TypeProto_Tensor::SetCachedSize(int size) const {
6047
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6048
_cached_size_ = size;
6049
GOOGLE_SAFE_CONCURRENT_WRITES_END();
6050
}
6051
const ::google::protobuf::Descriptor* TypeProto_Tensor::descriptor() {
6052
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
6053
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
6054
}
6055
6056
const TypeProto_Tensor& TypeProto_Tensor::default_instance() {
6057
::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto_Tensor();
6058
return *internal_default_instance();
6059
}
6060
6061
TypeProto_Tensor* TypeProto_Tensor::New(::google::protobuf::Arena* arena) const {
6062
TypeProto_Tensor* n = new TypeProto_Tensor;
6063
if (arena != NULL) {
6064
arena->Own(n);
6065
}
6066
return n;
6067
}
6068
6069
void TypeProto_Tensor::Clear() {
6070
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto.Tensor)
6071
::google::protobuf::uint32 cached_has_bits = 0;
6072
// Prevent compiler warnings about cached_has_bits being unused
6073
(void) cached_has_bits;
6074
6075
cached_has_bits = _has_bits_[0];
6076
if (cached_has_bits & 0x00000001u) {
6077
GOOGLE_DCHECK(shape_ != NULL);
6078
shape_->Clear();
6079
}
6080
elem_type_ = 0;
6081
_has_bits_.Clear();
6082
_internal_metadata_.Clear();
6083
}
6084
6085
bool TypeProto_Tensor::MergePartialFromCodedStream(
6086
::google::protobuf::io::CodedInputStream* input) {
6087
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
6088
::google::protobuf::uint32 tag;
6089
// @@protoc_insertion_point(parse_start:opencv_onnx.TypeProto.Tensor)
6090
for (;;) {
6091
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
6092
tag = p.first;
6093
if (!p.second) goto handle_unusual;
6094
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
6095
// optional .opencv_onnx.TensorProto.DataType elem_type = 1;
6096
case 1: {
6097
if (static_cast< ::google::protobuf::uint8>(tag) ==
6098
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
6099
int value;
6100
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
6101
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
6102
input, &value)));
6103
if (::opencv_onnx::TensorProto_DataType_IsValid(value)) {
6104
set_elem_type(static_cast< ::opencv_onnx::TensorProto_DataType >(value));
6105
} else {
6106
mutable_unknown_fields()->AddVarint(
6107
1, static_cast< ::google::protobuf::uint64>(value));
6108
}
6109
} else {
6110
goto handle_unusual;
6111
}
6112
break;
6113
}
6114
6115
// optional .opencv_onnx.TensorShapeProto shape = 2;
6116
case 2: {
6117
if (static_cast< ::google::protobuf::uint8>(tag) ==
6118
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
6119
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
6120
input, mutable_shape()));
6121
} else {
6122
goto handle_unusual;
6123
}
6124
break;
6125
}
6126
6127
default: {
6128
handle_unusual:
6129
if (tag == 0) {
6130
goto success;
6131
}
6132
DO_(::google::protobuf::internal::WireFormat::SkipField(
6133
input, tag, _internal_metadata_.mutable_unknown_fields()));
6134
break;
6135
}
6136
}
6137
}
6138
success:
6139
// @@protoc_insertion_point(parse_success:opencv_onnx.TypeProto.Tensor)
6140
return true;
6141
failure:
6142
// @@protoc_insertion_point(parse_failure:opencv_onnx.TypeProto.Tensor)
6143
return false;
6144
#undef DO_
6145
}
6146
6147
void TypeProto_Tensor::SerializeWithCachedSizes(
6148
::google::protobuf::io::CodedOutputStream* output) const {
6149
// @@protoc_insertion_point(serialize_start:opencv_onnx.TypeProto.Tensor)
6150
::google::protobuf::uint32 cached_has_bits = 0;
6151
(void) cached_has_bits;
6152
6153
cached_has_bits = _has_bits_[0];
6154
// optional .opencv_onnx.TensorProto.DataType elem_type = 1;
6155
if (cached_has_bits & 0x00000002u) {
6156
::google::protobuf::internal::WireFormatLite::WriteEnum(
6157
1, this->elem_type(), output);
6158
}
6159
6160
// optional .opencv_onnx.TensorShapeProto shape = 2;
6161
if (cached_has_bits & 0x00000001u) {
6162
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
6163
2, *this->shape_, output);
6164
}
6165
6166
if (_internal_metadata_.have_unknown_fields()) {
6167
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6168
_internal_metadata_.unknown_fields(), output);
6169
}
6170
// @@protoc_insertion_point(serialize_end:opencv_onnx.TypeProto.Tensor)
6171
}
6172
6173
::google::protobuf::uint8* TypeProto_Tensor::InternalSerializeWithCachedSizesToArray(
6174
bool deterministic, ::google::protobuf::uint8* target) const {
6175
(void)deterministic; // Unused
6176
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto.Tensor)
6177
::google::protobuf::uint32 cached_has_bits = 0;
6178
(void) cached_has_bits;
6179
6180
cached_has_bits = _has_bits_[0];
6181
// optional .opencv_onnx.TensorProto.DataType elem_type = 1;
6182
if (cached_has_bits & 0x00000002u) {
6183
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
6184
1, this->elem_type(), target);
6185
}
6186
6187
// optional .opencv_onnx.TensorShapeProto shape = 2;
6188
if (cached_has_bits & 0x00000001u) {
6189
target = ::google::protobuf::internal::WireFormatLite::
6190
InternalWriteMessageToArray(
6191
2, *this->shape_, deterministic, target);
6192
}
6193
6194
if (_internal_metadata_.have_unknown_fields()) {
6195
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6196
_internal_metadata_.unknown_fields(), target);
6197
}
6198
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto.Tensor)
6199
return target;
6200
}
6201
6202
size_t TypeProto_Tensor::ByteSizeLong() const {
6203
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto.Tensor)
6204
size_t total_size = 0;
6205
6206
if (_internal_metadata_.have_unknown_fields()) {
6207
total_size +=
6208
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6209
_internal_metadata_.unknown_fields());
6210
}
6211
if (_has_bits_[0 / 32] & 3u) {
6212
// optional .opencv_onnx.TensorShapeProto shape = 2;
6213
if (has_shape()) {
6214
total_size += 1 +
6215
::google::protobuf::internal::WireFormatLite::MessageSize(
6216
*this->shape_);
6217
}
6218
6219
// optional .opencv_onnx.TensorProto.DataType elem_type = 1;
6220
if (has_elem_type()) {
6221
total_size += 1 +
6222
::google::protobuf::internal::WireFormatLite::EnumSize(this->elem_type());
6223
}
6224
6225
}
6226
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
6227
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6228
_cached_size_ = cached_size;
6229
GOOGLE_SAFE_CONCURRENT_WRITES_END();
6230
return total_size;
6231
}
6232
6233
void TypeProto_Tensor::MergeFrom(const ::google::protobuf::Message& from) {
6234
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TypeProto.Tensor)
6235
GOOGLE_DCHECK_NE(&from, this);
6236
const TypeProto_Tensor* source =
6237
::google::protobuf::internal::DynamicCastToGenerated<const TypeProto_Tensor>(
6238
&from);
6239
if (source == NULL) {
6240
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TypeProto.Tensor)
6241
::google::protobuf::internal::ReflectionOps::Merge(from, this);
6242
} else {
6243
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TypeProto.Tensor)
6244
MergeFrom(*source);
6245
}
6246
}
6247
6248
void TypeProto_Tensor::MergeFrom(const TypeProto_Tensor& from) {
6249
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto.Tensor)
6250
GOOGLE_DCHECK_NE(&from, this);
6251
_internal_metadata_.MergeFrom(from._internal_metadata_);
6252
::google::protobuf::uint32 cached_has_bits = 0;
6253
(void) cached_has_bits;
6254
6255
cached_has_bits = from._has_bits_[0];
6256
if (cached_has_bits & 3u) {
6257
if (cached_has_bits & 0x00000001u) {
6258
mutable_shape()->::opencv_onnx::TensorShapeProto::MergeFrom(from.shape());
6259
}
6260
if (cached_has_bits & 0x00000002u) {
6261
elem_type_ = from.elem_type_;
6262
}
6263
_has_bits_[0] |= cached_has_bits;
6264
}
6265
}
6266
6267
void TypeProto_Tensor::CopyFrom(const ::google::protobuf::Message& from) {
6268
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TypeProto.Tensor)
6269
if (&from == this) return;
6270
Clear();
6271
MergeFrom(from);
6272
}
6273
6274
void TypeProto_Tensor::CopyFrom(const TypeProto_Tensor& from) {
6275
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto.Tensor)
6276
if (&from == this) return;
6277
Clear();
6278
MergeFrom(from);
6279
}
6280
6281
bool TypeProto_Tensor::IsInitialized() const {
6282
return true;
6283
}
6284
6285
void TypeProto_Tensor::Swap(TypeProto_Tensor* other) {
6286
if (other == this) return;
6287
InternalSwap(other);
6288
}
6289
void TypeProto_Tensor::InternalSwap(TypeProto_Tensor* other) {
6290
using std::swap;
6291
swap(shape_, other->shape_);
6292
swap(elem_type_, other->elem_type_);
6293
swap(_has_bits_[0], other->_has_bits_[0]);
6294
_internal_metadata_.Swap(&other->_internal_metadata_);
6295
swap(_cached_size_, other->_cached_size_);
6296
}
6297
6298
::google::protobuf::Metadata TypeProto_Tensor::GetMetadata() const {
6299
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
6300
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
6301
}
6302
6303
6304
// ===================================================================
6305
6306
void TypeProto::InitAsDefaultInstance() {
6307
::opencv_onnx::_TypeProto_default_instance_.tensor_type_ = const_cast< ::opencv_onnx::TypeProto_Tensor*>(
6308
::opencv_onnx::TypeProto_Tensor::internal_default_instance());
6309
}
6310
void TypeProto::set_allocated_tensor_type(::opencv_onnx::TypeProto_Tensor* tensor_type) {
6311
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
6312
clear_value();
6313
if (tensor_type) {
6314
::google::protobuf::Arena* submessage_arena = NULL;
6315
if (message_arena != submessage_arena) {
6316
tensor_type = ::google::protobuf::internal::GetOwnedMessage(
6317
message_arena, tensor_type, submessage_arena);
6318
}
6319
set_has_tensor_type();
6320
value_.tensor_type_ = tensor_type;
6321
}
6322
// @@protoc_insertion_point(field_set_allocated:opencv_onnx.TypeProto.tensor_type)
6323
}
6324
#if !defined(_MSC_VER) || _MSC_VER >= 1900
6325
const int TypeProto::kTensorTypeFieldNumber;
6326
const int TypeProto::kDenotationFieldNumber;
6327
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
6328
6329
TypeProto::TypeProto()
6330
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
6331
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
6332
::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto();
6333
}
6334
SharedCtor();
6335
// @@protoc_insertion_point(constructor:opencv_onnx.TypeProto)
6336
}
6337
TypeProto::TypeProto(const TypeProto& from)
6338
: ::google::protobuf::Message(),
6339
_internal_metadata_(NULL),
6340
_has_bits_(from._has_bits_),
6341
_cached_size_(0) {
6342
_internal_metadata_.MergeFrom(from._internal_metadata_);
6343
denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6344
if (from.has_denotation()) {
6345
denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
6346
}
6347
clear_has_value();
6348
switch (from.value_case()) {
6349
case kTensorType: {
6350
mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from.tensor_type());
6351
break;
6352
}
6353
case VALUE_NOT_SET: {
6354
break;
6355
}
6356
}
6357
// @@protoc_insertion_point(copy_constructor:opencv_onnx.TypeProto)
6358
}
6359
6360
void TypeProto::SharedCtor() {
6361
_cached_size_ = 0;
6362
denotation_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6363
clear_has_value();
6364
}
6365
6366
TypeProto::~TypeProto() {
6367
// @@protoc_insertion_point(destructor:opencv_onnx.TypeProto)
6368
SharedDtor();
6369
}
6370
6371
void TypeProto::SharedDtor() {
6372
denotation_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6373
if (has_value()) {
6374
clear_value();
6375
}
6376
}
6377
6378
void TypeProto::SetCachedSize(int size) const {
6379
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6380
_cached_size_ = size;
6381
GOOGLE_SAFE_CONCURRENT_WRITES_END();
6382
}
6383
const ::google::protobuf::Descriptor* TypeProto::descriptor() {
6384
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
6385
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
6386
}
6387
6388
const TypeProto& TypeProto::default_instance() {
6389
::protobuf_opencv_2donnx_2eproto::InitDefaultsTypeProto();
6390
return *internal_default_instance();
6391
}
6392
6393
TypeProto* TypeProto::New(::google::protobuf::Arena* arena) const {
6394
TypeProto* n = new TypeProto;
6395
if (arena != NULL) {
6396
arena->Own(n);
6397
}
6398
return n;
6399
}
6400
6401
void TypeProto::clear_value() {
6402
// @@protoc_insertion_point(one_of_clear_start:opencv_onnx.TypeProto)
6403
switch (value_case()) {
6404
case kTensorType: {
6405
delete value_.tensor_type_;
6406
break;
6407
}
6408
case VALUE_NOT_SET: {
6409
break;
6410
}
6411
}
6412
_oneof_case_[0] = VALUE_NOT_SET;
6413
}
6414
6415
6416
void TypeProto::Clear() {
6417
// @@protoc_insertion_point(message_clear_start:opencv_onnx.TypeProto)
6418
::google::protobuf::uint32 cached_has_bits = 0;
6419
// Prevent compiler warnings about cached_has_bits being unused
6420
(void) cached_has_bits;
6421
6422
cached_has_bits = _has_bits_[0];
6423
if (cached_has_bits & 0x00000001u) {
6424
GOOGLE_DCHECK(!denotation_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
6425
(*denotation_.UnsafeRawStringPointer())->clear();
6426
}
6427
clear_value();
6428
_has_bits_.Clear();
6429
_internal_metadata_.Clear();
6430
}
6431
6432
bool TypeProto::MergePartialFromCodedStream(
6433
::google::protobuf::io::CodedInputStream* input) {
6434
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
6435
::google::protobuf::uint32 tag;
6436
// @@protoc_insertion_point(parse_start:opencv_onnx.TypeProto)
6437
for (;;) {
6438
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
6439
tag = p.first;
6440
if (!p.second) goto handle_unusual;
6441
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
6442
// optional .opencv_onnx.TypeProto.Tensor tensor_type = 1;
6443
case 1: {
6444
if (static_cast< ::google::protobuf::uint8>(tag) ==
6445
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
6446
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
6447
input, mutable_tensor_type()));
6448
} else {
6449
goto handle_unusual;
6450
}
6451
break;
6452
}
6453
6454
// optional string denotation = 6;
6455
case 6: {
6456
if (static_cast< ::google::protobuf::uint8>(tag) ==
6457
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
6458
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6459
input, this->mutable_denotation()));
6460
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
6461
this->denotation().data(), static_cast<int>(this->denotation().length()),
6462
::google::protobuf::internal::WireFormat::PARSE,
6463
"opencv_onnx.TypeProto.denotation");
6464
} else {
6465
goto handle_unusual;
6466
}
6467
break;
6468
}
6469
6470
default: {
6471
handle_unusual:
6472
if (tag == 0) {
6473
goto success;
6474
}
6475
DO_(::google::protobuf::internal::WireFormat::SkipField(
6476
input, tag, _internal_metadata_.mutable_unknown_fields()));
6477
break;
6478
}
6479
}
6480
}
6481
success:
6482
// @@protoc_insertion_point(parse_success:opencv_onnx.TypeProto)
6483
return true;
6484
failure:
6485
// @@protoc_insertion_point(parse_failure:opencv_onnx.TypeProto)
6486
return false;
6487
#undef DO_
6488
}
6489
6490
void TypeProto::SerializeWithCachedSizes(
6491
::google::protobuf::io::CodedOutputStream* output) const {
6492
// @@protoc_insertion_point(serialize_start:opencv_onnx.TypeProto)
6493
::google::protobuf::uint32 cached_has_bits = 0;
6494
(void) cached_has_bits;
6495
6496
// optional .opencv_onnx.TypeProto.Tensor tensor_type = 1;
6497
if (has_tensor_type()) {
6498
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
6499
1, *value_.tensor_type_, output);
6500
}
6501
6502
cached_has_bits = _has_bits_[0];
6503
// optional string denotation = 6;
6504
if (cached_has_bits & 0x00000001u) {
6505
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
6506
this->denotation().data(), static_cast<int>(this->denotation().length()),
6507
::google::protobuf::internal::WireFormat::SERIALIZE,
6508
"opencv_onnx.TypeProto.denotation");
6509
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
6510
6, this->denotation(), output);
6511
}
6512
6513
if (_internal_metadata_.have_unknown_fields()) {
6514
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6515
_internal_metadata_.unknown_fields(), output);
6516
}
6517
// @@protoc_insertion_point(serialize_end:opencv_onnx.TypeProto)
6518
}
6519
6520
::google::protobuf::uint8* TypeProto::InternalSerializeWithCachedSizesToArray(
6521
bool deterministic, ::google::protobuf::uint8* target) const {
6522
(void)deterministic; // Unused
6523
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.TypeProto)
6524
::google::protobuf::uint32 cached_has_bits = 0;
6525
(void) cached_has_bits;
6526
6527
// optional .opencv_onnx.TypeProto.Tensor tensor_type = 1;
6528
if (has_tensor_type()) {
6529
target = ::google::protobuf::internal::WireFormatLite::
6530
InternalWriteMessageToArray(
6531
1, *value_.tensor_type_, deterministic, target);
6532
}
6533
6534
cached_has_bits = _has_bits_[0];
6535
// optional string denotation = 6;
6536
if (cached_has_bits & 0x00000001u) {
6537
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
6538
this->denotation().data(), static_cast<int>(this->denotation().length()),
6539
::google::protobuf::internal::WireFormat::SERIALIZE,
6540
"opencv_onnx.TypeProto.denotation");
6541
target =
6542
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6543
6, this->denotation(), target);
6544
}
6545
6546
if (_internal_metadata_.have_unknown_fields()) {
6547
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6548
_internal_metadata_.unknown_fields(), target);
6549
}
6550
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.TypeProto)
6551
return target;
6552
}
6553
6554
size_t TypeProto::ByteSizeLong() const {
6555
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.TypeProto)
6556
size_t total_size = 0;
6557
6558
if (_internal_metadata_.have_unknown_fields()) {
6559
total_size +=
6560
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6561
_internal_metadata_.unknown_fields());
6562
}
6563
// optional string denotation = 6;
6564
if (has_denotation()) {
6565
total_size += 1 +
6566
::google::protobuf::internal::WireFormatLite::StringSize(
6567
this->denotation());
6568
}
6569
6570
switch (value_case()) {
6571
// optional .opencv_onnx.TypeProto.Tensor tensor_type = 1;
6572
case kTensorType: {
6573
total_size += 1 +
6574
::google::protobuf::internal::WireFormatLite::MessageSize(
6575
*value_.tensor_type_);
6576
break;
6577
}
6578
case VALUE_NOT_SET: {
6579
break;
6580
}
6581
}
6582
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
6583
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6584
_cached_size_ = cached_size;
6585
GOOGLE_SAFE_CONCURRENT_WRITES_END();
6586
return total_size;
6587
}
6588
6589
void TypeProto::MergeFrom(const ::google::protobuf::Message& from) {
6590
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.TypeProto)
6591
GOOGLE_DCHECK_NE(&from, this);
6592
const TypeProto* source =
6593
::google::protobuf::internal::DynamicCastToGenerated<const TypeProto>(
6594
&from);
6595
if (source == NULL) {
6596
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.TypeProto)
6597
::google::protobuf::internal::ReflectionOps::Merge(from, this);
6598
} else {
6599
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.TypeProto)
6600
MergeFrom(*source);
6601
}
6602
}
6603
6604
void TypeProto::MergeFrom(const TypeProto& from) {
6605
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.TypeProto)
6606
GOOGLE_DCHECK_NE(&from, this);
6607
_internal_metadata_.MergeFrom(from._internal_metadata_);
6608
::google::protobuf::uint32 cached_has_bits = 0;
6609
(void) cached_has_bits;
6610
6611
if (from.has_denotation()) {
6612
set_has_denotation();
6613
denotation_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.denotation_);
6614
}
6615
switch (from.value_case()) {
6616
case kTensorType: {
6617
mutable_tensor_type()->::opencv_onnx::TypeProto_Tensor::MergeFrom(from.tensor_type());
6618
break;
6619
}
6620
case VALUE_NOT_SET: {
6621
break;
6622
}
6623
}
6624
}
6625
6626
void TypeProto::CopyFrom(const ::google::protobuf::Message& from) {
6627
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.TypeProto)
6628
if (&from == this) return;
6629
Clear();
6630
MergeFrom(from);
6631
}
6632
6633
void TypeProto::CopyFrom(const TypeProto& from) {
6634
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.TypeProto)
6635
if (&from == this) return;
6636
Clear();
6637
MergeFrom(from);
6638
}
6639
6640
bool TypeProto::IsInitialized() const {
6641
return true;
6642
}
6643
6644
void TypeProto::Swap(TypeProto* other) {
6645
if (other == this) return;
6646
InternalSwap(other);
6647
}
6648
void TypeProto::InternalSwap(TypeProto* other) {
6649
using std::swap;
6650
denotation_.Swap(&other->denotation_);
6651
swap(value_, other->value_);
6652
swap(_oneof_case_[0], other->_oneof_case_[0]);
6653
swap(_has_bits_[0], other->_has_bits_[0]);
6654
_internal_metadata_.Swap(&other->_internal_metadata_);
6655
swap(_cached_size_, other->_cached_size_);
6656
}
6657
6658
::google::protobuf::Metadata TypeProto::GetMetadata() const {
6659
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
6660
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
6661
}
6662
6663
6664
// ===================================================================
6665
6666
void OperatorSetIdProto::InitAsDefaultInstance() {
6667
}
6668
#if !defined(_MSC_VER) || _MSC_VER >= 1900
6669
const int OperatorSetIdProto::kDomainFieldNumber;
6670
const int OperatorSetIdProto::kVersionFieldNumber;
6671
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
6672
6673
OperatorSetIdProto::OperatorSetIdProto()
6674
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
6675
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
6676
::protobuf_opencv_2donnx_2eproto::InitDefaultsOperatorSetIdProto();
6677
}
6678
SharedCtor();
6679
// @@protoc_insertion_point(constructor:opencv_onnx.OperatorSetIdProto)
6680
}
6681
OperatorSetIdProto::OperatorSetIdProto(const OperatorSetIdProto& from)
6682
: ::google::protobuf::Message(),
6683
_internal_metadata_(NULL),
6684
_has_bits_(from._has_bits_),
6685
_cached_size_(0) {
6686
_internal_metadata_.MergeFrom(from._internal_metadata_);
6687
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6688
if (from.has_domain()) {
6689
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
6690
}
6691
version_ = from.version_;
6692
// @@protoc_insertion_point(copy_constructor:opencv_onnx.OperatorSetIdProto)
6693
}
6694
6695
void OperatorSetIdProto::SharedCtor() {
6696
_cached_size_ = 0;
6697
domain_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6698
version_ = GOOGLE_LONGLONG(0);
6699
}
6700
6701
OperatorSetIdProto::~OperatorSetIdProto() {
6702
// @@protoc_insertion_point(destructor:opencv_onnx.OperatorSetIdProto)
6703
SharedDtor();
6704
}
6705
6706
void OperatorSetIdProto::SharedDtor() {
6707
domain_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
6708
}
6709
6710
void OperatorSetIdProto::SetCachedSize(int size) const {
6711
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6712
_cached_size_ = size;
6713
GOOGLE_SAFE_CONCURRENT_WRITES_END();
6714
}
6715
const ::google::protobuf::Descriptor* OperatorSetIdProto::descriptor() {
6716
::protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
6717
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
6718
}
6719
6720
const OperatorSetIdProto& OperatorSetIdProto::default_instance() {
6721
::protobuf_opencv_2donnx_2eproto::InitDefaultsOperatorSetIdProto();
6722
return *internal_default_instance();
6723
}
6724
6725
OperatorSetIdProto* OperatorSetIdProto::New(::google::protobuf::Arena* arena) const {
6726
OperatorSetIdProto* n = new OperatorSetIdProto;
6727
if (arena != NULL) {
6728
arena->Own(n);
6729
}
6730
return n;
6731
}
6732
6733
void OperatorSetIdProto::Clear() {
6734
// @@protoc_insertion_point(message_clear_start:opencv_onnx.OperatorSetIdProto)
6735
::google::protobuf::uint32 cached_has_bits = 0;
6736
// Prevent compiler warnings about cached_has_bits being unused
6737
(void) cached_has_bits;
6738
6739
cached_has_bits = _has_bits_[0];
6740
if (cached_has_bits & 0x00000001u) {
6741
GOOGLE_DCHECK(!domain_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
6742
(*domain_.UnsafeRawStringPointer())->clear();
6743
}
6744
version_ = GOOGLE_LONGLONG(0);
6745
_has_bits_.Clear();
6746
_internal_metadata_.Clear();
6747
}
6748
6749
bool OperatorSetIdProto::MergePartialFromCodedStream(
6750
::google::protobuf::io::CodedInputStream* input) {
6751
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
6752
::google::protobuf::uint32 tag;
6753
// @@protoc_insertion_point(parse_start:opencv_onnx.OperatorSetIdProto)
6754
for (;;) {
6755
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
6756
tag = p.first;
6757
if (!p.second) goto handle_unusual;
6758
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
6759
// optional string domain = 1;
6760
case 1: {
6761
if (static_cast< ::google::protobuf::uint8>(tag) ==
6762
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
6763
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
6764
input, this->mutable_domain()));
6765
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
6766
this->domain().data(), static_cast<int>(this->domain().length()),
6767
::google::protobuf::internal::WireFormat::PARSE,
6768
"opencv_onnx.OperatorSetIdProto.domain");
6769
} else {
6770
goto handle_unusual;
6771
}
6772
break;
6773
}
6774
6775
// optional int64 version = 2;
6776
case 2: {
6777
if (static_cast< ::google::protobuf::uint8>(tag) ==
6778
static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
6779
set_has_version();
6780
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
6781
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
6782
input, &version_)));
6783
} else {
6784
goto handle_unusual;
6785
}
6786
break;
6787
}
6788
6789
default: {
6790
handle_unusual:
6791
if (tag == 0) {
6792
goto success;
6793
}
6794
DO_(::google::protobuf::internal::WireFormat::SkipField(
6795
input, tag, _internal_metadata_.mutable_unknown_fields()));
6796
break;
6797
}
6798
}
6799
}
6800
success:
6801
// @@protoc_insertion_point(parse_success:opencv_onnx.OperatorSetIdProto)
6802
return true;
6803
failure:
6804
// @@protoc_insertion_point(parse_failure:opencv_onnx.OperatorSetIdProto)
6805
return false;
6806
#undef DO_
6807
}
6808
6809
void OperatorSetIdProto::SerializeWithCachedSizes(
6810
::google::protobuf::io::CodedOutputStream* output) const {
6811
// @@protoc_insertion_point(serialize_start:opencv_onnx.OperatorSetIdProto)
6812
::google::protobuf::uint32 cached_has_bits = 0;
6813
(void) cached_has_bits;
6814
6815
cached_has_bits = _has_bits_[0];
6816
// optional string domain = 1;
6817
if (cached_has_bits & 0x00000001u) {
6818
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
6819
this->domain().data(), static_cast<int>(this->domain().length()),
6820
::google::protobuf::internal::WireFormat::SERIALIZE,
6821
"opencv_onnx.OperatorSetIdProto.domain");
6822
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
6823
1, this->domain(), output);
6824
}
6825
6826
// optional int64 version = 2;
6827
if (cached_has_bits & 0x00000002u) {
6828
::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->version(), output);
6829
}
6830
6831
if (_internal_metadata_.have_unknown_fields()) {
6832
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
6833
_internal_metadata_.unknown_fields(), output);
6834
}
6835
// @@protoc_insertion_point(serialize_end:opencv_onnx.OperatorSetIdProto)
6836
}
6837
6838
::google::protobuf::uint8* OperatorSetIdProto::InternalSerializeWithCachedSizesToArray(
6839
bool deterministic, ::google::protobuf::uint8* target) const {
6840
(void)deterministic; // Unused
6841
// @@protoc_insertion_point(serialize_to_array_start:opencv_onnx.OperatorSetIdProto)
6842
::google::protobuf::uint32 cached_has_bits = 0;
6843
(void) cached_has_bits;
6844
6845
cached_has_bits = _has_bits_[0];
6846
// optional string domain = 1;
6847
if (cached_has_bits & 0x00000001u) {
6848
::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
6849
this->domain().data(), static_cast<int>(this->domain().length()),
6850
::google::protobuf::internal::WireFormat::SERIALIZE,
6851
"opencv_onnx.OperatorSetIdProto.domain");
6852
target =
6853
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
6854
1, this->domain(), target);
6855
}
6856
6857
// optional int64 version = 2;
6858
if (cached_has_bits & 0x00000002u) {
6859
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->version(), target);
6860
}
6861
6862
if (_internal_metadata_.have_unknown_fields()) {
6863
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
6864
_internal_metadata_.unknown_fields(), target);
6865
}
6866
// @@protoc_insertion_point(serialize_to_array_end:opencv_onnx.OperatorSetIdProto)
6867
return target;
6868
}
6869
6870
size_t OperatorSetIdProto::ByteSizeLong() const {
6871
// @@protoc_insertion_point(message_byte_size_start:opencv_onnx.OperatorSetIdProto)
6872
size_t total_size = 0;
6873
6874
if (_internal_metadata_.have_unknown_fields()) {
6875
total_size +=
6876
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
6877
_internal_metadata_.unknown_fields());
6878
}
6879
if (_has_bits_[0 / 32] & 3u) {
6880
// optional string domain = 1;
6881
if (has_domain()) {
6882
total_size += 1 +
6883
::google::protobuf::internal::WireFormatLite::StringSize(
6884
this->domain());
6885
}
6886
6887
// optional int64 version = 2;
6888
if (has_version()) {
6889
total_size += 1 +
6890
::google::protobuf::internal::WireFormatLite::Int64Size(
6891
this->version());
6892
}
6893
6894
}
6895
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
6896
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
6897
_cached_size_ = cached_size;
6898
GOOGLE_SAFE_CONCURRENT_WRITES_END();
6899
return total_size;
6900
}
6901
6902
void OperatorSetIdProto::MergeFrom(const ::google::protobuf::Message& from) {
6903
// @@protoc_insertion_point(generalized_merge_from_start:opencv_onnx.OperatorSetIdProto)
6904
GOOGLE_DCHECK_NE(&from, this);
6905
const OperatorSetIdProto* source =
6906
::google::protobuf::internal::DynamicCastToGenerated<const OperatorSetIdProto>(
6907
&from);
6908
if (source == NULL) {
6909
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_onnx.OperatorSetIdProto)
6910
::google::protobuf::internal::ReflectionOps::Merge(from, this);
6911
} else {
6912
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_onnx.OperatorSetIdProto)
6913
MergeFrom(*source);
6914
}
6915
}
6916
6917
void OperatorSetIdProto::MergeFrom(const OperatorSetIdProto& from) {
6918
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_onnx.OperatorSetIdProto)
6919
GOOGLE_DCHECK_NE(&from, this);
6920
_internal_metadata_.MergeFrom(from._internal_metadata_);
6921
::google::protobuf::uint32 cached_has_bits = 0;
6922
(void) cached_has_bits;
6923
6924
cached_has_bits = from._has_bits_[0];
6925
if (cached_has_bits & 3u) {
6926
if (cached_has_bits & 0x00000001u) {
6927
set_has_domain();
6928
domain_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.domain_);
6929
}
6930
if (cached_has_bits & 0x00000002u) {
6931
version_ = from.version_;
6932
}
6933
_has_bits_[0] |= cached_has_bits;
6934
}
6935
}
6936
6937
void OperatorSetIdProto::CopyFrom(const ::google::protobuf::Message& from) {
6938
// @@protoc_insertion_point(generalized_copy_from_start:opencv_onnx.OperatorSetIdProto)
6939
if (&from == this) return;
6940
Clear();
6941
MergeFrom(from);
6942
}
6943
6944
void OperatorSetIdProto::CopyFrom(const OperatorSetIdProto& from) {
6945
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_onnx.OperatorSetIdProto)
6946
if (&from == this) return;
6947
Clear();
6948
MergeFrom(from);
6949
}
6950
6951
bool OperatorSetIdProto::IsInitialized() const {
6952
return true;
6953
}
6954
6955
void OperatorSetIdProto::Swap(OperatorSetIdProto* other) {
6956
if (other == this) return;
6957
InternalSwap(other);
6958
}
6959
void OperatorSetIdProto::InternalSwap(OperatorSetIdProto* other) {
6960
using std::swap;
6961
domain_.Swap(&other->domain_);
6962
swap(version_, other->version_);
6963
swap(_has_bits_[0], other->_has_bits_[0]);
6964
_internal_metadata_.Swap(&other->_internal_metadata_);
6965
swap(_cached_size_, other->_cached_size_);
6966
}
6967
6968
::google::protobuf::Metadata OperatorSetIdProto::GetMetadata() const {
6969
protobuf_opencv_2donnx_2eproto::protobuf_AssignDescriptorsOnce();
6970
return ::protobuf_opencv_2donnx_2eproto::file_level_metadata[kIndexInFileMessages];
6971
}
6972
6973
6974
// @@protoc_insertion_point(namespace_scope)
6975
} // namespace opencv_onnx
6976
6977
// @@protoc_insertion_point(global_scope)
6978
6979