chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:06:04 +08:00
commit 86c9b1c39f
7743 changed files with 3316339 additions and 0 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+904
View File
@@ -0,0 +1,904 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: graph.proto
#include "graph.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#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)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace opencv_tensorflow {
constexpr GraphDef::GraphDef(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: node_()
, library_(nullptr)
, versions_(nullptr)
, version_(0){}
struct GraphDefDefaultTypeInternal {
constexpr GraphDefDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~GraphDefDefaultTypeInternal() {}
union {
GraphDef _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT GraphDefDefaultTypeInternal _GraphDef_default_instance_;
constexpr NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
struct NodeDef_AttrEntry_DoNotUseDefaultTypeInternal {
constexpr NodeDef_AttrEntry_DoNotUseDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~NodeDef_AttrEntry_DoNotUseDefaultTypeInternal() {}
union {
NodeDef_AttrEntry_DoNotUse _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeDef_AttrEntry_DoNotUseDefaultTypeInternal _NodeDef_AttrEntry_DoNotUse_default_instance_;
constexpr NodeDef::NodeDef(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: input_()
, attr_(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{})
, name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, op_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, device_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct NodeDefDefaultTypeInternal {
constexpr NodeDefDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~NodeDefDefaultTypeInternal() {}
union {
NodeDef _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NodeDefDefaultTypeInternal _NodeDef_default_instance_;
} // namespace opencv_tensorflow
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_graph_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_graph_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_graph_2eproto = nullptr;
const uint32_t TableStruct_graph_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, node_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, versions_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, version_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::GraphDef, library_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, key_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse, value_),
0,
1,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, name_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, op_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, input_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, device_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::NodeDef, attr_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::opencv_tensorflow::GraphDef)},
{ 10, 18, -1, sizeof(::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse)},
{ 20, -1, -1, sizeof(::opencv_tensorflow::NodeDef)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_GraphDef_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_NodeDef_AttrEntry_DoNotUse_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_NodeDef_default_instance_),
};
const char descriptor_table_protodef_graph_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\013graph.proto\022\021opencv_tensorflow\032\020attr_v"
"alue.proto\032\016function.proto\032\016versions.pro"
"to\"\262\001\n\010GraphDef\022(\n\004node\030\001 \003(\0132\032.opencv_t"
"ensorflow.NodeDef\022/\n\010versions\030\004 \001(\0132\035.op"
"encv_tensorflow.VersionDef\022\023\n\007version\030\003 "
"\001(\005B\002\030\001\0226\n\007library\030\002 \001(\0132%.opencv_tensor"
"flow.FunctionDefLibrary\"\301\001\n\007NodeDef\022\014\n\004n"
"ame\030\001 \001(\t\022\n\n\002op\030\002 \001(\t\022\r\n\005input\030\003 \003(\t\022\016\n\006"
"device\030\004 \001(\t\0222\n\004attr\030\005 \003(\0132$.opencv_tens"
"orflow.NodeDef.AttrEntry\032I\n\tAttrEntry\022\013\n"
"\003key\030\001 \001(\t\022+\n\005value\030\002 \001(\0132\034.opencv_tenso"
"rflow.AttrValue:\0028\001B,\n\030org.tensorflow.fr"
"ameworkB\013GraphProtosP\001\370\001\001b\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_graph_2eproto_deps[3] = {
&::descriptor_table_attr_5fvalue_2eproto,
&::descriptor_table_function_2eproto,
&::descriptor_table_versions_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_graph_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_graph_2eproto = {
false, false, 513, descriptor_table_protodef_graph_2eproto, "graph.proto",
&descriptor_table_graph_2eproto_once, descriptor_table_graph_2eproto_deps, 3, 3,
schemas, file_default_instances, TableStruct_graph_2eproto::offsets,
file_level_metadata_graph_2eproto, file_level_enum_descriptors_graph_2eproto, file_level_service_descriptors_graph_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_graph_2eproto_getter() {
return &descriptor_table_graph_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_graph_2eproto(&descriptor_table_graph_2eproto);
namespace opencv_tensorflow {
// ===================================================================
class GraphDef::_Internal {
public:
static const ::opencv_tensorflow::VersionDef& versions(const GraphDef* msg);
static const ::opencv_tensorflow::FunctionDefLibrary& library(const GraphDef* msg);
};
const ::opencv_tensorflow::VersionDef&
GraphDef::_Internal::versions(const GraphDef* msg) {
return *msg->versions_;
}
const ::opencv_tensorflow::FunctionDefLibrary&
GraphDef::_Internal::library(const GraphDef* msg) {
return *msg->library_;
}
void GraphDef::clear_versions() {
if (GetArenaForAllocation() == nullptr && versions_ != nullptr) {
delete versions_;
}
versions_ = nullptr;
}
void GraphDef::clear_library() {
if (GetArenaForAllocation() == nullptr && library_ != nullptr) {
delete library_;
}
library_ = nullptr;
}
GraphDef::GraphDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
node_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.GraphDef)
}
GraphDef::GraphDef(const GraphDef& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
node_(from.node_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_library()) {
library_ = new ::opencv_tensorflow::FunctionDefLibrary(*from.library_);
} else {
library_ = nullptr;
}
if (from._internal_has_versions()) {
versions_ = new ::opencv_tensorflow::VersionDef(*from.versions_);
} else {
versions_ = nullptr;
}
version_ = from.version_;
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.GraphDef)
}
inline void GraphDef::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&library_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&version_) -
reinterpret_cast<char*>(&library_)) + sizeof(version_));
}
GraphDef::~GraphDef() {
// @@protoc_insertion_point(destructor:opencv_tensorflow.GraphDef)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void GraphDef::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete library_;
if (this != internal_default_instance()) delete versions_;
}
void GraphDef::ArenaDtor(void* object) {
GraphDef* _this = reinterpret_cast< GraphDef* >(object);
(void)_this;
}
void GraphDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void GraphDef::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void GraphDef::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.GraphDef)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
node_.Clear();
if (GetArenaForAllocation() == nullptr && library_ != nullptr) {
delete library_;
}
library_ = nullptr;
if (GetArenaForAllocation() == nullptr && versions_ != nullptr) {
delete versions_;
}
versions_ = nullptr;
version_ = 0;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* GraphDef::_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) {
// repeated .opencv_tensorflow.NodeDef node = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
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<10>(ptr));
} else
goto handle_unusual;
continue;
// .opencv_tensorflow.FunctionDefLibrary library = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_library(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// int32 version = 3 [deprecated = true];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// .opencv_tensorflow.VersionDef versions = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_versions(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* GraphDef::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.GraphDef)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .opencv_tensorflow.NodeDef node = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_node_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, this->_internal_node(i), target, stream);
}
// .opencv_tensorflow.FunctionDefLibrary library = 2;
if (this->_internal_has_library()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
2, _Internal::library(this), target, stream);
}
// int32 version = 3 [deprecated = true];
if (this->_internal_version() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_version(), target);
}
// .opencv_tensorflow.VersionDef versions = 4;
if (this->_internal_has_versions()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
4, _Internal::versions(this), target, stream);
}
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);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.GraphDef)
return target;
}
size_t GraphDef::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.GraphDef)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .opencv_tensorflow.NodeDef node = 1;
total_size += 1UL * this->_internal_node_size();
for (const auto& msg : this->node_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// .opencv_tensorflow.FunctionDefLibrary library = 2;
if (this->_internal_has_library()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*library_);
}
// .opencv_tensorflow.VersionDef versions = 4;
if (this->_internal_has_versions()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*versions_);
}
// int32 version = 3 [deprecated = true];
if (this->_internal_version() != 0) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_version());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GraphDef::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
GraphDef::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GraphDef::GetClassData() const { return &_class_data_; }
void GraphDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<GraphDef *>(to)->MergeFrom(
static_cast<const GraphDef &>(from));
}
void GraphDef::MergeFrom(const GraphDef& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.GraphDef)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
node_.MergeFrom(from.node_);
if (from._internal_has_library()) {
_internal_mutable_library()->::opencv_tensorflow::FunctionDefLibrary::MergeFrom(from._internal_library());
}
if (from._internal_has_versions()) {
_internal_mutable_versions()->::opencv_tensorflow::VersionDef::MergeFrom(from._internal_versions());
}
if (from._internal_version() != 0) {
_internal_set_version(from._internal_version());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void GraphDef::CopyFrom(const GraphDef& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.GraphDef)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool GraphDef::IsInitialized() const {
return true;
}
void GraphDef::InternalSwap(GraphDef* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
node_.InternalSwap(&other->node_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(GraphDef, version_)
+ sizeof(GraphDef::version_)
- PROTOBUF_FIELD_OFFSET(GraphDef, library_)>(
reinterpret_cast<char*>(&library_),
reinterpret_cast<char*>(&other->library_));
}
::PROTOBUF_NAMESPACE_ID::Metadata GraphDef::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_graph_2eproto_getter, &descriptor_table_graph_2eproto_once,
file_level_metadata_graph_2eproto[0]);
}
// ===================================================================
NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse() {}
NodeDef_AttrEntry_DoNotUse::NodeDef_AttrEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
: SuperType(arena) {}
void NodeDef_AttrEntry_DoNotUse::MergeFrom(const NodeDef_AttrEntry_DoNotUse& other) {
MergeFromInternal(other);
}
::PROTOBUF_NAMESPACE_ID::Metadata NodeDef_AttrEntry_DoNotUse::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_graph_2eproto_getter, &descriptor_table_graph_2eproto_once,
file_level_metadata_graph_2eproto[1]);
}
// ===================================================================
class NodeDef::_Internal {
public:
};
void NodeDef::clear_attr() {
attr_.Clear();
}
NodeDef::NodeDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
input_(arena),
attr_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.NodeDef)
}
NodeDef::NodeDef(const NodeDef& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
input_(from.input_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
attr_.MergeFrom(from.attr_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
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());
}
device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_device().empty()) {
device_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_device(),
GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.NodeDef)
}
inline void NodeDef::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
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
device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
NodeDef::~NodeDef() {
// @@protoc_insertion_point(destructor:opencv_tensorflow.NodeDef)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void NodeDef::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
op_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
device_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void NodeDef::ArenaDtor(void* object) {
NodeDef* _this = reinterpret_cast< NodeDef* >(object);
(void)_this;
_this->attr_. ~MapField();
}
inline void NodeDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena) {
if (arena != nullptr) {
arena->OwnCustomDestructor(this, &NodeDef::ArenaDtor);
}
}
void NodeDef::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void NodeDef::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.NodeDef)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
input_.Clear();
attr_.Clear();
name_.ClearToEmpty();
op_.ClearToEmpty();
device_.ClearToEmpty();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* NodeDef::_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) {
// string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NodeDef.name"));
CHK_(ptr);
} else
goto handle_unusual;
continue;
// string op = 2;
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.NodeDef.op"));
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated string input = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_input();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NodeDef.input"));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
// string device = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_device();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.NodeDef.device"));
CHK_(ptr);
} else
goto handle_unusual;
continue;
// map<string, .opencv_tensorflow.AttrValue> attr = 5;
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
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* NodeDef::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.NodeDef)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// string name = 1;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"opencv_tensorflow.NodeDef.name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_name(), target);
}
// string op = 2;
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,
"opencv_tensorflow.NodeDef.op");
target = stream->WriteStringMaybeAliased(
2, this->_internal_op(), target);
}
// repeated string input = 3;
for (int i = 0, n = this->_internal_input_size(); i < n; i++) {
const auto& s = this->_internal_input(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"opencv_tensorflow.NodeDef.input");
target = stream->WriteString(3, s, target);
}
// string device = 4;
if (!this->_internal_device().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_device().data(), static_cast<int>(this->_internal_device().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"opencv_tensorflow.NodeDef.device");
target = stream->WriteStringMaybeAliased(
4, this->_internal_device(), target);
}
// map<string, .opencv_tensorflow.AttrValue> attr = 5;
if (!this->_internal_attr().empty()) {
typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_pointer
ConstPtr;
typedef ConstPtr SortItem;
typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
struct Utf8Check {
static void Check(ConstPtr p) {
(void)p;
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
p->first.data(), static_cast<int>(p->first.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"opencv_tensorflow.NodeDef.AttrEntry.key");
}
};
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;
size_type n = 0;
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator
it = this->_internal_attr().begin();
it != this->_internal_attr().end(); ++it, ++n) {
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
}
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
for (size_type i = 0; i < n; i++) {
target = NodeDef_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)]));
}
} else {
for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::opencv_tensorflow::AttrValue >::const_iterator
it = this->_internal_attr().begin();
it != this->_internal_attr().end(); ++it) {
target = NodeDef_AttrEntry_DoNotUse::Funcs::InternalSerialize(5, it->first, it->second, target, stream);
Utf8Check::Check(&(*it));
}
}
}
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);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.NodeDef)
return target;
}
size_t NodeDef::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.NodeDef)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string input = 3;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(input_.size());
for (int i = 0, n = input_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
input_.Get(i));
}
// map<string, .opencv_tensorflow.AttrValue> attr = 5;
total_size += 1 *
::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 += NodeDef_AttrEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
}
// string name = 1;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// string op = 2;
if (!this->_internal_op().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_op());
}
// string device = 4;
if (!this->_internal_device().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_device());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NodeDef::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
NodeDef::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NodeDef::GetClassData() const { return &_class_data_; }
void NodeDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<NodeDef *>(to)->MergeFrom(
static_cast<const NodeDef &>(from));
}
void NodeDef::MergeFrom(const NodeDef& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.NodeDef)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
input_.MergeFrom(from.input_);
attr_.MergeFrom(from.attr_);
if (!from._internal_name().empty()) {
_internal_set_name(from._internal_name());
}
if (!from._internal_op().empty()) {
_internal_set_op(from._internal_op());
}
if (!from._internal_device().empty()) {
_internal_set_device(from._internal_device());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void NodeDef::CopyFrom(const NodeDef& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.NodeDef)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool NodeDef::IsInitialized() const {
return true;
}
void NodeDef::InternalSwap(NodeDef* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
input_.InternalSwap(&other->input_);
attr_.InternalSwap(&other->attr_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, lhs_arena,
&other->name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&op_, lhs_arena,
&other->op_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&device_, lhs_arena,
&other->device_, rhs_arena
);
}
::PROTOBUF_NAMESPACE_ID::Metadata NodeDef::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_graph_2eproto_getter, &descriptor_table_graph_2eproto_once,
file_level_metadata_graph_2eproto[2]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace opencv_tensorflow
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::GraphDef* Arena::CreateMaybeMessage< ::opencv_tensorflow::GraphDef >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_tensorflow::GraphDef >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse* Arena::CreateMaybeMessage< ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_tensorflow::NodeDef_AttrEntry_DoNotUse >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::NodeDef* Arena::CreateMaybeMessage< ::opencv_tensorflow::NodeDef >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_tensorflow::NodeDef >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+751
View File
@@ -0,0 +1,751 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensor.proto
#include "tensor.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#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)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace opencv_tensorflow {
constexpr TensorProto::TensorProto(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: float_val_()
, double_val_()
, int_val_()
, _int_val_cached_byte_size_(0)
, string_val_()
, scomplex_val_()
, int64_val_()
, _int64_val_cached_byte_size_(0)
, bool_val_()
, dcomplex_val_()
, half_val_()
, _half_val_cached_byte_size_(0)
, tensor_content_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, tensor_shape_(nullptr)
, dtype_(0)
, version_number_(0){}
struct TensorProtoDefaultTypeInternal {
constexpr TensorProtoDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~TensorProtoDefaultTypeInternal() {}
union {
TensorProto _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorProtoDefaultTypeInternal _TensorProto_default_instance_;
} // namespace opencv_tensorflow
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensor_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensor_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensor_2eproto = nullptr;
const uint32_t TableStruct_tensor_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, dtype_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, tensor_shape_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, version_number_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, tensor_content_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, half_val_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, float_val_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, double_val_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, int_val_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, string_val_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, scomplex_val_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, int64_val_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, bool_val_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorProto, dcomplex_val_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::opencv_tensorflow::TensorProto)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_TensorProto_default_instance_),
};
const char descriptor_table_protodef_tensor_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\014tensor.proto\022\021opencv_tensorflow\032\022tenso"
"r_shape.proto\032\013types.proto\"\363\002\n\013TensorPro"
"to\022*\n\005dtype\030\001 \001(\0162\033.opencv_tensorflow.Da"
"taType\0229\n\014tensor_shape\030\002 \001(\0132#.opencv_te"
"nsorflow.TensorShapeProto\022\026\n\016version_num"
"ber\030\003 \001(\005\022\026\n\016tensor_content\030\004 \001(\014\022\024\n\010hal"
"f_val\030\r \003(\005B\002\020\001\022\025\n\tfloat_val\030\005 \003(\002B\002\020\001\022\026"
"\n\ndouble_val\030\006 \003(\001B\002\020\001\022\023\n\007int_val\030\007 \003(\005B"
"\002\020\001\022\022\n\nstring_val\030\010 \003(\014\022\030\n\014scomplex_val\030"
"\t \003(\002B\002\020\001\022\025\n\tint64_val\030\n \003(\003B\002\020\001\022\024\n\010bool"
"_val\030\013 \003(\010B\002\020\001\022\030\n\014dcomplex_val\030\014 \003(\001B\002\020\001"
"B-\n\030org.tensorflow.frameworkB\014TensorProt"
"osP\001\370\001\001b\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensor_2eproto_deps[2] = {
&::descriptor_table_tensor_5fshape_2eproto,
&::descriptor_table_types_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensor_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensor_2eproto = {
false, false, 495, descriptor_table_protodef_tensor_2eproto, "tensor.proto",
&descriptor_table_tensor_2eproto_once, descriptor_table_tensor_2eproto_deps, 2, 1,
schemas, file_default_instances, TableStruct_tensor_2eproto::offsets,
file_level_metadata_tensor_2eproto, file_level_enum_descriptors_tensor_2eproto, file_level_service_descriptors_tensor_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_tensor_2eproto_getter() {
return &descriptor_table_tensor_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_tensor_2eproto(&descriptor_table_tensor_2eproto);
namespace opencv_tensorflow {
// ===================================================================
class TensorProto::_Internal {
public:
static const ::opencv_tensorflow::TensorShapeProto& tensor_shape(const TensorProto* msg);
};
const ::opencv_tensorflow::TensorShapeProto&
TensorProto::_Internal::tensor_shape(const TensorProto* msg) {
return *msg->tensor_shape_;
}
void TensorProto::clear_tensor_shape() {
if (GetArenaForAllocation() == nullptr && tensor_shape_ != nullptr) {
delete tensor_shape_;
}
tensor_shape_ = nullptr;
}
TensorProto::TensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
float_val_(arena),
double_val_(arena),
int_val_(arena),
string_val_(arena),
scomplex_val_(arena),
int64_val_(arena),
bool_val_(arena),
dcomplex_val_(arena),
half_val_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorProto)
}
TensorProto::TensorProto(const TensorProto& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
float_val_(from.float_val_),
double_val_(from.double_val_),
int_val_(from.int_val_),
string_val_(from.string_val_),
scomplex_val_(from.scomplex_val_),
int64_val_(from.int64_val_),
bool_val_(from.bool_val_),
dcomplex_val_(from.dcomplex_val_),
half_val_(from.half_val_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
tensor_content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
tensor_content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_tensor_content().empty()) {
tensor_content_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_tensor_content(),
GetArenaForAllocation());
}
if (from._internal_has_tensor_shape()) {
tensor_shape_ = new ::opencv_tensorflow::TensorShapeProto(*from.tensor_shape_);
} else {
tensor_shape_ = nullptr;
}
::memcpy(&dtype_, &from.dtype_,
static_cast<size_t>(reinterpret_cast<char*>(&version_number_) -
reinterpret_cast<char*>(&dtype_)) + sizeof(version_number_));
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorProto)
}
inline void TensorProto::SharedCtor() {
tensor_content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
tensor_content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&tensor_shape_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&version_number_) -
reinterpret_cast<char*>(&tensor_shape_)) + sizeof(version_number_));
}
TensorProto::~TensorProto() {
// @@protoc_insertion_point(destructor:opencv_tensorflow.TensorProto)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void TensorProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
tensor_content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete tensor_shape_;
}
void TensorProto::ArenaDtor(void* object) {
TensorProto* _this = reinterpret_cast< TensorProto* >(object);
(void)_this;
}
void TensorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TensorProto::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void TensorProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorProto)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
float_val_.Clear();
double_val_.Clear();
int_val_.Clear();
string_val_.Clear();
scomplex_val_.Clear();
int64_val_.Clear();
bool_val_.Clear();
dcomplex_val_.Clear();
half_val_.Clear();
tensor_content_.ClearToEmpty();
if (GetArenaForAllocation() == nullptr && tensor_shape_ != nullptr) {
delete tensor_shape_;
}
tensor_shape_ = nullptr;
::memset(&dtype_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&version_number_) -
reinterpret_cast<char*>(&dtype_)) + sizeof(version_number_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* TensorProto::_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) {
// .opencv_tensorflow.DataType dtype = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
_internal_set_dtype(static_cast<::opencv_tensorflow::DataType>(val));
} else
goto handle_unusual;
continue;
// .opencv_tensorflow.TensorShapeProto tensor_shape = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_tensor_shape(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// int32 version_number = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
version_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// bytes tensor_content = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_tensor_content();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float float_val = 5 [packed = true];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_float_val(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 45) {
_internal_add_float_val(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// repeated double double_val = 6 [packed = true];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_double_val(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 49) {
_internal_add_double_val(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
ptr += sizeof(double);
} else
goto handle_unusual;
continue;
// repeated int32 int_val = 7 [packed = true];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_int_val(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 56) {
_internal_add_int_val(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated bytes string_val = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_string_val();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
} else
goto handle_unusual;
continue;
// repeated float scomplex_val = 9 [packed = true];
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_scomplex_val(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 77) {
_internal_add_scomplex_val(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// repeated int64 int64_val = 10 [packed = true];
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_int64_val(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 80) {
_internal_add_int64_val(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated bool bool_val = 11 [packed = true];
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedBoolParser(_internal_mutable_bool_val(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 88) {
_internal_add_bool_val(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated double dcomplex_val = 12 [packed = true];
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_dcomplex_val(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 97) {
_internal_add_dcomplex_val(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
ptr += sizeof(double);
} else
goto handle_unusual;
continue;
// repeated int32 half_val = 13 [packed = true];
case 13:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_half_val(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 104) {
_internal_add_half_val(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* TensorProto::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorProto)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// .opencv_tensorflow.DataType dtype = 1;
if (this->_internal_dtype() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_dtype(), target);
}
// .opencv_tensorflow.TensorShapeProto tensor_shape = 2;
if (this->_internal_has_tensor_shape()) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
2, _Internal::tensor_shape(this), target, stream);
}
// int32 version_number = 3;
if (this->_internal_version_number() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_version_number(), target);
}
// bytes tensor_content = 4;
if (!this->_internal_tensor_content().empty()) {
target = stream->WriteBytesMaybeAliased(
4, this->_internal_tensor_content(), target);
}
// repeated float float_val = 5 [packed = true];
if (this->_internal_float_val_size() > 0) {
target = stream->WriteFixedPacked(5, _internal_float_val(), target);
}
// repeated double double_val = 6 [packed = true];
if (this->_internal_double_val_size() > 0) {
target = stream->WriteFixedPacked(6, _internal_double_val(), target);
}
// repeated int32 int_val = 7 [packed = true];
{
int byte_size = _int_val_cached_byte_size_.load(std::memory_order_relaxed);
if (byte_size > 0) {
target = stream->WriteInt32Packed(
7, _internal_int_val(), byte_size, target);
}
}
// repeated bytes string_val = 8;
for (int i = 0, n = this->_internal_string_val_size(); i < n; i++) {
const auto& s = this->_internal_string_val(i);
target = stream->WriteBytes(8, s, target);
}
// repeated float scomplex_val = 9 [packed = true];
if (this->_internal_scomplex_val_size() > 0) {
target = stream->WriteFixedPacked(9, _internal_scomplex_val(), target);
}
// repeated int64 int64_val = 10 [packed = true];
{
int byte_size = _int64_val_cached_byte_size_.load(std::memory_order_relaxed);
if (byte_size > 0) {
target = stream->WriteInt64Packed(
10, _internal_int64_val(), byte_size, target);
}
}
// repeated bool bool_val = 11 [packed = true];
if (this->_internal_bool_val_size() > 0) {
target = stream->WriteFixedPacked(11, _internal_bool_val(), target);
}
// repeated double dcomplex_val = 12 [packed = true];
if (this->_internal_dcomplex_val_size() > 0) {
target = stream->WriteFixedPacked(12, _internal_dcomplex_val(), target);
}
// repeated int32 half_val = 13 [packed = true];
{
int byte_size = _half_val_cached_byte_size_.load(std::memory_order_relaxed);
if (byte_size > 0) {
target = stream->WriteInt32Packed(
13, _internal_half_val(), byte_size, target);
}
}
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);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorProto)
return target;
}
size_t TensorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorProto)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated float float_val = 5 [packed = true];
{
unsigned int count = static_cast<unsigned int>(this->_internal_float_val_size());
size_t data_size = 4UL * count;
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
total_size += data_size;
}
// repeated double double_val = 6 [packed = true];
{
unsigned int count = static_cast<unsigned int>(this->_internal_double_val_size());
size_t data_size = 8UL * count;
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
total_size += data_size;
}
// repeated int32 int_val = 7 [packed = true];
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
Int32Size(this->int_val_);
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
_int_val_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
// repeated bytes string_val = 8;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(string_val_.size());
for (int i = 0, n = string_val_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
string_val_.Get(i));
}
// repeated float scomplex_val = 9 [packed = true];
{
unsigned int count = static_cast<unsigned int>(this->_internal_scomplex_val_size());
size_t data_size = 4UL * count;
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
total_size += data_size;
}
// repeated int64 int64_val = 10 [packed = true];
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
Int64Size(this->int64_val_);
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
_int64_val_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
// repeated bool bool_val = 11 [packed = true];
{
unsigned int count = static_cast<unsigned int>(this->_internal_bool_val_size());
size_t data_size = 1UL * count;
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
total_size += data_size;
}
// repeated double dcomplex_val = 12 [packed = true];
{
unsigned int count = static_cast<unsigned int>(this->_internal_dcomplex_val_size());
size_t data_size = 8UL * count;
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
total_size += data_size;
}
// repeated int32 half_val = 13 [packed = true];
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
Int32Size(this->half_val_);
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
_half_val_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
// bytes tensor_content = 4;
if (!this->_internal_tensor_content().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->_internal_tensor_content());
}
// .opencv_tensorflow.TensorShapeProto tensor_shape = 2;
if (this->_internal_has_tensor_shape()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*tensor_shape_);
}
// .opencv_tensorflow.DataType dtype = 1;
if (this->_internal_dtype() != 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_dtype());
}
// int32 version_number = 3;
if (this->_internal_version_number() != 0) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_version_number());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorProto::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
TensorProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorProto::GetClassData() const { return &_class_data_; }
void TensorProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<TensorProto *>(to)->MergeFrom(
static_cast<const TensorProto &>(from));
}
void TensorProto::MergeFrom(const TensorProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorProto)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
float_val_.MergeFrom(from.float_val_);
double_val_.MergeFrom(from.double_val_);
int_val_.MergeFrom(from.int_val_);
string_val_.MergeFrom(from.string_val_);
scomplex_val_.MergeFrom(from.scomplex_val_);
int64_val_.MergeFrom(from.int64_val_);
bool_val_.MergeFrom(from.bool_val_);
dcomplex_val_.MergeFrom(from.dcomplex_val_);
half_val_.MergeFrom(from.half_val_);
if (!from._internal_tensor_content().empty()) {
_internal_set_tensor_content(from._internal_tensor_content());
}
if (from._internal_has_tensor_shape()) {
_internal_mutable_tensor_shape()->::opencv_tensorflow::TensorShapeProto::MergeFrom(from._internal_tensor_shape());
}
if (from._internal_dtype() != 0) {
_internal_set_dtype(from._internal_dtype());
}
if (from._internal_version_number() != 0) {
_internal_set_version_number(from._internal_version_number());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void TensorProto::CopyFrom(const TensorProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TensorProto::IsInitialized() const {
return true;
}
void TensorProto::InternalSwap(TensorProto* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
float_val_.InternalSwap(&other->float_val_);
double_val_.InternalSwap(&other->double_val_);
int_val_.InternalSwap(&other->int_val_);
string_val_.InternalSwap(&other->string_val_);
scomplex_val_.InternalSwap(&other->scomplex_val_);
int64_val_.InternalSwap(&other->int64_val_);
bool_val_.InternalSwap(&other->bool_val_);
dcomplex_val_.InternalSwap(&other->dcomplex_val_);
half_val_.InternalSwap(&other->half_val_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&tensor_content_, lhs_arena,
&other->tensor_content_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(TensorProto, version_number_)
+ sizeof(TensorProto::version_number_)
- PROTOBUF_FIELD_OFFSET(TensorProto, tensor_shape_)>(
reinterpret_cast<char*>(&tensor_shape_),
reinterpret_cast<char*>(&other->tensor_shape_));
}
::PROTOBUF_NAMESPACE_ID::Metadata TensorProto::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_tensor_2eproto_getter, &descriptor_table_tensor_2eproto_once,
file_level_metadata_tensor_2eproto[0]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace opencv_tensorflow
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::TensorProto* Arena::CreateMaybeMessage< ::opencv_tensorflow::TensorProto >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_tensorflow::TensorProto >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,554 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensor_shape.proto
#include "tensor_shape.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#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)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace opencv_tensorflow {
constexpr TensorShapeProto_Dim::TensorShapeProto_Dim(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, size_(int64_t{0}){}
struct TensorShapeProto_DimDefaultTypeInternal {
constexpr TensorShapeProto_DimDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~TensorShapeProto_DimDefaultTypeInternal() {}
union {
TensorShapeProto_Dim _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorShapeProto_DimDefaultTypeInternal _TensorShapeProto_Dim_default_instance_;
constexpr TensorShapeProto::TensorShapeProto(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: dim_()
, unknown_rank_(false){}
struct TensorShapeProtoDefaultTypeInternal {
constexpr TensorShapeProtoDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~TensorShapeProtoDefaultTypeInternal() {}
union {
TensorShapeProto _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_;
} // namespace opencv_tensorflow
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensor_5fshape_2eproto[2];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensor_5fshape_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensor_5fshape_2eproto = nullptr;
const uint32_t TableStruct_tensor_5fshape_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, size_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto_Dim, name_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, dim_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::TensorShapeProto, unknown_rank_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::opencv_tensorflow::TensorShapeProto_Dim)},
{ 8, -1, -1, sizeof(::opencv_tensorflow::TensorShapeProto)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_TensorShapeProto_Dim_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_TensorShapeProto_default_instance_),
};
const char descriptor_table_protodef_tensor_5fshape_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\022tensor_shape.proto\022\021opencv_tensorflow\""
"\201\001\n\020TensorShapeProto\0224\n\003dim\030\002 \003(\0132\'.open"
"cv_tensorflow.TensorShapeProto.Dim\022\024\n\014un"
"known_rank\030\003 \001(\010\032!\n\003Dim\022\014\n\004size\030\001 \001(\003\022\014\n"
"\004name\030\002 \001(\tB2\n\030org.tensorflow.frameworkB"
"\021TensorShapeProtosP\001\370\001\001b\006proto3"
;
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensor_5fshape_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensor_5fshape_2eproto = {
false, false, 231, descriptor_table_protodef_tensor_5fshape_2eproto, "tensor_shape.proto",
&descriptor_table_tensor_5fshape_2eproto_once, nullptr, 0, 2,
schemas, file_default_instances, TableStruct_tensor_5fshape_2eproto::offsets,
file_level_metadata_tensor_5fshape_2eproto, file_level_enum_descriptors_tensor_5fshape_2eproto, file_level_service_descriptors_tensor_5fshape_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_tensor_5fshape_2eproto_getter() {
return &descriptor_table_tensor_5fshape_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_tensor_5fshape_2eproto(&descriptor_table_tensor_5fshape_2eproto);
namespace opencv_tensorflow {
// ===================================================================
class TensorShapeProto_Dim::_Internal {
public:
};
TensorShapeProto_Dim::TensorShapeProto_Dim(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto.Dim)
}
TensorShapeProto_Dim::TensorShapeProto_Dim(const TensorShapeProto_Dim& from)
: ::PROTOBUF_NAMESPACE_ID::Message() {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (!from._internal_name().empty()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
size_ = from.size_;
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorShapeProto.Dim)
}
inline void TensorShapeProto_Dim::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
size_ = int64_t{0};
}
TensorShapeProto_Dim::~TensorShapeProto_Dim() {
// @@protoc_insertion_point(destructor:opencv_tensorflow.TensorShapeProto.Dim)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void TensorShapeProto_Dim::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void TensorShapeProto_Dim::ArenaDtor(void* object) {
TensorShapeProto_Dim* _this = reinterpret_cast< TensorShapeProto_Dim* >(object);
(void)_this;
}
void TensorShapeProto_Dim::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TensorShapeProto_Dim::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void TensorShapeProto_Dim::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto.Dim)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
name_.ClearToEmpty();
size_ = int64_t{0};
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* TensorShapeProto_Dim::_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) {
// int64 size = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// string name = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_tensorflow.TensorShapeProto.Dim.name"));
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* TensorShapeProto_Dim::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorShapeProto.Dim)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// int64 size = 1;
if (this->_internal_size() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_size(), target);
}
// string name = 2;
if (!this->_internal_name().empty()) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
"opencv_tensorflow.TensorShapeProto.Dim.name");
target = stream->WriteStringMaybeAliased(
2, this->_internal_name(), target);
}
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);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorShapeProto.Dim)
return target;
}
size_t TensorShapeProto_Dim::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto.Dim)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// string name = 2;
if (!this->_internal_name().empty()) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// int64 size = 1;
if (this->_internal_size() != 0) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_size());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto_Dim::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
TensorShapeProto_Dim::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto_Dim::GetClassData() const { return &_class_data_; }
void TensorShapeProto_Dim::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<TensorShapeProto_Dim *>(to)->MergeFrom(
static_cast<const TensorShapeProto_Dim &>(from));
}
void TensorShapeProto_Dim::MergeFrom(const TensorShapeProto_Dim& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorShapeProto.Dim)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (!from._internal_name().empty()) {
_internal_set_name(from._internal_name());
}
if (from._internal_size() != 0) {
_internal_set_size(from._internal_size());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void TensorShapeProto_Dim::CopyFrom(const TensorShapeProto_Dim& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorShapeProto.Dim)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TensorShapeProto_Dim::IsInitialized() const {
return true;
}
void TensorShapeProto_Dim::InternalSwap(TensorShapeProto_Dim* other) {
using std::swap;
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(),
&name_, lhs_arena,
&other->name_, rhs_arena
);
swap(size_, other->size_);
}
::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto_Dim::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_tensor_5fshape_2eproto_getter, &descriptor_table_tensor_5fshape_2eproto_once,
file_level_metadata_tensor_5fshape_2eproto[0]);
}
// ===================================================================
class TensorShapeProto::_Internal {
public:
};
TensorShapeProto::TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
dim_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.TensorShapeProto)
}
TensorShapeProto::TensorShapeProto(const TensorShapeProto& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
dim_(from.dim_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
unknown_rank_ = from.unknown_rank_;
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.TensorShapeProto)
}
inline void TensorShapeProto::SharedCtor() {
unknown_rank_ = false;
}
TensorShapeProto::~TensorShapeProto() {
// @@protoc_insertion_point(destructor:opencv_tensorflow.TensorShapeProto)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void TensorShapeProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void TensorShapeProto::ArenaDtor(void* object) {
TensorShapeProto* _this = reinterpret_cast< TensorShapeProto* >(object);
(void)_this;
}
void TensorShapeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TensorShapeProto::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void TensorShapeProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.TensorShapeProto)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
dim_.Clear();
unknown_rank_ = false;
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* TensorShapeProto::_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) {
// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_dim(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
} else
goto handle_unusual;
continue;
// bool unknown_rank = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
unknown_rank_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* TensorShapeProto::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.TensorShapeProto)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_dim_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, this->_internal_dim(i), target, stream);
}
// bool unknown_rank = 3;
if (this->_internal_unknown_rank() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_unknown_rank(), target);
}
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);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.TensorShapeProto)
return target;
}
size_t TensorShapeProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.TensorShapeProto)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
total_size += 1UL * this->_internal_dim_size();
for (const auto& msg : this->dim_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// bool unknown_rank = 3;
if (this->_internal_unknown_rank() != 0) {
total_size += 1 + 1;
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TensorShapeProto::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
TensorShapeProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TensorShapeProto::GetClassData() const { return &_class_data_; }
void TensorShapeProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<TensorShapeProto *>(to)->MergeFrom(
static_cast<const TensorShapeProto &>(from));
}
void TensorShapeProto::MergeFrom(const TensorShapeProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.TensorShapeProto)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
dim_.MergeFrom(from.dim_);
if (from._internal_unknown_rank() != 0) {
_internal_set_unknown_rank(from._internal_unknown_rank());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void TensorShapeProto::CopyFrom(const TensorShapeProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.TensorShapeProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TensorShapeProto::IsInitialized() const {
return true;
}
void TensorShapeProto::InternalSwap(TensorShapeProto* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
dim_.InternalSwap(&other->dim_);
swap(unknown_rank_, other->unknown_rank_);
}
::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_tensor_5fshape_2eproto_getter, &descriptor_table_tensor_5fshape_2eproto_once,
file_level_metadata_tensor_5fshape_2eproto[1]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace opencv_tensorflow
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::TensorShapeProto_Dim* Arena::CreateMaybeMessage< ::opencv_tensorflow::TensorShapeProto_Dim >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_tensorflow::TensorShapeProto_Dim >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::TensorShapeProto* Arena::CreateMaybeMessage< ::opencv_tensorflow::TensorShapeProto >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_tensorflow::TensorShapeProto >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
@@ -0,0 +1,559 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensor_shape.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_tensor_5fshape_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_tensor_5fshape_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3019000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3019001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_tensor_5fshape_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_tensor_5fshape_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const uint32_t offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensor_5fshape_2eproto;
namespace opencv_tensorflow {
class TensorShapeProto;
struct TensorShapeProtoDefaultTypeInternal;
extern TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_;
class TensorShapeProto_Dim;
struct TensorShapeProto_DimDefaultTypeInternal;
extern TensorShapeProto_DimDefaultTypeInternal _TensorShapeProto_Dim_default_instance_;
} // namespace opencv_tensorflow
PROTOBUF_NAMESPACE_OPEN
template<> ::opencv_tensorflow::TensorShapeProto* Arena::CreateMaybeMessage<::opencv_tensorflow::TensorShapeProto>(Arena*);
template<> ::opencv_tensorflow::TensorShapeProto_Dim* Arena::CreateMaybeMessage<::opencv_tensorflow::TensorShapeProto_Dim>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace opencv_tensorflow {
// ===================================================================
class TensorShapeProto_Dim final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.TensorShapeProto.Dim) */ {
public:
inline TensorShapeProto_Dim() : TensorShapeProto_Dim(nullptr) {}
~TensorShapeProto_Dim() override;
explicit constexpr TensorShapeProto_Dim(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
TensorShapeProto_Dim(const TensorShapeProto_Dim& from);
TensorShapeProto_Dim(TensorShapeProto_Dim&& from) noexcept
: TensorShapeProto_Dim() {
*this = ::std::move(from);
}
inline TensorShapeProto_Dim& operator=(const TensorShapeProto_Dim& from) {
CopyFrom(from);
return *this;
}
inline TensorShapeProto_Dim& operator=(TensorShapeProto_Dim&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
&& GetOwningArena() != nullptr
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
) {
InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const TensorShapeProto_Dim& default_instance() {
return *internal_default_instance();
}
static inline const TensorShapeProto_Dim* internal_default_instance() {
return reinterpret_cast<const TensorShapeProto_Dim*>(
&_TensorShapeProto_Dim_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(TensorShapeProto_Dim& a, TensorShapeProto_Dim& b) {
a.Swap(&b);
}
inline void Swap(TensorShapeProto_Dim* other) {
if (other == this) return;
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() != nullptr &&
GetOwningArena() == other->GetOwningArena()) {
#else // PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() == other->GetOwningArena()) {
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(TensorShapeProto_Dim* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
TensorShapeProto_Dim* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
return CreateMaybeMessage<TensorShapeProto_Dim>(arena);
}
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const TensorShapeProto_Dim& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
void MergeFrom(const TensorShapeProto_Dim& from);
private:
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(TensorShapeProto_Dim* other);
private:
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "opencv_tensorflow.TensorShapeProto.Dim";
}
protected:
explicit TensorShapeProto_Dim(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
static const ClassData _class_data_;
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kNameFieldNumber = 2,
kSizeFieldNumber = 1,
};
// string name = 2;
void clear_name();
const std::string& name() const;
template <typename ArgT0 = const std::string&, typename... ArgT>
void set_name(ArgT0&& arg0, ArgT... args);
std::string* mutable_name();
PROTOBUF_NODISCARD std::string* release_name();
void set_allocated_name(std::string* name);
private:
const std::string& _internal_name() const;
inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value);
std::string* _internal_mutable_name();
public:
// int64 size = 1;
void clear_size();
int64_t size() const;
void set_size(int64_t value);
private:
int64_t _internal_size() const;
void _internal_set_size(int64_t value);
public:
// @@protoc_insertion_point(class_scope:opencv_tensorflow.TensorShapeProto.Dim)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_;
int64_t size_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_tensor_5fshape_2eproto;
};
// -------------------------------------------------------------------
class TensorShapeProto final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.TensorShapeProto) */ {
public:
inline TensorShapeProto() : TensorShapeProto(nullptr) {}
~TensorShapeProto() override;
explicit constexpr TensorShapeProto(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
TensorShapeProto(const TensorShapeProto& from);
TensorShapeProto(TensorShapeProto&& from) noexcept
: TensorShapeProto() {
*this = ::std::move(from);
}
inline TensorShapeProto& operator=(const TensorShapeProto& from) {
CopyFrom(from);
return *this;
}
inline TensorShapeProto& operator=(TensorShapeProto&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
&& GetOwningArena() != nullptr
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
) {
InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const TensorShapeProto& default_instance() {
return *internal_default_instance();
}
static inline const TensorShapeProto* internal_default_instance() {
return reinterpret_cast<const TensorShapeProto*>(
&_TensorShapeProto_default_instance_);
}
static constexpr int kIndexInFileMessages =
1;
friend void swap(TensorShapeProto& a, TensorShapeProto& b) {
a.Swap(&b);
}
inline void Swap(TensorShapeProto* other) {
if (other == this) return;
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() != nullptr &&
GetOwningArena() == other->GetOwningArena()) {
#else // PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() == other->GetOwningArena()) {
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(TensorShapeProto* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
TensorShapeProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
return CreateMaybeMessage<TensorShapeProto>(arena);
}
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const TensorShapeProto& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
void MergeFrom(const TensorShapeProto& from);
private:
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(TensorShapeProto* other);
private:
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "opencv_tensorflow.TensorShapeProto";
}
protected:
explicit TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
static const ClassData _class_data_;
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
// nested types ----------------------------------------------------
typedef TensorShapeProto_Dim Dim;
// accessors -------------------------------------------------------
enum : int {
kDimFieldNumber = 2,
kUnknownRankFieldNumber = 3,
};
// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
int dim_size() const;
private:
int _internal_dim_size() const;
public:
void clear_dim();
::opencv_tensorflow::TensorShapeProto_Dim* mutable_dim(int index);
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto_Dim >*
mutable_dim();
private:
const ::opencv_tensorflow::TensorShapeProto_Dim& _internal_dim(int index) const;
::opencv_tensorflow::TensorShapeProto_Dim* _internal_add_dim();
public:
const ::opencv_tensorflow::TensorShapeProto_Dim& dim(int index) const;
::opencv_tensorflow::TensorShapeProto_Dim* add_dim();
const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto_Dim >&
dim() const;
// bool unknown_rank = 3;
void clear_unknown_rank();
bool unknown_rank() const;
void set_unknown_rank(bool value);
private:
bool _internal_unknown_rank() const;
void _internal_set_unknown_rank(bool value);
public:
// @@protoc_insertion_point(class_scope:opencv_tensorflow.TensorShapeProto)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto_Dim > dim_;
bool unknown_rank_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_tensor_5fshape_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// TensorShapeProto_Dim
// int64 size = 1;
inline void TensorShapeProto_Dim::clear_size() {
size_ = int64_t{0};
}
inline int64_t TensorShapeProto_Dim::_internal_size() const {
return size_;
}
inline int64_t TensorShapeProto_Dim::size() const {
// @@protoc_insertion_point(field_get:opencv_tensorflow.TensorShapeProto.Dim.size)
return _internal_size();
}
inline void TensorShapeProto_Dim::_internal_set_size(int64_t value) {
size_ = value;
}
inline void TensorShapeProto_Dim::set_size(int64_t value) {
_internal_set_size(value);
// @@protoc_insertion_point(field_set:opencv_tensorflow.TensorShapeProto.Dim.size)
}
// string name = 2;
inline void TensorShapeProto_Dim::clear_name() {
name_.ClearToEmpty();
}
inline const std::string& TensorShapeProto_Dim::name() const {
// @@protoc_insertion_point(field_get:opencv_tensorflow.TensorShapeProto.Dim.name)
return _internal_name();
}
template <typename ArgT0, typename... ArgT>
inline PROTOBUF_ALWAYS_INLINE
void TensorShapeProto_Dim::set_name(ArgT0&& arg0, ArgT... args) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
// @@protoc_insertion_point(field_set:opencv_tensorflow.TensorShapeProto.Dim.name)
}
inline std::string* TensorShapeProto_Dim::mutable_name() {
std::string* _s = _internal_mutable_name();
// @@protoc_insertion_point(field_mutable:opencv_tensorflow.TensorShapeProto.Dim.name)
return _s;
}
inline const std::string& TensorShapeProto_Dim::_internal_name() const {
return name_.Get();
}
inline void TensorShapeProto_Dim::_internal_set_name(const std::string& value) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
}
inline std::string* TensorShapeProto_Dim::_internal_mutable_name() {
return name_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
}
inline std::string* TensorShapeProto_Dim::release_name() {
// @@protoc_insertion_point(field_release:opencv_tensorflow.TensorShapeProto.Dim.name)
return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
}
inline void TensorShapeProto_Dim::set_allocated_name(std::string* name) {
if (name != nullptr) {
} else {
}
name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name,
GetArenaForAllocation());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (name_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) {
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
}
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
// @@protoc_insertion_point(field_set_allocated:opencv_tensorflow.TensorShapeProto.Dim.name)
}
// -------------------------------------------------------------------
// TensorShapeProto
// repeated .opencv_tensorflow.TensorShapeProto.Dim dim = 2;
inline int TensorShapeProto::_internal_dim_size() const {
return dim_.size();
}
inline int TensorShapeProto::dim_size() const {
return _internal_dim_size();
}
inline void TensorShapeProto::clear_dim() {
dim_.Clear();
}
inline ::opencv_tensorflow::TensorShapeProto_Dim* TensorShapeProto::mutable_dim(int index) {
// @@protoc_insertion_point(field_mutable:opencv_tensorflow.TensorShapeProto.dim)
return dim_.Mutable(index);
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto_Dim >*
TensorShapeProto::mutable_dim() {
// @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.TensorShapeProto.dim)
return &dim_;
}
inline const ::opencv_tensorflow::TensorShapeProto_Dim& TensorShapeProto::_internal_dim(int index) const {
return dim_.Get(index);
}
inline const ::opencv_tensorflow::TensorShapeProto_Dim& TensorShapeProto::dim(int index) const {
// @@protoc_insertion_point(field_get:opencv_tensorflow.TensorShapeProto.dim)
return _internal_dim(index);
}
inline ::opencv_tensorflow::TensorShapeProto_Dim* TensorShapeProto::_internal_add_dim() {
return dim_.Add();
}
inline ::opencv_tensorflow::TensorShapeProto_Dim* TensorShapeProto::add_dim() {
::opencv_tensorflow::TensorShapeProto_Dim* _add = _internal_add_dim();
// @@protoc_insertion_point(field_add:opencv_tensorflow.TensorShapeProto.dim)
return _add;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::opencv_tensorflow::TensorShapeProto_Dim >&
TensorShapeProto::dim() const {
// @@protoc_insertion_point(field_list:opencv_tensorflow.TensorShapeProto.dim)
return dim_;
}
// bool unknown_rank = 3;
inline void TensorShapeProto::clear_unknown_rank() {
unknown_rank_ = false;
}
inline bool TensorShapeProto::_internal_unknown_rank() const {
return unknown_rank_;
}
inline bool TensorShapeProto::unknown_rank() const {
// @@protoc_insertion_point(field_get:opencv_tensorflow.TensorShapeProto.unknown_rank)
return _internal_unknown_rank();
}
inline void TensorShapeProto::_internal_set_unknown_rank(bool value) {
unknown_rank_ = value;
}
inline void TensorShapeProto::set_unknown_rank(bool value) {
_internal_set_unknown_rank(value);
// @@protoc_insertion_point(field_set:opencv_tensorflow.TensorShapeProto.unknown_rank)
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// -------------------------------------------------------------------
// @@protoc_insertion_point(namespace_scope)
} // namespace opencv_tensorflow
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensor_5fshape_2eproto
+120
View File
@@ -0,0 +1,120 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: types.proto
#include "types.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#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)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace opencv_tensorflow {
} // namespace opencv_tensorflow
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_types_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_types_2eproto = nullptr;
const uint32_t TableStruct_types_2eproto::offsets[1] = {};
static constexpr ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema* schemas = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::Message* const* file_default_instances = nullptr;
const char descriptor_table_protodef_types_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\013types.proto\022\021opencv_tensorflow*\234\005\n\010Dat"
"aType\022\016\n\nDT_INVALID\020\000\022\014\n\010DT_FLOAT\020\001\022\r\n\tD"
"T_DOUBLE\020\002\022\014\n\010DT_INT32\020\003\022\014\n\010DT_UINT8\020\004\022\014"
"\n\010DT_INT16\020\005\022\013\n\007DT_INT8\020\006\022\r\n\tDT_STRING\020\007"
"\022\020\n\014DT_COMPLEX64\020\010\022\014\n\010DT_INT64\020\t\022\013\n\007DT_B"
"OOL\020\n\022\014\n\010DT_QINT8\020\013\022\r\n\tDT_QUINT8\020\014\022\r\n\tDT"
"_QINT32\020\r\022\017\n\013DT_BFLOAT16\020\016\022\r\n\tDT_QINT16\020"
"\017\022\016\n\nDT_QUINT16\020\020\022\r\n\tDT_UINT16\020\021\022\021\n\rDT_C"
"OMPLEX128\020\022\022\013\n\007DT_HALF\020\023\022\020\n\014DT_FLOAT_REF"
"\020e\022\021\n\rDT_DOUBLE_REF\020f\022\020\n\014DT_INT32_REF\020g\022"
"\020\n\014DT_UINT8_REF\020h\022\020\n\014DT_INT16_REF\020i\022\017\n\013D"
"T_INT8_REF\020j\022\021\n\rDT_STRING_REF\020k\022\024\n\020DT_CO"
"MPLEX64_REF\020l\022\020\n\014DT_INT64_REF\020m\022\017\n\013DT_BO"
"OL_REF\020n\022\020\n\014DT_QINT8_REF\020o\022\021\n\rDT_QUINT8_"
"REF\020p\022\021\n\rDT_QINT32_REF\020q\022\023\n\017DT_BFLOAT16_"
"REF\020r\022\021\n\rDT_QINT16_REF\020s\022\022\n\016DT_QUINT16_R"
"EF\020t\022\021\n\rDT_UINT16_REF\020u\022\025\n\021DT_COMPLEX128"
"_REF\020v\022\017\n\013DT_HALF_REF\020wB,\n\030org.tensorflo"
"w.frameworkB\013TypesProtosP\001\370\001\001b\006proto3"
;
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_types_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_types_2eproto = {
false, false, 757, descriptor_table_protodef_types_2eproto, "types.proto",
&descriptor_table_types_2eproto_once, nullptr, 0, 0,
schemas, file_default_instances, TableStruct_types_2eproto::offsets,
nullptr, file_level_enum_descriptors_types_2eproto, file_level_service_descriptors_types_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_types_2eproto_getter() {
return &descriptor_table_types_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_types_2eproto(&descriptor_table_types_2eproto);
namespace opencv_tensorflow {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DataType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_types_2eproto);
return file_level_enum_descriptors_types_2eproto[0];
}
bool DataType_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
case 19:
case 101:
case 102:
case 103:
case 104:
case 105:
case 106:
case 107:
case 108:
case 109:
case 110:
case 111:
case 112:
case 113:
case 114:
case 115:
case 116:
case 117:
case 118:
case 119:
return true;
default:
return false;
}
}
// @@protoc_insertion_point(namespace_scope)
} // namespace opencv_tensorflow
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
+154
View File
@@ -0,0 +1,154 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: types.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_types_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_types_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3019000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3019001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/generated_enum_reflection.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_types_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_types_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const uint32_t offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_types_2eproto;
PROTOBUF_NAMESPACE_OPEN
PROTOBUF_NAMESPACE_CLOSE
namespace opencv_tensorflow {
enum DataType : int {
DT_INVALID = 0,
DT_FLOAT = 1,
DT_DOUBLE = 2,
DT_INT32 = 3,
DT_UINT8 = 4,
DT_INT16 = 5,
DT_INT8 = 6,
DT_STRING = 7,
DT_COMPLEX64 = 8,
DT_INT64 = 9,
DT_BOOL = 10,
DT_QINT8 = 11,
DT_QUINT8 = 12,
DT_QINT32 = 13,
DT_BFLOAT16 = 14,
DT_QINT16 = 15,
DT_QUINT16 = 16,
DT_UINT16 = 17,
DT_COMPLEX128 = 18,
DT_HALF = 19,
DT_FLOAT_REF = 101,
DT_DOUBLE_REF = 102,
DT_INT32_REF = 103,
DT_UINT8_REF = 104,
DT_INT16_REF = 105,
DT_INT8_REF = 106,
DT_STRING_REF = 107,
DT_COMPLEX64_REF = 108,
DT_INT64_REF = 109,
DT_BOOL_REF = 110,
DT_QINT8_REF = 111,
DT_QUINT8_REF = 112,
DT_QINT32_REF = 113,
DT_BFLOAT16_REF = 114,
DT_QINT16_REF = 115,
DT_QUINT16_REF = 116,
DT_UINT16_REF = 117,
DT_COMPLEX128_REF = 118,
DT_HALF_REF = 119,
DataType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::min(),
DataType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<int32_t>::max()
};
bool DataType_IsValid(int value);
constexpr DataType DataType_MIN = DT_INVALID;
constexpr DataType DataType_MAX = DT_HALF_REF;
constexpr int DataType_ARRAYSIZE = DataType_MAX + 1;
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DataType_descriptor();
template<typename T>
inline const std::string& DataType_Name(T enum_t_value) {
static_assert(::std::is_same<T, DataType>::value ||
::std::is_integral<T>::value,
"Incorrect type passed to function DataType_Name.");
return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum(
DataType_descriptor(), enum_t_value);
}
inline bool DataType_Parse(
::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DataType* value) {
return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<DataType>(
DataType_descriptor(), name, value);
}
// ===================================================================
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
} // namespace opencv_tensorflow
PROTOBUF_NAMESPACE_OPEN
template <> struct is_proto_enum< ::opencv_tensorflow::DataType> : ::std::true_type {};
template <>
inline const EnumDescriptor* GetEnumDescriptor< ::opencv_tensorflow::DataType>() {
return ::opencv_tensorflow::DataType_descriptor();
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_types_2eproto
+342
View File
@@ -0,0 +1,342 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: versions.proto
#include "versions.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#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)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace opencv_tensorflow {
constexpr VersionDef::VersionDef(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: bad_consumers_()
, _bad_consumers_cached_byte_size_(0)
, producer_(0)
, min_consumer_(0){}
struct VersionDefDefaultTypeInternal {
constexpr VersionDefDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~VersionDefDefaultTypeInternal() {}
union {
VersionDef _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT VersionDefDefaultTypeInternal _VersionDef_default_instance_;
} // namespace opencv_tensorflow
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_versions_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_versions_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_versions_2eproto = nullptr;
const uint32_t TableStruct_versions_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::VersionDef, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::VersionDef, producer_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::VersionDef, min_consumer_),
PROTOBUF_FIELD_OFFSET(::opencv_tensorflow::VersionDef, bad_consumers_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::opencv_tensorflow::VersionDef)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_tensorflow::_VersionDef_default_instance_),
};
const char descriptor_table_protodef_versions_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\016versions.proto\022\021opencv_tensorflow\"K\n\nV"
"ersionDef\022\020\n\010producer\030\001 \001(\005\022\024\n\014min_consu"
"mer\030\002 \001(\005\022\025\n\rbad_consumers\030\003 \003(\005B/\n\030org."
"tensorflow.frameworkB\016VersionsProtosP\001\370\001"
"\001b\006proto3"
;
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_versions_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_versions_2eproto = {
false, false, 169, descriptor_table_protodef_versions_2eproto, "versions.proto",
&descriptor_table_versions_2eproto_once, nullptr, 0, 1,
schemas, file_default_instances, TableStruct_versions_2eproto::offsets,
file_level_metadata_versions_2eproto, file_level_enum_descriptors_versions_2eproto, file_level_service_descriptors_versions_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_versions_2eproto_getter() {
return &descriptor_table_versions_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_versions_2eproto(&descriptor_table_versions_2eproto);
namespace opencv_tensorflow {
// ===================================================================
class VersionDef::_Internal {
public:
};
VersionDef::VersionDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
bad_consumers_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_tensorflow.VersionDef)
}
VersionDef::VersionDef(const VersionDef& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
bad_consumers_(from.bad_consumers_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&producer_, &from.producer_,
static_cast<size_t>(reinterpret_cast<char*>(&min_consumer_) -
reinterpret_cast<char*>(&producer_)) + sizeof(min_consumer_));
// @@protoc_insertion_point(copy_constructor:opencv_tensorflow.VersionDef)
}
inline void VersionDef::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&producer_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&min_consumer_) -
reinterpret_cast<char*>(&producer_)) + sizeof(min_consumer_));
}
VersionDef::~VersionDef() {
// @@protoc_insertion_point(destructor:opencv_tensorflow.VersionDef)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void VersionDef::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void VersionDef::ArenaDtor(void* object) {
VersionDef* _this = reinterpret_cast< VersionDef* >(object);
(void)_this;
}
void VersionDef::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void VersionDef::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void VersionDef::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_tensorflow.VersionDef)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
bad_consumers_.Clear();
::memset(&producer_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&min_consumer_) -
reinterpret_cast<char*>(&producer_)) + sizeof(min_consumer_));
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* VersionDef::_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) {
// int32 producer = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
producer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// int32 min_consumer = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
min_consumer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated int32 bad_consumers = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_bad_consumers(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 24) {
_internal_add_bad_consumers(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* VersionDef::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_tensorflow.VersionDef)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// int32 producer = 1;
if (this->_internal_producer() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_producer(), target);
}
// int32 min_consumer = 2;
if (this->_internal_min_consumer() != 0) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_min_consumer(), target);
}
// repeated int32 bad_consumers = 3;
{
int byte_size = _bad_consumers_cached_byte_size_.load(std::memory_order_relaxed);
if (byte_size > 0) {
target = stream->WriteInt32Packed(
3, _internal_bad_consumers(), byte_size, target);
}
}
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);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_tensorflow.VersionDef)
return target;
}
size_t VersionDef::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_tensorflow.VersionDef)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated int32 bad_consumers = 3;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
Int32Size(this->bad_consumers_);
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
_bad_consumers_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
// int32 producer = 1;
if (this->_internal_producer() != 0) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_producer());
}
// int32 min_consumer = 2;
if (this->_internal_min_consumer() != 0) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_min_consumer());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData VersionDef::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
VersionDef::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*VersionDef::GetClassData() const { return &_class_data_; }
void VersionDef::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<VersionDef *>(to)->MergeFrom(
static_cast<const VersionDef &>(from));
}
void VersionDef::MergeFrom(const VersionDef& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_tensorflow.VersionDef)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
bad_consumers_.MergeFrom(from.bad_consumers_);
if (from._internal_producer() != 0) {
_internal_set_producer(from._internal_producer());
}
if (from._internal_min_consumer() != 0) {
_internal_set_min_consumer(from._internal_min_consumer());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void VersionDef::CopyFrom(const VersionDef& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_tensorflow.VersionDef)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool VersionDef::IsInitialized() const {
return true;
}
void VersionDef::InternalSwap(VersionDef* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
bad_consumers_.InternalSwap(&other->bad_consumers_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(VersionDef, min_consumer_)
+ sizeof(VersionDef::min_consumer_)
- PROTOBUF_FIELD_OFFSET(VersionDef, producer_)>(
reinterpret_cast<char*>(&producer_),
reinterpret_cast<char*>(&other->producer_));
}
::PROTOBUF_NAMESPACE_ID::Metadata VersionDef::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_versions_2eproto_getter, &descriptor_table_versions_2eproto_once,
file_level_metadata_versions_2eproto[0]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace opencv_tensorflow
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::opencv_tensorflow::VersionDef* Arena::CreateMaybeMessage< ::opencv_tensorflow::VersionDef >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_tensorflow::VersionDef >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
+357
View File
@@ -0,0 +1,357 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: versions.proto
#ifndef GOOGLE_PROTOBUF_INCLUDED_versions_2eproto
#define GOOGLE_PROTOBUF_INCLUDED_versions_2eproto
#include <limits>
#include <string>
#include <google/protobuf/port_def.inc>
#if PROTOBUF_VERSION < 3019000
#error This file was generated by a newer version of protoc which is
#error incompatible with your Protocol Buffer headers. Please update
#error your headers.
#endif
#if 3019001 < PROTOBUF_MIN_PROTOC_VERSION
#error This file was generated by an older version of protoc which is
#error incompatible with your Protocol Buffer headers. Please
#error regenerate this file with a newer version of protoc.
#endif
#include <google/protobuf/port_undef.inc>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/arena.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/generated_message_util.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/message.h>
#include <google/protobuf/repeated_field.h> // IWYU pragma: export
#include <google/protobuf/extension_set.h> // IWYU pragma: export
#include <google/protobuf/unknown_field_set.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
#define PROTOBUF_INTERNAL_EXPORT_versions_2eproto
PROTOBUF_NAMESPACE_OPEN
namespace internal {
class AnyMetadata;
} // namespace internal
PROTOBUF_NAMESPACE_CLOSE
// Internal implementation detail -- do not use these members.
struct TableStruct_versions_2eproto {
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
PROTOBUF_SECTION_VARIABLE(protodesc_cold);
static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
static const uint32_t offsets[];
};
extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_versions_2eproto;
namespace opencv_tensorflow {
class VersionDef;
struct VersionDefDefaultTypeInternal;
extern VersionDefDefaultTypeInternal _VersionDef_default_instance_;
} // namespace opencv_tensorflow
PROTOBUF_NAMESPACE_OPEN
template<> ::opencv_tensorflow::VersionDef* Arena::CreateMaybeMessage<::opencv_tensorflow::VersionDef>(Arena*);
PROTOBUF_NAMESPACE_CLOSE
namespace opencv_tensorflow {
// ===================================================================
class VersionDef final :
public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:opencv_tensorflow.VersionDef) */ {
public:
inline VersionDef() : VersionDef(nullptr) {}
~VersionDef() override;
explicit constexpr VersionDef(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
VersionDef(const VersionDef& from);
VersionDef(VersionDef&& from) noexcept
: VersionDef() {
*this = ::std::move(from);
}
inline VersionDef& operator=(const VersionDef& from) {
CopyFrom(from);
return *this;
}
inline VersionDef& operator=(VersionDef&& from) noexcept {
if (this == &from) return *this;
if (GetOwningArena() == from.GetOwningArena()
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
&& GetOwningArena() != nullptr
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
) {
InternalSwap(&from);
} else {
CopyFrom(from);
}
return *this;
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
return GetDescriptor();
}
static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
return default_instance().GetMetadata().descriptor;
}
static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
return default_instance().GetMetadata().reflection;
}
static const VersionDef& default_instance() {
return *internal_default_instance();
}
static inline const VersionDef* internal_default_instance() {
return reinterpret_cast<const VersionDef*>(
&_VersionDef_default_instance_);
}
static constexpr int kIndexInFileMessages =
0;
friend void swap(VersionDef& a, VersionDef& b) {
a.Swap(&b);
}
inline void Swap(VersionDef* other) {
if (other == this) return;
#ifdef PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() != nullptr &&
GetOwningArena() == other->GetOwningArena()) {
#else // PROTOBUF_FORCE_COPY_IN_SWAP
if (GetOwningArena() == other->GetOwningArena()) {
#endif // !PROTOBUF_FORCE_COPY_IN_SWAP
InternalSwap(other);
} else {
::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
}
}
void UnsafeArenaSwap(VersionDef* other) {
if (other == this) return;
GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
InternalSwap(other);
}
// implements Message ----------------------------------------------
VersionDef* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
return CreateMaybeMessage<VersionDef>(arena);
}
using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
void CopyFrom(const VersionDef& from);
using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
void MergeFrom(const VersionDef& from);
private:
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from);
public:
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
bool IsInitialized() const final;
size_t ByteSizeLong() const final;
const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
uint8_t* _InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
int GetCachedSize() const final { return _cached_size_.Get(); }
private:
void SharedCtor();
void SharedDtor();
void SetCachedSize(int size) const final;
void InternalSwap(VersionDef* other);
private:
friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
return "opencv_tensorflow.VersionDef";
}
protected:
explicit VersionDef(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned = false);
private:
static void ArenaDtor(void* object);
inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
public:
static const ClassData _class_data_;
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
// nested types ----------------------------------------------------
// accessors -------------------------------------------------------
enum : int {
kBadConsumersFieldNumber = 3,
kProducerFieldNumber = 1,
kMinConsumerFieldNumber = 2,
};
// repeated int32 bad_consumers = 3;
int bad_consumers_size() const;
private:
int _internal_bad_consumers_size() const;
public:
void clear_bad_consumers();
private:
int32_t _internal_bad_consumers(int index) const;
const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
_internal_bad_consumers() const;
void _internal_add_bad_consumers(int32_t value);
::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
_internal_mutable_bad_consumers();
public:
int32_t bad_consumers(int index) const;
void set_bad_consumers(int index, int32_t value);
void add_bad_consumers(int32_t value);
const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
bad_consumers() const;
::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
mutable_bad_consumers();
// int32 producer = 1;
void clear_producer();
int32_t producer() const;
void set_producer(int32_t value);
private:
int32_t _internal_producer() const;
void _internal_set_producer(int32_t value);
public:
// int32 min_consumer = 2;
void clear_min_consumer();
int32_t min_consumer() const;
void set_min_consumer(int32_t value);
private:
int32_t _internal_min_consumer() const;
void _internal_set_min_consumer(int32_t value);
public:
// @@protoc_insertion_point(class_scope:opencv_tensorflow.VersionDef)
private:
class _Internal;
template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
typedef void InternalArenaConstructable_;
typedef void DestructorSkippable_;
::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > bad_consumers_;
mutable std::atomic<int> _bad_consumers_cached_byte_size_;
int32_t producer_;
int32_t min_consumer_;
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
friend struct ::TableStruct_versions_2eproto;
};
// ===================================================================
// ===================================================================
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif // __GNUC__
// VersionDef
// int32 producer = 1;
inline void VersionDef::clear_producer() {
producer_ = 0;
}
inline int32_t VersionDef::_internal_producer() const {
return producer_;
}
inline int32_t VersionDef::producer() const {
// @@protoc_insertion_point(field_get:opencv_tensorflow.VersionDef.producer)
return _internal_producer();
}
inline void VersionDef::_internal_set_producer(int32_t value) {
producer_ = value;
}
inline void VersionDef::set_producer(int32_t value) {
_internal_set_producer(value);
// @@protoc_insertion_point(field_set:opencv_tensorflow.VersionDef.producer)
}
// int32 min_consumer = 2;
inline void VersionDef::clear_min_consumer() {
min_consumer_ = 0;
}
inline int32_t VersionDef::_internal_min_consumer() const {
return min_consumer_;
}
inline int32_t VersionDef::min_consumer() const {
// @@protoc_insertion_point(field_get:opencv_tensorflow.VersionDef.min_consumer)
return _internal_min_consumer();
}
inline void VersionDef::_internal_set_min_consumer(int32_t value) {
min_consumer_ = value;
}
inline void VersionDef::set_min_consumer(int32_t value) {
_internal_set_min_consumer(value);
// @@protoc_insertion_point(field_set:opencv_tensorflow.VersionDef.min_consumer)
}
// repeated int32 bad_consumers = 3;
inline int VersionDef::_internal_bad_consumers_size() const {
return bad_consumers_.size();
}
inline int VersionDef::bad_consumers_size() const {
return _internal_bad_consumers_size();
}
inline void VersionDef::clear_bad_consumers() {
bad_consumers_.Clear();
}
inline int32_t VersionDef::_internal_bad_consumers(int index) const {
return bad_consumers_.Get(index);
}
inline int32_t VersionDef::bad_consumers(int index) const {
// @@protoc_insertion_point(field_get:opencv_tensorflow.VersionDef.bad_consumers)
return _internal_bad_consumers(index);
}
inline void VersionDef::set_bad_consumers(int index, int32_t value) {
bad_consumers_.Set(index, value);
// @@protoc_insertion_point(field_set:opencv_tensorflow.VersionDef.bad_consumers)
}
inline void VersionDef::_internal_add_bad_consumers(int32_t value) {
bad_consumers_.Add(value);
}
inline void VersionDef::add_bad_consumers(int32_t value) {
_internal_add_bad_consumers(value);
// @@protoc_insertion_point(field_add:opencv_tensorflow.VersionDef.bad_consumers)
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
VersionDef::_internal_bad_consumers() const {
return bad_consumers_;
}
inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >&
VersionDef::bad_consumers() const {
// @@protoc_insertion_point(field_list:opencv_tensorflow.VersionDef.bad_consumers)
return _internal_bad_consumers();
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
VersionDef::_internal_mutable_bad_consumers() {
return &bad_consumers_;
}
inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >*
VersionDef::mutable_bad_consumers() {
// @@protoc_insertion_point(field_mutable_list:opencv_tensorflow.VersionDef.bad_consumers)
return _internal_mutable_bad_consumers();
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif // __GNUC__
// @@protoc_insertion_point(namespace_scope)
} // namespace opencv_tensorflow
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_versions_2eproto