2017-06-26 18:35:51 +08:00
|
|
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
|
|
// source: function.proto
|
|
|
|
|
|
|
|
#include "function.pb.h"
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
#include <google/protobuf/io/coded_stream.h>
|
2021-11-10 20:03:45 +08:00
|
|
|
#include <google/protobuf/extension_set.h>
|
|
|
|
#include <google/protobuf/wire_format_lite.h>
|
2017-06-26 18:35:51 +08:00
|
|
|
#include <google/protobuf/descriptor.h>
|
|
|
|
#include <google/protobuf/generated_message_reflection.h>
|
|
|
|
#include <google/protobuf/reflection_ops.h>
|
|
|
|
#include <google/protobuf/wire_format.h>
|
|
|
|
// @@protoc_insertion_point(includes)
|
2021-11-10 20:03:45 +08:00
|
|
|
#include <google/protobuf/port_def.inc>
|
|
|
|
|
|
|
|
PROTOBUF_PRAGMA_INIT_SEG
|
2018-09-13 02:33:45 +08:00
|
|
|
namespace opencv_tensorflow {
|
2021-11-10 20:03:45 +08:00
|
|
|
constexpr FunctionDefLibrary::FunctionDefLibrary(
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
|
|
|
|
: function_()
|
|
|
|
, gradient_(){}
|
|
|
|
struct FunctionDefLibraryDefaultTypeInternal {
|
|
|
|
constexpr FunctionDefLibraryDefaultTypeInternal()
|
|
|
|
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
|
|
|
|
~FunctionDefLibraryDefaultTypeInternal() {}
|
|
|
|
union {
|
|
|
|
FunctionDefLibrary _instance;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FunctionDefLibraryDefaultTypeInternal _FunctionDefLibrary_default_instance_;
|
|
|
|
constexpr FunctionDef_Node_AttrEntry_DoNotUse::FunctionDef_Node_AttrEntry_DoNotUse(
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
|
|
|
|
struct FunctionDef_Node_AttrEntry_DoNotUseDefaultTypeInternal {
|
|
|
|
constexpr FunctionDef_Node_AttrEntry_DoNotUseDefaultTypeInternal()
|
|
|
|
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
|
|
|
|
~FunctionDef_Node_AttrEntry_DoNotUseDefaultTypeInternal() {}
|
|
|
|
union {
|
|
|
|
FunctionDef_Node_AttrEntry_DoNotUse _instance;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FunctionDef_Node_AttrEntry_DoNotUseDefaultTypeInternal _FunctionDef_Node_AttrEntry_DoNotUse_default_instance_;
|
|
|
|
constexpr FunctionDef_Node::FunctionDef_Node(
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
|
|
|
|
: ret_()
|
|
|
|
, arg_()
|
|
|
|
, dep_()
|
|
|
|
, attr_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
|
|
|
|
, op_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
|
|
|
|
struct FunctionDef_NodeDefaultTypeInternal {
|
|
|
|
constexpr FunctionDef_NodeDefaultTypeInternal()
|
|
|
|
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
|
|
|
|
~FunctionDef_NodeDefaultTypeInternal() {}
|
|
|
|
union {
|
|
|
|
FunctionDef_Node _instance;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FunctionDef_NodeDefaultTypeInternal _FunctionDef_Node_default_instance_;
|
|
|
|
constexpr FunctionDef::FunctionDef(
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
|
|
|
|
: node_()
|
|
|
|
, signature_(nullptr){}
|
|
|
|
struct FunctionDefDefaultTypeInternal {
|
|
|
|
constexpr FunctionDefDefaultTypeInternal()
|
|
|
|
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
|
|
|
|
~FunctionDefDefaultTypeInternal() {}
|
|
|
|
union {
|
|
|
|
FunctionDef _instance;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FunctionDefDefaultTypeInternal _FunctionDef_default_instance_;
|
|
|
|
constexpr GradientDef::GradientDef(
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
|
|
|
|
: function_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
|
|
|
|
, gradient_func_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
|
|
|
|
struct GradientDefDefaultTypeInternal {
|
|
|
|
constexpr GradientDefDefaultTypeInternal()
|
|
|
|
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
|
|
|
|
~GradientDefDefaultTypeInternal() {}
|
|
|
|
union {
|
|
|
|
GradientDef _instance;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GradientDefDefaultTypeInternal _GradientDef_default_instance_;
|
2018-09-13 02:33:45 +08:00
|
|
|
} // namespace opencv_tensorflow
|
2021-11-10 20:03:45 +08:00
|
|
|
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_function_2eproto[5];
|
|
|
|
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_function_2eproto = nullptr;
|
|
|
|
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_function_2eproto = nullptr;
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
const uint32_t TableStruct_function_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
2018-01-15 23:51:38 +08:00
|
|
|
~0u, // no _has_bits_
|
2021-11-10 20:03:45 +08:00
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDefLibrary, _internal_metadata_),
|
2018-01-15 23:51:38 +08:00
|
|
|
~0u, // no _extensions_
|
|
|
|
~0u, // no _oneof_case_
|
|
|
|
~0u, // no _weak_field_map_
|
2021-11-10 20:03:45 +08:00
|
|
|
~0u, // no _inlined_string_donated_
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDefLibrary, function_),
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDefLibrary, gradient_),
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, _has_bits_),
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, _internal_metadata_),
|
2018-01-15 23:51:38 +08:00
|
|
|
~0u, // no _extensions_
|
|
|
|
~0u, // no _oneof_case_
|
|
|
|
~0u, // no _weak_field_map_
|
2021-11-10 20:03:45 +08:00
|
|
|
~0u, // no _inlined_string_donated_
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, key_),
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse, value_),
|
2018-01-15 23:51:38 +08:00
|
|
|
0,
|
|
|
|
1,
|
|
|
|
~0u, // no _has_bits_
|
2021-11-10 20:03:45 +08:00
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, _internal_metadata_),
|
2018-01-15 23:51:38 +08:00
|
|
|
~0u, // no _extensions_
|
|
|
|
~0u, // no _oneof_case_
|
|
|
|
~0u, // no _weak_field_map_
|
2021-11-10 20:03:45 +08:00
|
|
|
~0u, // no _inlined_string_donated_
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, ret_),
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, op_),
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, arg_),
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, dep_),
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef_Node, attr_),
|
2018-01-15 23:51:38 +08:00
|
|
|
~0u, // no _has_bits_
|
2021-11-10 20:03:45 +08:00
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, _internal_metadata_),
|
2018-01-15 23:51:38 +08:00
|
|
|
~0u, // no _extensions_
|
|
|
|
~0u, // no _oneof_case_
|
|
|
|
~0u, // no _weak_field_map_
|
2021-11-10 20:03:45 +08:00
|
|
|
~0u, // no _inlined_string_donated_
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, signature_),
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::FunctionDef, node_),
|
2018-01-15 23:51:38 +08:00
|
|
|
~0u, // no _has_bits_
|
2021-11-10 20:03:45 +08:00
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GradientDef, _internal_metadata_),
|
2018-01-15 23:51:38 +08:00
|
|
|
~0u, // no _extensions_
|
|
|
|
~0u, // no _oneof_case_
|
|
|
|
~0u, // no _weak_field_map_
|
2021-11-10 20:03:45 +08:00
|
|
|
~0u, // no _inlined_string_donated_
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GradientDef, function_name_),
|
|
|
|
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GradientDef, gradient_func_),
|
2018-01-15 23:51:38 +08:00
|
|
|
};
|
2021-11-10 20:03:45 +08:00
|
|
|
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
|
{ 0, -1, -1, sizeof(::opencv_tensorflow::FunctionDefLibrary)},
|
|
|
|
{ 8, 16, -1, sizeof(::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse)},
|
|
|
|
{ 18, -1, -1, sizeof(::opencv_tensorflow::FunctionDef_Node)},
|
|
|
|
{ 29, -1, -1, sizeof(::opencv_tensorflow::FunctionDef)},
|
|
|
|
{ 37, -1, -1, sizeof(::opencv_tensorflow::GradientDef)},
|
2018-01-15 23:51:38 +08:00
|
|
|
};
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
|
|
|
|
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_FunctionDefLibrary_default_instance_),
|
|
|
|
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_FunctionDef_Node_AttrEntry_DoNotUse_default_instance_),
|
|
|
|
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_FunctionDef_Node_default_instance_),
|
|
|
|
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_FunctionDef_default_instance_),
|
|
|
|
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_GradientDef_default_instance_),
|
2018-01-15 23:51:38 +08:00
|
|
|
};
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
const char descriptor_table_protodef_function_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
|
|
|
|
"\n\016function.proto\022\021opencv_tensorflow\032\020att"
|
|
|
|
"r_value.proto\032\014op_def.proto\"x\n\022FunctionD"
|
|
|
|
"efLibrary\0220\n\010function\030\001 \003(\0132\036.opencv_ten"
|
|
|
|
"sorflow.FunctionDef\0220\n\010gradient\030\002 \003(\0132\036."
|
|
|
|
"opencv_tensorflow.GradientDef\"\261\002\n\013Functi"
|
|
|
|
"onDef\022+\n\tsignature\030\001 \001(\0132\030.opencv_tensor"
|
|
|
|
"flow.OpDef\0221\n\004node\030\002 \003(\0132#.opencv_tensor"
|
|
|
|
"flow.FunctionDef.Node\032\301\001\n\004Node\022\013\n\003ret\030\001 "
|
|
|
|
"\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("
|
|
|
|
"\t\022;\n\004attr\030\005 \003(\0132-.opencv_tensorflow.Func"
|
|
|
|
"tionDef.Node.AttrEntry\032I\n\tAttrEntry\022\013\n\003k"
|
|
|
|
"ey\030\001 \001(\t\022+\n\005value\030\002 \001(\0132\034.opencv_tensorf"
|
|
|
|
"low.AttrValue:\0028\001\";\n\013GradientDef\022\025\n\rfunc"
|
|
|
|
"tion_name\030\001 \001(\t\022\025\n\rgradient_func\030\002 \001(\tB/"
|
|
|
|
"\n\030org.tensorflow.frameworkB\016FunctionProt"
|
|
|
|
"osP\001\370\001\001b\006proto3"
|
|
|
|
;
|
|
|
|
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_function_2eproto_deps[2] = {
|
|
|
|
&::descriptor_table_attr_5fvalue_2eproto,
|
|
|
|
&::descriptor_table_op_5fdef_2eproto,
|
|
|
|
};
|
|
|
|
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_function_2eproto_once;
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_function_2eproto = {
|
|
|
|
false, false, 615, descriptor_table_protodef_function_2eproto, "function.proto",
|
|
|
|
&descriptor_table_function_2eproto_once, descriptor_table_function_2eproto_deps, 2, 5,
|
|
|
|
schemas, file_default_instances, TableStruct_function_2eproto::offsets,
|
|
|
|
file_level_metadata_function_2eproto, file_level_enum_descriptors_function_2eproto, file_level_service_descriptors_function_2eproto,
|
|
|
|
};
|
|
|
|
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_function_2eproto_getter() {
|
|
|
|
return &descriptor_table_function_2eproto;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Force running AddDescriptors() at dynamic initialization time.
|
|
|
|
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_function_2eproto(&descriptor_table_function_2eproto);
|
2018-09-13 02:33:45 +08:00
|
|
|
namespace opencv_tensorflow {
|
2017-06-26 18:35:51 +08:00
|
|
|
|
|
|
|
// ===================================================================
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
class FunctionDefLibrary::_Internal {
|
|
|
|
public:
|
|
|
|
};
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
FunctionDefLibrary::FunctionDefLibrary(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
|
|
bool is_message_owned)
|
|
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
|
2017-06-26 18:35:51 +08:00
|
|
|
function_(arena),
|
|
|
|
gradient_(arena) {
|
|
|
|
SharedCtor();
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!is_message_owned) {
|
|
|
|
RegisterArenaDtor(arena);
|
|
|
|
}
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDefLibrary)
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
FunctionDefLibrary::FunctionDefLibrary(const FunctionDefLibrary& from)
|
2021-11-10 20:03:45 +08:00
|
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
2018-01-15 23:51:38 +08:00
|
|
|
function_(from.function_),
|
2021-11-10 20:03:45 +08:00
|
|
|
gradient_(from.gradient_) {
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.FunctionDefLibrary)
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
inline void FunctionDefLibrary::SharedCtor() {
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
FunctionDefLibrary::~FunctionDefLibrary() {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDefLibrary)
|
2021-11-10 20:03:45 +08:00
|
|
|
if (GetArenaForAllocation() != nullptr) return;
|
2017-06-26 18:35:51 +08:00
|
|
|
SharedDtor();
|
2021-11-10 20:03:45 +08:00
|
|
|
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
inline void FunctionDefLibrary::SharedDtor() {
|
|
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDefLibrary::ArenaDtor(void* object) {
|
|
|
|
FunctionDefLibrary* _this = reinterpret_cast< FunctionDefLibrary* >(object);
|
|
|
|
(void)_this;
|
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
void FunctionDefLibrary::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
void FunctionDefLibrary::SetCachedSize(int size) const {
|
2021-11-10 20:03:45 +08:00
|
|
|
_cached_size_.Set(size);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDefLibrary::Clear() {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDefLibrary)
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
function_.Clear();
|
|
|
|
gradient_.Clear();
|
2021-11-10 20:03:45 +08:00
|
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* FunctionDefLibrary::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
|
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
|
|
while (!ctx->Done(&ptr)) {
|
|
|
|
uint32_t tag;
|
|
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
|
|
|
switch (tag >> 3) {
|
2018-09-13 02:33:45 +08:00
|
|
|
// repeated .opencv_tensorflow.FunctionDef function = 1;
|
2021-11-10 20:03:45 +08:00
|
|
|
case 1:
|
|
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
|
|
ptr -= 1;
|
|
|
|
do {
|
|
|
|
ptr += 1;
|
|
|
|
ptr = ctx->ParseMessage(_internal_add_function(), ptr);
|
|
|
|
CHK_(ptr);
|
|
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
|
|
|
|
} else
|
2017-06-26 18:35:51 +08:00
|
|
|
goto handle_unusual;
|
2021-11-10 20:03:45 +08:00
|
|
|
continue;
|
2018-09-13 02:33:45 +08:00
|
|
|
// repeated .opencv_tensorflow.GradientDef gradient = 2;
|
2021-11-10 20:03:45 +08:00
|
|
|
case 2:
|
|
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
|
|
ptr -= 1;
|
|
|
|
do {
|
|
|
|
ptr += 1;
|
|
|
|
ptr = ctx->ParseMessage(_internal_add_gradient(), ptr);
|
|
|
|
CHK_(ptr);
|
|
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
|
|
|
|
} else
|
2017-06-26 18:35:51 +08:00
|
|
|
goto handle_unusual;
|
2021-11-10 20:03:45 +08:00
|
|
|
continue;
|
|
|
|
default:
|
|
|
|
goto handle_unusual;
|
|
|
|
} // switch
|
|
|
|
handle_unusual:
|
|
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
|
|
CHK_(ptr);
|
|
|
|
ctx->SetLastTag(tag);
|
|
|
|
goto message_done;
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
ptr = UnknownFieldParse(
|
|
|
|
tag,
|
|
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
|
|
ptr, ctx);
|
|
|
|
CHK_(ptr != nullptr);
|
|
|
|
} // while
|
|
|
|
message_done:
|
|
|
|
return ptr;
|
2017-06-26 18:35:51 +08:00
|
|
|
failure:
|
2021-11-10 20:03:45 +08:00
|
|
|
ptr = nullptr;
|
|
|
|
goto message_done;
|
|
|
|
#undef CHK_
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
uint8_t* FunctionDefLibrary::_InternalSerialize(
|
|
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.FunctionDefLibrary)
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2018-09-13 02:33:45 +08:00
|
|
|
// repeated .opencv_tensorflow.FunctionDef function = 1;
|
2018-01-15 23:51:38 +08:00
|
|
|
for (unsigned int i = 0,
|
2021-11-10 20:03:45 +08:00
|
|
|
n = static_cast<unsigned int>(this->_internal_function_size()); i < n; i++) {
|
|
|
|
target = stream->EnsureSpace(target);
|
|
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
|
|
InternalWriteMessage(1, this->_internal_function(i), target, stream);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-09-13 02:33:45 +08:00
|
|
|
// repeated .opencv_tensorflow.GradientDef gradient = 2;
|
2018-01-15 23:51:38 +08:00
|
|
|
for (unsigned int i = 0,
|
2021-11-10 20:03:45 +08:00
|
|
|
n = static_cast<unsigned int>(this->_internal_gradient_size()); i < n; i++) {
|
|
|
|
target = stream->EnsureSpace(target);
|
|
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
|
|
InternalWriteMessage(2, this->_internal_gradient(i), target, stream);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
2018-01-15 23:51:38 +08:00
|
|
|
}
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDefLibrary)
|
2017-06-26 18:35:51 +08:00
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t FunctionDefLibrary::ByteSizeLong() const {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.FunctionDefLibrary)
|
2017-06-26 18:35:51 +08:00
|
|
|
size_t total_size = 0;
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
|
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2018-09-13 02:33:45 +08:00
|
|
|
// repeated .opencv_tensorflow.FunctionDef function = 1;
|
2021-11-10 20:03:45 +08:00
|
|
|
total_size += 1UL * this->_internal_function_size();
|
|
|
|
for (const auto& msg : this->function_) {
|
|
|
|
total_size +=
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-09-13 02:33:45 +08:00
|
|
|
// repeated .opencv_tensorflow.GradientDef gradient = 2;
|
2021-11-10 20:03:45 +08:00
|
|
|
total_size += 1UL * this->_internal_gradient_size();
|
|
|
|
for (const auto& msg : this->gradient_) {
|
|
|
|
total_size +=
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FunctionDefLibrary::_class_data_ = {
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
|
|
|
|
FunctionDefLibrary::MergeImpl
|
|
|
|
};
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FunctionDefLibrary::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
|
|
void FunctionDefLibrary::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
|
|
static_cast<FunctionDefLibrary *>(to)->MergeFrom(
|
|
|
|
static_cast<const FunctionDefLibrary &>(from));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
void FunctionDefLibrary::MergeFrom(const FunctionDefLibrary& from) {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.FunctionDefLibrary)
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK_NE(&from, this);
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
(void) cached_has_bits;
|
2017-06-26 18:35:51 +08:00
|
|
|
|
|
|
|
function_.MergeFrom(from.function_);
|
|
|
|
gradient_.MergeFrom(from.gradient_);
|
2021-11-10 20:03:45 +08:00
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDefLibrary::CopyFrom(const FunctionDefLibrary& from) {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.FunctionDefLibrary)
|
2017-06-26 18:35:51 +08:00
|
|
|
if (&from == this) return;
|
|
|
|
Clear();
|
2018-01-15 23:51:38 +08:00
|
|
|
MergeFrom(from);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool FunctionDefLibrary::IsInitialized() const {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDefLibrary::InternalSwap(FunctionDefLibrary* other) {
|
2018-01-15 23:51:38 +08:00
|
|
|
using std::swap;
|
2021-11-10 20:03:45 +08:00
|
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
2018-01-15 23:51:38 +08:00
|
|
|
function_.InternalSwap(&other->function_);
|
|
|
|
gradient_.InternalSwap(&other->gradient_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata FunctionDefLibrary::GetMetadata() const {
|
|
|
|
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
|
|
|
|
&descriptor_table_function_2eproto_getter, &descriptor_table_function_2eproto_once,
|
|
|
|
file_level_metadata_function_2eproto[0]);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// ===================================================================
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
FunctionDef_Node_AttrEntry_DoNotUse::FunctionDef_Node_AttrEntry_DoNotUse() {}
|
2021-11-10 20:03:45 +08:00
|
|
|
FunctionDef_Node_AttrEntry_DoNotUse::FunctionDef_Node_AttrEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
|
|
|
|
: SuperType(arena) {}
|
2018-01-15 23:51:38 +08:00
|
|
|
void FunctionDef_Node_AttrEntry_DoNotUse::MergeFrom(const FunctionDef_Node_AttrEntry_DoNotUse& other) {
|
|
|
|
MergeFromInternal(other);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata FunctionDef_Node_AttrEntry_DoNotUse::GetMetadata() const {
|
|
|
|
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
|
|
|
|
&descriptor_table_function_2eproto_getter, &descriptor_table_function_2eproto_once,
|
|
|
|
file_level_metadata_function_2eproto[1]);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// ===================================================================
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
class FunctionDef_Node::_Internal {
|
|
|
|
public:
|
|
|
|
};
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
void FunctionDef_Node::clear_attr() {
|
|
|
|
attr_.Clear();
|
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
FunctionDef_Node::FunctionDef_Node(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
|
|
bool is_message_owned)
|
|
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
|
2017-06-26 18:35:51 +08:00
|
|
|
ret_(arena),
|
|
|
|
arg_(arena),
|
|
|
|
dep_(arena),
|
|
|
|
attr_(arena) {
|
|
|
|
SharedCtor();
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!is_message_owned) {
|
|
|
|
RegisterArenaDtor(arena);
|
|
|
|
}
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDef.Node)
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
FunctionDef_Node::FunctionDef_Node(const FunctionDef_Node& from)
|
2021-11-10 20:03:45 +08:00
|
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
2018-01-15 23:51:38 +08:00
|
|
|
ret_(from.ret_),
|
|
|
|
arg_(from.arg_),
|
2021-11-10 20:03:45 +08:00
|
|
|
dep_(from.dep_) {
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
2018-01-15 23:51:38 +08:00
|
|
|
attr_.MergeFrom(from.attr_);
|
2021-11-10 20:03:45 +08:00
|
|
|
op_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
|
|
op_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
|
|
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
|
|
if (!from._internal_op().empty()) {
|
|
|
|
op_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_op(),
|
|
|
|
GetArenaForAllocation());
|
2018-01-15 23:51:38 +08:00
|
|
|
}
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.FunctionDef.Node)
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
inline void FunctionDef_Node::SharedCtor() {
|
|
|
|
op_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
|
|
op_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
|
|
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
FunctionDef_Node::~FunctionDef_Node() {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDef.Node)
|
2021-11-10 20:03:45 +08:00
|
|
|
if (GetArenaForAllocation() != nullptr) return;
|
2017-06-26 18:35:51 +08:00
|
|
|
SharedDtor();
|
2021-11-10 20:03:45 +08:00
|
|
|
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
inline void FunctionDef_Node::SharedDtor() {
|
|
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
|
|
op_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDef_Node::ArenaDtor(void* object) {
|
|
|
|
FunctionDef_Node* _this = reinterpret_cast< FunctionDef_Node* >(object);
|
|
|
|
(void)_this;
|
2021-11-10 20:03:45 +08:00
|
|
|
_this->attr_. ~MapField();
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
inline void FunctionDef_Node::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) {
|
|
|
|
if (arena != nullptr) {
|
|
|
|
arena->OwnCustomDestructor(this, &FunctionDef_Node::ArenaDtor);
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
void FunctionDef_Node::SetCachedSize(int size) const {
|
2021-11-10 20:03:45 +08:00
|
|
|
_cached_size_.Set(size);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDef_Node::Clear() {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDef.Node)
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
ret_.Clear();
|
|
|
|
arg_.Clear();
|
|
|
|
dep_.Clear();
|
|
|
|
attr_.Clear();
|
2021-11-10 20:03:45 +08:00
|
|
|
op_.ClearToEmpty();
|
|
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* FunctionDef_Node::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
|
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
|
|
while (!ctx->Done(&ptr)) {
|
|
|
|
uint32_t tag;
|
|
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
|
|
|
switch (tag >> 3) {
|
2017-06-26 18:35:51 +08:00
|
|
|
// repeated string ret = 1;
|
2021-11-10 20:03:45 +08:00
|
|
|
case 1:
|
|
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
|
|
ptr -= 1;
|
|
|
|
do {
|
|
|
|
ptr += 1;
|
|
|
|
auto str = _internal_add_ret();
|
|
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
|
|
|
|
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.FunctionDef.Node.ret"));
|
|
|
|
CHK_(ptr);
|
|
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
|
|
|
|
} else
|
2017-06-26 18:35:51 +08:00
|
|
|
goto handle_unusual;
|
2021-11-10 20:03:45 +08:00
|
|
|
continue;
|
2018-01-15 23:51:38 +08:00
|
|
|
// string op = 2;
|
2021-11-10 20:03:45 +08:00
|
|
|
case 2:
|
|
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
|
|
auto str = _internal_mutable_op();
|
|
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
|
|
|
|
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.FunctionDef.Node.op"));
|
|
|
|
CHK_(ptr);
|
|
|
|
} else
|
2017-06-26 18:35:51 +08:00
|
|
|
goto handle_unusual;
|
2021-11-10 20:03:45 +08:00
|
|
|
continue;
|
2017-06-26 18:35:51 +08:00
|
|
|
// repeated string arg = 3;
|
2021-11-10 20:03:45 +08:00
|
|
|
case 3:
|
|
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
|
|
|
|
ptr -= 1;
|
|
|
|
do {
|
|
|
|
ptr += 1;
|
|
|
|
auto str = _internal_add_arg();
|
|
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
|
|
|
|
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.FunctionDef.Node.arg"));
|
|
|
|
CHK_(ptr);
|
|
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
|
|
|
|
} else
|
2017-06-26 18:35:51 +08:00
|
|
|
goto handle_unusual;
|
2021-11-10 20:03:45 +08:00
|
|
|
continue;
|
2017-06-26 18:35:51 +08:00
|
|
|
// repeated string dep = 4;
|
2021-11-10 20:03:45 +08:00
|
|
|
case 4:
|
|
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
|
|
|
|
ptr -= 1;
|
|
|
|
do {
|
|
|
|
ptr += 1;
|
|
|
|
auto str = _internal_add_dep();
|
|
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
|
|
|
|
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.FunctionDef.Node.dep"));
|
|
|
|
CHK_(ptr);
|
|
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
|
|
|
|
} else
|
2017-06-26 18:35:51 +08:00
|
|
|
goto handle_unusual;
|
2021-11-10 20:03:45 +08:00
|
|
|
continue;
|
2018-09-13 02:33:45 +08:00
|
|
|
// map<string, .opencv_tensorflow.AttrValue> attr = 5;
|
2021-11-10 20:03:45 +08:00
|
|
|
case 5:
|
|
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
|
|
|
|
ptr -= 1;
|
|
|
|
do {
|
|
|
|
ptr += 1;
|
|
|
|
ptr = ctx->ParseMessage(&attr_, ptr);
|
|
|
|
CHK_(ptr);
|
|
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
|
|
|
|
} else
|
2017-06-26 18:35:51 +08:00
|
|
|
goto handle_unusual;
|
2021-11-10 20:03:45 +08:00
|
|
|
continue;
|
|
|
|
default:
|
|
|
|
goto handle_unusual;
|
|
|
|
} // switch
|
|
|
|
handle_unusual:
|
|
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
|
|
CHK_(ptr);
|
|
|
|
ctx->SetLastTag(tag);
|
|
|
|
goto message_done;
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
ptr = UnknownFieldParse(
|
|
|
|
tag,
|
|
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
|
|
ptr, ctx);
|
|
|
|
CHK_(ptr != nullptr);
|
|
|
|
} // while
|
|
|
|
message_done:
|
|
|
|
return ptr;
|
2017-06-26 18:35:51 +08:00
|
|
|
failure:
|
2021-11-10 20:03:45 +08:00
|
|
|
ptr = nullptr;
|
|
|
|
goto message_done;
|
|
|
|
#undef CHK_
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
uint8_t* FunctionDef_Node::_InternalSerialize(
|
|
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.FunctionDef.Node)
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
// repeated string ret = 1;
|
2021-11-10 20:03:45 +08:00
|
|
|
for (int i = 0, n = this->_internal_ret_size(); i < n; i++) {
|
|
|
|
const auto& s = this->_internal_ret(i);
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
|
|
s.data(), static_cast<int>(s.length()),
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
2018-09-13 02:33:45 +08:00
|
|
|
"opencv_tensorflow.FunctionDef.Node.ret");
|
2021-11-10 20:03:45 +08:00
|
|
|
target = stream->WriteString(1, s, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// string op = 2;
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!this->_internal_op().empty()) {
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
|
|
this->_internal_op().data(), static_cast<int>(this->_internal_op().length()),
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
2018-09-13 02:33:45 +08:00
|
|
|
"opencv_tensorflow.FunctionDef.Node.op");
|
2021-11-10 20:03:45 +08:00
|
|
|
target = stream->WriteStringMaybeAliased(
|
|
|
|
2, this->_internal_op(), target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated string arg = 3;
|
2021-11-10 20:03:45 +08:00
|
|
|
for (int i = 0, n = this->_internal_arg_size(); i < n; i++) {
|
|
|
|
const auto& s = this->_internal_arg(i);
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
|
|
s.data(), static_cast<int>(s.length()),
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
2018-09-13 02:33:45 +08:00
|
|
|
"opencv_tensorflow.FunctionDef.Node.arg");
|
2021-11-10 20:03:45 +08:00
|
|
|
target = stream->WriteString(3, s, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated string dep = 4;
|
2021-11-10 20:03:45 +08:00
|
|
|
for (int i = 0, n = this->_internal_dep_size(); i < n; i++) {
|
|
|
|
const auto& s = this->_internal_dep(i);
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
|
|
s.data(), static_cast<int>(s.length()),
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
2018-09-13 02:33:45 +08:00
|
|
|
"opencv_tensorflow.FunctionDef.Node.dep");
|
2021-11-10 20:03:45 +08:00
|
|
|
target = stream->WriteString(4, s, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-09-13 02:33:45 +08:00
|
|
|
// map<string, .opencv_tensorflow.AttrValue> attr = 5;
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!this->_internal_attr().empty()) {
|
|
|
|
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_pointer
|
2017-06-26 18:35:51 +08:00
|
|
|
ConstPtr;
|
|
|
|
typedef ConstPtr SortItem;
|
2021-11-10 20:03:45 +08:00
|
|
|
typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
|
2017-06-26 18:35:51 +08:00
|
|
|
struct Utf8Check {
|
|
|
|
static void Check(ConstPtr p) {
|
2021-11-10 20:03:45 +08:00
|
|
|
(void)p;
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
2018-01-15 23:51:38 +08:00
|
|
|
p->first.data(), static_cast<int>(p->first.length()),
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
2018-09-13 02:33:45 +08:00
|
|
|
"opencv_tensorflow.FunctionDef.Node.AttrEntry.key");
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
if (stream->IsSerializationDeterministic() &&
|
|
|
|
this->_internal_attr().size() > 1) {
|
|
|
|
::std::unique_ptr<SortItem[]> items(
|
|
|
|
new SortItem[this->_internal_attr().size()]);
|
|
|
|
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::size_type size_type;
|
2017-06-26 18:35:51 +08:00
|
|
|
size_type n = 0;
|
2021-11-10 20:03:45 +08:00
|
|
|
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator
|
|
|
|
it = this->_internal_attr().begin();
|
|
|
|
it != this->_internal_attr().end(); ++it, ++n) {
|
2018-01-15 23:51:38 +08:00
|
|
|
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
|
2017-06-26 18:35:51 +08:00
|
|
|
for (size_type i = 0; i < n; i++) {
|
2021-11-10 20:03:45 +08:00
|
|
|
target = FunctionDef_Node_AttrEntry_DoNotUse::Funcs::InternalSerialize(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
|
|
|
|
Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
} else {
|
2021-11-10 20:03:45 +08:00
|
|
|
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator
|
|
|
|
it = this->_internal_attr().begin();
|
|
|
|
it != this->_internal_attr().end(); ++it) {
|
|
|
|
target = FunctionDef_Node_AttrEntry_DoNotUse::Funcs::InternalSerialize(5, it->first, it->second, target, stream);
|
|
|
|
Utf8Check::Check(&(*it));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
2018-01-15 23:51:38 +08:00
|
|
|
}
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDef.Node)
|
2017-06-26 18:35:51 +08:00
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t FunctionDef_Node::ByteSizeLong() const {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.FunctionDef.Node)
|
2017-06-26 18:35:51 +08:00
|
|
|
size_t total_size = 0;
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
|
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
// repeated string ret = 1;
|
|
|
|
total_size += 1 *
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(ret_.size());
|
|
|
|
for (int i = 0, n = ret_.size(); i < n; i++) {
|
|
|
|
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
|
|
ret_.Get(i));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated string arg = 3;
|
|
|
|
total_size += 1 *
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(arg_.size());
|
|
|
|
for (int i = 0, n = arg_.size(); i < n; i++) {
|
|
|
|
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
|
|
arg_.Get(i));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated string dep = 4;
|
|
|
|
total_size += 1 *
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(dep_.size());
|
|
|
|
for (int i = 0, n = dep_.size(); i < n; i++) {
|
|
|
|
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
|
|
dep_.Get(i));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-09-13 02:33:45 +08:00
|
|
|
// map<string, .opencv_tensorflow.AttrValue> attr = 5;
|
2017-06-26 18:35:51 +08:00
|
|
|
total_size += 1 *
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_attr_size());
|
|
|
|
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator
|
|
|
|
it = this->_internal_attr().begin();
|
|
|
|
it != this->_internal_attr().end(); ++it) {
|
|
|
|
total_size += FunctionDef_Node_AttrEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// string op = 2;
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!this->_internal_op().empty()) {
|
2018-01-15 23:51:38 +08:00
|
|
|
total_size += 1 +
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
|
|
this->_internal_op());
|
2018-01-15 23:51:38 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FunctionDef_Node::_class_data_ = {
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
|
|
|
|
FunctionDef_Node::MergeImpl
|
|
|
|
};
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FunctionDef_Node::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
|
|
void FunctionDef_Node::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
|
|
static_cast<FunctionDef_Node *>(to)->MergeFrom(
|
|
|
|
static_cast<const FunctionDef_Node &>(from));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
void FunctionDef_Node::MergeFrom(const FunctionDef_Node& from) {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.FunctionDef.Node)
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK_NE(&from, this);
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
(void) cached_has_bits;
|
|
|
|
|
|
|
|
ret_.MergeFrom(from.ret_);
|
|
|
|
arg_.MergeFrom(from.arg_);
|
|
|
|
dep_.MergeFrom(from.dep_);
|
2017-06-26 18:35:51 +08:00
|
|
|
attr_.MergeFrom(from.attr_);
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!from._internal_op().empty()) {
|
|
|
|
_internal_set_op(from._internal_op());
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDef_Node::CopyFrom(const FunctionDef_Node& from) {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.FunctionDef.Node)
|
2017-06-26 18:35:51 +08:00
|
|
|
if (&from == this) return;
|
|
|
|
Clear();
|
2018-01-15 23:51:38 +08:00
|
|
|
MergeFrom(from);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool FunctionDef_Node::IsInitialized() const {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDef_Node::InternalSwap(FunctionDef_Node* other) {
|
2018-01-15 23:51:38 +08:00
|
|
|
using std::swap;
|
2021-11-10 20:03:45 +08:00
|
|
|
auto* lhs_arena = GetArenaForAllocation();
|
|
|
|
auto* rhs_arena = other->GetArenaForAllocation();
|
|
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
2018-01-15 23:51:38 +08:00
|
|
|
ret_.InternalSwap(&other->ret_);
|
|
|
|
arg_.InternalSwap(&other->arg_);
|
|
|
|
dep_.InternalSwap(&other->dep_);
|
2021-11-10 20:03:45 +08:00
|
|
|
attr_.InternalSwap(&other->attr_);
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
|
|
|
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
|
|
|
&op_, lhs_arena,
|
|
|
|
&other->op_, rhs_arena
|
|
|
|
);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata FunctionDef_Node::GetMetadata() const {
|
|
|
|
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
|
|
|
|
&descriptor_table_function_2eproto_getter, &descriptor_table_function_2eproto_once,
|
|
|
|
file_level_metadata_function_2eproto[2]);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// ===================================================================
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
class FunctionDef::_Internal {
|
|
|
|
public:
|
|
|
|
static const ::opencv_tensorflow::OpDef& signature(const FunctionDef* msg);
|
|
|
|
};
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
const ::opencv_tensorflow::OpDef&
|
|
|
|
FunctionDef::_Internal::signature(const FunctionDef* msg) {
|
|
|
|
return *msg->signature_;
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
void FunctionDef::clear_signature() {
|
2021-11-10 20:03:45 +08:00
|
|
|
if (GetArenaForAllocation() == nullptr && signature_ != nullptr) {
|
2018-01-15 23:51:38 +08:00
|
|
|
delete signature_;
|
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
signature_ = nullptr;
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
FunctionDef::FunctionDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
|
|
bool is_message_owned)
|
|
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
|
2017-06-26 18:35:51 +08:00
|
|
|
node_(arena) {
|
|
|
|
SharedCtor();
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!is_message_owned) {
|
|
|
|
RegisterArenaDtor(arena);
|
|
|
|
}
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.FunctionDef)
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
FunctionDef::FunctionDef(const FunctionDef& from)
|
2021-11-10 20:03:45 +08:00
|
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(),
|
|
|
|
node_(from.node_) {
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
|
|
if (from._internal_has_signature()) {
|
2018-09-13 02:33:45 +08:00
|
|
|
signature_ = new ::opencv_tensorflow::OpDef(*from.signature_);
|
2018-01-15 23:51:38 +08:00
|
|
|
} else {
|
2021-11-10 20:03:45 +08:00
|
|
|
signature_ = nullptr;
|
2018-01-15 23:51:38 +08:00
|
|
|
}
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.FunctionDef)
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
inline void FunctionDef::SharedCtor() {
|
|
|
|
signature_ = nullptr;
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
FunctionDef::~FunctionDef() {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(destructor:opencv_tensorflow.FunctionDef)
|
2021-11-10 20:03:45 +08:00
|
|
|
if (GetArenaForAllocation() != nullptr) return;
|
2017-06-26 18:35:51 +08:00
|
|
|
SharedDtor();
|
2021-11-10 20:03:45 +08:00
|
|
|
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
inline void FunctionDef::SharedDtor() {
|
|
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
2018-01-15 23:51:38 +08:00
|
|
|
if (this != internal_default_instance()) delete signature_;
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDef::ArenaDtor(void* object) {
|
|
|
|
FunctionDef* _this = reinterpret_cast< FunctionDef* >(object);
|
|
|
|
(void)_this;
|
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
void FunctionDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
void FunctionDef::SetCachedSize(int size) const {
|
2021-11-10 20:03:45 +08:00
|
|
|
_cached_size_.Set(size);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDef::Clear() {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.FunctionDef)
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
node_.Clear();
|
2021-11-10 20:03:45 +08:00
|
|
|
if (GetArenaForAllocation() == nullptr && signature_ != nullptr) {
|
2018-01-15 23:51:38 +08:00
|
|
|
delete signature_;
|
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
signature_ = nullptr;
|
|
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* FunctionDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
|
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
|
|
while (!ctx->Done(&ptr)) {
|
|
|
|
uint32_t tag;
|
|
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
|
|
|
switch (tag >> 3) {
|
2018-09-13 02:33:45 +08:00
|
|
|
// .opencv_tensorflow.OpDef signature = 1;
|
2021-11-10 20:03:45 +08:00
|
|
|
case 1:
|
|
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
|
|
ptr = ctx->ParseMessage(_internal_mutable_signature(), ptr);
|
|
|
|
CHK_(ptr);
|
|
|
|
} else
|
2017-06-26 18:35:51 +08:00
|
|
|
goto handle_unusual;
|
2021-11-10 20:03:45 +08:00
|
|
|
continue;
|
2018-09-13 02:33:45 +08:00
|
|
|
// repeated .opencv_tensorflow.FunctionDef.Node node = 2;
|
2021-11-10 20:03:45 +08:00
|
|
|
case 2:
|
|
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
|
|
ptr -= 1;
|
|
|
|
do {
|
|
|
|
ptr += 1;
|
|
|
|
ptr = ctx->ParseMessage(_internal_add_node(), ptr);
|
|
|
|
CHK_(ptr);
|
|
|
|
if (!ctx->DataAvailable(ptr)) break;
|
|
|
|
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
|
|
|
|
} else
|
2017-06-26 18:35:51 +08:00
|
|
|
goto handle_unusual;
|
2021-11-10 20:03:45 +08:00
|
|
|
continue;
|
|
|
|
default:
|
|
|
|
goto handle_unusual;
|
|
|
|
} // switch
|
|
|
|
handle_unusual:
|
|
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
|
|
CHK_(ptr);
|
|
|
|
ctx->SetLastTag(tag);
|
|
|
|
goto message_done;
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
ptr = UnknownFieldParse(
|
|
|
|
tag,
|
|
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
|
|
ptr, ctx);
|
|
|
|
CHK_(ptr != nullptr);
|
|
|
|
} // while
|
|
|
|
message_done:
|
|
|
|
return ptr;
|
2017-06-26 18:35:51 +08:00
|
|
|
failure:
|
2021-11-10 20:03:45 +08:00
|
|
|
ptr = nullptr;
|
|
|
|
goto message_done;
|
|
|
|
#undef CHK_
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
uint8_t* FunctionDef::_InternalSerialize(
|
|
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.FunctionDef)
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2018-09-13 02:33:45 +08:00
|
|
|
// .opencv_tensorflow.OpDef signature = 1;
|
2021-11-10 20:03:45 +08:00
|
|
|
if (this->_internal_has_signature()) {
|
|
|
|
target = stream->EnsureSpace(target);
|
|
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
|
|
InternalWriteMessage(
|
|
|
|
1, _Internal::signature(this), target, stream);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-09-13 02:33:45 +08:00
|
|
|
// repeated .opencv_tensorflow.FunctionDef.Node node = 2;
|
2018-01-15 23:51:38 +08:00
|
|
|
for (unsigned int i = 0,
|
2021-11-10 20:03:45 +08:00
|
|
|
n = static_cast<unsigned int>(this->_internal_node_size()); i < n; i++) {
|
|
|
|
target = stream->EnsureSpace(target);
|
|
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
|
|
|
|
InternalWriteMessage(2, this->_internal_node(i), target, stream);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
2018-01-15 23:51:38 +08:00
|
|
|
}
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.FunctionDef)
|
2017-06-26 18:35:51 +08:00
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t FunctionDef::ByteSizeLong() const {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.FunctionDef)
|
2017-06-26 18:35:51 +08:00
|
|
|
size_t total_size = 0;
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
|
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2018-09-13 02:33:45 +08:00
|
|
|
// repeated .opencv_tensorflow.FunctionDef.Node node = 2;
|
2021-11-10 20:03:45 +08:00
|
|
|
total_size += 1UL * this->_internal_node_size();
|
|
|
|
for (const auto& msg : this->node_) {
|
|
|
|
total_size +=
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-09-13 02:33:45 +08:00
|
|
|
// .opencv_tensorflow.OpDef signature = 1;
|
2021-11-10 20:03:45 +08:00
|
|
|
if (this->_internal_has_signature()) {
|
2018-01-15 23:51:38 +08:00
|
|
|
total_size += 1 +
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
|
|
|
|
*signature_);
|
2018-01-15 23:51:38 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FunctionDef::_class_data_ = {
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
|
|
|
|
FunctionDef::MergeImpl
|
|
|
|
};
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FunctionDef::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
|
|
void FunctionDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
|
|
static_cast<FunctionDef *>(to)->MergeFrom(
|
|
|
|
static_cast<const FunctionDef &>(from));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
void FunctionDef::MergeFrom(const FunctionDef& from) {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.FunctionDef)
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK_NE(&from, this);
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
(void) cached_has_bits;
|
2017-06-26 18:35:51 +08:00
|
|
|
|
|
|
|
node_.MergeFrom(from.node_);
|
2021-11-10 20:03:45 +08:00
|
|
|
if (from._internal_has_signature()) {
|
|
|
|
_internal_mutable_signature()->::opencv_tensorflow::OpDef::MergeFrom(from._internal_signature());
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDef::CopyFrom(const FunctionDef& from) {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.FunctionDef)
|
2017-06-26 18:35:51 +08:00
|
|
|
if (&from == this) return;
|
|
|
|
Clear();
|
2018-01-15 23:51:38 +08:00
|
|
|
MergeFrom(from);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool FunctionDef::IsInitialized() const {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FunctionDef::InternalSwap(FunctionDef* other) {
|
2018-01-15 23:51:38 +08:00
|
|
|
using std::swap;
|
2021-11-10 20:03:45 +08:00
|
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
2018-01-15 23:51:38 +08:00
|
|
|
node_.InternalSwap(&other->node_);
|
|
|
|
swap(signature_, other->signature_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata FunctionDef::GetMetadata() const {
|
|
|
|
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
|
|
|
|
&descriptor_table_function_2eproto_getter, &descriptor_table_function_2eproto_once,
|
|
|
|
file_level_metadata_function_2eproto[3]);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// ===================================================================
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
class GradientDef::_Internal {
|
|
|
|
public:
|
|
|
|
};
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
GradientDef::GradientDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
|
|
|
|
bool is_message_owned)
|
|
|
|
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
|
2017-06-26 18:35:51 +08:00
|
|
|
SharedCtor();
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!is_message_owned) {
|
|
|
|
RegisterArenaDtor(arena);
|
|
|
|
}
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.GradientDef)
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
GradientDef::GradientDef(const GradientDef& from)
|
2021-11-10 20:03:45 +08:00
|
|
|
: ::PROTOBUF_NAMESPACE_ID::Message() {
|
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
|
|
|
function_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
|
|
function_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
|
|
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
|
|
if (!from._internal_function_name().empty()) {
|
|
|
|
function_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_function_name(),
|
|
|
|
GetArenaForAllocation());
|
|
|
|
}
|
|
|
|
gradient_func_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
|
|
gradient_func_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
|
|
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
|
|
if (!from._internal_gradient_func().empty()) {
|
|
|
|
gradient_func_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_gradient_func(),
|
|
|
|
GetArenaForAllocation());
|
2018-01-15 23:51:38 +08:00
|
|
|
}
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.GradientDef)
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
inline void GradientDef::SharedCtor() {
|
|
|
|
function_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
|
|
function_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
|
|
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
|
|
gradient_func_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
|
|
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
|
|
|
gradient_func_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
|
|
|
|
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
GradientDef::~GradientDef() {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(destructor:opencv_tensorflow.GradientDef)
|
2021-11-10 20:03:45 +08:00
|
|
|
if (GetArenaForAllocation() != nullptr) return;
|
2017-06-26 18:35:51 +08:00
|
|
|
SharedDtor();
|
2021-11-10 20:03:45 +08:00
|
|
|
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
inline void GradientDef::SharedDtor() {
|
|
|
|
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
|
|
|
|
function_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
|
|
|
gradient_func_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void GradientDef::ArenaDtor(void* object) {
|
|
|
|
GradientDef* _this = reinterpret_cast< GradientDef* >(object);
|
|
|
|
(void)_this;
|
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
void GradientDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
void GradientDef::SetCachedSize(int size) const {
|
2021-11-10 20:03:45 +08:00
|
|
|
_cached_size_.Set(size);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void GradientDef::Clear() {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.GradientDef)
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
function_name_.ClearToEmpty();
|
|
|
|
gradient_func_.ClearToEmpty();
|
|
|
|
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
|
|
|
|
}
|
|
|
|
|
|
|
|
const char* GradientDef::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
|
|
|
|
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
|
|
|
|
while (!ctx->Done(&ptr)) {
|
|
|
|
uint32_t tag;
|
|
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
|
|
|
|
switch (tag >> 3) {
|
2018-01-15 23:51:38 +08:00
|
|
|
// string function_name = 1;
|
2021-11-10 20:03:45 +08:00
|
|
|
case 1:
|
|
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
|
|
|
|
auto str = _internal_mutable_function_name();
|
|
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
|
|
|
|
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.GradientDef.function_name"));
|
|
|
|
CHK_(ptr);
|
|
|
|
} else
|
2017-06-26 18:35:51 +08:00
|
|
|
goto handle_unusual;
|
2021-11-10 20:03:45 +08:00
|
|
|
continue;
|
2018-01-15 23:51:38 +08:00
|
|
|
// string gradient_func = 2;
|
2021-11-10 20:03:45 +08:00
|
|
|
case 2:
|
|
|
|
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
|
|
|
|
auto str = _internal_mutable_gradient_func();
|
|
|
|
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
|
|
|
|
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.GradientDef.gradient_func"));
|
|
|
|
CHK_(ptr);
|
|
|
|
} else
|
2017-06-26 18:35:51 +08:00
|
|
|
goto handle_unusual;
|
2021-11-10 20:03:45 +08:00
|
|
|
continue;
|
|
|
|
default:
|
|
|
|
goto handle_unusual;
|
|
|
|
} // switch
|
|
|
|
handle_unusual:
|
|
|
|
if ((tag == 0) || ((tag & 7) == 4)) {
|
|
|
|
CHK_(ptr);
|
|
|
|
ctx->SetLastTag(tag);
|
|
|
|
goto message_done;
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
ptr = UnknownFieldParse(
|
|
|
|
tag,
|
|
|
|
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
|
|
|
|
ptr, ctx);
|
|
|
|
CHK_(ptr != nullptr);
|
|
|
|
} // while
|
|
|
|
message_done:
|
|
|
|
return ptr;
|
2017-06-26 18:35:51 +08:00
|
|
|
failure:
|
2021-11-10 20:03:45 +08:00
|
|
|
ptr = nullptr;
|
|
|
|
goto message_done;
|
|
|
|
#undef CHK_
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
uint8_t* GradientDef::_InternalSerialize(
|
|
|
|
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.GradientDef)
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
(void) cached_has_bits;
|
|
|
|
|
|
|
|
// string function_name = 1;
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!this->_internal_function_name().empty()) {
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
|
|
this->_internal_function_name().data(), static_cast<int>(this->_internal_function_name().length()),
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
2018-09-13 02:33:45 +08:00
|
|
|
"opencv_tensorflow.GradientDef.function_name");
|
2021-11-10 20:03:45 +08:00
|
|
|
target = stream->WriteStringMaybeAliased(
|
|
|
|
1, this->_internal_function_name(), target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// string gradient_func = 2;
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!this->_internal_gradient_func().empty()) {
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
|
|
|
|
this->_internal_gradient_func().data(), static_cast<int>(this->_internal_gradient_func().length()),
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
|
2018-09-13 02:33:45 +08:00
|
|
|
"opencv_tensorflow.GradientDef.gradient_func");
|
2021-11-10 20:03:45 +08:00
|
|
|
target = stream->WriteStringMaybeAliased(
|
|
|
|
2, this->_internal_gradient_func(), target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
|
|
|
|
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
|
|
|
|
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
|
2018-01-15 23:51:38 +08:00
|
|
|
}
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.GradientDef)
|
2017-06-26 18:35:51 +08:00
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t GradientDef::ByteSizeLong() const {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.GradientDef)
|
2017-06-26 18:35:51 +08:00
|
|
|
size_t total_size = 0;
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
|
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// string function_name = 1;
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!this->_internal_function_name().empty()) {
|
2017-06-26 18:35:51 +08:00
|
|
|
total_size += 1 +
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
|
|
this->_internal_function_name());
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// string gradient_func = 2;
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!this->_internal_gradient_func().empty()) {
|
2017-06-26 18:35:51 +08:00
|
|
|
total_size += 1 +
|
2021-11-10 20:03:45 +08:00
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
|
|
|
|
this->_internal_gradient_func());
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GradientDef::_class_data_ = {
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
|
|
|
|
GradientDef::MergeImpl
|
|
|
|
};
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GradientDef::GetClassData() const { return &_class_data_; }
|
|
|
|
|
|
|
|
void GradientDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
|
|
|
|
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
|
|
|
|
static_cast<GradientDef *>(to)->MergeFrom(
|
|
|
|
static_cast<const GradientDef &>(from));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
void GradientDef::MergeFrom(const GradientDef& from) {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.GradientDef)
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK_NE(&from, this);
|
2021-11-10 20:03:45 +08:00
|
|
|
uint32_t cached_has_bits = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
(void) cached_has_bits;
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!from._internal_function_name().empty()) {
|
|
|
|
_internal_set_function_name(from._internal_function_name());
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
if (!from._internal_gradient_func().empty()) {
|
|
|
|
_internal_set_gradient_func(from._internal_gradient_func());
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2021-11-10 20:03:45 +08:00
|
|
|
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void GradientDef::CopyFrom(const GradientDef& from) {
|
2018-09-13 02:33:45 +08:00
|
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.GradientDef)
|
2017-06-26 18:35:51 +08:00
|
|
|
if (&from == this) return;
|
|
|
|
Clear();
|
2018-01-15 23:51:38 +08:00
|
|
|
MergeFrom(from);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool GradientDef::IsInitialized() const {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void GradientDef::InternalSwap(GradientDef* other) {
|
2018-01-15 23:51:38 +08:00
|
|
|
using std::swap;
|
2021-11-10 20:03:45 +08:00
|
|
|
auto* lhs_arena = GetArenaForAllocation();
|
|
|
|
auto* rhs_arena = other->GetArenaForAllocation();
|
|
|
|
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
|
|
|
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
|
|
|
&function_name_, lhs_arena,
|
|
|
|
&other->function_name_, rhs_arena
|
|
|
|
);
|
|
|
|
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
|
|
|
|
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
|
|
|
|
&gradient_func_, lhs_arena,
|
|
|
|
&other->gradient_func_, rhs_arena
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
::PROTOBUF_NAMESPACE_ID::Metadata GradientDef::GetMetadata() const {
|
|
|
|
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
|
|
|
|
&descriptor_table_function_2eproto_getter, &descriptor_table_function_2eproto_once,
|
|
|
|
file_level_metadata_function_2eproto[4]);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
2018-09-13 02:33:45 +08:00
|
|
|
} // namespace opencv_tensorflow
|
2021-11-10 20:03:45 +08:00
|
|
|
PROTOBUF_NAMESPACE_OPEN
|
|
|
|
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::FunctionDefLibrary* Arena::CreateMaybeMessage< ::opencv_tensorflow::FunctionDefLibrary >(Arena* arena) {
|
|
|
|
return Arena::CreateMessageInternal< ::opencv_tensorflow::FunctionDefLibrary >(arena);
|
|
|
|
}
|
|
|
|
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse* Arena::CreateMaybeMessage< ::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse >(Arena* arena) {
|
|
|
|
return Arena::CreateMessageInternal< ::opencv_tensorflow::FunctionDef_Node_AttrEntry_DoNotUse >(arena);
|
|
|
|
}
|
|
|
|
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::FunctionDef_Node* Arena::CreateMaybeMessage< ::opencv_tensorflow::FunctionDef_Node >(Arena* arena) {
|
|
|
|
return Arena::CreateMessageInternal< ::opencv_tensorflow::FunctionDef_Node >(arena);
|
|
|
|
}
|
|
|
|
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::FunctionDef* Arena::CreateMaybeMessage< ::opencv_tensorflow::FunctionDef >(Arena* arena) {
|
|
|
|
return Arena::CreateMessageInternal< ::opencv_tensorflow::FunctionDef >(arena);
|
|
|
|
}
|
|
|
|
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::GradientDef* Arena::CreateMaybeMessage< ::opencv_tensorflow::GradientDef >(Arena* arena) {
|
|
|
|
return Arena::CreateMessageInternal< ::opencv_tensorflow::GradientDef >(arena);
|
|
|
|
}
|
|
|
|
PROTOBUF_NAMESPACE_CLOSE
|
2017-06-26 18:35:51 +08:00
|
|
|
|
|
|
|
// @@protoc_insertion_point(global_scope)
|
2021-11-10 20:03:45 +08:00
|
|
|
#include <google/protobuf/port_undef.inc>
|