Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/dnn/misc/tensorflow/function.pb.cc
16358 views
1
// Generated by the protocol buffer compiler. DO NOT EDIT!
2
// source: function.proto
3
4
#include "function.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 FunctionDefLibraryDefaultTypeInternal {
24
public:
25
::google::protobuf::internal::ExplicitlyConstructed<FunctionDefLibrary>
26
_instance;
27
} _FunctionDefLibrary_default_instance_;
28
class FunctionDef_Node_AttrEntry_DoNotUseDefaultTypeInternal {
29
public:
30
::google::protobuf::internal::ExplicitlyConstructed<FunctionDef_Node_AttrEntry_DoNotUse>
31
_instance;
32
} _FunctionDef_Node_AttrEntry_DoNotUse_default_instance_;
33
class FunctionDef_NodeDefaultTypeInternal {
34
public:
35
::google::protobuf::internal::ExplicitlyConstructed<FunctionDef_Node>
36
_instance;
37
} _FunctionDef_Node_default_instance_;
38
class FunctionDefDefaultTypeInternal {
39
public:
40
::google::protobuf::internal::ExplicitlyConstructed<FunctionDef>
41
_instance;
42
} _FunctionDef_default_instance_;
43
class GradientDefDefaultTypeInternal {
44
public:
45
::google::protobuf::internal::ExplicitlyConstructed<GradientDef>
46
_instance;
47
} _GradientDef_default_instance_;
48
} // namespace opencv_tensorflow
49
namespace protobuf_function_2eproto {
50
void InitDefaultsFunctionDefLibraryImpl() {
51
GOOGLE_PROTOBUF_VERIFY_VERSION;
52
53
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
54
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
55
#else
56
::google::protobuf::internal::InitProtobufDefaults();
57
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
58
protobuf_function_2eproto::InitDefaultsFunctionDef();
59
protobuf_function_2eproto::InitDefaultsGradientDef();
60
{
61
void* ptr = &::opencv_tensorflow::_FunctionDefLibrary_default_instance_;
62
new (ptr) ::opencv_tensorflow::FunctionDefLibrary();
63
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
64
}
65
::opencv_tensorflow::FunctionDefLibrary::InitAsDefaultInstance();
66
}
67
68
void InitDefaultsFunctionDefLibrary() {
69
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
70
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsFunctionDefLibraryImpl);
71
}
72
73
void InitDefaultsFunctionDef_Node_AttrEntry_DoNotUseImpl() {
74
GOOGLE_PROTOBUF_VERIFY_VERSION;
75
76
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
77
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
78
#else
79
::google::protobuf::internal::InitProtobufDefaults();
80
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
81
protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue();
82
{
83
void* ptr = &::opencv_tensorflow::_FunctionDef_Node_AttrEntry_DoNotUse_default_instance_;
84
new (ptr) ::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse();
85
}
86
::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse::InitAsDefaultInstance();
87
}
88
89
void InitDefaultsFunctionDef_Node_AttrEntry_DoNotUse() {
90
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
91
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsFunctionDef_Node_AttrEntry_DoNotUseImpl);
92
}
93
94
void InitDefaultsFunctionDef_NodeImpl() {
95
GOOGLE_PROTOBUF_VERIFY_VERSION;
96
97
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
98
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
99
#else
100
::google::protobuf::internal::InitProtobufDefaults();
101
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
102
protobuf_function_2eproto::InitDefaultsFunctionDef_Node_AttrEntry_DoNotUse();
103
{
104
void* ptr = &::opencv_tensorflow::_FunctionDef_Node_default_instance_;
105
new (ptr) ::opencv_tensorflow::FunctionDef_Node();
106
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
107
}
108
::opencv_tensorflow::FunctionDef_Node::InitAsDefaultInstance();
109
}
110
111
void InitDefaultsFunctionDef_Node() {
112
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
113
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsFunctionDef_NodeImpl);
114
}
115
116
void InitDefaultsFunctionDefImpl() {
117
GOOGLE_PROTOBUF_VERIFY_VERSION;
118
119
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
120
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
121
#else
122
::google::protobuf::internal::InitProtobufDefaults();
123
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
124
protobuf_op_5fdef_2eproto::InitDefaultsOpDef();
125
protobuf_function_2eproto::InitDefaultsFunctionDef_Node();
126
{
127
void* ptr = &::opencv_tensorflow::_FunctionDef_default_instance_;
128
new (ptr) ::opencv_tensorflow::FunctionDef();
129
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
130
}
131
::opencv_tensorflow::FunctionDef::InitAsDefaultInstance();
132
}
133
134
void InitDefaultsFunctionDef() {
135
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
136
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsFunctionDefImpl);
137
}
138
139
void InitDefaultsGradientDefImpl() {
140
GOOGLE_PROTOBUF_VERIFY_VERSION;
141
142
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
143
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
144
#else
145
::google::protobuf::internal::InitProtobufDefaults();
146
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
147
{
148
void* ptr = &::opencv_tensorflow::_GradientDef_default_instance_;
149
new (ptr) ::opencv_tensorflow::GradientDef();
150
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
151
}
152
::opencv_tensorflow::GradientDef::InitAsDefaultInstance();
153
}
154
155
void InitDefaultsGradientDef() {
156
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
157
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsGradientDefImpl);
158
}
159
160
::google::protobuf::Metadata file_level_metadata[5];
161
162
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
163
~0u, // no _has_bits_
164
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDefLibrary, _internal_metadata_),
165
~0u, // no _extensions_
166
~0u, // no _oneof_case_
167
~0u, // no _weak_field_map_
168
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDefLibrary, function_),
169
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDefLibrary, gradient_),
170
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, _has_bits_),
171
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, _internal_metadata_),
172
~0u, // no _extensions_
173
~0u, // no _oneof_case_
174
~0u, // no _weak_field_map_
175
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, key_),
176
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, value_),
177
0,
178
1,
179
~0u, // no _has_bits_
180
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, _internal_metadata_),
181
~0u, // no _extensions_
182
~0u, // no _oneof_case_
183
~0u, // no _weak_field_map_
184
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, ret_),
185
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, op_),
186
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, arg_),
187
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, dep_),
188
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, attr_),
189
~0u, // no _has_bits_
190
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, _internal_metadata_),
191
~0u, // no _extensions_
192
~0u, // no _oneof_case_
193
~0u, // no _weak_field_map_
194
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, signature_),
195
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, node_),
196
~0u, // no _has_bits_
197
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GradientDef, _internal_metadata_),
198
~0u, // no _extensions_
199
~0u, // no _oneof_case_
200
~0u, // no _weak_field_map_
201
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GradientDef, function_name_),
202
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::opencv_tensorflow::GradientDef, gradient_func_),
203
};
204
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
205
{ 0, -1, sizeof(::opencv_tensorflow::FunctionDefLibrary)},
206
{ 7, 14, sizeof(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse)},
207
{ 16, -1, sizeof(::opencv_tensorflow::FunctionDef_Node)},
208
{ 26, -1, sizeof(::opencv_tensorflow::FunctionDef)},
209
{ 33, -1, sizeof(::opencv_tensorflow::GradientDef)},
210
};
211
212
static ::google::protobuf::Message const * const file_default_instances[] = {
213
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_FunctionDefLibrary_default_instance_),
214
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_FunctionDef_Node_AttrEntry_DoNotUse_default_instance_),
215
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_FunctionDef_Node_default_instance_),
216
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_FunctionDef_default_instance_),
217
reinterpret_cast<const ::google::protobuf::Message*>(&::opencv_tensorflow::_GradientDef_default_instance_),
218
};
219
220
void protobuf_AssignDescriptors() {
221
AddDescriptors();
222
::google::protobuf::MessageFactory* factory = NULL;
223
AssignDescriptors(
224
"function.proto", schemas, file_default_instances, TableStruct::offsets, factory,
225
file_level_metadata, NULL, NULL);
226
}
227
228
void protobuf_AssignDescriptorsOnce() {
229
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
230
::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
231
}
232
233
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
234
void protobuf_RegisterTypes(const ::std::string&) {
235
protobuf_AssignDescriptorsOnce();
236
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5);
237
}
238
239
void AddDescriptorsImpl() {
240
InitDefaults();
241
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
242
"\n\016function.proto\022\021opencv_tensorflow\032\020att"
243
"r_value.proto\032\014op_def.proto\"x\n\022FunctionD"
244
"efLibrary\0220\n\010function\030\001 \003(\0132\036.opencv_ten"
245
"sorflow.FunctionDef\0220\n\010gradient\030\002 \003(\0132\036."
246
"opencv_tensorflow.GradientDef\"\261\002\n\013Functi"
247
"onDef\022+\n\tsignature\030\001 \001(\0132\030.opencv_tensor"
248
"flow.OpDef\0221\n\004node\030\002 \003(\0132#.opencv_tensor"
249
"flow.FunctionDef.Node\032\301\001\n\004Node\022\013\n\003ret\030\001 "
250
"\003(\t\022\n\n\002op\030\002 \001(\t\022\013\n\003arg\030\003 \003(\t\022\013\n\003dep\030\004 \003("
251
"\t\022;\n\004attr\030\005 \003(\0132-.opencv_tensorflow.Func"
252
"tionDef.Node.AttrEntry\032I\n\tAttrEntry\022\013\n\003k"
253
"ey\030\001 \001(\t\022+\n\005value\030\002 \001(\0132\034.opencv_tensorf"
254
"low.AttrValue:\0028\001\";\n\013GradientDef\022\025\n\rfunc"
255
"tion_name\030\001 \001(\t\022\025\n\rgradient_func\030\002 \001(\tB/"
256
"\n\030org.tensorflow.frameworkB\016FunctionProt"
257
"osP\001\370\001\001b\006proto3"
258
};
259
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
260
descriptor, 615);
261
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
262
"function.proto", &protobuf_RegisterTypes);
263
::protobuf_attr_5fvalue_2eproto::AddDescriptors();
264
::protobuf_op_5fdef_2eproto::AddDescriptors();
265
}
266
267
void AddDescriptors() {
268
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
269
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
270
}
271
// Force AddDescriptors() to be called at dynamic initialization time.
272
struct StaticDescriptorInitializer {
273
StaticDescriptorInitializer() {
274
AddDescriptors();
275
}
276
} static_descriptor_initializer;
277
} // namespace protobuf_function_2eproto
278
namespace opencv_tensorflow {
279
280
// ===================================================================
281
282
void FunctionDefLibrary::InitAsDefaultInstance() {
283
}
284
#if !defined(_MSC_VER) || _MSC_VER >= 1900
285
const int FunctionDefLibrary::kFunctionFieldNumber;
286
const int FunctionDefLibrary::kGradientFieldNumber;
287
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
288
289
FunctionDefLibrary::FunctionDefLibrary()
290
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
291
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
292
::protobuf_function_2eproto::InitDefaultsFunctionDefLibrary();
293
}
294
SharedCtor();
295
// @@protoc_insertion_point(constructor:opencv_tensorflow.FunctionDefLibrary)
296
}
297
FunctionDefLibrary::FunctionDefLibrary(::google::protobuf::Arena* arena)
298
: ::google::protobuf::Message(),
299
_internal_metadata_(arena),
300
function_(arena),
301
gradient_(arena) {
302
::protobuf_function_2eproto::InitDefaultsFunctionDefLibrary();
303
SharedCtor();
304
RegisterArenaDtor(arena);
305
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDefLibrary)
306
}
307
FunctionDefLibrary::FunctionDefLibrary(const FunctionDefLibrary& from)
308
: ::google::protobuf::Message(),
309
_internal_metadata_(NULL),
310
function_(from.function_),
311
gradient_(from.gradient_),
312
_cached_size_(0) {
313
_internal_metadata_.MergeFrom(from._internal_metadata_);
314
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.FunctionDefLibrary)
315
}
316
317
void FunctionDefLibrary::SharedCtor() {
318
_cached_size_ = 0;
319
}
320
321
FunctionDefLibrary::~FunctionDefLibrary() {
322
// @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDefLibrary)
323
SharedDtor();
324
}
325
326
void FunctionDefLibrary::SharedDtor() {
327
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
328
}
329
330
void FunctionDefLibrary::ArenaDtor(void* object) {
331
FunctionDefLibrary* _this = reinterpret_cast< FunctionDefLibrary* >(object);
332
(void)_this;
333
}
334
void FunctionDefLibrary::RegisterArenaDtor(::google::protobuf::Arena* arena) {
335
}
336
void FunctionDefLibrary::SetCachedSize(int size) const {
337
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
338
_cached_size_ = size;
339
GOOGLE_SAFE_CONCURRENT_WRITES_END();
340
}
341
const ::google::protobuf::Descriptor* FunctionDefLibrary::descriptor() {
342
::protobuf_function_2eproto::protobuf_AssignDescriptorsOnce();
343
return ::protobuf_function_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
344
}
345
346
const FunctionDefLibrary& FunctionDefLibrary::default_instance() {
347
::protobuf_function_2eproto::InitDefaultsFunctionDefLibrary();
348
return *internal_default_instance();
349
}
350
351
FunctionDefLibrary* FunctionDefLibrary::New(::google::protobuf::Arena* arena) const {
352
return ::google::protobuf::Arena::CreateMessage<FunctionDefLibrary>(arena);
353
}
354
355
void FunctionDefLibrary::Clear() {
356
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDefLibrary)
357
::google::protobuf::uint32 cached_has_bits = 0;
358
// Prevent compiler warnings about cached_has_bits being unused
359
(void) cached_has_bits;
360
361
function_.Clear();
362
gradient_.Clear();
363
_internal_metadata_.Clear();
364
}
365
366
bool FunctionDefLibrary::MergePartialFromCodedStream(
367
::google::protobuf::io::CodedInputStream* input) {
368
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
369
::google::protobuf::uint32 tag;
370
// @@protoc_insertion_point(parse_start:opencv_tensorflow.FunctionDefLibrary)
371
for (;;) {
372
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
373
tag = p.first;
374
if (!p.second) goto handle_unusual;
375
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
376
// repeated .opencv_tensorflow.FunctionDef function = 1;
377
case 1: {
378
if (static_cast< ::google::protobuf::uint8>(tag) ==
379
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
380
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_function()));
381
} else {
382
goto handle_unusual;
383
}
384
break;
385
}
386
387
// repeated .opencv_tensorflow.GradientDef gradient = 2;
388
case 2: {
389
if (static_cast< ::google::protobuf::uint8>(tag) ==
390
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
391
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_gradient()));
392
} else {
393
goto handle_unusual;
394
}
395
break;
396
}
397
398
default: {
399
handle_unusual:
400
if (tag == 0) {
401
goto success;
402
}
403
DO_(::google::protobuf::internal::WireFormat::SkipField(
404
input, tag, _internal_metadata_.mutable_unknown_fields()));
405
break;
406
}
407
}
408
}
409
success:
410
// @@protoc_insertion_point(parse_success:opencv_tensorflow.FunctionDefLibrary)
411
return true;
412
failure:
413
// @@protoc_insertion_point(parse_failure:opencv_tensorflow.FunctionDefLibrary)
414
return false;
415
#undef DO_
416
}
417
418
void FunctionDefLibrary::SerializeWithCachedSizes(
419
::google::protobuf::io::CodedOutputStream* output) const {
420
// @@protoc_insertion_point(serialize_start:opencv_tensorflow.FunctionDefLibrary)
421
::google::protobuf::uint32 cached_has_bits = 0;
422
(void) cached_has_bits;
423
424
// repeated .opencv_tensorflow.FunctionDef function = 1;
425
for (unsigned int i = 0,
426
n = static_cast<unsigned int>(this->function_size()); i < n; i++) {
427
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
428
1, this->function(static_cast<int>(i)), output);
429
}
430
431
// repeated .opencv_tensorflow.GradientDef gradient = 2;
432
for (unsigned int i = 0,
433
n = static_cast<unsigned int>(this->gradient_size()); i < n; i++) {
434
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
435
2, this->gradient(static_cast<int>(i)), output);
436
}
437
438
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
439
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
440
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
441
}
442
// @@protoc_insertion_point(serialize_end:opencv_tensorflow.FunctionDefLibrary)
443
}
444
445
::google::protobuf::uint8* FunctionDefLibrary::InternalSerializeWithCachedSizesToArray(
446
bool deterministic, ::google::protobuf::uint8* target) const {
447
(void)deterministic; // Unused
448
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.FunctionDefLibrary)
449
::google::protobuf::uint32 cached_has_bits = 0;
450
(void) cached_has_bits;
451
452
// repeated .opencv_tensorflow.FunctionDef function = 1;
453
for (unsigned int i = 0,
454
n = static_cast<unsigned int>(this->function_size()); i < n; i++) {
455
target = ::google::protobuf::internal::WireFormatLite::
456
InternalWriteMessageToArray(
457
1, this->function(static_cast<int>(i)), deterministic, target);
458
}
459
460
// repeated .opencv_tensorflow.GradientDef gradient = 2;
461
for (unsigned int i = 0,
462
n = static_cast<unsigned int>(this->gradient_size()); i < n; i++) {
463
target = ::google::protobuf::internal::WireFormatLite::
464
InternalWriteMessageToArray(
465
2, this->gradient(static_cast<int>(i)), deterministic, target);
466
}
467
468
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
469
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
470
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
471
}
472
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDefLibrary)
473
return target;
474
}
475
476
size_t FunctionDefLibrary::ByteSizeLong() const {
477
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.FunctionDefLibrary)
478
size_t total_size = 0;
479
480
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
481
total_size +=
482
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
483
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
484
}
485
// repeated .opencv_tensorflow.FunctionDef function = 1;
486
{
487
unsigned int count = static_cast<unsigned int>(this->function_size());
488
total_size += 1UL * count;
489
for (unsigned int i = 0; i < count; i++) {
490
total_size +=
491
::google::protobuf::internal::WireFormatLite::MessageSize(
492
this->function(static_cast<int>(i)));
493
}
494
}
495
496
// repeated .opencv_tensorflow.GradientDef gradient = 2;
497
{
498
unsigned int count = static_cast<unsigned int>(this->gradient_size());
499
total_size += 1UL * count;
500
for (unsigned int i = 0; i < count; i++) {
501
total_size +=
502
::google::protobuf::internal::WireFormatLite::MessageSize(
503
this->gradient(static_cast<int>(i)));
504
}
505
}
506
507
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
508
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
509
_cached_size_ = cached_size;
510
GOOGLE_SAFE_CONCURRENT_WRITES_END();
511
return total_size;
512
}
513
514
void FunctionDefLibrary::MergeFrom(const ::google::protobuf::Message& from) {
515
// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.FunctionDefLibrary)
516
GOOGLE_DCHECK_NE(&from, this);
517
const FunctionDefLibrary* source =
518
::google::protobuf::internal::DynamicCastToGenerated<const FunctionDefLibrary>(
519
&from);
520
if (source == NULL) {
521
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.FunctionDefLibrary)
522
::google::protobuf::internal::ReflectionOps::Merge(from, this);
523
} else {
524
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.FunctionDefLibrary)
525
MergeFrom(*source);
526
}
527
}
528
529
void FunctionDefLibrary::MergeFrom(const FunctionDefLibrary& from) {
530
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.FunctionDefLibrary)
531
GOOGLE_DCHECK_NE(&from, this);
532
_internal_metadata_.MergeFrom(from._internal_metadata_);
533
::google::protobuf::uint32 cached_has_bits = 0;
534
(void) cached_has_bits;
535
536
function_.MergeFrom(from.function_);
537
gradient_.MergeFrom(from.gradient_);
538
}
539
540
void FunctionDefLibrary::CopyFrom(const ::google::protobuf::Message& from) {
541
// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.FunctionDefLibrary)
542
if (&from == this) return;
543
Clear();
544
MergeFrom(from);
545
}
546
547
void FunctionDefLibrary::CopyFrom(const FunctionDefLibrary& from) {
548
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.FunctionDefLibrary)
549
if (&from == this) return;
550
Clear();
551
MergeFrom(from);
552
}
553
554
bool FunctionDefLibrary::IsInitialized() const {
555
return true;
556
}
557
558
void FunctionDefLibrary::Swap(FunctionDefLibrary* other) {
559
if (other == this) return;
560
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
561
InternalSwap(other);
562
} else {
563
FunctionDefLibrary* temp = New(GetArenaNoVirtual());
564
temp->MergeFrom(*other);
565
other->CopyFrom(*this);
566
InternalSwap(temp);
567
if (GetArenaNoVirtual() == NULL) {
568
delete temp;
569
}
570
}
571
}
572
void FunctionDefLibrary::UnsafeArenaSwap(FunctionDefLibrary* other) {
573
if (other == this) return;
574
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
575
InternalSwap(other);
576
}
577
void FunctionDefLibrary::InternalSwap(FunctionDefLibrary* other) {
578
using std::swap;
579
function_.InternalSwap(&other->function_);
580
gradient_.InternalSwap(&other->gradient_);
581
_internal_metadata_.Swap(&other->_internal_metadata_);
582
swap(_cached_size_, other->_cached_size_);
583
}
584
585
::google::protobuf::Metadata FunctionDefLibrary::GetMetadata() const {
586
protobuf_function_2eproto::protobuf_AssignDescriptorsOnce();
587
return ::protobuf_function_2eproto::file_level_metadata[kIndexInFileMessages];
588
}
589
590
591
// ===================================================================
592
593
FunctionDef_Node_AttrEntry_DoNotUse::FunctionDef_Node_AttrEntry_DoNotUse() {}
594
FunctionDef_Node_AttrEntry_DoNotUse::FunctionDef_Node_AttrEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
595
void FunctionDef_Node_AttrEntry_DoNotUse::MergeFrom(const FunctionDef_Node_AttrEntry_DoNotUse& other) {
596
MergeFromInternal(other);
597
}
598
::google::protobuf::Metadata FunctionDef_Node_AttrEntry_DoNotUse::GetMetadata() const {
599
::protobuf_function_2eproto::protobuf_AssignDescriptorsOnce();
600
return ::protobuf_function_2eproto::file_level_metadata[1];
601
}
602
void FunctionDef_Node_AttrEntry_DoNotUse::MergeFrom(
603
const ::google::protobuf::Message& other) {
604
::google::protobuf::Message::MergeFrom(other);
605
}
606
607
608
// ===================================================================
609
610
void FunctionDef_Node::InitAsDefaultInstance() {
611
}
612
void FunctionDef_Node::clear_attr() {
613
attr_.Clear();
614
}
615
#if !defined(_MSC_VER) || _MSC_VER >= 1900
616
const int FunctionDef_Node::kRetFieldNumber;
617
const int FunctionDef_Node::kOpFieldNumber;
618
const int FunctionDef_Node::kArgFieldNumber;
619
const int FunctionDef_Node::kDepFieldNumber;
620
const int FunctionDef_Node::kAttrFieldNumber;
621
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
622
623
FunctionDef_Node::FunctionDef_Node()
624
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
625
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
626
::protobuf_function_2eproto::InitDefaultsFunctionDef_Node();
627
}
628
SharedCtor();
629
// @@protoc_insertion_point(constructor:opencv_tensorflow.FunctionDef.Node)
630
}
631
FunctionDef_Node::FunctionDef_Node(::google::protobuf::Arena* arena)
632
: ::google::protobuf::Message(),
633
_internal_metadata_(arena),
634
ret_(arena),
635
arg_(arena),
636
dep_(arena),
637
attr_(arena) {
638
::protobuf_function_2eproto::InitDefaultsFunctionDef_Node();
639
SharedCtor();
640
RegisterArenaDtor(arena);
641
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDef.Node)
642
}
643
FunctionDef_Node::FunctionDef_Node(const FunctionDef_Node& from)
644
: ::google::protobuf::Message(),
645
_internal_metadata_(NULL),
646
ret_(from.ret_),
647
arg_(from.arg_),
648
dep_(from.dep_),
649
_cached_size_(0) {
650
_internal_metadata_.MergeFrom(from._internal_metadata_);
651
attr_.MergeFrom(from.attr_);
652
op_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
653
if (from.op().size() > 0) {
654
op_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.op(),
655
GetArenaNoVirtual());
656
}
657
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.FunctionDef.Node)
658
}
659
660
void FunctionDef_Node::SharedCtor() {
661
op_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
662
_cached_size_ = 0;
663
}
664
665
FunctionDef_Node::~FunctionDef_Node() {
666
// @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDef.Node)
667
SharedDtor();
668
}
669
670
void FunctionDef_Node::SharedDtor() {
671
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
672
op_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
673
}
674
675
void FunctionDef_Node::ArenaDtor(void* object) {
676
FunctionDef_Node* _this = reinterpret_cast< FunctionDef_Node* >(object);
677
(void)_this;
678
}
679
void FunctionDef_Node::RegisterArenaDtor(::google::protobuf::Arena* arena) {
680
}
681
void FunctionDef_Node::SetCachedSize(int size) const {
682
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
683
_cached_size_ = size;
684
GOOGLE_SAFE_CONCURRENT_WRITES_END();
685
}
686
const ::google::protobuf::Descriptor* FunctionDef_Node::descriptor() {
687
::protobuf_function_2eproto::protobuf_AssignDescriptorsOnce();
688
return ::protobuf_function_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
689
}
690
691
const FunctionDef_Node& FunctionDef_Node::default_instance() {
692
::protobuf_function_2eproto::InitDefaultsFunctionDef_Node();
693
return *internal_default_instance();
694
}
695
696
FunctionDef_Node* FunctionDef_Node::New(::google::protobuf::Arena* arena) const {
697
return ::google::protobuf::Arena::CreateMessage<FunctionDef_Node>(arena);
698
}
699
700
void FunctionDef_Node::Clear() {
701
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDef.Node)
702
::google::protobuf::uint32 cached_has_bits = 0;
703
// Prevent compiler warnings about cached_has_bits being unused
704
(void) cached_has_bits;
705
706
ret_.Clear();
707
arg_.Clear();
708
dep_.Clear();
709
attr_.Clear();
710
op_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
711
_internal_metadata_.Clear();
712
}
713
714
bool FunctionDef_Node::MergePartialFromCodedStream(
715
::google::protobuf::io::CodedInputStream* input) {
716
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
717
::google::protobuf::uint32 tag;
718
// @@protoc_insertion_point(parse_start:opencv_tensorflow.FunctionDef.Node)
719
for (;;) {
720
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
721
tag = p.first;
722
if (!p.second) goto handle_unusual;
723
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
724
// repeated string ret = 1;
725
case 1: {
726
if (static_cast< ::google::protobuf::uint8>(tag) ==
727
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
728
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
729
input, this->add_ret()));
730
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
731
this->ret(this->ret_size() - 1).data(),
732
static_cast<int>(this->ret(this->ret_size() - 1).length()),
733
::google::protobuf::internal::WireFormatLite::PARSE,
734
"opencv_tensorflow.FunctionDef.Node.ret"));
735
} else {
736
goto handle_unusual;
737
}
738
break;
739
}
740
741
// string op = 2;
742
case 2: {
743
if (static_cast< ::google::protobuf::uint8>(tag) ==
744
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
745
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
746
input, this->mutable_op()));
747
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
748
this->op().data(), static_cast<int>(this->op().length()),
749
::google::protobuf::internal::WireFormatLite::PARSE,
750
"opencv_tensorflow.FunctionDef.Node.op"));
751
} else {
752
goto handle_unusual;
753
}
754
break;
755
}
756
757
// repeated string arg = 3;
758
case 3: {
759
if (static_cast< ::google::protobuf::uint8>(tag) ==
760
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
761
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
762
input, this->add_arg()));
763
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
764
this->arg(this->arg_size() - 1).data(),
765
static_cast<int>(this->arg(this->arg_size() - 1).length()),
766
::google::protobuf::internal::WireFormatLite::PARSE,
767
"opencv_tensorflow.FunctionDef.Node.arg"));
768
} else {
769
goto handle_unusual;
770
}
771
break;
772
}
773
774
// repeated string dep = 4;
775
case 4: {
776
if (static_cast< ::google::protobuf::uint8>(tag) ==
777
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
778
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
779
input, this->add_dep()));
780
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
781
this->dep(this->dep_size() - 1).data(),
782
static_cast<int>(this->dep(this->dep_size() - 1).length()),
783
::google::protobuf::internal::WireFormatLite::PARSE,
784
"opencv_tensorflow.FunctionDef.Node.dep"));
785
} else {
786
goto handle_unusual;
787
}
788
break;
789
}
790
791
// map<string, .opencv_tensorflow.AttrValue> attr = 5;
792
case 5: {
793
if (static_cast< ::google::protobuf::uint8>(tag) ==
794
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
795
FunctionDef_Node_AttrEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
796
FunctionDef_Node_AttrEntry_DoNotUse,
797
::std::string, ::opencv_tensorflow::AttrValue,
798
::google::protobuf::internal::WireFormatLite::TYPE_STRING,
799
::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
800
0 >,
801
::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue > > parser(&attr_);
802
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
803
input, &parser));
804
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
805
parser.key().data(), static_cast<int>(parser.key().length()),
806
::google::protobuf::internal::WireFormatLite::PARSE,
807
"opencv_tensorflow.FunctionDef.Node.AttrEntry.key"));
808
} else {
809
goto handle_unusual;
810
}
811
break;
812
}
813
814
default: {
815
handle_unusual:
816
if (tag == 0) {
817
goto success;
818
}
819
DO_(::google::protobuf::internal::WireFormat::SkipField(
820
input, tag, _internal_metadata_.mutable_unknown_fields()));
821
break;
822
}
823
}
824
}
825
success:
826
// @@protoc_insertion_point(parse_success:opencv_tensorflow.FunctionDef.Node)
827
return true;
828
failure:
829
// @@protoc_insertion_point(parse_failure:opencv_tensorflow.FunctionDef.Node)
830
return false;
831
#undef DO_
832
}
833
834
void FunctionDef_Node::SerializeWithCachedSizes(
835
::google::protobuf::io::CodedOutputStream* output) const {
836
// @@protoc_insertion_point(serialize_start:opencv_tensorflow.FunctionDef.Node)
837
::google::protobuf::uint32 cached_has_bits = 0;
838
(void) cached_has_bits;
839
840
// repeated string ret = 1;
841
for (int i = 0, n = this->ret_size(); i < n; i++) {
842
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
843
this->ret(i).data(), static_cast<int>(this->ret(i).length()),
844
::google::protobuf::internal::WireFormatLite::SERIALIZE,
845
"opencv_tensorflow.FunctionDef.Node.ret");
846
::google::protobuf::internal::WireFormatLite::WriteString(
847
1, this->ret(i), output);
848
}
849
850
// string op = 2;
851
if (this->op().size() > 0) {
852
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
853
this->op().data(), static_cast<int>(this->op().length()),
854
::google::protobuf::internal::WireFormatLite::SERIALIZE,
855
"opencv_tensorflow.FunctionDef.Node.op");
856
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
857
2, this->op(), output);
858
}
859
860
// repeated string arg = 3;
861
for (int i = 0, n = this->arg_size(); i < n; i++) {
862
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
863
this->arg(i).data(), static_cast<int>(this->arg(i).length()),
864
::google::protobuf::internal::WireFormatLite::SERIALIZE,
865
"opencv_tensorflow.FunctionDef.Node.arg");
866
::google::protobuf::internal::WireFormatLite::WriteString(
867
3, this->arg(i), output);
868
}
869
870
// repeated string dep = 4;
871
for (int i = 0, n = this->dep_size(); i < n; i++) {
872
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
873
this->dep(i).data(), static_cast<int>(this->dep(i).length()),
874
::google::protobuf::internal::WireFormatLite::SERIALIZE,
875
"opencv_tensorflow.FunctionDef.Node.dep");
876
::google::protobuf::internal::WireFormatLite::WriteString(
877
4, this->dep(i), output);
878
}
879
880
// map<string, .opencv_tensorflow.AttrValue> attr = 5;
881
if (!this->attr().empty()) {
882
typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_pointer
883
ConstPtr;
884
typedef ConstPtr SortItem;
885
typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
886
struct Utf8Check {
887
static void Check(ConstPtr p) {
888
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
889
p->first.data(), static_cast<int>(p->first.length()),
890
::google::protobuf::internal::WireFormatLite::SERIALIZE,
891
"opencv_tensorflow.FunctionDef.Node.AttrEntry.key");
892
}
893
};
894
895
if (output->IsSerializationDeterministic() &&
896
this->attr().size() > 1) {
897
::google::protobuf::scoped_array<SortItem> items(
898
new SortItem[this->attr().size()]);
899
typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::size_type size_type;
900
size_type n = 0;
901
for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator
902
it = this->attr().begin();
903
it != this->attr().end(); ++it, ++n) {
904
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
905
}
906
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
907
::google::protobuf::scoped_ptr<FunctionDef_Node_AttrEntry_DoNotUse> entry;
908
for (size_type i = 0; i < n; i++) {
909
entry.reset(attr_.NewEntryWrapper(
910
items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
911
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
912
5, *entry, output);
913
if (entry->GetArena() != NULL) {
914
entry.release();
915
}
916
Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
917
}
918
} else {
919
::google::protobuf::scoped_ptr<FunctionDef_Node_AttrEntry_DoNotUse> entry;
920
for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator
921
it = this->attr().begin();
922
it != this->attr().end(); ++it) {
923
entry.reset(attr_.NewEntryWrapper(
924
it->first, it->second));
925
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
926
5, *entry, output);
927
if (entry->GetArena() != NULL) {
928
entry.release();
929
}
930
Utf8Check::Check(&*it);
931
}
932
}
933
}
934
935
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
936
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
937
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
938
}
939
// @@protoc_insertion_point(serialize_end:opencv_tensorflow.FunctionDef.Node)
940
}
941
942
::google::protobuf::uint8* FunctionDef_Node::InternalSerializeWithCachedSizesToArray(
943
bool deterministic, ::google::protobuf::uint8* target) const {
944
(void)deterministic; // Unused
945
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.FunctionDef.Node)
946
::google::protobuf::uint32 cached_has_bits = 0;
947
(void) cached_has_bits;
948
949
// repeated string ret = 1;
950
for (int i = 0, n = this->ret_size(); i < n; i++) {
951
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
952
this->ret(i).data(), static_cast<int>(this->ret(i).length()),
953
::google::protobuf::internal::WireFormatLite::SERIALIZE,
954
"opencv_tensorflow.FunctionDef.Node.ret");
955
target = ::google::protobuf::internal::WireFormatLite::
956
WriteStringToArray(1, this->ret(i), target);
957
}
958
959
// string op = 2;
960
if (this->op().size() > 0) {
961
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
962
this->op().data(), static_cast<int>(this->op().length()),
963
::google::protobuf::internal::WireFormatLite::SERIALIZE,
964
"opencv_tensorflow.FunctionDef.Node.op");
965
target =
966
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
967
2, this->op(), target);
968
}
969
970
// repeated string arg = 3;
971
for (int i = 0, n = this->arg_size(); i < n; i++) {
972
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
973
this->arg(i).data(), static_cast<int>(this->arg(i).length()),
974
::google::protobuf::internal::WireFormatLite::SERIALIZE,
975
"opencv_tensorflow.FunctionDef.Node.arg");
976
target = ::google::protobuf::internal::WireFormatLite::
977
WriteStringToArray(3, this->arg(i), target);
978
}
979
980
// repeated string dep = 4;
981
for (int i = 0, n = this->dep_size(); i < n; i++) {
982
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
983
this->dep(i).data(), static_cast<int>(this->dep(i).length()),
984
::google::protobuf::internal::WireFormatLite::SERIALIZE,
985
"opencv_tensorflow.FunctionDef.Node.dep");
986
target = ::google::protobuf::internal::WireFormatLite::
987
WriteStringToArray(4, this->dep(i), target);
988
}
989
990
// map<string, .opencv_tensorflow.AttrValue> attr = 5;
991
if (!this->attr().empty()) {
992
typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_pointer
993
ConstPtr;
994
typedef ConstPtr SortItem;
995
typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
996
struct Utf8Check {
997
static void Check(ConstPtr p) {
998
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
999
p->first.data(), static_cast<int>(p->first.length()),
1000
::google::protobuf::internal::WireFormatLite::SERIALIZE,
1001
"opencv_tensorflow.FunctionDef.Node.AttrEntry.key");
1002
}
1003
};
1004
1005
if (deterministic &&
1006
this->attr().size() > 1) {
1007
::google::protobuf::scoped_array<SortItem> items(
1008
new SortItem[this->attr().size()]);
1009
typedef ::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::size_type size_type;
1010
size_type n = 0;
1011
for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator
1012
it = this->attr().begin();
1013
it != this->attr().end(); ++it, ++n) {
1014
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
1015
}
1016
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
1017
::google::protobuf::scoped_ptr<FunctionDef_Node_AttrEntry_DoNotUse> entry;
1018
for (size_type i = 0; i < n; i++) {
1019
entry.reset(attr_.NewEntryWrapper(
1020
items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
1021
target = ::google::protobuf::internal::WireFormatLite::
1022
InternalWriteMessageNoVirtualToArray(
1023
5, *entry, deterministic, target);
1024
;
1025
if (entry->GetArena() != NULL) {
1026
entry.release();
1027
}
1028
Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
1029
}
1030
} else {
1031
::google::protobuf::scoped_ptr<FunctionDef_Node_AttrEntry_DoNotUse> entry;
1032
for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator
1033
it = this->attr().begin();
1034
it != this->attr().end(); ++it) {
1035
entry.reset(attr_.NewEntryWrapper(
1036
it->first, it->second));
1037
target = ::google::protobuf::internal::WireFormatLite::
1038
InternalWriteMessageNoVirtualToArray(
1039
5, *entry, deterministic, target);
1040
;
1041
if (entry->GetArena() != NULL) {
1042
entry.release();
1043
}
1044
Utf8Check::Check(&*it);
1045
}
1046
}
1047
}
1048
1049
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
1050
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1051
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
1052
}
1053
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDef.Node)
1054
return target;
1055
}
1056
1057
size_t FunctionDef_Node::ByteSizeLong() const {
1058
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.FunctionDef.Node)
1059
size_t total_size = 0;
1060
1061
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
1062
total_size +=
1063
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1064
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
1065
}
1066
// repeated string ret = 1;
1067
total_size += 1 *
1068
::google::protobuf::internal::FromIntSize(this->ret_size());
1069
for (int i = 0, n = this->ret_size(); i < n; i++) {
1070
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
1071
this->ret(i));
1072
}
1073
1074
// repeated string arg = 3;
1075
total_size += 1 *
1076
::google::protobuf::internal::FromIntSize(this->arg_size());
1077
for (int i = 0, n = this->arg_size(); i < n; i++) {
1078
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
1079
this->arg(i));
1080
}
1081
1082
// repeated string dep = 4;
1083
total_size += 1 *
1084
::google::protobuf::internal::FromIntSize(this->dep_size());
1085
for (int i = 0, n = this->dep_size(); i < n; i++) {
1086
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
1087
this->dep(i));
1088
}
1089
1090
// map<string, .opencv_tensorflow.AttrValue> attr = 5;
1091
total_size += 1 *
1092
::google::protobuf::internal::FromIntSize(this->attr_size());
1093
{
1094
::google::protobuf::scoped_ptr<FunctionDef_Node_AttrEntry_DoNotUse> entry;
1095
for (::google::protobuf::Map< ::std::string, ::opencv_tensorflow::AttrValue >::const_iterator
1096
it = this->attr().begin();
1097
it != this->attr().end(); ++it) {
1098
if (entry.get() != NULL && entry->GetArena() != NULL) {
1099
entry.release();
1100
}
1101
entry.reset(attr_.NewEntryWrapper(it->first, it->second));
1102
total_size += ::google::protobuf::internal::WireFormatLite::
1103
MessageSizeNoVirtual(*entry);
1104
}
1105
if (entry.get() != NULL && entry->GetArena() != NULL) {
1106
entry.release();
1107
}
1108
}
1109
1110
// string op = 2;
1111
if (this->op().size() > 0) {
1112
total_size += 1 +
1113
::google::protobuf::internal::WireFormatLite::StringSize(
1114
this->op());
1115
}
1116
1117
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1118
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1119
_cached_size_ = cached_size;
1120
GOOGLE_SAFE_CONCURRENT_WRITES_END();
1121
return total_size;
1122
}
1123
1124
void FunctionDef_Node::MergeFrom(const ::google::protobuf::Message& from) {
1125
// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.FunctionDef.Node)
1126
GOOGLE_DCHECK_NE(&from, this);
1127
const FunctionDef_Node* source =
1128
::google::protobuf::internal::DynamicCastToGenerated<const FunctionDef_Node>(
1129
&from);
1130
if (source == NULL) {
1131
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.FunctionDef.Node)
1132
::google::protobuf::internal::ReflectionOps::Merge(from, this);
1133
} else {
1134
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.FunctionDef.Node)
1135
MergeFrom(*source);
1136
}
1137
}
1138
1139
void FunctionDef_Node::MergeFrom(const FunctionDef_Node& from) {
1140
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.FunctionDef.Node)
1141
GOOGLE_DCHECK_NE(&from, this);
1142
_internal_metadata_.MergeFrom(from._internal_metadata_);
1143
::google::protobuf::uint32 cached_has_bits = 0;
1144
(void) cached_has_bits;
1145
1146
ret_.MergeFrom(from.ret_);
1147
arg_.MergeFrom(from.arg_);
1148
dep_.MergeFrom(from.dep_);
1149
attr_.MergeFrom(from.attr_);
1150
if (from.op().size() > 0) {
1151
set_op(from.op());
1152
}
1153
}
1154
1155
void FunctionDef_Node::CopyFrom(const ::google::protobuf::Message& from) {
1156
// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.FunctionDef.Node)
1157
if (&from == this) return;
1158
Clear();
1159
MergeFrom(from);
1160
}
1161
1162
void FunctionDef_Node::CopyFrom(const FunctionDef_Node& from) {
1163
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.FunctionDef.Node)
1164
if (&from == this) return;
1165
Clear();
1166
MergeFrom(from);
1167
}
1168
1169
bool FunctionDef_Node::IsInitialized() const {
1170
return true;
1171
}
1172
1173
void FunctionDef_Node::Swap(FunctionDef_Node* other) {
1174
if (other == this) return;
1175
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
1176
InternalSwap(other);
1177
} else {
1178
FunctionDef_Node* temp = New(GetArenaNoVirtual());
1179
temp->MergeFrom(*other);
1180
other->CopyFrom(*this);
1181
InternalSwap(temp);
1182
if (GetArenaNoVirtual() == NULL) {
1183
delete temp;
1184
}
1185
}
1186
}
1187
void FunctionDef_Node::UnsafeArenaSwap(FunctionDef_Node* other) {
1188
if (other == this) return;
1189
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
1190
InternalSwap(other);
1191
}
1192
void FunctionDef_Node::InternalSwap(FunctionDef_Node* other) {
1193
using std::swap;
1194
ret_.InternalSwap(&other->ret_);
1195
arg_.InternalSwap(&other->arg_);
1196
dep_.InternalSwap(&other->dep_);
1197
attr_.Swap(&other->attr_);
1198
op_.Swap(&other->op_);
1199
_internal_metadata_.Swap(&other->_internal_metadata_);
1200
swap(_cached_size_, other->_cached_size_);
1201
}
1202
1203
::google::protobuf::Metadata FunctionDef_Node::GetMetadata() const {
1204
protobuf_function_2eproto::protobuf_AssignDescriptorsOnce();
1205
return ::protobuf_function_2eproto::file_level_metadata[kIndexInFileMessages];
1206
}
1207
1208
1209
// ===================================================================
1210
1211
void FunctionDef::InitAsDefaultInstance() {
1212
::opencv_tensorflow::_FunctionDef_default_instance_._instance.get_mutable()->signature_ = const_cast< ::opencv_tensorflow::OpDef*>(
1213
::opencv_tensorflow::OpDef::internal_default_instance());
1214
}
1215
void FunctionDef::_slow_mutable_signature() {
1216
signature_ = ::google::protobuf::Arena::CreateMessage< ::opencv_tensorflow::OpDef >(
1217
GetArenaNoVirtual());
1218
}
1219
void FunctionDef::unsafe_arena_set_allocated_signature(
1220
::opencv_tensorflow::OpDef* signature) {
1221
if (GetArenaNoVirtual() == NULL) {
1222
delete signature_;
1223
}
1224
signature_ = signature;
1225
if (signature) {
1226
1227
} else {
1228
1229
}
1230
// @@protoc_insertion_point(field_unsafe_arena_set_allocated:opencv_tensorflow.FunctionDef.signature)
1231
}
1232
void FunctionDef::clear_signature() {
1233
if (GetArenaNoVirtual() == NULL && signature_ != NULL) {
1234
delete signature_;
1235
}
1236
signature_ = NULL;
1237
}
1238
#if !defined(_MSC_VER) || _MSC_VER >= 1900
1239
const int FunctionDef::kSignatureFieldNumber;
1240
const int FunctionDef::kNodeFieldNumber;
1241
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
1242
1243
FunctionDef::FunctionDef()
1244
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
1245
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
1246
::protobuf_function_2eproto::InitDefaultsFunctionDef();
1247
}
1248
SharedCtor();
1249
// @@protoc_insertion_point(constructor:opencv_tensorflow.FunctionDef)
1250
}
1251
FunctionDef::FunctionDef(::google::protobuf::Arena* arena)
1252
: ::google::protobuf::Message(),
1253
_internal_metadata_(arena),
1254
node_(arena) {
1255
::protobuf_function_2eproto::InitDefaultsFunctionDef();
1256
SharedCtor();
1257
RegisterArenaDtor(arena);
1258
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDef)
1259
}
1260
FunctionDef::FunctionDef(const FunctionDef& from)
1261
: ::google::protobuf::Message(),
1262
_internal_metadata_(NULL),
1263
node_(from.node_),
1264
_cached_size_(0) {
1265
_internal_metadata_.MergeFrom(from._internal_metadata_);
1266
if (from.has_signature()) {
1267
signature_ = new ::opencv_tensorflow::OpDef(*from.signature_);
1268
} else {
1269
signature_ = NULL;
1270
}
1271
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.FunctionDef)
1272
}
1273
1274
void FunctionDef::SharedCtor() {
1275
signature_ = NULL;
1276
_cached_size_ = 0;
1277
}
1278
1279
FunctionDef::~FunctionDef() {
1280
// @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDef)
1281
SharedDtor();
1282
}
1283
1284
void FunctionDef::SharedDtor() {
1285
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
1286
if (this != internal_default_instance()) delete signature_;
1287
}
1288
1289
void FunctionDef::ArenaDtor(void* object) {
1290
FunctionDef* _this = reinterpret_cast< FunctionDef* >(object);
1291
(void)_this;
1292
}
1293
void FunctionDef::RegisterArenaDtor(::google::protobuf::Arena* arena) {
1294
}
1295
void FunctionDef::SetCachedSize(int size) const {
1296
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1297
_cached_size_ = size;
1298
GOOGLE_SAFE_CONCURRENT_WRITES_END();
1299
}
1300
const ::google::protobuf::Descriptor* FunctionDef::descriptor() {
1301
::protobuf_function_2eproto::protobuf_AssignDescriptorsOnce();
1302
return ::protobuf_function_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
1303
}
1304
1305
const FunctionDef& FunctionDef::default_instance() {
1306
::protobuf_function_2eproto::InitDefaultsFunctionDef();
1307
return *internal_default_instance();
1308
}
1309
1310
FunctionDef* FunctionDef::New(::google::protobuf::Arena* arena) const {
1311
return ::google::protobuf::Arena::CreateMessage<FunctionDef>(arena);
1312
}
1313
1314
void FunctionDef::Clear() {
1315
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDef)
1316
::google::protobuf::uint32 cached_has_bits = 0;
1317
// Prevent compiler warnings about cached_has_bits being unused
1318
(void) cached_has_bits;
1319
1320
node_.Clear();
1321
if (GetArenaNoVirtual() == NULL && signature_ != NULL) {
1322
delete signature_;
1323
}
1324
signature_ = NULL;
1325
_internal_metadata_.Clear();
1326
}
1327
1328
bool FunctionDef::MergePartialFromCodedStream(
1329
::google::protobuf::io::CodedInputStream* input) {
1330
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
1331
::google::protobuf::uint32 tag;
1332
// @@protoc_insertion_point(parse_start:opencv_tensorflow.FunctionDef)
1333
for (;;) {
1334
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1335
tag = p.first;
1336
if (!p.second) goto handle_unusual;
1337
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1338
// .opencv_tensorflow.OpDef signature = 1;
1339
case 1: {
1340
if (static_cast< ::google::protobuf::uint8>(tag) ==
1341
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
1342
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
1343
input, mutable_signature()));
1344
} else {
1345
goto handle_unusual;
1346
}
1347
break;
1348
}
1349
1350
// repeated .opencv_tensorflow.FunctionDef.Node node = 2;
1351
case 2: {
1352
if (static_cast< ::google::protobuf::uint8>(tag) ==
1353
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
1354
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_node()));
1355
} else {
1356
goto handle_unusual;
1357
}
1358
break;
1359
}
1360
1361
default: {
1362
handle_unusual:
1363
if (tag == 0) {
1364
goto success;
1365
}
1366
DO_(::google::protobuf::internal::WireFormat::SkipField(
1367
input, tag, _internal_metadata_.mutable_unknown_fields()));
1368
break;
1369
}
1370
}
1371
}
1372
success:
1373
// @@protoc_insertion_point(parse_success:opencv_tensorflow.FunctionDef)
1374
return true;
1375
failure:
1376
// @@protoc_insertion_point(parse_failure:opencv_tensorflow.FunctionDef)
1377
return false;
1378
#undef DO_
1379
}
1380
1381
void FunctionDef::SerializeWithCachedSizes(
1382
::google::protobuf::io::CodedOutputStream* output) const {
1383
// @@protoc_insertion_point(serialize_start:opencv_tensorflow.FunctionDef)
1384
::google::protobuf::uint32 cached_has_bits = 0;
1385
(void) cached_has_bits;
1386
1387
// .opencv_tensorflow.OpDef signature = 1;
1388
if (this->has_signature()) {
1389
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1390
1, *this->signature_, output);
1391
}
1392
1393
// repeated .opencv_tensorflow.FunctionDef.Node node = 2;
1394
for (unsigned int i = 0,
1395
n = static_cast<unsigned int>(this->node_size()); i < n; i++) {
1396
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1397
2, this->node(static_cast<int>(i)), output);
1398
}
1399
1400
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
1401
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1402
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
1403
}
1404
// @@protoc_insertion_point(serialize_end:opencv_tensorflow.FunctionDef)
1405
}
1406
1407
::google::protobuf::uint8* FunctionDef::InternalSerializeWithCachedSizesToArray(
1408
bool deterministic, ::google::protobuf::uint8* target) const {
1409
(void)deterministic; // Unused
1410
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.FunctionDef)
1411
::google::protobuf::uint32 cached_has_bits = 0;
1412
(void) cached_has_bits;
1413
1414
// .opencv_tensorflow.OpDef signature = 1;
1415
if (this->has_signature()) {
1416
target = ::google::protobuf::internal::WireFormatLite::
1417
InternalWriteMessageToArray(
1418
1, *this->signature_, deterministic, target);
1419
}
1420
1421
// repeated .opencv_tensorflow.FunctionDef.Node node = 2;
1422
for (unsigned int i = 0,
1423
n = static_cast<unsigned int>(this->node_size()); i < n; i++) {
1424
target = ::google::protobuf::internal::WireFormatLite::
1425
InternalWriteMessageToArray(
1426
2, this->node(static_cast<int>(i)), deterministic, target);
1427
}
1428
1429
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
1430
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1431
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
1432
}
1433
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDef)
1434
return target;
1435
}
1436
1437
size_t FunctionDef::ByteSizeLong() const {
1438
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.FunctionDef)
1439
size_t total_size = 0;
1440
1441
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
1442
total_size +=
1443
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1444
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
1445
}
1446
// repeated .opencv_tensorflow.FunctionDef.Node node = 2;
1447
{
1448
unsigned int count = static_cast<unsigned int>(this->node_size());
1449
total_size += 1UL * count;
1450
for (unsigned int i = 0; i < count; i++) {
1451
total_size +=
1452
::google::protobuf::internal::WireFormatLite::MessageSize(
1453
this->node(static_cast<int>(i)));
1454
}
1455
}
1456
1457
// .opencv_tensorflow.OpDef signature = 1;
1458
if (this->has_signature()) {
1459
total_size += 1 +
1460
::google::protobuf::internal::WireFormatLite::MessageSize(
1461
*this->signature_);
1462
}
1463
1464
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1465
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1466
_cached_size_ = cached_size;
1467
GOOGLE_SAFE_CONCURRENT_WRITES_END();
1468
return total_size;
1469
}
1470
1471
void FunctionDef::MergeFrom(const ::google::protobuf::Message& from) {
1472
// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.FunctionDef)
1473
GOOGLE_DCHECK_NE(&from, this);
1474
const FunctionDef* source =
1475
::google::protobuf::internal::DynamicCastToGenerated<const FunctionDef>(
1476
&from);
1477
if (source == NULL) {
1478
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.FunctionDef)
1479
::google::protobuf::internal::ReflectionOps::Merge(from, this);
1480
} else {
1481
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.FunctionDef)
1482
MergeFrom(*source);
1483
}
1484
}
1485
1486
void FunctionDef::MergeFrom(const FunctionDef& from) {
1487
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.FunctionDef)
1488
GOOGLE_DCHECK_NE(&from, this);
1489
_internal_metadata_.MergeFrom(from._internal_metadata_);
1490
::google::protobuf::uint32 cached_has_bits = 0;
1491
(void) cached_has_bits;
1492
1493
node_.MergeFrom(from.node_);
1494
if (from.has_signature()) {
1495
mutable_signature()->::opencv_tensorflow::OpDef::MergeFrom(from.signature());
1496
}
1497
}
1498
1499
void FunctionDef::CopyFrom(const ::google::protobuf::Message& from) {
1500
// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.FunctionDef)
1501
if (&from == this) return;
1502
Clear();
1503
MergeFrom(from);
1504
}
1505
1506
void FunctionDef::CopyFrom(const FunctionDef& from) {
1507
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.FunctionDef)
1508
if (&from == this) return;
1509
Clear();
1510
MergeFrom(from);
1511
}
1512
1513
bool FunctionDef::IsInitialized() const {
1514
return true;
1515
}
1516
1517
void FunctionDef::Swap(FunctionDef* other) {
1518
if (other == this) return;
1519
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
1520
InternalSwap(other);
1521
} else {
1522
FunctionDef* temp = New(GetArenaNoVirtual());
1523
temp->MergeFrom(*other);
1524
other->CopyFrom(*this);
1525
InternalSwap(temp);
1526
if (GetArenaNoVirtual() == NULL) {
1527
delete temp;
1528
}
1529
}
1530
}
1531
void FunctionDef::UnsafeArenaSwap(FunctionDef* other) {
1532
if (other == this) return;
1533
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
1534
InternalSwap(other);
1535
}
1536
void FunctionDef::InternalSwap(FunctionDef* other) {
1537
using std::swap;
1538
node_.InternalSwap(&other->node_);
1539
swap(signature_, other->signature_);
1540
_internal_metadata_.Swap(&other->_internal_metadata_);
1541
swap(_cached_size_, other->_cached_size_);
1542
}
1543
1544
::google::protobuf::Metadata FunctionDef::GetMetadata() const {
1545
protobuf_function_2eproto::protobuf_AssignDescriptorsOnce();
1546
return ::protobuf_function_2eproto::file_level_metadata[kIndexInFileMessages];
1547
}
1548
1549
1550
// ===================================================================
1551
1552
void GradientDef::InitAsDefaultInstance() {
1553
}
1554
#if !defined(_MSC_VER) || _MSC_VER >= 1900
1555
const int GradientDef::kFunctionNameFieldNumber;
1556
const int GradientDef::kGradientFuncFieldNumber;
1557
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
1558
1559
GradientDef::GradientDef()
1560
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
1561
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
1562
::protobuf_function_2eproto::InitDefaultsGradientDef();
1563
}
1564
SharedCtor();
1565
// @@protoc_insertion_point(constructor:opencv_tensorflow.GradientDef)
1566
}
1567
GradientDef::GradientDef(::google::protobuf::Arena* arena)
1568
: ::google::protobuf::Message(),
1569
_internal_metadata_(arena) {
1570
::protobuf_function_2eproto::InitDefaultsGradientDef();
1571
SharedCtor();
1572
RegisterArenaDtor(arena);
1573
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.GradientDef)
1574
}
1575
GradientDef::GradientDef(const GradientDef& from)
1576
: ::google::protobuf::Message(),
1577
_internal_metadata_(NULL),
1578
_cached_size_(0) {
1579
_internal_metadata_.MergeFrom(from._internal_metadata_);
1580
function_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1581
if (from.function_name().size() > 0) {
1582
function_name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.function_name(),
1583
GetArenaNoVirtual());
1584
}
1585
gradient_func_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1586
if (from.gradient_func().size() > 0) {
1587
gradient_func_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.gradient_func(),
1588
GetArenaNoVirtual());
1589
}
1590
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.GradientDef)
1591
}
1592
1593
void GradientDef::SharedCtor() {
1594
function_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1595
gradient_func_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1596
_cached_size_ = 0;
1597
}
1598
1599
GradientDef::~GradientDef() {
1600
// @@protoc_insertion_point(destructor:opencv_tensorflow.GradientDef)
1601
SharedDtor();
1602
}
1603
1604
void GradientDef::SharedDtor() {
1605
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
1606
function_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1607
gradient_func_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1608
}
1609
1610
void GradientDef::ArenaDtor(void* object) {
1611
GradientDef* _this = reinterpret_cast< GradientDef* >(object);
1612
(void)_this;
1613
}
1614
void GradientDef::RegisterArenaDtor(::google::protobuf::Arena* arena) {
1615
}
1616
void GradientDef::SetCachedSize(int size) const {
1617
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1618
_cached_size_ = size;
1619
GOOGLE_SAFE_CONCURRENT_WRITES_END();
1620
}
1621
const ::google::protobuf::Descriptor* GradientDef::descriptor() {
1622
::protobuf_function_2eproto::protobuf_AssignDescriptorsOnce();
1623
return ::protobuf_function_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
1624
}
1625
1626
const GradientDef& GradientDef::default_instance() {
1627
::protobuf_function_2eproto::InitDefaultsGradientDef();
1628
return *internal_default_instance();
1629
}
1630
1631
GradientDef* GradientDef::New(::google::protobuf::Arena* arena) const {
1632
return ::google::protobuf::Arena::CreateMessage<GradientDef>(arena);
1633
}
1634
1635
void GradientDef::Clear() {
1636
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.GradientDef)
1637
::google::protobuf::uint32 cached_has_bits = 0;
1638
// Prevent compiler warnings about cached_has_bits being unused
1639
(void) cached_has_bits;
1640
1641
function_name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1642
gradient_func_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
1643
_internal_metadata_.Clear();
1644
}
1645
1646
bool GradientDef::MergePartialFromCodedStream(
1647
::google::protobuf::io::CodedInputStream* input) {
1648
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
1649
::google::protobuf::uint32 tag;
1650
// @@protoc_insertion_point(parse_start:opencv_tensorflow.GradientDef)
1651
for (;;) {
1652
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1653
tag = p.first;
1654
if (!p.second) goto handle_unusual;
1655
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1656
// string function_name = 1;
1657
case 1: {
1658
if (static_cast< ::google::protobuf::uint8>(tag) ==
1659
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
1660
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1661
input, this->mutable_function_name()));
1662
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1663
this->function_name().data(), static_cast<int>(this->function_name().length()),
1664
::google::protobuf::internal::WireFormatLite::PARSE,
1665
"opencv_tensorflow.GradientDef.function_name"));
1666
} else {
1667
goto handle_unusual;
1668
}
1669
break;
1670
}
1671
1672
// string gradient_func = 2;
1673
case 2: {
1674
if (static_cast< ::google::protobuf::uint8>(tag) ==
1675
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
1676
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
1677
input, this->mutable_gradient_func()));
1678
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1679
this->gradient_func().data(), static_cast<int>(this->gradient_func().length()),
1680
::google::protobuf::internal::WireFormatLite::PARSE,
1681
"opencv_tensorflow.GradientDef.gradient_func"));
1682
} else {
1683
goto handle_unusual;
1684
}
1685
break;
1686
}
1687
1688
default: {
1689
handle_unusual:
1690
if (tag == 0) {
1691
goto success;
1692
}
1693
DO_(::google::protobuf::internal::WireFormat::SkipField(
1694
input, tag, _internal_metadata_.mutable_unknown_fields()));
1695
break;
1696
}
1697
}
1698
}
1699
success:
1700
// @@protoc_insertion_point(parse_success:opencv_tensorflow.GradientDef)
1701
return true;
1702
failure:
1703
// @@protoc_insertion_point(parse_failure:opencv_tensorflow.GradientDef)
1704
return false;
1705
#undef DO_
1706
}
1707
1708
void GradientDef::SerializeWithCachedSizes(
1709
::google::protobuf::io::CodedOutputStream* output) const {
1710
// @@protoc_insertion_point(serialize_start:opencv_tensorflow.GradientDef)
1711
::google::protobuf::uint32 cached_has_bits = 0;
1712
(void) cached_has_bits;
1713
1714
// string function_name = 1;
1715
if (this->function_name().size() > 0) {
1716
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1717
this->function_name().data(), static_cast<int>(this->function_name().length()),
1718
::google::protobuf::internal::WireFormatLite::SERIALIZE,
1719
"opencv_tensorflow.GradientDef.function_name");
1720
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1721
1, this->function_name(), output);
1722
}
1723
1724
// string gradient_func = 2;
1725
if (this->gradient_func().size() > 0) {
1726
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1727
this->gradient_func().data(), static_cast<int>(this->gradient_func().length()),
1728
::google::protobuf::internal::WireFormatLite::SERIALIZE,
1729
"opencv_tensorflow.GradientDef.gradient_func");
1730
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
1731
2, this->gradient_func(), output);
1732
}
1733
1734
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
1735
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1736
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
1737
}
1738
// @@protoc_insertion_point(serialize_end:opencv_tensorflow.GradientDef)
1739
}
1740
1741
::google::protobuf::uint8* GradientDef::InternalSerializeWithCachedSizesToArray(
1742
bool deterministic, ::google::protobuf::uint8* target) const {
1743
(void)deterministic; // Unused
1744
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.GradientDef)
1745
::google::protobuf::uint32 cached_has_bits = 0;
1746
(void) cached_has_bits;
1747
1748
// string function_name = 1;
1749
if (this->function_name().size() > 0) {
1750
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1751
this->function_name().data(), static_cast<int>(this->function_name().length()),
1752
::google::protobuf::internal::WireFormatLite::SERIALIZE,
1753
"opencv_tensorflow.GradientDef.function_name");
1754
target =
1755
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1756
1, this->function_name(), target);
1757
}
1758
1759
// string gradient_func = 2;
1760
if (this->gradient_func().size() > 0) {
1761
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
1762
this->gradient_func().data(), static_cast<int>(this->gradient_func().length()),
1763
::google::protobuf::internal::WireFormatLite::SERIALIZE,
1764
"opencv_tensorflow.GradientDef.gradient_func");
1765
target =
1766
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1767
2, this->gradient_func(), target);
1768
}
1769
1770
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
1771
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1772
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
1773
}
1774
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.GradientDef)
1775
return target;
1776
}
1777
1778
size_t GradientDef::ByteSizeLong() const {
1779
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.GradientDef)
1780
size_t total_size = 0;
1781
1782
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
1783
total_size +=
1784
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1785
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
1786
}
1787
// string function_name = 1;
1788
if (this->function_name().size() > 0) {
1789
total_size += 1 +
1790
::google::protobuf::internal::WireFormatLite::StringSize(
1791
this->function_name());
1792
}
1793
1794
// string gradient_func = 2;
1795
if (this->gradient_func().size() > 0) {
1796
total_size += 1 +
1797
::google::protobuf::internal::WireFormatLite::StringSize(
1798
this->gradient_func());
1799
}
1800
1801
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1802
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1803
_cached_size_ = cached_size;
1804
GOOGLE_SAFE_CONCURRENT_WRITES_END();
1805
return total_size;
1806
}
1807
1808
void GradientDef::MergeFrom(const ::google::protobuf::Message& from) {
1809
// @@protoc_insertion_point(generalized_merge_from_start:opencv_tensorflow.GradientDef)
1810
GOOGLE_DCHECK_NE(&from, this);
1811
const GradientDef* source =
1812
::google::protobuf::internal::DynamicCastToGenerated<const GradientDef>(
1813
&from);
1814
if (source == NULL) {
1815
// @@protoc_insertion_point(generalized_merge_from_cast_fail:opencv_tensorflow.GradientDef)
1816
::google::protobuf::internal::ReflectionOps::Merge(from, this);
1817
} else {
1818
// @@protoc_insertion_point(generalized_merge_from_cast_success:opencv_tensorflow.GradientDef)
1819
MergeFrom(*source);
1820
}
1821
}
1822
1823
void GradientDef::MergeFrom(const GradientDef& from) {
1824
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.GradientDef)
1825
GOOGLE_DCHECK_NE(&from, this);
1826
_internal_metadata_.MergeFrom(from._internal_metadata_);
1827
::google::protobuf::uint32 cached_has_bits = 0;
1828
(void) cached_has_bits;
1829
1830
if (from.function_name().size() > 0) {
1831
set_function_name(from.function_name());
1832
}
1833
if (from.gradient_func().size() > 0) {
1834
set_gradient_func(from.gradient_func());
1835
}
1836
}
1837
1838
void GradientDef::CopyFrom(const ::google::protobuf::Message& from) {
1839
// @@protoc_insertion_point(generalized_copy_from_start:opencv_tensorflow.GradientDef)
1840
if (&from == this) return;
1841
Clear();
1842
MergeFrom(from);
1843
}
1844
1845
void GradientDef::CopyFrom(const GradientDef& from) {
1846
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.GradientDef)
1847
if (&from == this) return;
1848
Clear();
1849
MergeFrom(from);
1850
}
1851
1852
bool GradientDef::IsInitialized() const {
1853
return true;
1854
}
1855
1856
void GradientDef::Swap(GradientDef* other) {
1857
if (other == this) return;
1858
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
1859
InternalSwap(other);
1860
} else {
1861
GradientDef* temp = New(GetArenaNoVirtual());
1862
temp->MergeFrom(*other);
1863
other->CopyFrom(*this);
1864
InternalSwap(temp);
1865
if (GetArenaNoVirtual() == NULL) {
1866
delete temp;
1867
}
1868
}
1869
}
1870
void GradientDef::UnsafeArenaSwap(GradientDef* other) {
1871
if (other == this) return;
1872
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
1873
InternalSwap(other);
1874
}
1875
void GradientDef::InternalSwap(GradientDef* other) {
1876
using std::swap;
1877
function_name_.Swap(&other->function_name_);
1878
gradient_func_.Swap(&other->gradient_func_);
1879
_internal_metadata_.Swap(&other->_internal_metadata_);
1880
swap(_cached_size_, other->_cached_size_);
1881
}
1882
1883
::google::protobuf::Metadata GradientDef::GetMetadata() const {
1884
protobuf_function_2eproto::protobuf_AssignDescriptorsOnce();
1885
return ::protobuf_function_2eproto::file_level_metadata[kIndexInFileMessages];
1886
}
1887
1888
1889
// @@protoc_insertion_point(namespace_scope)
1890
} // namespace opencv_tensorflow
1891
1892
// @@protoc_insertion_point(global_scope)
1893
1894