2017-06-26 18:35:51 +08:00
|
|
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
|
|
// source: attr_value.proto
|
|
|
|
|
|
|
|
#include "attr_value.pb.h"
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
#include <google/protobuf/stubs/common.h>
|
|
|
|
#include <google/protobuf/stubs/port.h>
|
|
|
|
#include <google/protobuf/stubs/once.h>
|
|
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
|
|
#include <google/protobuf/wire_format_lite_inl.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>
|
2018-01-15 23:51:38 +08:00
|
|
|
// This is a temporary google only hack
|
|
|
|
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
|
|
|
|
#include "third_party/protobuf/version.h"
|
|
|
|
#endif
|
2017-06-26 18:35:51 +08:00
|
|
|
// @@protoc_insertion_point(includes)
|
|
|
|
namespace tensorflow {
|
2018-01-15 23:51:38 +08:00
|
|
|
class AttrValue_ListValueDefaultTypeInternal {
|
|
|
|
public:
|
|
|
|
::google::protobuf::internal::ExplicitlyConstructed<AttrValue_ListValue>
|
|
|
|
_instance;
|
|
|
|
} _AttrValue_ListValue_default_instance_;
|
|
|
|
class AttrValueDefaultTypeInternal {
|
|
|
|
public:
|
|
|
|
::google::protobuf::internal::ExplicitlyConstructed<AttrValue>
|
|
|
|
_instance;
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::ArenaStringPtr s_;
|
|
|
|
::google::protobuf::int64 i_;
|
|
|
|
float f_;
|
|
|
|
bool b_;
|
|
|
|
int type_;
|
|
|
|
const ::tensorflow::TensorShapeProto* shape_;
|
|
|
|
const ::tensorflow::TensorProto* tensor_;
|
|
|
|
const ::tensorflow::AttrValue_ListValue* list_;
|
|
|
|
const ::tensorflow::NameAttrList* func_;
|
|
|
|
::google::protobuf::internal::ArenaStringPtr placeholder_;
|
2018-01-15 23:51:38 +08:00
|
|
|
} _AttrValue_default_instance_;
|
|
|
|
class NameAttrList_AttrEntry_DoNotUseDefaultTypeInternal {
|
|
|
|
public:
|
|
|
|
::google::protobuf::internal::ExplicitlyConstructed<NameAttrList_AttrEntry_DoNotUse>
|
|
|
|
_instance;
|
|
|
|
} _NameAttrList_AttrEntry_DoNotUse_default_instance_;
|
|
|
|
class NameAttrListDefaultTypeInternal {
|
|
|
|
public:
|
|
|
|
::google::protobuf::internal::ExplicitlyConstructed<NameAttrList>
|
|
|
|
_instance;
|
|
|
|
} _NameAttrList_default_instance_;
|
|
|
|
} // namespace tensorflow
|
|
|
|
namespace protobuf_attr_5fvalue_2eproto {
|
|
|
|
void InitDefaultsAttrValue_ListValueImpl() {
|
|
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
|
|
|
|
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
|
|
|
|
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
|
|
|
|
#else
|
|
|
|
::google::protobuf::internal::InitProtobufDefaults();
|
|
|
|
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
|
|
|
|
protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto();
|
|
|
|
protobuf_tensor_2eproto::InitDefaultsTensorProto();
|
|
|
|
{
|
|
|
|
void* ptr = &::tensorflow::_AttrValue_ListValue_default_instance_;
|
|
|
|
new (ptr) ::tensorflow::AttrValue_ListValue();
|
|
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
|
}
|
|
|
|
::tensorflow::AttrValue_ListValue::InitAsDefaultInstance();
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
void InitDefaultsAttrValue_ListValue() {
|
|
|
|
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
|
|
|
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsAttrValue_ListValueImpl);
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
void InitDefaultsAttrValueImpl() {
|
2017-06-26 18:35:51 +08:00
|
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
|
|
|
|
::google::protobuf::internal::InitProtobufDefaultsForceUnique();
|
|
|
|
#else
|
|
|
|
::google::protobuf::internal::InitProtobufDefaults();
|
|
|
|
#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
|
|
|
|
protobuf_tensor_5fshape_2eproto::InitDefaultsTensorShapeProto();
|
|
|
|
protobuf_tensor_2eproto::InitDefaultsTensorProto();
|
|
|
|
protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue_ListValue();
|
|
|
|
{
|
|
|
|
void* ptr = &::tensorflow::_AttrValue_default_instance_;
|
|
|
|
new (ptr) ::tensorflow::AttrValue();
|
|
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
|
}
|
|
|
|
{
|
|
|
|
void* ptr = &::tensorflow::_NameAttrList_AttrEntry_DoNotUse_default_instance_;
|
|
|
|
new (ptr) ::tensorflow::NameAttrList_AttrEntry_DoNotUse();
|
|
|
|
}
|
|
|
|
{
|
|
|
|
void* ptr = &::tensorflow::_NameAttrList_default_instance_;
|
|
|
|
new (ptr) ::tensorflow::NameAttrList();
|
|
|
|
::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
|
|
|
|
}
|
|
|
|
::tensorflow::AttrValue::InitAsDefaultInstance();
|
|
|
|
::tensorflow::NameAttrList_AttrEntry_DoNotUse::InitAsDefaultInstance();
|
|
|
|
::tensorflow::NameAttrList::InitAsDefaultInstance();
|
|
|
|
}
|
|
|
|
|
|
|
|
void InitDefaultsAttrValue() {
|
|
|
|
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
|
|
|
::google::protobuf::GoogleOnceInit(&once, &InitDefaultsAttrValueImpl);
|
|
|
|
}
|
|
|
|
|
|
|
|
::google::protobuf::Metadata file_level_metadata[4];
|
|
|
|
|
|
|
|
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
|
~0u, // no _has_bits_
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, _internal_metadata_),
|
|
|
|
~0u, // no _extensions_
|
|
|
|
~0u, // no _oneof_case_
|
|
|
|
~0u, // no _weak_field_map_
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, s_),
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, i_),
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, f_),
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, b_),
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, type_),
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, shape_),
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue_ListValue, tensor_),
|
|
|
|
~0u, // no _has_bits_
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue, _internal_metadata_),
|
|
|
|
~0u, // no _extensions_
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue, _oneof_case_[0]),
|
|
|
|
~0u, // no _weak_field_map_
|
|
|
|
offsetof(::tensorflow::AttrValueDefaultTypeInternal, s_),
|
|
|
|
offsetof(::tensorflow::AttrValueDefaultTypeInternal, i_),
|
|
|
|
offsetof(::tensorflow::AttrValueDefaultTypeInternal, f_),
|
|
|
|
offsetof(::tensorflow::AttrValueDefaultTypeInternal, b_),
|
|
|
|
offsetof(::tensorflow::AttrValueDefaultTypeInternal, type_),
|
|
|
|
offsetof(::tensorflow::AttrValueDefaultTypeInternal, shape_),
|
|
|
|
offsetof(::tensorflow::AttrValueDefaultTypeInternal, tensor_),
|
|
|
|
offsetof(::tensorflow::AttrValueDefaultTypeInternal, list_),
|
|
|
|
offsetof(::tensorflow::AttrValueDefaultTypeInternal, func_),
|
|
|
|
offsetof(::tensorflow::AttrValueDefaultTypeInternal, placeholder_),
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::AttrValue, value_),
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList_AttrEntry_DoNotUse, _has_bits_),
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList_AttrEntry_DoNotUse, _internal_metadata_),
|
|
|
|
~0u, // no _extensions_
|
|
|
|
~0u, // no _oneof_case_
|
|
|
|
~0u, // no _weak_field_map_
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList_AttrEntry_DoNotUse, key_),
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList_AttrEntry_DoNotUse, value_),
|
|
|
|
0,
|
|
|
|
1,
|
|
|
|
~0u, // no _has_bits_
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList, _internal_metadata_),
|
|
|
|
~0u, // no _extensions_
|
|
|
|
~0u, // no _oneof_case_
|
|
|
|
~0u, // no _weak_field_map_
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList, name_),
|
|
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::tensorflow::NameAttrList, attr_),
|
|
|
|
};
|
|
|
|
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
|
{ 0, -1, sizeof(::tensorflow::AttrValue_ListValue)},
|
|
|
|
{ 12, -1, sizeof(::tensorflow::AttrValue)},
|
|
|
|
{ 28, 35, sizeof(::tensorflow::NameAttrList_AttrEntry_DoNotUse)},
|
|
|
|
{ 37, -1, sizeof(::tensorflow::NameAttrList)},
|
|
|
|
};
|
|
|
|
|
|
|
|
static ::google::protobuf::Message const * const file_default_instances[] = {
|
|
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_AttrValue_ListValue_default_instance_),
|
|
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_AttrValue_default_instance_),
|
|
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_NameAttrList_AttrEntry_DoNotUse_default_instance_),
|
|
|
|
reinterpret_cast<const ::google::protobuf::Message*>(&::tensorflow::_NameAttrList_default_instance_),
|
|
|
|
};
|
|
|
|
|
|
|
|
void protobuf_AssignDescriptors() {
|
|
|
|
AddDescriptors();
|
|
|
|
::google::protobuf::MessageFactory* factory = NULL;
|
|
|
|
AssignDescriptors(
|
|
|
|
"attr_value.proto", schemas, file_default_instances, TableStruct::offsets, factory,
|
|
|
|
file_level_metadata, NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
void protobuf_AssignDescriptorsOnce() {
|
|
|
|
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
|
|
|
::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
|
|
|
|
}
|
|
|
|
|
|
|
|
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
|
|
|
|
void protobuf_RegisterTypes(const ::std::string&) {
|
|
|
|
protobuf_AssignDescriptorsOnce();
|
|
|
|
::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4);
|
|
|
|
}
|
|
|
|
|
|
|
|
void AddDescriptorsImpl() {
|
|
|
|
InitDefaults();
|
|
|
|
static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
|
|
|
|
"\n\020attr_value.proto\022\ntensorflow\032\014tensor.p"
|
|
|
|
"roto\032\022tensor_shape.proto\032\013types.proto\"\376\003"
|
|
|
|
"\n\tAttrValue\022\013\n\001s\030\002 \001(\014H\000\022\013\n\001i\030\003 \001(\003H\000\022\013\n"
|
|
|
|
"\001f\030\004 \001(\002H\000\022\013\n\001b\030\005 \001(\010H\000\022$\n\004type\030\006 \001(\0162\024."
|
|
|
|
"tensorflow.DataTypeH\000\022-\n\005shape\030\007 \001(\0132\034.t"
|
|
|
|
"ensorflow.TensorShapeProtoH\000\022)\n\006tensor\030\010"
|
|
|
|
" \001(\0132\027.tensorflow.TensorProtoH\000\022/\n\004list\030"
|
|
|
|
"\001 \001(\0132\037.tensorflow.AttrValue.ListValueH\000"
|
|
|
|
"\022(\n\004func\030\n \001(\0132\030.tensorflow.NameAttrList"
|
|
|
|
"H\000\022\025\n\013placeholder\030\t \001(\tH\000\032\301\001\n\tListValue\022"
|
|
|
|
"\t\n\001s\030\002 \003(\014\022\r\n\001i\030\003 \003(\003B\002\020\001\022\r\n\001f\030\004 \003(\002B\002\020\001"
|
|
|
|
"\022\r\n\001b\030\005 \003(\010B\002\020\001\022&\n\004type\030\006 \003(\0162\024.tensorfl"
|
|
|
|
"ow.DataTypeB\002\020\001\022+\n\005shape\030\007 \003(\0132\034.tensorf"
|
|
|
|
"low.TensorShapeProto\022\'\n\006tensor\030\010 \003(\0132\027.t"
|
|
|
|
"ensorflow.TensorProtoB\007\n\005value\"\222\001\n\014NameA"
|
|
|
|
"ttrList\022\014\n\004name\030\001 \001(\t\0220\n\004attr\030\002 \003(\0132\".te"
|
|
|
|
"nsorflow.NameAttrList.AttrEntry\032B\n\tAttrE"
|
|
|
|
"ntry\022\013\n\003key\030\001 \001(\t\022$\n\005value\030\002 \001(\0132\025.tenso"
|
|
|
|
"rflow.AttrValue:\0028\001B0\n\030org.tensorflow.fr"
|
|
|
|
"ameworkB\017AttrValueProtosP\001\370\001\001b\006proto3"
|
|
|
|
};
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
2018-01-15 23:51:38 +08:00
|
|
|
descriptor, 797);
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
|
|
|
"attr_value.proto", &protobuf_RegisterTypes);
|
2018-01-15 23:51:38 +08:00
|
|
|
::protobuf_tensor_2eproto::AddDescriptors();
|
|
|
|
::protobuf_tensor_5fshape_2eproto::AddDescriptors();
|
|
|
|
::protobuf_types_2eproto::AddDescriptors();
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
void AddDescriptors() {
|
|
|
|
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
|
|
|
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
// Force AddDescriptors() to be called at dynamic initialization time.
|
|
|
|
struct StaticDescriptorInitializer {
|
|
|
|
StaticDescriptorInitializer() {
|
|
|
|
AddDescriptors();
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
} static_descriptor_initializer;
|
|
|
|
} // namespace protobuf_attr_5fvalue_2eproto
|
|
|
|
namespace tensorflow {
|
2017-06-26 18:35:51 +08:00
|
|
|
|
|
|
|
// ===================================================================
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
void AttrValue_ListValue::InitAsDefaultInstance() {
|
|
|
|
}
|
|
|
|
void AttrValue_ListValue::clear_shape() {
|
|
|
|
shape_.Clear();
|
|
|
|
}
|
|
|
|
void AttrValue_ListValue::clear_tensor() {
|
|
|
|
tensor_.Clear();
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
const int AttrValue_ListValue::kSFieldNumber;
|
|
|
|
const int AttrValue_ListValue::kIFieldNumber;
|
|
|
|
const int AttrValue_ListValue::kFFieldNumber;
|
|
|
|
const int AttrValue_ListValue::kBFieldNumber;
|
|
|
|
const int AttrValue_ListValue::kTypeFieldNumber;
|
|
|
|
const int AttrValue_ListValue::kShapeFieldNumber;
|
|
|
|
const int AttrValue_ListValue::kTensorFieldNumber;
|
|
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
|
|
|
|
AttrValue_ListValue::AttrValue_ListValue()
|
|
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
|
|
|
::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue_ListValue();
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
SharedCtor();
|
|
|
|
// @@protoc_insertion_point(constructor:tensorflow.AttrValue.ListValue)
|
|
|
|
}
|
|
|
|
AttrValue_ListValue::AttrValue_ListValue(::google::protobuf::Arena* arena)
|
|
|
|
: ::google::protobuf::Message(),
|
|
|
|
_internal_metadata_(arena),
|
|
|
|
s_(arena),
|
|
|
|
i_(arena),
|
|
|
|
f_(arena),
|
|
|
|
b_(arena),
|
|
|
|
type_(arena),
|
|
|
|
shape_(arena),
|
|
|
|
tensor_(arena) {
|
2018-01-15 23:51:38 +08:00
|
|
|
::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue_ListValue();
|
2017-06-26 18:35:51 +08:00
|
|
|
SharedCtor();
|
|
|
|
RegisterArenaDtor(arena);
|
|
|
|
// @@protoc_insertion_point(arena_constructor:tensorflow.AttrValue.ListValue)
|
|
|
|
}
|
|
|
|
AttrValue_ListValue::AttrValue_ListValue(const AttrValue_ListValue& from)
|
|
|
|
: ::google::protobuf::Message(),
|
2018-01-15 23:51:38 +08:00
|
|
|
_internal_metadata_(NULL),
|
|
|
|
s_(from.s_),
|
|
|
|
i_(from.i_),
|
|
|
|
f_(from.f_),
|
|
|
|
b_(from.b_),
|
|
|
|
type_(from.type_),
|
|
|
|
shape_(from.shape_),
|
|
|
|
tensor_(from.tensor_),
|
|
|
|
_cached_size_(0) {
|
|
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
2017-06-26 18:35:51 +08:00
|
|
|
// @@protoc_insertion_point(copy_constructor:tensorflow.AttrValue.ListValue)
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue_ListValue::SharedCtor() {
|
|
|
|
_cached_size_ = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
AttrValue_ListValue::~AttrValue_ListValue() {
|
|
|
|
// @@protoc_insertion_point(destructor:tensorflow.AttrValue.ListValue)
|
|
|
|
SharedDtor();
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue_ListValue::SharedDtor() {
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue_ListValue::ArenaDtor(void* object) {
|
|
|
|
AttrValue_ListValue* _this = reinterpret_cast< AttrValue_ListValue* >(object);
|
|
|
|
(void)_this;
|
|
|
|
}
|
|
|
|
void AttrValue_ListValue::RegisterArenaDtor(::google::protobuf::Arena* arena) {
|
|
|
|
}
|
|
|
|
void AttrValue_ListValue::SetCachedSize(int size) const {
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
|
_cached_size_ = size;
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
|
}
|
|
|
|
const ::google::protobuf::Descriptor* AttrValue_ListValue::descriptor() {
|
2018-01-15 23:51:38 +08:00
|
|
|
::protobuf_attr_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
|
return ::protobuf_attr_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
const AttrValue_ListValue& AttrValue_ListValue::default_instance() {
|
2018-01-15 23:51:38 +08:00
|
|
|
::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue_ListValue();
|
2017-06-26 18:35:51 +08:00
|
|
|
return *internal_default_instance();
|
|
|
|
}
|
|
|
|
|
|
|
|
AttrValue_ListValue* AttrValue_ListValue::New(::google::protobuf::Arena* arena) const {
|
|
|
|
return ::google::protobuf::Arena::CreateMessage<AttrValue_ListValue>(arena);
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue_ListValue::Clear() {
|
|
|
|
// @@protoc_insertion_point(message_clear_start:tensorflow.AttrValue.ListValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
s_.Clear();
|
|
|
|
i_.Clear();
|
|
|
|
f_.Clear();
|
|
|
|
b_.Clear();
|
|
|
|
type_.Clear();
|
|
|
|
shape_.Clear();
|
|
|
|
tensor_.Clear();
|
2018-01-15 23:51:38 +08:00
|
|
|
_internal_metadata_.Clear();
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool AttrValue_ListValue::MergePartialFromCodedStream(
|
|
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
|
|
::google::protobuf::uint32 tag;
|
|
|
|
// @@protoc_insertion_point(parse_start:tensorflow.AttrValue.ListValue)
|
|
|
|
for (;;) {
|
2018-01-15 23:51:38 +08:00
|
|
|
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
2017-06-26 18:35:51 +08:00
|
|
|
tag = p.first;
|
|
|
|
if (!p.second) goto handle_unusual;
|
|
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
|
|
// repeated bytes s = 2;
|
|
|
|
case 2: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
|
|
input, this->add_s()));
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated int64 i = 3 [packed = true];
|
|
|
|
case 3: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
|
|
|
|
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
|
|
|
|
input, this->mutable_i())));
|
2018-01-15 23:51:38 +08:00
|
|
|
} else if (
|
|
|
|
static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
|
|
|
|
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
|
2018-01-15 23:51:38 +08:00
|
|
|
1, 26u, input, this->mutable_i())));
|
2017-06-26 18:35:51 +08:00
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated float f = 4 [packed = true];
|
|
|
|
case 4: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
|
|
|
|
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
|
|
|
|
input, this->mutable_f())));
|
2018-01-15 23:51:38 +08:00
|
|
|
} else if (
|
|
|
|
static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(37u /* 37 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
|
|
|
|
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
|
2018-01-15 23:51:38 +08:00
|
|
|
1, 34u, input, this->mutable_f())));
|
2017-06-26 18:35:51 +08:00
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated bool b = 5 [packed = true];
|
|
|
|
case 5: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
|
|
|
|
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
|
|
|
input, this->mutable_b())));
|
2018-01-15 23:51:38 +08:00
|
|
|
} else if (
|
|
|
|
static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
|
|
|
|
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
2018-01-15 23:51:38 +08:00
|
|
|
1, 42u, input, this->mutable_b())));
|
2017-06-26 18:35:51 +08:00
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.DataType type = 6 [packed = true];
|
|
|
|
case 6: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::uint32 length;
|
|
|
|
DO_(input->ReadVarint32(&length));
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::io::CodedInputStream::Limit limit = input->PushLimit(static_cast<int>(length));
|
2017-06-26 18:35:51 +08:00
|
|
|
while (input->BytesUntilLimit() > 0) {
|
|
|
|
int value;
|
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
|
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
|
|
|
input, &value)));
|
|
|
|
add_type(static_cast< ::tensorflow::DataType >(value));
|
|
|
|
}
|
|
|
|
input->PopLimit(limit);
|
2018-01-15 23:51:38 +08:00
|
|
|
} else if (
|
|
|
|
static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
int value;
|
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
|
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
|
|
|
input, &value)));
|
|
|
|
add_type(static_cast< ::tensorflow::DataType >(value));
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.TensorShapeProto shape = 7;
|
|
|
|
case 7: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
|
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_shape()));
|
2017-06-26 18:35:51 +08:00
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.TensorProto tensor = 8;
|
|
|
|
case 8: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
|
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_tensor()));
|
2017-06-26 18:35:51 +08:00
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
default: {
|
|
|
|
handle_unusual:
|
2018-01-15 23:51:38 +08:00
|
|
|
if (tag == 0) {
|
2017-06-26 18:35:51 +08:00
|
|
|
goto success;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
2017-06-26 18:35:51 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
success:
|
|
|
|
// @@protoc_insertion_point(parse_success:tensorflow.AttrValue.ListValue)
|
|
|
|
return true;
|
|
|
|
failure:
|
|
|
|
// @@protoc_insertion_point(parse_failure:tensorflow.AttrValue.ListValue)
|
|
|
|
return false;
|
|
|
|
#undef DO_
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue_ListValue::SerializeWithCachedSizes(
|
|
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
|
// @@protoc_insertion_point(serialize_start:tensorflow.AttrValue.ListValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
// repeated bytes s = 2;
|
2018-01-15 23:51:38 +08:00
|
|
|
for (int i = 0, n = this->s_size(); i < n; i++) {
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::WriteBytes(
|
|
|
|
2, this->s(i), output);
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated int64 i = 3 [packed = true];
|
|
|
|
if (this->i_size() > 0) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteTag(3, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
|
2018-01-15 23:51:38 +08:00
|
|
|
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
|
|
|
|
_i_cached_byte_size_));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
for (int i = 0, n = this->i_size(); i < n; i++) {
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
|
|
|
|
this->i(i), output);
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated float f = 4 [packed = true];
|
|
|
|
if (this->f_size() > 0) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteTag(4, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
|
2018-01-15 23:51:38 +08:00
|
|
|
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
|
|
|
|
_f_cached_byte_size_));
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteFloatArray(
|
|
|
|
this->f().data(), this->f_size(), output);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated bool b = 5 [packed = true];
|
|
|
|
if (this->b_size() > 0) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
|
2018-01-15 23:51:38 +08:00
|
|
|
output->WriteVarint32(static_cast< ::google::protobuf::uint32>(
|
|
|
|
_b_cached_byte_size_));
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteBoolArray(
|
|
|
|
this->b().data(), this->b_size(), output);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.DataType type = 6 [packed = true];
|
|
|
|
if (this->type_size() > 0) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteTag(
|
|
|
|
6,
|
|
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
|
|
|
|
output);
|
2018-01-15 23:51:38 +08:00
|
|
|
output->WriteVarint32(
|
|
|
|
static_cast< ::google::protobuf::uint32>(_type_cached_byte_size_));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
for (int i = 0, n = this->type_size(); i < n; i++) {
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::WriteEnumNoTag(
|
|
|
|
this->type(i), output);
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.TensorShapeProto shape = 7;
|
2018-01-15 23:51:38 +08:00
|
|
|
for (unsigned int i = 0,
|
|
|
|
n = static_cast<unsigned int>(this->shape_size()); i < n; i++) {
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
2018-01-15 23:51:38 +08:00
|
|
|
7, this->shape(static_cast<int>(i)), output);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.TensorProto tensor = 8;
|
2018-01-15 23:51:38 +08:00
|
|
|
for (unsigned int i = 0,
|
|
|
|
n = static_cast<unsigned int>(this->tensor_size()); i < n; i++) {
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
2018-01-15 23:51:38 +08:00
|
|
|
8, this->tensor(static_cast<int>(i)), output);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
|
|
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
// @@protoc_insertion_point(serialize_end:tensorflow.AttrValue.ListValue)
|
|
|
|
}
|
|
|
|
|
|
|
|
::google::protobuf::uint8* AttrValue_ListValue::InternalSerializeWithCachedSizesToArray(
|
|
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
|
(void)deterministic; // Unused
|
|
|
|
// @@protoc_insertion_point(serialize_to_array_start:tensorflow.AttrValue.ListValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
// repeated bytes s = 2;
|
2018-01-15 23:51:38 +08:00
|
|
|
for (int i = 0, n = this->s_size(); i < n; i++) {
|
2017-06-26 18:35:51 +08:00
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
|
|
WriteBytesToArray(2, this->s(i), target);
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated int64 i = 3 [packed = true];
|
|
|
|
if (this->i_size() > 0) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
|
|
|
|
3,
|
|
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
|
|
|
|
target);
|
|
|
|
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
|
2018-01-15 23:51:38 +08:00
|
|
|
static_cast< ::google::protobuf::int32>(
|
|
|
|
_i_cached_byte_size_), target);
|
2017-06-26 18:35:51 +08:00
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
2018-01-15 23:51:38 +08:00
|
|
|
WriteInt64NoTagToArray(this->i_, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated float f = 4 [packed = true];
|
|
|
|
if (this->f_size() > 0) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
|
|
|
|
4,
|
|
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
|
|
|
|
target);
|
|
|
|
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
|
2018-01-15 23:51:38 +08:00
|
|
|
static_cast< ::google::protobuf::int32>(
|
|
|
|
_f_cached_byte_size_), target);
|
2017-06-26 18:35:51 +08:00
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
2018-01-15 23:51:38 +08:00
|
|
|
WriteFloatNoTagToArray(this->f_, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated bool b = 5 [packed = true];
|
|
|
|
if (this->b_size() > 0) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
|
|
|
|
5,
|
|
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
|
|
|
|
target);
|
|
|
|
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
|
2018-01-15 23:51:38 +08:00
|
|
|
static_cast< ::google::protobuf::int32>(
|
|
|
|
_b_cached_byte_size_), target);
|
2017-06-26 18:35:51 +08:00
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
2018-01-15 23:51:38 +08:00
|
|
|
WriteBoolNoTagToArray(this->b_, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.DataType type = 6 [packed = true];
|
|
|
|
if (this->type_size() > 0) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
|
|
|
|
6,
|
|
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
|
|
|
|
target);
|
2018-01-15 23:51:38 +08:00
|
|
|
target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( static_cast< ::google::protobuf::uint32>(
|
|
|
|
_type_cached_byte_size_), target);
|
2017-06-26 18:35:51 +08:00
|
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteEnumNoTagToArray(
|
2018-01-15 23:51:38 +08:00
|
|
|
this->type_, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.TensorShapeProto shape = 7;
|
2018-01-15 23:51:38 +08:00
|
|
|
for (unsigned int i = 0,
|
|
|
|
n = static_cast<unsigned int>(this->shape_size()); i < n; i++) {
|
2017-06-26 18:35:51 +08:00
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
2018-01-15 23:51:38 +08:00
|
|
|
InternalWriteMessageToArray(
|
|
|
|
7, this->shape(static_cast<int>(i)), deterministic, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.TensorProto tensor = 8;
|
2018-01-15 23:51:38 +08:00
|
|
|
for (unsigned int i = 0,
|
|
|
|
n = static_cast<unsigned int>(this->tensor_size()); i < n; i++) {
|
2017-06-26 18:35:51 +08:00
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
2018-01-15 23:51:38 +08:00
|
|
|
InternalWriteMessageToArray(
|
|
|
|
8, this->tensor(static_cast<int>(i)), deterministic, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
|
|
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
// @@protoc_insertion_point(serialize_to_array_end:tensorflow.AttrValue.ListValue)
|
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t AttrValue_ListValue::ByteSizeLong() const {
|
|
|
|
// @@protoc_insertion_point(message_byte_size_start:tensorflow.AttrValue.ListValue)
|
|
|
|
size_t total_size = 0;
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
|
total_size +=
|
|
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
|
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
// repeated bytes s = 2;
|
|
|
|
total_size += 1 *
|
|
|
|
::google::protobuf::internal::FromIntSize(this->s_size());
|
2018-01-15 23:51:38 +08:00
|
|
|
for (int i = 0, n = this->s_size(); i < n; i++) {
|
2017-06-26 18:35:51 +08:00
|
|
|
total_size += ::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
|
|
this->s(i));
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated int64 i = 3 [packed = true];
|
|
|
|
{
|
2018-01-15 23:51:38 +08:00
|
|
|
size_t data_size = ::google::protobuf::internal::WireFormatLite::
|
|
|
|
Int64Size(this->i_);
|
2017-06-26 18:35:51 +08:00
|
|
|
if (data_size > 0) {
|
|
|
|
total_size += 1 +
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
|
|
static_cast< ::google::protobuf::int32>(data_size));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
|
_i_cached_byte_size_ = cached_size;
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
|
total_size += data_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated float f = 4 [packed = true];
|
|
|
|
{
|
2018-01-15 23:51:38 +08:00
|
|
|
unsigned int count = static_cast<unsigned int>(this->f_size());
|
|
|
|
size_t data_size = 4UL * count;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (data_size > 0) {
|
|
|
|
total_size += 1 +
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
|
|
static_cast< ::google::protobuf::int32>(data_size));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
|
_f_cached_byte_size_ = cached_size;
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
|
total_size += data_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated bool b = 5 [packed = true];
|
|
|
|
{
|
2018-01-15 23:51:38 +08:00
|
|
|
unsigned int count = static_cast<unsigned int>(this->b_size());
|
|
|
|
size_t data_size = 1UL * count;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (data_size > 0) {
|
|
|
|
total_size += 1 +
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
|
|
static_cast< ::google::protobuf::int32>(data_size));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
|
_b_cached_byte_size_ = cached_size;
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
|
total_size += data_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.DataType type = 6 [packed = true];
|
|
|
|
{
|
|
|
|
size_t data_size = 0;
|
2018-01-15 23:51:38 +08:00
|
|
|
unsigned int count = static_cast<unsigned int>(this->type_size());for (unsigned int i = 0; i < count; i++) {
|
2017-06-26 18:35:51 +08:00
|
|
|
data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
|
2018-01-15 23:51:38 +08:00
|
|
|
this->type(static_cast<int>(i)));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
if (data_size > 0) {
|
|
|
|
total_size += 1 +
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
|
|
static_cast< ::google::protobuf::int32>(data_size));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
|
_type_cached_byte_size_ = cached_size;
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
|
total_size += data_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.TensorShapeProto shape = 7;
|
|
|
|
{
|
2018-01-15 23:51:38 +08:00
|
|
|
unsigned int count = static_cast<unsigned int>(this->shape_size());
|
2017-06-26 18:35:51 +08:00
|
|
|
total_size += 1UL * count;
|
|
|
|
for (unsigned int i = 0; i < count; i++) {
|
|
|
|
total_size +=
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(
|
|
|
|
this->shape(static_cast<int>(i)));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// repeated .tensorflow.TensorProto tensor = 8;
|
|
|
|
{
|
2018-01-15 23:51:38 +08:00
|
|
|
unsigned int count = static_cast<unsigned int>(this->tensor_size());
|
2017-06-26 18:35:51 +08:00
|
|
|
total_size += 1UL * count;
|
|
|
|
for (unsigned int i = 0; i < count; i++) {
|
|
|
|
total_size +=
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(
|
|
|
|
this->tensor(static_cast<int>(i)));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
|
_cached_size_ = cached_size;
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
|
return total_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue_ListValue::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
|
// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.AttrValue.ListValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK_NE(&from, this);
|
2017-06-26 18:35:51 +08:00
|
|
|
const AttrValue_ListValue* source =
|
|
|
|
::google::protobuf::internal::DynamicCastToGenerated<const AttrValue_ListValue>(
|
|
|
|
&from);
|
|
|
|
if (source == NULL) {
|
|
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.AttrValue.ListValue)
|
|
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
|
|
} else {
|
|
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.AttrValue.ListValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
MergeFrom(*source);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue_ListValue::MergeFrom(const AttrValue_ListValue& from) {
|
|
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.AttrValue.ListValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
|
|
|
s_.MergeFrom(from.s_);
|
|
|
|
i_.MergeFrom(from.i_);
|
|
|
|
f_.MergeFrom(from.f_);
|
|
|
|
b_.MergeFrom(from.b_);
|
|
|
|
type_.MergeFrom(from.type_);
|
2017-06-26 18:35:51 +08:00
|
|
|
shape_.MergeFrom(from.shape_);
|
|
|
|
tensor_.MergeFrom(from.tensor_);
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue_ListValue::CopyFrom(const ::google::protobuf::Message& from) {
|
|
|
|
// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.AttrValue.ListValue)
|
|
|
|
if (&from == this) return;
|
|
|
|
Clear();
|
|
|
|
MergeFrom(from);
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue_ListValue::CopyFrom(const AttrValue_ListValue& from) {
|
|
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.AttrValue.ListValue)
|
|
|
|
if (&from == this) return;
|
|
|
|
Clear();
|
2018-01-15 23:51:38 +08:00
|
|
|
MergeFrom(from);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool AttrValue_ListValue::IsInitialized() const {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue_ListValue::Swap(AttrValue_ListValue* other) {
|
|
|
|
if (other == this) return;
|
|
|
|
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
|
|
|
|
InternalSwap(other);
|
|
|
|
} else {
|
2018-01-15 23:51:38 +08:00
|
|
|
AttrValue_ListValue* temp = New(GetArenaNoVirtual());
|
|
|
|
temp->MergeFrom(*other);
|
|
|
|
other->CopyFrom(*this);
|
|
|
|
InternalSwap(temp);
|
|
|
|
if (GetArenaNoVirtual() == NULL) {
|
|
|
|
delete temp;
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
void AttrValue_ListValue::UnsafeArenaSwap(AttrValue_ListValue* other) {
|
|
|
|
if (other == this) return;
|
|
|
|
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
|
|
|
|
InternalSwap(other);
|
|
|
|
}
|
|
|
|
void AttrValue_ListValue::InternalSwap(AttrValue_ListValue* other) {
|
2018-01-15 23:51:38 +08:00
|
|
|
using std::swap;
|
|
|
|
s_.InternalSwap(&other->s_);
|
|
|
|
i_.InternalSwap(&other->i_);
|
|
|
|
f_.InternalSwap(&other->f_);
|
|
|
|
b_.InternalSwap(&other->b_);
|
|
|
|
type_.InternalSwap(&other->type_);
|
|
|
|
shape_.InternalSwap(&other->shape_);
|
|
|
|
tensor_.InternalSwap(&other->tensor_);
|
2017-06-26 18:35:51 +08:00
|
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
2018-01-15 23:51:38 +08:00
|
|
|
swap(_cached_size_, other->_cached_size_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
::google::protobuf::Metadata AttrValue_ListValue::GetMetadata() const {
|
2018-01-15 23:51:38 +08:00
|
|
|
protobuf_attr_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
|
return ::protobuf_attr_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// ===================================================================
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
void AttrValue::InitAsDefaultInstance() {
|
|
|
|
::tensorflow::_AttrValue_default_instance_.s_.UnsafeSetDefault(
|
|
|
|
&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
|
::tensorflow::_AttrValue_default_instance_.i_ = GOOGLE_LONGLONG(0);
|
|
|
|
::tensorflow::_AttrValue_default_instance_.f_ = 0;
|
|
|
|
::tensorflow::_AttrValue_default_instance_.b_ = false;
|
|
|
|
::tensorflow::_AttrValue_default_instance_.type_ = 0;
|
|
|
|
::tensorflow::_AttrValue_default_instance_.shape_ = const_cast< ::tensorflow::TensorShapeProto*>(
|
|
|
|
::tensorflow::TensorShapeProto::internal_default_instance());
|
|
|
|
::tensorflow::_AttrValue_default_instance_.tensor_ = const_cast< ::tensorflow::TensorProto*>(
|
|
|
|
::tensorflow::TensorProto::internal_default_instance());
|
|
|
|
::tensorflow::_AttrValue_default_instance_.list_ = const_cast< ::tensorflow::AttrValue_ListValue*>(
|
|
|
|
::tensorflow::AttrValue_ListValue::internal_default_instance());
|
|
|
|
::tensorflow::_AttrValue_default_instance_.func_ = const_cast< ::tensorflow::NameAttrList*>(
|
|
|
|
::tensorflow::NameAttrList::internal_default_instance());
|
|
|
|
::tensorflow::_AttrValue_default_instance_.placeholder_.UnsafeSetDefault(
|
|
|
|
&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
|
}
|
|
|
|
void AttrValue::set_allocated_shape(::tensorflow::TensorShapeProto* shape) {
|
|
|
|
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
|
|
|
|
clear_value();
|
|
|
|
if (shape) {
|
|
|
|
::google::protobuf::Arena* submessage_arena =
|
|
|
|
reinterpret_cast< ::google::protobuf::MessageLite*>(shape)->GetArena();
|
|
|
|
if (message_arena != submessage_arena) {
|
|
|
|
shape = ::google::protobuf::internal::GetOwnedMessage(
|
|
|
|
message_arena, shape, submessage_arena);
|
|
|
|
}
|
|
|
|
set_has_shape();
|
|
|
|
value_.shape_ = shape;
|
|
|
|
}
|
|
|
|
// @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.shape)
|
|
|
|
}
|
|
|
|
void AttrValue::clear_shape() {
|
|
|
|
if (has_shape()) {
|
|
|
|
if (GetArenaNoVirtual() == NULL) {
|
|
|
|
delete value_.shape_;
|
|
|
|
}
|
|
|
|
clear_has_value();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void AttrValue::set_allocated_tensor(::tensorflow::TensorProto* tensor) {
|
|
|
|
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
|
|
|
|
clear_value();
|
|
|
|
if (tensor) {
|
|
|
|
::google::protobuf::Arena* submessage_arena =
|
|
|
|
reinterpret_cast< ::google::protobuf::MessageLite*>(tensor)->GetArena();
|
|
|
|
if (message_arena != submessage_arena) {
|
|
|
|
tensor = ::google::protobuf::internal::GetOwnedMessage(
|
|
|
|
message_arena, tensor, submessage_arena);
|
|
|
|
}
|
|
|
|
set_has_tensor();
|
|
|
|
value_.tensor_ = tensor;
|
|
|
|
}
|
|
|
|
// @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.tensor)
|
|
|
|
}
|
|
|
|
void AttrValue::clear_tensor() {
|
|
|
|
if (has_tensor()) {
|
|
|
|
if (GetArenaNoVirtual() == NULL) {
|
|
|
|
delete value_.tensor_;
|
|
|
|
}
|
|
|
|
clear_has_value();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void AttrValue::set_allocated_list(::tensorflow::AttrValue_ListValue* list) {
|
|
|
|
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
|
|
|
|
clear_value();
|
|
|
|
if (list) {
|
|
|
|
::google::protobuf::Arena* submessage_arena =
|
|
|
|
::google::protobuf::Arena::GetArena(list);
|
|
|
|
if (message_arena != submessage_arena) {
|
|
|
|
list = ::google::protobuf::internal::GetOwnedMessage(
|
|
|
|
message_arena, list, submessage_arena);
|
|
|
|
}
|
|
|
|
set_has_list();
|
|
|
|
value_.list_ = list;
|
|
|
|
}
|
|
|
|
// @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.list)
|
|
|
|
}
|
|
|
|
void AttrValue::set_allocated_func(::tensorflow::NameAttrList* func) {
|
|
|
|
::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
|
|
|
|
clear_value();
|
|
|
|
if (func) {
|
|
|
|
::google::protobuf::Arena* submessage_arena =
|
|
|
|
::google::protobuf::Arena::GetArena(func);
|
|
|
|
if (message_arena != submessage_arena) {
|
|
|
|
func = ::google::protobuf::internal::GetOwnedMessage(
|
|
|
|
message_arena, func, submessage_arena);
|
|
|
|
}
|
|
|
|
set_has_func();
|
|
|
|
value_.func_ = func;
|
|
|
|
}
|
|
|
|
// @@protoc_insertion_point(field_set_allocated:tensorflow.AttrValue.func)
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
const int AttrValue::kSFieldNumber;
|
|
|
|
const int AttrValue::kIFieldNumber;
|
|
|
|
const int AttrValue::kFFieldNumber;
|
|
|
|
const int AttrValue::kBFieldNumber;
|
|
|
|
const int AttrValue::kTypeFieldNumber;
|
|
|
|
const int AttrValue::kShapeFieldNumber;
|
|
|
|
const int AttrValue::kTensorFieldNumber;
|
|
|
|
const int AttrValue::kListFieldNumber;
|
|
|
|
const int AttrValue::kFuncFieldNumber;
|
|
|
|
const int AttrValue::kPlaceholderFieldNumber;
|
|
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
|
|
|
|
AttrValue::AttrValue()
|
|
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
|
|
|
::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue();
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
SharedCtor();
|
|
|
|
// @@protoc_insertion_point(constructor:tensorflow.AttrValue)
|
|
|
|
}
|
|
|
|
AttrValue::AttrValue(::google::protobuf::Arena* arena)
|
|
|
|
: ::google::protobuf::Message(),
|
|
|
|
_internal_metadata_(arena) {
|
2018-01-15 23:51:38 +08:00
|
|
|
::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue();
|
2017-06-26 18:35:51 +08:00
|
|
|
SharedCtor();
|
|
|
|
RegisterArenaDtor(arena);
|
|
|
|
// @@protoc_insertion_point(arena_constructor:tensorflow.AttrValue)
|
|
|
|
}
|
|
|
|
AttrValue::AttrValue(const AttrValue& from)
|
|
|
|
: ::google::protobuf::Message(),
|
2018-01-15 23:51:38 +08:00
|
|
|
_internal_metadata_(NULL),
|
|
|
|
_cached_size_(0) {
|
|
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
|
clear_has_value();
|
|
|
|
switch (from.value_case()) {
|
|
|
|
case kS: {
|
|
|
|
set_s(from.s());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kI: {
|
|
|
|
set_i(from.i());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kF: {
|
|
|
|
set_f(from.f());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kB: {
|
|
|
|
set_b(from.b());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kType: {
|
|
|
|
set_type(from.type());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kShape: {
|
|
|
|
mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.shape());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kTensor: {
|
|
|
|
mutable_tensor()->::tensorflow::TensorProto::MergeFrom(from.tensor());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kList: {
|
|
|
|
mutable_list()->::tensorflow::AttrValue_ListValue::MergeFrom(from.list());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kFunc: {
|
|
|
|
mutable_func()->::tensorflow::NameAttrList::MergeFrom(from.func());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kPlaceholder: {
|
|
|
|
set_placeholder(from.placeholder());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case VALUE_NOT_SET: {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
// @@protoc_insertion_point(copy_constructor:tensorflow.AttrValue)
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue::SharedCtor() {
|
|
|
|
clear_has_value();
|
|
|
|
_cached_size_ = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
AttrValue::~AttrValue() {
|
|
|
|
// @@protoc_insertion_point(destructor:tensorflow.AttrValue)
|
|
|
|
SharedDtor();
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue::SharedDtor() {
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_value()) {
|
|
|
|
clear_value();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue::ArenaDtor(void* object) {
|
|
|
|
AttrValue* _this = reinterpret_cast< AttrValue* >(object);
|
|
|
|
(void)_this;
|
|
|
|
}
|
|
|
|
void AttrValue::RegisterArenaDtor(::google::protobuf::Arena* arena) {
|
|
|
|
}
|
|
|
|
void AttrValue::SetCachedSize(int size) const {
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
|
_cached_size_ = size;
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
|
}
|
|
|
|
const ::google::protobuf::Descriptor* AttrValue::descriptor() {
|
2018-01-15 23:51:38 +08:00
|
|
|
::protobuf_attr_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
|
return ::protobuf_attr_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
const AttrValue& AttrValue::default_instance() {
|
2018-01-15 23:51:38 +08:00
|
|
|
::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue();
|
2017-06-26 18:35:51 +08:00
|
|
|
return *internal_default_instance();
|
|
|
|
}
|
|
|
|
|
|
|
|
AttrValue* AttrValue::New(::google::protobuf::Arena* arena) const {
|
|
|
|
return ::google::protobuf::Arena::CreateMessage<AttrValue>(arena);
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue::clear_value() {
|
|
|
|
// @@protoc_insertion_point(one_of_clear_start:tensorflow.AttrValue)
|
|
|
|
switch (value_case()) {
|
|
|
|
case kS: {
|
|
|
|
value_.s_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
|
|
GetArenaNoVirtual());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kI: {
|
|
|
|
// No need to clear
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kF: {
|
|
|
|
// No need to clear
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kB: {
|
|
|
|
// No need to clear
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kType: {
|
|
|
|
// No need to clear
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kShape: {
|
|
|
|
if (GetArenaNoVirtual() == NULL) {
|
|
|
|
delete value_.shape_;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kTensor: {
|
|
|
|
if (GetArenaNoVirtual() == NULL) {
|
|
|
|
delete value_.tensor_;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kList: {
|
|
|
|
if (GetArenaNoVirtual() == NULL) {
|
|
|
|
delete value_.list_;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kFunc: {
|
|
|
|
if (GetArenaNoVirtual() == NULL) {
|
|
|
|
delete value_.func_;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kPlaceholder: {
|
|
|
|
value_.placeholder_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
|
|
GetArenaNoVirtual());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case VALUE_NOT_SET: {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_oneof_case_[0] = VALUE_NOT_SET;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AttrValue::Clear() {
|
|
|
|
// @@protoc_insertion_point(message_clear_start:tensorflow.AttrValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
clear_value();
|
2018-01-15 23:51:38 +08:00
|
|
|
_internal_metadata_.Clear();
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool AttrValue::MergePartialFromCodedStream(
|
|
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
|
|
::google::protobuf::uint32 tag;
|
|
|
|
// @@protoc_insertion_point(parse_start:tensorflow.AttrValue)
|
|
|
|
for (;;) {
|
2018-01-15 23:51:38 +08:00
|
|
|
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
2017-06-26 18:35:51 +08:00
|
|
|
tag = p.first;
|
|
|
|
if (!p.second) goto handle_unusual;
|
|
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.AttrValue.ListValue list = 1;
|
2017-06-26 18:35:51 +08:00
|
|
|
case 1: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
|
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
2017-06-26 18:35:51 +08:00
|
|
|
input, mutable_list()));
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// bytes s = 2;
|
2017-06-26 18:35:51 +08:00
|
|
|
case 2: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
|
|
input, this->mutable_s()));
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// int64 i = 3;
|
2017-06-26 18:35:51 +08:00
|
|
|
case 3: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
clear_value();
|
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
|
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
|
|
|
|
input, &value_.i_)));
|
|
|
|
set_has_i();
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// float f = 4;
|
2017-06-26 18:35:51 +08:00
|
|
|
case 4: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(37u /* 37 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
clear_value();
|
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
|
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
|
|
|
|
input, &value_.f_)));
|
|
|
|
set_has_f();
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// bool b = 5;
|
2017-06-26 18:35:51 +08:00
|
|
|
case 5: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(40u /* 40 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
clear_value();
|
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
|
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
|
|
|
input, &value_.b_)));
|
|
|
|
set_has_b();
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.DataType type = 6;
|
2017-06-26 18:35:51 +08:00
|
|
|
case 6: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
int value;
|
|
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
|
|
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
|
|
|
input, &value)));
|
|
|
|
set_type(static_cast< ::tensorflow::DataType >(value));
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.TensorShapeProto shape = 7;
|
2017-06-26 18:35:51 +08:00
|
|
|
case 7: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
|
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
2017-06-26 18:35:51 +08:00
|
|
|
input, mutable_shape()));
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.TensorProto tensor = 8;
|
2017-06-26 18:35:51 +08:00
|
|
|
case 8: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) {
|
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
2017-06-26 18:35:51 +08:00
|
|
|
input, mutable_tensor()));
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// string placeholder = 9;
|
2017-06-26 18:35:51 +08:00
|
|
|
case 9: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
|
|
input, this->mutable_placeholder()));
|
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
2018-01-15 23:51:38 +08:00
|
|
|
this->placeholder().data(), static_cast<int>(this->placeholder().length()),
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::PARSE,
|
|
|
|
"tensorflow.AttrValue.placeholder"));
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.NameAttrList func = 10;
|
2017-06-26 18:35:51 +08:00
|
|
|
case 10: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(82u /* 82 & 0xFF */)) {
|
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
|
2017-06-26 18:35:51 +08:00
|
|
|
input, mutable_func()));
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
default: {
|
|
|
|
handle_unusual:
|
2018-01-15 23:51:38 +08:00
|
|
|
if (tag == 0) {
|
2017-06-26 18:35:51 +08:00
|
|
|
goto success;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
2017-06-26 18:35:51 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
success:
|
|
|
|
// @@protoc_insertion_point(parse_success:tensorflow.AttrValue)
|
|
|
|
return true;
|
|
|
|
failure:
|
|
|
|
// @@protoc_insertion_point(parse_failure:tensorflow.AttrValue)
|
|
|
|
return false;
|
|
|
|
#undef DO_
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue::SerializeWithCachedSizes(
|
|
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
|
// @@protoc_insertion_point(serialize_start:tensorflow.AttrValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
|
|
|
// .tensorflow.AttrValue.ListValue list = 1;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_list()) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
|
|
1, *value_.list_, output);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// bytes s = 2;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_s()) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
|
|
|
|
2, this->s(), output);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// int64 i = 3;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_i()) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->i(), output);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// float f = 4;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_f()) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->f(), output);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// bool b = 5;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_b()) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteBool(5, this->b(), output);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.DataType type = 6;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_type()) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteEnum(
|
|
|
|
6, this->type(), output);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.TensorShapeProto shape = 7;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_shape()) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
|
|
7, *value_.shape_, output);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.TensorProto tensor = 8;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_tensor()) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
|
|
8, *value_.tensor_, output);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// string placeholder = 9;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_placeholder()) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
2018-01-15 23:51:38 +08:00
|
|
|
this->placeholder().data(), static_cast<int>(this->placeholder().length()),
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
|
"tensorflow.AttrValue.placeholder");
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
|
|
9, this->placeholder(), output);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.NameAttrList func = 10;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_func()) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
|
|
10, *value_.func_, output);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
|
|
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
// @@protoc_insertion_point(serialize_end:tensorflow.AttrValue)
|
|
|
|
}
|
|
|
|
|
|
|
|
::google::protobuf::uint8* AttrValue::InternalSerializeWithCachedSizesToArray(
|
|
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
|
(void)deterministic; // Unused
|
|
|
|
// @@protoc_insertion_point(serialize_to_array_start:tensorflow.AttrValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
|
|
|
// .tensorflow.AttrValue.ListValue list = 1;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_list()) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
2018-01-15 23:51:38 +08:00
|
|
|
InternalWriteMessageToArray(
|
|
|
|
1, *value_.list_, deterministic, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// bytes s = 2;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_s()) {
|
|
|
|
target =
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
|
|
|
|
2, this->s(), target);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// int64 i = 3;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_i()) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->i(), target);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// float f = 4;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_f()) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->f(), target);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// bool b = 5;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_b()) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->b(), target);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.DataType type = 6;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_type()) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
|
|
|
|
6, this->type(), target);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.TensorShapeProto shape = 7;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_shape()) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
2018-01-15 23:51:38 +08:00
|
|
|
InternalWriteMessageToArray(
|
|
|
|
7, *value_.shape_, deterministic, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.TensorProto tensor = 8;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_tensor()) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
2018-01-15 23:51:38 +08:00
|
|
|
InternalWriteMessageToArray(
|
|
|
|
8, *value_.tensor_, deterministic, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// string placeholder = 9;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_placeholder()) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
2018-01-15 23:51:38 +08:00
|
|
|
this->placeholder().data(), static_cast<int>(this->placeholder().length()),
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
|
"tensorflow.AttrValue.placeholder");
|
|
|
|
target =
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
|
|
|
9, this->placeholder(), target);
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.NameAttrList func = 10;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (has_func()) {
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
2018-01-15 23:51:38 +08:00
|
|
|
InternalWriteMessageToArray(
|
|
|
|
10, *value_.func_, deterministic, target);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
|
|
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
// @@protoc_insertion_point(serialize_to_array_end:tensorflow.AttrValue)
|
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t AttrValue::ByteSizeLong() const {
|
|
|
|
// @@protoc_insertion_point(message_byte_size_start:tensorflow.AttrValue)
|
|
|
|
size_t total_size = 0;
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
|
total_size +=
|
|
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
|
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
switch (value_case()) {
|
2018-01-15 23:51:38 +08:00
|
|
|
// bytes s = 2;
|
2017-06-26 18:35:51 +08:00
|
|
|
case kS: {
|
|
|
|
total_size += 1 +
|
|
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
|
|
this->s());
|
|
|
|
break;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
// int64 i = 3;
|
2017-06-26 18:35:51 +08:00
|
|
|
case kI: {
|
|
|
|
total_size += 1 +
|
|
|
|
::google::protobuf::internal::WireFormatLite::Int64Size(
|
|
|
|
this->i());
|
|
|
|
break;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
// float f = 4;
|
2017-06-26 18:35:51 +08:00
|
|
|
case kF: {
|
|
|
|
total_size += 1 + 4;
|
|
|
|
break;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
// bool b = 5;
|
2017-06-26 18:35:51 +08:00
|
|
|
case kB: {
|
|
|
|
total_size += 1 + 1;
|
|
|
|
break;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.DataType type = 6;
|
2017-06-26 18:35:51 +08:00
|
|
|
case kType: {
|
|
|
|
total_size += 1 +
|
|
|
|
::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
|
|
|
|
break;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.TensorShapeProto shape = 7;
|
2017-06-26 18:35:51 +08:00
|
|
|
case kShape: {
|
|
|
|
total_size += 1 +
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(
|
2017-06-26 18:35:51 +08:00
|
|
|
*value_.shape_);
|
|
|
|
break;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.TensorProto tensor = 8;
|
2017-06-26 18:35:51 +08:00
|
|
|
case kTensor: {
|
|
|
|
total_size += 1 +
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(
|
2017-06-26 18:35:51 +08:00
|
|
|
*value_.tensor_);
|
|
|
|
break;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.AttrValue.ListValue list = 1;
|
2017-06-26 18:35:51 +08:00
|
|
|
case kList: {
|
|
|
|
total_size += 1 +
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(
|
2017-06-26 18:35:51 +08:00
|
|
|
*value_.list_);
|
|
|
|
break;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
// .tensorflow.NameAttrList func = 10;
|
2017-06-26 18:35:51 +08:00
|
|
|
case kFunc: {
|
|
|
|
total_size += 1 +
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::MessageSize(
|
2017-06-26 18:35:51 +08:00
|
|
|
*value_.func_);
|
|
|
|
break;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
// string placeholder = 9;
|
2017-06-26 18:35:51 +08:00
|
|
|
case kPlaceholder: {
|
|
|
|
total_size += 1 +
|
|
|
|
::google::protobuf::internal::WireFormatLite::StringSize(
|
|
|
|
this->placeholder());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case VALUE_NOT_SET: {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
|
_cached_size_ = cached_size;
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
|
return total_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
|
// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.AttrValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK_NE(&from, this);
|
2017-06-26 18:35:51 +08:00
|
|
|
const AttrValue* source =
|
|
|
|
::google::protobuf::internal::DynamicCastToGenerated<const AttrValue>(
|
|
|
|
&from);
|
|
|
|
if (source == NULL) {
|
|
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.AttrValue)
|
|
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
|
|
} else {
|
|
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.AttrValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
MergeFrom(*source);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue::MergeFrom(const AttrValue& from) {
|
|
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.AttrValue)
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
(void) cached_has_bits;
|
2017-06-26 18:35:51 +08:00
|
|
|
|
|
|
|
switch (from.value_case()) {
|
|
|
|
case kS: {
|
|
|
|
set_s(from.s());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kI: {
|
|
|
|
set_i(from.i());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kF: {
|
|
|
|
set_f(from.f());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kB: {
|
|
|
|
set_b(from.b());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kType: {
|
|
|
|
set_type(from.type());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kShape: {
|
|
|
|
mutable_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.shape());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kTensor: {
|
|
|
|
mutable_tensor()->::tensorflow::TensorProto::MergeFrom(from.tensor());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kList: {
|
|
|
|
mutable_list()->::tensorflow::AttrValue_ListValue::MergeFrom(from.list());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kFunc: {
|
|
|
|
mutable_func()->::tensorflow::NameAttrList::MergeFrom(from.func());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kPlaceholder: {
|
|
|
|
set_placeholder(from.placeholder());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case VALUE_NOT_SET: {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue::CopyFrom(const ::google::protobuf::Message& from) {
|
|
|
|
// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.AttrValue)
|
|
|
|
if (&from == this) return;
|
|
|
|
Clear();
|
|
|
|
MergeFrom(from);
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue::CopyFrom(const AttrValue& from) {
|
|
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.AttrValue)
|
|
|
|
if (&from == this) return;
|
|
|
|
Clear();
|
2018-01-15 23:51:38 +08:00
|
|
|
MergeFrom(from);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool AttrValue::IsInitialized() const {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AttrValue::Swap(AttrValue* other) {
|
|
|
|
if (other == this) return;
|
|
|
|
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
|
|
|
|
InternalSwap(other);
|
|
|
|
} else {
|
2018-01-15 23:51:38 +08:00
|
|
|
AttrValue* temp = New(GetArenaNoVirtual());
|
|
|
|
temp->MergeFrom(*other);
|
|
|
|
other->CopyFrom(*this);
|
|
|
|
InternalSwap(temp);
|
|
|
|
if (GetArenaNoVirtual() == NULL) {
|
|
|
|
delete temp;
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
void AttrValue::UnsafeArenaSwap(AttrValue* other) {
|
|
|
|
if (other == this) return;
|
|
|
|
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
|
|
|
|
InternalSwap(other);
|
|
|
|
}
|
|
|
|
void AttrValue::InternalSwap(AttrValue* other) {
|
2018-01-15 23:51:38 +08:00
|
|
|
using std::swap;
|
|
|
|
swap(value_, other->value_);
|
|
|
|
swap(_oneof_case_[0], other->_oneof_case_[0]);
|
2017-06-26 18:35:51 +08:00
|
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
2018-01-15 23:51:38 +08:00
|
|
|
swap(_cached_size_, other->_cached_size_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
::google::protobuf::Metadata AttrValue::GetMetadata() const {
|
2018-01-15 23:51:38 +08:00
|
|
|
protobuf_attr_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
|
return ::protobuf_attr_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// ===================================================================
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
NameAttrList_AttrEntry_DoNotUse::NameAttrList_AttrEntry_DoNotUse() {}
|
|
|
|
NameAttrList_AttrEntry_DoNotUse::NameAttrList_AttrEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
|
|
|
|
void NameAttrList_AttrEntry_DoNotUse::MergeFrom(const NameAttrList_AttrEntry_DoNotUse& other) {
|
|
|
|
MergeFromInternal(other);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::Metadata NameAttrList_AttrEntry_DoNotUse::GetMetadata() const {
|
|
|
|
::protobuf_attr_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
|
return ::protobuf_attr_5fvalue_2eproto::file_level_metadata[2];
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
void NameAttrList_AttrEntry_DoNotUse::MergeFrom(
|
|
|
|
const ::google::protobuf::Message& other) {
|
|
|
|
::google::protobuf::Message::MergeFrom(other);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// ===================================================================
|
2017-06-26 18:35:51 +08:00
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
void NameAttrList::InitAsDefaultInstance() {
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
const int NameAttrList::kNameFieldNumber;
|
|
|
|
const int NameAttrList::kAttrFieldNumber;
|
|
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
|
|
|
|
NameAttrList::NameAttrList()
|
|
|
|
: ::google::protobuf::Message(), _internal_metadata_(NULL) {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
|
|
|
::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue();
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
SharedCtor();
|
|
|
|
// @@protoc_insertion_point(constructor:tensorflow.NameAttrList)
|
|
|
|
}
|
|
|
|
NameAttrList::NameAttrList(::google::protobuf::Arena* arena)
|
|
|
|
: ::google::protobuf::Message(),
|
|
|
|
_internal_metadata_(arena),
|
|
|
|
attr_(arena) {
|
2018-01-15 23:51:38 +08:00
|
|
|
::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue();
|
2017-06-26 18:35:51 +08:00
|
|
|
SharedCtor();
|
|
|
|
RegisterArenaDtor(arena);
|
|
|
|
// @@protoc_insertion_point(arena_constructor:tensorflow.NameAttrList)
|
|
|
|
}
|
|
|
|
NameAttrList::NameAttrList(const NameAttrList& from)
|
|
|
|
: ::google::protobuf::Message(),
|
2018-01-15 23:51:38 +08:00
|
|
|
_internal_metadata_(NULL),
|
|
|
|
_cached_size_(0) {
|
|
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
|
attr_.MergeFrom(from.attr_);
|
|
|
|
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
|
if (from.name().size() > 0) {
|
|
|
|
name_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name(),
|
|
|
|
GetArenaNoVirtual());
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
// @@protoc_insertion_point(copy_constructor:tensorflow.NameAttrList)
|
|
|
|
}
|
|
|
|
|
|
|
|
void NameAttrList::SharedCtor() {
|
|
|
|
name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
|
|
_cached_size_ = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
NameAttrList::~NameAttrList() {
|
|
|
|
// @@protoc_insertion_point(destructor:tensorflow.NameAttrList)
|
|
|
|
SharedDtor();
|
|
|
|
}
|
|
|
|
|
|
|
|
void NameAttrList::SharedDtor() {
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
|
|
|
|
name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void NameAttrList::ArenaDtor(void* object) {
|
|
|
|
NameAttrList* _this = reinterpret_cast< NameAttrList* >(object);
|
|
|
|
(void)_this;
|
|
|
|
}
|
|
|
|
void NameAttrList::RegisterArenaDtor(::google::protobuf::Arena* arena) {
|
|
|
|
}
|
|
|
|
void NameAttrList::SetCachedSize(int size) const {
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
|
_cached_size_ = size;
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
|
}
|
|
|
|
const ::google::protobuf::Descriptor* NameAttrList::descriptor() {
|
2018-01-15 23:51:38 +08:00
|
|
|
::protobuf_attr_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
|
return ::protobuf_attr_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
const NameAttrList& NameAttrList::default_instance() {
|
2018-01-15 23:51:38 +08:00
|
|
|
::protobuf_attr_5fvalue_2eproto::InitDefaultsAttrValue();
|
2017-06-26 18:35:51 +08:00
|
|
|
return *internal_default_instance();
|
|
|
|
}
|
|
|
|
|
|
|
|
NameAttrList* NameAttrList::New(::google::protobuf::Arena* arena) const {
|
|
|
|
return ::google::protobuf::Arena::CreateMessage<NameAttrList>(arena);
|
|
|
|
}
|
|
|
|
|
|
|
|
void NameAttrList::Clear() {
|
|
|
|
// @@protoc_insertion_point(message_clear_start:tensorflow.NameAttrList)
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
// Prevent compiler warnings about cached_has_bits being unused
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
attr_.Clear();
|
2018-01-15 23:51:38 +08:00
|
|
|
name_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
|
|
|
|
_internal_metadata_.Clear();
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool NameAttrList::MergePartialFromCodedStream(
|
|
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
|
|
::google::protobuf::uint32 tag;
|
|
|
|
// @@protoc_insertion_point(parse_start:tensorflow.NameAttrList)
|
|
|
|
for (;;) {
|
2018-01-15 23:51:38 +08:00
|
|
|
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
2017-06-26 18:35:51 +08:00
|
|
|
tag = p.first;
|
|
|
|
if (!p.second) goto handle_unusual;
|
|
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
2018-01-15 23:51:38 +08:00
|
|
|
// string name = 1;
|
2017-06-26 18:35:51 +08:00
|
|
|
case 1: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
|
2017-06-26 18:35:51 +08:00
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
|
|
input, this->mutable_name()));
|
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
2018-01-15 23:51:38 +08:00
|
|
|
this->name().data(), static_cast<int>(this->name().length()),
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::PARSE,
|
|
|
|
"tensorflow.NameAttrList.name"));
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// map<string, .tensorflow.AttrValue> attr = 2;
|
|
|
|
case 2: {
|
2018-01-15 23:51:38 +08:00
|
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
|
|
static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
|
|
|
|
NameAttrList_AttrEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
|
|
|
|
NameAttrList_AttrEntry_DoNotUse,
|
2017-06-26 18:35:51 +08:00
|
|
|
::std::string, ::tensorflow::AttrValue,
|
|
|
|
::google::protobuf::internal::WireFormatLite::TYPE_STRING,
|
|
|
|
::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
|
|
|
|
0 >,
|
|
|
|
::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue > > parser(&attr_);
|
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
|
|
input, &parser));
|
|
|
|
DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
2018-01-15 23:51:38 +08:00
|
|
|
parser.key().data(), static_cast<int>(parser.key().length()),
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::PARSE,
|
|
|
|
"tensorflow.NameAttrList.AttrEntry.key"));
|
|
|
|
} else {
|
|
|
|
goto handle_unusual;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
default: {
|
|
|
|
handle_unusual:
|
2018-01-15 23:51:38 +08:00
|
|
|
if (tag == 0) {
|
2017-06-26 18:35:51 +08:00
|
|
|
goto success;
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
|
|
input, tag, _internal_metadata_.mutable_unknown_fields()));
|
2017-06-26 18:35:51 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
success:
|
|
|
|
// @@protoc_insertion_point(parse_success:tensorflow.NameAttrList)
|
|
|
|
return true;
|
|
|
|
failure:
|
|
|
|
// @@protoc_insertion_point(parse_failure:tensorflow.NameAttrList)
|
|
|
|
return false;
|
|
|
|
#undef DO_
|
|
|
|
}
|
|
|
|
|
|
|
|
void NameAttrList::SerializeWithCachedSizes(
|
|
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
|
|
// @@protoc_insertion_point(serialize_start:tensorflow.NameAttrList)
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
|
|
|
// string name = 1;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (this->name().size() > 0) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
2018-01-15 23:51:38 +08:00
|
|
|
this->name().data(), static_cast<int>(this->name().length()),
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
|
"tensorflow.NameAttrList.name");
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
|
|
1, this->name(), output);
|
|
|
|
}
|
|
|
|
|
|
|
|
// map<string, .tensorflow.AttrValue> attr = 2;
|
|
|
|
if (!this->attr().empty()) {
|
|
|
|
typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer
|
|
|
|
ConstPtr;
|
|
|
|
typedef ConstPtr SortItem;
|
|
|
|
typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
|
|
|
|
struct Utf8Check {
|
|
|
|
static void Check(ConstPtr p) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
2018-01-15 23:51:38 +08:00
|
|
|
p->first.data(), static_cast<int>(p->first.length()),
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
|
"tensorflow.NameAttrList.AttrEntry.key");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
if (output->IsSerializationDeterministic() &&
|
2017-06-26 18:35:51 +08:00
|
|
|
this->attr().size() > 1) {
|
|
|
|
::google::protobuf::scoped_array<SortItem> items(
|
|
|
|
new SortItem[this->attr().size()]);
|
|
|
|
typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type;
|
|
|
|
size_type n = 0;
|
|
|
|
for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator
|
|
|
|
it = this->attr().begin();
|
|
|
|
it != this->attr().end(); ++it, ++n) {
|
2018-01-15 23:51:38 +08:00
|
|
|
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
|
|
|
|
::google::protobuf::scoped_ptr<NameAttrList_AttrEntry_DoNotUse> entry;
|
2017-06-26 18:35:51 +08:00
|
|
|
for (size_type i = 0; i < n; i++) {
|
|
|
|
entry.reset(attr_.NewEntryWrapper(
|
2018-01-15 23:51:38 +08:00
|
|
|
items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
|
|
2, *entry, output);
|
|
|
|
if (entry->GetArena() != NULL) {
|
|
|
|
entry.release();
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
} else {
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::scoped_ptr<NameAttrList_AttrEntry_DoNotUse> entry;
|
2017-06-26 18:35:51 +08:00
|
|
|
for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator
|
|
|
|
it = this->attr().begin();
|
|
|
|
it != this->attr().end(); ++it) {
|
|
|
|
entry.reset(attr_.NewEntryWrapper(
|
|
|
|
it->first, it->second));
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
|
|
2, *entry, output);
|
|
|
|
if (entry->GetArena() != NULL) {
|
|
|
|
entry.release();
|
|
|
|
}
|
|
|
|
Utf8Check::Check(&*it);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
|
|
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
// @@protoc_insertion_point(serialize_end:tensorflow.NameAttrList)
|
|
|
|
}
|
|
|
|
|
|
|
|
::google::protobuf::uint8* NameAttrList::InternalSerializeWithCachedSizesToArray(
|
|
|
|
bool deterministic, ::google::protobuf::uint8* target) const {
|
|
|
|
(void)deterministic; // Unused
|
|
|
|
// @@protoc_insertion_point(serialize_to_array_start:tensorflow.NameAttrList)
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
(void) cached_has_bits;
|
|
|
|
|
|
|
|
// string name = 1;
|
2017-06-26 18:35:51 +08:00
|
|
|
if (this->name().size() > 0) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
2018-01-15 23:51:38 +08:00
|
|
|
this->name().data(), static_cast<int>(this->name().length()),
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
|
"tensorflow.NameAttrList.name");
|
|
|
|
target =
|
|
|
|
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
|
|
|
|
1, this->name(), target);
|
|
|
|
}
|
|
|
|
|
|
|
|
// map<string, .tensorflow.AttrValue> attr = 2;
|
|
|
|
if (!this->attr().empty()) {
|
|
|
|
typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_pointer
|
|
|
|
ConstPtr;
|
|
|
|
typedef ConstPtr SortItem;
|
|
|
|
typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
|
|
|
|
struct Utf8Check {
|
|
|
|
static void Check(ConstPtr p) {
|
|
|
|
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
|
2018-01-15 23:51:38 +08:00
|
|
|
p->first.data(), static_cast<int>(p->first.length()),
|
2017-06-26 18:35:51 +08:00
|
|
|
::google::protobuf::internal::WireFormatLite::SERIALIZE,
|
|
|
|
"tensorflow.NameAttrList.AttrEntry.key");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
if (deterministic &&
|
|
|
|
this->attr().size() > 1) {
|
|
|
|
::google::protobuf::scoped_array<SortItem> items(
|
|
|
|
new SortItem[this->attr().size()]);
|
|
|
|
typedef ::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::size_type size_type;
|
|
|
|
size_type n = 0;
|
|
|
|
for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator
|
|
|
|
it = this->attr().begin();
|
|
|
|
it != this->attr().end(); ++it, ++n) {
|
2018-01-15 23:51:38 +08:00
|
|
|
items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
|
|
|
|
::google::protobuf::scoped_ptr<NameAttrList_AttrEntry_DoNotUse> entry;
|
2017-06-26 18:35:51 +08:00
|
|
|
for (size_type i = 0; i < n; i++) {
|
|
|
|
entry.reset(attr_.NewEntryWrapper(
|
2018-01-15 23:51:38 +08:00
|
|
|
items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
|
2017-06-26 18:35:51 +08:00
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
|
|
InternalWriteMessageNoVirtualToArray(
|
|
|
|
2, *entry, deterministic, target);
|
|
|
|
;
|
|
|
|
if (entry->GetArena() != NULL) {
|
|
|
|
entry.release();
|
|
|
|
}
|
2018-01-15 23:51:38 +08:00
|
|
|
Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
} else {
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::scoped_ptr<NameAttrList_AttrEntry_DoNotUse> entry;
|
2017-06-26 18:35:51 +08:00
|
|
|
for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator
|
|
|
|
it = this->attr().begin();
|
|
|
|
it != this->attr().end(); ++it) {
|
|
|
|
entry.reset(attr_.NewEntryWrapper(
|
|
|
|
it->first, it->second));
|
|
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
|
|
InternalWriteMessageNoVirtualToArray(
|
|
|
|
2, *entry, deterministic, target);
|
|
|
|
;
|
|
|
|
if (entry->GetArena() != NULL) {
|
|
|
|
entry.release();
|
|
|
|
}
|
|
|
|
Utf8Check::Check(&*it);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
|
|
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target);
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
// @@protoc_insertion_point(serialize_to_array_end:tensorflow.NameAttrList)
|
|
|
|
return target;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t NameAttrList::ByteSizeLong() const {
|
|
|
|
// @@protoc_insertion_point(message_byte_size_start:tensorflow.NameAttrList)
|
|
|
|
size_t total_size = 0;
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
|
|
|
|
total_size +=
|
|
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
|
|
(::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
// map<string, .tensorflow.AttrValue> attr = 2;
|
|
|
|
total_size += 1 *
|
|
|
|
::google::protobuf::internal::FromIntSize(this->attr_size());
|
|
|
|
{
|
2018-01-15 23:51:38 +08:00
|
|
|
::google::protobuf::scoped_ptr<NameAttrList_AttrEntry_DoNotUse> entry;
|
2017-06-26 18:35:51 +08:00
|
|
|
for (::google::protobuf::Map< ::std::string, ::tensorflow::AttrValue >::const_iterator
|
|
|
|
it = this->attr().begin();
|
|
|
|
it != this->attr().end(); ++it) {
|
|
|
|
if (entry.get() != NULL && entry->GetArena() != NULL) {
|
|
|
|
entry.release();
|
|
|
|
}
|
|
|
|
entry.reset(attr_.NewEntryWrapper(it->first, it->second));
|
|
|
|
total_size += ::google::protobuf::internal::WireFormatLite::
|
|
|
|
MessageSizeNoVirtual(*entry);
|
|
|
|
}
|
|
|
|
if (entry.get() != NULL && entry->GetArena() != NULL) {
|
|
|
|
entry.release();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-15 23:51:38 +08:00
|
|
|
// string name = 1;
|
|
|
|
if (this->name().size() > 0) {
|
|
|
|
total_size += 1 +
|
|
|
|
::google::protobuf::internal::WireFormatLite::StringSize(
|
|
|
|
this->name());
|
|
|
|
}
|
|
|
|
|
2017-06-26 18:35:51 +08:00
|
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
|
|
_cached_size_ = cached_size;
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
|
|
return total_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
void NameAttrList::MergeFrom(const ::google::protobuf::Message& from) {
|
|
|
|
// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.NameAttrList)
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK_NE(&from, this);
|
2017-06-26 18:35:51 +08:00
|
|
|
const NameAttrList* source =
|
|
|
|
::google::protobuf::internal::DynamicCastToGenerated<const NameAttrList>(
|
|
|
|
&from);
|
|
|
|
if (source == NULL) {
|
|
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.NameAttrList)
|
|
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
|
|
} else {
|
|
|
|
// @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.NameAttrList)
|
2018-01-15 23:51:38 +08:00
|
|
|
MergeFrom(*source);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void NameAttrList::MergeFrom(const NameAttrList& from) {
|
|
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.NameAttrList)
|
2018-01-15 23:51:38 +08:00
|
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
|
|
(void) cached_has_bits;
|
2017-06-26 18:35:51 +08:00
|
|
|
|
|
|
|
attr_.MergeFrom(from.attr_);
|
|
|
|
if (from.name().size() > 0) {
|
|
|
|
set_name(from.name());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void NameAttrList::CopyFrom(const ::google::protobuf::Message& from) {
|
|
|
|
// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.NameAttrList)
|
|
|
|
if (&from == this) return;
|
|
|
|
Clear();
|
|
|
|
MergeFrom(from);
|
|
|
|
}
|
|
|
|
|
|
|
|
void NameAttrList::CopyFrom(const NameAttrList& from) {
|
|
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.NameAttrList)
|
|
|
|
if (&from == this) return;
|
|
|
|
Clear();
|
2018-01-15 23:51:38 +08:00
|
|
|
MergeFrom(from);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool NameAttrList::IsInitialized() const {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void NameAttrList::Swap(NameAttrList* other) {
|
|
|
|
if (other == this) return;
|
|
|
|
if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
|
|
|
|
InternalSwap(other);
|
|
|
|
} else {
|
2018-01-15 23:51:38 +08:00
|
|
|
NameAttrList* temp = New(GetArenaNoVirtual());
|
|
|
|
temp->MergeFrom(*other);
|
|
|
|
other->CopyFrom(*this);
|
|
|
|
InternalSwap(temp);
|
|
|
|
if (GetArenaNoVirtual() == NULL) {
|
|
|
|
delete temp;
|
|
|
|
}
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
void NameAttrList::UnsafeArenaSwap(NameAttrList* other) {
|
|
|
|
if (other == this) return;
|
|
|
|
GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
|
|
|
|
InternalSwap(other);
|
|
|
|
}
|
|
|
|
void NameAttrList::InternalSwap(NameAttrList* other) {
|
2018-01-15 23:51:38 +08:00
|
|
|
using std::swap;
|
2017-06-26 18:35:51 +08:00
|
|
|
attr_.Swap(&other->attr_);
|
2018-01-15 23:51:38 +08:00
|
|
|
name_.Swap(&other->name_);
|
2017-06-26 18:35:51 +08:00
|
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
2018-01-15 23:51:38 +08:00
|
|
|
swap(_cached_size_, other->_cached_size_);
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
::google::protobuf::Metadata NameAttrList::GetMetadata() const {
|
2018-01-15 23:51:38 +08:00
|
|
|
protobuf_attr_5fvalue_2eproto::protobuf_AssignDescriptorsOnce();
|
|
|
|
return ::protobuf_attr_5fvalue_2eproto::file_level_metadata[kIndexInFileMessages];
|
2017-06-26 18:35:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
|
|
} // namespace tensorflow
|
|
|
|
|
|
|
|
// @@protoc_insertion_point(global_scope)
|