Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/dnn/misc/tensorflow/tensor_shape.pb.cc
16358 views
1
// Generated by the protocol buffer compiler. DO NOT EDIT!
2
// source: tensor_shape.proto
3
4
#include "tensor_shape.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_tensorflow {
23
class TensorShapeProto_DimDefaultTypeInternal {
24
public:
25
::google::protobuf::internal::ExplicitlyConstructed<TensorShapeProto_Dim>
26
_instance;
27
} _TensorShapeProto_Dim_default_instance_;
28
class TensorShapeProtoDefaultTypeInternal {
29
public:
30
::google::protobuf::internal::ExplicitlyConstructed<TensorShapeProto>
31
_instance;
32
} _TensorShapeProto_default_instance_;
33
} // namespace opencv_tensorflow
34
namespace protobuf_tensor_5fshape_2eproto {
35
void InitDefaultsTensorShapeProto_DimImpl() {
36
GOOGLE_PROTOBUF_VERIFY_VERSION;
37
38
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
39
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
40
#else
41
::google::protobuf::internal::InitProtobufDefaults();
42
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
43
{
44
void* ptr = &::opencv_tensorflow::_TensorShapeProto_Dim_default_instance_;
45
new (ptr) ::opencv_tensorflow::TensorShapeProto_Dim();
46
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
47
}
48
::opencv_tensorflow::TensorShapeProto_Dim::InitAsDefaultInstance();
49
}
50
51
void InitDefaultsTensorShapeProto_Dim() {
52
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
53
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorShapeProto_DimImpl);
54
}
55
56
void InitDefaultsTensorShapeProtoImpl() {
57
GOOGLE_PROTOBUF_VERIFY_VERSION;
58
59
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
60
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
61
#else
62
::google::protobuf::internal::InitProtobufDefaults();
63
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
64
protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto_Dim();
65
{
66
void* ptr = &::opencv_tensorflow::_TensorShapeProto_default_instance_;
67
new (ptr) ::opencv_tensorflow::TensorShapeProto();
68
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
69
}
70
::opencv_tensorflow::TensorShapeProto::InitAsDefaultInstance();
71
}
72
73
void InitDefaultsTensorShapeProto() {
74
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
75
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTensorShapeProtoImpl);
76
}
77
78
::google::protobuf::Metadata file_level_metadata[2];
79
80
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
81
~0u, // no _has_bits_
82
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, _internal_metadata_),
83
~0u, // no _extensions_
84
~0u, // no _oneof_case_
85
~0u, // no _weak_field_map_
86
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, size_),
87
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, name_),
88
~0u, // no _has_bits_
89
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, _internal_metadata_),
90
~0u, // no _extensions_
91
~0u, // no _oneof_case_
92
~0u, // no _weak_field_map_
93
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, dim_),
94
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, unknown_rank_),
95
};
96
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
97
{ 0, -1, sizeof(::opencv_tensorflow::TensorShapeProto_Dim)},
98
{ 7, -1, sizeof(::opencv_tensorflow::TensorShapeProto)},
99
};
100
101
static ::google::protobuf::Message const * const file_default_instances[] = {
102
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_TensorShapeProto_Dim_default_instance_),
103
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_TensorShapeProto_default_instance_),
104
};
105
106
void protobuf_AssignDescriptors() {
107
AddDescriptors();
108
::google::protobuf::MessageFactory* factory = NULL;
109
AssignDescriptors(
110
"tensor_shape.proto", schemas, file_default_instances, TableStruct::offsets, factory,
111
file_level_metadata, NULL, NULL);
112
}
113
114
void protobuf_AssignDescriptorsOnce() {
115
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
116
::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
117
}
118
119
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
120
void protobuf_RegisterTypes(const ::std::string&) {
121
protobuf_AssignDescriptorsOnce();
122
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
123
}
124
125
void AddDescriptorsImpl() {
126
InitDefaults();
127
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
128
"\n\022tensor_shape.proto\022\021opencv_tensorflow\""
129
"\201\001\n\020TensorShapeProto\0224\n\003dim\030\002 \003(\0132\'.open"
130
"cv_tensorflow.TensorShapeProto.Dim\022\024\n\014un"
131
"known_rank\030\003 \001(\010\032!\n\003Dim\022\014\n\004size\030\001 \001(\003\022\014\n"
132
"\004name\030\002 \001(\tB2\n\030org.tensorflow.frameworkB"
133
"\021TensorShapeProtosP\001\370\001\001b\006proto3"
134
};
135
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
136
descriptor, 231);
137
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
138
"tensor_shape.proto", &protobuf_RegisterTypes);
139
}
140
141
void AddDescriptors() {
142
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
143
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
144
}
145
// Force AddDescriptors() to be called at dynamic initialization time.
146
struct StaticDescriptorInitializer {
147
StaticDescriptorInitializer() {
148
AddDescriptors();
149
}
150
} static_descriptor_initializer;
151
} // namespace protobuf_tensor_5fshape_2eproto
152
namespace opencv_tensorflow {
153
154
// ===================================================================
155
156
void TensorShapeProto_Dim::InitAsDefaultInstance() {
157
}
158
#if !defined(_MSC_VER) || _MSC_VER >= 1900
159
const int TensorShapeProto_Dim::kSizeFieldNumber;
160
const int TensorShapeProto_Dim::kNameFieldNumber;
161
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
162
163
TensorShapeProto_Dim::TensorShapeProto_Dim()
164
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
165
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
166
::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto_Dim();
167
}
168
SharedCtor();
169
// @@protoc_insertion_point(constructor:opencv_tensorflow.TensorShapeProto.Dim)
170
}
171
TensorShapeProto_Dim::TensorShapeProto_Dim(::google::protobuf::Arena* arena)
172
: ::google::protobuf::Message(),
173
_internal_metadata_(arena) {
174
::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto_Dim();
175
SharedCtor();
176
RegisterArenaDtor(arena);
177
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto.Dim)
178
}
179
TensorShapeProto_Dim::TensorShapeProto_Dim(const TensorShapeProto_Dim& from)
180
: ::google::protobuf::Message(),
181
_internal_metadata_(NULL),
182
_cached_size_(0) {
183
_internal_metadata_.MergeFrom(from._internal_metadata_);
184
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
185
if (from.name().size() > 0) {
186
name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(),
187
GetArenaNoVirtual());
188
}
189
size_ = from.size_;
190
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorShapeProto.Dim)
191
}
192
193
void TensorShapeProto_Dim::SharedCtor() {
194
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
195
size_ = GOOGLE_LONGLONG(0);
196
_cached_size_ = 0;
197
}
198
199
TensorShapeProto_Dim::~TensorShapeProto_Dim() {
200
// @@protoc_insertion_point(destructor:opencv_tensorflow.TensorShapeProto.Dim)
201
SharedDtor();
202
}
203
204
void TensorShapeProto_Dim::SharedDtor() {
205
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
206
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
207
}
208
209
void TensorShapeProto_Dim::ArenaDtor(void* object) {
210
TensorShapeProto_Dim* _this = reinterpret_cast< TensorShapeProto_Dim* >(object);
211
(void)_this;
212
}
213
void TensorShapeProto_Dim::RegisterArenaDtor(::google::protobuf::Arena* arena) {
214
}
215
void TensorShapeProto_Dim::SetCachedSize(int size) const {
216
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
217
_cached_size_ = size;
218
GOOGLE_SAFE_CONCURRENT_WRITES_END();
219
}
220
const ::google::protobuf::Descriptor* TensorShapeProto_Dim::descriptor() {
221
::protobuf_tensor_5fshape_2eproto::protobuf_AssignDescriptorsOnce();
222
return ::protobuf_tensor_5fshape_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
223
}
224
225
const TensorShapeProto_Dim& TensorShapeProto_Dim::default_instance() {
226
::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto_Dim();
227
return *internal_default_instance();
228
}
229
230
TensorShapeProto_Dim* TensorShapeProto_Dim::New(::google::protobuf::Arena* arena) const {
231
return ::google::protobuf::Arena::CreateMessage<TensorShapeProto_Dim>(arena);
232
}
233
234
void TensorShapeProto_Dim::Clear() {
235
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto.Dim)
236
::google::protobuf::uint32 cached_has_bits = 0;
237
// Prevent compiler warnings about cached_has_bits being unused
238
(void) cached_has_bits;
239
240
name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
241
size_ = GOOGLE_LONGLONG(0);
242
_internal_metadata_.Clear();
243
}
244
245
bool TensorShapeProto_Dim::MergePartialFromCodedStream(
246
::google::protobuf::io::CodedInputStream* input) {
247
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
248
::google::protobuf::uint32 tag;
249
// @@protoc_insertion_point(parse_start:opencv_tensorflow.TensorShapeProto.Dim)
250
for (;;) {
251
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
252
tag = p.first;
253
if (!p.second) goto handle_unusual;
254
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
255
// int64 size = 1;
256
case 1: {
257
if (static_cast< ::google::protobuf::uint8>(tag) ==
258
static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
259
260
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
261
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
262
input, &size_)));
263
} else {
264
goto handle_unusual;
265
}
266
break;
267
}
268
269
// string name = 2;
270
case 2: {
271
if (static_cast< ::google::protobuf::uint8>(tag) ==
272
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
273
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
274
input, this->mutable_name()));
275
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
276
this->name().data(), static_cast<int>(this->name().length()),
277
::google::protobuf::internal::WireFormatLite::PARSE,
278
"opencv_tensorflow.TensorShapeProto.Dim.name"));
279
} else {
280
goto handle_unusual;
281
}
282
break;
283
}
284
285
default: {
286
handle_unusual:
287
if (tag == 0) {
288
goto success;
289
}
290
DO_(::google::protobuf::internal::WireFormat::SkipField(
291
input, tag, _internal_metadata_.mutable_unknown_fields()));
292
break;
293
}
294
}
295
}
296
success:
297
// @@protoc_insertion_point(parse_success:opencv_tensorflow.TensorShapeProto.Dim)
298
return true;
299
failure:
300
// @@protoc_insertion_point(parse_failure:opencv_tensorflow.TensorShapeProto.Dim)
301
return false;
302
#undef DO_
303
}
304
305
void TensorShapeProto_Dim::SerializeWithCachedSizes(
306
::google::protobuf::io::CodedOutputStream* output) const {
307
// @@protoc_insertion_point(serialize_start:opencv_tensorflow.TensorShapeProto.Dim)
308
::google::protobuf::uint32 cached_has_bits = 0;
309
(void) cached_has_bits;
310
311
// int64 size = 1;
312
if (this->size() != 0) {
313
::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->size(), output);
314
}
315
316
// string name = 2;
317
if (this->name().size() > 0) {
318
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
319
this->name().data(), static_cast<int>(this->name().length()),
320
::google::protobuf::internal::WireFormatLite::SERIALIZE,
321
"opencv_tensorflow.TensorShapeProto.Dim.name");
322
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
323
2, this->name(), output);
324
}
325
326
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
327
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
328
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
329
}
330
// @@protoc_insertion_point(serialize_end:opencv_tensorflow.TensorShapeProto.Dim)
331
}
332
333
::google::protobuf::uint8* TensorShapeProto_Dim::InternalSerializeWithCachedSizesToArray(
334
bool deterministic, ::google::protobuf::uint8* target) const {
335
(void)deterministic; // Unused
336
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorShapeProto.Dim)
337
::google::protobuf::uint32 cached_has_bits = 0;
338
(void) cached_has_bits;
339
340
// int64 size = 1;
341
if (this->size() != 0) {
342
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->size(), target);
343
}
344
345
// string name = 2;
346
if (this->name().size() > 0) {
347
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
348
this->name().data(), static_cast<int>(this->name().length()),
349
::google::protobuf::internal::WireFormatLite::SERIALIZE,
350
"opencv_tensorflow.TensorShapeProto.Dim.name");
351
target =
352
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
353
2, this->name(), target);
354
}
355
356
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
357
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
358
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
359
}
360
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorShapeProto.Dim)
361
return target;
362
}
363
364
size_t TensorShapeProto_Dim::ByteSizeLong() const {
365
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto.Dim)
366
size_t total_size = 0;
367
368
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
369
total_size +=
370
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
371
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
372
}
373
// string name = 2;
374
if (this->name().size() > 0) {
375
total_size += 1 +
376
::google::protobuf::internal::WireFormatLite::StringSize(
377
this->name());
378
}
379
380
// int64 size = 1;
381
if (this->size() != 0) {
382
total_size += 1 +
383
::google::protobuf::internal::WireFormatLite::Int64Size(
384
this->size());
385
}
386
387
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
388
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
389
_cached_size_ = cached_size;
390
GOOGLE_SAFE_CONCURRENT_WRITES_END();
391
return total_size;
392
}
393
394
void TensorShapeProto_Dim::MergeFrom(const ::google::protobuf::Message& from) {
395
// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.TensorShapeProto.Dim)
396
GOOGLE_DCHECK_NE(&from, this);
397
const TensorShapeProto_Dim* source =
398
::google::protobuf::internal::DynamicCastToGenerated<const TensorShapeProto_Dim>(
399
&from);
400
if (source == NULL) {
401
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.TensorShapeProto.Dim)
402
::google::protobuf::internal::ReflectionOps::Merge(from, this);
403
} else {
404
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.TensorShapeProto.Dim)
405
MergeFrom(*source);
406
}
407
}
408
409
void TensorShapeProto_Dim::MergeFrom(const TensorShapeProto_Dim& from) {
410
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorShapeProto.Dim)
411
GOOGLE_DCHECK_NE(&from, this);
412
_internal_metadata_.MergeFrom(from._internal_metadata_);
413
::google::protobuf::uint32 cached_has_bits = 0;
414
(void) cached_has_bits;
415
416
if (from.name().size() > 0) {
417
set_name(from.name());
418
}
419
if (from.size() != 0) {
420
set_size(from.size());
421
}
422
}
423
424
void TensorShapeProto_Dim::CopyFrom(const ::google::protobuf::Message& from) {
425
// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.TensorShapeProto.Dim)
426
if (&from == this) return;
427
Clear();
428
MergeFrom(from);
429
}
430
431
void TensorShapeProto_Dim::CopyFrom(const TensorShapeProto_Dim& from) {
432
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorShapeProto.Dim)
433
if (&from == this) return;
434
Clear();
435
MergeFrom(from);
436
}
437
438
bool TensorShapeProto_Dim::IsInitialized() const {
439
return true;
440
}
441
442
void TensorShapeProto_Dim::Swap(TensorShapeProto_Dim* other) {
443
if (other == this) return;
444
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
445
InternalSwap(other);
446
} else {
447
TensorShapeProto_Dim* temp = New(GetArenaNoVirtual());
448
temp->MergeFrom(*other);
449
other->CopyFrom(*this);
450
InternalSwap(temp);
451
if (GetArenaNoVirtual() == NULL) {
452
delete temp;
453
}
454
}
455
}
456
void TensorShapeProto_Dim::UnsafeArenaSwap(TensorShapeProto_Dim* other) {
457
if (other == this) return;
458
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
459
InternalSwap(other);
460
}
461
void TensorShapeProto_Dim::InternalSwap(TensorShapeProto_Dim* other) {
462
using std::swap;
463
name_.Swap(&other->name_);
464
swap(size_, other->size_);
465
_internal_metadata_.Swap(&other->_internal_metadata_);
466
swap(_cached_size_, other->_cached_size_);
467
}
468
469
::google::protobuf::Metadata TensorShapeProto_Dim::GetMetadata() const {
470
protobuf_tensor_5fshape_2eproto::protobuf_AssignDescriptorsOnce();
471
return ::protobuf_tensor_5fshape_2eproto::file_level_metadata[kIndexInFileMessages];
472
}
473
474
475
// ===================================================================
476
477
void TensorShapeProto::InitAsDefaultInstance() {
478
}
479
#if !defined(_MSC_VER) || _MSC_VER >= 1900
480
const int TensorShapeProto::kDimFieldNumber;
481
const int TensorShapeProto::kUnknownRankFieldNumber;
482
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
483
484
TensorShapeProto::TensorShapeProto()
485
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
486
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
487
::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto();
488
}
489
SharedCtor();
490
// @@protoc_insertion_point(constructor:opencv_tensorflow.TensorShapeProto)
491
}
492
TensorShapeProto::TensorShapeProto(::google::protobuf::Arena* arena)
493
: ::google::protobuf::Message(),
494
_internal_metadata_(arena),
495
dim_(arena) {
496
::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto();
497
SharedCtor();
498
RegisterArenaDtor(arena);
499
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto)
500
}
501
TensorShapeProto::TensorShapeProto(const TensorShapeProto& from)
502
: ::google::protobuf::Message(),
503
_internal_metadata_(NULL),
504
dim_(from.dim_),
505
_cached_size_(0) {
506
_internal_metadata_.MergeFrom(from._internal_metadata_);
507
unknown_rank_ = from.unknown_rank_;
508
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorShapeProto)
509
}
510
511
void TensorShapeProto::SharedCtor() {
512
unknown_rank_ = false;
513
_cached_size_ = 0;
514
}
515
516
TensorShapeProto::~TensorShapeProto() {
517
// @@protoc_insertion_point(destructor:opencv_tensorflow.TensorShapeProto)
518
SharedDtor();
519
}
520
521
void TensorShapeProto::SharedDtor() {
522
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
523
}
524
525
void TensorShapeProto::ArenaDtor(void* object) {
526
TensorShapeProto* _this = reinterpret_cast< TensorShapeProto* >(object);
527
(void)_this;
528
}
529
void TensorShapeProto::RegisterArenaDtor(::google::protobuf::Arena* arena) {
530
}
531
void TensorShapeProto::SetCachedSize(int size) const {
532
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
533
_cached_size_ = size;
534
GOOGLE_SAFE_CONCURRENT_WRITES_END();
535
}
536
const ::google::protobuf::Descriptor* TensorShapeProto::descriptor() {
537
::protobuf_tensor_5fshape_2eproto::protobuf_AssignDescriptorsOnce();
538
return ::protobuf_tensor_5fshape_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
539
}
540
541
const TensorShapeProto& TensorShapeProto::default_instance() {
542
::protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto();
543
return *internal_default_instance();
544
}
545
546
TensorShapeProto* TensorShapeProto::New(::google::protobuf::Arena* arena) const {
547
return ::google::protobuf::Arena::CreateMessage<TensorShapeProto>(arena);
548
}
549
550
void TensorShapeProto::Clear() {
551
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto)
552
::google::protobuf::uint32 cached_has_bits = 0;
553
// Prevent compiler warnings about cached_has_bits being unused
554
(void) cached_has_bits;
555
556
dim_.Clear();
557
unknown_rank_ = false;
558
_internal_metadata_.Clear();
559
}
560
561
bool TensorShapeProto::MergePartialFromCodedStream(
562
::google::protobuf::io::CodedInputStream* input) {
563
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
564
::google::protobuf::uint32 tag;
565
// @@protoc_insertion_point(parse_start:opencv_tensorflow.TensorShapeProto)
566
for (;;) {
567
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
568
tag = p.first;
569
if (!p.second) goto handle_unusual;
570
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
571
// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
572
case 2: {
573
if (static_cast< ::google::protobuf::uint8>(tag) ==
574
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
575
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_dim()));
576
} else {
577
goto handle_unusual;
578
}
579
break;
580
}
581
582
// bool unknown_rank = 3;
583
case 3: {
584
if (static_cast< ::google::protobuf::uint8>(tag) ==
585
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
586
587
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
588
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
589
input, &unknown_rank_)));
590
} else {
591
goto handle_unusual;
592
}
593
break;
594
}
595
596
default: {
597
handle_unusual:
598
if (tag == 0) {
599
goto success;
600
}
601
DO_(::google::protobuf::internal::WireFormat::SkipField(
602
input, tag, _internal_metadata_.mutable_unknown_fields()));
603
break;
604
}
605
}
606
}
607
success:
608
// @@protoc_insertion_point(parse_success:opencv_tensorflow.TensorShapeProto)
609
return true;
610
failure:
611
// @@protoc_insertion_point(parse_failure:opencv_tensorflow.TensorShapeProto)
612
return false;
613
#undef DO_
614
}
615
616
void TensorShapeProto::SerializeWithCachedSizes(
617
::google::protobuf::io::CodedOutputStream* output) const {
618
// @@protoc_insertion_point(serialize_start:opencv_tensorflow.TensorShapeProto)
619
::google::protobuf::uint32 cached_has_bits = 0;
620
(void) cached_has_bits;
621
622
// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
623
for (unsigned int i = 0,
624
n = static_cast<unsigned int>(this->dim_size()); i < n; i++) {
625
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
626
2, this->dim(static_cast<int>(i)), output);
627
}
628
629
// bool unknown_rank = 3;
630
if (this->unknown_rank() != 0) {
631
::google::protobuf::internal::WireFormatLite::WriteBool(3, this->unknown_rank(), output);
632
}
633
634
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
635
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
636
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
637
}
638
// @@protoc_insertion_point(serialize_end:opencv_tensorflow.TensorShapeProto)
639
}
640
641
::google::protobuf::uint8* TensorShapeProto::InternalSerializeWithCachedSizesToArray(
642
bool deterministic, ::google::protobuf::uint8* target) const {
643
(void)deterministic; // Unused
644
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorShapeProto)
645
::google::protobuf::uint32 cached_has_bits = 0;
646
(void) cached_has_bits;
647
648
// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
649
for (unsigned int i = 0,
650
n = static_cast<unsigned int>(this->dim_size()); i < n; i++) {
651
target = ::google::protobuf::internal::WireFormatLite::
652
InternalWriteMessageToArray(
653
2, this->dim(static_cast<int>(i)), deterministic, target);
654
}
655
656
// bool unknown_rank = 3;
657
if (this->unknown_rank() != 0) {
658
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->unknown_rank(), target);
659
}
660
661
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
662
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
663
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
664
}
665
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorShapeProto)
666
return target;
667
}
668
669
size_t TensorShapeProto::ByteSizeLong() const {
670
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto)
671
size_t total_size = 0;
672
673
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
674
total_size +=
675
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
676
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
677
}
678
// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
679
{
680
unsigned int count = static_cast<unsigned int>(this->dim_size());
681
total_size += 1UL * count;
682
for (unsigned int i = 0; i < count; i++) {
683
total_size +=
684
::google::protobuf::internal::WireFormatLite::MessageSize(
685
this->dim(static_cast<int>(i)));
686
}
687
}
688
689
// bool unknown_rank = 3;
690
if (this->unknown_rank() != 0) {
691
total_size += 1 + 1;
692
}
693
694
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
695
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
696
_cached_size_ = cached_size;
697
GOOGLE_SAFE_CONCURRENT_WRITES_END();
698
return total_size;
699
}
700
701
void TensorShapeProto::MergeFrom(const ::google::protobuf::Message& from) {
702
// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.TensorShapeProto)
703
GOOGLE_DCHECK_NE(&from, this);
704
const TensorShapeProto* source =
705
::google::protobuf::internal::DynamicCastToGenerated<const TensorShapeProto>(
706
&from);
707
if (source == NULL) {
708
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.TensorShapeProto)
709
::google::protobuf::internal::ReflectionOps::Merge(from, this);
710
} else {
711
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.TensorShapeProto)
712
MergeFrom(*source);
713
}
714
}
715
716
void TensorShapeProto::MergeFrom(const TensorShapeProto& from) {
717
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorShapeProto)
718
GOOGLE_DCHECK_NE(&from, this);
719
_internal_metadata_.MergeFrom(from._internal_metadata_);
720
::google::protobuf::uint32 cached_has_bits = 0;
721
(void) cached_has_bits;
722
723
dim_.MergeFrom(from.dim_);
724
if (from.unknown_rank() != 0) {
725
set_unknown_rank(from.unknown_rank());
726
}
727
}
728
729
void TensorShapeProto::CopyFrom(const ::google::protobuf::Message& from) {
730
// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.TensorShapeProto)
731
if (&from == this) return;
732
Clear();
733
MergeFrom(from);
734
}
735
736
void TensorShapeProto::CopyFrom(const TensorShapeProto& from) {
737
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorShapeProto)
738
if (&from == this) return;
739
Clear();
740
MergeFrom(from);
741
}
742
743
bool TensorShapeProto::IsInitialized() const {
744
return true;
745
}
746
747
void TensorShapeProto::Swap(TensorShapeProto* other) {
748
if (other == this) return;
749
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
750
InternalSwap(other);
751
} else {
752
TensorShapeProto* temp = New(GetArenaNoVirtual());
753
temp->MergeFrom(*other);
754
other->CopyFrom(*this);
755
InternalSwap(temp);
756
if (GetArenaNoVirtual() == NULL) {
757
delete temp;
758
}
759
}
760
}
761
void TensorShapeProto::UnsafeArenaSwap(TensorShapeProto* other) {
762
if (other == this) return;
763
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
764
InternalSwap(other);
765
}
766
void TensorShapeProto::InternalSwap(TensorShapeProto* other) {
767
using std::swap;
768
dim_.InternalSwap(&other->dim_);
769
swap(unknown_rank_, other->unknown_rank_);
770
_internal_metadata_.Swap(&other->_internal_metadata_);
771
swap(_cached_size_, other->_cached_size_);
772
}
773
774
::google::protobuf::Metadata TensorShapeProto::GetMetadata() const {
775
protobuf_tensor_5fshape_2eproto::protobuf_AssignDescriptorsOnce();
776
return ::protobuf_tensor_5fshape_2eproto::file_level_metadata[kIndexInFileMessages];
777
}
778
779
780
// @@protoc_insertion_point(namespace_scope)
781
} // namespace opencv_tensorflow
782
783
// @@protoc_insertion_point(global_scope)
784
785