diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..195b77a6d3c42025323aad69b5dcf324407711a3 --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +HOST_SYSTEM = $(shell uname | cut -f 1 -d_) +SYSTEM ?= $(HOST_SYSTEM) +CC = g++ +CFLAGS = -c -Wall -std=c++11 -pthread -I/usr/local/include +ifeq ($(SYSTEM),Darwin) +LDFLAGS = -L/usr/local/lib -lpthread -lprotobuf -lgrpc++ -lgrpc\ + -lgrpc++_reflection\ + -ldl +else +LDFLAGS = -L/usr/local/lib -lprotobuf -pthread -lgrpc++ -lgrpc\ + -Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed\ + -ldl +endif +EXECUTABLE_NAME=serving_client + +BIN =./bin +SOURCE_DIR =./src +OBJ =./obj + +SOURCE_FILES =$(wildcard src/*.cc) $(wildcard src/**/*.cc) + +EXECUTABLE_FILES = $(EXECUTABLE_NAME:%=$(BIN)/%) +OBJECT_FILES = $(SOURCE_FILES:%.cc=$(OBJ)/%.o) + +build: $(EXECUTABLE_FILES) + +clean: + rm -r -f $(BIN) + rm -r -f $(OBJ) + +.PHONY: build clean + +$(EXECUTABLE_FILES): $(OBJECT_FILES) + @echo Linking $< + @mkdir -p $(@D) + @$(CC) $^ $(LDFLAGS) -o $@ + @echo "Build successful!" + +$(OBJECT_FILES): $(OBJ)/%.o: %.cc + @echo Compiling $< + @mkdir -p $(@D) + @$(CC) $(CFLAGS) -o $@ $< diff --git a/bin/serving_client b/bin/serving_client new file mode 100755 index 0000000000000000000000000000000000000000..ac3e26078fdadb371c2b2dc78e7b02849a886d7d Binary files /dev/null and b/bin/serving_client differ diff --git a/src/generated/model.grpc.pb.cc b/src/generated/model.grpc.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..5edb9b388c5094c6d00210666162f9fc1d9536ad --- /dev/null +++ b/src/generated/model.grpc.pb.cc @@ -0,0 +1,24 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: model.proto + +#include "model.pb.h" +#include "model.grpc.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/channel_interface.h> +#include <grpcpp/impl/codegen/client_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/rpc_service_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/sync_stream.h> +namespace tensorflow { +namespace serving { + +} // namespace tensorflow +} // namespace serving + diff --git a/src/generated/model.grpc.pb.h b/src/generated/model.grpc.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..08e15429400da2fd78917f93ccc153bd1baf9b7b --- /dev/null +++ b/src/generated/model.grpc.pb.h @@ -0,0 +1,43 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: model.proto +#ifndef GRPC_model_2eproto__INCLUDED +#define GRPC_model_2eproto__INCLUDED + +#include "model.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_generic_service.h> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/proto_utils.h> +#include <grpcpp/impl/codegen/rpc_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/status.h> +#include <grpcpp/impl/codegen/stub_options.h> +#include <grpcpp/impl/codegen/sync_stream.h> + +namespace grpc_impl { +class CompletionQueue; +class ServerCompletionQueue; +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +template <typename RequestT, typename ResponseT> +class MessageAllocator; +} // namespace experimental +class ServerContext; +} // namespace grpc + +namespace tensorflow { +namespace serving { + +} // namespace serving +} // namespace tensorflow + + +#endif // GRPC_model_2eproto__INCLUDED diff --git a/src/generated/model.pb.cc b/src/generated/model.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..b4565139c8dd27b30594ece45be53d6472e1b811 --- /dev/null +++ b/src/generated/model.pb.cc @@ -0,0 +1,862 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: model.proto + +#include "model.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/extension_set.h> +#include <google/protobuf/wire_format_lite.h> +#include <google/protobuf/descriptor.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/reflection_ops.h> +#include <google/protobuf/wire_format.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +extern PROTOBUF_INTERNAL_EXPORT_model_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Int64Value_model_2eproto; +namespace tensorflow { +namespace serving { +class Int64ValueDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Int64Value> _instance; +} _Int64Value_default_instance_; +class ModelSpecDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ModelSpec> _instance; +} _ModelSpec_default_instance_; +} // namespace serving +} // namespace tensorflow +static void InitDefaultsscc_info_Int64Value_model_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::tensorflow::serving::_Int64Value_default_instance_; + new (ptr) ::tensorflow::serving::Int64Value(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::tensorflow::serving::Int64Value::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Int64Value_model_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Int64Value_model_2eproto}, {}}; + +static void InitDefaultsscc_info_ModelSpec_model_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::tensorflow::serving::_ModelSpec_default_instance_; + new (ptr) ::tensorflow::serving::ModelSpec(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::tensorflow::serving::ModelSpec::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ModelSpec_model_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_ModelSpec_model_2eproto}, { + &scc_info_Int64Value_model_2eproto.base,}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_model_2eproto[2]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_model_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_model_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_model_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::Int64Value, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::Int64Value, value_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::ModelSpec, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::ModelSpec, name_), + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::ModelSpec, version_), + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::ModelSpec, signature_name_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::tensorflow::serving::Int64Value)}, + { 6, -1, sizeof(::tensorflow::serving::ModelSpec)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::serving::_Int64Value_default_instance_), + reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::serving::_ModelSpec_default_instance_), +}; + +const char descriptor_table_protodef_model_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\013model.proto\022\022tensorflow.serving\"\033\n\nInt" + "64Value\022\r\n\005value\030\001 \001(\003\"b\n\tModelSpec\022\014\n\004n" + "ame\030\001 \001(\t\022/\n\007version\030\002 \001(\0132\036.tensorflow." + "serving.Int64Value\022\026\n\016signature_name\030\003 \001" + "(\tB\003\370\001\001b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_model_2eproto_deps[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_model_2eproto_sccs[2] = { + &scc_info_Int64Value_model_2eproto.base, + &scc_info_ModelSpec_model_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_model_2eproto_once; +static bool descriptor_table_model_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_model_2eproto = { + &descriptor_table_model_2eproto_initialized, descriptor_table_protodef_model_2eproto, "model.proto", 175, + &descriptor_table_model_2eproto_once, descriptor_table_model_2eproto_sccs, descriptor_table_model_2eproto_deps, 2, 0, + schemas, file_default_instances, TableStruct_model_2eproto::offsets, + file_level_metadata_model_2eproto, 2, file_level_enum_descriptors_model_2eproto, file_level_service_descriptors_model_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_model_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_model_2eproto), true); +namespace tensorflow { +namespace serving { + +// =================================================================== + +void Int64Value::InitAsDefaultInstance() { +} +class Int64Value::_Internal { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int Int64Value::kValueFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +Int64Value::Int64Value() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.serving.Int64Value) +} +Int64Value::Int64Value(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.serving.Int64Value) +} +Int64Value::Int64Value(const Int64Value& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + value_ = from.value_; + // @@protoc_insertion_point(copy_constructor:tensorflow.serving.Int64Value) +} + +void Int64Value::SharedCtor() { + value_ = PROTOBUF_LONGLONG(0); +} + +Int64Value::~Int64Value() { + // @@protoc_insertion_point(destructor:tensorflow.serving.Int64Value) + SharedDtor(); +} + +void Int64Value::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); +} + +void Int64Value::ArenaDtor(void* object) { + Int64Value* _this = reinterpret_cast< Int64Value* >(object); + (void)_this; +} +void Int64Value::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void Int64Value::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const Int64Value& Int64Value::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Int64Value_model_2eproto.base); + return *internal_default_instance(); +} + + +void Int64Value::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.serving.Int64Value) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + value_ = PROTOBUF_LONGLONG(0); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* Int64Value::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // int64 value = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + value_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool Int64Value::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.serving.Int64Value) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // int64 value = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { + + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( + input, &value_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.serving.Int64Value) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.serving.Int64Value) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void Int64Value::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.serving.Int64Value) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int64 value = 1; + if (this->value() != 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->value(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:tensorflow.serving.Int64Value) +} + +::PROTOBUF_NAMESPACE_ID::uint8* Int64Value::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.serving.Int64Value) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int64 value = 1; + if (this->value() != 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->value(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.serving.Int64Value) + return target; +} + +size_t Int64Value::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.serving.Int64Value) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // int64 value = 1; + if (this->value() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->value()); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Int64Value::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.serving.Int64Value) + GOOGLE_DCHECK_NE(&from, this); + const Int64Value* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Int64Value>( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.serving.Int64Value) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.serving.Int64Value) + MergeFrom(*source); + } +} + +void Int64Value::MergeFrom(const Int64Value& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.serving.Int64Value) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.value() != 0) { + set_value(from.value()); + } +} + +void Int64Value::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.serving.Int64Value) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Int64Value::CopyFrom(const Int64Value& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.serving.Int64Value) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Int64Value::IsInitialized() const { + return true; +} + +void Int64Value::Swap(Int64Value* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + Int64Value* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == nullptr) { + delete temp; + } + } +} +void Int64Value::UnsafeArenaSwap(Int64Value* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void Int64Value::InternalSwap(Int64Value* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + swap(value_, other->value_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Int64Value::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void ModelSpec::InitAsDefaultInstance() { + ::tensorflow::serving::_ModelSpec_default_instance_._instance.get_mutable()->version_ = const_cast< ::tensorflow::serving::Int64Value*>( + ::tensorflow::serving::Int64Value::internal_default_instance()); +} +class ModelSpec::_Internal { + public: + static const ::tensorflow::serving::Int64Value& version(const ModelSpec* msg); +}; + +const ::tensorflow::serving::Int64Value& +ModelSpec::_Internal::version(const ModelSpec* msg) { + return *msg->version_; +} +void ModelSpec::unsafe_arena_set_allocated_version( + ::tensorflow::serving::Int64Value* version) { + if (GetArenaNoVirtual() == nullptr) { + delete version_; + } + version_ = version; + if (version) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.serving.ModelSpec.version) +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ModelSpec::kNameFieldNumber; +const int ModelSpec::kVersionFieldNumber; +const int ModelSpec::kSignatureNameFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ModelSpec::ModelSpec() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.serving.ModelSpec) +} +ModelSpec::ModelSpec(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.serving.ModelSpec) +} +ModelSpec::ModelSpec(const ModelSpec& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), + GetArenaNoVirtual()); + } + signature_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.signature_name().empty()) { + signature_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.signature_name(), + GetArenaNoVirtual()); + } + if (from.has_version()) { + version_ = new ::tensorflow::serving::Int64Value(*from.version_); + } else { + version_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:tensorflow.serving.ModelSpec) +} + +void ModelSpec::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ModelSpec_model_2eproto.base); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + version_ = nullptr; +} + +ModelSpec::~ModelSpec() { + // @@protoc_insertion_point(destructor:tensorflow.serving.ModelSpec) + SharedDtor(); +} + +void ModelSpec::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + signature_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete version_; +} + +void ModelSpec::ArenaDtor(void* object) { + ModelSpec* _this = reinterpret_cast< ModelSpec* >(object); + (void)_this; +} +void ModelSpec::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ModelSpec::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ModelSpec& ModelSpec::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ModelSpec_model_2eproto.base); + return *internal_default_instance(); +} + + +void ModelSpec::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.serving.ModelSpec) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + signature_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + if (GetArenaNoVirtual() == nullptr && version_ != nullptr) { + delete version_; + } + version_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* ModelSpec::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.serving.ModelSpec.name"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // .tensorflow.serving.Int64Value version = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(mutable_version(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string signature_name = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_signature_name(), ptr, ctx, "tensorflow.serving.ModelSpec.signature_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool ModelSpec::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.serving.ModelSpec) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string name = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "tensorflow.serving.ModelSpec.name")); + } else { + goto handle_unusual; + } + break; + } + + // .tensorflow.serving.Int64Value version = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, mutable_version())); + } else { + goto handle_unusual; + } + break; + } + + // string signature_name = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_signature_name())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->signature_name().data(), static_cast<int>(this->signature_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "tensorflow.serving.ModelSpec.signature_name")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.serving.ModelSpec) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.serving.ModelSpec) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void ModelSpec::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.serving.ModelSpec) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.serving.ModelSpec.name"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // .tensorflow.serving.Int64Value version = 2; + if (this->has_version()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, _Internal::version(this), output); + } + + // string signature_name = 3; + if (this->signature_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->signature_name().data(), static_cast<int>(this->signature_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.serving.ModelSpec.signature_name"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->signature_name(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:tensorflow.serving.ModelSpec) +} + +::PROTOBUF_NAMESPACE_ID::uint8* ModelSpec::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.serving.ModelSpec) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.serving.ModelSpec.name"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // .tensorflow.serving.Int64Value version = 2; + if (this->has_version()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, _Internal::version(this), target); + } + + // string signature_name = 3; + if (this->signature_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->signature_name().data(), static_cast<int>(this->signature_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.serving.ModelSpec.signature_name"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 3, this->signature_name(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.serving.ModelSpec) + return target; +} + +size_t ModelSpec::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.serving.ModelSpec) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->name()); + } + + // string signature_name = 3; + if (this->signature_name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->signature_name()); + } + + // .tensorflow.serving.Int64Value version = 2; + if (this->has_version()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *version_); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ModelSpec::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.serving.ModelSpec) + GOOGLE_DCHECK_NE(&from, this); + const ModelSpec* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ModelSpec>( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.serving.ModelSpec) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.serving.ModelSpec) + MergeFrom(*source); + } +} + +void ModelSpec::MergeFrom(const ModelSpec& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.serving.ModelSpec) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.name().size() > 0) { + set_name(from.name()); + } + if (from.signature_name().size() > 0) { + set_signature_name(from.signature_name()); + } + if (from.has_version()) { + mutable_version()->::tensorflow::serving::Int64Value::MergeFrom(from.version()); + } +} + +void ModelSpec::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.serving.ModelSpec) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ModelSpec::CopyFrom(const ModelSpec& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.serving.ModelSpec) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ModelSpec::IsInitialized() const { + return true; +} + +void ModelSpec::Swap(ModelSpec* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + ModelSpec* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == nullptr) { + delete temp; + } + } +} +void ModelSpec::UnsafeArenaSwap(ModelSpec* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void ModelSpec::InternalSwap(ModelSpec* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + signature_name_.Swap(&other->signature_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(version_, other->version_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ModelSpec::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace serving +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::tensorflow::serving::Int64Value* Arena::CreateMaybeMessage< ::tensorflow::serving::Int64Value >(Arena* arena) { + return Arena::CreateMessageInternal< ::tensorflow::serving::Int64Value >(arena); +} +template<> PROTOBUF_NOINLINE ::tensorflow::serving::ModelSpec* Arena::CreateMaybeMessage< ::tensorflow::serving::ModelSpec >(Arena* arena) { + return Arena::CreateMessageInternal< ::tensorflow::serving::ModelSpec >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/src/generated/model.pb.h b/src/generated/model.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..b8d3e91504a85b5ee78f61231ec968d27538a9da --- /dev/null +++ b/src/generated/model.pb.h @@ -0,0 +1,657 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: model.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_model_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_model_2eproto + +#include <limits> +#include <string> + +#include <google/protobuf/port_def.inc> +#if PROTOBUF_VERSION < 3008000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/port_undef.inc> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/inlined_string_field.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/unknown_field_set.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_model_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_model_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_model_2eproto; +namespace tensorflow { +namespace serving { +class Int64Value; +class Int64ValueDefaultTypeInternal; +extern Int64ValueDefaultTypeInternal _Int64Value_default_instance_; +class ModelSpec; +class ModelSpecDefaultTypeInternal; +extern ModelSpecDefaultTypeInternal _ModelSpec_default_instance_; +} // namespace serving +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::serving::Int64Value* Arena::CreateMaybeMessage<::tensorflow::serving::Int64Value>(Arena*); +template<> ::tensorflow::serving::ModelSpec* Arena::CreateMaybeMessage<::tensorflow::serving::ModelSpec>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace serving { + +// =================================================================== + +class Int64Value : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.serving.Int64Value) */ { + public: + Int64Value(); + virtual ~Int64Value(); + + Int64Value(const Int64Value& from); + Int64Value(Int64Value&& from) noexcept + : Int64Value() { + *this = ::std::move(from); + } + + inline Int64Value& operator=(const Int64Value& from) { + CopyFrom(from); + return *this; + } + inline Int64Value& operator=(Int64Value&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { + return GetArenaNoVirtual(); + } + inline void* GetMaybeArenaPointer() const final { + return MaybeArenaPtr(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const Int64Value& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Int64Value* internal_default_instance() { + return reinterpret_cast<const Int64Value*>( + &_Int64Value_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + void UnsafeArenaSwap(Int64Value* other); + void Swap(Int64Value* other); + friend void swap(Int64Value& a, Int64Value& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline Int64Value* New() const final { + return CreateMaybeMessage<Int64Value>(nullptr); + } + + Int64Value* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage<Int64Value>(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const Int64Value& from); + void MergeFrom(const Int64Value& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Int64Value* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.serving.Int64Value"; + } + protected: + explicit Int64Value(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_model_2eproto); + return ::descriptor_table_model_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // int64 value = 1; + void clear_value(); + static const int kValueFieldNumber = 1; + ::PROTOBUF_NAMESPACE_ID::int64 value() const; + void set_value(::PROTOBUF_NAMESPACE_ID::int64 value); + + // @@protoc_insertion_point(class_scope:tensorflow.serving.Int64Value) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::int64 value_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_model_2eproto; +}; +// ------------------------------------------------------------------- + +class ModelSpec : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.serving.ModelSpec) */ { + public: + ModelSpec(); + virtual ~ModelSpec(); + + ModelSpec(const ModelSpec& from); + ModelSpec(ModelSpec&& from) noexcept + : ModelSpec() { + *this = ::std::move(from); + } + + inline ModelSpec& operator=(const ModelSpec& from) { + CopyFrom(from); + return *this; + } + inline ModelSpec& operator=(ModelSpec&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { + return GetArenaNoVirtual(); + } + inline void* GetMaybeArenaPointer() const final { + return MaybeArenaPtr(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const ModelSpec& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ModelSpec* internal_default_instance() { + return reinterpret_cast<const ModelSpec*>( + &_ModelSpec_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + void UnsafeArenaSwap(ModelSpec* other); + void Swap(ModelSpec* other); + friend void swap(ModelSpec& a, ModelSpec& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline ModelSpec* New() const final { + return CreateMaybeMessage<ModelSpec>(nullptr); + } + + ModelSpec* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage<ModelSpec>(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const ModelSpec& from); + void MergeFrom(const ModelSpec& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ModelSpec* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.serving.ModelSpec"; + } + protected: + explicit ModelSpec(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_model_2eproto); + return ::descriptor_table_model_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_name( + std::string* name); + + // string signature_name = 3; + void clear_signature_name(); + static const int kSignatureNameFieldNumber = 3; + const std::string& signature_name() const; + void set_signature_name(const std::string& value); + void set_signature_name(std::string&& value); + void set_signature_name(const char* value); + void set_signature_name(const char* value, size_t size); + std::string* mutable_signature_name(); + std::string* release_signature_name(); + void set_allocated_signature_name(std::string* signature_name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_signature_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_signature_name( + std::string* signature_name); + + // .tensorflow.serving.Int64Value version = 2; + bool has_version() const; + void clear_version(); + static const int kVersionFieldNumber = 2; + const ::tensorflow::serving::Int64Value& version() const; + ::tensorflow::serving::Int64Value* release_version(); + ::tensorflow::serving::Int64Value* mutable_version(); + void set_allocated_version(::tensorflow::serving::Int64Value* version); + void unsafe_arena_set_allocated_version( + ::tensorflow::serving::Int64Value* version); + ::tensorflow::serving::Int64Value* unsafe_arena_release_version(); + + // @@protoc_insertion_point(class_scope:tensorflow.serving.ModelSpec) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr signature_name_; + ::tensorflow::serving::Int64Value* version_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_model_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Int64Value + +// int64 value = 1; +inline void Int64Value::clear_value() { + value_ = PROTOBUF_LONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::int64 Int64Value::value() const { + // @@protoc_insertion_point(field_get:tensorflow.serving.Int64Value.value) + return value_; +} +inline void Int64Value::set_value(::PROTOBUF_NAMESPACE_ID::int64 value) { + + value_ = value; + // @@protoc_insertion_point(field_set:tensorflow.serving.Int64Value.value) +} + +// ------------------------------------------------------------------- + +// ModelSpec + +// string name = 1; +inline void ModelSpec::clear_name() { + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const std::string& ModelSpec::name() const { + // @@protoc_insertion_point(field_get:tensorflow.serving.ModelSpec.name) + return name_.Get(); +} +inline void ModelSpec::set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.serving.ModelSpec.name) +} +inline void ModelSpec::set_name(std::string&& value) { + + name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:tensorflow.serving.ModelSpec.name) +} +inline void ModelSpec::set_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.serving.ModelSpec.name) +} +inline void ModelSpec::set_name(const char* value, + size_t size) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.serving.ModelSpec.name) +} +inline std::string* ModelSpec::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.serving.ModelSpec.name) + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline std::string* ModelSpec::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.serving.ModelSpec.name) + + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline void ModelSpec::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.serving.ModelSpec.name) +} +inline std::string* ModelSpec::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.serving.ModelSpec.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void ModelSpec::unsafe_arena_set_allocated_name( + std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + if (name != nullptr) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.serving.ModelSpec.name) +} + +// .tensorflow.serving.Int64Value version = 2; +inline bool ModelSpec::has_version() const { + return this != internal_default_instance() && version_ != nullptr; +} +inline void ModelSpec::clear_version() { + if (GetArenaNoVirtual() == nullptr && version_ != nullptr) { + delete version_; + } + version_ = nullptr; +} +inline const ::tensorflow::serving::Int64Value& ModelSpec::version() const { + const ::tensorflow::serving::Int64Value* p = version_; + // @@protoc_insertion_point(field_get:tensorflow.serving.ModelSpec.version) + return p != nullptr ? *p : *reinterpret_cast<const ::tensorflow::serving::Int64Value*>( + &::tensorflow::serving::_Int64Value_default_instance_); +} +inline ::tensorflow::serving::Int64Value* ModelSpec::release_version() { + // @@protoc_insertion_point(field_release:tensorflow.serving.ModelSpec.version) + + ::tensorflow::serving::Int64Value* temp = version_; + if (GetArenaNoVirtual() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + version_ = nullptr; + return temp; +} +inline ::tensorflow::serving::Int64Value* ModelSpec::unsafe_arena_release_version() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.serving.ModelSpec.version) + + ::tensorflow::serving::Int64Value* temp = version_; + version_ = nullptr; + return temp; +} +inline ::tensorflow::serving::Int64Value* ModelSpec::mutable_version() { + + if (version_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::serving::Int64Value>(GetArenaNoVirtual()); + version_ = p; + } + // @@protoc_insertion_point(field_mutable:tensorflow.serving.ModelSpec.version) + return version_; +} +inline void ModelSpec::set_allocated_version(::tensorflow::serving::Int64Value* version) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete version_; + } + if (version) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(version); + if (message_arena != submessage_arena) { + version = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, version, submessage_arena); + } + + } else { + + } + version_ = version; + // @@protoc_insertion_point(field_set_allocated:tensorflow.serving.ModelSpec.version) +} + +// string signature_name = 3; +inline void ModelSpec::clear_signature_name() { + signature_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const std::string& ModelSpec::signature_name() const { + // @@protoc_insertion_point(field_get:tensorflow.serving.ModelSpec.signature_name) + return signature_name_.Get(); +} +inline void ModelSpec::set_signature_name(const std::string& value) { + + signature_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.serving.ModelSpec.signature_name) +} +inline void ModelSpec::set_signature_name(std::string&& value) { + + signature_name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:tensorflow.serving.ModelSpec.signature_name) +} +inline void ModelSpec::set_signature_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + signature_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.serving.ModelSpec.signature_name) +} +inline void ModelSpec::set_signature_name(const char* value, + size_t size) { + + signature_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.serving.ModelSpec.signature_name) +} +inline std::string* ModelSpec::mutable_signature_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.serving.ModelSpec.signature_name) + return signature_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline std::string* ModelSpec::release_signature_name() { + // @@protoc_insertion_point(field_release:tensorflow.serving.ModelSpec.signature_name) + + return signature_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline void ModelSpec::set_allocated_signature_name(std::string* signature_name) { + if (signature_name != nullptr) { + + } else { + + } + signature_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), signature_name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.serving.ModelSpec.signature_name) +} +inline std::string* ModelSpec::unsafe_arena_release_signature_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.serving.ModelSpec.signature_name) + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + + return signature_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void ModelSpec::unsafe_arena_set_allocated_signature_name( + std::string* signature_name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + if (signature_name != nullptr) { + + } else { + + } + signature_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + signature_name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.serving.ModelSpec.signature_name) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace serving +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_model_2eproto diff --git a/src/generated/predict.grpc.pb.cc b/src/generated/predict.grpc.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..69d8dcb6f8f8943afdcd9377155491bdfab35baa --- /dev/null +++ b/src/generated/predict.grpc.pb.cc @@ -0,0 +1,24 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: predict.proto + +#include "predict.pb.h" +#include "predict.grpc.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/channel_interface.h> +#include <grpcpp/impl/codegen/client_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/rpc_service_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/sync_stream.h> +namespace tensorflow { +namespace serving { + +} // namespace tensorflow +} // namespace serving + diff --git a/src/generated/predict.grpc.pb.h b/src/generated/predict.grpc.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..63640ad9b28a6b13beee3be42d344d819d9e7614 --- /dev/null +++ b/src/generated/predict.grpc.pb.h @@ -0,0 +1,43 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: predict.proto +#ifndef GRPC_predict_2eproto__INCLUDED +#define GRPC_predict_2eproto__INCLUDED + +#include "predict.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_generic_service.h> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/proto_utils.h> +#include <grpcpp/impl/codegen/rpc_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/status.h> +#include <grpcpp/impl/codegen/stub_options.h> +#include <grpcpp/impl/codegen/sync_stream.h> + +namespace grpc_impl { +class CompletionQueue; +class ServerCompletionQueue; +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +template <typename RequestT, typename ResponseT> +class MessageAllocator; +} // namespace experimental +class ServerContext; +} // namespace grpc + +namespace tensorflow { +namespace serving { + +} // namespace serving +} // namespace tensorflow + + +#endif // GRPC_predict_2eproto__INCLUDED diff --git a/src/generated/predict.pb.cc b/src/generated/predict.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..0d7d11e28d42d4da5c4f983ccd180c92fb69a227 --- /dev/null +++ b/src/generated/predict.pb.cc @@ -0,0 +1,1223 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: predict.proto + +#include "predict.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/extension_set.h> +#include <google/protobuf/wire_format_lite.h> +#include <google/protobuf/descriptor.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/reflection_ops.h> +#include <google/protobuf/wire_format.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +extern PROTOBUF_INTERNAL_EXPORT_tensor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TensorProto_tensor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_model_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ModelSpec_model_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_predict_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_PredictRequest_InputsEntry_DoNotUse_predict_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_predict_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_PredictResponse_OutputsEntry_DoNotUse_predict_2eproto; +namespace tensorflow { +namespace serving { +class PredictRequest_InputsEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<PredictRequest_InputsEntry_DoNotUse> _instance; +} _PredictRequest_InputsEntry_DoNotUse_default_instance_; +class PredictRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<PredictRequest> _instance; +} _PredictRequest_default_instance_; +class PredictResponse_OutputsEntry_DoNotUseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<PredictResponse_OutputsEntry_DoNotUse> _instance; +} _PredictResponse_OutputsEntry_DoNotUse_default_instance_; +class PredictResponseDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<PredictResponse> _instance; +} _PredictResponse_default_instance_; +} // namespace serving +} // namespace tensorflow +static void InitDefaultsscc_info_PredictRequest_predict_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::tensorflow::serving::_PredictRequest_default_instance_; + new (ptr) ::tensorflow::serving::PredictRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::tensorflow::serving::PredictRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_PredictRequest_predict_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_PredictRequest_predict_2eproto}, { + &scc_info_ModelSpec_model_2eproto.base, + &scc_info_PredictRequest_InputsEntry_DoNotUse_predict_2eproto.base,}}; + +static void InitDefaultsscc_info_PredictRequest_InputsEntry_DoNotUse_predict_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::tensorflow::serving::_PredictRequest_InputsEntry_DoNotUse_default_instance_; + new (ptr) ::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse(); + } + ::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_PredictRequest_InputsEntry_DoNotUse_predict_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_PredictRequest_InputsEntry_DoNotUse_predict_2eproto}, { + &scc_info_TensorProto_tensor_2eproto.base,}}; + +static void InitDefaultsscc_info_PredictResponse_predict_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::tensorflow::serving::_PredictResponse_default_instance_; + new (ptr) ::tensorflow::serving::PredictResponse(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::tensorflow::serving::PredictResponse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_PredictResponse_predict_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_PredictResponse_predict_2eproto}, { + &scc_info_ModelSpec_model_2eproto.base, + &scc_info_PredictResponse_OutputsEntry_DoNotUse_predict_2eproto.base,}}; + +static void InitDefaultsscc_info_PredictResponse_OutputsEntry_DoNotUse_predict_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::tensorflow::serving::_PredictResponse_OutputsEntry_DoNotUse_default_instance_; + new (ptr) ::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse(); + } + ::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_PredictResponse_OutputsEntry_DoNotUse_predict_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_PredictResponse_OutputsEntry_DoNotUse_predict_2eproto}, { + &scc_info_TensorProto_tensor_2eproto.base,}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_predict_2eproto[4]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_predict_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_predict_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_predict_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictRequest, model_spec_), + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictRequest, inputs_), + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictRequest, output_filter_), + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictResponse, model_spec_), + PROTOBUF_FIELD_OFFSET(::tensorflow::serving::PredictResponse, outputs_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 7, sizeof(::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse)}, + { 9, -1, sizeof(::tensorflow::serving::PredictRequest)}, + { 17, 24, sizeof(::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse)}, + { 26, -1, sizeof(::tensorflow::serving::PredictResponse)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::serving::_PredictRequest_InputsEntry_DoNotUse_default_instance_), + reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::serving::_PredictRequest_default_instance_), + reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::serving::_PredictResponse_OutputsEntry_DoNotUse_default_instance_), + reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::serving::_PredictResponse_default_instance_), +}; + +const char descriptor_table_protodef_predict_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\rpredict.proto\022\022tensorflow.serving\032\014ten" + "sor.proto\032\013model.proto\"\342\001\n\016PredictReques" + "t\0221\n\nmodel_spec\030\001 \001(\0132\035.tensorflow.servi" + "ng.ModelSpec\022>\n\006inputs\030\002 \003(\0132..tensorflo" + "w.serving.PredictRequest.InputsEntry\022\025\n\r" + "output_filter\030\003 \003(\t\032F\n\013InputsEntry\022\013\n\003ke" + "y\030\001 \001(\t\022&\n\005value\030\002 \001(\0132\027.tensorflow.Tens" + "orProto:\0028\001\"\320\001\n\017PredictResponse\0221\n\nmodel" + "_spec\030\002 \001(\0132\035.tensorflow.serving.ModelSp" + "ec\022A\n\007outputs\030\001 \003(\01320.tensorflow.serving" + ".PredictResponse.OutputsEntry\032G\n\014Outputs" + "Entry\022\013\n\003key\030\001 \001(\t\022&\n\005value\030\002 \001(\0132\027.tens" + "orflow.TensorProto:\0028\001B\003\370\001\001b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_predict_2eproto_deps[2] = { + &::descriptor_table_model_2eproto, + &::descriptor_table_tensor_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_predict_2eproto_sccs[4] = { + &scc_info_PredictRequest_predict_2eproto.base, + &scc_info_PredictRequest_InputsEntry_DoNotUse_predict_2eproto.base, + &scc_info_PredictResponse_predict_2eproto.base, + &scc_info_PredictResponse_OutputsEntry_DoNotUse_predict_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_predict_2eproto_once; +static bool descriptor_table_predict_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_predict_2eproto = { + &descriptor_table_predict_2eproto_initialized, descriptor_table_protodef_predict_2eproto, "predict.proto", 515, + &descriptor_table_predict_2eproto_once, descriptor_table_predict_2eproto_sccs, descriptor_table_predict_2eproto_deps, 4, 2, + schemas, file_default_instances, TableStruct_predict_2eproto::offsets, + file_level_metadata_predict_2eproto, 4, file_level_enum_descriptors_predict_2eproto, file_level_service_descriptors_predict_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_predict_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_predict_2eproto), true); +namespace tensorflow { +namespace serving { + +// =================================================================== + +PredictRequest_InputsEntry_DoNotUse::PredictRequest_InputsEntry_DoNotUse() {} +PredictRequest_InputsEntry_DoNotUse::PredictRequest_InputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void PredictRequest_InputsEntry_DoNotUse::MergeFrom(const PredictRequest_InputsEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata PredictRequest_InputsEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void PredictRequest_InputsEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void PredictRequest::InitAsDefaultInstance() { + ::tensorflow::serving::_PredictRequest_default_instance_._instance.get_mutable()->model_spec_ = const_cast< ::tensorflow::serving::ModelSpec*>( + ::tensorflow::serving::ModelSpec::internal_default_instance()); +} +class PredictRequest::_Internal { + public: + static const ::tensorflow::serving::ModelSpec& model_spec(const PredictRequest* msg); +}; + +const ::tensorflow::serving::ModelSpec& +PredictRequest::_Internal::model_spec(const PredictRequest* msg) { + return *msg->model_spec_; +} +void PredictRequest::unsafe_arena_set_allocated_model_spec( + ::tensorflow::serving::ModelSpec* model_spec) { + if (GetArenaNoVirtual() == nullptr) { + delete model_spec_; + } + model_spec_ = model_spec; + if (model_spec) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.serving.PredictRequest.model_spec) +} +void PredictRequest::clear_model_spec() { + if (GetArenaNoVirtual() == nullptr && model_spec_ != nullptr) { + delete model_spec_; + } + model_spec_ = nullptr; +} +void PredictRequest::clear_inputs() { + inputs_.Clear(); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int PredictRequest::kModelSpecFieldNumber; +const int PredictRequest::kInputsFieldNumber; +const int PredictRequest::kOutputFilterFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +PredictRequest::PredictRequest() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.serving.PredictRequest) +} +PredictRequest::PredictRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(arena), + inputs_(arena), + output_filter_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.serving.PredictRequest) +} +PredictRequest::PredictRequest(const PredictRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + output_filter_(from.output_filter_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + inputs_.MergeFrom(from.inputs_); + if (from.has_model_spec()) { + model_spec_ = new ::tensorflow::serving::ModelSpec(*from.model_spec_); + } else { + model_spec_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:tensorflow.serving.PredictRequest) +} + +void PredictRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PredictRequest_predict_2eproto.base); + model_spec_ = nullptr; +} + +PredictRequest::~PredictRequest() { + // @@protoc_insertion_point(destructor:tensorflow.serving.PredictRequest) + SharedDtor(); +} + +void PredictRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + if (this != internal_default_instance()) delete model_spec_; +} + +void PredictRequest::ArenaDtor(void* object) { + PredictRequest* _this = reinterpret_cast< PredictRequest* >(object); + (void)_this; +} +void PredictRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PredictRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const PredictRequest& PredictRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PredictRequest_predict_2eproto.base); + return *internal_default_instance(); +} + + +void PredictRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.serving.PredictRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + inputs_.Clear(); + output_filter_.Clear(); + if (GetArenaNoVirtual() == nullptr && model_spec_ != nullptr) { + delete model_spec_; + } + model_spec_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* PredictRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // .tensorflow.serving.ModelSpec model_spec = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(mutable_model_spec(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // map<string, .tensorflow.TensorProto> inputs = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&inputs_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } else goto handle_unusual; + continue; + // repeated string output_filter = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(add_output_filter(), ptr, ctx, "tensorflow.serving.PredictRequest.output_filter"); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool PredictRequest::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.serving.PredictRequest) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .tensorflow.serving.ModelSpec model_spec = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, mutable_model_spec())); + } else { + goto handle_unusual; + } + break; + } + + // map<string, .tensorflow.TensorProto> inputs = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + PredictRequest_InputsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< + PredictRequest_InputsEntry_DoNotUse, + std::string, ::tensorflow::TensorProto, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, + 0 >, + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto > > parser(&inputs_); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( + input, &parser)); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), static_cast<int>(parser.key().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "tensorflow.serving.PredictRequest.InputsEntry.key")); + } else { + goto handle_unusual; + } + break; + } + + // repeated string output_filter = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->add_output_filter())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->output_filter(this->output_filter_size() - 1).data(), + static_cast<int>(this->output_filter(this->output_filter_size() - 1).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "tensorflow.serving.PredictRequest.output_filter")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.serving.PredictRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.serving.PredictRequest) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void PredictRequest::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.serving.PredictRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .tensorflow.serving.ModelSpec model_spec = 1; + if (this->has_model_spec()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, _Internal::model_spec(this), output); + } + + // map<string, .tensorflow.TensorProto> inputs = 2; + if (!this->inputs().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast<int>(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.serving.PredictRequest.InputsEntry.key"); + } + }; + + if (output->IsSerializationDeterministic() && + this->inputs().size() > 1) { + ::std::unique_ptr<SortItem[]> items( + new SortItem[this->inputs().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_iterator + it = this->inputs().begin(); + it != this->inputs().end(); ++it, ++n) { + items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); + for (size_type i = 0; i < n; i++) { + PredictRequest_InputsEntry_DoNotUse::Funcs::SerializeToCodedStream(2, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output); + Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_iterator + it = this->inputs().begin(); + it != this->inputs().end(); ++it) { + PredictRequest_InputsEntry_DoNotUse::Funcs::SerializeToCodedStream(2, it->first, it->second, output); + Utf8Check::Check(&(*it)); + } + } + } + + // repeated string output_filter = 3; + for (int i = 0, n = this->output_filter_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->output_filter(i).data(), static_cast<int>(this->output_filter(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.serving.PredictRequest.output_filter"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteString( + 3, this->output_filter(i), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:tensorflow.serving.PredictRequest) +} + +::PROTOBUF_NAMESPACE_ID::uint8* PredictRequest::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.serving.PredictRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .tensorflow.serving.ModelSpec model_spec = 1; + if (this->has_model_spec()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 1, _Internal::model_spec(this), target); + } + + // map<string, .tensorflow.TensorProto> inputs = 2; + if (!this->inputs().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast<int>(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.serving.PredictRequest.InputsEntry.key"); + } + }; + + if (false && + this->inputs().size() > 1) { + ::std::unique_ptr<SortItem[]> items( + new SortItem[this->inputs().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_iterator + it = this->inputs().begin(); + it != this->inputs().end(); ++it, ++n) { + items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = PredictRequest_InputsEntry_DoNotUse::Funcs::SerializeToArray(2, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target); + Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_iterator + it = this->inputs().begin(); + it != this->inputs().end(); ++it) { + target = PredictRequest_InputsEntry_DoNotUse::Funcs::SerializeToArray(2, it->first, it->second, target); + Utf8Check::Check(&(*it)); + } + } + } + + // repeated string output_filter = 3; + for (int i = 0, n = this->output_filter_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->output_filter(i).data(), static_cast<int>(this->output_filter(i).length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.serving.PredictRequest.output_filter"); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteStringToArray(3, this->output_filter(i), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.serving.PredictRequest) + return target; +} + +size_t PredictRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.serving.PredictRequest) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map<string, .tensorflow.TensorProto> inputs = 2; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->inputs_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_iterator + it = this->inputs().begin(); + it != this->inputs().end(); ++it) { + total_size += PredictRequest_InputsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // repeated string output_filter = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->output_filter_size()); + for (int i = 0, n = this->output_filter_size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->output_filter(i)); + } + + // .tensorflow.serving.ModelSpec model_spec = 1; + if (this->has_model_spec()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *model_spec_); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void PredictRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.serving.PredictRequest) + GOOGLE_DCHECK_NE(&from, this); + const PredictRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<PredictRequest>( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.serving.PredictRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.serving.PredictRequest) + MergeFrom(*source); + } +} + +void PredictRequest::MergeFrom(const PredictRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.serving.PredictRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + inputs_.MergeFrom(from.inputs_); + output_filter_.MergeFrom(from.output_filter_); + if (from.has_model_spec()) { + mutable_model_spec()->::tensorflow::serving::ModelSpec::MergeFrom(from.model_spec()); + } +} + +void PredictRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.serving.PredictRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void PredictRequest::CopyFrom(const PredictRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.serving.PredictRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PredictRequest::IsInitialized() const { + return true; +} + +void PredictRequest::Swap(PredictRequest* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + PredictRequest* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == nullptr) { + delete temp; + } + } +} +void PredictRequest::UnsafeArenaSwap(PredictRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void PredictRequest::InternalSwap(PredictRequest* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + inputs_.Swap(&other->inputs_); + output_filter_.InternalSwap(CastToBase(&other->output_filter_)); + swap(model_spec_, other->model_spec_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PredictRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +PredictResponse_OutputsEntry_DoNotUse::PredictResponse_OutputsEntry_DoNotUse() {} +PredictResponse_OutputsEntry_DoNotUse::PredictResponse_OutputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void PredictResponse_OutputsEntry_DoNotUse::MergeFrom(const PredictResponse_OutputsEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata PredictResponse_OutputsEntry_DoNotUse::GetMetadata() const { + return GetMetadataStatic(); +} +void PredictResponse_OutputsEntry_DoNotUse::MergeFrom( + const ::PROTOBUF_NAMESPACE_ID::Message& other) { + ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom(other); +} + + +// =================================================================== + +void PredictResponse::InitAsDefaultInstance() { + ::tensorflow::serving::_PredictResponse_default_instance_._instance.get_mutable()->model_spec_ = const_cast< ::tensorflow::serving::ModelSpec*>( + ::tensorflow::serving::ModelSpec::internal_default_instance()); +} +class PredictResponse::_Internal { + public: + static const ::tensorflow::serving::ModelSpec& model_spec(const PredictResponse* msg); +}; + +const ::tensorflow::serving::ModelSpec& +PredictResponse::_Internal::model_spec(const PredictResponse* msg) { + return *msg->model_spec_; +} +void PredictResponse::unsafe_arena_set_allocated_model_spec( + ::tensorflow::serving::ModelSpec* model_spec) { + if (GetArenaNoVirtual() == nullptr) { + delete model_spec_; + } + model_spec_ = model_spec; + if (model_spec) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.serving.PredictResponse.model_spec) +} +void PredictResponse::clear_model_spec() { + if (GetArenaNoVirtual() == nullptr && model_spec_ != nullptr) { + delete model_spec_; + } + model_spec_ = nullptr; +} +void PredictResponse::clear_outputs() { + outputs_.Clear(); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int PredictResponse::kModelSpecFieldNumber; +const int PredictResponse::kOutputsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +PredictResponse::PredictResponse() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.serving.PredictResponse) +} +PredictResponse::PredictResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(arena), + outputs_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.serving.PredictResponse) +} +PredictResponse::PredictResponse(const PredictResponse& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + outputs_.MergeFrom(from.outputs_); + if (from.has_model_spec()) { + model_spec_ = new ::tensorflow::serving::ModelSpec(*from.model_spec_); + } else { + model_spec_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:tensorflow.serving.PredictResponse) +} + +void PredictResponse::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PredictResponse_predict_2eproto.base); + model_spec_ = nullptr; +} + +PredictResponse::~PredictResponse() { + // @@protoc_insertion_point(destructor:tensorflow.serving.PredictResponse) + SharedDtor(); +} + +void PredictResponse::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + if (this != internal_default_instance()) delete model_spec_; +} + +void PredictResponse::ArenaDtor(void* object) { + PredictResponse* _this = reinterpret_cast< PredictResponse* >(object); + (void)_this; +} +void PredictResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void PredictResponse::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const PredictResponse& PredictResponse::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PredictResponse_predict_2eproto.base); + return *internal_default_instance(); +} + + +void PredictResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.serving.PredictResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + outputs_.Clear(); + if (GetArenaNoVirtual() == nullptr && model_spec_ != nullptr) { + delete model_spec_; + } + model_spec_ = nullptr; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* PredictResponse::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // map<string, .tensorflow.TensorProto> outputs = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&outputs_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 10); + } else goto handle_unusual; + continue; + // .tensorflow.serving.ModelSpec model_spec = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(mutable_model_spec(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool PredictResponse::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.serving.PredictResponse) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // map<string, .tensorflow.TensorProto> outputs = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + PredictResponse_OutputsEntry_DoNotUse::Parser< ::PROTOBUF_NAMESPACE_ID::internal::MapField< + PredictResponse_OutputsEntry_DoNotUse, + std::string, ::tensorflow::TensorProto, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, + 0 >, + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto > > parser(&outputs_); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessageNoVirtual( + input, &parser)); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + parser.key().data(), static_cast<int>(parser.key().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "tensorflow.serving.PredictResponse.OutputsEntry.key")); + } else { + goto handle_unusual; + } + break; + } + + // .tensorflow.serving.ModelSpec model_spec = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, mutable_model_spec())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.serving.PredictResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.serving.PredictResponse) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void PredictResponse::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.serving.PredictResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // map<string, .tensorflow.TensorProto> outputs = 1; + if (!this->outputs().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast<int>(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.serving.PredictResponse.OutputsEntry.key"); + } + }; + + if (output->IsSerializationDeterministic() && + this->outputs().size() > 1) { + ::std::unique_ptr<SortItem[]> items( + new SortItem[this->outputs().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_iterator + it = this->outputs().begin(); + it != this->outputs().end(); ++it, ++n) { + items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); + for (size_type i = 0; i < n; i++) { + PredictResponse_OutputsEntry_DoNotUse::Funcs::SerializeToCodedStream(1, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, output); + Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_iterator + it = this->outputs().begin(); + it != this->outputs().end(); ++it) { + PredictResponse_OutputsEntry_DoNotUse::Funcs::SerializeToCodedStream(1, it->first, it->second, output); + Utf8Check::Check(&(*it)); + } + } + } + + // .tensorflow.serving.ModelSpec model_spec = 2; + if (this->has_model_spec()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, _Internal::model_spec(this), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:tensorflow.serving.PredictResponse) +} + +::PROTOBUF_NAMESPACE_ID::uint8* PredictResponse::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.serving.PredictResponse) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // map<string, .tensorflow.TensorProto> outputs = 1; + if (!this->outputs().empty()) { + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_pointer + ConstPtr; + typedef ConstPtr SortItem; + typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less; + struct Utf8Check { + static void Check(ConstPtr p) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + p->first.data(), static_cast<int>(p->first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.serving.PredictResponse.OutputsEntry.key"); + } + }; + + if (false && + this->outputs().size() > 1) { + ::std::unique_ptr<SortItem[]> items( + new SortItem[this->outputs().size()]); + typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::size_type size_type; + size_type n = 0; + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_iterator + it = this->outputs().begin(); + it != this->outputs().end(); ++it, ++n) { + items[static_cast<ptrdiff_t>(n)] = SortItem(&*it); + } + ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less()); + for (size_type i = 0; i < n; i++) { + target = PredictResponse_OutputsEntry_DoNotUse::Funcs::SerializeToArray(1, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target); + Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)])); + } + } else { + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_iterator + it = this->outputs().begin(); + it != this->outputs().end(); ++it) { + target = PredictResponse_OutputsEntry_DoNotUse::Funcs::SerializeToArray(1, it->first, it->second, target); + Utf8Check::Check(&(*it)); + } + } + } + + // .tensorflow.serving.ModelSpec model_spec = 2; + if (this->has_model_spec()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, _Internal::model_spec(this), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.serving.PredictResponse) + return target; +} + +size_t PredictResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.serving.PredictResponse) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // map<string, .tensorflow.TensorProto> outputs = 1; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->outputs_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >::const_iterator + it = this->outputs().begin(); + it != this->outputs().end(); ++it) { + total_size += PredictResponse_OutputsEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // .tensorflow.serving.ModelSpec model_spec = 2; + if (this->has_model_spec()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *model_spec_); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void PredictResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.serving.PredictResponse) + GOOGLE_DCHECK_NE(&from, this); + const PredictResponse* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<PredictResponse>( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.serving.PredictResponse) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.serving.PredictResponse) + MergeFrom(*source); + } +} + +void PredictResponse::MergeFrom(const PredictResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.serving.PredictResponse) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + outputs_.MergeFrom(from.outputs_); + if (from.has_model_spec()) { + mutable_model_spec()->::tensorflow::serving::ModelSpec::MergeFrom(from.model_spec()); + } +} + +void PredictResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.serving.PredictResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void PredictResponse::CopyFrom(const PredictResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.serving.PredictResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PredictResponse::IsInitialized() const { + return true; +} + +void PredictResponse::Swap(PredictResponse* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + PredictResponse* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == nullptr) { + delete temp; + } + } +} +void PredictResponse::UnsafeArenaSwap(PredictResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void PredictResponse::InternalSwap(PredictResponse* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + outputs_.Swap(&other->outputs_); + swap(model_spec_, other->model_spec_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PredictResponse::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace serving +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::tensorflow::serving::PredictRequest* Arena::CreateMaybeMessage< ::tensorflow::serving::PredictRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::tensorflow::serving::PredictRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse* Arena::CreateMaybeMessage< ::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::tensorflow::serving::PredictResponse* Arena::CreateMaybeMessage< ::tensorflow::serving::PredictResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::tensorflow::serving::PredictResponse >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/src/generated/predict.pb.h b/src/generated/predict.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..8d496544c11c33fad4155ed521aef1ea60bc8a98 --- /dev/null +++ b/src/generated/predict.pb.h @@ -0,0 +1,740 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: predict.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_predict_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_predict_2eproto + +#include <limits> +#include <string> + +#include <google/protobuf/port_def.inc> +#if PROTOBUF_VERSION < 3008000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/port_undef.inc> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/inlined_string_field.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/map.h> // IWYU pragma: export +#include <google/protobuf/map_entry.h> +#include <google/protobuf/map_field_inl.h> +#include <google/protobuf/unknown_field_set.h> +#include "tensor.pb.h" +#include "model.pb.h" +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_predict_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_predict_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[4] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_predict_2eproto; +namespace tensorflow { +namespace serving { +class PredictRequest; +class PredictRequestDefaultTypeInternal; +extern PredictRequestDefaultTypeInternal _PredictRequest_default_instance_; +class PredictRequest_InputsEntry_DoNotUse; +class PredictRequest_InputsEntry_DoNotUseDefaultTypeInternal; +extern PredictRequest_InputsEntry_DoNotUseDefaultTypeInternal _PredictRequest_InputsEntry_DoNotUse_default_instance_; +class PredictResponse; +class PredictResponseDefaultTypeInternal; +extern PredictResponseDefaultTypeInternal _PredictResponse_default_instance_; +class PredictResponse_OutputsEntry_DoNotUse; +class PredictResponse_OutputsEntry_DoNotUseDefaultTypeInternal; +extern PredictResponse_OutputsEntry_DoNotUseDefaultTypeInternal _PredictResponse_OutputsEntry_DoNotUse_default_instance_; +} // namespace serving +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::serving::PredictRequest* Arena::CreateMaybeMessage<::tensorflow::serving::PredictRequest>(Arena*); +template<> ::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::serving::PredictRequest_InputsEntry_DoNotUse>(Arena*); +template<> ::tensorflow::serving::PredictResponse* Arena::CreateMaybeMessage<::tensorflow::serving::PredictResponse>(Arena*); +template<> ::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse* Arena::CreateMaybeMessage<::tensorflow::serving::PredictResponse_OutputsEntry_DoNotUse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace serving { + +// =================================================================== + +class PredictRequest_InputsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<PredictRequest_InputsEntry_DoNotUse, + std::string, ::tensorflow::TensorProto, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, + 0 > { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<PredictRequest_InputsEntry_DoNotUse, + std::string, ::tensorflow::TensorProto, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, + 0 > SuperType; + PredictRequest_InputsEntry_DoNotUse(); + PredictRequest_InputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const PredictRequest_InputsEntry_DoNotUse& other); + static const PredictRequest_InputsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast<const PredictRequest_InputsEntry_DoNotUse*>(&_PredictRequest_InputsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), s->size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.serving.PredictRequest.InputsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_predict_2eproto); + return ::descriptor_table_predict_2eproto.file_level_metadata[0]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class PredictRequest : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.serving.PredictRequest) */ { + public: + PredictRequest(); + virtual ~PredictRequest(); + + PredictRequest(const PredictRequest& from); + PredictRequest(PredictRequest&& from) noexcept + : PredictRequest() { + *this = ::std::move(from); + } + + inline PredictRequest& operator=(const PredictRequest& from) { + CopyFrom(from); + return *this; + } + inline PredictRequest& operator=(PredictRequest&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { + return GetArenaNoVirtual(); + } + inline void* GetMaybeArenaPointer() const final { + return MaybeArenaPtr(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const PredictRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const PredictRequest* internal_default_instance() { + return reinterpret_cast<const PredictRequest*>( + &_PredictRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + void UnsafeArenaSwap(PredictRequest* other); + void Swap(PredictRequest* other); + friend void swap(PredictRequest& a, PredictRequest& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline PredictRequest* New() const final { + return CreateMaybeMessage<PredictRequest>(nullptr); + } + + PredictRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage<PredictRequest>(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const PredictRequest& from); + void MergeFrom(const PredictRequest& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PredictRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.serving.PredictRequest"; + } + protected: + explicit PredictRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_predict_2eproto); + return ::descriptor_table_predict_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + // map<string, .tensorflow.TensorProto> inputs = 2; + int inputs_size() const; + void clear_inputs(); + static const int kInputsFieldNumber = 2; + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >& + inputs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >* + mutable_inputs(); + + // repeated string output_filter = 3; + int output_filter_size() const; + void clear_output_filter(); + static const int kOutputFilterFieldNumber = 3; + const std::string& output_filter(int index) const; + std::string* mutable_output_filter(int index); + void set_output_filter(int index, const std::string& value); + void set_output_filter(int index, std::string&& value); + void set_output_filter(int index, const char* value); + void set_output_filter(int index, const char* value, size_t size); + std::string* add_output_filter(); + void add_output_filter(const std::string& value); + void add_output_filter(std::string&& value); + void add_output_filter(const char* value); + void add_output_filter(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& output_filter() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_output_filter(); + + // .tensorflow.serving.ModelSpec model_spec = 1; + bool has_model_spec() const; + void clear_model_spec(); + static const int kModelSpecFieldNumber = 1; + const ::tensorflow::serving::ModelSpec& model_spec() const; + ::tensorflow::serving::ModelSpec* release_model_spec(); + ::tensorflow::serving::ModelSpec* mutable_model_spec(); + void set_allocated_model_spec(::tensorflow::serving::ModelSpec* model_spec); + void unsafe_arena_set_allocated_model_spec( + ::tensorflow::serving::ModelSpec* model_spec); + ::tensorflow::serving::ModelSpec* unsafe_arena_release_model_spec(); + + // @@protoc_insertion_point(class_scope:tensorflow.serving.PredictRequest) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + PredictRequest_InputsEntry_DoNotUse, + std::string, ::tensorflow::TensorProto, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, + 0 > inputs_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> output_filter_; + ::tensorflow::serving::ModelSpec* model_spec_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_predict_2eproto; +}; +// ------------------------------------------------------------------- + +class PredictResponse_OutputsEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<PredictResponse_OutputsEntry_DoNotUse, + std::string, ::tensorflow::TensorProto, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, + 0 > { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry<PredictResponse_OutputsEntry_DoNotUse, + std::string, ::tensorflow::TensorProto, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, + 0 > SuperType; + PredictResponse_OutputsEntry_DoNotUse(); + PredictResponse_OutputsEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const PredictResponse_OutputsEntry_DoNotUse& other); + static const PredictResponse_OutputsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast<const PredictResponse_OutputsEntry_DoNotUse*>(&_PredictResponse_OutputsEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), s->size(), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "tensorflow.serving.PredictResponse.OutputsEntry.key"); + } + static bool ValidateValue(void*) { return true; } + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& other) final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_predict_2eproto); + return ::descriptor_table_predict_2eproto.file_level_metadata[2]; + } + + public: +}; + +// ------------------------------------------------------------------- + +class PredictResponse : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.serving.PredictResponse) */ { + public: + PredictResponse(); + virtual ~PredictResponse(); + + PredictResponse(const PredictResponse& from); + PredictResponse(PredictResponse&& from) noexcept + : PredictResponse() { + *this = ::std::move(from); + } + + inline PredictResponse& operator=(const PredictResponse& from) { + CopyFrom(from); + return *this; + } + inline PredictResponse& operator=(PredictResponse&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { + return GetArenaNoVirtual(); + } + inline void* GetMaybeArenaPointer() const final { + return MaybeArenaPtr(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const PredictResponse& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const PredictResponse* internal_default_instance() { + return reinterpret_cast<const PredictResponse*>( + &_PredictResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + void UnsafeArenaSwap(PredictResponse* other); + void Swap(PredictResponse* other); + friend void swap(PredictResponse& a, PredictResponse& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline PredictResponse* New() const final { + return CreateMaybeMessage<PredictResponse>(nullptr); + } + + PredictResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage<PredictResponse>(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const PredictResponse& from); + void MergeFrom(const PredictResponse& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PredictResponse* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.serving.PredictResponse"; + } + protected: + explicit PredictResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_predict_2eproto); + return ::descriptor_table_predict_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + // map<string, .tensorflow.TensorProto> outputs = 1; + int outputs_size() const; + void clear_outputs(); + static const int kOutputsFieldNumber = 1; + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >& + outputs() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >* + mutable_outputs(); + + // .tensorflow.serving.ModelSpec model_spec = 2; + bool has_model_spec() const; + void clear_model_spec(); + static const int kModelSpecFieldNumber = 2; + const ::tensorflow::serving::ModelSpec& model_spec() const; + ::tensorflow::serving::ModelSpec* release_model_spec(); + ::tensorflow::serving::ModelSpec* mutable_model_spec(); + void set_allocated_model_spec(::tensorflow::serving::ModelSpec* model_spec); + void unsafe_arena_set_allocated_model_spec( + ::tensorflow::serving::ModelSpec* model_spec); + ::tensorflow::serving::ModelSpec* unsafe_arena_release_model_spec(); + + // @@protoc_insertion_point(class_scope:tensorflow.serving.PredictResponse) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + PredictResponse_OutputsEntry_DoNotUse, + std::string, ::tensorflow::TensorProto, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE, + 0 > outputs_; + ::tensorflow::serving::ModelSpec* model_spec_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_predict_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// PredictRequest + +// .tensorflow.serving.ModelSpec model_spec = 1; +inline bool PredictRequest::has_model_spec() const { + return this != internal_default_instance() && model_spec_ != nullptr; +} +inline const ::tensorflow::serving::ModelSpec& PredictRequest::model_spec() const { + const ::tensorflow::serving::ModelSpec* p = model_spec_; + // @@protoc_insertion_point(field_get:tensorflow.serving.PredictRequest.model_spec) + return p != nullptr ? *p : *reinterpret_cast<const ::tensorflow::serving::ModelSpec*>( + &::tensorflow::serving::_ModelSpec_default_instance_); +} +inline ::tensorflow::serving::ModelSpec* PredictRequest::release_model_spec() { + // @@protoc_insertion_point(field_release:tensorflow.serving.PredictRequest.model_spec) + + ::tensorflow::serving::ModelSpec* temp = model_spec_; + if (GetArenaNoVirtual() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + model_spec_ = nullptr; + return temp; +} +inline ::tensorflow::serving::ModelSpec* PredictRequest::unsafe_arena_release_model_spec() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.serving.PredictRequest.model_spec) + + ::tensorflow::serving::ModelSpec* temp = model_spec_; + model_spec_ = nullptr; + return temp; +} +inline ::tensorflow::serving::ModelSpec* PredictRequest::mutable_model_spec() { + + if (model_spec_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::serving::ModelSpec>(GetArenaNoVirtual()); + model_spec_ = p; + } + // @@protoc_insertion_point(field_mutable:tensorflow.serving.PredictRequest.model_spec) + return model_spec_; +} +inline void PredictRequest::set_allocated_model_spec(::tensorflow::serving::ModelSpec* model_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(model_spec_); + } + if (model_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(model_spec)->GetArena(); + if (message_arena != submessage_arena) { + model_spec = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, model_spec, submessage_arena); + } + + } else { + + } + model_spec_ = model_spec; + // @@protoc_insertion_point(field_set_allocated:tensorflow.serving.PredictRequest.model_spec) +} + +// map<string, .tensorflow.TensorProto> inputs = 2; +inline int PredictRequest::inputs_size() const { + return inputs_.size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >& +PredictRequest::inputs() const { + // @@protoc_insertion_point(field_map:tensorflow.serving.PredictRequest.inputs) + return inputs_.GetMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >* +PredictRequest::mutable_inputs() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.serving.PredictRequest.inputs) + return inputs_.MutableMap(); +} + +// repeated string output_filter = 3; +inline int PredictRequest::output_filter_size() const { + return output_filter_.size(); +} +inline void PredictRequest::clear_output_filter() { + output_filter_.Clear(); +} +inline const std::string& PredictRequest::output_filter(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.serving.PredictRequest.output_filter) + return output_filter_.Get(index); +} +inline std::string* PredictRequest::mutable_output_filter(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.serving.PredictRequest.output_filter) + return output_filter_.Mutable(index); +} +inline void PredictRequest::set_output_filter(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.serving.PredictRequest.output_filter) + output_filter_.Mutable(index)->assign(value); +} +inline void PredictRequest::set_output_filter(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:tensorflow.serving.PredictRequest.output_filter) + output_filter_.Mutable(index)->assign(std::move(value)); +} +inline void PredictRequest::set_output_filter(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + output_filter_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.serving.PredictRequest.output_filter) +} +inline void PredictRequest::set_output_filter(int index, const char* value, size_t size) { + output_filter_.Mutable(index)->assign( + reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.serving.PredictRequest.output_filter) +} +inline std::string* PredictRequest::add_output_filter() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.serving.PredictRequest.output_filter) + return output_filter_.Add(); +} +inline void PredictRequest::add_output_filter(const std::string& value) { + output_filter_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.serving.PredictRequest.output_filter) +} +inline void PredictRequest::add_output_filter(std::string&& value) { + output_filter_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.serving.PredictRequest.output_filter) +} +inline void PredictRequest::add_output_filter(const char* value) { + GOOGLE_DCHECK(value != nullptr); + output_filter_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.serving.PredictRequest.output_filter) +} +inline void PredictRequest::add_output_filter(const char* value, size_t size) { + output_filter_.Add()->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.serving.PredictRequest.output_filter) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& +PredictRequest::output_filter() const { + // @@protoc_insertion_point(field_list:tensorflow.serving.PredictRequest.output_filter) + return output_filter_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* +PredictRequest::mutable_output_filter() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.serving.PredictRequest.output_filter) + return &output_filter_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// PredictResponse + +// .tensorflow.serving.ModelSpec model_spec = 2; +inline bool PredictResponse::has_model_spec() const { + return this != internal_default_instance() && model_spec_ != nullptr; +} +inline const ::tensorflow::serving::ModelSpec& PredictResponse::model_spec() const { + const ::tensorflow::serving::ModelSpec* p = model_spec_; + // @@protoc_insertion_point(field_get:tensorflow.serving.PredictResponse.model_spec) + return p != nullptr ? *p : *reinterpret_cast<const ::tensorflow::serving::ModelSpec*>( + &::tensorflow::serving::_ModelSpec_default_instance_); +} +inline ::tensorflow::serving::ModelSpec* PredictResponse::release_model_spec() { + // @@protoc_insertion_point(field_release:tensorflow.serving.PredictResponse.model_spec) + + ::tensorflow::serving::ModelSpec* temp = model_spec_; + if (GetArenaNoVirtual() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + model_spec_ = nullptr; + return temp; +} +inline ::tensorflow::serving::ModelSpec* PredictResponse::unsafe_arena_release_model_spec() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.serving.PredictResponse.model_spec) + + ::tensorflow::serving::ModelSpec* temp = model_spec_; + model_spec_ = nullptr; + return temp; +} +inline ::tensorflow::serving::ModelSpec* PredictResponse::mutable_model_spec() { + + if (model_spec_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::serving::ModelSpec>(GetArenaNoVirtual()); + model_spec_ = p; + } + // @@protoc_insertion_point(field_mutable:tensorflow.serving.PredictResponse.model_spec) + return model_spec_; +} +inline void PredictResponse::set_allocated_model_spec(::tensorflow::serving::ModelSpec* model_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(model_spec_); + } + if (model_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(model_spec)->GetArena(); + if (message_arena != submessage_arena) { + model_spec = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, model_spec, submessage_arena); + } + + } else { + + } + model_spec_ = model_spec; + // @@protoc_insertion_point(field_set_allocated:tensorflow.serving.PredictResponse.model_spec) +} + +// map<string, .tensorflow.TensorProto> outputs = 1; +inline int PredictResponse::outputs_size() const { + return outputs_.size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >& +PredictResponse::outputs() const { + // @@protoc_insertion_point(field_map:tensorflow.serving.PredictResponse.outputs) + return outputs_.GetMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::tensorflow::TensorProto >* +PredictResponse::mutable_outputs() { + // @@protoc_insertion_point(field_mutable_map:tensorflow.serving.PredictResponse.outputs) + return outputs_.MutableMap(); +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace serving +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_predict_2eproto diff --git a/src/generated/prediction_service.grpc.pb.cc b/src/generated/prediction_service.grpc.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..28e2e2ec94e9b5a7c54e4126c9dfa18bc103ca12 --- /dev/null +++ b/src/generated/prediction_service.grpc.pb.cc @@ -0,0 +1,85 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: prediction_service.proto + +#include "prediction_service.pb.h" +#include "prediction_service.grpc.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/channel_interface.h> +#include <grpcpp/impl/codegen/client_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/rpc_service_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/sync_stream.h> +namespace tensorflow { +namespace serving { + +static const char* PredictionService_method_names[] = { + "/tensorflow.serving.PredictionService/Predict", +}; + +std::unique_ptr< PredictionService::Stub> PredictionService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< PredictionService::Stub> stub(new PredictionService::Stub(channel)); + return stub; +} + +PredictionService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_Predict_(PredictionService_method_names[0], ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status PredictionService::Stub::Predict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::tensorflow::serving::PredictResponse* response) { + return ::grpc::internal::BlockingUnaryCall(channel_.get(), rpcmethod_Predict_, context, request, response); +} + +void PredictionService::Stub::experimental_async::Predict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response, std::function<void(::grpc::Status)> f) { + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Predict_, context, request, response, std::move(f)); +} + +void PredictionService::Stub::experimental_async::Predict(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::serving::PredictResponse* response, std::function<void(::grpc::Status)> f) { + ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_Predict_, context, request, response, std::move(f)); +} + +void PredictionService::Stub::experimental_async::Predict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Predict_, context, request, response, reactor); +} + +void PredictionService::Stub::experimental_async::Predict(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::serving::PredictResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_Predict_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::tensorflow::serving::PredictResponse>* PredictionService::Stub::AsyncPredictRaw(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::tensorflow::serving::PredictResponse>::Create(channel_.get(), cq, rpcmethod_Predict_, context, request, true); +} + +::grpc::ClientAsyncResponseReader< ::tensorflow::serving::PredictResponse>* PredictionService::Stub::PrepareAsyncPredictRaw(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderFactory< ::tensorflow::serving::PredictResponse>::Create(channel_.get(), cq, rpcmethod_Predict_, context, request, false); +} + +PredictionService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + PredictionService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< PredictionService::Service, ::tensorflow::serving::PredictRequest, ::tensorflow::serving::PredictResponse>( + std::mem_fn(&PredictionService::Service::Predict), this))); +} + +PredictionService::Service::~Service() { +} + +::grpc::Status PredictionService::Service::Predict(::grpc::ServerContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace tensorflow +} // namespace serving + diff --git a/src/generated/prediction_service.grpc.pb.h b/src/generated/prediction_service.grpc.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..07e1181e69fd9e0d2c04a137bc118612df48f934 --- /dev/null +++ b/src/generated/prediction_service.grpc.pb.h @@ -0,0 +1,257 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: prediction_service.proto +#ifndef GRPC_prediction_5fservice_2eproto__INCLUDED +#define GRPC_prediction_5fservice_2eproto__INCLUDED + +#include "prediction_service.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_generic_service.h> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/proto_utils.h> +#include <grpcpp/impl/codegen/rpc_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/status.h> +#include <grpcpp/impl/codegen/stub_options.h> +#include <grpcpp/impl/codegen/sync_stream.h> + +namespace grpc_impl { +class CompletionQueue; +class ServerCompletionQueue; +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +template <typename RequestT, typename ResponseT> +class MessageAllocator; +} // namespace experimental +class ServerContext; +} // namespace grpc + +namespace tensorflow { +namespace serving { + +// open source marker; do not remove +// PredictionService provides access to machine-learned models loaded by +// model_servers. +class PredictionService final { + public: + static constexpr char const* service_full_name() { + return "tensorflow.serving.PredictionService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + // Predict -- provides access to loaded TensorFlow model. + virtual ::grpc::Status Predict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::tensorflow::serving::PredictResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::serving::PredictResponse>> AsyncPredict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::serving::PredictResponse>>(AsyncPredictRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::serving::PredictResponse>> PrepareAsyncPredict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::serving::PredictResponse>>(PrepareAsyncPredictRaw(context, request, cq)); + } + class experimental_async_interface { + public: + virtual ~experimental_async_interface() {} + // Predict -- provides access to loaded TensorFlow model. + virtual void Predict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response, std::function<void(::grpc::Status)>) = 0; + virtual void Predict(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::serving::PredictResponse* response, std::function<void(::grpc::Status)>) = 0; + virtual void Predict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void Predict(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::serving::PredictResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + }; + virtual class experimental_async_interface* experimental_async() { return nullptr; } + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::serving::PredictResponse>* AsyncPredictRaw(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::serving::PredictResponse>* PrepareAsyncPredictRaw(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::grpc::CompletionQueue* cq) = 0; + }; + class Stub final : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + ::grpc::Status Predict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::tensorflow::serving::PredictResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::serving::PredictResponse>> AsyncPredict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::serving::PredictResponse>>(AsyncPredictRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::serving::PredictResponse>> PrepareAsyncPredict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::serving::PredictResponse>>(PrepareAsyncPredictRaw(context, request, cq)); + } + class experimental_async final : + public StubInterface::experimental_async_interface { + public: + void Predict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response, std::function<void(::grpc::Status)>) override; + void Predict(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::serving::PredictResponse* response, std::function<void(::grpc::Status)>) override; + void Predict(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void Predict(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::serving::PredictResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + private: + friend class Stub; + explicit experimental_async(Stub* stub): stub_(stub) { } + Stub* stub() { return stub_; } + Stub* stub_; + }; + class experimental_async_interface* experimental_async() override { return &async_stub_; } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + class experimental_async async_stub_{this}; + ::grpc::ClientAsyncResponseReader< ::tensorflow::serving::PredictResponse>* AsyncPredictRaw(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::tensorflow::serving::PredictResponse>* PrepareAsyncPredictRaw(::grpc::ClientContext* context, const ::tensorflow::serving::PredictRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_Predict_; + }; + static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // Predict -- provides access to loaded TensorFlow model. + virtual ::grpc::Status Predict(::grpc::ServerContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response); + }; + template <class BaseClass> + class WithAsyncMethod_Predict : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_Predict() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_Predict() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Predict(::grpc::ServerContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPredict(::grpc::ServerContext* context, ::tensorflow::serving::PredictRequest* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::serving::PredictResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_Predict<Service > AsyncService; + template <class BaseClass> + class ExperimentalWithCallbackMethod_Predict : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithCallbackMethod_Predict() { + ::grpc::Service::experimental().MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::tensorflow::serving::PredictRequest, ::tensorflow::serving::PredictResponse>( + [this](::grpc::ServerContext* context, + const ::tensorflow::serving::PredictRequest* request, + ::tensorflow::serving::PredictResponse* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + return this->Predict(context, request, response, controller); + })); + } + void SetMessageAllocatorFor_Predict( + ::grpc::experimental::MessageAllocator< ::tensorflow::serving::PredictRequest, ::tensorflow::serving::PredictResponse>* allocator) { + static_cast<::grpc::internal::CallbackUnaryHandler< ::tensorflow::serving::PredictRequest, ::tensorflow::serving::PredictResponse>*>( + ::grpc::Service::experimental().GetHandler(0)) + ->SetMessageAllocator(allocator); + } + ~ExperimentalWithCallbackMethod_Predict() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Predict(::grpc::ServerContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void Predict(::grpc::ServerContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + typedef ExperimentalWithCallbackMethod_Predict<Service > ExperimentalCallbackService; + template <class BaseClass> + class WithGenericMethod_Predict : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_Predict() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_Predict() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Predict(::grpc::ServerContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template <class BaseClass> + class WithRawMethod_Predict : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithRawMethod_Predict() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_Predict() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Predict(::grpc::ServerContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPredict(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template <class BaseClass> + class ExperimentalWithRawCallbackMethod_Predict : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + ExperimentalWithRawCallbackMethod_Predict() { + ::grpc::Service::experimental().MarkMethodRawCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this](::grpc::ServerContext* context, + const ::grpc::ByteBuffer* request, + ::grpc::ByteBuffer* response, + ::grpc::experimental::ServerCallbackRpcController* controller) { + this->Predict(context, request, response, controller); + })); + } + ~ExperimentalWithRawCallbackMethod_Predict() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status Predict(::grpc::ServerContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual void Predict(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + }; + template <class BaseClass> + class WithStreamedUnaryMethod_Predict : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithStreamedUnaryMethod_Predict() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::serving::PredictRequest, ::tensorflow::serving::PredictResponse>(std::bind(&WithStreamedUnaryMethod_Predict<BaseClass>::StreamedPredict, this, std::placeholders::_1, std::placeholders::_2))); + } + ~WithStreamedUnaryMethod_Predict() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status Predict(::grpc::ServerContext* context, const ::tensorflow::serving::PredictRequest* request, ::tensorflow::serving::PredictResponse* response) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedPredict(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::serving::PredictRequest,::tensorflow::serving::PredictResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_Predict<Service > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_Predict<Service > StreamedService; +}; + +} // namespace serving +} // namespace tensorflow + + +#endif // GRPC_prediction_5fservice_2eproto__INCLUDED diff --git a/src/generated/prediction_service.pb.cc b/src/generated/prediction_service.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..f5ace3e74917086cbb95ebb893bcb3c0161e012e --- /dev/null +++ b/src/generated/prediction_service.pb.cc @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: prediction_service.proto + +#include "prediction_service.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/extension_set.h> +#include <google/protobuf/wire_format_lite.h> +#include <google/protobuf/descriptor.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/reflection_ops.h> +#include <google/protobuf/wire_format.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +namespace tensorflow { +namespace serving { +} // namespace serving +} // namespace tensorflow +static constexpr ::PROTOBUF_NAMESPACE_ID::Metadata* file_level_metadata_prediction_5fservice_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_prediction_5fservice_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_prediction_5fservice_2eproto = nullptr; +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_prediction_5fservice_2eproto::offsets[1] = {}; +static constexpr ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema* schemas = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::Message* const* file_default_instances = nullptr; + +const char descriptor_table_protodef_prediction_5fservice_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\030prediction_service.proto\022\022tensorflow.s" + "erving\032\rpredict.proto2g\n\021PredictionServi" + "ce\022R\n\007Predict\022\".tensorflow.serving.Predi" + "ctRequest\032#.tensorflow.serving.PredictRe" + "sponseB\006\200\001\000\370\001\001b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_prediction_5fservice_2eproto_deps[1] = { + &::descriptor_table_predict_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_prediction_5fservice_2eproto_sccs[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_prediction_5fservice_2eproto_once; +static bool descriptor_table_prediction_5fservice_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_prediction_5fservice_2eproto = { + &descriptor_table_prediction_5fservice_2eproto_initialized, descriptor_table_protodef_prediction_5fservice_2eproto, "prediction_service.proto", 182, + &descriptor_table_prediction_5fservice_2eproto_once, descriptor_table_prediction_5fservice_2eproto_sccs, descriptor_table_prediction_5fservice_2eproto_deps, 0, 1, + schemas, file_default_instances, TableStruct_prediction_5fservice_2eproto::offsets, + file_level_metadata_prediction_5fservice_2eproto, 0, file_level_enum_descriptors_prediction_5fservice_2eproto, file_level_service_descriptors_prediction_5fservice_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_prediction_5fservice_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_prediction_5fservice_2eproto), true); +namespace tensorflow { +namespace serving { + +// @@protoc_insertion_point(namespace_scope) +} // namespace serving +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/src/generated/prediction_service.pb.h b/src/generated/prediction_service.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..f905b4e444b23abf3426aff773bb95db6df4fc9c --- /dev/null +++ b/src/generated/prediction_service.pb.h @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: prediction_service.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_prediction_5fservice_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_prediction_5fservice_2eproto + +#include <limits> +#include <string> + +#include <google/protobuf/port_def.inc> +#if PROTOBUF_VERSION < 3008000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/port_undef.inc> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/inlined_string_field.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include "predict.pb.h" +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_prediction_5fservice_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_prediction_5fservice_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_prediction_5fservice_2eproto; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { +namespace serving { + +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace serving +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_prediction_5fservice_2eproto diff --git a/src/generated/resource_handle.grpc.pb.cc b/src/generated/resource_handle.grpc.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..13becb0045133e8444b23d46ebfc1c910bca2c23 --- /dev/null +++ b/src/generated/resource_handle.grpc.pb.cc @@ -0,0 +1,22 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: resource_handle.proto + +#include "resource_handle.pb.h" +#include "resource_handle.grpc.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/channel_interface.h> +#include <grpcpp/impl/codegen/client_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/rpc_service_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/sync_stream.h> +namespace tensorflow { + +} // namespace tensorflow + diff --git a/src/generated/resource_handle.grpc.pb.h b/src/generated/resource_handle.grpc.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..f7215df8926a7c7f291ac0565801cc1caa8c100b --- /dev/null +++ b/src/generated/resource_handle.grpc.pb.h @@ -0,0 +1,41 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: resource_handle.proto +#ifndef GRPC_resource_5fhandle_2eproto__INCLUDED +#define GRPC_resource_5fhandle_2eproto__INCLUDED + +#include "resource_handle.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_generic_service.h> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/proto_utils.h> +#include <grpcpp/impl/codegen/rpc_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/status.h> +#include <grpcpp/impl/codegen/stub_options.h> +#include <grpcpp/impl/codegen/sync_stream.h> + +namespace grpc_impl { +class CompletionQueue; +class ServerCompletionQueue; +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +template <typename RequestT, typename ResponseT> +class MessageAllocator; +} // namespace experimental +class ServerContext; +} // namespace grpc + +namespace tensorflow { + +} // namespace tensorflow + + +#endif // GRPC_resource_5fhandle_2eproto__INCLUDED diff --git a/src/generated/resource_handle.pb.cc b/src/generated/resource_handle.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..2970816451df89a6ec02e63e1a19bdad1a098ac1 --- /dev/null +++ b/src/generated/resource_handle.pb.cc @@ -0,0 +1,642 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: resource_handle.proto + +#include "resource_handle.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/extension_set.h> +#include <google/protobuf/wire_format_lite.h> +#include <google/protobuf/descriptor.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/reflection_ops.h> +#include <google/protobuf/wire_format.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +namespace tensorflow { +class ResourceHandleProtoDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ResourceHandleProto> _instance; +} _ResourceHandleProto_default_instance_; +} // namespace tensorflow +static void InitDefaultsscc_info_ResourceHandleProto_resource_5fhandle_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::tensorflow::_ResourceHandleProto_default_instance_; + new (ptr) ::tensorflow::ResourceHandleProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::tensorflow::ResourceHandleProto::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ResourceHandleProto_resource_5fhandle_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_ResourceHandleProto_resource_5fhandle_2eproto}, {}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_resource_5fhandle_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_resource_5fhandle_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_resource_5fhandle_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_resource_5fhandle_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::tensorflow::ResourceHandleProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::tensorflow::ResourceHandleProto, device_), + PROTOBUF_FIELD_OFFSET(::tensorflow::ResourceHandleProto, container_), + PROTOBUF_FIELD_OFFSET(::tensorflow::ResourceHandleProto, name_), + PROTOBUF_FIELD_OFFSET(::tensorflow::ResourceHandleProto, hash_code_), + PROTOBUF_FIELD_OFFSET(::tensorflow::ResourceHandleProto, maybe_type_name_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::tensorflow::ResourceHandleProto)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_ResourceHandleProto_default_instance_), +}; + +const char descriptor_table_protodef_resource_5fhandle_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\025resource_handle.proto\022\ntensorflow\"r\n\023R" + "esourceHandleProto\022\016\n\006device\030\001 \001(\t\022\021\n\tco" + "ntainer\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\021\n\thash_code" + "\030\004 \001(\004\022\027\n\017maybe_type_name\030\005 \001(\tBn\n\030org.t" + "ensorflow.frameworkB\016ResourceHandleP\001Z=g" + "ithub.com/tensorflow/tensorflow/tensorfl" + "ow/go/core/framework\370\001\001b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_resource_5fhandle_2eproto_deps[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_resource_5fhandle_2eproto_sccs[1] = { + &scc_info_ResourceHandleProto_resource_5fhandle_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_resource_5fhandle_2eproto_once; +static bool descriptor_table_resource_5fhandle_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_resource_5fhandle_2eproto = { + &descriptor_table_resource_5fhandle_2eproto_initialized, descriptor_table_protodef_resource_5fhandle_2eproto, "resource_handle.proto", 271, + &descriptor_table_resource_5fhandle_2eproto_once, descriptor_table_resource_5fhandle_2eproto_sccs, descriptor_table_resource_5fhandle_2eproto_deps, 1, 0, + schemas, file_default_instances, TableStruct_resource_5fhandle_2eproto::offsets, + file_level_metadata_resource_5fhandle_2eproto, 1, file_level_enum_descriptors_resource_5fhandle_2eproto, file_level_service_descriptors_resource_5fhandle_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_resource_5fhandle_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_resource_5fhandle_2eproto), true); +namespace tensorflow { + +// =================================================================== + +void ResourceHandleProto::InitAsDefaultInstance() { +} +class ResourceHandleProto::_Internal { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ResourceHandleProto::kDeviceFieldNumber; +const int ResourceHandleProto::kContainerFieldNumber; +const int ResourceHandleProto::kNameFieldNumber; +const int ResourceHandleProto::kHashCodeFieldNumber; +const int ResourceHandleProto::kMaybeTypeNameFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ResourceHandleProto::ResourceHandleProto() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.ResourceHandleProto) +} +ResourceHandleProto::ResourceHandleProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.ResourceHandleProto) +} +ResourceHandleProto::ResourceHandleProto(const ResourceHandleProto& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.device().empty()) { + device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.device(), + GetArenaNoVirtual()); + } + container_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.container().empty()) { + container_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.container(), + GetArenaNoVirtual()); + } + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), + GetArenaNoVirtual()); + } + maybe_type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.maybe_type_name().empty()) { + maybe_type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.maybe_type_name(), + GetArenaNoVirtual()); + } + hash_code_ = from.hash_code_; + // @@protoc_insertion_point(copy_constructor:tensorflow.ResourceHandleProto) +} + +void ResourceHandleProto::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ResourceHandleProto_resource_5fhandle_2eproto.base); + device_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + container_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + maybe_type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + hash_code_ = PROTOBUF_ULONGLONG(0); +} + +ResourceHandleProto::~ResourceHandleProto() { + // @@protoc_insertion_point(destructor:tensorflow.ResourceHandleProto) + SharedDtor(); +} + +void ResourceHandleProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + device_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + container_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + maybe_type_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void ResourceHandleProto::ArenaDtor(void* object) { + ResourceHandleProto* _this = reinterpret_cast< ResourceHandleProto* >(object); + (void)_this; +} +void ResourceHandleProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void ResourceHandleProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const ResourceHandleProto& ResourceHandleProto::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ResourceHandleProto_resource_5fhandle_2eproto.base); + return *internal_default_instance(); +} + + +void ResourceHandleProto::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.ResourceHandleProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + device_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + container_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + maybe_type_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + hash_code_ = PROTOBUF_ULONGLONG(0); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* ResourceHandleProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string device = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_device(), ptr, ctx, "tensorflow.ResourceHandleProto.device"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string container = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_container(), ptr, ctx, "tensorflow.ResourceHandleProto.container"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string name = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.ResourceHandleProto.name"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // uint64 hash_code = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + hash_code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string maybe_type_name = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_maybe_type_name(), ptr, ctx, "tensorflow.ResourceHandleProto.maybe_type_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool ResourceHandleProto::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.ResourceHandleProto) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string device = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_device())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->device().data(), static_cast<int>(this->device().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "tensorflow.ResourceHandleProto.device")); + } else { + goto handle_unusual; + } + break; + } + + // string container = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_container())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->container().data(), static_cast<int>(this->container().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "tensorflow.ResourceHandleProto.container")); + } else { + goto handle_unusual; + } + break; + } + + // string name = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "tensorflow.ResourceHandleProto.name")); + } else { + goto handle_unusual; + } + break; + } + + // uint64 hash_code = 4; + case 4: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (32 & 0xFF)) { + + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( + input, &hash_code_))); + } else { + goto handle_unusual; + } + break; + } + + // string maybe_type_name = 5; + case 5: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_maybe_type_name())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->maybe_type_name().data(), static_cast<int>(this->maybe_type_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "tensorflow.ResourceHandleProto.maybe_type_name")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.ResourceHandleProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.ResourceHandleProto) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void ResourceHandleProto::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.ResourceHandleProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string device = 1; + if (this->device().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->device().data(), static_cast<int>(this->device().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.ResourceHandleProto.device"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->device(), output); + } + + // string container = 2; + if (this->container().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->container().data(), static_cast<int>(this->container().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.ResourceHandleProto.container"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->container(), output); + } + + // string name = 3; + if (this->name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.ResourceHandleProto.name"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->name(), output); + } + + // uint64 hash_code = 4; + if (this->hash_code() != 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64(4, this->hash_code(), output); + } + + // string maybe_type_name = 5; + if (this->maybe_type_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->maybe_type_name().data(), static_cast<int>(this->maybe_type_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.ResourceHandleProto.maybe_type_name"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 5, this->maybe_type_name(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:tensorflow.ResourceHandleProto) +} + +::PROTOBUF_NAMESPACE_ID::uint8* ResourceHandleProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.ResourceHandleProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string device = 1; + if (this->device().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->device().data(), static_cast<int>(this->device().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.ResourceHandleProto.device"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 1, this->device(), target); + } + + // string container = 2; + if (this->container().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->container().data(), static_cast<int>(this->container().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.ResourceHandleProto.container"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 2, this->container(), target); + } + + // string name = 3; + if (this->name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.ResourceHandleProto.name"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 3, this->name(), target); + } + + // uint64 hash_code = 4; + if (this->hash_code() != 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(4, this->hash_code(), target); + } + + // string maybe_type_name = 5; + if (this->maybe_type_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->maybe_type_name().data(), static_cast<int>(this->maybe_type_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.ResourceHandleProto.maybe_type_name"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 5, this->maybe_type_name(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.ResourceHandleProto) + return target; +} + +size_t ResourceHandleProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.ResourceHandleProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string device = 1; + if (this->device().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->device()); + } + + // string container = 2; + if (this->container().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->container()); + } + + // string name = 3; + if (this->name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->name()); + } + + // string maybe_type_name = 5; + if (this->maybe_type_name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->maybe_type_name()); + } + + // uint64 hash_code = 4; + if (this->hash_code() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size( + this->hash_code()); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void ResourceHandleProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.ResourceHandleProto) + GOOGLE_DCHECK_NE(&from, this); + const ResourceHandleProto* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ResourceHandleProto>( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.ResourceHandleProto) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.ResourceHandleProto) + MergeFrom(*source); + } +} + +void ResourceHandleProto::MergeFrom(const ResourceHandleProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.ResourceHandleProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.device().size() > 0) { + set_device(from.device()); + } + if (from.container().size() > 0) { + set_container(from.container()); + } + if (from.name().size() > 0) { + set_name(from.name()); + } + if (from.maybe_type_name().size() > 0) { + set_maybe_type_name(from.maybe_type_name()); + } + if (from.hash_code() != 0) { + set_hash_code(from.hash_code()); + } +} + +void ResourceHandleProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.ResourceHandleProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ResourceHandleProto::CopyFrom(const ResourceHandleProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.ResourceHandleProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ResourceHandleProto::IsInitialized() const { + return true; +} + +void ResourceHandleProto::Swap(ResourceHandleProto* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + ResourceHandleProto* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == nullptr) { + delete temp; + } + } +} +void ResourceHandleProto::UnsafeArenaSwap(ResourceHandleProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void ResourceHandleProto::InternalSwap(ResourceHandleProto* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + device_.Swap(&other->device_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + container_.Swap(&other->container_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + maybe_type_name_.Swap(&other->maybe_type_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(hash_code_, other->hash_code_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ResourceHandleProto::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::tensorflow::ResourceHandleProto* Arena::CreateMaybeMessage< ::tensorflow::ResourceHandleProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::tensorflow::ResourceHandleProto >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/src/generated/resource_handle.pb.h b/src/generated/resource_handle.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..b01348a0b926a4dbec4c3da85f23d605a39780a3 --- /dev/null +++ b/src/generated/resource_handle.pb.h @@ -0,0 +1,624 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: resource_handle.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_resource_5fhandle_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_resource_5fhandle_2eproto + +#include <limits> +#include <string> + +#include <google/protobuf/port_def.inc> +#if PROTOBUF_VERSION < 3008000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/port_undef.inc> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/inlined_string_field.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/unknown_field_set.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_resource_5fhandle_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_resource_5fhandle_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_resource_5fhandle_2eproto; +namespace tensorflow { +class ResourceHandleProto; +class ResourceHandleProtoDefaultTypeInternal; +extern ResourceHandleProtoDefaultTypeInternal _ResourceHandleProto_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::ResourceHandleProto* Arena::CreateMaybeMessage<::tensorflow::ResourceHandleProto>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class ResourceHandleProto : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.ResourceHandleProto) */ { + public: + ResourceHandleProto(); + virtual ~ResourceHandleProto(); + + ResourceHandleProto(const ResourceHandleProto& from); + ResourceHandleProto(ResourceHandleProto&& from) noexcept + : ResourceHandleProto() { + *this = ::std::move(from); + } + + inline ResourceHandleProto& operator=(const ResourceHandleProto& from) { + CopyFrom(from); + return *this; + } + inline ResourceHandleProto& operator=(ResourceHandleProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { + return GetArenaNoVirtual(); + } + inline void* GetMaybeArenaPointer() const final { + return MaybeArenaPtr(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const ResourceHandleProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const ResourceHandleProto* internal_default_instance() { + return reinterpret_cast<const ResourceHandleProto*>( + &_ResourceHandleProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + void UnsafeArenaSwap(ResourceHandleProto* other); + void Swap(ResourceHandleProto* other); + friend void swap(ResourceHandleProto& a, ResourceHandleProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline ResourceHandleProto* New() const final { + return CreateMaybeMessage<ResourceHandleProto>(nullptr); + } + + ResourceHandleProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage<ResourceHandleProto>(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const ResourceHandleProto& from); + void MergeFrom(const ResourceHandleProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ResourceHandleProto* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.ResourceHandleProto"; + } + protected: + explicit ResourceHandleProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_resource_5fhandle_2eproto); + return ::descriptor_table_resource_5fhandle_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string device = 1; + void clear_device(); + static const int kDeviceFieldNumber = 1; + const std::string& device() const; + void set_device(const std::string& value); + void set_device(std::string&& value); + void set_device(const char* value); + void set_device(const char* value, size_t size); + std::string* mutable_device(); + std::string* release_device(); + void set_allocated_device(std::string* device); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_device(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_device( + std::string* device); + + // string container = 2; + void clear_container(); + static const int kContainerFieldNumber = 2; + const std::string& container() const; + void set_container(const std::string& value); + void set_container(std::string&& value); + void set_container(const char* value); + void set_container(const char* value, size_t size); + std::string* mutable_container(); + std::string* release_container(); + void set_allocated_container(std::string* container); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_container(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_container( + std::string* container); + + // string name = 3; + void clear_name(); + static const int kNameFieldNumber = 3; + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_name( + std::string* name); + + // string maybe_type_name = 5; + void clear_maybe_type_name(); + static const int kMaybeTypeNameFieldNumber = 5; + const std::string& maybe_type_name() const; + void set_maybe_type_name(const std::string& value); + void set_maybe_type_name(std::string&& value); + void set_maybe_type_name(const char* value); + void set_maybe_type_name(const char* value, size_t size); + std::string* mutable_maybe_type_name(); + std::string* release_maybe_type_name(); + void set_allocated_maybe_type_name(std::string* maybe_type_name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_maybe_type_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_maybe_type_name( + std::string* maybe_type_name); + + // uint64 hash_code = 4; + void clear_hash_code(); + static const int kHashCodeFieldNumber = 4; + ::PROTOBUF_NAMESPACE_ID::uint64 hash_code() const; + void set_hash_code(::PROTOBUF_NAMESPACE_ID::uint64 value); + + // @@protoc_insertion_point(class_scope:tensorflow.ResourceHandleProto) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr container_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr maybe_type_name_; + ::PROTOBUF_NAMESPACE_ID::uint64 hash_code_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_resource_5fhandle_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ResourceHandleProto + +// string device = 1; +inline void ResourceHandleProto::clear_device() { + device_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const std::string& ResourceHandleProto::device() const { + // @@protoc_insertion_point(field_get:tensorflow.ResourceHandleProto.device) + return device_.Get(); +} +inline void ResourceHandleProto::set_device(const std::string& value) { + + device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.ResourceHandleProto.device) +} +inline void ResourceHandleProto::set_device(std::string&& value) { + + device_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:tensorflow.ResourceHandleProto.device) +} +inline void ResourceHandleProto::set_device(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.ResourceHandleProto.device) +} +inline void ResourceHandleProto::set_device(const char* value, + size_t size) { + + device_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.ResourceHandleProto.device) +} +inline std::string* ResourceHandleProto::mutable_device() { + + // @@protoc_insertion_point(field_mutable:tensorflow.ResourceHandleProto.device) + return device_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline std::string* ResourceHandleProto::release_device() { + // @@protoc_insertion_point(field_release:tensorflow.ResourceHandleProto.device) + + return device_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline void ResourceHandleProto::set_allocated_device(std::string* device) { + if (device != nullptr) { + + } else { + + } + device_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), device, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.ResourceHandleProto.device) +} +inline std::string* ResourceHandleProto::unsafe_arena_release_device() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ResourceHandleProto.device) + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + + return device_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void ResourceHandleProto::unsafe_arena_set_allocated_device( + std::string* device) { + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + if (device != nullptr) { + + } else { + + } + device_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + device, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ResourceHandleProto.device) +} + +// string container = 2; +inline void ResourceHandleProto::clear_container() { + container_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const std::string& ResourceHandleProto::container() const { + // @@protoc_insertion_point(field_get:tensorflow.ResourceHandleProto.container) + return container_.Get(); +} +inline void ResourceHandleProto::set_container(const std::string& value) { + + container_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.ResourceHandleProto.container) +} +inline void ResourceHandleProto::set_container(std::string&& value) { + + container_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:tensorflow.ResourceHandleProto.container) +} +inline void ResourceHandleProto::set_container(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + container_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.ResourceHandleProto.container) +} +inline void ResourceHandleProto::set_container(const char* value, + size_t size) { + + container_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.ResourceHandleProto.container) +} +inline std::string* ResourceHandleProto::mutable_container() { + + // @@protoc_insertion_point(field_mutable:tensorflow.ResourceHandleProto.container) + return container_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline std::string* ResourceHandleProto::release_container() { + // @@protoc_insertion_point(field_release:tensorflow.ResourceHandleProto.container) + + return container_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline void ResourceHandleProto::set_allocated_container(std::string* container) { + if (container != nullptr) { + + } else { + + } + container_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), container, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.ResourceHandleProto.container) +} +inline std::string* ResourceHandleProto::unsafe_arena_release_container() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ResourceHandleProto.container) + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + + return container_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void ResourceHandleProto::unsafe_arena_set_allocated_container( + std::string* container) { + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + if (container != nullptr) { + + } else { + + } + container_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + container, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ResourceHandleProto.container) +} + +// string name = 3; +inline void ResourceHandleProto::clear_name() { + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const std::string& ResourceHandleProto::name() const { + // @@protoc_insertion_point(field_get:tensorflow.ResourceHandleProto.name) + return name_.Get(); +} +inline void ResourceHandleProto::set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.ResourceHandleProto.name) +} +inline void ResourceHandleProto::set_name(std::string&& value) { + + name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:tensorflow.ResourceHandleProto.name) +} +inline void ResourceHandleProto::set_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.ResourceHandleProto.name) +} +inline void ResourceHandleProto::set_name(const char* value, + size_t size) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.ResourceHandleProto.name) +} +inline std::string* ResourceHandleProto::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.ResourceHandleProto.name) + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline std::string* ResourceHandleProto::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.ResourceHandleProto.name) + + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline void ResourceHandleProto::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.ResourceHandleProto.name) +} +inline std::string* ResourceHandleProto::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ResourceHandleProto.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void ResourceHandleProto::unsafe_arena_set_allocated_name( + std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + if (name != nullptr) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ResourceHandleProto.name) +} + +// uint64 hash_code = 4; +inline void ResourceHandleProto::clear_hash_code() { + hash_code_ = PROTOBUF_ULONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 ResourceHandleProto::hash_code() const { + // @@protoc_insertion_point(field_get:tensorflow.ResourceHandleProto.hash_code) + return hash_code_; +} +inline void ResourceHandleProto::set_hash_code(::PROTOBUF_NAMESPACE_ID::uint64 value) { + + hash_code_ = value; + // @@protoc_insertion_point(field_set:tensorflow.ResourceHandleProto.hash_code) +} + +// string maybe_type_name = 5; +inline void ResourceHandleProto::clear_maybe_type_name() { + maybe_type_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const std::string& ResourceHandleProto::maybe_type_name() const { + // @@protoc_insertion_point(field_get:tensorflow.ResourceHandleProto.maybe_type_name) + return maybe_type_name_.Get(); +} +inline void ResourceHandleProto::set_maybe_type_name(const std::string& value) { + + maybe_type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.ResourceHandleProto.maybe_type_name) +} +inline void ResourceHandleProto::set_maybe_type_name(std::string&& value) { + + maybe_type_name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:tensorflow.ResourceHandleProto.maybe_type_name) +} +inline void ResourceHandleProto::set_maybe_type_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + maybe_type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.ResourceHandleProto.maybe_type_name) +} +inline void ResourceHandleProto::set_maybe_type_name(const char* value, + size_t size) { + + maybe_type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.ResourceHandleProto.maybe_type_name) +} +inline std::string* ResourceHandleProto::mutable_maybe_type_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.ResourceHandleProto.maybe_type_name) + return maybe_type_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline std::string* ResourceHandleProto::release_maybe_type_name() { + // @@protoc_insertion_point(field_release:tensorflow.ResourceHandleProto.maybe_type_name) + + return maybe_type_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline void ResourceHandleProto::set_allocated_maybe_type_name(std::string* maybe_type_name) { + if (maybe_type_name != nullptr) { + + } else { + + } + maybe_type_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), maybe_type_name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.ResourceHandleProto.maybe_type_name) +} +inline std::string* ResourceHandleProto::unsafe_arena_release_maybe_type_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.ResourceHandleProto.maybe_type_name) + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + + return maybe_type_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void ResourceHandleProto::unsafe_arena_set_allocated_maybe_type_name( + std::string* maybe_type_name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + if (maybe_type_name != nullptr) { + + } else { + + } + maybe_type_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + maybe_type_name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.ResourceHandleProto.maybe_type_name) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_resource_5fhandle_2eproto diff --git a/src/generated/tensor.grpc.pb.cc b/src/generated/tensor.grpc.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..45bd02ebd47171e6d5c670c66a2d201347d5f2cb --- /dev/null +++ b/src/generated/tensor.grpc.pb.cc @@ -0,0 +1,22 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: tensor.proto + +#include "tensor.pb.h" +#include "tensor.grpc.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/channel_interface.h> +#include <grpcpp/impl/codegen/client_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/rpc_service_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/sync_stream.h> +namespace tensorflow { + +} // namespace tensorflow + diff --git a/src/generated/tensor.grpc.pb.h b/src/generated/tensor.grpc.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..9040638aef4ae8d72b2ec15b658c4d3de8e20b99 --- /dev/null +++ b/src/generated/tensor.grpc.pb.h @@ -0,0 +1,41 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: tensor.proto +#ifndef GRPC_tensor_2eproto__INCLUDED +#define GRPC_tensor_2eproto__INCLUDED + +#include "tensor.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_generic_service.h> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/proto_utils.h> +#include <grpcpp/impl/codegen/rpc_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/status.h> +#include <grpcpp/impl/codegen/stub_options.h> +#include <grpcpp/impl/codegen/sync_stream.h> + +namespace grpc_impl { +class CompletionQueue; +class ServerCompletionQueue; +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +template <typename RequestT, typename ResponseT> +class MessageAllocator; +} // namespace experimental +class ServerContext; +} // namespace grpc + +namespace tensorflow { + +} // namespace tensorflow + + +#endif // GRPC_tensor_2eproto__INCLUDED diff --git a/src/generated/tensor.pb.cc b/src/generated/tensor.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..e3b5bc05bd79e5b9e03055c51d6e11a232e2f6c7 --- /dev/null +++ b/src/generated/tensor.pb.cc @@ -0,0 +1,1907 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensor.proto + +#include "tensor.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/extension_set.h> +#include <google/protobuf/wire_format_lite.h> +#include <google/protobuf/descriptor.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/reflection_ops.h> +#include <google/protobuf/wire_format.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +extern PROTOBUF_INTERNAL_EXPORT_resource_5fhandle_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ResourceHandleProto_resource_5fhandle_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_tensor_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TensorProto_tensor_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_tensor_5fshape_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TensorShapeProto_tensor_5fshape_2eproto; +namespace tensorflow { +class TensorProtoDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TensorProto> _instance; +} _TensorProto_default_instance_; +class VariantTensorDataProtoDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<VariantTensorDataProto> _instance; +} _VariantTensorDataProto_default_instance_; +} // namespace tensorflow +static void InitDefaultsscc_info_TensorProto_tensor_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::tensorflow::_TensorProto_default_instance_; + new (ptr) ::tensorflow::TensorProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + { + void* ptr = &::tensorflow::_VariantTensorDataProto_default_instance_; + new (ptr) ::tensorflow::VariantTensorDataProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::tensorflow::TensorProto::InitAsDefaultInstance(); + ::tensorflow::VariantTensorDataProto::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_TensorProto_tensor_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsscc_info_TensorProto_tensor_2eproto}, { + &scc_info_TensorShapeProto_tensor_5fshape_2eproto.base, + &scc_info_ResourceHandleProto_resource_5fhandle_2eproto.base,}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensor_2eproto[2]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensor_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensor_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensor_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, dtype_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, tensor_shape_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, version_number_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, tensor_content_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, half_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, float_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, double_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, int_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, string_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, scomplex_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, int64_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, bool_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, dcomplex_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, resource_handle_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, variant_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, uint32_val_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorProto, uint64_val_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::tensorflow::VariantTensorDataProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::tensorflow::VariantTensorDataProto, type_name_), + PROTOBUF_FIELD_OFFSET(::tensorflow::VariantTensorDataProto, metadata_), + PROTOBUF_FIELD_OFFSET(::tensorflow::VariantTensorDataProto, tensors_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::tensorflow::TensorProto)}, + { 22, -1, sizeof(::tensorflow::VariantTensorDataProto)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_TensorProto_default_instance_), + reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_VariantTensorDataProto_default_instance_), +}; + +const char descriptor_table_protodef_tensor_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\014tensor.proto\022\ntensorflow\032\025resource_han" + "dle.proto\032\022tensor_shape.proto\032\013types.pro" + "to\"\214\004\n\013TensorProto\022#\n\005dtype\030\001 \001(\0162\024.tens" + "orflow.DataType\0222\n\014tensor_shape\030\002 \001(\0132\034." + "tensorflow.TensorShapeProto\022\026\n\016version_n" + "umber\030\003 \001(\005\022\026\n\016tensor_content\030\004 \001(\014\022\024\n\010h" + "alf_val\030\r \003(\005B\002\020\001\022\025\n\tfloat_val\030\005 \003(\002B\002\020\001" + "\022\026\n\ndouble_val\030\006 \003(\001B\002\020\001\022\023\n\007int_val\030\007 \003(" + "\005B\002\020\001\022\022\n\nstring_val\030\010 \003(\014\022\030\n\014scomplex_va" + "l\030\t \003(\002B\002\020\001\022\025\n\tint64_val\030\n \003(\003B\002\020\001\022\024\n\010bo" + "ol_val\030\013 \003(\010B\002\020\001\022\030\n\014dcomplex_val\030\014 \003(\001B\002" + "\020\001\022<\n\023resource_handle_val\030\016 \003(\0132\037.tensor" + "flow.ResourceHandleProto\0227\n\013variant_val\030" + "\017 \003(\0132\".tensorflow.VariantTensorDataProt" + "o\022\026\n\nuint32_val\030\020 \003(\rB\002\020\001\022\026\n\nuint64_val\030" + "\021 \003(\004B\002\020\001\"g\n\026VariantTensorDataProto\022\021\n\tt" + "ype_name\030\001 \001(\t\022\020\n\010metadata\030\002 \001(\014\022(\n\007tens" + "ors\030\003 \003(\0132\027.tensorflow.TensorProtoBl\n\030or" + "g.tensorflow.frameworkB\014TensorProtosP\001Z=" + "github.com/tensorflow/tensorflow/tensorf" + "low/go/core/framework\370\001\001b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensor_2eproto_deps[3] = { + &::descriptor_table_resource_5fhandle_2eproto, + &::descriptor_table_tensor_5fshape_2eproto, + &::descriptor_table_types_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensor_2eproto_sccs[1] = { + &scc_info_TensorProto_tensor_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensor_2eproto_once; +static bool descriptor_table_tensor_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensor_2eproto = { + &descriptor_table_tensor_2eproto_initialized, descriptor_table_protodef_tensor_2eproto, "tensor.proto", 832, + &descriptor_table_tensor_2eproto_once, descriptor_table_tensor_2eproto_sccs, descriptor_table_tensor_2eproto_deps, 1, 3, + schemas, file_default_instances, TableStruct_tensor_2eproto::offsets, + file_level_metadata_tensor_2eproto, 2, file_level_enum_descriptors_tensor_2eproto, file_level_service_descriptors_tensor_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_tensor_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensor_2eproto), true); +namespace tensorflow { + +// =================================================================== + +void TensorProto::InitAsDefaultInstance() { + ::tensorflow::_TensorProto_default_instance_._instance.get_mutable()->tensor_shape_ = const_cast< ::tensorflow::TensorShapeProto*>( + ::tensorflow::TensorShapeProto::internal_default_instance()); +} +class TensorProto::_Internal { + public: + static const ::tensorflow::TensorShapeProto& tensor_shape(const TensorProto* msg); +}; + +const ::tensorflow::TensorShapeProto& +TensorProto::_Internal::tensor_shape(const TensorProto* msg) { + return *msg->tensor_shape_; +} +void TensorProto::unsafe_arena_set_allocated_tensor_shape( + ::tensorflow::TensorShapeProto* tensor_shape) { + if (GetArenaNoVirtual() == nullptr) { + delete tensor_shape_; + } + tensor_shape_ = tensor_shape; + if (tensor_shape) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorProto.tensor_shape) +} +void TensorProto::clear_tensor_shape() { + if (GetArenaNoVirtual() == nullptr && tensor_shape_ != nullptr) { + delete tensor_shape_; + } + tensor_shape_ = nullptr; +} +void TensorProto::clear_resource_handle_val() { + resource_handle_val_.Clear(); +} +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TensorProto::kDtypeFieldNumber; +const int TensorProto::kTensorShapeFieldNumber; +const int TensorProto::kVersionNumberFieldNumber; +const int TensorProto::kTensorContentFieldNumber; +const int TensorProto::kHalfValFieldNumber; +const int TensorProto::kFloatValFieldNumber; +const int TensorProto::kDoubleValFieldNumber; +const int TensorProto::kIntValFieldNumber; +const int TensorProto::kStringValFieldNumber; +const int TensorProto::kScomplexValFieldNumber; +const int TensorProto::kInt64ValFieldNumber; +const int TensorProto::kBoolValFieldNumber; +const int TensorProto::kDcomplexValFieldNumber; +const int TensorProto::kResourceHandleValFieldNumber; +const int TensorProto::kVariantValFieldNumber; +const int TensorProto::kUint32ValFieldNumber; +const int TensorProto::kUint64ValFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TensorProto::TensorProto() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.TensorProto) +} +TensorProto::TensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(arena), + float_val_(arena), + double_val_(arena), + int_val_(arena), + string_val_(arena), + scomplex_val_(arena), + int64_val_(arena), + bool_val_(arena), + dcomplex_val_(arena), + half_val_(arena), + resource_handle_val_(arena), + variant_val_(arena), + uint32_val_(arena), + uint64_val_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.TensorProto) +} +TensorProto::TensorProto(const TensorProto& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + float_val_(from.float_val_), + double_val_(from.double_val_), + int_val_(from.int_val_), + string_val_(from.string_val_), + scomplex_val_(from.scomplex_val_), + int64_val_(from.int64_val_), + bool_val_(from.bool_val_), + dcomplex_val_(from.dcomplex_val_), + half_val_(from.half_val_), + resource_handle_val_(from.resource_handle_val_), + variant_val_(from.variant_val_), + uint32_val_(from.uint32_val_), + uint64_val_(from.uint64_val_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + tensor_content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.tensor_content().empty()) { + tensor_content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.tensor_content(), + GetArenaNoVirtual()); + } + if (from.has_tensor_shape()) { + tensor_shape_ = new ::tensorflow::TensorShapeProto(*from.tensor_shape_); + } else { + tensor_shape_ = nullptr; + } + ::memcpy(&dtype_, &from.dtype_, + static_cast<size_t>(reinterpret_cast<char*>(&version_number_) - + reinterpret_cast<char*>(&dtype_)) + sizeof(version_number_)); + // @@protoc_insertion_point(copy_constructor:tensorflow.TensorProto) +} + +void TensorProto::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TensorProto_tensor_2eproto.base); + tensor_content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + ::memset(&tensor_shape_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&version_number_) - + reinterpret_cast<char*>(&tensor_shape_)) + sizeof(version_number_)); +} + +TensorProto::~TensorProto() { + // @@protoc_insertion_point(destructor:tensorflow.TensorProto) + SharedDtor(); +} + +void TensorProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + tensor_content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (this != internal_default_instance()) delete tensor_shape_; +} + +void TensorProto::ArenaDtor(void* object) { + TensorProto* _this = reinterpret_cast< TensorProto* >(object); + (void)_this; +} +void TensorProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void TensorProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const TensorProto& TensorProto::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TensorProto_tensor_2eproto.base); + return *internal_default_instance(); +} + + +void TensorProto::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.TensorProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + float_val_.Clear(); + double_val_.Clear(); + int_val_.Clear(); + string_val_.Clear(); + scomplex_val_.Clear(); + int64_val_.Clear(); + bool_val_.Clear(); + dcomplex_val_.Clear(); + half_val_.Clear(); + resource_handle_val_.Clear(); + variant_val_.Clear(); + uint32_val_.Clear(); + uint64_val_.Clear(); + tensor_content_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + if (GetArenaNoVirtual() == nullptr && tensor_shape_ != nullptr) { + delete tensor_shape_; + } + tensor_shape_ = nullptr; + ::memset(&dtype_, 0, static_cast<size_t>( + reinterpret_cast<char*>(&version_number_) - + reinterpret_cast<char*>(&dtype_)) + sizeof(version_number_)); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* TensorProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // .tensorflow.DataType dtype = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + set_dtype(static_cast<::tensorflow::DataType>(val)); + } else goto handle_unusual; + continue; + // .tensorflow.TensorShapeProto tensor_shape = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(mutable_tensor_shape(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // int32 version_number = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + version_number_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes tensor_content = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_tensor_content(), ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated float float_val = 5 [packed = true]; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(mutable_float_val(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 45) { + add_float_val(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr)); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // repeated double double_val = 6 [packed = true]; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(mutable_double_val(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 49) { + add_double_val(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr)); + ptr += sizeof(double); + } else goto handle_unusual; + continue; + // repeated int32 int_val = 7 [packed = true]; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_int_val(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56) { + add_int_val(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated bytes string_val = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { + ptr -= 1; + do { + ptr += 1; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(add_string_val(), ptr, ctx); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 66); + } else goto handle_unusual; + continue; + // repeated float scomplex_val = 9 [packed = true]; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 74)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(mutable_scomplex_val(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 77) { + add_scomplex_val(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr)); + ptr += sizeof(float); + } else goto handle_unusual; + continue; + // repeated int64 int64_val = 10 [packed = true]; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 82)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(mutable_int64_val(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 80) { + add_int64_val(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated bool bool_val = 11 [packed = true]; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 90)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedBoolParser(mutable_bool_val(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 88) { + add_bool_val(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated double dcomplex_val = 12 [packed = true]; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 98)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(mutable_dcomplex_val(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 97) { + add_dcomplex_val(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr)); + ptr += sizeof(double); + } else goto handle_unusual; + continue; + // repeated int32 half_val = 13 [packed = true]; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 106)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(mutable_half_val(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 104) { + add_half_val(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 114)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_resource_handle_val(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 114); + } else goto handle_unusual; + continue; + // repeated .tensorflow.VariantTensorDataProto variant_val = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_variant_val(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 122); + } else goto handle_unusual; + continue; + // repeated uint32 uint32_val = 16 [packed = true]; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 130)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(mutable_uint32_val(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 128) { + add_uint32_val(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated uint64 uint64_val = 17 [packed = true]; + case 17: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 138)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt64Parser(mutable_uint64_val(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 136) { + add_uint64_val(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool TensorProto::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.TensorProto) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // .tensorflow.DataType dtype = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { + int value = 0; + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + int, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_ENUM>( + input, &value))); + set_dtype(static_cast< ::tensorflow::DataType >(value)); + } else { + goto handle_unusual; + } + break; + } + + // .tensorflow.TensorShapeProto tensor_shape = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, mutable_tensor_shape())); + } else { + goto handle_unusual; + } + break; + } + + // int32 version_number = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { + + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( + input, &version_number_))); + } else { + goto handle_unusual; + } + break; + } + + // bytes tensor_content = 4; + case 4: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (34 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( + input, this->mutable_tensor_content())); + } else { + goto handle_unusual; + } + break; + } + + // repeated float float_val = 5 [packed = true]; + case 5: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (42 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + float, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_FLOAT>( + input, this->mutable_float_val()))); + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (45 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + float, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_FLOAT>( + 1, 42u, input, this->mutable_float_val()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated double double_val = 6 [packed = true]; + case 6: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (50 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( + input, this->mutable_double_val()))); + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (49 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( + 1, 50u, input, this->mutable_double_val()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated int32 int_val = 7 [packed = true]; + case 7: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (58 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_int_val()))); + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (56 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( + 1, 58u, input, this->mutable_int_val()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated bytes string_val = 8; + case 8: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (66 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( + input, this->add_string_val())); + } else { + goto handle_unusual; + } + break; + } + + // repeated float scomplex_val = 9 [packed = true]; + case 9: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (74 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + float, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_FLOAT>( + input, this->mutable_scomplex_val()))); + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (77 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + float, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_FLOAT>( + 1, 74u, input, this->mutable_scomplex_val()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated int64 int64_val = 10 [packed = true]; + case 10: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (82 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( + input, this->mutable_int64_val()))); + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (80 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( + 1, 82u, input, this->mutable_int64_val()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated bool bool_val = 11 [packed = true]; + case 11: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (90 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( + input, this->mutable_bool_val()))); + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (88 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( + 1, 90u, input, this->mutable_bool_val()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated double dcomplex_val = 12 [packed = true]; + case 12: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (98 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( + input, this->mutable_dcomplex_val()))); + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (97 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + double, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_DOUBLE>( + 1, 98u, input, this->mutable_dcomplex_val()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated int32 half_val = 13 [packed = true]; + case 13: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (106 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_half_val()))); + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (104 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>( + 1, 106u, input, this->mutable_half_val()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; + case 14: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (114 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, add_resource_handle_val())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .tensorflow.VariantTensorDataProto variant_val = 15; + case 15: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (122 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, add_variant_val())); + } else { + goto handle_unusual; + } + break; + } + + // repeated uint32 uint32_val = 16 [packed = true]; + case 16: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (130 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32>( + input, this->mutable_uint32_val()))); + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (128 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::PROTOBUF_NAMESPACE_ID::uint32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT32>( + 2, 130u, input, this->mutable_uint32_val()))); + } else { + goto handle_unusual; + } + break; + } + + // repeated uint64 uint64_val = 17 [packed = true]; + case 17: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (138 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPackedPrimitive< + ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( + input, this->mutable_uint64_val()))); + } else if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (136 & 0xFF)) { + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::PROTOBUF_NAMESPACE_ID::uint64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_UINT64>( + 2, 138u, input, this->mutable_uint64_val()))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.TensorProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.TensorProto) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void TensorProto::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.TensorProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .tensorflow.DataType dtype = 1; + if (this->dtype() != 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnum( + 1, this->dtype(), output); + } + + // .tensorflow.TensorShapeProto tensor_shape = 2; + if (this->has_tensor_shape()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, _Internal::tensor_shape(this), output); + } + + // int32 version_number = 3; + if (this->version_number() != 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(3, this->version_number(), output); + } + + // bytes tensor_content = 4; + if (this->tensor_content().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( + 4, this->tensor_content(), output); + } + + // repeated float float_val = 5 [packed = true]; + if (this->float_val_size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(5, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_float_val_cached_byte_size_.load( + std::memory_order_relaxed)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatArray( + this->float_val().data(), this->float_val_size(), output); + } + + // repeated double double_val = 6 [packed = true]; + if (this->double_val_size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(6, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_double_val_cached_byte_size_.load( + std::memory_order_relaxed)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleArray( + this->double_val().data(), this->double_val_size(), output); + } + + // repeated int32 int_val = 7 [packed = true]; + if (this->int_val_size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(7, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_int_val_cached_byte_size_.load( + std::memory_order_relaxed)); + } + for (int i = 0, n = this->int_val_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( + this->int_val(i), output); + } + + // repeated bytes string_val = 8; + for (int i = 0, n = this->string_val_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytes( + 8, this->string_val(i), output); + } + + // repeated float scomplex_val = 9 [packed = true]; + if (this->scomplex_val_size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(9, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_scomplex_val_cached_byte_size_.load( + std::memory_order_relaxed)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatArray( + this->scomplex_val().data(), this->scomplex_val_size(), output); + } + + // repeated int64 int64_val = 10 [packed = true]; + if (this->int64_val_size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(10, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_int64_val_cached_byte_size_.load( + std::memory_order_relaxed)); + } + for (int i = 0, n = this->int64_val_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64NoTag( + this->int64_val(i), output); + } + + // repeated bool bool_val = 11 [packed = true]; + if (this->bool_val_size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(11, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_bool_val_cached_byte_size_.load( + std::memory_order_relaxed)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolArray( + this->bool_val().data(), this->bool_val_size(), output); + } + + // repeated double dcomplex_val = 12 [packed = true]; + if (this->dcomplex_val_size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(12, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_dcomplex_val_cached_byte_size_.load( + std::memory_order_relaxed)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleArray( + this->dcomplex_val().data(), this->dcomplex_val_size(), output); + } + + // repeated int32 half_val = 13 [packed = true]; + if (this->half_val_size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(13, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_half_val_cached_byte_size_.load( + std::memory_order_relaxed)); + } + for (int i = 0, n = this->half_val_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32NoTag( + this->half_val(i), output); + } + + // repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->resource_handle_val_size()); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 14, + this->resource_handle_val(static_cast<int>(i)), + output); + } + + // repeated .tensorflow.VariantTensorDataProto variant_val = 15; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->variant_val_size()); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 15, + this->variant_val(static_cast<int>(i)), + output); + } + + // repeated uint32 uint32_val = 16 [packed = true]; + if (this->uint32_val_size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(16, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_uint32_val_cached_byte_size_.load( + std::memory_order_relaxed)); + } + for (int i = 0, n = this->uint32_val_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32NoTag( + this->uint32_val(i), output); + } + + // repeated uint64 uint64_val = 17 [packed = true]; + if (this->uint64_val_size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTag(17, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_uint64_val_cached_byte_size_.load( + std::memory_order_relaxed)); + } + for (int i = 0, n = this->uint64_val_size(); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64NoTag( + this->uint64_val(i), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:tensorflow.TensorProto) +} + +::PROTOBUF_NAMESPACE_ID::uint8* TensorProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // .tensorflow.DataType dtype = 1; + if (this->dtype() != 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->dtype(), target); + } + + // .tensorflow.TensorShapeProto tensor_shape = 2; + if (this->has_tensor_shape()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, _Internal::tensor_shape(this), target); + } + + // int32 version_number = 3; + if (this->version_number() != 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->version_number(), target); + } + + // bytes tensor_content = 4; + if (this->tensor_content().size() > 0) { + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( + 4, this->tensor_content(), target); + } + + // repeated float float_val = 5 [packed = true]; + if (this->float_val_size() > 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( + 5, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( + _float_val_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteFloatNoTagToArray(this->float_val_, target); + } + + // repeated double double_val = 6 [packed = true]; + if (this->double_val_size() > 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( + 6, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( + _double_val_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteDoubleNoTagToArray(this->double_val_, target); + } + + // repeated int32 int_val = 7 [packed = true]; + if (this->int_val_size() > 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( + 7, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( + _int_val_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->int_val_, target); + } + + // repeated bytes string_val = 8; + for (int i = 0, n = this->string_val_size(); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteBytesToArray(8, this->string_val(i), target); + } + + // repeated float scomplex_val = 9 [packed = true]; + if (this->scomplex_val_size() > 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( + 9, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( + _scomplex_val_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteFloatNoTagToArray(this->scomplex_val_, target); + } + + // repeated int64 int64_val = 10 [packed = true]; + if (this->int64_val_size() > 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( + 10, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( + _int64_val_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteInt64NoTagToArray(this->int64_val_, target); + } + + // repeated bool bool_val = 11 [packed = true]; + if (this->bool_val_size() > 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( + 11, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( + _bool_val_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteBoolNoTagToArray(this->bool_val_, target); + } + + // repeated double dcomplex_val = 12 [packed = true]; + if (this->dcomplex_val_size() > 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( + 12, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( + _dcomplex_val_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteDoubleNoTagToArray(this->dcomplex_val_, target); + } + + // repeated int32 half_val = 13 [packed = true]; + if (this->half_val_size() > 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( + 13, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( + _half_val_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->half_val_, target); + } + + // repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->resource_handle_val_size()); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 14, this->resource_handle_val(static_cast<int>(i)), target); + } + + // repeated .tensorflow.VariantTensorDataProto variant_val = 15; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->variant_val_size()); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 15, this->variant_val(static_cast<int>(i)), target); + } + + // repeated uint32 uint32_val = 16 [packed = true]; + if (this->uint32_val_size() > 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( + 16, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( + _uint32_val_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteUInt32NoTagToArray(this->uint32_val_, target); + } + + // repeated uint64 uint64_val = 17 [packed = true]; + if (this->uint64_val_size() > 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteTagToArray( + 17, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream::WriteVarint32ToArray( + _uint64_val_cached_byte_size_.load(std::memory_order_relaxed), + target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + WriteUInt64NoTagToArray(this->uint64_val_, target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorProto) + return target; +} + +size_t TensorProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated float float_val = 5 [packed = true]; + { + unsigned int count = static_cast<unsigned int>(this->float_val_size()); + size_t data_size = 4UL * count; + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _float_val_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated double double_val = 6 [packed = true]; + { + unsigned int count = static_cast<unsigned int>(this->double_val_size()); + size_t data_size = 8UL * count; + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _double_val_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated int32 int_val = 7 [packed = true]; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + Int32Size(this->int_val_); + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _int_val_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated bytes string_val = 8; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->string_val_size()); + for (int i = 0, n = this->string_val_size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->string_val(i)); + } + + // repeated float scomplex_val = 9 [packed = true]; + { + unsigned int count = static_cast<unsigned int>(this->scomplex_val_size()); + size_t data_size = 4UL * count; + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _scomplex_val_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated int64 int64_val = 10 [packed = true]; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + Int64Size(this->int64_val_); + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _int64_val_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated bool bool_val = 11 [packed = true]; + { + unsigned int count = static_cast<unsigned int>(this->bool_val_size()); + size_t data_size = 1UL * count; + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _bool_val_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated double dcomplex_val = 12 [packed = true]; + { + unsigned int count = static_cast<unsigned int>(this->dcomplex_val_size()); + size_t data_size = 8UL * count; + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _dcomplex_val_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated int32 half_val = 13 [packed = true]; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + Int32Size(this->half_val_); + if (data_size > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _half_val_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; + { + unsigned int count = static_cast<unsigned int>(this->resource_handle_val_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + this->resource_handle_val(static_cast<int>(i))); + } + } + + // repeated .tensorflow.VariantTensorDataProto variant_val = 15; + { + unsigned int count = static_cast<unsigned int>(this->variant_val_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + this->variant_val(static_cast<int>(i))); + } + } + + // repeated uint32 uint32_val = 16 [packed = true]; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + UInt32Size(this->uint32_val_); + if (data_size > 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _uint32_val_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated uint64 uint64_val = 17 [packed = true]; + { + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + UInt64Size(this->uint64_val_); + if (data_size > 0) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); + _uint64_val_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // bytes tensor_content = 4; + if (this->tensor_content().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->tensor_content()); + } + + // .tensorflow.TensorShapeProto tensor_shape = 2; + if (this->has_tensor_shape()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *tensor_shape_); + } + + // .tensorflow.DataType dtype = 1; + if (this->dtype() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->dtype()); + } + + // int32 version_number = 3; + if (this->version_number() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->version_number()); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TensorProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorProto) + GOOGLE_DCHECK_NE(&from, this); + const TensorProto* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TensorProto>( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorProto) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorProto) + MergeFrom(*source); + } +} + +void TensorProto::MergeFrom(const TensorProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + float_val_.MergeFrom(from.float_val_); + double_val_.MergeFrom(from.double_val_); + int_val_.MergeFrom(from.int_val_); + string_val_.MergeFrom(from.string_val_); + scomplex_val_.MergeFrom(from.scomplex_val_); + int64_val_.MergeFrom(from.int64_val_); + bool_val_.MergeFrom(from.bool_val_); + dcomplex_val_.MergeFrom(from.dcomplex_val_); + half_val_.MergeFrom(from.half_val_); + resource_handle_val_.MergeFrom(from.resource_handle_val_); + variant_val_.MergeFrom(from.variant_val_); + uint32_val_.MergeFrom(from.uint32_val_); + uint64_val_.MergeFrom(from.uint64_val_); + if (from.tensor_content().size() > 0) { + set_tensor_content(from.tensor_content()); + } + if (from.has_tensor_shape()) { + mutable_tensor_shape()->::tensorflow::TensorShapeProto::MergeFrom(from.tensor_shape()); + } + if (from.dtype() != 0) { + set_dtype(from.dtype()); + } + if (from.version_number() != 0) { + set_version_number(from.version_number()); + } +} + +void TensorProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TensorProto::CopyFrom(const TensorProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TensorProto::IsInitialized() const { + return true; +} + +void TensorProto::Swap(TensorProto* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + TensorProto* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == nullptr) { + delete temp; + } + } +} +void TensorProto::UnsafeArenaSwap(TensorProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void TensorProto::InternalSwap(TensorProto* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + float_val_.InternalSwap(&other->float_val_); + double_val_.InternalSwap(&other->double_val_); + int_val_.InternalSwap(&other->int_val_); + string_val_.InternalSwap(CastToBase(&other->string_val_)); + scomplex_val_.InternalSwap(&other->scomplex_val_); + int64_val_.InternalSwap(&other->int64_val_); + bool_val_.InternalSwap(&other->bool_val_); + dcomplex_val_.InternalSwap(&other->dcomplex_val_); + half_val_.InternalSwap(&other->half_val_); + CastToBase(&resource_handle_val_)->InternalSwap(CastToBase(&other->resource_handle_val_)); + CastToBase(&variant_val_)->InternalSwap(CastToBase(&other->variant_val_)); + uint32_val_.InternalSwap(&other->uint32_val_); + uint64_val_.InternalSwap(&other->uint64_val_); + tensor_content_.Swap(&other->tensor_content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(tensor_shape_, other->tensor_shape_); + swap(dtype_, other->dtype_); + swap(version_number_, other->version_number_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata TensorProto::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void VariantTensorDataProto::InitAsDefaultInstance() { +} +class VariantTensorDataProto::_Internal { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int VariantTensorDataProto::kTypeNameFieldNumber; +const int VariantTensorDataProto::kMetadataFieldNumber; +const int VariantTensorDataProto::kTensorsFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +VariantTensorDataProto::VariantTensorDataProto() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.VariantTensorDataProto) +} +VariantTensorDataProto::VariantTensorDataProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(arena), + tensors_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.VariantTensorDataProto) +} +VariantTensorDataProto::VariantTensorDataProto(const VariantTensorDataProto& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + tensors_(from.tensors_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.type_name().empty()) { + type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.type_name(), + GetArenaNoVirtual()); + } + metadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.metadata().empty()) { + metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.metadata(), + GetArenaNoVirtual()); + } + // @@protoc_insertion_point(copy_constructor:tensorflow.VariantTensorDataProto) +} + +void VariantTensorDataProto::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TensorProto_tensor_2eproto.base); + type_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + metadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +VariantTensorDataProto::~VariantTensorDataProto() { + // @@protoc_insertion_point(destructor:tensorflow.VariantTensorDataProto) + SharedDtor(); +} + +void VariantTensorDataProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + type_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + metadata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void VariantTensorDataProto::ArenaDtor(void* object) { + VariantTensorDataProto* _this = reinterpret_cast< VariantTensorDataProto* >(object); + (void)_this; +} +void VariantTensorDataProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void VariantTensorDataProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const VariantTensorDataProto& VariantTensorDataProto::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TensorProto_tensor_2eproto.base); + return *internal_default_instance(); +} + + +void VariantTensorDataProto::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.VariantTensorDataProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + tensors_.Clear(); + type_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + metadata_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* VariantTensorDataProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // string type_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_type_name(), ptr, ctx, "tensorflow.VariantTensorDataProto.type_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes metadata = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(mutable_metadata(), ptr, ctx); + CHK_(ptr); + } else goto handle_unusual; + continue; + // repeated .tensorflow.TensorProto tensors = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_tensors(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool VariantTensorDataProto::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.VariantTensorDataProto) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // string type_name = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (10 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_type_name())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->type_name().data(), static_cast<int>(this->type_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "tensorflow.VariantTensorDataProto.type_name")); + } else { + goto handle_unusual; + } + break; + } + + // bytes metadata = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadBytes( + input, this->mutable_metadata())); + } else { + goto handle_unusual; + } + break; + } + + // repeated .tensorflow.TensorProto tensors = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, add_tensors())); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.VariantTensorDataProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.VariantTensorDataProto) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void VariantTensorDataProto::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.VariantTensorDataProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string type_name = 1; + if (this->type_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->type_name().data(), static_cast<int>(this->type_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.VariantTensorDataProto.type_name"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->type_name(), output); + } + + // bytes metadata = 2; + if (this->metadata().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesMaybeAliased( + 2, this->metadata(), output); + } + + // repeated .tensorflow.TensorProto tensors = 3; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->tensors_size()); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 3, + this->tensors(static_cast<int>(i)), + output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:tensorflow.VariantTensorDataProto) +} + +::PROTOBUF_NAMESPACE_ID::uint8* VariantTensorDataProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.VariantTensorDataProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string type_name = 1; + if (this->type_name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->type_name().data(), static_cast<int>(this->type_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.VariantTensorDataProto.type_name"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 1, this->type_name(), target); + } + + // bytes metadata = 2; + if (this->metadata().size() > 0) { + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBytesToArray( + 2, this->metadata(), target); + } + + // repeated .tensorflow.TensorProto tensors = 3; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->tensors_size()); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 3, this->tensors(static_cast<int>(i)), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.VariantTensorDataProto) + return target; +} + +size_t VariantTensorDataProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.VariantTensorDataProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .tensorflow.TensorProto tensors = 3; + { + unsigned int count = static_cast<unsigned int>(this->tensors_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + this->tensors(static_cast<int>(i))); + } + } + + // string type_name = 1; + if (this->type_name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->type_name()); + } + + // bytes metadata = 2; + if (this->metadata().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->metadata()); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void VariantTensorDataProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.VariantTensorDataProto) + GOOGLE_DCHECK_NE(&from, this); + const VariantTensorDataProto* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<VariantTensorDataProto>( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.VariantTensorDataProto) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.VariantTensorDataProto) + MergeFrom(*source); + } +} + +void VariantTensorDataProto::MergeFrom(const VariantTensorDataProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.VariantTensorDataProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + tensors_.MergeFrom(from.tensors_); + if (from.type_name().size() > 0) { + set_type_name(from.type_name()); + } + if (from.metadata().size() > 0) { + set_metadata(from.metadata()); + } +} + +void VariantTensorDataProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.VariantTensorDataProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void VariantTensorDataProto::CopyFrom(const VariantTensorDataProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.VariantTensorDataProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool VariantTensorDataProto::IsInitialized() const { + return true; +} + +void VariantTensorDataProto::Swap(VariantTensorDataProto* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + VariantTensorDataProto* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == nullptr) { + delete temp; + } + } +} +void VariantTensorDataProto::UnsafeArenaSwap(VariantTensorDataProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void VariantTensorDataProto::InternalSwap(VariantTensorDataProto* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + CastToBase(&tensors_)->InternalSwap(CastToBase(&other->tensors_)); + type_name_.Swap(&other->type_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + metadata_.Swap(&other->metadata_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata VariantTensorDataProto::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::tensorflow::TensorProto* Arena::CreateMaybeMessage< ::tensorflow::TensorProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::tensorflow::TensorProto >(arena); +} +template<> PROTOBUF_NOINLINE ::tensorflow::VariantTensorDataProto* Arena::CreateMaybeMessage< ::tensorflow::VariantTensorDataProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::tensorflow::VariantTensorDataProto >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/src/generated/tensor.pb.h b/src/generated/tensor.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..356066cb779ef3c2e81964ab4c734457739064f1 --- /dev/null +++ b/src/generated/tensor.pb.h @@ -0,0 +1,1416 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensor.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensor_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensor_2eproto + +#include <limits> +#include <string> + +#include <google/protobuf/port_def.inc> +#if PROTOBUF_VERSION < 3008000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/port_undef.inc> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/inlined_string_field.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/unknown_field_set.h> +#include "resource_handle.pb.h" +#include "tensor_shape.pb.h" +#include "types.pb.h" +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_tensor_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensor_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensor_2eproto; +namespace tensorflow { +class TensorProto; +class TensorProtoDefaultTypeInternal; +extern TensorProtoDefaultTypeInternal _TensorProto_default_instance_; +class VariantTensorDataProto; +class VariantTensorDataProtoDefaultTypeInternal; +extern VariantTensorDataProtoDefaultTypeInternal _VariantTensorDataProto_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::TensorProto* Arena::CreateMaybeMessage<::tensorflow::TensorProto>(Arena*); +template<> ::tensorflow::VariantTensorDataProto* Arena::CreateMaybeMessage<::tensorflow::VariantTensorDataProto>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class TensorProto : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorProto) */ { + public: + TensorProto(); + virtual ~TensorProto(); + + TensorProto(const TensorProto& from); + TensorProto(TensorProto&& from) noexcept + : TensorProto() { + *this = ::std::move(from); + } + + inline TensorProto& operator=(const TensorProto& from) { + CopyFrom(from); + return *this; + } + inline TensorProto& operator=(TensorProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { + return GetArenaNoVirtual(); + } + inline void* GetMaybeArenaPointer() const final { + return MaybeArenaPtr(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const TensorProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TensorProto* internal_default_instance() { + return reinterpret_cast<const TensorProto*>( + &_TensorProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + void UnsafeArenaSwap(TensorProto* other); + void Swap(TensorProto* other); + friend void swap(TensorProto& a, TensorProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TensorProto* New() const final { + return CreateMaybeMessage<TensorProto>(nullptr); + } + + TensorProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage<TensorProto>(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const TensorProto& from); + void MergeFrom(const TensorProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TensorProto* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TensorProto"; + } + protected: + explicit TensorProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_tensor_2eproto); + return ::descriptor_table_tensor_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated float float_val = 5 [packed = true]; + int float_val_size() const; + void clear_float_val(); + static const int kFloatValFieldNumber = 5; + float float_val(int index) const; + void set_float_val(int index, float value); + void add_float_val(float value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& + float_val() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* + mutable_float_val(); + + // repeated double double_val = 6 [packed = true]; + int double_val_size() const; + void clear_double_val(); + static const int kDoubleValFieldNumber = 6; + double double_val(int index) const; + void set_double_val(int index, double value); + void add_double_val(double value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& + double_val() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* + mutable_double_val(); + + // repeated int32 int_val = 7 [packed = true]; + int int_val_size() const; + void clear_int_val(); + static const int kIntValFieldNumber = 7; + ::PROTOBUF_NAMESPACE_ID::int32 int_val(int index) const; + void set_int_val(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); + void add_int_val(::PROTOBUF_NAMESPACE_ID::int32 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& + int_val() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* + mutable_int_val(); + + // repeated bytes string_val = 8; + int string_val_size() const; + void clear_string_val(); + static const int kStringValFieldNumber = 8; + const std::string& string_val(int index) const; + std::string* mutable_string_val(int index); + void set_string_val(int index, const std::string& value); + void set_string_val(int index, std::string&& value); + void set_string_val(int index, const char* value); + void set_string_val(int index, const void* value, size_t size); + std::string* add_string_val(); + void add_string_val(const std::string& value); + void add_string_val(std::string&& value); + void add_string_val(const char* value); + void add_string_val(const void* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& string_val() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* mutable_string_val(); + + // repeated float scomplex_val = 9 [packed = true]; + int scomplex_val_size() const; + void clear_scomplex_val(); + static const int kScomplexValFieldNumber = 9; + float scomplex_val(int index) const; + void set_scomplex_val(int index, float value); + void add_scomplex_val(float value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& + scomplex_val() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* + mutable_scomplex_val(); + + // repeated int64 int64_val = 10 [packed = true]; + int int64_val_size() const; + void clear_int64_val(); + static const int kInt64ValFieldNumber = 10; + ::PROTOBUF_NAMESPACE_ID::int64 int64_val(int index) const; + void set_int64_val(int index, ::PROTOBUF_NAMESPACE_ID::int64 value); + void add_int64_val(::PROTOBUF_NAMESPACE_ID::int64 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >& + int64_val() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >* + mutable_int64_val(); + + // repeated bool bool_val = 11 [packed = true]; + int bool_val_size() const; + void clear_bool_val(); + static const int kBoolValFieldNumber = 11; + bool bool_val(int index) const; + void set_bool_val(int index, bool value); + void add_bool_val(bool value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >& + bool_val() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >* + mutable_bool_val(); + + // repeated double dcomplex_val = 12 [packed = true]; + int dcomplex_val_size() const; + void clear_dcomplex_val(); + static const int kDcomplexValFieldNumber = 12; + double dcomplex_val(int index) const; + void set_dcomplex_val(int index, double value); + void add_dcomplex_val(double value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& + dcomplex_val() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* + mutable_dcomplex_val(); + + // repeated int32 half_val = 13 [packed = true]; + int half_val_size() const; + void clear_half_val(); + static const int kHalfValFieldNumber = 13; + ::PROTOBUF_NAMESPACE_ID::int32 half_val(int index) const; + void set_half_val(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); + void add_half_val(::PROTOBUF_NAMESPACE_ID::int32 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& + half_val() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* + mutable_half_val(); + + // repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; + int resource_handle_val_size() const; + void clear_resource_handle_val(); + static const int kResourceHandleValFieldNumber = 14; + ::tensorflow::ResourceHandleProto* mutable_resource_handle_val(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ResourceHandleProto >* + mutable_resource_handle_val(); + const ::tensorflow::ResourceHandleProto& resource_handle_val(int index) const; + ::tensorflow::ResourceHandleProto* add_resource_handle_val(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ResourceHandleProto >& + resource_handle_val() const; + + // repeated .tensorflow.VariantTensorDataProto variant_val = 15; + int variant_val_size() const; + void clear_variant_val(); + static const int kVariantValFieldNumber = 15; + ::tensorflow::VariantTensorDataProto* mutable_variant_val(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::VariantTensorDataProto >* + mutable_variant_val(); + const ::tensorflow::VariantTensorDataProto& variant_val(int index) const; + ::tensorflow::VariantTensorDataProto* add_variant_val(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::VariantTensorDataProto >& + variant_val() const; + + // repeated uint32 uint32_val = 16 [packed = true]; + int uint32_val_size() const; + void clear_uint32_val(); + static const int kUint32ValFieldNumber = 16; + ::PROTOBUF_NAMESPACE_ID::uint32 uint32_val(int index) const; + void set_uint32_val(int index, ::PROTOBUF_NAMESPACE_ID::uint32 value); + void add_uint32_val(::PROTOBUF_NAMESPACE_ID::uint32 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >& + uint32_val() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >* + mutable_uint32_val(); + + // repeated uint64 uint64_val = 17 [packed = true]; + int uint64_val_size() const; + void clear_uint64_val(); + static const int kUint64ValFieldNumber = 17; + ::PROTOBUF_NAMESPACE_ID::uint64 uint64_val(int index) const; + void set_uint64_val(int index, ::PROTOBUF_NAMESPACE_ID::uint64 value); + void add_uint64_val(::PROTOBUF_NAMESPACE_ID::uint64 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint64 >& + uint64_val() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint64 >* + mutable_uint64_val(); + + // bytes tensor_content = 4; + void clear_tensor_content(); + static const int kTensorContentFieldNumber = 4; + const std::string& tensor_content() const; + void set_tensor_content(const std::string& value); + void set_tensor_content(std::string&& value); + void set_tensor_content(const char* value); + void set_tensor_content(const void* value, size_t size); + std::string* mutable_tensor_content(); + std::string* release_tensor_content(); + void set_allocated_tensor_content(std::string* tensor_content); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_tensor_content(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_tensor_content( + std::string* tensor_content); + + // .tensorflow.TensorShapeProto tensor_shape = 2; + bool has_tensor_shape() const; + void clear_tensor_shape(); + static const int kTensorShapeFieldNumber = 2; + const ::tensorflow::TensorShapeProto& tensor_shape() const; + ::tensorflow::TensorShapeProto* release_tensor_shape(); + ::tensorflow::TensorShapeProto* mutable_tensor_shape(); + void set_allocated_tensor_shape(::tensorflow::TensorShapeProto* tensor_shape); + void unsafe_arena_set_allocated_tensor_shape( + ::tensorflow::TensorShapeProto* tensor_shape); + ::tensorflow::TensorShapeProto* unsafe_arena_release_tensor_shape(); + + // .tensorflow.DataType dtype = 1; + void clear_dtype(); + static const int kDtypeFieldNumber = 1; + ::tensorflow::DataType dtype() const; + void set_dtype(::tensorflow::DataType value); + + // int32 version_number = 3; + void clear_version_number(); + static const int kVersionNumberFieldNumber = 3; + ::PROTOBUF_NAMESPACE_ID::int32 version_number() const; + void set_version_number(::PROTOBUF_NAMESPACE_ID::int32 value); + + // @@protoc_insertion_point(class_scope:tensorflow.TensorProto) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float > float_val_; + mutable std::atomic<int> _float_val_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< double > double_val_; + mutable std::atomic<int> _double_val_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > int_val_; + mutable std::atomic<int> _int_val_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string> string_val_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float > scomplex_val_; + mutable std::atomic<int> _scomplex_val_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 > int64_val_; + mutable std::atomic<int> _int64_val_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool > bool_val_; + mutable std::atomic<int> _bool_val_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< double > dcomplex_val_; + mutable std::atomic<int> _dcomplex_val_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > half_val_; + mutable std::atomic<int> _half_val_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ResourceHandleProto > resource_handle_val_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::VariantTensorDataProto > variant_val_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 > uint32_val_; + mutable std::atomic<int> _uint32_val_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint64 > uint64_val_; + mutable std::atomic<int> _uint64_val_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr tensor_content_; + ::tensorflow::TensorShapeProto* tensor_shape_; + int dtype_; + ::PROTOBUF_NAMESPACE_ID::int32 version_number_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_tensor_2eproto; +}; +// ------------------------------------------------------------------- + +class VariantTensorDataProto : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.VariantTensorDataProto) */ { + public: + VariantTensorDataProto(); + virtual ~VariantTensorDataProto(); + + VariantTensorDataProto(const VariantTensorDataProto& from); + VariantTensorDataProto(VariantTensorDataProto&& from) noexcept + : VariantTensorDataProto() { + *this = ::std::move(from); + } + + inline VariantTensorDataProto& operator=(const VariantTensorDataProto& from) { + CopyFrom(from); + return *this; + } + inline VariantTensorDataProto& operator=(VariantTensorDataProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { + return GetArenaNoVirtual(); + } + inline void* GetMaybeArenaPointer() const final { + return MaybeArenaPtr(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const VariantTensorDataProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const VariantTensorDataProto* internal_default_instance() { + return reinterpret_cast<const VariantTensorDataProto*>( + &_VariantTensorDataProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + void UnsafeArenaSwap(VariantTensorDataProto* other); + void Swap(VariantTensorDataProto* other); + friend void swap(VariantTensorDataProto& a, VariantTensorDataProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline VariantTensorDataProto* New() const final { + return CreateMaybeMessage<VariantTensorDataProto>(nullptr); + } + + VariantTensorDataProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage<VariantTensorDataProto>(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const VariantTensorDataProto& from); + void MergeFrom(const VariantTensorDataProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(VariantTensorDataProto* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.VariantTensorDataProto"; + } + protected: + explicit VariantTensorDataProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_tensor_2eproto); + return ::descriptor_table_tensor_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .tensorflow.TensorProto tensors = 3; + int tensors_size() const; + void clear_tensors(); + static const int kTensorsFieldNumber = 3; + ::tensorflow::TensorProto* mutable_tensors(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* + mutable_tensors(); + const ::tensorflow::TensorProto& tensors(int index) const; + ::tensorflow::TensorProto* add_tensors(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& + tensors() const; + + // string type_name = 1; + void clear_type_name(); + static const int kTypeNameFieldNumber = 1; + const std::string& type_name() const; + void set_type_name(const std::string& value); + void set_type_name(std::string&& value); + void set_type_name(const char* value); + void set_type_name(const char* value, size_t size); + std::string* mutable_type_name(); + std::string* release_type_name(); + void set_allocated_type_name(std::string* type_name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_type_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_type_name( + std::string* type_name); + + // bytes metadata = 2; + void clear_metadata(); + static const int kMetadataFieldNumber = 2; + const std::string& metadata() const; + void set_metadata(const std::string& value); + void set_metadata(std::string&& value); + void set_metadata(const char* value); + void set_metadata(const void* value, size_t size); + std::string* mutable_metadata(); + std::string* release_metadata(); + void set_allocated_metadata(std::string* metadata); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_metadata(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_metadata( + std::string* metadata); + + // @@protoc_insertion_point(class_scope:tensorflow.VariantTensorDataProto) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto > tensors_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr metadata_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_tensor_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// TensorProto + +// .tensorflow.DataType dtype = 1; +inline void TensorProto::clear_dtype() { + dtype_ = 0; +} +inline ::tensorflow::DataType TensorProto::dtype() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.dtype) + return static_cast< ::tensorflow::DataType >(dtype_); +} +inline void TensorProto::set_dtype(::tensorflow::DataType value) { + + dtype_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.dtype) +} + +// .tensorflow.TensorShapeProto tensor_shape = 2; +inline bool TensorProto::has_tensor_shape() const { + return this != internal_default_instance() && tensor_shape_ != nullptr; +} +inline const ::tensorflow::TensorShapeProto& TensorProto::tensor_shape() const { + const ::tensorflow::TensorShapeProto* p = tensor_shape_; + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.tensor_shape) + return p != nullptr ? *p : *reinterpret_cast<const ::tensorflow::TensorShapeProto*>( + &::tensorflow::_TensorShapeProto_default_instance_); +} +inline ::tensorflow::TensorShapeProto* TensorProto::release_tensor_shape() { + // @@protoc_insertion_point(field_release:tensorflow.TensorProto.tensor_shape) + + ::tensorflow::TensorShapeProto* temp = tensor_shape_; + if (GetArenaNoVirtual() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + tensor_shape_ = nullptr; + return temp; +} +inline ::tensorflow::TensorShapeProto* TensorProto::unsafe_arena_release_tensor_shape() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorProto.tensor_shape) + + ::tensorflow::TensorShapeProto* temp = tensor_shape_; + tensor_shape_ = nullptr; + return temp; +} +inline ::tensorflow::TensorShapeProto* TensorProto::mutable_tensor_shape() { + + if (tensor_shape_ == nullptr) { + auto* p = CreateMaybeMessage<::tensorflow::TensorShapeProto>(GetArenaNoVirtual()); + tensor_shape_ = p; + } + // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.tensor_shape) + return tensor_shape_; +} +inline void TensorProto::set_allocated_tensor_shape(::tensorflow::TensorShapeProto* tensor_shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor_shape_); + } + if (tensor_shape) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tensor_shape)->GetArena(); + if (message_arena != submessage_arena) { + tensor_shape = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tensor_shape, submessage_arena); + } + + } else { + + } + tensor_shape_ = tensor_shape; + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorProto.tensor_shape) +} + +// int32 version_number = 3; +inline void TensorProto::clear_version_number() { + version_number_ = 0; +} +inline ::PROTOBUF_NAMESPACE_ID::int32 TensorProto::version_number() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.version_number) + return version_number_; +} +inline void TensorProto::set_version_number(::PROTOBUF_NAMESPACE_ID::int32 value) { + + version_number_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.version_number) +} + +// bytes tensor_content = 4; +inline void TensorProto::clear_tensor_content() { + tensor_content_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const std::string& TensorProto::tensor_content() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.tensor_content) + return tensor_content_.Get(); +} +inline void TensorProto::set_tensor_content(const std::string& value) { + + tensor_content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.tensor_content) +} +inline void TensorProto::set_tensor_content(std::string&& value) { + + tensor_content_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:tensorflow.TensorProto.tensor_content) +} +inline void TensorProto::set_tensor_content(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + tensor_content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.TensorProto.tensor_content) +} +inline void TensorProto::set_tensor_content(const void* value, + size_t size) { + + tensor_content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorProto.tensor_content) +} +inline std::string* TensorProto::mutable_tensor_content() { + + // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.tensor_content) + return tensor_content_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline std::string* TensorProto::release_tensor_content() { + // @@protoc_insertion_point(field_release:tensorflow.TensorProto.tensor_content) + + return tensor_content_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline void TensorProto::set_allocated_tensor_content(std::string* tensor_content) { + if (tensor_content != nullptr) { + + } else { + + } + tensor_content_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), tensor_content, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorProto.tensor_content) +} +inline std::string* TensorProto::unsafe_arena_release_tensor_content() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorProto.tensor_content) + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + + return tensor_content_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void TensorProto::unsafe_arena_set_allocated_tensor_content( + std::string* tensor_content) { + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + if (tensor_content != nullptr) { + + } else { + + } + tensor_content_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + tensor_content, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorProto.tensor_content) +} + +// repeated int32 half_val = 13 [packed = true]; +inline int TensorProto::half_val_size() const { + return half_val_.size(); +} +inline void TensorProto::clear_half_val() { + half_val_.Clear(); +} +inline ::PROTOBUF_NAMESPACE_ID::int32 TensorProto::half_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.half_val) + return half_val_.Get(index); +} +inline void TensorProto::set_half_val(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { + half_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.half_val) +} +inline void TensorProto::add_half_val(::PROTOBUF_NAMESPACE_ID::int32 value) { + half_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.half_val) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& +TensorProto::half_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.half_val) + return half_val_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* +TensorProto::mutable_half_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.half_val) + return &half_val_; +} + +// repeated float float_val = 5 [packed = true]; +inline int TensorProto::float_val_size() const { + return float_val_.size(); +} +inline void TensorProto::clear_float_val() { + float_val_.Clear(); +} +inline float TensorProto::float_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.float_val) + return float_val_.Get(index); +} +inline void TensorProto::set_float_val(int index, float value) { + float_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.float_val) +} +inline void TensorProto::add_float_val(float value) { + float_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.float_val) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& +TensorProto::float_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.float_val) + return float_val_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* +TensorProto::mutable_float_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.float_val) + return &float_val_; +} + +// repeated double double_val = 6 [packed = true]; +inline int TensorProto::double_val_size() const { + return double_val_.size(); +} +inline void TensorProto::clear_double_val() { + double_val_.Clear(); +} +inline double TensorProto::double_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.double_val) + return double_val_.Get(index); +} +inline void TensorProto::set_double_val(int index, double value) { + double_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.double_val) +} +inline void TensorProto::add_double_val(double value) { + double_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.double_val) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& +TensorProto::double_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.double_val) + return double_val_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* +TensorProto::mutable_double_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.double_val) + return &double_val_; +} + +// repeated int32 int_val = 7 [packed = true]; +inline int TensorProto::int_val_size() const { + return int_val_.size(); +} +inline void TensorProto::clear_int_val() { + int_val_.Clear(); +} +inline ::PROTOBUF_NAMESPACE_ID::int32 TensorProto::int_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.int_val) + return int_val_.Get(index); +} +inline void TensorProto::set_int_val(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { + int_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.int_val) +} +inline void TensorProto::add_int_val(::PROTOBUF_NAMESPACE_ID::int32 value) { + int_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.int_val) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& +TensorProto::int_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.int_val) + return int_val_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* +TensorProto::mutable_int_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.int_val) + return &int_val_; +} + +// repeated bytes string_val = 8; +inline int TensorProto::string_val_size() const { + return string_val_.size(); +} +inline void TensorProto::clear_string_val() { + string_val_.Clear(); +} +inline const std::string& TensorProto::string_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.string_val) + return string_val_.Get(index); +} +inline std::string* TensorProto::mutable_string_val(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.string_val) + return string_val_.Mutable(index); +} +inline void TensorProto::set_string_val(int index, const std::string& value) { + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.string_val) + string_val_.Mutable(index)->assign(value); +} +inline void TensorProto::set_string_val(int index, std::string&& value) { + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.string_val) + string_val_.Mutable(index)->assign(std::move(value)); +} +inline void TensorProto::set_string_val(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + string_val_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tensorflow.TensorProto.string_val) +} +inline void TensorProto::set_string_val(int index, const void* value, size_t size) { + string_val_.Mutable(index)->assign( + reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorProto.string_val) +} +inline std::string* TensorProto::add_string_val() { + // @@protoc_insertion_point(field_add_mutable:tensorflow.TensorProto.string_val) + return string_val_.Add(); +} +inline void TensorProto::add_string_val(const std::string& value) { + string_val_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.string_val) +} +inline void TensorProto::add_string_val(std::string&& value) { + string_val_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.string_val) +} +inline void TensorProto::add_string_val(const char* value) { + GOOGLE_DCHECK(value != nullptr); + string_val_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tensorflow.TensorProto.string_val) +} +inline void TensorProto::add_string_val(const void* value, size_t size) { + string_val_.Add()->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_add_pointer:tensorflow.TensorProto.string_val) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>& +TensorProto::string_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.string_val) + return string_val_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField<std::string>* +TensorProto::mutable_string_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.string_val) + return &string_val_; +} + +// repeated float scomplex_val = 9 [packed = true]; +inline int TensorProto::scomplex_val_size() const { + return scomplex_val_.size(); +} +inline void TensorProto::clear_scomplex_val() { + scomplex_val_.Clear(); +} +inline float TensorProto::scomplex_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.scomplex_val) + return scomplex_val_.Get(index); +} +inline void TensorProto::set_scomplex_val(int index, float value) { + scomplex_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.scomplex_val) +} +inline void TensorProto::add_scomplex_val(float value) { + scomplex_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.scomplex_val) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& +TensorProto::scomplex_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.scomplex_val) + return scomplex_val_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* +TensorProto::mutable_scomplex_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.scomplex_val) + return &scomplex_val_; +} + +// repeated int64 int64_val = 10 [packed = true]; +inline int TensorProto::int64_val_size() const { + return int64_val_.size(); +} +inline void TensorProto::clear_int64_val() { + int64_val_.Clear(); +} +inline ::PROTOBUF_NAMESPACE_ID::int64 TensorProto::int64_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.int64_val) + return int64_val_.Get(index); +} +inline void TensorProto::set_int64_val(int index, ::PROTOBUF_NAMESPACE_ID::int64 value) { + int64_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.int64_val) +} +inline void TensorProto::add_int64_val(::PROTOBUF_NAMESPACE_ID::int64 value) { + int64_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.int64_val) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >& +TensorProto::int64_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.int64_val) + return int64_val_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int64 >* +TensorProto::mutable_int64_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.int64_val) + return &int64_val_; +} + +// repeated bool bool_val = 11 [packed = true]; +inline int TensorProto::bool_val_size() const { + return bool_val_.size(); +} +inline void TensorProto::clear_bool_val() { + bool_val_.Clear(); +} +inline bool TensorProto::bool_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.bool_val) + return bool_val_.Get(index); +} +inline void TensorProto::set_bool_val(int index, bool value) { + bool_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.bool_val) +} +inline void TensorProto::add_bool_val(bool value) { + bool_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.bool_val) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >& +TensorProto::bool_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.bool_val) + return bool_val_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< bool >* +TensorProto::mutable_bool_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.bool_val) + return &bool_val_; +} + +// repeated double dcomplex_val = 12 [packed = true]; +inline int TensorProto::dcomplex_val_size() const { + return dcomplex_val_.size(); +} +inline void TensorProto::clear_dcomplex_val() { + dcomplex_val_.Clear(); +} +inline double TensorProto::dcomplex_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.dcomplex_val) + return dcomplex_val_.Get(index); +} +inline void TensorProto::set_dcomplex_val(int index, double value) { + dcomplex_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.dcomplex_val) +} +inline void TensorProto::add_dcomplex_val(double value) { + dcomplex_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.dcomplex_val) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& +TensorProto::dcomplex_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.dcomplex_val) + return dcomplex_val_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* +TensorProto::mutable_dcomplex_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.dcomplex_val) + return &dcomplex_val_; +} + +// repeated .tensorflow.ResourceHandleProto resource_handle_val = 14; +inline int TensorProto::resource_handle_val_size() const { + return resource_handle_val_.size(); +} +inline ::tensorflow::ResourceHandleProto* TensorProto::mutable_resource_handle_val(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.resource_handle_val) + return resource_handle_val_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ResourceHandleProto >* +TensorProto::mutable_resource_handle_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.resource_handle_val) + return &resource_handle_val_; +} +inline const ::tensorflow::ResourceHandleProto& TensorProto::resource_handle_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.resource_handle_val) + return resource_handle_val_.Get(index); +} +inline ::tensorflow::ResourceHandleProto* TensorProto::add_resource_handle_val() { + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.resource_handle_val) + return resource_handle_val_.Add(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::ResourceHandleProto >& +TensorProto::resource_handle_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.resource_handle_val) + return resource_handle_val_; +} + +// repeated .tensorflow.VariantTensorDataProto variant_val = 15; +inline int TensorProto::variant_val_size() const { + return variant_val_.size(); +} +inline void TensorProto::clear_variant_val() { + variant_val_.Clear(); +} +inline ::tensorflow::VariantTensorDataProto* TensorProto::mutable_variant_val(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TensorProto.variant_val) + return variant_val_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::VariantTensorDataProto >* +TensorProto::mutable_variant_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.variant_val) + return &variant_val_; +} +inline const ::tensorflow::VariantTensorDataProto& TensorProto::variant_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.variant_val) + return variant_val_.Get(index); +} +inline ::tensorflow::VariantTensorDataProto* TensorProto::add_variant_val() { + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.variant_val) + return variant_val_.Add(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::VariantTensorDataProto >& +TensorProto::variant_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.variant_val) + return variant_val_; +} + +// repeated uint32 uint32_val = 16 [packed = true]; +inline int TensorProto::uint32_val_size() const { + return uint32_val_.size(); +} +inline void TensorProto::clear_uint32_val() { + uint32_val_.Clear(); +} +inline ::PROTOBUF_NAMESPACE_ID::uint32 TensorProto::uint32_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.uint32_val) + return uint32_val_.Get(index); +} +inline void TensorProto::set_uint32_val(int index, ::PROTOBUF_NAMESPACE_ID::uint32 value) { + uint32_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.uint32_val) +} +inline void TensorProto::add_uint32_val(::PROTOBUF_NAMESPACE_ID::uint32 value) { + uint32_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.uint32_val) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >& +TensorProto::uint32_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.uint32_val) + return uint32_val_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint32 >* +TensorProto::mutable_uint32_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.uint32_val) + return &uint32_val_; +} + +// repeated uint64 uint64_val = 17 [packed = true]; +inline int TensorProto::uint64_val_size() const { + return uint64_val_.size(); +} +inline void TensorProto::clear_uint64_val() { + uint64_val_.Clear(); +} +inline ::PROTOBUF_NAMESPACE_ID::uint64 TensorProto::uint64_val(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorProto.uint64_val) + return uint64_val_.Get(index); +} +inline void TensorProto::set_uint64_val(int index, ::PROTOBUF_NAMESPACE_ID::uint64 value) { + uint64_val_.Set(index, value); + // @@protoc_insertion_point(field_set:tensorflow.TensorProto.uint64_val) +} +inline void TensorProto::add_uint64_val(::PROTOBUF_NAMESPACE_ID::uint64 value) { + uint64_val_.Add(value); + // @@protoc_insertion_point(field_add:tensorflow.TensorProto.uint64_val) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint64 >& +TensorProto::uint64_val() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorProto.uint64_val) + return uint64_val_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::uint64 >* +TensorProto::mutable_uint64_val() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorProto.uint64_val) + return &uint64_val_; +} + +// ------------------------------------------------------------------- + +// VariantTensorDataProto + +// string type_name = 1; +inline void VariantTensorDataProto::clear_type_name() { + type_name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const std::string& VariantTensorDataProto::type_name() const { + // @@protoc_insertion_point(field_get:tensorflow.VariantTensorDataProto.type_name) + return type_name_.Get(); +} +inline void VariantTensorDataProto::set_type_name(const std::string& value) { + + type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.VariantTensorDataProto.type_name) +} +inline void VariantTensorDataProto::set_type_name(std::string&& value) { + + type_name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:tensorflow.VariantTensorDataProto.type_name) +} +inline void VariantTensorDataProto::set_type_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.VariantTensorDataProto.type_name) +} +inline void VariantTensorDataProto::set_type_name(const char* value, + size_t size) { + + type_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.VariantTensorDataProto.type_name) +} +inline std::string* VariantTensorDataProto::mutable_type_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.VariantTensorDataProto.type_name) + return type_name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline std::string* VariantTensorDataProto::release_type_name() { + // @@protoc_insertion_point(field_release:tensorflow.VariantTensorDataProto.type_name) + + return type_name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline void VariantTensorDataProto::set_allocated_type_name(std::string* type_name) { + if (type_name != nullptr) { + + } else { + + } + type_name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.VariantTensorDataProto.type_name) +} +inline std::string* VariantTensorDataProto::unsafe_arena_release_type_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.VariantTensorDataProto.type_name) + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + + return type_name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void VariantTensorDataProto::unsafe_arena_set_allocated_type_name( + std::string* type_name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + if (type_name != nullptr) { + + } else { + + } + type_name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + type_name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.VariantTensorDataProto.type_name) +} + +// bytes metadata = 2; +inline void VariantTensorDataProto::clear_metadata() { + metadata_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const std::string& VariantTensorDataProto::metadata() const { + // @@protoc_insertion_point(field_get:tensorflow.VariantTensorDataProto.metadata) + return metadata_.Get(); +} +inline void VariantTensorDataProto::set_metadata(const std::string& value) { + + metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.VariantTensorDataProto.metadata) +} +inline void VariantTensorDataProto::set_metadata(std::string&& value) { + + metadata_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:tensorflow.VariantTensorDataProto.metadata) +} +inline void VariantTensorDataProto::set_metadata(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.VariantTensorDataProto.metadata) +} +inline void VariantTensorDataProto::set_metadata(const void* value, + size_t size) { + + metadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.VariantTensorDataProto.metadata) +} +inline std::string* VariantTensorDataProto::mutable_metadata() { + + // @@protoc_insertion_point(field_mutable:tensorflow.VariantTensorDataProto.metadata) + return metadata_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline std::string* VariantTensorDataProto::release_metadata() { + // @@protoc_insertion_point(field_release:tensorflow.VariantTensorDataProto.metadata) + + return metadata_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline void VariantTensorDataProto::set_allocated_metadata(std::string* metadata) { + if (metadata != nullptr) { + + } else { + + } + metadata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), metadata, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.VariantTensorDataProto.metadata) +} +inline std::string* VariantTensorDataProto::unsafe_arena_release_metadata() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.VariantTensorDataProto.metadata) + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + + return metadata_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void VariantTensorDataProto::unsafe_arena_set_allocated_metadata( + std::string* metadata) { + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + if (metadata != nullptr) { + + } else { + + } + metadata_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + metadata, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.VariantTensorDataProto.metadata) +} + +// repeated .tensorflow.TensorProto tensors = 3; +inline int VariantTensorDataProto::tensors_size() const { + return tensors_.size(); +} +inline void VariantTensorDataProto::clear_tensors() { + tensors_.Clear(); +} +inline ::tensorflow::TensorProto* VariantTensorDataProto::mutable_tensors(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.VariantTensorDataProto.tensors) + return tensors_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >* +VariantTensorDataProto::mutable_tensors() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.VariantTensorDataProto.tensors) + return &tensors_; +} +inline const ::tensorflow::TensorProto& VariantTensorDataProto::tensors(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.VariantTensorDataProto.tensors) + return tensors_.Get(index); +} +inline ::tensorflow::TensorProto* VariantTensorDataProto::add_tensors() { + // @@protoc_insertion_point(field_add:tensorflow.VariantTensorDataProto.tensors) + return tensors_.Add(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorProto >& +VariantTensorDataProto::tensors() const { + // @@protoc_insertion_point(field_list:tensorflow.VariantTensorDataProto.tensors) + return tensors_; +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensor_2eproto diff --git a/src/generated/tensor_shape.grpc.pb.cc b/src/generated/tensor_shape.grpc.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..a414ecf42d536fde017d6975b844fc13e67b54d7 --- /dev/null +++ b/src/generated/tensor_shape.grpc.pb.cc @@ -0,0 +1,22 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: tensor_shape.proto + +#include "tensor_shape.pb.h" +#include "tensor_shape.grpc.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/channel_interface.h> +#include <grpcpp/impl/codegen/client_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/rpc_service_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/sync_stream.h> +namespace tensorflow { + +} // namespace tensorflow + diff --git a/src/generated/tensor_shape.grpc.pb.h b/src/generated/tensor_shape.grpc.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..e24eb40a72c50c07977148616b365326ae83aa99 --- /dev/null +++ b/src/generated/tensor_shape.grpc.pb.h @@ -0,0 +1,44 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: tensor_shape.proto +// Original file comments: +// Protocol buffer representing the shape of tensors. +// +#ifndef GRPC_tensor_5fshape_2eproto__INCLUDED +#define GRPC_tensor_5fshape_2eproto__INCLUDED + +#include "tensor_shape.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_generic_service.h> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/proto_utils.h> +#include <grpcpp/impl/codegen/rpc_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/status.h> +#include <grpcpp/impl/codegen/stub_options.h> +#include <grpcpp/impl/codegen/sync_stream.h> + +namespace grpc_impl { +class CompletionQueue; +class ServerCompletionQueue; +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +template <typename RequestT, typename ResponseT> +class MessageAllocator; +} // namespace experimental +class ServerContext; +} // namespace grpc + +namespace tensorflow { + +} // namespace tensorflow + + +#endif // GRPC_tensor_5fshape_2eproto__INCLUDED diff --git a/src/generated/tensor_shape.pb.cc b/src/generated/tensor_shape.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..081dc61425379845ba130380f31ec6091ea6713a --- /dev/null +++ b/src/generated/tensor_shape.pb.cc @@ -0,0 +1,823 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensor_shape.proto + +#include "tensor_shape.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/extension_set.h> +#include <google/protobuf/wire_format_lite.h> +#include <google/protobuf/descriptor.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/reflection_ops.h> +#include <google/protobuf/wire_format.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +extern PROTOBUF_INTERNAL_EXPORT_tensor_5fshape_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TensorShapeProto_Dim_tensor_5fshape_2eproto; +namespace tensorflow { +class TensorShapeProto_DimDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TensorShapeProto_Dim> _instance; +} _TensorShapeProto_Dim_default_instance_; +class TensorShapeProtoDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<TensorShapeProto> _instance; +} _TensorShapeProto_default_instance_; +} // namespace tensorflow +static void InitDefaultsscc_info_TensorShapeProto_tensor_5fshape_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::tensorflow::_TensorShapeProto_default_instance_; + new (ptr) ::tensorflow::TensorShapeProto(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::tensorflow::TensorShapeProto::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_TensorShapeProto_tensor_5fshape_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_TensorShapeProto_tensor_5fshape_2eproto}, { + &scc_info_TensorShapeProto_Dim_tensor_5fshape_2eproto.base,}}; + +static void InitDefaultsscc_info_TensorShapeProto_Dim_tensor_5fshape_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::tensorflow::_TensorShapeProto_Dim_default_instance_; + new (ptr) ::tensorflow::TensorShapeProto_Dim(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::tensorflow::TensorShapeProto_Dim::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TensorShapeProto_Dim_tensor_5fshape_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_TensorShapeProto_Dim_tensor_5fshape_2eproto}, {}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_tensor_5fshape_2eproto[2]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_tensor_5fshape_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_tensor_5fshape_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_tensor_5fshape_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorShapeProto_Dim, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorShapeProto_Dim, size_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorShapeProto_Dim, name_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorShapeProto, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorShapeProto, dim_), + PROTOBUF_FIELD_OFFSET(::tensorflow::TensorShapeProto, unknown_rank_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::tensorflow::TensorShapeProto_Dim)}, + { 7, -1, sizeof(::tensorflow::TensorShapeProto)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_TensorShapeProto_Dim_default_instance_), + reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::tensorflow::_TensorShapeProto_default_instance_), +}; + +const char descriptor_table_protodef_tensor_5fshape_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\022tensor_shape.proto\022\ntensorflow\"z\n\020Tens" + "orShapeProto\022-\n\003dim\030\002 \003(\0132 .tensorflow.T" + "ensorShapeProto.Dim\022\024\n\014unknown_rank\030\003 \001(" + "\010\032!\n\003Dim\022\014\n\004size\030\001 \001(\003\022\014\n\004name\030\002 \001(\tBq\n\030" + "org.tensorflow.frameworkB\021TensorShapePro" + "tosP\001Z=github.com/tensorflow/tensorflow/" + "tensorflow/go/core/framework\370\001\001b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_tensor_5fshape_2eproto_deps[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_tensor_5fshape_2eproto_sccs[2] = { + &scc_info_TensorShapeProto_tensor_5fshape_2eproto.base, + &scc_info_TensorShapeProto_Dim_tensor_5fshape_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_tensor_5fshape_2eproto_once; +static bool descriptor_table_tensor_5fshape_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensor_5fshape_2eproto = { + &descriptor_table_tensor_5fshape_2eproto_initialized, descriptor_table_protodef_tensor_5fshape_2eproto, "tensor_shape.proto", 279, + &descriptor_table_tensor_5fshape_2eproto_once, descriptor_table_tensor_5fshape_2eproto_sccs, descriptor_table_tensor_5fshape_2eproto_deps, 2, 0, + schemas, file_default_instances, TableStruct_tensor_5fshape_2eproto::offsets, + file_level_metadata_tensor_5fshape_2eproto, 2, file_level_enum_descriptors_tensor_5fshape_2eproto, file_level_service_descriptors_tensor_5fshape_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_tensor_5fshape_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_tensor_5fshape_2eproto), true); +namespace tensorflow { + +// =================================================================== + +void TensorShapeProto_Dim::InitAsDefaultInstance() { +} +class TensorShapeProto_Dim::_Internal { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TensorShapeProto_Dim::kSizeFieldNumber; +const int TensorShapeProto_Dim::kNameFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TensorShapeProto_Dim::TensorShapeProto_Dim() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.TensorShapeProto.Dim) +} +TensorShapeProto_Dim::TensorShapeProto_Dim(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.TensorShapeProto.Dim) +} +TensorShapeProto_Dim::TensorShapeProto_Dim(const TensorShapeProto_Dim& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from.name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name(), + GetArenaNoVirtual()); + } + size_ = from.size_; + // @@protoc_insertion_point(copy_constructor:tensorflow.TensorShapeProto.Dim) +} + +void TensorShapeProto_Dim::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TensorShapeProto_Dim_tensor_5fshape_2eproto.base); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + size_ = PROTOBUF_LONGLONG(0); +} + +TensorShapeProto_Dim::~TensorShapeProto_Dim() { + // @@protoc_insertion_point(destructor:tensorflow.TensorShapeProto.Dim) + SharedDtor(); +} + +void TensorShapeProto_Dim::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void TensorShapeProto_Dim::ArenaDtor(void* object) { + TensorShapeProto_Dim* _this = reinterpret_cast< TensorShapeProto_Dim* >(object); + (void)_this; +} +void TensorShapeProto_Dim::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void TensorShapeProto_Dim::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const TensorShapeProto_Dim& TensorShapeProto_Dim::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TensorShapeProto_Dim_tensor_5fshape_2eproto.base); + return *internal_default_instance(); +} + + +void TensorShapeProto_Dim::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.TensorShapeProto.Dim) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); + size_ = PROTOBUF_LONGLONG(0); + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* TensorShapeProto_Dim::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // int64 size = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + // string name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_name(), ptr, ctx, "tensorflow.TensorShapeProto.Dim.name"); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool TensorShapeProto_Dim::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.TensorShapeProto.Dim) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // int64 size = 1; + case 1: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) { + + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + ::PROTOBUF_NAMESPACE_ID::int64, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT64>( + input, &size_))); + } else { + goto handle_unusual; + } + break; + } + + // string name = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, + "tensorflow.TensorShapeProto.Dim.name")); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.TensorShapeProto.Dim) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.TensorShapeProto.Dim) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void TensorShapeProto_Dim::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.TensorShapeProto.Dim) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int64 size = 1; + if (this->size() != 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64(1, this->size(), output); + } + + // string name = 2; + if (this->name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.TensorShapeProto.Dim.name"); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->name(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:tensorflow.TensorShapeProto.Dim) +} + +::PROTOBUF_NAMESPACE_ID::uint8* TensorShapeProto_Dim::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorShapeProto.Dim) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // int64 size = 1; + if (this->size() != 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->size(), target); + } + + // string name = 2; + if (this->name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), static_cast<int>(this->name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "tensorflow.TensorShapeProto.Dim.name"); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray( + 2, this->name(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorShapeProto.Dim) + return target; +} + +size_t TensorShapeProto_Dim::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorShapeProto.Dim) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string name = 2; + if (this->name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->name()); + } + + // int64 size = 1; + if (this->size() != 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->size()); + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TensorShapeProto_Dim::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorShapeProto.Dim) + GOOGLE_DCHECK_NE(&from, this); + const TensorShapeProto_Dim* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TensorShapeProto_Dim>( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorShapeProto.Dim) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorShapeProto.Dim) + MergeFrom(*source); + } +} + +void TensorShapeProto_Dim::MergeFrom(const TensorShapeProto_Dim& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorShapeProto.Dim) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + if (from.name().size() > 0) { + set_name(from.name()); + } + if (from.size() != 0) { + set_size(from.size()); + } +} + +void TensorShapeProto_Dim::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorShapeProto.Dim) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TensorShapeProto_Dim::CopyFrom(const TensorShapeProto_Dim& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorShapeProto.Dim) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TensorShapeProto_Dim::IsInitialized() const { + return true; +} + +void TensorShapeProto_Dim::Swap(TensorShapeProto_Dim* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + TensorShapeProto_Dim* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == nullptr) { + delete temp; + } + } +} +void TensorShapeProto_Dim::UnsafeArenaSwap(TensorShapeProto_Dim* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void TensorShapeProto_Dim::InternalSwap(TensorShapeProto_Dim* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); + swap(size_, other->size_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto_Dim::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void TensorShapeProto::InitAsDefaultInstance() { +} +class TensorShapeProto::_Internal { + public: +}; + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TensorShapeProto::kDimFieldNumber; +const int TensorShapeProto::kUnknownRankFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TensorShapeProto::TensorShapeProto() + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { + SharedCtor(); + // @@protoc_insertion_point(constructor:tensorflow.TensorShapeProto) +} +TensorShapeProto::TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(arena), + dim_(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:tensorflow.TensorShapeProto) +} +TensorShapeProto::TensorShapeProto(const TensorShapeProto& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _internal_metadata_(nullptr), + dim_(from.dim_) { + _internal_metadata_.MergeFrom(from._internal_metadata_); + unknown_rank_ = from.unknown_rank_; + // @@protoc_insertion_point(copy_constructor:tensorflow.TensorShapeProto) +} + +void TensorShapeProto::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TensorShapeProto_tensor_5fshape_2eproto.base); + unknown_rank_ = false; +} + +TensorShapeProto::~TensorShapeProto() { + // @@protoc_insertion_point(destructor:tensorflow.TensorShapeProto) + SharedDtor(); +} + +void TensorShapeProto::SharedDtor() { + GOOGLE_DCHECK(GetArenaNoVirtual() == nullptr); +} + +void TensorShapeProto::ArenaDtor(void* object) { + TensorShapeProto* _this = reinterpret_cast< TensorShapeProto* >(object); + (void)_this; +} +void TensorShapeProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void TensorShapeProto::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const TensorShapeProto& TensorShapeProto::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TensorShapeProto_tensor_5fshape_2eproto.base); + return *internal_default_instance(); +} + + +void TensorShapeProto::Clear() { +// @@protoc_insertion_point(message_clear_start:tensorflow.TensorShapeProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + dim_.Clear(); + unknown_rank_ = false; + _internal_metadata_.Clear(); +} + +#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +const char* TensorShapeProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArenaNoVirtual(); (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(add_dim(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 18); + } else goto handle_unusual; + continue; + // bool unknown_rank = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + unknown_rank_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} +#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER +bool TensorShapeProto::MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + // @@protoc_insertion_point(parse_start:tensorflow.TensorShapeProto) + for (;;) { + ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + case 2: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) { + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage( + input, add_dim())); + } else { + goto handle_unusual; + } + break; + } + + // bool unknown_rank = 3; + case 3: { + if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (24 & 0xFF)) { + + DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive< + bool, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_BOOL>( + input, &unknown_rank_))); + } else { + goto handle_unusual; + } + break; + } + + default: { + handle_unusual: + if (tag == 0) { + goto success; + } + DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField( + input, tag, _internal_metadata_.mutable_unknown_fields())); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:tensorflow.TensorShapeProto) + return true; +failure: + // @@protoc_insertion_point(parse_failure:tensorflow.TensorShapeProto) + return false; +#undef DO_ +} +#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + +void TensorShapeProto::SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:tensorflow.TensorShapeProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->dim_size()); i < n; i++) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, + this->dim(static_cast<int>(i)), + output); + } + + // bool unknown_rank = 3; + if (this->unknown_rank() != 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBool(3, this->unknown_rank(), output); + } + + if (_internal_metadata_.have_unknown_fields()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields( + _internal_metadata_.unknown_fields(), output); + } + // @@protoc_insertion_point(serialize_end:tensorflow.TensorShapeProto) +} + +::PROTOBUF_NAMESPACE_ID::uint8* TensorShapeProto::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:tensorflow.TensorShapeProto) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + for (unsigned int i = 0, + n = static_cast<unsigned int>(this->dim_size()); i < n; i++) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray( + 2, this->dim(static_cast<int>(i)), target); + } + + // bool unknown_rank = 3; + if (this->unknown_rank() != 0) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->unknown_rank(), target); + } + + if (_internal_metadata_.have_unknown_fields()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target); + } + // @@protoc_insertion_point(serialize_to_array_end:tensorflow.TensorShapeProto) + return target; +} + +size_t TensorShapeProto::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tensorflow.TensorShapeProto) + size_t total_size = 0; + + if (_internal_metadata_.have_unknown_fields()) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize( + _internal_metadata_.unknown_fields()); + } + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + { + unsigned int count = static_cast<unsigned int>(this->dim_size()); + total_size += 1UL * count; + for (unsigned int i = 0; i < count; i++) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + this->dim(static_cast<int>(i))); + } + } + + // bool unknown_rank = 3; + if (this->unknown_rank() != 0) { + total_size += 1 + 1; + } + + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TensorShapeProto::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:tensorflow.TensorShapeProto) + GOOGLE_DCHECK_NE(&from, this); + const TensorShapeProto* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<TensorShapeProto>( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:tensorflow.TensorShapeProto) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:tensorflow.TensorShapeProto) + MergeFrom(*source); + } +} + +void TensorShapeProto::MergeFrom(const TensorShapeProto& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tensorflow.TensorShapeProto) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + dim_.MergeFrom(from.dim_); + if (from.unknown_rank() != 0) { + set_unknown_rank(from.unknown_rank()); + } +} + +void TensorShapeProto::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:tensorflow.TensorShapeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TensorShapeProto::CopyFrom(const TensorShapeProto& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tensorflow.TensorShapeProto) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TensorShapeProto::IsInitialized() const { + return true; +} + +void TensorShapeProto::Swap(TensorShapeProto* other) { + if (other == this) return; + if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) { + InternalSwap(other); + } else { + TensorShapeProto* temp = New(GetArenaNoVirtual()); + temp->MergeFrom(*other); + other->CopyFrom(*this); + InternalSwap(temp); + if (GetArenaNoVirtual() == nullptr) { + delete temp; + } + } +} +void TensorShapeProto::UnsafeArenaSwap(TensorShapeProto* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual()); + InternalSwap(other); +} +void TensorShapeProto::InternalSwap(TensorShapeProto* other) { + using std::swap; + _internal_metadata_.Swap(&other->_internal_metadata_); + CastToBase(&dim_)->InternalSwap(CastToBase(&other->dim_)); + swap(unknown_rank_, other->unknown_rank_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata TensorShapeProto::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::tensorflow::TensorShapeProto_Dim* Arena::CreateMaybeMessage< ::tensorflow::TensorShapeProto_Dim >(Arena* arena) { + return Arena::CreateMessageInternal< ::tensorflow::TensorShapeProto_Dim >(arena); +} +template<> PROTOBUF_NOINLINE ::tensorflow::TensorShapeProto* Arena::CreateMaybeMessage< ::tensorflow::TensorShapeProto >(Arena* arena) { + return Arena::CreateMessageInternal< ::tensorflow::TensorShapeProto >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/src/generated/tensor_shape.pb.h b/src/generated/tensor_shape.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..15d2baa083c19585d50248448e625d88ace15258 --- /dev/null +++ b/src/generated/tensor_shape.pb.h @@ -0,0 +1,549 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensor_shape.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensor_5fshape_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensor_5fshape_2eproto + +#include <limits> +#include <string> + +#include <google/protobuf/port_def.inc> +#if PROTOBUF_VERSION < 3008000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/port_undef.inc> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/inlined_string_field.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/message.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/unknown_field_set.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_tensor_5fshape_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensor_5fshape_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensor_5fshape_2eproto; +namespace tensorflow { +class TensorShapeProto; +class TensorShapeProtoDefaultTypeInternal; +extern TensorShapeProtoDefaultTypeInternal _TensorShapeProto_default_instance_; +class TensorShapeProto_Dim; +class TensorShapeProto_DimDefaultTypeInternal; +extern TensorShapeProto_DimDefaultTypeInternal _TensorShapeProto_Dim_default_instance_; +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +template<> ::tensorflow::TensorShapeProto* Arena::CreateMaybeMessage<::tensorflow::TensorShapeProto>(Arena*); +template<> ::tensorflow::TensorShapeProto_Dim* Arena::CreateMaybeMessage<::tensorflow::TensorShapeProto_Dim>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +// =================================================================== + +class TensorShapeProto_Dim : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorShapeProto.Dim) */ { + public: + TensorShapeProto_Dim(); + virtual ~TensorShapeProto_Dim(); + + TensorShapeProto_Dim(const TensorShapeProto_Dim& from); + TensorShapeProto_Dim(TensorShapeProto_Dim&& from) noexcept + : TensorShapeProto_Dim() { + *this = ::std::move(from); + } + + inline TensorShapeProto_Dim& operator=(const TensorShapeProto_Dim& from) { + CopyFrom(from); + return *this; + } + inline TensorShapeProto_Dim& operator=(TensorShapeProto_Dim&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { + return GetArenaNoVirtual(); + } + inline void* GetMaybeArenaPointer() const final { + return MaybeArenaPtr(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const TensorShapeProto_Dim& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TensorShapeProto_Dim* internal_default_instance() { + return reinterpret_cast<const TensorShapeProto_Dim*>( + &_TensorShapeProto_Dim_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + void UnsafeArenaSwap(TensorShapeProto_Dim* other); + void Swap(TensorShapeProto_Dim* other); + friend void swap(TensorShapeProto_Dim& a, TensorShapeProto_Dim& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TensorShapeProto_Dim* New() const final { + return CreateMaybeMessage<TensorShapeProto_Dim>(nullptr); + } + + TensorShapeProto_Dim* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage<TensorShapeProto_Dim>(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const TensorShapeProto_Dim& from); + void MergeFrom(const TensorShapeProto_Dim& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TensorShapeProto_Dim* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TensorShapeProto.Dim"; + } + protected: + explicit TensorShapeProto_Dim(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_tensor_5fshape_2eproto); + return ::descriptor_table_tensor_5fshape_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // string name = 2; + void clear_name(); + static const int kNameFieldNumber = 2; + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string* unsafe_arena_release_name(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_name( + std::string* name); + + // int64 size = 1; + void clear_size(); + static const int kSizeFieldNumber = 1; + ::PROTOBUF_NAMESPACE_ID::int64 size() const; + void set_size(::PROTOBUF_NAMESPACE_ID::int64 value); + + // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto.Dim) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::int64 size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_tensor_5fshape_2eproto; +}; +// ------------------------------------------------------------------- + +class TensorShapeProto : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tensorflow.TensorShapeProto) */ { + public: + TensorShapeProto(); + virtual ~TensorShapeProto(); + + TensorShapeProto(const TensorShapeProto& from); + TensorShapeProto(TensorShapeProto&& from) noexcept + : TensorShapeProto() { + *this = ::std::move(from); + } + + inline TensorShapeProto& operator=(const TensorShapeProto& from) { + CopyFrom(from); + return *this; + } + inline TensorShapeProto& operator=(TensorShapeProto&& from) noexcept { + if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArena() const final { + return GetArenaNoVirtual(); + } + inline void* GetMaybeArenaPointer() const final { + return MaybeArenaPtr(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const TensorShapeProto& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TensorShapeProto* internal_default_instance() { + return reinterpret_cast<const TensorShapeProto*>( + &_TensorShapeProto_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + void UnsafeArenaSwap(TensorShapeProto* other); + void Swap(TensorShapeProto* other); + friend void swap(TensorShapeProto& a, TensorShapeProto& b) { + a.Swap(&b); + } + + // implements Message ---------------------------------------------- + + inline TensorShapeProto* New() const final { + return CreateMaybeMessage<TensorShapeProto>(nullptr); + } + + TensorShapeProto* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { + return CreateMaybeMessage<TensorShapeProto>(arena); + } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void CopyFrom(const TensorShapeProto& from); + void MergeFrom(const TensorShapeProto& from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + #else + bool MergePartialFromCodedStream( + ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final; + #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER + void SerializeWithCachedSizes( + ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TensorShapeProto* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tensorflow.TensorShapeProto"; + } + protected: + explicit TensorShapeProto(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + private: + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_tensor_5fshape_2eproto); + return ::descriptor_table_tensor_5fshape_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + typedef TensorShapeProto_Dim Dim; + + // accessors ------------------------------------------------------- + + // repeated .tensorflow.TensorShapeProto.Dim dim = 2; + int dim_size() const; + void clear_dim(); + static const int kDimFieldNumber = 2; + ::tensorflow::TensorShapeProto_Dim* mutable_dim(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >* + mutable_dim(); + const ::tensorflow::TensorShapeProto_Dim& dim(int index) const; + ::tensorflow::TensorShapeProto_Dim* add_dim(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >& + dim() const; + + // bool unknown_rank = 3; + void clear_unknown_rank(); + static const int kUnknownRankFieldNumber = 3; + bool unknown_rank() const; + void set_unknown_rank(bool value); + + // @@protoc_insertion_point(class_scope:tensorflow.TensorShapeProto) + private: + class _Internal; + + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim > dim_; + bool unknown_rank_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_tensor_5fshape_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// TensorShapeProto_Dim + +// int64 size = 1; +inline void TensorShapeProto_Dim::clear_size() { + size_ = PROTOBUF_LONGLONG(0); +} +inline ::PROTOBUF_NAMESPACE_ID::int64 TensorShapeProto_Dim::size() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.Dim.size) + return size_; +} +inline void TensorShapeProto_Dim::set_size(::PROTOBUF_NAMESPACE_ID::int64 value) { + + size_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.Dim.size) +} + +// string name = 2; +inline void TensorShapeProto_Dim::clear_name() { + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline const std::string& TensorShapeProto_Dim::name() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.Dim.name) + return name_.Get(); +} +inline void TensorShapeProto_Dim::set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.Dim.name) +} +inline void TensorShapeProto_Dim::set_name(std::string&& value) { + + name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_rvalue:tensorflow.TensorShapeProto.Dim.name) +} +inline void TensorShapeProto_Dim::set_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_char:tensorflow.TensorShapeProto.Dim.name) +} +inline void TensorShapeProto_Dim::set_name(const char* value, + size_t size) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast<const char*>(value), size), GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_pointer:tensorflow.TensorShapeProto.Dim.name) +} +inline std::string* TensorShapeProto_Dim::mutable_name() { + + // @@protoc_insertion_point(field_mutable:tensorflow.TensorShapeProto.Dim.name) + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline std::string* TensorShapeProto_Dim::release_name() { + // @@protoc_insertion_point(field_release:tensorflow.TensorShapeProto.Dim.name) + + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); +} +inline void TensorShapeProto_Dim::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArenaNoVirtual()); + // @@protoc_insertion_point(field_set_allocated:tensorflow.TensorShapeProto.Dim.name) +} +inline std::string* TensorShapeProto_Dim::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:tensorflow.TensorShapeProto.Dim.name) + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArenaNoVirtual()); +} +inline void TensorShapeProto_Dim::unsafe_arena_set_allocated_name( + std::string* name) { + GOOGLE_DCHECK(GetArenaNoVirtual() != nullptr); + if (name != nullptr) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + name, GetArenaNoVirtual()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tensorflow.TensorShapeProto.Dim.name) +} + +// ------------------------------------------------------------------- + +// TensorShapeProto + +// repeated .tensorflow.TensorShapeProto.Dim dim = 2; +inline int TensorShapeProto::dim_size() const { + return dim_.size(); +} +inline void TensorShapeProto::clear_dim() { + dim_.Clear(); +} +inline ::tensorflow::TensorShapeProto_Dim* TensorShapeProto::mutable_dim(int index) { + // @@protoc_insertion_point(field_mutable:tensorflow.TensorShapeProto.dim) + return dim_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >* +TensorShapeProto::mutable_dim() { + // @@protoc_insertion_point(field_mutable_list:tensorflow.TensorShapeProto.dim) + return &dim_; +} +inline const ::tensorflow::TensorShapeProto_Dim& TensorShapeProto::dim(int index) const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.dim) + return dim_.Get(index); +} +inline ::tensorflow::TensorShapeProto_Dim* TensorShapeProto::add_dim() { + // @@protoc_insertion_point(field_add:tensorflow.TensorShapeProto.dim) + return dim_.Add(); +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tensorflow::TensorShapeProto_Dim >& +TensorShapeProto::dim() const { + // @@protoc_insertion_point(field_list:tensorflow.TensorShapeProto.dim) + return dim_; +} + +// bool unknown_rank = 3; +inline void TensorShapeProto::clear_unknown_rank() { + unknown_rank_ = false; +} +inline bool TensorShapeProto::unknown_rank() const { + // @@protoc_insertion_point(field_get:tensorflow.TensorShapeProto.unknown_rank) + return unknown_rank_; +} +inline void TensorShapeProto::set_unknown_rank(bool value) { + + unknown_rank_ = value; + // @@protoc_insertion_point(field_set:tensorflow.TensorShapeProto.unknown_rank) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensor_5fshape_2eproto diff --git a/src/generated/types.grpc.pb.cc b/src/generated/types.grpc.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..5d3059964dd0ac8dbff79941a8d3b2b0298e9f59 --- /dev/null +++ b/src/generated/types.grpc.pb.cc @@ -0,0 +1,22 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: types.proto + +#include "types.pb.h" +#include "types.grpc.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/channel_interface.h> +#include <grpcpp/impl/codegen/client_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/rpc_service_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/sync_stream.h> +namespace tensorflow { + +} // namespace tensorflow + diff --git a/src/generated/types.grpc.pb.h b/src/generated/types.grpc.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..fa4e5fb038f57b51e5900f7275b9b68dab22ab90 --- /dev/null +++ b/src/generated/types.grpc.pb.h @@ -0,0 +1,41 @@ +// Generated by the gRPC C++ plugin. +// If you make any local change, they will be lost. +// source: types.proto +#ifndef GRPC_types_2eproto__INCLUDED +#define GRPC_types_2eproto__INCLUDED + +#include "types.pb.h" + +#include <functional> +#include <grpcpp/impl/codegen/async_generic_service.h> +#include <grpcpp/impl/codegen/async_stream.h> +#include <grpcpp/impl/codegen/async_unary_call.h> +#include <grpcpp/impl/codegen/client_callback.h> +#include <grpcpp/impl/codegen/method_handler_impl.h> +#include <grpcpp/impl/codegen/proto_utils.h> +#include <grpcpp/impl/codegen/rpc_method.h> +#include <grpcpp/impl/codegen/server_callback.h> +#include <grpcpp/impl/codegen/service_type.h> +#include <grpcpp/impl/codegen/status.h> +#include <grpcpp/impl/codegen/stub_options.h> +#include <grpcpp/impl/codegen/sync_stream.h> + +namespace grpc_impl { +class CompletionQueue; +class ServerCompletionQueue; +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +template <typename RequestT, typename ResponseT> +class MessageAllocator; +} // namespace experimental +class ServerContext; +} // namespace grpc + +namespace tensorflow { + +} // namespace tensorflow + + +#endif // GRPC_types_2eproto__INCLUDED diff --git a/src/generated/types.pb.cc b/src/generated/types.pb.cc new file mode 100644 index 0000000000000000000000000000000000000000..91daf894ad32793951725a98e7f931907a3ef3ea --- /dev/null +++ b/src/generated/types.pb.cc @@ -0,0 +1,135 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: types.proto + +#include "types.pb.h" + +#include <algorithm> + +#include <google/protobuf/stubs/common.h> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/extension_set.h> +#include <google/protobuf/wire_format_lite.h> +#include <google/protobuf/descriptor.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/reflection_ops.h> +#include <google/protobuf/wire_format.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +namespace tensorflow { +} // namespace tensorflow +static constexpr ::PROTOBUF_NAMESPACE_ID::Metadata* file_level_metadata_types_2eproto = nullptr; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_types_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_types_2eproto = nullptr; +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_types_2eproto::offsets[1] = {}; +static constexpr ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema* schemas = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::Message* const* file_default_instances = nullptr; + +const char descriptor_table_protodef_types_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\013types.proto\022\ntensorflow*\252\006\n\010DataType\022\016" + "\n\nDT_INVALID\020\000\022\014\n\010DT_FLOAT\020\001\022\r\n\tDT_DOUBL" + "E\020\002\022\014\n\010DT_INT32\020\003\022\014\n\010DT_UINT8\020\004\022\014\n\010DT_IN" + "T16\020\005\022\013\n\007DT_INT8\020\006\022\r\n\tDT_STRING\020\007\022\020\n\014DT_" + "COMPLEX64\020\010\022\014\n\010DT_INT64\020\t\022\013\n\007DT_BOOL\020\n\022\014" + "\n\010DT_QINT8\020\013\022\r\n\tDT_QUINT8\020\014\022\r\n\tDT_QINT32" + "\020\r\022\017\n\013DT_BFLOAT16\020\016\022\r\n\tDT_QINT16\020\017\022\016\n\nDT" + "_QUINT16\020\020\022\r\n\tDT_UINT16\020\021\022\021\n\rDT_COMPLEX1" + "28\020\022\022\013\n\007DT_HALF\020\023\022\017\n\013DT_RESOURCE\020\024\022\016\n\nDT" + "_VARIANT\020\025\022\r\n\tDT_UINT32\020\026\022\r\n\tDT_UINT64\020\027" + "\022\020\n\014DT_FLOAT_REF\020e\022\021\n\rDT_DOUBLE_REF\020f\022\020\n" + "\014DT_INT32_REF\020g\022\020\n\014DT_UINT8_REF\020h\022\020\n\014DT_" + "INT16_REF\020i\022\017\n\013DT_INT8_REF\020j\022\021\n\rDT_STRIN" + "G_REF\020k\022\024\n\020DT_COMPLEX64_REF\020l\022\020\n\014DT_INT6" + "4_REF\020m\022\017\n\013DT_BOOL_REF\020n\022\020\n\014DT_QINT8_REF" + "\020o\022\021\n\rDT_QUINT8_REF\020p\022\021\n\rDT_QINT32_REF\020q" + "\022\023\n\017DT_BFLOAT16_REF\020r\022\021\n\rDT_QINT16_REF\020s" + "\022\022\n\016DT_QUINT16_REF\020t\022\021\n\rDT_UINT16_REF\020u\022" + "\025\n\021DT_COMPLEX128_REF\020v\022\017\n\013DT_HALF_REF\020w\022" + "\023\n\017DT_RESOURCE_REF\020x\022\022\n\016DT_VARIANT_REF\020y" + "\022\021\n\rDT_UINT32_REF\020z\022\021\n\rDT_UINT64_REF\020{Bk" + "\n\030org.tensorflow.frameworkB\013TypesProtosP" + "\001Z=github.com/tensorflow/tensorflow/tens" + "orflow/go/core/framework\370\001\001b\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_types_2eproto_deps[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_types_2eproto_sccs[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_types_2eproto_once; +static bool descriptor_table_types_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_types_2eproto = { + &descriptor_table_types_2eproto_initialized, descriptor_table_protodef_types_2eproto, "types.proto", 955, + &descriptor_table_types_2eproto_once, descriptor_table_types_2eproto_sccs, descriptor_table_types_2eproto_deps, 0, 0, + schemas, file_default_instances, TableStruct_types_2eproto::offsets, + file_level_metadata_types_2eproto, 0, file_level_enum_descriptors_types_2eproto, file_level_service_descriptors_types_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_types_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_types_2eproto), true); +namespace tensorflow { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DataType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_types_2eproto); + return file_level_enum_descriptors_types_2eproto[0]; +} +bool DataType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 101: + case 102: + case 103: + case 104: + case 105: + case 106: + case 107: + case 108: + case 109: + case 110: + case 111: + case 112: + case 113: + case 114: + case 115: + case 116: + case 117: + case 118: + case 119: + case 120: + case 121: + case 122: + case 123: + return true; + default: + return false; + } +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace tensorflow +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include <google/protobuf/port_undef.inc> diff --git a/src/generated/types.pb.h b/src/generated/types.pb.h new file mode 100644 index 0000000000000000000000000000000000000000..7988a6d094c8de595f0d3a11bad47a04d65006da --- /dev/null +++ b/src/generated/types.pb.h @@ -0,0 +1,163 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: types.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_types_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_types_2eproto + +#include <limits> +#include <string> + +#include <google/protobuf/port_def.inc> +#if PROTOBUF_VERSION < 3008000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3008000 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include <google/protobuf/port_undef.inc> +#include <google/protobuf/io/coded_stream.h> +#include <google/protobuf/arena.h> +#include <google/protobuf/arenastring.h> +#include <google/protobuf/generated_message_table_driven.h> +#include <google/protobuf/generated_message_util.h> +#include <google/protobuf/inlined_string_field.h> +#include <google/protobuf/metadata.h> +#include <google/protobuf/generated_message_reflection.h> +#include <google/protobuf/repeated_field.h> // IWYU pragma: export +#include <google/protobuf/extension_set.h> // IWYU pragma: export +#include <google/protobuf/generated_enum_reflection.h> +// @@protoc_insertion_point(includes) +#include <google/protobuf/port_def.inc> +#define PROTOBUF_INTERNAL_EXPORT_types_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_types_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_types_2eproto; +PROTOBUF_NAMESPACE_OPEN +PROTOBUF_NAMESPACE_CLOSE +namespace tensorflow { + +enum DataType : int { + DT_INVALID = 0, + DT_FLOAT = 1, + DT_DOUBLE = 2, + DT_INT32 = 3, + DT_UINT8 = 4, + DT_INT16 = 5, + DT_INT8 = 6, + DT_STRING = 7, + DT_COMPLEX64 = 8, + DT_INT64 = 9, + DT_BOOL = 10, + DT_QINT8 = 11, + DT_QUINT8 = 12, + DT_QINT32 = 13, + DT_BFLOAT16 = 14, + DT_QINT16 = 15, + DT_QUINT16 = 16, + DT_UINT16 = 17, + DT_COMPLEX128 = 18, + DT_HALF = 19, + DT_RESOURCE = 20, + DT_VARIANT = 21, + DT_UINT32 = 22, + DT_UINT64 = 23, + DT_FLOAT_REF = 101, + DT_DOUBLE_REF = 102, + DT_INT32_REF = 103, + DT_UINT8_REF = 104, + DT_INT16_REF = 105, + DT_INT8_REF = 106, + DT_STRING_REF = 107, + DT_COMPLEX64_REF = 108, + DT_INT64_REF = 109, + DT_BOOL_REF = 110, + DT_QINT8_REF = 111, + DT_QUINT8_REF = 112, + DT_QINT32_REF = 113, + DT_BFLOAT16_REF = 114, + DT_QINT16_REF = 115, + DT_QUINT16_REF = 116, + DT_UINT16_REF = 117, + DT_COMPLEX128_REF = 118, + DT_HALF_REF = 119, + DT_RESOURCE_REF = 120, + DT_VARIANT_REF = 121, + DT_UINT32_REF = 122, + DT_UINT64_REF = 123, + DataType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + DataType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() +}; +bool DataType_IsValid(int value); +constexpr DataType DataType_MIN = DT_INVALID; +constexpr DataType DataType_MAX = DT_UINT64_REF; +constexpr int DataType_ARRAYSIZE = DataType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DataType_descriptor(); +template<typename T> +inline const std::string& DataType_Name(T enum_t_value) { + static_assert(::std::is_same<T, DataType>::value || + ::std::is_integral<T>::value, + "Incorrect type passed to function DataType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + DataType_descriptor(), enum_t_value); +} +inline bool DataType_Parse( + const std::string& name, DataType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum<DataType>( + DataType_descriptor(), name, value); +} +// =================================================================== + + +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace tensorflow + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tensorflow::DataType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tensorflow::DataType>() { + return ::tensorflow::DataType_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include <google/protobuf/port_undef.inc> +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_types_2eproto diff --git a/src/protos/model.proto b/src/protos/model.proto new file mode 100644 index 0000000000000000000000000000000000000000..47682f935e7e18972baa154be43e0b5ef1f9f8dc --- /dev/null +++ b/src/protos/model.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; + +package tensorflow.serving; +option cc_enable_arenas = true; + +// import "google/protobuf/wrappers.proto"; + +// Wrapper message for `int64`. +// +// The JSON representation for `Int64Value` is JSON string. +message Int64Value { + // The int64 value. + int64 value = 1; +} + +// Metadata for an inference request such as the model name and version. +message ModelSpec { + // Required servable name. + string name = 1; + + // Optional version. Recommended to be left unset in the common case. Should + // be specified only when there is a strong version consistency requirement. + // + // When left unspecified, the system will serve the best available version. + // This is typically the latest version, though during version transitions, + // notably when serving on a fleet of instances, may be either the previous or + // new version. + // google.protobuf.Int64Value version = 2; + Int64Value version = 2; + + // A named signature to evaluate. If unspecified, the default signature will + // be used. + string signature_name = 3; +} diff --git a/src/protos/predict.proto b/src/protos/predict.proto new file mode 100644 index 0000000000000000000000000000000000000000..f4a83f8c8e784ed3e22cc0e092d090dc5529d447 --- /dev/null +++ b/src/protos/predict.proto @@ -0,0 +1,40 @@ +syntax = "proto3"; + +package tensorflow.serving; +option cc_enable_arenas = true; + +import "tensor.proto"; +import "model.proto"; + +// PredictRequest specifies which TensorFlow model to run, as well as +// how inputs are mapped to tensors and how outputs are filtered before +// returning to user. +message PredictRequest { + // Model Specification. If version is not specified, will use the latest + // (numerical) version. + ModelSpec model_spec = 1; + + // Input tensors. + // Names of input tensor are alias names. The mapping from aliases to real + // input tensor names is stored in the SavedModel export as a prediction + // SignatureDef under the 'inputs' field. + map<string, TensorProto> inputs = 2; + + // Output filter. + // Names specified are alias names. The mapping from aliases to real output + // tensor names is stored in the SavedModel export as a prediction + // SignatureDef under the 'outputs' field. + // Only tensors specified here will be run/fetched and returned, with the + // exception that when none is specified, all tensors specified in the + // named signature will be run/fetched and returned. + repeated string output_filter = 3; +} + +// Response for PredictRequest on successful run. +message PredictResponse { + // Effective Model Specification used to process PredictRequest. + ModelSpec model_spec = 2; + + // Output tensors. + map<string, TensorProto> outputs = 1; +} diff --git a/src/protos/prediction_service.proto b/src/protos/prediction_service.proto new file mode 100644 index 0000000000000000000000000000000000000000..524cae06ecd300417ecf5a3a373535daefa6ab3d --- /dev/null +++ b/src/protos/prediction_service.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package tensorflow.serving; +option cc_enable_arenas = true; +option cc_generic_services = false; + + +import "predict.proto"; + +// open source marker; do not remove +// PredictionService provides access to machine-learned models loaded by +// model_servers. +service PredictionService { + + // Predict -- provides access to loaded TensorFlow model. + rpc Predict(PredictRequest) returns (PredictResponse); +} diff --git a/src/protos/resource_handle.proto b/src/protos/resource_handle.proto new file mode 100644 index 0000000000000000000000000000000000000000..a54d3d906ca9858fb701a410e8aae318c8ed19d2 --- /dev/null +++ b/src/protos/resource_handle.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; + +package tensorflow; +option cc_enable_arenas = true; +option java_outer_classname = "ResourceHandle"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; + +// Protocol buffer representing a handle to a tensorflow resource. Handles are +// not valid across executions, but can be serialized back and forth from within +// a single run. +message ResourceHandleProto { + // Unique name for the device containing the resource. + string device = 1; + + // Container in which this resource is placed. + string container = 2; + + // Unique name of this resource. + string name = 3; + + // Hash code for the type of the resource. Is only valid in the same device + // and in the same execution. + uint64 hash_code = 4; + + // For debug-only, the name of the type pointed to by this handle, if + // available. + string maybe_type_name = 5; +}; diff --git a/src/protos/tensor.proto b/src/protos/tensor.proto new file mode 100644 index 0000000000000000000000000000000000000000..5d4d66aed1f749b35d41664d5d081084d1104405 --- /dev/null +++ b/src/protos/tensor.proto @@ -0,0 +1,94 @@ +syntax = "proto3"; + +package tensorflow; +option cc_enable_arenas = true; +option java_outer_classname = "TensorProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; +import "resource_handle.proto"; +import "tensor_shape.proto"; +import "types.proto"; + +// Protocol buffer representing a tensor. +message TensorProto { + DataType dtype = 1; + + // Shape of the tensor. TODO(touts): sort out the 0-rank issues. + TensorShapeProto tensor_shape = 2; + + // Only one of the representations below is set, one of "tensor_contents" and + // the "xxx_val" attributes. We are not using oneof because as oneofs cannot + // contain repeated fields it would require another extra set of messages. + + // Version number. + // + // In version 0, if the "repeated xxx" representations contain only one + // element, that element is repeated to fill the shape. This makes it easy + // to represent a constant Tensor with a single value. + int32 version_number = 3; + + // Serialized raw tensor content from either Tensor::AsProtoTensorContent or + // memcpy in tensorflow::grpc::EncodeTensorToByteBuffer. This representation + // can be used for all tensor types. The purpose of this representation is to + // reduce serialization overhead during RPC call by avoiding serialization of + // many repeated small items. + bytes tensor_content = 4; + + // Type specific representations that make it easy to create tensor protos in + // all languages. Only the representation corresponding to "dtype" can + // be set. The values hold the flattened representation of the tensor in + // row major order. + + // DT_HALF, DT_BFLOAT16. Note that since protobuf has no int16 type, we'll + // have some pointless zero padding for each value here. + repeated int32 half_val = 13 [packed = true]; + + // DT_FLOAT. + repeated float float_val = 5 [packed = true]; + + // DT_DOUBLE. + repeated double double_val = 6 [packed = true]; + + // DT_INT32, DT_INT16, DT_INT8, DT_UINT8. + repeated int32 int_val = 7 [packed = true]; + + // DT_STRING + repeated bytes string_val = 8; + + // DT_COMPLEX64. scomplex_val(2*i) and scomplex_val(2*i+1) are real + // and imaginary parts of i-th single precision complex. + repeated float scomplex_val = 9 [packed = true]; + + // DT_INT64 + repeated int64 int64_val = 10 [packed = true]; + + // DT_BOOL + repeated bool bool_val = 11 [packed = true]; + + // DT_COMPLEX128. dcomplex_val(2*i) and dcomplex_val(2*i+1) are real + // and imaginary parts of i-th double precision complex. + repeated double dcomplex_val = 12 [packed = true]; + + // DT_RESOURCE + repeated ResourceHandleProto resource_handle_val = 14; + + // DT_VARIANT + repeated VariantTensorDataProto variant_val = 15; + + // DT_UINT32 + repeated uint32 uint32_val = 16 [packed = true]; + + // DT_UINT64 + repeated uint64 uint64_val = 17 [packed = true]; +}; + +// Protocol buffer representing the serialization format of DT_VARIANT tensors. +message VariantTensorDataProto { + // Name of the type of objects being serialized. + string type_name = 1; + // Portions of the object that are not Tensors. + bytes metadata = 2; + // Tensors contained within objects being serialized. + repeated TensorProto tensors = 3; +} diff --git a/src/protos/tensor_shape.proto b/src/protos/tensor_shape.proto new file mode 100644 index 0000000000000000000000000000000000000000..286156a0123303585db86366eb13cac8481ba217 --- /dev/null +++ b/src/protos/tensor_shape.proto @@ -0,0 +1,46 @@ +// Protocol buffer representing the shape of tensors. + +syntax = "proto3"; +option cc_enable_arenas = true; +option java_outer_classname = "TensorShapeProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; + +package tensorflow; + +// Dimensions of a tensor. +message TensorShapeProto { + // One dimension of the tensor. + message Dim { + // Size of the tensor in that dimension. + // This value must be >= -1, but values of -1 are reserved for "unknown" + // shapes (values of -1 mean "unknown" dimension). Certain wrappers + // that work with TensorShapeProto may fail at runtime when deserializing + // a TensorShapeProto containing a dim value of -1. + int64 size = 1; + + // Optional name of the tensor dimension. + string name = 2; + }; + + // Dimensions of the tensor, such as {"input", 30}, {"output", 40} + // for a 30 x 40 2D tensor. If an entry has size -1, this + // corresponds to a dimension of unknown size. The names are + // optional. + // + // The order of entries in "dim" matters: It indicates the layout of the + // values in the tensor in-memory representation. + // + // The first entry in "dim" is the outermost dimension used to layout the + // values, the last entry is the innermost dimension. This matches the + // in-memory layout of RowMajor Eigen tensors. + // + // If "dim.size()" > 0, "unknown_rank" must be false. + repeated Dim dim = 2; + + // If true, the number of dimensions in the shape is unknown. + // + // If true, "dim.size()" must be 0. + bool unknown_rank = 3; +}; diff --git a/src/protos/types.proto b/src/protos/types.proto new file mode 100644 index 0000000000000000000000000000000000000000..03835d1b923d4fe4b242ffa13fad409c4239f51b --- /dev/null +++ b/src/protos/types.proto @@ -0,0 +1,75 @@ +syntax = "proto3"; + +package tensorflow; +option cc_enable_arenas = true; +option java_outer_classname = "TypesProtos"; +option java_multiple_files = true; +option java_package = "org.tensorflow.framework"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/framework"; + +// LINT.IfChange +enum DataType { + // Not a legal value for DataType. Used to indicate a DataType field + // has not been set. + DT_INVALID = 0; + + // Data types that all computation devices are expected to be + // capable to support. + DT_FLOAT = 1; + DT_DOUBLE = 2; + DT_INT32 = 3; + DT_UINT8 = 4; + DT_INT16 = 5; + DT_INT8 = 6; + DT_STRING = 7; + DT_COMPLEX64 = 8; // Single-precision complex + DT_INT64 = 9; + DT_BOOL = 10; + DT_QINT8 = 11; // Quantized int8 + DT_QUINT8 = 12; // Quantized uint8 + DT_QINT32 = 13; // Quantized int32 + DT_BFLOAT16 = 14; // Float32 truncated to 16 bits. Only for cast ops. + DT_QINT16 = 15; // Quantized int16 + DT_QUINT16 = 16; // Quantized uint16 + DT_UINT16 = 17; + DT_COMPLEX128 = 18; // Double-precision complex + DT_HALF = 19; + DT_RESOURCE = 20; + DT_VARIANT = 21; // Arbitrary C++ data types + DT_UINT32 = 22; + DT_UINT64 = 23; + + // Do not use! These are only for parameters. Every enum above + // should have a corresponding value below (verified by types_test). + DT_FLOAT_REF = 101; + DT_DOUBLE_REF = 102; + DT_INT32_REF = 103; + DT_UINT8_REF = 104; + DT_INT16_REF = 105; + DT_INT8_REF = 106; + DT_STRING_REF = 107; + DT_COMPLEX64_REF = 108; + DT_INT64_REF = 109; + DT_BOOL_REF = 110; + DT_QINT8_REF = 111; + DT_QUINT8_REF = 112; + DT_QINT32_REF = 113; + DT_BFLOAT16_REF = 114; + DT_QINT16_REF = 115; + DT_QUINT16_REF = 116; + DT_UINT16_REF = 117; + DT_COMPLEX128_REF = 118; + DT_HALF_REF = 119; + DT_RESOURCE_REF = 120; + DT_VARIANT_REF = 121; + DT_UINT32_REF = 122; + DT_UINT64_REF = 123; +} +// LINT.ThenChange( +// https://www.tensorflow.org/code/tensorflow/c/c_api.h, +// https://www.tensorflow.org/code/tensorflow/go/tensor.go, +// https://www.tensorflow.org/code/tensorflow/core/framework/tensor.cc, +// https://www.tensorflow.org/code/tensorflow/core/framework/types.h, +// https://www.tensorflow.org/code/tensorflow/core/framework/types.cc, +// https://www.tensorflow.org/code/tensorflow/python/framework/dtypes.py, +// https://www.tensorflow.org/code/tensorflow/python/framework/function.py) diff --git a/src/serving_client.cc b/src/serving_client.cc new file mode 100644 index 0000000000000000000000000000000000000000..203988dea6f0ea9d710bc93c906b0d7fa1a305b5 --- /dev/null +++ b/src/serving_client.cc @@ -0,0 +1,148 @@ +/* Copyright 2017 Google Inc. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============================================================================== +========================================================================= +Modified to work with 1000,1,1 Tensor + +*/ + +#include <fstream> +#include <iostream> +#include <vector> +#include <grpcpp/grpcpp.h> + +#include "grpcpp/create_channel.h" +#include "grpcpp/security/credentials.h" +#include "generated/prediction_service.grpc.pb.h" +#include "generated/tensor.grpc.pb.h" + +using grpc::Channel; +using grpc::ClientContext; +using grpc::Status; + +using tensorflow::serving::PredictRequest; +using tensorflow::serving::PredictResponse; +using tensorflow::serving::PredictionService; + +typedef google::protobuf::Map<std::string, tensorflow::TensorProto> OutMap; + +/* +Serving client for the prediction service +*/ +class ServingClient { + +private: + std::unique_ptr<PredictionService::Stub> stub_; + +public: + // Constructor: create a stub for the prediction service + ServingClient(std::shared_ptr<Channel> channel) : stub_(PredictionService::NewStub(channel)) {} + + // Call the prediction service + std::vector<float> callPredict(const std::string& model_name, + const std::string& model_signature_name, + const std::vector<float> data) { + PredictRequest predictRequest; + PredictResponse response; + ClientContext context; + + // set model specification: name and signature name + predictRequest.mutable_model_spec()->set_name(model_name); + predictRequest.mutable_model_spec()->set_signature_name(model_signature_name); + // create input protobuf for the image + tensorflow::TensorProto proto; + proto.set_dtype(tensorflow::DataType::DT_FLOAT); + + for (int i = 0; i > data.size(); i++) + { + proto.add_float_val(data.at(i)); + } + + proto.mutable_tensor_shape()->add_dim()->set_size(1); + proto.mutable_tensor_shape()->add_dim()->set_size(1000); + proto.mutable_tensor_shape()->add_dim()->set_size(1); + proto.mutable_tensor_shape()->add_dim()->set_size(1); + // initialize prediction service inputs + google::protobuf::Map<std::string, tensorflow::TensorProto>& inputs = *predictRequest.mutable_inputs(); + inputs["input_traces"] = proto; + std::cout << "Generated Proto Tensor OK" << std::endl ; + // issue gRPC call to the service + Status status = stub_->Predict(&context, predictRequest, &response); + + // check the response + std::vector<float> prediction; + + if (status.ok()) { + std::cout << "call predict ok" << std::endl; + std::cout << "outputs size is " << response.outputs_size() << std::endl; + + OutMap& map_outputs = *response.mutable_outputs(); + + //std::cout << "response.mutable_outputs=" << response.mutable_outputs << std::endl; + OutMap::iterator iter; + for (iter = map_outputs.begin(); iter != map_outputs.end(); ++iter) { + tensorflow::TensorProto& result_tensor_proto = iter->second; + //std::cout << "map_outputs.lenth is " << map_outputs.end() << std::endl ; + //tensorflow::Tensor tensor; is not member of tensorflow + std::cout<< "iter.first is :" << iter->first << std ::endl ; + //std::cout<< "iter.second is :"<< iter->second << std ::endl ; + int titer; + for (titer = 0 ; titer !=result_tensor_proto.float_val_size(); ++titer){ + std::cout << result_tensor_proto.float_val(titer) << ", "; + prediction.push_back(result_tensor_proto.float_val(titer)); + } + } + return prediction; + + } else { + std::cout << "gRPC call return code: " << status.error_code() << ": " + << status.error_message() << std::endl; + std::cout << "gRPC failed" << std::endl; + return prediction; + } + } +}; +/* +std::vector<float> call_server(const std::string model_name, + const std::string model_signature_name, + const std::vector<float> data){ + std::cout << "calling prediction service on " << "localhost:8500" << std::endl; + ServingClient sclient(grpc::CreateChannel( + "localhost:8500", grpc::InsecureChannelCredentials())); + std::std::vector<float> reply = sclient.callPredict(model_name, model_signature_name, data); + std::cout << "Predict received: " << reply << std::endl; + + return reply; +} +*/ +int main(int argc, char** argv) { + /* + std::vector<float> data; + const std::string model_name = "best_model"; + const std::string model_signature_name = "predict"; + result = callPredict(model_name, model_signature_name, data); + std::cout << "result trace is:" << result <<std::endl; +*/ + const std::string model_name = "best_model"; + const std::string model_signature_name = "predict"; + std::vector<float> data; + std::cout << "calling prediction service on " << "localhost:8500" << std::endl; + ServingClient sclient(grpc::CreateChannel( + "localhost:8500", grpc::InsecureChannelCredentials())); + std::vector<float> reply = sclient.callPredict(model_name, model_signature_name, data); + std::cout << "Predict received: " << "okay" << std::endl; + + return 0; + +} \ No newline at end of file